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

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