@orq-ai/node 3.1.7 → 3.2.0-rc.4

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 +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 -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,2012 +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 GetPromptVersionRequest = {
13
- /**
14
- * The unique identifier of the prompt
15
- */
16
- promptId: string;
17
- /**
18
- * The unique identifier of the prompt version
19
- */
20
- versionId: string;
21
- };
22
-
23
- export const GetPromptVersionType = {
24
- Prompt: "prompt",
25
- } as const;
26
- export type GetPromptVersionType = ClosedEnum<typeof GetPromptVersionType>;
27
-
28
- /**
29
- * The type of the model
30
- */
31
- export const GetPromptVersionModelType = {
32
- Chat: "chat",
33
- Completion: "completion",
34
- Embedding: "embedding",
35
- Vision: "vision",
36
- Image: "image",
37
- Tts: "tts",
38
- Stt: "stt",
39
- Rerank: "rerank",
40
- Moderations: "moderations",
41
- } as const;
42
- /**
43
- * The type of the model
44
- */
45
- export type GetPromptVersionModelType = ClosedEnum<
46
- typeof GetPromptVersionModelType
47
- >;
48
-
49
- /**
50
- * Only supported on `image` models.
51
- */
52
- export const GetPromptVersionFormat = {
53
- Url: "url",
54
- B64Json: "b64_json",
55
- Text: "text",
56
- JsonObject: "json_object",
57
- } as const;
58
- /**
59
- * Only supported on `image` models.
60
- */
61
- export type GetPromptVersionFormat = ClosedEnum<typeof GetPromptVersionFormat>;
62
-
63
- /**
64
- * Only supported on `image` models.
65
- */
66
- export const GetPromptVersionQuality = {
67
- Standard: "standard",
68
- Hd: "hd",
69
- } as const;
70
- /**
71
- * Only supported on `image` models.
72
- */
73
- export type GetPromptVersionQuality = ClosedEnum<
74
- typeof GetPromptVersionQuality
75
- >;
76
-
77
- export const GetPromptVersionResponseFormatPromptsType = {
78
- JsonObject: "json_object",
79
- } as const;
80
- export type GetPromptVersionResponseFormatPromptsType = ClosedEnum<
81
- typeof GetPromptVersionResponseFormatPromptsType
82
- >;
83
-
84
- export type GetPromptVersionResponseFormat2 = {
85
- type: GetPromptVersionResponseFormatPromptsType;
86
- };
87
-
88
- export const GetPromptVersionResponseFormatType = {
89
- JsonSchema: "json_schema",
90
- } as const;
91
- export type GetPromptVersionResponseFormatType = ClosedEnum<
92
- typeof GetPromptVersionResponseFormatType
93
- >;
94
-
95
- export type GetPromptVersionResponseFormatJsonSchema = {
96
- name: string;
97
- strict: boolean;
98
- schema: { [k: string]: any };
99
- };
100
-
101
- export type GetPromptVersionResponseFormat1 = {
102
- type: GetPromptVersionResponseFormatType;
103
- jsonSchema: GetPromptVersionResponseFormatJsonSchema;
104
- };
105
-
106
- /**
107
- * An object specifying the format that the model must output.
108
- *
109
- * @remarks
110
- *
111
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
112
- *
113
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
114
- *
115
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
116
- */
117
- export type GetPromptVersionResponseFormat =
118
- | GetPromptVersionResponseFormat2
119
- | GetPromptVersionResponseFormat1;
120
-
121
- /**
122
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
123
- */
124
- export const GetPromptVersionPhotoRealVersion = {
125
- V1: "v1",
126
- V2: "v2",
127
- } as const;
128
- /**
129
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
130
- */
131
- export type GetPromptVersionPhotoRealVersion = ClosedEnum<
132
- typeof GetPromptVersionPhotoRealVersion
133
- >;
134
-
135
- /**
136
- * The format to return the embeddings
137
- */
138
- export const GetPromptVersionEncodingFormat = {
139
- Float: "float",
140
- Base64: "base64",
141
- } as const;
142
- /**
143
- * The format to return the embeddings
144
- */
145
- export type GetPromptVersionEncodingFormat = ClosedEnum<
146
- typeof GetPromptVersionEncodingFormat
147
- >;
148
-
149
- /**
150
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
151
- */
152
- export const GetPromptVersionReasoningEffort = {
153
- Low: "low",
154
- Medium: "medium",
155
- High: "high",
156
- } as const;
157
- /**
158
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
159
- */
160
- export type GetPromptVersionReasoningEffort = ClosedEnum<
161
- typeof GetPromptVersionReasoningEffort
162
- >;
163
-
164
- /**
165
- * Model Parameters: Not all parameters apply to every model
166
- */
167
- export type GetPromptVersionModelParameters = {
168
- /**
169
- * Only supported on `chat` and `completion` models.
170
- */
171
- temperature?: number | undefined;
172
- /**
173
- * Only supported on `chat` and `completion` models.
174
- */
175
- maxTokens?: number | undefined;
176
- /**
177
- * Only supported on `chat` and `completion` models.
178
- */
179
- topK?: number | undefined;
180
- /**
181
- * Only supported on `chat` and `completion` models.
182
- */
183
- topP?: number | undefined;
184
- /**
185
- * Only supported on `chat` and `completion` models.
186
- */
187
- frequencyPenalty?: number | undefined;
188
- /**
189
- * Only supported on `chat` and `completion` models.
190
- */
191
- presencePenalty?: number | undefined;
192
- /**
193
- * Only supported on `image` models.
194
- */
195
- numImages?: number | undefined;
196
- /**
197
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
198
- */
199
- seed?: number | undefined;
200
- /**
201
- * Only supported on `image` models.
202
- */
203
- format?: GetPromptVersionFormat | undefined;
204
- /**
205
- * Only supported on `image` models.
206
- */
207
- dimensions?: string | undefined;
208
- /**
209
- * Only supported on `image` models.
210
- */
211
- quality?: GetPromptVersionQuality | undefined;
212
- /**
213
- * Only supported on `image` models.
214
- */
215
- style?: string | undefined;
216
- /**
217
- * An object specifying the format that the model must output.
218
- *
219
- * @remarks
220
- *
221
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
222
- *
223
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
224
- *
225
- * Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
226
- */
227
- responseFormat?:
228
- | GetPromptVersionResponseFormat2
229
- | GetPromptVersionResponseFormat1
230
- | null
231
- | undefined;
232
- /**
233
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
234
- */
235
- photoRealVersion?: GetPromptVersionPhotoRealVersion | undefined;
236
- /**
237
- * The format to return the embeddings
238
- */
239
- encodingFormat?: GetPromptVersionEncodingFormat | undefined;
240
- /**
241
- * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
242
- */
243
- reasoningEffort?: GetPromptVersionReasoningEffort | undefined;
244
- };
245
-
246
- export const GetPromptVersionProvider = {
247
- Cohere: "cohere",
248
- Openai: "openai",
249
- Anthropic: "anthropic",
250
- Huggingface: "huggingface",
251
- Replicate: "replicate",
252
- Google: "google",
253
- GoogleAi: "google-ai",
254
- Azure: "azure",
255
- Aws: "aws",
256
- Anyscale: "anyscale",
257
- Perplexity: "perplexity",
258
- Groq: "groq",
259
- Fal: "fal",
260
- Leonardoai: "leonardoai",
261
- Nvidia: "nvidia",
262
- Jina: "jina",
263
- Togetherai: "togetherai",
264
- Elevenlabs: "elevenlabs",
265
- } as const;
266
- export type GetPromptVersionProvider = ClosedEnum<
267
- typeof GetPromptVersionProvider
268
- >;
269
-
270
- /**
271
- * The role of the prompt message
272
- */
273
- export const GetPromptVersionRole = {
274
- System: "system",
275
- Assistant: "assistant",
276
- User: "user",
277
- Exception: "exception",
278
- Tool: "tool",
279
- Prompt: "prompt",
280
- Correction: "correction",
281
- ExpectedOutput: "expected_output",
282
- } as const;
283
- /**
284
- * The role of the prompt message
285
- */
286
- export type GetPromptVersionRole = ClosedEnum<typeof GetPromptVersionRole>;
287
-
288
- export const GetPromptVersion2PromptsType = {
289
- ImageUrl: "image_url",
290
- } as const;
291
- export type GetPromptVersion2PromptsType = ClosedEnum<
292
- typeof GetPromptVersion2PromptsType
293
- >;
294
-
295
- export type GetPromptVersion2ImageUrl = {
296
- /**
297
- * The orq.ai id of the image
298
- */
299
- id?: string | undefined;
300
- /**
301
- * Either a URL of the image or the base64 encoded data URI.
302
- */
303
- url: string;
304
- /**
305
- * Specifies the detail level of the image. Currently only supported with OpenAI models
306
- */
307
- detail?: string | undefined;
308
- };
309
-
310
- /**
311
- * The image part of the prompt message. Only supported with vision models.
312
- */
313
- export type GetPromptVersion22 = {
314
- type: GetPromptVersion2PromptsType;
315
- imageUrl: GetPromptVersion2ImageUrl;
316
- };
317
-
318
- export const GetPromptVersion2Type = {
319
- Text: "text",
320
- } as const;
321
- export type GetPromptVersion2Type = ClosedEnum<typeof GetPromptVersion2Type>;
322
-
323
- /**
324
- * Text content part of a prompt message
325
- */
326
- export type GetPromptVersion21 = {
327
- type: GetPromptVersion2Type;
328
- text: string;
329
- };
330
-
331
- export type GetPromptVersionContent2 = GetPromptVersion21 | GetPromptVersion22;
332
-
333
- /**
334
- * 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.
335
- */
336
- export type GetPromptVersionContent =
337
- | string
338
- | Array<GetPromptVersion21 | GetPromptVersion22>;
339
-
340
- export const GetPromptVersionPromptsType = {
341
- Function: "function",
342
- } as const;
343
- export type GetPromptVersionPromptsType = ClosedEnum<
344
- typeof GetPromptVersionPromptsType
345
- >;
346
-
347
- export type GetPromptVersionFunction = {
348
- name: string;
349
- /**
350
- * JSON string arguments for the functions
351
- */
352
- arguments: string;
353
- };
354
-
355
- export type GetPromptVersionToolCalls = {
356
- id?: string | undefined;
357
- index?: number | undefined;
358
- type: GetPromptVersionPromptsType;
359
- function: GetPromptVersionFunction;
360
- };
361
-
362
- export type GetPromptVersionMessages = {
363
- /**
364
- * The role of the prompt message
365
- */
366
- role: GetPromptVersionRole;
367
- /**
368
- * 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.
369
- */
370
- content: string | Array<GetPromptVersion21 | GetPromptVersion22>;
371
- toolCalls?: Array<GetPromptVersionToolCalls> | undefined;
372
- };
373
-
374
- /**
375
- * A list of messages compatible with the openAI schema
376
- */
377
- export type GetPromptVersionPromptConfig = {
378
- stream?: boolean | undefined;
379
- model?: string | undefined;
380
- /**
381
- * The id of the resource
382
- */
383
- modelDbId?: string | undefined;
384
- /**
385
- * The type of the model
386
- */
387
- modelType?: GetPromptVersionModelType | undefined;
388
- /**
389
- * Model Parameters: Not all parameters apply to every model
390
- */
391
- modelParameters?: GetPromptVersionModelParameters | undefined;
392
- provider?: GetPromptVersionProvider | undefined;
393
- /**
394
- * The id of the resource
395
- */
396
- integrationId?: string | null | undefined;
397
- version?: string | undefined;
398
- messages: Array<GetPromptVersionMessages>;
399
- };
400
-
401
- export const GetPromptVersionUseCases = {
402
- Agents: "Agents",
403
- AgentsSimulations: "Agents simulations",
404
- APIInteraction: "API interaction",
405
- AutonomousAgents: "Autonomous Agents",
406
- Chatbots: "Chatbots",
407
- Classification: "Classification",
408
- CodeUnderstanding: "Code understanding",
409
- CodeWriting: "Code writing",
410
- DocumentsQA: "Documents QA",
411
- Conversation: "Conversation",
412
- Extraction: "Extraction",
413
- MultiModal: "Multi-modal",
414
- SelfChecking: "Self-checking",
415
- Sql: "SQL",
416
- Summarization: "Summarization",
417
- Tagging: "Tagging",
418
- } as const;
419
- export type GetPromptVersionUseCases = ClosedEnum<
420
- typeof GetPromptVersionUseCases
421
- >;
422
-
423
- /**
424
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
425
- */
426
- export const GetPromptVersionLanguage = {
427
- Chinese: "Chinese",
428
- Dutch: "Dutch",
429
- English: "English",
430
- French: "French",
431
- German: "German",
432
- Russian: "Russian",
433
- Spanish: "Spanish",
434
- } as const;
435
- /**
436
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
437
- */
438
- export type GetPromptVersionLanguage = ClosedEnum<
439
- typeof GetPromptVersionLanguage
440
- >;
441
-
442
- export type GetPromptVersionMetadata = {
443
- /**
444
- * A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose
445
- */
446
- useCases?: Array<GetPromptVersionUseCases> | undefined;
447
- /**
448
- * The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
449
- */
450
- language?: GetPromptVersionLanguage | undefined;
451
- };
452
-
453
- /**
454
- * Prompt version retrieved successfully.
455
- */
456
- export type GetPromptVersionResponseBody = {
457
- id: string;
458
- type: GetPromptVersionType;
459
- createdById?: string | undefined;
460
- updatedById?: string | undefined;
461
- /**
462
- * The prompt’s description, meant to be displayable in the UI. Use this field to optionally store a long form explanation of the prompt for your own purpose
463
- */
464
- description?: string | null | undefined;
465
- /**
466
- * A list of messages compatible with the openAI schema
467
- */
468
- promptConfig: GetPromptVersionPromptConfig;
469
- metadata?: GetPromptVersionMetadata | undefined;
470
- timestamp: string;
471
- };
472
-
473
- /** @internal */
474
- export const GetPromptVersionRequest$inboundSchema: z.ZodType<
475
- GetPromptVersionRequest,
476
- z.ZodTypeDef,
477
- unknown
478
- > = z.object({
479
- prompt_id: z.string(),
480
- version_id: z.string(),
481
- }).transform((v) => {
482
- return remap$(v, {
483
- "prompt_id": "promptId",
484
- "version_id": "versionId",
485
- });
486
- });
487
-
488
- /** @internal */
489
- export type GetPromptVersionRequest$Outbound = {
490
- prompt_id: string;
491
- version_id: string;
492
- };
493
-
494
- /** @internal */
495
- export const GetPromptVersionRequest$outboundSchema: z.ZodType<
496
- GetPromptVersionRequest$Outbound,
497
- z.ZodTypeDef,
498
- GetPromptVersionRequest
499
- > = z.object({
500
- promptId: z.string(),
501
- versionId: z.string(),
502
- }).transform((v) => {
503
- return remap$(v, {
504
- promptId: "prompt_id",
505
- versionId: "version_id",
506
- });
507
- });
508
-
509
- /**
510
- * @internal
511
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
512
- */
513
- export namespace GetPromptVersionRequest$ {
514
- /** @deprecated use `GetPromptVersionRequest$inboundSchema` instead. */
515
- export const inboundSchema = GetPromptVersionRequest$inboundSchema;
516
- /** @deprecated use `GetPromptVersionRequest$outboundSchema` instead. */
517
- export const outboundSchema = GetPromptVersionRequest$outboundSchema;
518
- /** @deprecated use `GetPromptVersionRequest$Outbound` instead. */
519
- export type Outbound = GetPromptVersionRequest$Outbound;
520
- }
521
-
522
- export function getPromptVersionRequestToJSON(
523
- getPromptVersionRequest: GetPromptVersionRequest,
524
- ): string {
525
- return JSON.stringify(
526
- GetPromptVersionRequest$outboundSchema.parse(getPromptVersionRequest),
527
- );
528
- }
529
-
530
- export function getPromptVersionRequestFromJSON(
531
- jsonString: string,
532
- ): SafeParseResult<GetPromptVersionRequest, SDKValidationError> {
533
- return safeParse(
534
- jsonString,
535
- (x) => GetPromptVersionRequest$inboundSchema.parse(JSON.parse(x)),
536
- `Failed to parse 'GetPromptVersionRequest' from JSON`,
537
- );
538
- }
539
-
540
- /** @internal */
541
- export const GetPromptVersionType$inboundSchema: z.ZodNativeEnum<
542
- typeof GetPromptVersionType
543
- > = z.nativeEnum(GetPromptVersionType);
544
-
545
- /** @internal */
546
- export const GetPromptVersionType$outboundSchema: z.ZodNativeEnum<
547
- typeof GetPromptVersionType
548
- > = GetPromptVersionType$inboundSchema;
549
-
550
- /**
551
- * @internal
552
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
553
- */
554
- export namespace GetPromptVersionType$ {
555
- /** @deprecated use `GetPromptVersionType$inboundSchema` instead. */
556
- export const inboundSchema = GetPromptVersionType$inboundSchema;
557
- /** @deprecated use `GetPromptVersionType$outboundSchema` instead. */
558
- export const outboundSchema = GetPromptVersionType$outboundSchema;
559
- }
560
-
561
- /** @internal */
562
- export const GetPromptVersionModelType$inboundSchema: z.ZodNativeEnum<
563
- typeof GetPromptVersionModelType
564
- > = z.nativeEnum(GetPromptVersionModelType);
565
-
566
- /** @internal */
567
- export const GetPromptVersionModelType$outboundSchema: z.ZodNativeEnum<
568
- typeof GetPromptVersionModelType
569
- > = GetPromptVersionModelType$inboundSchema;
570
-
571
- /**
572
- * @internal
573
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
574
- */
575
- export namespace GetPromptVersionModelType$ {
576
- /** @deprecated use `GetPromptVersionModelType$inboundSchema` instead. */
577
- export const inboundSchema = GetPromptVersionModelType$inboundSchema;
578
- /** @deprecated use `GetPromptVersionModelType$outboundSchema` instead. */
579
- export const outboundSchema = GetPromptVersionModelType$outboundSchema;
580
- }
581
-
582
- /** @internal */
583
- export const GetPromptVersionFormat$inboundSchema: z.ZodNativeEnum<
584
- typeof GetPromptVersionFormat
585
- > = z.nativeEnum(GetPromptVersionFormat);
586
-
587
- /** @internal */
588
- export const GetPromptVersionFormat$outboundSchema: z.ZodNativeEnum<
589
- typeof GetPromptVersionFormat
590
- > = GetPromptVersionFormat$inboundSchema;
591
-
592
- /**
593
- * @internal
594
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
595
- */
596
- export namespace GetPromptVersionFormat$ {
597
- /** @deprecated use `GetPromptVersionFormat$inboundSchema` instead. */
598
- export const inboundSchema = GetPromptVersionFormat$inboundSchema;
599
- /** @deprecated use `GetPromptVersionFormat$outboundSchema` instead. */
600
- export const outboundSchema = GetPromptVersionFormat$outboundSchema;
601
- }
602
-
603
- /** @internal */
604
- export const GetPromptVersionQuality$inboundSchema: z.ZodNativeEnum<
605
- typeof GetPromptVersionQuality
606
- > = z.nativeEnum(GetPromptVersionQuality);
607
-
608
- /** @internal */
609
- export const GetPromptVersionQuality$outboundSchema: z.ZodNativeEnum<
610
- typeof GetPromptVersionQuality
611
- > = GetPromptVersionQuality$inboundSchema;
612
-
613
- /**
614
- * @internal
615
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
616
- */
617
- export namespace GetPromptVersionQuality$ {
618
- /** @deprecated use `GetPromptVersionQuality$inboundSchema` instead. */
619
- export const inboundSchema = GetPromptVersionQuality$inboundSchema;
620
- /** @deprecated use `GetPromptVersionQuality$outboundSchema` instead. */
621
- export const outboundSchema = GetPromptVersionQuality$outboundSchema;
622
- }
623
-
624
- /** @internal */
625
- export const GetPromptVersionResponseFormatPromptsType$inboundSchema:
626
- z.ZodNativeEnum<typeof GetPromptVersionResponseFormatPromptsType> = z
627
- .nativeEnum(GetPromptVersionResponseFormatPromptsType);
628
-
629
- /** @internal */
630
- export const GetPromptVersionResponseFormatPromptsType$outboundSchema:
631
- z.ZodNativeEnum<typeof GetPromptVersionResponseFormatPromptsType> =
632
- GetPromptVersionResponseFormatPromptsType$inboundSchema;
633
-
634
- /**
635
- * @internal
636
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
637
- */
638
- export namespace GetPromptVersionResponseFormatPromptsType$ {
639
- /** @deprecated use `GetPromptVersionResponseFormatPromptsType$inboundSchema` instead. */
640
- export const inboundSchema =
641
- GetPromptVersionResponseFormatPromptsType$inboundSchema;
642
- /** @deprecated use `GetPromptVersionResponseFormatPromptsType$outboundSchema` instead. */
643
- export const outboundSchema =
644
- GetPromptVersionResponseFormatPromptsType$outboundSchema;
645
- }
646
-
647
- /** @internal */
648
- export const GetPromptVersionResponseFormat2$inboundSchema: z.ZodType<
649
- GetPromptVersionResponseFormat2,
650
- z.ZodTypeDef,
651
- unknown
652
- > = z.object({
653
- type: GetPromptVersionResponseFormatPromptsType$inboundSchema,
654
- });
655
-
656
- /** @internal */
657
- export type GetPromptVersionResponseFormat2$Outbound = {
658
- type: string;
659
- };
660
-
661
- /** @internal */
662
- export const GetPromptVersionResponseFormat2$outboundSchema: z.ZodType<
663
- GetPromptVersionResponseFormat2$Outbound,
664
- z.ZodTypeDef,
665
- GetPromptVersionResponseFormat2
666
- > = z.object({
667
- type: GetPromptVersionResponseFormatPromptsType$outboundSchema,
668
- });
669
-
670
- /**
671
- * @internal
672
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
673
- */
674
- export namespace GetPromptVersionResponseFormat2$ {
675
- /** @deprecated use `GetPromptVersionResponseFormat2$inboundSchema` instead. */
676
- export const inboundSchema = GetPromptVersionResponseFormat2$inboundSchema;
677
- /** @deprecated use `GetPromptVersionResponseFormat2$outboundSchema` instead. */
678
- export const outboundSchema = GetPromptVersionResponseFormat2$outboundSchema;
679
- /** @deprecated use `GetPromptVersionResponseFormat2$Outbound` instead. */
680
- export type Outbound = GetPromptVersionResponseFormat2$Outbound;
681
- }
682
-
683
- export function getPromptVersionResponseFormat2ToJSON(
684
- getPromptVersionResponseFormat2: GetPromptVersionResponseFormat2,
685
- ): string {
686
- return JSON.stringify(
687
- GetPromptVersionResponseFormat2$outboundSchema.parse(
688
- getPromptVersionResponseFormat2,
689
- ),
690
- );
691
- }
692
-
693
- export function getPromptVersionResponseFormat2FromJSON(
694
- jsonString: string,
695
- ): SafeParseResult<GetPromptVersionResponseFormat2, SDKValidationError> {
696
- return safeParse(
697
- jsonString,
698
- (x) => GetPromptVersionResponseFormat2$inboundSchema.parse(JSON.parse(x)),
699
- `Failed to parse 'GetPromptVersionResponseFormat2' from JSON`,
700
- );
701
- }
702
-
703
- /** @internal */
704
- export const GetPromptVersionResponseFormatType$inboundSchema: z.ZodNativeEnum<
705
- typeof GetPromptVersionResponseFormatType
706
- > = z.nativeEnum(GetPromptVersionResponseFormatType);
707
-
708
- /** @internal */
709
- export const GetPromptVersionResponseFormatType$outboundSchema: z.ZodNativeEnum<
710
- typeof GetPromptVersionResponseFormatType
711
- > = GetPromptVersionResponseFormatType$inboundSchema;
712
-
713
- /**
714
- * @internal
715
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
716
- */
717
- export namespace GetPromptVersionResponseFormatType$ {
718
- /** @deprecated use `GetPromptVersionResponseFormatType$inboundSchema` instead. */
719
- export const inboundSchema = GetPromptVersionResponseFormatType$inboundSchema;
720
- /** @deprecated use `GetPromptVersionResponseFormatType$outboundSchema` instead. */
721
- export const outboundSchema =
722
- GetPromptVersionResponseFormatType$outboundSchema;
723
- }
724
-
725
- /** @internal */
726
- export const GetPromptVersionResponseFormatJsonSchema$inboundSchema: z.ZodType<
727
- GetPromptVersionResponseFormatJsonSchema,
728
- z.ZodTypeDef,
729
- unknown
730
- > = z.object({
731
- name: z.string(),
732
- strict: z.boolean(),
733
- schema: z.record(z.any()),
734
- });
735
-
736
- /** @internal */
737
- export type GetPromptVersionResponseFormatJsonSchema$Outbound = {
738
- name: string;
739
- strict: boolean;
740
- schema: { [k: string]: any };
741
- };
742
-
743
- /** @internal */
744
- export const GetPromptVersionResponseFormatJsonSchema$outboundSchema: z.ZodType<
745
- GetPromptVersionResponseFormatJsonSchema$Outbound,
746
- z.ZodTypeDef,
747
- GetPromptVersionResponseFormatJsonSchema
748
- > = z.object({
749
- name: z.string(),
750
- strict: z.boolean(),
751
- schema: z.record(z.any()),
752
- });
753
-
754
- /**
755
- * @internal
756
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
757
- */
758
- export namespace GetPromptVersionResponseFormatJsonSchema$ {
759
- /** @deprecated use `GetPromptVersionResponseFormatJsonSchema$inboundSchema` instead. */
760
- export const inboundSchema =
761
- GetPromptVersionResponseFormatJsonSchema$inboundSchema;
762
- /** @deprecated use `GetPromptVersionResponseFormatJsonSchema$outboundSchema` instead. */
763
- export const outboundSchema =
764
- GetPromptVersionResponseFormatJsonSchema$outboundSchema;
765
- /** @deprecated use `GetPromptVersionResponseFormatJsonSchema$Outbound` instead. */
766
- export type Outbound = GetPromptVersionResponseFormatJsonSchema$Outbound;
767
- }
768
-
769
- export function getPromptVersionResponseFormatJsonSchemaToJSON(
770
- getPromptVersionResponseFormatJsonSchema:
771
- GetPromptVersionResponseFormatJsonSchema,
772
- ): string {
773
- return JSON.stringify(
774
- GetPromptVersionResponseFormatJsonSchema$outboundSchema.parse(
775
- getPromptVersionResponseFormatJsonSchema,
776
- ),
777
- );
778
- }
779
-
780
- export function getPromptVersionResponseFormatJsonSchemaFromJSON(
781
- jsonString: string,
782
- ): SafeParseResult<
783
- GetPromptVersionResponseFormatJsonSchema,
784
- SDKValidationError
785
- > {
786
- return safeParse(
787
- jsonString,
788
- (x) =>
789
- GetPromptVersionResponseFormatJsonSchema$inboundSchema.parse(
790
- JSON.parse(x),
791
- ),
792
- `Failed to parse 'GetPromptVersionResponseFormatJsonSchema' from JSON`,
793
- );
794
- }
795
-
796
- /** @internal */
797
- export const GetPromptVersionResponseFormat1$inboundSchema: z.ZodType<
798
- GetPromptVersionResponseFormat1,
799
- z.ZodTypeDef,
800
- unknown
801
- > = z.object({
802
- type: GetPromptVersionResponseFormatType$inboundSchema,
803
- json_schema: z.lazy(() =>
804
- GetPromptVersionResponseFormatJsonSchema$inboundSchema
805
- ),
806
- }).transform((v) => {
807
- return remap$(v, {
808
- "json_schema": "jsonSchema",
809
- });
810
- });
811
-
812
- /** @internal */
813
- export type GetPromptVersionResponseFormat1$Outbound = {
814
- type: string;
815
- json_schema: GetPromptVersionResponseFormatJsonSchema$Outbound;
816
- };
817
-
818
- /** @internal */
819
- export const GetPromptVersionResponseFormat1$outboundSchema: z.ZodType<
820
- GetPromptVersionResponseFormat1$Outbound,
821
- z.ZodTypeDef,
822
- GetPromptVersionResponseFormat1
823
- > = z.object({
824
- type: GetPromptVersionResponseFormatType$outboundSchema,
825
- jsonSchema: z.lazy(() =>
826
- GetPromptVersionResponseFormatJsonSchema$outboundSchema
827
- ),
828
- }).transform((v) => {
829
- return remap$(v, {
830
- jsonSchema: "json_schema",
831
- });
832
- });
833
-
834
- /**
835
- * @internal
836
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
837
- */
838
- export namespace GetPromptVersionResponseFormat1$ {
839
- /** @deprecated use `GetPromptVersionResponseFormat1$inboundSchema` instead. */
840
- export const inboundSchema = GetPromptVersionResponseFormat1$inboundSchema;
841
- /** @deprecated use `GetPromptVersionResponseFormat1$outboundSchema` instead. */
842
- export const outboundSchema = GetPromptVersionResponseFormat1$outboundSchema;
843
- /** @deprecated use `GetPromptVersionResponseFormat1$Outbound` instead. */
844
- export type Outbound = GetPromptVersionResponseFormat1$Outbound;
845
- }
846
-
847
- export function getPromptVersionResponseFormat1ToJSON(
848
- getPromptVersionResponseFormat1: GetPromptVersionResponseFormat1,
849
- ): string {
850
- return JSON.stringify(
851
- GetPromptVersionResponseFormat1$outboundSchema.parse(
852
- getPromptVersionResponseFormat1,
853
- ),
854
- );
855
- }
856
-
857
- export function getPromptVersionResponseFormat1FromJSON(
858
- jsonString: string,
859
- ): SafeParseResult<GetPromptVersionResponseFormat1, SDKValidationError> {
860
- return safeParse(
861
- jsonString,
862
- (x) => GetPromptVersionResponseFormat1$inboundSchema.parse(JSON.parse(x)),
863
- `Failed to parse 'GetPromptVersionResponseFormat1' from JSON`,
864
- );
865
- }
866
-
867
- /** @internal */
868
- export const GetPromptVersionResponseFormat$inboundSchema: z.ZodType<
869
- GetPromptVersionResponseFormat,
870
- z.ZodTypeDef,
871
- unknown
872
- > = z.union([
873
- z.lazy(() => GetPromptVersionResponseFormat2$inboundSchema),
874
- z.lazy(() => GetPromptVersionResponseFormat1$inboundSchema),
875
- ]);
876
-
877
- /** @internal */
878
- export type GetPromptVersionResponseFormat$Outbound =
879
- | GetPromptVersionResponseFormat2$Outbound
880
- | GetPromptVersionResponseFormat1$Outbound;
881
-
882
- /** @internal */
883
- export const GetPromptVersionResponseFormat$outboundSchema: z.ZodType<
884
- GetPromptVersionResponseFormat$Outbound,
885
- z.ZodTypeDef,
886
- GetPromptVersionResponseFormat
887
- > = z.union([
888
- z.lazy(() => GetPromptVersionResponseFormat2$outboundSchema),
889
- z.lazy(() => GetPromptVersionResponseFormat1$outboundSchema),
890
- ]);
891
-
892
- /**
893
- * @internal
894
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
895
- */
896
- export namespace GetPromptVersionResponseFormat$ {
897
- /** @deprecated use `GetPromptVersionResponseFormat$inboundSchema` instead. */
898
- export const inboundSchema = GetPromptVersionResponseFormat$inboundSchema;
899
- /** @deprecated use `GetPromptVersionResponseFormat$outboundSchema` instead. */
900
- export const outboundSchema = GetPromptVersionResponseFormat$outboundSchema;
901
- /** @deprecated use `GetPromptVersionResponseFormat$Outbound` instead. */
902
- export type Outbound = GetPromptVersionResponseFormat$Outbound;
903
- }
904
-
905
- export function getPromptVersionResponseFormatToJSON(
906
- getPromptVersionResponseFormat: GetPromptVersionResponseFormat,
907
- ): string {
908
- return JSON.stringify(
909
- GetPromptVersionResponseFormat$outboundSchema.parse(
910
- getPromptVersionResponseFormat,
911
- ),
912
- );
913
- }
914
-
915
- export function getPromptVersionResponseFormatFromJSON(
916
- jsonString: string,
917
- ): SafeParseResult<GetPromptVersionResponseFormat, SDKValidationError> {
918
- return safeParse(
919
- jsonString,
920
- (x) => GetPromptVersionResponseFormat$inboundSchema.parse(JSON.parse(x)),
921
- `Failed to parse 'GetPromptVersionResponseFormat' from JSON`,
922
- );
923
- }
924
-
925
- /** @internal */
926
- export const GetPromptVersionPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
927
- typeof GetPromptVersionPhotoRealVersion
928
- > = z.nativeEnum(GetPromptVersionPhotoRealVersion);
929
-
930
- /** @internal */
931
- export const GetPromptVersionPhotoRealVersion$outboundSchema: z.ZodNativeEnum<
932
- typeof GetPromptVersionPhotoRealVersion
933
- > = GetPromptVersionPhotoRealVersion$inboundSchema;
934
-
935
- /**
936
- * @internal
937
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
938
- */
939
- export namespace GetPromptVersionPhotoRealVersion$ {
940
- /** @deprecated use `GetPromptVersionPhotoRealVersion$inboundSchema` instead. */
941
- export const inboundSchema = GetPromptVersionPhotoRealVersion$inboundSchema;
942
- /** @deprecated use `GetPromptVersionPhotoRealVersion$outboundSchema` instead. */
943
- export const outboundSchema = GetPromptVersionPhotoRealVersion$outboundSchema;
944
- }
945
-
946
- /** @internal */
947
- export const GetPromptVersionEncodingFormat$inboundSchema: z.ZodNativeEnum<
948
- typeof GetPromptVersionEncodingFormat
949
- > = z.nativeEnum(GetPromptVersionEncodingFormat);
950
-
951
- /** @internal */
952
- export const GetPromptVersionEncodingFormat$outboundSchema: z.ZodNativeEnum<
953
- typeof GetPromptVersionEncodingFormat
954
- > = GetPromptVersionEncodingFormat$inboundSchema;
955
-
956
- /**
957
- * @internal
958
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
959
- */
960
- export namespace GetPromptVersionEncodingFormat$ {
961
- /** @deprecated use `GetPromptVersionEncodingFormat$inboundSchema` instead. */
962
- export const inboundSchema = GetPromptVersionEncodingFormat$inboundSchema;
963
- /** @deprecated use `GetPromptVersionEncodingFormat$outboundSchema` instead. */
964
- export const outboundSchema = GetPromptVersionEncodingFormat$outboundSchema;
965
- }
966
-
967
- /** @internal */
968
- export const GetPromptVersionReasoningEffort$inboundSchema: z.ZodNativeEnum<
969
- typeof GetPromptVersionReasoningEffort
970
- > = z.nativeEnum(GetPromptVersionReasoningEffort);
971
-
972
- /** @internal */
973
- export const GetPromptVersionReasoningEffort$outboundSchema: z.ZodNativeEnum<
974
- typeof GetPromptVersionReasoningEffort
975
- > = GetPromptVersionReasoningEffort$inboundSchema;
976
-
977
- /**
978
- * @internal
979
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
980
- */
981
- export namespace GetPromptVersionReasoningEffort$ {
982
- /** @deprecated use `GetPromptVersionReasoningEffort$inboundSchema` instead. */
983
- export const inboundSchema = GetPromptVersionReasoningEffort$inboundSchema;
984
- /** @deprecated use `GetPromptVersionReasoningEffort$outboundSchema` instead. */
985
- export const outboundSchema = GetPromptVersionReasoningEffort$outboundSchema;
986
- }
987
-
988
- /** @internal */
989
- export const GetPromptVersionModelParameters$inboundSchema: z.ZodType<
990
- GetPromptVersionModelParameters,
991
- z.ZodTypeDef,
992
- unknown
993
- > = z.object({
994
- temperature: z.number().optional(),
995
- maxTokens: z.number().optional(),
996
- topK: z.number().optional(),
997
- topP: z.number().optional(),
998
- frequencyPenalty: z.number().optional(),
999
- presencePenalty: z.number().optional(),
1000
- numImages: z.number().optional(),
1001
- seed: z.number().optional(),
1002
- format: GetPromptVersionFormat$inboundSchema.optional(),
1003
- dimensions: z.string().optional(),
1004
- quality: GetPromptVersionQuality$inboundSchema.optional(),
1005
- style: z.string().optional(),
1006
- responseFormat: z.nullable(
1007
- z.union([
1008
- z.lazy(() => GetPromptVersionResponseFormat2$inboundSchema),
1009
- z.lazy(() => GetPromptVersionResponseFormat1$inboundSchema),
1010
- ]),
1011
- ).optional(),
1012
- photoRealVersion: GetPromptVersionPhotoRealVersion$inboundSchema.optional(),
1013
- encoding_format: GetPromptVersionEncodingFormat$inboundSchema.optional(),
1014
- reasoningEffort: GetPromptVersionReasoningEffort$inboundSchema.optional(),
1015
- }).transform((v) => {
1016
- return remap$(v, {
1017
- "encoding_format": "encodingFormat",
1018
- });
1019
- });
1020
-
1021
- /** @internal */
1022
- export type GetPromptVersionModelParameters$Outbound = {
1023
- temperature?: number | undefined;
1024
- maxTokens?: number | undefined;
1025
- topK?: number | undefined;
1026
- topP?: number | undefined;
1027
- frequencyPenalty?: number | undefined;
1028
- presencePenalty?: number | undefined;
1029
- numImages?: number | undefined;
1030
- seed?: number | undefined;
1031
- format?: string | undefined;
1032
- dimensions?: string | undefined;
1033
- quality?: string | undefined;
1034
- style?: string | undefined;
1035
- responseFormat?:
1036
- | GetPromptVersionResponseFormat2$Outbound
1037
- | GetPromptVersionResponseFormat1$Outbound
1038
- | null
1039
- | undefined;
1040
- photoRealVersion?: string | undefined;
1041
- encoding_format?: string | undefined;
1042
- reasoningEffort?: string | undefined;
1043
- };
1044
-
1045
- /** @internal */
1046
- export const GetPromptVersionModelParameters$outboundSchema: z.ZodType<
1047
- GetPromptVersionModelParameters$Outbound,
1048
- z.ZodTypeDef,
1049
- GetPromptVersionModelParameters
1050
- > = z.object({
1051
- temperature: z.number().optional(),
1052
- maxTokens: z.number().optional(),
1053
- topK: z.number().optional(),
1054
- topP: z.number().optional(),
1055
- frequencyPenalty: z.number().optional(),
1056
- presencePenalty: z.number().optional(),
1057
- numImages: z.number().optional(),
1058
- seed: z.number().optional(),
1059
- format: GetPromptVersionFormat$outboundSchema.optional(),
1060
- dimensions: z.string().optional(),
1061
- quality: GetPromptVersionQuality$outboundSchema.optional(),
1062
- style: z.string().optional(),
1063
- responseFormat: z.nullable(
1064
- z.union([
1065
- z.lazy(() => GetPromptVersionResponseFormat2$outboundSchema),
1066
- z.lazy(() => GetPromptVersionResponseFormat1$outboundSchema),
1067
- ]),
1068
- ).optional(),
1069
- photoRealVersion: GetPromptVersionPhotoRealVersion$outboundSchema.optional(),
1070
- encodingFormat: GetPromptVersionEncodingFormat$outboundSchema.optional(),
1071
- reasoningEffort: GetPromptVersionReasoningEffort$outboundSchema.optional(),
1072
- }).transform((v) => {
1073
- return remap$(v, {
1074
- encodingFormat: "encoding_format",
1075
- });
1076
- });
1077
-
1078
- /**
1079
- * @internal
1080
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1081
- */
1082
- export namespace GetPromptVersionModelParameters$ {
1083
- /** @deprecated use `GetPromptVersionModelParameters$inboundSchema` instead. */
1084
- export const inboundSchema = GetPromptVersionModelParameters$inboundSchema;
1085
- /** @deprecated use `GetPromptVersionModelParameters$outboundSchema` instead. */
1086
- export const outboundSchema = GetPromptVersionModelParameters$outboundSchema;
1087
- /** @deprecated use `GetPromptVersionModelParameters$Outbound` instead. */
1088
- export type Outbound = GetPromptVersionModelParameters$Outbound;
1089
- }
1090
-
1091
- export function getPromptVersionModelParametersToJSON(
1092
- getPromptVersionModelParameters: GetPromptVersionModelParameters,
1093
- ): string {
1094
- return JSON.stringify(
1095
- GetPromptVersionModelParameters$outboundSchema.parse(
1096
- getPromptVersionModelParameters,
1097
- ),
1098
- );
1099
- }
1100
-
1101
- export function getPromptVersionModelParametersFromJSON(
1102
- jsonString: string,
1103
- ): SafeParseResult<GetPromptVersionModelParameters, SDKValidationError> {
1104
- return safeParse(
1105
- jsonString,
1106
- (x) => GetPromptVersionModelParameters$inboundSchema.parse(JSON.parse(x)),
1107
- `Failed to parse 'GetPromptVersionModelParameters' from JSON`,
1108
- );
1109
- }
1110
-
1111
- /** @internal */
1112
- export const GetPromptVersionProvider$inboundSchema: z.ZodNativeEnum<
1113
- typeof GetPromptVersionProvider
1114
- > = z.nativeEnum(GetPromptVersionProvider);
1115
-
1116
- /** @internal */
1117
- export const GetPromptVersionProvider$outboundSchema: z.ZodNativeEnum<
1118
- typeof GetPromptVersionProvider
1119
- > = GetPromptVersionProvider$inboundSchema;
1120
-
1121
- /**
1122
- * @internal
1123
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1124
- */
1125
- export namespace GetPromptVersionProvider$ {
1126
- /** @deprecated use `GetPromptVersionProvider$inboundSchema` instead. */
1127
- export const inboundSchema = GetPromptVersionProvider$inboundSchema;
1128
- /** @deprecated use `GetPromptVersionProvider$outboundSchema` instead. */
1129
- export const outboundSchema = GetPromptVersionProvider$outboundSchema;
1130
- }
1131
-
1132
- /** @internal */
1133
- export const GetPromptVersionRole$inboundSchema: z.ZodNativeEnum<
1134
- typeof GetPromptVersionRole
1135
- > = z.nativeEnum(GetPromptVersionRole);
1136
-
1137
- /** @internal */
1138
- export const GetPromptVersionRole$outboundSchema: z.ZodNativeEnum<
1139
- typeof GetPromptVersionRole
1140
- > = GetPromptVersionRole$inboundSchema;
1141
-
1142
- /**
1143
- * @internal
1144
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1145
- */
1146
- export namespace GetPromptVersionRole$ {
1147
- /** @deprecated use `GetPromptVersionRole$inboundSchema` instead. */
1148
- export const inboundSchema = GetPromptVersionRole$inboundSchema;
1149
- /** @deprecated use `GetPromptVersionRole$outboundSchema` instead. */
1150
- export const outboundSchema = GetPromptVersionRole$outboundSchema;
1151
- }
1152
-
1153
- /** @internal */
1154
- export const GetPromptVersion2PromptsType$inboundSchema: z.ZodNativeEnum<
1155
- typeof GetPromptVersion2PromptsType
1156
- > = z.nativeEnum(GetPromptVersion2PromptsType);
1157
-
1158
- /** @internal */
1159
- export const GetPromptVersion2PromptsType$outboundSchema: z.ZodNativeEnum<
1160
- typeof GetPromptVersion2PromptsType
1161
- > = GetPromptVersion2PromptsType$inboundSchema;
1162
-
1163
- /**
1164
- * @internal
1165
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1166
- */
1167
- export namespace GetPromptVersion2PromptsType$ {
1168
- /** @deprecated use `GetPromptVersion2PromptsType$inboundSchema` instead. */
1169
- export const inboundSchema = GetPromptVersion2PromptsType$inboundSchema;
1170
- /** @deprecated use `GetPromptVersion2PromptsType$outboundSchema` instead. */
1171
- export const outboundSchema = GetPromptVersion2PromptsType$outboundSchema;
1172
- }
1173
-
1174
- /** @internal */
1175
- export const GetPromptVersion2ImageUrl$inboundSchema: z.ZodType<
1176
- GetPromptVersion2ImageUrl,
1177
- z.ZodTypeDef,
1178
- unknown
1179
- > = z.object({
1180
- id: z.string().optional(),
1181
- url: z.string(),
1182
- detail: z.string().optional(),
1183
- });
1184
-
1185
- /** @internal */
1186
- export type GetPromptVersion2ImageUrl$Outbound = {
1187
- id?: string | undefined;
1188
- url: string;
1189
- detail?: string | undefined;
1190
- };
1191
-
1192
- /** @internal */
1193
- export const GetPromptVersion2ImageUrl$outboundSchema: z.ZodType<
1194
- GetPromptVersion2ImageUrl$Outbound,
1195
- z.ZodTypeDef,
1196
- GetPromptVersion2ImageUrl
1197
- > = z.object({
1198
- id: z.string().optional(),
1199
- url: z.string(),
1200
- detail: z.string().optional(),
1201
- });
1202
-
1203
- /**
1204
- * @internal
1205
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1206
- */
1207
- export namespace GetPromptVersion2ImageUrl$ {
1208
- /** @deprecated use `GetPromptVersion2ImageUrl$inboundSchema` instead. */
1209
- export const inboundSchema = GetPromptVersion2ImageUrl$inboundSchema;
1210
- /** @deprecated use `GetPromptVersion2ImageUrl$outboundSchema` instead. */
1211
- export const outboundSchema = GetPromptVersion2ImageUrl$outboundSchema;
1212
- /** @deprecated use `GetPromptVersion2ImageUrl$Outbound` instead. */
1213
- export type Outbound = GetPromptVersion2ImageUrl$Outbound;
1214
- }
1215
-
1216
- export function getPromptVersion2ImageUrlToJSON(
1217
- getPromptVersion2ImageUrl: GetPromptVersion2ImageUrl,
1218
- ): string {
1219
- return JSON.stringify(
1220
- GetPromptVersion2ImageUrl$outboundSchema.parse(getPromptVersion2ImageUrl),
1221
- );
1222
- }
1223
-
1224
- export function getPromptVersion2ImageUrlFromJSON(
1225
- jsonString: string,
1226
- ): SafeParseResult<GetPromptVersion2ImageUrl, SDKValidationError> {
1227
- return safeParse(
1228
- jsonString,
1229
- (x) => GetPromptVersion2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1230
- `Failed to parse 'GetPromptVersion2ImageUrl' from JSON`,
1231
- );
1232
- }
1233
-
1234
- /** @internal */
1235
- export const GetPromptVersion22$inboundSchema: z.ZodType<
1236
- GetPromptVersion22,
1237
- z.ZodTypeDef,
1238
- unknown
1239
- > = z.object({
1240
- type: GetPromptVersion2PromptsType$inboundSchema,
1241
- image_url: z.lazy(() => GetPromptVersion2ImageUrl$inboundSchema),
1242
- }).transform((v) => {
1243
- return remap$(v, {
1244
- "image_url": "imageUrl",
1245
- });
1246
- });
1247
-
1248
- /** @internal */
1249
- export type GetPromptVersion22$Outbound = {
1250
- type: string;
1251
- image_url: GetPromptVersion2ImageUrl$Outbound;
1252
- };
1253
-
1254
- /** @internal */
1255
- export const GetPromptVersion22$outboundSchema: z.ZodType<
1256
- GetPromptVersion22$Outbound,
1257
- z.ZodTypeDef,
1258
- GetPromptVersion22
1259
- > = z.object({
1260
- type: GetPromptVersion2PromptsType$outboundSchema,
1261
- imageUrl: z.lazy(() => GetPromptVersion2ImageUrl$outboundSchema),
1262
- }).transform((v) => {
1263
- return remap$(v, {
1264
- imageUrl: "image_url",
1265
- });
1266
- });
1267
-
1268
- /**
1269
- * @internal
1270
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1271
- */
1272
- export namespace GetPromptVersion22$ {
1273
- /** @deprecated use `GetPromptVersion22$inboundSchema` instead. */
1274
- export const inboundSchema = GetPromptVersion22$inboundSchema;
1275
- /** @deprecated use `GetPromptVersion22$outboundSchema` instead. */
1276
- export const outboundSchema = GetPromptVersion22$outboundSchema;
1277
- /** @deprecated use `GetPromptVersion22$Outbound` instead. */
1278
- export type Outbound = GetPromptVersion22$Outbound;
1279
- }
1280
-
1281
- export function getPromptVersion22ToJSON(
1282
- getPromptVersion22: GetPromptVersion22,
1283
- ): string {
1284
- return JSON.stringify(
1285
- GetPromptVersion22$outboundSchema.parse(getPromptVersion22),
1286
- );
1287
- }
1288
-
1289
- export function getPromptVersion22FromJSON(
1290
- jsonString: string,
1291
- ): SafeParseResult<GetPromptVersion22, SDKValidationError> {
1292
- return safeParse(
1293
- jsonString,
1294
- (x) => GetPromptVersion22$inboundSchema.parse(JSON.parse(x)),
1295
- `Failed to parse 'GetPromptVersion22' from JSON`,
1296
- );
1297
- }
1298
-
1299
- /** @internal */
1300
- export const GetPromptVersion2Type$inboundSchema: z.ZodNativeEnum<
1301
- typeof GetPromptVersion2Type
1302
- > = z.nativeEnum(GetPromptVersion2Type);
1303
-
1304
- /** @internal */
1305
- export const GetPromptVersion2Type$outboundSchema: z.ZodNativeEnum<
1306
- typeof GetPromptVersion2Type
1307
- > = GetPromptVersion2Type$inboundSchema;
1308
-
1309
- /**
1310
- * @internal
1311
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1312
- */
1313
- export namespace GetPromptVersion2Type$ {
1314
- /** @deprecated use `GetPromptVersion2Type$inboundSchema` instead. */
1315
- export const inboundSchema = GetPromptVersion2Type$inboundSchema;
1316
- /** @deprecated use `GetPromptVersion2Type$outboundSchema` instead. */
1317
- export const outboundSchema = GetPromptVersion2Type$outboundSchema;
1318
- }
1319
-
1320
- /** @internal */
1321
- export const GetPromptVersion21$inboundSchema: z.ZodType<
1322
- GetPromptVersion21,
1323
- z.ZodTypeDef,
1324
- unknown
1325
- > = z.object({
1326
- type: GetPromptVersion2Type$inboundSchema,
1327
- text: z.string(),
1328
- });
1329
-
1330
- /** @internal */
1331
- export type GetPromptVersion21$Outbound = {
1332
- type: string;
1333
- text: string;
1334
- };
1335
-
1336
- /** @internal */
1337
- export const GetPromptVersion21$outboundSchema: z.ZodType<
1338
- GetPromptVersion21$Outbound,
1339
- z.ZodTypeDef,
1340
- GetPromptVersion21
1341
- > = z.object({
1342
- type: GetPromptVersion2Type$outboundSchema,
1343
- text: z.string(),
1344
- });
1345
-
1346
- /**
1347
- * @internal
1348
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1349
- */
1350
- export namespace GetPromptVersion21$ {
1351
- /** @deprecated use `GetPromptVersion21$inboundSchema` instead. */
1352
- export const inboundSchema = GetPromptVersion21$inboundSchema;
1353
- /** @deprecated use `GetPromptVersion21$outboundSchema` instead. */
1354
- export const outboundSchema = GetPromptVersion21$outboundSchema;
1355
- /** @deprecated use `GetPromptVersion21$Outbound` instead. */
1356
- export type Outbound = GetPromptVersion21$Outbound;
1357
- }
1358
-
1359
- export function getPromptVersion21ToJSON(
1360
- getPromptVersion21: GetPromptVersion21,
1361
- ): string {
1362
- return JSON.stringify(
1363
- GetPromptVersion21$outboundSchema.parse(getPromptVersion21),
1364
- );
1365
- }
1366
-
1367
- export function getPromptVersion21FromJSON(
1368
- jsonString: string,
1369
- ): SafeParseResult<GetPromptVersion21, SDKValidationError> {
1370
- return safeParse(
1371
- jsonString,
1372
- (x) => GetPromptVersion21$inboundSchema.parse(JSON.parse(x)),
1373
- `Failed to parse 'GetPromptVersion21' from JSON`,
1374
- );
1375
- }
1376
-
1377
- /** @internal */
1378
- export const GetPromptVersionContent2$inboundSchema: z.ZodType<
1379
- GetPromptVersionContent2,
1380
- z.ZodTypeDef,
1381
- unknown
1382
- > = z.union([
1383
- z.lazy(() => GetPromptVersion21$inboundSchema),
1384
- z.lazy(() => GetPromptVersion22$inboundSchema),
1385
- ]);
1386
-
1387
- /** @internal */
1388
- export type GetPromptVersionContent2$Outbound =
1389
- | GetPromptVersion21$Outbound
1390
- | GetPromptVersion22$Outbound;
1391
-
1392
- /** @internal */
1393
- export const GetPromptVersionContent2$outboundSchema: z.ZodType<
1394
- GetPromptVersionContent2$Outbound,
1395
- z.ZodTypeDef,
1396
- GetPromptVersionContent2
1397
- > = z.union([
1398
- z.lazy(() => GetPromptVersion21$outboundSchema),
1399
- z.lazy(() => GetPromptVersion22$outboundSchema),
1400
- ]);
1401
-
1402
- /**
1403
- * @internal
1404
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1405
- */
1406
- export namespace GetPromptVersionContent2$ {
1407
- /** @deprecated use `GetPromptVersionContent2$inboundSchema` instead. */
1408
- export const inboundSchema = GetPromptVersionContent2$inboundSchema;
1409
- /** @deprecated use `GetPromptVersionContent2$outboundSchema` instead. */
1410
- export const outboundSchema = GetPromptVersionContent2$outboundSchema;
1411
- /** @deprecated use `GetPromptVersionContent2$Outbound` instead. */
1412
- export type Outbound = GetPromptVersionContent2$Outbound;
1413
- }
1414
-
1415
- export function getPromptVersionContent2ToJSON(
1416
- getPromptVersionContent2: GetPromptVersionContent2,
1417
- ): string {
1418
- return JSON.stringify(
1419
- GetPromptVersionContent2$outboundSchema.parse(getPromptVersionContent2),
1420
- );
1421
- }
1422
-
1423
- export function getPromptVersionContent2FromJSON(
1424
- jsonString: string,
1425
- ): SafeParseResult<GetPromptVersionContent2, SDKValidationError> {
1426
- return safeParse(
1427
- jsonString,
1428
- (x) => GetPromptVersionContent2$inboundSchema.parse(JSON.parse(x)),
1429
- `Failed to parse 'GetPromptVersionContent2' from JSON`,
1430
- );
1431
- }
1432
-
1433
- /** @internal */
1434
- export const GetPromptVersionContent$inboundSchema: z.ZodType<
1435
- GetPromptVersionContent,
1436
- z.ZodTypeDef,
1437
- unknown
1438
- > = z.union([
1439
- z.string(),
1440
- z.array(z.union([
1441
- z.lazy(() => GetPromptVersion21$inboundSchema),
1442
- z.lazy(() => GetPromptVersion22$inboundSchema),
1443
- ])),
1444
- ]);
1445
-
1446
- /** @internal */
1447
- export type GetPromptVersionContent$Outbound =
1448
- | string
1449
- | Array<GetPromptVersion21$Outbound | GetPromptVersion22$Outbound>;
1450
-
1451
- /** @internal */
1452
- export const GetPromptVersionContent$outboundSchema: z.ZodType<
1453
- GetPromptVersionContent$Outbound,
1454
- z.ZodTypeDef,
1455
- GetPromptVersionContent
1456
- > = z.union([
1457
- z.string(),
1458
- z.array(z.union([
1459
- z.lazy(() => GetPromptVersion21$outboundSchema),
1460
- z.lazy(() => GetPromptVersion22$outboundSchema),
1461
- ])),
1462
- ]);
1463
-
1464
- /**
1465
- * @internal
1466
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1467
- */
1468
- export namespace GetPromptVersionContent$ {
1469
- /** @deprecated use `GetPromptVersionContent$inboundSchema` instead. */
1470
- export const inboundSchema = GetPromptVersionContent$inboundSchema;
1471
- /** @deprecated use `GetPromptVersionContent$outboundSchema` instead. */
1472
- export const outboundSchema = GetPromptVersionContent$outboundSchema;
1473
- /** @deprecated use `GetPromptVersionContent$Outbound` instead. */
1474
- export type Outbound = GetPromptVersionContent$Outbound;
1475
- }
1476
-
1477
- export function getPromptVersionContentToJSON(
1478
- getPromptVersionContent: GetPromptVersionContent,
1479
- ): string {
1480
- return JSON.stringify(
1481
- GetPromptVersionContent$outboundSchema.parse(getPromptVersionContent),
1482
- );
1483
- }
1484
-
1485
- export function getPromptVersionContentFromJSON(
1486
- jsonString: string,
1487
- ): SafeParseResult<GetPromptVersionContent, SDKValidationError> {
1488
- return safeParse(
1489
- jsonString,
1490
- (x) => GetPromptVersionContent$inboundSchema.parse(JSON.parse(x)),
1491
- `Failed to parse 'GetPromptVersionContent' from JSON`,
1492
- );
1493
- }
1494
-
1495
- /** @internal */
1496
- export const GetPromptVersionPromptsType$inboundSchema: z.ZodNativeEnum<
1497
- typeof GetPromptVersionPromptsType
1498
- > = z.nativeEnum(GetPromptVersionPromptsType);
1499
-
1500
- /** @internal */
1501
- export const GetPromptVersionPromptsType$outboundSchema: z.ZodNativeEnum<
1502
- typeof GetPromptVersionPromptsType
1503
- > = GetPromptVersionPromptsType$inboundSchema;
1504
-
1505
- /**
1506
- * @internal
1507
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1508
- */
1509
- export namespace GetPromptVersionPromptsType$ {
1510
- /** @deprecated use `GetPromptVersionPromptsType$inboundSchema` instead. */
1511
- export const inboundSchema = GetPromptVersionPromptsType$inboundSchema;
1512
- /** @deprecated use `GetPromptVersionPromptsType$outboundSchema` instead. */
1513
- export const outboundSchema = GetPromptVersionPromptsType$outboundSchema;
1514
- }
1515
-
1516
- /** @internal */
1517
- export const GetPromptVersionFunction$inboundSchema: z.ZodType<
1518
- GetPromptVersionFunction,
1519
- z.ZodTypeDef,
1520
- unknown
1521
- > = z.object({
1522
- name: z.string(),
1523
- arguments: z.string(),
1524
- });
1525
-
1526
- /** @internal */
1527
- export type GetPromptVersionFunction$Outbound = {
1528
- name: string;
1529
- arguments: string;
1530
- };
1531
-
1532
- /** @internal */
1533
- export const GetPromptVersionFunction$outboundSchema: z.ZodType<
1534
- GetPromptVersionFunction$Outbound,
1535
- z.ZodTypeDef,
1536
- GetPromptVersionFunction
1537
- > = z.object({
1538
- name: z.string(),
1539
- arguments: z.string(),
1540
- });
1541
-
1542
- /**
1543
- * @internal
1544
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1545
- */
1546
- export namespace GetPromptVersionFunction$ {
1547
- /** @deprecated use `GetPromptVersionFunction$inboundSchema` instead. */
1548
- export const inboundSchema = GetPromptVersionFunction$inboundSchema;
1549
- /** @deprecated use `GetPromptVersionFunction$outboundSchema` instead. */
1550
- export const outboundSchema = GetPromptVersionFunction$outboundSchema;
1551
- /** @deprecated use `GetPromptVersionFunction$Outbound` instead. */
1552
- export type Outbound = GetPromptVersionFunction$Outbound;
1553
- }
1554
-
1555
- export function getPromptVersionFunctionToJSON(
1556
- getPromptVersionFunction: GetPromptVersionFunction,
1557
- ): string {
1558
- return JSON.stringify(
1559
- GetPromptVersionFunction$outboundSchema.parse(getPromptVersionFunction),
1560
- );
1561
- }
1562
-
1563
- export function getPromptVersionFunctionFromJSON(
1564
- jsonString: string,
1565
- ): SafeParseResult<GetPromptVersionFunction, SDKValidationError> {
1566
- return safeParse(
1567
- jsonString,
1568
- (x) => GetPromptVersionFunction$inboundSchema.parse(JSON.parse(x)),
1569
- `Failed to parse 'GetPromptVersionFunction' from JSON`,
1570
- );
1571
- }
1572
-
1573
- /** @internal */
1574
- export const GetPromptVersionToolCalls$inboundSchema: z.ZodType<
1575
- GetPromptVersionToolCalls,
1576
- z.ZodTypeDef,
1577
- unknown
1578
- > = z.object({
1579
- id: z.string().optional(),
1580
- index: z.number().optional(),
1581
- type: GetPromptVersionPromptsType$inboundSchema,
1582
- function: z.lazy(() => GetPromptVersionFunction$inboundSchema),
1583
- });
1584
-
1585
- /** @internal */
1586
- export type GetPromptVersionToolCalls$Outbound = {
1587
- id?: string | undefined;
1588
- index?: number | undefined;
1589
- type: string;
1590
- function: GetPromptVersionFunction$Outbound;
1591
- };
1592
-
1593
- /** @internal */
1594
- export const GetPromptVersionToolCalls$outboundSchema: z.ZodType<
1595
- GetPromptVersionToolCalls$Outbound,
1596
- z.ZodTypeDef,
1597
- GetPromptVersionToolCalls
1598
- > = z.object({
1599
- id: z.string().optional(),
1600
- index: z.number().optional(),
1601
- type: GetPromptVersionPromptsType$outboundSchema,
1602
- function: z.lazy(() => GetPromptVersionFunction$outboundSchema),
1603
- });
1604
-
1605
- /**
1606
- * @internal
1607
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1608
- */
1609
- export namespace GetPromptVersionToolCalls$ {
1610
- /** @deprecated use `GetPromptVersionToolCalls$inboundSchema` instead. */
1611
- export const inboundSchema = GetPromptVersionToolCalls$inboundSchema;
1612
- /** @deprecated use `GetPromptVersionToolCalls$outboundSchema` instead. */
1613
- export const outboundSchema = GetPromptVersionToolCalls$outboundSchema;
1614
- /** @deprecated use `GetPromptVersionToolCalls$Outbound` instead. */
1615
- export type Outbound = GetPromptVersionToolCalls$Outbound;
1616
- }
1617
-
1618
- export function getPromptVersionToolCallsToJSON(
1619
- getPromptVersionToolCalls: GetPromptVersionToolCalls,
1620
- ): string {
1621
- return JSON.stringify(
1622
- GetPromptVersionToolCalls$outboundSchema.parse(getPromptVersionToolCalls),
1623
- );
1624
- }
1625
-
1626
- export function getPromptVersionToolCallsFromJSON(
1627
- jsonString: string,
1628
- ): SafeParseResult<GetPromptVersionToolCalls, SDKValidationError> {
1629
- return safeParse(
1630
- jsonString,
1631
- (x) => GetPromptVersionToolCalls$inboundSchema.parse(JSON.parse(x)),
1632
- `Failed to parse 'GetPromptVersionToolCalls' from JSON`,
1633
- );
1634
- }
1635
-
1636
- /** @internal */
1637
- export const GetPromptVersionMessages$inboundSchema: z.ZodType<
1638
- GetPromptVersionMessages,
1639
- z.ZodTypeDef,
1640
- unknown
1641
- > = z.object({
1642
- role: GetPromptVersionRole$inboundSchema,
1643
- content: z.union([
1644
- z.string(),
1645
- z.array(z.union([
1646
- z.lazy(() => GetPromptVersion21$inboundSchema),
1647
- z.lazy(() => GetPromptVersion22$inboundSchema),
1648
- ])),
1649
- ]),
1650
- tool_calls: z.array(z.lazy(() => GetPromptVersionToolCalls$inboundSchema))
1651
- .optional(),
1652
- }).transform((v) => {
1653
- return remap$(v, {
1654
- "tool_calls": "toolCalls",
1655
- });
1656
- });
1657
-
1658
- /** @internal */
1659
- export type GetPromptVersionMessages$Outbound = {
1660
- role: string;
1661
- content:
1662
- | string
1663
- | Array<GetPromptVersion21$Outbound | GetPromptVersion22$Outbound>;
1664
- tool_calls?: Array<GetPromptVersionToolCalls$Outbound> | undefined;
1665
- };
1666
-
1667
- /** @internal */
1668
- export const GetPromptVersionMessages$outboundSchema: z.ZodType<
1669
- GetPromptVersionMessages$Outbound,
1670
- z.ZodTypeDef,
1671
- GetPromptVersionMessages
1672
- > = z.object({
1673
- role: GetPromptVersionRole$outboundSchema,
1674
- content: z.union([
1675
- z.string(),
1676
- z.array(z.union([
1677
- z.lazy(() => GetPromptVersion21$outboundSchema),
1678
- z.lazy(() => GetPromptVersion22$outboundSchema),
1679
- ])),
1680
- ]),
1681
- toolCalls: z.array(z.lazy(() => GetPromptVersionToolCalls$outboundSchema))
1682
- .optional(),
1683
- }).transform((v) => {
1684
- return remap$(v, {
1685
- toolCalls: "tool_calls",
1686
- });
1687
- });
1688
-
1689
- /**
1690
- * @internal
1691
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1692
- */
1693
- export namespace GetPromptVersionMessages$ {
1694
- /** @deprecated use `GetPromptVersionMessages$inboundSchema` instead. */
1695
- export const inboundSchema = GetPromptVersionMessages$inboundSchema;
1696
- /** @deprecated use `GetPromptVersionMessages$outboundSchema` instead. */
1697
- export const outboundSchema = GetPromptVersionMessages$outboundSchema;
1698
- /** @deprecated use `GetPromptVersionMessages$Outbound` instead. */
1699
- export type Outbound = GetPromptVersionMessages$Outbound;
1700
- }
1701
-
1702
- export function getPromptVersionMessagesToJSON(
1703
- getPromptVersionMessages: GetPromptVersionMessages,
1704
- ): string {
1705
- return JSON.stringify(
1706
- GetPromptVersionMessages$outboundSchema.parse(getPromptVersionMessages),
1707
- );
1708
- }
1709
-
1710
- export function getPromptVersionMessagesFromJSON(
1711
- jsonString: string,
1712
- ): SafeParseResult<GetPromptVersionMessages, SDKValidationError> {
1713
- return safeParse(
1714
- jsonString,
1715
- (x) => GetPromptVersionMessages$inboundSchema.parse(JSON.parse(x)),
1716
- `Failed to parse 'GetPromptVersionMessages' from JSON`,
1717
- );
1718
- }
1719
-
1720
- /** @internal */
1721
- export const GetPromptVersionPromptConfig$inboundSchema: z.ZodType<
1722
- GetPromptVersionPromptConfig,
1723
- z.ZodTypeDef,
1724
- unknown
1725
- > = z.object({
1726
- stream: z.boolean().optional(),
1727
- model: z.string().optional(),
1728
- model_db_id: z.string().optional(),
1729
- model_type: GetPromptVersionModelType$inboundSchema.optional(),
1730
- model_parameters: z.lazy(() => GetPromptVersionModelParameters$inboundSchema)
1731
- .optional(),
1732
- provider: GetPromptVersionProvider$inboundSchema.optional(),
1733
- integration_id: z.nullable(z.string()).optional(),
1734
- version: z.string().optional(),
1735
- messages: z.array(z.lazy(() => GetPromptVersionMessages$inboundSchema)),
1736
- }).transform((v) => {
1737
- return remap$(v, {
1738
- "model_db_id": "modelDbId",
1739
- "model_type": "modelType",
1740
- "model_parameters": "modelParameters",
1741
- "integration_id": "integrationId",
1742
- });
1743
- });
1744
-
1745
- /** @internal */
1746
- export type GetPromptVersionPromptConfig$Outbound = {
1747
- stream?: boolean | undefined;
1748
- model?: string | undefined;
1749
- model_db_id?: string | undefined;
1750
- model_type?: string | undefined;
1751
- model_parameters?: GetPromptVersionModelParameters$Outbound | undefined;
1752
- provider?: string | undefined;
1753
- integration_id?: string | null | undefined;
1754
- version?: string | undefined;
1755
- messages: Array<GetPromptVersionMessages$Outbound>;
1756
- };
1757
-
1758
- /** @internal */
1759
- export const GetPromptVersionPromptConfig$outboundSchema: z.ZodType<
1760
- GetPromptVersionPromptConfig$Outbound,
1761
- z.ZodTypeDef,
1762
- GetPromptVersionPromptConfig
1763
- > = z.object({
1764
- stream: z.boolean().optional(),
1765
- model: z.string().optional(),
1766
- modelDbId: z.string().optional(),
1767
- modelType: GetPromptVersionModelType$outboundSchema.optional(),
1768
- modelParameters: z.lazy(() => GetPromptVersionModelParameters$outboundSchema)
1769
- .optional(),
1770
- provider: GetPromptVersionProvider$outboundSchema.optional(),
1771
- integrationId: z.nullable(z.string()).optional(),
1772
- version: z.string().optional(),
1773
- messages: z.array(z.lazy(() => GetPromptVersionMessages$outboundSchema)),
1774
- }).transform((v) => {
1775
- return remap$(v, {
1776
- modelDbId: "model_db_id",
1777
- modelType: "model_type",
1778
- modelParameters: "model_parameters",
1779
- integrationId: "integration_id",
1780
- });
1781
- });
1782
-
1783
- /**
1784
- * @internal
1785
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1786
- */
1787
- export namespace GetPromptVersionPromptConfig$ {
1788
- /** @deprecated use `GetPromptVersionPromptConfig$inboundSchema` instead. */
1789
- export const inboundSchema = GetPromptVersionPromptConfig$inboundSchema;
1790
- /** @deprecated use `GetPromptVersionPromptConfig$outboundSchema` instead. */
1791
- export const outboundSchema = GetPromptVersionPromptConfig$outboundSchema;
1792
- /** @deprecated use `GetPromptVersionPromptConfig$Outbound` instead. */
1793
- export type Outbound = GetPromptVersionPromptConfig$Outbound;
1794
- }
1795
-
1796
- export function getPromptVersionPromptConfigToJSON(
1797
- getPromptVersionPromptConfig: GetPromptVersionPromptConfig,
1798
- ): string {
1799
- return JSON.stringify(
1800
- GetPromptVersionPromptConfig$outboundSchema.parse(
1801
- getPromptVersionPromptConfig,
1802
- ),
1803
- );
1804
- }
1805
-
1806
- export function getPromptVersionPromptConfigFromJSON(
1807
- jsonString: string,
1808
- ): SafeParseResult<GetPromptVersionPromptConfig, SDKValidationError> {
1809
- return safeParse(
1810
- jsonString,
1811
- (x) => GetPromptVersionPromptConfig$inboundSchema.parse(JSON.parse(x)),
1812
- `Failed to parse 'GetPromptVersionPromptConfig' from JSON`,
1813
- );
1814
- }
1815
-
1816
- /** @internal */
1817
- export const GetPromptVersionUseCases$inboundSchema: z.ZodNativeEnum<
1818
- typeof GetPromptVersionUseCases
1819
- > = z.nativeEnum(GetPromptVersionUseCases);
1820
-
1821
- /** @internal */
1822
- export const GetPromptVersionUseCases$outboundSchema: z.ZodNativeEnum<
1823
- typeof GetPromptVersionUseCases
1824
- > = GetPromptVersionUseCases$inboundSchema;
1825
-
1826
- /**
1827
- * @internal
1828
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1829
- */
1830
- export namespace GetPromptVersionUseCases$ {
1831
- /** @deprecated use `GetPromptVersionUseCases$inboundSchema` instead. */
1832
- export const inboundSchema = GetPromptVersionUseCases$inboundSchema;
1833
- /** @deprecated use `GetPromptVersionUseCases$outboundSchema` instead. */
1834
- export const outboundSchema = GetPromptVersionUseCases$outboundSchema;
1835
- }
1836
-
1837
- /** @internal */
1838
- export const GetPromptVersionLanguage$inboundSchema: z.ZodNativeEnum<
1839
- typeof GetPromptVersionLanguage
1840
- > = z.nativeEnum(GetPromptVersionLanguage);
1841
-
1842
- /** @internal */
1843
- export const GetPromptVersionLanguage$outboundSchema: z.ZodNativeEnum<
1844
- typeof GetPromptVersionLanguage
1845
- > = GetPromptVersionLanguage$inboundSchema;
1846
-
1847
- /**
1848
- * @internal
1849
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1850
- */
1851
- export namespace GetPromptVersionLanguage$ {
1852
- /** @deprecated use `GetPromptVersionLanguage$inboundSchema` instead. */
1853
- export const inboundSchema = GetPromptVersionLanguage$inboundSchema;
1854
- /** @deprecated use `GetPromptVersionLanguage$outboundSchema` instead. */
1855
- export const outboundSchema = GetPromptVersionLanguage$outboundSchema;
1856
- }
1857
-
1858
- /** @internal */
1859
- export const GetPromptVersionMetadata$inboundSchema: z.ZodType<
1860
- GetPromptVersionMetadata,
1861
- z.ZodTypeDef,
1862
- unknown
1863
- > = z.object({
1864
- use_cases: z.array(GetPromptVersionUseCases$inboundSchema).optional(),
1865
- language: GetPromptVersionLanguage$inboundSchema.optional(),
1866
- }).transform((v) => {
1867
- return remap$(v, {
1868
- "use_cases": "useCases",
1869
- });
1870
- });
1871
-
1872
- /** @internal */
1873
- export type GetPromptVersionMetadata$Outbound = {
1874
- use_cases?: Array<string> | undefined;
1875
- language?: string | undefined;
1876
- };
1877
-
1878
- /** @internal */
1879
- export const GetPromptVersionMetadata$outboundSchema: z.ZodType<
1880
- GetPromptVersionMetadata$Outbound,
1881
- z.ZodTypeDef,
1882
- GetPromptVersionMetadata
1883
- > = z.object({
1884
- useCases: z.array(GetPromptVersionUseCases$outboundSchema).optional(),
1885
- language: GetPromptVersionLanguage$outboundSchema.optional(),
1886
- }).transform((v) => {
1887
- return remap$(v, {
1888
- useCases: "use_cases",
1889
- });
1890
- });
1891
-
1892
- /**
1893
- * @internal
1894
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1895
- */
1896
- export namespace GetPromptVersionMetadata$ {
1897
- /** @deprecated use `GetPromptVersionMetadata$inboundSchema` instead. */
1898
- export const inboundSchema = GetPromptVersionMetadata$inboundSchema;
1899
- /** @deprecated use `GetPromptVersionMetadata$outboundSchema` instead. */
1900
- export const outboundSchema = GetPromptVersionMetadata$outboundSchema;
1901
- /** @deprecated use `GetPromptVersionMetadata$Outbound` instead. */
1902
- export type Outbound = GetPromptVersionMetadata$Outbound;
1903
- }
1904
-
1905
- export function getPromptVersionMetadataToJSON(
1906
- getPromptVersionMetadata: GetPromptVersionMetadata,
1907
- ): string {
1908
- return JSON.stringify(
1909
- GetPromptVersionMetadata$outboundSchema.parse(getPromptVersionMetadata),
1910
- );
1911
- }
1912
-
1913
- export function getPromptVersionMetadataFromJSON(
1914
- jsonString: string,
1915
- ): SafeParseResult<GetPromptVersionMetadata, SDKValidationError> {
1916
- return safeParse(
1917
- jsonString,
1918
- (x) => GetPromptVersionMetadata$inboundSchema.parse(JSON.parse(x)),
1919
- `Failed to parse 'GetPromptVersionMetadata' from JSON`,
1920
- );
1921
- }
1922
-
1923
- /** @internal */
1924
- export const GetPromptVersionResponseBody$inboundSchema: z.ZodType<
1925
- GetPromptVersionResponseBody,
1926
- z.ZodTypeDef,
1927
- unknown
1928
- > = z.object({
1929
- _id: z.string(),
1930
- type: GetPromptVersionType$inboundSchema,
1931
- created_by_id: z.string().optional(),
1932
- updated_by_id: z.string().optional(),
1933
- description: z.nullable(z.string()).optional(),
1934
- prompt_config: z.lazy(() => GetPromptVersionPromptConfig$inboundSchema),
1935
- metadata: z.lazy(() => GetPromptVersionMetadata$inboundSchema).optional(),
1936
- timestamp: z.string(),
1937
- }).transform((v) => {
1938
- return remap$(v, {
1939
- "_id": "id",
1940
- "created_by_id": "createdById",
1941
- "updated_by_id": "updatedById",
1942
- "prompt_config": "promptConfig",
1943
- });
1944
- });
1945
-
1946
- /** @internal */
1947
- export type GetPromptVersionResponseBody$Outbound = {
1948
- _id: string;
1949
- type: string;
1950
- created_by_id?: string | undefined;
1951
- updated_by_id?: string | undefined;
1952
- description?: string | null | undefined;
1953
- prompt_config: GetPromptVersionPromptConfig$Outbound;
1954
- metadata?: GetPromptVersionMetadata$Outbound | undefined;
1955
- timestamp: string;
1956
- };
1957
-
1958
- /** @internal */
1959
- export const GetPromptVersionResponseBody$outboundSchema: z.ZodType<
1960
- GetPromptVersionResponseBody$Outbound,
1961
- z.ZodTypeDef,
1962
- GetPromptVersionResponseBody
1963
- > = z.object({
1964
- id: z.string(),
1965
- type: GetPromptVersionType$outboundSchema,
1966
- createdById: z.string().optional(),
1967
- updatedById: z.string().optional(),
1968
- description: z.nullable(z.string()).optional(),
1969
- promptConfig: z.lazy(() => GetPromptVersionPromptConfig$outboundSchema),
1970
- metadata: z.lazy(() => GetPromptVersionMetadata$outboundSchema).optional(),
1971
- timestamp: z.string(),
1972
- }).transform((v) => {
1973
- return remap$(v, {
1974
- id: "_id",
1975
- createdById: "created_by_id",
1976
- updatedById: "updated_by_id",
1977
- promptConfig: "prompt_config",
1978
- });
1979
- });
1980
-
1981
- /**
1982
- * @internal
1983
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1984
- */
1985
- export namespace GetPromptVersionResponseBody$ {
1986
- /** @deprecated use `GetPromptVersionResponseBody$inboundSchema` instead. */
1987
- export const inboundSchema = GetPromptVersionResponseBody$inboundSchema;
1988
- /** @deprecated use `GetPromptVersionResponseBody$outboundSchema` instead. */
1989
- export const outboundSchema = GetPromptVersionResponseBody$outboundSchema;
1990
- /** @deprecated use `GetPromptVersionResponseBody$Outbound` instead. */
1991
- export type Outbound = GetPromptVersionResponseBody$Outbound;
1992
- }
1993
-
1994
- export function getPromptVersionResponseBodyToJSON(
1995
- getPromptVersionResponseBody: GetPromptVersionResponseBody,
1996
- ): string {
1997
- return JSON.stringify(
1998
- GetPromptVersionResponseBody$outboundSchema.parse(
1999
- getPromptVersionResponseBody,
2000
- ),
2001
- );
2002
- }
2003
-
2004
- export function getPromptVersionResponseBodyFromJSON(
2005
- jsonString: string,
2006
- ): SafeParseResult<GetPromptVersionResponseBody, SDKValidationError> {
2007
- return safeParse(
2008
- jsonString,
2009
- (x) => GetPromptVersionResponseBody$inboundSchema.parse(JSON.parse(x)),
2010
- `Failed to parse 'GetPromptVersionResponseBody' from JSON`,
2011
- );
2012
- }