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

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