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