import * as z from 'zod/mini'; import type * as App from '../../../App.js'; import * as Response from '../../../internal/Response.js'; /** Zod schemas owned by the API-keys resource. */ export declare namespace schema { /** One API key: metadata only — the token appears once, at mint. */ const Key: z.ZodMiniObject<{ allowedIps: z.ZodMiniReadonly>>; createdAt: z.ZodMiniISODateTime; createdBy: z.ZodMiniOptional>; environment: z.ZodMiniEnum<{ production: "production"; sandbox: "sandbox"; }>; expiresAt: z.ZodMiniOptional; id: z.ZodMiniString; lastUsedAt: z.ZodMiniOptional; name: z.ZodMiniOptional>; orgId: z.ZodMiniString; projectId: z.ZodMiniOptional>; scopes: z.ZodMiniArray>; tokenLast4: z.ZodMiniString; }, z.core.$strip>; /** Path parameters addressing a project's key collection. */ const Params: z.ZodMiniObject<{ orgId: z.ZodMiniString; projectId: z.ZodMiniString; }, z.core.$strip>; /** Path parameters addressing an organization's key collection. */ const OrgParams: z.ZodMiniObject<{ orgId: z.ZodMiniString; }, z.core.$strip>; /** Path parameters addressing one API key. */ const KeyParams: z.ZodMiniObject<{ keyId: z.ZodMiniString; orgId: z.ZodMiniString; projectId: z.ZodMiniString; }, z.core.$strip>; /** Path parameters addressing one organization-level API key. */ const OrgKeyParams: z.ZodMiniObject<{ keyId: z.ZodMiniString; orgId: z.ZodMiniString; }, z.core.$strip>; /** Request body minting a key. The wildcard scope is not issuable here. */ const CreateApiKeyRequest: z.ZodMiniObject<{ allowedIps: z.ZodMiniOptional>>>; environment: z.ZodMiniDefault>; name: z.ZodMiniOptional>; scopes: z.ZodMiniDefault>>; }, z.core.$strip>; /** Schemas for the createApiKey operation. */ namespace createApiKey { /** The minted key plus its one-time token. */ const Response: z.ZodMiniObject<{ allowedIps: z.ZodMiniReadonly>>; createdAt: z.ZodMiniISODateTime; createdBy: z.ZodMiniOptional>; environment: z.ZodMiniEnum<{ production: "production"; sandbox: "sandbox"; }>; expiresAt: z.ZodMiniOptional; id: z.ZodMiniString; lastUsedAt: z.ZodMiniOptional; name: z.ZodMiniOptional>; orgId: z.ZodMiniString; projectId: z.ZodMiniOptional>; scopes: z.ZodMiniArray>; tokenLast4: z.ZodMiniString; token: z.ZodMiniString; }, z.core.$strip>; } /** Non-paginated list of API key metadata. */ const ApiKeyList: z.ZodMiniObject<{ data: z.ZodMiniArray>>; createdAt: z.ZodMiniISODateTime; createdBy: z.ZodMiniOptional>; environment: z.ZodMiniEnum<{ production: "production"; sandbox: "sandbox"; }>; expiresAt: z.ZodMiniOptional; id: z.ZodMiniString; lastUsedAt: z.ZodMiniOptional; name: z.ZodMiniOptional>; orgId: z.ZodMiniString; projectId: z.ZodMiniOptional>; scopes: z.ZodMiniArray>; tokenLast4: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>; /** Schemas for the listApiKeys operation. */ namespace listApiKeys { /** Query parameters filtering a project's keys. */ const Query: z.ZodMiniObject<{ environment: z.ZodMiniDefault>; }, z.core.$strict>; /** Non-paginated list of a project's keys. */ const Response: z.ZodMiniObject<{ data: z.ZodMiniArray>>; createdAt: z.ZodMiniISODateTime; createdBy: z.ZodMiniOptional>; environment: z.ZodMiniEnum<{ production: "production"; sandbox: "sandbox"; }>; expiresAt: z.ZodMiniOptional; id: z.ZodMiniString; lastUsedAt: z.ZodMiniOptional; name: z.ZodMiniOptional>; orgId: z.ZodMiniString; projectId: z.ZodMiniOptional>; scopes: z.ZodMiniArray>; tokenLast4: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>; } /** Schemas for the listOrgApiKeys operation. */ namespace listOrgApiKeys { /** Query parameters filtering the organization's keys. */ const Query: z.ZodMiniObject<{ environment: z.ZodMiniDefault>; }, z.core.$strict>; /** Non-paginated list of every key in the organization. */ const Response: z.ZodMiniObject<{ data: z.ZodMiniArray>>; createdAt: z.ZodMiniISODateTime; createdBy: z.ZodMiniOptional>; environment: z.ZodMiniEnum<{ production: "production"; sandbox: "sandbox"; }>; expiresAt: z.ZodMiniOptional; id: z.ZodMiniString; lastUsedAt: z.ZodMiniOptional; name: z.ZodMiniOptional>; orgId: z.ZodMiniString; projectId: z.ZodMiniOptional>; scopes: z.ZodMiniArray>; tokenLast4: z.ZodMiniString; }, z.core.$strip>>; }, z.core.$strip>; } /** Schemas for the revokeApiKey operation. */ namespace revokeApiKey { /** Confirmation that the key was revoked. */ const Response: z.ZodMiniObject<{ id: z.ZodMiniString; }, z.core.$strip>; } /** Schemas for the rotateApiKey operation. */ namespace rotateApiKey { /** The replacement key plus its one-time token. */ const Response: z.ZodMiniObject<{ allowedIps: z.ZodMiniReadonly>>; createdAt: z.ZodMiniISODateTime; createdBy: z.ZodMiniOptional>; environment: z.ZodMiniEnum<{ production: "production"; sandbox: "sandbox"; }>; expiresAt: z.ZodMiniOptional; id: z.ZodMiniString; lastUsedAt: z.ZodMiniOptional; name: z.ZodMiniOptional>; orgId: z.ZodMiniString; projectId: z.ZodMiniOptional>; scopes: z.ZodMiniArray>; tokenLast4: z.ZodMiniString; token: z.ZodMiniString; }, z.core.$strip>; } /** Schemas for the updateApiKey operation. */ namespace updateApiKey { /** Request body replacing or clearing a key's IP allowlist. */ const Body: z.ZodMiniObject<{ allowedIps: z.ZodMiniReadonly>>; }, z.core.$strip>; } } /** * Mounts project-attributed API key mint, list, update, and revoke routes plus the org-wide list. Project routes enforce caller organization and project attribution. */ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-base").HonoBase; export declare namespace apiKeys { /** Options for creating the API-keys resource. */ type Options = { /** Whether the surface is enabled (a KV state store is configured); disabled routes are hidden and return `404`. */ enabled?: boolean | undefined; }; } //# sourceMappingURL=api-keys.d.ts.map