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