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