@openrouter/sdk 0.9.11 → 0.10.2
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 +2 -1
- package/_speakeasy/.github/action-inputs-config.json +4 -0
- package/esm/funcs/analyticsGetUserActivity.js +2 -1
- package/esm/funcs/apiKeysCreate.js +2 -1
- package/esm/funcs/apiKeysDelete.js +2 -1
- package/esm/funcs/apiKeysGet.js +2 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -1
- package/esm/funcs/apiKeysList.js +2 -1
- package/esm/funcs/apiKeysUpdate.js +2 -1
- package/esm/funcs/betaResponsesSend.js +2 -1
- package/esm/funcs/call-model.d.ts +19 -70
- package/esm/funcs/call-model.js +29 -71
- package/esm/funcs/chatSend.js +2 -1
- package/esm/funcs/creditsCreateCoinbaseCharge.js +2 -1
- package/esm/funcs/creditsGetCredits.js +2 -1
- package/esm/funcs/embeddingsGenerate.js +2 -1
- package/esm/funcs/embeddingsListModels.js +2 -1
- package/esm/funcs/endpointsList.js +2 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +2 -1
- package/esm/funcs/generationsGetGeneration.js +2 -1
- package/esm/funcs/guardrailsBulkAssignKeys.js +2 -1
- package/esm/funcs/guardrailsBulkAssignMembers.js +2 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.js +2 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.js +2 -1
- package/esm/funcs/guardrailsCreate.js +2 -1
- package/esm/funcs/guardrailsDelete.js +2 -1
- package/esm/funcs/guardrailsGet.js +2 -1
- package/esm/funcs/guardrailsList.js +2 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +2 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +2 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +2 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +2 -1
- package/esm/funcs/guardrailsUpdate.js +2 -1
- package/esm/funcs/modelsCount.d.ts +1 -1
- package/esm/funcs/modelsCount.js +9 -4
- package/esm/funcs/modelsList.js +3 -1
- package/esm/funcs/modelsListForUser.js +2 -1
- package/esm/funcs/oAuthCreateAuthCode.d.ts +1 -1
- package/esm/funcs/oAuthCreateAuthCode.js +4 -3
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +2 -1
- package/esm/funcs/providersList.js +2 -1
- package/esm/index.d.ts +22 -23
- package/esm/index.js +20 -17
- package/esm/lib/anthropic-compat.d.ts +2 -1
- package/esm/lib/anthropic-compat.js +1 -2
- package/esm/lib/async-params.d.ts +19 -5
- package/esm/lib/async-params.js +5 -1
- package/esm/lib/chat-compat.d.ts +1 -1
- package/esm/lib/chat-compat.js +1 -2
- package/esm/lib/claude-type-guards.d.ts +2 -2
- package/esm/lib/config.d.ts +8 -10
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +1 -1
- package/esm/lib/conversation-state.js +35 -32
- package/esm/lib/env.d.ts +6 -2
- package/esm/lib/env.js +7 -3
- package/esm/lib/model-result.d.ts +73 -17
- package/esm/lib/model-result.js +329 -125
- package/esm/lib/sdks.d.ts +1 -1
- package/esm/lib/sdks.js +8 -28
- package/esm/lib/stream-transformers.d.ts +5 -4
- package/esm/lib/stream-transformers.js +24 -29
- package/esm/lib/stream-type-guards.js +8 -32
- package/esm/lib/tool-context.d.ts +68 -0
- package/esm/lib/tool-context.js +175 -0
- package/esm/lib/tool-executor.d.ts +9 -5
- package/esm/lib/tool-executor.js +26 -16
- package/esm/lib/tool-orchestrator.d.ts +2 -2
- package/esm/lib/tool-types.d.ts +101 -14
- package/esm/lib/tool-types.js +17 -0
- package/esm/lib/tool.d.ts +49 -60
- package/esm/lib/tool.js +15 -19
- package/esm/lib/turn-context.d.ts +1 -1
- package/esm/models/assistantmessage.d.ts +6 -0
- package/esm/models/assistantmessage.js +3 -0
- package/esm/models/chatcompletionaudiooutput.d.ts +38 -0
- package/esm/models/chatcompletionaudiooutput.js +36 -0
- package/esm/models/chatgenerationparams.d.ts +75 -6
- package/esm/models/chatgenerationparams.js +42 -0
- package/esm/models/chatmessagecontentitem.d.ts +3 -2
- package/esm/models/chatmessagecontentitem.js +3 -0
- package/esm/models/chatmessagecontentitemcachecontrol.d.ts +5 -5
- package/esm/models/chatmessagecontentitemcachecontrol.js +5 -7
- package/esm/models/chatmessagecontentitemfile.d.ts +57 -0
- package/esm/models/chatmessagecontentitemfile.js +59 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +1 -1
- package/esm/models/chatmessagetokenlogprobs.js +2 -1
- package/esm/models/chatresponse.d.ts +1 -1
- package/esm/models/chatresponse.js +1 -1
- package/esm/models/chatstreamingmessagechunk.d.ts +2 -0
- package/esm/models/chatstreamingmessagechunk.js +2 -0
- package/esm/models/chatstreamingresponsechunk.d.ts +1 -1
- package/esm/models/chatstreamingresponsechunk.js +1 -1
- package/esm/models/compoundfilter.d.ts +36 -0
- package/esm/models/compoundfilter.js +32 -0
- package/esm/models/conflictresponseerrordata.d.ts +17 -0
- package/esm/models/conflictresponseerrordata.js +16 -0
- package/esm/models/contextcompressionengine.d.ts +15 -0
- package/esm/models/contextcompressionengine.js +14 -0
- package/esm/models/datetimeservertool.d.ts +30 -0
- package/esm/models/datetimeservertool.js +22 -0
- package/esm/models/defaultparameters.d.ts +3 -0
- package/esm/models/defaultparameters.js +6 -0
- package/esm/models/errors/conflictresponseerror.d.ts +33 -0
- package/esm/models/errors/conflictresponseerror.js +42 -0
- package/esm/models/errors/index.d.ts +1 -0
- package/esm/models/errors/index.js +1 -0
- package/esm/models/index.d.ts +23 -4
- package/esm/models/index.js +23 -4
- package/esm/models/openairesponsesinputunion.d.ts +32 -1
- package/esm/models/openairesponsesinputunion.js +53 -1
- package/esm/models/openresponsesapplypatchtool.d.ts +20 -0
- package/esm/models/openresponsesapplypatchtool.js +21 -0
- package/esm/models/openresponsescodeinterpretertool.d.ts +68 -0
- package/esm/models/openresponsescodeinterpretertool.js +85 -0
- package/esm/models/openresponsescomputertool.d.ts +39 -0
- package/esm/models/openresponsescomputertool.js +50 -0
- package/esm/models/openresponsescustomtool.d.ts +75 -0
- package/esm/models/openresponsescustomtool.js +95 -0
- package/esm/models/openresponseseasyinputmessage.d.ts +30 -4
- package/esm/models/openresponseseasyinputmessage.js +28 -2
- package/esm/models/openresponsesfilesearchtool.d.ts +111 -0
- package/esm/models/openresponsesfilesearchtool.js +180 -0
- package/esm/models/openresponsesfunctioncalloutput.d.ts +46 -7
- package/esm/models/openresponsesfunctioncalloutput.js +56 -4
- package/esm/models/openresponsesfunctionshelltool.d.ts +20 -0
- package/esm/models/openresponsesfunctionshelltool.js +21 -0
- package/esm/models/openresponsesimagegenerationtool.d.ts +125 -0
- package/esm/models/openresponsesimagegenerationtool.js +153 -0
- package/esm/models/openresponsesinputmessageitem.d.ts +2 -2
- package/esm/models/openresponsesinputmessageitem.js +2 -2
- package/esm/models/openresponsesinputunion.d.ts +207 -0
- package/esm/models/openresponsesinputunion.js +225 -0
- package/esm/models/openresponseslocalshelltool.d.ts +20 -0
- package/esm/models/openresponseslocalshelltool.js +21 -0
- package/esm/models/openresponsesmcptool.d.ts +128 -0
- package/esm/models/openresponsesmcptool.js +173 -0
- package/esm/models/openresponsesnonstreamingresponse.d.ts +11 -2
- package/esm/models/openresponsesnonstreamingresponse.js +27 -0
- package/esm/models/openresponsesrequest.d.ts +53 -11
- package/esm/models/openresponsesrequest.js +51 -2
- package/esm/models/openresponsesstreamevent.d.ts +52 -4
- package/esm/models/openresponsesstreamevent.js +54 -3
- package/esm/models/openresponseswebsearch20250826tool.d.ts +29 -0
- package/esm/models/openresponseswebsearch20250826tool.js +23 -0
- package/esm/models/openresponseswebsearchcallcompleted.d.ts +16 -0
- package/esm/models/openresponseswebsearchcallcompleted.js +24 -0
- package/esm/models/openresponseswebsearchcallinprogress.d.ts +16 -0
- package/esm/models/openresponseswebsearchcallinprogress.js +24 -0
- package/esm/models/openresponseswebsearchcallsearching.d.ts +16 -0
- package/esm/models/openresponseswebsearchcallsearching.js +24 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +44 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.js +51 -0
- package/esm/models/openresponseswebsearchpreviewtool.d.ts +44 -0
- package/esm/models/openresponseswebsearchpreviewtool.js +47 -0
- package/esm/models/openresponseswebsearchtool.d.ts +29 -0
- package/esm/models/openresponseswebsearchtool.js +23 -0
- package/esm/models/operations/bulkassignkeystoguardrail.d.ts +16 -3
- package/esm/models/operations/bulkassignkeystoguardrail.js +2 -2
- package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +16 -3
- package/esm/models/operations/bulkassignmemberstoguardrail.js +2 -2
- package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +16 -3
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +2 -2
- package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +16 -3
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +2 -2
- package/esm/models/operations/createauthkeyscode.d.ts +16 -3
- package/esm/models/operations/createauthkeyscode.js +2 -2
- package/esm/models/operations/createcoinbasecharge.d.ts +16 -3
- package/esm/models/operations/createcoinbasecharge.js +2 -2
- package/esm/models/operations/createembeddings.d.ts +16 -3
- package/esm/models/operations/createembeddings.js +2 -2
- package/esm/models/operations/createguardrail.d.ts +25 -3
- package/esm/models/operations/createguardrail.js +6 -2
- package/esm/models/operations/createkeys.d.ts +16 -3
- package/esm/models/operations/createkeys.js +2 -2
- package/esm/models/operations/createresponses.d.ts +16 -3
- package/esm/models/operations/createresponses.js +2 -2
- package/esm/models/operations/deleteguardrail.d.ts +16 -3
- package/esm/models/operations/deleteguardrail.js +2 -2
- package/esm/models/operations/deletekeys.d.ts +16 -3
- package/esm/models/operations/deletekeys.js +2 -2
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +16 -3
- package/esm/models/operations/exchangeauthcodeforapikey.js +2 -2
- package/esm/models/operations/getcredits.d.ts +16 -3
- package/esm/models/operations/getcredits.js +2 -2
- package/esm/models/operations/getcurrentkey.d.ts +16 -3
- package/esm/models/operations/getcurrentkey.js +2 -2
- package/esm/models/operations/getgeneration.d.ts +25 -3
- package/esm/models/operations/getgeneration.js +7 -2
- package/esm/models/operations/getguardrail.d.ts +20 -3
- package/esm/models/operations/getguardrail.js +4 -2
- package/esm/models/operations/getkey.d.ts +16 -3
- package/esm/models/operations/getkey.js +2 -2
- package/esm/models/operations/getmodels.d.ts +21 -3
- package/esm/models/operations/getmodels.js +4 -2
- package/esm/models/operations/getuseractivity.d.ts +16 -3
- package/esm/models/operations/getuseractivity.js +2 -2
- package/esm/models/operations/list.d.ts +16 -3
- package/esm/models/operations/list.js +2 -2
- package/esm/models/operations/listembeddingsmodels.d.ts +16 -3
- package/esm/models/operations/listembeddingsmodels.js +2 -2
- package/esm/models/operations/listendpoints.d.ts +16 -3
- package/esm/models/operations/listendpoints.js +2 -2
- package/esm/models/operations/listendpointszdr.d.ts +16 -3
- package/esm/models/operations/listendpointszdr.js +2 -2
- package/esm/models/operations/listguardrailkeyassignments.d.ts +16 -3
- package/esm/models/operations/listguardrailkeyassignments.js +2 -2
- package/esm/models/operations/listguardrailmemberassignments.d.ts +16 -3
- package/esm/models/operations/listguardrailmemberassignments.js +2 -2
- package/esm/models/operations/listguardrails.d.ts +20 -3
- package/esm/models/operations/listguardrails.js +4 -2
- package/esm/models/operations/listkeyassignments.d.ts +16 -3
- package/esm/models/operations/listkeyassignments.js +2 -2
- package/esm/models/operations/listmemberassignments.d.ts +16 -3
- package/esm/models/operations/listmemberassignments.js +2 -2
- package/esm/models/operations/listmodelscount.d.ts +21 -3
- package/esm/models/operations/listmodelscount.js +4 -2
- package/esm/models/operations/listmodelsuser.d.ts +16 -3
- package/esm/models/operations/listmodelsuser.js +2 -2
- package/esm/models/operations/listproviders.d.ts +16 -3
- package/esm/models/operations/listproviders.js +2 -2
- package/esm/models/operations/sendchatcompletionrequest.d.ts +16 -3
- package/esm/models/operations/sendchatcompletionrequest.js +2 -2
- package/esm/models/operations/updateguardrail.d.ts +25 -3
- package/esm/models/operations/updateguardrail.js +6 -2
- package/esm/models/operations/updatekeys.d.ts +16 -3
- package/esm/models/operations/updatekeys.js +2 -2
- package/esm/models/outputmessage.d.ts +23 -0
- package/esm/models/outputmessage.js +24 -0
- package/esm/models/outputmodality.d.ts +1 -0
- package/esm/models/outputmodality.js +1 -0
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/providerpreferences.d.ts +4 -0
- package/esm/models/providerpreferences.js +4 -0
- package/esm/models/providersort.d.ts +1 -0
- package/esm/models/providersort.js +1 -0
- package/esm/models/providersortconfig.d.ts +1 -0
- package/esm/models/providersortconfig.js +1 -0
- package/esm/models/responseoutputtext.d.ts +8 -8
- package/esm/models/responseoutputtext.js +10 -9
- package/esm/models/responsesoutputitem.d.ts +2 -13
- package/esm/models/responsesoutputitem.js +8 -6
- package/esm/models/responsesoutputitemreasoning.d.ts +2 -31
- package/esm/models/responsesoutputitemreasoning.js +2 -44
- package/esm/models/responsesoutputmessage.d.ts +24 -32
- package/esm/models/responsesoutputmessage.js +26 -47
- package/esm/models/responsesservertooloutput.d.ts +42 -0
- package/esm/models/responsesservertooloutput.js +44 -0
- package/esm/models/responseswebsearchcalloutput.d.ts +90 -5
- package/esm/models/responseswebsearchcalloutput.js +113 -5
- package/esm/models/responseswebsearchservertool.d.ts +35 -0
- package/esm/models/responseswebsearchservertool.js +28 -0
- package/esm/models/tooldefinitionjson.d.ts +38 -20
- package/esm/models/tooldefinitionjson.js +22 -11
- package/esm/models/websearchengine.d.ts +2 -0
- package/esm/models/websearchengine.js +2 -0
- package/esm/models/websearchservertool.d.ts +116 -0
- package/esm/models/websearchservertool.js +77 -0
- package/esm/models/websearchshorthand.d.ts +215 -0
- package/esm/models/websearchshorthand.js +138 -0
- package/esm/sdk/sdk.d.ts +4 -1
- package/esm/sdk/sdk.js +0 -1
- package/esm/types/index.d.ts +0 -2
- package/esm/types/index.js +0 -1
- package/jsr.json +1 -1
- package/package.json +11 -6
- package/turbo.json +10 -0
- package/esm/models/openresponsesinput.d.ts +0 -28
- package/esm/models/openresponsesinput.js +0 -54
- package/esm/models/openresponseslogprobs.d.ts +0 -16
- package/esm/models/openresponseslogprobs.js +0 -22
- package/esm/models/openresponsestoplogprobs.d.ts +0 -14
- package/esm/models/openresponsestoplogprobs.js +0 -15
|
@@ -25,11 +25,19 @@ export declare const OpenAIResponsesInputTypeFunctionCallOutput: {
|
|
|
25
25
|
readonly FunctionCallOutput: "function_call_output";
|
|
26
26
|
};
|
|
27
27
|
export type OpenAIResponsesInputTypeFunctionCallOutput = ClosedEnum<typeof OpenAIResponsesInputTypeFunctionCallOutput>;
|
|
28
|
+
export type OpenAIResponsesInputOutput1 = ResponseInputText | (ResponseInputImage & {
|
|
29
|
+
type: "input_image";
|
|
30
|
+
}) | ResponseInputFile;
|
|
31
|
+
export type OpenAIResponsesInputOutput2 = string | Array<ResponseInputText | (ResponseInputImage & {
|
|
32
|
+
type: "input_image";
|
|
33
|
+
}) | ResponseInputFile>;
|
|
28
34
|
export type OpenAIResponsesInputFunctionCallOutput = {
|
|
29
35
|
type: OpenAIResponsesInputTypeFunctionCallOutput;
|
|
30
36
|
id?: string | null | undefined;
|
|
31
37
|
callId: string;
|
|
32
|
-
output: string
|
|
38
|
+
output: string | Array<ResponseInputText | (ResponseInputImage & {
|
|
39
|
+
type: "input_image";
|
|
40
|
+
}) | ResponseInputFile>;
|
|
33
41
|
status?: ToolCallStatus | null | undefined;
|
|
34
42
|
};
|
|
35
43
|
export declare const OpenAIResponsesInputTypeMessage2: {
|
|
@@ -87,12 +95,22 @@ export type OpenAIResponsesInputContent1 = ResponseInputText | (ResponseInputIma
|
|
|
87
95
|
export type OpenAIResponsesInputContent2 = Array<ResponseInputText | (ResponseInputImage & {
|
|
88
96
|
type: "input_image";
|
|
89
97
|
}) | ResponseInputFile | ResponseInputAudio> | string;
|
|
98
|
+
export declare const OpenAIResponsesInputPhaseFinalAnswer: {
|
|
99
|
+
readonly FinalAnswer: "final_answer";
|
|
100
|
+
};
|
|
101
|
+
export type OpenAIResponsesInputPhaseFinalAnswer = ClosedEnum<typeof OpenAIResponsesInputPhaseFinalAnswer>;
|
|
102
|
+
export declare const OpenAIResponsesInputPhaseCommentary: {
|
|
103
|
+
readonly Commentary: "commentary";
|
|
104
|
+
};
|
|
105
|
+
export type OpenAIResponsesInputPhaseCommentary = ClosedEnum<typeof OpenAIResponsesInputPhaseCommentary>;
|
|
106
|
+
export type OpenAIResponsesInputPhaseUnion = OpenAIResponsesInputPhaseCommentary | OpenAIResponsesInputPhaseFinalAnswer | any;
|
|
90
107
|
export type OpenAIResponsesInputMessage1 = {
|
|
91
108
|
type?: OpenAIResponsesInputTypeMessage1 | undefined;
|
|
92
109
|
role: OpenAIResponsesInputRoleUser1 | OpenAIResponsesInputRoleSystem1 | OpenAIResponsesInputRoleAssistant | OpenAIResponsesInputRoleDeveloper1;
|
|
93
110
|
content: Array<ResponseInputText | (ResponseInputImage & {
|
|
94
111
|
type: "input_image";
|
|
95
112
|
}) | ResponseInputFile | ResponseInputAudio> | string;
|
|
113
|
+
phase?: OpenAIResponsesInputPhaseCommentary | OpenAIResponsesInputPhaseFinalAnswer | any | null | undefined;
|
|
96
114
|
};
|
|
97
115
|
export type OpenAIResponsesInputUnion1 = OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1;
|
|
98
116
|
export type OpenAIResponsesInputUnion = string | Array<OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1> | any;
|
|
@@ -104,6 +122,12 @@ export declare function openAIResponsesInputFunctionCallFromJSON(jsonString: str
|
|
|
104
122
|
/** @internal */
|
|
105
123
|
export declare const OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema: z.ZodEnum<typeof OpenAIResponsesInputTypeFunctionCallOutput>;
|
|
106
124
|
/** @internal */
|
|
125
|
+
export declare const OpenAIResponsesInputOutput1$inboundSchema: z.ZodType<OpenAIResponsesInputOutput1, unknown>;
|
|
126
|
+
export declare function openAIResponsesInputOutput1FromJSON(jsonString: string): SafeParseResult<OpenAIResponsesInputOutput1, SDKValidationError>;
|
|
127
|
+
/** @internal */
|
|
128
|
+
export declare const OpenAIResponsesInputOutput2$inboundSchema: z.ZodType<OpenAIResponsesInputOutput2, unknown>;
|
|
129
|
+
export declare function openAIResponsesInputOutput2FromJSON(jsonString: string): SafeParseResult<OpenAIResponsesInputOutput2, SDKValidationError>;
|
|
130
|
+
/** @internal */
|
|
107
131
|
export declare const OpenAIResponsesInputFunctionCallOutput$inboundSchema: z.ZodType<OpenAIResponsesInputFunctionCallOutput, unknown>;
|
|
108
132
|
export declare function openAIResponsesInputFunctionCallOutputFromJSON(jsonString: string): SafeParseResult<OpenAIResponsesInputFunctionCallOutput, SDKValidationError>;
|
|
109
133
|
/** @internal */
|
|
@@ -143,6 +167,13 @@ export declare function openAIResponsesInputContent1FromJSON(jsonString: string)
|
|
|
143
167
|
export declare const OpenAIResponsesInputContent2$inboundSchema: z.ZodType<OpenAIResponsesInputContent2, unknown>;
|
|
144
168
|
export declare function openAIResponsesInputContent2FromJSON(jsonString: string): SafeParseResult<OpenAIResponsesInputContent2, SDKValidationError>;
|
|
145
169
|
/** @internal */
|
|
170
|
+
export declare const OpenAIResponsesInputPhaseFinalAnswer$inboundSchema: z.ZodEnum<typeof OpenAIResponsesInputPhaseFinalAnswer>;
|
|
171
|
+
/** @internal */
|
|
172
|
+
export declare const OpenAIResponsesInputPhaseCommentary$inboundSchema: z.ZodEnum<typeof OpenAIResponsesInputPhaseCommentary>;
|
|
173
|
+
/** @internal */
|
|
174
|
+
export declare const OpenAIResponsesInputPhaseUnion$inboundSchema: z.ZodType<OpenAIResponsesInputPhaseUnion, unknown>;
|
|
175
|
+
export declare function openAIResponsesInputPhaseUnionFromJSON(jsonString: string): SafeParseResult<OpenAIResponsesInputPhaseUnion, SDKValidationError>;
|
|
176
|
+
/** @internal */
|
|
146
177
|
export declare const OpenAIResponsesInputMessage1$inboundSchema: z.ZodType<OpenAIResponsesInputMessage1, unknown>;
|
|
147
178
|
export declare function openAIResponsesInputMessage1FromJSON(jsonString: string): SafeParseResult<OpenAIResponsesInputMessage1, SDKValidationError>;
|
|
148
179
|
/** @internal */
|
|
@@ -45,6 +45,12 @@ export const OpenAIResponsesInputRoleSystem1 = {
|
|
|
45
45
|
export const OpenAIResponsesInputRoleUser1 = {
|
|
46
46
|
User: "user",
|
|
47
47
|
};
|
|
48
|
+
export const OpenAIResponsesInputPhaseFinalAnswer = {
|
|
49
|
+
FinalAnswer: "final_answer",
|
|
50
|
+
};
|
|
51
|
+
export const OpenAIResponsesInputPhaseCommentary = {
|
|
52
|
+
Commentary: "commentary",
|
|
53
|
+
};
|
|
48
54
|
/** @internal */
|
|
49
55
|
export const OpenAIResponsesInputTypeFunctionCall$inboundSchema = z.enum(OpenAIResponsesInputTypeFunctionCall);
|
|
50
56
|
/** @internal */
|
|
@@ -66,11 +72,39 @@ export function openAIResponsesInputFunctionCallFromJSON(jsonString) {
|
|
|
66
72
|
/** @internal */
|
|
67
73
|
export const OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema = z.enum(OpenAIResponsesInputTypeFunctionCallOutput);
|
|
68
74
|
/** @internal */
|
|
75
|
+
export const OpenAIResponsesInputOutput1$inboundSchema = z.union([
|
|
76
|
+
ResponseInputText$inboundSchema,
|
|
77
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
78
|
+
ResponseInputFile$inboundSchema,
|
|
79
|
+
]);
|
|
80
|
+
export function openAIResponsesInputOutput1FromJSON(jsonString) {
|
|
81
|
+
return safeParse(jsonString, (x) => OpenAIResponsesInputOutput1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesInputOutput1' from JSON`);
|
|
82
|
+
}
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const OpenAIResponsesInputOutput2$inboundSchema = z.union([
|
|
85
|
+
z.string(),
|
|
86
|
+
z.array(z.union([
|
|
87
|
+
ResponseInputText$inboundSchema,
|
|
88
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
89
|
+
ResponseInputFile$inboundSchema,
|
|
90
|
+
])),
|
|
91
|
+
]);
|
|
92
|
+
export function openAIResponsesInputOutput2FromJSON(jsonString) {
|
|
93
|
+
return safeParse(jsonString, (x) => OpenAIResponsesInputOutput2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesInputOutput2' from JSON`);
|
|
94
|
+
}
|
|
95
|
+
/** @internal */
|
|
69
96
|
export const OpenAIResponsesInputFunctionCallOutput$inboundSchema = z.object({
|
|
70
97
|
type: OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema,
|
|
71
98
|
id: z.nullable(z.string()).optional(),
|
|
72
99
|
call_id: z.string(),
|
|
73
|
-
output: z.
|
|
100
|
+
output: z.union([
|
|
101
|
+
z.string(),
|
|
102
|
+
z.array(z.union([
|
|
103
|
+
ResponseInputText$inboundSchema,
|
|
104
|
+
ResponseInputImage$inboundSchema.and(z.object({ type: z.literal("input_image") })),
|
|
105
|
+
ResponseInputFile$inboundSchema,
|
|
106
|
+
])),
|
|
107
|
+
]),
|
|
74
108
|
status: z.nullable(ToolCallStatus$inboundSchema).optional(),
|
|
75
109
|
}).transform((v) => {
|
|
76
110
|
return remap$(v, {
|
|
@@ -170,6 +204,19 @@ export function openAIResponsesInputContent2FromJSON(jsonString) {
|
|
|
170
204
|
return safeParse(jsonString, (x) => OpenAIResponsesInputContent2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesInputContent2' from JSON`);
|
|
171
205
|
}
|
|
172
206
|
/** @internal */
|
|
207
|
+
export const OpenAIResponsesInputPhaseFinalAnswer$inboundSchema = z.enum(OpenAIResponsesInputPhaseFinalAnswer);
|
|
208
|
+
/** @internal */
|
|
209
|
+
export const OpenAIResponsesInputPhaseCommentary$inboundSchema = z.enum(OpenAIResponsesInputPhaseCommentary);
|
|
210
|
+
/** @internal */
|
|
211
|
+
export const OpenAIResponsesInputPhaseUnion$inboundSchema = z.union([
|
|
212
|
+
OpenAIResponsesInputPhaseCommentary$inboundSchema,
|
|
213
|
+
OpenAIResponsesInputPhaseFinalAnswer$inboundSchema,
|
|
214
|
+
z.any(),
|
|
215
|
+
]);
|
|
216
|
+
export function openAIResponsesInputPhaseUnionFromJSON(jsonString) {
|
|
217
|
+
return safeParse(jsonString, (x) => OpenAIResponsesInputPhaseUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesInputPhaseUnion' from JSON`);
|
|
218
|
+
}
|
|
219
|
+
/** @internal */
|
|
173
220
|
export const OpenAIResponsesInputMessage1$inboundSchema = z.object({
|
|
174
221
|
type: OpenAIResponsesInputTypeMessage1$inboundSchema.optional(),
|
|
175
222
|
role: z.union([
|
|
@@ -187,6 +234,11 @@ export const OpenAIResponsesInputMessage1$inboundSchema = z.object({
|
|
|
187
234
|
])),
|
|
188
235
|
z.string(),
|
|
189
236
|
]),
|
|
237
|
+
phase: z.nullable(z.union([
|
|
238
|
+
OpenAIResponsesInputPhaseCommentary$inboundSchema,
|
|
239
|
+
OpenAIResponsesInputPhaseFinalAnswer$inboundSchema,
|
|
240
|
+
z.any(),
|
|
241
|
+
])).optional(),
|
|
190
242
|
});
|
|
191
243
|
export function openAIResponsesInputMessage1FromJSON(jsonString) {
|
|
192
244
|
return safeParse(jsonString, (x) => OpenAIResponsesInputMessage1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponsesInputMessage1' from JSON`);
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
* Apply patch tool configuration
|
|
6
|
+
*/
|
|
7
|
+
export type OpenResponsesApplyPatchTool = {
|
|
8
|
+
type: "apply_patch";
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const OpenResponsesApplyPatchTool$inboundSchema: z.ZodType<OpenResponsesApplyPatchTool, unknown>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type OpenResponsesApplyPatchTool$Outbound = {
|
|
14
|
+
type: "apply_patch";
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const OpenResponsesApplyPatchTool$outboundSchema: z.ZodType<OpenResponsesApplyPatchTool$Outbound, OpenResponsesApplyPatchTool>;
|
|
18
|
+
export declare function openResponsesApplyPatchToolToJSON(openResponsesApplyPatchTool: OpenResponsesApplyPatchTool): string;
|
|
19
|
+
export declare function openResponsesApplyPatchToolFromJSON(jsonString: string): SafeParseResult<OpenResponsesApplyPatchTool, SDKValidationError>;
|
|
20
|
+
//# sourceMappingURL=openresponsesapplypatchtool.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 84640a5e950b
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const OpenResponsesApplyPatchTool$inboundSchema = z.object({
|
|
9
|
+
type: z.literal("apply_patch"),
|
|
10
|
+
});
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const OpenResponsesApplyPatchTool$outboundSchema = z.object({
|
|
13
|
+
type: z.literal("apply_patch"),
|
|
14
|
+
});
|
|
15
|
+
export function openResponsesApplyPatchToolToJSON(openResponsesApplyPatchTool) {
|
|
16
|
+
return JSON.stringify(OpenResponsesApplyPatchTool$outboundSchema.parse(openResponsesApplyPatchTool));
|
|
17
|
+
}
|
|
18
|
+
export function openResponsesApplyPatchToolFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => OpenResponsesApplyPatchTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesApplyPatchTool' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=openresponsesapplypatchtool.js.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const ContainerType: {
|
|
6
|
+
readonly Auto: "auto";
|
|
7
|
+
};
|
|
8
|
+
export type ContainerType = ClosedEnum<typeof ContainerType>;
|
|
9
|
+
export declare const MemoryLimit: {
|
|
10
|
+
readonly Oneg: "1g";
|
|
11
|
+
readonly Fourg: "4g";
|
|
12
|
+
readonly Sixteeng: "16g";
|
|
13
|
+
readonly SixtyFourg: "64g";
|
|
14
|
+
};
|
|
15
|
+
export type MemoryLimit = OpenEnum<typeof MemoryLimit>;
|
|
16
|
+
export type ContainerAuto = {
|
|
17
|
+
type: ContainerType;
|
|
18
|
+
fileIds?: Array<string> | undefined;
|
|
19
|
+
memoryLimit?: MemoryLimit | null | undefined;
|
|
20
|
+
};
|
|
21
|
+
export type Container = ContainerAuto | string;
|
|
22
|
+
/**
|
|
23
|
+
* Code interpreter tool configuration
|
|
24
|
+
*/
|
|
25
|
+
export type OpenResponsesCodeInterpreterTool = {
|
|
26
|
+
type: "code_interpreter";
|
|
27
|
+
container: ContainerAuto | string;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const ContainerType$inboundSchema: z.ZodEnum<typeof ContainerType>;
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const ContainerType$outboundSchema: z.ZodEnum<typeof ContainerType>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const MemoryLimit$inboundSchema: z.ZodType<MemoryLimit, unknown>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const MemoryLimit$outboundSchema: z.ZodType<string, MemoryLimit>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const ContainerAuto$inboundSchema: z.ZodType<ContainerAuto, unknown>;
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type ContainerAuto$Outbound = {
|
|
41
|
+
type: string;
|
|
42
|
+
file_ids?: Array<string> | undefined;
|
|
43
|
+
memory_limit?: string | null | undefined;
|
|
44
|
+
};
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const ContainerAuto$outboundSchema: z.ZodType<ContainerAuto$Outbound, ContainerAuto>;
|
|
47
|
+
export declare function containerAutoToJSON(containerAuto: ContainerAuto): string;
|
|
48
|
+
export declare function containerAutoFromJSON(jsonString: string): SafeParseResult<ContainerAuto, SDKValidationError>;
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const Container$inboundSchema: z.ZodType<Container, unknown>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type Container$Outbound = ContainerAuto$Outbound | string;
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const Container$outboundSchema: z.ZodType<Container$Outbound, Container>;
|
|
55
|
+
export declare function containerToJSON(container: Container): string;
|
|
56
|
+
export declare function containerFromJSON(jsonString: string): SafeParseResult<Container, SDKValidationError>;
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const OpenResponsesCodeInterpreterTool$inboundSchema: z.ZodType<OpenResponsesCodeInterpreterTool, unknown>;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type OpenResponsesCodeInterpreterTool$Outbound = {
|
|
61
|
+
type: "code_interpreter";
|
|
62
|
+
container: ContainerAuto$Outbound | string;
|
|
63
|
+
};
|
|
64
|
+
/** @internal */
|
|
65
|
+
export declare const OpenResponsesCodeInterpreterTool$outboundSchema: z.ZodType<OpenResponsesCodeInterpreterTool$Outbound, OpenResponsesCodeInterpreterTool>;
|
|
66
|
+
export declare function openResponsesCodeInterpreterToolToJSON(openResponsesCodeInterpreterTool: OpenResponsesCodeInterpreterTool): string;
|
|
67
|
+
export declare function openResponsesCodeInterpreterToolFromJSON(jsonString: string): SafeParseResult<OpenResponsesCodeInterpreterTool, SDKValidationError>;
|
|
68
|
+
//# sourceMappingURL=openresponsescodeinterpretertool.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8d6c57413f99
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
export const ContainerType = {
|
|
10
|
+
Auto: "auto",
|
|
11
|
+
};
|
|
12
|
+
export const MemoryLimit = {
|
|
13
|
+
Oneg: "1g",
|
|
14
|
+
Fourg: "4g",
|
|
15
|
+
Sixteeng: "16g",
|
|
16
|
+
SixtyFourg: "64g",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ContainerType$inboundSchema = z
|
|
20
|
+
.enum(ContainerType);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ContainerType$outboundSchema = ContainerType$inboundSchema;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const MemoryLimit$inboundSchema = openEnums.inboundSchema(MemoryLimit);
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const MemoryLimit$outboundSchema = openEnums.outboundSchema(MemoryLimit);
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ContainerAuto$inboundSchema = z
|
|
29
|
+
.object({
|
|
30
|
+
type: ContainerType$inboundSchema,
|
|
31
|
+
file_ids: z.array(z.string()).optional(),
|
|
32
|
+
memory_limit: z.nullable(MemoryLimit$inboundSchema).optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"file_ids": "fileIds",
|
|
36
|
+
"memory_limit": "memoryLimit",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const ContainerAuto$outboundSchema = z.object({
|
|
41
|
+
type: ContainerType$outboundSchema,
|
|
42
|
+
fileIds: z.array(z.string()).optional(),
|
|
43
|
+
memoryLimit: z.nullable(MemoryLimit$outboundSchema).optional(),
|
|
44
|
+
}).transform((v) => {
|
|
45
|
+
return remap$(v, {
|
|
46
|
+
fileIds: "file_ids",
|
|
47
|
+
memoryLimit: "memory_limit",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
export function containerAutoToJSON(containerAuto) {
|
|
51
|
+
return JSON.stringify(ContainerAuto$outboundSchema.parse(containerAuto));
|
|
52
|
+
}
|
|
53
|
+
export function containerAutoFromJSON(jsonString) {
|
|
54
|
+
return safeParse(jsonString, (x) => ContainerAuto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ContainerAuto' from JSON`);
|
|
55
|
+
}
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const Container$inboundSchema = z.union([
|
|
58
|
+
z.lazy(() => ContainerAuto$inboundSchema),
|
|
59
|
+
z.string(),
|
|
60
|
+
]);
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const Container$outboundSchema = z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]);
|
|
63
|
+
export function containerToJSON(container) {
|
|
64
|
+
return JSON.stringify(Container$outboundSchema.parse(container));
|
|
65
|
+
}
|
|
66
|
+
export function containerFromJSON(jsonString) {
|
|
67
|
+
return safeParse(jsonString, (x) => Container$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Container' from JSON`);
|
|
68
|
+
}
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const OpenResponsesCodeInterpreterTool$inboundSchema = z.object({
|
|
71
|
+
type: z.literal("code_interpreter"),
|
|
72
|
+
container: z.union([z.lazy(() => ContainerAuto$inboundSchema), z.string()]),
|
|
73
|
+
});
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const OpenResponsesCodeInterpreterTool$outboundSchema = z.object({
|
|
76
|
+
type: z.literal("code_interpreter"),
|
|
77
|
+
container: z.union([z.lazy(() => ContainerAuto$outboundSchema), z.string()]),
|
|
78
|
+
});
|
|
79
|
+
export function openResponsesCodeInterpreterToolToJSON(openResponsesCodeInterpreterTool) {
|
|
80
|
+
return JSON.stringify(OpenResponsesCodeInterpreterTool$outboundSchema.parse(openResponsesCodeInterpreterTool));
|
|
81
|
+
}
|
|
82
|
+
export function openResponsesCodeInterpreterToolFromJSON(jsonString) {
|
|
83
|
+
return safeParse(jsonString, (x) => OpenResponsesCodeInterpreterTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesCodeInterpreterTool' from JSON`);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=openresponsescodeinterpretertool.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const Environment: {
|
|
6
|
+
readonly Windows: "windows";
|
|
7
|
+
readonly Mac: "mac";
|
|
8
|
+
readonly Linux: "linux";
|
|
9
|
+
readonly Ubuntu: "ubuntu";
|
|
10
|
+
readonly Browser: "browser";
|
|
11
|
+
};
|
|
12
|
+
export type Environment = OpenEnum<typeof Environment>;
|
|
13
|
+
/**
|
|
14
|
+
* Computer use preview tool configuration
|
|
15
|
+
*/
|
|
16
|
+
export type OpenResponsesComputerTool = {
|
|
17
|
+
type: "computer_use_preview";
|
|
18
|
+
displayHeight: number;
|
|
19
|
+
displayWidth: number;
|
|
20
|
+
environment: Environment;
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export declare const Environment$inboundSchema: z.ZodType<Environment, unknown>;
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const Environment$outboundSchema: z.ZodType<string, Environment>;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const OpenResponsesComputerTool$inboundSchema: z.ZodType<OpenResponsesComputerTool, unknown>;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type OpenResponsesComputerTool$Outbound = {
|
|
30
|
+
type: "computer_use_preview";
|
|
31
|
+
display_height: number;
|
|
32
|
+
display_width: number;
|
|
33
|
+
environment: string;
|
|
34
|
+
};
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const OpenResponsesComputerTool$outboundSchema: z.ZodType<OpenResponsesComputerTool$Outbound, OpenResponsesComputerTool>;
|
|
37
|
+
export declare function openResponsesComputerToolToJSON(openResponsesComputerTool: OpenResponsesComputerTool): string;
|
|
38
|
+
export declare function openResponsesComputerToolFromJSON(jsonString: string): SafeParseResult<OpenResponsesComputerTool, SDKValidationError>;
|
|
39
|
+
//# sourceMappingURL=openresponsescomputertool.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4cd864e2c4f2
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
export const Environment = {
|
|
10
|
+
Windows: "windows",
|
|
11
|
+
Mac: "mac",
|
|
12
|
+
Linux: "linux",
|
|
13
|
+
Ubuntu: "ubuntu",
|
|
14
|
+
Browser: "browser",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const Environment$inboundSchema = openEnums.inboundSchema(Environment);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const Environment$outboundSchema = openEnums.outboundSchema(Environment);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const OpenResponsesComputerTool$inboundSchema = z.object({
|
|
22
|
+
type: z.literal("computer_use_preview"),
|
|
23
|
+
display_height: z.number(),
|
|
24
|
+
display_width: z.number(),
|
|
25
|
+
environment: Environment$inboundSchema,
|
|
26
|
+
}).transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"display_height": "displayHeight",
|
|
29
|
+
"display_width": "displayWidth",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const OpenResponsesComputerTool$outboundSchema = z.object({
|
|
34
|
+
type: z.literal("computer_use_preview"),
|
|
35
|
+
displayHeight: z.number(),
|
|
36
|
+
displayWidth: z.number(),
|
|
37
|
+
environment: Environment$outboundSchema,
|
|
38
|
+
}).transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
displayHeight: "display_height",
|
|
41
|
+
displayWidth: "display_width",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
export function openResponsesComputerToolToJSON(openResponsesComputerTool) {
|
|
45
|
+
return JSON.stringify(OpenResponsesComputerTool$outboundSchema.parse(openResponsesComputerTool));
|
|
46
|
+
}
|
|
47
|
+
export function openResponsesComputerToolFromJSON(jsonString) {
|
|
48
|
+
return safeParse(jsonString, (x) => OpenResponsesComputerTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesComputerTool' from JSON`);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=openresponsescomputertool.js.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const Syntax: {
|
|
6
|
+
readonly Lark: "lark";
|
|
7
|
+
readonly Regex: "regex";
|
|
8
|
+
};
|
|
9
|
+
export type Syntax = OpenEnum<typeof Syntax>;
|
|
10
|
+
export type FormatGrammar = {
|
|
11
|
+
type: "grammar";
|
|
12
|
+
definition: string;
|
|
13
|
+
syntax: Syntax;
|
|
14
|
+
};
|
|
15
|
+
export type FormatText = {
|
|
16
|
+
type: "text";
|
|
17
|
+
};
|
|
18
|
+
export type Format = FormatText | FormatGrammar;
|
|
19
|
+
/**
|
|
20
|
+
* Custom tool configuration
|
|
21
|
+
*/
|
|
22
|
+
export type OpenResponsesCustomTool = {
|
|
23
|
+
type: "custom";
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
format?: FormatText | FormatGrammar | undefined;
|
|
27
|
+
};
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const Syntax$inboundSchema: z.ZodType<Syntax, unknown>;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare const Syntax$outboundSchema: z.ZodType<string, Syntax>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const FormatGrammar$inboundSchema: z.ZodType<FormatGrammar, unknown>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type FormatGrammar$Outbound = {
|
|
36
|
+
type: "grammar";
|
|
37
|
+
definition: string;
|
|
38
|
+
syntax: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const FormatGrammar$outboundSchema: z.ZodType<FormatGrammar$Outbound, FormatGrammar>;
|
|
42
|
+
export declare function formatGrammarToJSON(formatGrammar: FormatGrammar): string;
|
|
43
|
+
export declare function formatGrammarFromJSON(jsonString: string): SafeParseResult<FormatGrammar, SDKValidationError>;
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const FormatText$inboundSchema: z.ZodType<FormatText, unknown>;
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type FormatText$Outbound = {
|
|
48
|
+
type: "text";
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
export declare const FormatText$outboundSchema: z.ZodType<FormatText$Outbound, FormatText>;
|
|
52
|
+
export declare function formatTextToJSON(formatText: FormatText): string;
|
|
53
|
+
export declare function formatTextFromJSON(jsonString: string): SafeParseResult<FormatText, SDKValidationError>;
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const Format$inboundSchema: z.ZodType<Format, unknown>;
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type Format$Outbound = FormatText$Outbound | FormatGrammar$Outbound;
|
|
58
|
+
/** @internal */
|
|
59
|
+
export declare const Format$outboundSchema: z.ZodType<Format$Outbound, Format>;
|
|
60
|
+
export declare function formatToJSON(format: Format): string;
|
|
61
|
+
export declare function formatFromJSON(jsonString: string): SafeParseResult<Format, SDKValidationError>;
|
|
62
|
+
/** @internal */
|
|
63
|
+
export declare const OpenResponsesCustomTool$inboundSchema: z.ZodType<OpenResponsesCustomTool, unknown>;
|
|
64
|
+
/** @internal */
|
|
65
|
+
export type OpenResponsesCustomTool$Outbound = {
|
|
66
|
+
type: "custom";
|
|
67
|
+
name: string;
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
format?: FormatText$Outbound | FormatGrammar$Outbound | undefined;
|
|
70
|
+
};
|
|
71
|
+
/** @internal */
|
|
72
|
+
export declare const OpenResponsesCustomTool$outboundSchema: z.ZodType<OpenResponsesCustomTool$Outbound, OpenResponsesCustomTool>;
|
|
73
|
+
export declare function openResponsesCustomToolToJSON(openResponsesCustomTool: OpenResponsesCustomTool): string;
|
|
74
|
+
export declare function openResponsesCustomToolFromJSON(jsonString: string): SafeParseResult<OpenResponsesCustomTool, SDKValidationError>;
|
|
75
|
+
//# sourceMappingURL=openresponsescustomtool.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9f957484e6a0
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
export const Syntax = {
|
|
9
|
+
Lark: "lark",
|
|
10
|
+
Regex: "regex",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const Syntax$inboundSchema = openEnums
|
|
14
|
+
.inboundSchema(Syntax);
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const Syntax$outboundSchema = openEnums
|
|
17
|
+
.outboundSchema(Syntax);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const FormatGrammar$inboundSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
type: z.literal("grammar"),
|
|
22
|
+
definition: z.string(),
|
|
23
|
+
syntax: Syntax$inboundSchema,
|
|
24
|
+
});
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const FormatGrammar$outboundSchema = z.object({
|
|
27
|
+
type: z.literal("grammar"),
|
|
28
|
+
definition: z.string(),
|
|
29
|
+
syntax: Syntax$outboundSchema,
|
|
30
|
+
});
|
|
31
|
+
export function formatGrammarToJSON(formatGrammar) {
|
|
32
|
+
return JSON.stringify(FormatGrammar$outboundSchema.parse(formatGrammar));
|
|
33
|
+
}
|
|
34
|
+
export function formatGrammarFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => FormatGrammar$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FormatGrammar' from JSON`);
|
|
36
|
+
}
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const FormatText$inboundSchema = z
|
|
39
|
+
.object({
|
|
40
|
+
type: z.literal("text"),
|
|
41
|
+
});
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const FormatText$outboundSchema = z.object({
|
|
44
|
+
type: z.literal("text"),
|
|
45
|
+
});
|
|
46
|
+
export function formatTextToJSON(formatText) {
|
|
47
|
+
return JSON.stringify(FormatText$outboundSchema.parse(formatText));
|
|
48
|
+
}
|
|
49
|
+
export function formatTextFromJSON(jsonString) {
|
|
50
|
+
return safeParse(jsonString, (x) => FormatText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FormatText' from JSON`);
|
|
51
|
+
}
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const Format$inboundSchema = z.union([
|
|
54
|
+
z.lazy(() => FormatText$inboundSchema),
|
|
55
|
+
z.lazy(() => FormatGrammar$inboundSchema),
|
|
56
|
+
]);
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const Format$outboundSchema = z
|
|
59
|
+
.union([
|
|
60
|
+
z.lazy(() => FormatText$outboundSchema),
|
|
61
|
+
z.lazy(() => FormatGrammar$outboundSchema),
|
|
62
|
+
]);
|
|
63
|
+
export function formatToJSON(format) {
|
|
64
|
+
return JSON.stringify(Format$outboundSchema.parse(format));
|
|
65
|
+
}
|
|
66
|
+
export function formatFromJSON(jsonString) {
|
|
67
|
+
return safeParse(jsonString, (x) => Format$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Format' from JSON`);
|
|
68
|
+
}
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const OpenResponsesCustomTool$inboundSchema = z.object({
|
|
71
|
+
type: z.literal("custom"),
|
|
72
|
+
name: z.string(),
|
|
73
|
+
description: z.string().optional(),
|
|
74
|
+
format: z.union([
|
|
75
|
+
z.lazy(() => FormatText$inboundSchema),
|
|
76
|
+
z.lazy(() => FormatGrammar$inboundSchema),
|
|
77
|
+
]).optional(),
|
|
78
|
+
});
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const OpenResponsesCustomTool$outboundSchema = z.object({
|
|
81
|
+
type: z.literal("custom"),
|
|
82
|
+
name: z.string(),
|
|
83
|
+
description: z.string().optional(),
|
|
84
|
+
format: z.union([
|
|
85
|
+
z.lazy(() => FormatText$outboundSchema),
|
|
86
|
+
z.lazy(() => FormatGrammar$outboundSchema),
|
|
87
|
+
]).optional(),
|
|
88
|
+
});
|
|
89
|
+
export function openResponsesCustomToolToJSON(openResponsesCustomTool) {
|
|
90
|
+
return JSON.stringify(OpenResponsesCustomTool$outboundSchema.parse(openResponsesCustomTool));
|
|
91
|
+
}
|
|
92
|
+
export function openResponsesCustomToolFromJSON(jsonString) {
|
|
93
|
+
return safeParse(jsonString, (x) => OpenResponsesCustomTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesCustomTool' from JSON`);
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=openresponsescustomtool.js.map
|