@meetkai/mka1 0.48.38 → 0.48.39
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/bin/mcp-server.js +1002 -741
- package/bin/mcp-server.js.map +38 -40
- package/dist/commonjs/funcs/llmConversationsCreateItems.d.ts +1 -2
- package/dist/commonjs/funcs/llmConversationsCreateItems.d.ts.map +1 -1
- package/dist/commonjs/funcs/llmConversationsCreateItems.js +1 -2
- package/dist/commonjs/funcs/llmConversationsCreateItems.js.map +1 -1
- package/dist/commonjs/funcs/llmConversationsListItems.d.ts +1 -2
- package/dist/commonjs/funcs/llmConversationsListItems.d.ts.map +1 -1
- package/dist/commonjs/funcs/llmConversationsListItems.js +1 -2
- package/dist/commonjs/funcs/llmConversationsListItems.js.map +1 -1
- package/dist/commonjs/funcs/llmPromptsDelete.js +1 -2
- package/dist/commonjs/funcs/llmPromptsDelete.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/conversationobject.d.ts +3 -0
- package/dist/commonjs/models/components/conversationobject.d.ts.map +1 -1
- package/dist/commonjs/models/components/conversationobject.js.map +1 -1
- package/dist/commonjs/models/components/createconversationrequest.d.ts +3 -0
- package/dist/commonjs/models/components/createconversationrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createconversationrequest.js.map +1 -1
- package/dist/commonjs/models/components/evalfewshotconfig.d.ts +4 -3
- package/dist/commonjs/models/components/evalfewshotconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/evalfewshotconfig.js +3 -2
- package/dist/commonjs/models/components/evalfewshotconfig.js.map +1 -1
- package/dist/commonjs/models/components/evalmetric.d.ts +37 -0
- package/dist/commonjs/models/components/evalmetric.d.ts.map +1 -0
- package/dist/commonjs/models/components/{itemlistobject.js → evalmetric.js} +37 -26
- package/dist/commonjs/models/components/evalmetric.js.map +1 -0
- package/dist/commonjs/models/components/evaltask.d.ts +3 -2
- package/dist/commonjs/models/components/evaltask.d.ts.map +1 -1
- package/dist/commonjs/models/components/evaltask.js +3 -2
- package/dist/commonjs/models/components/evaltask.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -3
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -3
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/livekittokenrequest.d.ts +3 -0
- package/dist/commonjs/models/components/livekittokenrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/livekittokenrequest.js.map +1 -1
- package/dist/commonjs/models/components/responseobject.d.ts +2 -11
- package/dist/commonjs/models/components/responseobject.d.ts.map +1 -1
- package/dist/commonjs/models/components/responseobject.js +3 -15
- package/dist/commonjs/models/components/responseobject.js.map +1 -1
- package/dist/commonjs/models/components/responsescreaterequest.d.ts +3 -0
- package/dist/commonjs/models/components/responsescreaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/responsescreaterequest.js.map +1 -1
- package/dist/commonjs/models/components/update.d.ts +3 -0
- package/dist/commonjs/models/components/update.d.ts.map +1 -1
- package/dist/commonjs/models/components/update.js.map +1 -1
- package/dist/commonjs/models/components/updateresponserequest.d.ts +3 -0
- package/dist/commonjs/models/components/updateresponserequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/updateresponserequest.js.map +1 -1
- package/dist/commonjs/models/operations/conversationsitemscreate.d.ts +123 -0
- package/dist/commonjs/models/operations/conversationsitemscreate.d.ts.map +1 -1
- package/dist/commonjs/models/operations/conversationsitemscreate.js +219 -1
- package/dist/commonjs/models/operations/conversationsitemscreate.js.map +1 -1
- package/dist/commonjs/models/operations/conversationsitemslist.d.ts +123 -0
- package/dist/commonjs/models/operations/conversationsitemslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/conversationsitemslist.js +220 -1
- package/dist/commonjs/models/operations/conversationsitemslist.js.map +1 -1
- package/dist/commonjs/models/operations/conversationsitemsretrieve.d.ts +85 -2
- package/dist/commonjs/models/operations/conversationsitemsretrieve.d.ts.map +1 -1
- package/dist/commonjs/models/operations/conversationsitemsretrieve.js +73 -3
- package/dist/commonjs/models/operations/conversationsitemsretrieve.js.map +1 -1
- package/dist/commonjs/models/operations/deleteprompt.d.ts +0 -11
- package/dist/commonjs/models/operations/deleteprompt.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deleteprompt.js +1 -17
- package/dist/commonjs/models/operations/deleteprompt.js.map +1 -1
- package/dist/commonjs/models/operations/listevalsuiteversions.d.ts +8 -8
- package/dist/commonjs/models/operations/listevalsuiteversions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listevalsuiteversions.js +11 -12
- package/dist/commonjs/models/operations/listevalsuiteversions.js.map +1 -1
- package/dist/commonjs/react-query/llmConversationsCreateItems.d.ts +1 -2
- package/dist/commonjs/react-query/llmConversationsCreateItems.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmConversationsCreateItems.js.map +1 -1
- package/dist/commonjs/react-query/llmConversationsListItems.core.d.ts +1 -2
- package/dist/commonjs/react-query/llmConversationsListItems.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmConversationsListItems.core.js.map +1 -1
- package/dist/commonjs/sdk/conversations.d.ts +2 -2
- package/dist/commonjs/sdk/conversations.d.ts.map +1 -1
- package/dist/esm/funcs/llmConversationsCreateItems.d.ts +1 -2
- package/dist/esm/funcs/llmConversationsCreateItems.d.ts.map +1 -1
- package/dist/esm/funcs/llmConversationsCreateItems.js +1 -2
- package/dist/esm/funcs/llmConversationsCreateItems.js.map +1 -1
- package/dist/esm/funcs/llmConversationsListItems.d.ts +1 -2
- package/dist/esm/funcs/llmConversationsListItems.d.ts.map +1 -1
- package/dist/esm/funcs/llmConversationsListItems.js +1 -2
- package/dist/esm/funcs/llmConversationsListItems.js.map +1 -1
- package/dist/esm/funcs/llmPromptsDelete.js +2 -3
- package/dist/esm/funcs/llmPromptsDelete.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/conversationobject.d.ts +3 -0
- package/dist/esm/models/components/conversationobject.d.ts.map +1 -1
- package/dist/esm/models/components/conversationobject.js.map +1 -1
- package/dist/esm/models/components/createconversationrequest.d.ts +3 -0
- package/dist/esm/models/components/createconversationrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createconversationrequest.js.map +1 -1
- package/dist/esm/models/components/evalfewshotconfig.d.ts +4 -3
- package/dist/esm/models/components/evalfewshotconfig.d.ts.map +1 -1
- package/dist/esm/models/components/evalfewshotconfig.js +3 -2
- package/dist/esm/models/components/evalfewshotconfig.js.map +1 -1
- package/dist/esm/models/components/evalmetric.d.ts +37 -0
- package/dist/esm/models/components/evalmetric.d.ts.map +1 -0
- package/dist/esm/models/components/evalmetric.js +49 -0
- package/dist/esm/models/components/evalmetric.js.map +1 -0
- package/dist/esm/models/components/evaltask.d.ts +3 -2
- package/dist/esm/models/components/evaltask.d.ts.map +1 -1
- package/dist/esm/models/components/evaltask.js +3 -2
- package/dist/esm/models/components/evaltask.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -3
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -3
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/livekittokenrequest.d.ts +3 -0
- package/dist/esm/models/components/livekittokenrequest.d.ts.map +1 -1
- package/dist/esm/models/components/livekittokenrequest.js.map +1 -1
- package/dist/esm/models/components/responseobject.d.ts +2 -11
- package/dist/esm/models/components/responseobject.d.ts.map +1 -1
- package/dist/esm/models/components/responseobject.js +2 -12
- package/dist/esm/models/components/responseobject.js.map +1 -1
- package/dist/esm/models/components/responsescreaterequest.d.ts +3 -0
- package/dist/esm/models/components/responsescreaterequest.d.ts.map +1 -1
- package/dist/esm/models/components/responsescreaterequest.js.map +1 -1
- package/dist/esm/models/components/update.d.ts +3 -0
- package/dist/esm/models/components/update.d.ts.map +1 -1
- package/dist/esm/models/components/update.js.map +1 -1
- package/dist/esm/models/components/updateresponserequest.d.ts +3 -0
- package/dist/esm/models/components/updateresponserequest.d.ts.map +1 -1
- package/dist/esm/models/components/updateresponserequest.js.map +1 -1
- package/dist/esm/models/operations/conversationsitemscreate.d.ts +123 -0
- package/dist/esm/models/operations/conversationsitemscreate.d.ts.map +1 -1
- package/dist/esm/models/operations/conversationsitemscreate.js +210 -0
- package/dist/esm/models/operations/conversationsitemscreate.js.map +1 -1
- package/dist/esm/models/operations/conversationsitemslist.d.ts +123 -0
- package/dist/esm/models/operations/conversationsitemslist.d.ts.map +1 -1
- package/dist/esm/models/operations/conversationsitemslist.js +211 -0
- package/dist/esm/models/operations/conversationsitemslist.js.map +1 -1
- package/dist/esm/models/operations/conversationsitemsretrieve.d.ts +85 -2
- package/dist/esm/models/operations/conversationsitemsretrieve.d.ts.map +1 -1
- package/dist/esm/models/operations/conversationsitemsretrieve.js +68 -2
- package/dist/esm/models/operations/conversationsitemsretrieve.js.map +1 -1
- package/dist/esm/models/operations/deleteprompt.d.ts +0 -11
- package/dist/esm/models/operations/deleteprompt.d.ts.map +1 -1
- package/dist/esm/models/operations/deleteprompt.js +0 -14
- package/dist/esm/models/operations/deleteprompt.js.map +1 -1
- package/dist/esm/models/operations/listevalsuiteversions.d.ts +8 -8
- package/dist/esm/models/operations/listevalsuiteversions.d.ts.map +1 -1
- package/dist/esm/models/operations/listevalsuiteversions.js +8 -9
- package/dist/esm/models/operations/listevalsuiteversions.js.map +1 -1
- package/dist/esm/react-query/llmConversationsCreateItems.d.ts +1 -2
- package/dist/esm/react-query/llmConversationsCreateItems.d.ts.map +1 -1
- package/dist/esm/react-query/llmConversationsCreateItems.js.map +1 -1
- package/dist/esm/react-query/llmConversationsListItems.core.d.ts +1 -2
- package/dist/esm/react-query/llmConversationsListItems.core.d.ts.map +1 -1
- package/dist/esm/react-query/llmConversationsListItems.core.js.map +1 -1
- package/dist/esm/sdk/conversations.d.ts +2 -2
- package/dist/esm/sdk/conversations.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/llmConversationsCreateItems.ts +4 -5
- package/src/funcs/llmConversationsListItems.ts +4 -5
- package/src/funcs/llmPromptsDelete.ts +2 -3
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/conversationobject.ts +3 -0
- package/src/models/components/createconversationrequest.ts +3 -0
- package/src/models/components/evalfewshotconfig.ts +11 -5
- package/src/models/components/evalmetric.ts +96 -0
- package/src/models/components/evaltask.ts +10 -4
- package/src/models/components/index.ts +1 -3
- package/src/models/components/livekittokenrequest.ts +3 -0
- package/src/models/components/responseobject.ts +4 -47
- package/src/models/components/responsescreaterequest.ts +3 -0
- package/src/models/components/update.ts +3 -0
- package/src/models/components/updateresponserequest.ts +3 -0
- package/src/models/operations/conversationsitemscreate.ts +488 -0
- package/src/models/operations/conversationsitemslist.ts +496 -0
- package/src/models/operations/conversationsitemsretrieve.ts +168 -4
- package/src/models/operations/deleteprompt.ts +0 -41
- package/src/models/operations/listevalsuiteversions.ts +54 -44
- package/src/react-query/llmConversationsCreateItems.ts +2 -2
- package/src/react-query/llmConversationsListItems.core.ts +2 -2
- package/src/sdk/conversations.ts +2 -2
- package/dist/commonjs/models/components/inputmessagewithid.d.ts +0 -89
- package/dist/commonjs/models/components/inputmessagewithid.d.ts.map +0 -1
- package/dist/commonjs/models/components/inputmessagewithid.js +0 -106
- package/dist/commonjs/models/components/inputmessagewithid.js.map +0 -1
- package/dist/commonjs/models/components/itemlistobject.d.ts +0 -33
- package/dist/commonjs/models/components/itemlistobject.d.ts.map +0 -1
- package/dist/commonjs/models/components/itemlistobject.js.map +0 -1
- package/dist/commonjs/models/components/itemwithid.d.ts +0 -37
- package/dist/commonjs/models/components/itemwithid.d.ts.map +0 -1
- package/dist/commonjs/models/components/itemwithid.js +0 -128
- package/dist/commonjs/models/components/itemwithid.js.map +0 -1
- package/dist/esm/models/components/inputmessagewithid.d.ts +0 -89
- package/dist/esm/models/components/inputmessagewithid.d.ts.map +0 -1
- package/dist/esm/models/components/inputmessagewithid.js +0 -66
- package/dist/esm/models/components/inputmessagewithid.js.map +0 -1
- package/dist/esm/models/components/itemlistobject.d.ts +0 -33
- package/dist/esm/models/components/itemlistobject.d.ts.map +0 -1
- package/dist/esm/models/components/itemlistobject.js +0 -38
- package/dist/esm/models/components/itemlistobject.js.map +0 -1
- package/dist/esm/models/components/itemwithid.d.ts +0 -37
- package/dist/esm/models/components/itemwithid.d.ts.map +0 -1
- package/dist/esm/models/components/itemwithid.js +0 -90
- package/dist/esm/models/components/itemwithid.js.map +0 -1
- package/src/models/components/inputmessagewithid.ts +0 -183
- package/src/models/components/itemlistobject.ts +0 -85
- package/src/models/components/itemwithid.ts +0 -281
|
@@ -184,11 +184,9 @@ export type ResponseObjectFiltersType = ClosedEnum<
|
|
|
184
184
|
typeof ResponseObjectFiltersType
|
|
185
185
|
>;
|
|
186
186
|
|
|
187
|
-
export type ResponseObjectFiltersFilters = ComparisonFilter | any;
|
|
188
|
-
|
|
189
187
|
export type ResponseObjectFilters2 = {
|
|
190
188
|
type: ResponseObjectFiltersType;
|
|
191
|
-
filters: Array<
|
|
189
|
+
filters: Array<any | null>;
|
|
192
190
|
};
|
|
193
191
|
|
|
194
192
|
export type FiltersFilters =
|
|
@@ -381,43 +379,6 @@ export const ResponseObjectFiltersType$outboundSchema: z.ZodNativeEnum<
|
|
|
381
379
|
typeof ResponseObjectFiltersType
|
|
382
380
|
> = ResponseObjectFiltersType$inboundSchema;
|
|
383
381
|
|
|
384
|
-
/** @internal */
|
|
385
|
-
export const ResponseObjectFiltersFilters$inboundSchema: z.ZodType<
|
|
386
|
-
ResponseObjectFiltersFilters,
|
|
387
|
-
z.ZodTypeDef,
|
|
388
|
-
unknown
|
|
389
|
-
> = z.union([ComparisonFilter$inboundSchema, z.any()]);
|
|
390
|
-
/** @internal */
|
|
391
|
-
export type ResponseObjectFiltersFilters$Outbound =
|
|
392
|
-
| ComparisonFilter$Outbound
|
|
393
|
-
| any;
|
|
394
|
-
|
|
395
|
-
/** @internal */
|
|
396
|
-
export const ResponseObjectFiltersFilters$outboundSchema: z.ZodType<
|
|
397
|
-
ResponseObjectFiltersFilters$Outbound,
|
|
398
|
-
z.ZodTypeDef,
|
|
399
|
-
ResponseObjectFiltersFilters
|
|
400
|
-
> = z.union([ComparisonFilter$outboundSchema, z.any()]);
|
|
401
|
-
|
|
402
|
-
export function responseObjectFiltersFiltersToJSON(
|
|
403
|
-
responseObjectFiltersFilters: ResponseObjectFiltersFilters,
|
|
404
|
-
): string {
|
|
405
|
-
return JSON.stringify(
|
|
406
|
-
ResponseObjectFiltersFilters$outboundSchema.parse(
|
|
407
|
-
responseObjectFiltersFilters,
|
|
408
|
-
),
|
|
409
|
-
);
|
|
410
|
-
}
|
|
411
|
-
export function responseObjectFiltersFiltersFromJSON(
|
|
412
|
-
jsonString: string,
|
|
413
|
-
): SafeParseResult<ResponseObjectFiltersFilters, SDKValidationError> {
|
|
414
|
-
return safeParse(
|
|
415
|
-
jsonString,
|
|
416
|
-
(x) => ResponseObjectFiltersFilters$inboundSchema.parse(JSON.parse(x)),
|
|
417
|
-
`Failed to parse 'ResponseObjectFiltersFilters' from JSON`,
|
|
418
|
-
);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
382
|
/** @internal */
|
|
422
383
|
export const ResponseObjectFilters2$inboundSchema: z.ZodType<
|
|
423
384
|
ResponseObjectFilters2,
|
|
@@ -425,14 +386,12 @@ export const ResponseObjectFilters2$inboundSchema: z.ZodType<
|
|
|
425
386
|
unknown
|
|
426
387
|
> = z.object({
|
|
427
388
|
type: ResponseObjectFiltersType$inboundSchema,
|
|
428
|
-
filters: z.array(
|
|
429
|
-
z.nullable(z.union([ComparisonFilter$inboundSchema, z.any()])),
|
|
430
|
-
),
|
|
389
|
+
filters: z.array(z.nullable(z.any())),
|
|
431
390
|
});
|
|
432
391
|
/** @internal */
|
|
433
392
|
export type ResponseObjectFilters2$Outbound = {
|
|
434
393
|
type: string;
|
|
435
|
-
filters: Array<
|
|
394
|
+
filters: Array<any | null>;
|
|
436
395
|
};
|
|
437
396
|
|
|
438
397
|
/** @internal */
|
|
@@ -442,9 +401,7 @@ export const ResponseObjectFilters2$outboundSchema: z.ZodType<
|
|
|
442
401
|
ResponseObjectFilters2
|
|
443
402
|
> = z.object({
|
|
444
403
|
type: ResponseObjectFiltersType$outboundSchema,
|
|
445
|
-
filters: z.array(
|
|
446
|
-
z.nullable(z.union([ComparisonFilter$outboundSchema, z.any()])),
|
|
447
|
-
),
|
|
404
|
+
filters: z.array(z.nullable(z.any())),
|
|
448
405
|
});
|
|
449
406
|
|
|
450
407
|
export function responseObjectFilters2ToJSON(
|
|
@@ -430,6 +430,9 @@ export type ResponsesCreateRequest = {
|
|
|
430
430
|
* A stable identifier used to help detect and prevent policy violations across multiple requests. Helps the system identify patterns of abuse or misuse. Useful for compliance tracking and safety monitoring.
|
|
431
431
|
*/
|
|
432
432
|
safetyIdentifier?: string | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* Custom metadata to attach to this response as key-value pairs. Keys must be strings up to 64 characters, values must be strings up to 512 characters. Maximum 16 pairs. Useful for tracking, categorization, or passing custom identifiers through your system.
|
|
435
|
+
*/
|
|
433
436
|
metadata?: { [k: string]: string } | undefined;
|
|
434
437
|
/**
|
|
435
438
|
* Output types that the model should generate. Defaults to ['text']. Include 'audio' to receive an audio rendering of the text response via TTS.
|
|
@@ -8,6 +8,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type Update = {
|
|
11
|
+
/**
|
|
12
|
+
* Set of 16 key-value pairs to update.
|
|
13
|
+
*/
|
|
11
14
|
metadata: { [k: string]: string };
|
|
12
15
|
};
|
|
13
16
|
|
|
@@ -11,6 +11,9 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
* Request schema for updating a response's metadata.
|
|
12
12
|
*/
|
|
13
13
|
export type UpdateResponseRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* Set of 16 key-value pairs to update. Keys must be strings up to 64 characters, values must be strings up to 512 characters.
|
|
16
|
+
*/
|
|
14
17
|
metadata: { [k: string]: string };
|
|
15
18
|
};
|
|
16
19
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
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 * as components from "../components/index.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -18,6 +19,129 @@ export type ConversationsItemsCreateRequest = {
|
|
|
18
19
|
createItemsRequest: components.CreateItemsRequest;
|
|
19
20
|
};
|
|
20
21
|
|
|
22
|
+
/**
|
|
23
|
+
* The role of the message sender (user, assistant, system, or developer).
|
|
24
|
+
*/
|
|
25
|
+
export const DataRole = {
|
|
26
|
+
User: "user",
|
|
27
|
+
Assistant: "assistant",
|
|
28
|
+
System: "system",
|
|
29
|
+
Developer: "developer",
|
|
30
|
+
} as const;
|
|
31
|
+
/**
|
|
32
|
+
* The role of the message sender (user, assistant, system, or developer).
|
|
33
|
+
*/
|
|
34
|
+
export type DataRole = ClosedEnum<typeof DataRole>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The message content. Can be a simple text string or an array of multimodal content items (text, images, files, audio).
|
|
38
|
+
*/
|
|
39
|
+
export type DataContent = string | Array<components.InputMessageContent>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Input message item: A message with role and content. Use this for user, assistant, system, or developer turns in structured inputs.
|
|
43
|
+
*/
|
|
44
|
+
export type DataInputMessageItem = {
|
|
45
|
+
/**
|
|
46
|
+
* The item type identifier. Always 'message' for message items.
|
|
47
|
+
*/
|
|
48
|
+
type?: "message" | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* The role of the message sender (user, assistant, system, or developer).
|
|
51
|
+
*/
|
|
52
|
+
role: DataRole;
|
|
53
|
+
/**
|
|
54
|
+
* The message content. Can be a simple text string or an array of multimodal content items (text, images, files, audio).
|
|
55
|
+
*/
|
|
56
|
+
content: string | Array<components.InputMessageContent>;
|
|
57
|
+
/**
|
|
58
|
+
* The processing status of an individual item. 'in_progress' means currently processing, 'completed' means finished successfully, 'incomplete' means processing stopped before completion.
|
|
59
|
+
*/
|
|
60
|
+
status?: components.Status | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* The unique ID of the message.
|
|
63
|
+
*/
|
|
64
|
+
id: string;
|
|
65
|
+
/**
|
|
66
|
+
* The ID of the response that created this item, if any.
|
|
67
|
+
*/
|
|
68
|
+
responseId?: string | null | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Metadata from the response that created this item, if any.
|
|
71
|
+
*/
|
|
72
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type ConversationsItemsCreateData =
|
|
76
|
+
| components.ComputerToolCallWithId
|
|
77
|
+
| components.CodeInterpreterToolCallWithId
|
|
78
|
+
| components.OutputMessageWithId
|
|
79
|
+
| components.OutputAudioItemWithId
|
|
80
|
+
| components.FunctionToolCallWithId
|
|
81
|
+
| components.LocalShellCallWithId
|
|
82
|
+
| components.ShellCallWithId
|
|
83
|
+
| components.MCPApprovalRequestWithId
|
|
84
|
+
| components.MCPToolCallWithId
|
|
85
|
+
| components.CustomToolCallWithId
|
|
86
|
+
| components.FileSearchToolCallWithId
|
|
87
|
+
| components.ComputerToolCallOutputWithId
|
|
88
|
+
| components.WebSearchToolCallWithId
|
|
89
|
+
| components.FunctionToolCallOutputWithId
|
|
90
|
+
| components.ImageGenerationCallWithId
|
|
91
|
+
| components.ShellCallOutputWithId
|
|
92
|
+
| components.MCPListToolsWithId
|
|
93
|
+
| components.MCPApprovalResponseWithId
|
|
94
|
+
| components.CustomToolCallOutputWithId
|
|
95
|
+
| DataInputMessageItem
|
|
96
|
+
| components.ReasoningWithId
|
|
97
|
+
| components.LocalShellCallOutputWithId
|
|
98
|
+
| components.ResponseCompactionItemWithId
|
|
99
|
+
| components.ItemReferenceWithId;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* OK
|
|
103
|
+
*/
|
|
104
|
+
export type ConversationsItemsCreateResponseBody = {
|
|
105
|
+
object?: "list" | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* A list of conversation items.
|
|
108
|
+
*/
|
|
109
|
+
data: Array<
|
|
110
|
+
| components.ComputerToolCallWithId
|
|
111
|
+
| components.CodeInterpreterToolCallWithId
|
|
112
|
+
| components.OutputMessageWithId
|
|
113
|
+
| components.OutputAudioItemWithId
|
|
114
|
+
| components.FunctionToolCallWithId
|
|
115
|
+
| components.LocalShellCallWithId
|
|
116
|
+
| components.ShellCallWithId
|
|
117
|
+
| components.MCPApprovalRequestWithId
|
|
118
|
+
| components.MCPToolCallWithId
|
|
119
|
+
| components.CustomToolCallWithId
|
|
120
|
+
| components.FileSearchToolCallWithId
|
|
121
|
+
| components.ComputerToolCallOutputWithId
|
|
122
|
+
| components.WebSearchToolCallWithId
|
|
123
|
+
| components.FunctionToolCallOutputWithId
|
|
124
|
+
| components.ImageGenerationCallWithId
|
|
125
|
+
| components.ShellCallOutputWithId
|
|
126
|
+
| components.MCPListToolsWithId
|
|
127
|
+
| components.MCPApprovalResponseWithId
|
|
128
|
+
| components.CustomToolCallOutputWithId
|
|
129
|
+
| DataInputMessageItem
|
|
130
|
+
| components.ReasoningWithId
|
|
131
|
+
| components.LocalShellCallOutputWithId
|
|
132
|
+
| components.ResponseCompactionItemWithId
|
|
133
|
+
| components.ItemReferenceWithId
|
|
134
|
+
>;
|
|
135
|
+
/**
|
|
136
|
+
* Whether there are more items
|
|
137
|
+
*/
|
|
138
|
+
hasMore: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* ID of the last item in the current page
|
|
141
|
+
*/
|
|
142
|
+
lastId: string;
|
|
143
|
+
};
|
|
144
|
+
|
|
21
145
|
/** @internal */
|
|
22
146
|
export const ConversationsItemsCreateRequest$inboundSchema: z.ZodType<
|
|
23
147
|
ConversationsItemsCreateRequest,
|
|
@@ -76,3 +200,367 @@ export function conversationsItemsCreateRequestFromJSON(
|
|
|
76
200
|
`Failed to parse 'ConversationsItemsCreateRequest' from JSON`,
|
|
77
201
|
);
|
|
78
202
|
}
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const DataRole$inboundSchema: z.ZodNativeEnum<typeof DataRole> = z
|
|
206
|
+
.nativeEnum(DataRole);
|
|
207
|
+
/** @internal */
|
|
208
|
+
export const DataRole$outboundSchema: z.ZodNativeEnum<typeof DataRole> =
|
|
209
|
+
DataRole$inboundSchema;
|
|
210
|
+
|
|
211
|
+
/** @internal */
|
|
212
|
+
export const DataContent$inboundSchema: z.ZodType<
|
|
213
|
+
DataContent,
|
|
214
|
+
z.ZodTypeDef,
|
|
215
|
+
unknown
|
|
216
|
+
> = z.union([
|
|
217
|
+
z.string(),
|
|
218
|
+
z.array(components.InputMessageContent$inboundSchema),
|
|
219
|
+
]);
|
|
220
|
+
/** @internal */
|
|
221
|
+
export type DataContent$Outbound =
|
|
222
|
+
| string
|
|
223
|
+
| Array<components.InputMessageContent$Outbound>;
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const DataContent$outboundSchema: z.ZodType<
|
|
227
|
+
DataContent$Outbound,
|
|
228
|
+
z.ZodTypeDef,
|
|
229
|
+
DataContent
|
|
230
|
+
> = z.union([
|
|
231
|
+
z.string(),
|
|
232
|
+
z.array(components.InputMessageContent$outboundSchema),
|
|
233
|
+
]);
|
|
234
|
+
|
|
235
|
+
export function dataContentToJSON(dataContent: DataContent): string {
|
|
236
|
+
return JSON.stringify(DataContent$outboundSchema.parse(dataContent));
|
|
237
|
+
}
|
|
238
|
+
export function dataContentFromJSON(
|
|
239
|
+
jsonString: string,
|
|
240
|
+
): SafeParseResult<DataContent, SDKValidationError> {
|
|
241
|
+
return safeParse(
|
|
242
|
+
jsonString,
|
|
243
|
+
(x) => DataContent$inboundSchema.parse(JSON.parse(x)),
|
|
244
|
+
`Failed to parse 'DataContent' from JSON`,
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export const DataInputMessageItem$inboundSchema: z.ZodType<
|
|
250
|
+
DataInputMessageItem,
|
|
251
|
+
z.ZodTypeDef,
|
|
252
|
+
unknown
|
|
253
|
+
> = z.object({
|
|
254
|
+
type: z.literal("message").optional(),
|
|
255
|
+
role: DataRole$inboundSchema,
|
|
256
|
+
content: z.union([
|
|
257
|
+
z.string(),
|
|
258
|
+
z.array(components.InputMessageContent$inboundSchema),
|
|
259
|
+
]),
|
|
260
|
+
status: components.Status$inboundSchema.optional(),
|
|
261
|
+
id: z.string(),
|
|
262
|
+
response_id: z.nullable(z.string()).optional(),
|
|
263
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
264
|
+
}).transform((v) => {
|
|
265
|
+
return remap$(v, {
|
|
266
|
+
"response_id": "responseId",
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
/** @internal */
|
|
270
|
+
export type DataInputMessageItem$Outbound = {
|
|
271
|
+
type?: "message" | undefined;
|
|
272
|
+
role: string;
|
|
273
|
+
content: string | Array<components.InputMessageContent$Outbound>;
|
|
274
|
+
status?: string | undefined;
|
|
275
|
+
id: string;
|
|
276
|
+
response_id?: string | null | undefined;
|
|
277
|
+
metadata?: { [k: string]: string } | null | undefined;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
/** @internal */
|
|
281
|
+
export const DataInputMessageItem$outboundSchema: z.ZodType<
|
|
282
|
+
DataInputMessageItem$Outbound,
|
|
283
|
+
z.ZodTypeDef,
|
|
284
|
+
DataInputMessageItem
|
|
285
|
+
> = z.object({
|
|
286
|
+
type: z.literal("message").optional(),
|
|
287
|
+
role: DataRole$outboundSchema,
|
|
288
|
+
content: z.union([
|
|
289
|
+
z.string(),
|
|
290
|
+
z.array(components.InputMessageContent$outboundSchema),
|
|
291
|
+
]),
|
|
292
|
+
status: components.Status$outboundSchema.optional(),
|
|
293
|
+
id: z.string(),
|
|
294
|
+
responseId: z.nullable(z.string()).optional(),
|
|
295
|
+
metadata: z.nullable(z.record(z.string())).optional(),
|
|
296
|
+
}).transform((v) => {
|
|
297
|
+
return remap$(v, {
|
|
298
|
+
responseId: "response_id",
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
export function dataInputMessageItemToJSON(
|
|
303
|
+
dataInputMessageItem: DataInputMessageItem,
|
|
304
|
+
): string {
|
|
305
|
+
return JSON.stringify(
|
|
306
|
+
DataInputMessageItem$outboundSchema.parse(dataInputMessageItem),
|
|
307
|
+
);
|
|
308
|
+
}
|
|
309
|
+
export function dataInputMessageItemFromJSON(
|
|
310
|
+
jsonString: string,
|
|
311
|
+
): SafeParseResult<DataInputMessageItem, SDKValidationError> {
|
|
312
|
+
return safeParse(
|
|
313
|
+
jsonString,
|
|
314
|
+
(x) => DataInputMessageItem$inboundSchema.parse(JSON.parse(x)),
|
|
315
|
+
`Failed to parse 'DataInputMessageItem' from JSON`,
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/** @internal */
|
|
320
|
+
export const ConversationsItemsCreateData$inboundSchema: z.ZodType<
|
|
321
|
+
ConversationsItemsCreateData,
|
|
322
|
+
z.ZodTypeDef,
|
|
323
|
+
unknown
|
|
324
|
+
> = z.union([
|
|
325
|
+
components.ComputerToolCallWithId$inboundSchema,
|
|
326
|
+
components.CodeInterpreterToolCallWithId$inboundSchema,
|
|
327
|
+
components.OutputMessageWithId$inboundSchema,
|
|
328
|
+
components.OutputAudioItemWithId$inboundSchema,
|
|
329
|
+
components.FunctionToolCallWithId$inboundSchema,
|
|
330
|
+
components.LocalShellCallWithId$inboundSchema,
|
|
331
|
+
components.ShellCallWithId$inboundSchema,
|
|
332
|
+
components.MCPApprovalRequestWithId$inboundSchema,
|
|
333
|
+
components.MCPToolCallWithId$inboundSchema,
|
|
334
|
+
components.CustomToolCallWithId$inboundSchema,
|
|
335
|
+
components.FileSearchToolCallWithId$inboundSchema,
|
|
336
|
+
components.ComputerToolCallOutputWithId$inboundSchema,
|
|
337
|
+
components.WebSearchToolCallWithId$inboundSchema,
|
|
338
|
+
components.FunctionToolCallOutputWithId$inboundSchema,
|
|
339
|
+
components.ImageGenerationCallWithId$inboundSchema,
|
|
340
|
+
components.ShellCallOutputWithId$inboundSchema,
|
|
341
|
+
components.MCPListToolsWithId$inboundSchema,
|
|
342
|
+
components.MCPApprovalResponseWithId$inboundSchema,
|
|
343
|
+
components.CustomToolCallOutputWithId$inboundSchema,
|
|
344
|
+
z.lazy(() => DataInputMessageItem$inboundSchema),
|
|
345
|
+
components.ReasoningWithId$inboundSchema,
|
|
346
|
+
components.LocalShellCallOutputWithId$inboundSchema,
|
|
347
|
+
components.ResponseCompactionItemWithId$inboundSchema,
|
|
348
|
+
components.ItemReferenceWithId$inboundSchema,
|
|
349
|
+
]);
|
|
350
|
+
/** @internal */
|
|
351
|
+
export type ConversationsItemsCreateData$Outbound =
|
|
352
|
+
| components.ComputerToolCallWithId$Outbound
|
|
353
|
+
| components.CodeInterpreterToolCallWithId$Outbound
|
|
354
|
+
| components.OutputMessageWithId$Outbound
|
|
355
|
+
| components.OutputAudioItemWithId$Outbound
|
|
356
|
+
| components.FunctionToolCallWithId$Outbound
|
|
357
|
+
| components.LocalShellCallWithId$Outbound
|
|
358
|
+
| components.ShellCallWithId$Outbound
|
|
359
|
+
| components.MCPApprovalRequestWithId$Outbound
|
|
360
|
+
| components.MCPToolCallWithId$Outbound
|
|
361
|
+
| components.CustomToolCallWithId$Outbound
|
|
362
|
+
| components.FileSearchToolCallWithId$Outbound
|
|
363
|
+
| components.ComputerToolCallOutputWithId$Outbound
|
|
364
|
+
| components.WebSearchToolCallWithId$Outbound
|
|
365
|
+
| components.FunctionToolCallOutputWithId$Outbound
|
|
366
|
+
| components.ImageGenerationCallWithId$Outbound
|
|
367
|
+
| components.ShellCallOutputWithId$Outbound
|
|
368
|
+
| components.MCPListToolsWithId$Outbound
|
|
369
|
+
| components.MCPApprovalResponseWithId$Outbound
|
|
370
|
+
| components.CustomToolCallOutputWithId$Outbound
|
|
371
|
+
| DataInputMessageItem$Outbound
|
|
372
|
+
| components.ReasoningWithId$Outbound
|
|
373
|
+
| components.LocalShellCallOutputWithId$Outbound
|
|
374
|
+
| components.ResponseCompactionItemWithId$Outbound
|
|
375
|
+
| components.ItemReferenceWithId$Outbound;
|
|
376
|
+
|
|
377
|
+
/** @internal */
|
|
378
|
+
export const ConversationsItemsCreateData$outboundSchema: z.ZodType<
|
|
379
|
+
ConversationsItemsCreateData$Outbound,
|
|
380
|
+
z.ZodTypeDef,
|
|
381
|
+
ConversationsItemsCreateData
|
|
382
|
+
> = z.union([
|
|
383
|
+
components.ComputerToolCallWithId$outboundSchema,
|
|
384
|
+
components.CodeInterpreterToolCallWithId$outboundSchema,
|
|
385
|
+
components.OutputMessageWithId$outboundSchema,
|
|
386
|
+
components.OutputAudioItemWithId$outboundSchema,
|
|
387
|
+
components.FunctionToolCallWithId$outboundSchema,
|
|
388
|
+
components.LocalShellCallWithId$outboundSchema,
|
|
389
|
+
components.ShellCallWithId$outboundSchema,
|
|
390
|
+
components.MCPApprovalRequestWithId$outboundSchema,
|
|
391
|
+
components.MCPToolCallWithId$outboundSchema,
|
|
392
|
+
components.CustomToolCallWithId$outboundSchema,
|
|
393
|
+
components.FileSearchToolCallWithId$outboundSchema,
|
|
394
|
+
components.ComputerToolCallOutputWithId$outboundSchema,
|
|
395
|
+
components.WebSearchToolCallWithId$outboundSchema,
|
|
396
|
+
components.FunctionToolCallOutputWithId$outboundSchema,
|
|
397
|
+
components.ImageGenerationCallWithId$outboundSchema,
|
|
398
|
+
components.ShellCallOutputWithId$outboundSchema,
|
|
399
|
+
components.MCPListToolsWithId$outboundSchema,
|
|
400
|
+
components.MCPApprovalResponseWithId$outboundSchema,
|
|
401
|
+
components.CustomToolCallOutputWithId$outboundSchema,
|
|
402
|
+
z.lazy(() => DataInputMessageItem$outboundSchema),
|
|
403
|
+
components.ReasoningWithId$outboundSchema,
|
|
404
|
+
components.LocalShellCallOutputWithId$outboundSchema,
|
|
405
|
+
components.ResponseCompactionItemWithId$outboundSchema,
|
|
406
|
+
components.ItemReferenceWithId$outboundSchema,
|
|
407
|
+
]);
|
|
408
|
+
|
|
409
|
+
export function conversationsItemsCreateDataToJSON(
|
|
410
|
+
conversationsItemsCreateData: ConversationsItemsCreateData,
|
|
411
|
+
): string {
|
|
412
|
+
return JSON.stringify(
|
|
413
|
+
ConversationsItemsCreateData$outboundSchema.parse(
|
|
414
|
+
conversationsItemsCreateData,
|
|
415
|
+
),
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
export function conversationsItemsCreateDataFromJSON(
|
|
419
|
+
jsonString: string,
|
|
420
|
+
): SafeParseResult<ConversationsItemsCreateData, SDKValidationError> {
|
|
421
|
+
return safeParse(
|
|
422
|
+
jsonString,
|
|
423
|
+
(x) => ConversationsItemsCreateData$inboundSchema.parse(JSON.parse(x)),
|
|
424
|
+
`Failed to parse 'ConversationsItemsCreateData' from JSON`,
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/** @internal */
|
|
429
|
+
export const ConversationsItemsCreateResponseBody$inboundSchema: z.ZodType<
|
|
430
|
+
ConversationsItemsCreateResponseBody,
|
|
431
|
+
z.ZodTypeDef,
|
|
432
|
+
unknown
|
|
433
|
+
> = z.object({
|
|
434
|
+
object: z.literal("list").optional(),
|
|
435
|
+
data: z.array(
|
|
436
|
+
z.union([
|
|
437
|
+
components.ComputerToolCallWithId$inboundSchema,
|
|
438
|
+
components.CodeInterpreterToolCallWithId$inboundSchema,
|
|
439
|
+
components.OutputMessageWithId$inboundSchema,
|
|
440
|
+
components.OutputAudioItemWithId$inboundSchema,
|
|
441
|
+
components.FunctionToolCallWithId$inboundSchema,
|
|
442
|
+
components.LocalShellCallWithId$inboundSchema,
|
|
443
|
+
components.ShellCallWithId$inboundSchema,
|
|
444
|
+
components.MCPApprovalRequestWithId$inboundSchema,
|
|
445
|
+
components.MCPToolCallWithId$inboundSchema,
|
|
446
|
+
components.CustomToolCallWithId$inboundSchema,
|
|
447
|
+
components.FileSearchToolCallWithId$inboundSchema,
|
|
448
|
+
components.ComputerToolCallOutputWithId$inboundSchema,
|
|
449
|
+
components.WebSearchToolCallWithId$inboundSchema,
|
|
450
|
+
components.FunctionToolCallOutputWithId$inboundSchema,
|
|
451
|
+
components.ImageGenerationCallWithId$inboundSchema,
|
|
452
|
+
components.ShellCallOutputWithId$inboundSchema,
|
|
453
|
+
components.MCPListToolsWithId$inboundSchema,
|
|
454
|
+
components.MCPApprovalResponseWithId$inboundSchema,
|
|
455
|
+
components.CustomToolCallOutputWithId$inboundSchema,
|
|
456
|
+
z.lazy(() => DataInputMessageItem$inboundSchema),
|
|
457
|
+
components.ReasoningWithId$inboundSchema,
|
|
458
|
+
components.LocalShellCallOutputWithId$inboundSchema,
|
|
459
|
+
components.ResponseCompactionItemWithId$inboundSchema,
|
|
460
|
+
components.ItemReferenceWithId$inboundSchema,
|
|
461
|
+
]),
|
|
462
|
+
),
|
|
463
|
+
has_more: z.boolean(),
|
|
464
|
+
last_id: z.string(),
|
|
465
|
+
}).transform((v) => {
|
|
466
|
+
return remap$(v, {
|
|
467
|
+
"has_more": "hasMore",
|
|
468
|
+
"last_id": "lastId",
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
/** @internal */
|
|
472
|
+
export type ConversationsItemsCreateResponseBody$Outbound = {
|
|
473
|
+
object?: "list" | undefined;
|
|
474
|
+
data: Array<
|
|
475
|
+
| components.ComputerToolCallWithId$Outbound
|
|
476
|
+
| components.CodeInterpreterToolCallWithId$Outbound
|
|
477
|
+
| components.OutputMessageWithId$Outbound
|
|
478
|
+
| components.OutputAudioItemWithId$Outbound
|
|
479
|
+
| components.FunctionToolCallWithId$Outbound
|
|
480
|
+
| components.LocalShellCallWithId$Outbound
|
|
481
|
+
| components.ShellCallWithId$Outbound
|
|
482
|
+
| components.MCPApprovalRequestWithId$Outbound
|
|
483
|
+
| components.MCPToolCallWithId$Outbound
|
|
484
|
+
| components.CustomToolCallWithId$Outbound
|
|
485
|
+
| components.FileSearchToolCallWithId$Outbound
|
|
486
|
+
| components.ComputerToolCallOutputWithId$Outbound
|
|
487
|
+
| components.WebSearchToolCallWithId$Outbound
|
|
488
|
+
| components.FunctionToolCallOutputWithId$Outbound
|
|
489
|
+
| components.ImageGenerationCallWithId$Outbound
|
|
490
|
+
| components.ShellCallOutputWithId$Outbound
|
|
491
|
+
| components.MCPListToolsWithId$Outbound
|
|
492
|
+
| components.MCPApprovalResponseWithId$Outbound
|
|
493
|
+
| components.CustomToolCallOutputWithId$Outbound
|
|
494
|
+
| DataInputMessageItem$Outbound
|
|
495
|
+
| components.ReasoningWithId$Outbound
|
|
496
|
+
| components.LocalShellCallOutputWithId$Outbound
|
|
497
|
+
| components.ResponseCompactionItemWithId$Outbound
|
|
498
|
+
| components.ItemReferenceWithId$Outbound
|
|
499
|
+
>;
|
|
500
|
+
has_more: boolean;
|
|
501
|
+
last_id: string;
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
/** @internal */
|
|
505
|
+
export const ConversationsItemsCreateResponseBody$outboundSchema: z.ZodType<
|
|
506
|
+
ConversationsItemsCreateResponseBody$Outbound,
|
|
507
|
+
z.ZodTypeDef,
|
|
508
|
+
ConversationsItemsCreateResponseBody
|
|
509
|
+
> = z.object({
|
|
510
|
+
object: z.literal("list").optional(),
|
|
511
|
+
data: z.array(
|
|
512
|
+
z.union([
|
|
513
|
+
components.ComputerToolCallWithId$outboundSchema,
|
|
514
|
+
components.CodeInterpreterToolCallWithId$outboundSchema,
|
|
515
|
+
components.OutputMessageWithId$outboundSchema,
|
|
516
|
+
components.OutputAudioItemWithId$outboundSchema,
|
|
517
|
+
components.FunctionToolCallWithId$outboundSchema,
|
|
518
|
+
components.LocalShellCallWithId$outboundSchema,
|
|
519
|
+
components.ShellCallWithId$outboundSchema,
|
|
520
|
+
components.MCPApprovalRequestWithId$outboundSchema,
|
|
521
|
+
components.MCPToolCallWithId$outboundSchema,
|
|
522
|
+
components.CustomToolCallWithId$outboundSchema,
|
|
523
|
+
components.FileSearchToolCallWithId$outboundSchema,
|
|
524
|
+
components.ComputerToolCallOutputWithId$outboundSchema,
|
|
525
|
+
components.WebSearchToolCallWithId$outboundSchema,
|
|
526
|
+
components.FunctionToolCallOutputWithId$outboundSchema,
|
|
527
|
+
components.ImageGenerationCallWithId$outboundSchema,
|
|
528
|
+
components.ShellCallOutputWithId$outboundSchema,
|
|
529
|
+
components.MCPListToolsWithId$outboundSchema,
|
|
530
|
+
components.MCPApprovalResponseWithId$outboundSchema,
|
|
531
|
+
components.CustomToolCallOutputWithId$outboundSchema,
|
|
532
|
+
z.lazy(() => DataInputMessageItem$outboundSchema),
|
|
533
|
+
components.ReasoningWithId$outboundSchema,
|
|
534
|
+
components.LocalShellCallOutputWithId$outboundSchema,
|
|
535
|
+
components.ResponseCompactionItemWithId$outboundSchema,
|
|
536
|
+
components.ItemReferenceWithId$outboundSchema,
|
|
537
|
+
]),
|
|
538
|
+
),
|
|
539
|
+
hasMore: z.boolean(),
|
|
540
|
+
lastId: z.string(),
|
|
541
|
+
}).transform((v) => {
|
|
542
|
+
return remap$(v, {
|
|
543
|
+
hasMore: "has_more",
|
|
544
|
+
lastId: "last_id",
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
|
|
548
|
+
export function conversationsItemsCreateResponseBodyToJSON(
|
|
549
|
+
conversationsItemsCreateResponseBody: ConversationsItemsCreateResponseBody,
|
|
550
|
+
): string {
|
|
551
|
+
return JSON.stringify(
|
|
552
|
+
ConversationsItemsCreateResponseBody$outboundSchema.parse(
|
|
553
|
+
conversationsItemsCreateResponseBody,
|
|
554
|
+
),
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
export function conversationsItemsCreateResponseBodyFromJSON(
|
|
558
|
+
jsonString: string,
|
|
559
|
+
): SafeParseResult<ConversationsItemsCreateResponseBody, SDKValidationError> {
|
|
560
|
+
return safeParse(
|
|
561
|
+
jsonString,
|
|
562
|
+
(x) =>
|
|
563
|
+
ConversationsItemsCreateResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
564
|
+
`Failed to parse 'ConversationsItemsCreateResponseBody' from JSON`,
|
|
565
|
+
);
|
|
566
|
+
}
|