@orq-ai/node 1.31.1 → 1.31.11

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 (161) hide show
  1. package/README.md +17 -45
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/lib/config.js.map +1 -1
  5. package/models/errors/index.d.ts +0 -1
  6. package/models/errors/index.d.ts.map +1 -1
  7. package/models/errors/index.js +0 -1
  8. package/models/errors/index.js.map +1 -1
  9. package/models/operations/bulkfileupload.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/deploymentgetconfig.d.ts +96 -96
  12. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  13. package/models/operations/deploymentgetconfig.js +135 -136
  14. package/models/operations/deploymentgetconfig.js.map +1 -1
  15. package/models/operations/deploymentinvoke.d.ts +49 -46
  16. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  17. package/models/operations/deploymentinvoke.js +63 -61
  18. package/models/operations/deploymentinvoke.js.map +1 -1
  19. package/models/operations/deployments.d.ts +53 -53
  20. package/models/operations/deployments.d.ts.map +1 -1
  21. package/models/operations/deployments.js +67 -66
  22. package/models/operations/deployments.js.map +1 -1
  23. package/models/operations/fileupload.js +2 -2
  24. package/models/operations/index.d.ts +0 -9
  25. package/models/operations/index.d.ts.map +1 -1
  26. package/models/operations/index.js +0 -9
  27. package/models/operations/index.js.map +1 -1
  28. package/package.json +1 -1
  29. package/sdk/sdk.d.ts +0 -6
  30. package/sdk/sdk.d.ts.map +1 -1
  31. package/sdk/sdk.js +0 -10
  32. package/sdk/sdk.js.map +1 -1
  33. package/src/lib/config.ts +3 -3
  34. package/src/models/errors/index.ts +0 -1
  35. package/src/models/operations/bulkfileupload.ts +2 -2
  36. package/src/models/operations/createcontact.ts +2 -2
  37. package/src/models/operations/deploymentgetconfig.ts +188 -255
  38. package/src/models/operations/deploymentinvoke.ts +81 -95
  39. package/src/models/operations/deployments.ts +88 -101
  40. package/src/models/operations/fileupload.ts +2 -2
  41. package/src/models/operations/index.ts +0 -9
  42. package/src/sdk/sdk.ts +0 -12
  43. package/docs/sdks/prompt/README.md +0 -6
  44. package/docs/sdks/prompts/README.md +0 -533
  45. package/docs/sdks/snippets/README.md +0 -84
  46. package/docs/sdks/templates/README.md +0 -80
  47. package/funcs/promptSnippetsFindOne.d.ts +0 -12
  48. package/funcs/promptSnippetsFindOne.d.ts.map +0 -1
  49. package/funcs/promptSnippetsFindOne.js +0 -107
  50. package/funcs/promptSnippetsFindOne.js.map +0 -1
  51. package/funcs/promptTemplatesGetAll.d.ts +0 -12
  52. package/funcs/promptTemplatesGetAll.d.ts.map +0 -1
  53. package/funcs/promptTemplatesGetAll.js +0 -107
  54. package/funcs/promptTemplatesGetAll.js.map +0 -1
  55. package/funcs/promptsCreate.d.ts +0 -12
  56. package/funcs/promptsCreate.d.ts.map +0 -1
  57. package/funcs/promptsCreate.js +0 -104
  58. package/funcs/promptsCreate.js.map +0 -1
  59. package/funcs/promptsCreateVersion.d.ts +0 -12
  60. package/funcs/promptsCreateVersion.d.ts.map +0 -1
  61. package/funcs/promptsCreateVersion.js +0 -108
  62. package/funcs/promptsCreateVersion.js.map +0 -1
  63. package/funcs/promptsDelete.d.ts +0 -12
  64. package/funcs/promptsDelete.d.ts.map +0 -1
  65. package/funcs/promptsDelete.js +0 -108
  66. package/funcs/promptsDelete.js.map +0 -1
  67. package/funcs/promptsDuplicate.d.ts +0 -12
  68. package/funcs/promptsDuplicate.d.ts.map +0 -1
  69. package/funcs/promptsDuplicate.js +0 -108
  70. package/funcs/promptsDuplicate.js.map +0 -1
  71. package/funcs/promptsGetAll.d.ts +0 -12
  72. package/funcs/promptsGetAll.d.ts.map +0 -1
  73. package/funcs/promptsGetAll.js +0 -107
  74. package/funcs/promptsGetAll.js.map +0 -1
  75. package/funcs/promptsGetOne.d.ts +0 -12
  76. package/funcs/promptsGetOne.d.ts.map +0 -1
  77. package/funcs/promptsGetOne.js +0 -108
  78. package/funcs/promptsGetOne.js.map +0 -1
  79. package/funcs/promptsUpdate.d.ts +0 -13
  80. package/funcs/promptsUpdate.d.ts.map +0 -1
  81. package/funcs/promptsUpdate.js +0 -112
  82. package/funcs/promptsUpdate.js.map +0 -1
  83. package/models/errors/updateprompt.d.ts +0 -36
  84. package/models/errors/updateprompt.d.ts.map +0 -1
  85. package/models/errors/updateprompt.js +0 -79
  86. package/models/errors/updateprompt.js.map +0 -1
  87. package/models/operations/createprompt.d.ts +0 -2035
  88. package/models/operations/createprompt.d.ts.map +0 -1
  89. package/models/operations/createprompt.js +0 -1853
  90. package/models/operations/createprompt.js.map +0 -1
  91. package/models/operations/createpromptversion.d.ts +0 -2001
  92. package/models/operations/createpromptversion.d.ts.map +0 -1
  93. package/models/operations/createpromptversion.js +0 -1848
  94. package/models/operations/createpromptversion.js.map +0 -1
  95. package/models/operations/deleteprompt.d.ts +0 -32
  96. package/models/operations/deleteprompt.d.ts.map +0 -1
  97. package/models/operations/deleteprompt.js +0 -69
  98. package/models/operations/deleteprompt.js.map +0 -1
  99. package/models/operations/duplicateprompt.d.ts +0 -32
  100. package/models/operations/duplicateprompt.d.ts.map +0 -1
  101. package/models/operations/duplicateprompt.js +0 -69
  102. package/models/operations/duplicateprompt.js.map +0 -1
  103. package/models/operations/findonepromptsnippet.d.ts +0 -6278
  104. package/models/operations/findonepromptsnippet.d.ts.map +0 -1
  105. package/models/operations/findonepromptsnippet.js +0 -5891
  106. package/models/operations/findonepromptsnippet.js.map +0 -1
  107. package/models/operations/getallprompts.d.ts +0 -6613
  108. package/models/operations/getallprompts.d.ts.map +0 -1
  109. package/models/operations/getallprompts.js +0 -6161
  110. package/models/operations/getallprompts.js.map +0 -1
  111. package/models/operations/getallprompttemplates.d.ts +0 -6607
  112. package/models/operations/getallprompttemplates.d.ts.map +0 -1
  113. package/models/operations/getallprompttemplates.js +0 -6225
  114. package/models/operations/getallprompttemplates.js.map +0 -1
  115. package/models/operations/getoneprompt.d.ts +0 -32
  116. package/models/operations/getoneprompt.d.ts.map +0 -1
  117. package/models/operations/getoneprompt.js +0 -69
  118. package/models/operations/getoneprompt.js.map +0 -1
  119. package/models/operations/updateprompt.d.ts +0 -7251
  120. package/models/operations/updateprompt.d.ts.map +0 -1
  121. package/models/operations/updateprompt.js +0 -6678
  122. package/models/operations/updateprompt.js.map +0 -1
  123. package/sdk/prompt.d.ts +0 -10
  124. package/sdk/prompt.d.ts.map +0 -1
  125. package/sdk/prompt.js +0 -21
  126. package/sdk/prompt.js.map +0 -1
  127. package/sdk/prompts.d.ts +0 -33
  128. package/sdk/prompts.d.ts.map +0 -1
  129. package/sdk/prompts.js +0 -61
  130. package/sdk/prompts.js.map +0 -1
  131. package/sdk/snippets.d.ts +0 -9
  132. package/sdk/snippets.d.ts.map +0 -1
  133. package/sdk/snippets.js +0 -19
  134. package/sdk/snippets.js.map +0 -1
  135. package/sdk/templates.d.ts +0 -9
  136. package/sdk/templates.d.ts.map +0 -1
  137. package/sdk/templates.js +0 -19
  138. package/sdk/templates.js.map +0 -1
  139. package/src/funcs/promptSnippetsFindOne.ts +0 -127
  140. package/src/funcs/promptTemplatesGetAll.ts +0 -129
  141. package/src/funcs/promptsCreate.ts +0 -123
  142. package/src/funcs/promptsCreateVersion.ts +0 -128
  143. package/src/funcs/promptsDelete.ts +0 -127
  144. package/src/funcs/promptsDuplicate.ts +0 -127
  145. package/src/funcs/promptsGetAll.ts +0 -127
  146. package/src/funcs/promptsGetOne.ts +0 -127
  147. package/src/funcs/promptsUpdate.ts +0 -135
  148. package/src/models/errors/updateprompt.ts +0 -71
  149. package/src/models/operations/createprompt.ts +0 -3455
  150. package/src/models/operations/createpromptversion.ts +0 -3697
  151. package/src/models/operations/deleteprompt.ts +0 -69
  152. package/src/models/operations/duplicateprompt.ts +0 -69
  153. package/src/models/operations/findonepromptsnippet.ts +0 -13629
  154. package/src/models/operations/getallprompts.ts +0 -13390
  155. package/src/models/operations/getallprompttemplates.ts +0 -13690
  156. package/src/models/operations/getoneprompt.ts +0 -69
  157. package/src/models/operations/updateprompt.ts +0 -14407
  158. package/src/sdk/prompt.ts +0 -19
  159. package/src/sdk/prompts.ts +0 -114
  160. package/src/sdk/snippets.ts +0 -24
  161. package/src/sdk/templates.ts +0 -24
@@ -1,3697 +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
- /**
13
- * The type of the model
14
- */
15
- export const CreatePromptVersionModelType = {
16
- Chat: "chat",
17
- Completion: "completion",
18
- Embedding: "embedding",
19
- Vision: "vision",
20
- Image: "image",
21
- Tts: "tts",
22
- Stt: "stt",
23
- Rerank: "rerank",
24
- Moderations: "moderations",
25
- } as const;
26
- /**
27
- * The type of the model
28
- */
29
- export type CreatePromptVersionModelType = ClosedEnum<
30
- typeof CreatePromptVersionModelType
31
- >;
32
-
33
- /**
34
- * Only supported on `image` models.
35
- */
36
- export const CreatePromptVersionFormat = {
37
- Url: "url",
38
- B64Json: "b64_json",
39
- Text: "text",
40
- JsonObject: "json_object",
41
- } as const;
42
- /**
43
- * Only supported on `image` models.
44
- */
45
- export type CreatePromptVersionFormat = ClosedEnum<
46
- typeof CreatePromptVersionFormat
47
- >;
48
-
49
- /**
50
- * Only supported on `image` models.
51
- */
52
- export const CreatePromptVersionQuality = {
53
- Standard: "standard",
54
- Hd: "hd",
55
- } as const;
56
- /**
57
- * Only supported on `image` models.
58
- */
59
- export type CreatePromptVersionQuality = ClosedEnum<
60
- typeof CreatePromptVersionQuality
61
- >;
62
-
63
- export const CreatePromptVersionResponseFormatPromptsType = {
64
- JsonObject: "json_object",
65
- } as const;
66
- export type CreatePromptVersionResponseFormatPromptsType = ClosedEnum<
67
- typeof CreatePromptVersionResponseFormatPromptsType
68
- >;
69
-
70
- export type CreatePromptVersionResponseFormat2 = {
71
- type: CreatePromptVersionResponseFormatPromptsType;
72
- };
73
-
74
- export const CreatePromptVersionResponseFormatType = {
75
- JsonSchema: "json_schema",
76
- } as const;
77
- export type CreatePromptVersionResponseFormatType = ClosedEnum<
78
- typeof CreatePromptVersionResponseFormatType
79
- >;
80
-
81
- export type ResponseFormatJsonSchema = {
82
- name: string;
83
- strict: boolean;
84
- schema: { [k: string]: any };
85
- };
86
-
87
- export type CreatePromptVersionResponseFormat1 = {
88
- type: CreatePromptVersionResponseFormatType;
89
- jsonSchema: ResponseFormatJsonSchema;
90
- };
91
-
92
- /**
93
- * An object specifying the format that the model must output.
94
- *
95
- * @remarks
96
- *
97
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
98
- *
99
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
100
- *
101
- * 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.
102
- */
103
- export type CreatePromptVersionResponseFormat =
104
- | CreatePromptVersionResponseFormat2
105
- | CreatePromptVersionResponseFormat1;
106
-
107
- /**
108
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
109
- */
110
- export const CreatePromptVersionPhotoRealVersion = {
111
- V1: "v1",
112
- V2: "v2",
113
- } as const;
114
- /**
115
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
116
- */
117
- export type CreatePromptVersionPhotoRealVersion = ClosedEnum<
118
- typeof CreatePromptVersionPhotoRealVersion
119
- >;
120
-
121
- /**
122
- * The format to return the embeddings
123
- */
124
- export const CreatePromptVersionEncodingFormat = {
125
- Float: "float",
126
- Base64: "base64",
127
- } as const;
128
- /**
129
- * The format to return the embeddings
130
- */
131
- export type CreatePromptVersionEncodingFormat = ClosedEnum<
132
- typeof CreatePromptVersionEncodingFormat
133
- >;
134
-
135
- /**
136
- * Model Parameters: Not all parameters apply to every model
137
- */
138
- export type CreatePromptVersionModelParameters = {
139
- /**
140
- * Only supported on `chat` and `completion` models.
141
- */
142
- temperature?: number | undefined;
143
- /**
144
- * Only supported on `chat` and `completion` models.
145
- */
146
- maxTokens?: number | undefined;
147
- /**
148
- * Only supported on `chat` and `completion` models.
149
- */
150
- topK?: number | undefined;
151
- /**
152
- * Only supported on `chat` and `completion` models.
153
- */
154
- topP?: number | undefined;
155
- /**
156
- * Only supported on `chat` and `completion` models.
157
- */
158
- frequencyPenalty?: number | undefined;
159
- /**
160
- * Only supported on `chat` and `completion` models.
161
- */
162
- presencePenalty?: number | undefined;
163
- /**
164
- * Only supported on `image` models.
165
- */
166
- numImages?: number | undefined;
167
- /**
168
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
169
- */
170
- seed?: number | undefined;
171
- /**
172
- * Only supported on `image` models.
173
- */
174
- format?: CreatePromptVersionFormat | undefined;
175
- /**
176
- * Only supported on `image` models.
177
- */
178
- dimensions?: string | undefined;
179
- /**
180
- * Only supported on `image` models.
181
- */
182
- quality?: CreatePromptVersionQuality | undefined;
183
- /**
184
- * Only supported on `image` models.
185
- */
186
- style?: string | undefined;
187
- /**
188
- * An object specifying the format that the model must output.
189
- *
190
- * @remarks
191
- *
192
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
193
- *
194
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
195
- *
196
- * 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.
197
- */
198
- responseFormat?:
199
- | CreatePromptVersionResponseFormat2
200
- | CreatePromptVersionResponseFormat1
201
- | null
202
- | undefined;
203
- /**
204
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
205
- */
206
- photoRealVersion?: CreatePromptVersionPhotoRealVersion | undefined;
207
- /**
208
- * The format to return the embeddings
209
- */
210
- encodingFormat?: CreatePromptVersionEncodingFormat | undefined;
211
- };
212
-
213
- export const CreatePromptVersionProvider = {
214
- Cohere: "cohere",
215
- Openai: "openai",
216
- Anthropic: "anthropic",
217
- Huggingface: "huggingface",
218
- Replicate: "replicate",
219
- Google: "google",
220
- GoogleAi: "google-ai",
221
- Azure: "azure",
222
- Aws: "aws",
223
- Anyscale: "anyscale",
224
- Perplexity: "perplexity",
225
- Groq: "groq",
226
- Fal: "fal",
227
- Leonardoai: "leonardoai",
228
- Nvidia: "nvidia",
229
- Jina: "jina",
230
- } as const;
231
- export type CreatePromptVersionProvider = ClosedEnum<
232
- typeof CreatePromptVersionProvider
233
- >;
234
-
235
- /**
236
- * The role of the prompt message
237
- */
238
- export const CreatePromptVersionRole = {
239
- System: "system",
240
- Assistant: "assistant",
241
- User: "user",
242
- Exception: "exception",
243
- Tool: "tool",
244
- Prompt: "prompt",
245
- Correction: "correction",
246
- ExpectedOutput: "expected_output",
247
- } as const;
248
- /**
249
- * The role of the prompt message
250
- */
251
- export type CreatePromptVersionRole = ClosedEnum<
252
- typeof CreatePromptVersionRole
253
- >;
254
-
255
- export const CreatePromptVersion2PromptsType = {
256
- ImageUrl: "image_url",
257
- } as const;
258
- export type CreatePromptVersion2PromptsType = ClosedEnum<
259
- typeof CreatePromptVersion2PromptsType
260
- >;
261
-
262
- export type CreatePromptVersion2ImageUrl = {
263
- /**
264
- * Either a URL of the image or the base64 encoded data URI.
265
- */
266
- url: string;
267
- /**
268
- * Specifies the detail level of the image. Currently only supported with OpenAI models
269
- */
270
- detail?: string | undefined;
271
- };
272
-
273
- /**
274
- * The image part of the prompt message. Only supported with vision models.
275
- */
276
- export type CreatePromptVersion22 = {
277
- type: CreatePromptVersion2PromptsType;
278
- imageUrl: CreatePromptVersion2ImageUrl;
279
- };
280
-
281
- export const CreatePromptVersion2Type = {
282
- Text: "text",
283
- } as const;
284
- export type CreatePromptVersion2Type = ClosedEnum<
285
- typeof CreatePromptVersion2Type
286
- >;
287
-
288
- /**
289
- * Text content part of a prompt message
290
- */
291
- export type CreatePromptVersion21 = {
292
- type: CreatePromptVersion2Type;
293
- text: string;
294
- };
295
-
296
- export type CreatePromptVersionContent2 =
297
- | CreatePromptVersion21
298
- | CreatePromptVersion22;
299
-
300
- /**
301
- * 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.
302
- */
303
- export type CreatePromptVersionContent =
304
- | string
305
- | Array<CreatePromptVersion21 | CreatePromptVersion22>;
306
-
307
- export const CreatePromptVersionType = {
308
- Function: "function",
309
- } as const;
310
- export type CreatePromptVersionType = ClosedEnum<
311
- typeof CreatePromptVersionType
312
- >;
313
-
314
- export type CreatePromptVersionFunction = {
315
- name: string;
316
- /**
317
- * JSON string arguments for the functions
318
- */
319
- arguments: string;
320
- };
321
-
322
- export type CreatePromptVersionToolCalls = {
323
- id?: string | undefined;
324
- index?: number | undefined;
325
- type: CreatePromptVersionType;
326
- function: CreatePromptVersionFunction;
327
- };
328
-
329
- export type CreatePromptVersionMessages = {
330
- /**
331
- * The role of the prompt message
332
- */
333
- role: CreatePromptVersionRole;
334
- /**
335
- * 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.
336
- */
337
- content: string | Array<CreatePromptVersion21 | CreatePromptVersion22>;
338
- toolCalls?: Array<CreatePromptVersionToolCalls> | undefined;
339
- };
340
-
341
- export type CreatePromptVersionPromptConfig = {
342
- stream?: boolean | undefined;
343
- model?: string | undefined;
344
- /**
345
- * The type of the model
346
- */
347
- modelType?: CreatePromptVersionModelType | undefined;
348
- /**
349
- * Model Parameters: Not all parameters apply to every model
350
- */
351
- modelParameters?: CreatePromptVersionModelParameters | undefined;
352
- provider?: CreatePromptVersionProvider | undefined;
353
- version?: string | undefined;
354
- messages: Array<CreatePromptVersionMessages>;
355
- };
356
-
357
- export type CreatePromptVersionMetadata = {
358
- useCases?: Array<string> | undefined;
359
- language?: string | undefined;
360
- };
361
-
362
- export type CreatePromptVersionRequestBody = {
363
- displayName: string;
364
- description?: string | null | undefined;
365
- promptConfig: CreatePromptVersionPromptConfig;
366
- metadata: CreatePromptVersionMetadata;
367
- commit: string;
368
- timestamp: string;
369
- };
370
-
371
- export type CreatePromptVersionRequest = {
372
- /**
373
- * Prompt ID
374
- */
375
- id: string;
376
- requestBody?: CreatePromptVersionRequestBody | undefined;
377
- };
378
-
379
- /**
380
- * The type of the model
381
- */
382
- export const CreatePromptVersionPromptsModelType = {
383
- Chat: "chat",
384
- Completion: "completion",
385
- Embedding: "embedding",
386
- Vision: "vision",
387
- Image: "image",
388
- Tts: "tts",
389
- Stt: "stt",
390
- Rerank: "rerank",
391
- Moderations: "moderations",
392
- } as const;
393
- /**
394
- * The type of the model
395
- */
396
- export type CreatePromptVersionPromptsModelType = ClosedEnum<
397
- typeof CreatePromptVersionPromptsModelType
398
- >;
399
-
400
- /**
401
- * Only supported on `image` models.
402
- */
403
- export const CreatePromptVersionPromptsFormat = {
404
- Url: "url",
405
- B64Json: "b64_json",
406
- Text: "text",
407
- JsonObject: "json_object",
408
- } as const;
409
- /**
410
- * Only supported on `image` models.
411
- */
412
- export type CreatePromptVersionPromptsFormat = ClosedEnum<
413
- typeof CreatePromptVersionPromptsFormat
414
- >;
415
-
416
- /**
417
- * Only supported on `image` models.
418
- */
419
- export const CreatePromptVersionPromptsQuality = {
420
- Standard: "standard",
421
- Hd: "hd",
422
- } as const;
423
- /**
424
- * Only supported on `image` models.
425
- */
426
- export type CreatePromptVersionPromptsQuality = ClosedEnum<
427
- typeof CreatePromptVersionPromptsQuality
428
- >;
429
-
430
- export const CreatePromptVersionResponseFormatPromptsResponse200Type = {
431
- JsonObject: "json_object",
432
- } as const;
433
- export type CreatePromptVersionResponseFormatPromptsResponse200Type =
434
- ClosedEnum<typeof CreatePromptVersionResponseFormatPromptsResponse200Type>;
435
-
436
- export type CreatePromptVersionResponseFormatPrompts2 = {
437
- type: CreatePromptVersionResponseFormatPromptsResponse200Type;
438
- };
439
-
440
- export const CreatePromptVersionResponseFormatPromptsResponseType = {
441
- JsonSchema: "json_schema",
442
- } as const;
443
- export type CreatePromptVersionResponseFormatPromptsResponseType = ClosedEnum<
444
- typeof CreatePromptVersionResponseFormatPromptsResponseType
445
- >;
446
-
447
- export type CreatePromptVersionResponseFormatJsonSchema = {
448
- name: string;
449
- strict: boolean;
450
- schema: { [k: string]: any };
451
- };
452
-
453
- export type CreatePromptVersionResponseFormatPrompts1 = {
454
- type: CreatePromptVersionResponseFormatPromptsResponseType;
455
- jsonSchema: CreatePromptVersionResponseFormatJsonSchema;
456
- };
457
-
458
- /**
459
- * An object specifying the format that the model must output.
460
- *
461
- * @remarks
462
- *
463
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
464
- *
465
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
466
- *
467
- * 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.
468
- */
469
- export type CreatePromptVersionPromptsResponseFormat =
470
- | CreatePromptVersionResponseFormatPrompts2
471
- | CreatePromptVersionResponseFormatPrompts1;
472
-
473
- /**
474
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
475
- */
476
- export const CreatePromptVersionPromptsPhotoRealVersion = {
477
- V1: "v1",
478
- V2: "v2",
479
- } as const;
480
- /**
481
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
482
- */
483
- export type CreatePromptVersionPromptsPhotoRealVersion = ClosedEnum<
484
- typeof CreatePromptVersionPromptsPhotoRealVersion
485
- >;
486
-
487
- /**
488
- * The format to return the embeddings
489
- */
490
- export const CreatePromptVersionPromptsEncodingFormat = {
491
- Float: "float",
492
- Base64: "base64",
493
- } as const;
494
- /**
495
- * The format to return the embeddings
496
- */
497
- export type CreatePromptVersionPromptsEncodingFormat = ClosedEnum<
498
- typeof CreatePromptVersionPromptsEncodingFormat
499
- >;
500
-
501
- /**
502
- * Model Parameters: Not all parameters apply to every model
503
- */
504
- export type CreatePromptVersionPromptsModelParameters = {
505
- /**
506
- * Only supported on `chat` and `completion` models.
507
- */
508
- temperature?: number | undefined;
509
- /**
510
- * Only supported on `chat` and `completion` models.
511
- */
512
- maxTokens?: number | undefined;
513
- /**
514
- * Only supported on `chat` and `completion` models.
515
- */
516
- topK?: number | undefined;
517
- /**
518
- * Only supported on `chat` and `completion` models.
519
- */
520
- topP?: number | undefined;
521
- /**
522
- * Only supported on `chat` and `completion` models.
523
- */
524
- frequencyPenalty?: number | undefined;
525
- /**
526
- * Only supported on `chat` and `completion` models.
527
- */
528
- presencePenalty?: number | undefined;
529
- /**
530
- * Only supported on `image` models.
531
- */
532
- numImages?: number | undefined;
533
- /**
534
- * Best effort deterministic seed for the model. Currently only OpenAI models support these
535
- */
536
- seed?: number | undefined;
537
- /**
538
- * Only supported on `image` models.
539
- */
540
- format?: CreatePromptVersionPromptsFormat | undefined;
541
- /**
542
- * Only supported on `image` models.
543
- */
544
- dimensions?: string | undefined;
545
- /**
546
- * Only supported on `image` models.
547
- */
548
- quality?: CreatePromptVersionPromptsQuality | undefined;
549
- /**
550
- * Only supported on `image` models.
551
- */
552
- style?: string | undefined;
553
- /**
554
- * An object specifying the format that the model must output.
555
- *
556
- * @remarks
557
- *
558
- * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema
559
- *
560
- * Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the message the model generates is valid JSON.
561
- *
562
- * 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.
563
- */
564
- responseFormat?:
565
- | CreatePromptVersionResponseFormatPrompts2
566
- | CreatePromptVersionResponseFormatPrompts1
567
- | null
568
- | undefined;
569
- /**
570
- * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
571
- */
572
- photoRealVersion?: CreatePromptVersionPromptsPhotoRealVersion | undefined;
573
- /**
574
- * The format to return the embeddings
575
- */
576
- encodingFormat?: CreatePromptVersionPromptsEncodingFormat | undefined;
577
- };
578
-
579
- export const CreatePromptVersionPromptsProvider = {
580
- Cohere: "cohere",
581
- Openai: "openai",
582
- Anthropic: "anthropic",
583
- Huggingface: "huggingface",
584
- Replicate: "replicate",
585
- Google: "google",
586
- GoogleAi: "google-ai",
587
- Azure: "azure",
588
- Aws: "aws",
589
- Anyscale: "anyscale",
590
- Perplexity: "perplexity",
591
- Groq: "groq",
592
- Fal: "fal",
593
- Leonardoai: "leonardoai",
594
- Nvidia: "nvidia",
595
- Jina: "jina",
596
- } as const;
597
- export type CreatePromptVersionPromptsProvider = ClosedEnum<
598
- typeof CreatePromptVersionPromptsProvider
599
- >;
600
-
601
- /**
602
- * The role of the prompt message
603
- */
604
- export const CreatePromptVersionPromptsRole = {
605
- System: "system",
606
- Assistant: "assistant",
607
- User: "user",
608
- Exception: "exception",
609
- Tool: "tool",
610
- Prompt: "prompt",
611
- Correction: "correction",
612
- ExpectedOutput: "expected_output",
613
- } as const;
614
- /**
615
- * The role of the prompt message
616
- */
617
- export type CreatePromptVersionPromptsRole = ClosedEnum<
618
- typeof CreatePromptVersionPromptsRole
619
- >;
620
-
621
- export const CreatePromptVersion2PromptsResponse200Type = {
622
- ImageUrl: "image_url",
623
- } as const;
624
- export type CreatePromptVersion2PromptsResponse200Type = ClosedEnum<
625
- typeof CreatePromptVersion2PromptsResponse200Type
626
- >;
627
-
628
- export type CreatePromptVersion2PromptsImageUrl = {
629
- /**
630
- * The orq.ai id of the image
631
- */
632
- id?: string | undefined;
633
- /**
634
- * Either a URL of the image or the base64 encoded data URI.
635
- */
636
- url: string;
637
- /**
638
- * Specifies the detail level of the image. Currently only supported with OpenAI models
639
- */
640
- detail?: string | undefined;
641
- };
642
-
643
- /**
644
- * The image part of the prompt message. Only supported with vision models.
645
- */
646
- export type CreatePromptVersion2Prompts2 = {
647
- type: CreatePromptVersion2PromptsResponse200Type;
648
- imageUrl: CreatePromptVersion2PromptsImageUrl;
649
- };
650
-
651
- export const CreatePromptVersion2PromptsResponseType = {
652
- Text: "text",
653
- } as const;
654
- export type CreatePromptVersion2PromptsResponseType = ClosedEnum<
655
- typeof CreatePromptVersion2PromptsResponseType
656
- >;
657
-
658
- /**
659
- * Text content part of a prompt message
660
- */
661
- export type CreatePromptVersion2Prompts1 = {
662
- type: CreatePromptVersion2PromptsResponseType;
663
- text: string;
664
- };
665
-
666
- export type CreatePromptVersionContentPrompts2 =
667
- | CreatePromptVersion2Prompts1
668
- | CreatePromptVersion2Prompts2;
669
-
670
- /**
671
- * 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.
672
- */
673
- export type CreatePromptVersionPromptsContent =
674
- | string
675
- | Array<CreatePromptVersion2Prompts1 | CreatePromptVersion2Prompts2>;
676
-
677
- export const CreatePromptVersionPromptsType = {
678
- Function: "function",
679
- } as const;
680
- export type CreatePromptVersionPromptsType = ClosedEnum<
681
- typeof CreatePromptVersionPromptsType
682
- >;
683
-
684
- export type CreatePromptVersionPromptsFunction = {
685
- name: string;
686
- /**
687
- * JSON string arguments for the functions
688
- */
689
- arguments: string;
690
- };
691
-
692
- export type CreatePromptVersionPromptsToolCalls = {
693
- id?: string | undefined;
694
- index?: number | undefined;
695
- type: CreatePromptVersionPromptsType;
696
- function: CreatePromptVersionPromptsFunction;
697
- };
698
-
699
- export type CreatePromptVersionPromptsMessages = {
700
- /**
701
- * The role of the prompt message
702
- */
703
- role: CreatePromptVersionPromptsRole;
704
- /**
705
- * 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.
706
- */
707
- content:
708
- | string
709
- | Array<CreatePromptVersion2Prompts1 | CreatePromptVersion2Prompts2>;
710
- toolCalls?: Array<CreatePromptVersionPromptsToolCalls> | undefined;
711
- };
712
-
713
- export type CreatePromptVersionPromptsPromptConfig = {
714
- stream?: boolean | undefined;
715
- model?: string | undefined;
716
- /**
717
- * The id of the resource
718
- */
719
- modelDbId?: string | undefined;
720
- /**
721
- * The type of the model
722
- */
723
- modelType?: CreatePromptVersionPromptsModelType | undefined;
724
- /**
725
- * Model Parameters: Not all parameters apply to every model
726
- */
727
- modelParameters?: CreatePromptVersionPromptsModelParameters | undefined;
728
- provider?: CreatePromptVersionPromptsProvider | undefined;
729
- /**
730
- * The id of the resource
731
- */
732
- integrationId?: string | null | undefined;
733
- version?: string | undefined;
734
- messages: Array<CreatePromptVersionPromptsMessages>;
735
- };
736
-
737
- export type CreatePromptVersionPromptsMetadata = {
738
- useCases?: Array<string> | undefined;
739
- language?: string | undefined;
740
- };
741
-
742
- /**
743
- * Prompt version created.
744
- */
745
- export type CreatePromptVersionResponseBody = {
746
- id: string;
747
- displayName: string;
748
- description?: string | null | undefined;
749
- promptConfig: CreatePromptVersionPromptsPromptConfig;
750
- metadata: CreatePromptVersionPromptsMetadata;
751
- commit: string;
752
- timestamp: string;
753
- };
754
-
755
- /** @internal */
756
- export const CreatePromptVersionModelType$inboundSchema: z.ZodNativeEnum<
757
- typeof CreatePromptVersionModelType
758
- > = z.nativeEnum(CreatePromptVersionModelType);
759
-
760
- /** @internal */
761
- export const CreatePromptVersionModelType$outboundSchema: z.ZodNativeEnum<
762
- typeof CreatePromptVersionModelType
763
- > = CreatePromptVersionModelType$inboundSchema;
764
-
765
- /**
766
- * @internal
767
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
768
- */
769
- export namespace CreatePromptVersionModelType$ {
770
- /** @deprecated use `CreatePromptVersionModelType$inboundSchema` instead. */
771
- export const inboundSchema = CreatePromptVersionModelType$inboundSchema;
772
- /** @deprecated use `CreatePromptVersionModelType$outboundSchema` instead. */
773
- export const outboundSchema = CreatePromptVersionModelType$outboundSchema;
774
- }
775
-
776
- /** @internal */
777
- export const CreatePromptVersionFormat$inboundSchema: z.ZodNativeEnum<
778
- typeof CreatePromptVersionFormat
779
- > = z.nativeEnum(CreatePromptVersionFormat);
780
-
781
- /** @internal */
782
- export const CreatePromptVersionFormat$outboundSchema: z.ZodNativeEnum<
783
- typeof CreatePromptVersionFormat
784
- > = CreatePromptVersionFormat$inboundSchema;
785
-
786
- /**
787
- * @internal
788
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
789
- */
790
- export namespace CreatePromptVersionFormat$ {
791
- /** @deprecated use `CreatePromptVersionFormat$inboundSchema` instead. */
792
- export const inboundSchema = CreatePromptVersionFormat$inboundSchema;
793
- /** @deprecated use `CreatePromptVersionFormat$outboundSchema` instead. */
794
- export const outboundSchema = CreatePromptVersionFormat$outboundSchema;
795
- }
796
-
797
- /** @internal */
798
- export const CreatePromptVersionQuality$inboundSchema: z.ZodNativeEnum<
799
- typeof CreatePromptVersionQuality
800
- > = z.nativeEnum(CreatePromptVersionQuality);
801
-
802
- /** @internal */
803
- export const CreatePromptVersionQuality$outboundSchema: z.ZodNativeEnum<
804
- typeof CreatePromptVersionQuality
805
- > = CreatePromptVersionQuality$inboundSchema;
806
-
807
- /**
808
- * @internal
809
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
810
- */
811
- export namespace CreatePromptVersionQuality$ {
812
- /** @deprecated use `CreatePromptVersionQuality$inboundSchema` instead. */
813
- export const inboundSchema = CreatePromptVersionQuality$inboundSchema;
814
- /** @deprecated use `CreatePromptVersionQuality$outboundSchema` instead. */
815
- export const outboundSchema = CreatePromptVersionQuality$outboundSchema;
816
- }
817
-
818
- /** @internal */
819
- export const CreatePromptVersionResponseFormatPromptsType$inboundSchema:
820
- z.ZodNativeEnum<typeof CreatePromptVersionResponseFormatPromptsType> = z
821
- .nativeEnum(CreatePromptVersionResponseFormatPromptsType);
822
-
823
- /** @internal */
824
- export const CreatePromptVersionResponseFormatPromptsType$outboundSchema:
825
- z.ZodNativeEnum<typeof CreatePromptVersionResponseFormatPromptsType> =
826
- CreatePromptVersionResponseFormatPromptsType$inboundSchema;
827
-
828
- /**
829
- * @internal
830
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
831
- */
832
- export namespace CreatePromptVersionResponseFormatPromptsType$ {
833
- /** @deprecated use `CreatePromptVersionResponseFormatPromptsType$inboundSchema` instead. */
834
- export const inboundSchema =
835
- CreatePromptVersionResponseFormatPromptsType$inboundSchema;
836
- /** @deprecated use `CreatePromptVersionResponseFormatPromptsType$outboundSchema` instead. */
837
- export const outboundSchema =
838
- CreatePromptVersionResponseFormatPromptsType$outboundSchema;
839
- }
840
-
841
- /** @internal */
842
- export const CreatePromptVersionResponseFormat2$inboundSchema: z.ZodType<
843
- CreatePromptVersionResponseFormat2,
844
- z.ZodTypeDef,
845
- unknown
846
- > = z.object({
847
- type: CreatePromptVersionResponseFormatPromptsType$inboundSchema,
848
- });
849
-
850
- /** @internal */
851
- export type CreatePromptVersionResponseFormat2$Outbound = {
852
- type: string;
853
- };
854
-
855
- /** @internal */
856
- export const CreatePromptVersionResponseFormat2$outboundSchema: z.ZodType<
857
- CreatePromptVersionResponseFormat2$Outbound,
858
- z.ZodTypeDef,
859
- CreatePromptVersionResponseFormat2
860
- > = z.object({
861
- type: CreatePromptVersionResponseFormatPromptsType$outboundSchema,
862
- });
863
-
864
- /**
865
- * @internal
866
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
867
- */
868
- export namespace CreatePromptVersionResponseFormat2$ {
869
- /** @deprecated use `CreatePromptVersionResponseFormat2$inboundSchema` instead. */
870
- export const inboundSchema = CreatePromptVersionResponseFormat2$inboundSchema;
871
- /** @deprecated use `CreatePromptVersionResponseFormat2$outboundSchema` instead. */
872
- export const outboundSchema =
873
- CreatePromptVersionResponseFormat2$outboundSchema;
874
- /** @deprecated use `CreatePromptVersionResponseFormat2$Outbound` instead. */
875
- export type Outbound = CreatePromptVersionResponseFormat2$Outbound;
876
- }
877
-
878
- export function createPromptVersionResponseFormat2ToJSON(
879
- createPromptVersionResponseFormat2: CreatePromptVersionResponseFormat2,
880
- ): string {
881
- return JSON.stringify(
882
- CreatePromptVersionResponseFormat2$outboundSchema.parse(
883
- createPromptVersionResponseFormat2,
884
- ),
885
- );
886
- }
887
-
888
- export function createPromptVersionResponseFormat2FromJSON(
889
- jsonString: string,
890
- ): SafeParseResult<CreatePromptVersionResponseFormat2, SDKValidationError> {
891
- return safeParse(
892
- jsonString,
893
- (x) =>
894
- CreatePromptVersionResponseFormat2$inboundSchema.parse(JSON.parse(x)),
895
- `Failed to parse 'CreatePromptVersionResponseFormat2' from JSON`,
896
- );
897
- }
898
-
899
- /** @internal */
900
- export const CreatePromptVersionResponseFormatType$inboundSchema:
901
- z.ZodNativeEnum<typeof CreatePromptVersionResponseFormatType> = z.nativeEnum(
902
- CreatePromptVersionResponseFormatType,
903
- );
904
-
905
- /** @internal */
906
- export const CreatePromptVersionResponseFormatType$outboundSchema:
907
- z.ZodNativeEnum<typeof CreatePromptVersionResponseFormatType> =
908
- CreatePromptVersionResponseFormatType$inboundSchema;
909
-
910
- /**
911
- * @internal
912
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
913
- */
914
- export namespace CreatePromptVersionResponseFormatType$ {
915
- /** @deprecated use `CreatePromptVersionResponseFormatType$inboundSchema` instead. */
916
- export const inboundSchema =
917
- CreatePromptVersionResponseFormatType$inboundSchema;
918
- /** @deprecated use `CreatePromptVersionResponseFormatType$outboundSchema` instead. */
919
- export const outboundSchema =
920
- CreatePromptVersionResponseFormatType$outboundSchema;
921
- }
922
-
923
- /** @internal */
924
- export const ResponseFormatJsonSchema$inboundSchema: z.ZodType<
925
- ResponseFormatJsonSchema,
926
- z.ZodTypeDef,
927
- unknown
928
- > = z.object({
929
- name: z.string(),
930
- strict: z.boolean(),
931
- schema: z.record(z.any()),
932
- });
933
-
934
- /** @internal */
935
- export type ResponseFormatJsonSchema$Outbound = {
936
- name: string;
937
- strict: boolean;
938
- schema: { [k: string]: any };
939
- };
940
-
941
- /** @internal */
942
- export const ResponseFormatJsonSchema$outboundSchema: z.ZodType<
943
- ResponseFormatJsonSchema$Outbound,
944
- z.ZodTypeDef,
945
- ResponseFormatJsonSchema
946
- > = z.object({
947
- name: z.string(),
948
- strict: z.boolean(),
949
- schema: z.record(z.any()),
950
- });
951
-
952
- /**
953
- * @internal
954
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
955
- */
956
- export namespace ResponseFormatJsonSchema$ {
957
- /** @deprecated use `ResponseFormatJsonSchema$inboundSchema` instead. */
958
- export const inboundSchema = ResponseFormatJsonSchema$inboundSchema;
959
- /** @deprecated use `ResponseFormatJsonSchema$outboundSchema` instead. */
960
- export const outboundSchema = ResponseFormatJsonSchema$outboundSchema;
961
- /** @deprecated use `ResponseFormatJsonSchema$Outbound` instead. */
962
- export type Outbound = ResponseFormatJsonSchema$Outbound;
963
- }
964
-
965
- export function responseFormatJsonSchemaToJSON(
966
- responseFormatJsonSchema: ResponseFormatJsonSchema,
967
- ): string {
968
- return JSON.stringify(
969
- ResponseFormatJsonSchema$outboundSchema.parse(responseFormatJsonSchema),
970
- );
971
- }
972
-
973
- export function responseFormatJsonSchemaFromJSON(
974
- jsonString: string,
975
- ): SafeParseResult<ResponseFormatJsonSchema, SDKValidationError> {
976
- return safeParse(
977
- jsonString,
978
- (x) => ResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
979
- `Failed to parse 'ResponseFormatJsonSchema' from JSON`,
980
- );
981
- }
982
-
983
- /** @internal */
984
- export const CreatePromptVersionResponseFormat1$inboundSchema: z.ZodType<
985
- CreatePromptVersionResponseFormat1,
986
- z.ZodTypeDef,
987
- unknown
988
- > = z.object({
989
- type: CreatePromptVersionResponseFormatType$inboundSchema,
990
- json_schema: z.lazy(() => ResponseFormatJsonSchema$inboundSchema),
991
- }).transform((v) => {
992
- return remap$(v, {
993
- "json_schema": "jsonSchema",
994
- });
995
- });
996
-
997
- /** @internal */
998
- export type CreatePromptVersionResponseFormat1$Outbound = {
999
- type: string;
1000
- json_schema: ResponseFormatJsonSchema$Outbound;
1001
- };
1002
-
1003
- /** @internal */
1004
- export const CreatePromptVersionResponseFormat1$outboundSchema: z.ZodType<
1005
- CreatePromptVersionResponseFormat1$Outbound,
1006
- z.ZodTypeDef,
1007
- CreatePromptVersionResponseFormat1
1008
- > = z.object({
1009
- type: CreatePromptVersionResponseFormatType$outboundSchema,
1010
- jsonSchema: z.lazy(() => ResponseFormatJsonSchema$outboundSchema),
1011
- }).transform((v) => {
1012
- return remap$(v, {
1013
- jsonSchema: "json_schema",
1014
- });
1015
- });
1016
-
1017
- /**
1018
- * @internal
1019
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1020
- */
1021
- export namespace CreatePromptVersionResponseFormat1$ {
1022
- /** @deprecated use `CreatePromptVersionResponseFormat1$inboundSchema` instead. */
1023
- export const inboundSchema = CreatePromptVersionResponseFormat1$inboundSchema;
1024
- /** @deprecated use `CreatePromptVersionResponseFormat1$outboundSchema` instead. */
1025
- export const outboundSchema =
1026
- CreatePromptVersionResponseFormat1$outboundSchema;
1027
- /** @deprecated use `CreatePromptVersionResponseFormat1$Outbound` instead. */
1028
- export type Outbound = CreatePromptVersionResponseFormat1$Outbound;
1029
- }
1030
-
1031
- export function createPromptVersionResponseFormat1ToJSON(
1032
- createPromptVersionResponseFormat1: CreatePromptVersionResponseFormat1,
1033
- ): string {
1034
- return JSON.stringify(
1035
- CreatePromptVersionResponseFormat1$outboundSchema.parse(
1036
- createPromptVersionResponseFormat1,
1037
- ),
1038
- );
1039
- }
1040
-
1041
- export function createPromptVersionResponseFormat1FromJSON(
1042
- jsonString: string,
1043
- ): SafeParseResult<CreatePromptVersionResponseFormat1, SDKValidationError> {
1044
- return safeParse(
1045
- jsonString,
1046
- (x) =>
1047
- CreatePromptVersionResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1048
- `Failed to parse 'CreatePromptVersionResponseFormat1' from JSON`,
1049
- );
1050
- }
1051
-
1052
- /** @internal */
1053
- export const CreatePromptVersionResponseFormat$inboundSchema: z.ZodType<
1054
- CreatePromptVersionResponseFormat,
1055
- z.ZodTypeDef,
1056
- unknown
1057
- > = z.union([
1058
- z.lazy(() => CreatePromptVersionResponseFormat2$inboundSchema),
1059
- z.lazy(() => CreatePromptVersionResponseFormat1$inboundSchema),
1060
- ]);
1061
-
1062
- /** @internal */
1063
- export type CreatePromptVersionResponseFormat$Outbound =
1064
- | CreatePromptVersionResponseFormat2$Outbound
1065
- | CreatePromptVersionResponseFormat1$Outbound;
1066
-
1067
- /** @internal */
1068
- export const CreatePromptVersionResponseFormat$outboundSchema: z.ZodType<
1069
- CreatePromptVersionResponseFormat$Outbound,
1070
- z.ZodTypeDef,
1071
- CreatePromptVersionResponseFormat
1072
- > = z.union([
1073
- z.lazy(() => CreatePromptVersionResponseFormat2$outboundSchema),
1074
- z.lazy(() => CreatePromptVersionResponseFormat1$outboundSchema),
1075
- ]);
1076
-
1077
- /**
1078
- * @internal
1079
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1080
- */
1081
- export namespace CreatePromptVersionResponseFormat$ {
1082
- /** @deprecated use `CreatePromptVersionResponseFormat$inboundSchema` instead. */
1083
- export const inboundSchema = CreatePromptVersionResponseFormat$inboundSchema;
1084
- /** @deprecated use `CreatePromptVersionResponseFormat$outboundSchema` instead. */
1085
- export const outboundSchema =
1086
- CreatePromptVersionResponseFormat$outboundSchema;
1087
- /** @deprecated use `CreatePromptVersionResponseFormat$Outbound` instead. */
1088
- export type Outbound = CreatePromptVersionResponseFormat$Outbound;
1089
- }
1090
-
1091
- export function createPromptVersionResponseFormatToJSON(
1092
- createPromptVersionResponseFormat: CreatePromptVersionResponseFormat,
1093
- ): string {
1094
- return JSON.stringify(
1095
- CreatePromptVersionResponseFormat$outboundSchema.parse(
1096
- createPromptVersionResponseFormat,
1097
- ),
1098
- );
1099
- }
1100
-
1101
- export function createPromptVersionResponseFormatFromJSON(
1102
- jsonString: string,
1103
- ): SafeParseResult<CreatePromptVersionResponseFormat, SDKValidationError> {
1104
- return safeParse(
1105
- jsonString,
1106
- (x) => CreatePromptVersionResponseFormat$inboundSchema.parse(JSON.parse(x)),
1107
- `Failed to parse 'CreatePromptVersionResponseFormat' from JSON`,
1108
- );
1109
- }
1110
-
1111
- /** @internal */
1112
- export const CreatePromptVersionPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
1113
- typeof CreatePromptVersionPhotoRealVersion
1114
- > = z.nativeEnum(CreatePromptVersionPhotoRealVersion);
1115
-
1116
- /** @internal */
1117
- export const CreatePromptVersionPhotoRealVersion$outboundSchema:
1118
- z.ZodNativeEnum<typeof CreatePromptVersionPhotoRealVersion> =
1119
- CreatePromptVersionPhotoRealVersion$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 CreatePromptVersionPhotoRealVersion$ {
1126
- /** @deprecated use `CreatePromptVersionPhotoRealVersion$inboundSchema` instead. */
1127
- export const inboundSchema =
1128
- CreatePromptVersionPhotoRealVersion$inboundSchema;
1129
- /** @deprecated use `CreatePromptVersionPhotoRealVersion$outboundSchema` instead. */
1130
- export const outboundSchema =
1131
- CreatePromptVersionPhotoRealVersion$outboundSchema;
1132
- }
1133
-
1134
- /** @internal */
1135
- export const CreatePromptVersionEncodingFormat$inboundSchema: z.ZodNativeEnum<
1136
- typeof CreatePromptVersionEncodingFormat
1137
- > = z.nativeEnum(CreatePromptVersionEncodingFormat);
1138
-
1139
- /** @internal */
1140
- export const CreatePromptVersionEncodingFormat$outboundSchema: z.ZodNativeEnum<
1141
- typeof CreatePromptVersionEncodingFormat
1142
- > = CreatePromptVersionEncodingFormat$inboundSchema;
1143
-
1144
- /**
1145
- * @internal
1146
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1147
- */
1148
- export namespace CreatePromptVersionEncodingFormat$ {
1149
- /** @deprecated use `CreatePromptVersionEncodingFormat$inboundSchema` instead. */
1150
- export const inboundSchema = CreatePromptVersionEncodingFormat$inboundSchema;
1151
- /** @deprecated use `CreatePromptVersionEncodingFormat$outboundSchema` instead. */
1152
- export const outboundSchema =
1153
- CreatePromptVersionEncodingFormat$outboundSchema;
1154
- }
1155
-
1156
- /** @internal */
1157
- export const CreatePromptVersionModelParameters$inboundSchema: z.ZodType<
1158
- CreatePromptVersionModelParameters,
1159
- z.ZodTypeDef,
1160
- unknown
1161
- > = z.object({
1162
- temperature: z.number().optional(),
1163
- maxTokens: z.number().optional(),
1164
- topK: z.number().optional(),
1165
- topP: z.number().optional(),
1166
- frequencyPenalty: z.number().optional(),
1167
- presencePenalty: z.number().optional(),
1168
- numImages: z.number().optional(),
1169
- seed: z.number().optional(),
1170
- format: CreatePromptVersionFormat$inboundSchema.optional(),
1171
- dimensions: z.string().optional(),
1172
- quality: CreatePromptVersionQuality$inboundSchema.optional(),
1173
- style: z.string().optional(),
1174
- responseFormat: z.nullable(
1175
- z.union([
1176
- z.lazy(() => CreatePromptVersionResponseFormat2$inboundSchema),
1177
- z.lazy(() => CreatePromptVersionResponseFormat1$inboundSchema),
1178
- ]),
1179
- ).optional(),
1180
- photoRealVersion: CreatePromptVersionPhotoRealVersion$inboundSchema
1181
- .optional(),
1182
- encoding_format: CreatePromptVersionEncodingFormat$inboundSchema.optional(),
1183
- }).transform((v) => {
1184
- return remap$(v, {
1185
- "encoding_format": "encodingFormat",
1186
- });
1187
- });
1188
-
1189
- /** @internal */
1190
- export type CreatePromptVersionModelParameters$Outbound = {
1191
- temperature?: number | undefined;
1192
- maxTokens?: number | undefined;
1193
- topK?: number | undefined;
1194
- topP?: number | undefined;
1195
- frequencyPenalty?: number | undefined;
1196
- presencePenalty?: number | undefined;
1197
- numImages?: number | undefined;
1198
- seed?: number | undefined;
1199
- format?: string | undefined;
1200
- dimensions?: string | undefined;
1201
- quality?: string | undefined;
1202
- style?: string | undefined;
1203
- responseFormat?:
1204
- | CreatePromptVersionResponseFormat2$Outbound
1205
- | CreatePromptVersionResponseFormat1$Outbound
1206
- | null
1207
- | undefined;
1208
- photoRealVersion?: string | undefined;
1209
- encoding_format?: string | undefined;
1210
- };
1211
-
1212
- /** @internal */
1213
- export const CreatePromptVersionModelParameters$outboundSchema: z.ZodType<
1214
- CreatePromptVersionModelParameters$Outbound,
1215
- z.ZodTypeDef,
1216
- CreatePromptVersionModelParameters
1217
- > = z.object({
1218
- temperature: z.number().optional(),
1219
- maxTokens: z.number().optional(),
1220
- topK: z.number().optional(),
1221
- topP: z.number().optional(),
1222
- frequencyPenalty: z.number().optional(),
1223
- presencePenalty: z.number().optional(),
1224
- numImages: z.number().optional(),
1225
- seed: z.number().optional(),
1226
- format: CreatePromptVersionFormat$outboundSchema.optional(),
1227
- dimensions: z.string().optional(),
1228
- quality: CreatePromptVersionQuality$outboundSchema.optional(),
1229
- style: z.string().optional(),
1230
- responseFormat: z.nullable(
1231
- z.union([
1232
- z.lazy(() => CreatePromptVersionResponseFormat2$outboundSchema),
1233
- z.lazy(() => CreatePromptVersionResponseFormat1$outboundSchema),
1234
- ]),
1235
- ).optional(),
1236
- photoRealVersion: CreatePromptVersionPhotoRealVersion$outboundSchema
1237
- .optional(),
1238
- encodingFormat: CreatePromptVersionEncodingFormat$outboundSchema.optional(),
1239
- }).transform((v) => {
1240
- return remap$(v, {
1241
- encodingFormat: "encoding_format",
1242
- });
1243
- });
1244
-
1245
- /**
1246
- * @internal
1247
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1248
- */
1249
- export namespace CreatePromptVersionModelParameters$ {
1250
- /** @deprecated use `CreatePromptVersionModelParameters$inboundSchema` instead. */
1251
- export const inboundSchema = CreatePromptVersionModelParameters$inboundSchema;
1252
- /** @deprecated use `CreatePromptVersionModelParameters$outboundSchema` instead. */
1253
- export const outboundSchema =
1254
- CreatePromptVersionModelParameters$outboundSchema;
1255
- /** @deprecated use `CreatePromptVersionModelParameters$Outbound` instead. */
1256
- export type Outbound = CreatePromptVersionModelParameters$Outbound;
1257
- }
1258
-
1259
- export function createPromptVersionModelParametersToJSON(
1260
- createPromptVersionModelParameters: CreatePromptVersionModelParameters,
1261
- ): string {
1262
- return JSON.stringify(
1263
- CreatePromptVersionModelParameters$outboundSchema.parse(
1264
- createPromptVersionModelParameters,
1265
- ),
1266
- );
1267
- }
1268
-
1269
- export function createPromptVersionModelParametersFromJSON(
1270
- jsonString: string,
1271
- ): SafeParseResult<CreatePromptVersionModelParameters, SDKValidationError> {
1272
- return safeParse(
1273
- jsonString,
1274
- (x) =>
1275
- CreatePromptVersionModelParameters$inboundSchema.parse(JSON.parse(x)),
1276
- `Failed to parse 'CreatePromptVersionModelParameters' from JSON`,
1277
- );
1278
- }
1279
-
1280
- /** @internal */
1281
- export const CreatePromptVersionProvider$inboundSchema: z.ZodNativeEnum<
1282
- typeof CreatePromptVersionProvider
1283
- > = z.nativeEnum(CreatePromptVersionProvider);
1284
-
1285
- /** @internal */
1286
- export const CreatePromptVersionProvider$outboundSchema: z.ZodNativeEnum<
1287
- typeof CreatePromptVersionProvider
1288
- > = CreatePromptVersionProvider$inboundSchema;
1289
-
1290
- /**
1291
- * @internal
1292
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1293
- */
1294
- export namespace CreatePromptVersionProvider$ {
1295
- /** @deprecated use `CreatePromptVersionProvider$inboundSchema` instead. */
1296
- export const inboundSchema = CreatePromptVersionProvider$inboundSchema;
1297
- /** @deprecated use `CreatePromptVersionProvider$outboundSchema` instead. */
1298
- export const outboundSchema = CreatePromptVersionProvider$outboundSchema;
1299
- }
1300
-
1301
- /** @internal */
1302
- export const CreatePromptVersionRole$inboundSchema: z.ZodNativeEnum<
1303
- typeof CreatePromptVersionRole
1304
- > = z.nativeEnum(CreatePromptVersionRole);
1305
-
1306
- /** @internal */
1307
- export const CreatePromptVersionRole$outboundSchema: z.ZodNativeEnum<
1308
- typeof CreatePromptVersionRole
1309
- > = CreatePromptVersionRole$inboundSchema;
1310
-
1311
- /**
1312
- * @internal
1313
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1314
- */
1315
- export namespace CreatePromptVersionRole$ {
1316
- /** @deprecated use `CreatePromptVersionRole$inboundSchema` instead. */
1317
- export const inboundSchema = CreatePromptVersionRole$inboundSchema;
1318
- /** @deprecated use `CreatePromptVersionRole$outboundSchema` instead. */
1319
- export const outboundSchema = CreatePromptVersionRole$outboundSchema;
1320
- }
1321
-
1322
- /** @internal */
1323
- export const CreatePromptVersion2PromptsType$inboundSchema: z.ZodNativeEnum<
1324
- typeof CreatePromptVersion2PromptsType
1325
- > = z.nativeEnum(CreatePromptVersion2PromptsType);
1326
-
1327
- /** @internal */
1328
- export const CreatePromptVersion2PromptsType$outboundSchema: z.ZodNativeEnum<
1329
- typeof CreatePromptVersion2PromptsType
1330
- > = CreatePromptVersion2PromptsType$inboundSchema;
1331
-
1332
- /**
1333
- * @internal
1334
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1335
- */
1336
- export namespace CreatePromptVersion2PromptsType$ {
1337
- /** @deprecated use `CreatePromptVersion2PromptsType$inboundSchema` instead. */
1338
- export const inboundSchema = CreatePromptVersion2PromptsType$inboundSchema;
1339
- /** @deprecated use `CreatePromptVersion2PromptsType$outboundSchema` instead. */
1340
- export const outboundSchema = CreatePromptVersion2PromptsType$outboundSchema;
1341
- }
1342
-
1343
- /** @internal */
1344
- export const CreatePromptVersion2ImageUrl$inboundSchema: z.ZodType<
1345
- CreatePromptVersion2ImageUrl,
1346
- z.ZodTypeDef,
1347
- unknown
1348
- > = z.object({
1349
- url: z.string(),
1350
- detail: z.string().optional(),
1351
- });
1352
-
1353
- /** @internal */
1354
- export type CreatePromptVersion2ImageUrl$Outbound = {
1355
- url: string;
1356
- detail?: string | undefined;
1357
- };
1358
-
1359
- /** @internal */
1360
- export const CreatePromptVersion2ImageUrl$outboundSchema: z.ZodType<
1361
- CreatePromptVersion2ImageUrl$Outbound,
1362
- z.ZodTypeDef,
1363
- CreatePromptVersion2ImageUrl
1364
- > = z.object({
1365
- url: z.string(),
1366
- detail: z.string().optional(),
1367
- });
1368
-
1369
- /**
1370
- * @internal
1371
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1372
- */
1373
- export namespace CreatePromptVersion2ImageUrl$ {
1374
- /** @deprecated use `CreatePromptVersion2ImageUrl$inboundSchema` instead. */
1375
- export const inboundSchema = CreatePromptVersion2ImageUrl$inboundSchema;
1376
- /** @deprecated use `CreatePromptVersion2ImageUrl$outboundSchema` instead. */
1377
- export const outboundSchema = CreatePromptVersion2ImageUrl$outboundSchema;
1378
- /** @deprecated use `CreatePromptVersion2ImageUrl$Outbound` instead. */
1379
- export type Outbound = CreatePromptVersion2ImageUrl$Outbound;
1380
- }
1381
-
1382
- export function createPromptVersion2ImageUrlToJSON(
1383
- createPromptVersion2ImageUrl: CreatePromptVersion2ImageUrl,
1384
- ): string {
1385
- return JSON.stringify(
1386
- CreatePromptVersion2ImageUrl$outboundSchema.parse(
1387
- createPromptVersion2ImageUrl,
1388
- ),
1389
- );
1390
- }
1391
-
1392
- export function createPromptVersion2ImageUrlFromJSON(
1393
- jsonString: string,
1394
- ): SafeParseResult<CreatePromptVersion2ImageUrl, SDKValidationError> {
1395
- return safeParse(
1396
- jsonString,
1397
- (x) => CreatePromptVersion2ImageUrl$inboundSchema.parse(JSON.parse(x)),
1398
- `Failed to parse 'CreatePromptVersion2ImageUrl' from JSON`,
1399
- );
1400
- }
1401
-
1402
- /** @internal */
1403
- export const CreatePromptVersion22$inboundSchema: z.ZodType<
1404
- CreatePromptVersion22,
1405
- z.ZodTypeDef,
1406
- unknown
1407
- > = z.object({
1408
- type: CreatePromptVersion2PromptsType$inboundSchema,
1409
- image_url: z.lazy(() => CreatePromptVersion2ImageUrl$inboundSchema),
1410
- }).transform((v) => {
1411
- return remap$(v, {
1412
- "image_url": "imageUrl",
1413
- });
1414
- });
1415
-
1416
- /** @internal */
1417
- export type CreatePromptVersion22$Outbound = {
1418
- type: string;
1419
- image_url: CreatePromptVersion2ImageUrl$Outbound;
1420
- };
1421
-
1422
- /** @internal */
1423
- export const CreatePromptVersion22$outboundSchema: z.ZodType<
1424
- CreatePromptVersion22$Outbound,
1425
- z.ZodTypeDef,
1426
- CreatePromptVersion22
1427
- > = z.object({
1428
- type: CreatePromptVersion2PromptsType$outboundSchema,
1429
- imageUrl: z.lazy(() => CreatePromptVersion2ImageUrl$outboundSchema),
1430
- }).transform((v) => {
1431
- return remap$(v, {
1432
- imageUrl: "image_url",
1433
- });
1434
- });
1435
-
1436
- /**
1437
- * @internal
1438
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1439
- */
1440
- export namespace CreatePromptVersion22$ {
1441
- /** @deprecated use `CreatePromptVersion22$inboundSchema` instead. */
1442
- export const inboundSchema = CreatePromptVersion22$inboundSchema;
1443
- /** @deprecated use `CreatePromptVersion22$outboundSchema` instead. */
1444
- export const outboundSchema = CreatePromptVersion22$outboundSchema;
1445
- /** @deprecated use `CreatePromptVersion22$Outbound` instead. */
1446
- export type Outbound = CreatePromptVersion22$Outbound;
1447
- }
1448
-
1449
- export function createPromptVersion22ToJSON(
1450
- createPromptVersion22: CreatePromptVersion22,
1451
- ): string {
1452
- return JSON.stringify(
1453
- CreatePromptVersion22$outboundSchema.parse(createPromptVersion22),
1454
- );
1455
- }
1456
-
1457
- export function createPromptVersion22FromJSON(
1458
- jsonString: string,
1459
- ): SafeParseResult<CreatePromptVersion22, SDKValidationError> {
1460
- return safeParse(
1461
- jsonString,
1462
- (x) => CreatePromptVersion22$inboundSchema.parse(JSON.parse(x)),
1463
- `Failed to parse 'CreatePromptVersion22' from JSON`,
1464
- );
1465
- }
1466
-
1467
- /** @internal */
1468
- export const CreatePromptVersion2Type$inboundSchema: z.ZodNativeEnum<
1469
- typeof CreatePromptVersion2Type
1470
- > = z.nativeEnum(CreatePromptVersion2Type);
1471
-
1472
- /** @internal */
1473
- export const CreatePromptVersion2Type$outboundSchema: z.ZodNativeEnum<
1474
- typeof CreatePromptVersion2Type
1475
- > = CreatePromptVersion2Type$inboundSchema;
1476
-
1477
- /**
1478
- * @internal
1479
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1480
- */
1481
- export namespace CreatePromptVersion2Type$ {
1482
- /** @deprecated use `CreatePromptVersion2Type$inboundSchema` instead. */
1483
- export const inboundSchema = CreatePromptVersion2Type$inboundSchema;
1484
- /** @deprecated use `CreatePromptVersion2Type$outboundSchema` instead. */
1485
- export const outboundSchema = CreatePromptVersion2Type$outboundSchema;
1486
- }
1487
-
1488
- /** @internal */
1489
- export const CreatePromptVersion21$inboundSchema: z.ZodType<
1490
- CreatePromptVersion21,
1491
- z.ZodTypeDef,
1492
- unknown
1493
- > = z.object({
1494
- type: CreatePromptVersion2Type$inboundSchema,
1495
- text: z.string(),
1496
- });
1497
-
1498
- /** @internal */
1499
- export type CreatePromptVersion21$Outbound = {
1500
- type: string;
1501
- text: string;
1502
- };
1503
-
1504
- /** @internal */
1505
- export const CreatePromptVersion21$outboundSchema: z.ZodType<
1506
- CreatePromptVersion21$Outbound,
1507
- z.ZodTypeDef,
1508
- CreatePromptVersion21
1509
- > = z.object({
1510
- type: CreatePromptVersion2Type$outboundSchema,
1511
- text: z.string(),
1512
- });
1513
-
1514
- /**
1515
- * @internal
1516
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1517
- */
1518
- export namespace CreatePromptVersion21$ {
1519
- /** @deprecated use `CreatePromptVersion21$inboundSchema` instead. */
1520
- export const inboundSchema = CreatePromptVersion21$inboundSchema;
1521
- /** @deprecated use `CreatePromptVersion21$outboundSchema` instead. */
1522
- export const outboundSchema = CreatePromptVersion21$outboundSchema;
1523
- /** @deprecated use `CreatePromptVersion21$Outbound` instead. */
1524
- export type Outbound = CreatePromptVersion21$Outbound;
1525
- }
1526
-
1527
- export function createPromptVersion21ToJSON(
1528
- createPromptVersion21: CreatePromptVersion21,
1529
- ): string {
1530
- return JSON.stringify(
1531
- CreatePromptVersion21$outboundSchema.parse(createPromptVersion21),
1532
- );
1533
- }
1534
-
1535
- export function createPromptVersion21FromJSON(
1536
- jsonString: string,
1537
- ): SafeParseResult<CreatePromptVersion21, SDKValidationError> {
1538
- return safeParse(
1539
- jsonString,
1540
- (x) => CreatePromptVersion21$inboundSchema.parse(JSON.parse(x)),
1541
- `Failed to parse 'CreatePromptVersion21' from JSON`,
1542
- );
1543
- }
1544
-
1545
- /** @internal */
1546
- export const CreatePromptVersionContent2$inboundSchema: z.ZodType<
1547
- CreatePromptVersionContent2,
1548
- z.ZodTypeDef,
1549
- unknown
1550
- > = z.union([
1551
- z.lazy(() => CreatePromptVersion21$inboundSchema),
1552
- z.lazy(() => CreatePromptVersion22$inboundSchema),
1553
- ]);
1554
-
1555
- /** @internal */
1556
- export type CreatePromptVersionContent2$Outbound =
1557
- | CreatePromptVersion21$Outbound
1558
- | CreatePromptVersion22$Outbound;
1559
-
1560
- /** @internal */
1561
- export const CreatePromptVersionContent2$outboundSchema: z.ZodType<
1562
- CreatePromptVersionContent2$Outbound,
1563
- z.ZodTypeDef,
1564
- CreatePromptVersionContent2
1565
- > = z.union([
1566
- z.lazy(() => CreatePromptVersion21$outboundSchema),
1567
- z.lazy(() => CreatePromptVersion22$outboundSchema),
1568
- ]);
1569
-
1570
- /**
1571
- * @internal
1572
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1573
- */
1574
- export namespace CreatePromptVersionContent2$ {
1575
- /** @deprecated use `CreatePromptVersionContent2$inboundSchema` instead. */
1576
- export const inboundSchema = CreatePromptVersionContent2$inboundSchema;
1577
- /** @deprecated use `CreatePromptVersionContent2$outboundSchema` instead. */
1578
- export const outboundSchema = CreatePromptVersionContent2$outboundSchema;
1579
- /** @deprecated use `CreatePromptVersionContent2$Outbound` instead. */
1580
- export type Outbound = CreatePromptVersionContent2$Outbound;
1581
- }
1582
-
1583
- export function createPromptVersionContent2ToJSON(
1584
- createPromptVersionContent2: CreatePromptVersionContent2,
1585
- ): string {
1586
- return JSON.stringify(
1587
- CreatePromptVersionContent2$outboundSchema.parse(
1588
- createPromptVersionContent2,
1589
- ),
1590
- );
1591
- }
1592
-
1593
- export function createPromptVersionContent2FromJSON(
1594
- jsonString: string,
1595
- ): SafeParseResult<CreatePromptVersionContent2, SDKValidationError> {
1596
- return safeParse(
1597
- jsonString,
1598
- (x) => CreatePromptVersionContent2$inboundSchema.parse(JSON.parse(x)),
1599
- `Failed to parse 'CreatePromptVersionContent2' from JSON`,
1600
- );
1601
- }
1602
-
1603
- /** @internal */
1604
- export const CreatePromptVersionContent$inboundSchema: z.ZodType<
1605
- CreatePromptVersionContent,
1606
- z.ZodTypeDef,
1607
- unknown
1608
- > = z.union([
1609
- z.string(),
1610
- z.array(z.union([
1611
- z.lazy(() => CreatePromptVersion21$inboundSchema),
1612
- z.lazy(() => CreatePromptVersion22$inboundSchema),
1613
- ])),
1614
- ]);
1615
-
1616
- /** @internal */
1617
- export type CreatePromptVersionContent$Outbound =
1618
- | string
1619
- | Array<CreatePromptVersion21$Outbound | CreatePromptVersion22$Outbound>;
1620
-
1621
- /** @internal */
1622
- export const CreatePromptVersionContent$outboundSchema: z.ZodType<
1623
- CreatePromptVersionContent$Outbound,
1624
- z.ZodTypeDef,
1625
- CreatePromptVersionContent
1626
- > = z.union([
1627
- z.string(),
1628
- z.array(z.union([
1629
- z.lazy(() => CreatePromptVersion21$outboundSchema),
1630
- z.lazy(() => CreatePromptVersion22$outboundSchema),
1631
- ])),
1632
- ]);
1633
-
1634
- /**
1635
- * @internal
1636
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1637
- */
1638
- export namespace CreatePromptVersionContent$ {
1639
- /** @deprecated use `CreatePromptVersionContent$inboundSchema` instead. */
1640
- export const inboundSchema = CreatePromptVersionContent$inboundSchema;
1641
- /** @deprecated use `CreatePromptVersionContent$outboundSchema` instead. */
1642
- export const outboundSchema = CreatePromptVersionContent$outboundSchema;
1643
- /** @deprecated use `CreatePromptVersionContent$Outbound` instead. */
1644
- export type Outbound = CreatePromptVersionContent$Outbound;
1645
- }
1646
-
1647
- export function createPromptVersionContentToJSON(
1648
- createPromptVersionContent: CreatePromptVersionContent,
1649
- ): string {
1650
- return JSON.stringify(
1651
- CreatePromptVersionContent$outboundSchema.parse(createPromptVersionContent),
1652
- );
1653
- }
1654
-
1655
- export function createPromptVersionContentFromJSON(
1656
- jsonString: string,
1657
- ): SafeParseResult<CreatePromptVersionContent, SDKValidationError> {
1658
- return safeParse(
1659
- jsonString,
1660
- (x) => CreatePromptVersionContent$inboundSchema.parse(JSON.parse(x)),
1661
- `Failed to parse 'CreatePromptVersionContent' from JSON`,
1662
- );
1663
- }
1664
-
1665
- /** @internal */
1666
- export const CreatePromptVersionType$inboundSchema: z.ZodNativeEnum<
1667
- typeof CreatePromptVersionType
1668
- > = z.nativeEnum(CreatePromptVersionType);
1669
-
1670
- /** @internal */
1671
- export const CreatePromptVersionType$outboundSchema: z.ZodNativeEnum<
1672
- typeof CreatePromptVersionType
1673
- > = CreatePromptVersionType$inboundSchema;
1674
-
1675
- /**
1676
- * @internal
1677
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1678
- */
1679
- export namespace CreatePromptVersionType$ {
1680
- /** @deprecated use `CreatePromptVersionType$inboundSchema` instead. */
1681
- export const inboundSchema = CreatePromptVersionType$inboundSchema;
1682
- /** @deprecated use `CreatePromptVersionType$outboundSchema` instead. */
1683
- export const outboundSchema = CreatePromptVersionType$outboundSchema;
1684
- }
1685
-
1686
- /** @internal */
1687
- export const CreatePromptVersionFunction$inboundSchema: z.ZodType<
1688
- CreatePromptVersionFunction,
1689
- z.ZodTypeDef,
1690
- unknown
1691
- > = z.object({
1692
- name: z.string(),
1693
- arguments: z.string(),
1694
- });
1695
-
1696
- /** @internal */
1697
- export type CreatePromptVersionFunction$Outbound = {
1698
- name: string;
1699
- arguments: string;
1700
- };
1701
-
1702
- /** @internal */
1703
- export const CreatePromptVersionFunction$outboundSchema: z.ZodType<
1704
- CreatePromptVersionFunction$Outbound,
1705
- z.ZodTypeDef,
1706
- CreatePromptVersionFunction
1707
- > = z.object({
1708
- name: z.string(),
1709
- arguments: z.string(),
1710
- });
1711
-
1712
- /**
1713
- * @internal
1714
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1715
- */
1716
- export namespace CreatePromptVersionFunction$ {
1717
- /** @deprecated use `CreatePromptVersionFunction$inboundSchema` instead. */
1718
- export const inboundSchema = CreatePromptVersionFunction$inboundSchema;
1719
- /** @deprecated use `CreatePromptVersionFunction$outboundSchema` instead. */
1720
- export const outboundSchema = CreatePromptVersionFunction$outboundSchema;
1721
- /** @deprecated use `CreatePromptVersionFunction$Outbound` instead. */
1722
- export type Outbound = CreatePromptVersionFunction$Outbound;
1723
- }
1724
-
1725
- export function createPromptVersionFunctionToJSON(
1726
- createPromptVersionFunction: CreatePromptVersionFunction,
1727
- ): string {
1728
- return JSON.stringify(
1729
- CreatePromptVersionFunction$outboundSchema.parse(
1730
- createPromptVersionFunction,
1731
- ),
1732
- );
1733
- }
1734
-
1735
- export function createPromptVersionFunctionFromJSON(
1736
- jsonString: string,
1737
- ): SafeParseResult<CreatePromptVersionFunction, SDKValidationError> {
1738
- return safeParse(
1739
- jsonString,
1740
- (x) => CreatePromptVersionFunction$inboundSchema.parse(JSON.parse(x)),
1741
- `Failed to parse 'CreatePromptVersionFunction' from JSON`,
1742
- );
1743
- }
1744
-
1745
- /** @internal */
1746
- export const CreatePromptVersionToolCalls$inboundSchema: z.ZodType<
1747
- CreatePromptVersionToolCalls,
1748
- z.ZodTypeDef,
1749
- unknown
1750
- > = z.object({
1751
- id: z.string().optional(),
1752
- index: z.number().optional(),
1753
- type: CreatePromptVersionType$inboundSchema,
1754
- function: z.lazy(() => CreatePromptVersionFunction$inboundSchema),
1755
- });
1756
-
1757
- /** @internal */
1758
- export type CreatePromptVersionToolCalls$Outbound = {
1759
- id?: string | undefined;
1760
- index?: number | undefined;
1761
- type: string;
1762
- function: CreatePromptVersionFunction$Outbound;
1763
- };
1764
-
1765
- /** @internal */
1766
- export const CreatePromptVersionToolCalls$outboundSchema: z.ZodType<
1767
- CreatePromptVersionToolCalls$Outbound,
1768
- z.ZodTypeDef,
1769
- CreatePromptVersionToolCalls
1770
- > = z.object({
1771
- id: z.string().optional(),
1772
- index: z.number().optional(),
1773
- type: CreatePromptVersionType$outboundSchema,
1774
- function: z.lazy(() => CreatePromptVersionFunction$outboundSchema),
1775
- });
1776
-
1777
- /**
1778
- * @internal
1779
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1780
- */
1781
- export namespace CreatePromptVersionToolCalls$ {
1782
- /** @deprecated use `CreatePromptVersionToolCalls$inboundSchema` instead. */
1783
- export const inboundSchema = CreatePromptVersionToolCalls$inboundSchema;
1784
- /** @deprecated use `CreatePromptVersionToolCalls$outboundSchema` instead. */
1785
- export const outboundSchema = CreatePromptVersionToolCalls$outboundSchema;
1786
- /** @deprecated use `CreatePromptVersionToolCalls$Outbound` instead. */
1787
- export type Outbound = CreatePromptVersionToolCalls$Outbound;
1788
- }
1789
-
1790
- export function createPromptVersionToolCallsToJSON(
1791
- createPromptVersionToolCalls: CreatePromptVersionToolCalls,
1792
- ): string {
1793
- return JSON.stringify(
1794
- CreatePromptVersionToolCalls$outboundSchema.parse(
1795
- createPromptVersionToolCalls,
1796
- ),
1797
- );
1798
- }
1799
-
1800
- export function createPromptVersionToolCallsFromJSON(
1801
- jsonString: string,
1802
- ): SafeParseResult<CreatePromptVersionToolCalls, SDKValidationError> {
1803
- return safeParse(
1804
- jsonString,
1805
- (x) => CreatePromptVersionToolCalls$inboundSchema.parse(JSON.parse(x)),
1806
- `Failed to parse 'CreatePromptVersionToolCalls' from JSON`,
1807
- );
1808
- }
1809
-
1810
- /** @internal */
1811
- export const CreatePromptVersionMessages$inboundSchema: z.ZodType<
1812
- CreatePromptVersionMessages,
1813
- z.ZodTypeDef,
1814
- unknown
1815
- > = z.object({
1816
- role: CreatePromptVersionRole$inboundSchema,
1817
- content: z.union([
1818
- z.string(),
1819
- z.array(z.union([
1820
- z.lazy(() => CreatePromptVersion21$inboundSchema),
1821
- z.lazy(() => CreatePromptVersion22$inboundSchema),
1822
- ])),
1823
- ]),
1824
- tool_calls: z.array(z.lazy(() => CreatePromptVersionToolCalls$inboundSchema))
1825
- .optional(),
1826
- }).transform((v) => {
1827
- return remap$(v, {
1828
- "tool_calls": "toolCalls",
1829
- });
1830
- });
1831
-
1832
- /** @internal */
1833
- export type CreatePromptVersionMessages$Outbound = {
1834
- role: string;
1835
- content:
1836
- | string
1837
- | Array<CreatePromptVersion21$Outbound | CreatePromptVersion22$Outbound>;
1838
- tool_calls?: Array<CreatePromptVersionToolCalls$Outbound> | undefined;
1839
- };
1840
-
1841
- /** @internal */
1842
- export const CreatePromptVersionMessages$outboundSchema: z.ZodType<
1843
- CreatePromptVersionMessages$Outbound,
1844
- z.ZodTypeDef,
1845
- CreatePromptVersionMessages
1846
- > = z.object({
1847
- role: CreatePromptVersionRole$outboundSchema,
1848
- content: z.union([
1849
- z.string(),
1850
- z.array(z.union([
1851
- z.lazy(() => CreatePromptVersion21$outboundSchema),
1852
- z.lazy(() => CreatePromptVersion22$outboundSchema),
1853
- ])),
1854
- ]),
1855
- toolCalls: z.array(z.lazy(() => CreatePromptVersionToolCalls$outboundSchema))
1856
- .optional(),
1857
- }).transform((v) => {
1858
- return remap$(v, {
1859
- toolCalls: "tool_calls",
1860
- });
1861
- });
1862
-
1863
- /**
1864
- * @internal
1865
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1866
- */
1867
- export namespace CreatePromptVersionMessages$ {
1868
- /** @deprecated use `CreatePromptVersionMessages$inboundSchema` instead. */
1869
- export const inboundSchema = CreatePromptVersionMessages$inboundSchema;
1870
- /** @deprecated use `CreatePromptVersionMessages$outboundSchema` instead. */
1871
- export const outboundSchema = CreatePromptVersionMessages$outboundSchema;
1872
- /** @deprecated use `CreatePromptVersionMessages$Outbound` instead. */
1873
- export type Outbound = CreatePromptVersionMessages$Outbound;
1874
- }
1875
-
1876
- export function createPromptVersionMessagesToJSON(
1877
- createPromptVersionMessages: CreatePromptVersionMessages,
1878
- ): string {
1879
- return JSON.stringify(
1880
- CreatePromptVersionMessages$outboundSchema.parse(
1881
- createPromptVersionMessages,
1882
- ),
1883
- );
1884
- }
1885
-
1886
- export function createPromptVersionMessagesFromJSON(
1887
- jsonString: string,
1888
- ): SafeParseResult<CreatePromptVersionMessages, SDKValidationError> {
1889
- return safeParse(
1890
- jsonString,
1891
- (x) => CreatePromptVersionMessages$inboundSchema.parse(JSON.parse(x)),
1892
- `Failed to parse 'CreatePromptVersionMessages' from JSON`,
1893
- );
1894
- }
1895
-
1896
- /** @internal */
1897
- export const CreatePromptVersionPromptConfig$inboundSchema: z.ZodType<
1898
- CreatePromptVersionPromptConfig,
1899
- z.ZodTypeDef,
1900
- unknown
1901
- > = z.object({
1902
- stream: z.boolean().optional(),
1903
- model: z.string().optional(),
1904
- model_type: CreatePromptVersionModelType$inboundSchema.optional(),
1905
- model_parameters: z.lazy(() =>
1906
- CreatePromptVersionModelParameters$inboundSchema
1907
- ).optional(),
1908
- provider: CreatePromptVersionProvider$inboundSchema.optional(),
1909
- version: z.string().optional(),
1910
- messages: z.array(z.lazy(() => CreatePromptVersionMessages$inboundSchema)),
1911
- }).transform((v) => {
1912
- return remap$(v, {
1913
- "model_type": "modelType",
1914
- "model_parameters": "modelParameters",
1915
- });
1916
- });
1917
-
1918
- /** @internal */
1919
- export type CreatePromptVersionPromptConfig$Outbound = {
1920
- stream?: boolean | undefined;
1921
- model?: string | undefined;
1922
- model_type?: string | undefined;
1923
- model_parameters?: CreatePromptVersionModelParameters$Outbound | undefined;
1924
- provider?: string | undefined;
1925
- version?: string | undefined;
1926
- messages: Array<CreatePromptVersionMessages$Outbound>;
1927
- };
1928
-
1929
- /** @internal */
1930
- export const CreatePromptVersionPromptConfig$outboundSchema: z.ZodType<
1931
- CreatePromptVersionPromptConfig$Outbound,
1932
- z.ZodTypeDef,
1933
- CreatePromptVersionPromptConfig
1934
- > = z.object({
1935
- stream: z.boolean().optional(),
1936
- model: z.string().optional(),
1937
- modelType: CreatePromptVersionModelType$outboundSchema.optional(),
1938
- modelParameters: z.lazy(() =>
1939
- CreatePromptVersionModelParameters$outboundSchema
1940
- ).optional(),
1941
- provider: CreatePromptVersionProvider$outboundSchema.optional(),
1942
- version: z.string().optional(),
1943
- messages: z.array(z.lazy(() => CreatePromptVersionMessages$outboundSchema)),
1944
- }).transform((v) => {
1945
- return remap$(v, {
1946
- modelType: "model_type",
1947
- modelParameters: "model_parameters",
1948
- });
1949
- });
1950
-
1951
- /**
1952
- * @internal
1953
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1954
- */
1955
- export namespace CreatePromptVersionPromptConfig$ {
1956
- /** @deprecated use `CreatePromptVersionPromptConfig$inboundSchema` instead. */
1957
- export const inboundSchema = CreatePromptVersionPromptConfig$inboundSchema;
1958
- /** @deprecated use `CreatePromptVersionPromptConfig$outboundSchema` instead. */
1959
- export const outboundSchema = CreatePromptVersionPromptConfig$outboundSchema;
1960
- /** @deprecated use `CreatePromptVersionPromptConfig$Outbound` instead. */
1961
- export type Outbound = CreatePromptVersionPromptConfig$Outbound;
1962
- }
1963
-
1964
- export function createPromptVersionPromptConfigToJSON(
1965
- createPromptVersionPromptConfig: CreatePromptVersionPromptConfig,
1966
- ): string {
1967
- return JSON.stringify(
1968
- CreatePromptVersionPromptConfig$outboundSchema.parse(
1969
- createPromptVersionPromptConfig,
1970
- ),
1971
- );
1972
- }
1973
-
1974
- export function createPromptVersionPromptConfigFromJSON(
1975
- jsonString: string,
1976
- ): SafeParseResult<CreatePromptVersionPromptConfig, SDKValidationError> {
1977
- return safeParse(
1978
- jsonString,
1979
- (x) => CreatePromptVersionPromptConfig$inboundSchema.parse(JSON.parse(x)),
1980
- `Failed to parse 'CreatePromptVersionPromptConfig' from JSON`,
1981
- );
1982
- }
1983
-
1984
- /** @internal */
1985
- export const CreatePromptVersionMetadata$inboundSchema: z.ZodType<
1986
- CreatePromptVersionMetadata,
1987
- z.ZodTypeDef,
1988
- unknown
1989
- > = z.object({
1990
- use_cases: z.array(z.string()).optional(),
1991
- language: z.string().optional(),
1992
- }).transform((v) => {
1993
- return remap$(v, {
1994
- "use_cases": "useCases",
1995
- });
1996
- });
1997
-
1998
- /** @internal */
1999
- export type CreatePromptVersionMetadata$Outbound = {
2000
- use_cases?: Array<string> | undefined;
2001
- language?: string | undefined;
2002
- };
2003
-
2004
- /** @internal */
2005
- export const CreatePromptVersionMetadata$outboundSchema: z.ZodType<
2006
- CreatePromptVersionMetadata$Outbound,
2007
- z.ZodTypeDef,
2008
- CreatePromptVersionMetadata
2009
- > = z.object({
2010
- useCases: z.array(z.string()).optional(),
2011
- language: z.string().optional(),
2012
- }).transform((v) => {
2013
- return remap$(v, {
2014
- useCases: "use_cases",
2015
- });
2016
- });
2017
-
2018
- /**
2019
- * @internal
2020
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2021
- */
2022
- export namespace CreatePromptVersionMetadata$ {
2023
- /** @deprecated use `CreatePromptVersionMetadata$inboundSchema` instead. */
2024
- export const inboundSchema = CreatePromptVersionMetadata$inboundSchema;
2025
- /** @deprecated use `CreatePromptVersionMetadata$outboundSchema` instead. */
2026
- export const outboundSchema = CreatePromptVersionMetadata$outboundSchema;
2027
- /** @deprecated use `CreatePromptVersionMetadata$Outbound` instead. */
2028
- export type Outbound = CreatePromptVersionMetadata$Outbound;
2029
- }
2030
-
2031
- export function createPromptVersionMetadataToJSON(
2032
- createPromptVersionMetadata: CreatePromptVersionMetadata,
2033
- ): string {
2034
- return JSON.stringify(
2035
- CreatePromptVersionMetadata$outboundSchema.parse(
2036
- createPromptVersionMetadata,
2037
- ),
2038
- );
2039
- }
2040
-
2041
- export function createPromptVersionMetadataFromJSON(
2042
- jsonString: string,
2043
- ): SafeParseResult<CreatePromptVersionMetadata, SDKValidationError> {
2044
- return safeParse(
2045
- jsonString,
2046
- (x) => CreatePromptVersionMetadata$inboundSchema.parse(JSON.parse(x)),
2047
- `Failed to parse 'CreatePromptVersionMetadata' from JSON`,
2048
- );
2049
- }
2050
-
2051
- /** @internal */
2052
- export const CreatePromptVersionRequestBody$inboundSchema: z.ZodType<
2053
- CreatePromptVersionRequestBody,
2054
- z.ZodTypeDef,
2055
- unknown
2056
- > = z.object({
2057
- display_name: z.string(),
2058
- description: z.nullable(z.string()).optional(),
2059
- prompt_config: z.lazy(() => CreatePromptVersionPromptConfig$inboundSchema),
2060
- metadata: z.lazy(() => CreatePromptVersionMetadata$inboundSchema),
2061
- commit: z.string(),
2062
- timestamp: z.string(),
2063
- }).transform((v) => {
2064
- return remap$(v, {
2065
- "display_name": "displayName",
2066
- "prompt_config": "promptConfig",
2067
- });
2068
- });
2069
-
2070
- /** @internal */
2071
- export type CreatePromptVersionRequestBody$Outbound = {
2072
- display_name: string;
2073
- description?: string | null | undefined;
2074
- prompt_config: CreatePromptVersionPromptConfig$Outbound;
2075
- metadata: CreatePromptVersionMetadata$Outbound;
2076
- commit: string;
2077
- timestamp: string;
2078
- };
2079
-
2080
- /** @internal */
2081
- export const CreatePromptVersionRequestBody$outboundSchema: z.ZodType<
2082
- CreatePromptVersionRequestBody$Outbound,
2083
- z.ZodTypeDef,
2084
- CreatePromptVersionRequestBody
2085
- > = z.object({
2086
- displayName: z.string(),
2087
- description: z.nullable(z.string()).optional(),
2088
- promptConfig: z.lazy(() => CreatePromptVersionPromptConfig$outboundSchema),
2089
- metadata: z.lazy(() => CreatePromptVersionMetadata$outboundSchema),
2090
- commit: z.string(),
2091
- timestamp: z.string(),
2092
- }).transform((v) => {
2093
- return remap$(v, {
2094
- displayName: "display_name",
2095
- promptConfig: "prompt_config",
2096
- });
2097
- });
2098
-
2099
- /**
2100
- * @internal
2101
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2102
- */
2103
- export namespace CreatePromptVersionRequestBody$ {
2104
- /** @deprecated use `CreatePromptVersionRequestBody$inboundSchema` instead. */
2105
- export const inboundSchema = CreatePromptVersionRequestBody$inboundSchema;
2106
- /** @deprecated use `CreatePromptVersionRequestBody$outboundSchema` instead. */
2107
- export const outboundSchema = CreatePromptVersionRequestBody$outboundSchema;
2108
- /** @deprecated use `CreatePromptVersionRequestBody$Outbound` instead. */
2109
- export type Outbound = CreatePromptVersionRequestBody$Outbound;
2110
- }
2111
-
2112
- export function createPromptVersionRequestBodyToJSON(
2113
- createPromptVersionRequestBody: CreatePromptVersionRequestBody,
2114
- ): string {
2115
- return JSON.stringify(
2116
- CreatePromptVersionRequestBody$outboundSchema.parse(
2117
- createPromptVersionRequestBody,
2118
- ),
2119
- );
2120
- }
2121
-
2122
- export function createPromptVersionRequestBodyFromJSON(
2123
- jsonString: string,
2124
- ): SafeParseResult<CreatePromptVersionRequestBody, SDKValidationError> {
2125
- return safeParse(
2126
- jsonString,
2127
- (x) => CreatePromptVersionRequestBody$inboundSchema.parse(JSON.parse(x)),
2128
- `Failed to parse 'CreatePromptVersionRequestBody' from JSON`,
2129
- );
2130
- }
2131
-
2132
- /** @internal */
2133
- export const CreatePromptVersionRequest$inboundSchema: z.ZodType<
2134
- CreatePromptVersionRequest,
2135
- z.ZodTypeDef,
2136
- unknown
2137
- > = z.object({
2138
- id: z.string(),
2139
- RequestBody: z.lazy(() => CreatePromptVersionRequestBody$inboundSchema)
2140
- .optional(),
2141
- }).transform((v) => {
2142
- return remap$(v, {
2143
- "RequestBody": "requestBody",
2144
- });
2145
- });
2146
-
2147
- /** @internal */
2148
- export type CreatePromptVersionRequest$Outbound = {
2149
- id: string;
2150
- RequestBody?: CreatePromptVersionRequestBody$Outbound | undefined;
2151
- };
2152
-
2153
- /** @internal */
2154
- export const CreatePromptVersionRequest$outboundSchema: z.ZodType<
2155
- CreatePromptVersionRequest$Outbound,
2156
- z.ZodTypeDef,
2157
- CreatePromptVersionRequest
2158
- > = z.object({
2159
- id: z.string(),
2160
- requestBody: z.lazy(() => CreatePromptVersionRequestBody$outboundSchema)
2161
- .optional(),
2162
- }).transform((v) => {
2163
- return remap$(v, {
2164
- requestBody: "RequestBody",
2165
- });
2166
- });
2167
-
2168
- /**
2169
- * @internal
2170
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2171
- */
2172
- export namespace CreatePromptVersionRequest$ {
2173
- /** @deprecated use `CreatePromptVersionRequest$inboundSchema` instead. */
2174
- export const inboundSchema = CreatePromptVersionRequest$inboundSchema;
2175
- /** @deprecated use `CreatePromptVersionRequest$outboundSchema` instead. */
2176
- export const outboundSchema = CreatePromptVersionRequest$outboundSchema;
2177
- /** @deprecated use `CreatePromptVersionRequest$Outbound` instead. */
2178
- export type Outbound = CreatePromptVersionRequest$Outbound;
2179
- }
2180
-
2181
- export function createPromptVersionRequestToJSON(
2182
- createPromptVersionRequest: CreatePromptVersionRequest,
2183
- ): string {
2184
- return JSON.stringify(
2185
- CreatePromptVersionRequest$outboundSchema.parse(createPromptVersionRequest),
2186
- );
2187
- }
2188
-
2189
- export function createPromptVersionRequestFromJSON(
2190
- jsonString: string,
2191
- ): SafeParseResult<CreatePromptVersionRequest, SDKValidationError> {
2192
- return safeParse(
2193
- jsonString,
2194
- (x) => CreatePromptVersionRequest$inboundSchema.parse(JSON.parse(x)),
2195
- `Failed to parse 'CreatePromptVersionRequest' from JSON`,
2196
- );
2197
- }
2198
-
2199
- /** @internal */
2200
- export const CreatePromptVersionPromptsModelType$inboundSchema: z.ZodNativeEnum<
2201
- typeof CreatePromptVersionPromptsModelType
2202
- > = z.nativeEnum(CreatePromptVersionPromptsModelType);
2203
-
2204
- /** @internal */
2205
- export const CreatePromptVersionPromptsModelType$outboundSchema:
2206
- z.ZodNativeEnum<typeof CreatePromptVersionPromptsModelType> =
2207
- CreatePromptVersionPromptsModelType$inboundSchema;
2208
-
2209
- /**
2210
- * @internal
2211
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2212
- */
2213
- export namespace CreatePromptVersionPromptsModelType$ {
2214
- /** @deprecated use `CreatePromptVersionPromptsModelType$inboundSchema` instead. */
2215
- export const inboundSchema =
2216
- CreatePromptVersionPromptsModelType$inboundSchema;
2217
- /** @deprecated use `CreatePromptVersionPromptsModelType$outboundSchema` instead. */
2218
- export const outboundSchema =
2219
- CreatePromptVersionPromptsModelType$outboundSchema;
2220
- }
2221
-
2222
- /** @internal */
2223
- export const CreatePromptVersionPromptsFormat$inboundSchema: z.ZodNativeEnum<
2224
- typeof CreatePromptVersionPromptsFormat
2225
- > = z.nativeEnum(CreatePromptVersionPromptsFormat);
2226
-
2227
- /** @internal */
2228
- export const CreatePromptVersionPromptsFormat$outboundSchema: z.ZodNativeEnum<
2229
- typeof CreatePromptVersionPromptsFormat
2230
- > = CreatePromptVersionPromptsFormat$inboundSchema;
2231
-
2232
- /**
2233
- * @internal
2234
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2235
- */
2236
- export namespace CreatePromptVersionPromptsFormat$ {
2237
- /** @deprecated use `CreatePromptVersionPromptsFormat$inboundSchema` instead. */
2238
- export const inboundSchema = CreatePromptVersionPromptsFormat$inboundSchema;
2239
- /** @deprecated use `CreatePromptVersionPromptsFormat$outboundSchema` instead. */
2240
- export const outboundSchema = CreatePromptVersionPromptsFormat$outboundSchema;
2241
- }
2242
-
2243
- /** @internal */
2244
- export const CreatePromptVersionPromptsQuality$inboundSchema: z.ZodNativeEnum<
2245
- typeof CreatePromptVersionPromptsQuality
2246
- > = z.nativeEnum(CreatePromptVersionPromptsQuality);
2247
-
2248
- /** @internal */
2249
- export const CreatePromptVersionPromptsQuality$outboundSchema: z.ZodNativeEnum<
2250
- typeof CreatePromptVersionPromptsQuality
2251
- > = CreatePromptVersionPromptsQuality$inboundSchema;
2252
-
2253
- /**
2254
- * @internal
2255
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2256
- */
2257
- export namespace CreatePromptVersionPromptsQuality$ {
2258
- /** @deprecated use `CreatePromptVersionPromptsQuality$inboundSchema` instead. */
2259
- export const inboundSchema = CreatePromptVersionPromptsQuality$inboundSchema;
2260
- /** @deprecated use `CreatePromptVersionPromptsQuality$outboundSchema` instead. */
2261
- export const outboundSchema =
2262
- CreatePromptVersionPromptsQuality$outboundSchema;
2263
- }
2264
-
2265
- /** @internal */
2266
- export const CreatePromptVersionResponseFormatPromptsResponse200Type$inboundSchema:
2267
- z.ZodNativeEnum<
2268
- typeof CreatePromptVersionResponseFormatPromptsResponse200Type
2269
- > = z.nativeEnum(CreatePromptVersionResponseFormatPromptsResponse200Type);
2270
-
2271
- /** @internal */
2272
- export const CreatePromptVersionResponseFormatPromptsResponse200Type$outboundSchema:
2273
- z.ZodNativeEnum<
2274
- typeof CreatePromptVersionResponseFormatPromptsResponse200Type
2275
- > = CreatePromptVersionResponseFormatPromptsResponse200Type$inboundSchema;
2276
-
2277
- /**
2278
- * @internal
2279
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2280
- */
2281
- export namespace CreatePromptVersionResponseFormatPromptsResponse200Type$ {
2282
- /** @deprecated use `CreatePromptVersionResponseFormatPromptsResponse200Type$inboundSchema` instead. */
2283
- export const inboundSchema =
2284
- CreatePromptVersionResponseFormatPromptsResponse200Type$inboundSchema;
2285
- /** @deprecated use `CreatePromptVersionResponseFormatPromptsResponse200Type$outboundSchema` instead. */
2286
- export const outboundSchema =
2287
- CreatePromptVersionResponseFormatPromptsResponse200Type$outboundSchema;
2288
- }
2289
-
2290
- /** @internal */
2291
- export const CreatePromptVersionResponseFormatPrompts2$inboundSchema: z.ZodType<
2292
- CreatePromptVersionResponseFormatPrompts2,
2293
- z.ZodTypeDef,
2294
- unknown
2295
- > = z.object({
2296
- type: CreatePromptVersionResponseFormatPromptsResponse200Type$inboundSchema,
2297
- });
2298
-
2299
- /** @internal */
2300
- export type CreatePromptVersionResponseFormatPrompts2$Outbound = {
2301
- type: string;
2302
- };
2303
-
2304
- /** @internal */
2305
- export const CreatePromptVersionResponseFormatPrompts2$outboundSchema:
2306
- z.ZodType<
2307
- CreatePromptVersionResponseFormatPrompts2$Outbound,
2308
- z.ZodTypeDef,
2309
- CreatePromptVersionResponseFormatPrompts2
2310
- > = z.object({
2311
- type:
2312
- CreatePromptVersionResponseFormatPromptsResponse200Type$outboundSchema,
2313
- });
2314
-
2315
- /**
2316
- * @internal
2317
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2318
- */
2319
- export namespace CreatePromptVersionResponseFormatPrompts2$ {
2320
- /** @deprecated use `CreatePromptVersionResponseFormatPrompts2$inboundSchema` instead. */
2321
- export const inboundSchema =
2322
- CreatePromptVersionResponseFormatPrompts2$inboundSchema;
2323
- /** @deprecated use `CreatePromptVersionResponseFormatPrompts2$outboundSchema` instead. */
2324
- export const outboundSchema =
2325
- CreatePromptVersionResponseFormatPrompts2$outboundSchema;
2326
- /** @deprecated use `CreatePromptVersionResponseFormatPrompts2$Outbound` instead. */
2327
- export type Outbound = CreatePromptVersionResponseFormatPrompts2$Outbound;
2328
- }
2329
-
2330
- export function createPromptVersionResponseFormatPrompts2ToJSON(
2331
- createPromptVersionResponseFormatPrompts2:
2332
- CreatePromptVersionResponseFormatPrompts2,
2333
- ): string {
2334
- return JSON.stringify(
2335
- CreatePromptVersionResponseFormatPrompts2$outboundSchema.parse(
2336
- createPromptVersionResponseFormatPrompts2,
2337
- ),
2338
- );
2339
- }
2340
-
2341
- export function createPromptVersionResponseFormatPrompts2FromJSON(
2342
- jsonString: string,
2343
- ): SafeParseResult<
2344
- CreatePromptVersionResponseFormatPrompts2,
2345
- SDKValidationError
2346
- > {
2347
- return safeParse(
2348
- jsonString,
2349
- (x) =>
2350
- CreatePromptVersionResponseFormatPrompts2$inboundSchema.parse(
2351
- JSON.parse(x),
2352
- ),
2353
- `Failed to parse 'CreatePromptVersionResponseFormatPrompts2' from JSON`,
2354
- );
2355
- }
2356
-
2357
- /** @internal */
2358
- export const CreatePromptVersionResponseFormatPromptsResponseType$inboundSchema:
2359
- z.ZodNativeEnum<typeof CreatePromptVersionResponseFormatPromptsResponseType> =
2360
- z.nativeEnum(CreatePromptVersionResponseFormatPromptsResponseType);
2361
-
2362
- /** @internal */
2363
- export const CreatePromptVersionResponseFormatPromptsResponseType$outboundSchema:
2364
- z.ZodNativeEnum<typeof CreatePromptVersionResponseFormatPromptsResponseType> =
2365
- CreatePromptVersionResponseFormatPromptsResponseType$inboundSchema;
2366
-
2367
- /**
2368
- * @internal
2369
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2370
- */
2371
- export namespace CreatePromptVersionResponseFormatPromptsResponseType$ {
2372
- /** @deprecated use `CreatePromptVersionResponseFormatPromptsResponseType$inboundSchema` instead. */
2373
- export const inboundSchema =
2374
- CreatePromptVersionResponseFormatPromptsResponseType$inboundSchema;
2375
- /** @deprecated use `CreatePromptVersionResponseFormatPromptsResponseType$outboundSchema` instead. */
2376
- export const outboundSchema =
2377
- CreatePromptVersionResponseFormatPromptsResponseType$outboundSchema;
2378
- }
2379
-
2380
- /** @internal */
2381
- export const CreatePromptVersionResponseFormatJsonSchema$inboundSchema:
2382
- z.ZodType<
2383
- CreatePromptVersionResponseFormatJsonSchema,
2384
- z.ZodTypeDef,
2385
- unknown
2386
- > = z.object({
2387
- name: z.string(),
2388
- strict: z.boolean(),
2389
- schema: z.record(z.any()),
2390
- });
2391
-
2392
- /** @internal */
2393
- export type CreatePromptVersionResponseFormatJsonSchema$Outbound = {
2394
- name: string;
2395
- strict: boolean;
2396
- schema: { [k: string]: any };
2397
- };
2398
-
2399
- /** @internal */
2400
- export const CreatePromptVersionResponseFormatJsonSchema$outboundSchema:
2401
- z.ZodType<
2402
- CreatePromptVersionResponseFormatJsonSchema$Outbound,
2403
- z.ZodTypeDef,
2404
- CreatePromptVersionResponseFormatJsonSchema
2405
- > = z.object({
2406
- name: z.string(),
2407
- strict: z.boolean(),
2408
- schema: z.record(z.any()),
2409
- });
2410
-
2411
- /**
2412
- * @internal
2413
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2414
- */
2415
- export namespace CreatePromptVersionResponseFormatJsonSchema$ {
2416
- /** @deprecated use `CreatePromptVersionResponseFormatJsonSchema$inboundSchema` instead. */
2417
- export const inboundSchema =
2418
- CreatePromptVersionResponseFormatJsonSchema$inboundSchema;
2419
- /** @deprecated use `CreatePromptVersionResponseFormatJsonSchema$outboundSchema` instead. */
2420
- export const outboundSchema =
2421
- CreatePromptVersionResponseFormatJsonSchema$outboundSchema;
2422
- /** @deprecated use `CreatePromptVersionResponseFormatJsonSchema$Outbound` instead. */
2423
- export type Outbound = CreatePromptVersionResponseFormatJsonSchema$Outbound;
2424
- }
2425
-
2426
- export function createPromptVersionResponseFormatJsonSchemaToJSON(
2427
- createPromptVersionResponseFormatJsonSchema:
2428
- CreatePromptVersionResponseFormatJsonSchema,
2429
- ): string {
2430
- return JSON.stringify(
2431
- CreatePromptVersionResponseFormatJsonSchema$outboundSchema.parse(
2432
- createPromptVersionResponseFormatJsonSchema,
2433
- ),
2434
- );
2435
- }
2436
-
2437
- export function createPromptVersionResponseFormatJsonSchemaFromJSON(
2438
- jsonString: string,
2439
- ): SafeParseResult<
2440
- CreatePromptVersionResponseFormatJsonSchema,
2441
- SDKValidationError
2442
- > {
2443
- return safeParse(
2444
- jsonString,
2445
- (x) =>
2446
- CreatePromptVersionResponseFormatJsonSchema$inboundSchema.parse(
2447
- JSON.parse(x),
2448
- ),
2449
- `Failed to parse 'CreatePromptVersionResponseFormatJsonSchema' from JSON`,
2450
- );
2451
- }
2452
-
2453
- /** @internal */
2454
- export const CreatePromptVersionResponseFormatPrompts1$inboundSchema: z.ZodType<
2455
- CreatePromptVersionResponseFormatPrompts1,
2456
- z.ZodTypeDef,
2457
- unknown
2458
- > = z.object({
2459
- type: CreatePromptVersionResponseFormatPromptsResponseType$inboundSchema,
2460
- json_schema: z.lazy(() =>
2461
- CreatePromptVersionResponseFormatJsonSchema$inboundSchema
2462
- ),
2463
- }).transform((v) => {
2464
- return remap$(v, {
2465
- "json_schema": "jsonSchema",
2466
- });
2467
- });
2468
-
2469
- /** @internal */
2470
- export type CreatePromptVersionResponseFormatPrompts1$Outbound = {
2471
- type: string;
2472
- json_schema: CreatePromptVersionResponseFormatJsonSchema$Outbound;
2473
- };
2474
-
2475
- /** @internal */
2476
- export const CreatePromptVersionResponseFormatPrompts1$outboundSchema:
2477
- z.ZodType<
2478
- CreatePromptVersionResponseFormatPrompts1$Outbound,
2479
- z.ZodTypeDef,
2480
- CreatePromptVersionResponseFormatPrompts1
2481
- > = z.object({
2482
- type: CreatePromptVersionResponseFormatPromptsResponseType$outboundSchema,
2483
- jsonSchema: z.lazy(() =>
2484
- CreatePromptVersionResponseFormatJsonSchema$outboundSchema
2485
- ),
2486
- }).transform((v) => {
2487
- return remap$(v, {
2488
- jsonSchema: "json_schema",
2489
- });
2490
- });
2491
-
2492
- /**
2493
- * @internal
2494
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2495
- */
2496
- export namespace CreatePromptVersionResponseFormatPrompts1$ {
2497
- /** @deprecated use `CreatePromptVersionResponseFormatPrompts1$inboundSchema` instead. */
2498
- export const inboundSchema =
2499
- CreatePromptVersionResponseFormatPrompts1$inboundSchema;
2500
- /** @deprecated use `CreatePromptVersionResponseFormatPrompts1$outboundSchema` instead. */
2501
- export const outboundSchema =
2502
- CreatePromptVersionResponseFormatPrompts1$outboundSchema;
2503
- /** @deprecated use `CreatePromptVersionResponseFormatPrompts1$Outbound` instead. */
2504
- export type Outbound = CreatePromptVersionResponseFormatPrompts1$Outbound;
2505
- }
2506
-
2507
- export function createPromptVersionResponseFormatPrompts1ToJSON(
2508
- createPromptVersionResponseFormatPrompts1:
2509
- CreatePromptVersionResponseFormatPrompts1,
2510
- ): string {
2511
- return JSON.stringify(
2512
- CreatePromptVersionResponseFormatPrompts1$outboundSchema.parse(
2513
- createPromptVersionResponseFormatPrompts1,
2514
- ),
2515
- );
2516
- }
2517
-
2518
- export function createPromptVersionResponseFormatPrompts1FromJSON(
2519
- jsonString: string,
2520
- ): SafeParseResult<
2521
- CreatePromptVersionResponseFormatPrompts1,
2522
- SDKValidationError
2523
- > {
2524
- return safeParse(
2525
- jsonString,
2526
- (x) =>
2527
- CreatePromptVersionResponseFormatPrompts1$inboundSchema.parse(
2528
- JSON.parse(x),
2529
- ),
2530
- `Failed to parse 'CreatePromptVersionResponseFormatPrompts1' from JSON`,
2531
- );
2532
- }
2533
-
2534
- /** @internal */
2535
- export const CreatePromptVersionPromptsResponseFormat$inboundSchema: z.ZodType<
2536
- CreatePromptVersionPromptsResponseFormat,
2537
- z.ZodTypeDef,
2538
- unknown
2539
- > = z.union([
2540
- z.lazy(() => CreatePromptVersionResponseFormatPrompts2$inboundSchema),
2541
- z.lazy(() => CreatePromptVersionResponseFormatPrompts1$inboundSchema),
2542
- ]);
2543
-
2544
- /** @internal */
2545
- export type CreatePromptVersionPromptsResponseFormat$Outbound =
2546
- | CreatePromptVersionResponseFormatPrompts2$Outbound
2547
- | CreatePromptVersionResponseFormatPrompts1$Outbound;
2548
-
2549
- /** @internal */
2550
- export const CreatePromptVersionPromptsResponseFormat$outboundSchema: z.ZodType<
2551
- CreatePromptVersionPromptsResponseFormat$Outbound,
2552
- z.ZodTypeDef,
2553
- CreatePromptVersionPromptsResponseFormat
2554
- > = z.union([
2555
- z.lazy(() => CreatePromptVersionResponseFormatPrompts2$outboundSchema),
2556
- z.lazy(() => CreatePromptVersionResponseFormatPrompts1$outboundSchema),
2557
- ]);
2558
-
2559
- /**
2560
- * @internal
2561
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2562
- */
2563
- export namespace CreatePromptVersionPromptsResponseFormat$ {
2564
- /** @deprecated use `CreatePromptVersionPromptsResponseFormat$inboundSchema` instead. */
2565
- export const inboundSchema =
2566
- CreatePromptVersionPromptsResponseFormat$inboundSchema;
2567
- /** @deprecated use `CreatePromptVersionPromptsResponseFormat$outboundSchema` instead. */
2568
- export const outboundSchema =
2569
- CreatePromptVersionPromptsResponseFormat$outboundSchema;
2570
- /** @deprecated use `CreatePromptVersionPromptsResponseFormat$Outbound` instead. */
2571
- export type Outbound = CreatePromptVersionPromptsResponseFormat$Outbound;
2572
- }
2573
-
2574
- export function createPromptVersionPromptsResponseFormatToJSON(
2575
- createPromptVersionPromptsResponseFormat:
2576
- CreatePromptVersionPromptsResponseFormat,
2577
- ): string {
2578
- return JSON.stringify(
2579
- CreatePromptVersionPromptsResponseFormat$outboundSchema.parse(
2580
- createPromptVersionPromptsResponseFormat,
2581
- ),
2582
- );
2583
- }
2584
-
2585
- export function createPromptVersionPromptsResponseFormatFromJSON(
2586
- jsonString: string,
2587
- ): SafeParseResult<
2588
- CreatePromptVersionPromptsResponseFormat,
2589
- SDKValidationError
2590
- > {
2591
- return safeParse(
2592
- jsonString,
2593
- (x) =>
2594
- CreatePromptVersionPromptsResponseFormat$inboundSchema.parse(
2595
- JSON.parse(x),
2596
- ),
2597
- `Failed to parse 'CreatePromptVersionPromptsResponseFormat' from JSON`,
2598
- );
2599
- }
2600
-
2601
- /** @internal */
2602
- export const CreatePromptVersionPromptsPhotoRealVersion$inboundSchema:
2603
- z.ZodNativeEnum<typeof CreatePromptVersionPromptsPhotoRealVersion> = z
2604
- .nativeEnum(CreatePromptVersionPromptsPhotoRealVersion);
2605
-
2606
- /** @internal */
2607
- export const CreatePromptVersionPromptsPhotoRealVersion$outboundSchema:
2608
- z.ZodNativeEnum<typeof CreatePromptVersionPromptsPhotoRealVersion> =
2609
- CreatePromptVersionPromptsPhotoRealVersion$inboundSchema;
2610
-
2611
- /**
2612
- * @internal
2613
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2614
- */
2615
- export namespace CreatePromptVersionPromptsPhotoRealVersion$ {
2616
- /** @deprecated use `CreatePromptVersionPromptsPhotoRealVersion$inboundSchema` instead. */
2617
- export const inboundSchema =
2618
- CreatePromptVersionPromptsPhotoRealVersion$inboundSchema;
2619
- /** @deprecated use `CreatePromptVersionPromptsPhotoRealVersion$outboundSchema` instead. */
2620
- export const outboundSchema =
2621
- CreatePromptVersionPromptsPhotoRealVersion$outboundSchema;
2622
- }
2623
-
2624
- /** @internal */
2625
- export const CreatePromptVersionPromptsEncodingFormat$inboundSchema:
2626
- z.ZodNativeEnum<typeof CreatePromptVersionPromptsEncodingFormat> = z
2627
- .nativeEnum(CreatePromptVersionPromptsEncodingFormat);
2628
-
2629
- /** @internal */
2630
- export const CreatePromptVersionPromptsEncodingFormat$outboundSchema:
2631
- z.ZodNativeEnum<typeof CreatePromptVersionPromptsEncodingFormat> =
2632
- CreatePromptVersionPromptsEncodingFormat$inboundSchema;
2633
-
2634
- /**
2635
- * @internal
2636
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2637
- */
2638
- export namespace CreatePromptVersionPromptsEncodingFormat$ {
2639
- /** @deprecated use `CreatePromptVersionPromptsEncodingFormat$inboundSchema` instead. */
2640
- export const inboundSchema =
2641
- CreatePromptVersionPromptsEncodingFormat$inboundSchema;
2642
- /** @deprecated use `CreatePromptVersionPromptsEncodingFormat$outboundSchema` instead. */
2643
- export const outboundSchema =
2644
- CreatePromptVersionPromptsEncodingFormat$outboundSchema;
2645
- }
2646
-
2647
- /** @internal */
2648
- export const CreatePromptVersionPromptsModelParameters$inboundSchema: z.ZodType<
2649
- CreatePromptVersionPromptsModelParameters,
2650
- z.ZodTypeDef,
2651
- unknown
2652
- > = z.object({
2653
- temperature: z.number().optional(),
2654
- maxTokens: z.number().optional(),
2655
- topK: z.number().optional(),
2656
- topP: z.number().optional(),
2657
- frequencyPenalty: z.number().optional(),
2658
- presencePenalty: z.number().optional(),
2659
- numImages: z.number().optional(),
2660
- seed: z.number().optional(),
2661
- format: CreatePromptVersionPromptsFormat$inboundSchema.optional(),
2662
- dimensions: z.string().optional(),
2663
- quality: CreatePromptVersionPromptsQuality$inboundSchema.optional(),
2664
- style: z.string().optional(),
2665
- responseFormat: z.nullable(
2666
- z.union([
2667
- z.lazy(() => CreatePromptVersionResponseFormatPrompts2$inboundSchema),
2668
- z.lazy(() => CreatePromptVersionResponseFormatPrompts1$inboundSchema),
2669
- ]),
2670
- ).optional(),
2671
- photoRealVersion: CreatePromptVersionPromptsPhotoRealVersion$inboundSchema
2672
- .optional(),
2673
- encoding_format: CreatePromptVersionPromptsEncodingFormat$inboundSchema
2674
- .optional(),
2675
- }).transform((v) => {
2676
- return remap$(v, {
2677
- "encoding_format": "encodingFormat",
2678
- });
2679
- });
2680
-
2681
- /** @internal */
2682
- export type CreatePromptVersionPromptsModelParameters$Outbound = {
2683
- temperature?: number | undefined;
2684
- maxTokens?: number | undefined;
2685
- topK?: number | undefined;
2686
- topP?: number | undefined;
2687
- frequencyPenalty?: number | undefined;
2688
- presencePenalty?: number | undefined;
2689
- numImages?: number | undefined;
2690
- seed?: number | undefined;
2691
- format?: string | undefined;
2692
- dimensions?: string | undefined;
2693
- quality?: string | undefined;
2694
- style?: string | undefined;
2695
- responseFormat?:
2696
- | CreatePromptVersionResponseFormatPrompts2$Outbound
2697
- | CreatePromptVersionResponseFormatPrompts1$Outbound
2698
- | null
2699
- | undefined;
2700
- photoRealVersion?: string | undefined;
2701
- encoding_format?: string | undefined;
2702
- };
2703
-
2704
- /** @internal */
2705
- export const CreatePromptVersionPromptsModelParameters$outboundSchema:
2706
- z.ZodType<
2707
- CreatePromptVersionPromptsModelParameters$Outbound,
2708
- z.ZodTypeDef,
2709
- CreatePromptVersionPromptsModelParameters
2710
- > = z.object({
2711
- temperature: z.number().optional(),
2712
- maxTokens: z.number().optional(),
2713
- topK: z.number().optional(),
2714
- topP: z.number().optional(),
2715
- frequencyPenalty: z.number().optional(),
2716
- presencePenalty: z.number().optional(),
2717
- numImages: z.number().optional(),
2718
- seed: z.number().optional(),
2719
- format: CreatePromptVersionPromptsFormat$outboundSchema.optional(),
2720
- dimensions: z.string().optional(),
2721
- quality: CreatePromptVersionPromptsQuality$outboundSchema.optional(),
2722
- style: z.string().optional(),
2723
- responseFormat: z.nullable(
2724
- z.union([
2725
- z.lazy(() => CreatePromptVersionResponseFormatPrompts2$outboundSchema),
2726
- z.lazy(() => CreatePromptVersionResponseFormatPrompts1$outboundSchema),
2727
- ]),
2728
- ).optional(),
2729
- photoRealVersion: CreatePromptVersionPromptsPhotoRealVersion$outboundSchema
2730
- .optional(),
2731
- encodingFormat: CreatePromptVersionPromptsEncodingFormat$outboundSchema
2732
- .optional(),
2733
- }).transform((v) => {
2734
- return remap$(v, {
2735
- encodingFormat: "encoding_format",
2736
- });
2737
- });
2738
-
2739
- /**
2740
- * @internal
2741
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2742
- */
2743
- export namespace CreatePromptVersionPromptsModelParameters$ {
2744
- /** @deprecated use `CreatePromptVersionPromptsModelParameters$inboundSchema` instead. */
2745
- export const inboundSchema =
2746
- CreatePromptVersionPromptsModelParameters$inboundSchema;
2747
- /** @deprecated use `CreatePromptVersionPromptsModelParameters$outboundSchema` instead. */
2748
- export const outboundSchema =
2749
- CreatePromptVersionPromptsModelParameters$outboundSchema;
2750
- /** @deprecated use `CreatePromptVersionPromptsModelParameters$Outbound` instead. */
2751
- export type Outbound = CreatePromptVersionPromptsModelParameters$Outbound;
2752
- }
2753
-
2754
- export function createPromptVersionPromptsModelParametersToJSON(
2755
- createPromptVersionPromptsModelParameters:
2756
- CreatePromptVersionPromptsModelParameters,
2757
- ): string {
2758
- return JSON.stringify(
2759
- CreatePromptVersionPromptsModelParameters$outboundSchema.parse(
2760
- createPromptVersionPromptsModelParameters,
2761
- ),
2762
- );
2763
- }
2764
-
2765
- export function createPromptVersionPromptsModelParametersFromJSON(
2766
- jsonString: string,
2767
- ): SafeParseResult<
2768
- CreatePromptVersionPromptsModelParameters,
2769
- SDKValidationError
2770
- > {
2771
- return safeParse(
2772
- jsonString,
2773
- (x) =>
2774
- CreatePromptVersionPromptsModelParameters$inboundSchema.parse(
2775
- JSON.parse(x),
2776
- ),
2777
- `Failed to parse 'CreatePromptVersionPromptsModelParameters' from JSON`,
2778
- );
2779
- }
2780
-
2781
- /** @internal */
2782
- export const CreatePromptVersionPromptsProvider$inboundSchema: z.ZodNativeEnum<
2783
- typeof CreatePromptVersionPromptsProvider
2784
- > = z.nativeEnum(CreatePromptVersionPromptsProvider);
2785
-
2786
- /** @internal */
2787
- export const CreatePromptVersionPromptsProvider$outboundSchema: z.ZodNativeEnum<
2788
- typeof CreatePromptVersionPromptsProvider
2789
- > = CreatePromptVersionPromptsProvider$inboundSchema;
2790
-
2791
- /**
2792
- * @internal
2793
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2794
- */
2795
- export namespace CreatePromptVersionPromptsProvider$ {
2796
- /** @deprecated use `CreatePromptVersionPromptsProvider$inboundSchema` instead. */
2797
- export const inboundSchema = CreatePromptVersionPromptsProvider$inboundSchema;
2798
- /** @deprecated use `CreatePromptVersionPromptsProvider$outboundSchema` instead. */
2799
- export const outboundSchema =
2800
- CreatePromptVersionPromptsProvider$outboundSchema;
2801
- }
2802
-
2803
- /** @internal */
2804
- export const CreatePromptVersionPromptsRole$inboundSchema: z.ZodNativeEnum<
2805
- typeof CreatePromptVersionPromptsRole
2806
- > = z.nativeEnum(CreatePromptVersionPromptsRole);
2807
-
2808
- /** @internal */
2809
- export const CreatePromptVersionPromptsRole$outboundSchema: z.ZodNativeEnum<
2810
- typeof CreatePromptVersionPromptsRole
2811
- > = CreatePromptVersionPromptsRole$inboundSchema;
2812
-
2813
- /**
2814
- * @internal
2815
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2816
- */
2817
- export namespace CreatePromptVersionPromptsRole$ {
2818
- /** @deprecated use `CreatePromptVersionPromptsRole$inboundSchema` instead. */
2819
- export const inboundSchema = CreatePromptVersionPromptsRole$inboundSchema;
2820
- /** @deprecated use `CreatePromptVersionPromptsRole$outboundSchema` instead. */
2821
- export const outboundSchema = CreatePromptVersionPromptsRole$outboundSchema;
2822
- }
2823
-
2824
- /** @internal */
2825
- export const CreatePromptVersion2PromptsResponse200Type$inboundSchema:
2826
- z.ZodNativeEnum<typeof CreatePromptVersion2PromptsResponse200Type> = z
2827
- .nativeEnum(CreatePromptVersion2PromptsResponse200Type);
2828
-
2829
- /** @internal */
2830
- export const CreatePromptVersion2PromptsResponse200Type$outboundSchema:
2831
- z.ZodNativeEnum<typeof CreatePromptVersion2PromptsResponse200Type> =
2832
- CreatePromptVersion2PromptsResponse200Type$inboundSchema;
2833
-
2834
- /**
2835
- * @internal
2836
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2837
- */
2838
- export namespace CreatePromptVersion2PromptsResponse200Type$ {
2839
- /** @deprecated use `CreatePromptVersion2PromptsResponse200Type$inboundSchema` instead. */
2840
- export const inboundSchema =
2841
- CreatePromptVersion2PromptsResponse200Type$inboundSchema;
2842
- /** @deprecated use `CreatePromptVersion2PromptsResponse200Type$outboundSchema` instead. */
2843
- export const outboundSchema =
2844
- CreatePromptVersion2PromptsResponse200Type$outboundSchema;
2845
- }
2846
-
2847
- /** @internal */
2848
- export const CreatePromptVersion2PromptsImageUrl$inboundSchema: z.ZodType<
2849
- CreatePromptVersion2PromptsImageUrl,
2850
- z.ZodTypeDef,
2851
- unknown
2852
- > = z.object({
2853
- id: z.string().optional(),
2854
- url: z.string(),
2855
- detail: z.string().optional(),
2856
- });
2857
-
2858
- /** @internal */
2859
- export type CreatePromptVersion2PromptsImageUrl$Outbound = {
2860
- id?: string | undefined;
2861
- url: string;
2862
- detail?: string | undefined;
2863
- };
2864
-
2865
- /** @internal */
2866
- export const CreatePromptVersion2PromptsImageUrl$outboundSchema: z.ZodType<
2867
- CreatePromptVersion2PromptsImageUrl$Outbound,
2868
- z.ZodTypeDef,
2869
- CreatePromptVersion2PromptsImageUrl
2870
- > = z.object({
2871
- id: z.string().optional(),
2872
- url: z.string(),
2873
- detail: z.string().optional(),
2874
- });
2875
-
2876
- /**
2877
- * @internal
2878
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2879
- */
2880
- export namespace CreatePromptVersion2PromptsImageUrl$ {
2881
- /** @deprecated use `CreatePromptVersion2PromptsImageUrl$inboundSchema` instead. */
2882
- export const inboundSchema =
2883
- CreatePromptVersion2PromptsImageUrl$inboundSchema;
2884
- /** @deprecated use `CreatePromptVersion2PromptsImageUrl$outboundSchema` instead. */
2885
- export const outboundSchema =
2886
- CreatePromptVersion2PromptsImageUrl$outboundSchema;
2887
- /** @deprecated use `CreatePromptVersion2PromptsImageUrl$Outbound` instead. */
2888
- export type Outbound = CreatePromptVersion2PromptsImageUrl$Outbound;
2889
- }
2890
-
2891
- export function createPromptVersion2PromptsImageUrlToJSON(
2892
- createPromptVersion2PromptsImageUrl: CreatePromptVersion2PromptsImageUrl,
2893
- ): string {
2894
- return JSON.stringify(
2895
- CreatePromptVersion2PromptsImageUrl$outboundSchema.parse(
2896
- createPromptVersion2PromptsImageUrl,
2897
- ),
2898
- );
2899
- }
2900
-
2901
- export function createPromptVersion2PromptsImageUrlFromJSON(
2902
- jsonString: string,
2903
- ): SafeParseResult<CreatePromptVersion2PromptsImageUrl, SDKValidationError> {
2904
- return safeParse(
2905
- jsonString,
2906
- (x) =>
2907
- CreatePromptVersion2PromptsImageUrl$inboundSchema.parse(JSON.parse(x)),
2908
- `Failed to parse 'CreatePromptVersion2PromptsImageUrl' from JSON`,
2909
- );
2910
- }
2911
-
2912
- /** @internal */
2913
- export const CreatePromptVersion2Prompts2$inboundSchema: z.ZodType<
2914
- CreatePromptVersion2Prompts2,
2915
- z.ZodTypeDef,
2916
- unknown
2917
- > = z.object({
2918
- type: CreatePromptVersion2PromptsResponse200Type$inboundSchema,
2919
- image_url: z.lazy(() => CreatePromptVersion2PromptsImageUrl$inboundSchema),
2920
- }).transform((v) => {
2921
- return remap$(v, {
2922
- "image_url": "imageUrl",
2923
- });
2924
- });
2925
-
2926
- /** @internal */
2927
- export type CreatePromptVersion2Prompts2$Outbound = {
2928
- type: string;
2929
- image_url: CreatePromptVersion2PromptsImageUrl$Outbound;
2930
- };
2931
-
2932
- /** @internal */
2933
- export const CreatePromptVersion2Prompts2$outboundSchema: z.ZodType<
2934
- CreatePromptVersion2Prompts2$Outbound,
2935
- z.ZodTypeDef,
2936
- CreatePromptVersion2Prompts2
2937
- > = z.object({
2938
- type: CreatePromptVersion2PromptsResponse200Type$outboundSchema,
2939
- imageUrl: z.lazy(() => CreatePromptVersion2PromptsImageUrl$outboundSchema),
2940
- }).transform((v) => {
2941
- return remap$(v, {
2942
- imageUrl: "image_url",
2943
- });
2944
- });
2945
-
2946
- /**
2947
- * @internal
2948
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2949
- */
2950
- export namespace CreatePromptVersion2Prompts2$ {
2951
- /** @deprecated use `CreatePromptVersion2Prompts2$inboundSchema` instead. */
2952
- export const inboundSchema = CreatePromptVersion2Prompts2$inboundSchema;
2953
- /** @deprecated use `CreatePromptVersion2Prompts2$outboundSchema` instead. */
2954
- export const outboundSchema = CreatePromptVersion2Prompts2$outboundSchema;
2955
- /** @deprecated use `CreatePromptVersion2Prompts2$Outbound` instead. */
2956
- export type Outbound = CreatePromptVersion2Prompts2$Outbound;
2957
- }
2958
-
2959
- export function createPromptVersion2Prompts2ToJSON(
2960
- createPromptVersion2Prompts2: CreatePromptVersion2Prompts2,
2961
- ): string {
2962
- return JSON.stringify(
2963
- CreatePromptVersion2Prompts2$outboundSchema.parse(
2964
- createPromptVersion2Prompts2,
2965
- ),
2966
- );
2967
- }
2968
-
2969
- export function createPromptVersion2Prompts2FromJSON(
2970
- jsonString: string,
2971
- ): SafeParseResult<CreatePromptVersion2Prompts2, SDKValidationError> {
2972
- return safeParse(
2973
- jsonString,
2974
- (x) => CreatePromptVersion2Prompts2$inboundSchema.parse(JSON.parse(x)),
2975
- `Failed to parse 'CreatePromptVersion2Prompts2' from JSON`,
2976
- );
2977
- }
2978
-
2979
- /** @internal */
2980
- export const CreatePromptVersion2PromptsResponseType$inboundSchema:
2981
- z.ZodNativeEnum<typeof CreatePromptVersion2PromptsResponseType> = z
2982
- .nativeEnum(CreatePromptVersion2PromptsResponseType);
2983
-
2984
- /** @internal */
2985
- export const CreatePromptVersion2PromptsResponseType$outboundSchema:
2986
- z.ZodNativeEnum<typeof CreatePromptVersion2PromptsResponseType> =
2987
- CreatePromptVersion2PromptsResponseType$inboundSchema;
2988
-
2989
- /**
2990
- * @internal
2991
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2992
- */
2993
- export namespace CreatePromptVersion2PromptsResponseType$ {
2994
- /** @deprecated use `CreatePromptVersion2PromptsResponseType$inboundSchema` instead. */
2995
- export const inboundSchema =
2996
- CreatePromptVersion2PromptsResponseType$inboundSchema;
2997
- /** @deprecated use `CreatePromptVersion2PromptsResponseType$outboundSchema` instead. */
2998
- export const outboundSchema =
2999
- CreatePromptVersion2PromptsResponseType$outboundSchema;
3000
- }
3001
-
3002
- /** @internal */
3003
- export const CreatePromptVersion2Prompts1$inboundSchema: z.ZodType<
3004
- CreatePromptVersion2Prompts1,
3005
- z.ZodTypeDef,
3006
- unknown
3007
- > = z.object({
3008
- type: CreatePromptVersion2PromptsResponseType$inboundSchema,
3009
- text: z.string(),
3010
- });
3011
-
3012
- /** @internal */
3013
- export type CreatePromptVersion2Prompts1$Outbound = {
3014
- type: string;
3015
- text: string;
3016
- };
3017
-
3018
- /** @internal */
3019
- export const CreatePromptVersion2Prompts1$outboundSchema: z.ZodType<
3020
- CreatePromptVersion2Prompts1$Outbound,
3021
- z.ZodTypeDef,
3022
- CreatePromptVersion2Prompts1
3023
- > = z.object({
3024
- type: CreatePromptVersion2PromptsResponseType$outboundSchema,
3025
- text: z.string(),
3026
- });
3027
-
3028
- /**
3029
- * @internal
3030
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3031
- */
3032
- export namespace CreatePromptVersion2Prompts1$ {
3033
- /** @deprecated use `CreatePromptVersion2Prompts1$inboundSchema` instead. */
3034
- export const inboundSchema = CreatePromptVersion2Prompts1$inboundSchema;
3035
- /** @deprecated use `CreatePromptVersion2Prompts1$outboundSchema` instead. */
3036
- export const outboundSchema = CreatePromptVersion2Prompts1$outboundSchema;
3037
- /** @deprecated use `CreatePromptVersion2Prompts1$Outbound` instead. */
3038
- export type Outbound = CreatePromptVersion2Prompts1$Outbound;
3039
- }
3040
-
3041
- export function createPromptVersion2Prompts1ToJSON(
3042
- createPromptVersion2Prompts1: CreatePromptVersion2Prompts1,
3043
- ): string {
3044
- return JSON.stringify(
3045
- CreatePromptVersion2Prompts1$outboundSchema.parse(
3046
- createPromptVersion2Prompts1,
3047
- ),
3048
- );
3049
- }
3050
-
3051
- export function createPromptVersion2Prompts1FromJSON(
3052
- jsonString: string,
3053
- ): SafeParseResult<CreatePromptVersion2Prompts1, SDKValidationError> {
3054
- return safeParse(
3055
- jsonString,
3056
- (x) => CreatePromptVersion2Prompts1$inboundSchema.parse(JSON.parse(x)),
3057
- `Failed to parse 'CreatePromptVersion2Prompts1' from JSON`,
3058
- );
3059
- }
3060
-
3061
- /** @internal */
3062
- export const CreatePromptVersionContentPrompts2$inboundSchema: z.ZodType<
3063
- CreatePromptVersionContentPrompts2,
3064
- z.ZodTypeDef,
3065
- unknown
3066
- > = z.union([
3067
- z.lazy(() => CreatePromptVersion2Prompts1$inboundSchema),
3068
- z.lazy(() => CreatePromptVersion2Prompts2$inboundSchema),
3069
- ]);
3070
-
3071
- /** @internal */
3072
- export type CreatePromptVersionContentPrompts2$Outbound =
3073
- | CreatePromptVersion2Prompts1$Outbound
3074
- | CreatePromptVersion2Prompts2$Outbound;
3075
-
3076
- /** @internal */
3077
- export const CreatePromptVersionContentPrompts2$outboundSchema: z.ZodType<
3078
- CreatePromptVersionContentPrompts2$Outbound,
3079
- z.ZodTypeDef,
3080
- CreatePromptVersionContentPrompts2
3081
- > = z.union([
3082
- z.lazy(() => CreatePromptVersion2Prompts1$outboundSchema),
3083
- z.lazy(() => CreatePromptVersion2Prompts2$outboundSchema),
3084
- ]);
3085
-
3086
- /**
3087
- * @internal
3088
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3089
- */
3090
- export namespace CreatePromptVersionContentPrompts2$ {
3091
- /** @deprecated use `CreatePromptVersionContentPrompts2$inboundSchema` instead. */
3092
- export const inboundSchema = CreatePromptVersionContentPrompts2$inboundSchema;
3093
- /** @deprecated use `CreatePromptVersionContentPrompts2$outboundSchema` instead. */
3094
- export const outboundSchema =
3095
- CreatePromptVersionContentPrompts2$outboundSchema;
3096
- /** @deprecated use `CreatePromptVersionContentPrompts2$Outbound` instead. */
3097
- export type Outbound = CreatePromptVersionContentPrompts2$Outbound;
3098
- }
3099
-
3100
- export function createPromptVersionContentPrompts2ToJSON(
3101
- createPromptVersionContentPrompts2: CreatePromptVersionContentPrompts2,
3102
- ): string {
3103
- return JSON.stringify(
3104
- CreatePromptVersionContentPrompts2$outboundSchema.parse(
3105
- createPromptVersionContentPrompts2,
3106
- ),
3107
- );
3108
- }
3109
-
3110
- export function createPromptVersionContentPrompts2FromJSON(
3111
- jsonString: string,
3112
- ): SafeParseResult<CreatePromptVersionContentPrompts2, SDKValidationError> {
3113
- return safeParse(
3114
- jsonString,
3115
- (x) =>
3116
- CreatePromptVersionContentPrompts2$inboundSchema.parse(JSON.parse(x)),
3117
- `Failed to parse 'CreatePromptVersionContentPrompts2' from JSON`,
3118
- );
3119
- }
3120
-
3121
- /** @internal */
3122
- export const CreatePromptVersionPromptsContent$inboundSchema: z.ZodType<
3123
- CreatePromptVersionPromptsContent,
3124
- z.ZodTypeDef,
3125
- unknown
3126
- > = z.union([
3127
- z.string(),
3128
- z.array(z.union([
3129
- z.lazy(() => CreatePromptVersion2Prompts1$inboundSchema),
3130
- z.lazy(() => CreatePromptVersion2Prompts2$inboundSchema),
3131
- ])),
3132
- ]);
3133
-
3134
- /** @internal */
3135
- export type CreatePromptVersionPromptsContent$Outbound =
3136
- | string
3137
- | Array<
3138
- | CreatePromptVersion2Prompts1$Outbound
3139
- | CreatePromptVersion2Prompts2$Outbound
3140
- >;
3141
-
3142
- /** @internal */
3143
- export const CreatePromptVersionPromptsContent$outboundSchema: z.ZodType<
3144
- CreatePromptVersionPromptsContent$Outbound,
3145
- z.ZodTypeDef,
3146
- CreatePromptVersionPromptsContent
3147
- > = z.union([
3148
- z.string(),
3149
- z.array(z.union([
3150
- z.lazy(() => CreatePromptVersion2Prompts1$outboundSchema),
3151
- z.lazy(() => CreatePromptVersion2Prompts2$outboundSchema),
3152
- ])),
3153
- ]);
3154
-
3155
- /**
3156
- * @internal
3157
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3158
- */
3159
- export namespace CreatePromptVersionPromptsContent$ {
3160
- /** @deprecated use `CreatePromptVersionPromptsContent$inboundSchema` instead. */
3161
- export const inboundSchema = CreatePromptVersionPromptsContent$inboundSchema;
3162
- /** @deprecated use `CreatePromptVersionPromptsContent$outboundSchema` instead. */
3163
- export const outboundSchema =
3164
- CreatePromptVersionPromptsContent$outboundSchema;
3165
- /** @deprecated use `CreatePromptVersionPromptsContent$Outbound` instead. */
3166
- export type Outbound = CreatePromptVersionPromptsContent$Outbound;
3167
- }
3168
-
3169
- export function createPromptVersionPromptsContentToJSON(
3170
- createPromptVersionPromptsContent: CreatePromptVersionPromptsContent,
3171
- ): string {
3172
- return JSON.stringify(
3173
- CreatePromptVersionPromptsContent$outboundSchema.parse(
3174
- createPromptVersionPromptsContent,
3175
- ),
3176
- );
3177
- }
3178
-
3179
- export function createPromptVersionPromptsContentFromJSON(
3180
- jsonString: string,
3181
- ): SafeParseResult<CreatePromptVersionPromptsContent, SDKValidationError> {
3182
- return safeParse(
3183
- jsonString,
3184
- (x) => CreatePromptVersionPromptsContent$inboundSchema.parse(JSON.parse(x)),
3185
- `Failed to parse 'CreatePromptVersionPromptsContent' from JSON`,
3186
- );
3187
- }
3188
-
3189
- /** @internal */
3190
- export const CreatePromptVersionPromptsType$inboundSchema: z.ZodNativeEnum<
3191
- typeof CreatePromptVersionPromptsType
3192
- > = z.nativeEnum(CreatePromptVersionPromptsType);
3193
-
3194
- /** @internal */
3195
- export const CreatePromptVersionPromptsType$outboundSchema: z.ZodNativeEnum<
3196
- typeof CreatePromptVersionPromptsType
3197
- > = CreatePromptVersionPromptsType$inboundSchema;
3198
-
3199
- /**
3200
- * @internal
3201
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3202
- */
3203
- export namespace CreatePromptVersionPromptsType$ {
3204
- /** @deprecated use `CreatePromptVersionPromptsType$inboundSchema` instead. */
3205
- export const inboundSchema = CreatePromptVersionPromptsType$inboundSchema;
3206
- /** @deprecated use `CreatePromptVersionPromptsType$outboundSchema` instead. */
3207
- export const outboundSchema = CreatePromptVersionPromptsType$outboundSchema;
3208
- }
3209
-
3210
- /** @internal */
3211
- export const CreatePromptVersionPromptsFunction$inboundSchema: z.ZodType<
3212
- CreatePromptVersionPromptsFunction,
3213
- z.ZodTypeDef,
3214
- unknown
3215
- > = z.object({
3216
- name: z.string(),
3217
- arguments: z.string(),
3218
- });
3219
-
3220
- /** @internal */
3221
- export type CreatePromptVersionPromptsFunction$Outbound = {
3222
- name: string;
3223
- arguments: string;
3224
- };
3225
-
3226
- /** @internal */
3227
- export const CreatePromptVersionPromptsFunction$outboundSchema: z.ZodType<
3228
- CreatePromptVersionPromptsFunction$Outbound,
3229
- z.ZodTypeDef,
3230
- CreatePromptVersionPromptsFunction
3231
- > = z.object({
3232
- name: z.string(),
3233
- arguments: z.string(),
3234
- });
3235
-
3236
- /**
3237
- * @internal
3238
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3239
- */
3240
- export namespace CreatePromptVersionPromptsFunction$ {
3241
- /** @deprecated use `CreatePromptVersionPromptsFunction$inboundSchema` instead. */
3242
- export const inboundSchema = CreatePromptVersionPromptsFunction$inboundSchema;
3243
- /** @deprecated use `CreatePromptVersionPromptsFunction$outboundSchema` instead. */
3244
- export const outboundSchema =
3245
- CreatePromptVersionPromptsFunction$outboundSchema;
3246
- /** @deprecated use `CreatePromptVersionPromptsFunction$Outbound` instead. */
3247
- export type Outbound = CreatePromptVersionPromptsFunction$Outbound;
3248
- }
3249
-
3250
- export function createPromptVersionPromptsFunctionToJSON(
3251
- createPromptVersionPromptsFunction: CreatePromptVersionPromptsFunction,
3252
- ): string {
3253
- return JSON.stringify(
3254
- CreatePromptVersionPromptsFunction$outboundSchema.parse(
3255
- createPromptVersionPromptsFunction,
3256
- ),
3257
- );
3258
- }
3259
-
3260
- export function createPromptVersionPromptsFunctionFromJSON(
3261
- jsonString: string,
3262
- ): SafeParseResult<CreatePromptVersionPromptsFunction, SDKValidationError> {
3263
- return safeParse(
3264
- jsonString,
3265
- (x) =>
3266
- CreatePromptVersionPromptsFunction$inboundSchema.parse(JSON.parse(x)),
3267
- `Failed to parse 'CreatePromptVersionPromptsFunction' from JSON`,
3268
- );
3269
- }
3270
-
3271
- /** @internal */
3272
- export const CreatePromptVersionPromptsToolCalls$inboundSchema: z.ZodType<
3273
- CreatePromptVersionPromptsToolCalls,
3274
- z.ZodTypeDef,
3275
- unknown
3276
- > = z.object({
3277
- id: z.string().optional(),
3278
- index: z.number().optional(),
3279
- type: CreatePromptVersionPromptsType$inboundSchema,
3280
- function: z.lazy(() => CreatePromptVersionPromptsFunction$inboundSchema),
3281
- });
3282
-
3283
- /** @internal */
3284
- export type CreatePromptVersionPromptsToolCalls$Outbound = {
3285
- id?: string | undefined;
3286
- index?: number | undefined;
3287
- type: string;
3288
- function: CreatePromptVersionPromptsFunction$Outbound;
3289
- };
3290
-
3291
- /** @internal */
3292
- export const CreatePromptVersionPromptsToolCalls$outboundSchema: z.ZodType<
3293
- CreatePromptVersionPromptsToolCalls$Outbound,
3294
- z.ZodTypeDef,
3295
- CreatePromptVersionPromptsToolCalls
3296
- > = z.object({
3297
- id: z.string().optional(),
3298
- index: z.number().optional(),
3299
- type: CreatePromptVersionPromptsType$outboundSchema,
3300
- function: z.lazy(() => CreatePromptVersionPromptsFunction$outboundSchema),
3301
- });
3302
-
3303
- /**
3304
- * @internal
3305
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3306
- */
3307
- export namespace CreatePromptVersionPromptsToolCalls$ {
3308
- /** @deprecated use `CreatePromptVersionPromptsToolCalls$inboundSchema` instead. */
3309
- export const inboundSchema =
3310
- CreatePromptVersionPromptsToolCalls$inboundSchema;
3311
- /** @deprecated use `CreatePromptVersionPromptsToolCalls$outboundSchema` instead. */
3312
- export const outboundSchema =
3313
- CreatePromptVersionPromptsToolCalls$outboundSchema;
3314
- /** @deprecated use `CreatePromptVersionPromptsToolCalls$Outbound` instead. */
3315
- export type Outbound = CreatePromptVersionPromptsToolCalls$Outbound;
3316
- }
3317
-
3318
- export function createPromptVersionPromptsToolCallsToJSON(
3319
- createPromptVersionPromptsToolCalls: CreatePromptVersionPromptsToolCalls,
3320
- ): string {
3321
- return JSON.stringify(
3322
- CreatePromptVersionPromptsToolCalls$outboundSchema.parse(
3323
- createPromptVersionPromptsToolCalls,
3324
- ),
3325
- );
3326
- }
3327
-
3328
- export function createPromptVersionPromptsToolCallsFromJSON(
3329
- jsonString: string,
3330
- ): SafeParseResult<CreatePromptVersionPromptsToolCalls, SDKValidationError> {
3331
- return safeParse(
3332
- jsonString,
3333
- (x) =>
3334
- CreatePromptVersionPromptsToolCalls$inboundSchema.parse(JSON.parse(x)),
3335
- `Failed to parse 'CreatePromptVersionPromptsToolCalls' from JSON`,
3336
- );
3337
- }
3338
-
3339
- /** @internal */
3340
- export const CreatePromptVersionPromptsMessages$inboundSchema: z.ZodType<
3341
- CreatePromptVersionPromptsMessages,
3342
- z.ZodTypeDef,
3343
- unknown
3344
- > = z.object({
3345
- role: CreatePromptVersionPromptsRole$inboundSchema,
3346
- content: z.union([
3347
- z.string(),
3348
- z.array(z.union([
3349
- z.lazy(() => CreatePromptVersion2Prompts1$inboundSchema),
3350
- z.lazy(() => CreatePromptVersion2Prompts2$inboundSchema),
3351
- ])),
3352
- ]),
3353
- tool_calls: z.array(
3354
- z.lazy(() => CreatePromptVersionPromptsToolCalls$inboundSchema),
3355
- ).optional(),
3356
- }).transform((v) => {
3357
- return remap$(v, {
3358
- "tool_calls": "toolCalls",
3359
- });
3360
- });
3361
-
3362
- /** @internal */
3363
- export type CreatePromptVersionPromptsMessages$Outbound = {
3364
- role: string;
3365
- content:
3366
- | string
3367
- | Array<
3368
- | CreatePromptVersion2Prompts1$Outbound
3369
- | CreatePromptVersion2Prompts2$Outbound
3370
- >;
3371
- tool_calls?: Array<CreatePromptVersionPromptsToolCalls$Outbound> | undefined;
3372
- };
3373
-
3374
- /** @internal */
3375
- export const CreatePromptVersionPromptsMessages$outboundSchema: z.ZodType<
3376
- CreatePromptVersionPromptsMessages$Outbound,
3377
- z.ZodTypeDef,
3378
- CreatePromptVersionPromptsMessages
3379
- > = z.object({
3380
- role: CreatePromptVersionPromptsRole$outboundSchema,
3381
- content: z.union([
3382
- z.string(),
3383
- z.array(z.union([
3384
- z.lazy(() => CreatePromptVersion2Prompts1$outboundSchema),
3385
- z.lazy(() => CreatePromptVersion2Prompts2$outboundSchema),
3386
- ])),
3387
- ]),
3388
- toolCalls: z.array(
3389
- z.lazy(() => CreatePromptVersionPromptsToolCalls$outboundSchema),
3390
- ).optional(),
3391
- }).transform((v) => {
3392
- return remap$(v, {
3393
- toolCalls: "tool_calls",
3394
- });
3395
- });
3396
-
3397
- /**
3398
- * @internal
3399
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3400
- */
3401
- export namespace CreatePromptVersionPromptsMessages$ {
3402
- /** @deprecated use `CreatePromptVersionPromptsMessages$inboundSchema` instead. */
3403
- export const inboundSchema = CreatePromptVersionPromptsMessages$inboundSchema;
3404
- /** @deprecated use `CreatePromptVersionPromptsMessages$outboundSchema` instead. */
3405
- export const outboundSchema =
3406
- CreatePromptVersionPromptsMessages$outboundSchema;
3407
- /** @deprecated use `CreatePromptVersionPromptsMessages$Outbound` instead. */
3408
- export type Outbound = CreatePromptVersionPromptsMessages$Outbound;
3409
- }
3410
-
3411
- export function createPromptVersionPromptsMessagesToJSON(
3412
- createPromptVersionPromptsMessages: CreatePromptVersionPromptsMessages,
3413
- ): string {
3414
- return JSON.stringify(
3415
- CreatePromptVersionPromptsMessages$outboundSchema.parse(
3416
- createPromptVersionPromptsMessages,
3417
- ),
3418
- );
3419
- }
3420
-
3421
- export function createPromptVersionPromptsMessagesFromJSON(
3422
- jsonString: string,
3423
- ): SafeParseResult<CreatePromptVersionPromptsMessages, SDKValidationError> {
3424
- return safeParse(
3425
- jsonString,
3426
- (x) =>
3427
- CreatePromptVersionPromptsMessages$inboundSchema.parse(JSON.parse(x)),
3428
- `Failed to parse 'CreatePromptVersionPromptsMessages' from JSON`,
3429
- );
3430
- }
3431
-
3432
- /** @internal */
3433
- export const CreatePromptVersionPromptsPromptConfig$inboundSchema: z.ZodType<
3434
- CreatePromptVersionPromptsPromptConfig,
3435
- z.ZodTypeDef,
3436
- unknown
3437
- > = z.object({
3438
- stream: z.boolean().optional(),
3439
- model: z.string().optional(),
3440
- model_db_id: z.string().optional(),
3441
- model_type: CreatePromptVersionPromptsModelType$inboundSchema.optional(),
3442
- model_parameters: z.lazy(() =>
3443
- CreatePromptVersionPromptsModelParameters$inboundSchema
3444
- ).optional(),
3445
- provider: CreatePromptVersionPromptsProvider$inboundSchema.optional(),
3446
- integration_id: z.nullable(z.string()).optional(),
3447
- version: z.string().optional(),
3448
- messages: z.array(
3449
- z.lazy(() => CreatePromptVersionPromptsMessages$inboundSchema),
3450
- ),
3451
- }).transform((v) => {
3452
- return remap$(v, {
3453
- "model_db_id": "modelDbId",
3454
- "model_type": "modelType",
3455
- "model_parameters": "modelParameters",
3456
- "integration_id": "integrationId",
3457
- });
3458
- });
3459
-
3460
- /** @internal */
3461
- export type CreatePromptVersionPromptsPromptConfig$Outbound = {
3462
- stream?: boolean | undefined;
3463
- model?: string | undefined;
3464
- model_db_id?: string | undefined;
3465
- model_type?: string | undefined;
3466
- model_parameters?:
3467
- | CreatePromptVersionPromptsModelParameters$Outbound
3468
- | undefined;
3469
- provider?: string | undefined;
3470
- integration_id?: string | null | undefined;
3471
- version?: string | undefined;
3472
- messages: Array<CreatePromptVersionPromptsMessages$Outbound>;
3473
- };
3474
-
3475
- /** @internal */
3476
- export const CreatePromptVersionPromptsPromptConfig$outboundSchema: z.ZodType<
3477
- CreatePromptVersionPromptsPromptConfig$Outbound,
3478
- z.ZodTypeDef,
3479
- CreatePromptVersionPromptsPromptConfig
3480
- > = z.object({
3481
- stream: z.boolean().optional(),
3482
- model: z.string().optional(),
3483
- modelDbId: z.string().optional(),
3484
- modelType: CreatePromptVersionPromptsModelType$outboundSchema.optional(),
3485
- modelParameters: z.lazy(() =>
3486
- CreatePromptVersionPromptsModelParameters$outboundSchema
3487
- ).optional(),
3488
- provider: CreatePromptVersionPromptsProvider$outboundSchema.optional(),
3489
- integrationId: z.nullable(z.string()).optional(),
3490
- version: z.string().optional(),
3491
- messages: z.array(
3492
- z.lazy(() => CreatePromptVersionPromptsMessages$outboundSchema),
3493
- ),
3494
- }).transform((v) => {
3495
- return remap$(v, {
3496
- modelDbId: "model_db_id",
3497
- modelType: "model_type",
3498
- modelParameters: "model_parameters",
3499
- integrationId: "integration_id",
3500
- });
3501
- });
3502
-
3503
- /**
3504
- * @internal
3505
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3506
- */
3507
- export namespace CreatePromptVersionPromptsPromptConfig$ {
3508
- /** @deprecated use `CreatePromptVersionPromptsPromptConfig$inboundSchema` instead. */
3509
- export const inboundSchema =
3510
- CreatePromptVersionPromptsPromptConfig$inboundSchema;
3511
- /** @deprecated use `CreatePromptVersionPromptsPromptConfig$outboundSchema` instead. */
3512
- export const outboundSchema =
3513
- CreatePromptVersionPromptsPromptConfig$outboundSchema;
3514
- /** @deprecated use `CreatePromptVersionPromptsPromptConfig$Outbound` instead. */
3515
- export type Outbound = CreatePromptVersionPromptsPromptConfig$Outbound;
3516
- }
3517
-
3518
- export function createPromptVersionPromptsPromptConfigToJSON(
3519
- createPromptVersionPromptsPromptConfig:
3520
- CreatePromptVersionPromptsPromptConfig,
3521
- ): string {
3522
- return JSON.stringify(
3523
- CreatePromptVersionPromptsPromptConfig$outboundSchema.parse(
3524
- createPromptVersionPromptsPromptConfig,
3525
- ),
3526
- );
3527
- }
3528
-
3529
- export function createPromptVersionPromptsPromptConfigFromJSON(
3530
- jsonString: string,
3531
- ): SafeParseResult<CreatePromptVersionPromptsPromptConfig, SDKValidationError> {
3532
- return safeParse(
3533
- jsonString,
3534
- (x) =>
3535
- CreatePromptVersionPromptsPromptConfig$inboundSchema.parse(JSON.parse(x)),
3536
- `Failed to parse 'CreatePromptVersionPromptsPromptConfig' from JSON`,
3537
- );
3538
- }
3539
-
3540
- /** @internal */
3541
- export const CreatePromptVersionPromptsMetadata$inboundSchema: z.ZodType<
3542
- CreatePromptVersionPromptsMetadata,
3543
- z.ZodTypeDef,
3544
- unknown
3545
- > = z.object({
3546
- use_cases: z.array(z.string()).optional(),
3547
- language: z.string().optional(),
3548
- }).transform((v) => {
3549
- return remap$(v, {
3550
- "use_cases": "useCases",
3551
- });
3552
- });
3553
-
3554
- /** @internal */
3555
- export type CreatePromptVersionPromptsMetadata$Outbound = {
3556
- use_cases?: Array<string> | undefined;
3557
- language?: string | undefined;
3558
- };
3559
-
3560
- /** @internal */
3561
- export const CreatePromptVersionPromptsMetadata$outboundSchema: z.ZodType<
3562
- CreatePromptVersionPromptsMetadata$Outbound,
3563
- z.ZodTypeDef,
3564
- CreatePromptVersionPromptsMetadata
3565
- > = z.object({
3566
- useCases: z.array(z.string()).optional(),
3567
- language: z.string().optional(),
3568
- }).transform((v) => {
3569
- return remap$(v, {
3570
- useCases: "use_cases",
3571
- });
3572
- });
3573
-
3574
- /**
3575
- * @internal
3576
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3577
- */
3578
- export namespace CreatePromptVersionPromptsMetadata$ {
3579
- /** @deprecated use `CreatePromptVersionPromptsMetadata$inboundSchema` instead. */
3580
- export const inboundSchema = CreatePromptVersionPromptsMetadata$inboundSchema;
3581
- /** @deprecated use `CreatePromptVersionPromptsMetadata$outboundSchema` instead. */
3582
- export const outboundSchema =
3583
- CreatePromptVersionPromptsMetadata$outboundSchema;
3584
- /** @deprecated use `CreatePromptVersionPromptsMetadata$Outbound` instead. */
3585
- export type Outbound = CreatePromptVersionPromptsMetadata$Outbound;
3586
- }
3587
-
3588
- export function createPromptVersionPromptsMetadataToJSON(
3589
- createPromptVersionPromptsMetadata: CreatePromptVersionPromptsMetadata,
3590
- ): string {
3591
- return JSON.stringify(
3592
- CreatePromptVersionPromptsMetadata$outboundSchema.parse(
3593
- createPromptVersionPromptsMetadata,
3594
- ),
3595
- );
3596
- }
3597
-
3598
- export function createPromptVersionPromptsMetadataFromJSON(
3599
- jsonString: string,
3600
- ): SafeParseResult<CreatePromptVersionPromptsMetadata, SDKValidationError> {
3601
- return safeParse(
3602
- jsonString,
3603
- (x) =>
3604
- CreatePromptVersionPromptsMetadata$inboundSchema.parse(JSON.parse(x)),
3605
- `Failed to parse 'CreatePromptVersionPromptsMetadata' from JSON`,
3606
- );
3607
- }
3608
-
3609
- /** @internal */
3610
- export const CreatePromptVersionResponseBody$inboundSchema: z.ZodType<
3611
- CreatePromptVersionResponseBody,
3612
- z.ZodTypeDef,
3613
- unknown
3614
- > = z.object({
3615
- _id: z.string(),
3616
- display_name: z.string(),
3617
- description: z.nullable(z.string()).optional(),
3618
- prompt_config: z.lazy(() =>
3619
- CreatePromptVersionPromptsPromptConfig$inboundSchema
3620
- ),
3621
- metadata: z.lazy(() => CreatePromptVersionPromptsMetadata$inboundSchema),
3622
- commit: z.string(),
3623
- timestamp: z.string(),
3624
- }).transform((v) => {
3625
- return remap$(v, {
3626
- "_id": "id",
3627
- "display_name": "displayName",
3628
- "prompt_config": "promptConfig",
3629
- });
3630
- });
3631
-
3632
- /** @internal */
3633
- export type CreatePromptVersionResponseBody$Outbound = {
3634
- _id: string;
3635
- display_name: string;
3636
- description?: string | null | undefined;
3637
- prompt_config: CreatePromptVersionPromptsPromptConfig$Outbound;
3638
- metadata: CreatePromptVersionPromptsMetadata$Outbound;
3639
- commit: string;
3640
- timestamp: string;
3641
- };
3642
-
3643
- /** @internal */
3644
- export const CreatePromptVersionResponseBody$outboundSchema: z.ZodType<
3645
- CreatePromptVersionResponseBody$Outbound,
3646
- z.ZodTypeDef,
3647
- CreatePromptVersionResponseBody
3648
- > = z.object({
3649
- id: z.string(),
3650
- displayName: z.string(),
3651
- description: z.nullable(z.string()).optional(),
3652
- promptConfig: z.lazy(() =>
3653
- CreatePromptVersionPromptsPromptConfig$outboundSchema
3654
- ),
3655
- metadata: z.lazy(() => CreatePromptVersionPromptsMetadata$outboundSchema),
3656
- commit: z.string(),
3657
- timestamp: z.string(),
3658
- }).transform((v) => {
3659
- return remap$(v, {
3660
- id: "_id",
3661
- displayName: "display_name",
3662
- promptConfig: "prompt_config",
3663
- });
3664
- });
3665
-
3666
- /**
3667
- * @internal
3668
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3669
- */
3670
- export namespace CreatePromptVersionResponseBody$ {
3671
- /** @deprecated use `CreatePromptVersionResponseBody$inboundSchema` instead. */
3672
- export const inboundSchema = CreatePromptVersionResponseBody$inboundSchema;
3673
- /** @deprecated use `CreatePromptVersionResponseBody$outboundSchema` instead. */
3674
- export const outboundSchema = CreatePromptVersionResponseBody$outboundSchema;
3675
- /** @deprecated use `CreatePromptVersionResponseBody$Outbound` instead. */
3676
- export type Outbound = CreatePromptVersionResponseBody$Outbound;
3677
- }
3678
-
3679
- export function createPromptVersionResponseBodyToJSON(
3680
- createPromptVersionResponseBody: CreatePromptVersionResponseBody,
3681
- ): string {
3682
- return JSON.stringify(
3683
- CreatePromptVersionResponseBody$outboundSchema.parse(
3684
- createPromptVersionResponseBody,
3685
- ),
3686
- );
3687
- }
3688
-
3689
- export function createPromptVersionResponseBodyFromJSON(
3690
- jsonString: string,
3691
- ): SafeParseResult<CreatePromptVersionResponseBody, SDKValidationError> {
3692
- return safeParse(
3693
- jsonString,
3694
- (x) => CreatePromptVersionResponseBody$inboundSchema.parse(JSON.parse(x)),
3695
- `Failed to parse 'CreatePromptVersionResponseBody' from JSON`,
3696
- );
3697
- }