@orq-ai/node 3.0.1 → 3.1.0-rc.7

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