@orq-ai/node 3.12.16 → 3.12.19

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 (159) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +2 -2
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +16 -16
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/getbudget.js +2 -2
  19. package/models/operations/getevals.js +28 -28
  20. package/models/operations/listbudgets.js +2 -2
  21. package/models/operations/listcontacts.js +2 -2
  22. package/models/operations/listdatasetdatapoints.js +2 -2
  23. package/models/operations/listdatasets.js +2 -2
  24. package/models/operations/listdatasources.js +2 -2
  25. package/models/operations/retrievecontact.js +2 -2
  26. package/models/operations/retrievedatapoint.js +2 -2
  27. package/models/operations/retrievedataset.js +2 -2
  28. package/models/operations/retrievedatasource.js +2 -2
  29. package/models/operations/updatebudget.js +2 -2
  30. package/models/operations/updatecontact.js +2 -2
  31. package/models/operations/updatedatapoint.js +2 -2
  32. package/models/operations/updatedataset.js +2 -2
  33. package/models/operations/updatedatasource.js +2 -2
  34. package/models/operations/updateeval.js +16 -16
  35. package/package.json +1 -1
  36. package/packages/orq-rc/README.md +107 -90
  37. package/packages/orq-rc/docs/sdks/tools/README.md +488 -0
  38. package/packages/orq-rc/examples/package-lock.json +1 -1
  39. package/packages/orq-rc/jsr.json +1 -1
  40. package/packages/orq-rc/package-lock.json +2 -2
  41. package/packages/orq-rc/package.json +1 -1
  42. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  43. package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
  44. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +175 -0
  45. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  46. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
  47. package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
  48. package/packages/orq-rc/src/lib/config.ts +3 -3
  49. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  50. package/packages/orq-rc/src/mcp-server/server.ts +13 -1
  51. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
  52. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
  53. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +37 -0
  54. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
  55. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
  56. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
  57. package/packages/orq-rc/src/models/components/callsubagenttool.ts +109 -0
  58. package/packages/orq-rc/src/models/components/codeexecutiontool.ts +293 -0
  59. package/packages/orq-rc/src/models/components/currentdatetool.ts +107 -0
  60. package/packages/orq-rc/src/models/components/deployments.ts +52 -45
  61. package/packages/orq-rc/src/models/components/functiontool.ts +195 -0
  62. package/packages/orq-rc/src/models/components/googlesearchtool.ts +108 -0
  63. package/packages/orq-rc/src/models/components/httptool.ts +532 -0
  64. package/packages/orq-rc/src/models/components/index.ts +13 -0
  65. package/packages/orq-rc/src/models/components/queryknowledgebasetool.ts +111 -0
  66. package/packages/orq-rc/src/models/components/querymemorystoretool.ts +111 -0
  67. package/packages/orq-rc/src/models/components/retrieveagentstool.ts +109 -0
  68. package/packages/orq-rc/src/models/components/retrieveknowledgebasestool.ts +111 -0
  69. package/packages/orq-rc/src/models/components/retrievememorystorestool.ts +111 -0
  70. package/packages/orq-rc/src/models/components/webscrapertool.ts +105 -0
  71. package/packages/orq-rc/src/models/components/writememorystoretool.ts +111 -0
  72. package/packages/orq-rc/src/models/errors/duplicatetool.ts +91 -0
  73. package/packages/orq-rc/src/models/errors/index.ts +2 -0
  74. package/packages/orq-rc/src/models/errors/updatetool.ts +91 -0
  75. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  76. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +10 -8
  79. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createeval.ts +60 -56
  81. package/packages/orq-rc/src/models/operations/createknowledge.ts +18 -0
  82. package/packages/orq-rc/src/models/operations/creatememorystore.ts +137 -136
  83. package/packages/orq-rc/src/models/operations/createprompt.ts +631 -314
  84. package/packages/orq-rc/src/models/operations/createtool.ts +4027 -0
  85. package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
  86. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +8 -6
  87. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +362 -194
  88. package/packages/orq-rc/src/models/operations/deployments.ts +329 -160
  89. package/packages/orq-rc/src/models/operations/deploymentstream.ts +8 -6
  90. package/packages/orq-rc/src/models/operations/duplicatetool.ts +2311 -0
  91. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/getagent.ts +10 -10
  95. package/packages/orq-rc/src/models/operations/getallprompts.ts +333 -168
  96. package/packages/orq-rc/src/models/operations/getalltools.ts +2278 -0
  97. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  99. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +9 -0
  100. package/packages/orq-rc/src/models/operations/getoneprompt.ts +329 -167
  101. package/packages/orq-rc/src/models/operations/getpromptversion.ts +337 -168
  102. package/packages/orq-rc/src/models/operations/index.ts +6 -0
  103. package/packages/orq-rc/src/models/operations/listagents.ts +10 -10
  104. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +6 -5
  107. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +9 -0
  110. package/packages/orq-rc/src/models/operations/listpromptversions.ts +354 -183
  111. package/packages/orq-rc/src/models/operations/parse.ts +20 -335
  112. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +6 -5
  114. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  116. package/packages/orq-rc/src/models/operations/retrievetool.ts +2303 -0
  117. package/packages/orq-rc/src/models/operations/runagent.ts +412 -1375
  118. package/packages/orq-rc/src/models/operations/streamrunagent.ts +399 -1449
  119. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +10 -8
  122. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/updateeval.ts +57 -57
  125. package/packages/orq-rc/src/models/operations/updateknowledge.ts +18 -0
  126. package/packages/orq-rc/src/models/operations/updatememorystore.ts +136 -168
  127. package/packages/orq-rc/src/models/operations/updateprompt.ts +668 -335
  128. package/packages/orq-rc/src/models/operations/updatetool.ts +4231 -0
  129. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  130. package/packages/orq-rc/src/sdk/tools.ts +117 -0
  131. package/src/lib/config.ts +3 -3
  132. package/src/mcp-server/mcp-server.ts +1 -1
  133. package/src/mcp-server/server.ts +1 -1
  134. package/src/models/operations/createbudget.ts +2 -2
  135. package/src/models/operations/createcontact.ts +2 -2
  136. package/src/models/operations/createdataset.ts +2 -2
  137. package/src/models/operations/createdatasetitem.ts +2 -2
  138. package/src/models/operations/createdatasource.ts +2 -2
  139. package/src/models/operations/createeval.ts +16 -16
  140. package/src/models/operations/fileget.ts +2 -2
  141. package/src/models/operations/filelist.ts +2 -2
  142. package/src/models/operations/fileupload.ts +2 -2
  143. package/src/models/operations/getbudget.ts +2 -2
  144. package/src/models/operations/getevals.ts +28 -28
  145. package/src/models/operations/listbudgets.ts +2 -2
  146. package/src/models/operations/listcontacts.ts +2 -2
  147. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  148. package/src/models/operations/listdatasets.ts +2 -2
  149. package/src/models/operations/listdatasources.ts +2 -2
  150. package/src/models/operations/retrievecontact.ts +2 -2
  151. package/src/models/operations/retrievedatapoint.ts +2 -2
  152. package/src/models/operations/retrievedataset.ts +2 -2
  153. package/src/models/operations/retrievedatasource.ts +2 -2
  154. package/src/models/operations/updatebudget.ts +2 -2
  155. package/src/models/operations/updatecontact.ts +2 -2
  156. package/src/models/operations/updatedatapoint.ts +2 -2
  157. package/src/models/operations/updatedataset.ts +2 -2
  158. package/src/models/operations/updatedatasource.ts +2 -2
  159. package/src/models/operations/updateeval.ts +16 -16
@@ -0,0 +1,4231 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
14
+ */
15
+ export const UpdateToolRequestBodyToolsRequest5Status = {
16
+ Live: "live",
17
+ Draft: "draft",
18
+ Pending: "pending",
19
+ Published: "published",
20
+ } as const;
21
+ /**
22
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
23
+ */
24
+ export type UpdateToolRequestBodyToolsRequest5Status = ClosedEnum<
25
+ typeof UpdateToolRequestBodyToolsRequest5Status
26
+ >;
27
+
28
+ export const UpdateToolRequestBodyToolsRequest5Type = {
29
+ Code: "code",
30
+ } as const;
31
+ export type UpdateToolRequestBodyToolsRequest5Type = ClosedEnum<
32
+ typeof UpdateToolRequestBodyToolsRequest5Type
33
+ >;
34
+
35
+ export const UpdateToolRequestBodyLanguage = {
36
+ Python: "python",
37
+ } as const;
38
+ export type UpdateToolRequestBodyLanguage = ClosedEnum<
39
+ typeof UpdateToolRequestBodyLanguage
40
+ >;
41
+
42
+ export type RequestBodyCodeTool = {
43
+ /**
44
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
45
+ */
46
+ parameters?: { [k: string]: any } | undefined;
47
+ language: UpdateToolRequestBodyLanguage;
48
+ /**
49
+ * The code to execute.
50
+ */
51
+ code: string;
52
+ };
53
+
54
+ export type UpdateToolRequestBody5 = {
55
+ /**
56
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
57
+ */
58
+ path?: string | undefined;
59
+ /**
60
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
61
+ */
62
+ displayName: string;
63
+ /**
64
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
65
+ */
66
+ description?: string | undefined;
67
+ /**
68
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
69
+ */
70
+ status?: UpdateToolRequestBodyToolsRequest5Status | undefined;
71
+ versionHash?: string | undefined;
72
+ type: UpdateToolRequestBodyToolsRequest5Type;
73
+ codeTool?: RequestBodyCodeTool | undefined;
74
+ };
75
+
76
+ /**
77
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
78
+ */
79
+ export const UpdateToolRequestBodyToolsRequest4Status = {
80
+ Live: "live",
81
+ Draft: "draft",
82
+ Pending: "pending",
83
+ Published: "published",
84
+ } as const;
85
+ /**
86
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
87
+ */
88
+ export type UpdateToolRequestBodyToolsRequest4Status = ClosedEnum<
89
+ typeof UpdateToolRequestBodyToolsRequest4Status
90
+ >;
91
+
92
+ export const UpdateToolRequestBodyToolsRequest4Type = {
93
+ Mcp: "mcp",
94
+ } as const;
95
+ export type UpdateToolRequestBodyToolsRequest4Type = ClosedEnum<
96
+ typeof UpdateToolRequestBodyToolsRequest4Type
97
+ >;
98
+
99
+ export type RequestBodyHeaders = {
100
+ value: string;
101
+ encrypted?: boolean | undefined;
102
+ };
103
+
104
+ export const UpdateToolRequestBodyToolsRequest4McpType = {
105
+ Object: "object",
106
+ } as const;
107
+ export type UpdateToolRequestBodyToolsRequest4McpType = ClosedEnum<
108
+ typeof UpdateToolRequestBodyToolsRequest4McpType
109
+ >;
110
+
111
+ /**
112
+ * The original MCP tool input schema for LLM conversion
113
+ */
114
+ export type RequestBodyInputSchema = {
115
+ type: UpdateToolRequestBodyToolsRequest4McpType;
116
+ properties?: { [k: string]: any } | undefined;
117
+ required?: Array<string> | undefined;
118
+ };
119
+
120
+ /**
121
+ * The connection type used by the MCP server
122
+ */
123
+ export const RequestBodyConnectionType = {
124
+ Http: "http",
125
+ Sse: "sse",
126
+ } as const;
127
+ /**
128
+ * The connection type used by the MCP server
129
+ */
130
+ export type RequestBodyConnectionType = ClosedEnum<
131
+ typeof RequestBodyConnectionType
132
+ >;
133
+
134
+ export type RequestBodyMcp = {
135
+ /**
136
+ * The ID of the MCP server this tool belongs to
137
+ */
138
+ serverId: string;
139
+ /**
140
+ * The original tool name from the MCP server
141
+ */
142
+ toolName: string;
143
+ /**
144
+ * The MCP server URL (cached for execution)
145
+ */
146
+ serverUrl: string;
147
+ /**
148
+ * HTTP headers for MCP server requests (encrypted format)
149
+ */
150
+ headers?: { [k: string]: RequestBodyHeaders } | undefined;
151
+ /**
152
+ * The original MCP tool input schema for LLM conversion
153
+ */
154
+ inputSchema: RequestBodyInputSchema;
155
+ /**
156
+ * The connection type used by the MCP server
157
+ */
158
+ connectionType: RequestBodyConnectionType;
159
+ };
160
+
161
+ export type UpdateToolRequestBody4 = {
162
+ /**
163
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
164
+ */
165
+ path?: string | undefined;
166
+ /**
167
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
168
+ */
169
+ displayName: string;
170
+ /**
171
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
172
+ */
173
+ description?: string | undefined;
174
+ /**
175
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
176
+ */
177
+ status?: UpdateToolRequestBodyToolsRequest4Status | undefined;
178
+ versionHash?: string | undefined;
179
+ type: UpdateToolRequestBodyToolsRequest4Type;
180
+ mcp?: RequestBodyMcp | undefined;
181
+ };
182
+
183
+ /**
184
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
185
+ */
186
+ export const UpdateToolRequestBodyToolsRequestStatus = {
187
+ Live: "live",
188
+ Draft: "draft",
189
+ Pending: "pending",
190
+ Published: "published",
191
+ } as const;
192
+ /**
193
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
194
+ */
195
+ export type UpdateToolRequestBodyToolsRequestStatus = ClosedEnum<
196
+ typeof UpdateToolRequestBodyToolsRequestStatus
197
+ >;
198
+
199
+ export const UpdateToolRequestBodyToolsRequestType = {
200
+ Http: "http",
201
+ } as const;
202
+ export type UpdateToolRequestBodyToolsRequestType = ClosedEnum<
203
+ typeof UpdateToolRequestBodyToolsRequestType
204
+ >;
205
+
206
+ /**
207
+ * The HTTP method to use.
208
+ */
209
+ export const UpdateToolRequestBodyMethod = {
210
+ Get: "GET",
211
+ Post: "POST",
212
+ Put: "PUT",
213
+ Delete: "DELETE",
214
+ } as const;
215
+ /**
216
+ * The HTTP method to use.
217
+ */
218
+ export type UpdateToolRequestBodyMethod = ClosedEnum<
219
+ typeof UpdateToolRequestBodyMethod
220
+ >;
221
+
222
+ /**
223
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
224
+ */
225
+ export type UpdateToolRequestBodyBlueprint = {
226
+ /**
227
+ * The URL to send the request to.
228
+ */
229
+ url: string;
230
+ /**
231
+ * The HTTP method to use.
232
+ */
233
+ method: UpdateToolRequestBodyMethod;
234
+ /**
235
+ * The headers to send with the request.
236
+ */
237
+ headers?: { [k: string]: string } | undefined;
238
+ /**
239
+ * The body to send with the request.
240
+ */
241
+ body?: { [k: string]: any } | undefined;
242
+ };
243
+
244
+ /**
245
+ * The type of the argument.
246
+ */
247
+ export const UpdateToolRequestBodyToolsRequest3Type = {
248
+ String: "string",
249
+ Number: "number",
250
+ Boolean: "boolean",
251
+ } as const;
252
+ /**
253
+ * The type of the argument.
254
+ */
255
+ export type UpdateToolRequestBodyToolsRequest3Type = ClosedEnum<
256
+ typeof UpdateToolRequestBodyToolsRequest3Type
257
+ >;
258
+
259
+ /**
260
+ * The default value of the argument.
261
+ */
262
+ export type UpdateToolRequestBodyDefaultValue = string | number | boolean;
263
+
264
+ export type UpdateToolRequestBodyArguments = {
265
+ /**
266
+ * The type of the argument.
267
+ */
268
+ type: UpdateToolRequestBodyToolsRequest3Type;
269
+ /**
270
+ * A description of the argument.
271
+ */
272
+ description: string;
273
+ /**
274
+ * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
275
+ */
276
+ sendToModel?: boolean | undefined;
277
+ /**
278
+ * The default value of the argument.
279
+ */
280
+ defaultValue?: string | number | boolean | undefined;
281
+ };
282
+
283
+ export type UpdateToolRequestBodyHttp = {
284
+ /**
285
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
286
+ */
287
+ blueprint: UpdateToolRequestBodyBlueprint;
288
+ /**
289
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
290
+ */
291
+ arguments?: { [k: string]: UpdateToolRequestBodyArguments } | undefined;
292
+ };
293
+
294
+ export type UpdateToolRequestBody3 = {
295
+ id?: string | undefined;
296
+ /**
297
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
298
+ */
299
+ path?: string | undefined;
300
+ /**
301
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
302
+ */
303
+ displayName?: string | undefined;
304
+ /**
305
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
306
+ */
307
+ description?: string | undefined;
308
+ /**
309
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
310
+ */
311
+ status?: UpdateToolRequestBodyToolsRequestStatus | undefined;
312
+ versionHash?: string | undefined;
313
+ type: UpdateToolRequestBodyToolsRequestType;
314
+ http?: UpdateToolRequestBodyHttp | undefined;
315
+ };
316
+
317
+ /**
318
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
319
+ */
320
+ export const UpdateToolRequestBodyToolsStatus = {
321
+ Live: "live",
322
+ Draft: "draft",
323
+ Pending: "pending",
324
+ Published: "published",
325
+ } as const;
326
+ /**
327
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
328
+ */
329
+ export type UpdateToolRequestBodyToolsStatus = ClosedEnum<
330
+ typeof UpdateToolRequestBodyToolsStatus
331
+ >;
332
+
333
+ export const UpdateToolRequestBodyToolsType = {
334
+ JsonSchema: "json_schema",
335
+ } as const;
336
+ export type UpdateToolRequestBodyToolsType = ClosedEnum<
337
+ typeof UpdateToolRequestBodyToolsType
338
+ >;
339
+
340
+ export type UpdateToolRequestBodyJsonSchema = {
341
+ /**
342
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
343
+ */
344
+ name: string;
345
+ /**
346
+ * A description of what the response format is for. This will be shown to the user.
347
+ */
348
+ description?: string | undefined;
349
+ /**
350
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
351
+ */
352
+ schema: { [k: string]: any };
353
+ /**
354
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
355
+ */
356
+ strict?: boolean | null | undefined;
357
+ };
358
+
359
+ export type UpdateToolRequestBody2 = {
360
+ id?: string | undefined;
361
+ /**
362
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
363
+ */
364
+ path?: string | undefined;
365
+ /**
366
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
367
+ */
368
+ displayName?: string | undefined;
369
+ /**
370
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
371
+ */
372
+ description?: string | undefined;
373
+ /**
374
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
375
+ */
376
+ status?: UpdateToolRequestBodyToolsStatus | undefined;
377
+ versionHash?: string | undefined;
378
+ type: UpdateToolRequestBodyToolsType;
379
+ jsonSchema?: UpdateToolRequestBodyJsonSchema | undefined;
380
+ };
381
+
382
+ /**
383
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
384
+ */
385
+ export const UpdateToolRequestBodyStatus = {
386
+ Live: "live",
387
+ Draft: "draft",
388
+ Pending: "pending",
389
+ Published: "published",
390
+ } as const;
391
+ /**
392
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
393
+ */
394
+ export type UpdateToolRequestBodyStatus = ClosedEnum<
395
+ typeof UpdateToolRequestBodyStatus
396
+ >;
397
+
398
+ export const UpdateToolRequestBodyType = {
399
+ Function: "function",
400
+ } as const;
401
+ export type UpdateToolRequestBodyType = ClosedEnum<
402
+ typeof UpdateToolRequestBodyType
403
+ >;
404
+
405
+ export type UpdateToolRequestBodyFunction = {
406
+ /**
407
+ * 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.
408
+ */
409
+ name: string;
410
+ /**
411
+ * A description of what the function does, used by the model to choose when and how to call the function.
412
+ */
413
+ description?: string | undefined;
414
+ /**
415
+ * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
416
+ */
417
+ strict?: boolean | undefined;
418
+ /**
419
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
420
+ */
421
+ parameters?: { [k: string]: any } | undefined;
422
+ };
423
+
424
+ export type UpdateToolRequestBody1 = {
425
+ /**
426
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
427
+ */
428
+ path?: string | undefined;
429
+ /**
430
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
431
+ */
432
+ displayName?: string | undefined;
433
+ /**
434
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
435
+ */
436
+ description?: string | undefined;
437
+ /**
438
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
439
+ */
440
+ status?: UpdateToolRequestBodyStatus | undefined;
441
+ versionHash?: string | undefined;
442
+ type: UpdateToolRequestBodyType;
443
+ function?: UpdateToolRequestBodyFunction | undefined;
444
+ };
445
+
446
+ /**
447
+ * The tool to update
448
+ */
449
+ export type UpdateToolRequestBody =
450
+ | UpdateToolRequestBody4
451
+ | UpdateToolRequestBody5
452
+ | UpdateToolRequestBody1
453
+ | UpdateToolRequestBody2
454
+ | UpdateToolRequestBody3;
455
+
456
+ export type UpdateToolRequest = {
457
+ toolKey: string;
458
+ /**
459
+ * The tool to update
460
+ */
461
+ requestBody?:
462
+ | UpdateToolRequestBody4
463
+ | UpdateToolRequestBody5
464
+ | UpdateToolRequestBody1
465
+ | UpdateToolRequestBody2
466
+ | UpdateToolRequestBody3
467
+ | undefined;
468
+ };
469
+
470
+ /**
471
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
472
+ */
473
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus = {
474
+ Live: "live",
475
+ Draft: "draft",
476
+ Pending: "pending",
477
+ Published: "published",
478
+ } as const;
479
+ /**
480
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
481
+ */
482
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus =
483
+ ClosedEnum<
484
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus
485
+ >;
486
+
487
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONType = {
488
+ Code: "code",
489
+ } as const;
490
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJSONType =
491
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONType>;
492
+
493
+ export const UpdateToolResponseBodyLanguage = {
494
+ Python: "python",
495
+ } as const;
496
+ export type UpdateToolResponseBodyLanguage = ClosedEnum<
497
+ typeof UpdateToolResponseBodyLanguage
498
+ >;
499
+
500
+ export type UpdateToolResponseBodyCodeTool = {
501
+ /**
502
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
503
+ */
504
+ parameters?: { [k: string]: any } | undefined;
505
+ language: UpdateToolResponseBodyLanguage;
506
+ /**
507
+ * The code to execute.
508
+ */
509
+ code: string;
510
+ };
511
+
512
+ export type UpdateToolResponseBody5 = {
513
+ id?: string | undefined;
514
+ /**
515
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
516
+ */
517
+ path: string;
518
+ /**
519
+ * Unique key of the tool as it will be displayed in the UI
520
+ */
521
+ key: string;
522
+ /**
523
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
524
+ */
525
+ displayName: string;
526
+ /**
527
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
528
+ */
529
+ description: string;
530
+ /**
531
+ * The id of the user that created the tool
532
+ */
533
+ createdById?: string | undefined;
534
+ /**
535
+ * The id of the user that last updated the tool
536
+ */
537
+ updatedById?: string | undefined;
538
+ projectId: string;
539
+ workspaceId: string;
540
+ created: string;
541
+ updated: string;
542
+ /**
543
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
544
+ */
545
+ status?:
546
+ | UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus
547
+ | undefined;
548
+ versionHash?: string | undefined;
549
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJSONType;
550
+ codeTool: UpdateToolResponseBodyCodeTool;
551
+ };
552
+
553
+ /**
554
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
555
+ */
556
+ export const UpdateToolResponseBodyToolsResponse200Status = {
557
+ Live: "live",
558
+ Draft: "draft",
559
+ Pending: "pending",
560
+ Published: "published",
561
+ } as const;
562
+ /**
563
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
564
+ */
565
+ export type UpdateToolResponseBodyToolsResponse200Status = ClosedEnum<
566
+ typeof UpdateToolResponseBodyToolsResponse200Status
567
+ >;
568
+
569
+ export const UpdateToolResponseBodyToolsResponse200Type = {
570
+ Mcp: "mcp",
571
+ } as const;
572
+ export type UpdateToolResponseBodyToolsResponse200Type = ClosedEnum<
573
+ typeof UpdateToolResponseBodyToolsResponse200Type
574
+ >;
575
+
576
+ export type UpdateToolResponseBodyHeaders = {
577
+ value: string;
578
+ encrypted?: boolean | undefined;
579
+ };
580
+
581
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson4Type = {
582
+ Object: "object",
583
+ } as const;
584
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJson4Type =
585
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJson4Type>;
586
+
587
+ /**
588
+ * The original MCP tool input schema for LLM conversion
589
+ */
590
+ export type UpdateToolResponseBodyInputSchema = {
591
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJson4Type;
592
+ properties?: { [k: string]: any } | undefined;
593
+ required?: Array<string> | undefined;
594
+ };
595
+
596
+ /**
597
+ * The connection type used by the MCP server
598
+ */
599
+ export const UpdateToolResponseBodyConnectionType = {
600
+ Http: "http",
601
+ Sse: "sse",
602
+ } as const;
603
+ /**
604
+ * The connection type used by the MCP server
605
+ */
606
+ export type UpdateToolResponseBodyConnectionType = ClosedEnum<
607
+ typeof UpdateToolResponseBodyConnectionType
608
+ >;
609
+
610
+ export type UpdateToolResponseBodyMcp = {
611
+ /**
612
+ * The ID of the MCP server this tool belongs to
613
+ */
614
+ serverId: string;
615
+ /**
616
+ * The original tool name from the MCP server
617
+ */
618
+ toolName: string;
619
+ /**
620
+ * The MCP server URL (cached for execution)
621
+ */
622
+ serverUrl: string;
623
+ /**
624
+ * HTTP headers for MCP server requests (encrypted format)
625
+ */
626
+ headers?: { [k: string]: UpdateToolResponseBodyHeaders } | undefined;
627
+ /**
628
+ * The original MCP tool input schema for LLM conversion
629
+ */
630
+ inputSchema: UpdateToolResponseBodyInputSchema;
631
+ /**
632
+ * The connection type used by the MCP server
633
+ */
634
+ connectionType: UpdateToolResponseBodyConnectionType;
635
+ };
636
+
637
+ export type UpdateToolResponseBody4 = {
638
+ id?: string | undefined;
639
+ /**
640
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
641
+ */
642
+ path: string;
643
+ /**
644
+ * Unique key of the tool as it will be displayed in the UI
645
+ */
646
+ key: string;
647
+ /**
648
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
649
+ */
650
+ displayName: string;
651
+ /**
652
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
653
+ */
654
+ description: string;
655
+ /**
656
+ * The id of the user that created the tool
657
+ */
658
+ createdById?: string | undefined;
659
+ /**
660
+ * The id of the user that last updated the tool
661
+ */
662
+ updatedById?: string | undefined;
663
+ projectId: string;
664
+ workspaceId: string;
665
+ created: string;
666
+ updated: string;
667
+ /**
668
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
669
+ */
670
+ status?: UpdateToolResponseBodyToolsResponse200Status | undefined;
671
+ versionHash?: string | undefined;
672
+ type: UpdateToolResponseBodyToolsResponse200Type;
673
+ mcp: UpdateToolResponseBodyMcp;
674
+ };
675
+
676
+ /**
677
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
678
+ */
679
+ export const UpdateToolResponseBodyToolsResponseStatus = {
680
+ Live: "live",
681
+ Draft: "draft",
682
+ Pending: "pending",
683
+ Published: "published",
684
+ } as const;
685
+ /**
686
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
687
+ */
688
+ export type UpdateToolResponseBodyToolsResponseStatus = ClosedEnum<
689
+ typeof UpdateToolResponseBodyToolsResponseStatus
690
+ >;
691
+
692
+ export const UpdateToolResponseBodyToolsResponseType = {
693
+ Http: "http",
694
+ } as const;
695
+ export type UpdateToolResponseBodyToolsResponseType = ClosedEnum<
696
+ typeof UpdateToolResponseBodyToolsResponseType
697
+ >;
698
+
699
+ /**
700
+ * The HTTP method to use.
701
+ */
702
+ export const UpdateToolResponseBodyMethod = {
703
+ Get: "GET",
704
+ Post: "POST",
705
+ Put: "PUT",
706
+ Delete: "DELETE",
707
+ } as const;
708
+ /**
709
+ * The HTTP method to use.
710
+ */
711
+ export type UpdateToolResponseBodyMethod = ClosedEnum<
712
+ typeof UpdateToolResponseBodyMethod
713
+ >;
714
+
715
+ /**
716
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
717
+ */
718
+ export type UpdateToolResponseBodyBlueprint = {
719
+ /**
720
+ * The URL to send the request to.
721
+ */
722
+ url: string;
723
+ /**
724
+ * The HTTP method to use.
725
+ */
726
+ method: UpdateToolResponseBodyMethod;
727
+ /**
728
+ * The headers to send with the request.
729
+ */
730
+ headers?: { [k: string]: string } | undefined;
731
+ /**
732
+ * The body to send with the request.
733
+ */
734
+ body?: { [k: string]: any } | undefined;
735
+ };
736
+
737
+ /**
738
+ * The type of the argument.
739
+ */
740
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson3Type = {
741
+ String: "string",
742
+ Number: "number",
743
+ Boolean: "boolean",
744
+ } as const;
745
+ /**
746
+ * The type of the argument.
747
+ */
748
+ export type UpdateToolResponseBodyToolsResponse200ApplicationJson3Type =
749
+ ClosedEnum<typeof UpdateToolResponseBodyToolsResponse200ApplicationJson3Type>;
750
+
751
+ /**
752
+ * The default value of the argument.
753
+ */
754
+ export type UpdateToolResponseBodyDefaultValue = string | number | boolean;
755
+
756
+ export type UpdateToolResponseBodyArguments = {
757
+ /**
758
+ * The type of the argument.
759
+ */
760
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJson3Type;
761
+ /**
762
+ * A description of the argument.
763
+ */
764
+ description: string;
765
+ /**
766
+ * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
767
+ */
768
+ sendToModel?: boolean | undefined;
769
+ /**
770
+ * The default value of the argument.
771
+ */
772
+ defaultValue?: string | number | boolean | undefined;
773
+ };
774
+
775
+ export type UpdateToolResponseBodyHttp = {
776
+ /**
777
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
778
+ */
779
+ blueprint: UpdateToolResponseBodyBlueprint;
780
+ /**
781
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
782
+ */
783
+ arguments?: { [k: string]: UpdateToolResponseBodyArguments } | undefined;
784
+ };
785
+
786
+ export type UpdateToolResponseBody3 = {
787
+ id?: string | undefined;
788
+ /**
789
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
790
+ */
791
+ path: string;
792
+ /**
793
+ * Unique key of the tool as it will be displayed in the UI
794
+ */
795
+ key: string;
796
+ /**
797
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
798
+ */
799
+ displayName: string;
800
+ /**
801
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
802
+ */
803
+ description: string;
804
+ /**
805
+ * The id of the user that created the tool
806
+ */
807
+ createdById?: string | undefined;
808
+ /**
809
+ * The id of the user that last updated the tool
810
+ */
811
+ updatedById?: string | undefined;
812
+ projectId: string;
813
+ workspaceId: string;
814
+ created: string;
815
+ updated: string;
816
+ /**
817
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
818
+ */
819
+ status?: UpdateToolResponseBodyToolsResponseStatus | undefined;
820
+ versionHash?: string | undefined;
821
+ type: UpdateToolResponseBodyToolsResponseType;
822
+ http: UpdateToolResponseBodyHttp;
823
+ };
824
+
825
+ /**
826
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
827
+ */
828
+ export const UpdateToolResponseBodyToolsStatus = {
829
+ Live: "live",
830
+ Draft: "draft",
831
+ Pending: "pending",
832
+ Published: "published",
833
+ } as const;
834
+ /**
835
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
836
+ */
837
+ export type UpdateToolResponseBodyToolsStatus = ClosedEnum<
838
+ typeof UpdateToolResponseBodyToolsStatus
839
+ >;
840
+
841
+ export const UpdateToolResponseBodyToolsType = {
842
+ JsonSchema: "json_schema",
843
+ } as const;
844
+ export type UpdateToolResponseBodyToolsType = ClosedEnum<
845
+ typeof UpdateToolResponseBodyToolsType
846
+ >;
847
+
848
+ export type UpdateToolResponseBodyJsonSchema = {
849
+ /**
850
+ * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
851
+ */
852
+ name: string;
853
+ /**
854
+ * A description of what the response format is for. This will be shown to the user.
855
+ */
856
+ description?: string | undefined;
857
+ /**
858
+ * The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
859
+ */
860
+ schema: { [k: string]: any };
861
+ /**
862
+ * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
863
+ */
864
+ strict?: boolean | null | undefined;
865
+ };
866
+
867
+ export type UpdateToolResponseBody2 = {
868
+ id?: string | undefined;
869
+ /**
870
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
871
+ */
872
+ path: string;
873
+ /**
874
+ * Unique key of the tool as it will be displayed in the UI
875
+ */
876
+ key: string;
877
+ /**
878
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
879
+ */
880
+ displayName: string;
881
+ /**
882
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
883
+ */
884
+ description: string;
885
+ /**
886
+ * The id of the user that created the tool
887
+ */
888
+ createdById?: string | undefined;
889
+ /**
890
+ * The id of the user that last updated the tool
891
+ */
892
+ updatedById?: string | undefined;
893
+ projectId: string;
894
+ workspaceId: string;
895
+ created: string;
896
+ updated: string;
897
+ /**
898
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
899
+ */
900
+ status?: UpdateToolResponseBodyToolsStatus | undefined;
901
+ versionHash?: string | undefined;
902
+ type: UpdateToolResponseBodyToolsType;
903
+ jsonSchema: UpdateToolResponseBodyJsonSchema;
904
+ };
905
+
906
+ /**
907
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
908
+ */
909
+ export const UpdateToolResponseBodyStatus = {
910
+ Live: "live",
911
+ Draft: "draft",
912
+ Pending: "pending",
913
+ Published: "published",
914
+ } as const;
915
+ /**
916
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
917
+ */
918
+ export type UpdateToolResponseBodyStatus = ClosedEnum<
919
+ typeof UpdateToolResponseBodyStatus
920
+ >;
921
+
922
+ export const UpdateToolResponseBodyType = {
923
+ Function: "function",
924
+ } as const;
925
+ export type UpdateToolResponseBodyType = ClosedEnum<
926
+ typeof UpdateToolResponseBodyType
927
+ >;
928
+
929
+ export type UpdateToolResponseBodyFunction = {
930
+ /**
931
+ * 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.
932
+ */
933
+ name: string;
934
+ /**
935
+ * A description of what the function does, used by the model to choose when and how to call the function.
936
+ */
937
+ description?: string | undefined;
938
+ /**
939
+ * Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
940
+ */
941
+ strict?: boolean | undefined;
942
+ /**
943
+ * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
944
+ */
945
+ parameters?: { [k: string]: any } | undefined;
946
+ };
947
+
948
+ export type UpdateToolResponseBody1 = {
949
+ id?: string | undefined;
950
+ /**
951
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
952
+ */
953
+ path: string;
954
+ /**
955
+ * Unique key of the tool as it will be displayed in the UI
956
+ */
957
+ key: string;
958
+ /**
959
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
960
+ */
961
+ displayName: string;
962
+ /**
963
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
964
+ */
965
+ description: string;
966
+ /**
967
+ * The id of the user that created the tool
968
+ */
969
+ createdById?: string | undefined;
970
+ /**
971
+ * The id of the user that last updated the tool
972
+ */
973
+ updatedById?: string | undefined;
974
+ projectId: string;
975
+ workspaceId: string;
976
+ created: string;
977
+ updated: string;
978
+ /**
979
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
980
+ */
981
+ status?: UpdateToolResponseBodyStatus | undefined;
982
+ versionHash?: string | undefined;
983
+ type: UpdateToolResponseBodyType;
984
+ function: UpdateToolResponseBodyFunction;
985
+ };
986
+
987
+ /**
988
+ * Successfully updated the tool.
989
+ */
990
+ export type UpdateToolResponseBody =
991
+ | UpdateToolResponseBody1
992
+ | UpdateToolResponseBody2
993
+ | UpdateToolResponseBody3
994
+ | UpdateToolResponseBody4
995
+ | UpdateToolResponseBody5;
996
+
997
+ /** @internal */
998
+ export const UpdateToolRequestBodyToolsRequest5Status$inboundSchema:
999
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5Status> = z
1000
+ .nativeEnum(UpdateToolRequestBodyToolsRequest5Status);
1001
+
1002
+ /** @internal */
1003
+ export const UpdateToolRequestBodyToolsRequest5Status$outboundSchema:
1004
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5Status> =
1005
+ UpdateToolRequestBodyToolsRequest5Status$inboundSchema;
1006
+
1007
+ /**
1008
+ * @internal
1009
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1010
+ */
1011
+ export namespace UpdateToolRequestBodyToolsRequest5Status$ {
1012
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest5Status$inboundSchema` instead. */
1013
+ export const inboundSchema =
1014
+ UpdateToolRequestBodyToolsRequest5Status$inboundSchema;
1015
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest5Status$outboundSchema` instead. */
1016
+ export const outboundSchema =
1017
+ UpdateToolRequestBodyToolsRequest5Status$outboundSchema;
1018
+ }
1019
+
1020
+ /** @internal */
1021
+ export const UpdateToolRequestBodyToolsRequest5Type$inboundSchema:
1022
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5Type> = z.nativeEnum(
1023
+ UpdateToolRequestBodyToolsRequest5Type,
1024
+ );
1025
+
1026
+ /** @internal */
1027
+ export const UpdateToolRequestBodyToolsRequest5Type$outboundSchema:
1028
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest5Type> =
1029
+ UpdateToolRequestBodyToolsRequest5Type$inboundSchema;
1030
+
1031
+ /**
1032
+ * @internal
1033
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1034
+ */
1035
+ export namespace UpdateToolRequestBodyToolsRequest5Type$ {
1036
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest5Type$inboundSchema` instead. */
1037
+ export const inboundSchema =
1038
+ UpdateToolRequestBodyToolsRequest5Type$inboundSchema;
1039
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest5Type$outboundSchema` instead. */
1040
+ export const outboundSchema =
1041
+ UpdateToolRequestBodyToolsRequest5Type$outboundSchema;
1042
+ }
1043
+
1044
+ /** @internal */
1045
+ export const UpdateToolRequestBodyLanguage$inboundSchema: z.ZodNativeEnum<
1046
+ typeof UpdateToolRequestBodyLanguage
1047
+ > = z.nativeEnum(UpdateToolRequestBodyLanguage);
1048
+
1049
+ /** @internal */
1050
+ export const UpdateToolRequestBodyLanguage$outboundSchema: z.ZodNativeEnum<
1051
+ typeof UpdateToolRequestBodyLanguage
1052
+ > = UpdateToolRequestBodyLanguage$inboundSchema;
1053
+
1054
+ /**
1055
+ * @internal
1056
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1057
+ */
1058
+ export namespace UpdateToolRequestBodyLanguage$ {
1059
+ /** @deprecated use `UpdateToolRequestBodyLanguage$inboundSchema` instead. */
1060
+ export const inboundSchema = UpdateToolRequestBodyLanguage$inboundSchema;
1061
+ /** @deprecated use `UpdateToolRequestBodyLanguage$outboundSchema` instead. */
1062
+ export const outboundSchema = UpdateToolRequestBodyLanguage$outboundSchema;
1063
+ }
1064
+
1065
+ /** @internal */
1066
+ export const RequestBodyCodeTool$inboundSchema: z.ZodType<
1067
+ RequestBodyCodeTool,
1068
+ z.ZodTypeDef,
1069
+ unknown
1070
+ > = z.object({
1071
+ parameters: z.record(z.any()).optional(),
1072
+ language: UpdateToolRequestBodyLanguage$inboundSchema,
1073
+ code: z.string(),
1074
+ });
1075
+
1076
+ /** @internal */
1077
+ export type RequestBodyCodeTool$Outbound = {
1078
+ parameters?: { [k: string]: any } | undefined;
1079
+ language: string;
1080
+ code: string;
1081
+ };
1082
+
1083
+ /** @internal */
1084
+ export const RequestBodyCodeTool$outboundSchema: z.ZodType<
1085
+ RequestBodyCodeTool$Outbound,
1086
+ z.ZodTypeDef,
1087
+ RequestBodyCodeTool
1088
+ > = z.object({
1089
+ parameters: z.record(z.any()).optional(),
1090
+ language: UpdateToolRequestBodyLanguage$outboundSchema,
1091
+ code: z.string(),
1092
+ });
1093
+
1094
+ /**
1095
+ * @internal
1096
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1097
+ */
1098
+ export namespace RequestBodyCodeTool$ {
1099
+ /** @deprecated use `RequestBodyCodeTool$inboundSchema` instead. */
1100
+ export const inboundSchema = RequestBodyCodeTool$inboundSchema;
1101
+ /** @deprecated use `RequestBodyCodeTool$outboundSchema` instead. */
1102
+ export const outboundSchema = RequestBodyCodeTool$outboundSchema;
1103
+ /** @deprecated use `RequestBodyCodeTool$Outbound` instead. */
1104
+ export type Outbound = RequestBodyCodeTool$Outbound;
1105
+ }
1106
+
1107
+ export function requestBodyCodeToolToJSON(
1108
+ requestBodyCodeTool: RequestBodyCodeTool,
1109
+ ): string {
1110
+ return JSON.stringify(
1111
+ RequestBodyCodeTool$outboundSchema.parse(requestBodyCodeTool),
1112
+ );
1113
+ }
1114
+
1115
+ export function requestBodyCodeToolFromJSON(
1116
+ jsonString: string,
1117
+ ): SafeParseResult<RequestBodyCodeTool, SDKValidationError> {
1118
+ return safeParse(
1119
+ jsonString,
1120
+ (x) => RequestBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
1121
+ `Failed to parse 'RequestBodyCodeTool' from JSON`,
1122
+ );
1123
+ }
1124
+
1125
+ /** @internal */
1126
+ export const UpdateToolRequestBody5$inboundSchema: z.ZodType<
1127
+ UpdateToolRequestBody5,
1128
+ z.ZodTypeDef,
1129
+ unknown
1130
+ > = z.object({
1131
+ path: z.string().optional(),
1132
+ display_name: z.string(),
1133
+ description: z.string().optional(),
1134
+ status: UpdateToolRequestBodyToolsRequest5Status$inboundSchema.default(
1135
+ "live",
1136
+ ),
1137
+ version_hash: z.string().optional(),
1138
+ type: UpdateToolRequestBodyToolsRequest5Type$inboundSchema,
1139
+ code_tool: z.lazy(() => RequestBodyCodeTool$inboundSchema).optional(),
1140
+ }).transform((v) => {
1141
+ return remap$(v, {
1142
+ "display_name": "displayName",
1143
+ "version_hash": "versionHash",
1144
+ "code_tool": "codeTool",
1145
+ });
1146
+ });
1147
+
1148
+ /** @internal */
1149
+ export type UpdateToolRequestBody5$Outbound = {
1150
+ path?: string | undefined;
1151
+ display_name: string;
1152
+ description?: string | undefined;
1153
+ status: string;
1154
+ version_hash?: string | undefined;
1155
+ type: string;
1156
+ code_tool?: RequestBodyCodeTool$Outbound | undefined;
1157
+ };
1158
+
1159
+ /** @internal */
1160
+ export const UpdateToolRequestBody5$outboundSchema: z.ZodType<
1161
+ UpdateToolRequestBody5$Outbound,
1162
+ z.ZodTypeDef,
1163
+ UpdateToolRequestBody5
1164
+ > = z.object({
1165
+ path: z.string().optional(),
1166
+ displayName: z.string(),
1167
+ description: z.string().optional(),
1168
+ status: UpdateToolRequestBodyToolsRequest5Status$outboundSchema.default(
1169
+ "live",
1170
+ ),
1171
+ versionHash: z.string().optional(),
1172
+ type: UpdateToolRequestBodyToolsRequest5Type$outboundSchema,
1173
+ codeTool: z.lazy(() => RequestBodyCodeTool$outboundSchema).optional(),
1174
+ }).transform((v) => {
1175
+ return remap$(v, {
1176
+ displayName: "display_name",
1177
+ versionHash: "version_hash",
1178
+ codeTool: "code_tool",
1179
+ });
1180
+ });
1181
+
1182
+ /**
1183
+ * @internal
1184
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1185
+ */
1186
+ export namespace UpdateToolRequestBody5$ {
1187
+ /** @deprecated use `UpdateToolRequestBody5$inboundSchema` instead. */
1188
+ export const inboundSchema = UpdateToolRequestBody5$inboundSchema;
1189
+ /** @deprecated use `UpdateToolRequestBody5$outboundSchema` instead. */
1190
+ export const outboundSchema = UpdateToolRequestBody5$outboundSchema;
1191
+ /** @deprecated use `UpdateToolRequestBody5$Outbound` instead. */
1192
+ export type Outbound = UpdateToolRequestBody5$Outbound;
1193
+ }
1194
+
1195
+ export function updateToolRequestBody5ToJSON(
1196
+ updateToolRequestBody5: UpdateToolRequestBody5,
1197
+ ): string {
1198
+ return JSON.stringify(
1199
+ UpdateToolRequestBody5$outboundSchema.parse(updateToolRequestBody5),
1200
+ );
1201
+ }
1202
+
1203
+ export function updateToolRequestBody5FromJSON(
1204
+ jsonString: string,
1205
+ ): SafeParseResult<UpdateToolRequestBody5, SDKValidationError> {
1206
+ return safeParse(
1207
+ jsonString,
1208
+ (x) => UpdateToolRequestBody5$inboundSchema.parse(JSON.parse(x)),
1209
+ `Failed to parse 'UpdateToolRequestBody5' from JSON`,
1210
+ );
1211
+ }
1212
+
1213
+ /** @internal */
1214
+ export const UpdateToolRequestBodyToolsRequest4Status$inboundSchema:
1215
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4Status> = z
1216
+ .nativeEnum(UpdateToolRequestBodyToolsRequest4Status);
1217
+
1218
+ /** @internal */
1219
+ export const UpdateToolRequestBodyToolsRequest4Status$outboundSchema:
1220
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4Status> =
1221
+ UpdateToolRequestBodyToolsRequest4Status$inboundSchema;
1222
+
1223
+ /**
1224
+ * @internal
1225
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1226
+ */
1227
+ export namespace UpdateToolRequestBodyToolsRequest4Status$ {
1228
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest4Status$inboundSchema` instead. */
1229
+ export const inboundSchema =
1230
+ UpdateToolRequestBodyToolsRequest4Status$inboundSchema;
1231
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest4Status$outboundSchema` instead. */
1232
+ export const outboundSchema =
1233
+ UpdateToolRequestBodyToolsRequest4Status$outboundSchema;
1234
+ }
1235
+
1236
+ /** @internal */
1237
+ export const UpdateToolRequestBodyToolsRequest4Type$inboundSchema:
1238
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4Type> = z.nativeEnum(
1239
+ UpdateToolRequestBodyToolsRequest4Type,
1240
+ );
1241
+
1242
+ /** @internal */
1243
+ export const UpdateToolRequestBodyToolsRequest4Type$outboundSchema:
1244
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4Type> =
1245
+ UpdateToolRequestBodyToolsRequest4Type$inboundSchema;
1246
+
1247
+ /**
1248
+ * @internal
1249
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1250
+ */
1251
+ export namespace UpdateToolRequestBodyToolsRequest4Type$ {
1252
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest4Type$inboundSchema` instead. */
1253
+ export const inboundSchema =
1254
+ UpdateToolRequestBodyToolsRequest4Type$inboundSchema;
1255
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest4Type$outboundSchema` instead. */
1256
+ export const outboundSchema =
1257
+ UpdateToolRequestBodyToolsRequest4Type$outboundSchema;
1258
+ }
1259
+
1260
+ /** @internal */
1261
+ export const RequestBodyHeaders$inboundSchema: z.ZodType<
1262
+ RequestBodyHeaders,
1263
+ z.ZodTypeDef,
1264
+ unknown
1265
+ > = z.object({
1266
+ value: z.string(),
1267
+ encrypted: z.boolean().default(false),
1268
+ });
1269
+
1270
+ /** @internal */
1271
+ export type RequestBodyHeaders$Outbound = {
1272
+ value: string;
1273
+ encrypted: boolean;
1274
+ };
1275
+
1276
+ /** @internal */
1277
+ export const RequestBodyHeaders$outboundSchema: z.ZodType<
1278
+ RequestBodyHeaders$Outbound,
1279
+ z.ZodTypeDef,
1280
+ RequestBodyHeaders
1281
+ > = z.object({
1282
+ value: z.string(),
1283
+ encrypted: z.boolean().default(false),
1284
+ });
1285
+
1286
+ /**
1287
+ * @internal
1288
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1289
+ */
1290
+ export namespace RequestBodyHeaders$ {
1291
+ /** @deprecated use `RequestBodyHeaders$inboundSchema` instead. */
1292
+ export const inboundSchema = RequestBodyHeaders$inboundSchema;
1293
+ /** @deprecated use `RequestBodyHeaders$outboundSchema` instead. */
1294
+ export const outboundSchema = RequestBodyHeaders$outboundSchema;
1295
+ /** @deprecated use `RequestBodyHeaders$Outbound` instead. */
1296
+ export type Outbound = RequestBodyHeaders$Outbound;
1297
+ }
1298
+
1299
+ export function requestBodyHeadersToJSON(
1300
+ requestBodyHeaders: RequestBodyHeaders,
1301
+ ): string {
1302
+ return JSON.stringify(
1303
+ RequestBodyHeaders$outboundSchema.parse(requestBodyHeaders),
1304
+ );
1305
+ }
1306
+
1307
+ export function requestBodyHeadersFromJSON(
1308
+ jsonString: string,
1309
+ ): SafeParseResult<RequestBodyHeaders, SDKValidationError> {
1310
+ return safeParse(
1311
+ jsonString,
1312
+ (x) => RequestBodyHeaders$inboundSchema.parse(JSON.parse(x)),
1313
+ `Failed to parse 'RequestBodyHeaders' from JSON`,
1314
+ );
1315
+ }
1316
+
1317
+ /** @internal */
1318
+ export const UpdateToolRequestBodyToolsRequest4McpType$inboundSchema:
1319
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4McpType> = z
1320
+ .nativeEnum(UpdateToolRequestBodyToolsRequest4McpType);
1321
+
1322
+ /** @internal */
1323
+ export const UpdateToolRequestBodyToolsRequest4McpType$outboundSchema:
1324
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest4McpType> =
1325
+ UpdateToolRequestBodyToolsRequest4McpType$inboundSchema;
1326
+
1327
+ /**
1328
+ * @internal
1329
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1330
+ */
1331
+ export namespace UpdateToolRequestBodyToolsRequest4McpType$ {
1332
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest4McpType$inboundSchema` instead. */
1333
+ export const inboundSchema =
1334
+ UpdateToolRequestBodyToolsRequest4McpType$inboundSchema;
1335
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest4McpType$outboundSchema` instead. */
1336
+ export const outboundSchema =
1337
+ UpdateToolRequestBodyToolsRequest4McpType$outboundSchema;
1338
+ }
1339
+
1340
+ /** @internal */
1341
+ export const RequestBodyInputSchema$inboundSchema: z.ZodType<
1342
+ RequestBodyInputSchema,
1343
+ z.ZodTypeDef,
1344
+ unknown
1345
+ > = z.object({
1346
+ type: UpdateToolRequestBodyToolsRequest4McpType$inboundSchema,
1347
+ properties: z.record(z.any()).optional(),
1348
+ required: z.array(z.string()).optional(),
1349
+ });
1350
+
1351
+ /** @internal */
1352
+ export type RequestBodyInputSchema$Outbound = {
1353
+ type: string;
1354
+ properties?: { [k: string]: any } | undefined;
1355
+ required?: Array<string> | undefined;
1356
+ };
1357
+
1358
+ /** @internal */
1359
+ export const RequestBodyInputSchema$outboundSchema: z.ZodType<
1360
+ RequestBodyInputSchema$Outbound,
1361
+ z.ZodTypeDef,
1362
+ RequestBodyInputSchema
1363
+ > = z.object({
1364
+ type: UpdateToolRequestBodyToolsRequest4McpType$outboundSchema,
1365
+ properties: z.record(z.any()).optional(),
1366
+ required: z.array(z.string()).optional(),
1367
+ });
1368
+
1369
+ /**
1370
+ * @internal
1371
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1372
+ */
1373
+ export namespace RequestBodyInputSchema$ {
1374
+ /** @deprecated use `RequestBodyInputSchema$inboundSchema` instead. */
1375
+ export const inboundSchema = RequestBodyInputSchema$inboundSchema;
1376
+ /** @deprecated use `RequestBodyInputSchema$outboundSchema` instead. */
1377
+ export const outboundSchema = RequestBodyInputSchema$outboundSchema;
1378
+ /** @deprecated use `RequestBodyInputSchema$Outbound` instead. */
1379
+ export type Outbound = RequestBodyInputSchema$Outbound;
1380
+ }
1381
+
1382
+ export function requestBodyInputSchemaToJSON(
1383
+ requestBodyInputSchema: RequestBodyInputSchema,
1384
+ ): string {
1385
+ return JSON.stringify(
1386
+ RequestBodyInputSchema$outboundSchema.parse(requestBodyInputSchema),
1387
+ );
1388
+ }
1389
+
1390
+ export function requestBodyInputSchemaFromJSON(
1391
+ jsonString: string,
1392
+ ): SafeParseResult<RequestBodyInputSchema, SDKValidationError> {
1393
+ return safeParse(
1394
+ jsonString,
1395
+ (x) => RequestBodyInputSchema$inboundSchema.parse(JSON.parse(x)),
1396
+ `Failed to parse 'RequestBodyInputSchema' from JSON`,
1397
+ );
1398
+ }
1399
+
1400
+ /** @internal */
1401
+ export const RequestBodyConnectionType$inboundSchema: z.ZodNativeEnum<
1402
+ typeof RequestBodyConnectionType
1403
+ > = z.nativeEnum(RequestBodyConnectionType);
1404
+
1405
+ /** @internal */
1406
+ export const RequestBodyConnectionType$outboundSchema: z.ZodNativeEnum<
1407
+ typeof RequestBodyConnectionType
1408
+ > = RequestBodyConnectionType$inboundSchema;
1409
+
1410
+ /**
1411
+ * @internal
1412
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1413
+ */
1414
+ export namespace RequestBodyConnectionType$ {
1415
+ /** @deprecated use `RequestBodyConnectionType$inboundSchema` instead. */
1416
+ export const inboundSchema = RequestBodyConnectionType$inboundSchema;
1417
+ /** @deprecated use `RequestBodyConnectionType$outboundSchema` instead. */
1418
+ export const outboundSchema = RequestBodyConnectionType$outboundSchema;
1419
+ }
1420
+
1421
+ /** @internal */
1422
+ export const RequestBodyMcp$inboundSchema: z.ZodType<
1423
+ RequestBodyMcp,
1424
+ z.ZodTypeDef,
1425
+ unknown
1426
+ > = z.object({
1427
+ server_id: z.string(),
1428
+ tool_name: z.string(),
1429
+ server_url: z.string(),
1430
+ headers: z.record(z.lazy(() => RequestBodyHeaders$inboundSchema)).optional(),
1431
+ input_schema: z.lazy(() => RequestBodyInputSchema$inboundSchema),
1432
+ connection_type: RequestBodyConnectionType$inboundSchema,
1433
+ }).transform((v) => {
1434
+ return remap$(v, {
1435
+ "server_id": "serverId",
1436
+ "tool_name": "toolName",
1437
+ "server_url": "serverUrl",
1438
+ "input_schema": "inputSchema",
1439
+ "connection_type": "connectionType",
1440
+ });
1441
+ });
1442
+
1443
+ /** @internal */
1444
+ export type RequestBodyMcp$Outbound = {
1445
+ server_id: string;
1446
+ tool_name: string;
1447
+ server_url: string;
1448
+ headers?: { [k: string]: RequestBodyHeaders$Outbound } | undefined;
1449
+ input_schema: RequestBodyInputSchema$Outbound;
1450
+ connection_type: string;
1451
+ };
1452
+
1453
+ /** @internal */
1454
+ export const RequestBodyMcp$outboundSchema: z.ZodType<
1455
+ RequestBodyMcp$Outbound,
1456
+ z.ZodTypeDef,
1457
+ RequestBodyMcp
1458
+ > = z.object({
1459
+ serverId: z.string(),
1460
+ toolName: z.string(),
1461
+ serverUrl: z.string(),
1462
+ headers: z.record(z.lazy(() => RequestBodyHeaders$outboundSchema)).optional(),
1463
+ inputSchema: z.lazy(() => RequestBodyInputSchema$outboundSchema),
1464
+ connectionType: RequestBodyConnectionType$outboundSchema,
1465
+ }).transform((v) => {
1466
+ return remap$(v, {
1467
+ serverId: "server_id",
1468
+ toolName: "tool_name",
1469
+ serverUrl: "server_url",
1470
+ inputSchema: "input_schema",
1471
+ connectionType: "connection_type",
1472
+ });
1473
+ });
1474
+
1475
+ /**
1476
+ * @internal
1477
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1478
+ */
1479
+ export namespace RequestBodyMcp$ {
1480
+ /** @deprecated use `RequestBodyMcp$inboundSchema` instead. */
1481
+ export const inboundSchema = RequestBodyMcp$inboundSchema;
1482
+ /** @deprecated use `RequestBodyMcp$outboundSchema` instead. */
1483
+ export const outboundSchema = RequestBodyMcp$outboundSchema;
1484
+ /** @deprecated use `RequestBodyMcp$Outbound` instead. */
1485
+ export type Outbound = RequestBodyMcp$Outbound;
1486
+ }
1487
+
1488
+ export function requestBodyMcpToJSON(requestBodyMcp: RequestBodyMcp): string {
1489
+ return JSON.stringify(RequestBodyMcp$outboundSchema.parse(requestBodyMcp));
1490
+ }
1491
+
1492
+ export function requestBodyMcpFromJSON(
1493
+ jsonString: string,
1494
+ ): SafeParseResult<RequestBodyMcp, SDKValidationError> {
1495
+ return safeParse(
1496
+ jsonString,
1497
+ (x) => RequestBodyMcp$inboundSchema.parse(JSON.parse(x)),
1498
+ `Failed to parse 'RequestBodyMcp' from JSON`,
1499
+ );
1500
+ }
1501
+
1502
+ /** @internal */
1503
+ export const UpdateToolRequestBody4$inboundSchema: z.ZodType<
1504
+ UpdateToolRequestBody4,
1505
+ z.ZodTypeDef,
1506
+ unknown
1507
+ > = z.object({
1508
+ path: z.string().optional(),
1509
+ display_name: z.string(),
1510
+ description: z.string().optional(),
1511
+ status: UpdateToolRequestBodyToolsRequest4Status$inboundSchema.default(
1512
+ "live",
1513
+ ),
1514
+ version_hash: z.string().optional(),
1515
+ type: UpdateToolRequestBodyToolsRequest4Type$inboundSchema,
1516
+ mcp: z.lazy(() => RequestBodyMcp$inboundSchema).optional(),
1517
+ }).transform((v) => {
1518
+ return remap$(v, {
1519
+ "display_name": "displayName",
1520
+ "version_hash": "versionHash",
1521
+ });
1522
+ });
1523
+
1524
+ /** @internal */
1525
+ export type UpdateToolRequestBody4$Outbound = {
1526
+ path?: string | undefined;
1527
+ display_name: string;
1528
+ description?: string | undefined;
1529
+ status: string;
1530
+ version_hash?: string | undefined;
1531
+ type: string;
1532
+ mcp?: RequestBodyMcp$Outbound | undefined;
1533
+ };
1534
+
1535
+ /** @internal */
1536
+ export const UpdateToolRequestBody4$outboundSchema: z.ZodType<
1537
+ UpdateToolRequestBody4$Outbound,
1538
+ z.ZodTypeDef,
1539
+ UpdateToolRequestBody4
1540
+ > = z.object({
1541
+ path: z.string().optional(),
1542
+ displayName: z.string(),
1543
+ description: z.string().optional(),
1544
+ status: UpdateToolRequestBodyToolsRequest4Status$outboundSchema.default(
1545
+ "live",
1546
+ ),
1547
+ versionHash: z.string().optional(),
1548
+ type: UpdateToolRequestBodyToolsRequest4Type$outboundSchema,
1549
+ mcp: z.lazy(() => RequestBodyMcp$outboundSchema).optional(),
1550
+ }).transform((v) => {
1551
+ return remap$(v, {
1552
+ displayName: "display_name",
1553
+ versionHash: "version_hash",
1554
+ });
1555
+ });
1556
+
1557
+ /**
1558
+ * @internal
1559
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1560
+ */
1561
+ export namespace UpdateToolRequestBody4$ {
1562
+ /** @deprecated use `UpdateToolRequestBody4$inboundSchema` instead. */
1563
+ export const inboundSchema = UpdateToolRequestBody4$inboundSchema;
1564
+ /** @deprecated use `UpdateToolRequestBody4$outboundSchema` instead. */
1565
+ export const outboundSchema = UpdateToolRequestBody4$outboundSchema;
1566
+ /** @deprecated use `UpdateToolRequestBody4$Outbound` instead. */
1567
+ export type Outbound = UpdateToolRequestBody4$Outbound;
1568
+ }
1569
+
1570
+ export function updateToolRequestBody4ToJSON(
1571
+ updateToolRequestBody4: UpdateToolRequestBody4,
1572
+ ): string {
1573
+ return JSON.stringify(
1574
+ UpdateToolRequestBody4$outboundSchema.parse(updateToolRequestBody4),
1575
+ );
1576
+ }
1577
+
1578
+ export function updateToolRequestBody4FromJSON(
1579
+ jsonString: string,
1580
+ ): SafeParseResult<UpdateToolRequestBody4, SDKValidationError> {
1581
+ return safeParse(
1582
+ jsonString,
1583
+ (x) => UpdateToolRequestBody4$inboundSchema.parse(JSON.parse(x)),
1584
+ `Failed to parse 'UpdateToolRequestBody4' from JSON`,
1585
+ );
1586
+ }
1587
+
1588
+ /** @internal */
1589
+ export const UpdateToolRequestBodyToolsRequestStatus$inboundSchema:
1590
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequestStatus> = z
1591
+ .nativeEnum(UpdateToolRequestBodyToolsRequestStatus);
1592
+
1593
+ /** @internal */
1594
+ export const UpdateToolRequestBodyToolsRequestStatus$outboundSchema:
1595
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequestStatus> =
1596
+ UpdateToolRequestBodyToolsRequestStatus$inboundSchema;
1597
+
1598
+ /**
1599
+ * @internal
1600
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1601
+ */
1602
+ export namespace UpdateToolRequestBodyToolsRequestStatus$ {
1603
+ /** @deprecated use `UpdateToolRequestBodyToolsRequestStatus$inboundSchema` instead. */
1604
+ export const inboundSchema =
1605
+ UpdateToolRequestBodyToolsRequestStatus$inboundSchema;
1606
+ /** @deprecated use `UpdateToolRequestBodyToolsRequestStatus$outboundSchema` instead. */
1607
+ export const outboundSchema =
1608
+ UpdateToolRequestBodyToolsRequestStatus$outboundSchema;
1609
+ }
1610
+
1611
+ /** @internal */
1612
+ export const UpdateToolRequestBodyToolsRequestType$inboundSchema:
1613
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequestType> = z.nativeEnum(
1614
+ UpdateToolRequestBodyToolsRequestType,
1615
+ );
1616
+
1617
+ /** @internal */
1618
+ export const UpdateToolRequestBodyToolsRequestType$outboundSchema:
1619
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequestType> =
1620
+ UpdateToolRequestBodyToolsRequestType$inboundSchema;
1621
+
1622
+ /**
1623
+ * @internal
1624
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1625
+ */
1626
+ export namespace UpdateToolRequestBodyToolsRequestType$ {
1627
+ /** @deprecated use `UpdateToolRequestBodyToolsRequestType$inboundSchema` instead. */
1628
+ export const inboundSchema =
1629
+ UpdateToolRequestBodyToolsRequestType$inboundSchema;
1630
+ /** @deprecated use `UpdateToolRequestBodyToolsRequestType$outboundSchema` instead. */
1631
+ export const outboundSchema =
1632
+ UpdateToolRequestBodyToolsRequestType$outboundSchema;
1633
+ }
1634
+
1635
+ /** @internal */
1636
+ export const UpdateToolRequestBodyMethod$inboundSchema: z.ZodNativeEnum<
1637
+ typeof UpdateToolRequestBodyMethod
1638
+ > = z.nativeEnum(UpdateToolRequestBodyMethod);
1639
+
1640
+ /** @internal */
1641
+ export const UpdateToolRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
1642
+ typeof UpdateToolRequestBodyMethod
1643
+ > = UpdateToolRequestBodyMethod$inboundSchema;
1644
+
1645
+ /**
1646
+ * @internal
1647
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1648
+ */
1649
+ export namespace UpdateToolRequestBodyMethod$ {
1650
+ /** @deprecated use `UpdateToolRequestBodyMethod$inboundSchema` instead. */
1651
+ export const inboundSchema = UpdateToolRequestBodyMethod$inboundSchema;
1652
+ /** @deprecated use `UpdateToolRequestBodyMethod$outboundSchema` instead. */
1653
+ export const outboundSchema = UpdateToolRequestBodyMethod$outboundSchema;
1654
+ }
1655
+
1656
+ /** @internal */
1657
+ export const UpdateToolRequestBodyBlueprint$inboundSchema: z.ZodType<
1658
+ UpdateToolRequestBodyBlueprint,
1659
+ z.ZodTypeDef,
1660
+ unknown
1661
+ > = z.object({
1662
+ url: z.string(),
1663
+ method: UpdateToolRequestBodyMethod$inboundSchema,
1664
+ headers: z.record(z.string()).optional(),
1665
+ body: z.record(z.any()).optional(),
1666
+ });
1667
+
1668
+ /** @internal */
1669
+ export type UpdateToolRequestBodyBlueprint$Outbound = {
1670
+ url: string;
1671
+ method: string;
1672
+ headers?: { [k: string]: string } | undefined;
1673
+ body?: { [k: string]: any } | undefined;
1674
+ };
1675
+
1676
+ /** @internal */
1677
+ export const UpdateToolRequestBodyBlueprint$outboundSchema: z.ZodType<
1678
+ UpdateToolRequestBodyBlueprint$Outbound,
1679
+ z.ZodTypeDef,
1680
+ UpdateToolRequestBodyBlueprint
1681
+ > = z.object({
1682
+ url: z.string(),
1683
+ method: UpdateToolRequestBodyMethod$outboundSchema,
1684
+ headers: z.record(z.string()).optional(),
1685
+ body: z.record(z.any()).optional(),
1686
+ });
1687
+
1688
+ /**
1689
+ * @internal
1690
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1691
+ */
1692
+ export namespace UpdateToolRequestBodyBlueprint$ {
1693
+ /** @deprecated use `UpdateToolRequestBodyBlueprint$inboundSchema` instead. */
1694
+ export const inboundSchema = UpdateToolRequestBodyBlueprint$inboundSchema;
1695
+ /** @deprecated use `UpdateToolRequestBodyBlueprint$outboundSchema` instead. */
1696
+ export const outboundSchema = UpdateToolRequestBodyBlueprint$outboundSchema;
1697
+ /** @deprecated use `UpdateToolRequestBodyBlueprint$Outbound` instead. */
1698
+ export type Outbound = UpdateToolRequestBodyBlueprint$Outbound;
1699
+ }
1700
+
1701
+ export function updateToolRequestBodyBlueprintToJSON(
1702
+ updateToolRequestBodyBlueprint: UpdateToolRequestBodyBlueprint,
1703
+ ): string {
1704
+ return JSON.stringify(
1705
+ UpdateToolRequestBodyBlueprint$outboundSchema.parse(
1706
+ updateToolRequestBodyBlueprint,
1707
+ ),
1708
+ );
1709
+ }
1710
+
1711
+ export function updateToolRequestBodyBlueprintFromJSON(
1712
+ jsonString: string,
1713
+ ): SafeParseResult<UpdateToolRequestBodyBlueprint, SDKValidationError> {
1714
+ return safeParse(
1715
+ jsonString,
1716
+ (x) => UpdateToolRequestBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
1717
+ `Failed to parse 'UpdateToolRequestBodyBlueprint' from JSON`,
1718
+ );
1719
+ }
1720
+
1721
+ /** @internal */
1722
+ export const UpdateToolRequestBodyToolsRequest3Type$inboundSchema:
1723
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest3Type> = z.nativeEnum(
1724
+ UpdateToolRequestBodyToolsRequest3Type,
1725
+ );
1726
+
1727
+ /** @internal */
1728
+ export const UpdateToolRequestBodyToolsRequest3Type$outboundSchema:
1729
+ z.ZodNativeEnum<typeof UpdateToolRequestBodyToolsRequest3Type> =
1730
+ UpdateToolRequestBodyToolsRequest3Type$inboundSchema;
1731
+
1732
+ /**
1733
+ * @internal
1734
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1735
+ */
1736
+ export namespace UpdateToolRequestBodyToolsRequest3Type$ {
1737
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest3Type$inboundSchema` instead. */
1738
+ export const inboundSchema =
1739
+ UpdateToolRequestBodyToolsRequest3Type$inboundSchema;
1740
+ /** @deprecated use `UpdateToolRequestBodyToolsRequest3Type$outboundSchema` instead. */
1741
+ export const outboundSchema =
1742
+ UpdateToolRequestBodyToolsRequest3Type$outboundSchema;
1743
+ }
1744
+
1745
+ /** @internal */
1746
+ export const UpdateToolRequestBodyDefaultValue$inboundSchema: z.ZodType<
1747
+ UpdateToolRequestBodyDefaultValue,
1748
+ z.ZodTypeDef,
1749
+ unknown
1750
+ > = z.union([z.string(), z.number(), z.boolean()]);
1751
+
1752
+ /** @internal */
1753
+ export type UpdateToolRequestBodyDefaultValue$Outbound =
1754
+ | string
1755
+ | number
1756
+ | boolean;
1757
+
1758
+ /** @internal */
1759
+ export const UpdateToolRequestBodyDefaultValue$outboundSchema: z.ZodType<
1760
+ UpdateToolRequestBodyDefaultValue$Outbound,
1761
+ z.ZodTypeDef,
1762
+ UpdateToolRequestBodyDefaultValue
1763
+ > = z.union([z.string(), z.number(), z.boolean()]);
1764
+
1765
+ /**
1766
+ * @internal
1767
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1768
+ */
1769
+ export namespace UpdateToolRequestBodyDefaultValue$ {
1770
+ /** @deprecated use `UpdateToolRequestBodyDefaultValue$inboundSchema` instead. */
1771
+ export const inboundSchema = UpdateToolRequestBodyDefaultValue$inboundSchema;
1772
+ /** @deprecated use `UpdateToolRequestBodyDefaultValue$outboundSchema` instead. */
1773
+ export const outboundSchema =
1774
+ UpdateToolRequestBodyDefaultValue$outboundSchema;
1775
+ /** @deprecated use `UpdateToolRequestBodyDefaultValue$Outbound` instead. */
1776
+ export type Outbound = UpdateToolRequestBodyDefaultValue$Outbound;
1777
+ }
1778
+
1779
+ export function updateToolRequestBodyDefaultValueToJSON(
1780
+ updateToolRequestBodyDefaultValue: UpdateToolRequestBodyDefaultValue,
1781
+ ): string {
1782
+ return JSON.stringify(
1783
+ UpdateToolRequestBodyDefaultValue$outboundSchema.parse(
1784
+ updateToolRequestBodyDefaultValue,
1785
+ ),
1786
+ );
1787
+ }
1788
+
1789
+ export function updateToolRequestBodyDefaultValueFromJSON(
1790
+ jsonString: string,
1791
+ ): SafeParseResult<UpdateToolRequestBodyDefaultValue, SDKValidationError> {
1792
+ return safeParse(
1793
+ jsonString,
1794
+ (x) => UpdateToolRequestBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
1795
+ `Failed to parse 'UpdateToolRequestBodyDefaultValue' from JSON`,
1796
+ );
1797
+ }
1798
+
1799
+ /** @internal */
1800
+ export const UpdateToolRequestBodyArguments$inboundSchema: z.ZodType<
1801
+ UpdateToolRequestBodyArguments,
1802
+ z.ZodTypeDef,
1803
+ unknown
1804
+ > = z.object({
1805
+ type: UpdateToolRequestBodyToolsRequest3Type$inboundSchema,
1806
+ description: z.string(),
1807
+ send_to_model: z.boolean().default(true),
1808
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
1809
+ }).transform((v) => {
1810
+ return remap$(v, {
1811
+ "send_to_model": "sendToModel",
1812
+ "default_value": "defaultValue",
1813
+ });
1814
+ });
1815
+
1816
+ /** @internal */
1817
+ export type UpdateToolRequestBodyArguments$Outbound = {
1818
+ type: string;
1819
+ description: string;
1820
+ send_to_model: boolean;
1821
+ default_value?: string | number | boolean | undefined;
1822
+ };
1823
+
1824
+ /** @internal */
1825
+ export const UpdateToolRequestBodyArguments$outboundSchema: z.ZodType<
1826
+ UpdateToolRequestBodyArguments$Outbound,
1827
+ z.ZodTypeDef,
1828
+ UpdateToolRequestBodyArguments
1829
+ > = z.object({
1830
+ type: UpdateToolRequestBodyToolsRequest3Type$outboundSchema,
1831
+ description: z.string(),
1832
+ sendToModel: z.boolean().default(true),
1833
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1834
+ }).transform((v) => {
1835
+ return remap$(v, {
1836
+ sendToModel: "send_to_model",
1837
+ defaultValue: "default_value",
1838
+ });
1839
+ });
1840
+
1841
+ /**
1842
+ * @internal
1843
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1844
+ */
1845
+ export namespace UpdateToolRequestBodyArguments$ {
1846
+ /** @deprecated use `UpdateToolRequestBodyArguments$inboundSchema` instead. */
1847
+ export const inboundSchema = UpdateToolRequestBodyArguments$inboundSchema;
1848
+ /** @deprecated use `UpdateToolRequestBodyArguments$outboundSchema` instead. */
1849
+ export const outboundSchema = UpdateToolRequestBodyArguments$outboundSchema;
1850
+ /** @deprecated use `UpdateToolRequestBodyArguments$Outbound` instead. */
1851
+ export type Outbound = UpdateToolRequestBodyArguments$Outbound;
1852
+ }
1853
+
1854
+ export function updateToolRequestBodyArgumentsToJSON(
1855
+ updateToolRequestBodyArguments: UpdateToolRequestBodyArguments,
1856
+ ): string {
1857
+ return JSON.stringify(
1858
+ UpdateToolRequestBodyArguments$outboundSchema.parse(
1859
+ updateToolRequestBodyArguments,
1860
+ ),
1861
+ );
1862
+ }
1863
+
1864
+ export function updateToolRequestBodyArgumentsFromJSON(
1865
+ jsonString: string,
1866
+ ): SafeParseResult<UpdateToolRequestBodyArguments, SDKValidationError> {
1867
+ return safeParse(
1868
+ jsonString,
1869
+ (x) => UpdateToolRequestBodyArguments$inboundSchema.parse(JSON.parse(x)),
1870
+ `Failed to parse 'UpdateToolRequestBodyArguments' from JSON`,
1871
+ );
1872
+ }
1873
+
1874
+ /** @internal */
1875
+ export const UpdateToolRequestBodyHttp$inboundSchema: z.ZodType<
1876
+ UpdateToolRequestBodyHttp,
1877
+ z.ZodTypeDef,
1878
+ unknown
1879
+ > = z.object({
1880
+ blueprint: z.lazy(() => UpdateToolRequestBodyBlueprint$inboundSchema),
1881
+ arguments: z.record(
1882
+ z.lazy(() => UpdateToolRequestBodyArguments$inboundSchema),
1883
+ ).optional(),
1884
+ });
1885
+
1886
+ /** @internal */
1887
+ export type UpdateToolRequestBodyHttp$Outbound = {
1888
+ blueprint: UpdateToolRequestBodyBlueprint$Outbound;
1889
+ arguments?:
1890
+ | { [k: string]: UpdateToolRequestBodyArguments$Outbound }
1891
+ | undefined;
1892
+ };
1893
+
1894
+ /** @internal */
1895
+ export const UpdateToolRequestBodyHttp$outboundSchema: z.ZodType<
1896
+ UpdateToolRequestBodyHttp$Outbound,
1897
+ z.ZodTypeDef,
1898
+ UpdateToolRequestBodyHttp
1899
+ > = z.object({
1900
+ blueprint: z.lazy(() => UpdateToolRequestBodyBlueprint$outboundSchema),
1901
+ arguments: z.record(
1902
+ z.lazy(() => UpdateToolRequestBodyArguments$outboundSchema),
1903
+ ).optional(),
1904
+ });
1905
+
1906
+ /**
1907
+ * @internal
1908
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1909
+ */
1910
+ export namespace UpdateToolRequestBodyHttp$ {
1911
+ /** @deprecated use `UpdateToolRequestBodyHttp$inboundSchema` instead. */
1912
+ export const inboundSchema = UpdateToolRequestBodyHttp$inboundSchema;
1913
+ /** @deprecated use `UpdateToolRequestBodyHttp$outboundSchema` instead. */
1914
+ export const outboundSchema = UpdateToolRequestBodyHttp$outboundSchema;
1915
+ /** @deprecated use `UpdateToolRequestBodyHttp$Outbound` instead. */
1916
+ export type Outbound = UpdateToolRequestBodyHttp$Outbound;
1917
+ }
1918
+
1919
+ export function updateToolRequestBodyHttpToJSON(
1920
+ updateToolRequestBodyHttp: UpdateToolRequestBodyHttp,
1921
+ ): string {
1922
+ return JSON.stringify(
1923
+ UpdateToolRequestBodyHttp$outboundSchema.parse(updateToolRequestBodyHttp),
1924
+ );
1925
+ }
1926
+
1927
+ export function updateToolRequestBodyHttpFromJSON(
1928
+ jsonString: string,
1929
+ ): SafeParseResult<UpdateToolRequestBodyHttp, SDKValidationError> {
1930
+ return safeParse(
1931
+ jsonString,
1932
+ (x) => UpdateToolRequestBodyHttp$inboundSchema.parse(JSON.parse(x)),
1933
+ `Failed to parse 'UpdateToolRequestBodyHttp' from JSON`,
1934
+ );
1935
+ }
1936
+
1937
+ /** @internal */
1938
+ export const UpdateToolRequestBody3$inboundSchema: z.ZodType<
1939
+ UpdateToolRequestBody3,
1940
+ z.ZodTypeDef,
1941
+ unknown
1942
+ > = z.object({
1943
+ _id: z.string().default("01K60CGQ9T6Z9V3EAXFMJ0FRAY"),
1944
+ path: z.string().optional(),
1945
+ display_name: z.string().optional(),
1946
+ description: z.string().optional(),
1947
+ status: UpdateToolRequestBodyToolsRequestStatus$inboundSchema.default("live"),
1948
+ version_hash: z.string().optional(),
1949
+ type: UpdateToolRequestBodyToolsRequestType$inboundSchema,
1950
+ http: z.lazy(() => UpdateToolRequestBodyHttp$inboundSchema).optional(),
1951
+ }).transform((v) => {
1952
+ return remap$(v, {
1953
+ "_id": "id",
1954
+ "display_name": "displayName",
1955
+ "version_hash": "versionHash",
1956
+ });
1957
+ });
1958
+
1959
+ /** @internal */
1960
+ export type UpdateToolRequestBody3$Outbound = {
1961
+ _id: string;
1962
+ path?: string | undefined;
1963
+ display_name?: string | undefined;
1964
+ description?: string | undefined;
1965
+ status: string;
1966
+ version_hash?: string | undefined;
1967
+ type: string;
1968
+ http?: UpdateToolRequestBodyHttp$Outbound | undefined;
1969
+ };
1970
+
1971
+ /** @internal */
1972
+ export const UpdateToolRequestBody3$outboundSchema: z.ZodType<
1973
+ UpdateToolRequestBody3$Outbound,
1974
+ z.ZodTypeDef,
1975
+ UpdateToolRequestBody3
1976
+ > = z.object({
1977
+ id: z.string().default("01K60CGQ9T6Z9V3EAXFMJ0FRAY"),
1978
+ path: z.string().optional(),
1979
+ displayName: z.string().optional(),
1980
+ description: z.string().optional(),
1981
+ status: UpdateToolRequestBodyToolsRequestStatus$outboundSchema.default(
1982
+ "live",
1983
+ ),
1984
+ versionHash: z.string().optional(),
1985
+ type: UpdateToolRequestBodyToolsRequestType$outboundSchema,
1986
+ http: z.lazy(() => UpdateToolRequestBodyHttp$outboundSchema).optional(),
1987
+ }).transform((v) => {
1988
+ return remap$(v, {
1989
+ id: "_id",
1990
+ displayName: "display_name",
1991
+ versionHash: "version_hash",
1992
+ });
1993
+ });
1994
+
1995
+ /**
1996
+ * @internal
1997
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1998
+ */
1999
+ export namespace UpdateToolRequestBody3$ {
2000
+ /** @deprecated use `UpdateToolRequestBody3$inboundSchema` instead. */
2001
+ export const inboundSchema = UpdateToolRequestBody3$inboundSchema;
2002
+ /** @deprecated use `UpdateToolRequestBody3$outboundSchema` instead. */
2003
+ export const outboundSchema = UpdateToolRequestBody3$outboundSchema;
2004
+ /** @deprecated use `UpdateToolRequestBody3$Outbound` instead. */
2005
+ export type Outbound = UpdateToolRequestBody3$Outbound;
2006
+ }
2007
+
2008
+ export function updateToolRequestBody3ToJSON(
2009
+ updateToolRequestBody3: UpdateToolRequestBody3,
2010
+ ): string {
2011
+ return JSON.stringify(
2012
+ UpdateToolRequestBody3$outboundSchema.parse(updateToolRequestBody3),
2013
+ );
2014
+ }
2015
+
2016
+ export function updateToolRequestBody3FromJSON(
2017
+ jsonString: string,
2018
+ ): SafeParseResult<UpdateToolRequestBody3, SDKValidationError> {
2019
+ return safeParse(
2020
+ jsonString,
2021
+ (x) => UpdateToolRequestBody3$inboundSchema.parse(JSON.parse(x)),
2022
+ `Failed to parse 'UpdateToolRequestBody3' from JSON`,
2023
+ );
2024
+ }
2025
+
2026
+ /** @internal */
2027
+ export const UpdateToolRequestBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
2028
+ typeof UpdateToolRequestBodyToolsStatus
2029
+ > = z.nativeEnum(UpdateToolRequestBodyToolsStatus);
2030
+
2031
+ /** @internal */
2032
+ export const UpdateToolRequestBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
2033
+ typeof UpdateToolRequestBodyToolsStatus
2034
+ > = UpdateToolRequestBodyToolsStatus$inboundSchema;
2035
+
2036
+ /**
2037
+ * @internal
2038
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2039
+ */
2040
+ export namespace UpdateToolRequestBodyToolsStatus$ {
2041
+ /** @deprecated use `UpdateToolRequestBodyToolsStatus$inboundSchema` instead. */
2042
+ export const inboundSchema = UpdateToolRequestBodyToolsStatus$inboundSchema;
2043
+ /** @deprecated use `UpdateToolRequestBodyToolsStatus$outboundSchema` instead. */
2044
+ export const outboundSchema = UpdateToolRequestBodyToolsStatus$outboundSchema;
2045
+ }
2046
+
2047
+ /** @internal */
2048
+ export const UpdateToolRequestBodyToolsType$inboundSchema: z.ZodNativeEnum<
2049
+ typeof UpdateToolRequestBodyToolsType
2050
+ > = z.nativeEnum(UpdateToolRequestBodyToolsType);
2051
+
2052
+ /** @internal */
2053
+ export const UpdateToolRequestBodyToolsType$outboundSchema: z.ZodNativeEnum<
2054
+ typeof UpdateToolRequestBodyToolsType
2055
+ > = UpdateToolRequestBodyToolsType$inboundSchema;
2056
+
2057
+ /**
2058
+ * @internal
2059
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2060
+ */
2061
+ export namespace UpdateToolRequestBodyToolsType$ {
2062
+ /** @deprecated use `UpdateToolRequestBodyToolsType$inboundSchema` instead. */
2063
+ export const inboundSchema = UpdateToolRequestBodyToolsType$inboundSchema;
2064
+ /** @deprecated use `UpdateToolRequestBodyToolsType$outboundSchema` instead. */
2065
+ export const outboundSchema = UpdateToolRequestBodyToolsType$outboundSchema;
2066
+ }
2067
+
2068
+ /** @internal */
2069
+ export const UpdateToolRequestBodyJsonSchema$inboundSchema: z.ZodType<
2070
+ UpdateToolRequestBodyJsonSchema,
2071
+ z.ZodTypeDef,
2072
+ unknown
2073
+ > = z.object({
2074
+ name: z.string(),
2075
+ description: z.string().optional(),
2076
+ schema: z.record(z.any()),
2077
+ strict: z.nullable(z.boolean().default(false)),
2078
+ });
2079
+
2080
+ /** @internal */
2081
+ export type UpdateToolRequestBodyJsonSchema$Outbound = {
2082
+ name: string;
2083
+ description?: string | undefined;
2084
+ schema: { [k: string]: any };
2085
+ strict: boolean | null;
2086
+ };
2087
+
2088
+ /** @internal */
2089
+ export const UpdateToolRequestBodyJsonSchema$outboundSchema: z.ZodType<
2090
+ UpdateToolRequestBodyJsonSchema$Outbound,
2091
+ z.ZodTypeDef,
2092
+ UpdateToolRequestBodyJsonSchema
2093
+ > = z.object({
2094
+ name: z.string(),
2095
+ description: z.string().optional(),
2096
+ schema: z.record(z.any()),
2097
+ strict: z.nullable(z.boolean().default(false)),
2098
+ });
2099
+
2100
+ /**
2101
+ * @internal
2102
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2103
+ */
2104
+ export namespace UpdateToolRequestBodyJsonSchema$ {
2105
+ /** @deprecated use `UpdateToolRequestBodyJsonSchema$inboundSchema` instead. */
2106
+ export const inboundSchema = UpdateToolRequestBodyJsonSchema$inboundSchema;
2107
+ /** @deprecated use `UpdateToolRequestBodyJsonSchema$outboundSchema` instead. */
2108
+ export const outboundSchema = UpdateToolRequestBodyJsonSchema$outboundSchema;
2109
+ /** @deprecated use `UpdateToolRequestBodyJsonSchema$Outbound` instead. */
2110
+ export type Outbound = UpdateToolRequestBodyJsonSchema$Outbound;
2111
+ }
2112
+
2113
+ export function updateToolRequestBodyJsonSchemaToJSON(
2114
+ updateToolRequestBodyJsonSchema: UpdateToolRequestBodyJsonSchema,
2115
+ ): string {
2116
+ return JSON.stringify(
2117
+ UpdateToolRequestBodyJsonSchema$outboundSchema.parse(
2118
+ updateToolRequestBodyJsonSchema,
2119
+ ),
2120
+ );
2121
+ }
2122
+
2123
+ export function updateToolRequestBodyJsonSchemaFromJSON(
2124
+ jsonString: string,
2125
+ ): SafeParseResult<UpdateToolRequestBodyJsonSchema, SDKValidationError> {
2126
+ return safeParse(
2127
+ jsonString,
2128
+ (x) => UpdateToolRequestBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
2129
+ `Failed to parse 'UpdateToolRequestBodyJsonSchema' from JSON`,
2130
+ );
2131
+ }
2132
+
2133
+ /** @internal */
2134
+ export const UpdateToolRequestBody2$inboundSchema: z.ZodType<
2135
+ UpdateToolRequestBody2,
2136
+ z.ZodTypeDef,
2137
+ unknown
2138
+ > = z.object({
2139
+ _id: z.string().default("01K60CGQ9TV0MT91FZ2G0GP2KM"),
2140
+ path: z.string().optional(),
2141
+ display_name: z.string().optional(),
2142
+ description: z.string().optional(),
2143
+ status: UpdateToolRequestBodyToolsStatus$inboundSchema.default("live"),
2144
+ version_hash: z.string().optional(),
2145
+ type: UpdateToolRequestBodyToolsType$inboundSchema,
2146
+ json_schema: z.lazy(() => UpdateToolRequestBodyJsonSchema$inboundSchema)
2147
+ .optional(),
2148
+ }).transform((v) => {
2149
+ return remap$(v, {
2150
+ "_id": "id",
2151
+ "display_name": "displayName",
2152
+ "version_hash": "versionHash",
2153
+ "json_schema": "jsonSchema",
2154
+ });
2155
+ });
2156
+
2157
+ /** @internal */
2158
+ export type UpdateToolRequestBody2$Outbound = {
2159
+ _id: string;
2160
+ path?: string | undefined;
2161
+ display_name?: string | undefined;
2162
+ description?: string | undefined;
2163
+ status: string;
2164
+ version_hash?: string | undefined;
2165
+ type: string;
2166
+ json_schema?: UpdateToolRequestBodyJsonSchema$Outbound | undefined;
2167
+ };
2168
+
2169
+ /** @internal */
2170
+ export const UpdateToolRequestBody2$outboundSchema: z.ZodType<
2171
+ UpdateToolRequestBody2$Outbound,
2172
+ z.ZodTypeDef,
2173
+ UpdateToolRequestBody2
2174
+ > = z.object({
2175
+ id: z.string().default("01K60CGQ9TV0MT91FZ2G0GP2KM"),
2176
+ path: z.string().optional(),
2177
+ displayName: z.string().optional(),
2178
+ description: z.string().optional(),
2179
+ status: UpdateToolRequestBodyToolsStatus$outboundSchema.default("live"),
2180
+ versionHash: z.string().optional(),
2181
+ type: UpdateToolRequestBodyToolsType$outboundSchema,
2182
+ jsonSchema: z.lazy(() => UpdateToolRequestBodyJsonSchema$outboundSchema)
2183
+ .optional(),
2184
+ }).transform((v) => {
2185
+ return remap$(v, {
2186
+ id: "_id",
2187
+ displayName: "display_name",
2188
+ versionHash: "version_hash",
2189
+ jsonSchema: "json_schema",
2190
+ });
2191
+ });
2192
+
2193
+ /**
2194
+ * @internal
2195
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2196
+ */
2197
+ export namespace UpdateToolRequestBody2$ {
2198
+ /** @deprecated use `UpdateToolRequestBody2$inboundSchema` instead. */
2199
+ export const inboundSchema = UpdateToolRequestBody2$inboundSchema;
2200
+ /** @deprecated use `UpdateToolRequestBody2$outboundSchema` instead. */
2201
+ export const outboundSchema = UpdateToolRequestBody2$outboundSchema;
2202
+ /** @deprecated use `UpdateToolRequestBody2$Outbound` instead. */
2203
+ export type Outbound = UpdateToolRequestBody2$Outbound;
2204
+ }
2205
+
2206
+ export function updateToolRequestBody2ToJSON(
2207
+ updateToolRequestBody2: UpdateToolRequestBody2,
2208
+ ): string {
2209
+ return JSON.stringify(
2210
+ UpdateToolRequestBody2$outboundSchema.parse(updateToolRequestBody2),
2211
+ );
2212
+ }
2213
+
2214
+ export function updateToolRequestBody2FromJSON(
2215
+ jsonString: string,
2216
+ ): SafeParseResult<UpdateToolRequestBody2, SDKValidationError> {
2217
+ return safeParse(
2218
+ jsonString,
2219
+ (x) => UpdateToolRequestBody2$inboundSchema.parse(JSON.parse(x)),
2220
+ `Failed to parse 'UpdateToolRequestBody2' from JSON`,
2221
+ );
2222
+ }
2223
+
2224
+ /** @internal */
2225
+ export const UpdateToolRequestBodyStatus$inboundSchema: z.ZodNativeEnum<
2226
+ typeof UpdateToolRequestBodyStatus
2227
+ > = z.nativeEnum(UpdateToolRequestBodyStatus);
2228
+
2229
+ /** @internal */
2230
+ export const UpdateToolRequestBodyStatus$outboundSchema: z.ZodNativeEnum<
2231
+ typeof UpdateToolRequestBodyStatus
2232
+ > = UpdateToolRequestBodyStatus$inboundSchema;
2233
+
2234
+ /**
2235
+ * @internal
2236
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2237
+ */
2238
+ export namespace UpdateToolRequestBodyStatus$ {
2239
+ /** @deprecated use `UpdateToolRequestBodyStatus$inboundSchema` instead. */
2240
+ export const inboundSchema = UpdateToolRequestBodyStatus$inboundSchema;
2241
+ /** @deprecated use `UpdateToolRequestBodyStatus$outboundSchema` instead. */
2242
+ export const outboundSchema = UpdateToolRequestBodyStatus$outboundSchema;
2243
+ }
2244
+
2245
+ /** @internal */
2246
+ export const UpdateToolRequestBodyType$inboundSchema: z.ZodNativeEnum<
2247
+ typeof UpdateToolRequestBodyType
2248
+ > = z.nativeEnum(UpdateToolRequestBodyType);
2249
+
2250
+ /** @internal */
2251
+ export const UpdateToolRequestBodyType$outboundSchema: z.ZodNativeEnum<
2252
+ typeof UpdateToolRequestBodyType
2253
+ > = UpdateToolRequestBodyType$inboundSchema;
2254
+
2255
+ /**
2256
+ * @internal
2257
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2258
+ */
2259
+ export namespace UpdateToolRequestBodyType$ {
2260
+ /** @deprecated use `UpdateToolRequestBodyType$inboundSchema` instead. */
2261
+ export const inboundSchema = UpdateToolRequestBodyType$inboundSchema;
2262
+ /** @deprecated use `UpdateToolRequestBodyType$outboundSchema` instead. */
2263
+ export const outboundSchema = UpdateToolRequestBodyType$outboundSchema;
2264
+ }
2265
+
2266
+ /** @internal */
2267
+ export const UpdateToolRequestBodyFunction$inboundSchema: z.ZodType<
2268
+ UpdateToolRequestBodyFunction,
2269
+ z.ZodTypeDef,
2270
+ unknown
2271
+ > = z.object({
2272
+ name: z.string(),
2273
+ description: z.string().optional(),
2274
+ strict: z.boolean().optional(),
2275
+ parameters: z.record(z.any()).optional(),
2276
+ });
2277
+
2278
+ /** @internal */
2279
+ export type UpdateToolRequestBodyFunction$Outbound = {
2280
+ name: string;
2281
+ description?: string | undefined;
2282
+ strict?: boolean | undefined;
2283
+ parameters?: { [k: string]: any } | undefined;
2284
+ };
2285
+
2286
+ /** @internal */
2287
+ export const UpdateToolRequestBodyFunction$outboundSchema: z.ZodType<
2288
+ UpdateToolRequestBodyFunction$Outbound,
2289
+ z.ZodTypeDef,
2290
+ UpdateToolRequestBodyFunction
2291
+ > = z.object({
2292
+ name: z.string(),
2293
+ description: z.string().optional(),
2294
+ strict: z.boolean().optional(),
2295
+ parameters: z.record(z.any()).optional(),
2296
+ });
2297
+
2298
+ /**
2299
+ * @internal
2300
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2301
+ */
2302
+ export namespace UpdateToolRequestBodyFunction$ {
2303
+ /** @deprecated use `UpdateToolRequestBodyFunction$inboundSchema` instead. */
2304
+ export const inboundSchema = UpdateToolRequestBodyFunction$inboundSchema;
2305
+ /** @deprecated use `UpdateToolRequestBodyFunction$outboundSchema` instead. */
2306
+ export const outboundSchema = UpdateToolRequestBodyFunction$outboundSchema;
2307
+ /** @deprecated use `UpdateToolRequestBodyFunction$Outbound` instead. */
2308
+ export type Outbound = UpdateToolRequestBodyFunction$Outbound;
2309
+ }
2310
+
2311
+ export function updateToolRequestBodyFunctionToJSON(
2312
+ updateToolRequestBodyFunction: UpdateToolRequestBodyFunction,
2313
+ ): string {
2314
+ return JSON.stringify(
2315
+ UpdateToolRequestBodyFunction$outboundSchema.parse(
2316
+ updateToolRequestBodyFunction,
2317
+ ),
2318
+ );
2319
+ }
2320
+
2321
+ export function updateToolRequestBodyFunctionFromJSON(
2322
+ jsonString: string,
2323
+ ): SafeParseResult<UpdateToolRequestBodyFunction, SDKValidationError> {
2324
+ return safeParse(
2325
+ jsonString,
2326
+ (x) => UpdateToolRequestBodyFunction$inboundSchema.parse(JSON.parse(x)),
2327
+ `Failed to parse 'UpdateToolRequestBodyFunction' from JSON`,
2328
+ );
2329
+ }
2330
+
2331
+ /** @internal */
2332
+ export const UpdateToolRequestBody1$inboundSchema: z.ZodType<
2333
+ UpdateToolRequestBody1,
2334
+ z.ZodTypeDef,
2335
+ unknown
2336
+ > = z.object({
2337
+ path: z.string().optional(),
2338
+ display_name: z.string().optional(),
2339
+ description: z.string().optional(),
2340
+ status: UpdateToolRequestBodyStatus$inboundSchema.default("live"),
2341
+ version_hash: z.string().optional(),
2342
+ type: UpdateToolRequestBodyType$inboundSchema,
2343
+ function: z.lazy(() => UpdateToolRequestBodyFunction$inboundSchema)
2344
+ .optional(),
2345
+ }).transform((v) => {
2346
+ return remap$(v, {
2347
+ "display_name": "displayName",
2348
+ "version_hash": "versionHash",
2349
+ });
2350
+ });
2351
+
2352
+ /** @internal */
2353
+ export type UpdateToolRequestBody1$Outbound = {
2354
+ path?: string | undefined;
2355
+ display_name?: string | undefined;
2356
+ description?: string | undefined;
2357
+ status: string;
2358
+ version_hash?: string | undefined;
2359
+ type: string;
2360
+ function?: UpdateToolRequestBodyFunction$Outbound | undefined;
2361
+ };
2362
+
2363
+ /** @internal */
2364
+ export const UpdateToolRequestBody1$outboundSchema: z.ZodType<
2365
+ UpdateToolRequestBody1$Outbound,
2366
+ z.ZodTypeDef,
2367
+ UpdateToolRequestBody1
2368
+ > = z.object({
2369
+ path: z.string().optional(),
2370
+ displayName: z.string().optional(),
2371
+ description: z.string().optional(),
2372
+ status: UpdateToolRequestBodyStatus$outboundSchema.default("live"),
2373
+ versionHash: z.string().optional(),
2374
+ type: UpdateToolRequestBodyType$outboundSchema,
2375
+ function: z.lazy(() => UpdateToolRequestBodyFunction$outboundSchema)
2376
+ .optional(),
2377
+ }).transform((v) => {
2378
+ return remap$(v, {
2379
+ displayName: "display_name",
2380
+ versionHash: "version_hash",
2381
+ });
2382
+ });
2383
+
2384
+ /**
2385
+ * @internal
2386
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2387
+ */
2388
+ export namespace UpdateToolRequestBody1$ {
2389
+ /** @deprecated use `UpdateToolRequestBody1$inboundSchema` instead. */
2390
+ export const inboundSchema = UpdateToolRequestBody1$inboundSchema;
2391
+ /** @deprecated use `UpdateToolRequestBody1$outboundSchema` instead. */
2392
+ export const outboundSchema = UpdateToolRequestBody1$outboundSchema;
2393
+ /** @deprecated use `UpdateToolRequestBody1$Outbound` instead. */
2394
+ export type Outbound = UpdateToolRequestBody1$Outbound;
2395
+ }
2396
+
2397
+ export function updateToolRequestBody1ToJSON(
2398
+ updateToolRequestBody1: UpdateToolRequestBody1,
2399
+ ): string {
2400
+ return JSON.stringify(
2401
+ UpdateToolRequestBody1$outboundSchema.parse(updateToolRequestBody1),
2402
+ );
2403
+ }
2404
+
2405
+ export function updateToolRequestBody1FromJSON(
2406
+ jsonString: string,
2407
+ ): SafeParseResult<UpdateToolRequestBody1, SDKValidationError> {
2408
+ return safeParse(
2409
+ jsonString,
2410
+ (x) => UpdateToolRequestBody1$inboundSchema.parse(JSON.parse(x)),
2411
+ `Failed to parse 'UpdateToolRequestBody1' from JSON`,
2412
+ );
2413
+ }
2414
+
2415
+ /** @internal */
2416
+ export const UpdateToolRequestBody$inboundSchema: z.ZodType<
2417
+ UpdateToolRequestBody,
2418
+ z.ZodTypeDef,
2419
+ unknown
2420
+ > = z.union([
2421
+ z.lazy(() => UpdateToolRequestBody4$inboundSchema),
2422
+ z.lazy(() => UpdateToolRequestBody5$inboundSchema),
2423
+ z.lazy(() => UpdateToolRequestBody1$inboundSchema),
2424
+ z.lazy(() => UpdateToolRequestBody2$inboundSchema),
2425
+ z.lazy(() => UpdateToolRequestBody3$inboundSchema),
2426
+ ]);
2427
+
2428
+ /** @internal */
2429
+ export type UpdateToolRequestBody$Outbound =
2430
+ | UpdateToolRequestBody4$Outbound
2431
+ | UpdateToolRequestBody5$Outbound
2432
+ | UpdateToolRequestBody1$Outbound
2433
+ | UpdateToolRequestBody2$Outbound
2434
+ | UpdateToolRequestBody3$Outbound;
2435
+
2436
+ /** @internal */
2437
+ export const UpdateToolRequestBody$outboundSchema: z.ZodType<
2438
+ UpdateToolRequestBody$Outbound,
2439
+ z.ZodTypeDef,
2440
+ UpdateToolRequestBody
2441
+ > = z.union([
2442
+ z.lazy(() => UpdateToolRequestBody4$outboundSchema),
2443
+ z.lazy(() => UpdateToolRequestBody5$outboundSchema),
2444
+ z.lazy(() => UpdateToolRequestBody1$outboundSchema),
2445
+ z.lazy(() => UpdateToolRequestBody2$outboundSchema),
2446
+ z.lazy(() => UpdateToolRequestBody3$outboundSchema),
2447
+ ]);
2448
+
2449
+ /**
2450
+ * @internal
2451
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2452
+ */
2453
+ export namespace UpdateToolRequestBody$ {
2454
+ /** @deprecated use `UpdateToolRequestBody$inboundSchema` instead. */
2455
+ export const inboundSchema = UpdateToolRequestBody$inboundSchema;
2456
+ /** @deprecated use `UpdateToolRequestBody$outboundSchema` instead. */
2457
+ export const outboundSchema = UpdateToolRequestBody$outboundSchema;
2458
+ /** @deprecated use `UpdateToolRequestBody$Outbound` instead. */
2459
+ export type Outbound = UpdateToolRequestBody$Outbound;
2460
+ }
2461
+
2462
+ export function updateToolRequestBodyToJSON(
2463
+ updateToolRequestBody: UpdateToolRequestBody,
2464
+ ): string {
2465
+ return JSON.stringify(
2466
+ UpdateToolRequestBody$outboundSchema.parse(updateToolRequestBody),
2467
+ );
2468
+ }
2469
+
2470
+ export function updateToolRequestBodyFromJSON(
2471
+ jsonString: string,
2472
+ ): SafeParseResult<UpdateToolRequestBody, SDKValidationError> {
2473
+ return safeParse(
2474
+ jsonString,
2475
+ (x) => UpdateToolRequestBody$inboundSchema.parse(JSON.parse(x)),
2476
+ `Failed to parse 'UpdateToolRequestBody' from JSON`,
2477
+ );
2478
+ }
2479
+
2480
+ /** @internal */
2481
+ export const UpdateToolRequest$inboundSchema: z.ZodType<
2482
+ UpdateToolRequest,
2483
+ z.ZodTypeDef,
2484
+ unknown
2485
+ > = z.object({
2486
+ tool_key: z.string(),
2487
+ RequestBody: z.union([
2488
+ z.lazy(() => UpdateToolRequestBody4$inboundSchema),
2489
+ z.lazy(() => UpdateToolRequestBody5$inboundSchema),
2490
+ z.lazy(() => UpdateToolRequestBody1$inboundSchema),
2491
+ z.lazy(() => UpdateToolRequestBody2$inboundSchema),
2492
+ z.lazy(() => UpdateToolRequestBody3$inboundSchema),
2493
+ ]).optional(),
2494
+ }).transform((v) => {
2495
+ return remap$(v, {
2496
+ "tool_key": "toolKey",
2497
+ "RequestBody": "requestBody",
2498
+ });
2499
+ });
2500
+
2501
+ /** @internal */
2502
+ export type UpdateToolRequest$Outbound = {
2503
+ tool_key: string;
2504
+ RequestBody?:
2505
+ | UpdateToolRequestBody4$Outbound
2506
+ | UpdateToolRequestBody5$Outbound
2507
+ | UpdateToolRequestBody1$Outbound
2508
+ | UpdateToolRequestBody2$Outbound
2509
+ | UpdateToolRequestBody3$Outbound
2510
+ | undefined;
2511
+ };
2512
+
2513
+ /** @internal */
2514
+ export const UpdateToolRequest$outboundSchema: z.ZodType<
2515
+ UpdateToolRequest$Outbound,
2516
+ z.ZodTypeDef,
2517
+ UpdateToolRequest
2518
+ > = z.object({
2519
+ toolKey: z.string(),
2520
+ requestBody: z.union([
2521
+ z.lazy(() => UpdateToolRequestBody4$outboundSchema),
2522
+ z.lazy(() => UpdateToolRequestBody5$outboundSchema),
2523
+ z.lazy(() => UpdateToolRequestBody1$outboundSchema),
2524
+ z.lazy(() => UpdateToolRequestBody2$outboundSchema),
2525
+ z.lazy(() => UpdateToolRequestBody3$outboundSchema),
2526
+ ]).optional(),
2527
+ }).transform((v) => {
2528
+ return remap$(v, {
2529
+ toolKey: "tool_key",
2530
+ requestBody: "RequestBody",
2531
+ });
2532
+ });
2533
+
2534
+ /**
2535
+ * @internal
2536
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2537
+ */
2538
+ export namespace UpdateToolRequest$ {
2539
+ /** @deprecated use `UpdateToolRequest$inboundSchema` instead. */
2540
+ export const inboundSchema = UpdateToolRequest$inboundSchema;
2541
+ /** @deprecated use `UpdateToolRequest$outboundSchema` instead. */
2542
+ export const outboundSchema = UpdateToolRequest$outboundSchema;
2543
+ /** @deprecated use `UpdateToolRequest$Outbound` instead. */
2544
+ export type Outbound = UpdateToolRequest$Outbound;
2545
+ }
2546
+
2547
+ export function updateToolRequestToJSON(
2548
+ updateToolRequest: UpdateToolRequest,
2549
+ ): string {
2550
+ return JSON.stringify(
2551
+ UpdateToolRequest$outboundSchema.parse(updateToolRequest),
2552
+ );
2553
+ }
2554
+
2555
+ export function updateToolRequestFromJSON(
2556
+ jsonString: string,
2557
+ ): SafeParseResult<UpdateToolRequest, SDKValidationError> {
2558
+ return safeParse(
2559
+ jsonString,
2560
+ (x) => UpdateToolRequest$inboundSchema.parse(JSON.parse(x)),
2561
+ `Failed to parse 'UpdateToolRequest' from JSON`,
2562
+ );
2563
+ }
2564
+
2565
+ /** @internal */
2566
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema:
2567
+ z.ZodNativeEnum<
2568
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus
2569
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus);
2570
+
2571
+ /** @internal */
2572
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema:
2573
+ z.ZodNativeEnum<
2574
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus
2575
+ > = UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema;
2576
+
2577
+ /**
2578
+ * @internal
2579
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2580
+ */
2581
+ export namespace UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$ {
2582
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema` instead. */
2583
+ export const inboundSchema =
2584
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema;
2585
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema` instead. */
2586
+ export const outboundSchema =
2587
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema;
2588
+ }
2589
+
2590
+ /** @internal */
2591
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema:
2592
+ z.ZodNativeEnum<
2593
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONType
2594
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJSONType);
2595
+
2596
+ /** @internal */
2597
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema:
2598
+ z.ZodNativeEnum<
2599
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJSONType
2600
+ > = UpdateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
2601
+
2602
+ /**
2603
+ * @internal
2604
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2605
+ */
2606
+ export namespace UpdateToolResponseBodyToolsResponse200ApplicationJSONType$ {
2607
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema` instead. */
2608
+ export const inboundSchema =
2609
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
2610
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema` instead. */
2611
+ export const outboundSchema =
2612
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema;
2613
+ }
2614
+
2615
+ /** @internal */
2616
+ export const UpdateToolResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
2617
+ typeof UpdateToolResponseBodyLanguage
2618
+ > = z.nativeEnum(UpdateToolResponseBodyLanguage);
2619
+
2620
+ /** @internal */
2621
+ export const UpdateToolResponseBodyLanguage$outboundSchema: z.ZodNativeEnum<
2622
+ typeof UpdateToolResponseBodyLanguage
2623
+ > = UpdateToolResponseBodyLanguage$inboundSchema;
2624
+
2625
+ /**
2626
+ * @internal
2627
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2628
+ */
2629
+ export namespace UpdateToolResponseBodyLanguage$ {
2630
+ /** @deprecated use `UpdateToolResponseBodyLanguage$inboundSchema` instead. */
2631
+ export const inboundSchema = UpdateToolResponseBodyLanguage$inboundSchema;
2632
+ /** @deprecated use `UpdateToolResponseBodyLanguage$outboundSchema` instead. */
2633
+ export const outboundSchema = UpdateToolResponseBodyLanguage$outboundSchema;
2634
+ }
2635
+
2636
+ /** @internal */
2637
+ export const UpdateToolResponseBodyCodeTool$inboundSchema: z.ZodType<
2638
+ UpdateToolResponseBodyCodeTool,
2639
+ z.ZodTypeDef,
2640
+ unknown
2641
+ > = z.object({
2642
+ parameters: z.record(z.any()).optional(),
2643
+ language: UpdateToolResponseBodyLanguage$inboundSchema,
2644
+ code: z.string(),
2645
+ });
2646
+
2647
+ /** @internal */
2648
+ export type UpdateToolResponseBodyCodeTool$Outbound = {
2649
+ parameters?: { [k: string]: any } | undefined;
2650
+ language: string;
2651
+ code: string;
2652
+ };
2653
+
2654
+ /** @internal */
2655
+ export const UpdateToolResponseBodyCodeTool$outboundSchema: z.ZodType<
2656
+ UpdateToolResponseBodyCodeTool$Outbound,
2657
+ z.ZodTypeDef,
2658
+ UpdateToolResponseBodyCodeTool
2659
+ > = z.object({
2660
+ parameters: z.record(z.any()).optional(),
2661
+ language: UpdateToolResponseBodyLanguage$outboundSchema,
2662
+ code: z.string(),
2663
+ });
2664
+
2665
+ /**
2666
+ * @internal
2667
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2668
+ */
2669
+ export namespace UpdateToolResponseBodyCodeTool$ {
2670
+ /** @deprecated use `UpdateToolResponseBodyCodeTool$inboundSchema` instead. */
2671
+ export const inboundSchema = UpdateToolResponseBodyCodeTool$inboundSchema;
2672
+ /** @deprecated use `UpdateToolResponseBodyCodeTool$outboundSchema` instead. */
2673
+ export const outboundSchema = UpdateToolResponseBodyCodeTool$outboundSchema;
2674
+ /** @deprecated use `UpdateToolResponseBodyCodeTool$Outbound` instead. */
2675
+ export type Outbound = UpdateToolResponseBodyCodeTool$Outbound;
2676
+ }
2677
+
2678
+ export function updateToolResponseBodyCodeToolToJSON(
2679
+ updateToolResponseBodyCodeTool: UpdateToolResponseBodyCodeTool,
2680
+ ): string {
2681
+ return JSON.stringify(
2682
+ UpdateToolResponseBodyCodeTool$outboundSchema.parse(
2683
+ updateToolResponseBodyCodeTool,
2684
+ ),
2685
+ );
2686
+ }
2687
+
2688
+ export function updateToolResponseBodyCodeToolFromJSON(
2689
+ jsonString: string,
2690
+ ): SafeParseResult<UpdateToolResponseBodyCodeTool, SDKValidationError> {
2691
+ return safeParse(
2692
+ jsonString,
2693
+ (x) => UpdateToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
2694
+ `Failed to parse 'UpdateToolResponseBodyCodeTool' from JSON`,
2695
+ );
2696
+ }
2697
+
2698
+ /** @internal */
2699
+ export const UpdateToolResponseBody5$inboundSchema: z.ZodType<
2700
+ UpdateToolResponseBody5,
2701
+ z.ZodTypeDef,
2702
+ unknown
2703
+ > = z.object({
2704
+ _id: z.string().default("01K60CGQ9SHDJ6VPDR1WQ92ZH1"),
2705
+ path: z.string(),
2706
+ key: z.string(),
2707
+ display_name: z.string(),
2708
+ description: z.string(),
2709
+ created_by_id: z.string().optional(),
2710
+ updated_by_id: z.string().optional(),
2711
+ project_id: z.string(),
2712
+ workspace_id: z.string(),
2713
+ created: z.string(),
2714
+ updated: z.string(),
2715
+ status:
2716
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
2717
+ .default("live"),
2718
+ version_hash: z.string().optional(),
2719
+ type: UpdateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema,
2720
+ code_tool: z.lazy(() => UpdateToolResponseBodyCodeTool$inboundSchema),
2721
+ }).transform((v) => {
2722
+ return remap$(v, {
2723
+ "_id": "id",
2724
+ "display_name": "displayName",
2725
+ "created_by_id": "createdById",
2726
+ "updated_by_id": "updatedById",
2727
+ "project_id": "projectId",
2728
+ "workspace_id": "workspaceId",
2729
+ "version_hash": "versionHash",
2730
+ "code_tool": "codeTool",
2731
+ });
2732
+ });
2733
+
2734
+ /** @internal */
2735
+ export type UpdateToolResponseBody5$Outbound = {
2736
+ _id: string;
2737
+ path: string;
2738
+ key: string;
2739
+ display_name: string;
2740
+ description: string;
2741
+ created_by_id?: string | undefined;
2742
+ updated_by_id?: string | undefined;
2743
+ project_id: string;
2744
+ workspace_id: string;
2745
+ created: string;
2746
+ updated: string;
2747
+ status: string;
2748
+ version_hash?: string | undefined;
2749
+ type: string;
2750
+ code_tool: UpdateToolResponseBodyCodeTool$Outbound;
2751
+ };
2752
+
2753
+ /** @internal */
2754
+ export const UpdateToolResponseBody5$outboundSchema: z.ZodType<
2755
+ UpdateToolResponseBody5$Outbound,
2756
+ z.ZodTypeDef,
2757
+ UpdateToolResponseBody5
2758
+ > = z.object({
2759
+ id: z.string().default("01K60CGQ9SHDJ6VPDR1WQ92ZH1"),
2760
+ path: z.string(),
2761
+ key: z.string(),
2762
+ displayName: z.string(),
2763
+ description: z.string(),
2764
+ createdById: z.string().optional(),
2765
+ updatedById: z.string().optional(),
2766
+ projectId: z.string(),
2767
+ workspaceId: z.string(),
2768
+ created: z.string(),
2769
+ updated: z.string(),
2770
+ status:
2771
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema
2772
+ .default("live"),
2773
+ versionHash: z.string().optional(),
2774
+ type:
2775
+ UpdateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema,
2776
+ codeTool: z.lazy(() => UpdateToolResponseBodyCodeTool$outboundSchema),
2777
+ }).transform((v) => {
2778
+ return remap$(v, {
2779
+ id: "_id",
2780
+ displayName: "display_name",
2781
+ createdById: "created_by_id",
2782
+ updatedById: "updated_by_id",
2783
+ projectId: "project_id",
2784
+ workspaceId: "workspace_id",
2785
+ versionHash: "version_hash",
2786
+ codeTool: "code_tool",
2787
+ });
2788
+ });
2789
+
2790
+ /**
2791
+ * @internal
2792
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2793
+ */
2794
+ export namespace UpdateToolResponseBody5$ {
2795
+ /** @deprecated use `UpdateToolResponseBody5$inboundSchema` instead. */
2796
+ export const inboundSchema = UpdateToolResponseBody5$inboundSchema;
2797
+ /** @deprecated use `UpdateToolResponseBody5$outboundSchema` instead. */
2798
+ export const outboundSchema = UpdateToolResponseBody5$outboundSchema;
2799
+ /** @deprecated use `UpdateToolResponseBody5$Outbound` instead. */
2800
+ export type Outbound = UpdateToolResponseBody5$Outbound;
2801
+ }
2802
+
2803
+ export function updateToolResponseBody5ToJSON(
2804
+ updateToolResponseBody5: UpdateToolResponseBody5,
2805
+ ): string {
2806
+ return JSON.stringify(
2807
+ UpdateToolResponseBody5$outboundSchema.parse(updateToolResponseBody5),
2808
+ );
2809
+ }
2810
+
2811
+ export function updateToolResponseBody5FromJSON(
2812
+ jsonString: string,
2813
+ ): SafeParseResult<UpdateToolResponseBody5, SDKValidationError> {
2814
+ return safeParse(
2815
+ jsonString,
2816
+ (x) => UpdateToolResponseBody5$inboundSchema.parse(JSON.parse(x)),
2817
+ `Failed to parse 'UpdateToolResponseBody5' from JSON`,
2818
+ );
2819
+ }
2820
+
2821
+ /** @internal */
2822
+ export const UpdateToolResponseBodyToolsResponse200Status$inboundSchema:
2823
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponse200Status> = z
2824
+ .nativeEnum(UpdateToolResponseBodyToolsResponse200Status);
2825
+
2826
+ /** @internal */
2827
+ export const UpdateToolResponseBodyToolsResponse200Status$outboundSchema:
2828
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponse200Status> =
2829
+ UpdateToolResponseBodyToolsResponse200Status$inboundSchema;
2830
+
2831
+ /**
2832
+ * @internal
2833
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2834
+ */
2835
+ export namespace UpdateToolResponseBodyToolsResponse200Status$ {
2836
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200Status$inboundSchema` instead. */
2837
+ export const inboundSchema =
2838
+ UpdateToolResponseBodyToolsResponse200Status$inboundSchema;
2839
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200Status$outboundSchema` instead. */
2840
+ export const outboundSchema =
2841
+ UpdateToolResponseBodyToolsResponse200Status$outboundSchema;
2842
+ }
2843
+
2844
+ /** @internal */
2845
+ export const UpdateToolResponseBodyToolsResponse200Type$inboundSchema:
2846
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponse200Type> = z
2847
+ .nativeEnum(UpdateToolResponseBodyToolsResponse200Type);
2848
+
2849
+ /** @internal */
2850
+ export const UpdateToolResponseBodyToolsResponse200Type$outboundSchema:
2851
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponse200Type> =
2852
+ UpdateToolResponseBodyToolsResponse200Type$inboundSchema;
2853
+
2854
+ /**
2855
+ * @internal
2856
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2857
+ */
2858
+ export namespace UpdateToolResponseBodyToolsResponse200Type$ {
2859
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200Type$inboundSchema` instead. */
2860
+ export const inboundSchema =
2861
+ UpdateToolResponseBodyToolsResponse200Type$inboundSchema;
2862
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200Type$outboundSchema` instead. */
2863
+ export const outboundSchema =
2864
+ UpdateToolResponseBodyToolsResponse200Type$outboundSchema;
2865
+ }
2866
+
2867
+ /** @internal */
2868
+ export const UpdateToolResponseBodyHeaders$inboundSchema: z.ZodType<
2869
+ UpdateToolResponseBodyHeaders,
2870
+ z.ZodTypeDef,
2871
+ unknown
2872
+ > = z.object({
2873
+ value: z.string(),
2874
+ encrypted: z.boolean().default(false),
2875
+ });
2876
+
2877
+ /** @internal */
2878
+ export type UpdateToolResponseBodyHeaders$Outbound = {
2879
+ value: string;
2880
+ encrypted: boolean;
2881
+ };
2882
+
2883
+ /** @internal */
2884
+ export const UpdateToolResponseBodyHeaders$outboundSchema: z.ZodType<
2885
+ UpdateToolResponseBodyHeaders$Outbound,
2886
+ z.ZodTypeDef,
2887
+ UpdateToolResponseBodyHeaders
2888
+ > = z.object({
2889
+ value: z.string(),
2890
+ encrypted: z.boolean().default(false),
2891
+ });
2892
+
2893
+ /**
2894
+ * @internal
2895
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2896
+ */
2897
+ export namespace UpdateToolResponseBodyHeaders$ {
2898
+ /** @deprecated use `UpdateToolResponseBodyHeaders$inboundSchema` instead. */
2899
+ export const inboundSchema = UpdateToolResponseBodyHeaders$inboundSchema;
2900
+ /** @deprecated use `UpdateToolResponseBodyHeaders$outboundSchema` instead. */
2901
+ export const outboundSchema = UpdateToolResponseBodyHeaders$outboundSchema;
2902
+ /** @deprecated use `UpdateToolResponseBodyHeaders$Outbound` instead. */
2903
+ export type Outbound = UpdateToolResponseBodyHeaders$Outbound;
2904
+ }
2905
+
2906
+ export function updateToolResponseBodyHeadersToJSON(
2907
+ updateToolResponseBodyHeaders: UpdateToolResponseBodyHeaders,
2908
+ ): string {
2909
+ return JSON.stringify(
2910
+ UpdateToolResponseBodyHeaders$outboundSchema.parse(
2911
+ updateToolResponseBodyHeaders,
2912
+ ),
2913
+ );
2914
+ }
2915
+
2916
+ export function updateToolResponseBodyHeadersFromJSON(
2917
+ jsonString: string,
2918
+ ): SafeParseResult<UpdateToolResponseBodyHeaders, SDKValidationError> {
2919
+ return safeParse(
2920
+ jsonString,
2921
+ (x) => UpdateToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
2922
+ `Failed to parse 'UpdateToolResponseBodyHeaders' from JSON`,
2923
+ );
2924
+ }
2925
+
2926
+ /** @internal */
2927
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema:
2928
+ z.ZodNativeEnum<
2929
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson4Type
2930
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJson4Type);
2931
+
2932
+ /** @internal */
2933
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema:
2934
+ z.ZodNativeEnum<
2935
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson4Type
2936
+ > = UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
2937
+
2938
+ /**
2939
+ * @internal
2940
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2941
+ */
2942
+ export namespace UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$ {
2943
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema` instead. */
2944
+ export const inboundSchema =
2945
+ UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
2946
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema` instead. */
2947
+ export const outboundSchema =
2948
+ UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema;
2949
+ }
2950
+
2951
+ /** @internal */
2952
+ export const UpdateToolResponseBodyInputSchema$inboundSchema: z.ZodType<
2953
+ UpdateToolResponseBodyInputSchema,
2954
+ z.ZodTypeDef,
2955
+ unknown
2956
+ > = z.object({
2957
+ type:
2958
+ UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
2959
+ properties: z.record(z.any()).optional(),
2960
+ required: z.array(z.string()).optional(),
2961
+ });
2962
+
2963
+ /** @internal */
2964
+ export type UpdateToolResponseBodyInputSchema$Outbound = {
2965
+ type: string;
2966
+ properties?: { [k: string]: any } | undefined;
2967
+ required?: Array<string> | undefined;
2968
+ };
2969
+
2970
+ /** @internal */
2971
+ export const UpdateToolResponseBodyInputSchema$outboundSchema: z.ZodType<
2972
+ UpdateToolResponseBodyInputSchema$Outbound,
2973
+ z.ZodTypeDef,
2974
+ UpdateToolResponseBodyInputSchema
2975
+ > = z.object({
2976
+ type:
2977
+ UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
2978
+ properties: z.record(z.any()).optional(),
2979
+ required: z.array(z.string()).optional(),
2980
+ });
2981
+
2982
+ /**
2983
+ * @internal
2984
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2985
+ */
2986
+ export namespace UpdateToolResponseBodyInputSchema$ {
2987
+ /** @deprecated use `UpdateToolResponseBodyInputSchema$inboundSchema` instead. */
2988
+ export const inboundSchema = UpdateToolResponseBodyInputSchema$inboundSchema;
2989
+ /** @deprecated use `UpdateToolResponseBodyInputSchema$outboundSchema` instead. */
2990
+ export const outboundSchema =
2991
+ UpdateToolResponseBodyInputSchema$outboundSchema;
2992
+ /** @deprecated use `UpdateToolResponseBodyInputSchema$Outbound` instead. */
2993
+ export type Outbound = UpdateToolResponseBodyInputSchema$Outbound;
2994
+ }
2995
+
2996
+ export function updateToolResponseBodyInputSchemaToJSON(
2997
+ updateToolResponseBodyInputSchema: UpdateToolResponseBodyInputSchema,
2998
+ ): string {
2999
+ return JSON.stringify(
3000
+ UpdateToolResponseBodyInputSchema$outboundSchema.parse(
3001
+ updateToolResponseBodyInputSchema,
3002
+ ),
3003
+ );
3004
+ }
3005
+
3006
+ export function updateToolResponseBodyInputSchemaFromJSON(
3007
+ jsonString: string,
3008
+ ): SafeParseResult<UpdateToolResponseBodyInputSchema, SDKValidationError> {
3009
+ return safeParse(
3010
+ jsonString,
3011
+ (x) => UpdateToolResponseBodyInputSchema$inboundSchema.parse(JSON.parse(x)),
3012
+ `Failed to parse 'UpdateToolResponseBodyInputSchema' from JSON`,
3013
+ );
3014
+ }
3015
+
3016
+ /** @internal */
3017
+ export const UpdateToolResponseBodyConnectionType$inboundSchema:
3018
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyConnectionType> = z.nativeEnum(
3019
+ UpdateToolResponseBodyConnectionType,
3020
+ );
3021
+
3022
+ /** @internal */
3023
+ export const UpdateToolResponseBodyConnectionType$outboundSchema:
3024
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyConnectionType> =
3025
+ UpdateToolResponseBodyConnectionType$inboundSchema;
3026
+
3027
+ /**
3028
+ * @internal
3029
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3030
+ */
3031
+ export namespace UpdateToolResponseBodyConnectionType$ {
3032
+ /** @deprecated use `UpdateToolResponseBodyConnectionType$inboundSchema` instead. */
3033
+ export const inboundSchema =
3034
+ UpdateToolResponseBodyConnectionType$inboundSchema;
3035
+ /** @deprecated use `UpdateToolResponseBodyConnectionType$outboundSchema` instead. */
3036
+ export const outboundSchema =
3037
+ UpdateToolResponseBodyConnectionType$outboundSchema;
3038
+ }
3039
+
3040
+ /** @internal */
3041
+ export const UpdateToolResponseBodyMcp$inboundSchema: z.ZodType<
3042
+ UpdateToolResponseBodyMcp,
3043
+ z.ZodTypeDef,
3044
+ unknown
3045
+ > = z.object({
3046
+ server_id: z.string(),
3047
+ tool_name: z.string(),
3048
+ server_url: z.string(),
3049
+ headers: z.record(z.lazy(() => UpdateToolResponseBodyHeaders$inboundSchema))
3050
+ .optional(),
3051
+ input_schema: z.lazy(() => UpdateToolResponseBodyInputSchema$inboundSchema),
3052
+ connection_type: UpdateToolResponseBodyConnectionType$inboundSchema,
3053
+ }).transform((v) => {
3054
+ return remap$(v, {
3055
+ "server_id": "serverId",
3056
+ "tool_name": "toolName",
3057
+ "server_url": "serverUrl",
3058
+ "input_schema": "inputSchema",
3059
+ "connection_type": "connectionType",
3060
+ });
3061
+ });
3062
+
3063
+ /** @internal */
3064
+ export type UpdateToolResponseBodyMcp$Outbound = {
3065
+ server_id: string;
3066
+ tool_name: string;
3067
+ server_url: string;
3068
+ headers?: { [k: string]: UpdateToolResponseBodyHeaders$Outbound } | undefined;
3069
+ input_schema: UpdateToolResponseBodyInputSchema$Outbound;
3070
+ connection_type: string;
3071
+ };
3072
+
3073
+ /** @internal */
3074
+ export const UpdateToolResponseBodyMcp$outboundSchema: z.ZodType<
3075
+ UpdateToolResponseBodyMcp$Outbound,
3076
+ z.ZodTypeDef,
3077
+ UpdateToolResponseBodyMcp
3078
+ > = z.object({
3079
+ serverId: z.string(),
3080
+ toolName: z.string(),
3081
+ serverUrl: z.string(),
3082
+ headers: z.record(z.lazy(() => UpdateToolResponseBodyHeaders$outboundSchema))
3083
+ .optional(),
3084
+ inputSchema: z.lazy(() => UpdateToolResponseBodyInputSchema$outboundSchema),
3085
+ connectionType: UpdateToolResponseBodyConnectionType$outboundSchema,
3086
+ }).transform((v) => {
3087
+ return remap$(v, {
3088
+ serverId: "server_id",
3089
+ toolName: "tool_name",
3090
+ serverUrl: "server_url",
3091
+ inputSchema: "input_schema",
3092
+ connectionType: "connection_type",
3093
+ });
3094
+ });
3095
+
3096
+ /**
3097
+ * @internal
3098
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3099
+ */
3100
+ export namespace UpdateToolResponseBodyMcp$ {
3101
+ /** @deprecated use `UpdateToolResponseBodyMcp$inboundSchema` instead. */
3102
+ export const inboundSchema = UpdateToolResponseBodyMcp$inboundSchema;
3103
+ /** @deprecated use `UpdateToolResponseBodyMcp$outboundSchema` instead. */
3104
+ export const outboundSchema = UpdateToolResponseBodyMcp$outboundSchema;
3105
+ /** @deprecated use `UpdateToolResponseBodyMcp$Outbound` instead. */
3106
+ export type Outbound = UpdateToolResponseBodyMcp$Outbound;
3107
+ }
3108
+
3109
+ export function updateToolResponseBodyMcpToJSON(
3110
+ updateToolResponseBodyMcp: UpdateToolResponseBodyMcp,
3111
+ ): string {
3112
+ return JSON.stringify(
3113
+ UpdateToolResponseBodyMcp$outboundSchema.parse(updateToolResponseBodyMcp),
3114
+ );
3115
+ }
3116
+
3117
+ export function updateToolResponseBodyMcpFromJSON(
3118
+ jsonString: string,
3119
+ ): SafeParseResult<UpdateToolResponseBodyMcp, SDKValidationError> {
3120
+ return safeParse(
3121
+ jsonString,
3122
+ (x) => UpdateToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)),
3123
+ `Failed to parse 'UpdateToolResponseBodyMcp' from JSON`,
3124
+ );
3125
+ }
3126
+
3127
+ /** @internal */
3128
+ export const UpdateToolResponseBody4$inboundSchema: z.ZodType<
3129
+ UpdateToolResponseBody4,
3130
+ z.ZodTypeDef,
3131
+ unknown
3132
+ > = z.object({
3133
+ _id: z.string().default("01K60CGQ9S7PNZWTWQ8RTH6VM4"),
3134
+ path: z.string(),
3135
+ key: z.string(),
3136
+ display_name: z.string(),
3137
+ description: z.string(),
3138
+ created_by_id: z.string().optional(),
3139
+ updated_by_id: z.string().optional(),
3140
+ project_id: z.string(),
3141
+ workspace_id: z.string(),
3142
+ created: z.string(),
3143
+ updated: z.string(),
3144
+ status: UpdateToolResponseBodyToolsResponse200Status$inboundSchema.default(
3145
+ "live",
3146
+ ),
3147
+ version_hash: z.string().optional(),
3148
+ type: UpdateToolResponseBodyToolsResponse200Type$inboundSchema,
3149
+ mcp: z.lazy(() => UpdateToolResponseBodyMcp$inboundSchema),
3150
+ }).transform((v) => {
3151
+ return remap$(v, {
3152
+ "_id": "id",
3153
+ "display_name": "displayName",
3154
+ "created_by_id": "createdById",
3155
+ "updated_by_id": "updatedById",
3156
+ "project_id": "projectId",
3157
+ "workspace_id": "workspaceId",
3158
+ "version_hash": "versionHash",
3159
+ });
3160
+ });
3161
+
3162
+ /** @internal */
3163
+ export type UpdateToolResponseBody4$Outbound = {
3164
+ _id: string;
3165
+ path: string;
3166
+ key: string;
3167
+ display_name: string;
3168
+ description: string;
3169
+ created_by_id?: string | undefined;
3170
+ updated_by_id?: string | undefined;
3171
+ project_id: string;
3172
+ workspace_id: string;
3173
+ created: string;
3174
+ updated: string;
3175
+ status: string;
3176
+ version_hash?: string | undefined;
3177
+ type: string;
3178
+ mcp: UpdateToolResponseBodyMcp$Outbound;
3179
+ };
3180
+
3181
+ /** @internal */
3182
+ export const UpdateToolResponseBody4$outboundSchema: z.ZodType<
3183
+ UpdateToolResponseBody4$Outbound,
3184
+ z.ZodTypeDef,
3185
+ UpdateToolResponseBody4
3186
+ > = z.object({
3187
+ id: z.string().default("01K60CGQ9S7PNZWTWQ8RTH6VM4"),
3188
+ path: z.string(),
3189
+ key: z.string(),
3190
+ displayName: z.string(),
3191
+ description: z.string(),
3192
+ createdById: z.string().optional(),
3193
+ updatedById: z.string().optional(),
3194
+ projectId: z.string(),
3195
+ workspaceId: z.string(),
3196
+ created: z.string(),
3197
+ updated: z.string(),
3198
+ status: UpdateToolResponseBodyToolsResponse200Status$outboundSchema.default(
3199
+ "live",
3200
+ ),
3201
+ versionHash: z.string().optional(),
3202
+ type: UpdateToolResponseBodyToolsResponse200Type$outboundSchema,
3203
+ mcp: z.lazy(() => UpdateToolResponseBodyMcp$outboundSchema),
3204
+ }).transform((v) => {
3205
+ return remap$(v, {
3206
+ id: "_id",
3207
+ displayName: "display_name",
3208
+ createdById: "created_by_id",
3209
+ updatedById: "updated_by_id",
3210
+ projectId: "project_id",
3211
+ workspaceId: "workspace_id",
3212
+ versionHash: "version_hash",
3213
+ });
3214
+ });
3215
+
3216
+ /**
3217
+ * @internal
3218
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3219
+ */
3220
+ export namespace UpdateToolResponseBody4$ {
3221
+ /** @deprecated use `UpdateToolResponseBody4$inboundSchema` instead. */
3222
+ export const inboundSchema = UpdateToolResponseBody4$inboundSchema;
3223
+ /** @deprecated use `UpdateToolResponseBody4$outboundSchema` instead. */
3224
+ export const outboundSchema = UpdateToolResponseBody4$outboundSchema;
3225
+ /** @deprecated use `UpdateToolResponseBody4$Outbound` instead. */
3226
+ export type Outbound = UpdateToolResponseBody4$Outbound;
3227
+ }
3228
+
3229
+ export function updateToolResponseBody4ToJSON(
3230
+ updateToolResponseBody4: UpdateToolResponseBody4,
3231
+ ): string {
3232
+ return JSON.stringify(
3233
+ UpdateToolResponseBody4$outboundSchema.parse(updateToolResponseBody4),
3234
+ );
3235
+ }
3236
+
3237
+ export function updateToolResponseBody4FromJSON(
3238
+ jsonString: string,
3239
+ ): SafeParseResult<UpdateToolResponseBody4, SDKValidationError> {
3240
+ return safeParse(
3241
+ jsonString,
3242
+ (x) => UpdateToolResponseBody4$inboundSchema.parse(JSON.parse(x)),
3243
+ `Failed to parse 'UpdateToolResponseBody4' from JSON`,
3244
+ );
3245
+ }
3246
+
3247
+ /** @internal */
3248
+ export const UpdateToolResponseBodyToolsResponseStatus$inboundSchema:
3249
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponseStatus> = z
3250
+ .nativeEnum(UpdateToolResponseBodyToolsResponseStatus);
3251
+
3252
+ /** @internal */
3253
+ export const UpdateToolResponseBodyToolsResponseStatus$outboundSchema:
3254
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponseStatus> =
3255
+ UpdateToolResponseBodyToolsResponseStatus$inboundSchema;
3256
+
3257
+ /**
3258
+ * @internal
3259
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3260
+ */
3261
+ export namespace UpdateToolResponseBodyToolsResponseStatus$ {
3262
+ /** @deprecated use `UpdateToolResponseBodyToolsResponseStatus$inboundSchema` instead. */
3263
+ export const inboundSchema =
3264
+ UpdateToolResponseBodyToolsResponseStatus$inboundSchema;
3265
+ /** @deprecated use `UpdateToolResponseBodyToolsResponseStatus$outboundSchema` instead. */
3266
+ export const outboundSchema =
3267
+ UpdateToolResponseBodyToolsResponseStatus$outboundSchema;
3268
+ }
3269
+
3270
+ /** @internal */
3271
+ export const UpdateToolResponseBodyToolsResponseType$inboundSchema:
3272
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponseType> = z
3273
+ .nativeEnum(UpdateToolResponseBodyToolsResponseType);
3274
+
3275
+ /** @internal */
3276
+ export const UpdateToolResponseBodyToolsResponseType$outboundSchema:
3277
+ z.ZodNativeEnum<typeof UpdateToolResponseBodyToolsResponseType> =
3278
+ UpdateToolResponseBodyToolsResponseType$inboundSchema;
3279
+
3280
+ /**
3281
+ * @internal
3282
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3283
+ */
3284
+ export namespace UpdateToolResponseBodyToolsResponseType$ {
3285
+ /** @deprecated use `UpdateToolResponseBodyToolsResponseType$inboundSchema` instead. */
3286
+ export const inboundSchema =
3287
+ UpdateToolResponseBodyToolsResponseType$inboundSchema;
3288
+ /** @deprecated use `UpdateToolResponseBodyToolsResponseType$outboundSchema` instead. */
3289
+ export const outboundSchema =
3290
+ UpdateToolResponseBodyToolsResponseType$outboundSchema;
3291
+ }
3292
+
3293
+ /** @internal */
3294
+ export const UpdateToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
3295
+ typeof UpdateToolResponseBodyMethod
3296
+ > = z.nativeEnum(UpdateToolResponseBodyMethod);
3297
+
3298
+ /** @internal */
3299
+ export const UpdateToolResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
3300
+ typeof UpdateToolResponseBodyMethod
3301
+ > = UpdateToolResponseBodyMethod$inboundSchema;
3302
+
3303
+ /**
3304
+ * @internal
3305
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3306
+ */
3307
+ export namespace UpdateToolResponseBodyMethod$ {
3308
+ /** @deprecated use `UpdateToolResponseBodyMethod$inboundSchema` instead. */
3309
+ export const inboundSchema = UpdateToolResponseBodyMethod$inboundSchema;
3310
+ /** @deprecated use `UpdateToolResponseBodyMethod$outboundSchema` instead. */
3311
+ export const outboundSchema = UpdateToolResponseBodyMethod$outboundSchema;
3312
+ }
3313
+
3314
+ /** @internal */
3315
+ export const UpdateToolResponseBodyBlueprint$inboundSchema: z.ZodType<
3316
+ UpdateToolResponseBodyBlueprint,
3317
+ z.ZodTypeDef,
3318
+ unknown
3319
+ > = z.object({
3320
+ url: z.string(),
3321
+ method: UpdateToolResponseBodyMethod$inboundSchema,
3322
+ headers: z.record(z.string()).optional(),
3323
+ body: z.record(z.any()).optional(),
3324
+ });
3325
+
3326
+ /** @internal */
3327
+ export type UpdateToolResponseBodyBlueprint$Outbound = {
3328
+ url: string;
3329
+ method: string;
3330
+ headers?: { [k: string]: string } | undefined;
3331
+ body?: { [k: string]: any } | undefined;
3332
+ };
3333
+
3334
+ /** @internal */
3335
+ export const UpdateToolResponseBodyBlueprint$outboundSchema: z.ZodType<
3336
+ UpdateToolResponseBodyBlueprint$Outbound,
3337
+ z.ZodTypeDef,
3338
+ UpdateToolResponseBodyBlueprint
3339
+ > = z.object({
3340
+ url: z.string(),
3341
+ method: UpdateToolResponseBodyMethod$outboundSchema,
3342
+ headers: z.record(z.string()).optional(),
3343
+ body: z.record(z.any()).optional(),
3344
+ });
3345
+
3346
+ /**
3347
+ * @internal
3348
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3349
+ */
3350
+ export namespace UpdateToolResponseBodyBlueprint$ {
3351
+ /** @deprecated use `UpdateToolResponseBodyBlueprint$inboundSchema` instead. */
3352
+ export const inboundSchema = UpdateToolResponseBodyBlueprint$inboundSchema;
3353
+ /** @deprecated use `UpdateToolResponseBodyBlueprint$outboundSchema` instead. */
3354
+ export const outboundSchema = UpdateToolResponseBodyBlueprint$outboundSchema;
3355
+ /** @deprecated use `UpdateToolResponseBodyBlueprint$Outbound` instead. */
3356
+ export type Outbound = UpdateToolResponseBodyBlueprint$Outbound;
3357
+ }
3358
+
3359
+ export function updateToolResponseBodyBlueprintToJSON(
3360
+ updateToolResponseBodyBlueprint: UpdateToolResponseBodyBlueprint,
3361
+ ): string {
3362
+ return JSON.stringify(
3363
+ UpdateToolResponseBodyBlueprint$outboundSchema.parse(
3364
+ updateToolResponseBodyBlueprint,
3365
+ ),
3366
+ );
3367
+ }
3368
+
3369
+ export function updateToolResponseBodyBlueprintFromJSON(
3370
+ jsonString: string,
3371
+ ): SafeParseResult<UpdateToolResponseBodyBlueprint, SDKValidationError> {
3372
+ return safeParse(
3373
+ jsonString,
3374
+ (x) => UpdateToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
3375
+ `Failed to parse 'UpdateToolResponseBodyBlueprint' from JSON`,
3376
+ );
3377
+ }
3378
+
3379
+ /** @internal */
3380
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema:
3381
+ z.ZodNativeEnum<
3382
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson3Type
3383
+ > = z.nativeEnum(UpdateToolResponseBodyToolsResponse200ApplicationJson3Type);
3384
+
3385
+ /** @internal */
3386
+ export const UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema:
3387
+ z.ZodNativeEnum<
3388
+ typeof UpdateToolResponseBodyToolsResponse200ApplicationJson3Type
3389
+ > = UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
3390
+
3391
+ /**
3392
+ * @internal
3393
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3394
+ */
3395
+ export namespace UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$ {
3396
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema` instead. */
3397
+ export const inboundSchema =
3398
+ UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
3399
+ /** @deprecated use `UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema` instead. */
3400
+ export const outboundSchema =
3401
+ UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema;
3402
+ }
3403
+
3404
+ /** @internal */
3405
+ export const UpdateToolResponseBodyDefaultValue$inboundSchema: z.ZodType<
3406
+ UpdateToolResponseBodyDefaultValue,
3407
+ z.ZodTypeDef,
3408
+ unknown
3409
+ > = z.union([z.string(), z.number(), z.boolean()]);
3410
+
3411
+ /** @internal */
3412
+ export type UpdateToolResponseBodyDefaultValue$Outbound =
3413
+ | string
3414
+ | number
3415
+ | boolean;
3416
+
3417
+ /** @internal */
3418
+ export const UpdateToolResponseBodyDefaultValue$outboundSchema: z.ZodType<
3419
+ UpdateToolResponseBodyDefaultValue$Outbound,
3420
+ z.ZodTypeDef,
3421
+ UpdateToolResponseBodyDefaultValue
3422
+ > = z.union([z.string(), z.number(), z.boolean()]);
3423
+
3424
+ /**
3425
+ * @internal
3426
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3427
+ */
3428
+ export namespace UpdateToolResponseBodyDefaultValue$ {
3429
+ /** @deprecated use `UpdateToolResponseBodyDefaultValue$inboundSchema` instead. */
3430
+ export const inboundSchema = UpdateToolResponseBodyDefaultValue$inboundSchema;
3431
+ /** @deprecated use `UpdateToolResponseBodyDefaultValue$outboundSchema` instead. */
3432
+ export const outboundSchema =
3433
+ UpdateToolResponseBodyDefaultValue$outboundSchema;
3434
+ /** @deprecated use `UpdateToolResponseBodyDefaultValue$Outbound` instead. */
3435
+ export type Outbound = UpdateToolResponseBodyDefaultValue$Outbound;
3436
+ }
3437
+
3438
+ export function updateToolResponseBodyDefaultValueToJSON(
3439
+ updateToolResponseBodyDefaultValue: UpdateToolResponseBodyDefaultValue,
3440
+ ): string {
3441
+ return JSON.stringify(
3442
+ UpdateToolResponseBodyDefaultValue$outboundSchema.parse(
3443
+ updateToolResponseBodyDefaultValue,
3444
+ ),
3445
+ );
3446
+ }
3447
+
3448
+ export function updateToolResponseBodyDefaultValueFromJSON(
3449
+ jsonString: string,
3450
+ ): SafeParseResult<UpdateToolResponseBodyDefaultValue, SDKValidationError> {
3451
+ return safeParse(
3452
+ jsonString,
3453
+ (x) =>
3454
+ UpdateToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
3455
+ `Failed to parse 'UpdateToolResponseBodyDefaultValue' from JSON`,
3456
+ );
3457
+ }
3458
+
3459
+ /** @internal */
3460
+ export const UpdateToolResponseBodyArguments$inboundSchema: z.ZodType<
3461
+ UpdateToolResponseBodyArguments,
3462
+ z.ZodTypeDef,
3463
+ unknown
3464
+ > = z.object({
3465
+ type:
3466
+ UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
3467
+ description: z.string(),
3468
+ send_to_model: z.boolean().default(true),
3469
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
3470
+ }).transform((v) => {
3471
+ return remap$(v, {
3472
+ "send_to_model": "sendToModel",
3473
+ "default_value": "defaultValue",
3474
+ });
3475
+ });
3476
+
3477
+ /** @internal */
3478
+ export type UpdateToolResponseBodyArguments$Outbound = {
3479
+ type: string;
3480
+ description: string;
3481
+ send_to_model: boolean;
3482
+ default_value?: string | number | boolean | undefined;
3483
+ };
3484
+
3485
+ /** @internal */
3486
+ export const UpdateToolResponseBodyArguments$outboundSchema: z.ZodType<
3487
+ UpdateToolResponseBodyArguments$Outbound,
3488
+ z.ZodTypeDef,
3489
+ UpdateToolResponseBodyArguments
3490
+ > = z.object({
3491
+ type:
3492
+ UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema,
3493
+ description: z.string(),
3494
+ sendToModel: z.boolean().default(true),
3495
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
3496
+ }).transform((v) => {
3497
+ return remap$(v, {
3498
+ sendToModel: "send_to_model",
3499
+ defaultValue: "default_value",
3500
+ });
3501
+ });
3502
+
3503
+ /**
3504
+ * @internal
3505
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3506
+ */
3507
+ export namespace UpdateToolResponseBodyArguments$ {
3508
+ /** @deprecated use `UpdateToolResponseBodyArguments$inboundSchema` instead. */
3509
+ export const inboundSchema = UpdateToolResponseBodyArguments$inboundSchema;
3510
+ /** @deprecated use `UpdateToolResponseBodyArguments$outboundSchema` instead. */
3511
+ export const outboundSchema = UpdateToolResponseBodyArguments$outboundSchema;
3512
+ /** @deprecated use `UpdateToolResponseBodyArguments$Outbound` instead. */
3513
+ export type Outbound = UpdateToolResponseBodyArguments$Outbound;
3514
+ }
3515
+
3516
+ export function updateToolResponseBodyArgumentsToJSON(
3517
+ updateToolResponseBodyArguments: UpdateToolResponseBodyArguments,
3518
+ ): string {
3519
+ return JSON.stringify(
3520
+ UpdateToolResponseBodyArguments$outboundSchema.parse(
3521
+ updateToolResponseBodyArguments,
3522
+ ),
3523
+ );
3524
+ }
3525
+
3526
+ export function updateToolResponseBodyArgumentsFromJSON(
3527
+ jsonString: string,
3528
+ ): SafeParseResult<UpdateToolResponseBodyArguments, SDKValidationError> {
3529
+ return safeParse(
3530
+ jsonString,
3531
+ (x) => UpdateToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
3532
+ `Failed to parse 'UpdateToolResponseBodyArguments' from JSON`,
3533
+ );
3534
+ }
3535
+
3536
+ /** @internal */
3537
+ export const UpdateToolResponseBodyHttp$inboundSchema: z.ZodType<
3538
+ UpdateToolResponseBodyHttp,
3539
+ z.ZodTypeDef,
3540
+ unknown
3541
+ > = z.object({
3542
+ blueprint: z.lazy(() => UpdateToolResponseBodyBlueprint$inboundSchema),
3543
+ arguments: z.record(
3544
+ z.lazy(() => UpdateToolResponseBodyArguments$inboundSchema),
3545
+ ).optional(),
3546
+ });
3547
+
3548
+ /** @internal */
3549
+ export type UpdateToolResponseBodyHttp$Outbound = {
3550
+ blueprint: UpdateToolResponseBodyBlueprint$Outbound;
3551
+ arguments?:
3552
+ | { [k: string]: UpdateToolResponseBodyArguments$Outbound }
3553
+ | undefined;
3554
+ };
3555
+
3556
+ /** @internal */
3557
+ export const UpdateToolResponseBodyHttp$outboundSchema: z.ZodType<
3558
+ UpdateToolResponseBodyHttp$Outbound,
3559
+ z.ZodTypeDef,
3560
+ UpdateToolResponseBodyHttp
3561
+ > = z.object({
3562
+ blueprint: z.lazy(() => UpdateToolResponseBodyBlueprint$outboundSchema),
3563
+ arguments: z.record(
3564
+ z.lazy(() => UpdateToolResponseBodyArguments$outboundSchema),
3565
+ ).optional(),
3566
+ });
3567
+
3568
+ /**
3569
+ * @internal
3570
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3571
+ */
3572
+ export namespace UpdateToolResponseBodyHttp$ {
3573
+ /** @deprecated use `UpdateToolResponseBodyHttp$inboundSchema` instead. */
3574
+ export const inboundSchema = UpdateToolResponseBodyHttp$inboundSchema;
3575
+ /** @deprecated use `UpdateToolResponseBodyHttp$outboundSchema` instead. */
3576
+ export const outboundSchema = UpdateToolResponseBodyHttp$outboundSchema;
3577
+ /** @deprecated use `UpdateToolResponseBodyHttp$Outbound` instead. */
3578
+ export type Outbound = UpdateToolResponseBodyHttp$Outbound;
3579
+ }
3580
+
3581
+ export function updateToolResponseBodyHttpToJSON(
3582
+ updateToolResponseBodyHttp: UpdateToolResponseBodyHttp,
3583
+ ): string {
3584
+ return JSON.stringify(
3585
+ UpdateToolResponseBodyHttp$outboundSchema.parse(updateToolResponseBodyHttp),
3586
+ );
3587
+ }
3588
+
3589
+ export function updateToolResponseBodyHttpFromJSON(
3590
+ jsonString: string,
3591
+ ): SafeParseResult<UpdateToolResponseBodyHttp, SDKValidationError> {
3592
+ return safeParse(
3593
+ jsonString,
3594
+ (x) => UpdateToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
3595
+ `Failed to parse 'UpdateToolResponseBodyHttp' from JSON`,
3596
+ );
3597
+ }
3598
+
3599
+ /** @internal */
3600
+ export const UpdateToolResponseBody3$inboundSchema: z.ZodType<
3601
+ UpdateToolResponseBody3,
3602
+ z.ZodTypeDef,
3603
+ unknown
3604
+ > = z.object({
3605
+ _id: z.string().default("01K60CGQ9R0MA44KG89EKX7HJ1"),
3606
+ path: z.string(),
3607
+ key: z.string(),
3608
+ display_name: z.string(),
3609
+ description: z.string(),
3610
+ created_by_id: z.string().optional(),
3611
+ updated_by_id: z.string().optional(),
3612
+ project_id: z.string(),
3613
+ workspace_id: z.string(),
3614
+ created: z.string(),
3615
+ updated: z.string(),
3616
+ status: UpdateToolResponseBodyToolsResponseStatus$inboundSchema.default(
3617
+ "live",
3618
+ ),
3619
+ version_hash: z.string().optional(),
3620
+ type: UpdateToolResponseBodyToolsResponseType$inboundSchema,
3621
+ http: z.lazy(() => UpdateToolResponseBodyHttp$inboundSchema),
3622
+ }).transform((v) => {
3623
+ return remap$(v, {
3624
+ "_id": "id",
3625
+ "display_name": "displayName",
3626
+ "created_by_id": "createdById",
3627
+ "updated_by_id": "updatedById",
3628
+ "project_id": "projectId",
3629
+ "workspace_id": "workspaceId",
3630
+ "version_hash": "versionHash",
3631
+ });
3632
+ });
3633
+
3634
+ /** @internal */
3635
+ export type UpdateToolResponseBody3$Outbound = {
3636
+ _id: string;
3637
+ path: string;
3638
+ key: string;
3639
+ display_name: string;
3640
+ description: string;
3641
+ created_by_id?: string | undefined;
3642
+ updated_by_id?: string | undefined;
3643
+ project_id: string;
3644
+ workspace_id: string;
3645
+ created: string;
3646
+ updated: string;
3647
+ status: string;
3648
+ version_hash?: string | undefined;
3649
+ type: string;
3650
+ http: UpdateToolResponseBodyHttp$Outbound;
3651
+ };
3652
+
3653
+ /** @internal */
3654
+ export const UpdateToolResponseBody3$outboundSchema: z.ZodType<
3655
+ UpdateToolResponseBody3$Outbound,
3656
+ z.ZodTypeDef,
3657
+ UpdateToolResponseBody3
3658
+ > = z.object({
3659
+ id: z.string().default("01K60CGQ9R0MA44KG89EKX7HJ1"),
3660
+ path: z.string(),
3661
+ key: z.string(),
3662
+ displayName: z.string(),
3663
+ description: z.string(),
3664
+ createdById: z.string().optional(),
3665
+ updatedById: z.string().optional(),
3666
+ projectId: z.string(),
3667
+ workspaceId: z.string(),
3668
+ created: z.string(),
3669
+ updated: z.string(),
3670
+ status: UpdateToolResponseBodyToolsResponseStatus$outboundSchema.default(
3671
+ "live",
3672
+ ),
3673
+ versionHash: z.string().optional(),
3674
+ type: UpdateToolResponseBodyToolsResponseType$outboundSchema,
3675
+ http: z.lazy(() => UpdateToolResponseBodyHttp$outboundSchema),
3676
+ }).transform((v) => {
3677
+ return remap$(v, {
3678
+ id: "_id",
3679
+ displayName: "display_name",
3680
+ createdById: "created_by_id",
3681
+ updatedById: "updated_by_id",
3682
+ projectId: "project_id",
3683
+ workspaceId: "workspace_id",
3684
+ versionHash: "version_hash",
3685
+ });
3686
+ });
3687
+
3688
+ /**
3689
+ * @internal
3690
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3691
+ */
3692
+ export namespace UpdateToolResponseBody3$ {
3693
+ /** @deprecated use `UpdateToolResponseBody3$inboundSchema` instead. */
3694
+ export const inboundSchema = UpdateToolResponseBody3$inboundSchema;
3695
+ /** @deprecated use `UpdateToolResponseBody3$outboundSchema` instead. */
3696
+ export const outboundSchema = UpdateToolResponseBody3$outboundSchema;
3697
+ /** @deprecated use `UpdateToolResponseBody3$Outbound` instead. */
3698
+ export type Outbound = UpdateToolResponseBody3$Outbound;
3699
+ }
3700
+
3701
+ export function updateToolResponseBody3ToJSON(
3702
+ updateToolResponseBody3: UpdateToolResponseBody3,
3703
+ ): string {
3704
+ return JSON.stringify(
3705
+ UpdateToolResponseBody3$outboundSchema.parse(updateToolResponseBody3),
3706
+ );
3707
+ }
3708
+
3709
+ export function updateToolResponseBody3FromJSON(
3710
+ jsonString: string,
3711
+ ): SafeParseResult<UpdateToolResponseBody3, SDKValidationError> {
3712
+ return safeParse(
3713
+ jsonString,
3714
+ (x) => UpdateToolResponseBody3$inboundSchema.parse(JSON.parse(x)),
3715
+ `Failed to parse 'UpdateToolResponseBody3' from JSON`,
3716
+ );
3717
+ }
3718
+
3719
+ /** @internal */
3720
+ export const UpdateToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
3721
+ typeof UpdateToolResponseBodyToolsStatus
3722
+ > = z.nativeEnum(UpdateToolResponseBodyToolsStatus);
3723
+
3724
+ /** @internal */
3725
+ export const UpdateToolResponseBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
3726
+ typeof UpdateToolResponseBodyToolsStatus
3727
+ > = UpdateToolResponseBodyToolsStatus$inboundSchema;
3728
+
3729
+ /**
3730
+ * @internal
3731
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3732
+ */
3733
+ export namespace UpdateToolResponseBodyToolsStatus$ {
3734
+ /** @deprecated use `UpdateToolResponseBodyToolsStatus$inboundSchema` instead. */
3735
+ export const inboundSchema = UpdateToolResponseBodyToolsStatus$inboundSchema;
3736
+ /** @deprecated use `UpdateToolResponseBodyToolsStatus$outboundSchema` instead. */
3737
+ export const outboundSchema =
3738
+ UpdateToolResponseBodyToolsStatus$outboundSchema;
3739
+ }
3740
+
3741
+ /** @internal */
3742
+ export const UpdateToolResponseBodyToolsType$inboundSchema: z.ZodNativeEnum<
3743
+ typeof UpdateToolResponseBodyToolsType
3744
+ > = z.nativeEnum(UpdateToolResponseBodyToolsType);
3745
+
3746
+ /** @internal */
3747
+ export const UpdateToolResponseBodyToolsType$outboundSchema: z.ZodNativeEnum<
3748
+ typeof UpdateToolResponseBodyToolsType
3749
+ > = UpdateToolResponseBodyToolsType$inboundSchema;
3750
+
3751
+ /**
3752
+ * @internal
3753
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3754
+ */
3755
+ export namespace UpdateToolResponseBodyToolsType$ {
3756
+ /** @deprecated use `UpdateToolResponseBodyToolsType$inboundSchema` instead. */
3757
+ export const inboundSchema = UpdateToolResponseBodyToolsType$inboundSchema;
3758
+ /** @deprecated use `UpdateToolResponseBodyToolsType$outboundSchema` instead. */
3759
+ export const outboundSchema = UpdateToolResponseBodyToolsType$outboundSchema;
3760
+ }
3761
+
3762
+ /** @internal */
3763
+ export const UpdateToolResponseBodyJsonSchema$inboundSchema: z.ZodType<
3764
+ UpdateToolResponseBodyJsonSchema,
3765
+ z.ZodTypeDef,
3766
+ unknown
3767
+ > = z.object({
3768
+ name: z.string(),
3769
+ description: z.string().optional(),
3770
+ schema: z.record(z.any()),
3771
+ strict: z.nullable(z.boolean().default(false)),
3772
+ });
3773
+
3774
+ /** @internal */
3775
+ export type UpdateToolResponseBodyJsonSchema$Outbound = {
3776
+ name: string;
3777
+ description?: string | undefined;
3778
+ schema: { [k: string]: any };
3779
+ strict: boolean | null;
3780
+ };
3781
+
3782
+ /** @internal */
3783
+ export const UpdateToolResponseBodyJsonSchema$outboundSchema: z.ZodType<
3784
+ UpdateToolResponseBodyJsonSchema$Outbound,
3785
+ z.ZodTypeDef,
3786
+ UpdateToolResponseBodyJsonSchema
3787
+ > = z.object({
3788
+ name: z.string(),
3789
+ description: z.string().optional(),
3790
+ schema: z.record(z.any()),
3791
+ strict: z.nullable(z.boolean().default(false)),
3792
+ });
3793
+
3794
+ /**
3795
+ * @internal
3796
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3797
+ */
3798
+ export namespace UpdateToolResponseBodyJsonSchema$ {
3799
+ /** @deprecated use `UpdateToolResponseBodyJsonSchema$inboundSchema` instead. */
3800
+ export const inboundSchema = UpdateToolResponseBodyJsonSchema$inboundSchema;
3801
+ /** @deprecated use `UpdateToolResponseBodyJsonSchema$outboundSchema` instead. */
3802
+ export const outboundSchema = UpdateToolResponseBodyJsonSchema$outboundSchema;
3803
+ /** @deprecated use `UpdateToolResponseBodyJsonSchema$Outbound` instead. */
3804
+ export type Outbound = UpdateToolResponseBodyJsonSchema$Outbound;
3805
+ }
3806
+
3807
+ export function updateToolResponseBodyJsonSchemaToJSON(
3808
+ updateToolResponseBodyJsonSchema: UpdateToolResponseBodyJsonSchema,
3809
+ ): string {
3810
+ return JSON.stringify(
3811
+ UpdateToolResponseBodyJsonSchema$outboundSchema.parse(
3812
+ updateToolResponseBodyJsonSchema,
3813
+ ),
3814
+ );
3815
+ }
3816
+
3817
+ export function updateToolResponseBodyJsonSchemaFromJSON(
3818
+ jsonString: string,
3819
+ ): SafeParseResult<UpdateToolResponseBodyJsonSchema, SDKValidationError> {
3820
+ return safeParse(
3821
+ jsonString,
3822
+ (x) => UpdateToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
3823
+ `Failed to parse 'UpdateToolResponseBodyJsonSchema' from JSON`,
3824
+ );
3825
+ }
3826
+
3827
+ /** @internal */
3828
+ export const UpdateToolResponseBody2$inboundSchema: z.ZodType<
3829
+ UpdateToolResponseBody2,
3830
+ z.ZodTypeDef,
3831
+ unknown
3832
+ > = z.object({
3833
+ _id: z.string().default("01K60CGQ9RVCZSB3YGPA7FW8KB"),
3834
+ path: z.string(),
3835
+ key: z.string(),
3836
+ display_name: z.string(),
3837
+ description: z.string(),
3838
+ created_by_id: z.string().optional(),
3839
+ updated_by_id: z.string().optional(),
3840
+ project_id: z.string(),
3841
+ workspace_id: z.string(),
3842
+ created: z.string(),
3843
+ updated: z.string(),
3844
+ status: UpdateToolResponseBodyToolsStatus$inboundSchema.default("live"),
3845
+ version_hash: z.string().optional(),
3846
+ type: UpdateToolResponseBodyToolsType$inboundSchema,
3847
+ json_schema: z.lazy(() => UpdateToolResponseBodyJsonSchema$inboundSchema),
3848
+ }).transform((v) => {
3849
+ return remap$(v, {
3850
+ "_id": "id",
3851
+ "display_name": "displayName",
3852
+ "created_by_id": "createdById",
3853
+ "updated_by_id": "updatedById",
3854
+ "project_id": "projectId",
3855
+ "workspace_id": "workspaceId",
3856
+ "version_hash": "versionHash",
3857
+ "json_schema": "jsonSchema",
3858
+ });
3859
+ });
3860
+
3861
+ /** @internal */
3862
+ export type UpdateToolResponseBody2$Outbound = {
3863
+ _id: string;
3864
+ path: string;
3865
+ key: string;
3866
+ display_name: string;
3867
+ description: string;
3868
+ created_by_id?: string | undefined;
3869
+ updated_by_id?: string | undefined;
3870
+ project_id: string;
3871
+ workspace_id: string;
3872
+ created: string;
3873
+ updated: string;
3874
+ status: string;
3875
+ version_hash?: string | undefined;
3876
+ type: string;
3877
+ json_schema: UpdateToolResponseBodyJsonSchema$Outbound;
3878
+ };
3879
+
3880
+ /** @internal */
3881
+ export const UpdateToolResponseBody2$outboundSchema: z.ZodType<
3882
+ UpdateToolResponseBody2$Outbound,
3883
+ z.ZodTypeDef,
3884
+ UpdateToolResponseBody2
3885
+ > = z.object({
3886
+ id: z.string().default("01K60CGQ9RVCZSB3YGPA7FW8KB"),
3887
+ path: z.string(),
3888
+ key: z.string(),
3889
+ displayName: z.string(),
3890
+ description: z.string(),
3891
+ createdById: z.string().optional(),
3892
+ updatedById: z.string().optional(),
3893
+ projectId: z.string(),
3894
+ workspaceId: z.string(),
3895
+ created: z.string(),
3896
+ updated: z.string(),
3897
+ status: UpdateToolResponseBodyToolsStatus$outboundSchema.default("live"),
3898
+ versionHash: z.string().optional(),
3899
+ type: UpdateToolResponseBodyToolsType$outboundSchema,
3900
+ jsonSchema: z.lazy(() => UpdateToolResponseBodyJsonSchema$outboundSchema),
3901
+ }).transform((v) => {
3902
+ return remap$(v, {
3903
+ id: "_id",
3904
+ displayName: "display_name",
3905
+ createdById: "created_by_id",
3906
+ updatedById: "updated_by_id",
3907
+ projectId: "project_id",
3908
+ workspaceId: "workspace_id",
3909
+ versionHash: "version_hash",
3910
+ jsonSchema: "json_schema",
3911
+ });
3912
+ });
3913
+
3914
+ /**
3915
+ * @internal
3916
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3917
+ */
3918
+ export namespace UpdateToolResponseBody2$ {
3919
+ /** @deprecated use `UpdateToolResponseBody2$inboundSchema` instead. */
3920
+ export const inboundSchema = UpdateToolResponseBody2$inboundSchema;
3921
+ /** @deprecated use `UpdateToolResponseBody2$outboundSchema` instead. */
3922
+ export const outboundSchema = UpdateToolResponseBody2$outboundSchema;
3923
+ /** @deprecated use `UpdateToolResponseBody2$Outbound` instead. */
3924
+ export type Outbound = UpdateToolResponseBody2$Outbound;
3925
+ }
3926
+
3927
+ export function updateToolResponseBody2ToJSON(
3928
+ updateToolResponseBody2: UpdateToolResponseBody2,
3929
+ ): string {
3930
+ return JSON.stringify(
3931
+ UpdateToolResponseBody2$outboundSchema.parse(updateToolResponseBody2),
3932
+ );
3933
+ }
3934
+
3935
+ export function updateToolResponseBody2FromJSON(
3936
+ jsonString: string,
3937
+ ): SafeParseResult<UpdateToolResponseBody2, SDKValidationError> {
3938
+ return safeParse(
3939
+ jsonString,
3940
+ (x) => UpdateToolResponseBody2$inboundSchema.parse(JSON.parse(x)),
3941
+ `Failed to parse 'UpdateToolResponseBody2' from JSON`,
3942
+ );
3943
+ }
3944
+
3945
+ /** @internal */
3946
+ export const UpdateToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
3947
+ typeof UpdateToolResponseBodyStatus
3948
+ > = z.nativeEnum(UpdateToolResponseBodyStatus);
3949
+
3950
+ /** @internal */
3951
+ export const UpdateToolResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
3952
+ typeof UpdateToolResponseBodyStatus
3953
+ > = UpdateToolResponseBodyStatus$inboundSchema;
3954
+
3955
+ /**
3956
+ * @internal
3957
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3958
+ */
3959
+ export namespace UpdateToolResponseBodyStatus$ {
3960
+ /** @deprecated use `UpdateToolResponseBodyStatus$inboundSchema` instead. */
3961
+ export const inboundSchema = UpdateToolResponseBodyStatus$inboundSchema;
3962
+ /** @deprecated use `UpdateToolResponseBodyStatus$outboundSchema` instead. */
3963
+ export const outboundSchema = UpdateToolResponseBodyStatus$outboundSchema;
3964
+ }
3965
+
3966
+ /** @internal */
3967
+ export const UpdateToolResponseBodyType$inboundSchema: z.ZodNativeEnum<
3968
+ typeof UpdateToolResponseBodyType
3969
+ > = z.nativeEnum(UpdateToolResponseBodyType);
3970
+
3971
+ /** @internal */
3972
+ export const UpdateToolResponseBodyType$outboundSchema: z.ZodNativeEnum<
3973
+ typeof UpdateToolResponseBodyType
3974
+ > = UpdateToolResponseBodyType$inboundSchema;
3975
+
3976
+ /**
3977
+ * @internal
3978
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3979
+ */
3980
+ export namespace UpdateToolResponseBodyType$ {
3981
+ /** @deprecated use `UpdateToolResponseBodyType$inboundSchema` instead. */
3982
+ export const inboundSchema = UpdateToolResponseBodyType$inboundSchema;
3983
+ /** @deprecated use `UpdateToolResponseBodyType$outboundSchema` instead. */
3984
+ export const outboundSchema = UpdateToolResponseBodyType$outboundSchema;
3985
+ }
3986
+
3987
+ /** @internal */
3988
+ export const UpdateToolResponseBodyFunction$inboundSchema: z.ZodType<
3989
+ UpdateToolResponseBodyFunction,
3990
+ z.ZodTypeDef,
3991
+ unknown
3992
+ > = z.object({
3993
+ name: z.string(),
3994
+ description: z.string().optional(),
3995
+ strict: z.boolean().optional(),
3996
+ parameters: z.record(z.any()).optional(),
3997
+ });
3998
+
3999
+ /** @internal */
4000
+ export type UpdateToolResponseBodyFunction$Outbound = {
4001
+ name: string;
4002
+ description?: string | undefined;
4003
+ strict?: boolean | undefined;
4004
+ parameters?: { [k: string]: any } | undefined;
4005
+ };
4006
+
4007
+ /** @internal */
4008
+ export const UpdateToolResponseBodyFunction$outboundSchema: z.ZodType<
4009
+ UpdateToolResponseBodyFunction$Outbound,
4010
+ z.ZodTypeDef,
4011
+ UpdateToolResponseBodyFunction
4012
+ > = z.object({
4013
+ name: z.string(),
4014
+ description: z.string().optional(),
4015
+ strict: z.boolean().optional(),
4016
+ parameters: z.record(z.any()).optional(),
4017
+ });
4018
+
4019
+ /**
4020
+ * @internal
4021
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4022
+ */
4023
+ export namespace UpdateToolResponseBodyFunction$ {
4024
+ /** @deprecated use `UpdateToolResponseBodyFunction$inboundSchema` instead. */
4025
+ export const inboundSchema = UpdateToolResponseBodyFunction$inboundSchema;
4026
+ /** @deprecated use `UpdateToolResponseBodyFunction$outboundSchema` instead. */
4027
+ export const outboundSchema = UpdateToolResponseBodyFunction$outboundSchema;
4028
+ /** @deprecated use `UpdateToolResponseBodyFunction$Outbound` instead. */
4029
+ export type Outbound = UpdateToolResponseBodyFunction$Outbound;
4030
+ }
4031
+
4032
+ export function updateToolResponseBodyFunctionToJSON(
4033
+ updateToolResponseBodyFunction: UpdateToolResponseBodyFunction,
4034
+ ): string {
4035
+ return JSON.stringify(
4036
+ UpdateToolResponseBodyFunction$outboundSchema.parse(
4037
+ updateToolResponseBodyFunction,
4038
+ ),
4039
+ );
4040
+ }
4041
+
4042
+ export function updateToolResponseBodyFunctionFromJSON(
4043
+ jsonString: string,
4044
+ ): SafeParseResult<UpdateToolResponseBodyFunction, SDKValidationError> {
4045
+ return safeParse(
4046
+ jsonString,
4047
+ (x) => UpdateToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
4048
+ `Failed to parse 'UpdateToolResponseBodyFunction' from JSON`,
4049
+ );
4050
+ }
4051
+
4052
+ /** @internal */
4053
+ export const UpdateToolResponseBody1$inboundSchema: z.ZodType<
4054
+ UpdateToolResponseBody1,
4055
+ z.ZodTypeDef,
4056
+ unknown
4057
+ > = z.object({
4058
+ _id: z.string().default("01K60CGQ9QRS30JRTGYREZGV6F"),
4059
+ path: z.string(),
4060
+ key: z.string(),
4061
+ display_name: z.string(),
4062
+ description: z.string(),
4063
+ created_by_id: z.string().optional(),
4064
+ updated_by_id: z.string().optional(),
4065
+ project_id: z.string(),
4066
+ workspace_id: z.string(),
4067
+ created: z.string(),
4068
+ updated: z.string(),
4069
+ status: UpdateToolResponseBodyStatus$inboundSchema.default("live"),
4070
+ version_hash: z.string().optional(),
4071
+ type: UpdateToolResponseBodyType$inboundSchema,
4072
+ function: z.lazy(() => UpdateToolResponseBodyFunction$inboundSchema),
4073
+ }).transform((v) => {
4074
+ return remap$(v, {
4075
+ "_id": "id",
4076
+ "display_name": "displayName",
4077
+ "created_by_id": "createdById",
4078
+ "updated_by_id": "updatedById",
4079
+ "project_id": "projectId",
4080
+ "workspace_id": "workspaceId",
4081
+ "version_hash": "versionHash",
4082
+ });
4083
+ });
4084
+
4085
+ /** @internal */
4086
+ export type UpdateToolResponseBody1$Outbound = {
4087
+ _id: string;
4088
+ path: string;
4089
+ key: string;
4090
+ display_name: string;
4091
+ description: string;
4092
+ created_by_id?: string | undefined;
4093
+ updated_by_id?: string | undefined;
4094
+ project_id: string;
4095
+ workspace_id: string;
4096
+ created: string;
4097
+ updated: string;
4098
+ status: string;
4099
+ version_hash?: string | undefined;
4100
+ type: string;
4101
+ function: UpdateToolResponseBodyFunction$Outbound;
4102
+ };
4103
+
4104
+ /** @internal */
4105
+ export const UpdateToolResponseBody1$outboundSchema: z.ZodType<
4106
+ UpdateToolResponseBody1$Outbound,
4107
+ z.ZodTypeDef,
4108
+ UpdateToolResponseBody1
4109
+ > = z.object({
4110
+ id: z.string().default("01K60CGQ9QRS30JRTGYREZGV6F"),
4111
+ path: z.string(),
4112
+ key: z.string(),
4113
+ displayName: z.string(),
4114
+ description: z.string(),
4115
+ createdById: z.string().optional(),
4116
+ updatedById: z.string().optional(),
4117
+ projectId: z.string(),
4118
+ workspaceId: z.string(),
4119
+ created: z.string(),
4120
+ updated: z.string(),
4121
+ status: UpdateToolResponseBodyStatus$outboundSchema.default("live"),
4122
+ versionHash: z.string().optional(),
4123
+ type: UpdateToolResponseBodyType$outboundSchema,
4124
+ function: z.lazy(() => UpdateToolResponseBodyFunction$outboundSchema),
4125
+ }).transform((v) => {
4126
+ return remap$(v, {
4127
+ id: "_id",
4128
+ displayName: "display_name",
4129
+ createdById: "created_by_id",
4130
+ updatedById: "updated_by_id",
4131
+ projectId: "project_id",
4132
+ workspaceId: "workspace_id",
4133
+ versionHash: "version_hash",
4134
+ });
4135
+ });
4136
+
4137
+ /**
4138
+ * @internal
4139
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4140
+ */
4141
+ export namespace UpdateToolResponseBody1$ {
4142
+ /** @deprecated use `UpdateToolResponseBody1$inboundSchema` instead. */
4143
+ export const inboundSchema = UpdateToolResponseBody1$inboundSchema;
4144
+ /** @deprecated use `UpdateToolResponseBody1$outboundSchema` instead. */
4145
+ export const outboundSchema = UpdateToolResponseBody1$outboundSchema;
4146
+ /** @deprecated use `UpdateToolResponseBody1$Outbound` instead. */
4147
+ export type Outbound = UpdateToolResponseBody1$Outbound;
4148
+ }
4149
+
4150
+ export function updateToolResponseBody1ToJSON(
4151
+ updateToolResponseBody1: UpdateToolResponseBody1,
4152
+ ): string {
4153
+ return JSON.stringify(
4154
+ UpdateToolResponseBody1$outboundSchema.parse(updateToolResponseBody1),
4155
+ );
4156
+ }
4157
+
4158
+ export function updateToolResponseBody1FromJSON(
4159
+ jsonString: string,
4160
+ ): SafeParseResult<UpdateToolResponseBody1, SDKValidationError> {
4161
+ return safeParse(
4162
+ jsonString,
4163
+ (x) => UpdateToolResponseBody1$inboundSchema.parse(JSON.parse(x)),
4164
+ `Failed to parse 'UpdateToolResponseBody1' from JSON`,
4165
+ );
4166
+ }
4167
+
4168
+ /** @internal */
4169
+ export const UpdateToolResponseBody$inboundSchema: z.ZodType<
4170
+ UpdateToolResponseBody,
4171
+ z.ZodTypeDef,
4172
+ unknown
4173
+ > = z.union([
4174
+ z.lazy(() => UpdateToolResponseBody1$inboundSchema),
4175
+ z.lazy(() => UpdateToolResponseBody2$inboundSchema),
4176
+ z.lazy(() => UpdateToolResponseBody3$inboundSchema),
4177
+ z.lazy(() => UpdateToolResponseBody4$inboundSchema),
4178
+ z.lazy(() => UpdateToolResponseBody5$inboundSchema),
4179
+ ]);
4180
+
4181
+ /** @internal */
4182
+ export type UpdateToolResponseBody$Outbound =
4183
+ | UpdateToolResponseBody1$Outbound
4184
+ | UpdateToolResponseBody2$Outbound
4185
+ | UpdateToolResponseBody3$Outbound
4186
+ | UpdateToolResponseBody4$Outbound
4187
+ | UpdateToolResponseBody5$Outbound;
4188
+
4189
+ /** @internal */
4190
+ export const UpdateToolResponseBody$outboundSchema: z.ZodType<
4191
+ UpdateToolResponseBody$Outbound,
4192
+ z.ZodTypeDef,
4193
+ UpdateToolResponseBody
4194
+ > = z.union([
4195
+ z.lazy(() => UpdateToolResponseBody1$outboundSchema),
4196
+ z.lazy(() => UpdateToolResponseBody2$outboundSchema),
4197
+ z.lazy(() => UpdateToolResponseBody3$outboundSchema),
4198
+ z.lazy(() => UpdateToolResponseBody4$outboundSchema),
4199
+ z.lazy(() => UpdateToolResponseBody5$outboundSchema),
4200
+ ]);
4201
+
4202
+ /**
4203
+ * @internal
4204
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
4205
+ */
4206
+ export namespace UpdateToolResponseBody$ {
4207
+ /** @deprecated use `UpdateToolResponseBody$inboundSchema` instead. */
4208
+ export const inboundSchema = UpdateToolResponseBody$inboundSchema;
4209
+ /** @deprecated use `UpdateToolResponseBody$outboundSchema` instead. */
4210
+ export const outboundSchema = UpdateToolResponseBody$outboundSchema;
4211
+ /** @deprecated use `UpdateToolResponseBody$Outbound` instead. */
4212
+ export type Outbound = UpdateToolResponseBody$Outbound;
4213
+ }
4214
+
4215
+ export function updateToolResponseBodyToJSON(
4216
+ updateToolResponseBody: UpdateToolResponseBody,
4217
+ ): string {
4218
+ return JSON.stringify(
4219
+ UpdateToolResponseBody$outboundSchema.parse(updateToolResponseBody),
4220
+ );
4221
+ }
4222
+
4223
+ export function updateToolResponseBodyFromJSON(
4224
+ jsonString: string,
4225
+ ): SafeParseResult<UpdateToolResponseBody, SDKValidationError> {
4226
+ return safeParse(
4227
+ jsonString,
4228
+ (x) => UpdateToolResponseBody$inboundSchema.parse(JSON.parse(x)),
4229
+ `Failed to parse 'UpdateToolResponseBody' from JSON`,
4230
+ );
4231
+ }