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