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