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