@orq-ai/node 3.1.2 → 3.1.3

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