@orq-ai/node 3.1.6 → 3.2.0-rc.3

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.
Files changed (165) hide show
  1. package/README.md +0 -38
  2. package/docs/sdks/deployments/README.md +0 -81
  3. package/jsr.json +1 -2
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/lib/config.js.map +1 -1
  7. package/lib/matchers.d.ts.map +1 -1
  8. package/lib/matchers.js +1 -4
  9. package/lib/matchers.js.map +1 -1
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/fileget.js +2 -2
  12. package/models/operations/filelist.js +2 -2
  13. package/models/operations/fileupload.js +2 -2
  14. package/models/operations/index.d.ts +0 -1
  15. package/models/operations/index.d.ts.map +1 -1
  16. package/models/operations/index.js +0 -1
  17. package/models/operations/index.js.map +1 -1
  18. package/package.json +3 -2
  19. package/sdk/deployments.d.ts +0 -8
  20. package/sdk/deployments.d.ts.map +1 -1
  21. package/sdk/deployments.js +0 -10
  22. package/sdk/deployments.js.map +1 -1
  23. package/src/lib/config.ts +2 -2
  24. package/src/lib/matchers.ts +1 -4
  25. package/src/models/operations/createcontact.ts +2 -2
  26. package/src/models/operations/fileget.ts +2 -2
  27. package/src/models/operations/filelist.ts +2 -2
  28. package/src/models/operations/fileupload.ts +2 -2
  29. package/src/models/operations/index.ts +0 -1
  30. package/src/sdk/deployments.ts +0 -19
  31. package/funcs/deploymentsStream.d.ts +0 -16
  32. package/funcs/deploymentsStream.d.ts.map +0 -1
  33. package/funcs/deploymentsStream.js +0 -126
  34. package/funcs/deploymentsStream.js.map +0 -1
  35. package/lib/event-streams.d.ts +0 -17
  36. package/lib/event-streams.d.ts.map +0 -1
  37. package/lib/event-streams.js +0 -220
  38. package/lib/event-streams.js.map +0 -1
  39. package/models/operations/deploymentstream.d.ts +0 -1622
  40. package/models/operations/deploymentstream.d.ts.map +0 -1
  41. package/models/operations/deploymentstream.js +0 -1571
  42. package/models/operations/deploymentstream.js.map +0 -1
  43. package/packages/orq-rc/FUNCTIONS.md +0 -106
  44. package/packages/orq-rc/README.md +0 -559
  45. package/packages/orq-rc/RUNTIMES.md +0 -48
  46. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  47. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  48. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  49. package/packages/orq-rc/docs/sdks/files/README.md +0 -305
  50. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  51. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  52. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
  53. package/packages/orq-rc/docs/sdks/promptsnippets/README.md +0 -534
  54. package/packages/orq-rc/docs/sdks/remoteconfig/README.md +0 -80
  55. package/packages/orq-rc/jsr.json +0 -28
  56. package/packages/orq-rc/package-lock.json +0 -1861
  57. package/packages/orq-rc/package.json +0 -31
  58. package/packages/orq-rc/src/core.ts +0 -13
  59. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -126
  60. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -134
  61. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -142
  62. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -141
  63. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -134
  64. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -150
  65. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -126
  66. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -130
  67. package/packages/orq-rc/src/funcs/filesGet.ts +0 -129
  68. package/packages/orq-rc/src/funcs/filesList.ts +0 -131
  69. package/packages/orq-rc/src/funcs/filesUpload.ts +0 -149
  70. package/packages/orq-rc/src/funcs/promptSnippetsCreate.ts +0 -128
  71. package/packages/orq-rc/src/funcs/promptSnippetsDelete.ts +0 -131
  72. package/packages/orq-rc/src/funcs/promptSnippetsGet.ts +0 -130
  73. package/packages/orq-rc/src/funcs/promptSnippetsGetByKey.ts +0 -132
  74. package/packages/orq-rc/src/funcs/promptSnippetsList.ts +0 -132
  75. package/packages/orq-rc/src/funcs/promptSnippetsUpdate.ts +0 -139
  76. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -126
  77. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -130
  78. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -146
  79. package/packages/orq-rc/src/funcs/promptsList.ts +0 -133
  80. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -139
  81. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -132
  82. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -138
  83. package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +0 -127
  84. package/packages/orq-rc/src/hooks/global.ts +0 -44
  85. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  86. package/packages/orq-rc/src/hooks/index.ts +0 -6
  87. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  88. package/packages/orq-rc/src/hooks/types.ts +0 -109
  89. package/packages/orq-rc/src/index.ts +0 -7
  90. package/packages/orq-rc/src/lib/base64.ts +0 -37
  91. package/packages/orq-rc/src/lib/config.ts +0 -70
  92. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  93. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  94. package/packages/orq-rc/src/lib/env.ts +0 -73
  95. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  96. package/packages/orq-rc/src/lib/files.ts +0 -40
  97. package/packages/orq-rc/src/lib/http.ts +0 -323
  98. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  99. package/packages/orq-rc/src/lib/logger.ts +0 -9
  100. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  101. package/packages/orq-rc/src/lib/primitives.ts +0 -136
  102. package/packages/orq-rc/src/lib/retries.ts +0 -218
  103. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  104. package/packages/orq-rc/src/lib/sdks.ts +0 -400
  105. package/packages/orq-rc/src/lib/security.ts +0 -254
  106. package/packages/orq-rc/src/lib/url.ts +0 -33
  107. package/packages/orq-rc/src/models/components/deployments.ts +0 -1666
  108. package/packages/orq-rc/src/models/components/index.ts +0 -6
  109. package/packages/orq-rc/src/models/components/security.ts +0 -71
  110. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  111. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  112. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  113. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  114. package/packages/orq-rc/src/models/errors/index.ts +0 -11
  115. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  116. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  117. package/packages/orq-rc/src/models/errors/updatepromptsnippet.ts +0 -71
  118. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  119. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  120. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3819
  121. package/packages/orq-rc/src/models/operations/createpromptsnippet.ts +0 -6239
  122. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  123. package/packages/orq-rc/src/models/operations/deletepromptsnippet.ts +0 -69
  124. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
  125. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3527
  126. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1144
  127. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2148
  128. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -3062
  129. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  130. package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
  131. package/packages/orq-rc/src/models/operations/filelist.ts +0 -321
  132. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
  133. package/packages/orq-rc/src/models/operations/findonebykeypromptsnippet.ts +0 -4483
  134. package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -4343
  135. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2116
  136. package/packages/orq-rc/src/models/operations/getallpromptsnippets.ts +0 -4472
  137. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1982
  138. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2012
  139. package/packages/orq-rc/src/models/operations/index.ts +0 -29
  140. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2146
  141. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  142. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3917
  143. package/packages/orq-rc/src/models/operations/updatepromptsnippet.ts +0 -6544
  144. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  145. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  146. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  147. package/packages/orq-rc/src/sdk/files.ts +0 -72
  148. package/packages/orq-rc/src/sdk/index.ts +0 -5
  149. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  150. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  151. package/packages/orq-rc/src/sdk/promptsnippets.ts +0 -99
  152. package/packages/orq-rc/src/sdk/remoteconfig.ts +0 -24
  153. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  154. package/packages/orq-rc/src/types/blobs.ts +0 -31
  155. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  156. package/packages/orq-rc/src/types/enums.ts +0 -16
  157. package/packages/orq-rc/src/types/fp.ts +0 -50
  158. package/packages/orq-rc/src/types/index.ts +0 -11
  159. package/packages/orq-rc/src/types/operations.ts +0 -105
  160. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  161. package/packages/orq-rc/src/types/streams.ts +0 -21
  162. package/packages/orq-rc/tsconfig.json +0 -41
  163. package/src/funcs/deploymentsStream.ts +0 -151
  164. package/src/lib/event-streams.ts +0 -264
  165. package/src/models/operations/deploymentstream.ts +0 -3062
@@ -1,1666 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- export type Inputs = string | number | boolean;
13
-
14
- /**
15
- * The role of the prompt message
16
- */
17
- export const Role = {
18
- System: "system",
19
- Assistant: "assistant",
20
- User: "user",
21
- Exception: "exception",
22
- Tool: "tool",
23
- Prompt: "prompt",
24
- Correction: "correction",
25
- ExpectedOutput: "expected_output",
26
- } as const;
27
- /**
28
- * The role of the prompt message
29
- */
30
- export type Role = ClosedEnum<typeof Role>;
31
-
32
- export const TwoType = {
33
- ImageUrl: "image_url",
34
- } as const;
35
- export type TwoType = ClosedEnum<typeof TwoType>;
36
-
37
- export type ImageUrl = {
38
- /**
39
- * Either a URL of the image or the base64 encoded data URI.
40
- */
41
- url: string;
42
- /**
43
- * Specifies the detail level of the image. Currently only supported with OpenAI models
44
- */
45
- detail?: string | undefined;
46
- };
47
-
48
- /**
49
- * The image part of the prompt message. Only supported with vision models.
50
- */
51
- export type Two2 = {
52
- type: TwoType;
53
- imageUrl: ImageUrl;
54
- };
55
-
56
- export const Deployments2Type = {
57
- Text: "text",
58
- } as const;
59
- export type Deployments2Type = ClosedEnum<typeof Deployments2Type>;
60
-
61
- /**
62
- * Text content part of a prompt message
63
- */
64
- export type One = {
65
- type: Deployments2Type;
66
- text: string;
67
- };
68
-
69
- export type Two = One | Two2;
70
-
71
- /**
72
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
73
- */
74
- export type Content = string | Array<One | Two2>;
75
-
76
- export const Type = {
77
- Function: "function",
78
- } as const;
79
- export type Type = ClosedEnum<typeof Type>;
80
-
81
- export type FunctionT = {
82
- name: string;
83
- /**
84
- * JSON string arguments for the functions
85
- */
86
- arguments: string;
87
- };
88
-
89
- export type ToolCalls = {
90
- id?: string | undefined;
91
- index?: number | undefined;
92
- type: Type;
93
- function: FunctionT;
94
- };
95
-
96
- export type PrefixMessages = {
97
- /**
98
- * The role of the prompt message
99
- */
100
- role: Role;
101
- /**
102
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
103
- */
104
- content: string | Array<One | Two2>;
105
- toolCalls?: Array<ToolCalls> | undefined;
106
- };
107
-
108
- /**
109
- * The role of the prompt message
110
- */
111
- export const DeploymentsRole = {
112
- System: "system",
113
- Assistant: "assistant",
114
- User: "user",
115
- Exception: "exception",
116
- Tool: "tool",
117
- Prompt: "prompt",
118
- Correction: "correction",
119
- ExpectedOutput: "expected_output",
120
- } as const;
121
- /**
122
- * The role of the prompt message
123
- */
124
- export type DeploymentsRole = ClosedEnum<typeof DeploymentsRole>;
125
-
126
- export const Deployments2MessagesContentType = {
127
- ImageUrl: "image_url",
128
- } as const;
129
- export type Deployments2MessagesContentType = ClosedEnum<
130
- typeof Deployments2MessagesContentType
131
- >;
132
-
133
- export type TwoImageUrl = {
134
- /**
135
- * Either a URL of the image or the base64 encoded data URI.
136
- */
137
- url: string;
138
- /**
139
- * Specifies the detail level of the image. Currently only supported with OpenAI models
140
- */
141
- detail?: string | undefined;
142
- };
143
-
144
- /**
145
- * The image part of the prompt message. Only supported with vision models.
146
- */
147
- export type Deployments22 = {
148
- type: Deployments2MessagesContentType;
149
- imageUrl: TwoImageUrl;
150
- };
151
-
152
- export const Deployments2MessagesType = {
153
- Text: "text",
154
- } as const;
155
- export type Deployments2MessagesType = ClosedEnum<
156
- typeof Deployments2MessagesType
157
- >;
158
-
159
- /**
160
- * Text content part of a prompt message
161
- */
162
- export type Two1 = {
163
- type: Deployments2MessagesType;
164
- text: string;
165
- };
166
-
167
- export type Content2 = Two1 | Deployments22;
168
-
169
- /**
170
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
171
- */
172
- export type DeploymentsContent = string | Array<Two1 | Deployments22>;
173
-
174
- export const DeploymentsType = {
175
- Function: "function",
176
- } as const;
177
- export type DeploymentsType = ClosedEnum<typeof DeploymentsType>;
178
-
179
- export type DeploymentsFunction = {
180
- name: string;
181
- /**
182
- * JSON string arguments for the functions
183
- */
184
- arguments: string;
185
- };
186
-
187
- export type DeploymentsToolCalls = {
188
- id?: string | undefined;
189
- index?: number | undefined;
190
- type: DeploymentsType;
191
- function: DeploymentsFunction;
192
- };
193
-
194
- export type Messages = {
195
- /**
196
- * The role of the prompt message
197
- */
198
- role: DeploymentsRole;
199
- /**
200
- * The contents of the user message. Either the text content of the message or an array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts.
201
- */
202
- content: string | Array<Two1 | Deployments22>;
203
- toolCalls?: Array<DeploymentsToolCalls> | undefined;
204
- };
205
-
206
- /**
207
- * Metadata about the document
208
- */
209
- export type Metadata = {
210
- /**
211
- * Name of the file the text is from.
212
- */
213
- fileName?: string | undefined;
214
- /**
215
- * Content type of the file the text is from.
216
- */
217
- fileType?: string | undefined;
218
- /**
219
- * The page number the text is from.
220
- */
221
- pageNumber?: number | undefined;
222
- };
223
-
224
- export type Documents = {
225
- /**
226
- * The text content of the document
227
- */
228
- text: string;
229
- /**
230
- * Metadata about the document
231
- */
232
- metadata?: Metadata | undefined;
233
- };
234
-
235
- export type InvokeOptions = {
236
- /**
237
- * Whether to include the retrieved knowledge chunks in the response.
238
- */
239
- includeRetrievals?: boolean | undefined;
240
- };
241
-
242
- /**
243
- * The deployment request payload
244
- */
245
- export type Deployments = {
246
- /**
247
- * The deployment key to invoke
248
- */
249
- key: string;
250
- /**
251
- * Key-value pairs variables to replace in your prompts. If a variable is not provided that is defined in the prompt, the default variables are used.
252
- */
253
- inputs?: { [k: string]: string | number | boolean } | undefined;
254
- /**
255
- * Key-value pairs that match your data model and fields declared in your configuration matrix. If you send multiple prompt keys, the context will be applied to the evaluation of each key.
256
- */
257
- context?: { [k: string]: any } | undefined;
258
- /**
259
- * A list of messages to include after the `System` message, but before the `User` and `Assistant` pairs configured in your deployment.
260
- */
261
- prefixMessages?: Array<PrefixMessages> | undefined;
262
- /**
263
- * A list of messages to send to the deployment.
264
- */
265
- messages?: Array<Messages> | undefined;
266
- /**
267
- * A list of file IDs that are associated with the deployment request.
268
- */
269
- fileIds?: Array<string> | undefined;
270
- /**
271
- * Key-value pairs that you want to attach to the log generated by this request.
272
- */
273
- metadata?: { [k: string]: any } | undefined;
274
- /**
275
- * Utilized for passing additional parameters to the model provider. Exercise caution when using this feature, as the included parameters will overwrite any parameters specified in the deployment prompt configuration.
276
- */
277
- extraParams?: { [k: string]: any } | undefined;
278
- /**
279
- * A list of relevant documents that evaluators and guardrails can cite to evaluate the user input or the model response based on your deployment settings.
280
- */
281
- documents?: Array<Documents> | undefined;
282
- invokeOptions?: InvokeOptions | undefined;
283
- };
284
-
285
- /** @internal */
286
- export const Inputs$inboundSchema: z.ZodType<Inputs, z.ZodTypeDef, unknown> = z
287
- .union([z.string(), z.number(), z.boolean()]);
288
-
289
- /** @internal */
290
- export type Inputs$Outbound = string | number | boolean;
291
-
292
- /** @internal */
293
- export const Inputs$outboundSchema: z.ZodType<
294
- Inputs$Outbound,
295
- z.ZodTypeDef,
296
- Inputs
297
- > = z.union([z.string(), z.number(), z.boolean()]);
298
-
299
- /**
300
- * @internal
301
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
302
- */
303
- export namespace Inputs$ {
304
- /** @deprecated use `Inputs$inboundSchema` instead. */
305
- export const inboundSchema = Inputs$inboundSchema;
306
- /** @deprecated use `Inputs$outboundSchema` instead. */
307
- export const outboundSchema = Inputs$outboundSchema;
308
- /** @deprecated use `Inputs$Outbound` instead. */
309
- export type Outbound = Inputs$Outbound;
310
- }
311
-
312
- export function inputsToJSON(inputs: Inputs): string {
313
- return JSON.stringify(Inputs$outboundSchema.parse(inputs));
314
- }
315
-
316
- export function inputsFromJSON(
317
- jsonString: string,
318
- ): SafeParseResult<Inputs, SDKValidationError> {
319
- return safeParse(
320
- jsonString,
321
- (x) => Inputs$inboundSchema.parse(JSON.parse(x)),
322
- `Failed to parse 'Inputs' from JSON`,
323
- );
324
- }
325
-
326
- /** @internal */
327
- export const Role$inboundSchema: z.ZodNativeEnum<typeof Role> = z.nativeEnum(
328
- Role,
329
- );
330
-
331
- /** @internal */
332
- export const Role$outboundSchema: z.ZodNativeEnum<typeof Role> =
333
- Role$inboundSchema;
334
-
335
- /**
336
- * @internal
337
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
338
- */
339
- export namespace Role$ {
340
- /** @deprecated use `Role$inboundSchema` instead. */
341
- export const inboundSchema = Role$inboundSchema;
342
- /** @deprecated use `Role$outboundSchema` instead. */
343
- export const outboundSchema = Role$outboundSchema;
344
- }
345
-
346
- /** @internal */
347
- export const TwoType$inboundSchema: z.ZodNativeEnum<typeof TwoType> = z
348
- .nativeEnum(TwoType);
349
-
350
- /** @internal */
351
- export const TwoType$outboundSchema: z.ZodNativeEnum<typeof TwoType> =
352
- TwoType$inboundSchema;
353
-
354
- /**
355
- * @internal
356
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
357
- */
358
- export namespace TwoType$ {
359
- /** @deprecated use `TwoType$inboundSchema` instead. */
360
- export const inboundSchema = TwoType$inboundSchema;
361
- /** @deprecated use `TwoType$outboundSchema` instead. */
362
- export const outboundSchema = TwoType$outboundSchema;
363
- }
364
-
365
- /** @internal */
366
- export const ImageUrl$inboundSchema: z.ZodType<
367
- ImageUrl,
368
- z.ZodTypeDef,
369
- unknown
370
- > = z.object({
371
- url: z.string(),
372
- detail: z.string().optional(),
373
- });
374
-
375
- /** @internal */
376
- export type ImageUrl$Outbound = {
377
- url: string;
378
- detail?: string | undefined;
379
- };
380
-
381
- /** @internal */
382
- export const ImageUrl$outboundSchema: z.ZodType<
383
- ImageUrl$Outbound,
384
- z.ZodTypeDef,
385
- ImageUrl
386
- > = z.object({
387
- url: z.string(),
388
- detail: z.string().optional(),
389
- });
390
-
391
- /**
392
- * @internal
393
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
394
- */
395
- export namespace ImageUrl$ {
396
- /** @deprecated use `ImageUrl$inboundSchema` instead. */
397
- export const inboundSchema = ImageUrl$inboundSchema;
398
- /** @deprecated use `ImageUrl$outboundSchema` instead. */
399
- export const outboundSchema = ImageUrl$outboundSchema;
400
- /** @deprecated use `ImageUrl$Outbound` instead. */
401
- export type Outbound = ImageUrl$Outbound;
402
- }
403
-
404
- export function imageUrlToJSON(imageUrl: ImageUrl): string {
405
- return JSON.stringify(ImageUrl$outboundSchema.parse(imageUrl));
406
- }
407
-
408
- export function imageUrlFromJSON(
409
- jsonString: string,
410
- ): SafeParseResult<ImageUrl, SDKValidationError> {
411
- return safeParse(
412
- jsonString,
413
- (x) => ImageUrl$inboundSchema.parse(JSON.parse(x)),
414
- `Failed to parse 'ImageUrl' from JSON`,
415
- );
416
- }
417
-
418
- /** @internal */
419
- export const Two2$inboundSchema: z.ZodType<Two2, z.ZodTypeDef, unknown> = z
420
- .object({
421
- type: TwoType$inboundSchema,
422
- image_url: z.lazy(() => ImageUrl$inboundSchema),
423
- }).transform((v) => {
424
- return remap$(v, {
425
- "image_url": "imageUrl",
426
- });
427
- });
428
-
429
- /** @internal */
430
- export type Two2$Outbound = {
431
- type: string;
432
- image_url: ImageUrl$Outbound;
433
- };
434
-
435
- /** @internal */
436
- export const Two2$outboundSchema: z.ZodType<Two2$Outbound, z.ZodTypeDef, Two2> =
437
- z.object({
438
- type: TwoType$outboundSchema,
439
- imageUrl: z.lazy(() => ImageUrl$outboundSchema),
440
- }).transform((v) => {
441
- return remap$(v, {
442
- imageUrl: "image_url",
443
- });
444
- });
445
-
446
- /**
447
- * @internal
448
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
449
- */
450
- export namespace Two2$ {
451
- /** @deprecated use `Two2$inboundSchema` instead. */
452
- export const inboundSchema = Two2$inboundSchema;
453
- /** @deprecated use `Two2$outboundSchema` instead. */
454
- export const outboundSchema = Two2$outboundSchema;
455
- /** @deprecated use `Two2$Outbound` instead. */
456
- export type Outbound = Two2$Outbound;
457
- }
458
-
459
- export function two2ToJSON(two2: Two2): string {
460
- return JSON.stringify(Two2$outboundSchema.parse(two2));
461
- }
462
-
463
- export function two2FromJSON(
464
- jsonString: string,
465
- ): SafeParseResult<Two2, SDKValidationError> {
466
- return safeParse(
467
- jsonString,
468
- (x) => Two2$inboundSchema.parse(JSON.parse(x)),
469
- `Failed to parse 'Two2' from JSON`,
470
- );
471
- }
472
-
473
- /** @internal */
474
- export const Deployments2Type$inboundSchema: z.ZodNativeEnum<
475
- typeof Deployments2Type
476
- > = z.nativeEnum(Deployments2Type);
477
-
478
- /** @internal */
479
- export const Deployments2Type$outboundSchema: z.ZodNativeEnum<
480
- typeof Deployments2Type
481
- > = Deployments2Type$inboundSchema;
482
-
483
- /**
484
- * @internal
485
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
486
- */
487
- export namespace Deployments2Type$ {
488
- /** @deprecated use `Deployments2Type$inboundSchema` instead. */
489
- export const inboundSchema = Deployments2Type$inboundSchema;
490
- /** @deprecated use `Deployments2Type$outboundSchema` instead. */
491
- export const outboundSchema = Deployments2Type$outboundSchema;
492
- }
493
-
494
- /** @internal */
495
- export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
496
- .object({
497
- type: Deployments2Type$inboundSchema,
498
- text: z.string(),
499
- });
500
-
501
- /** @internal */
502
- export type One$Outbound = {
503
- type: string;
504
- text: string;
505
- };
506
-
507
- /** @internal */
508
- export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
509
- .object({
510
- type: Deployments2Type$outboundSchema,
511
- text: z.string(),
512
- });
513
-
514
- /**
515
- * @internal
516
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
517
- */
518
- export namespace One$ {
519
- /** @deprecated use `One$inboundSchema` instead. */
520
- export const inboundSchema = One$inboundSchema;
521
- /** @deprecated use `One$outboundSchema` instead. */
522
- export const outboundSchema = One$outboundSchema;
523
- /** @deprecated use `One$Outbound` instead. */
524
- export type Outbound = One$Outbound;
525
- }
526
-
527
- export function oneToJSON(one: One): string {
528
- return JSON.stringify(One$outboundSchema.parse(one));
529
- }
530
-
531
- export function oneFromJSON(
532
- jsonString: string,
533
- ): SafeParseResult<One, SDKValidationError> {
534
- return safeParse(
535
- jsonString,
536
- (x) => One$inboundSchema.parse(JSON.parse(x)),
537
- `Failed to parse 'One' from JSON`,
538
- );
539
- }
540
-
541
- /** @internal */
542
- export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z.union(
543
- [z.lazy(() => One$inboundSchema), z.lazy(() => Two2$inboundSchema)],
544
- );
545
-
546
- /** @internal */
547
- export type Two$Outbound = One$Outbound | Two2$Outbound;
548
-
549
- /** @internal */
550
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
551
- .union([z.lazy(() => One$outboundSchema), z.lazy(() => Two2$outboundSchema)]);
552
-
553
- /**
554
- * @internal
555
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
556
- */
557
- export namespace Two$ {
558
- /** @deprecated use `Two$inboundSchema` instead. */
559
- export const inboundSchema = Two$inboundSchema;
560
- /** @deprecated use `Two$outboundSchema` instead. */
561
- export const outboundSchema = Two$outboundSchema;
562
- /** @deprecated use `Two$Outbound` instead. */
563
- export type Outbound = Two$Outbound;
564
- }
565
-
566
- export function twoToJSON(two: Two): string {
567
- return JSON.stringify(Two$outboundSchema.parse(two));
568
- }
569
-
570
- export function twoFromJSON(
571
- jsonString: string,
572
- ): SafeParseResult<Two, SDKValidationError> {
573
- return safeParse(
574
- jsonString,
575
- (x) => Two$inboundSchema.parse(JSON.parse(x)),
576
- `Failed to parse 'Two' from JSON`,
577
- );
578
- }
579
-
580
- /** @internal */
581
- export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
582
- z.union([
583
- z.string(),
584
- z.array(z.union([
585
- z.lazy(() => One$inboundSchema),
586
- z.lazy(() => Two2$inboundSchema),
587
- ])),
588
- ]);
589
-
590
- /** @internal */
591
- export type Content$Outbound = string | Array<One$Outbound | Two2$Outbound>;
592
-
593
- /** @internal */
594
- export const Content$outboundSchema: z.ZodType<
595
- Content$Outbound,
596
- z.ZodTypeDef,
597
- Content
598
- > = z.union([
599
- z.string(),
600
- z.array(z.union([
601
- z.lazy(() => One$outboundSchema),
602
- z.lazy(() => Two2$outboundSchema),
603
- ])),
604
- ]);
605
-
606
- /**
607
- * @internal
608
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
609
- */
610
- export namespace Content$ {
611
- /** @deprecated use `Content$inboundSchema` instead. */
612
- export const inboundSchema = Content$inboundSchema;
613
- /** @deprecated use `Content$outboundSchema` instead. */
614
- export const outboundSchema = Content$outboundSchema;
615
- /** @deprecated use `Content$Outbound` instead. */
616
- export type Outbound = Content$Outbound;
617
- }
618
-
619
- export function contentToJSON(content: Content): string {
620
- return JSON.stringify(Content$outboundSchema.parse(content));
621
- }
622
-
623
- export function contentFromJSON(
624
- jsonString: string,
625
- ): SafeParseResult<Content, SDKValidationError> {
626
- return safeParse(
627
- jsonString,
628
- (x) => Content$inboundSchema.parse(JSON.parse(x)),
629
- `Failed to parse 'Content' from JSON`,
630
- );
631
- }
632
-
633
- /** @internal */
634
- export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
635
- Type,
636
- );
637
-
638
- /** @internal */
639
- export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
640
- Type$inboundSchema;
641
-
642
- /**
643
- * @internal
644
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
645
- */
646
- export namespace Type$ {
647
- /** @deprecated use `Type$inboundSchema` instead. */
648
- export const inboundSchema = Type$inboundSchema;
649
- /** @deprecated use `Type$outboundSchema` instead. */
650
- export const outboundSchema = Type$outboundSchema;
651
- }
652
-
653
- /** @internal */
654
- export const FunctionT$inboundSchema: z.ZodType<
655
- FunctionT,
656
- z.ZodTypeDef,
657
- unknown
658
- > = z.object({
659
- name: z.string(),
660
- arguments: z.string(),
661
- });
662
-
663
- /** @internal */
664
- export type FunctionT$Outbound = {
665
- name: string;
666
- arguments: string;
667
- };
668
-
669
- /** @internal */
670
- export const FunctionT$outboundSchema: z.ZodType<
671
- FunctionT$Outbound,
672
- z.ZodTypeDef,
673
- FunctionT
674
- > = z.object({
675
- name: z.string(),
676
- arguments: z.string(),
677
- });
678
-
679
- /**
680
- * @internal
681
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
682
- */
683
- export namespace FunctionT$ {
684
- /** @deprecated use `FunctionT$inboundSchema` instead. */
685
- export const inboundSchema = FunctionT$inboundSchema;
686
- /** @deprecated use `FunctionT$outboundSchema` instead. */
687
- export const outboundSchema = FunctionT$outboundSchema;
688
- /** @deprecated use `FunctionT$Outbound` instead. */
689
- export type Outbound = FunctionT$Outbound;
690
- }
691
-
692
- export function functionToJSON(functionT: FunctionT): string {
693
- return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
694
- }
695
-
696
- export function functionFromJSON(
697
- jsonString: string,
698
- ): SafeParseResult<FunctionT, SDKValidationError> {
699
- return safeParse(
700
- jsonString,
701
- (x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
702
- `Failed to parse 'FunctionT' from JSON`,
703
- );
704
- }
705
-
706
- /** @internal */
707
- export const ToolCalls$inboundSchema: z.ZodType<
708
- ToolCalls,
709
- z.ZodTypeDef,
710
- unknown
711
- > = z.object({
712
- id: z.string().optional(),
713
- index: z.number().optional(),
714
- type: Type$inboundSchema,
715
- function: z.lazy(() => FunctionT$inboundSchema),
716
- });
717
-
718
- /** @internal */
719
- export type ToolCalls$Outbound = {
720
- id?: string | undefined;
721
- index?: number | undefined;
722
- type: string;
723
- function: FunctionT$Outbound;
724
- };
725
-
726
- /** @internal */
727
- export const ToolCalls$outboundSchema: z.ZodType<
728
- ToolCalls$Outbound,
729
- z.ZodTypeDef,
730
- ToolCalls
731
- > = z.object({
732
- id: z.string().optional(),
733
- index: z.number().optional(),
734
- type: Type$outboundSchema,
735
- function: z.lazy(() => FunctionT$outboundSchema),
736
- });
737
-
738
- /**
739
- * @internal
740
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
741
- */
742
- export namespace ToolCalls$ {
743
- /** @deprecated use `ToolCalls$inboundSchema` instead. */
744
- export const inboundSchema = ToolCalls$inboundSchema;
745
- /** @deprecated use `ToolCalls$outboundSchema` instead. */
746
- export const outboundSchema = ToolCalls$outboundSchema;
747
- /** @deprecated use `ToolCalls$Outbound` instead. */
748
- export type Outbound = ToolCalls$Outbound;
749
- }
750
-
751
- export function toolCallsToJSON(toolCalls: ToolCalls): string {
752
- return JSON.stringify(ToolCalls$outboundSchema.parse(toolCalls));
753
- }
754
-
755
- export function toolCallsFromJSON(
756
- jsonString: string,
757
- ): SafeParseResult<ToolCalls, SDKValidationError> {
758
- return safeParse(
759
- jsonString,
760
- (x) => ToolCalls$inboundSchema.parse(JSON.parse(x)),
761
- `Failed to parse 'ToolCalls' from JSON`,
762
- );
763
- }
764
-
765
- /** @internal */
766
- export const PrefixMessages$inboundSchema: z.ZodType<
767
- PrefixMessages,
768
- z.ZodTypeDef,
769
- unknown
770
- > = z.object({
771
- role: Role$inboundSchema,
772
- content: z.union([
773
- z.string(),
774
- z.array(z.union([
775
- z.lazy(() => One$inboundSchema),
776
- z.lazy(() => Two2$inboundSchema),
777
- ])),
778
- ]),
779
- tool_calls: z.array(z.lazy(() => ToolCalls$inboundSchema)).optional(),
780
- }).transform((v) => {
781
- return remap$(v, {
782
- "tool_calls": "toolCalls",
783
- });
784
- });
785
-
786
- /** @internal */
787
- export type PrefixMessages$Outbound = {
788
- role: string;
789
- content: string | Array<One$Outbound | Two2$Outbound>;
790
- tool_calls?: Array<ToolCalls$Outbound> | undefined;
791
- };
792
-
793
- /** @internal */
794
- export const PrefixMessages$outboundSchema: z.ZodType<
795
- PrefixMessages$Outbound,
796
- z.ZodTypeDef,
797
- PrefixMessages
798
- > = z.object({
799
- role: Role$outboundSchema,
800
- content: z.union([
801
- z.string(),
802
- z.array(z.union([
803
- z.lazy(() => One$outboundSchema),
804
- z.lazy(() => Two2$outboundSchema),
805
- ])),
806
- ]),
807
- toolCalls: z.array(z.lazy(() => ToolCalls$outboundSchema)).optional(),
808
- }).transform((v) => {
809
- return remap$(v, {
810
- toolCalls: "tool_calls",
811
- });
812
- });
813
-
814
- /**
815
- * @internal
816
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
817
- */
818
- export namespace PrefixMessages$ {
819
- /** @deprecated use `PrefixMessages$inboundSchema` instead. */
820
- export const inboundSchema = PrefixMessages$inboundSchema;
821
- /** @deprecated use `PrefixMessages$outboundSchema` instead. */
822
- export const outboundSchema = PrefixMessages$outboundSchema;
823
- /** @deprecated use `PrefixMessages$Outbound` instead. */
824
- export type Outbound = PrefixMessages$Outbound;
825
- }
826
-
827
- export function prefixMessagesToJSON(prefixMessages: PrefixMessages): string {
828
- return JSON.stringify(PrefixMessages$outboundSchema.parse(prefixMessages));
829
- }
830
-
831
- export function prefixMessagesFromJSON(
832
- jsonString: string,
833
- ): SafeParseResult<PrefixMessages, SDKValidationError> {
834
- return safeParse(
835
- jsonString,
836
- (x) => PrefixMessages$inboundSchema.parse(JSON.parse(x)),
837
- `Failed to parse 'PrefixMessages' from JSON`,
838
- );
839
- }
840
-
841
- /** @internal */
842
- export const DeploymentsRole$inboundSchema: z.ZodNativeEnum<
843
- typeof DeploymentsRole
844
- > = z.nativeEnum(DeploymentsRole);
845
-
846
- /** @internal */
847
- export const DeploymentsRole$outboundSchema: z.ZodNativeEnum<
848
- typeof DeploymentsRole
849
- > = DeploymentsRole$inboundSchema;
850
-
851
- /**
852
- * @internal
853
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
854
- */
855
- export namespace DeploymentsRole$ {
856
- /** @deprecated use `DeploymentsRole$inboundSchema` instead. */
857
- export const inboundSchema = DeploymentsRole$inboundSchema;
858
- /** @deprecated use `DeploymentsRole$outboundSchema` instead. */
859
- export const outboundSchema = DeploymentsRole$outboundSchema;
860
- }
861
-
862
- /** @internal */
863
- export const Deployments2MessagesContentType$inboundSchema: z.ZodNativeEnum<
864
- typeof Deployments2MessagesContentType
865
- > = z.nativeEnum(Deployments2MessagesContentType);
866
-
867
- /** @internal */
868
- export const Deployments2MessagesContentType$outboundSchema: z.ZodNativeEnum<
869
- typeof Deployments2MessagesContentType
870
- > = Deployments2MessagesContentType$inboundSchema;
871
-
872
- /**
873
- * @internal
874
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
875
- */
876
- export namespace Deployments2MessagesContentType$ {
877
- /** @deprecated use `Deployments2MessagesContentType$inboundSchema` instead. */
878
- export const inboundSchema = Deployments2MessagesContentType$inboundSchema;
879
- /** @deprecated use `Deployments2MessagesContentType$outboundSchema` instead. */
880
- export const outboundSchema = Deployments2MessagesContentType$outboundSchema;
881
- }
882
-
883
- /** @internal */
884
- export const TwoImageUrl$inboundSchema: z.ZodType<
885
- TwoImageUrl,
886
- z.ZodTypeDef,
887
- unknown
888
- > = z.object({
889
- url: z.string(),
890
- detail: z.string().optional(),
891
- });
892
-
893
- /** @internal */
894
- export type TwoImageUrl$Outbound = {
895
- url: string;
896
- detail?: string | undefined;
897
- };
898
-
899
- /** @internal */
900
- export const TwoImageUrl$outboundSchema: z.ZodType<
901
- TwoImageUrl$Outbound,
902
- z.ZodTypeDef,
903
- TwoImageUrl
904
- > = z.object({
905
- url: z.string(),
906
- detail: z.string().optional(),
907
- });
908
-
909
- /**
910
- * @internal
911
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
912
- */
913
- export namespace TwoImageUrl$ {
914
- /** @deprecated use `TwoImageUrl$inboundSchema` instead. */
915
- export const inboundSchema = TwoImageUrl$inboundSchema;
916
- /** @deprecated use `TwoImageUrl$outboundSchema` instead. */
917
- export const outboundSchema = TwoImageUrl$outboundSchema;
918
- /** @deprecated use `TwoImageUrl$Outbound` instead. */
919
- export type Outbound = TwoImageUrl$Outbound;
920
- }
921
-
922
- export function twoImageUrlToJSON(twoImageUrl: TwoImageUrl): string {
923
- return JSON.stringify(TwoImageUrl$outboundSchema.parse(twoImageUrl));
924
- }
925
-
926
- export function twoImageUrlFromJSON(
927
- jsonString: string,
928
- ): SafeParseResult<TwoImageUrl, SDKValidationError> {
929
- return safeParse(
930
- jsonString,
931
- (x) => TwoImageUrl$inboundSchema.parse(JSON.parse(x)),
932
- `Failed to parse 'TwoImageUrl' from JSON`,
933
- );
934
- }
935
-
936
- /** @internal */
937
- export const Deployments22$inboundSchema: z.ZodType<
938
- Deployments22,
939
- z.ZodTypeDef,
940
- unknown
941
- > = z.object({
942
- type: Deployments2MessagesContentType$inboundSchema,
943
- image_url: z.lazy(() => TwoImageUrl$inboundSchema),
944
- }).transform((v) => {
945
- return remap$(v, {
946
- "image_url": "imageUrl",
947
- });
948
- });
949
-
950
- /** @internal */
951
- export type Deployments22$Outbound = {
952
- type: string;
953
- image_url: TwoImageUrl$Outbound;
954
- };
955
-
956
- /** @internal */
957
- export const Deployments22$outboundSchema: z.ZodType<
958
- Deployments22$Outbound,
959
- z.ZodTypeDef,
960
- Deployments22
961
- > = z.object({
962
- type: Deployments2MessagesContentType$outboundSchema,
963
- imageUrl: z.lazy(() => TwoImageUrl$outboundSchema),
964
- }).transform((v) => {
965
- return remap$(v, {
966
- imageUrl: "image_url",
967
- });
968
- });
969
-
970
- /**
971
- * @internal
972
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
973
- */
974
- export namespace Deployments22$ {
975
- /** @deprecated use `Deployments22$inboundSchema` instead. */
976
- export const inboundSchema = Deployments22$inboundSchema;
977
- /** @deprecated use `Deployments22$outboundSchema` instead. */
978
- export const outboundSchema = Deployments22$outboundSchema;
979
- /** @deprecated use `Deployments22$Outbound` instead. */
980
- export type Outbound = Deployments22$Outbound;
981
- }
982
-
983
- export function deployments22ToJSON(deployments22: Deployments22): string {
984
- return JSON.stringify(Deployments22$outboundSchema.parse(deployments22));
985
- }
986
-
987
- export function deployments22FromJSON(
988
- jsonString: string,
989
- ): SafeParseResult<Deployments22, SDKValidationError> {
990
- return safeParse(
991
- jsonString,
992
- (x) => Deployments22$inboundSchema.parse(JSON.parse(x)),
993
- `Failed to parse 'Deployments22' from JSON`,
994
- );
995
- }
996
-
997
- /** @internal */
998
- export const Deployments2MessagesType$inboundSchema: z.ZodNativeEnum<
999
- typeof Deployments2MessagesType
1000
- > = z.nativeEnum(Deployments2MessagesType);
1001
-
1002
- /** @internal */
1003
- export const Deployments2MessagesType$outboundSchema: z.ZodNativeEnum<
1004
- typeof Deployments2MessagesType
1005
- > = Deployments2MessagesType$inboundSchema;
1006
-
1007
- /**
1008
- * @internal
1009
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1010
- */
1011
- export namespace Deployments2MessagesType$ {
1012
- /** @deprecated use `Deployments2MessagesType$inboundSchema` instead. */
1013
- export const inboundSchema = Deployments2MessagesType$inboundSchema;
1014
- /** @deprecated use `Deployments2MessagesType$outboundSchema` instead. */
1015
- export const outboundSchema = Deployments2MessagesType$outboundSchema;
1016
- }
1017
-
1018
- /** @internal */
1019
- export const Two1$inboundSchema: z.ZodType<Two1, z.ZodTypeDef, unknown> = z
1020
- .object({
1021
- type: Deployments2MessagesType$inboundSchema,
1022
- text: z.string(),
1023
- });
1024
-
1025
- /** @internal */
1026
- export type Two1$Outbound = {
1027
- type: string;
1028
- text: string;
1029
- };
1030
-
1031
- /** @internal */
1032
- export const Two1$outboundSchema: z.ZodType<Two1$Outbound, z.ZodTypeDef, Two1> =
1033
- z.object({
1034
- type: Deployments2MessagesType$outboundSchema,
1035
- text: z.string(),
1036
- });
1037
-
1038
- /**
1039
- * @internal
1040
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1041
- */
1042
- export namespace Two1$ {
1043
- /** @deprecated use `Two1$inboundSchema` instead. */
1044
- export const inboundSchema = Two1$inboundSchema;
1045
- /** @deprecated use `Two1$outboundSchema` instead. */
1046
- export const outboundSchema = Two1$outboundSchema;
1047
- /** @deprecated use `Two1$Outbound` instead. */
1048
- export type Outbound = Two1$Outbound;
1049
- }
1050
-
1051
- export function two1ToJSON(two1: Two1): string {
1052
- return JSON.stringify(Two1$outboundSchema.parse(two1));
1053
- }
1054
-
1055
- export function two1FromJSON(
1056
- jsonString: string,
1057
- ): SafeParseResult<Two1, SDKValidationError> {
1058
- return safeParse(
1059
- jsonString,
1060
- (x) => Two1$inboundSchema.parse(JSON.parse(x)),
1061
- `Failed to parse 'Two1' from JSON`,
1062
- );
1063
- }
1064
-
1065
- /** @internal */
1066
- export const Content2$inboundSchema: z.ZodType<
1067
- Content2,
1068
- z.ZodTypeDef,
1069
- unknown
1070
- > = z.union([
1071
- z.lazy(() => Two1$inboundSchema),
1072
- z.lazy(() => Deployments22$inboundSchema),
1073
- ]);
1074
-
1075
- /** @internal */
1076
- export type Content2$Outbound = Two1$Outbound | Deployments22$Outbound;
1077
-
1078
- /** @internal */
1079
- export const Content2$outboundSchema: z.ZodType<
1080
- Content2$Outbound,
1081
- z.ZodTypeDef,
1082
- Content2
1083
- > = z.union([
1084
- z.lazy(() => Two1$outboundSchema),
1085
- z.lazy(() => Deployments22$outboundSchema),
1086
- ]);
1087
-
1088
- /**
1089
- * @internal
1090
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1091
- */
1092
- export namespace Content2$ {
1093
- /** @deprecated use `Content2$inboundSchema` instead. */
1094
- export const inboundSchema = Content2$inboundSchema;
1095
- /** @deprecated use `Content2$outboundSchema` instead. */
1096
- export const outboundSchema = Content2$outboundSchema;
1097
- /** @deprecated use `Content2$Outbound` instead. */
1098
- export type Outbound = Content2$Outbound;
1099
- }
1100
-
1101
- export function content2ToJSON(content2: Content2): string {
1102
- return JSON.stringify(Content2$outboundSchema.parse(content2));
1103
- }
1104
-
1105
- export function content2FromJSON(
1106
- jsonString: string,
1107
- ): SafeParseResult<Content2, SDKValidationError> {
1108
- return safeParse(
1109
- jsonString,
1110
- (x) => Content2$inboundSchema.parse(JSON.parse(x)),
1111
- `Failed to parse 'Content2' from JSON`,
1112
- );
1113
- }
1114
-
1115
- /** @internal */
1116
- export const DeploymentsContent$inboundSchema: z.ZodType<
1117
- DeploymentsContent,
1118
- z.ZodTypeDef,
1119
- unknown
1120
- > = z.union([
1121
- z.string(),
1122
- z.array(z.union([
1123
- z.lazy(() => Two1$inboundSchema),
1124
- z.lazy(() => Deployments22$inboundSchema),
1125
- ])),
1126
- ]);
1127
-
1128
- /** @internal */
1129
- export type DeploymentsContent$Outbound =
1130
- | string
1131
- | Array<Two1$Outbound | Deployments22$Outbound>;
1132
-
1133
- /** @internal */
1134
- export const DeploymentsContent$outboundSchema: z.ZodType<
1135
- DeploymentsContent$Outbound,
1136
- z.ZodTypeDef,
1137
- DeploymentsContent
1138
- > = z.union([
1139
- z.string(),
1140
- z.array(z.union([
1141
- z.lazy(() => Two1$outboundSchema),
1142
- z.lazy(() => Deployments22$outboundSchema),
1143
- ])),
1144
- ]);
1145
-
1146
- /**
1147
- * @internal
1148
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1149
- */
1150
- export namespace DeploymentsContent$ {
1151
- /** @deprecated use `DeploymentsContent$inboundSchema` instead. */
1152
- export const inboundSchema = DeploymentsContent$inboundSchema;
1153
- /** @deprecated use `DeploymentsContent$outboundSchema` instead. */
1154
- export const outboundSchema = DeploymentsContent$outboundSchema;
1155
- /** @deprecated use `DeploymentsContent$Outbound` instead. */
1156
- export type Outbound = DeploymentsContent$Outbound;
1157
- }
1158
-
1159
- export function deploymentsContentToJSON(
1160
- deploymentsContent: DeploymentsContent,
1161
- ): string {
1162
- return JSON.stringify(
1163
- DeploymentsContent$outboundSchema.parse(deploymentsContent),
1164
- );
1165
- }
1166
-
1167
- export function deploymentsContentFromJSON(
1168
- jsonString: string,
1169
- ): SafeParseResult<DeploymentsContent, SDKValidationError> {
1170
- return safeParse(
1171
- jsonString,
1172
- (x) => DeploymentsContent$inboundSchema.parse(JSON.parse(x)),
1173
- `Failed to parse 'DeploymentsContent' from JSON`,
1174
- );
1175
- }
1176
-
1177
- /** @internal */
1178
- export const DeploymentsType$inboundSchema: z.ZodNativeEnum<
1179
- typeof DeploymentsType
1180
- > = z.nativeEnum(DeploymentsType);
1181
-
1182
- /** @internal */
1183
- export const DeploymentsType$outboundSchema: z.ZodNativeEnum<
1184
- typeof DeploymentsType
1185
- > = DeploymentsType$inboundSchema;
1186
-
1187
- /**
1188
- * @internal
1189
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1190
- */
1191
- export namespace DeploymentsType$ {
1192
- /** @deprecated use `DeploymentsType$inboundSchema` instead. */
1193
- export const inboundSchema = DeploymentsType$inboundSchema;
1194
- /** @deprecated use `DeploymentsType$outboundSchema` instead. */
1195
- export const outboundSchema = DeploymentsType$outboundSchema;
1196
- }
1197
-
1198
- /** @internal */
1199
- export const DeploymentsFunction$inboundSchema: z.ZodType<
1200
- DeploymentsFunction,
1201
- z.ZodTypeDef,
1202
- unknown
1203
- > = z.object({
1204
- name: z.string(),
1205
- arguments: z.string(),
1206
- });
1207
-
1208
- /** @internal */
1209
- export type DeploymentsFunction$Outbound = {
1210
- name: string;
1211
- arguments: string;
1212
- };
1213
-
1214
- /** @internal */
1215
- export const DeploymentsFunction$outboundSchema: z.ZodType<
1216
- DeploymentsFunction$Outbound,
1217
- z.ZodTypeDef,
1218
- DeploymentsFunction
1219
- > = z.object({
1220
- name: z.string(),
1221
- arguments: z.string(),
1222
- });
1223
-
1224
- /**
1225
- * @internal
1226
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1227
- */
1228
- export namespace DeploymentsFunction$ {
1229
- /** @deprecated use `DeploymentsFunction$inboundSchema` instead. */
1230
- export const inboundSchema = DeploymentsFunction$inboundSchema;
1231
- /** @deprecated use `DeploymentsFunction$outboundSchema` instead. */
1232
- export const outboundSchema = DeploymentsFunction$outboundSchema;
1233
- /** @deprecated use `DeploymentsFunction$Outbound` instead. */
1234
- export type Outbound = DeploymentsFunction$Outbound;
1235
- }
1236
-
1237
- export function deploymentsFunctionToJSON(
1238
- deploymentsFunction: DeploymentsFunction,
1239
- ): string {
1240
- return JSON.stringify(
1241
- DeploymentsFunction$outboundSchema.parse(deploymentsFunction),
1242
- );
1243
- }
1244
-
1245
- export function deploymentsFunctionFromJSON(
1246
- jsonString: string,
1247
- ): SafeParseResult<DeploymentsFunction, SDKValidationError> {
1248
- return safeParse(
1249
- jsonString,
1250
- (x) => DeploymentsFunction$inboundSchema.parse(JSON.parse(x)),
1251
- `Failed to parse 'DeploymentsFunction' from JSON`,
1252
- );
1253
- }
1254
-
1255
- /** @internal */
1256
- export const DeploymentsToolCalls$inboundSchema: z.ZodType<
1257
- DeploymentsToolCalls,
1258
- z.ZodTypeDef,
1259
- unknown
1260
- > = z.object({
1261
- id: z.string().optional(),
1262
- index: z.number().optional(),
1263
- type: DeploymentsType$inboundSchema,
1264
- function: z.lazy(() => DeploymentsFunction$inboundSchema),
1265
- });
1266
-
1267
- /** @internal */
1268
- export type DeploymentsToolCalls$Outbound = {
1269
- id?: string | undefined;
1270
- index?: number | undefined;
1271
- type: string;
1272
- function: DeploymentsFunction$Outbound;
1273
- };
1274
-
1275
- /** @internal */
1276
- export const DeploymentsToolCalls$outboundSchema: z.ZodType<
1277
- DeploymentsToolCalls$Outbound,
1278
- z.ZodTypeDef,
1279
- DeploymentsToolCalls
1280
- > = z.object({
1281
- id: z.string().optional(),
1282
- index: z.number().optional(),
1283
- type: DeploymentsType$outboundSchema,
1284
- function: z.lazy(() => DeploymentsFunction$outboundSchema),
1285
- });
1286
-
1287
- /**
1288
- * @internal
1289
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1290
- */
1291
- export namespace DeploymentsToolCalls$ {
1292
- /** @deprecated use `DeploymentsToolCalls$inboundSchema` instead. */
1293
- export const inboundSchema = DeploymentsToolCalls$inboundSchema;
1294
- /** @deprecated use `DeploymentsToolCalls$outboundSchema` instead. */
1295
- export const outboundSchema = DeploymentsToolCalls$outboundSchema;
1296
- /** @deprecated use `DeploymentsToolCalls$Outbound` instead. */
1297
- export type Outbound = DeploymentsToolCalls$Outbound;
1298
- }
1299
-
1300
- export function deploymentsToolCallsToJSON(
1301
- deploymentsToolCalls: DeploymentsToolCalls,
1302
- ): string {
1303
- return JSON.stringify(
1304
- DeploymentsToolCalls$outboundSchema.parse(deploymentsToolCalls),
1305
- );
1306
- }
1307
-
1308
- export function deploymentsToolCallsFromJSON(
1309
- jsonString: string,
1310
- ): SafeParseResult<DeploymentsToolCalls, SDKValidationError> {
1311
- return safeParse(
1312
- jsonString,
1313
- (x) => DeploymentsToolCalls$inboundSchema.parse(JSON.parse(x)),
1314
- `Failed to parse 'DeploymentsToolCalls' from JSON`,
1315
- );
1316
- }
1317
-
1318
- /** @internal */
1319
- export const Messages$inboundSchema: z.ZodType<
1320
- Messages,
1321
- z.ZodTypeDef,
1322
- unknown
1323
- > = z.object({
1324
- role: DeploymentsRole$inboundSchema,
1325
- content: z.union([
1326
- z.string(),
1327
- z.array(z.union([
1328
- z.lazy(() => Two1$inboundSchema),
1329
- z.lazy(() => Deployments22$inboundSchema),
1330
- ])),
1331
- ]),
1332
- tool_calls: z.array(z.lazy(() => DeploymentsToolCalls$inboundSchema))
1333
- .optional(),
1334
- }).transform((v) => {
1335
- return remap$(v, {
1336
- "tool_calls": "toolCalls",
1337
- });
1338
- });
1339
-
1340
- /** @internal */
1341
- export type Messages$Outbound = {
1342
- role: string;
1343
- content: string | Array<Two1$Outbound | Deployments22$Outbound>;
1344
- tool_calls?: Array<DeploymentsToolCalls$Outbound> | undefined;
1345
- };
1346
-
1347
- /** @internal */
1348
- export const Messages$outboundSchema: z.ZodType<
1349
- Messages$Outbound,
1350
- z.ZodTypeDef,
1351
- Messages
1352
- > = z.object({
1353
- role: DeploymentsRole$outboundSchema,
1354
- content: z.union([
1355
- z.string(),
1356
- z.array(z.union([
1357
- z.lazy(() => Two1$outboundSchema),
1358
- z.lazy(() => Deployments22$outboundSchema),
1359
- ])),
1360
- ]),
1361
- toolCalls: z.array(z.lazy(() => DeploymentsToolCalls$outboundSchema))
1362
- .optional(),
1363
- }).transform((v) => {
1364
- return remap$(v, {
1365
- toolCalls: "tool_calls",
1366
- });
1367
- });
1368
-
1369
- /**
1370
- * @internal
1371
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1372
- */
1373
- export namespace Messages$ {
1374
- /** @deprecated use `Messages$inboundSchema` instead. */
1375
- export const inboundSchema = Messages$inboundSchema;
1376
- /** @deprecated use `Messages$outboundSchema` instead. */
1377
- export const outboundSchema = Messages$outboundSchema;
1378
- /** @deprecated use `Messages$Outbound` instead. */
1379
- export type Outbound = Messages$Outbound;
1380
- }
1381
-
1382
- export function messagesToJSON(messages: Messages): string {
1383
- return JSON.stringify(Messages$outboundSchema.parse(messages));
1384
- }
1385
-
1386
- export function messagesFromJSON(
1387
- jsonString: string,
1388
- ): SafeParseResult<Messages, SDKValidationError> {
1389
- return safeParse(
1390
- jsonString,
1391
- (x) => Messages$inboundSchema.parse(JSON.parse(x)),
1392
- `Failed to parse 'Messages' from JSON`,
1393
- );
1394
- }
1395
-
1396
- /** @internal */
1397
- export const Metadata$inboundSchema: z.ZodType<
1398
- Metadata,
1399
- z.ZodTypeDef,
1400
- unknown
1401
- > = z.object({
1402
- file_name: z.string().optional(),
1403
- file_type: z.string().optional(),
1404
- page_number: z.number().optional(),
1405
- }).transform((v) => {
1406
- return remap$(v, {
1407
- "file_name": "fileName",
1408
- "file_type": "fileType",
1409
- "page_number": "pageNumber",
1410
- });
1411
- });
1412
-
1413
- /** @internal */
1414
- export type Metadata$Outbound = {
1415
- file_name?: string | undefined;
1416
- file_type?: string | undefined;
1417
- page_number?: number | undefined;
1418
- };
1419
-
1420
- /** @internal */
1421
- export const Metadata$outboundSchema: z.ZodType<
1422
- Metadata$Outbound,
1423
- z.ZodTypeDef,
1424
- Metadata
1425
- > = z.object({
1426
- fileName: z.string().optional(),
1427
- fileType: z.string().optional(),
1428
- pageNumber: z.number().optional(),
1429
- }).transform((v) => {
1430
- return remap$(v, {
1431
- fileName: "file_name",
1432
- fileType: "file_type",
1433
- pageNumber: "page_number",
1434
- });
1435
- });
1436
-
1437
- /**
1438
- * @internal
1439
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1440
- */
1441
- export namespace Metadata$ {
1442
- /** @deprecated use `Metadata$inboundSchema` instead. */
1443
- export const inboundSchema = Metadata$inboundSchema;
1444
- /** @deprecated use `Metadata$outboundSchema` instead. */
1445
- export const outboundSchema = Metadata$outboundSchema;
1446
- /** @deprecated use `Metadata$Outbound` instead. */
1447
- export type Outbound = Metadata$Outbound;
1448
- }
1449
-
1450
- export function metadataToJSON(metadata: Metadata): string {
1451
- return JSON.stringify(Metadata$outboundSchema.parse(metadata));
1452
- }
1453
-
1454
- export function metadataFromJSON(
1455
- jsonString: string,
1456
- ): SafeParseResult<Metadata, SDKValidationError> {
1457
- return safeParse(
1458
- jsonString,
1459
- (x) => Metadata$inboundSchema.parse(JSON.parse(x)),
1460
- `Failed to parse 'Metadata' from JSON`,
1461
- );
1462
- }
1463
-
1464
- /** @internal */
1465
- export const Documents$inboundSchema: z.ZodType<
1466
- Documents,
1467
- z.ZodTypeDef,
1468
- unknown
1469
- > = z.object({
1470
- text: z.string(),
1471
- metadata: z.lazy(() => Metadata$inboundSchema).optional(),
1472
- });
1473
-
1474
- /** @internal */
1475
- export type Documents$Outbound = {
1476
- text: string;
1477
- metadata?: Metadata$Outbound | undefined;
1478
- };
1479
-
1480
- /** @internal */
1481
- export const Documents$outboundSchema: z.ZodType<
1482
- Documents$Outbound,
1483
- z.ZodTypeDef,
1484
- Documents
1485
- > = z.object({
1486
- text: z.string(),
1487
- metadata: z.lazy(() => Metadata$outboundSchema).optional(),
1488
- });
1489
-
1490
- /**
1491
- * @internal
1492
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1493
- */
1494
- export namespace Documents$ {
1495
- /** @deprecated use `Documents$inboundSchema` instead. */
1496
- export const inboundSchema = Documents$inboundSchema;
1497
- /** @deprecated use `Documents$outboundSchema` instead. */
1498
- export const outboundSchema = Documents$outboundSchema;
1499
- /** @deprecated use `Documents$Outbound` instead. */
1500
- export type Outbound = Documents$Outbound;
1501
- }
1502
-
1503
- export function documentsToJSON(documents: Documents): string {
1504
- return JSON.stringify(Documents$outboundSchema.parse(documents));
1505
- }
1506
-
1507
- export function documentsFromJSON(
1508
- jsonString: string,
1509
- ): SafeParseResult<Documents, SDKValidationError> {
1510
- return safeParse(
1511
- jsonString,
1512
- (x) => Documents$inboundSchema.parse(JSON.parse(x)),
1513
- `Failed to parse 'Documents' from JSON`,
1514
- );
1515
- }
1516
-
1517
- /** @internal */
1518
- export const InvokeOptions$inboundSchema: z.ZodType<
1519
- InvokeOptions,
1520
- z.ZodTypeDef,
1521
- unknown
1522
- > = z.object({
1523
- include_retrievals: z.boolean().default(false),
1524
- }).transform((v) => {
1525
- return remap$(v, {
1526
- "include_retrievals": "includeRetrievals",
1527
- });
1528
- });
1529
-
1530
- /** @internal */
1531
- export type InvokeOptions$Outbound = {
1532
- include_retrievals: boolean;
1533
- };
1534
-
1535
- /** @internal */
1536
- export const InvokeOptions$outboundSchema: z.ZodType<
1537
- InvokeOptions$Outbound,
1538
- z.ZodTypeDef,
1539
- InvokeOptions
1540
- > = z.object({
1541
- includeRetrievals: z.boolean().default(false),
1542
- }).transform((v) => {
1543
- return remap$(v, {
1544
- includeRetrievals: "include_retrievals",
1545
- });
1546
- });
1547
-
1548
- /**
1549
- * @internal
1550
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1551
- */
1552
- export namespace InvokeOptions$ {
1553
- /** @deprecated use `InvokeOptions$inboundSchema` instead. */
1554
- export const inboundSchema = InvokeOptions$inboundSchema;
1555
- /** @deprecated use `InvokeOptions$outboundSchema` instead. */
1556
- export const outboundSchema = InvokeOptions$outboundSchema;
1557
- /** @deprecated use `InvokeOptions$Outbound` instead. */
1558
- export type Outbound = InvokeOptions$Outbound;
1559
- }
1560
-
1561
- export function invokeOptionsToJSON(invokeOptions: InvokeOptions): string {
1562
- return JSON.stringify(InvokeOptions$outboundSchema.parse(invokeOptions));
1563
- }
1564
-
1565
- export function invokeOptionsFromJSON(
1566
- jsonString: string,
1567
- ): SafeParseResult<InvokeOptions, SDKValidationError> {
1568
- return safeParse(
1569
- jsonString,
1570
- (x) => InvokeOptions$inboundSchema.parse(JSON.parse(x)),
1571
- `Failed to parse 'InvokeOptions' from JSON`,
1572
- );
1573
- }
1574
-
1575
- /** @internal */
1576
- export const Deployments$inboundSchema: z.ZodType<
1577
- Deployments,
1578
- z.ZodTypeDef,
1579
- unknown
1580
- > = z.object({
1581
- key: z.string(),
1582
- inputs: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),
1583
- context: z.record(z.any()).optional(),
1584
- prefix_messages: z.array(z.lazy(() => PrefixMessages$inboundSchema))
1585
- .optional(),
1586
- messages: z.array(z.lazy(() => Messages$inboundSchema)).optional(),
1587
- file_ids: z.array(z.string()).optional(),
1588
- metadata: z.record(z.any()).optional(),
1589
- extra_params: z.record(z.any()).optional(),
1590
- documents: z.array(z.lazy(() => Documents$inboundSchema)).optional(),
1591
- invoke_options: z.lazy(() => InvokeOptions$inboundSchema).optional(),
1592
- }).transform((v) => {
1593
- return remap$(v, {
1594
- "prefix_messages": "prefixMessages",
1595
- "file_ids": "fileIds",
1596
- "extra_params": "extraParams",
1597
- "invoke_options": "invokeOptions",
1598
- });
1599
- });
1600
-
1601
- /** @internal */
1602
- export type Deployments$Outbound = {
1603
- key: string;
1604
- inputs?: { [k: string]: string | number | boolean } | undefined;
1605
- context?: { [k: string]: any } | undefined;
1606
- prefix_messages?: Array<PrefixMessages$Outbound> | undefined;
1607
- messages?: Array<Messages$Outbound> | undefined;
1608
- file_ids?: Array<string> | undefined;
1609
- metadata?: { [k: string]: any } | undefined;
1610
- extra_params?: { [k: string]: any } | undefined;
1611
- documents?: Array<Documents$Outbound> | undefined;
1612
- invoke_options?: InvokeOptions$Outbound | undefined;
1613
- };
1614
-
1615
- /** @internal */
1616
- export const Deployments$outboundSchema: z.ZodType<
1617
- Deployments$Outbound,
1618
- z.ZodTypeDef,
1619
- Deployments
1620
- > = z.object({
1621
- key: z.string(),
1622
- inputs: z.record(z.union([z.string(), z.number(), z.boolean()])).optional(),
1623
- context: z.record(z.any()).optional(),
1624
- prefixMessages: z.array(z.lazy(() => PrefixMessages$outboundSchema))
1625
- .optional(),
1626
- messages: z.array(z.lazy(() => Messages$outboundSchema)).optional(),
1627
- fileIds: z.array(z.string()).optional(),
1628
- metadata: z.record(z.any()).optional(),
1629
- extraParams: z.record(z.any()).optional(),
1630
- documents: z.array(z.lazy(() => Documents$outboundSchema)).optional(),
1631
- invokeOptions: z.lazy(() => InvokeOptions$outboundSchema).optional(),
1632
- }).transform((v) => {
1633
- return remap$(v, {
1634
- prefixMessages: "prefix_messages",
1635
- fileIds: "file_ids",
1636
- extraParams: "extra_params",
1637
- invokeOptions: "invoke_options",
1638
- });
1639
- });
1640
-
1641
- /**
1642
- * @internal
1643
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1644
- */
1645
- export namespace Deployments$ {
1646
- /** @deprecated use `Deployments$inboundSchema` instead. */
1647
- export const inboundSchema = Deployments$inboundSchema;
1648
- /** @deprecated use `Deployments$outboundSchema` instead. */
1649
- export const outboundSchema = Deployments$outboundSchema;
1650
- /** @deprecated use `Deployments$Outbound` instead. */
1651
- export type Outbound = Deployments$Outbound;
1652
- }
1653
-
1654
- export function deploymentsToJSON(deployments: Deployments): string {
1655
- return JSON.stringify(Deployments$outboundSchema.parse(deployments));
1656
- }
1657
-
1658
- export function deploymentsFromJSON(
1659
- jsonString: string,
1660
- ): SafeParseResult<Deployments, SDKValidationError> {
1661
- return safeParse(
1662
- jsonString,
1663
- (x) => Deployments$inboundSchema.parse(JSON.parse(x)),
1664
- `Failed to parse 'Deployments' from JSON`,
1665
- );
1666
- }