@compose-market/sdk 0.8.22 → 0.8.23
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/CHANGELOG.md +15 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/generated/channels/esm/lib/config.d.ts +3 -3
- package/generated/channels/esm/lib/config.js +3 -3
- package/generated/channels/package.json +1 -1
- package/generated/channels/src/lib/config.ts +3 -3
- package/generated/inference/esm/lib/config.d.ts +4 -4
- package/generated/inference/esm/lib/config.js +4 -4
- package/generated/inference/esm/models/index.d.ts +9 -0
- package/generated/inference/esm/models/index.d.ts.map +1 -1
- package/generated/inference/esm/models/index.js +9 -0
- package/generated/inference/esm/models/index.js.map +1 -1
- package/generated/inference/esm/models/response-object.d.ts +3 -3
- package/generated/inference/esm/models/response-object.d.ts.map +1 -1
- package/generated/inference/esm/models/response-object.js +3 -1
- package/generated/inference/esm/models/response-object.js.map +1 -1
- package/generated/inference/esm/models/response-output-item.d.ts +39 -0
- package/generated/inference/esm/models/response-output-item.d.ts.map +1 -0
- package/generated/inference/esm/models/response-output-item.js +47 -0
- package/generated/inference/esm/models/response-output-item.js.map +1 -0
- package/generated/inference/esm/models/responses-create-request.d.ts +15 -10
- package/generated/inference/esm/models/responses-create-request.d.ts.map +1 -1
- package/generated/inference/esm/models/responses-create-request.js +15 -3
- package/generated/inference/esm/models/responses-create-request.js.map +1 -1
- package/generated/inference/esm/models/responses-function-call-input-item.d.ts +24 -0
- package/generated/inference/esm/models/responses-function-call-input-item.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-function-call-input-item.js +24 -0
- package/generated/inference/esm/models/responses-function-call-input-item.js.map +1 -0
- package/generated/inference/esm/models/responses-function-call-output-input-item.d.ts +18 -0
- package/generated/inference/esm/models/responses-function-call-output-input-item.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-function-call-output-input-item.js +21 -0
- package/generated/inference/esm/models/responses-function-call-output-input-item.js.map +1 -0
- package/generated/inference/esm/models/responses-function-tool.d.ts +24 -0
- package/generated/inference/esm/models/responses-function-tool.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-function-tool.js +16 -0
- package/generated/inference/esm/models/responses-function-tool.js.map +1 -0
- package/generated/inference/esm/models/responses-input-item.d.ts +12 -0
- package/generated/inference/esm/models/responses-input-item.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-input-item.js +19 -0
- package/generated/inference/esm/models/responses-input-item.js.map +1 -0
- package/generated/inference/esm/models/responses-message-input-item.d.ts +42 -0
- package/generated/inference/esm/models/responses-message-input-item.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-message-input-item.js +28 -0
- package/generated/inference/esm/models/responses-message-input-item.js.map +1 -0
- package/generated/inference/esm/models/responses-named-tool-choice.d.ts +14 -0
- package/generated/inference/esm/models/responses-named-tool-choice.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-named-tool-choice.js +13 -0
- package/generated/inference/esm/models/responses-named-tool-choice.js.map +1 -0
- package/generated/inference/esm/models/responses-reasoning-input-item.d.ts +26 -0
- package/generated/inference/esm/models/responses-reasoning-input-item.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-reasoning-input-item.js +23 -0
- package/generated/inference/esm/models/responses-reasoning-input-item.js.map +1 -0
- package/generated/inference/esm/models/responses-tool-choice.d.ts +18 -0
- package/generated/inference/esm/models/responses-tool-choice.d.ts.map +1 -0
- package/generated/inference/esm/models/responses-tool-choice.js +22 -0
- package/generated/inference/esm/models/responses-tool-choice.js.map +1 -0
- package/generated/inference/package.json +1 -1
- package/generated/inference/src/lib/config.ts +4 -4
- package/generated/inference/src/models/index.ts +9 -0
- package/generated/inference/src/models/response-object.ts +7 -2
- package/generated/inference/src/models/response-output-item.ts +94 -0
- package/generated/inference/src/models/responses-create-request.ts +41 -9
- package/generated/inference/src/models/responses-function-call-input-item.ts +62 -0
- package/generated/inference/src/models/responses-function-call-output-input-item.ts +53 -0
- package/generated/inference/src/models/responses-function-tool.ts +42 -0
- package/generated/inference/src/models/responses-input-item.ts +58 -0
- package/generated/inference/src/models/responses-message-input-item.ts +71 -0
- package/generated/inference/src/models/responses-named-tool-choice.ts +33 -0
- package/generated/inference/src/models/responses-reasoning-input-item.ts +59 -0
- package/generated/inference/src/models/responses-tool-choice.ts +52 -0
- package/generated/manowar/esm/lib/config.d.ts +3 -3
- package/generated/manowar/esm/lib/config.js +3 -3
- package/generated/manowar/package.json +1 -1
- package/generated/manowar/src/lib/config.ts +3 -3
- package/generated/memory/esm/lib/config.d.ts +3 -3
- package/generated/memory/esm/lib/config.js +3 -3
- package/generated/memory/package.json +1 -1
- package/generated/memory/src/lib/config.ts +3 -3
- package/generated/x402/esm/lib/config.d.ts +3 -3
- package/generated/x402/esm/lib/config.js +3 -3
- package/generated/x402/package.json +1 -1
- package/generated/x402/src/lib/config.ts +3 -3
- package/package.json +3 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type ResponsesFunctionTool = {
|
|
3
|
+
type: "function";
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string | undefined;
|
|
6
|
+
parameters?: {
|
|
7
|
+
[k: string]: any;
|
|
8
|
+
} | undefined;
|
|
9
|
+
strict?: boolean | undefined;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type ResponsesFunctionTool$Outbound = {
|
|
13
|
+
type: "function";
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
parameters?: {
|
|
17
|
+
[k: string]: any;
|
|
18
|
+
} | undefined;
|
|
19
|
+
strict?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ResponsesFunctionTool$outboundSchema: z.ZodMiniType<ResponsesFunctionTool$Outbound, ResponsesFunctionTool>;
|
|
23
|
+
export declare function responsesFunctionToolToJSON(responsesFunctionTool: ResponsesFunctionTool): string;
|
|
24
|
+
//# sourceMappingURL=responses-function-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-function-tool.d.ts","sourceRoot":"","sources":["../../src/models/responses-function-tool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9C,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oCAAoC,EAAE,CAAC,CAAC,WAAW,CAC9D,8BAA8B,EAC9B,qBAAqB,CAOrB,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,qBAAqB,EAAE,qBAAqB,GAC3C,MAAM,CAIR"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const ResponsesFunctionTool$outboundSchema = z.object({
|
|
7
|
+
type: z.literal("function"),
|
|
8
|
+
name: z.string(),
|
|
9
|
+
description: z.optional(z.string()),
|
|
10
|
+
parameters: z.optional(z.record(z.string(), z.any())),
|
|
11
|
+
strict: z.optional(z.boolean()),
|
|
12
|
+
});
|
|
13
|
+
export function responsesFunctionToolToJSON(responsesFunctionTool) {
|
|
14
|
+
return JSON.stringify(ResponsesFunctionTool$outboundSchema.parse(responsesFunctionTool));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=responses-function-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-function-tool.js","sourceRoot":"","sources":["../../src/models/responses-function-tool.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAmBjC,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAG7C,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACnC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IACrD,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;CAChC,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,qBAA4C,EACpC;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,oCAAoC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAClE,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { ResponsesFunctionCallInputItem, ResponsesFunctionCallInputItem$Outbound } from "./responses-function-call-input-item.js";
|
|
3
|
+
import { ResponsesFunctionCallOutputInputItem, ResponsesFunctionCallOutputInputItem$Outbound } from "./responses-function-call-output-input-item.js";
|
|
4
|
+
import { ResponsesMessageInputItem, ResponsesMessageInputItem$Outbound } from "./responses-message-input-item.js";
|
|
5
|
+
import { ResponsesReasoningInputItem, ResponsesReasoningInputItem$Outbound } from "./responses-reasoning-input-item.js";
|
|
6
|
+
export type ResponsesInputItem = ResponsesFunctionCallInputItem | ResponsesFunctionCallOutputInputItem | ResponsesMessageInputItem | ResponsesReasoningInputItem;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export type ResponsesInputItem$Outbound = ResponsesFunctionCallInputItem$Outbound | ResponsesFunctionCallOutputInputItem$Outbound | ResponsesMessageInputItem$Outbound | ResponsesReasoningInputItem$Outbound;
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const ResponsesInputItem$outboundSchema: z.ZodMiniType<ResponsesInputItem$Outbound, ResponsesInputItem>;
|
|
11
|
+
export declare function responsesInputItemToJSON(responsesInputItem: ResponsesInputItem): string;
|
|
12
|
+
//# sourceMappingURL=responses-input-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-input-item.d.ts","sourceRoot":"","sources":["../../src/models/responses-input-item.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EACL,8BAA8B,EAC9B,uCAAuC,EAExC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,oCAAoC,EACpC,6CAA6C,EAE9C,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,kCAAkC,EAEnC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EAErC,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,kBAAkB,GAC1B,8BAA8B,GAC9B,oCAAoC,GACpC,yBAAyB,GACzB,2BAA2B,CAAC;AAEhC,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GACnC,uCAAuC,GACvC,6CAA6C,GAC7C,kCAAkC,GAClC,oCAAoC,CAAC;AAEzC,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,WAAW,CAC3D,2BAA2B,EAC3B,kBAAkB,CAMlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
5
|
+
import { ResponsesFunctionCallInputItem$outboundSchema, } from "./responses-function-call-input-item.js";
|
|
6
|
+
import { ResponsesFunctionCallOutputInputItem$outboundSchema, } from "./responses-function-call-output-input-item.js";
|
|
7
|
+
import { ResponsesMessageInputItem$outboundSchema, } from "./responses-message-input-item.js";
|
|
8
|
+
import { ResponsesReasoningInputItem$outboundSchema, } from "./responses-reasoning-input-item.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ResponsesInputItem$outboundSchema = smartUnion([
|
|
11
|
+
ResponsesFunctionCallInputItem$outboundSchema,
|
|
12
|
+
ResponsesFunctionCallOutputInputItem$outboundSchema,
|
|
13
|
+
ResponsesMessageInputItem$outboundSchema,
|
|
14
|
+
ResponsesReasoningInputItem$outboundSchema,
|
|
15
|
+
]);
|
|
16
|
+
export function responsesInputItemToJSON(responsesInputItem) {
|
|
17
|
+
return JSON.stringify(ResponsesInputItem$outboundSchema.parse(responsesInputItem));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=responses-input-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-input-item.js","sourceRoot":"","sources":["../../src/models/responses-input-item.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAGL,6CAA6C,GAC9C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAGL,mDAAmD,GACpD,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAGL,wCAAwC,GACzC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGL,0CAA0C,GAC3C,MAAM,qCAAqC,CAAC;AAe7C,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAG1C,UAAU,CAAC;IACb,6CAA6C;IAC7C,mDAAmD;IACnD,wCAAwC;IACxC,0CAA0C;CAC3C,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC,EAC9B;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const ResponsesMessageInputItemRole: {
|
|
4
|
+
readonly System: "system";
|
|
5
|
+
readonly Developer: "developer";
|
|
6
|
+
readonly User: "user";
|
|
7
|
+
readonly Assistant: "assistant";
|
|
8
|
+
};
|
|
9
|
+
export type ResponsesMessageInputItemRole = ClosedEnum<typeof ResponsesMessageInputItemRole>;
|
|
10
|
+
export type Content = string | Array<{
|
|
11
|
+
[k: string]: any;
|
|
12
|
+
}>;
|
|
13
|
+
export type ResponsesMessageInputItem = {
|
|
14
|
+
type?: "message" | undefined;
|
|
15
|
+
role: ResponsesMessageInputItemRole;
|
|
16
|
+
content: string | Array<{
|
|
17
|
+
[k: string]: any;
|
|
18
|
+
}>;
|
|
19
|
+
[additionalProperties: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ResponsesMessageInputItemRole$outboundSchema: z.ZodMiniEnum<typeof ResponsesMessageInputItemRole>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type Content$Outbound = string | Array<{
|
|
25
|
+
[k: string]: any;
|
|
26
|
+
}>;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export declare const Content$outboundSchema: z.ZodMiniType<Content$Outbound, Content>;
|
|
29
|
+
export declare function contentToJSON(content: Content): string;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type ResponsesMessageInputItem$Outbound = {
|
|
32
|
+
type?: "message" | undefined;
|
|
33
|
+
role: string;
|
|
34
|
+
content: string | Array<{
|
|
35
|
+
[k: string]: any;
|
|
36
|
+
}>;
|
|
37
|
+
[additionalProperties: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare const ResponsesMessageInputItem$outboundSchema: z.ZodMiniType<ResponsesMessageInputItem$Outbound, ResponsesMessageInputItem>;
|
|
41
|
+
export declare function responsesMessageInputItemToJSON(responsesMessageInputItem: ResponsesMessageInputItem): string;
|
|
42
|
+
//# sourceMappingURL=responses-message-input-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-message-input-item.d.ts","sourceRoot":"","sources":["../../src/models/responses-message-input-item.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,eAAO,MAAM,6BAA6B;;;;;CAKhC,CAAC;AACX,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,6BAA6B,CACrC,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC,CAAC;AAE3D,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,6BAA6B,CAAC;IACpC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;IAC9C,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,WAAW,CACtE,OAAO,6BAA6B,CACG,CAAC;AAE1C,gBAAgB;AAChB,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,KAAK,CAAC;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC,CAAC;AAEpE,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,WAAW,CAAC,gBAAgB,EAAE,OAAO,CACV,CAAC;AAEnE,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,CAAC;IAC9C,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAQ1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
6
|
+
export const ResponsesMessageInputItemRole = {
|
|
7
|
+
System: "system",
|
|
8
|
+
Developer: "developer",
|
|
9
|
+
User: "user",
|
|
10
|
+
Assistant: "assistant",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesMessageInputItemRole$outboundSchema = z.enum(ResponsesMessageInputItemRole);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const Content$outboundSchema = smartUnion([z.string(), z.array(z.record(z.string(), z.any()))]);
|
|
16
|
+
export function contentToJSON(content) {
|
|
17
|
+
return JSON.stringify(Content$outboundSchema.parse(content));
|
|
18
|
+
}
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ResponsesMessageInputItem$outboundSchema = z.catchall(z.object({
|
|
21
|
+
type: z.optional(z.literal("message")),
|
|
22
|
+
role: ResponsesMessageInputItemRole$outboundSchema,
|
|
23
|
+
content: smartUnion([z.string(), z.array(z.record(z.string(), z.any()))]),
|
|
24
|
+
}), z.any());
|
|
25
|
+
export function responsesMessageInputItemToJSON(responsesMessageInputItem) {
|
|
26
|
+
return JSON.stringify(ResponsesMessageInputItem$outboundSchema.parse(responsesMessageInputItem));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=responses-message-input-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-message-input-item.js","sourceRoot":"","sources":["../../src/models/responses-message-input-item.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,WAAW;CACd,CAAC;AAcX,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAErD,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;AAK1C,gBAAgB;AAChB,MAAM,CAAC,MAAM,sBAAsB,GACjC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAEnE,MAAM,UAAU,aAAa,CAAC,OAAgB,EAAU;IACtD,OAAO,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAAA,CAC9D;AAUD,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAGjD,CAAC,CAAC,QAAQ,CACZ,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC,IAAI,EAAE,4CAA4C;IAClD,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CAC1E,CAAC,EACF,CAAC,CAAC,GAAG,EAAE,CACR,CAAC;AAEF,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD,EAC5C;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type ResponsesNamedToolChoice = {
|
|
3
|
+
type: "function";
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type ResponsesNamedToolChoice$Outbound = {
|
|
8
|
+
type: "function";
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const ResponsesNamedToolChoice$outboundSchema: z.ZodMiniType<ResponsesNamedToolChoice$Outbound, ResponsesNamedToolChoice>;
|
|
13
|
+
export declare function responsesNamedToolChoiceToJSON(responsesNamedToolChoice: ResponsesNamedToolChoice): string;
|
|
14
|
+
//# sourceMappingURL=responses-named-tool-choice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-named-tool-choice.d.ts","sourceRoot":"","sources":["../../src/models/responses-named-tool-choice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,WAAW,CACjE,iCAAiC,EACjC,wBAAwB,CAIxB,CAAC;AAEH,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const ResponsesNamedToolChoice$outboundSchema = z.object({
|
|
7
|
+
type: z.literal("function"),
|
|
8
|
+
name: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export function responsesNamedToolChoiceToJSON(responsesNamedToolChoice) {
|
|
11
|
+
return JSON.stringify(ResponsesNamedToolChoice$outboundSchema.parse(responsesNamedToolChoice));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=responses-named-tool-choice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-named-tool-choice.js","sourceRoot":"","sources":["../../src/models/responses-named-tool-choice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAajC,gBAAgB;AAChB,MAAM,CAAC,MAAM,uCAAuC,GAGhD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,UAAU,8BAA8B,CAC5C,wBAAkD,EAC1C;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,uCAAuC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACxE,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
export type ResponsesReasoningInputItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: "reasoning";
|
|
5
|
+
summary?: Array<{
|
|
6
|
+
[k: string]: any;
|
|
7
|
+
}> | undefined;
|
|
8
|
+
encryptedContent?: string | undefined;
|
|
9
|
+
status?: string | undefined;
|
|
10
|
+
[additionalProperties: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type ResponsesReasoningInputItem$Outbound = {
|
|
14
|
+
id: string;
|
|
15
|
+
type: "reasoning";
|
|
16
|
+
summary?: Array<{
|
|
17
|
+
[k: string]: any;
|
|
18
|
+
}> | undefined;
|
|
19
|
+
encrypted_content?: string | undefined;
|
|
20
|
+
status?: string | undefined;
|
|
21
|
+
[additionalProperties: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ResponsesReasoningInputItem$outboundSchema: z.ZodMiniType<ResponsesReasoningInputItem$Outbound, ResponsesReasoningInputItem>;
|
|
25
|
+
export declare function responsesReasoningInputItemToJSON(responsesReasoningInputItem: ResponsesReasoningInputItem): string;
|
|
26
|
+
//# sourceMappingURL=responses-reasoning-input-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-reasoning-input-item.d.ts","sourceRoot":"","sources":["../../src/models/responses-reasoning-input-item.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,MAAM,MAAM,2BAA2B,GAAG;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAClD,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAAG;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,CAAC,oBAAoB,EAAE,MAAM,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,WAAW,CACpE,oCAAoC,EACpC,2BAA2B,CAmB5B,CAAC;AAEF,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const ResponsesReasoningInputItem$outboundSchema = z.pipe(z.catchall(z.object({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
type: z.literal("reasoning"),
|
|
10
|
+
summary: z.optional(z.array(z.record(z.string(), z.any()))),
|
|
11
|
+
encryptedContent: z.optional(z.string()),
|
|
12
|
+
status: z.optional(z.string()),
|
|
13
|
+
}), z.any()), z.transform((v) => {
|
|
14
|
+
return {
|
|
15
|
+
...remap$(v, {
|
|
16
|
+
encryptedContent: "encrypted_content",
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
}));
|
|
20
|
+
export function responsesReasoningInputItemToJSON(responsesReasoningInputItem) {
|
|
21
|
+
return JSON.stringify(ResponsesReasoningInputItem$outboundSchema.parse(responsesReasoningInputItem));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=responses-reasoning-input-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-reasoning-input-item.js","sourceRoot":"","sources":["../../src/models/responses-reasoning-input-item.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAqBvD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAGnD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,QAAQ,CACR,CAAC,CAAC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IAC5B,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC3D,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC/B,CAAC,EACF,CAAC,CAAC,GAAG,EAAE,CACR,EACD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjB,OAAO;QACL,GAAG,MAAM,CAAC,CAAC,EAAE;YACX,gBAAgB,EAAE,mBAAmB;SACtC,CAAC;KACH,CAAC;AAAA,CACH,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,iCAAiC,CAC/C,2BAAwD,EAChD;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,0CAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AAAA,CACH"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4-mini";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { ResponsesNamedToolChoice, ResponsesNamedToolChoice$Outbound } from "./responses-named-tool-choice.js";
|
|
4
|
+
export declare const ResponsesToolChoiceEnum: {
|
|
5
|
+
readonly None: "none";
|
|
6
|
+
readonly Auto: "auto";
|
|
7
|
+
readonly Required: "required";
|
|
8
|
+
};
|
|
9
|
+
export type ResponsesToolChoiceEnum = ClosedEnum<typeof ResponsesToolChoiceEnum>;
|
|
10
|
+
export type ResponsesToolChoice = ResponsesNamedToolChoice | ResponsesToolChoiceEnum;
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const ResponsesToolChoiceEnum$outboundSchema: z.ZodMiniEnum<typeof ResponsesToolChoiceEnum>;
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type ResponsesToolChoice$Outbound = ResponsesNamedToolChoice$Outbound | string;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const ResponsesToolChoice$outboundSchema: z.ZodMiniType<ResponsesToolChoice$Outbound, ResponsesToolChoice>;
|
|
17
|
+
export declare function responsesToolChoiceToJSON(responsesToolChoice: ResponsesToolChoice): string;
|
|
18
|
+
//# sourceMappingURL=responses-tool-choice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-tool-choice.d.ts","sourceRoot":"","sources":["../../src/models/responses-tool-choice.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,wBAAwB,EACxB,iCAAiC,EAElC,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AACX,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAC9C,OAAO,uBAAuB,CAC/B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC3B,wBAAwB,GACxB,uBAAuB,CAAC;AAE5B,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,WAAW,CAChE,OAAO,uBAAuB,CACG,CAAC;AAEpC,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GACpC,iCAAiC,GACjC,MAAM,CAAC;AAEX,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,WAAW,CAC5D,4BAA4B,EAC5B,mBAAmB,CAInB,CAAC;AAEH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,mBAAmB,GACvC,MAAM,CAIR"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
6
|
+
import { ResponsesNamedToolChoice$outboundSchema, } from "./responses-named-tool-choice.js";
|
|
7
|
+
export const ResponsesToolChoiceEnum = {
|
|
8
|
+
None: "none",
|
|
9
|
+
Auto: "auto",
|
|
10
|
+
Required: "required",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ResponsesToolChoiceEnum$outboundSchema = z.enum(ResponsesToolChoiceEnum);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const ResponsesToolChoice$outboundSchema = smartUnion([
|
|
16
|
+
ResponsesNamedToolChoice$outboundSchema,
|
|
17
|
+
ResponsesToolChoiceEnum$outboundSchema,
|
|
18
|
+
]);
|
|
19
|
+
export function responsesToolChoiceToJSON(responsesToolChoice) {
|
|
20
|
+
return JSON.stringify(ResponsesToolChoice$outboundSchema.parse(responsesToolChoice));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=responses-tool-choice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses-tool-choice.js","sourceRoot":"","sources":["../../src/models/responses-tool-choice.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAGL,uCAAuC,GACxC,MAAM,kCAAkC,CAAC;AAE1C,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;CACZ,CAAC;AASX,gBAAgB;AAChB,MAAM,CAAC,MAAM,sCAAsC,GAE/C,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;AAOpC,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAG3C,UAAU,CAAC;IACb,uCAAuC;IACvC,sCAAsC;CACvC,CAAC,CAAC;AAEH,MAAM,UAAU,yBAAyB,CACvC,mBAAwC,EAChC;IACR,OAAO,IAAI,CAAC,SAAS,CACnB,kCAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AAAA,CACH"}
|
|
@@ -63,8 +63,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
63
63
|
|
|
64
64
|
export const SDK_METADATA = {
|
|
65
65
|
language: "typescript",
|
|
66
|
-
openapiDocVersion: "0.8.
|
|
67
|
-
sdkVersion: "0.8.
|
|
68
|
-
genVersion: "2.
|
|
69
|
-
userAgent: "speakeasy-sdk/typescript 0.8.
|
|
66
|
+
openapiDocVersion: "0.8.23",
|
|
67
|
+
sdkVersion: "0.8.23",
|
|
68
|
+
genVersion: "2.924.0",
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 0.8.23 2.924.0 0.8.22 openapi",
|
|
70
70
|
} as const;
|
|
@@ -28,6 +28,15 @@ export * from "./reasoning-options.js";
|
|
|
28
28
|
export * from "./receipt-body.js";
|
|
29
29
|
export * from "./response-format.js";
|
|
30
30
|
export * from "./response-object.js";
|
|
31
|
+
export * from "./response-output-item.js";
|
|
31
32
|
export * from "./responses-create-request.js";
|
|
33
|
+
export * from "./responses-function-call-input-item.js";
|
|
34
|
+
export * from "./responses-function-call-output-input-item.js";
|
|
35
|
+
export * from "./responses-function-tool.js";
|
|
36
|
+
export * from "./responses-input-item.js";
|
|
37
|
+
export * from "./responses-message-input-item.js";
|
|
38
|
+
export * from "./responses-named-tool-choice.js";
|
|
39
|
+
export * from "./responses-reasoning-input-item.js";
|
|
40
|
+
export * from "./responses-tool-choice.js";
|
|
32
41
|
export * from "./security.js";
|
|
33
42
|
export * from "./stream-options.js";
|
|
@@ -11,10 +11,15 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
11
11
|
import * as types from "../types/primitives.js";
|
|
12
12
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
13
13
|
import { ReceiptBody, ReceiptBody$inboundSchema } from "./receipt-body.js";
|
|
14
|
+
import {
|
|
15
|
+
ResponseOutputItem,
|
|
16
|
+
ResponseOutputItem$inboundSchema,
|
|
17
|
+
} from "./response-output-item.js";
|
|
14
18
|
|
|
15
19
|
export const Status = {
|
|
16
20
|
Completed: "completed",
|
|
17
21
|
InProgress: "in_progress",
|
|
22
|
+
Incomplete: "incomplete",
|
|
18
23
|
Failed: "failed",
|
|
19
24
|
Cancelled: "cancelled",
|
|
20
25
|
} as const;
|
|
@@ -26,7 +31,7 @@ export type ResponseObject = {
|
|
|
26
31
|
createdAt: number;
|
|
27
32
|
status: Status;
|
|
28
33
|
model: string;
|
|
29
|
-
output: Array<
|
|
34
|
+
output: Array<ResponseOutputItem>;
|
|
30
35
|
usage?: { [k: string]: any } | undefined;
|
|
31
36
|
error?: { [k: string]: any } | undefined;
|
|
32
37
|
previousResponseId?: string | undefined;
|
|
@@ -51,7 +56,7 @@ export const ResponseObject$inboundSchema: z.ZodMiniType<
|
|
|
51
56
|
created_at: types.number(),
|
|
52
57
|
status: Status$inboundSchema,
|
|
53
58
|
model: types.string(),
|
|
54
|
-
output: z.array(
|
|
59
|
+
output: z.array(ResponseOutputItem$inboundSchema),
|
|
55
60
|
usage: types.optional(z.record(z.string(), z.any())),
|
|
56
61
|
error: types.optional(z.record(z.string(), z.any())),
|
|
57
62
|
previous_response_id: types.optional(types.string()),
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export const ResponseOutputItemRole = {
|
|
14
|
+
Assistant: "assistant",
|
|
15
|
+
} as const;
|
|
16
|
+
export type ResponseOutputItemRole = ClosedEnum<typeof ResponseOutputItemRole>;
|
|
17
|
+
|
|
18
|
+
export type ResponseOutputItem = {
|
|
19
|
+
id?: string | undefined;
|
|
20
|
+
type: string;
|
|
21
|
+
status?: string | undefined;
|
|
22
|
+
role?: ResponseOutputItemRole | undefined;
|
|
23
|
+
content?: Array<{ [k: string]: any }> | undefined;
|
|
24
|
+
text?: string | undefined;
|
|
25
|
+
callId?: string | undefined;
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
arguments?: string | undefined;
|
|
28
|
+
summary?: Array<{ [k: string]: any }> | undefined;
|
|
29
|
+
encryptedContent?: string | undefined;
|
|
30
|
+
imageUrl?: string | undefined;
|
|
31
|
+
audioUrl?: string | undefined;
|
|
32
|
+
videoUrl?: string | undefined;
|
|
33
|
+
embedding?: Array<number> | undefined;
|
|
34
|
+
jobId?: string | undefined;
|
|
35
|
+
progress?: number | undefined;
|
|
36
|
+
mimeType?: string | undefined;
|
|
37
|
+
[additionalProperties: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ResponseOutputItemRole$inboundSchema: z.ZodMiniEnum<
|
|
42
|
+
typeof ResponseOutputItemRole
|
|
43
|
+
> = z.enum(ResponseOutputItemRole);
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ResponseOutputItem$inboundSchema: z.ZodMiniType<
|
|
47
|
+
ResponseOutputItem,
|
|
48
|
+
unknown
|
|
49
|
+
> = z.pipe(
|
|
50
|
+
z.catchall(
|
|
51
|
+
z.object({
|
|
52
|
+
id: types.optional(types.string()),
|
|
53
|
+
type: types.string(),
|
|
54
|
+
status: types.optional(types.string()),
|
|
55
|
+
role: types.optional(ResponseOutputItemRole$inboundSchema),
|
|
56
|
+
content: types.optional(z.array(z.record(z.string(), z.any()))),
|
|
57
|
+
text: types.optional(types.string()),
|
|
58
|
+
call_id: types.optional(types.string()),
|
|
59
|
+
name: types.optional(types.string()),
|
|
60
|
+
arguments: types.optional(types.string()),
|
|
61
|
+
summary: types.optional(z.array(z.record(z.string(), z.any()))),
|
|
62
|
+
encrypted_content: types.optional(types.string()),
|
|
63
|
+
image_url: types.optional(types.string()),
|
|
64
|
+
audio_url: types.optional(types.string()),
|
|
65
|
+
video_url: types.optional(types.string()),
|
|
66
|
+
embedding: types.optional(z.array(types.number())),
|
|
67
|
+
job_id: types.optional(types.string()),
|
|
68
|
+
progress: types.optional(types.number()),
|
|
69
|
+
mime_type: types.optional(types.string()),
|
|
70
|
+
}),
|
|
71
|
+
z.any(),
|
|
72
|
+
),
|
|
73
|
+
z.transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
"call_id": "callId",
|
|
76
|
+
"encrypted_content": "encryptedContent",
|
|
77
|
+
"image_url": "imageUrl",
|
|
78
|
+
"audio_url": "audioUrl",
|
|
79
|
+
"video_url": "videoUrl",
|
|
80
|
+
"job_id": "jobId",
|
|
81
|
+
"mime_type": "mimeType",
|
|
82
|
+
});
|
|
83
|
+
}),
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
export function responseOutputItemFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<ResponseOutputItem, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => ResponseOutputItem$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'ResponseOutputItem' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { smartUnion } from "../types/smart-union.js";
|
|
8
9
|
import {
|
|
9
10
|
AttachmentInput,
|
|
10
11
|
AttachmentInput$Outbound,
|
|
@@ -20,12 +21,29 @@ import {
|
|
|
20
21
|
ResponseFormat$Outbound,
|
|
21
22
|
ResponseFormat$outboundSchema,
|
|
22
23
|
} from "./response-format.js";
|
|
24
|
+
import {
|
|
25
|
+
ResponsesFunctionTool,
|
|
26
|
+
ResponsesFunctionTool$Outbound,
|
|
27
|
+
ResponsesFunctionTool$outboundSchema,
|
|
28
|
+
} from "./responses-function-tool.js";
|
|
29
|
+
import {
|
|
30
|
+
ResponsesInputItem,
|
|
31
|
+
ResponsesInputItem$Outbound,
|
|
32
|
+
ResponsesInputItem$outboundSchema,
|
|
33
|
+
} from "./responses-input-item.js";
|
|
34
|
+
import {
|
|
35
|
+
ResponsesToolChoice,
|
|
36
|
+
ResponsesToolChoice$Outbound,
|
|
37
|
+
ResponsesToolChoice$outboundSchema,
|
|
38
|
+
} from "./responses-tool-choice.js";
|
|
23
39
|
import {
|
|
24
40
|
StreamOptions,
|
|
25
41
|
StreamOptions$Outbound,
|
|
26
42
|
StreamOptions$outboundSchema,
|
|
27
43
|
} from "./stream-options.js";
|
|
28
44
|
|
|
45
|
+
export type Input = string | Array<ResponsesInputItem>;
|
|
46
|
+
|
|
29
47
|
export const Modality = {
|
|
30
48
|
Text: "text",
|
|
31
49
|
Image: "image",
|
|
@@ -37,7 +55,7 @@ export type Modality = ClosedEnum<typeof Modality>;
|
|
|
37
55
|
|
|
38
56
|
export type ResponsesCreateRequest = {
|
|
39
57
|
model: string;
|
|
40
|
-
input:
|
|
58
|
+
input: string | Array<ResponsesInputItem>;
|
|
41
59
|
attachments?: Array<AttachmentInput> | undefined;
|
|
42
60
|
attachment?: AttachmentInput | undefined;
|
|
43
61
|
stream?: boolean | undefined;
|
|
@@ -46,8 +64,8 @@ export type ResponsesCreateRequest = {
|
|
|
46
64
|
previousResponseId?: string | undefined;
|
|
47
65
|
maxOutputTokens?: number | undefined;
|
|
48
66
|
temperature?: number | undefined;
|
|
49
|
-
tools?: Array<
|
|
50
|
-
toolChoice?:
|
|
67
|
+
tools?: Array<ResponsesFunctionTool> | undefined;
|
|
68
|
+
toolChoice?: ResponsesToolChoice | undefined;
|
|
51
69
|
responseFormat?: ResponseFormat | undefined;
|
|
52
70
|
streamOptions?: StreamOptions | undefined;
|
|
53
71
|
parallelToolCalls?: boolean | undefined;
|
|
@@ -73,6 +91,17 @@ export type ResponsesCreateRequest = {
|
|
|
73
91
|
[additionalProperties: string]: unknown;
|
|
74
92
|
};
|
|
75
93
|
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type Input$Outbound = string | Array<ResponsesInputItem$Outbound>;
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const Input$outboundSchema: z.ZodMiniType<Input$Outbound, Input> =
|
|
99
|
+
smartUnion([z.string(), z.array(ResponsesInputItem$outboundSchema)]);
|
|
100
|
+
|
|
101
|
+
export function inputToJSON(input: Input): string {
|
|
102
|
+
return JSON.stringify(Input$outboundSchema.parse(input));
|
|
103
|
+
}
|
|
104
|
+
|
|
76
105
|
/** @internal */
|
|
77
106
|
export const Modality$outboundSchema: z.ZodMiniEnum<typeof Modality> = z.enum(
|
|
78
107
|
Modality,
|
|
@@ -81,7 +110,7 @@ export const Modality$outboundSchema: z.ZodMiniEnum<typeof Modality> = z.enum(
|
|
|
81
110
|
/** @internal */
|
|
82
111
|
export type ResponsesCreateRequest$Outbound = {
|
|
83
112
|
model: string;
|
|
84
|
-
input:
|
|
113
|
+
input: string | Array<ResponsesInputItem$Outbound>;
|
|
85
114
|
attachments?: Array<AttachmentInput$Outbound> | undefined;
|
|
86
115
|
attachment?: AttachmentInput$Outbound | undefined;
|
|
87
116
|
stream?: boolean | undefined;
|
|
@@ -90,8 +119,8 @@ export type ResponsesCreateRequest$Outbound = {
|
|
|
90
119
|
previous_response_id?: string | undefined;
|
|
91
120
|
max_output_tokens?: number | undefined;
|
|
92
121
|
temperature?: number | undefined;
|
|
93
|
-
tools?: Array<
|
|
94
|
-
tool_choice?:
|
|
122
|
+
tools?: Array<ResponsesFunctionTool$Outbound> | undefined;
|
|
123
|
+
tool_choice?: ResponsesToolChoice$Outbound | undefined;
|
|
95
124
|
response_format?: ResponseFormat$Outbound | undefined;
|
|
96
125
|
stream_options?: StreamOptions$Outbound | undefined;
|
|
97
126
|
parallel_tool_calls?: boolean | undefined;
|
|
@@ -125,7 +154,10 @@ export const ResponsesCreateRequest$outboundSchema: z.ZodMiniType<
|
|
|
125
154
|
z.catchall(
|
|
126
155
|
z.object({
|
|
127
156
|
model: z.string(),
|
|
128
|
-
input:
|
|
157
|
+
input: smartUnion([
|
|
158
|
+
z.string(),
|
|
159
|
+
z.array(ResponsesInputItem$outboundSchema),
|
|
160
|
+
]),
|
|
129
161
|
attachments: z.optional(z.array(AttachmentInput$outboundSchema)),
|
|
130
162
|
attachment: z.optional(AttachmentInput$outboundSchema),
|
|
131
163
|
stream: z.optional(z.boolean()),
|
|
@@ -134,8 +166,8 @@ export const ResponsesCreateRequest$outboundSchema: z.ZodMiniType<
|
|
|
134
166
|
previousResponseId: z.optional(z.string()),
|
|
135
167
|
maxOutputTokens: z.optional(z.int()),
|
|
136
168
|
temperature: z.optional(z.number()),
|
|
137
|
-
tools: z.optional(z.array(
|
|
138
|
-
toolChoice: z.optional(
|
|
169
|
+
tools: z.optional(z.array(ResponsesFunctionTool$outboundSchema)),
|
|
170
|
+
toolChoice: z.optional(ResponsesToolChoice$outboundSchema),
|
|
139
171
|
responseFormat: z.optional(ResponseFormat$outboundSchema),
|
|
140
172
|
streamOptions: z.optional(StreamOptions$outboundSchema),
|
|
141
173
|
parallelToolCalls: z.optional(z.boolean()),
|