@mistralai/mistralai 1.10.0 → 1.11.0
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/README.md +21 -7
- package/funcs/audioTranscriptionsStream.d.ts +1 -1
- package/funcs/audioTranscriptionsStream.js +1 -1
- package/funcs/betaAgentsDelete.d.ts +15 -0
- package/funcs/betaAgentsDelete.d.ts.map +1 -0
- package/funcs/betaAgentsDelete.js +121 -0
- package/funcs/betaAgentsDelete.js.map +1 -0
- package/funcs/betaAgentsGet.js +4 -0
- package/funcs/betaAgentsGet.js.map +1 -1
- package/funcs/betaAgentsList.js +5 -0
- package/funcs/betaAgentsList.js.map +1 -1
- package/funcs/betaConversationsDelete.d.ts +18 -0
- package/funcs/betaConversationsDelete.d.ts.map +1 -0
- package/funcs/betaConversationsDelete.js +124 -0
- package/funcs/betaConversationsDelete.js.map +1 -0
- package/funcs/betaConversationsList.js +1 -0
- package/funcs/betaConversationsList.js.map +1 -1
- package/funcs/betaLibrariesDocumentsList.d.ts +1 -1
- package/funcs/betaLibrariesDocumentsList.js +2 -1
- package/funcs/betaLibrariesDocumentsList.js.map +1 -1
- package/funcs/filesList.js +1 -0
- package/funcs/filesList.js.map +1 -1
- package/funcs/modelsList.d.ts +1 -2
- package/funcs/modelsList.d.ts.map +1 -1
- package/funcs/modelsList.js +2 -6
- package/funcs/modelsList.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agent.d.ts +12 -0
- package/models/components/agent.d.ts.map +1 -1
- package/models/components/agent.js +10 -0
- package/models/components/agent.js.map +1 -1
- package/models/components/agentconversation.d.ts +11 -0
- package/models/components/agentconversation.d.ts.map +1 -1
- package/models/components/agentconversation.js +6 -0
- package/models/components/agentconversation.js.map +1 -1
- package/models/components/agentcreationrequest.d.ts +6 -0
- package/models/components/agentcreationrequest.d.ts.map +1 -1
- package/models/components/agentcreationrequest.js +2 -0
- package/models/components/agentcreationrequest.js.map +1 -1
- package/models/components/agentscompletionrequest.d.ts +14 -2
- package/models/components/agentscompletionrequest.d.ts.map +1 -1
- package/models/components/agentscompletionrequest.js +2 -0
- package/models/components/agentscompletionrequest.js.map +1 -1
- package/models/components/agentscompletionstreamrequest.d.ts +14 -2
- package/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
- package/models/components/agentscompletionstreamrequest.js +2 -0
- package/models/components/agentscompletionstreamrequest.js.map +1 -1
- package/models/components/agentupdaterequest.d.ts +8 -0
- package/models/components/agentupdaterequest.d.ts.map +1 -1
- package/models/components/agentupdaterequest.js +6 -0
- package/models/components/agentupdaterequest.js.map +1 -1
- package/models/components/audiotranscriptionrequest.d.ts +3 -0
- package/models/components/audiotranscriptionrequest.d.ts.map +1 -1
- package/models/components/audiotranscriptionrequest.js.map +1 -1
- package/models/components/batchjobin.d.ts +15 -0
- package/models/components/batchjobin.d.ts.map +1 -1
- package/models/components/batchjobin.js.map +1 -1
- package/models/components/chatcompletionrequest.d.ts +26 -2
- package/models/components/chatcompletionrequest.d.ts.map +1 -1
- package/models/components/chatcompletionrequest.js +2 -0
- package/models/components/chatcompletionrequest.js.map +1 -1
- package/models/components/chatcompletionstreamrequest.d.ts +26 -2
- package/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
- package/models/components/chatcompletionstreamrequest.js +2 -0
- package/models/components/chatcompletionstreamrequest.js.map +1 -1
- package/models/components/conversationrequest.d.ts +13 -2
- package/models/components/conversationrequest.d.ts.map +1 -1
- package/models/components/conversationrequest.js +16 -6
- package/models/components/conversationrequest.js.map +1 -1
- package/models/components/conversationrestartrequest.d.ts +14 -0
- package/models/components/conversationrestartrequest.d.ts.map +1 -1
- package/models/components/conversationrestartrequest.js +6 -0
- package/models/components/conversationrestartrequest.js.map +1 -1
- package/models/components/conversationrestartstreamrequest.d.ts +14 -0
- package/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
- package/models/components/conversationrestartstreamrequest.js +6 -0
- package/models/components/conversationrestartstreamrequest.js.map +1 -1
- package/models/components/conversationstreamrequest.d.ts +13 -2
- package/models/components/conversationstreamrequest.d.ts.map +1 -1
- package/models/components/conversationstreamrequest.js +16 -6
- package/models/components/conversationstreamrequest.js.map +1 -1
- package/models/components/documentout.d.ts +18 -10
- package/models/components/documentout.d.ts.map +1 -1
- package/models/components/documentout.js +14 -10
- package/models/components/documentout.js.map +1 -1
- package/models/components/documentupdatein.d.ts +27 -0
- package/models/components/documentupdatein.d.ts.map +1 -1
- package/models/components/documentupdatein.js +66 -1
- package/models/components/documentupdatein.js.map +1 -1
- package/models/components/embeddingrequest.d.ts +4 -4
- package/models/components/fimcompletionrequest.d.ts +7 -5
- package/models/components/fimcompletionrequest.d.ts.map +1 -1
- package/models/components/fimcompletionrequest.js +2 -0
- package/models/components/fimcompletionrequest.js.map +1 -1
- package/models/components/fimcompletionstreamrequest.d.ts +7 -5
- package/models/components/fimcompletionstreamrequest.d.ts.map +1 -1
- package/models/components/fimcompletionstreamrequest.js +2 -0
- package/models/components/fimcompletionstreamrequest.js.map +1 -1
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/libraryout.d.ts +7 -4
- package/models/components/libraryout.d.ts.map +1 -1
- package/models/components/libraryout.js +6 -6
- package/models/components/libraryout.js.map +1 -1
- package/models/components/listfilesout.d.ts +2 -2
- package/models/components/listfilesout.d.ts.map +1 -1
- package/models/components/listfilesout.js +2 -2
- package/models/components/listfilesout.js.map +1 -1
- package/models/components/modelcapabilities.d.ts +8 -2
- package/models/components/modelcapabilities.d.ts.map +1 -1
- package/models/components/modelcapabilities.js +12 -6
- package/models/components/modelcapabilities.js.map +1 -1
- package/models/components/modelconversation.d.ts +9 -0
- package/models/components/modelconversation.d.ts.map +1 -1
- package/models/components/modelconversation.js +2 -0
- package/models/components/modelconversation.js.map +1 -1
- package/models/components/ocrpageobject.d.ts +21 -0
- package/models/components/ocrpageobject.d.ts.map +1 -1
- package/models/components/ocrpageobject.js +9 -0
- package/models/components/ocrpageobject.js.map +1 -1
- package/models/components/ocrrequest.d.ts +32 -0
- package/models/components/ocrrequest.d.ts.map +1 -1
- package/models/components/ocrrequest.js +33 -1
- package/models/components/ocrrequest.js.map +1 -1
- package/models/components/ocrtableobject.d.ts +74 -0
- package/models/components/ocrtableobject.d.ts.map +1 -0
- package/models/components/ocrtableobject.js +96 -0
- package/models/components/ocrtableobject.js.map +1 -0
- package/models/components/prediction.d.ts +3 -0
- package/models/components/prediction.d.ts.map +1 -1
- package/models/components/prediction.js.map +1 -1
- package/models/components/requestsource.d.ts +31 -0
- package/models/components/requestsource.d.ts.map +1 -0
- package/models/components/requestsource.js +61 -0
- package/models/components/requestsource.js.map +1 -0
- package/models/components/responseformat.d.ts +3 -3
- package/models/components/responseformat.d.ts.map +1 -1
- package/models/components/responseformats.d.ts +0 -6
- package/models/components/responseformats.d.ts.map +1 -1
- package/models/components/responseformats.js +0 -3
- package/models/components/responseformats.js.map +1 -1
- package/models/components/sharingdelete.d.ts +2 -2
- package/models/components/sharingdelete.d.ts.map +1 -1
- package/models/components/sharingdelete.js +2 -2
- package/models/components/sharingdelete.js.map +1 -1
- package/models/components/sharingin.d.ts +2 -2
- package/models/components/sharingin.d.ts.map +1 -1
- package/models/components/sharingin.js +2 -2
- package/models/components/sharingin.js.map +1 -1
- package/models/components/sharingout.d.ts +2 -2
- package/models/components/sharingout.d.ts.map +1 -1
- package/models/components/sharingout.js +2 -2
- package/models/components/sharingout.js.map +1 -1
- package/models/components/toolexecutiondeltaevent.d.ts +23 -2
- package/models/components/toolexecutiondeltaevent.d.ts.map +1 -1
- package/models/components/toolexecutiondeltaevent.js +26 -3
- package/models/components/toolexecutiondeltaevent.js.map +1 -1
- package/models/components/toolexecutiondoneevent.d.ts +23 -2
- package/models/components/toolexecutiondoneevent.d.ts.map +1 -1
- package/models/components/toolexecutiondoneevent.js +26 -3
- package/models/components/toolexecutiondoneevent.js.map +1 -1
- package/models/components/toolexecutionentry.d.ts +23 -2
- package/models/components/toolexecutionentry.d.ts.map +1 -1
- package/models/components/toolexecutionentry.js +27 -3
- package/models/components/toolexecutionentry.js.map +1 -1
- package/models/components/toolexecutionstartedevent.d.ts +23 -2
- package/models/components/toolexecutionstartedevent.d.ts.map +1 -1
- package/models/components/toolexecutionstartedevent.js +26 -3
- package/models/components/toolexecutionstartedevent.js.map +1 -1
- package/models/operations/agentsapiv1agentsdelete.d.ts +29 -0
- package/models/operations/agentsapiv1agentsdelete.d.ts.map +1 -0
- package/models/operations/agentsapiv1agentsdelete.js +78 -0
- package/models/operations/agentsapiv1agentsdelete.js.map +1 -0
- package/models/operations/agentsapiv1agentsget.d.ts +2 -0
- package/models/operations/agentsapiv1agentsget.d.ts.map +1 -1
- package/models/operations/agentsapiv1agentsget.js +4 -0
- package/models/operations/agentsapiv1agentsget.js.map +1 -1
- package/models/operations/agentsapiv1agentslist.d.ts +15 -0
- package/models/operations/agentsapiv1agentslist.d.ts.map +1 -1
- package/models/operations/agentsapiv1agentslist.js +15 -0
- package/models/operations/agentsapiv1agentslist.js.map +1 -1
- package/models/operations/agentsapiv1conversationsdelete.d.ts +32 -0
- package/models/operations/agentsapiv1conversationsdelete.d.ts.map +1 -0
- package/models/operations/agentsapiv1conversationsdelete.js +78 -0
- package/models/operations/agentsapiv1conversationsdelete.js.map +1 -0
- package/models/operations/agentsapiv1conversationslist.d.ts +6 -0
- package/models/operations/agentsapiv1conversationslist.d.ts.map +1 -1
- package/models/operations/agentsapiv1conversationslist.js +2 -0
- package/models/operations/agentsapiv1conversationslist.js.map +1 -1
- package/models/operations/filesapirouteslistfiles.d.ts +2 -0
- package/models/operations/filesapirouteslistfiles.d.ts.map +1 -1
- package/models/operations/filesapirouteslistfiles.js +4 -0
- package/models/operations/filesapirouteslistfiles.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/librariesdocumentslistv1.d.ts +2 -0
- package/models/operations/librariesdocumentslistv1.d.ts.map +1 -1
- package/models/operations/librariesdocumentslistv1.js +4 -0
- package/models/operations/librariesdocumentslistv1.js.map +1 -1
- package/package.json +1 -1
- package/sdk/conversations.d.ts +7 -0
- package/sdk/conversations.d.ts.map +1 -1
- package/sdk/conversations.js +10 -0
- package/sdk/conversations.js.map +1 -1
- package/sdk/documents.d.ts +1 -1
- package/sdk/documents.js +1 -1
- package/sdk/mistralagents.d.ts +4 -0
- package/sdk/mistralagents.d.ts.map +1 -1
- package/sdk/mistralagents.js +7 -0
- package/sdk/mistralagents.js.map +1 -1
- package/sdk/transcriptions.d.ts +1 -1
- package/sdk/transcriptions.js +1 -1
- package/src/funcs/audioTranscriptionsStream.ts +1 -1
- package/src/funcs/betaAgentsDelete.ts +174 -0
- package/src/funcs/betaAgentsGet.ts +6 -1
- package/src/funcs/betaAgentsList.ts +5 -0
- package/src/funcs/betaConversationsDelete.ts +179 -0
- package/src/funcs/betaConversationsList.ts +1 -0
- package/src/funcs/betaLibrariesDocumentsList.ts +2 -1
- package/src/funcs/filesList.ts +1 -0
- package/src/funcs/modelsList.ts +2 -11
- package/src/lib/config.ts +2 -2
- package/src/models/components/agent.ts +18 -0
- package/src/models/components/agentconversation.ts +13 -0
- package/src/models/components/agentcreationrequest.ts +4 -0
- package/src/models/components/agentscompletionrequest.ts +12 -2
- package/src/models/components/agentscompletionstreamrequest.ts +12 -2
- package/src/models/components/agentupdaterequest.ts +10 -0
- package/src/models/components/audiotranscriptionrequest.ts +3 -0
- package/src/models/components/batchjobin.ts +15 -0
- package/src/models/components/chatcompletionrequest.ts +24 -2
- package/src/models/components/chatcompletionstreamrequest.ts +24 -2
- package/src/models/components/conversationrequest.ts +79 -72
- package/src/models/components/conversationrestartrequest.ts +16 -0
- package/src/models/components/conversationrestartstreamrequest.ts +16 -0
- package/src/models/components/conversationstreamrequest.ts +79 -72
- package/src/models/components/documentout.ts +28 -20
- package/src/models/components/documentupdatein.ts +144 -0
- package/src/models/components/embeddingrequest.ts +4 -4
- package/src/models/components/fimcompletionrequest.ts +5 -5
- package/src/models/components/fimcompletionstreamrequest.ts +5 -5
- package/src/models/components/index.ts +2 -0
- package/src/models/components/libraryout.ts +13 -10
- package/src/models/components/listfilesout.ts +4 -4
- package/src/models/components/modelcapabilities.ts +20 -8
- package/src/models/components/modelconversation.ts +7 -0
- package/src/models/components/ocrpageobject.ts +34 -0
- package/src/models/components/ocrrequest.ts +44 -0
- package/src/models/components/ocrtableobject.ts +111 -0
- package/src/models/components/prediction.ts +3 -0
- package/src/models/components/requestsource.ts +34 -0
- package/src/models/components/responseformat.ts +3 -3
- package/src/models/components/responseformats.ts +0 -6
- package/src/models/components/sharingdelete.ts +4 -4
- package/src/models/components/sharingin.ts +4 -4
- package/src/models/components/sharingout.ts +4 -4
- package/src/models/components/toolexecutiondeltaevent.ts +56 -4
- package/src/models/components/toolexecutiondoneevent.ts +54 -4
- package/src/models/components/toolexecutionentry.ts +44 -4
- package/src/models/components/toolexecutionstartedevent.ts +56 -4
- package/src/models/operations/agentsapiv1agentsdelete.ts +77 -0
- package/src/models/operations/agentsapiv1agentsget.ts +6 -0
- package/src/models/operations/agentsapiv1agentslist.ts +25 -0
- package/src/models/operations/agentsapiv1conversationsdelete.ts +83 -0
- package/src/models/operations/agentsapiv1conversationslist.ts +4 -0
- package/src/models/operations/filesapirouteslistfiles.ts +6 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/librariesdocumentslistv1.ts +6 -0
- package/src/sdk/conversations.ts +18 -0
- package/src/sdk/documents.ts +1 -1
- package/src/sdk/mistralagents.ts +15 -0
- package/src/sdk/transcriptions.ts +1 -1
- package/.devcontainer/README.md +0 -35
- package/docs/sdks/accesses/README.md +0 -256
- package/docs/sdks/agents/README.md +0 -189
- package/docs/sdks/audio/README.md +0 -6
- package/docs/sdks/batch/README.md +0 -6
- package/docs/sdks/beta/README.md +0 -6
- package/docs/sdks/chat/README.md +0 -189
- package/docs/sdks/classifiers/README.md +0 -355
- package/docs/sdks/conversations/README.md +0 -835
- package/docs/sdks/documents/README.md +0 -785
- package/docs/sdks/embeddings/README.md +0 -92
- package/docs/sdks/files/README.md +0 -455
- package/docs/sdks/fim/README.md +0 -173
- package/docs/sdks/finetuning/README.md +0 -6
- package/docs/sdks/jobs/README.md +0 -379
- package/docs/sdks/libraries/README.md +0 -380
- package/docs/sdks/mistral/README.md +0 -7
- package/docs/sdks/mistralagents/README.md +0 -386
- package/docs/sdks/mistraljobs/README.md +0 -305
- package/docs/sdks/models/README.md +0 -453
- package/docs/sdks/ocr/README.md +0 -92
- package/docs/sdks/transcriptions/README.md +0 -163
- package/examples/README.md +0 -44
- package/packages/mistralai-azure/FUNCTIONS.md +0 -111
- package/packages/mistralai-azure/LICENSE +0 -201
- package/packages/mistralai-azure/README.md +0 -447
- package/packages/mistralai-azure/RUNTIMES.md +0 -48
- package/packages/mistralai-azure/docs/sdks/chat/README.md +0 -114
- package/packages/mistralai-azure/docs/sdks/mistralazure/README.md +0 -9
- package/packages/mistralai-gcp/FUNCTIONS.md +0 -112
- package/packages/mistralai-gcp/LICENSE +0 -201
- package/packages/mistralai-gcp/README.md +0 -455
- package/packages/mistralai-gcp/RUNTIMES.md +0 -48
- package/packages/mistralai-gcp/docs/sdks/chat/README.md +0 -115
- package/packages/mistralai-gcp/docs/sdks/fim/README.md +0 -58
- package/packages/mistralai-gcp/docs/sdks/mistralgcp/README.md +0 -9
- package/src/extra/README.md +0 -52
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -37,6 +38,12 @@ import {
|
|
|
37
38
|
*/
|
|
38
39
|
export type Document = FileChunk | DocumentURLChunk | ImageURLChunk;
|
|
39
40
|
|
|
41
|
+
export const TableFormat = {
|
|
42
|
+
Markdown: "markdown",
|
|
43
|
+
Html: "html",
|
|
44
|
+
} as const;
|
|
45
|
+
export type TableFormat = ClosedEnum<typeof TableFormat>;
|
|
46
|
+
|
|
40
47
|
export type OCRRequest = {
|
|
41
48
|
model: string | null;
|
|
42
49
|
id?: string | undefined;
|
|
@@ -68,6 +75,9 @@ export type OCRRequest = {
|
|
|
68
75
|
* Structured output class for extracting useful information from the entire document. Only json_schema is valid for this field
|
|
69
76
|
*/
|
|
70
77
|
documentAnnotationFormat?: ResponseFormat | null | undefined;
|
|
78
|
+
tableFormat?: TableFormat | null | undefined;
|
|
79
|
+
extractHeader?: boolean | undefined;
|
|
80
|
+
extractFooter?: boolean | undefined;
|
|
71
81
|
};
|
|
72
82
|
|
|
73
83
|
/** @internal */
|
|
@@ -125,6 +135,25 @@ export function documentFromJSON(
|
|
|
125
135
|
);
|
|
126
136
|
}
|
|
127
137
|
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const TableFormat$inboundSchema: z.ZodNativeEnum<typeof TableFormat> = z
|
|
140
|
+
.nativeEnum(TableFormat);
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const TableFormat$outboundSchema: z.ZodNativeEnum<typeof TableFormat> =
|
|
144
|
+
TableFormat$inboundSchema;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
149
|
+
*/
|
|
150
|
+
export namespace TableFormat$ {
|
|
151
|
+
/** @deprecated use `TableFormat$inboundSchema` instead. */
|
|
152
|
+
export const inboundSchema = TableFormat$inboundSchema;
|
|
153
|
+
/** @deprecated use `TableFormat$outboundSchema` instead. */
|
|
154
|
+
export const outboundSchema = TableFormat$outboundSchema;
|
|
155
|
+
}
|
|
156
|
+
|
|
128
157
|
/** @internal */
|
|
129
158
|
export const OCRRequest$inboundSchema: z.ZodType<
|
|
130
159
|
OCRRequest,
|
|
@@ -145,6 +174,9 @@ export const OCRRequest$inboundSchema: z.ZodType<
|
|
|
145
174
|
bbox_annotation_format: z.nullable(ResponseFormat$inboundSchema).optional(),
|
|
146
175
|
document_annotation_format: z.nullable(ResponseFormat$inboundSchema)
|
|
147
176
|
.optional(),
|
|
177
|
+
table_format: z.nullable(TableFormat$inboundSchema).optional(),
|
|
178
|
+
extract_header: z.boolean().optional(),
|
|
179
|
+
extract_footer: z.boolean().optional(),
|
|
148
180
|
}).transform((v) => {
|
|
149
181
|
return remap$(v, {
|
|
150
182
|
"include_image_base64": "includeImageBase64",
|
|
@@ -152,6 +184,9 @@ export const OCRRequest$inboundSchema: z.ZodType<
|
|
|
152
184
|
"image_min_size": "imageMinSize",
|
|
153
185
|
"bbox_annotation_format": "bboxAnnotationFormat",
|
|
154
186
|
"document_annotation_format": "documentAnnotationFormat",
|
|
187
|
+
"table_format": "tableFormat",
|
|
188
|
+
"extract_header": "extractHeader",
|
|
189
|
+
"extract_footer": "extractFooter",
|
|
155
190
|
});
|
|
156
191
|
});
|
|
157
192
|
|
|
@@ -169,6 +204,9 @@ export type OCRRequest$Outbound = {
|
|
|
169
204
|
image_min_size?: number | null | undefined;
|
|
170
205
|
bbox_annotation_format?: ResponseFormat$Outbound | null | undefined;
|
|
171
206
|
document_annotation_format?: ResponseFormat$Outbound | null | undefined;
|
|
207
|
+
table_format?: string | null | undefined;
|
|
208
|
+
extract_header?: boolean | undefined;
|
|
209
|
+
extract_footer?: boolean | undefined;
|
|
172
210
|
};
|
|
173
211
|
|
|
174
212
|
/** @internal */
|
|
@@ -191,6 +229,9 @@ export const OCRRequest$outboundSchema: z.ZodType<
|
|
|
191
229
|
bboxAnnotationFormat: z.nullable(ResponseFormat$outboundSchema).optional(),
|
|
192
230
|
documentAnnotationFormat: z.nullable(ResponseFormat$outboundSchema)
|
|
193
231
|
.optional(),
|
|
232
|
+
tableFormat: z.nullable(TableFormat$outboundSchema).optional(),
|
|
233
|
+
extractHeader: z.boolean().optional(),
|
|
234
|
+
extractFooter: z.boolean().optional(),
|
|
194
235
|
}).transform((v) => {
|
|
195
236
|
return remap$(v, {
|
|
196
237
|
includeImageBase64: "include_image_base64",
|
|
@@ -198,6 +239,9 @@ export const OCRRequest$outboundSchema: z.ZodType<
|
|
|
198
239
|
imageMinSize: "image_min_size",
|
|
199
240
|
bboxAnnotationFormat: "bbox_annotation_format",
|
|
200
241
|
documentAnnotationFormat: "document_annotation_format",
|
|
242
|
+
tableFormat: "table_format",
|
|
243
|
+
extractHeader: "extract_header",
|
|
244
|
+
extractFooter: "extract_footer",
|
|
201
245
|
});
|
|
202
246
|
});
|
|
203
247
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Format of the table
|
|
13
|
+
*/
|
|
14
|
+
export const Format = {
|
|
15
|
+
Markdown: "markdown",
|
|
16
|
+
Html: "html",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Format of the table
|
|
20
|
+
*/
|
|
21
|
+
export type Format = ClosedEnum<typeof Format>;
|
|
22
|
+
|
|
23
|
+
export type OCRTableObject = {
|
|
24
|
+
/**
|
|
25
|
+
* Table ID for extracted table in a page
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Content of the table in the given format
|
|
30
|
+
*/
|
|
31
|
+
content: string;
|
|
32
|
+
/**
|
|
33
|
+
* Format of the table
|
|
34
|
+
*/
|
|
35
|
+
format: Format;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const Format$inboundSchema: z.ZodNativeEnum<typeof Format> = z
|
|
40
|
+
.nativeEnum(Format);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const Format$outboundSchema: z.ZodNativeEnum<typeof Format> =
|
|
44
|
+
Format$inboundSchema;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace Format$ {
|
|
51
|
+
/** @deprecated use `Format$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = Format$inboundSchema;
|
|
53
|
+
/** @deprecated use `Format$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = Format$outboundSchema;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const OCRTableObject$inboundSchema: z.ZodType<
|
|
59
|
+
OCRTableObject,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
unknown
|
|
62
|
+
> = z.object({
|
|
63
|
+
id: z.string(),
|
|
64
|
+
content: z.string(),
|
|
65
|
+
format: Format$inboundSchema,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type OCRTableObject$Outbound = {
|
|
70
|
+
id: string;
|
|
71
|
+
content: string;
|
|
72
|
+
format: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const OCRTableObject$outboundSchema: z.ZodType<
|
|
77
|
+
OCRTableObject$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
OCRTableObject
|
|
80
|
+
> = z.object({
|
|
81
|
+
id: z.string(),
|
|
82
|
+
content: z.string(),
|
|
83
|
+
format: Format$outboundSchema,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
89
|
+
*/
|
|
90
|
+
export namespace OCRTableObject$ {
|
|
91
|
+
/** @deprecated use `OCRTableObject$inboundSchema` instead. */
|
|
92
|
+
export const inboundSchema = OCRTableObject$inboundSchema;
|
|
93
|
+
/** @deprecated use `OCRTableObject$outboundSchema` instead. */
|
|
94
|
+
export const outboundSchema = OCRTableObject$outboundSchema;
|
|
95
|
+
/** @deprecated use `OCRTableObject$Outbound` instead. */
|
|
96
|
+
export type Outbound = OCRTableObject$Outbound;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function ocrTableObjectToJSON(ocrTableObject: OCRTableObject): string {
|
|
100
|
+
return JSON.stringify(OCRTableObject$outboundSchema.parse(ocrTableObject));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function ocrTableObjectFromJSON(
|
|
104
|
+
jsonString: string,
|
|
105
|
+
): SafeParseResult<OCRTableObject, SDKValidationError> {
|
|
106
|
+
return safeParse(
|
|
107
|
+
jsonString,
|
|
108
|
+
(x) => OCRTableObject$inboundSchema.parse(JSON.parse(x)),
|
|
109
|
+
`Failed to parse 'OCRTableObject' from JSON`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -7,6 +7,9 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.
|
|
12
|
+
*/
|
|
10
13
|
export type Prediction = {
|
|
11
14
|
type?: "content" | undefined;
|
|
12
15
|
content?: string | undefined;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const RequestSource = {
|
|
9
|
+
Api: "api",
|
|
10
|
+
Playground: "playground",
|
|
11
|
+
AgentBuilderV1: "agent_builder_v1",
|
|
12
|
+
} as const;
|
|
13
|
+
export type RequestSource = ClosedEnum<typeof RequestSource>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const RequestSource$inboundSchema: z.ZodNativeEnum<
|
|
17
|
+
typeof RequestSource
|
|
18
|
+
> = z.nativeEnum(RequestSource);
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const RequestSource$outboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof RequestSource
|
|
23
|
+
> = RequestSource$inboundSchema;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
|
+
*/
|
|
29
|
+
export namespace RequestSource$ {
|
|
30
|
+
/** @deprecated use `RequestSource$inboundSchema` instead. */
|
|
31
|
+
export const inboundSchema = RequestSource$inboundSchema;
|
|
32
|
+
/** @deprecated use `RequestSource$outboundSchema` instead. */
|
|
33
|
+
export const outboundSchema = RequestSource$outboundSchema;
|
|
34
|
+
}
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
ResponseFormats$outboundSchema,
|
|
20
20
|
} from "./responseformats.js";
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.
|
|
24
|
+
*/
|
|
22
25
|
export type ResponseFormat = {
|
|
23
|
-
/**
|
|
24
|
-
* An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message.
|
|
25
|
-
*/
|
|
26
26
|
type?: ResponseFormats | undefined;
|
|
27
27
|
jsonSchema?: JsonSchema | null | undefined;
|
|
28
28
|
};
|
|
@@ -5,17 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message.
|
|
10
|
-
*/
|
|
11
8
|
export const ResponseFormats = {
|
|
12
9
|
Text: "text",
|
|
13
10
|
JsonObject: "json_object",
|
|
14
11
|
JsonSchema: "json_schema",
|
|
15
12
|
} as const;
|
|
16
|
-
/**
|
|
17
|
-
* An object specifying the format that the model must output. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message.
|
|
18
|
-
*/
|
|
19
13
|
export type ResponseFormats = ClosedEnum<typeof ResponseFormats>;
|
|
20
14
|
|
|
21
15
|
/** @internal */
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./entitytype.js";
|
|
15
15
|
|
|
16
16
|
export type SharingDelete = {
|
|
17
|
-
orgId
|
|
17
|
+
orgId?: string | null | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* The id of the entity (user, workspace or organization) to share with
|
|
20
20
|
*/
|
|
@@ -31,7 +31,7 @@ export const SharingDelete$inboundSchema: z.ZodType<
|
|
|
31
31
|
z.ZodTypeDef,
|
|
32
32
|
unknown
|
|
33
33
|
> = z.object({
|
|
34
|
-
org_id: z.string(),
|
|
34
|
+
org_id: z.nullable(z.string()).optional(),
|
|
35
35
|
share_with_uuid: z.string(),
|
|
36
36
|
share_with_type: EntityType$inboundSchema,
|
|
37
37
|
}).transform((v) => {
|
|
@@ -44,7 +44,7 @@ export const SharingDelete$inboundSchema: z.ZodType<
|
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
46
|
export type SharingDelete$Outbound = {
|
|
47
|
-
org_id
|
|
47
|
+
org_id?: string | null | undefined;
|
|
48
48
|
share_with_uuid: string;
|
|
49
49
|
share_with_type: string;
|
|
50
50
|
};
|
|
@@ -55,7 +55,7 @@ export const SharingDelete$outboundSchema: z.ZodType<
|
|
|
55
55
|
z.ZodTypeDef,
|
|
56
56
|
SharingDelete
|
|
57
57
|
> = z.object({
|
|
58
|
-
orgId: z.string(),
|
|
58
|
+
orgId: z.nullable(z.string()).optional(),
|
|
59
59
|
shareWithUuid: z.string(),
|
|
60
60
|
shareWithType: EntityType$outboundSchema,
|
|
61
61
|
}).transform((v) => {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./shareenum.js";
|
|
20
20
|
|
|
21
21
|
export type SharingIn = {
|
|
22
|
-
orgId
|
|
22
|
+
orgId?: string | null | undefined;
|
|
23
23
|
level: ShareEnum;
|
|
24
24
|
/**
|
|
25
25
|
* The id of the entity (user, workspace or organization) to share with
|
|
@@ -37,7 +37,7 @@ export const SharingIn$inboundSchema: z.ZodType<
|
|
|
37
37
|
z.ZodTypeDef,
|
|
38
38
|
unknown
|
|
39
39
|
> = z.object({
|
|
40
|
-
org_id: z.string(),
|
|
40
|
+
org_id: z.nullable(z.string()).optional(),
|
|
41
41
|
level: ShareEnum$inboundSchema,
|
|
42
42
|
share_with_uuid: z.string(),
|
|
43
43
|
share_with_type: EntityType$inboundSchema,
|
|
@@ -51,7 +51,7 @@ export const SharingIn$inboundSchema: z.ZodType<
|
|
|
51
51
|
|
|
52
52
|
/** @internal */
|
|
53
53
|
export type SharingIn$Outbound = {
|
|
54
|
-
org_id
|
|
54
|
+
org_id?: string | null | undefined;
|
|
55
55
|
level: string;
|
|
56
56
|
share_with_uuid: string;
|
|
57
57
|
share_with_type: string;
|
|
@@ -63,7 +63,7 @@ export const SharingIn$outboundSchema: z.ZodType<
|
|
|
63
63
|
z.ZodTypeDef,
|
|
64
64
|
SharingIn
|
|
65
65
|
> = z.object({
|
|
66
|
-
orgId: z.string(),
|
|
66
|
+
orgId: z.nullable(z.string()).optional(),
|
|
67
67
|
level: ShareEnum$outboundSchema,
|
|
68
68
|
shareWithUuid: z.string(),
|
|
69
69
|
shareWithType: EntityType$outboundSchema,
|
|
@@ -14,7 +14,7 @@ export type SharingOut = {
|
|
|
14
14
|
orgId: string;
|
|
15
15
|
role: string;
|
|
16
16
|
shareWithType: string;
|
|
17
|
-
shareWithUuid: string;
|
|
17
|
+
shareWithUuid: string | null;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/** @internal */
|
|
@@ -28,7 +28,7 @@ export const SharingOut$inboundSchema: z.ZodType<
|
|
|
28
28
|
org_id: z.string(),
|
|
29
29
|
role: z.string(),
|
|
30
30
|
share_with_type: z.string(),
|
|
31
|
-
share_with_uuid: z.string(),
|
|
31
|
+
share_with_uuid: z.nullable(z.string()),
|
|
32
32
|
}).transform((v) => {
|
|
33
33
|
return remap$(v, {
|
|
34
34
|
"library_id": "libraryId",
|
|
@@ -46,7 +46,7 @@ export type SharingOut$Outbound = {
|
|
|
46
46
|
org_id: string;
|
|
47
47
|
role: string;
|
|
48
48
|
share_with_type: string;
|
|
49
|
-
share_with_uuid: string;
|
|
49
|
+
share_with_uuid: string | null;
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
/** @internal */
|
|
@@ -60,7 +60,7 @@ export const SharingOut$outboundSchema: z.ZodType<
|
|
|
60
60
|
orgId: z.string(),
|
|
61
61
|
role: z.string(),
|
|
62
62
|
shareWithType: z.string(),
|
|
63
|
-
shareWithUuid: z.string(),
|
|
63
|
+
shareWithUuid: z.nullable(z.string()),
|
|
64
64
|
}).transform((v) => {
|
|
65
65
|
return remap$(v, {
|
|
66
66
|
libraryId: "library_id",
|
|
@@ -21,12 +21,14 @@ export type ToolExecutionDeltaEventType = ClosedEnum<
|
|
|
21
21
|
typeof ToolExecutionDeltaEventType
|
|
22
22
|
>;
|
|
23
23
|
|
|
24
|
+
export type ToolExecutionDeltaEventName = BuiltInConnectors | string;
|
|
25
|
+
|
|
24
26
|
export type ToolExecutionDeltaEvent = {
|
|
25
27
|
type?: ToolExecutionDeltaEventType | undefined;
|
|
26
28
|
createdAt?: Date | undefined;
|
|
27
29
|
outputIndex?: number | undefined;
|
|
28
30
|
id: string;
|
|
29
|
-
name: BuiltInConnectors;
|
|
31
|
+
name: BuiltInConnectors | string;
|
|
30
32
|
arguments: string;
|
|
31
33
|
};
|
|
32
34
|
|
|
@@ -51,6 +53,56 @@ export namespace ToolExecutionDeltaEventType$ {
|
|
|
51
53
|
export const outboundSchema = ToolExecutionDeltaEventType$outboundSchema;
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const ToolExecutionDeltaEventName$inboundSchema: z.ZodType<
|
|
58
|
+
ToolExecutionDeltaEventName,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
unknown
|
|
61
|
+
> = z.union([BuiltInConnectors$inboundSchema, z.string()]);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type ToolExecutionDeltaEventName$Outbound = string | string;
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const ToolExecutionDeltaEventName$outboundSchema: z.ZodType<
|
|
68
|
+
ToolExecutionDeltaEventName$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
ToolExecutionDeltaEventName
|
|
71
|
+
> = z.union([BuiltInConnectors$outboundSchema, z.string()]);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace ToolExecutionDeltaEventName$ {
|
|
78
|
+
/** @deprecated use `ToolExecutionDeltaEventName$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = ToolExecutionDeltaEventName$inboundSchema;
|
|
80
|
+
/** @deprecated use `ToolExecutionDeltaEventName$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = ToolExecutionDeltaEventName$outboundSchema;
|
|
82
|
+
/** @deprecated use `ToolExecutionDeltaEventName$Outbound` instead. */
|
|
83
|
+
export type Outbound = ToolExecutionDeltaEventName$Outbound;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function toolExecutionDeltaEventNameToJSON(
|
|
87
|
+
toolExecutionDeltaEventName: ToolExecutionDeltaEventName,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
ToolExecutionDeltaEventName$outboundSchema.parse(
|
|
91
|
+
toolExecutionDeltaEventName,
|
|
92
|
+
),
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function toolExecutionDeltaEventNameFromJSON(
|
|
97
|
+
jsonString: string,
|
|
98
|
+
): SafeParseResult<ToolExecutionDeltaEventName, SDKValidationError> {
|
|
99
|
+
return safeParse(
|
|
100
|
+
jsonString,
|
|
101
|
+
(x) => ToolExecutionDeltaEventName$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
+
`Failed to parse 'ToolExecutionDeltaEventName' from JSON`,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
54
106
|
/** @internal */
|
|
55
107
|
export const ToolExecutionDeltaEvent$inboundSchema: z.ZodType<
|
|
56
108
|
ToolExecutionDeltaEvent,
|
|
@@ -64,7 +116,7 @@ export const ToolExecutionDeltaEvent$inboundSchema: z.ZodType<
|
|
|
64
116
|
.optional(),
|
|
65
117
|
output_index: z.number().int().default(0),
|
|
66
118
|
id: z.string(),
|
|
67
|
-
name: BuiltInConnectors$inboundSchema,
|
|
119
|
+
name: z.union([BuiltInConnectors$inboundSchema, z.string()]),
|
|
68
120
|
arguments: z.string(),
|
|
69
121
|
}).transform((v) => {
|
|
70
122
|
return remap$(v, {
|
|
@@ -79,7 +131,7 @@ export type ToolExecutionDeltaEvent$Outbound = {
|
|
|
79
131
|
created_at?: string | undefined;
|
|
80
132
|
output_index: number;
|
|
81
133
|
id: string;
|
|
82
|
-
name: string;
|
|
134
|
+
name: string | string;
|
|
83
135
|
arguments: string;
|
|
84
136
|
};
|
|
85
137
|
|
|
@@ -95,7 +147,7 @@ export const ToolExecutionDeltaEvent$outboundSchema: z.ZodType<
|
|
|
95
147
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
96
148
|
outputIndex: z.number().int().default(0),
|
|
97
149
|
id: z.string(),
|
|
98
|
-
name: BuiltInConnectors$outboundSchema,
|
|
150
|
+
name: z.union([BuiltInConnectors$outboundSchema, z.string()]),
|
|
99
151
|
arguments: z.string(),
|
|
100
152
|
}).transform((v) => {
|
|
101
153
|
return remap$(v, {
|
|
@@ -21,12 +21,14 @@ export type ToolExecutionDoneEventType = ClosedEnum<
|
|
|
21
21
|
typeof ToolExecutionDoneEventType
|
|
22
22
|
>;
|
|
23
23
|
|
|
24
|
+
export type ToolExecutionDoneEventName = BuiltInConnectors | string;
|
|
25
|
+
|
|
24
26
|
export type ToolExecutionDoneEvent = {
|
|
25
27
|
type?: ToolExecutionDoneEventType | undefined;
|
|
26
28
|
createdAt?: Date | undefined;
|
|
27
29
|
outputIndex?: number | undefined;
|
|
28
30
|
id: string;
|
|
29
|
-
name: BuiltInConnectors;
|
|
31
|
+
name: BuiltInConnectors | string;
|
|
30
32
|
info?: { [k: string]: any } | undefined;
|
|
31
33
|
};
|
|
32
34
|
|
|
@@ -51,6 +53,54 @@ export namespace ToolExecutionDoneEventType$ {
|
|
|
51
53
|
export const outboundSchema = ToolExecutionDoneEventType$outboundSchema;
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const ToolExecutionDoneEventName$inboundSchema: z.ZodType<
|
|
58
|
+
ToolExecutionDoneEventName,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
unknown
|
|
61
|
+
> = z.union([BuiltInConnectors$inboundSchema, z.string()]);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type ToolExecutionDoneEventName$Outbound = string | string;
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const ToolExecutionDoneEventName$outboundSchema: z.ZodType<
|
|
68
|
+
ToolExecutionDoneEventName$Outbound,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
ToolExecutionDoneEventName
|
|
71
|
+
> = z.union([BuiltInConnectors$outboundSchema, z.string()]);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace ToolExecutionDoneEventName$ {
|
|
78
|
+
/** @deprecated use `ToolExecutionDoneEventName$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = ToolExecutionDoneEventName$inboundSchema;
|
|
80
|
+
/** @deprecated use `ToolExecutionDoneEventName$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = ToolExecutionDoneEventName$outboundSchema;
|
|
82
|
+
/** @deprecated use `ToolExecutionDoneEventName$Outbound` instead. */
|
|
83
|
+
export type Outbound = ToolExecutionDoneEventName$Outbound;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function toolExecutionDoneEventNameToJSON(
|
|
87
|
+
toolExecutionDoneEventName: ToolExecutionDoneEventName,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
ToolExecutionDoneEventName$outboundSchema.parse(toolExecutionDoneEventName),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function toolExecutionDoneEventNameFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<ToolExecutionDoneEventName, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => ToolExecutionDoneEventName$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'ToolExecutionDoneEventName' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
54
104
|
/** @internal */
|
|
55
105
|
export const ToolExecutionDoneEvent$inboundSchema: z.ZodType<
|
|
56
106
|
ToolExecutionDoneEvent,
|
|
@@ -62,7 +112,7 @@ export const ToolExecutionDoneEvent$inboundSchema: z.ZodType<
|
|
|
62
112
|
.optional(),
|
|
63
113
|
output_index: z.number().int().default(0),
|
|
64
114
|
id: z.string(),
|
|
65
|
-
name: BuiltInConnectors$inboundSchema,
|
|
115
|
+
name: z.union([BuiltInConnectors$inboundSchema, z.string()]),
|
|
66
116
|
info: z.record(z.any()).optional(),
|
|
67
117
|
}).transform((v) => {
|
|
68
118
|
return remap$(v, {
|
|
@@ -77,7 +127,7 @@ export type ToolExecutionDoneEvent$Outbound = {
|
|
|
77
127
|
created_at?: string | undefined;
|
|
78
128
|
output_index: number;
|
|
79
129
|
id: string;
|
|
80
|
-
name: string;
|
|
130
|
+
name: string | string;
|
|
81
131
|
info?: { [k: string]: any } | undefined;
|
|
82
132
|
};
|
|
83
133
|
|
|
@@ -93,7 +143,7 @@ export const ToolExecutionDoneEvent$outboundSchema: z.ZodType<
|
|
|
93
143
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
94
144
|
outputIndex: z.number().int().default(0),
|
|
95
145
|
id: z.string(),
|
|
96
|
-
name: BuiltInConnectors$outboundSchema,
|
|
146
|
+
name: z.union([BuiltInConnectors$outboundSchema, z.string()]),
|
|
97
147
|
info: z.record(z.any()).optional(),
|
|
98
148
|
}).transform((v) => {
|
|
99
149
|
return remap$(v, {
|
|
@@ -26,13 +26,15 @@ export const ToolExecutionEntryType = {
|
|
|
26
26
|
} as const;
|
|
27
27
|
export type ToolExecutionEntryType = ClosedEnum<typeof ToolExecutionEntryType>;
|
|
28
28
|
|
|
29
|
+
export type Name = BuiltInConnectors | string;
|
|
30
|
+
|
|
29
31
|
export type ToolExecutionEntry = {
|
|
30
32
|
object?: ToolExecutionEntryObject | undefined;
|
|
31
33
|
type?: ToolExecutionEntryType | undefined;
|
|
32
34
|
createdAt?: Date | undefined;
|
|
33
35
|
completedAt?: Date | null | undefined;
|
|
34
36
|
id?: string | undefined;
|
|
35
|
-
name: BuiltInConnectors;
|
|
37
|
+
name: BuiltInConnectors | string;
|
|
36
38
|
arguments: string;
|
|
37
39
|
info?: { [k: string]: any } | undefined;
|
|
38
40
|
};
|
|
@@ -79,6 +81,44 @@ export namespace ToolExecutionEntryType$ {
|
|
|
79
81
|
export const outboundSchema = ToolExecutionEntryType$outboundSchema;
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const Name$inboundSchema: z.ZodType<Name, z.ZodTypeDef, unknown> = z
|
|
86
|
+
.union([BuiltInConnectors$inboundSchema, z.string()]);
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export type Name$Outbound = string | string;
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const Name$outboundSchema: z.ZodType<Name$Outbound, z.ZodTypeDef, Name> =
|
|
93
|
+
z.union([BuiltInConnectors$outboundSchema, z.string()]);
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @internal
|
|
97
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
98
|
+
*/
|
|
99
|
+
export namespace Name$ {
|
|
100
|
+
/** @deprecated use `Name$inboundSchema` instead. */
|
|
101
|
+
export const inboundSchema = Name$inboundSchema;
|
|
102
|
+
/** @deprecated use `Name$outboundSchema` instead. */
|
|
103
|
+
export const outboundSchema = Name$outboundSchema;
|
|
104
|
+
/** @deprecated use `Name$Outbound` instead. */
|
|
105
|
+
export type Outbound = Name$Outbound;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function nameToJSON(name: Name): string {
|
|
109
|
+
return JSON.stringify(Name$outboundSchema.parse(name));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function nameFromJSON(
|
|
113
|
+
jsonString: string,
|
|
114
|
+
): SafeParseResult<Name, SDKValidationError> {
|
|
115
|
+
return safeParse(
|
|
116
|
+
jsonString,
|
|
117
|
+
(x) => Name$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'Name' from JSON`,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
82
122
|
/** @internal */
|
|
83
123
|
export const ToolExecutionEntry$inboundSchema: z.ZodType<
|
|
84
124
|
ToolExecutionEntry,
|
|
@@ -93,7 +133,7 @@ export const ToolExecutionEntry$inboundSchema: z.ZodType<
|
|
|
93
133
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
94
134
|
).optional(),
|
|
95
135
|
id: z.string().optional(),
|
|
96
|
-
name: BuiltInConnectors$inboundSchema,
|
|
136
|
+
name: z.union([BuiltInConnectors$inboundSchema, z.string()]),
|
|
97
137
|
arguments: z.string(),
|
|
98
138
|
info: z.record(z.any()).optional(),
|
|
99
139
|
}).transform((v) => {
|
|
@@ -110,7 +150,7 @@ export type ToolExecutionEntry$Outbound = {
|
|
|
110
150
|
created_at?: string | undefined;
|
|
111
151
|
completed_at?: string | null | undefined;
|
|
112
152
|
id?: string | undefined;
|
|
113
|
-
name: string;
|
|
153
|
+
name: string | string;
|
|
114
154
|
arguments: string;
|
|
115
155
|
info?: { [k: string]: any } | undefined;
|
|
116
156
|
};
|
|
@@ -126,7 +166,7 @@ export const ToolExecutionEntry$outboundSchema: z.ZodType<
|
|
|
126
166
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
127
167
|
completedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
128
168
|
id: z.string().optional(),
|
|
129
|
-
name: BuiltInConnectors$outboundSchema,
|
|
169
|
+
name: z.union([BuiltInConnectors$outboundSchema, z.string()]),
|
|
130
170
|
arguments: z.string(),
|
|
131
171
|
info: z.record(z.any()).optional(),
|
|
132
172
|
}).transform((v) => {
|