@openrouter/sdk 0.5.1 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +5 -1
- package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +4 -2
- package/esm/funcs/apiKeysCreate.d.ts +1 -1
- package/esm/funcs/apiKeysCreate.js +5 -3
- package/esm/funcs/apiKeysDelete.d.ts +1 -1
- package/esm/funcs/apiKeysDelete.js +3 -1
- package/esm/funcs/apiKeysGet.d.ts +1 -1
- package/esm/funcs/apiKeysGet.js +3 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +14 -3
- package/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +4 -2
- package/esm/funcs/apiKeysUpdate.d.ts +1 -1
- package/esm/funcs/apiKeysUpdate.js +3 -1
- package/esm/funcs/betaResponsesSend.d.ts +9 -5
- package/esm/funcs/betaResponsesSend.js +10 -5
- package/esm/funcs/chatSend.d.ts +11 -7
- package/esm/funcs/chatSend.js +28 -7
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -2
- package/esm/funcs/creditsCreateCoinbaseCharge.js +7 -4
- package/esm/funcs/creditsGetCredits.d.ts +2 -2
- package/esm/funcs/creditsGetCredits.js +15 -4
- package/esm/funcs/embeddingsGenerate.js +4 -2
- package/esm/funcs/embeddingsListModels.d.ts +2 -1
- package/esm/funcs/embeddingsListModels.js +15 -3
- package/esm/funcs/endpointsList.js +2 -0
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +1 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +14 -3
- package/esm/funcs/generationsGetGeneration.js +3 -1
- package/esm/funcs/guardrailsBulkAssignKeys.d.ts +1 -1
- package/esm/funcs/guardrailsBulkAssignKeys.js +3 -1
- package/esm/funcs/guardrailsBulkAssignMembers.d.ts +1 -1
- package/esm/funcs/guardrailsBulkAssignMembers.js +3 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +1 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.js +3 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +1 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.js +3 -1
- package/esm/funcs/guardrailsCreate.d.ts +1 -1
- package/esm/funcs/guardrailsCreate.js +5 -3
- package/esm/funcs/guardrailsDelete.d.ts +1 -1
- package/esm/funcs/guardrailsDelete.js +3 -1
- package/esm/funcs/guardrailsGet.d.ts +1 -1
- package/esm/funcs/guardrailsGet.js +3 -1
- package/esm/funcs/guardrailsList.d.ts +1 -1
- package/esm/funcs/guardrailsList.js +4 -2
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +3 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +3 -1
- package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +4 -2
- package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +4 -2
- package/esm/funcs/guardrailsUpdate.d.ts +1 -1
- package/esm/funcs/guardrailsUpdate.js +3 -1
- package/esm/funcs/modelsCount.d.ts +2 -1
- package/esm/funcs/modelsCount.js +15 -3
- package/esm/funcs/modelsList.js +3 -1
- package/esm/funcs/modelsListForUser.d.ts +1 -1
- package/esm/funcs/modelsListForUser.js +15 -3
- package/esm/funcs/oAuthCreateAuthCode.js +4 -2
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +4 -2
- package/esm/funcs/providersList.d.ts +1 -1
- package/esm/funcs/providersList.js +14 -3
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/model-result.d.ts +3 -5
- package/esm/lib/model-result.js +98 -46
- package/esm/models/assistantmessage.d.ts +47 -36
- package/esm/models/assistantmessage.js +35 -47
- package/esm/models/assistantmessageimages.d.ts +33 -0
- package/esm/models/assistantmessageimages.js +44 -0
- package/esm/models/chatgenerationparams.d.ts +318 -182
- package/esm/models/chatgenerationparams.js +157 -143
- package/esm/models/chatgenerationtokenusage.d.ts +48 -0
- package/esm/models/chatmessagecontentitem.d.ts +15 -10
- package/esm/models/chatmessagecontentitem.js +25 -4
- package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
- package/esm/models/chatmessagecontentitemaudio.js +9 -2
- package/esm/models/chatmessagecontentitemcachecontrol.d.ts +14 -3
- package/esm/models/chatmessagecontentitemcachecontrol.js +9 -2
- package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
- package/esm/models/chatmessagecontentitemimage.js +12 -2
- package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
- package/esm/models/chatmessagecontentitemtext.js +9 -2
- package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
- package/esm/models/chatmessagecontentitemvideo.js +5 -72
- package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
- package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +9 -0
- package/esm/models/chatmessagetoolcall.d.ts +23 -2
- package/esm/models/chatmessagetoolcall.js +9 -2
- package/esm/models/chatresponse.d.ts +29 -1
- package/esm/models/chatresponse.js +6 -1
- package/esm/models/chatresponsechoice.d.ts +13 -2
- package/esm/models/chatresponsechoice.js +1 -2
- package/esm/models/chatstreamingchoice.d.ts +13 -2
- package/esm/models/chatstreamingchoice.js +1 -2
- package/esm/models/chatstreamingmessagechunk.d.ts +29 -2
- package/esm/models/chatstreamingmessagechunk.js +5 -2
- package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
- package/esm/models/chatstreamingmessagetoolcall.js +9 -1
- package/esm/models/chatstreamingresponsechunk.d.ts +45 -11
- package/esm/models/chatstreamingresponsechunk.js +11 -25
- package/esm/models/chatstreamoptions.d.ts +8 -0
- package/esm/models/debugoptions.d.ts +18 -0
- package/esm/models/debugoptions.js +18 -0
- package/esm/models/developermessage.d.ts +35 -0
- package/esm/models/developermessage.js +24 -0
- package/esm/models/errors/index.d.ts +0 -1
- package/esm/models/errors/index.js +0 -1
- package/esm/models/index.d.ts +13 -5
- package/esm/models/index.js +13 -5
- package/esm/models/jsonschemaconfig.d.ts +17 -2
- package/esm/models/jsonschemaconfig.js +1 -1
- package/esm/models/message.d.ts +10 -23
- package/esm/models/message.js +3 -20
- package/esm/models/modelscountresponse.d.ts +4 -4
- package/esm/models/modelscountresponse.js +4 -4
- package/esm/models/namedtoolchoice.d.ts +15 -2
- package/esm/models/namedtoolchoice.js +6 -1
- package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
- package/esm/models/openairesponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesnonstreamingresponse.d.ts +4 -4
- package/esm/models/openresponsesnonstreamingresponse.js +3 -3
- package/esm/models/openresponsesreasoning.d.ts +2 -2
- package/esm/models/openresponsesreasoning.js +1 -1
- package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
- package/esm/models/openresponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesrequest.d.ts +31 -13
- package/esm/models/openresponsesrequest.js +25 -0
- package/esm/models/operations/bulkassignkeystoguardrail.d.ts +30 -0
- package/esm/models/operations/bulkassignkeystoguardrail.js +4 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +30 -0
- package/esm/models/operations/bulkassignmemberstoguardrail.js +4 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +30 -0
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +4 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +30 -0
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +4 -0
- package/esm/models/operations/createauthkeyscode.d.ts +66 -2
- package/esm/models/operations/createauthkeyscode.js +30 -1
- package/esm/models/operations/createcoinbasecharge.d.ts +41 -0
- package/esm/models/operations/createcoinbasecharge.js +16 -0
- package/esm/models/operations/createembeddings.d.ts +42 -2
- package/esm/models/operations/createembeddings.js +16 -1
- package/esm/models/operations/createguardrail.d.ts +42 -2
- package/esm/models/operations/createguardrail.js +16 -1
- package/esm/models/operations/createkeys.d.ts +42 -2
- package/esm/models/operations/createkeys.js +16 -1
- package/esm/models/operations/createresponses.d.ts +40 -0
- package/esm/models/operations/createresponses.js +16 -0
- package/esm/models/operations/deleteguardrail.d.ts +30 -0
- package/esm/models/operations/deleteguardrail.js +8 -0
- package/esm/models/operations/deletekeys.d.ts +30 -0
- package/esm/models/operations/deletekeys.js +8 -0
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +42 -2
- package/esm/models/operations/exchangeauthcodeforapikey.js +16 -1
- package/esm/models/operations/getcredits.d.ts +38 -0
- package/esm/models/operations/getcredits.js +13 -0
- package/esm/models/operations/getcurrentkey.d.ts +45 -1
- package/esm/models/operations/getcurrentkey.js +15 -0
- package/esm/models/operations/getgeneration.d.ts +153 -0
- package/esm/models/operations/getgeneration.js +135 -0
- package/esm/models/operations/getguardrail.d.ts +30 -0
- package/esm/models/operations/getguardrail.js +7 -0
- package/esm/models/operations/getkey.d.ts +30 -0
- package/esm/models/operations/getkey.js +7 -0
- package/esm/models/operations/getmodels.d.ts +30 -0
- package/esm/models/operations/getmodels.js +4 -0
- package/esm/models/operations/getuseractivity.d.ts +30 -0
- package/esm/models/operations/getuseractivity.js +8 -0
- package/esm/models/operations/index.d.ts +2 -0
- package/esm/models/operations/index.js +2 -0
- package/esm/models/operations/list.d.ts +30 -0
- package/esm/models/operations/list.js +4 -0
- package/esm/models/operations/listembeddingsmodels.d.ts +40 -0
- package/esm/models/operations/listembeddingsmodels.js +20 -0
- package/esm/models/operations/listendpoints.d.ts +30 -0
- package/esm/models/operations/listendpoints.js +8 -0
- package/esm/models/operations/listendpointszdr.d.ts +38 -0
- package/esm/models/operations/listendpointszdr.js +14 -0
- package/esm/models/operations/listguardrailkeyassignments.d.ts +30 -0
- package/esm/models/operations/listguardrailkeyassignments.js +7 -0
- package/esm/models/operations/listguardrailmemberassignments.d.ts +30 -0
- package/esm/models/operations/listguardrailmemberassignments.js +7 -0
- package/esm/models/operations/listguardrails.d.ts +30 -0
- package/esm/models/operations/listguardrails.js +7 -0
- package/esm/models/operations/listkeyassignments.d.ts +30 -0
- package/esm/models/operations/listkeyassignments.js +7 -0
- package/esm/models/operations/listmemberassignments.d.ts +30 -0
- package/esm/models/operations/listmemberassignments.js +7 -0
- package/esm/models/operations/listmodelscount.d.ts +40 -0
- package/esm/models/operations/listmodelscount.js +20 -0
- package/esm/models/operations/listmodelsuser.d.ts +38 -0
- package/esm/models/operations/listmodelsuser.js +14 -0
- package/esm/models/operations/listproviders.d.ts +38 -0
- package/esm/models/operations/listproviders.js +13 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +53 -1
- package/esm/models/operations/sendchatcompletionrequest.js +36 -2
- package/esm/models/operations/updateguardrail.d.ts +30 -0
- package/esm/models/operations/updateguardrail.js +4 -0
- package/esm/models/operations/updatekeys.d.ts +30 -0
- package/esm/models/operations/updatekeys.js +4 -0
- package/esm/models/providername.d.ts +4 -0
- package/esm/models/providername.js +4 -0
- package/esm/models/providerpreferences.d.ts +46 -27
- package/esm/models/providerpreferences.js +29 -15
- package/esm/models/providersort.d.ts +6 -0
- package/esm/models/providersort.js +3 -0
- package/esm/models/providersortconfig.d.ts +30 -2
- package/esm/models/providersortconfig.js +15 -2
- package/esm/models/publicendpoint.d.ts +0 -39
- package/esm/models/publicpricing.d.ts +0 -39
- package/esm/models/reasoningdetailencrypted.d.ts +42 -0
- package/esm/models/reasoningdetailencrypted.js +42 -0
- package/esm/models/reasoningdetailsummary.d.ts +42 -0
- package/esm/models/reasoningdetailsummary.js +42 -0
- package/esm/models/reasoningdetailtext.d.ts +44 -0
- package/esm/models/reasoningdetailtext.js +44 -0
- package/esm/models/reasoningdetailunion.d.ts +19 -0
- package/esm/models/reasoningdetailunion.js +28 -0
- package/esm/models/responseformatjsonobject.d.ts +20 -0
- package/esm/models/responseformatjsonobject.js +21 -0
- package/esm/models/responseformatjsonschema.d.ts +6 -0
- package/esm/models/responseformattext.d.ts +15 -0
- package/esm/models/responseformattext.js +13 -0
- package/esm/models/responseformattextconfig.d.ts +3 -3
- package/esm/models/responseformattextconfig.js +3 -3
- package/esm/models/responseformattextgrammar.d.ts +6 -0
- package/esm/models/responseformattextpython.d.ts +15 -0
- package/esm/models/responseformattextpython.js +13 -0
- package/esm/models/responseserrorfield.d.ts +4 -4
- package/esm/models/responseserrorfield.js +4 -4
- package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
- package/esm/models/responsesoutputitemreasoning.js +2 -2
- package/esm/models/systemmessage.d.ts +12 -0
- package/esm/models/toolchoiceoption.d.ts +31 -0
- package/esm/models/toolchoiceoption.js +32 -0
- package/esm/models/tooldefinitionjson.d.ts +38 -4
- package/esm/models/tooldefinitionjson.js +14 -2
- package/esm/models/toolresponsemessage.d.ts +12 -0
- package/esm/models/usermessage.d.ts +12 -0
- package/esm/models/videoinput.d.ts +23 -0
- package/esm/models/videoinput.js +22 -0
- package/esm/sdk/analytics.d.ts +1 -1
- package/esm/sdk/analytics.js +1 -1
- package/esm/sdk/apikeys.d.ts +6 -6
- package/esm/sdk/apikeys.js +7 -7
- package/esm/sdk/chat.d.ts +10 -6
- package/esm/sdk/credits.d.ts +3 -4
- package/esm/sdk/credits.js +3 -3
- package/esm/sdk/embeddings.d.ts +1 -1
- package/esm/sdk/embeddings.js +2 -2
- package/esm/sdk/endpoints.d.ts +1 -1
- package/esm/sdk/endpoints.js +2 -2
- package/esm/sdk/guardrails.d.ts +13 -13
- package/esm/sdk/guardrails.js +13 -13
- package/esm/sdk/models.d.ts +2 -2
- package/esm/sdk/models.js +4 -4
- package/esm/sdk/providers.d.ts +1 -1
- package/esm/sdk/providers.js +2 -2
- package/esm/sdk/responses.d.ts +9 -5
- package/esm/sdk/sdk.d.ts +2 -2
- package/esm/sdk/sdk.js +3 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/chaterror.d.ts +0 -17
- package/esm/models/chaterror.js +0 -25
- package/esm/models/errors/chaterror.d.ts +0 -19
- package/esm/models/errors/chaterror.js +0 -32
- package/esm/models/providersortunion.d.ts +0 -10
- package/esm/models/providersortunion.js +0 -13
- package/esm/models/responsesformatjsonobject.d.ts +0 -20
- package/esm/models/responsesformatjsonobject.js +0 -21
- package/esm/models/schema0.d.ts +0 -84
- package/esm/models/schema0.js +0 -87
- package/esm/models/schema2.d.ts +0 -92
- package/esm/models/schema2.js +0 -109
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Python code response format
|
|
4
|
+
*/
|
|
5
|
+
export type ResponseFormatTextPython = {
|
|
6
|
+
type: "python";
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export type ResponseFormatTextPython$Outbound = {
|
|
10
|
+
type: "python";
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ResponseFormatTextPython$outboundSchema: z.ZodType<ResponseFormatTextPython$Outbound, ResponseFormatTextPython>;
|
|
14
|
+
export declare function responseFormatTextPythonToJSON(responseFormatTextPython: ResponseFormatTextPython): string;
|
|
15
|
+
//# sourceMappingURL=responseformattextpython.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 186678f4d07c
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ResponseFormatTextPython$outboundSchema = z.object({
|
|
8
|
+
type: z.literal("python"),
|
|
9
|
+
});
|
|
10
|
+
export function responseFormatTextPythonToJSON(responseFormatTextPython) {
|
|
11
|
+
return JSON.stringify(ResponseFormatTextPython$outboundSchema.parse(responseFormatTextPython));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=responseformattextpython.js.map
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const Code: {
|
|
6
6
|
readonly ServerError: "server_error";
|
|
7
7
|
readonly RateLimitExceeded: "rate_limit_exceeded";
|
|
8
8
|
readonly InvalidPrompt: "invalid_prompt";
|
|
@@ -22,16 +22,16 @@ export declare const CodeEnum: {
|
|
|
22
22
|
readonly FailedToDownloadImage: "failed_to_download_image";
|
|
23
23
|
readonly ImageFileNotFound: "image_file_not_found";
|
|
24
24
|
};
|
|
25
|
-
export type
|
|
25
|
+
export type Code = OpenEnum<typeof Code>;
|
|
26
26
|
/**
|
|
27
27
|
* Error information returned from the API
|
|
28
28
|
*/
|
|
29
29
|
export type ResponsesErrorField = {
|
|
30
|
-
code:
|
|
30
|
+
code: Code;
|
|
31
31
|
message: string;
|
|
32
32
|
};
|
|
33
33
|
/** @internal */
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const Code$inboundSchema: z.ZodType<Code, unknown>;
|
|
35
35
|
/** @internal */
|
|
36
36
|
export declare const ResponsesErrorField$inboundSchema: z.ZodType<ResponsesErrorField, unknown>;
|
|
37
37
|
export declare function responsesErrorFieldFromJSON(jsonString: string): SafeParseResult<ResponsesErrorField, SDKValidationError>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
|
-
export const
|
|
8
|
+
export const Code = {
|
|
9
9
|
ServerError: "server_error",
|
|
10
10
|
RateLimitExceeded: "rate_limit_exceeded",
|
|
11
11
|
InvalidPrompt: "invalid_prompt",
|
|
@@ -26,11 +26,11 @@ export const CodeEnum = {
|
|
|
26
26
|
ImageFileNotFound: "image_file_not_found",
|
|
27
27
|
};
|
|
28
28
|
/** @internal */
|
|
29
|
-
export const
|
|
30
|
-
.inboundSchema(
|
|
29
|
+
export const Code$inboundSchema = openEnums
|
|
30
|
+
.inboundSchema(Code);
|
|
31
31
|
/** @internal */
|
|
32
32
|
export const ResponsesErrorField$inboundSchema = z.object({
|
|
33
|
-
code:
|
|
33
|
+
code: Code$inboundSchema,
|
|
34
34
|
message: z.string(),
|
|
35
35
|
});
|
|
36
36
|
export function responsesErrorFieldFromJSON(jsonString) {
|
|
@@ -42,7 +42,7 @@ export type ResponsesOutputItemReasoningFormat = OpenEnum<typeof ResponsesOutput
|
|
|
42
42
|
export type ResponsesOutputItemReasoning = {
|
|
43
43
|
type: ResponsesOutputItemReasoningType;
|
|
44
44
|
id: string;
|
|
45
|
-
content?: Array<ReasoningTextContent> | undefined;
|
|
45
|
+
content?: Array<ReasoningTextContent> | null | undefined;
|
|
46
46
|
summary: Array<ReasoningSummaryText>;
|
|
47
47
|
encryptedContent?: string | null | undefined;
|
|
48
48
|
status?: ResponsesOutputItemReasoningStatusCompleted | ResponsesOutputItemReasoningStatusIncomplete | ResponsesOutputItemReasoningStatusInProgress | undefined;
|
|
@@ -89,7 +89,7 @@ export declare const ResponsesOutputItemReasoning$inboundSchema: z.ZodType<Respo
|
|
|
89
89
|
export type ResponsesOutputItemReasoning$Outbound = {
|
|
90
90
|
type: string;
|
|
91
91
|
id: string;
|
|
92
|
-
content?: Array<ReasoningTextContent$Outbound> | undefined;
|
|
92
|
+
content?: Array<ReasoningTextContent$Outbound> | null | undefined;
|
|
93
93
|
summary: Array<ReasoningSummaryText$Outbound>;
|
|
94
94
|
encrypted_content?: string | null | undefined;
|
|
95
95
|
status?: string | string | string | undefined;
|
|
@@ -73,7 +73,7 @@ export const ResponsesOutputItemReasoningFormat$outboundSchema = openEnums.outbo
|
|
|
73
73
|
export const ResponsesOutputItemReasoning$inboundSchema = z.object({
|
|
74
74
|
type: ResponsesOutputItemReasoningType$inboundSchema,
|
|
75
75
|
id: z.string(),
|
|
76
|
-
content: z.array(ReasoningTextContent$inboundSchema).optional(),
|
|
76
|
+
content: z.nullable(z.array(ReasoningTextContent$inboundSchema)).optional(),
|
|
77
77
|
summary: z.array(ReasoningSummaryText$inboundSchema),
|
|
78
78
|
encrypted_content: z.nullable(z.string()).optional(),
|
|
79
79
|
status: z.union([
|
|
@@ -93,7 +93,7 @@ export const ResponsesOutputItemReasoning$inboundSchema = z.object({
|
|
|
93
93
|
export const ResponsesOutputItemReasoning$outboundSchema = z.object({
|
|
94
94
|
type: ResponsesOutputItemReasoningType$outboundSchema,
|
|
95
95
|
id: z.string(),
|
|
96
|
-
content: z.array(ReasoningTextContent$outboundSchema).optional(),
|
|
96
|
+
content: z.nullable(z.array(ReasoningTextContent$outboundSchema)).optional(),
|
|
97
97
|
summary: z.array(ReasoningSummaryText$outboundSchema),
|
|
98
98
|
encryptedContent: z.nullable(z.string()).optional(),
|
|
99
99
|
status: z.union([
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ChatMessageContentItemText, ChatMessageContentItemText$Outbound } from "./chatmessagecontentitemtext.js";
|
|
3
|
+
/**
|
|
4
|
+
* System message content
|
|
5
|
+
*/
|
|
3
6
|
export type SystemMessageContent = string | Array<ChatMessageContentItemText>;
|
|
7
|
+
/**
|
|
8
|
+
* System message for setting behavior
|
|
9
|
+
*/
|
|
4
10
|
export type SystemMessage = {
|
|
5
11
|
role: "system";
|
|
12
|
+
/**
|
|
13
|
+
* System message content
|
|
14
|
+
*/
|
|
6
15
|
content: string | Array<ChatMessageContentItemText>;
|
|
16
|
+
/**
|
|
17
|
+
* Optional name for the system message
|
|
18
|
+
*/
|
|
7
19
|
name?: string | undefined;
|
|
8
20
|
};
|
|
9
21
|
/** @internal */
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { NamedToolChoice, NamedToolChoice$Outbound } from "./namedtoolchoice.js";
|
|
4
|
+
export declare const ToolChoiceOptionRequired: {
|
|
5
|
+
readonly Required: "required";
|
|
6
|
+
};
|
|
7
|
+
export type ToolChoiceOptionRequired = ClosedEnum<typeof ToolChoiceOptionRequired>;
|
|
8
|
+
export declare const ToolChoiceOptionAuto: {
|
|
9
|
+
readonly Auto: "auto";
|
|
10
|
+
};
|
|
11
|
+
export type ToolChoiceOptionAuto = ClosedEnum<typeof ToolChoiceOptionAuto>;
|
|
12
|
+
export declare const ToolChoiceOptionNone: {
|
|
13
|
+
readonly None: "none";
|
|
14
|
+
};
|
|
15
|
+
export type ToolChoiceOptionNone = ClosedEnum<typeof ToolChoiceOptionNone>;
|
|
16
|
+
/**
|
|
17
|
+
* Tool choice configuration
|
|
18
|
+
*/
|
|
19
|
+
export type ToolChoiceOption = NamedToolChoice | ToolChoiceOptionNone | ToolChoiceOptionAuto | ToolChoiceOptionRequired;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const ToolChoiceOptionRequired$outboundSchema: z.ZodEnum<typeof ToolChoiceOptionRequired>;
|
|
22
|
+
/** @internal */
|
|
23
|
+
export declare const ToolChoiceOptionAuto$outboundSchema: z.ZodEnum<typeof ToolChoiceOptionAuto>;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const ToolChoiceOptionNone$outboundSchema: z.ZodEnum<typeof ToolChoiceOptionNone>;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ToolChoiceOption$Outbound = NamedToolChoice$Outbound | string | string | string;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const ToolChoiceOption$outboundSchema: z.ZodType<ToolChoiceOption$Outbound, ToolChoiceOption>;
|
|
30
|
+
export declare function toolChoiceOptionToJSON(toolChoiceOption: ToolChoiceOption): string;
|
|
31
|
+
//# sourceMappingURL=toolchoiceoption.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d767ca0ded82
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { NamedToolChoice$outboundSchema, } from "./namedtoolchoice.js";
|
|
7
|
+
export const ToolChoiceOptionRequired = {
|
|
8
|
+
Required: "required",
|
|
9
|
+
};
|
|
10
|
+
export const ToolChoiceOptionAuto = {
|
|
11
|
+
Auto: "auto",
|
|
12
|
+
};
|
|
13
|
+
export const ToolChoiceOptionNone = {
|
|
14
|
+
None: "none",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ToolChoiceOptionRequired$outboundSchema = z.enum(ToolChoiceOptionRequired);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ToolChoiceOptionAuto$outboundSchema = z.enum(ToolChoiceOptionAuto);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ToolChoiceOptionNone$outboundSchema = z.enum(ToolChoiceOptionNone);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const ToolChoiceOption$outboundSchema = z.union([
|
|
24
|
+
NamedToolChoice$outboundSchema,
|
|
25
|
+
ToolChoiceOptionNone$outboundSchema,
|
|
26
|
+
ToolChoiceOptionAuto$outboundSchema,
|
|
27
|
+
ToolChoiceOptionRequired$outboundSchema,
|
|
28
|
+
]);
|
|
29
|
+
export function toolChoiceOptionToJSON(toolChoiceOption) {
|
|
30
|
+
return JSON.stringify(ToolChoiceOption$outboundSchema.parse(toolChoiceOption));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=toolchoiceoption.js.map
|
|
@@ -1,22 +1,55 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { ChatMessageContentItemCacheControl, ChatMessageContentItemCacheControl$Outbound } from "./chatmessagecontentitemcachecontrol.js";
|
|
4
|
+
export declare const ToolDefinitionJsonType: {
|
|
5
|
+
readonly Function: "function";
|
|
6
|
+
};
|
|
7
|
+
export type ToolDefinitionJsonType = ClosedEnum<typeof ToolDefinitionJsonType>;
|
|
8
|
+
/**
|
|
9
|
+
* Function definition for tool calling
|
|
10
|
+
*/
|
|
2
11
|
export type ToolDefinitionJsonFunction = {
|
|
12
|
+
/**
|
|
13
|
+
* Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars)
|
|
14
|
+
*/
|
|
3
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Function description for the model
|
|
18
|
+
*/
|
|
4
19
|
description?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Function parameters as JSON Schema object
|
|
22
|
+
*/
|
|
5
23
|
parameters?: {
|
|
6
|
-
[k: string]: any;
|
|
24
|
+
[k: string]: any | null;
|
|
7
25
|
} | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Enable strict schema adherence
|
|
28
|
+
*/
|
|
8
29
|
strict?: boolean | null | undefined;
|
|
9
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Tool definition for function calling
|
|
33
|
+
*/
|
|
10
34
|
export type ToolDefinitionJson = {
|
|
11
|
-
type:
|
|
35
|
+
type: ToolDefinitionJsonType;
|
|
36
|
+
/**
|
|
37
|
+
* Function definition for tool calling
|
|
38
|
+
*/
|
|
12
39
|
function: ToolDefinitionJsonFunction;
|
|
40
|
+
/**
|
|
41
|
+
* Cache control for the content part
|
|
42
|
+
*/
|
|
43
|
+
cacheControl?: ChatMessageContentItemCacheControl | undefined;
|
|
13
44
|
};
|
|
14
45
|
/** @internal */
|
|
46
|
+
export declare const ToolDefinitionJsonType$outboundSchema: z.ZodEnum<typeof ToolDefinitionJsonType>;
|
|
47
|
+
/** @internal */
|
|
15
48
|
export type ToolDefinitionJsonFunction$Outbound = {
|
|
16
49
|
name: string;
|
|
17
50
|
description?: string | undefined;
|
|
18
51
|
parameters?: {
|
|
19
|
-
[k: string]: any;
|
|
52
|
+
[k: string]: any | null;
|
|
20
53
|
} | undefined;
|
|
21
54
|
strict?: boolean | null | undefined;
|
|
22
55
|
};
|
|
@@ -25,8 +58,9 @@ export declare const ToolDefinitionJsonFunction$outboundSchema: z.ZodType<ToolDe
|
|
|
25
58
|
export declare function toolDefinitionJsonFunctionToJSON(toolDefinitionJsonFunction: ToolDefinitionJsonFunction): string;
|
|
26
59
|
/** @internal */
|
|
27
60
|
export type ToolDefinitionJson$Outbound = {
|
|
28
|
-
type:
|
|
61
|
+
type: string;
|
|
29
62
|
function: ToolDefinitionJsonFunction$Outbound;
|
|
63
|
+
cache_control?: ChatMessageContentItemCacheControl$Outbound | undefined;
|
|
30
64
|
};
|
|
31
65
|
/** @internal */
|
|
32
66
|
export declare const ToolDefinitionJson$outboundSchema: z.ZodType<ToolDefinitionJson$Outbound, ToolDefinitionJson>;
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
* @generated-id: 546c340f3013
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { ChatMessageContentItemCacheControl$outboundSchema, } from "./chatmessagecontentitemcachecontrol.js";
|
|
8
|
+
export const ToolDefinitionJsonType = {
|
|
9
|
+
Function: "function",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ToolDefinitionJsonType$outboundSchema = z.enum(ToolDefinitionJsonType);
|
|
6
13
|
/** @internal */
|
|
7
14
|
export const ToolDefinitionJsonFunction$outboundSchema = z.object({
|
|
8
15
|
name: z.string(),
|
|
9
16
|
description: z.string().optional(),
|
|
10
|
-
parameters: z.record(z.string(), z.any()).optional(),
|
|
17
|
+
parameters: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
11
18
|
strict: z.nullable(z.boolean()).optional(),
|
|
12
19
|
});
|
|
13
20
|
export function toolDefinitionJsonFunctionToJSON(toolDefinitionJsonFunction) {
|
|
@@ -15,8 +22,13 @@ export function toolDefinitionJsonFunctionToJSON(toolDefinitionJsonFunction) {
|
|
|
15
22
|
}
|
|
16
23
|
/** @internal */
|
|
17
24
|
export const ToolDefinitionJson$outboundSchema = z.object({
|
|
18
|
-
type:
|
|
25
|
+
type: ToolDefinitionJsonType$outboundSchema,
|
|
19
26
|
function: z.lazy(() => ToolDefinitionJsonFunction$outboundSchema),
|
|
27
|
+
cacheControl: ChatMessageContentItemCacheControl$outboundSchema.optional(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
cacheControl: "cache_control",
|
|
31
|
+
});
|
|
20
32
|
});
|
|
21
33
|
export function toolDefinitionJsonToJSON(toolDefinitionJson) {
|
|
22
34
|
return JSON.stringify(ToolDefinitionJson$outboundSchema.parse(toolDefinitionJson));
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ChatMessageContentItem, ChatMessageContentItem$Outbound } from "./chatmessagecontentitem.js";
|
|
3
|
+
/**
|
|
4
|
+
* Tool response content
|
|
5
|
+
*/
|
|
3
6
|
export type ToolResponseMessageContent = string | Array<ChatMessageContentItem>;
|
|
7
|
+
/**
|
|
8
|
+
* Tool response message
|
|
9
|
+
*/
|
|
4
10
|
export type ToolResponseMessage = {
|
|
5
11
|
role: "tool";
|
|
12
|
+
/**
|
|
13
|
+
* Tool response content
|
|
14
|
+
*/
|
|
6
15
|
content: string | Array<ChatMessageContentItem>;
|
|
16
|
+
/**
|
|
17
|
+
* ID of the assistant message tool call this message responds to
|
|
18
|
+
*/
|
|
7
19
|
toolCallId: string;
|
|
8
20
|
};
|
|
9
21
|
/** @internal */
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ChatMessageContentItem, ChatMessageContentItem$Outbound } from "./chatmessagecontentitem.js";
|
|
3
|
+
/**
|
|
4
|
+
* User message content
|
|
5
|
+
*/
|
|
3
6
|
export type UserMessageContent = string | Array<ChatMessageContentItem>;
|
|
7
|
+
/**
|
|
8
|
+
* User message
|
|
9
|
+
*/
|
|
4
10
|
export type UserMessage = {
|
|
5
11
|
role: "user";
|
|
12
|
+
/**
|
|
13
|
+
* User message content
|
|
14
|
+
*/
|
|
6
15
|
content: string | Array<ChatMessageContentItem>;
|
|
16
|
+
/**
|
|
17
|
+
* Optional name for the user
|
|
18
|
+
*/
|
|
7
19
|
name?: string | undefined;
|
|
8
20
|
};
|
|
9
21
|
/** @internal */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Video input object
|
|
6
|
+
*/
|
|
7
|
+
export type VideoInput = {
|
|
8
|
+
/**
|
|
9
|
+
* URL of the video (data: URLs supported)
|
|
10
|
+
*/
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const VideoInput$inboundSchema: z.ZodType<VideoInput, unknown>;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type VideoInput$Outbound = {
|
|
17
|
+
url: string;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const VideoInput$outboundSchema: z.ZodType<VideoInput$Outbound, VideoInput>;
|
|
21
|
+
export declare function videoInputToJSON(videoInput: VideoInput): string;
|
|
22
|
+
export declare function videoInputFromJSON(jsonString: string): SafeParseResult<VideoInput, SDKValidationError>;
|
|
23
|
+
//# sourceMappingURL=videoinput.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: c9307d9d04a6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const VideoInput$inboundSchema = z
|
|
9
|
+
.object({
|
|
10
|
+
url: z.string(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const VideoInput$outboundSchema = z.object({
|
|
14
|
+
url: z.string(),
|
|
15
|
+
});
|
|
16
|
+
export function videoInputToJSON(videoInput) {
|
|
17
|
+
return JSON.stringify(VideoInput$outboundSchema.parse(videoInput));
|
|
18
|
+
}
|
|
19
|
+
export function videoInputFromJSON(jsonString) {
|
|
20
|
+
return safeParse(jsonString, (x) => VideoInput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VideoInput' from JSON`);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=videoinput.js.map
|
package/esm/sdk/analytics.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare class Analytics extends ClientSDK {
|
|
|
5
5
|
* Get user activity grouped by endpoint
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [
|
|
8
|
+
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
9
9
|
*/
|
|
10
10
|
getUserActivity(request?: operations.GetUserActivityRequest | undefined, options?: RequestOptions): Promise<operations.GetUserActivityResponse>;
|
|
11
11
|
}
|
package/esm/sdk/analytics.js
CHANGED
|
@@ -10,7 +10,7 @@ export class Analytics extends ClientSDK {
|
|
|
10
10
|
* Get user activity grouped by endpoint
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
|
-
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [
|
|
13
|
+
* Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
14
14
|
*/
|
|
15
15
|
async getUserActivity(request, options) {
|
|
16
16
|
return unwrapAsync(analyticsGetUserActivity(this, request, options));
|
package/esm/sdk/apikeys.d.ts
CHANGED
|
@@ -5,35 +5,35 @@ export declare class APIKeys extends ClientSDK {
|
|
|
5
5
|
* List API keys
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* List all API keys for the authenticated user. [
|
|
8
|
+
* List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
9
9
|
*/
|
|
10
10
|
list(request?: operations.ListRequest | undefined, options?: RequestOptions): Promise<operations.ListResponse>;
|
|
11
11
|
/**
|
|
12
12
|
* Create a new API key
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Create a new API key for the authenticated user. [
|
|
15
|
+
* Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
16
|
*/
|
|
17
17
|
create(request: operations.CreateKeysRequest, options?: RequestOptions): Promise<operations.CreateKeysResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* Update an API key
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Update an existing API key. [
|
|
22
|
+
* Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
23
23
|
*/
|
|
24
24
|
update(request: operations.UpdateKeysRequest, options?: RequestOptions): Promise<operations.UpdateKeysResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Delete an API key
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Delete an existing API key. [
|
|
29
|
+
* Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
30
30
|
*/
|
|
31
31
|
delete(request: operations.DeleteKeysRequest, options?: RequestOptions): Promise<operations.DeleteKeysResponse>;
|
|
32
32
|
/**
|
|
33
33
|
* Get a single API key
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Get a single API key by hash. [
|
|
36
|
+
* Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
37
37
|
*/
|
|
38
38
|
get(request: operations.GetKeyRequest, options?: RequestOptions): Promise<operations.GetKeyResponse>;
|
|
39
39
|
/**
|
|
@@ -42,6 +42,6 @@ export declare class APIKeys extends ClientSDK {
|
|
|
42
42
|
* @remarks
|
|
43
43
|
* Get information on the API key associated with the current authentication session
|
|
44
44
|
*/
|
|
45
|
-
getCurrentKeyMetadata(options?: RequestOptions): Promise<operations.GetCurrentKeyResponse>;
|
|
45
|
+
getCurrentKeyMetadata(request?: operations.GetCurrentKeyRequest | undefined, options?: RequestOptions): Promise<operations.GetCurrentKeyResponse>;
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=apikeys.d.ts.map
|
package/esm/sdk/apikeys.js
CHANGED
|
@@ -15,7 +15,7 @@ export class APIKeys extends ClientSDK {
|
|
|
15
15
|
* List API keys
|
|
16
16
|
*
|
|
17
17
|
* @remarks
|
|
18
|
-
* List all API keys for the authenticated user. [
|
|
18
|
+
* List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
19
19
|
*/
|
|
20
20
|
async list(request, options) {
|
|
21
21
|
return unwrapAsync(apiKeysList(this, request, options));
|
|
@@ -24,7 +24,7 @@ export class APIKeys extends ClientSDK {
|
|
|
24
24
|
* Create a new API key
|
|
25
25
|
*
|
|
26
26
|
* @remarks
|
|
27
|
-
* Create a new API key for the authenticated user. [
|
|
27
|
+
* Create a new API key for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
28
28
|
*/
|
|
29
29
|
async create(request, options) {
|
|
30
30
|
return unwrapAsync(apiKeysCreate(this, request, options));
|
|
@@ -33,7 +33,7 @@ export class APIKeys extends ClientSDK {
|
|
|
33
33
|
* Update an API key
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Update an existing API key. [
|
|
36
|
+
* Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
37
37
|
*/
|
|
38
38
|
async update(request, options) {
|
|
39
39
|
return unwrapAsync(apiKeysUpdate(this, request, options));
|
|
@@ -42,7 +42,7 @@ export class APIKeys extends ClientSDK {
|
|
|
42
42
|
* Delete an API key
|
|
43
43
|
*
|
|
44
44
|
* @remarks
|
|
45
|
-
* Delete an existing API key. [
|
|
45
|
+
* Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
46
46
|
*/
|
|
47
47
|
async delete(request, options) {
|
|
48
48
|
return unwrapAsync(apiKeysDelete(this, request, options));
|
|
@@ -51,7 +51,7 @@ export class APIKeys extends ClientSDK {
|
|
|
51
51
|
* Get a single API key
|
|
52
52
|
*
|
|
53
53
|
* @remarks
|
|
54
|
-
* Get a single API key by hash. [
|
|
54
|
+
* Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
55
55
|
*/
|
|
56
56
|
async get(request, options) {
|
|
57
57
|
return unwrapAsync(apiKeysGet(this, request, options));
|
|
@@ -62,8 +62,8 @@ export class APIKeys extends ClientSDK {
|
|
|
62
62
|
* @remarks
|
|
63
63
|
* Get information on the API key associated with the current authentication session
|
|
64
64
|
*/
|
|
65
|
-
async getCurrentKeyMetadata(options) {
|
|
66
|
-
return unwrapAsync(apiKeysGetCurrentKeyMetadata(this, options));
|
|
65
|
+
async getCurrentKeyMetadata(request, options) {
|
|
66
|
+
return unwrapAsync(apiKeysGetCurrentKeyMetadata(this, request, options));
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
//# sourceMappingURL=apikeys.js.map
|
package/esm/sdk/chat.d.ts
CHANGED
|
@@ -9,12 +9,16 @@ export declare class Chat extends ClientSDK {
|
|
|
9
9
|
* @remarks
|
|
10
10
|
* Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
|
|
11
11
|
*/
|
|
12
|
-
send(request:
|
|
13
|
-
|
|
12
|
+
send(request: operations.SendChatCompletionRequestRequest & {
|
|
13
|
+
chatGenerationParams: {
|
|
14
|
+
stream?: false | undefined;
|
|
15
|
+
};
|
|
14
16
|
}, options?: RequestOptions): Promise<models.ChatResponse>;
|
|
15
|
-
send(request:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
send(request: operations.SendChatCompletionRequestRequest & {
|
|
18
|
+
chatGenerationParams: {
|
|
19
|
+
stream: true;
|
|
20
|
+
};
|
|
21
|
+
}, options?: RequestOptions): Promise<EventStream<models.ChatStreamingResponseChunk>>;
|
|
22
|
+
send(request: operations.SendChatCompletionRequestRequest, options?: RequestOptions): Promise<operations.SendChatCompletionRequestResponse>;
|
|
19
23
|
}
|
|
20
24
|
//# sourceMappingURL=chat.d.ts.map
|
package/esm/sdk/credits.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
-
import * as models from "../models/index.js";
|
|
3
2
|
import * as operations from "../models/operations/index.js";
|
|
4
3
|
export declare class Credits extends ClientSDK {
|
|
5
4
|
/**
|
|
6
5
|
* Get remaining credits
|
|
7
6
|
*
|
|
8
7
|
* @remarks
|
|
9
|
-
* Get total credits purchased and used for the authenticated user. [
|
|
8
|
+
* Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
10
9
|
*/
|
|
11
|
-
getCredits(options?: RequestOptions): Promise<operations.GetCreditsResponse>;
|
|
10
|
+
getCredits(request?: operations.GetCreditsRequest | undefined, options?: RequestOptions): Promise<operations.GetCreditsResponse>;
|
|
12
11
|
/**
|
|
13
12
|
* Create a Coinbase charge for crypto payment
|
|
14
13
|
*
|
|
15
14
|
* @remarks
|
|
16
15
|
* Create a Coinbase charge for crypto payment
|
|
17
16
|
*/
|
|
18
|
-
createCoinbaseCharge(security: operations.CreateCoinbaseChargeSecurity, request:
|
|
17
|
+
createCoinbaseCharge(security: operations.CreateCoinbaseChargeSecurity, request: operations.CreateCoinbaseChargeRequest, options?: RequestOptions): Promise<operations.CreateCoinbaseChargeResponse>;
|
|
19
18
|
}
|
|
20
19
|
//# sourceMappingURL=credits.d.ts.map
|
package/esm/sdk/credits.js
CHANGED
|
@@ -11,10 +11,10 @@ export class Credits extends ClientSDK {
|
|
|
11
11
|
* Get remaining credits
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
* Get total credits purchased and used for the authenticated user. [
|
|
14
|
+
* Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
15
15
|
*/
|
|
16
|
-
async getCredits(options) {
|
|
17
|
-
return unwrapAsync(creditsGetCredits(this, options));
|
|
16
|
+
async getCredits(request, options) {
|
|
17
|
+
return unwrapAsync(creditsGetCredits(this, request, options));
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Create a Coinbase charge for crypto payment
|
package/esm/sdk/embeddings.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export declare class Embeddings extends ClientSDK {
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Returns a list of all available embeddings models and their properties
|
|
17
17
|
*/
|
|
18
|
-
listModels(options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
18
|
+
listModels(request?: operations.ListEmbeddingsModelsRequest | undefined, options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=embeddings.d.ts.map
|
package/esm/sdk/embeddings.js
CHANGED
|
@@ -22,8 +22,8 @@ export class Embeddings extends ClientSDK {
|
|
|
22
22
|
* @remarks
|
|
23
23
|
* Returns a list of all available embeddings models and their properties
|
|
24
24
|
*/
|
|
25
|
-
async listModels(options) {
|
|
26
|
-
return unwrapAsync(embeddingsListModels(this, options));
|
|
25
|
+
async listModels(request, options) {
|
|
26
|
+
return unwrapAsync(embeddingsListModels(this, request, options));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=embeddings.js.map
|
package/esm/sdk/endpoints.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare class Endpoints extends ClientSDK {
|
|
|
8
8
|
/**
|
|
9
9
|
* Preview the impact of ZDR on the available endpoints
|
|
10
10
|
*/
|
|
11
|
-
listZdrEndpoints(options?: RequestOptions): Promise<operations.ListEndpointsZdrResponse>;
|
|
11
|
+
listZdrEndpoints(request?: operations.ListEndpointsZdrRequest | undefined, options?: RequestOptions): Promise<operations.ListEndpointsZdrResponse>;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=endpoints.d.ts.map
|
package/esm/sdk/endpoints.js
CHANGED
|
@@ -16,8 +16,8 @@ export class Endpoints extends ClientSDK {
|
|
|
16
16
|
/**
|
|
17
17
|
* Preview the impact of ZDR on the available endpoints
|
|
18
18
|
*/
|
|
19
|
-
async listZdrEndpoints(options) {
|
|
20
|
-
return unwrapAsync(endpointsListZdrEndpoints(this, options));
|
|
19
|
+
async listZdrEndpoints(request, options) {
|
|
20
|
+
return unwrapAsync(endpointsListZdrEndpoints(this, request, options));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=endpoints.js.map
|