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