@orq-ai/node 3.0.0-rc.19 → 3.0.1

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