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