@orq-ai/node 3.12.16 → 3.12.17

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