
{/* ─────────────────────────────────────────────────────────────────────────────
    L3 ENDPOINT PAGE TEMPLATE
    ─────────────────────────────────────────────────────────────────────────────
    CHECKLIST — complete all 4 steps in zudoku.config.tsx when adding a new page:
      1. Add nav entry under the correct category items[]
      2. Update prev/next on this page AND neighboring pages
      3. Add redirect: { from: "/rest/operationId", to: "/rest-api/category/slug" }
         (operationId is from the OpenAPI spec; place BEFORE the wildcard entry)
    ─────────────────────────────────────────────────────────────────────────────
    Copy this file, rename it to the kebab-case endpoint name, and fill in the
    TODOs. Then add a nav entry in zudoku.config.tsx and update prev/next links
    on neighboring pages.

    Available components (all registered in zudoku.config.tsx mdx.components):
      EndpointPage   — full page shell (breadcrumbs, title, method, url, note, example, sections)
      InlineBadge    — monospace inline code badge for body text
      TableBadge     — smaller monospace badge for table cells
      ParamList      — parameter table with optional Properties/Example tabs
      ResponsesSection — HTTP status tabs + Properties/Example buttons
      PageNavigation — prev/next navigation cards
      IconStaticStatusWarning — warning icon for callout boxes
    ─────────────────────────────────────────────────────────────────────────────
*/}

<EndpointPage
  breadcrumbs={[
    { label: "REST APIs", href: "/rest-api/rest-api" },
    { label: "TODO: Vertical", href: "/rest-api/rest-api#TODO-vertical" },
    { label: "TODO: Category", href: "/rest-api/TODO-vertical/TODO-category" },
    { label: "TODO: Endpoint Title" },
  ]}
  title="TODO: Endpoint Title"
  method="POST"
  url="https://api.gemini.com/v1/TODO"
  description="TODO: One-sentence description of what this endpoint does."
  note={{
    title: "Note",
    children: <p style={{ margin: 0 }}>TODO: Note content.</p>
  }}
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/TODO",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        request: "/v1/TODO",
        nonce: "<nonce>",
      },
    },
  }}
  sections={[
    {
      heading: "Roles",
      children: (
        <>
          <p style={{ margin: "0 0 2px" }}>The API key you use to access this endpoint must have the Trader role assigned. See <a href="https://docs.gemini.com/roles#roles" style={{ color: "inherit", textDecorationLine: "underline" }}>Roles</a> for more information.</p>
          <p style={{ margin: 0 }}>The OAuth scope must have <InlineBadge>TODO:scope</InlineBadge> assigned to access this endpoint. See <a href="/authentication/oauth#oauth-scopes" style={{ color: "inherit", textDecorationLine: "underline" }}>OAuth Scopes</a> for more information.</p>
        </>
      ),
    },
    {
      heading: "Headers",
      children: <SpecHeaders operationId="TODO_OPERATION_ID" />,
    },
    {
      heading: "Request Body",
      children: (
        <ParamList
          exampleCode={`{\n  "request": "/v1/TODO",\n  "nonce": "<nonce>"\n}`}
          exampleLabel="Example request body"
          params={[
            { name: "request", type: "string", required: true, description: 'The literal string "/v1/TODO"', example: "/v1/TODO" },
            { name: "nonce", type: "number", required: true, description: <>The nonce, as described in <span style={{ textDecorationLine: "underline" }}>Private API Invocation</span></> },
            { name: "account", type: "string", description: <>Required for Master API keys as described in <a href="https://docs.gemini.com/authentication/api-key#private-api-invocation" style={{ color: "inherit", textDecorationLine: "underline" }}>Private API Invocation</a>. The name of the account within the subaccount group. Only available for exchange accounts.</> },
          ]}
        />
      ),
    },
    {
      heading: "Responses",
      children: (
        <ResponsesSection tabs={[
          {
            code: "200",
            description: "TODO: Success description",
            params: [],
            example: `{\n  "TODO": "value"\n}`,
          },
          { code: "400", description: "", params: [] },
          {
            code: "401",
            description: "Unauthorized - missing or invalid authentication",
            params: [
              { name: "result", type: "string", description: "Error" },
              { name: "reason", type: "string", description: "A short description" },
              { name: "message", type: "string", description: "Detailed error message" },
            ],
            example: `{\n  "result": "error",\n  "reason": "MissingApikeyHeader",\n  "message": "Must provide 'X-GEMINI-APIKEY' header"\n}`,
          },
          { code: "403", description: "", params: [] },
          { code: "404", description: "", params: [] },
          { code: "429", description: "", params: [] },
          { code: "500", description: "", params: [] },
        ]} />
      ),
    },
  ]}
/>

<PageNavigation
  prev={{ label: "TODO: Previous Page", href: "/rest-api/TODO-prev" }}
  next={{ label: "TODO: Next Page", href: "/rest-api/TODO-next" }}
/>
