diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 3230fd8f..f951a516 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,7 +1,7 @@ lockVersion: 2.0.0 id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: - docChecksum: c8741e08f825c713956bfbdd29d4fdaf + docChecksum: a815b143d071828ce4ab7b3a743ec82c docVersion: 1.0.0 speakeasyVersion: 1.642.1 generationVersion: 2.731.4 @@ -294,8 +294,10 @@ generatedFiles: - docs/models/openresponseswebsearchtooltype.md - docs/models/operations/apitype.md - docs/models/operations/calldata.md - - docs/models/operations/createapialpharesponsesresponse.md - - docs/models/operations/createapialpharesponsesresponsebody.md + - docs/models/operations/createauthkeyscodecodechallengemethod.md + - docs/models/operations/createauthkeyscodedata.md + - docs/models/operations/createauthkeyscoderequest.md + - docs/models/operations/createauthkeyscoderesponse.md - docs/models/operations/createcoinbasechargedata.md - docs/models/operations/createcoinbasechargeresponse.md - docs/models/operations/createcoinbasechargesecurity.md @@ -303,8 +305,13 @@ generatedFiles: - docs/models/operations/createkeyslimitreset.md - docs/models/operations/createkeysrequest.md - docs/models/operations/createkeysresponse.md + - docs/models/operations/createresponsesresponse.md + - docs/models/operations/createresponsesresponsebody.md - docs/models/operations/deletekeysrequest.md - docs/models/operations/deletekeysresponse.md + - docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md + - docs/models/operations/exchangeauthcodeforapikeyrequest.md + - docs/models/operations/exchangeauthcodeforapikeyresponse.md - docs/models/operations/getcreditsresponse.md - docs/models/operations/getcurrentkeydata.md - docs/models/operations/getcurrentkeyresponse.md @@ -489,6 +496,7 @@ generatedFiles: - docs/sdks/endpoints/README.md - docs/sdks/generations/README.md - docs/sdks/models/README.md + - docs/sdks/oauth/README.md - docs/sdks/parameters/README.md - docs/sdks/providers/README.md - docs/sdks/responses/README.md @@ -518,6 +526,8 @@ generatedFiles: - src/funcs/modelsCount.ts - src/funcs/modelsList.ts - src/funcs/modelsListForUser.ts + - src/funcs/oAuthCreateAuthCode.ts + - src/funcs/oAuthExchangeAuthCodeForAPIKey.ts - src/funcs/parametersGetParameters.ts - src/funcs/providersList.ts - src/hooks/hooks.ts @@ -651,10 +661,12 @@ generatedFiles: - src/models/openresponseswebsearchpreview20250311tool.ts - src/models/openresponseswebsearchpreviewtool.ts - src/models/openresponseswebsearchtool.ts - - src/models/operations/createapialpharesponses.ts + - src/models/operations/createauthkeyscode.ts - src/models/operations/createcoinbasecharge.ts - src/models/operations/createkeys.ts + - src/models/operations/createresponses.ts - src/models/operations/deletekeys.ts + - src/models/operations/exchangeauthcodeforapikey.ts - src/models/operations/getcredits.ts - src/models/operations/getcurrentkey.ts - src/models/operations/getgeneration.ts @@ -742,6 +754,8 @@ generatedFiles: - src/react-query/modelsCount.ts - src/react-query/modelsList.ts - src/react-query/modelsListForUser.ts + - src/react-query/oAuthCreateAuthCode.ts + - src/react-query/oAuthExchangeAuthCodeForAPIKey.ts - src/react-query/parametersGetParameters.ts - src/react-query/providersList.ts - src/sdk/analytics.ts @@ -754,6 +768,7 @@ generatedFiles: - src/sdk/generations.ts - src/sdk/index.ts - src/sdk/models.ts + - src/sdk/oauth.ts - src/sdk/parameters.ts - src/sdk/providers.ts - src/sdk/responses.ts @@ -1658,4 +1673,63 @@ examples: application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} "500": application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": ""}}, "user_id": ""} + createResponses: + speakeasy-default-create-responses: + requestBody: + application/json: {"input": [{"type": "message", "role": "user", "content": "Hello, how are you?"}], "instructions": "", "metadata": {"user_id": "123", "session_id": "abc-def-ghi"}, "tools": [{"type": "function", "name": "get_current_weather", "description": "Get the current weather in a given location", "strict": true, "parameters": {"type": "object", "properties": {"location": {"type": "string"}}}}], "tool_choice": {"type": "function", "name": ""}, "parallel_tool_calls": true, "model": "anthropic/claude-4.5-sonnet-20250929", "models": [""], "text": {"format": {"type": "text"}, "verbosity": "medium"}, "reasoning": {"effort": "high", "summary": "auto", "max_tokens": 8661.16, "enabled": true}, "max_output_tokens": null, "temperature": 0.7, "top_p": 0.9, "top_k": 193.77, "prompt_cache_key": "", "previous_response_id": "", "prompt": {"id": "", "variables": {"key": {"type": "input_text", "text": "Hello, how can I help you?"}}}, "include": ["reasoning.encrypted_content"], "background": true, "safety_identifier": "", "store": true, "service_tier": "auto", "truncation": "auto", "stream": false, "provider": {"allow_fallbacks": null, "require_parameters": true, "data_collection": "deny", "zdr": true, "order": ["OpenAI"], "only": ["OpenAI"], "ignore": null, "quantizations": ["fp16"], "sort": "price", "max_price": {"prompt": "1000", "completion": 1000, "image": 1000, "audio": "1000", "request": 1000}, "experimental": {}}, "plugins": [{"id": "file-parser", "max_files": 4870.55, "pdf": {"engine": "mistral-ocr"}}], "user": "Elmer_Yundt72"} + responses: + "200": + application/json: {"id": "resp-abc123", "object": "response", "created_at": 1704067200, "model": "gpt-4", "status": "completed", "output": [{"id": "msg-abc123", "role": "assistant", "type": "message", "status": "completed", "content": [{"type": "output_text", "text": "Hello! How can I help you today?", "annotations": []}]}], "user": "Maria_Zboncak17", "output_text": "", "prompt_cache_key": "", "safety_identifier": "", "error": null, "incomplete_details": null, "usage": {"input_tokens": 10, "input_tokens_details": {"cached_tokens": 0}, "output_tokens": 25, "output_tokens_details": {"reasoning_tokens": 0}, "total_tokens": 35, "cost": 4793.03, "is_byok": false, "cost_details": {"upstream_inference_cost": 2597.96, "upstream_inference_input_cost": 1590.87, "upstream_inference_output_cost": 2325.17}}, "max_tool_calls": 1419.9, "top_logprobs": 1435.99, "max_output_tokens": null, "temperature": null, "top_p": null, "instructions": null, "metadata": null, "tools": [], "tool_choice": "auto", "parallel_tool_calls": true, "prompt": {"id": "", "variables": {"key": {"type": "input_text", "text": "Hello, how can I help you?"}}}, "background": false, "previous_response_id": "", "reasoning": {"effort": "low", "summary": "concise"}, "service_tier": "priority", "store": true, "truncation": "disabled", "text": {"format": {"type": "text"}, "verbosity": "medium"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": ""}}, "user_id": ""} + "402": + application/json: {"error": {"code": 402, "message": "Insufficient credits. Add more using https://openrouter.ai/credits", "metadata": null}, "user_id": null} + "404": + application/json: {"error": {"code": 404, "message": "Resource not found", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + "408": + application/json: {"error": {"code": 408, "message": "Operation timed out. Please try again later.", "metadata": {"key": ""}}, "user_id": ""} + "413": + application/json: {"error": {"code": 413, "message": "Request payload too large", "metadata": {"key": ""}}, "user_id": ""} + "422": + application/json: {"error": {"code": 422, "message": "Invalid argument", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + "429": + application/json: {"error": {"code": 429, "message": "Rate limit exceeded", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": ""}}, "user_id": ""} + "502": + application/json: {"error": {"code": 502, "message": "Provider returned error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + "503": + application/json: {"error": {"code": 503, "message": "Service temporarily unavailable", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + "524": + application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later.", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + "529": + application/json: {"error": {"code": 529, "message": "Provider returned error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} + exchangeAuthCodeForAPIKey: + speakeasy-default-exchange-auth-code-for-API-key: + requestBody: + application/json: {"code": "auth_code_abc123def456", "code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", "code_challenge_method": "S256"} + responses: + "200": + application/json: {"key": "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", "user_id": "user_2yOPcMpKoQhcd4bVgSMlELRaIah"} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": "", "key1": ""}}, "user_id": ""} + "403": + application/json: {"error": {"code": 403, "message": "Only provisioning keys can perform this operation", "metadata": {"key": ""}}, "user_id": ""} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": null}, "user_id": ""} + createAuthKeysCode: + speakeasy-default-create-auth-keys-code: + requestBody: + application/json: {"callback_url": "https://myapp.com/auth/callback", "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", "code_challenge_method": "S256", "limit": 100} + responses: + "200": + application/json: {"data": {"id": "auth_code_xyz789", "app_id": 12345, "created_at": "2025-08-24T10:30:00Z"}} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"key": ""}}, "user_id": ""} + "401": + application/json: {"error": {"code": 401, "message": "Missing Authentication header", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": null} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error", "metadata": {"key": "", "key1": "", "key2": ""}}, "user_id": ""} examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 101ad779..97535f39 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -36,6 +36,7 @@ typescript: devDependencies: '@types/node': ^22.13.12 vitest: ^3.2.4 + dotenv: ^16.4.7 peerDependencies: {} additionalPackageJSON: {} author: OpenRouter diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 0e8a47e8..8c9c5e2b 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -5560,7 +5560,7 @@ components: scheme: bearer description: API key as bearer token in Authorization header paths: - /api/alpha/responses: + /responses: post: x-speakeasy-name-override: send x-speakeasy-stream-request-field: stream @@ -5668,7 +5668,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ProviderOverloadedResponse' - operationId: createApiAlphaResponses + operationId: createResponses /activity: get: tags: @@ -7640,6 +7640,179 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + /auth/keys: + post: + operationId: exchangeAuthCodeForAPIKey + tags: + - OAuth + summary: Exchange authorization code for API key + description: Exchange an authorization code from the PKCE flow for a user-controlled API key + requestBody: + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The authorization code received from the OAuth redirect + example: auth_code_abc123def456 + code_verifier: + type: string + description: The code verifier if code_challenge was used in the authorization request + example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: + type: string + nullable: true + enum: + - S256 + - plain + description: The method used to generate the code challenge + example: S256 + required: + - code + example: + code: auth_code_abc123def456 + code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: S256 + required: true + responses: + '200': + description: Successfully exchanged code for an API key + content: + application/json: + schema: + type: object + properties: + key: + type: string + description: The API key to use for OpenRouter requests + example: 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 + user_id: + type: string + nullable: true + description: User ID associated with the API key + example: user_2yOPcMpKoQhcd4bVgSMlELRaIah + required: + - key + - user_id + example: + key: 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 + user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + '403': + description: Forbidden - Authentication successful but insufficient permissions + content: + application/json: + schema: + $ref: '#/components/schemas/ForbiddenResponse' + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + /auth/keys/code: + post: + x-speakeasy-name-override: createAuthCode + tags: + - OAuth + summary: Create authorization code + description: Create an authorization code for the PKCE flow to generate a user-controlled API key + requestBody: + content: + application/json: + schema: + type: object + properties: + callback_url: + type: string + format: uri + description: >- + The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are + allowed. + example: https://myapp.com/auth/callback + code_challenge: + type: string + description: PKCE code challenge for enhanced security + example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: + type: string + enum: + - S256 + - plain + description: The method used to generate the code challenge + example: S256 + limit: + type: number + description: Credit limit for the API key to be created + example: 100 + required: + - callback_url + example: + callback_url: https://myapp.com/auth/callback + code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: S256 + limit: 100 + required: true + responses: + '200': + description: Successfully created authorization code + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + id: + type: string + description: The authorization code ID to use in the exchange request + example: auth_code_xyz789 + app_id: + type: number + description: The application ID associated with this auth code + example: 12345 + created_at: + type: string + description: ISO 8601 timestamp of when the auth code was created + example: '2025-08-24T10:30:00Z' + required: + - id + - app_id + - created_at + description: Auth code data + example: + id: auth_code_xyz789 + app_id: 12345 + created_at: '2025-08-24T10:30:00Z' + required: + - data + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + operationId: createAuthKeysCode /chat/completions: post: summary: Create a chat completion @@ -7770,6 +7943,8 @@ tags: description: Generation history endpoints - name: Models description: Model information endpoints + - name: OAuth + description: OAuth authentication endpoints - name: Parameters description: Parameters endpoints - name: Providers diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index 9b006188..7e91bc0a 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -5586,7 +5586,7 @@ components: scheme: bearer description: API key as bearer token in Authorization header paths: - /api/alpha/responses: + /responses: post: x-speakeasy-name-override: send x-speakeasy-stream-request-field: stream @@ -5694,7 +5694,7 @@ paths: application/json: schema: $ref: '#/components/schemas/ProviderOverloadedResponse' - operationId: createApiAlphaResponses + operationId: createResponses /activity: get: tags: @@ -7656,6 +7656,180 @@ paths: application/json: schema: $ref: '#/components/schemas/InternalServerResponse' + /auth/keys: + post: + operationId: exchangeAuthCodeForAPIKey + tags: + - OAuth + summary: Exchange authorization code for API key + description: Exchange an authorization code from the PKCE flow for a user-controlled API key + requestBody: + content: + application/json: + schema: + type: object + properties: + code: + type: string + description: The authorization code received from the OAuth redirect + example: auth_code_abc123def456 + code_verifier: + type: string + description: The code verifier if code_challenge was used in the authorization request + example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: + type: string + nullable: true + enum: + - S256 + - plain + description: The method used to generate the code challenge + example: S256 + x-speakeasy-unknown-values: allow + required: + - code + example: + code: auth_code_abc123def456 + code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk + code_challenge_method: S256 + required: true + responses: + '200': + description: Successfully exchanged code for an API key + content: + application/json: + schema: + type: object + properties: + key: + type: string + description: The API key to use for OpenRouter requests + example: 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 + user_id: + type: string + nullable: true + description: User ID associated with the API key + example: user_2yOPcMpKoQhcd4bVgSMlELRaIah + required: + - key + - user_id + example: + key: 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 + user_id: user_2yOPcMpKoQhcd4bVgSMlELRaIah + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + '403': + description: Forbidden - Authentication successful but insufficient permissions + content: + application/json: + schema: + $ref: '#/components/schemas/ForbiddenResponse' + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + /auth/keys/code: + post: + x-speakeasy-name-override: createAuthCode + tags: + - OAuth + summary: Create authorization code + description: Create an authorization code for the PKCE flow to generate a user-controlled API key + requestBody: + content: + application/json: + schema: + type: object + properties: + callback_url: + type: string + format: uri + description: >- + The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. + example: https://myapp.com/auth/callback + code_challenge: + type: string + description: PKCE code challenge for enhanced security + example: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: + type: string + enum: + - S256 + - plain + description: The method used to generate the code challenge + example: S256 + x-speakeasy-unknown-values: allow + limit: + type: number + description: Credit limit for the API key to be created + example: 100 + required: + - callback_url + example: + callback_url: https://myapp.com/auth/callback + code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM + code_challenge_method: S256 + limit: 100 + required: true + responses: + '200': + description: Successfully created authorization code + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + id: + type: string + description: The authorization code ID to use in the exchange request + example: auth_code_xyz789 + app_id: + type: number + description: The application ID associated with this auth code + example: 12345 + created_at: + type: string + description: ISO 8601 timestamp of when the auth code was created + example: '2025-08-24T10:30:00Z' + required: + - id + - app_id + - created_at + description: Auth code data + example: + id: auth_code_xyz789 + app_id: 12345 + created_at: '2025-08-24T10:30:00Z' + required: + - data + '400': + description: Bad Request - Invalid request parameters or malformed input + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + '401': + description: Unauthorized - Authentication required or invalid credentials + content: + application/json: + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + '500': + description: Internal Server Error - Unexpected server error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + operationId: createAuthKeysCode /chat/completions: post: summary: Create a chat completion @@ -7785,6 +7959,8 @@ tags: description: Generation history endpoints - name: Models description: Model information endpoints + - name: OAuth + description: OAuth authentication endpoints - name: Parameters description: Parameters endpoints - name: Providers diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 8fc8096c..9455e4df 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.642.1 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:29166bebb2ee893b33cbbd3101d1c1d62530d1b96915dce90ce1f7dbfe4ae4d1 - sourceBlobDigest: sha256:5d2f001af7f24847d62d8c428c31c8068cad86385854746672a82307db00a8f3 + sourceRevisionDigest: sha256:6dd11a2a3212f61a00c0e0b6309aaf39cc3d2575493aea2b54aafb0cf187d272 + sourceBlobDigest: sha256:e46f40a6a57e7eb1c21a40c388f46b9b7b36ed0dd9ea78d480d300d83ace2fe3 tags: - latest - 1.0.0 @@ -11,10 +11,10 @@ targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:29166bebb2ee893b33cbbd3101d1c1d62530d1b96915dce90ce1f7dbfe4ae4d1 - sourceBlobDigest: sha256:5d2f001af7f24847d62d8c428c31c8068cad86385854746672a82307db00a8f3 + sourceRevisionDigest: sha256:6dd11a2a3212f61a00c0e0b6309aaf39cc3d2575493aea2b54aafb0cf187d272 + sourceBlobDigest: sha256:e46f40a6a57e7eb1c21a40c388f46b9b7b36ed0dd9ea78d480d300d83ace2fe3 codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:3c7d0dc2d2ab00a11e31ed0b7d1c836edaafd9e1d18302954afd1fbf6ff0308a + codeSamplesRevisionDigest: sha256:54cedfffe13b1e73d8e277b9fcbc7f109d448d6131ae751d3a07640b9e952673 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/FUNCTIONS.md b/FUNCTIONS.md index 9057ad54..9517c3bd 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -66,7 +66,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -75,15 +74,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -96,25 +95,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -123,7 +122,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -131,13 +130,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); if (res.ok) { const { value: result } = res; diff --git a/REACT_QUERY.md b/REACT_QUERY.md index f2665f84..99c7d001 100644 --- a/REACT_QUERY.md +++ b/REACT_QUERY.md @@ -161,7 +161,6 @@ export function Example() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -170,15 +169,15 @@ export function Example() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -191,25 +190,25 @@ export function Example() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -218,7 +217,7 @@ export function Example() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -226,13 +225,13 @@ export function Example() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); }} > diff --git a/README.md b/README.md index e33cbaff..cd68e3d3 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -132,15 +131,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -153,25 +152,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -180,7 +179,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -188,13 +187,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); @@ -262,7 +261,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -271,15 +269,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -292,25 +290,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -319,7 +317,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -327,13 +325,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); @@ -419,6 +417,11 @@ run(); * [list](docs/sdks/models/README.md#list) - List all models and their properties * [listForUser](docs/sdks/models/README.md#listforuser) - List models filtered by user provider preferences +### [oAuth](docs/sdks/oauth/README.md) + +* [exchangeAuthCodeForAPIKey](docs/sdks/oauth/README.md#exchangeauthcodeforapikey) - Exchange authorization code for API key +* [createAuthCode](docs/sdks/oauth/README.md#createauthcode) - Create authorization code + ### [parameters](docs/sdks/parameters/README.md) * [getParameters](docs/sdks/parameters/README.md#getparameters) - Get a model's supported parameters and data about which are most popular @@ -463,6 +466,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`modelsCount`](docs/sdks/models/README.md#count) - Get total count of available models - [`modelsList`](docs/sdks/models/README.md#list) - List all models and their properties - [`modelsListForUser`](docs/sdks/models/README.md#listforuser) - List models filtered by user provider preferences +- [`oAuthCreateAuthCode`](docs/sdks/oauth/README.md#createauthcode) - Create authorization code +- [`oAuthExchangeAuthCodeForAPIKey`](docs/sdks/oauth/README.md#exchangeauthcodeforapikey) - Exchange authorization code for API key - [`parametersGetParameters`](docs/sdks/parameters/README.md#getparameters) - Get a model's supported parameters and data about which are most popular - [`providersList`](docs/sdks/providers/README.md#list) - List all providers @@ -509,6 +514,8 @@ To learn about this feature and how to get started, check - [`useModelsCount`](docs/sdks/models/README.md#count) - Get total count of available models - [`useModelsList`](docs/sdks/models/README.md#list) - List all models and their properties - [`useModelsListForUser`](docs/sdks/models/README.md#listforuser) - List models filtered by user provider preferences +- [`useOAuthCreateAuthCodeMutation`](docs/sdks/oauth/README.md#createauthcode) - Create authorization code +- [`useOAuthExchangeAuthCodeForAPIKeyMutation`](docs/sdks/oauth/README.md#exchangeauthcodeforapikey) - Exchange authorization code for API key - [`useParametersGetParameters`](docs/sdks/parameters/README.md#getparameters) - Get a model's supported parameters and data about which are most popular - [`useProvidersList`](docs/sdks/providers/README.md#list) - List all providers @@ -569,7 +576,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -578,15 +584,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -599,25 +605,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -626,7 +632,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -634,13 +640,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); @@ -705,7 +711,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -714,15 +719,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -735,25 +740,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -762,7 +767,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -770,13 +775,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }, { retries: { strategy: "backoff", @@ -853,7 +858,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -862,15 +866,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -883,25 +887,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -910,7 +914,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -918,13 +922,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); @@ -997,7 +1001,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -1006,15 +1009,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -1027,25 +1030,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -1054,7 +1057,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -1062,13 +1065,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); @@ -1111,20 +1114,20 @@ run(); **Inherit from [`OpenRouterError`](./src/models/errors/openroutererror.ts)**: -* [`UnauthorizedResponseError`](./src/models/errors/unauthorizedresponseerror.ts): Unauthorized - Authentication required or invalid credentials. Status code `401`. Applicable to 13 of 20 methods.* -* [`TooManyRequestsResponseError`](./src/models/errors/toomanyrequestsresponseerror.ts): Too Many Requests - Rate limit exceeded. Status code `429`. Applicable to 8 of 20 methods.* -* [`NotFoundResponseError`](./src/models/errors/notfoundresponseerror.ts): Not Found - Resource does not exist. Status code `404`. Applicable to 7 of 20 methods.* -* [`BadRequestResponseError`](./src/models/errors/badrequestresponseerror.ts): Bad Request - Invalid request parameters or malformed input. Status code `400`. Applicable to 6 of 20 methods.* -* [`ChatError`](./src/models/errors/chaterror.ts): Bad request - invalid parameters. Applicable to 2 of 20 methods.* -* [`PaymentRequiredResponseError`](./src/models/errors/paymentrequiredresponseerror.ts): Payment Required - Insufficient credits or quota to complete request. Status code `402`. Applicable to 2 of 20 methods.* -* [`ForbiddenResponseError`](./src/models/errors/forbiddenresponseerror.ts): Forbidden - Authentication successful but insufficient permissions. Status code `403`. Applicable to 2 of 20 methods.* -* [`BadGatewayResponseError`](./src/models/errors/badgatewayresponseerror.ts): Bad Gateway - Provider/upstream API failure. Status code `502`. Applicable to 2 of 20 methods.* -* [`EdgeNetworkTimeoutResponseError`](./src/models/errors/edgenetworktimeoutresponseerror.ts): Infrastructure Timeout - Provider request timed out at edge network. Status code `524`. Applicable to 2 of 20 methods.* -* [`ProviderOverloadedResponseError`](./src/models/errors/provideroverloadedresponseerror.ts): Provider Overloaded - Provider is temporarily overloaded. Status code `529`. Applicable to 2 of 20 methods.* -* [`RequestTimeoutResponseError`](./src/models/errors/requesttimeoutresponseerror.ts): Request Timeout - Operation exceeded time limit. Status code `408`. Applicable to 1 of 20 methods.* -* [`PayloadTooLargeResponseError`](./src/models/errors/payloadtoolargeresponseerror.ts): Payload Too Large - Request payload exceeds size limits. Status code `413`. Applicable to 1 of 20 methods.* -* [`UnprocessableEntityResponseError`](./src/models/errors/unprocessableentityresponseerror.ts): Unprocessable Entity - Semantic validation failure. Status code `422`. Applicable to 1 of 20 methods.* -* [`ServiceUnavailableResponseError`](./src/models/errors/serviceunavailableresponseerror.ts): Service Unavailable - Service temporarily unavailable. Status code `503`. Applicable to 1 of 20 methods.* +* [`UnauthorizedResponseError`](./src/models/errors/unauthorizedresponseerror.ts): Unauthorized - Authentication required or invalid credentials. Status code `401`. Applicable to 14 of 22 methods.* +* [`BadRequestResponseError`](./src/models/errors/badrequestresponseerror.ts): Bad Request - Invalid request parameters or malformed input. Status code `400`. Applicable to 8 of 22 methods.* +* [`TooManyRequestsResponseError`](./src/models/errors/toomanyrequestsresponseerror.ts): Too Many Requests - Rate limit exceeded. Status code `429`. Applicable to 8 of 22 methods.* +* [`NotFoundResponseError`](./src/models/errors/notfoundresponseerror.ts): Not Found - Resource does not exist. Status code `404`. Applicable to 7 of 22 methods.* +* [`ForbiddenResponseError`](./src/models/errors/forbiddenresponseerror.ts): Forbidden - Authentication successful but insufficient permissions. Status code `403`. Applicable to 3 of 22 methods.* +* [`ChatError`](./src/models/errors/chaterror.ts): Bad request - invalid parameters. Applicable to 2 of 22 methods.* +* [`PaymentRequiredResponseError`](./src/models/errors/paymentrequiredresponseerror.ts): Payment Required - Insufficient credits or quota to complete request. Status code `402`. Applicable to 2 of 22 methods.* +* [`BadGatewayResponseError`](./src/models/errors/badgatewayresponseerror.ts): Bad Gateway - Provider/upstream API failure. Status code `502`. Applicable to 2 of 22 methods.* +* [`EdgeNetworkTimeoutResponseError`](./src/models/errors/edgenetworktimeoutresponseerror.ts): Infrastructure Timeout - Provider request timed out at edge network. Status code `524`. Applicable to 2 of 22 methods.* +* [`ProviderOverloadedResponseError`](./src/models/errors/provideroverloadedresponseerror.ts): Provider Overloaded - Provider is temporarily overloaded. Status code `529`. Applicable to 2 of 22 methods.* +* [`RequestTimeoutResponseError`](./src/models/errors/requesttimeoutresponseerror.ts): Request Timeout - Operation exceeded time limit. Status code `408`. Applicable to 1 of 22 methods.* +* [`PayloadTooLargeResponseError`](./src/models/errors/payloadtoolargeresponseerror.ts): Payload Too Large - Request payload exceeds size limits. Status code `413`. Applicable to 1 of 22 methods.* +* [`UnprocessableEntityResponseError`](./src/models/errors/unprocessableentityresponseerror.ts): Unprocessable Entity - Semantic validation failure. Status code `422`. Applicable to 1 of 22 methods.* +* [`ServiceUnavailableResponseError`](./src/models/errors/serviceunavailableresponseerror.ts): Service Unavailable - Service temporarily unavailable. Status code `503`. Applicable to 1 of 22 methods.* * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string. diff --git a/USAGE.md b/USAGE.md index fcd8ed6f..2d92cf8f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -44,7 +44,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -53,15 +52,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -74,25 +73,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -101,7 +100,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -109,13 +108,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); diff --git a/docs/models/openresponsesnonstreamingresponse.md b/docs/models/openresponsesnonstreamingresponse.md index 92a1d297..a8f000ab 100644 --- a/docs/models/openresponsesnonstreamingresponse.md +++ b/docs/models/openresponsesnonstreamingresponse.md @@ -74,7 +74,7 @@ let value: OpenResponsesNonStreamingResponse = { background: true, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "default", diff --git a/docs/models/openresponsesstreamevent.md b/docs/models/openresponsesstreamevent.md index d74f3ee1..599b8e1e 100644 --- a/docs/models/openresponsesstreamevent.md +++ b/docs/models/openresponsesstreamevent.md @@ -63,7 +63,7 @@ const value: models.OpenResponsesStreamEventResponseCreated = { background: false, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "auto", @@ -138,7 +138,7 @@ const value: models.OpenResponsesStreamEventResponseInProgress = { background: true, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: null, @@ -227,7 +227,7 @@ const value: models.OpenResponsesStreamEventResponseCompleted = { background: false, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "scale", @@ -302,7 +302,7 @@ const value: models.OpenResponsesStreamEventResponseIncomplete = { background: true, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "default", @@ -377,7 +377,7 @@ const value: models.OpenResponsesStreamEventResponseFailed = { background: null, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "priority", diff --git a/docs/models/openresponsesstreameventresponsecompleted.md b/docs/models/openresponsesstreameventresponsecompleted.md index 3737fbf1..10d3a177 100644 --- a/docs/models/openresponsesstreameventresponsecompleted.md +++ b/docs/models/openresponsesstreameventresponsecompleted.md @@ -76,7 +76,7 @@ let value: OpenResponsesStreamEventResponseCompleted = { background: false, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: null, diff --git a/docs/models/openresponsesstreameventresponsecreated.md b/docs/models/openresponsesstreameventresponsecreated.md index dbebb5ac..0c420244 100644 --- a/docs/models/openresponsesstreameventresponsecreated.md +++ b/docs/models/openresponsesstreameventresponsecreated.md @@ -62,7 +62,7 @@ let value: OpenResponsesStreamEventResponseCreated = { background: true, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "scale", diff --git a/docs/models/openresponsesstreameventresponsefailed.md b/docs/models/openresponsesstreameventresponsefailed.md index 3d142cf4..f41102eb 100644 --- a/docs/models/openresponsesstreameventresponsefailed.md +++ b/docs/models/openresponsesstreameventresponsefailed.md @@ -62,7 +62,7 @@ let value: OpenResponsesStreamEventResponseFailed = { background: false, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "priority", diff --git a/docs/models/openresponsesstreameventresponseincomplete.md b/docs/models/openresponsesstreameventresponseincomplete.md index 8d953d24..52ca72a2 100644 --- a/docs/models/openresponsesstreameventresponseincomplete.md +++ b/docs/models/openresponsesstreameventresponseincomplete.md @@ -62,7 +62,7 @@ let value: OpenResponsesStreamEventResponseIncomplete = { background: false, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "priority", diff --git a/docs/models/openresponsesstreameventresponseinprogress.md b/docs/models/openresponsesstreameventresponseinprogress.md index 6aeaa106..6b6d7bc1 100644 --- a/docs/models/openresponsesstreameventresponseinprogress.md +++ b/docs/models/openresponsesstreameventresponseinprogress.md @@ -62,7 +62,7 @@ let value: OpenResponsesStreamEventResponseInProgress = { background: true, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "flex", diff --git a/docs/models/operations/createauthkeyscodecodechallengemethod.md b/docs/models/operations/createauthkeyscodecodechallengemethod.md new file mode 100644 index 00000000..7f70a54f --- /dev/null +++ b/docs/models/operations/createauthkeyscodecodechallengemethod.md @@ -0,0 +1,19 @@ +# CreateAuthKeysCodeCodeChallengeMethod + +The method used to generate the code challenge + +## Example Usage + +```typescript +import { CreateAuthKeysCodeCodeChallengeMethod } from "@openrouter/sdk/models/operations"; + +let value: CreateAuthKeysCodeCodeChallengeMethod = "S256"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"S256" | "plain" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscodedata.md b/docs/models/operations/createauthkeyscodedata.md new file mode 100644 index 00000000..500d330e --- /dev/null +++ b/docs/models/operations/createauthkeyscodedata.md @@ -0,0 +1,23 @@ +# CreateAuthKeysCodeData + +Auth code data + +## Example Usage + +```typescript +import { CreateAuthKeysCodeData } from "@openrouter/sdk/models/operations"; + +let value: CreateAuthKeysCodeData = { + id: "auth_code_xyz789", + appId: 12345, + createdAt: "2025-08-24T10:30:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The authorization code ID to use in the exchange request | auth_code_xyz789 | +| `appId` | *number* | :heavy_check_mark: | The application ID associated with this auth code | 12345 | +| `createdAt` | *string* | :heavy_check_mark: | ISO 8601 timestamp of when the auth code was created | 2025-08-24T10:30:00Z | \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscoderequest.md b/docs/models/operations/createauthkeyscoderequest.md new file mode 100644 index 00000000..6bc64fb0 --- /dev/null +++ b/docs/models/operations/createauthkeyscoderequest.md @@ -0,0 +1,23 @@ +# CreateAuthKeysCodeRequest + +## Example Usage + +```typescript +import { CreateAuthKeysCodeRequest } from "@openrouter/sdk/models/operations"; + +let value: CreateAuthKeysCodeRequest = { + callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `callbackUrl` | *string* | :heavy_check_mark: | The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed. | https://myapp.com/auth/callback | +| `codeChallenge` | *string* | :heavy_minus_sign: | PKCE code challenge for enhanced security | E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM | +| `codeChallengeMethod` | [operations.CreateAuthKeysCodeCodeChallengeMethod](../../models/operations/createauthkeyscodecodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | +| `limit` | *number* | :heavy_minus_sign: | Credit limit for the API key to be created | 100 | \ No newline at end of file diff --git a/docs/models/operations/createauthkeyscoderesponse.md b/docs/models/operations/createauthkeyscoderesponse.md new file mode 100644 index 00000000..e610aec9 --- /dev/null +++ b/docs/models/operations/createauthkeyscoderesponse.md @@ -0,0 +1,23 @@ +# CreateAuthKeysCodeResponse + +Successfully created authorization code + +## Example Usage + +```typescript +import { CreateAuthKeysCodeResponse } from "@openrouter/sdk/models/operations"; + +let value: CreateAuthKeysCodeResponse = { + data: { + id: "auth_code_xyz789", + appId: 12345, + createdAt: "2025-08-24T10:30:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `data` | [operations.CreateAuthKeysCodeData](../../models/operations/createauthkeyscodedata.md) | :heavy_check_mark: | Auth code data | {
"id": "auth_code_xyz789",
"app_id": 12345,
"created_at": "2025-08-24T10:30:00Z"
} | \ No newline at end of file diff --git a/docs/models/operations/createapialpharesponsesresponse.md b/docs/models/operations/createresponsesresponse.md similarity index 93% rename from docs/models/operations/createapialpharesponsesresponse.md rename to docs/models/operations/createresponsesresponse.md index 6cc57d98..47fce7f5 100644 --- a/docs/models/operations/createapialpharesponsesresponse.md +++ b/docs/models/operations/createresponsesresponse.md @@ -1,4 +1,4 @@ -# CreateApiAlphaResponsesResponse +# CreateResponsesResponse ## Supported Types @@ -73,7 +73,7 @@ const value: models.OpenResponsesNonStreamingResponse = { background: null, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, serviceTier: "auto", @@ -88,5 +88,5 @@ const value: models.OpenResponsesNonStreamingResponse = { }; ``` -### `EventStream` +### `EventStream` diff --git a/docs/models/operations/createapialpharesponsesresponsebody.md b/docs/models/operations/createresponsesresponsebody.md similarity index 95% rename from docs/models/operations/createapialpharesponsesresponsebody.md rename to docs/models/operations/createresponsesresponsebody.md index 617720ca..a9ce9319 100644 --- a/docs/models/operations/createapialpharesponsesresponsebody.md +++ b/docs/models/operations/createresponsesresponsebody.md @@ -1,13 +1,13 @@ -# CreateApiAlphaResponsesResponseBody +# CreateResponsesResponseBody Successful response ## Example Usage ```typescript -import { CreateApiAlphaResponsesResponseBody } from "@openrouter/sdk/models/operations"; +import { CreateResponsesResponseBody } from "@openrouter/sdk/models/operations"; -let value: CreateApiAlphaResponsesResponseBody = { +let value: CreateResponsesResponseBody = { data: { type: "response.created", response: { @@ -17,7 +17,7 @@ let value: CreateApiAlphaResponsesResponseBody = { model: "gpt-4", status: "in_progress", output: [], - user: "Toby.Kunze16", + user: "Ramiro.Schowalter-Kshlerin", outputText: "", promptCacheKey: "", safetyIdentifier: "", @@ -34,15 +34,15 @@ let value: CreateApiAlphaResponsesResponseBody = { }, totalTokens: 35, cost: 0.0012, - isByok: true, + isByok: false, costDetails: { upstreamInferenceCost: null, upstreamInferenceInputCost: 0.0008, upstreamInferenceOutputCost: 0.0004, }, }, - maxToolCalls: 5882.86, - topLogprobs: 6012.25, + maxToolCalls: 264.25, + topLogprobs: 2443.21, maxOutputTokens: null, temperature: null, topP: null, @@ -60,15 +60,15 @@ let value: CreateApiAlphaResponsesResponseBody = { }, }, }, - background: false, + background: null, previousResponseId: "", reasoning: { - effort: "low", + effort: "medium", summary: "auto", }, - serviceTier: "scale", + serviceTier: "default", store: true, - truncation: "auto", + truncation: "disabled", text: { format: { type: "text", diff --git a/docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md b/docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md new file mode 100644 index 00000000..0898e066 --- /dev/null +++ b/docs/models/operations/exchangeauthcodeforapikeycodechallengemethod.md @@ -0,0 +1,19 @@ +# ExchangeAuthCodeForAPIKeyCodeChallengeMethod + +The method used to generate the code challenge + +## Example Usage + +```typescript +import { ExchangeAuthCodeForAPIKeyCodeChallengeMethod } from "@openrouter/sdk/models/operations"; + +let value: ExchangeAuthCodeForAPIKeyCodeChallengeMethod = "S256"; +``` + +## Values + +This is an open enum. Unrecognized values will be captured as the `Unrecognized` branded type. + +```typescript +"S256" | "plain" | Unrecognized +``` \ No newline at end of file diff --git a/docs/models/operations/exchangeauthcodeforapikeyrequest.md b/docs/models/operations/exchangeauthcodeforapikeyrequest.md new file mode 100644 index 00000000..1bcf353d --- /dev/null +++ b/docs/models/operations/exchangeauthcodeforapikeyrequest.md @@ -0,0 +1,21 @@ +# ExchangeAuthCodeForAPIKeyRequest + +## Example Usage + +```typescript +import { ExchangeAuthCodeForAPIKeyRequest } from "@openrouter/sdk/models/operations"; + +let value: ExchangeAuthCodeForAPIKeyRequest = { + code: "auth_code_abc123def456", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + codeChallengeMethod: "S256", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `code` | *string* | :heavy_check_mark: | The authorization code received from the OAuth redirect | auth_code_abc123def456 | +| `codeVerifier` | *string* | :heavy_minus_sign: | The code verifier if code_challenge was used in the authorization request | dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk | +| `codeChallengeMethod` | [operations.ExchangeAuthCodeForAPIKeyCodeChallengeMethod](../../models/operations/exchangeauthcodeforapikeycodechallengemethod.md) | :heavy_minus_sign: | The method used to generate the code challenge | S256 | \ No newline at end of file diff --git a/docs/models/operations/exchangeauthcodeforapikeyresponse.md b/docs/models/operations/exchangeauthcodeforapikeyresponse.md new file mode 100644 index 00000000..01bfb8f1 --- /dev/null +++ b/docs/models/operations/exchangeauthcodeforapikeyresponse.md @@ -0,0 +1,22 @@ +# ExchangeAuthCodeForAPIKeyResponse + +Successfully exchanged code for an API key + +## Example Usage + +```typescript +import { ExchangeAuthCodeForAPIKeyResponse } from "@openrouter/sdk/models/operations"; + +let value: ExchangeAuthCodeForAPIKeyResponse = { + key: + "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", + userId: "user_2yOPcMpKoQhcd4bVgSMlELRaIah", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `key` | *string* | :heavy_check_mark: | The API key to use for OpenRouter requests | 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 | +| `userId` | *string* | :heavy_check_mark: | User ID associated with the API key | user_2yOPcMpKoQhcd4bVgSMlELRaIah | \ No newline at end of file diff --git a/docs/sdks/oauth/README.md b/docs/sdks/oauth/README.md new file mode 100644 index 00000000..a28f02dc --- /dev/null +++ b/docs/sdks/oauth/README.md @@ -0,0 +1,207 @@ +# OAuth +(*oAuth*) + +## Overview + +OAuth authentication endpoints + +### Available Operations + +* [exchangeAuthCodeForAPIKey](#exchangeauthcodeforapikey) - Exchange authorization code for API key +* [createAuthCode](#createauthcode) - Create authorization code + +## exchangeAuthCodeForAPIKey + +Exchange an authorization code from the PKCE flow for a user-controlled API key + +### Example Usage + + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.oAuth.exchangeAuthCodeForAPIKey({ + code: "auth_code_abc123def456", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + codeChallengeMethod: "S256", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { oAuthExchangeAuthCodeForAPIKey } from "@openrouter/sdk/funcs/oAuthExchangeAuthCodeForAPIKey.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await oAuthExchangeAuthCodeForAPIKey(openRouter, { + code: "auth_code_abc123def456", + codeVerifier: "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", + codeChallengeMethod: "S256", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("oAuthExchangeAuthCodeForAPIKey failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useOAuthExchangeAuthCodeForAPIKeyMutation +} from "@openrouter/sdk/react-query/oAuthExchangeAuthCodeForAPIKey.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ExchangeAuthCodeForAPIKeyRequest](../../models/operations/exchangeauthcodeforapikeyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.ExchangeAuthCodeForAPIKeyResponse](../../models/operations/exchangeauthcodeforapikeyresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.ForbiddenResponseError | 403 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + +## createAuthCode + +Create an authorization code for the PKCE flow to generate a user-controlled API key + +### Example Usage + + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.oAuth.createAuthCode({ + callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { oAuthCreateAuthCode } from "@openrouter/sdk/funcs/oAuthCreateAuthCode.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await oAuthCreateAuthCode(openRouter, { + callbackUrl: "https://myapp.com/auth/callback", + codeChallenge: "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM", + codeChallengeMethod: "S256", + limit: 100, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("oAuthCreateAuthCode failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Mutation hook for triggering the API call. + useOAuthCreateAuthCodeMutation +} from "@openrouter/sdk/react-query/oAuthCreateAuthCode.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateAuthKeysCodeRequest](../../models/operations/createauthkeyscoderequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.CreateAuthKeysCodeResponse](../../models/operations/createauthkeyscoderesponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.UnauthorizedResponseError | 401 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/responses/README.md b/docs/sdks/responses/README.md index 8d9481b1..ba9ca76c 100644 --- a/docs/sdks/responses/README.md +++ b/docs/sdks/responses/README.md @@ -15,7 +15,7 @@ Creates a streaming or non-streaming response using OpenResponses API format ### Example Usage - + ```typescript import { OpenRouter } from "@openrouter/sdk"; @@ -61,7 +61,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -70,15 +69,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -91,25 +90,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -118,7 +117,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -126,13 +125,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); @@ -193,7 +192,6 @@ async function run() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -202,15 +200,15 @@ async function run() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -223,25 +221,25 @@ async function run() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -250,7 +248,7 @@ async function run() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -258,13 +256,13 @@ async function run() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); if (res.ok) { const { value: result } = res; @@ -305,7 +303,7 @@ import { ### Response -**Promise\<[operations.CreateApiAlphaResponsesResponse](../../models/operations/createapialpharesponsesresponse.md)\>** +**Promise\<[operations.CreateResponsesResponse](../../models/operations/createresponsesresponse.md)\>** ### Errors diff --git a/examples/betaResponsesSend.example.ts b/examples/betaResponsesSend.example.ts index 50ecce29..6bef41fe 100644 --- a/examples/betaResponsesSend.example.ts +++ b/examples/betaResponsesSend.example.ts @@ -55,7 +55,6 @@ async function main() { model: "anthropic/claude-4.5-sonnet-20250929", models: [ "", - "", ], text: { format: { @@ -64,15 +63,15 @@ async function main() { verbosity: "medium", }, reasoning: { - effort: "minimal", + effort: "high", summary: "auto", - maxTokens: 5632.72, + maxTokens: 8661.16, enabled: true, }, - maxOutputTokens: 5913.88, + maxOutputTokens: null, temperature: 0.7, topP: 0.9, - topK: 1770.66, + topK: 193.77, promptCacheKey: "", previousResponseId: "", prompt: { @@ -85,25 +84,25 @@ async function main() { }, }, include: [ - "file_search_call.results", + "reasoning.encrypted_content", ], - background: false, + background: true, safetyIdentifier: "", - store: false, + store: true, serviceTier: "auto", truncation: "auto", provider: { - allowFallbacks: false, - requireParameters: false, + allowFallbacks: null, + requireParameters: true, dataCollection: "deny", zdr: true, order: [ "OpenAI", ], - only: null, - ignore: [ + only: [ "OpenAI", ], + ignore: null, quantizations: [ "fp16", ], @@ -112,7 +111,7 @@ async function main() { prompt: "1000", completion: 1000, image: 1000, - audio: 1000, + audio: "1000", request: 1000, }, experimental: {}, @@ -120,13 +119,13 @@ async function main() { plugins: [ { id: "file-parser", - maxFiles: 6167.86, + maxFiles: 4870.55, pdf: { - engine: "native", + engine: "mistral-ocr", }, }, ], - user: "Minnie.Ratke", + user: "Elmer_Yundt72", }); console.log(result); diff --git a/examples/nextjs-example/src/app/(app)/chat/page.tsx b/examples/nextjs-example/src/app/(app)/chat/page.tsx index 894fbb70..59a621d8 100644 --- a/examples/nextjs-example/src/app/(app)/chat/page.tsx +++ b/examples/nextjs-example/src/app/(app)/chat/page.tsx @@ -99,7 +99,7 @@ export default function Page() { // Stream chunks into the latest message const chunks: string[] = []; for await (const chunk of result) { - chunks.push(chunk.data.choices[0].delta.content || ""); + chunks.push(chunk.choices[0].delta.content || ""); setMessages((prev) => { const newMessages = [...prev]; const lastMessage = newMessages[newMessages.length - 1]; diff --git a/examples/nextjs-example/src/app/(app)/page.tsx b/examples/nextjs-example/src/app/(app)/page.tsx index ba5d2db5..674334fe 100644 --- a/examples/nextjs-example/src/app/(app)/page.tsx +++ b/examples/nextjs-example/src/app/(app)/page.tsx @@ -92,7 +92,7 @@ function ConnectingPageContent(props: { code: string }) { try { // Exchange the authorization code for an API key using PKCE - const result = await openRouter.oAuth.exchangeAuthorizationCode({ + const result = await openRouter.oAuth.exchangeAuthCodeForAPIKey({ code: props.code, codeVerifier, codeChallengeMethod: "S256", diff --git a/package.json b/package.json index 30b766ee..2bffa8ea 100644 --- a/package.json +++ b/package.json @@ -55,10 +55,7 @@ "scripts": { "lint": "eslint --cache --max-warnings=0 src", "build": "tsc", - "prepublishOnly": "npm run build", - "test": "vitest run", - "test:e2e": "vitest run tests/e2e", - "test:watch": "vitest" + "prepublishOnly": "npm run build" }, "peerDependencies": { "@tanstack/react-query": "^5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 00000000..cbe25e0a --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2032 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + react: + specifier: ^18 || ^19 + version: 19.2.0 + zod: + specifier: ^3.25.0 || ^4.0.0 + version: 4.1.12 + devDependencies: + '@eslint/js': + specifier: ^9.19.0 + version: 9.38.0 + '@tanstack/react-query': + specifier: ^5.61.4 + version: 5.90.5(react@19.2.0) + '@types/node': + specifier: ^22.13.12 + version: 22.18.13 + '@types/react': + specifier: ^18.3.12 + version: 18.3.26 + dotenv: + specifier: ^17.2.3 + version: 17.2.3 + eslint: + specifier: ^9.19.0 + version: 9.38.0 + globals: + specifier: ^15.14.0 + version: 15.15.0 + typescript: + specifier: ~5.8.3 + version: 5.8.3 + typescript-eslint: + specifier: ^8.26.0 + version: 8.46.2(eslint@9.38.0)(typescript@5.8.3) + vitest: + specifier: ^3.2.4 + version: 3.2.4(@types/node@22.18.13) + +packages: + + '@esbuild/aix-ppc64@0.25.11': + resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.11': + resolution: {integrity: sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.25.11': + resolution: {integrity: sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.11': + resolution: {integrity: sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.11': + resolution: {integrity: sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.11': + resolution: {integrity: sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.11': + resolution: {integrity: sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.11': + resolution: {integrity: sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.11': + resolution: {integrity: sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.11': + resolution: {integrity: sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.25.11': + resolution: {integrity: sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.11': + resolution: {integrity: sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.11': + resolution: {integrity: sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.25.11': + resolution: {integrity: sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.11': + resolution: {integrity: sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.25.11': + resolution: {integrity: sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.11': + resolution: {integrity: sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.25.11': + resolution: {integrity: sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.11': + resolution: {integrity: sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.11': + resolution: {integrity: sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.11': + resolution: {integrity: sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.25.11': + resolution: {integrity: sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.25.11': + resolution: {integrity: sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.11': + resolution: {integrity: sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.25.11': + resolution: {integrity: sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.11': + resolution: {integrity: sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.9.0': + resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.1': + resolution: {integrity: sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.1': + resolution: {integrity: sha512-csZAzkNhsgwb0I/UAV6/RGFTbiakPCf0ZrGmrIxQpYvGZ00PhTkSnyKNolphgIvmnJeGw6rcGVEXfTzUnFuEvw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.16.0': + resolution: {integrity: sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.1': + resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.38.0': + resolution: {integrity: sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.0': + resolution: {integrity: sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.7': + resolution: {integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@rollup/rollup-android-arm-eabi@4.52.5': + resolution: {integrity: sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.52.5': + resolution: {integrity: sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.52.5': + resolution: {integrity: sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.52.5': + resolution: {integrity: sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.52.5': + resolution: {integrity: sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.52.5': + resolution: {integrity: sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.52.5': + resolution: {integrity: sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.52.5': + resolution: {integrity: sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.52.5': + resolution: {integrity: sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.52.5': + resolution: {integrity: sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.52.5': + resolution: {integrity: sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-ppc64-gnu@4.52.5': + resolution: {integrity: sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.52.5': + resolution: {integrity: sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.52.5': + resolution: {integrity: sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.52.5': + resolution: {integrity: sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.52.5': + resolution: {integrity: sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.52.5': + resolution: {integrity: sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openharmony-arm64@4.52.5': + resolution: {integrity: sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.52.5': + resolution: {integrity: sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.52.5': + resolution: {integrity: sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.52.5': + resolution: {integrity: sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.52.5': + resolution: {integrity: sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==} + cpu: [x64] + os: [win32] + + '@tanstack/query-core@5.90.5': + resolution: {integrity: sha512-wLamYp7FaDq6ZnNehypKI5fNvxHPfTYylE0m/ZpuuzJfJqhR5Pxg9gvGBHZx4n7J+V5Rg5mZxHHTlv25Zt5u+w==} + + '@tanstack/react-query@5.90.5': + resolution: {integrity: sha512-pN+8UWpxZkEJ/Rnnj2v2Sxpx1WFlaa9L6a4UO89p6tTQbeo+m0MS8oYDjbggrR8QcTyjKoYWKS3xJQGr3ExT8Q==} + peerDependencies: + react: ^18 || ^19 + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.8': + resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/node@22.18.13': + resolution: {integrity: sha512-Bo45YKIjnmFtv6I1TuC8AaHBbqXtIo+Om5fE4QiU1Tj8QR/qt+8O3BAtOimG5IFmwaWiPmB3Mv3jtYzBA4Us2A==} + + '@types/prop-types@15.7.15': + resolution: {integrity: sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==} + + '@types/react@18.3.26': + resolution: {integrity: sha512-RFA/bURkcKzx/X9oumPG9Vp3D3JUgus/d0b67KB0t5S/raciymilkOa66olh78MUI92QLbEJevO7rvqU/kjwKA==} + + '@typescript-eslint/eslint-plugin@8.46.2': + resolution: {integrity: sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.46.2 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.46.2': + resolution: {integrity: sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.46.2': + resolution: {integrity: sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.46.2': + resolution: {integrity: sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.46.2': + resolution: {integrity: sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.46.2': + resolution: {integrity: sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.46.2': + resolution: {integrity: sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.46.2': + resolution: {integrity: sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.46.2': + resolution: {integrity: sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.46.2': + resolution: {integrity: sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} + + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} + + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} + + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} + + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} + + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@1.1.12: + resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} + + brace-expansion@2.0.2: + resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chai@5.3.3: + resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + dotenv@17.2.3: + resolution: {integrity: sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==} + engines: {node: '>=12'} + + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + + esbuild@0.25.11: + resolution: {integrity: sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==} + engines: {node: '>=18'} + hasBin: true + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.38.0: + resolution: {integrity: sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + expect-type@1.2.2: + resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.19.1: + resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.3.3: + resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.15.0: + resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} + engines: {node: '>=18'} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + engines: {node: '>= 4'} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.11: + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} + engines: {node: '>= 14.16'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@4.0.3: + resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + engines: {node: '>=12'} + + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + react@19.2.0: + resolution: {integrity: sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==} + engines: {node: '>=0.10.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + reusify@1.1.0: + resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rollup@4.52.5: + resolution: {integrity: sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + semver@7.7.3: + resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.4: + resolution: {integrity: sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==} + engines: {node: '>=14.0.0'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + ts-api-utils@2.1.0: + resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript-eslint@8.46.2: + resolution: {integrity: sha512-vbw8bOmiuYNdzzV3lsiWv6sRwjyuKJMQqWulBOU7M0RrxedXledX8G8kBbQeiOYDnTfiXz0Y4081E1QMNB6iQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@7.1.12: + resolution: {integrity: sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + zod@4.1.12: + resolution: {integrity: sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==} + +snapshots: + + '@esbuild/aix-ppc64@0.25.11': + optional: true + + '@esbuild/android-arm64@0.25.11': + optional: true + + '@esbuild/android-arm@0.25.11': + optional: true + + '@esbuild/android-x64@0.25.11': + optional: true + + '@esbuild/darwin-arm64@0.25.11': + optional: true + + '@esbuild/darwin-x64@0.25.11': + optional: true + + '@esbuild/freebsd-arm64@0.25.11': + optional: true + + '@esbuild/freebsd-x64@0.25.11': + optional: true + + '@esbuild/linux-arm64@0.25.11': + optional: true + + '@esbuild/linux-arm@0.25.11': + optional: true + + '@esbuild/linux-ia32@0.25.11': + optional: true + + '@esbuild/linux-loong64@0.25.11': + optional: true + + '@esbuild/linux-mips64el@0.25.11': + optional: true + + '@esbuild/linux-ppc64@0.25.11': + optional: true + + '@esbuild/linux-riscv64@0.25.11': + optional: true + + '@esbuild/linux-s390x@0.25.11': + optional: true + + '@esbuild/linux-x64@0.25.11': + optional: true + + '@esbuild/netbsd-arm64@0.25.11': + optional: true + + '@esbuild/netbsd-x64@0.25.11': + optional: true + + '@esbuild/openbsd-arm64@0.25.11': + optional: true + + '@esbuild/openbsd-x64@0.25.11': + optional: true + + '@esbuild/openharmony-arm64@0.25.11': + optional: true + + '@esbuild/sunos-x64@0.25.11': + optional: true + + '@esbuild/win32-arm64@0.25.11': + optional: true + + '@esbuild/win32-ia32@0.25.11': + optional: true + + '@esbuild/win32-x64@0.25.11': + optional: true + + '@eslint-community/eslint-utils@4.9.0(eslint@9.38.0)': + dependencies: + eslint: 9.38.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/config-array@0.21.1': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.1': + dependencies: + '@eslint/core': 0.16.0 + + '@eslint/core@0.16.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.1': + dependencies: + ajv: 6.12.6 + debug: 4.4.3 + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.38.0': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.0': + dependencies: + '@eslint/core': 0.16.0 + levn: 0.4.1 + + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.7': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.4.3 + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.19.1 + + '@rollup/rollup-android-arm-eabi@4.52.5': + optional: true + + '@rollup/rollup-android-arm64@4.52.5': + optional: true + + '@rollup/rollup-darwin-arm64@4.52.5': + optional: true + + '@rollup/rollup-darwin-x64@4.52.5': + optional: true + + '@rollup/rollup-freebsd-arm64@4.52.5': + optional: true + + '@rollup/rollup-freebsd-x64@4.52.5': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.52.5': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.52.5': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.52.5': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.52.5': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.52.5': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.52.5': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.52.5': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.52.5': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.52.5': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.52.5': + optional: true + + '@rollup/rollup-linux-x64-musl@4.52.5': + optional: true + + '@rollup/rollup-openharmony-arm64@4.52.5': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.52.5': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.52.5': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.52.5': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.52.5': + optional: true + + '@tanstack/query-core@5.90.5': {} + + '@tanstack/react-query@5.90.5(react@19.2.0)': + dependencies: + '@tanstack/query-core': 5.90.5 + react: 19.2.0 + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.8': {} + + '@types/json-schema@7.0.15': {} + + '@types/node@22.18.13': + dependencies: + undici-types: 6.21.0 + + '@types/prop-types@15.7.15': {} + + '@types/react@18.3.26': + dependencies: + '@types/prop-types': 15.7.15 + csstype: 3.1.3 + + '@typescript-eslint/eslint-plugin@8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0)(typescript@5.8.3))(eslint@9.38.0)(typescript@5.8.3)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.46.2(eslint@9.38.0)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.46.2 + '@typescript-eslint/type-utils': 8.46.2(eslint@9.38.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.46.2(eslint@9.38.0)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.46.2 + eslint: 9.38.0 + graphemer: 1.4.0 + ignore: 7.0.5 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.46.2(eslint@9.38.0)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.46.2 + '@typescript-eslint/types': 8.46.2 + '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.46.2 + debug: 4.4.3 + eslint: 9.38.0 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.46.2(typescript@5.8.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.46.2(typescript@5.8.3) + '@typescript-eslint/types': 8.46.2 + debug: 4.4.3 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.46.2': + dependencies: + '@typescript-eslint/types': 8.46.2 + '@typescript-eslint/visitor-keys': 8.46.2 + + '@typescript-eslint/tsconfig-utils@8.46.2(typescript@5.8.3)': + dependencies: + typescript: 5.8.3 + + '@typescript-eslint/type-utils@8.46.2(eslint@9.38.0)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.46.2 + '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.8.3) + '@typescript-eslint/utils': 8.46.2(eslint@9.38.0)(typescript@5.8.3) + debug: 4.4.3 + eslint: 9.38.0 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.46.2': {} + + '@typescript-eslint/typescript-estree@8.46.2(typescript@5.8.3)': + dependencies: + '@typescript-eslint/project-service': 8.46.2(typescript@5.8.3) + '@typescript-eslint/tsconfig-utils': 8.46.2(typescript@5.8.3) + '@typescript-eslint/types': 8.46.2 + '@typescript-eslint/visitor-keys': 8.46.2 + debug: 4.4.3 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.3 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.46.2(eslint@9.38.0)(typescript@5.8.3)': + dependencies: + '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0) + '@typescript-eslint/scope-manager': 8.46.2 + '@typescript-eslint/types': 8.46.2 + '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.8.3) + eslint: 9.38.0 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.46.2': + dependencies: + '@typescript-eslint/types': 8.46.2 + eslint-visitor-keys: 4.2.1 + + '@vitest/expect@3.2.4': + dependencies: + '@types/chai': 5.2.3 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.3.3 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.2.4(vite@7.1.12(@types/node@22.18.13))': + dependencies: + '@vitest/spy': 3.2.4 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.1.12(@types/node@22.18.13) + + '@vitest/pretty-format@3.2.4': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.2.4': + dependencies: + '@vitest/utils': 3.2.4 + pathe: 2.0.3 + strip-literal: 3.1.0 + + '@vitest/snapshot@3.2.4': + dependencies: + '@vitest/pretty-format': 3.2.4 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@3.2.4': + dependencies: + tinyspy: 4.0.4 + + '@vitest/utils@3.2.4': + dependencies: + '@vitest/pretty-format': 3.2.4 + loupe: 3.2.1 + tinyrainbow: 2.0.0 + + acorn-jsx@5.3.2(acorn@8.15.0): + dependencies: + acorn: 8.15.0 + + acorn@8.15.0: {} + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + argparse@2.0.1: {} + + assertion-error@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@1.1.12: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.2: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + cac@6.7.14: {} + + callsites@3.1.0: {} + + chai@5.3.3: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.2.1 + pathval: 2.0.1 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + check-error@2.1.1: {} + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + concat-map@0.0.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + csstype@3.1.3: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + deep-eql@5.0.2: {} + + deep-is@0.1.4: {} + + dotenv@17.2.3: {} + + es-module-lexer@1.7.0: {} + + esbuild@0.25.11: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.11 + '@esbuild/android-arm': 0.25.11 + '@esbuild/android-arm64': 0.25.11 + '@esbuild/android-x64': 0.25.11 + '@esbuild/darwin-arm64': 0.25.11 + '@esbuild/darwin-x64': 0.25.11 + '@esbuild/freebsd-arm64': 0.25.11 + '@esbuild/freebsd-x64': 0.25.11 + '@esbuild/linux-arm': 0.25.11 + '@esbuild/linux-arm64': 0.25.11 + '@esbuild/linux-ia32': 0.25.11 + '@esbuild/linux-loong64': 0.25.11 + '@esbuild/linux-mips64el': 0.25.11 + '@esbuild/linux-ppc64': 0.25.11 + '@esbuild/linux-riscv64': 0.25.11 + '@esbuild/linux-s390x': 0.25.11 + '@esbuild/linux-x64': 0.25.11 + '@esbuild/netbsd-arm64': 0.25.11 + '@esbuild/netbsd-x64': 0.25.11 + '@esbuild/openbsd-arm64': 0.25.11 + '@esbuild/openbsd-x64': 0.25.11 + '@esbuild/openharmony-arm64': 0.25.11 + '@esbuild/sunos-x64': 0.25.11 + '@esbuild/win32-arm64': 0.25.11 + '@esbuild/win32-ia32': 0.25.11 + '@esbuild/win32-x64': 0.25.11 + + escape-string-regexp@4.0.0: {} + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.38.0: + dependencies: + '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.21.1 + '@eslint/config-helpers': 0.4.1 + '@eslint/core': 0.16.0 + '@eslint/eslintrc': 3.3.1 + '@eslint/js': 9.38.0 + '@eslint/plugin-kit': 0.4.0 + '@humanfs/node': 0.16.7 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.8 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3 + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.4.0: + dependencies: + acorn: 8.15.0 + acorn-jsx: 5.3.2(acorn@8.15.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.8 + + esutils@2.0.3: {} + + expect-type@1.2.2: {} + + fast-deep-equal@3.1.3: {} + + fast-glob@3.3.3: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.19.1: + dependencies: + reusify: 1.1.0 + + fdir@6.5.0(picomatch@4.0.3): + optionalDependencies: + picomatch: 4.0.3 + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.3.3 + keyv: 4.5.4 + + flatted@3.3.3: {} + + fsevents@2.3.3: + optional: true + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + globals@14.0.0: {} + + globals@15.15.0: {} + + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + + ignore@5.3.2: {} + + ignore@7.0.5: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + isexe@2.0.0: {} + + js-tokens@9.0.1: {} + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + loupe@3.2.1: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.12 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.2 + + ms@2.1.3: {} + + nanoid@3.3.11: {} + + natural-compare@1.4.0: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + pathe@2.0.3: {} + + pathval@2.0.1: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + picomatch@4.0.3: {} + + postcss@8.5.6: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prelude-ls@1.2.1: {} + + punycode@2.3.1: {} + + queue-microtask@1.2.3: {} + + react@19.2.0: {} + + resolve-from@4.0.0: {} + + reusify@1.1.0: {} + + rollup@4.52.5: + dependencies: + '@types/estree': 1.0.8 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.52.5 + '@rollup/rollup-android-arm64': 4.52.5 + '@rollup/rollup-darwin-arm64': 4.52.5 + '@rollup/rollup-darwin-x64': 4.52.5 + '@rollup/rollup-freebsd-arm64': 4.52.5 + '@rollup/rollup-freebsd-x64': 4.52.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.52.5 + '@rollup/rollup-linux-arm-musleabihf': 4.52.5 + '@rollup/rollup-linux-arm64-gnu': 4.52.5 + '@rollup/rollup-linux-arm64-musl': 4.52.5 + '@rollup/rollup-linux-loong64-gnu': 4.52.5 + '@rollup/rollup-linux-ppc64-gnu': 4.52.5 + '@rollup/rollup-linux-riscv64-gnu': 4.52.5 + '@rollup/rollup-linux-riscv64-musl': 4.52.5 + '@rollup/rollup-linux-s390x-gnu': 4.52.5 + '@rollup/rollup-linux-x64-gnu': 4.52.5 + '@rollup/rollup-linux-x64-musl': 4.52.5 + '@rollup/rollup-openharmony-arm64': 4.52.5 + '@rollup/rollup-win32-arm64-msvc': 4.52.5 + '@rollup/rollup-win32-ia32-msvc': 4.52.5 + '@rollup/rollup-win32-x64-gnu': 4.52.5 + '@rollup/rollup-win32-x64-msvc': 4.52.5 + fsevents: 2.3.3 + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + semver@7.7.3: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + siginfo@2.0.0: {} + + source-map-js@1.2.1: {} + + stackback@0.0.2: {} + + std-env@3.10.0: {} + + strip-json-comments@3.1.1: {} + + strip-literal@3.1.0: + dependencies: + js-tokens: 9.0.1 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + tinybench@2.9.0: {} + + tinyexec@0.3.2: {} + + tinyglobby@0.2.15: + dependencies: + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + + tinypool@1.1.1: {} + + tinyrainbow@2.0.0: {} + + tinyspy@4.0.4: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + ts-api-utils@2.1.0(typescript@5.8.3): + dependencies: + typescript: 5.8.3 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + typescript-eslint@8.46.2(eslint@9.38.0)(typescript@5.8.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0)(typescript@5.8.3))(eslint@9.38.0)(typescript@5.8.3) + '@typescript-eslint/parser': 8.46.2(eslint@9.38.0)(typescript@5.8.3) + '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.8.3) + '@typescript-eslint/utils': 8.46.2(eslint@9.38.0)(typescript@5.8.3) + eslint: 9.38.0 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color + + typescript@5.8.3: {} + + undici-types@6.21.0: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + vite-node@3.2.4(@types/node@22.18.13): + dependencies: + cac: 6.7.14 + debug: 4.4.3 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 7.1.12(@types/node@22.18.13) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + vite@7.1.12(@types/node@22.18.13): + dependencies: + esbuild: 0.25.11 + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + postcss: 8.5.6 + rollup: 4.52.5 + tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 22.18.13 + fsevents: 2.3.3 + + vitest@3.2.4(@types/node@22.18.13): + dependencies: + '@types/chai': 5.2.3 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@22.18.13)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 + chai: 5.3.3 + debug: 4.4.3 + expect-type: 1.2.2 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.3 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.15 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 7.1.12(@types/node@22.18.13) + vite-node: 3.2.4(@types/node@22.18.13) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.18.13 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + word-wrap@1.2.5: {} + + yocto-queue@0.1.0: {} + + zod@4.1.12: {} diff --git a/src/funcs/betaResponsesSend.ts b/src/funcs/betaResponsesSend.ts index 6b369cee..cddbbaef 100644 --- a/src/funcs/betaResponsesSend.ts +++ b/src/funcs/betaResponsesSend.ts @@ -99,7 +99,7 @@ export function betaResponsesSend( options?: RequestOptions, ): APIPromise< Result< - operations.CreateApiAlphaResponsesResponse, + operations.CreateResponsesResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError @@ -129,7 +129,7 @@ export function betaResponsesSend( options?: RequestOptions, ): APIPromise< Result< - operations.CreateApiAlphaResponsesResponse, + operations.CreateResponsesResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError @@ -167,7 +167,7 @@ async function $do( ): Promise< [ Result< - operations.CreateApiAlphaResponsesResponse, + operations.CreateResponsesResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError @@ -204,7 +204,7 @@ async function $do( const payload = parsed.value; const body = encodeJSON("body", payload, { explode: true }); - const path = pathToFunc("/api/alpha/responses")(); + const path = pathToFunc("/responses")(); const headers = new Headers(compactMap({ "Content-Type": "application/json", @@ -218,7 +218,7 @@ async function $do( const context = { options: client._options, baseURL: options?.serverURL ?? client._baseURL ?? "", - operationID: "createApiAlphaResponses", + operationID: "createResponses", oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -277,7 +277,7 @@ async function $do( }; const [result] = await M.match< - operations.CreateApiAlphaResponsesResponse, + operations.CreateResponsesResponse, | errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError @@ -300,8 +300,8 @@ async function $do( | UnexpectedClientError | SDKValidationError >( - M.json(200, operations.CreateApiAlphaResponsesResponse$inboundSchema), - M.sse(200, operations.CreateApiAlphaResponsesResponse$inboundSchema), + M.json(200, operations.CreateResponsesResponse$inboundSchema), + M.sse(200, operations.CreateResponsesResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors.PaymentRequiredResponseError$inboundSchema), diff --git a/src/funcs/oAuthCreateAuthCode.ts b/src/funcs/oAuthCreateAuthCode.ts new file mode 100644 index 00000000..c27ef6d0 --- /dev/null +++ b/src/funcs/oAuthCreateAuthCode.ts @@ -0,0 +1,177 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Create authorization code + * + * @remarks + * Create an authorization code for the PKCE flow to generate a user-controlled API key + */ +export function oAuthCreateAuthCode( + client: OpenRouterCore, + request: operations.CreateAuthKeysCodeRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.CreateAuthKeysCodeResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.CreateAuthKeysCodeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.CreateAuthKeysCodeResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.CreateAuthKeysCodeRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth/keys/code")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "createAuthKeysCode", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.CreateAuthKeysCodeResponse, + | errors.BadRequestResponseError + | errors.UnauthorizedResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.CreateAuthKeysCodeResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts new file mode 100644 index 00000000..76630a81 --- /dev/null +++ b/src/funcs/oAuthExchangeAuthCodeForAPIKey.ts @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpenRouterCore } from "../core.js"; +import { encodeJSON } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Exchange authorization code for API key + * + * @remarks + * Exchange an authorization code from the PKCE flow for a user-controlled API key + */ +export function oAuthExchangeAuthCodeForAPIKey( + client: OpenRouterCore, + request: operations.ExchangeAuthCodeForAPIKeyRequest, + options?: RequestOptions, +): APIPromise< + Result< + operations.ExchangeAuthCodeForAPIKeyResponse, + | errors.BadRequestResponseError + | errors.ForbiddenResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OpenRouterCore, + request: operations.ExchangeAuthCodeForAPIKeyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.ExchangeAuthCodeForAPIKeyResponse, + | errors.BadRequestResponseError + | errors.ForbiddenResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => + operations.ExchangeAuthCodeForAPIKeyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload, { explode: true }); + + const path = pathToFunc("/auth/keys")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "exchangeAuthCodeForAPIKey", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + operations.ExchangeAuthCodeForAPIKeyResponse, + | errors.BadRequestResponseError + | errors.ForbiddenResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, operations.ExchangeAuthCodeForAPIKeyResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(403, errors.ForbiddenResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/models/operations/createapialpharesponses.ts b/src/models/operations/createapialpharesponses.ts deleted file mode 100644 index 4ba2c6c6..00000000 --- a/src/models/operations/createapialpharesponses.ts +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v4"; -import { EventStream } from "../../lib/event-streams.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import * as models from "../index.js"; - -/** - * Successful response - */ -export type CreateApiAlphaResponsesResponseBody = { - /** - * Union of all possible event types emitted during response streaming - */ - data: models.OpenResponsesStreamEvent; -}; - -export type CreateApiAlphaResponsesResponse = - | models.OpenResponsesNonStreamingResponse - | EventStream; - -/** @internal */ -export const CreateApiAlphaResponsesResponseBody$inboundSchema: z.ZodType< - CreateApiAlphaResponsesResponseBody, - unknown -> = z.object({ - data: z.string().transform((v, ctx) => { - try { - return JSON.parse(v); - } catch (err) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: `malformed json: ${err}`, - }); - return z.NEVER; - } - }).pipe(models.OpenResponsesStreamEvent$inboundSchema), -}); - -/** @internal */ -export type CreateApiAlphaResponsesResponseBody$Outbound = { - data: models.OpenResponsesStreamEvent$Outbound; -}; - -/** @internal */ -export const CreateApiAlphaResponsesResponseBody$outboundSchema: z.ZodType< - CreateApiAlphaResponsesResponseBody$Outbound, - CreateApiAlphaResponsesResponseBody -> = z.object({ - data: models.OpenResponsesStreamEvent$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateApiAlphaResponsesResponseBody$ { - /** @deprecated use `CreateApiAlphaResponsesResponseBody$inboundSchema` instead. */ - export const inboundSchema = - CreateApiAlphaResponsesResponseBody$inboundSchema; - /** @deprecated use `CreateApiAlphaResponsesResponseBody$outboundSchema` instead. */ - export const outboundSchema = - CreateApiAlphaResponsesResponseBody$outboundSchema; - /** @deprecated use `CreateApiAlphaResponsesResponseBody$Outbound` instead. */ - export type Outbound = CreateApiAlphaResponsesResponseBody$Outbound; -} - -export function createApiAlphaResponsesResponseBodyToJSON( - createApiAlphaResponsesResponseBody: CreateApiAlphaResponsesResponseBody, -): string { - return JSON.stringify( - CreateApiAlphaResponsesResponseBody$outboundSchema.parse( - createApiAlphaResponsesResponseBody, - ), - ); -} - -export function createApiAlphaResponsesResponseBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateApiAlphaResponsesResponseBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateApiAlphaResponsesResponseBody' from JSON`, - ); -} - -/** @internal */ -export const CreateApiAlphaResponsesResponse$inboundSchema: z.ZodType< - CreateApiAlphaResponsesResponse, - unknown -> = z.union([ - models.OpenResponsesNonStreamingResponse$inboundSchema, - z.custom>(x => x instanceof ReadableStream) - .transform(stream => { - return new EventStream(stream, rawEvent => { - if (rawEvent.data === "[DONE]") return { done: true }; - return { - value: z.lazy(() => CreateApiAlphaResponsesResponseBody$inboundSchema) - .parse(rawEvent)?.data, - }; - }); - }), -]); - -/** @internal */ -export type CreateApiAlphaResponsesResponse$Outbound = - | models.OpenResponsesNonStreamingResponse$Outbound - | never; - -/** @internal */ -export const CreateApiAlphaResponsesResponse$outboundSchema: z.ZodType< - CreateApiAlphaResponsesResponse$Outbound, - CreateApiAlphaResponsesResponse -> = z.union([ - models.OpenResponsesNonStreamingResponse$outboundSchema, - z.never(), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateApiAlphaResponsesResponse$ { - /** @deprecated use `CreateApiAlphaResponsesResponse$inboundSchema` instead. */ - export const inboundSchema = CreateApiAlphaResponsesResponse$inboundSchema; - /** @deprecated use `CreateApiAlphaResponsesResponse$outboundSchema` instead. */ - export const outboundSchema = CreateApiAlphaResponsesResponse$outboundSchema; - /** @deprecated use `CreateApiAlphaResponsesResponse$Outbound` instead. */ - export type Outbound = CreateApiAlphaResponsesResponse$Outbound; -} - -export function createApiAlphaResponsesResponseToJSON( - createApiAlphaResponsesResponse: CreateApiAlphaResponsesResponse, -): string { - return JSON.stringify( - CreateApiAlphaResponsesResponse$outboundSchema.parse( - createApiAlphaResponsesResponse, - ), - ); -} - -export function createApiAlphaResponsesResponseFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateApiAlphaResponsesResponse$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateApiAlphaResponsesResponse' from JSON`, - ); -} diff --git a/src/models/operations/createauthkeyscode.ts b/src/models/operations/createauthkeyscode.ts new file mode 100644 index 00000000..4e83073f --- /dev/null +++ b/src/models/operations/createauthkeyscode.ts @@ -0,0 +1,302 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The method used to generate the code challenge + */ +export const CreateAuthKeysCodeCodeChallengeMethod = { + S256: "S256", + Plain: "plain", +} as const; +/** + * The method used to generate the code challenge + */ +export type CreateAuthKeysCodeCodeChallengeMethod = OpenEnum< + typeof CreateAuthKeysCodeCodeChallengeMethod +>; + +export type CreateAuthKeysCodeRequest = { + /** + * 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; + /** + * Credit limit for the API key to be created + */ + limit?: number | undefined; +}; + +/** + * Auth code data + */ +export type CreateAuthKeysCodeData = { + /** + * The authorization code ID to use in the exchange request + */ + id: string; + /** + * The application ID associated with this auth code + */ + appId: number; + /** + * ISO 8601 timestamp of when the auth code was created + */ + createdAt: string; +}; + +/** + * Successfully created authorization code + */ +export type CreateAuthKeysCodeResponse = { + /** + * Auth code data + */ + data: CreateAuthKeysCodeData; +}; + +/** @internal */ +export const CreateAuthKeysCodeCodeChallengeMethod$inboundSchema: z.ZodType< + CreateAuthKeysCodeCodeChallengeMethod, + unknown +> = z + .union([ + z.enum(CreateAuthKeysCodeCodeChallengeMethod), + z.string().transform(catchUnrecognizedEnum), + ]); + +/** @internal */ +export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType< + CreateAuthKeysCodeCodeChallengeMethod, + CreateAuthKeysCodeCodeChallengeMethod +> = z.union([ + z.enum(CreateAuthKeysCodeCodeChallengeMethod), + z.string().and(z.custom>()), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateAuthKeysCodeCodeChallengeMethod$ { + /** @deprecated use `CreateAuthKeysCodeCodeChallengeMethod$inboundSchema` instead. */ + export const inboundSchema = + CreateAuthKeysCodeCodeChallengeMethod$inboundSchema; + /** @deprecated use `CreateAuthKeysCodeCodeChallengeMethod$outboundSchema` instead. */ + export const outboundSchema = + CreateAuthKeysCodeCodeChallengeMethod$outboundSchema; +} + +/** @internal */ +export const CreateAuthKeysCodeRequest$inboundSchema: z.ZodType< + CreateAuthKeysCodeRequest, + unknown +> = z.object({ + callback_url: z.string(), + code_challenge: z.string().optional(), + code_challenge_method: CreateAuthKeysCodeCodeChallengeMethod$inboundSchema + .optional(), + limit: z.number().optional(), +}).transform((v) => { + return remap$(v, { + "callback_url": "callbackUrl", + "code_challenge": "codeChallenge", + "code_challenge_method": "codeChallengeMethod", + }); +}); + +/** @internal */ +export type CreateAuthKeysCodeRequest$Outbound = { + callback_url: string; + code_challenge?: string | undefined; + code_challenge_method?: string | undefined; + limit?: number | undefined; +}; + +/** @internal */ +export const CreateAuthKeysCodeRequest$outboundSchema: z.ZodType< + CreateAuthKeysCodeRequest$Outbound, + CreateAuthKeysCodeRequest +> = z.object({ + callbackUrl: z.string(), + codeChallenge: z.string().optional(), + codeChallengeMethod: CreateAuthKeysCodeCodeChallengeMethod$outboundSchema + .optional(), + limit: z.number().optional(), +}).transform((v) => { + return remap$(v, { + callbackUrl: "callback_url", + codeChallenge: "code_challenge", + codeChallengeMethod: "code_challenge_method", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateAuthKeysCodeRequest$ { + /** @deprecated use `CreateAuthKeysCodeRequest$inboundSchema` instead. */ + export const inboundSchema = CreateAuthKeysCodeRequest$inboundSchema; + /** @deprecated use `CreateAuthKeysCodeRequest$outboundSchema` instead. */ + export const outboundSchema = CreateAuthKeysCodeRequest$outboundSchema; + /** @deprecated use `CreateAuthKeysCodeRequest$Outbound` instead. */ + export type Outbound = CreateAuthKeysCodeRequest$Outbound; +} + +export function createAuthKeysCodeRequestToJSON( + createAuthKeysCodeRequest: CreateAuthKeysCodeRequest, +): string { + return JSON.stringify( + CreateAuthKeysCodeRequest$outboundSchema.parse(createAuthKeysCodeRequest), + ); +} + +export function createAuthKeysCodeRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateAuthKeysCodeRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateAuthKeysCodeRequest' from JSON`, + ); +} + +/** @internal */ +export const CreateAuthKeysCodeData$inboundSchema: z.ZodType< + CreateAuthKeysCodeData, + unknown +> = z.object({ + id: z.string(), + app_id: z.number(), + created_at: z.string(), +}).transform((v) => { + return remap$(v, { + "app_id": "appId", + "created_at": "createdAt", + }); +}); + +/** @internal */ +export type CreateAuthKeysCodeData$Outbound = { + id: string; + app_id: number; + created_at: string; +}; + +/** @internal */ +export const CreateAuthKeysCodeData$outboundSchema: z.ZodType< + CreateAuthKeysCodeData$Outbound, + CreateAuthKeysCodeData +> = z.object({ + id: z.string(), + appId: z.number(), + createdAt: z.string(), +}).transform((v) => { + return remap$(v, { + appId: "app_id", + createdAt: "created_at", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateAuthKeysCodeData$ { + /** @deprecated use `CreateAuthKeysCodeData$inboundSchema` instead. */ + export const inboundSchema = CreateAuthKeysCodeData$inboundSchema; + /** @deprecated use `CreateAuthKeysCodeData$outboundSchema` instead. */ + export const outboundSchema = CreateAuthKeysCodeData$outboundSchema; + /** @deprecated use `CreateAuthKeysCodeData$Outbound` instead. */ + export type Outbound = CreateAuthKeysCodeData$Outbound; +} + +export function createAuthKeysCodeDataToJSON( + createAuthKeysCodeData: CreateAuthKeysCodeData, +): string { + return JSON.stringify( + CreateAuthKeysCodeData$outboundSchema.parse(createAuthKeysCodeData), + ); +} + +export function createAuthKeysCodeDataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateAuthKeysCodeData$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateAuthKeysCodeData' from JSON`, + ); +} + +/** @internal */ +export const CreateAuthKeysCodeResponse$inboundSchema: z.ZodType< + CreateAuthKeysCodeResponse, + unknown +> = z.object({ + data: z.lazy(() => CreateAuthKeysCodeData$inboundSchema), +}); + +/** @internal */ +export type CreateAuthKeysCodeResponse$Outbound = { + data: CreateAuthKeysCodeData$Outbound; +}; + +/** @internal */ +export const CreateAuthKeysCodeResponse$outboundSchema: z.ZodType< + CreateAuthKeysCodeResponse$Outbound, + CreateAuthKeysCodeResponse +> = z.object({ + data: z.lazy(() => CreateAuthKeysCodeData$outboundSchema), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateAuthKeysCodeResponse$ { + /** @deprecated use `CreateAuthKeysCodeResponse$inboundSchema` instead. */ + export const inboundSchema = CreateAuthKeysCodeResponse$inboundSchema; + /** @deprecated use `CreateAuthKeysCodeResponse$outboundSchema` instead. */ + export const outboundSchema = CreateAuthKeysCodeResponse$outboundSchema; + /** @deprecated use `CreateAuthKeysCodeResponse$Outbound` instead. */ + export type Outbound = CreateAuthKeysCodeResponse$Outbound; +} + +export function createAuthKeysCodeResponseToJSON( + createAuthKeysCodeResponse: CreateAuthKeysCodeResponse, +): string { + return JSON.stringify( + CreateAuthKeysCodeResponse$outboundSchema.parse(createAuthKeysCodeResponse), + ); +} + +export function createAuthKeysCodeResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateAuthKeysCodeResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateAuthKeysCodeResponse' from JSON`, + ); +} diff --git a/src/models/operations/createresponses.ts b/src/models/operations/createresponses.ts new file mode 100644 index 00000000..08d79bfe --- /dev/null +++ b/src/models/operations/createresponses.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4"; +import { EventStream } from "../../lib/event-streams.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as models from "../index.js"; + +/** + * Successful response + */ +export type CreateResponsesResponseBody = { + /** + * Union of all possible event types emitted during response streaming + */ + data: models.OpenResponsesStreamEvent; +}; + +export type CreateResponsesResponse = + | models.OpenResponsesNonStreamingResponse + | EventStream; + +/** @internal */ +export const CreateResponsesResponseBody$inboundSchema: z.ZodType< + CreateResponsesResponseBody, + unknown +> = z.object({ + data: z.string().transform((v, ctx) => { + try { + return JSON.parse(v); + } catch (err) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: `malformed json: ${err}`, + }); + return z.NEVER; + } + }).pipe(models.OpenResponsesStreamEvent$inboundSchema), +}); + +/** @internal */ +export type CreateResponsesResponseBody$Outbound = { + data: models.OpenResponsesStreamEvent$Outbound; +}; + +/** @internal */ +export const CreateResponsesResponseBody$outboundSchema: z.ZodType< + CreateResponsesResponseBody$Outbound, + CreateResponsesResponseBody +> = z.object({ + data: models.OpenResponsesStreamEvent$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateResponsesResponseBody$ { + /** @deprecated use `CreateResponsesResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreateResponsesResponseBody$inboundSchema; + /** @deprecated use `CreateResponsesResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreateResponsesResponseBody$outboundSchema; + /** @deprecated use `CreateResponsesResponseBody$Outbound` instead. */ + export type Outbound = CreateResponsesResponseBody$Outbound; +} + +export function createResponsesResponseBodyToJSON( + createResponsesResponseBody: CreateResponsesResponseBody, +): string { + return JSON.stringify( + CreateResponsesResponseBody$outboundSchema.parse( + createResponsesResponseBody, + ), + ); +} + +export function createResponsesResponseBodyFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateResponsesResponseBody$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateResponsesResponseBody' from JSON`, + ); +} + +/** @internal */ +export const CreateResponsesResponse$inboundSchema: z.ZodType< + CreateResponsesResponse, + unknown +> = z.union([ + models.OpenResponsesNonStreamingResponse$inboundSchema, + z.custom>(x => x instanceof ReadableStream) + .transform(stream => { + return new EventStream(stream, rawEvent => { + if (rawEvent.data === "[DONE]") return { done: true }; + return { + value: z.lazy(() => CreateResponsesResponseBody$inboundSchema).parse( + rawEvent, + )?.data, + }; + }); + }), +]); + +/** @internal */ +export type CreateResponsesResponse$Outbound = + | models.OpenResponsesNonStreamingResponse$Outbound + | never; + +/** @internal */ +export const CreateResponsesResponse$outboundSchema: z.ZodType< + CreateResponsesResponse$Outbound, + CreateResponsesResponse +> = z.union([ + models.OpenResponsesNonStreamingResponse$outboundSchema, + z.never(), +]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateResponsesResponse$ { + /** @deprecated use `CreateResponsesResponse$inboundSchema` instead. */ + export const inboundSchema = CreateResponsesResponse$inboundSchema; + /** @deprecated use `CreateResponsesResponse$outboundSchema` instead. */ + export const outboundSchema = CreateResponsesResponse$outboundSchema; + /** @deprecated use `CreateResponsesResponse$Outbound` instead. */ + export type Outbound = CreateResponsesResponse$Outbound; +} + +export function createResponsesResponseToJSON( + createResponsesResponse: CreateResponsesResponse, +): string { + return JSON.stringify( + CreateResponsesResponse$outboundSchema.parse(createResponsesResponse), + ); +} + +export function createResponsesResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateResponsesResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateResponsesResponse' from JSON`, + ); +} diff --git a/src/models/operations/exchangeauthcodeforapikey.ts b/src/models/operations/exchangeauthcodeforapikey.ts new file mode 100644 index 00000000..409e2d31 --- /dev/null +++ b/src/models/operations/exchangeauthcodeforapikey.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { + catchUnrecognizedEnum, + OpenEnum, + Unrecognized, +} from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +/** + * The method used to generate the code challenge + */ +export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod = { + S256: "S256", + Plain: "plain", +} as const; +/** + * The method used to generate the code challenge + */ +export type ExchangeAuthCodeForAPIKeyCodeChallengeMethod = OpenEnum< + typeof ExchangeAuthCodeForAPIKeyCodeChallengeMethod +>; + +export type ExchangeAuthCodeForAPIKeyRequest = { + /** + * The authorization code received from the OAuth redirect + */ + code: string; + /** + * The code verifier if code_challenge was used in the authorization request + */ + codeVerifier?: string | undefined; + /** + * The method used to generate the code challenge + */ + codeChallengeMethod?: + | ExchangeAuthCodeForAPIKeyCodeChallengeMethod + | null + | undefined; +}; + +/** + * Successfully exchanged code for an API key + */ +export type ExchangeAuthCodeForAPIKeyResponse = { + /** + * The API key to use for OpenRouter requests + */ + key: string; + /** + * User ID associated with the API key + */ + userId: string | null; +}; + +/** @internal */ +export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema: + z.ZodType = z + .union([ + z.enum(ExchangeAuthCodeForAPIKeyCodeChallengeMethod), + z.string().transform(catchUnrecognizedEnum), + ]); + +/** @internal */ +export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: + z.ZodType< + ExchangeAuthCodeForAPIKeyCodeChallengeMethod, + ExchangeAuthCodeForAPIKeyCodeChallengeMethod + > = z.union([ + z.enum(ExchangeAuthCodeForAPIKeyCodeChallengeMethod), + z.string().and(z.custom>()), + ]); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExchangeAuthCodeForAPIKeyCodeChallengeMethod$ { + /** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema` instead. */ + export const inboundSchema = + ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema; + /** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema` instead. */ + export const outboundSchema = + ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema; +} + +/** @internal */ +export const ExchangeAuthCodeForAPIKeyRequest$inboundSchema: z.ZodType< + ExchangeAuthCodeForAPIKeyRequest, + unknown +> = z.object({ + code: z.string(), + code_verifier: z.string().optional(), + code_challenge_method: z.nullable( + ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema, + ).optional(), +}).transform((v) => { + return remap$(v, { + "code_verifier": "codeVerifier", + "code_challenge_method": "codeChallengeMethod", + }); +}); + +/** @internal */ +export type ExchangeAuthCodeForAPIKeyRequest$Outbound = { + code: string; + code_verifier?: string | undefined; + code_challenge_method?: string | null | undefined; +}; + +/** @internal */ +export const ExchangeAuthCodeForAPIKeyRequest$outboundSchema: z.ZodType< + ExchangeAuthCodeForAPIKeyRequest$Outbound, + ExchangeAuthCodeForAPIKeyRequest +> = z.object({ + code: z.string(), + codeVerifier: z.string().optional(), + codeChallengeMethod: z.nullable( + ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema, + ).optional(), +}).transform((v) => { + return remap$(v, { + codeVerifier: "code_verifier", + codeChallengeMethod: "code_challenge_method", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExchangeAuthCodeForAPIKeyRequest$ { + /** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$inboundSchema` instead. */ + export const inboundSchema = ExchangeAuthCodeForAPIKeyRequest$inboundSchema; + /** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$outboundSchema` instead. */ + export const outboundSchema = ExchangeAuthCodeForAPIKeyRequest$outboundSchema; + /** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$Outbound` instead. */ + export type Outbound = ExchangeAuthCodeForAPIKeyRequest$Outbound; +} + +export function exchangeAuthCodeForAPIKeyRequestToJSON( + exchangeAuthCodeForAPIKeyRequest: ExchangeAuthCodeForAPIKeyRequest, +): string { + return JSON.stringify( + ExchangeAuthCodeForAPIKeyRequest$outboundSchema.parse( + exchangeAuthCodeForAPIKeyRequest, + ), + ); +} + +export function exchangeAuthCodeForAPIKeyRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ExchangeAuthCodeForAPIKeyRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExchangeAuthCodeForAPIKeyRequest' from JSON`, + ); +} + +/** @internal */ +export const ExchangeAuthCodeForAPIKeyResponse$inboundSchema: z.ZodType< + ExchangeAuthCodeForAPIKeyResponse, + unknown +> = z.object({ + key: z.string(), + user_id: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + "user_id": "userId", + }); +}); + +/** @internal */ +export type ExchangeAuthCodeForAPIKeyResponse$Outbound = { + key: string; + user_id: string | null; +}; + +/** @internal */ +export const ExchangeAuthCodeForAPIKeyResponse$outboundSchema: z.ZodType< + ExchangeAuthCodeForAPIKeyResponse$Outbound, + ExchangeAuthCodeForAPIKeyResponse +> = z.object({ + key: z.string(), + userId: z.nullable(z.string()), +}).transform((v) => { + return remap$(v, { + userId: "user_id", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ExchangeAuthCodeForAPIKeyResponse$ { + /** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$inboundSchema` instead. */ + export const inboundSchema = ExchangeAuthCodeForAPIKeyResponse$inboundSchema; + /** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$outboundSchema` instead. */ + export const outboundSchema = + ExchangeAuthCodeForAPIKeyResponse$outboundSchema; + /** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$Outbound` instead. */ + export type Outbound = ExchangeAuthCodeForAPIKeyResponse$Outbound; +} + +export function exchangeAuthCodeForAPIKeyResponseToJSON( + exchangeAuthCodeForAPIKeyResponse: ExchangeAuthCodeForAPIKeyResponse, +): string { + return JSON.stringify( + ExchangeAuthCodeForAPIKeyResponse$outboundSchema.parse( + exchangeAuthCodeForAPIKeyResponse, + ), + ); +} + +export function exchangeAuthCodeForAPIKeyResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ExchangeAuthCodeForAPIKeyResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ExchangeAuthCodeForAPIKeyResponse' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 63eb1fb0..6649ba34 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -2,10 +2,12 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./createapialpharesponses.js"; +export * from "./createauthkeyscode.js"; export * from "./createcoinbasecharge.js"; export * from "./createkeys.js"; +export * from "./createresponses.js"; export * from "./deletekeys.js"; +export * from "./exchangeauthcodeforapikey.js"; export * from "./getcredits.js"; export * from "./getcurrentkey.js"; export * from "./getgeneration.js"; diff --git a/src/react-query/betaResponsesSend.ts b/src/react-query/betaResponsesSend.ts index 6288643d..b8e153c2 100644 --- a/src/react-query/betaResponsesSend.ts +++ b/src/react-query/betaResponsesSend.ts @@ -22,8 +22,7 @@ export type BetaResponsesSendMutationVariables = { options?: RequestOptions; }; -export type BetaResponsesSendMutationData = - operations.CreateApiAlphaResponsesResponse; +export type BetaResponsesSendMutationData = operations.CreateResponsesResponse; /** * Create a response diff --git a/src/react-query/index.ts b/src/react-query/index.ts index 40378160..b247a736 100644 --- a/src/react-query/index.ts +++ b/src/react-query/index.ts @@ -23,5 +23,7 @@ export * from "./generationsGetGeneration.js"; export * from "./modelsCount.js"; export * from "./modelsList.js"; export * from "./modelsListForUser.js"; +export * from "./oAuthCreateAuthCode.js"; +export * from "./oAuthExchangeAuthCodeForAPIKey.js"; export * from "./parametersGetParameters.js"; export * from "./providersList.js"; diff --git a/src/react-query/oAuthCreateAuthCode.ts b/src/react-query/oAuthCreateAuthCode.ts new file mode 100644 index 00000000..8af94bce --- /dev/null +++ b/src/react-query/oAuthCreateAuthCode.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { OpenRouterCore } from "../core.js"; +import { oAuthCreateAuthCode } from "../funcs/oAuthCreateAuthCode.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useOpenRouterContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type OAuthCreateAuthCodeMutationVariables = { + request: operations.CreateAuthKeysCodeRequest; + options?: RequestOptions; +}; + +export type OAuthCreateAuthCodeMutationData = + operations.CreateAuthKeysCodeResponse; + +/** + * Create authorization code + * + * @remarks + * Create an authorization code for the PKCE flow to generate a user-controlled API key + */ +export function useOAuthCreateAuthCodeMutation( + options?: MutationHookOptions< + OAuthCreateAuthCodeMutationData, + Error, + OAuthCreateAuthCodeMutationVariables + >, +): UseMutationResult< + OAuthCreateAuthCodeMutationData, + Error, + OAuthCreateAuthCodeMutationVariables +> { + const client = useOpenRouterContext(); + return useMutation({ + ...buildOAuthCreateAuthCodeMutation(client, options), + ...options, + }); +} + +export function mutationKeyOAuthCreateAuthCode(): MutationKey { + return ["@openrouter/sdk", "OAuth", "createAuthCode"]; +} + +export function buildOAuthCreateAuthCodeMutation( + client$: OpenRouterCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: OAuthCreateAuthCodeMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeyOAuthCreateAuthCode(), + mutationFn: function oAuthCreateAuthCodeMutationFn({ + request, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(oAuthCreateAuthCode( + client$, + request, + mergedOptions, + )); + }, + }; +} diff --git a/src/react-query/oAuthExchangeAuthCodeForAPIKey.ts b/src/react-query/oAuthExchangeAuthCodeForAPIKey.ts new file mode 100644 index 00000000..b974c1bc --- /dev/null +++ b/src/react-query/oAuthExchangeAuthCodeForAPIKey.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + MutationKey, + useMutation, + UseMutationResult, +} from "@tanstack/react-query"; +import { OpenRouterCore } from "../core.js"; +import { oAuthExchangeAuthCodeForAPIKey } from "../funcs/oAuthExchangeAuthCodeForAPIKey.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useOpenRouterContext } from "./_context.js"; +import { MutationHookOptions } from "./_types.js"; + +export type OAuthExchangeAuthCodeForAPIKeyMutationVariables = { + request: operations.ExchangeAuthCodeForAPIKeyRequest; + options?: RequestOptions; +}; + +export type OAuthExchangeAuthCodeForAPIKeyMutationData = + operations.ExchangeAuthCodeForAPIKeyResponse; + +/** + * Exchange authorization code for API key + * + * @remarks + * Exchange an authorization code from the PKCE flow for a user-controlled API key + */ +export function useOAuthExchangeAuthCodeForAPIKeyMutation( + options?: MutationHookOptions< + OAuthExchangeAuthCodeForAPIKeyMutationData, + Error, + OAuthExchangeAuthCodeForAPIKeyMutationVariables + >, +): UseMutationResult< + OAuthExchangeAuthCodeForAPIKeyMutationData, + Error, + OAuthExchangeAuthCodeForAPIKeyMutationVariables +> { + const client = useOpenRouterContext(); + return useMutation({ + ...buildOAuthExchangeAuthCodeForAPIKeyMutation(client, options), + ...options, + }); +} + +export function mutationKeyOAuthExchangeAuthCodeForAPIKey(): MutationKey { + return ["@openrouter/sdk", "OAuth", "exchangeAuthCodeForAPIKey"]; +} + +export function buildOAuthExchangeAuthCodeForAPIKeyMutation( + client$: OpenRouterCore, + hookOptions?: RequestOptions, +): { + mutationKey: MutationKey; + mutationFn: ( + variables: OAuthExchangeAuthCodeForAPIKeyMutationVariables, + ) => Promise; +} { + return { + mutationKey: mutationKeyOAuthExchangeAuthCodeForAPIKey(), + mutationFn: function oAuthExchangeAuthCodeForAPIKeyMutationFn({ + request, + options, + }): Promise { + const mergedOptions = { + ...hookOptions, + ...options, + fetchOptions: { + ...hookOptions?.fetchOptions, + ...options?.fetchOptions, + signal: combineSignals( + hookOptions?.fetchOptions?.signal, + options?.fetchOptions?.signal, + ), + }, + }; + return unwrapAsync(oAuthExchangeAuthCodeForAPIKey( + client$, + request, + mergedOptions, + )); + }, + }; +} diff --git a/src/sdk/oauth.ts b/src/sdk/oauth.ts new file mode 100644 index 00000000..fb8d4730 --- /dev/null +++ b/src/sdk/oauth.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { oAuthCreateAuthCode } from "../funcs/oAuthCreateAuthCode.js"; +import { oAuthExchangeAuthCodeForAPIKey } from "../funcs/oAuthExchangeAuthCodeForAPIKey.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; +// #region imports +import { + CreateAuthorizationUrlRequest, + oAuthCreateAuthorizationUrl, +} from "../funcs/oAuthCreateAuthorizationUrl.js"; +import { + CreateSHA256CodeChallengeResponse, + oAuthCreateSHA256CodeChallenge, +} from "../funcs/oAuthCreateSHA256CodeChallenge.js"; +// #endregion imports + +export class OAuth extends ClientSDK { + // #region sdk-class-body + /** + * Generate a OAuth2 authorization URL + * + * @remarks + * Generates a URL to redirect users to for authorizing your application. The + * URL includes the provided callback URL and, if applicable, the code + * challenge parameters for PKCE. + * + * @see {@link https://openrouter.ai/docs/use-cases/oauth-pkce} + */ + async createAuthorizationUrl( + request: CreateAuthorizationUrlRequest, + ): Promise { + const result = oAuthCreateAuthorizationUrl(this, request); + + if (!result.ok) { + throw result.error; + } + + return result.value; + } + + /** + * Generate a SHA-256 code challenge for PKCE + * + * @remarks + * Generates a SHA-256 code challenge and corresponding code verifier for use + * in the PKCE extension to OAuth2. If no code verifier is provided, a random + * one will be generated according to RFC 7636 (32 random bytes, base64url + * encoded). If a code verifier is provided, it must be 43-128 characters and + * contain only unreserved characters [A-Za-z0-9-._~]. + * + * @see {@link https://openrouter.ai/docs/use-cases/oauth-pkce} + * @see {@link https://datatracker.ietf.org/doc/html/rfc7636} + */ + async createSHA256CodeChallenge(): Promise< + CreateSHA256CodeChallengeResponse + > { + return unwrapAsync(oAuthCreateSHA256CodeChallenge()); + } + // #endregion sdk-class-body + + /** + * Exchange authorization code for API key + * + * @remarks + * Exchange an authorization code from the PKCE flow for a user-controlled API key + */ + async exchangeAuthCodeForAPIKey( + request: operations.ExchangeAuthCodeForAPIKeyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(oAuthExchangeAuthCodeForAPIKey( + this, + request, + options, + )); + } + + /** + * Create authorization code + * + * @remarks + * Create an authorization code for the PKCE flow to generate a user-controlled API key + */ + async createAuthCode( + request: operations.CreateAuthKeysCodeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(oAuthCreateAuthCode( + this, + request, + options, + )); + } +} diff --git a/src/sdk/responses.ts b/src/sdk/responses.ts index 39ce3215..a906114b 100644 --- a/src/sdk/responses.ts +++ b/src/sdk/responses.ts @@ -27,11 +27,11 @@ export class Responses extends ClientSDK { async send( request: models.OpenResponsesRequest, options?: RequestOptions, - ): Promise; + ): Promise; async send( request: models.OpenResponsesRequest, options?: RequestOptions, - ): Promise { + ): Promise { return unwrapAsync(betaResponsesSend( this, request, diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index ed752ed9..8c70c802 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -12,6 +12,7 @@ import { Credits } from "./credits.js"; import { Endpoints } from "./endpoints.js"; import { Generations } from "./generations.js"; import { Models } from "./models.js"; +import { OAuth } from "./oauth.js"; import { ParametersT } from "./parameters.js"; import { Providers } from "./providers.js"; @@ -61,6 +62,11 @@ export class OpenRouter extends ClientSDK { return (this._apiKeys ??= new APIKeys(this._options)); } + private _oAuth?: OAuth; + get oAuth(): OAuth { + return (this._oAuth ??= new OAuth(this._options)); + } + private _chat?: Chat; get chat(): Chat { return (this._chat ??= new Chat(this._options)); diff --git a/tests/e2e/models.test.ts b/tests/e2e/models.test.ts index 9c2e2978..6c7d3fe8 100644 --- a/tests/e2e/models.test.ts +++ b/tests/e2e/models.test.ts @@ -30,21 +30,14 @@ describe("Models E2E Tests", () => { it("should return models with expected properties", async () => { const response = await client.models.list(); - const firstModel = response?.[0]; + const firstModel = response.data[0]; expect(firstModel).toBeDefined(); expect(firstModel?.id).toBeDefined(); expect(typeof firstModel?.id).toBe("string"); expect(firstModel?.name).toBeDefined(); }); - it("should support filtering by category", async () => { - const response = await client.models.list({ - category: "text", - }); - expect(response).toBeDefined(); - expect(Array.isArray(response)).toBe(true); - }); }); describe("models.count()", () => { diff --git a/vitest.config.ts b/vitest.config.ts index c612fb10..661cfcd9 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,10 +1,17 @@ +import { config } from "dotenv"; import { defineConfig } from "vitest/config"; +// Load environment variables from .env file +config(); + export default defineConfig({ test: { globals: true, environment: "node", - testMatch: ["**/*.test.ts"], + env: { + OPENROUTER_API_KEY: process.env.OPENROUTER_API_KEY || "", + }, + include: ["tests/**/*.test.ts"], hookTimeout: 30000, testTimeout: 30000, },