import * as z from "zod/v4"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateAuthKeysCodeGlobals = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. * * @remarks * This is used to track API usage per application. */ httpReferer?: string | undefined; /** * The app display name allows you to customize how your app appears in OpenRouter's dashboard. * * @remarks */ appTitle?: string | undefined; /** * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. * * @remarks */ appCategories?: string | undefined; }; /** * The method used to generate the code challenge */ export declare const CreateAuthKeysCodeCodeChallengeMethod: { readonly S256: "S256"; readonly Plain: "plain"; }; /** * The method used to generate the code challenge */ export type CreateAuthKeysCodeCodeChallengeMethod = OpenEnum; /** * Optional credit limit reset interval. When set, the credit limit resets on this interval. */ export declare const UsageLimitType: { readonly Daily: "daily"; readonly Weekly: "weekly"; readonly Monthly: "monthly"; }; /** * Optional credit limit reset interval. When set, the credit limit resets on this interval. */ export type UsageLimitType = OpenEnum; export type CreateAuthKeysCodeRequestBody = { /** * The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. */ callbackUrl: string; /** * PKCE code challenge for enhanced security */ codeChallenge?: string | undefined; /** * The method used to generate the code challenge */ codeChallengeMethod?: CreateAuthKeysCodeCodeChallengeMethod | undefined; /** * Optional expiration time for the API key to be created */ expiresAt?: Date | null | undefined; /** * Optional custom label for the API key. Defaults to the app name if not provided. */ keyLabel?: string | undefined; /** * Credit limit for the API key to be created */ limit?: number | undefined; /** * Optional credit limit reset interval. When set, the credit limit resets on this interval. */ usageLimitType?: UsageLimitType | undefined; }; export type CreateAuthKeysCodeRequest = { /** * The app identifier should be your app's URL and is used as the primary identifier for rankings. * * @remarks * This is used to track API usage per application. */ httpReferer?: string | undefined; /** * The app display name allows you to customize how your app appears in OpenRouter's dashboard. * * @remarks */ appTitle?: string | undefined; /** * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings. * * @remarks */ appCategories?: string | undefined; requestBody: CreateAuthKeysCodeRequestBody; }; /** * Auth code data */ export type CreateAuthKeysCodeData = { /** * The application ID associated with this auth code */ appId: number; /** * ISO 8601 timestamp of when the auth code was created */ createdAt: string; /** * The authorization code ID to use in the exchange request */ id: string; }; /** * Successfully created authorization code */ export type CreateAuthKeysCodeResponse = { /** * Auth code data */ data: CreateAuthKeysCodeData; }; /** @internal */ export declare const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType; /** @internal */ export declare const UsageLimitType$outboundSchema: z.ZodType; /** @internal */ export type CreateAuthKeysCodeRequestBody$Outbound = { callback_url: string; code_challenge?: string | undefined; code_challenge_method?: string | undefined; expires_at?: string | null | undefined; key_label?: string | undefined; limit?: number | undefined; usage_limit_type?: string | undefined; }; /** @internal */ export declare const CreateAuthKeysCodeRequestBody$outboundSchema: z.ZodType; export declare function createAuthKeysCodeRequestBodyToJSON(createAuthKeysCodeRequestBody: CreateAuthKeysCodeRequestBody): string; /** @internal */ export type CreateAuthKeysCodeRequest$Outbound = { "HTTP-Referer"?: string | undefined; appTitle?: string | undefined; appCategories?: string | undefined; RequestBody: CreateAuthKeysCodeRequestBody$Outbound; }; /** @internal */ export declare const CreateAuthKeysCodeRequest$outboundSchema: z.ZodType; export declare function createAuthKeysCodeRequestToJSON(createAuthKeysCodeRequest: CreateAuthKeysCodeRequest): string; /** @internal */ export declare const CreateAuthKeysCodeData$inboundSchema: z.ZodType; export declare function createAuthKeysCodeDataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const CreateAuthKeysCodeResponse$inboundSchema: z.ZodType; export declare function createAuthKeysCodeResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=createauthkeyscode.d.ts.map