@orq-ai/node 1.31.11 → 1.32.0-rc.6

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