@orq-ai/node 3.1.7 → 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 (147) 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 +3 -3
  5. package/lib/config.js +3 -3
  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 +3 -3
  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 -506
  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 -235
  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/remoteconfigs/README.md +0 -80
  54. package/packages/orq-rc/jsr.json +0 -27
  55. package/packages/orq-rc/package-lock.json +0 -1861
  56. package/packages/orq-rc/package.json +0 -31
  57. package/packages/orq-rc/src/core.ts +0 -13
  58. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -127
  59. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -135
  60. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -143
  61. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -142
  62. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -135
  63. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -127
  64. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -150
  65. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -131
  66. package/packages/orq-rc/src/funcs/filesGet.ts +0 -133
  67. package/packages/orq-rc/src/funcs/filesList.ts +0 -134
  68. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -127
  69. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -131
  70. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -147
  71. package/packages/orq-rc/src/funcs/promptsList.ts +0 -134
  72. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -140
  73. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -133
  74. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -139
  75. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -128
  76. package/packages/orq-rc/src/hooks/global.ts +0 -44
  77. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  78. package/packages/orq-rc/src/hooks/index.ts +0 -6
  79. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  80. package/packages/orq-rc/src/hooks/types.ts +0 -110
  81. package/packages/orq-rc/src/index.ts +0 -7
  82. package/packages/orq-rc/src/lib/base64.ts +0 -37
  83. package/packages/orq-rc/src/lib/config.ts +0 -70
  84. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  85. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  86. package/packages/orq-rc/src/lib/env.ts +0 -73
  87. package/packages/orq-rc/src/lib/files.ts +0 -40
  88. package/packages/orq-rc/src/lib/http.ts +0 -323
  89. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  90. package/packages/orq-rc/src/lib/logger.ts +0 -9
  91. package/packages/orq-rc/src/lib/matchers.ts +0 -322
  92. package/packages/orq-rc/src/lib/primitives.ts +0 -136
  93. package/packages/orq-rc/src/lib/retries.ts +0 -218
  94. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  95. package/packages/orq-rc/src/lib/sdks.ts +0 -400
  96. package/packages/orq-rc/src/lib/security.ts +0 -253
  97. package/packages/orq-rc/src/lib/url.ts +0 -33
  98. package/packages/orq-rc/src/models/components/deployments.ts +0 -1666
  99. package/packages/orq-rc/src/models/components/index.ts +0 -6
  100. package/packages/orq-rc/src/models/components/security.ts +0 -71
  101. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  102. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  103. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  104. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  105. package/packages/orq-rc/src/models/errors/index.ts +0 -10
  106. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  107. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  108. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  109. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  110. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3717
  111. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  112. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
  113. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3527
  114. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1144
  115. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2148
  116. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  117. package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
  118. package/packages/orq-rc/src/models/operations/filelist.ts +0 -336
  119. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
  120. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2116
  121. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1982
  122. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2012
  123. package/packages/orq-rc/src/models/operations/index.ts +0 -22
  124. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2146
  125. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  126. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3900
  127. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  128. package/packages/orq-rc/src/sdk/deployments.ts +0 -70
  129. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  130. package/packages/orq-rc/src/sdk/files.ts +0 -78
  131. package/packages/orq-rc/src/sdk/index.ts +0 -5
  132. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  133. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  134. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  135. package/packages/orq-rc/src/sdk/sdk.ts +0 -43
  136. package/packages/orq-rc/src/types/blobs.ts +0 -31
  137. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  138. package/packages/orq-rc/src/types/enums.ts +0 -16
  139. package/packages/orq-rc/src/types/fp.ts +0 -50
  140. package/packages/orq-rc/src/types/index.ts +0 -11
  141. package/packages/orq-rc/src/types/operations.ts +0 -105
  142. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  143. package/packages/orq-rc/src/types/streams.ts +0 -21
  144. package/packages/orq-rc/tsconfig.json +0 -41
  145. package/src/funcs/deploymentsStream.ts +0 -151
  146. package/src/lib/event-streams.ts +0 -264
  147. package/src/models/operations/deploymentstream.ts +0 -3062
@@ -1,1144 +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 DeploymentInvokeGlobals = {
13
- environment?: string | undefined;
14
- contactId?: string | undefined;
15
- };
16
-
17
- /**
18
- * Indicates the type of model used to generate the response
19
- */
20
- export const DeploymentInvokeObject = {
21
- Chat: "chat",
22
- Completion: "completion",
23
- Image: "image",
24
- Vision: "vision",
25
- } as const;
26
- /**
27
- * Indicates the type of model used to generate the response
28
- */
29
- export type DeploymentInvokeObject = ClosedEnum<typeof DeploymentInvokeObject>;
30
-
31
- /**
32
- * The provider used to generate the response
33
- */
34
- export const DeploymentInvokeProvider = {
35
- Cohere: "cohere",
36
- Openai: "openai",
37
- Anthropic: "anthropic",
38
- Huggingface: "huggingface",
39
- Replicate: "replicate",
40
- Google: "google",
41
- GoogleAi: "google-ai",
42
- Azure: "azure",
43
- Aws: "aws",
44
- Anyscale: "anyscale",
45
- Perplexity: "perplexity",
46
- Groq: "groq",
47
- Fal: "fal",
48
- Leonardoai: "leonardoai",
49
- Nvidia: "nvidia",
50
- Jina: "jina",
51
- Togetherai: "togetherai",
52
- Elevenlabs: "elevenlabs",
53
- } as const;
54
- /**
55
- * The provider used to generate the response
56
- */
57
- export type DeploymentInvokeProvider = ClosedEnum<
58
- typeof DeploymentInvokeProvider
59
- >;
60
-
61
- /**
62
- * The role of the prompt message
63
- */
64
- export const DeploymentInvokeMessageDeploymentsRole = {
65
- System: "system",
66
- Assistant: "assistant",
67
- User: "user",
68
- Exception: "exception",
69
- Tool: "tool",
70
- Prompt: "prompt",
71
- Correction: "correction",
72
- ExpectedOutput: "expected_output",
73
- } as const;
74
- /**
75
- * The role of the prompt message
76
- */
77
- export type DeploymentInvokeMessageDeploymentsRole = ClosedEnum<
78
- typeof DeploymentInvokeMessageDeploymentsRole
79
- >;
80
-
81
- export type Message3 = {
82
- /**
83
- * The role of the prompt message
84
- */
85
- role: DeploymentInvokeMessageDeploymentsRole;
86
- url: string;
87
- };
88
-
89
- /**
90
- * The role of the prompt message
91
- */
92
- export const DeploymentInvokeMessageRole = {
93
- System: "system",
94
- Assistant: "assistant",
95
- User: "user",
96
- Exception: "exception",
97
- Tool: "tool",
98
- Prompt: "prompt",
99
- Correction: "correction",
100
- ExpectedOutput: "expected_output",
101
- } as const;
102
- /**
103
- * The role of the prompt message
104
- */
105
- export type DeploymentInvokeMessageRole = ClosedEnum<
106
- typeof DeploymentInvokeMessageRole
107
- >;
108
-
109
- export type DeploymentInvokeMessage2 = {
110
- /**
111
- * The role of the prompt message
112
- */
113
- role: DeploymentInvokeMessageRole;
114
- content: string | null;
115
- };
116
-
117
- /**
118
- * The role of the prompt message
119
- */
120
- export const DeploymentInvokeMessageDeploymentsResponseRole = {
121
- System: "system",
122
- Assistant: "assistant",
123
- User: "user",
124
- Exception: "exception",
125
- Tool: "tool",
126
- Prompt: "prompt",
127
- Correction: "correction",
128
- ExpectedOutput: "expected_output",
129
- } as const;
130
- /**
131
- * The role of the prompt message
132
- */
133
- export type DeploymentInvokeMessageDeploymentsResponseRole = ClosedEnum<
134
- typeof DeploymentInvokeMessageDeploymentsResponseRole
135
- >;
136
-
137
- export const DeploymentInvokeMessageType = {
138
- Function: "function",
139
- } as const;
140
- export type DeploymentInvokeMessageType = ClosedEnum<
141
- typeof DeploymentInvokeMessageType
142
- >;
143
-
144
- export type DeploymentInvokeMessageFunction = {
145
- name: string;
146
- /**
147
- * JSON string arguments for the functions
148
- */
149
- arguments: string;
150
- };
151
-
152
- export type DeploymentInvokeMessageToolCalls = {
153
- id?: string | undefined;
154
- index?: number | undefined;
155
- type: DeploymentInvokeMessageType;
156
- function: DeploymentInvokeMessageFunction;
157
- };
158
-
159
- export type DeploymentInvokeMessage1 = {
160
- /**
161
- * The role of the prompt message
162
- */
163
- role: DeploymentInvokeMessageDeploymentsResponseRole;
164
- content?: string | null | undefined;
165
- toolCalls: Array<DeploymentInvokeMessageToolCalls>;
166
- };
167
-
168
- export type DeploymentInvokeMessage =
169
- | DeploymentInvokeMessage2
170
- | Message3
171
- | DeploymentInvokeMessage1;
172
-
173
- export type DeploymentInvokeChoices = {
174
- index: number;
175
- message?:
176
- | DeploymentInvokeMessage2
177
- | Message3
178
- | DeploymentInvokeMessage1
179
- | undefined;
180
- finishReason?: string | null | undefined;
181
- };
182
-
183
- /**
184
- * Metadata of the retrieved chunk from the knowledge base
185
- */
186
- export type DeploymentInvokeMetadata = {
187
- /**
188
- * Name of the file
189
- */
190
- fileName: string;
191
- /**
192
- * Page number of the chunk
193
- */
194
- pageNumber: number | null;
195
- /**
196
- * Type of the file
197
- */
198
- fileType: string;
199
- /**
200
- * Rerank scores are normalized to be in the range [0, 1]. Scores close to 1 indicate a high relevance to the query, and scores closer to 0 indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45
201
- */
202
- rerankScore?: number | undefined;
203
- /**
204
- * Search scores are normalized to be in the range [0, 1]. Search score is calculated based on `[Cosine Similarity](https://en.wikipedia.org/wiki/Cosine_similarity)` algorithm. Scores close to 1 indicate the document is closer to the query, and scores closer to 0 indicate the document is farther from the query.
205
- */
206
- searchScore: number;
207
- };
208
-
209
- export type Retrievals = {
210
- /**
211
- * Content of the retrieved chunk from the knowledge base
212
- */
213
- document: string;
214
- /**
215
- * Metadata of the retrieved chunk from the knowledge base
216
- */
217
- metadata: DeploymentInvokeMetadata;
218
- };
219
-
220
- /**
221
- * Response from the gateway
222
- */
223
- export type DeploymentInvokeResponseBody = {
224
- /**
225
- * A unique identifier for the response. Can be used to add metrics to the transaction.
226
- */
227
- id: string;
228
- /**
229
- * A timestamp indicating when the object was created. Usually in a standardized format like ISO 8601
230
- */
231
- created: Date;
232
- /**
233
- * Indicates the type of model used to generate the response
234
- */
235
- object: DeploymentInvokeObject;
236
- /**
237
- * The model used to generate the response
238
- */
239
- model: string;
240
- /**
241
- * The provider used to generate the response
242
- */
243
- provider: DeploymentInvokeProvider;
244
- /**
245
- * Indicates if the response is the final response
246
- */
247
- isFinal: boolean;
248
- /**
249
- * Indicates integration id used to generate the response
250
- */
251
- integrationId?: string | undefined;
252
- /**
253
- * A timestamp indicating when the object was finalized. Usually in a standardized format like ISO 8601
254
- */
255
- finalized?: Date | undefined;
256
- /**
257
- * Provider backed system fingerprint.
258
- */
259
- systemFingerprint?: string | null | undefined;
260
- /**
261
- * A list of choices generated by the model
262
- */
263
- choices: Array<DeploymentInvokeChoices>;
264
- /**
265
- * List of documents retrieved from the knowledge base. This property is only available when the `include_retrievals` flag is set to `true` in the invoke settings. When stream is set to true, the `retrievals` property will be returned in the last streamed chunk where the property `is_final` is set to `true`.
266
- */
267
- retrievals?: Array<Retrievals> | undefined;
268
- /**
269
- * Response returned by the model provider. This functionality is only supported when streaming is not used. If streaming is used, the `provider_response` property will be set to `null`.
270
- */
271
- providerResponse?: any | undefined;
272
- };
273
-
274
- /** @internal */
275
- export const DeploymentInvokeGlobals$inboundSchema: z.ZodType<
276
- DeploymentInvokeGlobals,
277
- z.ZodTypeDef,
278
- unknown
279
- > = z.object({
280
- environment: z.string().optional(),
281
- contactId: z.string().optional(),
282
- });
283
-
284
- /** @internal */
285
- export type DeploymentInvokeGlobals$Outbound = {
286
- environment?: string | undefined;
287
- contactId?: string | undefined;
288
- };
289
-
290
- /** @internal */
291
- export const DeploymentInvokeGlobals$outboundSchema: z.ZodType<
292
- DeploymentInvokeGlobals$Outbound,
293
- z.ZodTypeDef,
294
- DeploymentInvokeGlobals
295
- > = z.object({
296
- environment: z.string().optional(),
297
- contactId: z.string().optional(),
298
- });
299
-
300
- /**
301
- * @internal
302
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
303
- */
304
- export namespace DeploymentInvokeGlobals$ {
305
- /** @deprecated use `DeploymentInvokeGlobals$inboundSchema` instead. */
306
- export const inboundSchema = DeploymentInvokeGlobals$inboundSchema;
307
- /** @deprecated use `DeploymentInvokeGlobals$outboundSchema` instead. */
308
- export const outboundSchema = DeploymentInvokeGlobals$outboundSchema;
309
- /** @deprecated use `DeploymentInvokeGlobals$Outbound` instead. */
310
- export type Outbound = DeploymentInvokeGlobals$Outbound;
311
- }
312
-
313
- export function deploymentInvokeGlobalsToJSON(
314
- deploymentInvokeGlobals: DeploymentInvokeGlobals,
315
- ): string {
316
- return JSON.stringify(
317
- DeploymentInvokeGlobals$outboundSchema.parse(deploymentInvokeGlobals),
318
- );
319
- }
320
-
321
- export function deploymentInvokeGlobalsFromJSON(
322
- jsonString: string,
323
- ): SafeParseResult<DeploymentInvokeGlobals, SDKValidationError> {
324
- return safeParse(
325
- jsonString,
326
- (x) => DeploymentInvokeGlobals$inboundSchema.parse(JSON.parse(x)),
327
- `Failed to parse 'DeploymentInvokeGlobals' from JSON`,
328
- );
329
- }
330
-
331
- /** @internal */
332
- export const DeploymentInvokeObject$inboundSchema: z.ZodNativeEnum<
333
- typeof DeploymentInvokeObject
334
- > = z.nativeEnum(DeploymentInvokeObject);
335
-
336
- /** @internal */
337
- export const DeploymentInvokeObject$outboundSchema: z.ZodNativeEnum<
338
- typeof DeploymentInvokeObject
339
- > = DeploymentInvokeObject$inboundSchema;
340
-
341
- /**
342
- * @internal
343
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
344
- */
345
- export namespace DeploymentInvokeObject$ {
346
- /** @deprecated use `DeploymentInvokeObject$inboundSchema` instead. */
347
- export const inboundSchema = DeploymentInvokeObject$inboundSchema;
348
- /** @deprecated use `DeploymentInvokeObject$outboundSchema` instead. */
349
- export const outboundSchema = DeploymentInvokeObject$outboundSchema;
350
- }
351
-
352
- /** @internal */
353
- export const DeploymentInvokeProvider$inboundSchema: z.ZodNativeEnum<
354
- typeof DeploymentInvokeProvider
355
- > = z.nativeEnum(DeploymentInvokeProvider);
356
-
357
- /** @internal */
358
- export const DeploymentInvokeProvider$outboundSchema: z.ZodNativeEnum<
359
- typeof DeploymentInvokeProvider
360
- > = DeploymentInvokeProvider$inboundSchema;
361
-
362
- /**
363
- * @internal
364
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
365
- */
366
- export namespace DeploymentInvokeProvider$ {
367
- /** @deprecated use `DeploymentInvokeProvider$inboundSchema` instead. */
368
- export const inboundSchema = DeploymentInvokeProvider$inboundSchema;
369
- /** @deprecated use `DeploymentInvokeProvider$outboundSchema` instead. */
370
- export const outboundSchema = DeploymentInvokeProvider$outboundSchema;
371
- }
372
-
373
- /** @internal */
374
- export const DeploymentInvokeMessageDeploymentsRole$inboundSchema:
375
- z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsRole> = z.nativeEnum(
376
- DeploymentInvokeMessageDeploymentsRole,
377
- );
378
-
379
- /** @internal */
380
- export const DeploymentInvokeMessageDeploymentsRole$outboundSchema:
381
- z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsRole> =
382
- DeploymentInvokeMessageDeploymentsRole$inboundSchema;
383
-
384
- /**
385
- * @internal
386
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
387
- */
388
- export namespace DeploymentInvokeMessageDeploymentsRole$ {
389
- /** @deprecated use `DeploymentInvokeMessageDeploymentsRole$inboundSchema` instead. */
390
- export const inboundSchema =
391
- DeploymentInvokeMessageDeploymentsRole$inboundSchema;
392
- /** @deprecated use `DeploymentInvokeMessageDeploymentsRole$outboundSchema` instead. */
393
- export const outboundSchema =
394
- DeploymentInvokeMessageDeploymentsRole$outboundSchema;
395
- }
396
-
397
- /** @internal */
398
- export const Message3$inboundSchema: z.ZodType<
399
- Message3,
400
- z.ZodTypeDef,
401
- unknown
402
- > = z.object({
403
- role: DeploymentInvokeMessageDeploymentsRole$inboundSchema,
404
- url: z.string(),
405
- });
406
-
407
- /** @internal */
408
- export type Message3$Outbound = {
409
- role: string;
410
- url: string;
411
- };
412
-
413
- /** @internal */
414
- export const Message3$outboundSchema: z.ZodType<
415
- Message3$Outbound,
416
- z.ZodTypeDef,
417
- Message3
418
- > = z.object({
419
- role: DeploymentInvokeMessageDeploymentsRole$outboundSchema,
420
- url: z.string(),
421
- });
422
-
423
- /**
424
- * @internal
425
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
426
- */
427
- export namespace Message3$ {
428
- /** @deprecated use `Message3$inboundSchema` instead. */
429
- export const inboundSchema = Message3$inboundSchema;
430
- /** @deprecated use `Message3$outboundSchema` instead. */
431
- export const outboundSchema = Message3$outboundSchema;
432
- /** @deprecated use `Message3$Outbound` instead. */
433
- export type Outbound = Message3$Outbound;
434
- }
435
-
436
- export function message3ToJSON(message3: Message3): string {
437
- return JSON.stringify(Message3$outboundSchema.parse(message3));
438
- }
439
-
440
- export function message3FromJSON(
441
- jsonString: string,
442
- ): SafeParseResult<Message3, SDKValidationError> {
443
- return safeParse(
444
- jsonString,
445
- (x) => Message3$inboundSchema.parse(JSON.parse(x)),
446
- `Failed to parse 'Message3' from JSON`,
447
- );
448
- }
449
-
450
- /** @internal */
451
- export const DeploymentInvokeMessageRole$inboundSchema: z.ZodNativeEnum<
452
- typeof DeploymentInvokeMessageRole
453
- > = z.nativeEnum(DeploymentInvokeMessageRole);
454
-
455
- /** @internal */
456
- export const DeploymentInvokeMessageRole$outboundSchema: z.ZodNativeEnum<
457
- typeof DeploymentInvokeMessageRole
458
- > = DeploymentInvokeMessageRole$inboundSchema;
459
-
460
- /**
461
- * @internal
462
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
463
- */
464
- export namespace DeploymentInvokeMessageRole$ {
465
- /** @deprecated use `DeploymentInvokeMessageRole$inboundSchema` instead. */
466
- export const inboundSchema = DeploymentInvokeMessageRole$inboundSchema;
467
- /** @deprecated use `DeploymentInvokeMessageRole$outboundSchema` instead. */
468
- export const outboundSchema = DeploymentInvokeMessageRole$outboundSchema;
469
- }
470
-
471
- /** @internal */
472
- export const DeploymentInvokeMessage2$inboundSchema: z.ZodType<
473
- DeploymentInvokeMessage2,
474
- z.ZodTypeDef,
475
- unknown
476
- > = z.object({
477
- role: DeploymentInvokeMessageRole$inboundSchema,
478
- content: z.nullable(z.string()),
479
- });
480
-
481
- /** @internal */
482
- export type DeploymentInvokeMessage2$Outbound = {
483
- role: string;
484
- content: string | null;
485
- };
486
-
487
- /** @internal */
488
- export const DeploymentInvokeMessage2$outboundSchema: z.ZodType<
489
- DeploymentInvokeMessage2$Outbound,
490
- z.ZodTypeDef,
491
- DeploymentInvokeMessage2
492
- > = z.object({
493
- role: DeploymentInvokeMessageRole$outboundSchema,
494
- content: z.nullable(z.string()),
495
- });
496
-
497
- /**
498
- * @internal
499
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
500
- */
501
- export namespace DeploymentInvokeMessage2$ {
502
- /** @deprecated use `DeploymentInvokeMessage2$inboundSchema` instead. */
503
- export const inboundSchema = DeploymentInvokeMessage2$inboundSchema;
504
- /** @deprecated use `DeploymentInvokeMessage2$outboundSchema` instead. */
505
- export const outboundSchema = DeploymentInvokeMessage2$outboundSchema;
506
- /** @deprecated use `DeploymentInvokeMessage2$Outbound` instead. */
507
- export type Outbound = DeploymentInvokeMessage2$Outbound;
508
- }
509
-
510
- export function deploymentInvokeMessage2ToJSON(
511
- deploymentInvokeMessage2: DeploymentInvokeMessage2,
512
- ): string {
513
- return JSON.stringify(
514
- DeploymentInvokeMessage2$outboundSchema.parse(deploymentInvokeMessage2),
515
- );
516
- }
517
-
518
- export function deploymentInvokeMessage2FromJSON(
519
- jsonString: string,
520
- ): SafeParseResult<DeploymentInvokeMessage2, SDKValidationError> {
521
- return safeParse(
522
- jsonString,
523
- (x) => DeploymentInvokeMessage2$inboundSchema.parse(JSON.parse(x)),
524
- `Failed to parse 'DeploymentInvokeMessage2' from JSON`,
525
- );
526
- }
527
-
528
- /** @internal */
529
- export const DeploymentInvokeMessageDeploymentsResponseRole$inboundSchema:
530
- z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsResponseRole> = z
531
- .nativeEnum(DeploymentInvokeMessageDeploymentsResponseRole);
532
-
533
- /** @internal */
534
- export const DeploymentInvokeMessageDeploymentsResponseRole$outboundSchema:
535
- z.ZodNativeEnum<typeof DeploymentInvokeMessageDeploymentsResponseRole> =
536
- DeploymentInvokeMessageDeploymentsResponseRole$inboundSchema;
537
-
538
- /**
539
- * @internal
540
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
541
- */
542
- export namespace DeploymentInvokeMessageDeploymentsResponseRole$ {
543
- /** @deprecated use `DeploymentInvokeMessageDeploymentsResponseRole$inboundSchema` instead. */
544
- export const inboundSchema =
545
- DeploymentInvokeMessageDeploymentsResponseRole$inboundSchema;
546
- /** @deprecated use `DeploymentInvokeMessageDeploymentsResponseRole$outboundSchema` instead. */
547
- export const outboundSchema =
548
- DeploymentInvokeMessageDeploymentsResponseRole$outboundSchema;
549
- }
550
-
551
- /** @internal */
552
- export const DeploymentInvokeMessageType$inboundSchema: z.ZodNativeEnum<
553
- typeof DeploymentInvokeMessageType
554
- > = z.nativeEnum(DeploymentInvokeMessageType);
555
-
556
- /** @internal */
557
- export const DeploymentInvokeMessageType$outboundSchema: z.ZodNativeEnum<
558
- typeof DeploymentInvokeMessageType
559
- > = DeploymentInvokeMessageType$inboundSchema;
560
-
561
- /**
562
- * @internal
563
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
564
- */
565
- export namespace DeploymentInvokeMessageType$ {
566
- /** @deprecated use `DeploymentInvokeMessageType$inboundSchema` instead. */
567
- export const inboundSchema = DeploymentInvokeMessageType$inboundSchema;
568
- /** @deprecated use `DeploymentInvokeMessageType$outboundSchema` instead. */
569
- export const outboundSchema = DeploymentInvokeMessageType$outboundSchema;
570
- }
571
-
572
- /** @internal */
573
- export const DeploymentInvokeMessageFunction$inboundSchema: z.ZodType<
574
- DeploymentInvokeMessageFunction,
575
- z.ZodTypeDef,
576
- unknown
577
- > = z.object({
578
- name: z.string(),
579
- arguments: z.string(),
580
- });
581
-
582
- /** @internal */
583
- export type DeploymentInvokeMessageFunction$Outbound = {
584
- name: string;
585
- arguments: string;
586
- };
587
-
588
- /** @internal */
589
- export const DeploymentInvokeMessageFunction$outboundSchema: z.ZodType<
590
- DeploymentInvokeMessageFunction$Outbound,
591
- z.ZodTypeDef,
592
- DeploymentInvokeMessageFunction
593
- > = z.object({
594
- name: z.string(),
595
- arguments: z.string(),
596
- });
597
-
598
- /**
599
- * @internal
600
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
601
- */
602
- export namespace DeploymentInvokeMessageFunction$ {
603
- /** @deprecated use `DeploymentInvokeMessageFunction$inboundSchema` instead. */
604
- export const inboundSchema = DeploymentInvokeMessageFunction$inboundSchema;
605
- /** @deprecated use `DeploymentInvokeMessageFunction$outboundSchema` instead. */
606
- export const outboundSchema = DeploymentInvokeMessageFunction$outboundSchema;
607
- /** @deprecated use `DeploymentInvokeMessageFunction$Outbound` instead. */
608
- export type Outbound = DeploymentInvokeMessageFunction$Outbound;
609
- }
610
-
611
- export function deploymentInvokeMessageFunctionToJSON(
612
- deploymentInvokeMessageFunction: DeploymentInvokeMessageFunction,
613
- ): string {
614
- return JSON.stringify(
615
- DeploymentInvokeMessageFunction$outboundSchema.parse(
616
- deploymentInvokeMessageFunction,
617
- ),
618
- );
619
- }
620
-
621
- export function deploymentInvokeMessageFunctionFromJSON(
622
- jsonString: string,
623
- ): SafeParseResult<DeploymentInvokeMessageFunction, SDKValidationError> {
624
- return safeParse(
625
- jsonString,
626
- (x) => DeploymentInvokeMessageFunction$inboundSchema.parse(JSON.parse(x)),
627
- `Failed to parse 'DeploymentInvokeMessageFunction' from JSON`,
628
- );
629
- }
630
-
631
- /** @internal */
632
- export const DeploymentInvokeMessageToolCalls$inboundSchema: z.ZodType<
633
- DeploymentInvokeMessageToolCalls,
634
- z.ZodTypeDef,
635
- unknown
636
- > = z.object({
637
- id: z.string().optional(),
638
- index: z.number().optional(),
639
- type: DeploymentInvokeMessageType$inboundSchema,
640
- function: z.lazy(() => DeploymentInvokeMessageFunction$inboundSchema),
641
- });
642
-
643
- /** @internal */
644
- export type DeploymentInvokeMessageToolCalls$Outbound = {
645
- id?: string | undefined;
646
- index?: number | undefined;
647
- type: string;
648
- function: DeploymentInvokeMessageFunction$Outbound;
649
- };
650
-
651
- /** @internal */
652
- export const DeploymentInvokeMessageToolCalls$outboundSchema: z.ZodType<
653
- DeploymentInvokeMessageToolCalls$Outbound,
654
- z.ZodTypeDef,
655
- DeploymentInvokeMessageToolCalls
656
- > = z.object({
657
- id: z.string().optional(),
658
- index: z.number().optional(),
659
- type: DeploymentInvokeMessageType$outboundSchema,
660
- function: z.lazy(() => DeploymentInvokeMessageFunction$outboundSchema),
661
- });
662
-
663
- /**
664
- * @internal
665
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
666
- */
667
- export namespace DeploymentInvokeMessageToolCalls$ {
668
- /** @deprecated use `DeploymentInvokeMessageToolCalls$inboundSchema` instead. */
669
- export const inboundSchema = DeploymentInvokeMessageToolCalls$inboundSchema;
670
- /** @deprecated use `DeploymentInvokeMessageToolCalls$outboundSchema` instead. */
671
- export const outboundSchema = DeploymentInvokeMessageToolCalls$outboundSchema;
672
- /** @deprecated use `DeploymentInvokeMessageToolCalls$Outbound` instead. */
673
- export type Outbound = DeploymentInvokeMessageToolCalls$Outbound;
674
- }
675
-
676
- export function deploymentInvokeMessageToolCallsToJSON(
677
- deploymentInvokeMessageToolCalls: DeploymentInvokeMessageToolCalls,
678
- ): string {
679
- return JSON.stringify(
680
- DeploymentInvokeMessageToolCalls$outboundSchema.parse(
681
- deploymentInvokeMessageToolCalls,
682
- ),
683
- );
684
- }
685
-
686
- export function deploymentInvokeMessageToolCallsFromJSON(
687
- jsonString: string,
688
- ): SafeParseResult<DeploymentInvokeMessageToolCalls, SDKValidationError> {
689
- return safeParse(
690
- jsonString,
691
- (x) => DeploymentInvokeMessageToolCalls$inboundSchema.parse(JSON.parse(x)),
692
- `Failed to parse 'DeploymentInvokeMessageToolCalls' from JSON`,
693
- );
694
- }
695
-
696
- /** @internal */
697
- export const DeploymentInvokeMessage1$inboundSchema: z.ZodType<
698
- DeploymentInvokeMessage1,
699
- z.ZodTypeDef,
700
- unknown
701
- > = z.object({
702
- role: DeploymentInvokeMessageDeploymentsResponseRole$inboundSchema,
703
- content: z.nullable(z.string()).optional(),
704
- tool_calls: z.array(
705
- z.lazy(() => DeploymentInvokeMessageToolCalls$inboundSchema),
706
- ),
707
- }).transform((v) => {
708
- return remap$(v, {
709
- "tool_calls": "toolCalls",
710
- });
711
- });
712
-
713
- /** @internal */
714
- export type DeploymentInvokeMessage1$Outbound = {
715
- role: string;
716
- content?: string | null | undefined;
717
- tool_calls: Array<DeploymentInvokeMessageToolCalls$Outbound>;
718
- };
719
-
720
- /** @internal */
721
- export const DeploymentInvokeMessage1$outboundSchema: z.ZodType<
722
- DeploymentInvokeMessage1$Outbound,
723
- z.ZodTypeDef,
724
- DeploymentInvokeMessage1
725
- > = z.object({
726
- role: DeploymentInvokeMessageDeploymentsResponseRole$outboundSchema,
727
- content: z.nullable(z.string()).optional(),
728
- toolCalls: z.array(
729
- z.lazy(() => DeploymentInvokeMessageToolCalls$outboundSchema),
730
- ),
731
- }).transform((v) => {
732
- return remap$(v, {
733
- toolCalls: "tool_calls",
734
- });
735
- });
736
-
737
- /**
738
- * @internal
739
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
740
- */
741
- export namespace DeploymentInvokeMessage1$ {
742
- /** @deprecated use `DeploymentInvokeMessage1$inboundSchema` instead. */
743
- export const inboundSchema = DeploymentInvokeMessage1$inboundSchema;
744
- /** @deprecated use `DeploymentInvokeMessage1$outboundSchema` instead. */
745
- export const outboundSchema = DeploymentInvokeMessage1$outboundSchema;
746
- /** @deprecated use `DeploymentInvokeMessage1$Outbound` instead. */
747
- export type Outbound = DeploymentInvokeMessage1$Outbound;
748
- }
749
-
750
- export function deploymentInvokeMessage1ToJSON(
751
- deploymentInvokeMessage1: DeploymentInvokeMessage1,
752
- ): string {
753
- return JSON.stringify(
754
- DeploymentInvokeMessage1$outboundSchema.parse(deploymentInvokeMessage1),
755
- );
756
- }
757
-
758
- export function deploymentInvokeMessage1FromJSON(
759
- jsonString: string,
760
- ): SafeParseResult<DeploymentInvokeMessage1, SDKValidationError> {
761
- return safeParse(
762
- jsonString,
763
- (x) => DeploymentInvokeMessage1$inboundSchema.parse(JSON.parse(x)),
764
- `Failed to parse 'DeploymentInvokeMessage1' from JSON`,
765
- );
766
- }
767
-
768
- /** @internal */
769
- export const DeploymentInvokeMessage$inboundSchema: z.ZodType<
770
- DeploymentInvokeMessage,
771
- z.ZodTypeDef,
772
- unknown
773
- > = z.union([
774
- z.lazy(() => DeploymentInvokeMessage2$inboundSchema),
775
- z.lazy(() => Message3$inboundSchema),
776
- z.lazy(() => DeploymentInvokeMessage1$inboundSchema),
777
- ]);
778
-
779
- /** @internal */
780
- export type DeploymentInvokeMessage$Outbound =
781
- | DeploymentInvokeMessage2$Outbound
782
- | Message3$Outbound
783
- | DeploymentInvokeMessage1$Outbound;
784
-
785
- /** @internal */
786
- export const DeploymentInvokeMessage$outboundSchema: z.ZodType<
787
- DeploymentInvokeMessage$Outbound,
788
- z.ZodTypeDef,
789
- DeploymentInvokeMessage
790
- > = z.union([
791
- z.lazy(() => DeploymentInvokeMessage2$outboundSchema),
792
- z.lazy(() => Message3$outboundSchema),
793
- z.lazy(() => DeploymentInvokeMessage1$outboundSchema),
794
- ]);
795
-
796
- /**
797
- * @internal
798
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
799
- */
800
- export namespace DeploymentInvokeMessage$ {
801
- /** @deprecated use `DeploymentInvokeMessage$inboundSchema` instead. */
802
- export const inboundSchema = DeploymentInvokeMessage$inboundSchema;
803
- /** @deprecated use `DeploymentInvokeMessage$outboundSchema` instead. */
804
- export const outboundSchema = DeploymentInvokeMessage$outboundSchema;
805
- /** @deprecated use `DeploymentInvokeMessage$Outbound` instead. */
806
- export type Outbound = DeploymentInvokeMessage$Outbound;
807
- }
808
-
809
- export function deploymentInvokeMessageToJSON(
810
- deploymentInvokeMessage: DeploymentInvokeMessage,
811
- ): string {
812
- return JSON.stringify(
813
- DeploymentInvokeMessage$outboundSchema.parse(deploymentInvokeMessage),
814
- );
815
- }
816
-
817
- export function deploymentInvokeMessageFromJSON(
818
- jsonString: string,
819
- ): SafeParseResult<DeploymentInvokeMessage, SDKValidationError> {
820
- return safeParse(
821
- jsonString,
822
- (x) => DeploymentInvokeMessage$inboundSchema.parse(JSON.parse(x)),
823
- `Failed to parse 'DeploymentInvokeMessage' from JSON`,
824
- );
825
- }
826
-
827
- /** @internal */
828
- export const DeploymentInvokeChoices$inboundSchema: z.ZodType<
829
- DeploymentInvokeChoices,
830
- z.ZodTypeDef,
831
- unknown
832
- > = z.object({
833
- index: z.number(),
834
- message: z.union([
835
- z.lazy(() => DeploymentInvokeMessage2$inboundSchema),
836
- z.lazy(() => Message3$inboundSchema),
837
- z.lazy(() => DeploymentInvokeMessage1$inboundSchema),
838
- ]).optional(),
839
- finish_reason: z.nullable(z.string()).optional(),
840
- }).transform((v) => {
841
- return remap$(v, {
842
- "finish_reason": "finishReason",
843
- });
844
- });
845
-
846
- /** @internal */
847
- export type DeploymentInvokeChoices$Outbound = {
848
- index: number;
849
- message?:
850
- | DeploymentInvokeMessage2$Outbound
851
- | Message3$Outbound
852
- | DeploymentInvokeMessage1$Outbound
853
- | undefined;
854
- finish_reason?: string | null | undefined;
855
- };
856
-
857
- /** @internal */
858
- export const DeploymentInvokeChoices$outboundSchema: z.ZodType<
859
- DeploymentInvokeChoices$Outbound,
860
- z.ZodTypeDef,
861
- DeploymentInvokeChoices
862
- > = z.object({
863
- index: z.number(),
864
- message: z.union([
865
- z.lazy(() => DeploymentInvokeMessage2$outboundSchema),
866
- z.lazy(() => Message3$outboundSchema),
867
- z.lazy(() => DeploymentInvokeMessage1$outboundSchema),
868
- ]).optional(),
869
- finishReason: z.nullable(z.string()).optional(),
870
- }).transform((v) => {
871
- return remap$(v, {
872
- finishReason: "finish_reason",
873
- });
874
- });
875
-
876
- /**
877
- * @internal
878
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
879
- */
880
- export namespace DeploymentInvokeChoices$ {
881
- /** @deprecated use `DeploymentInvokeChoices$inboundSchema` instead. */
882
- export const inboundSchema = DeploymentInvokeChoices$inboundSchema;
883
- /** @deprecated use `DeploymentInvokeChoices$outboundSchema` instead. */
884
- export const outboundSchema = DeploymentInvokeChoices$outboundSchema;
885
- /** @deprecated use `DeploymentInvokeChoices$Outbound` instead. */
886
- export type Outbound = DeploymentInvokeChoices$Outbound;
887
- }
888
-
889
- export function deploymentInvokeChoicesToJSON(
890
- deploymentInvokeChoices: DeploymentInvokeChoices,
891
- ): string {
892
- return JSON.stringify(
893
- DeploymentInvokeChoices$outboundSchema.parse(deploymentInvokeChoices),
894
- );
895
- }
896
-
897
- export function deploymentInvokeChoicesFromJSON(
898
- jsonString: string,
899
- ): SafeParseResult<DeploymentInvokeChoices, SDKValidationError> {
900
- return safeParse(
901
- jsonString,
902
- (x) => DeploymentInvokeChoices$inboundSchema.parse(JSON.parse(x)),
903
- `Failed to parse 'DeploymentInvokeChoices' from JSON`,
904
- );
905
- }
906
-
907
- /** @internal */
908
- export const DeploymentInvokeMetadata$inboundSchema: z.ZodType<
909
- DeploymentInvokeMetadata,
910
- z.ZodTypeDef,
911
- unknown
912
- > = z.object({
913
- file_name: z.string(),
914
- page_number: z.nullable(z.number()),
915
- file_type: z.string(),
916
- rerank_score: z.number().optional(),
917
- search_score: z.number(),
918
- }).transform((v) => {
919
- return remap$(v, {
920
- "file_name": "fileName",
921
- "page_number": "pageNumber",
922
- "file_type": "fileType",
923
- "rerank_score": "rerankScore",
924
- "search_score": "searchScore",
925
- });
926
- });
927
-
928
- /** @internal */
929
- export type DeploymentInvokeMetadata$Outbound = {
930
- file_name: string;
931
- page_number: number | null;
932
- file_type: string;
933
- rerank_score?: number | undefined;
934
- search_score: number;
935
- };
936
-
937
- /** @internal */
938
- export const DeploymentInvokeMetadata$outboundSchema: z.ZodType<
939
- DeploymentInvokeMetadata$Outbound,
940
- z.ZodTypeDef,
941
- DeploymentInvokeMetadata
942
- > = z.object({
943
- fileName: z.string(),
944
- pageNumber: z.nullable(z.number()),
945
- fileType: z.string(),
946
- rerankScore: z.number().optional(),
947
- searchScore: z.number(),
948
- }).transform((v) => {
949
- return remap$(v, {
950
- fileName: "file_name",
951
- pageNumber: "page_number",
952
- fileType: "file_type",
953
- rerankScore: "rerank_score",
954
- searchScore: "search_score",
955
- });
956
- });
957
-
958
- /**
959
- * @internal
960
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
961
- */
962
- export namespace DeploymentInvokeMetadata$ {
963
- /** @deprecated use `DeploymentInvokeMetadata$inboundSchema` instead. */
964
- export const inboundSchema = DeploymentInvokeMetadata$inboundSchema;
965
- /** @deprecated use `DeploymentInvokeMetadata$outboundSchema` instead. */
966
- export const outboundSchema = DeploymentInvokeMetadata$outboundSchema;
967
- /** @deprecated use `DeploymentInvokeMetadata$Outbound` instead. */
968
- export type Outbound = DeploymentInvokeMetadata$Outbound;
969
- }
970
-
971
- export function deploymentInvokeMetadataToJSON(
972
- deploymentInvokeMetadata: DeploymentInvokeMetadata,
973
- ): string {
974
- return JSON.stringify(
975
- DeploymentInvokeMetadata$outboundSchema.parse(deploymentInvokeMetadata),
976
- );
977
- }
978
-
979
- export function deploymentInvokeMetadataFromJSON(
980
- jsonString: string,
981
- ): SafeParseResult<DeploymentInvokeMetadata, SDKValidationError> {
982
- return safeParse(
983
- jsonString,
984
- (x) => DeploymentInvokeMetadata$inboundSchema.parse(JSON.parse(x)),
985
- `Failed to parse 'DeploymentInvokeMetadata' from JSON`,
986
- );
987
- }
988
-
989
- /** @internal */
990
- export const Retrievals$inboundSchema: z.ZodType<
991
- Retrievals,
992
- z.ZodTypeDef,
993
- unknown
994
- > = z.object({
995
- document: z.string(),
996
- metadata: z.lazy(() => DeploymentInvokeMetadata$inboundSchema),
997
- });
998
-
999
- /** @internal */
1000
- export type Retrievals$Outbound = {
1001
- document: string;
1002
- metadata: DeploymentInvokeMetadata$Outbound;
1003
- };
1004
-
1005
- /** @internal */
1006
- export const Retrievals$outboundSchema: z.ZodType<
1007
- Retrievals$Outbound,
1008
- z.ZodTypeDef,
1009
- Retrievals
1010
- > = z.object({
1011
- document: z.string(),
1012
- metadata: z.lazy(() => DeploymentInvokeMetadata$outboundSchema),
1013
- });
1014
-
1015
- /**
1016
- * @internal
1017
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1018
- */
1019
- export namespace Retrievals$ {
1020
- /** @deprecated use `Retrievals$inboundSchema` instead. */
1021
- export const inboundSchema = Retrievals$inboundSchema;
1022
- /** @deprecated use `Retrievals$outboundSchema` instead. */
1023
- export const outboundSchema = Retrievals$outboundSchema;
1024
- /** @deprecated use `Retrievals$Outbound` instead. */
1025
- export type Outbound = Retrievals$Outbound;
1026
- }
1027
-
1028
- export function retrievalsToJSON(retrievals: Retrievals): string {
1029
- return JSON.stringify(Retrievals$outboundSchema.parse(retrievals));
1030
- }
1031
-
1032
- export function retrievalsFromJSON(
1033
- jsonString: string,
1034
- ): SafeParseResult<Retrievals, SDKValidationError> {
1035
- return safeParse(
1036
- jsonString,
1037
- (x) => Retrievals$inboundSchema.parse(JSON.parse(x)),
1038
- `Failed to parse 'Retrievals' from JSON`,
1039
- );
1040
- }
1041
-
1042
- /** @internal */
1043
- export const DeploymentInvokeResponseBody$inboundSchema: z.ZodType<
1044
- DeploymentInvokeResponseBody,
1045
- z.ZodTypeDef,
1046
- unknown
1047
- > = z.object({
1048
- id: z.string(),
1049
- created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
1050
- object: DeploymentInvokeObject$inboundSchema,
1051
- model: z.string(),
1052
- provider: DeploymentInvokeProvider$inboundSchema,
1053
- is_final: z.boolean(),
1054
- integration_id: z.string().optional(),
1055
- finalized: z.string().datetime({ offset: true }).transform(v => new Date(v))
1056
- .optional(),
1057
- system_fingerprint: z.nullable(z.string()).optional(),
1058
- choices: z.array(z.lazy(() => DeploymentInvokeChoices$inboundSchema)),
1059
- retrievals: z.array(z.lazy(() => Retrievals$inboundSchema)).optional(),
1060
- provider_response: z.any().optional(),
1061
- }).transform((v) => {
1062
- return remap$(v, {
1063
- "is_final": "isFinal",
1064
- "integration_id": "integrationId",
1065
- "system_fingerprint": "systemFingerprint",
1066
- "provider_response": "providerResponse",
1067
- });
1068
- });
1069
-
1070
- /** @internal */
1071
- export type DeploymentInvokeResponseBody$Outbound = {
1072
- id: string;
1073
- created: string;
1074
- object: string;
1075
- model: string;
1076
- provider: string;
1077
- is_final: boolean;
1078
- integration_id?: string | undefined;
1079
- finalized?: string | undefined;
1080
- system_fingerprint?: string | null | undefined;
1081
- choices: Array<DeploymentInvokeChoices$Outbound>;
1082
- retrievals?: Array<Retrievals$Outbound> | undefined;
1083
- provider_response?: any | undefined;
1084
- };
1085
-
1086
- /** @internal */
1087
- export const DeploymentInvokeResponseBody$outboundSchema: z.ZodType<
1088
- DeploymentInvokeResponseBody$Outbound,
1089
- z.ZodTypeDef,
1090
- DeploymentInvokeResponseBody
1091
- > = z.object({
1092
- id: z.string(),
1093
- created: z.date().transform(v => v.toISOString()),
1094
- object: DeploymentInvokeObject$outboundSchema,
1095
- model: z.string(),
1096
- provider: DeploymentInvokeProvider$outboundSchema,
1097
- isFinal: z.boolean(),
1098
- integrationId: z.string().optional(),
1099
- finalized: z.date().transform(v => v.toISOString()).optional(),
1100
- systemFingerprint: z.nullable(z.string()).optional(),
1101
- choices: z.array(z.lazy(() => DeploymentInvokeChoices$outboundSchema)),
1102
- retrievals: z.array(z.lazy(() => Retrievals$outboundSchema)).optional(),
1103
- providerResponse: z.any().optional(),
1104
- }).transform((v) => {
1105
- return remap$(v, {
1106
- isFinal: "is_final",
1107
- integrationId: "integration_id",
1108
- systemFingerprint: "system_fingerprint",
1109
- providerResponse: "provider_response",
1110
- });
1111
- });
1112
-
1113
- /**
1114
- * @internal
1115
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1116
- */
1117
- export namespace DeploymentInvokeResponseBody$ {
1118
- /** @deprecated use `DeploymentInvokeResponseBody$inboundSchema` instead. */
1119
- export const inboundSchema = DeploymentInvokeResponseBody$inboundSchema;
1120
- /** @deprecated use `DeploymentInvokeResponseBody$outboundSchema` instead. */
1121
- export const outboundSchema = DeploymentInvokeResponseBody$outboundSchema;
1122
- /** @deprecated use `DeploymentInvokeResponseBody$Outbound` instead. */
1123
- export type Outbound = DeploymentInvokeResponseBody$Outbound;
1124
- }
1125
-
1126
- export function deploymentInvokeResponseBodyToJSON(
1127
- deploymentInvokeResponseBody: DeploymentInvokeResponseBody,
1128
- ): string {
1129
- return JSON.stringify(
1130
- DeploymentInvokeResponseBody$outboundSchema.parse(
1131
- deploymentInvokeResponseBody,
1132
- ),
1133
- );
1134
- }
1135
-
1136
- export function deploymentInvokeResponseBodyFromJSON(
1137
- jsonString: string,
1138
- ): SafeParseResult<DeploymentInvokeResponseBody, SDKValidationError> {
1139
- return safeParse(
1140
- jsonString,
1141
- (x) => DeploymentInvokeResponseBody$inboundSchema.parse(JSON.parse(x)),
1142
- `Failed to parse 'DeploymentInvokeResponseBody' from JSON`,
1143
- );
1144
- }