@orq-ai/node 0.0.1

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