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