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

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