@orq-ai/node 4.0.0-rc.49 → 4.0.0-rc.50

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 (156) hide show
  1. package/README.md +20 -29
  2. package/bin/mcp-server.js +1502 -4133
  3. package/bin/mcp-server.js.map +40 -51
  4. package/docs/sdks/agents/README.md +0 -76
  5. package/docs/sdks/tools/README.md +1 -152
  6. package/examples/package-lock.json +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +2 -2
  9. package/lib/config.js +2 -2
  10. package/mcp-server/mcp-server.js +1 -1
  11. package/mcp-server/server.d.ts.map +1 -1
  12. package/mcp-server/server.js +1 -7
  13. package/mcp-server/server.js.map +1 -1
  14. package/models/errors/index.d.ts +0 -2
  15. package/models/errors/index.d.ts.map +1 -1
  16. package/models/errors/index.js +0 -2
  17. package/models/errors/index.js.map +1 -1
  18. package/models/operations/createbudget.js +2 -2
  19. package/models/operations/createcontact.js +2 -2
  20. package/models/operations/createdataset.js +2 -2
  21. package/models/operations/createdatasetitem.js +8 -8
  22. package/models/operations/createdatasource.js +2 -2
  23. package/models/operations/createeval.js +28 -28
  24. package/models/operations/createtool.js +12 -12
  25. package/models/operations/fileget.js +2 -2
  26. package/models/operations/filelist.js +2 -2
  27. package/models/operations/fileupload.js +2 -2
  28. package/models/operations/getalltools.js +12 -12
  29. package/models/operations/getbudget.js +2 -2
  30. package/models/operations/getevals.js +28 -28
  31. package/models/operations/index.d.ts +0 -3
  32. package/models/operations/index.d.ts.map +1 -1
  33. package/models/operations/index.js +0 -3
  34. package/models/operations/index.js.map +1 -1
  35. package/models/operations/listbudgets.js +2 -2
  36. package/models/operations/listcontacts.js +2 -2
  37. package/models/operations/listdatasetdatapoints.js +8 -8
  38. package/models/operations/listdatasets.js +2 -2
  39. package/models/operations/listdatasources.js +2 -2
  40. package/models/operations/retrievecontact.js +2 -2
  41. package/models/operations/retrievedatapoint.js +8 -8
  42. package/models/operations/retrievedataset.js +2 -2
  43. package/models/operations/retrievedatasource.js +2 -2
  44. package/models/operations/retrievetool.js +12 -12
  45. package/models/operations/runagent.js +2 -2
  46. package/models/operations/streamrunagent.js +2 -2
  47. package/models/operations/updatebudget.js +2 -2
  48. package/models/operations/updatecontact.js +2 -2
  49. package/models/operations/updatedatapoint.js +8 -8
  50. package/models/operations/updatedataset.js +2 -2
  51. package/models/operations/updatedatasource.js +2 -2
  52. package/models/operations/updateeval.js +28 -28
  53. package/models/operations/updatetool.js +14 -14
  54. package/package.json +1 -1
  55. package/sdk/agents.d.ts +0 -7
  56. package/sdk/agents.d.ts.map +1 -1
  57. package/sdk/agents.js +0 -10
  58. package/sdk/agents.js.map +1 -1
  59. package/sdk/tools.d.ts +0 -14
  60. package/sdk/tools.d.ts.map +1 -1
  61. package/sdk/tools.js +0 -20
  62. package/sdk/tools.js.map +1 -1
  63. package/src/lib/config.ts +2 -2
  64. package/src/mcp-server/mcp-server.ts +1 -1
  65. package/src/mcp-server/server.ts +1 -7
  66. package/src/models/errors/index.ts +0 -2
  67. package/src/models/operations/createbudget.ts +2 -2
  68. package/src/models/operations/createcontact.ts +2 -2
  69. package/src/models/operations/createdataset.ts +2 -2
  70. package/src/models/operations/createdatasetitem.ts +8 -8
  71. package/src/models/operations/createdatasource.ts +2 -2
  72. package/src/models/operations/createeval.ts +28 -28
  73. package/src/models/operations/createtool.ts +12 -12
  74. package/src/models/operations/fileget.ts +2 -2
  75. package/src/models/operations/filelist.ts +2 -2
  76. package/src/models/operations/fileupload.ts +2 -2
  77. package/src/models/operations/getalltools.ts +12 -12
  78. package/src/models/operations/getbudget.ts +2 -2
  79. package/src/models/operations/getevals.ts +28 -28
  80. package/src/models/operations/index.ts +0 -3
  81. package/src/models/operations/listbudgets.ts +2 -2
  82. package/src/models/operations/listcontacts.ts +2 -2
  83. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  84. package/src/models/operations/listdatasets.ts +2 -2
  85. package/src/models/operations/listdatasources.ts +2 -2
  86. package/src/models/operations/retrievecontact.ts +2 -2
  87. package/src/models/operations/retrievedatapoint.ts +8 -8
  88. package/src/models/operations/retrievedataset.ts +2 -2
  89. package/src/models/operations/retrievedatasource.ts +2 -2
  90. package/src/models/operations/retrievetool.ts +12 -12
  91. package/src/models/operations/runagent.ts +2 -2
  92. package/src/models/operations/streamrunagent.ts +2 -2
  93. package/src/models/operations/updatebudget.ts +2 -2
  94. package/src/models/operations/updatecontact.ts +2 -2
  95. package/src/models/operations/updatedatapoint.ts +8 -8
  96. package/src/models/operations/updatedataset.ts +2 -2
  97. package/src/models/operations/updatedatasource.ts +2 -2
  98. package/src/models/operations/updateeval.ts +28 -28
  99. package/src/models/operations/updatetool.ts +14 -14
  100. package/src/sdk/agents.ts +0 -18
  101. package/src/sdk/tools.ts +0 -36
  102. package/funcs/agentsDuplicate.d.ts +0 -18
  103. package/funcs/agentsDuplicate.d.ts.map +0 -1
  104. package/funcs/agentsDuplicate.js +0 -124
  105. package/funcs/agentsDuplicate.js.map +0 -1
  106. package/funcs/toolsDuplicate.d.ts +0 -18
  107. package/funcs/toolsDuplicate.d.ts.map +0 -1
  108. package/funcs/toolsDuplicate.js +0 -124
  109. package/funcs/toolsDuplicate.js.map +0 -1
  110. package/funcs/toolsSync.d.ts +0 -18
  111. package/funcs/toolsSync.d.ts.map +0 -1
  112. package/funcs/toolsSync.js +0 -123
  113. package/funcs/toolsSync.js.map +0 -1
  114. package/mcp-server/tools/agentsDuplicate.d.ts +0 -8
  115. package/mcp-server/tools/agentsDuplicate.d.ts.map +0 -1
  116. package/mcp-server/tools/agentsDuplicate.js +0 -64
  117. package/mcp-server/tools/agentsDuplicate.js.map +0 -1
  118. package/mcp-server/tools/toolsDuplicate.d.ts +0 -8
  119. package/mcp-server/tools/toolsDuplicate.d.ts.map +0 -1
  120. package/mcp-server/tools/toolsDuplicate.js +0 -64
  121. package/mcp-server/tools/toolsDuplicate.js.map +0 -1
  122. package/mcp-server/tools/toolsSync.d.ts +0 -8
  123. package/mcp-server/tools/toolsSync.d.ts.map +0 -1
  124. package/mcp-server/tools/toolsSync.js +0 -64
  125. package/mcp-server/tools/toolsSync.js.map +0 -1
  126. package/models/errors/duplicateagent.d.ts +0 -55
  127. package/models/errors/duplicateagent.d.ts.map +0 -1
  128. package/models/errors/duplicateagent.js +0 -106
  129. package/models/errors/duplicateagent.js.map +0 -1
  130. package/models/errors/duplicatetool.d.ts +0 -36
  131. package/models/errors/duplicatetool.d.ts.map +0 -1
  132. package/models/errors/duplicatetool.js +0 -77
  133. package/models/errors/duplicatetool.js.map +0 -1
  134. package/models/operations/duplicateagent.d.ts +0 -1436
  135. package/models/operations/duplicateagent.d.ts.map +0 -1
  136. package/models/operations/duplicateagent.js +0 -1456
  137. package/models/operations/duplicateagent.js.map +0 -1
  138. package/models/operations/duplicatetool.d.ts +0 -1038
  139. package/models/operations/duplicatetool.d.ts.map +0 -1
  140. package/models/operations/duplicatetool.js +0 -982
  141. package/models/operations/duplicatetool.js.map +0 -1
  142. package/models/operations/syncmcptool.d.ts +0 -1115
  143. package/models/operations/syncmcptool.d.ts.map +0 -1
  144. package/models/operations/syncmcptool.js +0 -1072
  145. package/models/operations/syncmcptool.js.map +0 -1
  146. package/src/funcs/agentsDuplicate.ts +0 -180
  147. package/src/funcs/toolsDuplicate.ts +0 -176
  148. package/src/funcs/toolsSync.ts +0 -176
  149. package/src/mcp-server/tools/agentsDuplicate.ts +0 -37
  150. package/src/mcp-server/tools/toolsDuplicate.ts +0 -37
  151. package/src/mcp-server/tools/toolsSync.ts +0 -37
  152. package/src/models/errors/duplicateagent.ts +0 -128
  153. package/src/models/errors/duplicatetool.ts +0 -78
  154. package/src/models/operations/duplicateagent.ts +0 -3674
  155. package/src/models/operations/duplicatetool.ts +0 -2395
  156. package/src/models/operations/syncmcptool.ts +0 -2603
@@ -1,2603 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import {
8
- collectExtraKeys as collectExtraKeys$,
9
- safeParse,
10
- } from "../../lib/schemas.js";
11
- import { ClosedEnum } from "../../types/enums.js";
12
- import { Result as SafeParseResult } from "../../types/fp.js";
13
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
-
15
- export type SyncMcpToolRequest = {
16
- /**
17
- * The ID of the MCP tool to sync
18
- */
19
- toolId: string;
20
- };
21
-
22
- /**
23
- * 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.
24
- */
25
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus = {
26
- Live: "live",
27
- Draft: "draft",
28
- Pending: "pending",
29
- Published: "published",
30
- } as const;
31
- /**
32
- * 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.
33
- */
34
- export type SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus =
35
- ClosedEnum<
36
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus
37
- >;
38
-
39
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType = {
40
- Code: "code",
41
- } as const;
42
- export type SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType =
43
- ClosedEnum<typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType>;
44
-
45
- /**
46
- * The type must be "object"
47
- */
48
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type = {
49
- Object: "object",
50
- } as const;
51
- /**
52
- * The type must be "object"
53
- */
54
- export type SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type =
55
- ClosedEnum<
56
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type
57
- >;
58
-
59
- /**
60
- * 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.
61
- */
62
- export type SyncMcpToolResponseBodyToolsParameters = {
63
- /**
64
- * The type must be "object"
65
- */
66
- type: SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type;
67
- /**
68
- * The properties of the function parameters
69
- */
70
- properties: { [k: string]: any };
71
- /**
72
- * Array of required parameter names
73
- */
74
- required: Array<string>;
75
- additionalProperties?: { [k: string]: any } | undefined;
76
- };
77
-
78
- export const SyncMcpToolResponseBodyLanguage = {
79
- Python: "python",
80
- } as const;
81
- export type SyncMcpToolResponseBodyLanguage = ClosedEnum<
82
- typeof SyncMcpToolResponseBodyLanguage
83
- >;
84
-
85
- export type SyncMcpToolResponseBodyCodeTool = {
86
- /**
87
- * 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.
88
- */
89
- parameters?: SyncMcpToolResponseBodyToolsParameters | undefined;
90
- language: SyncMcpToolResponseBodyLanguage;
91
- /**
92
- * The code to execute.
93
- */
94
- code: string;
95
- };
96
-
97
- export type SyncMcpToolResponseBodyToolsResponseSyncResult = {
98
- toolsTotal: number;
99
- toolsAdded: number;
100
- toolsRemoved: number;
101
- errors: Array<string>;
102
- };
103
-
104
- export type SyncMcpToolResponseBody5 = {
105
- id?: string | undefined;
106
- /**
107
- * Entity storage path in the format: `project/folder/subfolder/...`
108
- *
109
- * @remarks
110
- *
111
- * The first element identifies the project, followed by nested folders (auto-created as needed).
112
- *
113
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
114
- */
115
- path: string;
116
- /**
117
- * Unique key of the tool as it will be displayed in the UI
118
- */
119
- key: string;
120
- /**
121
- * 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.
122
- */
123
- displayName?: string | undefined;
124
- /**
125
- * 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.
126
- */
127
- description: string;
128
- /**
129
- * The id of the user that created the tool
130
- */
131
- createdById?: string | undefined;
132
- /**
133
- * The id of the user that last updated the tool
134
- */
135
- updatedById?: string | undefined;
136
- projectId: string;
137
- workspaceId: string;
138
- created: string;
139
- updated: string;
140
- /**
141
- * 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.
142
- */
143
- status?:
144
- | SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus
145
- | undefined;
146
- versionHash?: string | undefined;
147
- type: SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType;
148
- codeTool: SyncMcpToolResponseBodyCodeTool;
149
- syncResult: SyncMcpToolResponseBodyToolsResponseSyncResult;
150
- };
151
-
152
- /**
153
- * 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.
154
- */
155
- export const SyncMcpToolResponseBodyToolsResponse200Status = {
156
- Live: "live",
157
- Draft: "draft",
158
- Pending: "pending",
159
- Published: "published",
160
- } as const;
161
- /**
162
- * 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.
163
- */
164
- export type SyncMcpToolResponseBodyToolsResponse200Status = ClosedEnum<
165
- typeof SyncMcpToolResponseBodyToolsResponse200Status
166
- >;
167
-
168
- export const SyncMcpToolResponseBodyToolsResponse200Type = {
169
- Mcp: "mcp",
170
- } as const;
171
- export type SyncMcpToolResponseBodyToolsResponse200Type = ClosedEnum<
172
- typeof SyncMcpToolResponseBodyToolsResponse200Type
173
- >;
174
-
175
- export type SyncMcpToolResponseBodyHeaders = {
176
- value: string;
177
- encrypted?: boolean | undefined;
178
- };
179
-
180
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type = {
181
- Object: "object",
182
- } as const;
183
- export type SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type =
184
- ClosedEnum<
185
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type
186
- >;
187
-
188
- export type SyncMcpToolResponseBodyToolsSchema = {
189
- type: SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type;
190
- properties?: { [k: string]: any } | undefined;
191
- required?: Array<string> | undefined;
192
- };
193
-
194
- export type SyncMcpToolResponseBodyTools = {
195
- id?: string | undefined;
196
- name: string;
197
- description?: string | undefined;
198
- schema: SyncMcpToolResponseBodyToolsSchema;
199
- };
200
-
201
- /**
202
- * The connection type used by the MCP server
203
- */
204
- export const SyncMcpToolResponseBodyConnectionType = {
205
- Http: "http",
206
- Sse: "sse",
207
- } as const;
208
- /**
209
- * The connection type used by the MCP server
210
- */
211
- export type SyncMcpToolResponseBodyConnectionType = ClosedEnum<
212
- typeof SyncMcpToolResponseBodyConnectionType
213
- >;
214
-
215
- export type SyncMcpToolResponseBodyMcp = {
216
- /**
217
- * The MCP server URL (cached for execution)
218
- */
219
- serverUrl: string;
220
- /**
221
- * HTTP headers for MCP server requests with encryption support
222
- */
223
- headers?: { [k: string]: SyncMcpToolResponseBodyHeaders } | undefined;
224
- /**
225
- * Array of tools available from the MCP server
226
- */
227
- tools: Array<SyncMcpToolResponseBodyTools>;
228
- /**
229
- * The connection type used by the MCP server
230
- */
231
- connectionType: SyncMcpToolResponseBodyConnectionType;
232
- };
233
-
234
- export type SyncMcpToolResponseBodyToolsSyncResult = {
235
- toolsTotal: number;
236
- toolsAdded: number;
237
- toolsRemoved: number;
238
- errors: Array<string>;
239
- };
240
-
241
- export type SyncMcpToolResponseBody4 = {
242
- id?: string | undefined;
243
- /**
244
- * Entity storage path in the format: `project/folder/subfolder/...`
245
- *
246
- * @remarks
247
- *
248
- * The first element identifies the project, followed by nested folders (auto-created as needed).
249
- *
250
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
251
- */
252
- path: string;
253
- /**
254
- * Unique key of the tool as it will be displayed in the UI
255
- */
256
- key: string;
257
- /**
258
- * 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.
259
- */
260
- displayName?: string | undefined;
261
- /**
262
- * 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.
263
- */
264
- description: string;
265
- /**
266
- * The id of the user that created the tool
267
- */
268
- createdById?: string | undefined;
269
- /**
270
- * The id of the user that last updated the tool
271
- */
272
- updatedById?: string | undefined;
273
- projectId: string;
274
- workspaceId: string;
275
- created: string;
276
- updated: string;
277
- /**
278
- * 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.
279
- */
280
- status?: SyncMcpToolResponseBodyToolsResponse200Status | undefined;
281
- versionHash?: string | undefined;
282
- type: SyncMcpToolResponseBodyToolsResponse200Type;
283
- mcp: SyncMcpToolResponseBodyMcp;
284
- syncResult: SyncMcpToolResponseBodyToolsSyncResult;
285
- };
286
-
287
- /**
288
- * 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.
289
- */
290
- export const SyncMcpToolResponseBodyToolsResponseStatus = {
291
- Live: "live",
292
- Draft: "draft",
293
- Pending: "pending",
294
- Published: "published",
295
- } as const;
296
- /**
297
- * 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.
298
- */
299
- export type SyncMcpToolResponseBodyToolsResponseStatus = ClosedEnum<
300
- typeof SyncMcpToolResponseBodyToolsResponseStatus
301
- >;
302
-
303
- export const SyncMcpToolResponseBodyToolsResponseType = {
304
- Http: "http",
305
- } as const;
306
- export type SyncMcpToolResponseBodyToolsResponseType = ClosedEnum<
307
- typeof SyncMcpToolResponseBodyToolsResponseType
308
- >;
309
-
310
- /**
311
- * The HTTP method to use.
312
- */
313
- export const SyncMcpToolResponseBodyMethod = {
314
- Get: "GET",
315
- Post: "POST",
316
- Put: "PUT",
317
- Delete: "DELETE",
318
- } as const;
319
- /**
320
- * The HTTP method to use.
321
- */
322
- export type SyncMcpToolResponseBodyMethod = ClosedEnum<
323
- typeof SyncMcpToolResponseBodyMethod
324
- >;
325
-
326
- export type SyncMcpToolHeaders2 = {
327
- value: string;
328
- encrypted?: boolean | undefined;
329
- };
330
-
331
- export type SyncMcpToolResponseBodyToolsHeaders = SyncMcpToolHeaders2 | string;
332
-
333
- /**
334
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
335
- */
336
- export type SyncMcpToolResponseBodyBlueprint = {
337
- /**
338
- * The URL to send the request to.
339
- */
340
- url: string;
341
- /**
342
- * The HTTP method to use.
343
- */
344
- method: SyncMcpToolResponseBodyMethod;
345
- /**
346
- * The headers to send with the request. Can be a string value or an object with value and encrypted properties.
347
- */
348
- headers?: { [k: string]: SyncMcpToolHeaders2 | string } | undefined;
349
- /**
350
- * The body to send with the request.
351
- */
352
- body?: { [k: string]: any } | undefined;
353
- };
354
-
355
- /**
356
- * The type of the argument.
357
- */
358
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type = {
359
- String: "string",
360
- Number: "number",
361
- Boolean: "boolean",
362
- } as const;
363
- /**
364
- * The type of the argument.
365
- */
366
- export type SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type =
367
- ClosedEnum<
368
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type
369
- >;
370
-
371
- /**
372
- * The default value of the argument.
373
- */
374
- export type SyncMcpToolResponseBodyDefaultValue = string | number | boolean;
375
-
376
- export type SyncMcpToolResponseBodyArguments = {
377
- /**
378
- * The type of the argument.
379
- */
380
- type: SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type;
381
- /**
382
- * A description of the argument.
383
- */
384
- description: string;
385
- /**
386
- * 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.
387
- */
388
- sendToModel?: boolean | undefined;
389
- /**
390
- * The default value of the argument.
391
- */
392
- defaultValue?: string | number | boolean | undefined;
393
- };
394
-
395
- export type SyncMcpToolResponseBodyHttp = {
396
- /**
397
- * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
398
- */
399
- blueprint: SyncMcpToolResponseBodyBlueprint;
400
- /**
401
- * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
402
- */
403
- arguments?: { [k: string]: SyncMcpToolResponseBodyArguments } | undefined;
404
- };
405
-
406
- export type SyncMcpToolResponseBodySyncResult = {
407
- toolsTotal: number;
408
- toolsAdded: number;
409
- toolsRemoved: number;
410
- errors: Array<string>;
411
- };
412
-
413
- export type SyncMcpToolResponseBody3 = {
414
- id?: string | undefined;
415
- /**
416
- * Entity storage path in the format: `project/folder/subfolder/...`
417
- *
418
- * @remarks
419
- *
420
- * The first element identifies the project, followed by nested folders (auto-created as needed).
421
- *
422
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
423
- */
424
- path: string;
425
- /**
426
- * Unique key of the tool as it will be displayed in the UI
427
- */
428
- key: string;
429
- /**
430
- * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
431
- */
432
- displayName?: string | undefined;
433
- /**
434
- * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
435
- */
436
- description: string;
437
- /**
438
- * The id of the user that created the tool
439
- */
440
- createdById?: string | undefined;
441
- /**
442
- * The id of the user that last updated the tool
443
- */
444
- updatedById?: string | undefined;
445
- projectId: string;
446
- workspaceId: string;
447
- created: string;
448
- updated: string;
449
- /**
450
- * 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.
451
- */
452
- status?: SyncMcpToolResponseBodyToolsResponseStatus | undefined;
453
- versionHash?: string | undefined;
454
- type: SyncMcpToolResponseBodyToolsResponseType;
455
- http: SyncMcpToolResponseBodyHttp;
456
- syncResult: SyncMcpToolResponseBodySyncResult;
457
- };
458
-
459
- /**
460
- * 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.
461
- */
462
- export const SyncMcpToolResponseBodyToolsStatus = {
463
- Live: "live",
464
- Draft: "draft",
465
- Pending: "pending",
466
- Published: "published",
467
- } as const;
468
- /**
469
- * 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.
470
- */
471
- export type SyncMcpToolResponseBodyToolsStatus = ClosedEnum<
472
- typeof SyncMcpToolResponseBodyToolsStatus
473
- >;
474
-
475
- export const SyncMcpToolResponseBodyToolsType = {
476
- JsonSchema: "json_schema",
477
- } as const;
478
- export type SyncMcpToolResponseBodyToolsType = ClosedEnum<
479
- typeof SyncMcpToolResponseBodyToolsType
480
- >;
481
-
482
- /**
483
- * 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.
484
- */
485
- export type SyncMcpToolResponseBodySchema = {
486
- /**
487
- * The JSON Schema type
488
- */
489
- type: string;
490
- /**
491
- * The properties of the JSON Schema object
492
- */
493
- properties: { [k: string]: any };
494
- /**
495
- * Array of required property names
496
- */
497
- required: Array<string>;
498
- additionalProperties?: { [k: string]: any } | undefined;
499
- };
500
-
501
- export type SyncMcpToolResponseBodyJsonSchema = {
502
- /**
503
- * 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.
504
- */
505
- name: string;
506
- /**
507
- * A description of what the response format is for. This will be shown to the user.
508
- */
509
- description: string;
510
- /**
511
- * 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.
512
- */
513
- schema: SyncMcpToolResponseBodySchema;
514
- /**
515
- * 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.
516
- */
517
- strict?: boolean | undefined;
518
- };
519
-
520
- export type ResponseBodySyncResult = {
521
- toolsTotal: number;
522
- toolsAdded: number;
523
- toolsRemoved: number;
524
- errors: Array<string>;
525
- };
526
-
527
- export type SyncMcpToolResponseBody2 = {
528
- id?: string | undefined;
529
- /**
530
- * Entity storage path in the format: `project/folder/subfolder/...`
531
- *
532
- * @remarks
533
- *
534
- * The first element identifies the project, followed by nested folders (auto-created as needed).
535
- *
536
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
537
- */
538
- path: string;
539
- /**
540
- * Unique key of the tool as it will be displayed in the UI
541
- */
542
- key: string;
543
- /**
544
- * 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.
545
- */
546
- displayName?: string | undefined;
547
- /**
548
- * 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.
549
- */
550
- description: string;
551
- /**
552
- * The id of the user that created the tool
553
- */
554
- createdById?: string | undefined;
555
- /**
556
- * The id of the user that last updated the tool
557
- */
558
- updatedById?: string | undefined;
559
- projectId: string;
560
- workspaceId: string;
561
- created: string;
562
- updated: string;
563
- /**
564
- * 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.
565
- */
566
- status?: SyncMcpToolResponseBodyToolsStatus | undefined;
567
- versionHash?: string | undefined;
568
- type: SyncMcpToolResponseBodyToolsType;
569
- jsonSchema: SyncMcpToolResponseBodyJsonSchema;
570
- syncResult: ResponseBodySyncResult;
571
- };
572
-
573
- /**
574
- * 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.
575
- */
576
- export const SyncMcpToolResponseBodyStatus = {
577
- Live: "live",
578
- Draft: "draft",
579
- Pending: "pending",
580
- Published: "published",
581
- } as const;
582
- /**
583
- * 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.
584
- */
585
- export type SyncMcpToolResponseBodyStatus = ClosedEnum<
586
- typeof SyncMcpToolResponseBodyStatus
587
- >;
588
-
589
- export const SyncMcpToolResponseBodyType = {
590
- Function: "function",
591
- } as const;
592
- export type SyncMcpToolResponseBodyType = ClosedEnum<
593
- typeof SyncMcpToolResponseBodyType
594
- >;
595
-
596
- /**
597
- * The type must be "object"
598
- */
599
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type = {
600
- Object: "object",
601
- } as const;
602
- /**
603
- * The type must be "object"
604
- */
605
- export type SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type =
606
- ClosedEnum<
607
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type
608
- >;
609
-
610
- /**
611
- * 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.
612
- */
613
- export type SyncMcpToolResponseBodyParameters = {
614
- /**
615
- * The type must be "object"
616
- */
617
- type: SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type;
618
- /**
619
- * The properties of the function parameters
620
- */
621
- properties: { [k: string]: any };
622
- /**
623
- * Array of required parameter names
624
- */
625
- required: Array<string>;
626
- additionalProperties?: { [k: string]: any } | undefined;
627
- };
628
-
629
- export type SyncMcpToolResponseBodyFunction = {
630
- /**
631
- * 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.
632
- */
633
- name: string;
634
- /**
635
- * A description of what the function does, used by the model to choose when and how to call the function.
636
- */
637
- description?: string | undefined;
638
- /**
639
- * 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.
640
- */
641
- strict?: boolean | undefined;
642
- /**
643
- * 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.
644
- */
645
- parameters?: SyncMcpToolResponseBodyParameters | undefined;
646
- };
647
-
648
- export type SyncResult = {
649
- toolsTotal: number;
650
- toolsAdded: number;
651
- toolsRemoved: number;
652
- errors: Array<string>;
653
- };
654
-
655
- export type SyncMcpToolResponseBody1 = {
656
- id?: string | undefined;
657
- /**
658
- * Entity storage path in the format: `project/folder/subfolder/...`
659
- *
660
- * @remarks
661
- *
662
- * The first element identifies the project, followed by nested folders (auto-created as needed).
663
- *
664
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
665
- */
666
- path: string;
667
- /**
668
- * Unique key of the tool as it will be displayed in the UI
669
- */
670
- key: string;
671
- /**
672
- * 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.
673
- */
674
- displayName?: string | undefined;
675
- /**
676
- * 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.
677
- */
678
- description: string;
679
- /**
680
- * The id of the user that created the tool
681
- */
682
- createdById?: string | undefined;
683
- /**
684
- * The id of the user that last updated the tool
685
- */
686
- updatedById?: string | undefined;
687
- projectId: string;
688
- workspaceId: string;
689
- created: string;
690
- updated: string;
691
- /**
692
- * 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.
693
- */
694
- status?: SyncMcpToolResponseBodyStatus | undefined;
695
- versionHash?: string | undefined;
696
- type: SyncMcpToolResponseBodyType;
697
- function: SyncMcpToolResponseBodyFunction;
698
- syncResult: SyncResult;
699
- };
700
-
701
- /**
702
- * Successfully synced MCP tool.
703
- */
704
- export type SyncMcpToolResponseBody =
705
- | SyncMcpToolResponseBody1
706
- | SyncMcpToolResponseBody2
707
- | SyncMcpToolResponseBody3
708
- | SyncMcpToolResponseBody4
709
- | SyncMcpToolResponseBody5;
710
-
711
- /** @internal */
712
- export const SyncMcpToolRequest$inboundSchema: z.ZodType<
713
- SyncMcpToolRequest,
714
- z.ZodTypeDef,
715
- unknown
716
- > = z.object({
717
- tool_id: z.string(),
718
- }).transform((v) => {
719
- return remap$(v, {
720
- "tool_id": "toolId",
721
- });
722
- });
723
- /** @internal */
724
- export type SyncMcpToolRequest$Outbound = {
725
- tool_id: string;
726
- };
727
-
728
- /** @internal */
729
- export const SyncMcpToolRequest$outboundSchema: z.ZodType<
730
- SyncMcpToolRequest$Outbound,
731
- z.ZodTypeDef,
732
- SyncMcpToolRequest
733
- > = z.object({
734
- toolId: z.string(),
735
- }).transform((v) => {
736
- return remap$(v, {
737
- toolId: "tool_id",
738
- });
739
- });
740
-
741
- export function syncMcpToolRequestToJSON(
742
- syncMcpToolRequest: SyncMcpToolRequest,
743
- ): string {
744
- return JSON.stringify(
745
- SyncMcpToolRequest$outboundSchema.parse(syncMcpToolRequest),
746
- );
747
- }
748
- export function syncMcpToolRequestFromJSON(
749
- jsonString: string,
750
- ): SafeParseResult<SyncMcpToolRequest, SDKValidationError> {
751
- return safeParse(
752
- jsonString,
753
- (x) => SyncMcpToolRequest$inboundSchema.parse(JSON.parse(x)),
754
- `Failed to parse 'SyncMcpToolRequest' from JSON`,
755
- );
756
- }
757
-
758
- /** @internal */
759
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema:
760
- z.ZodNativeEnum<
761
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus
762
- > = z.nativeEnum(
763
- SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus,
764
- );
765
- /** @internal */
766
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema:
767
- z.ZodNativeEnum<
768
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus
769
- > =
770
- SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema;
771
-
772
- /** @internal */
773
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema:
774
- z.ZodNativeEnum<
775
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType
776
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType);
777
- /** @internal */
778
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema:
779
- z.ZodNativeEnum<
780
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType
781
- > = SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
782
-
783
- /** @internal */
784
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema:
785
- z.ZodNativeEnum<
786
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type
787
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type);
788
- /** @internal */
789
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema:
790
- z.ZodNativeEnum<
791
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type
792
- > = SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema;
793
-
794
- /** @internal */
795
- export const SyncMcpToolResponseBodyToolsParameters$inboundSchema: z.ZodType<
796
- SyncMcpToolResponseBodyToolsParameters,
797
- z.ZodTypeDef,
798
- unknown
799
- > = collectExtraKeys$(
800
- z.object({
801
- type:
802
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
803
- properties: z.record(z.any()),
804
- required: z.array(z.string()),
805
- }).catchall(z.any()),
806
- "additionalProperties",
807
- true,
808
- );
809
- /** @internal */
810
- export type SyncMcpToolResponseBodyToolsParameters$Outbound = {
811
- type: string;
812
- properties: { [k: string]: any };
813
- required: Array<string>;
814
- [additionalProperties: string]: unknown;
815
- };
816
-
817
- /** @internal */
818
- export const SyncMcpToolResponseBodyToolsParameters$outboundSchema: z.ZodType<
819
- SyncMcpToolResponseBodyToolsParameters$Outbound,
820
- z.ZodTypeDef,
821
- SyncMcpToolResponseBodyToolsParameters
822
- > = z.object({
823
- type:
824
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema,
825
- properties: z.record(z.any()),
826
- required: z.array(z.string()),
827
- additionalProperties: z.record(z.any()).optional(),
828
- }).transform((v) => {
829
- return {
830
- ...v.additionalProperties,
831
- ...remap$(v, {
832
- additionalProperties: null,
833
- }),
834
- };
835
- });
836
-
837
- export function syncMcpToolResponseBodyToolsParametersToJSON(
838
- syncMcpToolResponseBodyToolsParameters:
839
- SyncMcpToolResponseBodyToolsParameters,
840
- ): string {
841
- return JSON.stringify(
842
- SyncMcpToolResponseBodyToolsParameters$outboundSchema.parse(
843
- syncMcpToolResponseBodyToolsParameters,
844
- ),
845
- );
846
- }
847
- export function syncMcpToolResponseBodyToolsParametersFromJSON(
848
- jsonString: string,
849
- ): SafeParseResult<SyncMcpToolResponseBodyToolsParameters, SDKValidationError> {
850
- return safeParse(
851
- jsonString,
852
- (x) =>
853
- SyncMcpToolResponseBodyToolsParameters$inboundSchema.parse(JSON.parse(x)),
854
- `Failed to parse 'SyncMcpToolResponseBodyToolsParameters' from JSON`,
855
- );
856
- }
857
-
858
- /** @internal */
859
- export const SyncMcpToolResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
860
- typeof SyncMcpToolResponseBodyLanguage
861
- > = z.nativeEnum(SyncMcpToolResponseBodyLanguage);
862
- /** @internal */
863
- export const SyncMcpToolResponseBodyLanguage$outboundSchema: z.ZodNativeEnum<
864
- typeof SyncMcpToolResponseBodyLanguage
865
- > = SyncMcpToolResponseBodyLanguage$inboundSchema;
866
-
867
- /** @internal */
868
- export const SyncMcpToolResponseBodyCodeTool$inboundSchema: z.ZodType<
869
- SyncMcpToolResponseBodyCodeTool,
870
- z.ZodTypeDef,
871
- unknown
872
- > = z.object({
873
- parameters: z.lazy(() => SyncMcpToolResponseBodyToolsParameters$inboundSchema)
874
- .optional(),
875
- language: SyncMcpToolResponseBodyLanguage$inboundSchema,
876
- code: z.string(),
877
- });
878
- /** @internal */
879
- export type SyncMcpToolResponseBodyCodeTool$Outbound = {
880
- parameters?: SyncMcpToolResponseBodyToolsParameters$Outbound | undefined;
881
- language: string;
882
- code: string;
883
- };
884
-
885
- /** @internal */
886
- export const SyncMcpToolResponseBodyCodeTool$outboundSchema: z.ZodType<
887
- SyncMcpToolResponseBodyCodeTool$Outbound,
888
- z.ZodTypeDef,
889
- SyncMcpToolResponseBodyCodeTool
890
- > = z.object({
891
- parameters: z.lazy(() =>
892
- SyncMcpToolResponseBodyToolsParameters$outboundSchema
893
- ).optional(),
894
- language: SyncMcpToolResponseBodyLanguage$outboundSchema,
895
- code: z.string(),
896
- });
897
-
898
- export function syncMcpToolResponseBodyCodeToolToJSON(
899
- syncMcpToolResponseBodyCodeTool: SyncMcpToolResponseBodyCodeTool,
900
- ): string {
901
- return JSON.stringify(
902
- SyncMcpToolResponseBodyCodeTool$outboundSchema.parse(
903
- syncMcpToolResponseBodyCodeTool,
904
- ),
905
- );
906
- }
907
- export function syncMcpToolResponseBodyCodeToolFromJSON(
908
- jsonString: string,
909
- ): SafeParseResult<SyncMcpToolResponseBodyCodeTool, SDKValidationError> {
910
- return safeParse(
911
- jsonString,
912
- (x) => SyncMcpToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)),
913
- `Failed to parse 'SyncMcpToolResponseBodyCodeTool' from JSON`,
914
- );
915
- }
916
-
917
- /** @internal */
918
- export const SyncMcpToolResponseBodyToolsResponseSyncResult$inboundSchema:
919
- z.ZodType<
920
- SyncMcpToolResponseBodyToolsResponseSyncResult,
921
- z.ZodTypeDef,
922
- unknown
923
- > = z.object({
924
- toolsTotal: z.number(),
925
- toolsAdded: z.number(),
926
- toolsRemoved: z.number(),
927
- errors: z.array(z.string()),
928
- });
929
- /** @internal */
930
- export type SyncMcpToolResponseBodyToolsResponseSyncResult$Outbound = {
931
- toolsTotal: number;
932
- toolsAdded: number;
933
- toolsRemoved: number;
934
- errors: Array<string>;
935
- };
936
-
937
- /** @internal */
938
- export const SyncMcpToolResponseBodyToolsResponseSyncResult$outboundSchema:
939
- z.ZodType<
940
- SyncMcpToolResponseBodyToolsResponseSyncResult$Outbound,
941
- z.ZodTypeDef,
942
- SyncMcpToolResponseBodyToolsResponseSyncResult
943
- > = z.object({
944
- toolsTotal: z.number(),
945
- toolsAdded: z.number(),
946
- toolsRemoved: z.number(),
947
- errors: z.array(z.string()),
948
- });
949
-
950
- export function syncMcpToolResponseBodyToolsResponseSyncResultToJSON(
951
- syncMcpToolResponseBodyToolsResponseSyncResult:
952
- SyncMcpToolResponseBodyToolsResponseSyncResult,
953
- ): string {
954
- return JSON.stringify(
955
- SyncMcpToolResponseBodyToolsResponseSyncResult$outboundSchema.parse(
956
- syncMcpToolResponseBodyToolsResponseSyncResult,
957
- ),
958
- );
959
- }
960
- export function syncMcpToolResponseBodyToolsResponseSyncResultFromJSON(
961
- jsonString: string,
962
- ): SafeParseResult<
963
- SyncMcpToolResponseBodyToolsResponseSyncResult,
964
- SDKValidationError
965
- > {
966
- return safeParse(
967
- jsonString,
968
- (x) =>
969
- SyncMcpToolResponseBodyToolsResponseSyncResult$inboundSchema.parse(
970
- JSON.parse(x),
971
- ),
972
- `Failed to parse 'SyncMcpToolResponseBodyToolsResponseSyncResult' from JSON`,
973
- );
974
- }
975
-
976
- /** @internal */
977
- export const SyncMcpToolResponseBody5$inboundSchema: z.ZodType<
978
- SyncMcpToolResponseBody5,
979
- z.ZodTypeDef,
980
- unknown
981
- > = z.object({
982
- _id: z.string().default("tool_01KADVBBP3QEB7YRJPXECZE2KY"),
983
- path: z.string(),
984
- key: z.string(),
985
- display_name: z.string().optional(),
986
- description: z.string(),
987
- created_by_id: z.string().optional(),
988
- updated_by_id: z.string().optional(),
989
- project_id: z.string(),
990
- workspace_id: z.string(),
991
- created: z.string(),
992
- updated: z.string(),
993
- status:
994
- SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
995
- .default("live"),
996
- version_hash: z.string().optional(),
997
- type:
998
- SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema,
999
- code_tool: z.lazy(() => SyncMcpToolResponseBodyCodeTool$inboundSchema),
1000
- syncResult: z.lazy(() =>
1001
- SyncMcpToolResponseBodyToolsResponseSyncResult$inboundSchema
1002
- ),
1003
- }).transform((v) => {
1004
- return remap$(v, {
1005
- "_id": "id",
1006
- "display_name": "displayName",
1007
- "created_by_id": "createdById",
1008
- "updated_by_id": "updatedById",
1009
- "project_id": "projectId",
1010
- "workspace_id": "workspaceId",
1011
- "version_hash": "versionHash",
1012
- "code_tool": "codeTool",
1013
- });
1014
- });
1015
- /** @internal */
1016
- export type SyncMcpToolResponseBody5$Outbound = {
1017
- _id: string;
1018
- path: string;
1019
- key: string;
1020
- display_name?: string | undefined;
1021
- description: string;
1022
- created_by_id?: string | undefined;
1023
- updated_by_id?: string | undefined;
1024
- project_id: string;
1025
- workspace_id: string;
1026
- created: string;
1027
- updated: string;
1028
- status: string;
1029
- version_hash?: string | undefined;
1030
- type: string;
1031
- code_tool: SyncMcpToolResponseBodyCodeTool$Outbound;
1032
- syncResult: SyncMcpToolResponseBodyToolsResponseSyncResult$Outbound;
1033
- };
1034
-
1035
- /** @internal */
1036
- export const SyncMcpToolResponseBody5$outboundSchema: z.ZodType<
1037
- SyncMcpToolResponseBody5$Outbound,
1038
- z.ZodTypeDef,
1039
- SyncMcpToolResponseBody5
1040
- > = z.object({
1041
- id: z.string().default("tool_01KADVBBP3QEB7YRJPXECZE2KY"),
1042
- path: z.string(),
1043
- key: z.string(),
1044
- displayName: z.string().optional(),
1045
- description: z.string(),
1046
- createdById: z.string().optional(),
1047
- updatedById: z.string().optional(),
1048
- projectId: z.string(),
1049
- workspaceId: z.string(),
1050
- created: z.string(),
1051
- updated: z.string(),
1052
- status:
1053
- SyncMcpToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema
1054
- .default("live"),
1055
- versionHash: z.string().optional(),
1056
- type:
1057
- SyncMcpToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema,
1058
- codeTool: z.lazy(() => SyncMcpToolResponseBodyCodeTool$outboundSchema),
1059
- syncResult: z.lazy(() =>
1060
- SyncMcpToolResponseBodyToolsResponseSyncResult$outboundSchema
1061
- ),
1062
- }).transform((v) => {
1063
- return remap$(v, {
1064
- id: "_id",
1065
- displayName: "display_name",
1066
- createdById: "created_by_id",
1067
- updatedById: "updated_by_id",
1068
- projectId: "project_id",
1069
- workspaceId: "workspace_id",
1070
- versionHash: "version_hash",
1071
- codeTool: "code_tool",
1072
- });
1073
- });
1074
-
1075
- export function syncMcpToolResponseBody5ToJSON(
1076
- syncMcpToolResponseBody5: SyncMcpToolResponseBody5,
1077
- ): string {
1078
- return JSON.stringify(
1079
- SyncMcpToolResponseBody5$outboundSchema.parse(syncMcpToolResponseBody5),
1080
- );
1081
- }
1082
- export function syncMcpToolResponseBody5FromJSON(
1083
- jsonString: string,
1084
- ): SafeParseResult<SyncMcpToolResponseBody5, SDKValidationError> {
1085
- return safeParse(
1086
- jsonString,
1087
- (x) => SyncMcpToolResponseBody5$inboundSchema.parse(JSON.parse(x)),
1088
- `Failed to parse 'SyncMcpToolResponseBody5' from JSON`,
1089
- );
1090
- }
1091
-
1092
- /** @internal */
1093
- export const SyncMcpToolResponseBodyToolsResponse200Status$inboundSchema:
1094
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponse200Status> = z
1095
- .nativeEnum(SyncMcpToolResponseBodyToolsResponse200Status);
1096
- /** @internal */
1097
- export const SyncMcpToolResponseBodyToolsResponse200Status$outboundSchema:
1098
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponse200Status> =
1099
- SyncMcpToolResponseBodyToolsResponse200Status$inboundSchema;
1100
-
1101
- /** @internal */
1102
- export const SyncMcpToolResponseBodyToolsResponse200Type$inboundSchema:
1103
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponse200Type> = z
1104
- .nativeEnum(SyncMcpToolResponseBodyToolsResponse200Type);
1105
- /** @internal */
1106
- export const SyncMcpToolResponseBodyToolsResponse200Type$outboundSchema:
1107
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponse200Type> =
1108
- SyncMcpToolResponseBodyToolsResponse200Type$inboundSchema;
1109
-
1110
- /** @internal */
1111
- export const SyncMcpToolResponseBodyHeaders$inboundSchema: z.ZodType<
1112
- SyncMcpToolResponseBodyHeaders,
1113
- z.ZodTypeDef,
1114
- unknown
1115
- > = z.object({
1116
- value: z.string(),
1117
- encrypted: z.boolean().default(false),
1118
- });
1119
- /** @internal */
1120
- export type SyncMcpToolResponseBodyHeaders$Outbound = {
1121
- value: string;
1122
- encrypted: boolean;
1123
- };
1124
-
1125
- /** @internal */
1126
- export const SyncMcpToolResponseBodyHeaders$outboundSchema: z.ZodType<
1127
- SyncMcpToolResponseBodyHeaders$Outbound,
1128
- z.ZodTypeDef,
1129
- SyncMcpToolResponseBodyHeaders
1130
- > = z.object({
1131
- value: z.string(),
1132
- encrypted: z.boolean().default(false),
1133
- });
1134
-
1135
- export function syncMcpToolResponseBodyHeadersToJSON(
1136
- syncMcpToolResponseBodyHeaders: SyncMcpToolResponseBodyHeaders,
1137
- ): string {
1138
- return JSON.stringify(
1139
- SyncMcpToolResponseBodyHeaders$outboundSchema.parse(
1140
- syncMcpToolResponseBodyHeaders,
1141
- ),
1142
- );
1143
- }
1144
- export function syncMcpToolResponseBodyHeadersFromJSON(
1145
- jsonString: string,
1146
- ): SafeParseResult<SyncMcpToolResponseBodyHeaders, SDKValidationError> {
1147
- return safeParse(
1148
- jsonString,
1149
- (x) => SyncMcpToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)),
1150
- `Failed to parse 'SyncMcpToolResponseBodyHeaders' from JSON`,
1151
- );
1152
- }
1153
-
1154
- /** @internal */
1155
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema:
1156
- z.ZodNativeEnum<
1157
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type
1158
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type);
1159
- /** @internal */
1160
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema:
1161
- z.ZodNativeEnum<
1162
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type
1163
- > = SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
1164
-
1165
- /** @internal */
1166
- export const SyncMcpToolResponseBodyToolsSchema$inboundSchema: z.ZodType<
1167
- SyncMcpToolResponseBodyToolsSchema,
1168
- z.ZodTypeDef,
1169
- unknown
1170
- > = z.object({
1171
- type:
1172
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
1173
- properties: z.record(z.any()).optional(),
1174
- required: z.array(z.string()).optional(),
1175
- });
1176
- /** @internal */
1177
- export type SyncMcpToolResponseBodyToolsSchema$Outbound = {
1178
- type: string;
1179
- properties?: { [k: string]: any } | undefined;
1180
- required?: Array<string> | undefined;
1181
- };
1182
-
1183
- /** @internal */
1184
- export const SyncMcpToolResponseBodyToolsSchema$outboundSchema: z.ZodType<
1185
- SyncMcpToolResponseBodyToolsSchema$Outbound,
1186
- z.ZodTypeDef,
1187
- SyncMcpToolResponseBodyToolsSchema
1188
- > = z.object({
1189
- type:
1190
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
1191
- properties: z.record(z.any()).optional(),
1192
- required: z.array(z.string()).optional(),
1193
- });
1194
-
1195
- export function syncMcpToolResponseBodyToolsSchemaToJSON(
1196
- syncMcpToolResponseBodyToolsSchema: SyncMcpToolResponseBodyToolsSchema,
1197
- ): string {
1198
- return JSON.stringify(
1199
- SyncMcpToolResponseBodyToolsSchema$outboundSchema.parse(
1200
- syncMcpToolResponseBodyToolsSchema,
1201
- ),
1202
- );
1203
- }
1204
- export function syncMcpToolResponseBodyToolsSchemaFromJSON(
1205
- jsonString: string,
1206
- ): SafeParseResult<SyncMcpToolResponseBodyToolsSchema, SDKValidationError> {
1207
- return safeParse(
1208
- jsonString,
1209
- (x) =>
1210
- SyncMcpToolResponseBodyToolsSchema$inboundSchema.parse(JSON.parse(x)),
1211
- `Failed to parse 'SyncMcpToolResponseBodyToolsSchema' from JSON`,
1212
- );
1213
- }
1214
-
1215
- /** @internal */
1216
- export const SyncMcpToolResponseBodyTools$inboundSchema: z.ZodType<
1217
- SyncMcpToolResponseBodyTools,
1218
- z.ZodTypeDef,
1219
- unknown
1220
- > = z.object({
1221
- id: z.string().default("01KADVBBP367G8684A290XFDFQ"),
1222
- name: z.string(),
1223
- description: z.string().optional(),
1224
- schema: z.lazy(() => SyncMcpToolResponseBodyToolsSchema$inboundSchema),
1225
- });
1226
- /** @internal */
1227
- export type SyncMcpToolResponseBodyTools$Outbound = {
1228
- id: string;
1229
- name: string;
1230
- description?: string | undefined;
1231
- schema: SyncMcpToolResponseBodyToolsSchema$Outbound;
1232
- };
1233
-
1234
- /** @internal */
1235
- export const SyncMcpToolResponseBodyTools$outboundSchema: z.ZodType<
1236
- SyncMcpToolResponseBodyTools$Outbound,
1237
- z.ZodTypeDef,
1238
- SyncMcpToolResponseBodyTools
1239
- > = z.object({
1240
- id: z.string().default("01KADVBBP367G8684A290XFDFQ"),
1241
- name: z.string(),
1242
- description: z.string().optional(),
1243
- schema: z.lazy(() => SyncMcpToolResponseBodyToolsSchema$outboundSchema),
1244
- });
1245
-
1246
- export function syncMcpToolResponseBodyToolsToJSON(
1247
- syncMcpToolResponseBodyTools: SyncMcpToolResponseBodyTools,
1248
- ): string {
1249
- return JSON.stringify(
1250
- SyncMcpToolResponseBodyTools$outboundSchema.parse(
1251
- syncMcpToolResponseBodyTools,
1252
- ),
1253
- );
1254
- }
1255
- export function syncMcpToolResponseBodyToolsFromJSON(
1256
- jsonString: string,
1257
- ): SafeParseResult<SyncMcpToolResponseBodyTools, SDKValidationError> {
1258
- return safeParse(
1259
- jsonString,
1260
- (x) => SyncMcpToolResponseBodyTools$inboundSchema.parse(JSON.parse(x)),
1261
- `Failed to parse 'SyncMcpToolResponseBodyTools' from JSON`,
1262
- );
1263
- }
1264
-
1265
- /** @internal */
1266
- export const SyncMcpToolResponseBodyConnectionType$inboundSchema:
1267
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyConnectionType> = z.nativeEnum(
1268
- SyncMcpToolResponseBodyConnectionType,
1269
- );
1270
- /** @internal */
1271
- export const SyncMcpToolResponseBodyConnectionType$outboundSchema:
1272
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyConnectionType> =
1273
- SyncMcpToolResponseBodyConnectionType$inboundSchema;
1274
-
1275
- /** @internal */
1276
- export const SyncMcpToolResponseBodyMcp$inboundSchema: z.ZodType<
1277
- SyncMcpToolResponseBodyMcp,
1278
- z.ZodTypeDef,
1279
- unknown
1280
- > = z.object({
1281
- server_url: z.string(),
1282
- headers: z.record(z.lazy(() => SyncMcpToolResponseBodyHeaders$inboundSchema))
1283
- .optional(),
1284
- tools: z.array(z.lazy(() => SyncMcpToolResponseBodyTools$inboundSchema)),
1285
- connection_type: SyncMcpToolResponseBodyConnectionType$inboundSchema,
1286
- }).transform((v) => {
1287
- return remap$(v, {
1288
- "server_url": "serverUrl",
1289
- "connection_type": "connectionType",
1290
- });
1291
- });
1292
- /** @internal */
1293
- export type SyncMcpToolResponseBodyMcp$Outbound = {
1294
- server_url: string;
1295
- headers?:
1296
- | { [k: string]: SyncMcpToolResponseBodyHeaders$Outbound }
1297
- | undefined;
1298
- tools: Array<SyncMcpToolResponseBodyTools$Outbound>;
1299
- connection_type: string;
1300
- };
1301
-
1302
- /** @internal */
1303
- export const SyncMcpToolResponseBodyMcp$outboundSchema: z.ZodType<
1304
- SyncMcpToolResponseBodyMcp$Outbound,
1305
- z.ZodTypeDef,
1306
- SyncMcpToolResponseBodyMcp
1307
- > = z.object({
1308
- serverUrl: z.string(),
1309
- headers: z.record(z.lazy(() => SyncMcpToolResponseBodyHeaders$outboundSchema))
1310
- .optional(),
1311
- tools: z.array(z.lazy(() => SyncMcpToolResponseBodyTools$outboundSchema)),
1312
- connectionType: SyncMcpToolResponseBodyConnectionType$outboundSchema,
1313
- }).transform((v) => {
1314
- return remap$(v, {
1315
- serverUrl: "server_url",
1316
- connectionType: "connection_type",
1317
- });
1318
- });
1319
-
1320
- export function syncMcpToolResponseBodyMcpToJSON(
1321
- syncMcpToolResponseBodyMcp: SyncMcpToolResponseBodyMcp,
1322
- ): string {
1323
- return JSON.stringify(
1324
- SyncMcpToolResponseBodyMcp$outboundSchema.parse(syncMcpToolResponseBodyMcp),
1325
- );
1326
- }
1327
- export function syncMcpToolResponseBodyMcpFromJSON(
1328
- jsonString: string,
1329
- ): SafeParseResult<SyncMcpToolResponseBodyMcp, SDKValidationError> {
1330
- return safeParse(
1331
- jsonString,
1332
- (x) => SyncMcpToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)),
1333
- `Failed to parse 'SyncMcpToolResponseBodyMcp' from JSON`,
1334
- );
1335
- }
1336
-
1337
- /** @internal */
1338
- export const SyncMcpToolResponseBodyToolsSyncResult$inboundSchema: z.ZodType<
1339
- SyncMcpToolResponseBodyToolsSyncResult,
1340
- z.ZodTypeDef,
1341
- unknown
1342
- > = z.object({
1343
- toolsTotal: z.number(),
1344
- toolsAdded: z.number(),
1345
- toolsRemoved: z.number(),
1346
- errors: z.array(z.string()),
1347
- });
1348
- /** @internal */
1349
- export type SyncMcpToolResponseBodyToolsSyncResult$Outbound = {
1350
- toolsTotal: number;
1351
- toolsAdded: number;
1352
- toolsRemoved: number;
1353
- errors: Array<string>;
1354
- };
1355
-
1356
- /** @internal */
1357
- export const SyncMcpToolResponseBodyToolsSyncResult$outboundSchema: z.ZodType<
1358
- SyncMcpToolResponseBodyToolsSyncResult$Outbound,
1359
- z.ZodTypeDef,
1360
- SyncMcpToolResponseBodyToolsSyncResult
1361
- > = z.object({
1362
- toolsTotal: z.number(),
1363
- toolsAdded: z.number(),
1364
- toolsRemoved: z.number(),
1365
- errors: z.array(z.string()),
1366
- });
1367
-
1368
- export function syncMcpToolResponseBodyToolsSyncResultToJSON(
1369
- syncMcpToolResponseBodyToolsSyncResult:
1370
- SyncMcpToolResponseBodyToolsSyncResult,
1371
- ): string {
1372
- return JSON.stringify(
1373
- SyncMcpToolResponseBodyToolsSyncResult$outboundSchema.parse(
1374
- syncMcpToolResponseBodyToolsSyncResult,
1375
- ),
1376
- );
1377
- }
1378
- export function syncMcpToolResponseBodyToolsSyncResultFromJSON(
1379
- jsonString: string,
1380
- ): SafeParseResult<SyncMcpToolResponseBodyToolsSyncResult, SDKValidationError> {
1381
- return safeParse(
1382
- jsonString,
1383
- (x) =>
1384
- SyncMcpToolResponseBodyToolsSyncResult$inboundSchema.parse(JSON.parse(x)),
1385
- `Failed to parse 'SyncMcpToolResponseBodyToolsSyncResult' from JSON`,
1386
- );
1387
- }
1388
-
1389
- /** @internal */
1390
- export const SyncMcpToolResponseBody4$inboundSchema: z.ZodType<
1391
- SyncMcpToolResponseBody4,
1392
- z.ZodTypeDef,
1393
- unknown
1394
- > = z.object({
1395
- _id: z.string().default("tool_01KADVBBP13KXS9P0NT76JCST0"),
1396
- path: z.string(),
1397
- key: z.string(),
1398
- display_name: z.string().optional(),
1399
- description: z.string(),
1400
- created_by_id: z.string().optional(),
1401
- updated_by_id: z.string().optional(),
1402
- project_id: z.string(),
1403
- workspace_id: z.string(),
1404
- created: z.string(),
1405
- updated: z.string(),
1406
- status: SyncMcpToolResponseBodyToolsResponse200Status$inboundSchema.default(
1407
- "live",
1408
- ),
1409
- version_hash: z.string().optional(),
1410
- type: SyncMcpToolResponseBodyToolsResponse200Type$inboundSchema,
1411
- mcp: z.lazy(() => SyncMcpToolResponseBodyMcp$inboundSchema),
1412
- syncResult: z.lazy(() =>
1413
- SyncMcpToolResponseBodyToolsSyncResult$inboundSchema
1414
- ),
1415
- }).transform((v) => {
1416
- return remap$(v, {
1417
- "_id": "id",
1418
- "display_name": "displayName",
1419
- "created_by_id": "createdById",
1420
- "updated_by_id": "updatedById",
1421
- "project_id": "projectId",
1422
- "workspace_id": "workspaceId",
1423
- "version_hash": "versionHash",
1424
- });
1425
- });
1426
- /** @internal */
1427
- export type SyncMcpToolResponseBody4$Outbound = {
1428
- _id: string;
1429
- path: string;
1430
- key: string;
1431
- display_name?: string | undefined;
1432
- description: string;
1433
- created_by_id?: string | undefined;
1434
- updated_by_id?: string | undefined;
1435
- project_id: string;
1436
- workspace_id: string;
1437
- created: string;
1438
- updated: string;
1439
- status: string;
1440
- version_hash?: string | undefined;
1441
- type: string;
1442
- mcp: SyncMcpToolResponseBodyMcp$Outbound;
1443
- syncResult: SyncMcpToolResponseBodyToolsSyncResult$Outbound;
1444
- };
1445
-
1446
- /** @internal */
1447
- export const SyncMcpToolResponseBody4$outboundSchema: z.ZodType<
1448
- SyncMcpToolResponseBody4$Outbound,
1449
- z.ZodTypeDef,
1450
- SyncMcpToolResponseBody4
1451
- > = z.object({
1452
- id: z.string().default("tool_01KADVBBP13KXS9P0NT76JCST0"),
1453
- path: z.string(),
1454
- key: z.string(),
1455
- displayName: z.string().optional(),
1456
- description: z.string(),
1457
- createdById: z.string().optional(),
1458
- updatedById: z.string().optional(),
1459
- projectId: z.string(),
1460
- workspaceId: z.string(),
1461
- created: z.string(),
1462
- updated: z.string(),
1463
- status: SyncMcpToolResponseBodyToolsResponse200Status$outboundSchema.default(
1464
- "live",
1465
- ),
1466
- versionHash: z.string().optional(),
1467
- type: SyncMcpToolResponseBodyToolsResponse200Type$outboundSchema,
1468
- mcp: z.lazy(() => SyncMcpToolResponseBodyMcp$outboundSchema),
1469
- syncResult: z.lazy(() =>
1470
- SyncMcpToolResponseBodyToolsSyncResult$outboundSchema
1471
- ),
1472
- }).transform((v) => {
1473
- return remap$(v, {
1474
- id: "_id",
1475
- displayName: "display_name",
1476
- createdById: "created_by_id",
1477
- updatedById: "updated_by_id",
1478
- projectId: "project_id",
1479
- workspaceId: "workspace_id",
1480
- versionHash: "version_hash",
1481
- });
1482
- });
1483
-
1484
- export function syncMcpToolResponseBody4ToJSON(
1485
- syncMcpToolResponseBody4: SyncMcpToolResponseBody4,
1486
- ): string {
1487
- return JSON.stringify(
1488
- SyncMcpToolResponseBody4$outboundSchema.parse(syncMcpToolResponseBody4),
1489
- );
1490
- }
1491
- export function syncMcpToolResponseBody4FromJSON(
1492
- jsonString: string,
1493
- ): SafeParseResult<SyncMcpToolResponseBody4, SDKValidationError> {
1494
- return safeParse(
1495
- jsonString,
1496
- (x) => SyncMcpToolResponseBody4$inboundSchema.parse(JSON.parse(x)),
1497
- `Failed to parse 'SyncMcpToolResponseBody4' from JSON`,
1498
- );
1499
- }
1500
-
1501
- /** @internal */
1502
- export const SyncMcpToolResponseBodyToolsResponseStatus$inboundSchema:
1503
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponseStatus> = z
1504
- .nativeEnum(SyncMcpToolResponseBodyToolsResponseStatus);
1505
- /** @internal */
1506
- export const SyncMcpToolResponseBodyToolsResponseStatus$outboundSchema:
1507
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponseStatus> =
1508
- SyncMcpToolResponseBodyToolsResponseStatus$inboundSchema;
1509
-
1510
- /** @internal */
1511
- export const SyncMcpToolResponseBodyToolsResponseType$inboundSchema:
1512
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponseType> = z
1513
- .nativeEnum(SyncMcpToolResponseBodyToolsResponseType);
1514
- /** @internal */
1515
- export const SyncMcpToolResponseBodyToolsResponseType$outboundSchema:
1516
- z.ZodNativeEnum<typeof SyncMcpToolResponseBodyToolsResponseType> =
1517
- SyncMcpToolResponseBodyToolsResponseType$inboundSchema;
1518
-
1519
- /** @internal */
1520
- export const SyncMcpToolResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
1521
- typeof SyncMcpToolResponseBodyMethod
1522
- > = z.nativeEnum(SyncMcpToolResponseBodyMethod);
1523
- /** @internal */
1524
- export const SyncMcpToolResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
1525
- typeof SyncMcpToolResponseBodyMethod
1526
- > = SyncMcpToolResponseBodyMethod$inboundSchema;
1527
-
1528
- /** @internal */
1529
- export const SyncMcpToolHeaders2$inboundSchema: z.ZodType<
1530
- SyncMcpToolHeaders2,
1531
- z.ZodTypeDef,
1532
- unknown
1533
- > = z.object({
1534
- value: z.string(),
1535
- encrypted: z.boolean().default(false),
1536
- });
1537
- /** @internal */
1538
- export type SyncMcpToolHeaders2$Outbound = {
1539
- value: string;
1540
- encrypted: boolean;
1541
- };
1542
-
1543
- /** @internal */
1544
- export const SyncMcpToolHeaders2$outboundSchema: z.ZodType<
1545
- SyncMcpToolHeaders2$Outbound,
1546
- z.ZodTypeDef,
1547
- SyncMcpToolHeaders2
1548
- > = z.object({
1549
- value: z.string(),
1550
- encrypted: z.boolean().default(false),
1551
- });
1552
-
1553
- export function syncMcpToolHeaders2ToJSON(
1554
- syncMcpToolHeaders2: SyncMcpToolHeaders2,
1555
- ): string {
1556
- return JSON.stringify(
1557
- SyncMcpToolHeaders2$outboundSchema.parse(syncMcpToolHeaders2),
1558
- );
1559
- }
1560
- export function syncMcpToolHeaders2FromJSON(
1561
- jsonString: string,
1562
- ): SafeParseResult<SyncMcpToolHeaders2, SDKValidationError> {
1563
- return safeParse(
1564
- jsonString,
1565
- (x) => SyncMcpToolHeaders2$inboundSchema.parse(JSON.parse(x)),
1566
- `Failed to parse 'SyncMcpToolHeaders2' from JSON`,
1567
- );
1568
- }
1569
-
1570
- /** @internal */
1571
- export const SyncMcpToolResponseBodyToolsHeaders$inboundSchema: z.ZodType<
1572
- SyncMcpToolResponseBodyToolsHeaders,
1573
- z.ZodTypeDef,
1574
- unknown
1575
- > = z.union([z.lazy(() => SyncMcpToolHeaders2$inboundSchema), z.string()]);
1576
- /** @internal */
1577
- export type SyncMcpToolResponseBodyToolsHeaders$Outbound =
1578
- | SyncMcpToolHeaders2$Outbound
1579
- | string;
1580
-
1581
- /** @internal */
1582
- export const SyncMcpToolResponseBodyToolsHeaders$outboundSchema: z.ZodType<
1583
- SyncMcpToolResponseBodyToolsHeaders$Outbound,
1584
- z.ZodTypeDef,
1585
- SyncMcpToolResponseBodyToolsHeaders
1586
- > = z.union([z.lazy(() => SyncMcpToolHeaders2$outboundSchema), z.string()]);
1587
-
1588
- export function syncMcpToolResponseBodyToolsHeadersToJSON(
1589
- syncMcpToolResponseBodyToolsHeaders: SyncMcpToolResponseBodyToolsHeaders,
1590
- ): string {
1591
- return JSON.stringify(
1592
- SyncMcpToolResponseBodyToolsHeaders$outboundSchema.parse(
1593
- syncMcpToolResponseBodyToolsHeaders,
1594
- ),
1595
- );
1596
- }
1597
- export function syncMcpToolResponseBodyToolsHeadersFromJSON(
1598
- jsonString: string,
1599
- ): SafeParseResult<SyncMcpToolResponseBodyToolsHeaders, SDKValidationError> {
1600
- return safeParse(
1601
- jsonString,
1602
- (x) =>
1603
- SyncMcpToolResponseBodyToolsHeaders$inboundSchema.parse(JSON.parse(x)),
1604
- `Failed to parse 'SyncMcpToolResponseBodyToolsHeaders' from JSON`,
1605
- );
1606
- }
1607
-
1608
- /** @internal */
1609
- export const SyncMcpToolResponseBodyBlueprint$inboundSchema: z.ZodType<
1610
- SyncMcpToolResponseBodyBlueprint,
1611
- z.ZodTypeDef,
1612
- unknown
1613
- > = z.object({
1614
- url: z.string(),
1615
- method: SyncMcpToolResponseBodyMethod$inboundSchema,
1616
- headers: z.record(
1617
- z.union([z.lazy(() => SyncMcpToolHeaders2$inboundSchema), z.string()]),
1618
- ).optional(),
1619
- body: z.record(z.any()).optional(),
1620
- });
1621
- /** @internal */
1622
- export type SyncMcpToolResponseBodyBlueprint$Outbound = {
1623
- url: string;
1624
- method: string;
1625
- headers?: { [k: string]: SyncMcpToolHeaders2$Outbound | string } | undefined;
1626
- body?: { [k: string]: any } | undefined;
1627
- };
1628
-
1629
- /** @internal */
1630
- export const SyncMcpToolResponseBodyBlueprint$outboundSchema: z.ZodType<
1631
- SyncMcpToolResponseBodyBlueprint$Outbound,
1632
- z.ZodTypeDef,
1633
- SyncMcpToolResponseBodyBlueprint
1634
- > = z.object({
1635
- url: z.string(),
1636
- method: SyncMcpToolResponseBodyMethod$outboundSchema,
1637
- headers: z.record(
1638
- z.union([z.lazy(() => SyncMcpToolHeaders2$outboundSchema), z.string()]),
1639
- ).optional(),
1640
- body: z.record(z.any()).optional(),
1641
- });
1642
-
1643
- export function syncMcpToolResponseBodyBlueprintToJSON(
1644
- syncMcpToolResponseBodyBlueprint: SyncMcpToolResponseBodyBlueprint,
1645
- ): string {
1646
- return JSON.stringify(
1647
- SyncMcpToolResponseBodyBlueprint$outboundSchema.parse(
1648
- syncMcpToolResponseBodyBlueprint,
1649
- ),
1650
- );
1651
- }
1652
- export function syncMcpToolResponseBodyBlueprintFromJSON(
1653
- jsonString: string,
1654
- ): SafeParseResult<SyncMcpToolResponseBodyBlueprint, SDKValidationError> {
1655
- return safeParse(
1656
- jsonString,
1657
- (x) => SyncMcpToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
1658
- `Failed to parse 'SyncMcpToolResponseBodyBlueprint' from JSON`,
1659
- );
1660
- }
1661
-
1662
- /** @internal */
1663
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema:
1664
- z.ZodNativeEnum<
1665
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type
1666
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type);
1667
- /** @internal */
1668
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema:
1669
- z.ZodNativeEnum<
1670
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type
1671
- > = SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
1672
-
1673
- /** @internal */
1674
- export const SyncMcpToolResponseBodyDefaultValue$inboundSchema: z.ZodType<
1675
- SyncMcpToolResponseBodyDefaultValue,
1676
- z.ZodTypeDef,
1677
- unknown
1678
- > = z.union([z.string(), z.number(), z.boolean()]);
1679
- /** @internal */
1680
- export type SyncMcpToolResponseBodyDefaultValue$Outbound =
1681
- | string
1682
- | number
1683
- | boolean;
1684
-
1685
- /** @internal */
1686
- export const SyncMcpToolResponseBodyDefaultValue$outboundSchema: z.ZodType<
1687
- SyncMcpToolResponseBodyDefaultValue$Outbound,
1688
- z.ZodTypeDef,
1689
- SyncMcpToolResponseBodyDefaultValue
1690
- > = z.union([z.string(), z.number(), z.boolean()]);
1691
-
1692
- export function syncMcpToolResponseBodyDefaultValueToJSON(
1693
- syncMcpToolResponseBodyDefaultValue: SyncMcpToolResponseBodyDefaultValue,
1694
- ): string {
1695
- return JSON.stringify(
1696
- SyncMcpToolResponseBodyDefaultValue$outboundSchema.parse(
1697
- syncMcpToolResponseBodyDefaultValue,
1698
- ),
1699
- );
1700
- }
1701
- export function syncMcpToolResponseBodyDefaultValueFromJSON(
1702
- jsonString: string,
1703
- ): SafeParseResult<SyncMcpToolResponseBodyDefaultValue, SDKValidationError> {
1704
- return safeParse(
1705
- jsonString,
1706
- (x) =>
1707
- SyncMcpToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
1708
- `Failed to parse 'SyncMcpToolResponseBodyDefaultValue' from JSON`,
1709
- );
1710
- }
1711
-
1712
- /** @internal */
1713
- export const SyncMcpToolResponseBodyArguments$inboundSchema: z.ZodType<
1714
- SyncMcpToolResponseBodyArguments,
1715
- z.ZodTypeDef,
1716
- unknown
1717
- > = z.object({
1718
- type:
1719
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
1720
- description: z.string(),
1721
- send_to_model: z.boolean().default(true),
1722
- default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
1723
- }).transform((v) => {
1724
- return remap$(v, {
1725
- "send_to_model": "sendToModel",
1726
- "default_value": "defaultValue",
1727
- });
1728
- });
1729
- /** @internal */
1730
- export type SyncMcpToolResponseBodyArguments$Outbound = {
1731
- type: string;
1732
- description: string;
1733
- send_to_model: boolean;
1734
- default_value?: string | number | boolean | undefined;
1735
- };
1736
-
1737
- /** @internal */
1738
- export const SyncMcpToolResponseBodyArguments$outboundSchema: z.ZodType<
1739
- SyncMcpToolResponseBodyArguments$Outbound,
1740
- z.ZodTypeDef,
1741
- SyncMcpToolResponseBodyArguments
1742
- > = z.object({
1743
- type:
1744
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema,
1745
- description: z.string(),
1746
- sendToModel: z.boolean().default(true),
1747
- defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
1748
- }).transform((v) => {
1749
- return remap$(v, {
1750
- sendToModel: "send_to_model",
1751
- defaultValue: "default_value",
1752
- });
1753
- });
1754
-
1755
- export function syncMcpToolResponseBodyArgumentsToJSON(
1756
- syncMcpToolResponseBodyArguments: SyncMcpToolResponseBodyArguments,
1757
- ): string {
1758
- return JSON.stringify(
1759
- SyncMcpToolResponseBodyArguments$outboundSchema.parse(
1760
- syncMcpToolResponseBodyArguments,
1761
- ),
1762
- );
1763
- }
1764
- export function syncMcpToolResponseBodyArgumentsFromJSON(
1765
- jsonString: string,
1766
- ): SafeParseResult<SyncMcpToolResponseBodyArguments, SDKValidationError> {
1767
- return safeParse(
1768
- jsonString,
1769
- (x) => SyncMcpToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
1770
- `Failed to parse 'SyncMcpToolResponseBodyArguments' from JSON`,
1771
- );
1772
- }
1773
-
1774
- /** @internal */
1775
- export const SyncMcpToolResponseBodyHttp$inboundSchema: z.ZodType<
1776
- SyncMcpToolResponseBodyHttp,
1777
- z.ZodTypeDef,
1778
- unknown
1779
- > = z.object({
1780
- blueprint: z.lazy(() => SyncMcpToolResponseBodyBlueprint$inboundSchema),
1781
- arguments: z.record(
1782
- z.lazy(() => SyncMcpToolResponseBodyArguments$inboundSchema),
1783
- ).optional(),
1784
- });
1785
- /** @internal */
1786
- export type SyncMcpToolResponseBodyHttp$Outbound = {
1787
- blueprint: SyncMcpToolResponseBodyBlueprint$Outbound;
1788
- arguments?:
1789
- | { [k: string]: SyncMcpToolResponseBodyArguments$Outbound }
1790
- | undefined;
1791
- };
1792
-
1793
- /** @internal */
1794
- export const SyncMcpToolResponseBodyHttp$outboundSchema: z.ZodType<
1795
- SyncMcpToolResponseBodyHttp$Outbound,
1796
- z.ZodTypeDef,
1797
- SyncMcpToolResponseBodyHttp
1798
- > = z.object({
1799
- blueprint: z.lazy(() => SyncMcpToolResponseBodyBlueprint$outboundSchema),
1800
- arguments: z.record(
1801
- z.lazy(() => SyncMcpToolResponseBodyArguments$outboundSchema),
1802
- ).optional(),
1803
- });
1804
-
1805
- export function syncMcpToolResponseBodyHttpToJSON(
1806
- syncMcpToolResponseBodyHttp: SyncMcpToolResponseBodyHttp,
1807
- ): string {
1808
- return JSON.stringify(
1809
- SyncMcpToolResponseBodyHttp$outboundSchema.parse(
1810
- syncMcpToolResponseBodyHttp,
1811
- ),
1812
- );
1813
- }
1814
- export function syncMcpToolResponseBodyHttpFromJSON(
1815
- jsonString: string,
1816
- ): SafeParseResult<SyncMcpToolResponseBodyHttp, SDKValidationError> {
1817
- return safeParse(
1818
- jsonString,
1819
- (x) => SyncMcpToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
1820
- `Failed to parse 'SyncMcpToolResponseBodyHttp' from JSON`,
1821
- );
1822
- }
1823
-
1824
- /** @internal */
1825
- export const SyncMcpToolResponseBodySyncResult$inboundSchema: z.ZodType<
1826
- SyncMcpToolResponseBodySyncResult,
1827
- z.ZodTypeDef,
1828
- unknown
1829
- > = z.object({
1830
- toolsTotal: z.number(),
1831
- toolsAdded: z.number(),
1832
- toolsRemoved: z.number(),
1833
- errors: z.array(z.string()),
1834
- });
1835
- /** @internal */
1836
- export type SyncMcpToolResponseBodySyncResult$Outbound = {
1837
- toolsTotal: number;
1838
- toolsAdded: number;
1839
- toolsRemoved: number;
1840
- errors: Array<string>;
1841
- };
1842
-
1843
- /** @internal */
1844
- export const SyncMcpToolResponseBodySyncResult$outboundSchema: z.ZodType<
1845
- SyncMcpToolResponseBodySyncResult$Outbound,
1846
- z.ZodTypeDef,
1847
- SyncMcpToolResponseBodySyncResult
1848
- > = z.object({
1849
- toolsTotal: z.number(),
1850
- toolsAdded: z.number(),
1851
- toolsRemoved: z.number(),
1852
- errors: z.array(z.string()),
1853
- });
1854
-
1855
- export function syncMcpToolResponseBodySyncResultToJSON(
1856
- syncMcpToolResponseBodySyncResult: SyncMcpToolResponseBodySyncResult,
1857
- ): string {
1858
- return JSON.stringify(
1859
- SyncMcpToolResponseBodySyncResult$outboundSchema.parse(
1860
- syncMcpToolResponseBodySyncResult,
1861
- ),
1862
- );
1863
- }
1864
- export function syncMcpToolResponseBodySyncResultFromJSON(
1865
- jsonString: string,
1866
- ): SafeParseResult<SyncMcpToolResponseBodySyncResult, SDKValidationError> {
1867
- return safeParse(
1868
- jsonString,
1869
- (x) => SyncMcpToolResponseBodySyncResult$inboundSchema.parse(JSON.parse(x)),
1870
- `Failed to parse 'SyncMcpToolResponseBodySyncResult' from JSON`,
1871
- );
1872
- }
1873
-
1874
- /** @internal */
1875
- export const SyncMcpToolResponseBody3$inboundSchema: z.ZodType<
1876
- SyncMcpToolResponseBody3,
1877
- z.ZodTypeDef,
1878
- unknown
1879
- > = z.object({
1880
- _id: z.string().default("tool_01KADVBBNX19770Z8ZF4Q8SQ0S"),
1881
- path: z.string(),
1882
- key: z.string(),
1883
- display_name: z.string().optional(),
1884
- description: z.string(),
1885
- created_by_id: z.string().optional(),
1886
- updated_by_id: z.string().optional(),
1887
- project_id: z.string(),
1888
- workspace_id: z.string(),
1889
- created: z.string(),
1890
- updated: z.string(),
1891
- status: SyncMcpToolResponseBodyToolsResponseStatus$inboundSchema.default(
1892
- "live",
1893
- ),
1894
- version_hash: z.string().optional(),
1895
- type: SyncMcpToolResponseBodyToolsResponseType$inboundSchema,
1896
- http: z.lazy(() => SyncMcpToolResponseBodyHttp$inboundSchema),
1897
- syncResult: z.lazy(() => SyncMcpToolResponseBodySyncResult$inboundSchema),
1898
- }).transform((v) => {
1899
- return remap$(v, {
1900
- "_id": "id",
1901
- "display_name": "displayName",
1902
- "created_by_id": "createdById",
1903
- "updated_by_id": "updatedById",
1904
- "project_id": "projectId",
1905
- "workspace_id": "workspaceId",
1906
- "version_hash": "versionHash",
1907
- });
1908
- });
1909
- /** @internal */
1910
- export type SyncMcpToolResponseBody3$Outbound = {
1911
- _id: string;
1912
- path: string;
1913
- key: string;
1914
- display_name?: string | undefined;
1915
- description: string;
1916
- created_by_id?: string | undefined;
1917
- updated_by_id?: string | undefined;
1918
- project_id: string;
1919
- workspace_id: string;
1920
- created: string;
1921
- updated: string;
1922
- status: string;
1923
- version_hash?: string | undefined;
1924
- type: string;
1925
- http: SyncMcpToolResponseBodyHttp$Outbound;
1926
- syncResult: SyncMcpToolResponseBodySyncResult$Outbound;
1927
- };
1928
-
1929
- /** @internal */
1930
- export const SyncMcpToolResponseBody3$outboundSchema: z.ZodType<
1931
- SyncMcpToolResponseBody3$Outbound,
1932
- z.ZodTypeDef,
1933
- SyncMcpToolResponseBody3
1934
- > = z.object({
1935
- id: z.string().default("tool_01KADVBBNX19770Z8ZF4Q8SQ0S"),
1936
- path: z.string(),
1937
- key: z.string(),
1938
- displayName: z.string().optional(),
1939
- description: z.string(),
1940
- createdById: z.string().optional(),
1941
- updatedById: z.string().optional(),
1942
- projectId: z.string(),
1943
- workspaceId: z.string(),
1944
- created: z.string(),
1945
- updated: z.string(),
1946
- status: SyncMcpToolResponseBodyToolsResponseStatus$outboundSchema.default(
1947
- "live",
1948
- ),
1949
- versionHash: z.string().optional(),
1950
- type: SyncMcpToolResponseBodyToolsResponseType$outboundSchema,
1951
- http: z.lazy(() => SyncMcpToolResponseBodyHttp$outboundSchema),
1952
- syncResult: z.lazy(() => SyncMcpToolResponseBodySyncResult$outboundSchema),
1953
- }).transform((v) => {
1954
- return remap$(v, {
1955
- id: "_id",
1956
- displayName: "display_name",
1957
- createdById: "created_by_id",
1958
- updatedById: "updated_by_id",
1959
- projectId: "project_id",
1960
- workspaceId: "workspace_id",
1961
- versionHash: "version_hash",
1962
- });
1963
- });
1964
-
1965
- export function syncMcpToolResponseBody3ToJSON(
1966
- syncMcpToolResponseBody3: SyncMcpToolResponseBody3,
1967
- ): string {
1968
- return JSON.stringify(
1969
- SyncMcpToolResponseBody3$outboundSchema.parse(syncMcpToolResponseBody3),
1970
- );
1971
- }
1972
- export function syncMcpToolResponseBody3FromJSON(
1973
- jsonString: string,
1974
- ): SafeParseResult<SyncMcpToolResponseBody3, SDKValidationError> {
1975
- return safeParse(
1976
- jsonString,
1977
- (x) => SyncMcpToolResponseBody3$inboundSchema.parse(JSON.parse(x)),
1978
- `Failed to parse 'SyncMcpToolResponseBody3' from JSON`,
1979
- );
1980
- }
1981
-
1982
- /** @internal */
1983
- export const SyncMcpToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
1984
- typeof SyncMcpToolResponseBodyToolsStatus
1985
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsStatus);
1986
- /** @internal */
1987
- export const SyncMcpToolResponseBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
1988
- typeof SyncMcpToolResponseBodyToolsStatus
1989
- > = SyncMcpToolResponseBodyToolsStatus$inboundSchema;
1990
-
1991
- /** @internal */
1992
- export const SyncMcpToolResponseBodyToolsType$inboundSchema: z.ZodNativeEnum<
1993
- typeof SyncMcpToolResponseBodyToolsType
1994
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsType);
1995
- /** @internal */
1996
- export const SyncMcpToolResponseBodyToolsType$outboundSchema: z.ZodNativeEnum<
1997
- typeof SyncMcpToolResponseBodyToolsType
1998
- > = SyncMcpToolResponseBodyToolsType$inboundSchema;
1999
-
2000
- /** @internal */
2001
- export const SyncMcpToolResponseBodySchema$inboundSchema: z.ZodType<
2002
- SyncMcpToolResponseBodySchema,
2003
- z.ZodTypeDef,
2004
- unknown
2005
- > = collectExtraKeys$(
2006
- z.object({
2007
- type: z.string(),
2008
- properties: z.record(z.any()),
2009
- required: z.array(z.string()),
2010
- }).catchall(z.any()),
2011
- "additionalProperties",
2012
- true,
2013
- );
2014
- /** @internal */
2015
- export type SyncMcpToolResponseBodySchema$Outbound = {
2016
- type: string;
2017
- properties: { [k: string]: any };
2018
- required: Array<string>;
2019
- [additionalProperties: string]: unknown;
2020
- };
2021
-
2022
- /** @internal */
2023
- export const SyncMcpToolResponseBodySchema$outboundSchema: z.ZodType<
2024
- SyncMcpToolResponseBodySchema$Outbound,
2025
- z.ZodTypeDef,
2026
- SyncMcpToolResponseBodySchema
2027
- > = z.object({
2028
- type: z.string(),
2029
- properties: z.record(z.any()),
2030
- required: z.array(z.string()),
2031
- additionalProperties: z.record(z.any()).optional(),
2032
- }).transform((v) => {
2033
- return {
2034
- ...v.additionalProperties,
2035
- ...remap$(v, {
2036
- additionalProperties: null,
2037
- }),
2038
- };
2039
- });
2040
-
2041
- export function syncMcpToolResponseBodySchemaToJSON(
2042
- syncMcpToolResponseBodySchema: SyncMcpToolResponseBodySchema,
2043
- ): string {
2044
- return JSON.stringify(
2045
- SyncMcpToolResponseBodySchema$outboundSchema.parse(
2046
- syncMcpToolResponseBodySchema,
2047
- ),
2048
- );
2049
- }
2050
- export function syncMcpToolResponseBodySchemaFromJSON(
2051
- jsonString: string,
2052
- ): SafeParseResult<SyncMcpToolResponseBodySchema, SDKValidationError> {
2053
- return safeParse(
2054
- jsonString,
2055
- (x) => SyncMcpToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
2056
- `Failed to parse 'SyncMcpToolResponseBodySchema' from JSON`,
2057
- );
2058
- }
2059
-
2060
- /** @internal */
2061
- export const SyncMcpToolResponseBodyJsonSchema$inboundSchema: z.ZodType<
2062
- SyncMcpToolResponseBodyJsonSchema,
2063
- z.ZodTypeDef,
2064
- unknown
2065
- > = z.object({
2066
- name: z.string(),
2067
- description: z.string(),
2068
- schema: z.lazy(() => SyncMcpToolResponseBodySchema$inboundSchema),
2069
- strict: z.boolean().optional(),
2070
- });
2071
- /** @internal */
2072
- export type SyncMcpToolResponseBodyJsonSchema$Outbound = {
2073
- name: string;
2074
- description: string;
2075
- schema: SyncMcpToolResponseBodySchema$Outbound;
2076
- strict?: boolean | undefined;
2077
- };
2078
-
2079
- /** @internal */
2080
- export const SyncMcpToolResponseBodyJsonSchema$outboundSchema: z.ZodType<
2081
- SyncMcpToolResponseBodyJsonSchema$Outbound,
2082
- z.ZodTypeDef,
2083
- SyncMcpToolResponseBodyJsonSchema
2084
- > = z.object({
2085
- name: z.string(),
2086
- description: z.string(),
2087
- schema: z.lazy(() => SyncMcpToolResponseBodySchema$outboundSchema),
2088
- strict: z.boolean().optional(),
2089
- });
2090
-
2091
- export function syncMcpToolResponseBodyJsonSchemaToJSON(
2092
- syncMcpToolResponseBodyJsonSchema: SyncMcpToolResponseBodyJsonSchema,
2093
- ): string {
2094
- return JSON.stringify(
2095
- SyncMcpToolResponseBodyJsonSchema$outboundSchema.parse(
2096
- syncMcpToolResponseBodyJsonSchema,
2097
- ),
2098
- );
2099
- }
2100
- export function syncMcpToolResponseBodyJsonSchemaFromJSON(
2101
- jsonString: string,
2102
- ): SafeParseResult<SyncMcpToolResponseBodyJsonSchema, SDKValidationError> {
2103
- return safeParse(
2104
- jsonString,
2105
- (x) => SyncMcpToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
2106
- `Failed to parse 'SyncMcpToolResponseBodyJsonSchema' from JSON`,
2107
- );
2108
- }
2109
-
2110
- /** @internal */
2111
- export const ResponseBodySyncResult$inboundSchema: z.ZodType<
2112
- ResponseBodySyncResult,
2113
- z.ZodTypeDef,
2114
- unknown
2115
- > = z.object({
2116
- toolsTotal: z.number(),
2117
- toolsAdded: z.number(),
2118
- toolsRemoved: z.number(),
2119
- errors: z.array(z.string()),
2120
- });
2121
- /** @internal */
2122
- export type ResponseBodySyncResult$Outbound = {
2123
- toolsTotal: number;
2124
- toolsAdded: number;
2125
- toolsRemoved: number;
2126
- errors: Array<string>;
2127
- };
2128
-
2129
- /** @internal */
2130
- export const ResponseBodySyncResult$outboundSchema: z.ZodType<
2131
- ResponseBodySyncResult$Outbound,
2132
- z.ZodTypeDef,
2133
- ResponseBodySyncResult
2134
- > = z.object({
2135
- toolsTotal: z.number(),
2136
- toolsAdded: z.number(),
2137
- toolsRemoved: z.number(),
2138
- errors: z.array(z.string()),
2139
- });
2140
-
2141
- export function responseBodySyncResultToJSON(
2142
- responseBodySyncResult: ResponseBodySyncResult,
2143
- ): string {
2144
- return JSON.stringify(
2145
- ResponseBodySyncResult$outboundSchema.parse(responseBodySyncResult),
2146
- );
2147
- }
2148
- export function responseBodySyncResultFromJSON(
2149
- jsonString: string,
2150
- ): SafeParseResult<ResponseBodySyncResult, SDKValidationError> {
2151
- return safeParse(
2152
- jsonString,
2153
- (x) => ResponseBodySyncResult$inboundSchema.parse(JSON.parse(x)),
2154
- `Failed to parse 'ResponseBodySyncResult' from JSON`,
2155
- );
2156
- }
2157
-
2158
- /** @internal */
2159
- export const SyncMcpToolResponseBody2$inboundSchema: z.ZodType<
2160
- SyncMcpToolResponseBody2,
2161
- z.ZodTypeDef,
2162
- unknown
2163
- > = z.object({
2164
- _id: z.string().default("tool_01KADVBBNT137QX8VHADN64CFB"),
2165
- path: z.string(),
2166
- key: z.string(),
2167
- display_name: z.string().optional(),
2168
- description: z.string(),
2169
- created_by_id: z.string().optional(),
2170
- updated_by_id: z.string().optional(),
2171
- project_id: z.string(),
2172
- workspace_id: z.string(),
2173
- created: z.string(),
2174
- updated: z.string(),
2175
- status: SyncMcpToolResponseBodyToolsStatus$inboundSchema.default("live"),
2176
- version_hash: z.string().optional(),
2177
- type: SyncMcpToolResponseBodyToolsType$inboundSchema,
2178
- json_schema: z.lazy(() => SyncMcpToolResponseBodyJsonSchema$inboundSchema),
2179
- syncResult: z.lazy(() => ResponseBodySyncResult$inboundSchema),
2180
- }).transform((v) => {
2181
- return remap$(v, {
2182
- "_id": "id",
2183
- "display_name": "displayName",
2184
- "created_by_id": "createdById",
2185
- "updated_by_id": "updatedById",
2186
- "project_id": "projectId",
2187
- "workspace_id": "workspaceId",
2188
- "version_hash": "versionHash",
2189
- "json_schema": "jsonSchema",
2190
- });
2191
- });
2192
- /** @internal */
2193
- export type SyncMcpToolResponseBody2$Outbound = {
2194
- _id: string;
2195
- path: string;
2196
- key: string;
2197
- display_name?: string | undefined;
2198
- description: string;
2199
- created_by_id?: string | undefined;
2200
- updated_by_id?: string | undefined;
2201
- project_id: string;
2202
- workspace_id: string;
2203
- created: string;
2204
- updated: string;
2205
- status: string;
2206
- version_hash?: string | undefined;
2207
- type: string;
2208
- json_schema: SyncMcpToolResponseBodyJsonSchema$Outbound;
2209
- syncResult: ResponseBodySyncResult$Outbound;
2210
- };
2211
-
2212
- /** @internal */
2213
- export const SyncMcpToolResponseBody2$outboundSchema: z.ZodType<
2214
- SyncMcpToolResponseBody2$Outbound,
2215
- z.ZodTypeDef,
2216
- SyncMcpToolResponseBody2
2217
- > = z.object({
2218
- id: z.string().default("tool_01KADVBBNT137QX8VHADN64CFB"),
2219
- path: z.string(),
2220
- key: z.string(),
2221
- displayName: z.string().optional(),
2222
- description: z.string(),
2223
- createdById: z.string().optional(),
2224
- updatedById: z.string().optional(),
2225
- projectId: z.string(),
2226
- workspaceId: z.string(),
2227
- created: z.string(),
2228
- updated: z.string(),
2229
- status: SyncMcpToolResponseBodyToolsStatus$outboundSchema.default("live"),
2230
- versionHash: z.string().optional(),
2231
- type: SyncMcpToolResponseBodyToolsType$outboundSchema,
2232
- jsonSchema: z.lazy(() => SyncMcpToolResponseBodyJsonSchema$outboundSchema),
2233
- syncResult: z.lazy(() => ResponseBodySyncResult$outboundSchema),
2234
- }).transform((v) => {
2235
- return remap$(v, {
2236
- id: "_id",
2237
- displayName: "display_name",
2238
- createdById: "created_by_id",
2239
- updatedById: "updated_by_id",
2240
- projectId: "project_id",
2241
- workspaceId: "workspace_id",
2242
- versionHash: "version_hash",
2243
- jsonSchema: "json_schema",
2244
- });
2245
- });
2246
-
2247
- export function syncMcpToolResponseBody2ToJSON(
2248
- syncMcpToolResponseBody2: SyncMcpToolResponseBody2,
2249
- ): string {
2250
- return JSON.stringify(
2251
- SyncMcpToolResponseBody2$outboundSchema.parse(syncMcpToolResponseBody2),
2252
- );
2253
- }
2254
- export function syncMcpToolResponseBody2FromJSON(
2255
- jsonString: string,
2256
- ): SafeParseResult<SyncMcpToolResponseBody2, SDKValidationError> {
2257
- return safeParse(
2258
- jsonString,
2259
- (x) => SyncMcpToolResponseBody2$inboundSchema.parse(JSON.parse(x)),
2260
- `Failed to parse 'SyncMcpToolResponseBody2' from JSON`,
2261
- );
2262
- }
2263
-
2264
- /** @internal */
2265
- export const SyncMcpToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
2266
- typeof SyncMcpToolResponseBodyStatus
2267
- > = z.nativeEnum(SyncMcpToolResponseBodyStatus);
2268
- /** @internal */
2269
- export const SyncMcpToolResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
2270
- typeof SyncMcpToolResponseBodyStatus
2271
- > = SyncMcpToolResponseBodyStatus$inboundSchema;
2272
-
2273
- /** @internal */
2274
- export const SyncMcpToolResponseBodyType$inboundSchema: z.ZodNativeEnum<
2275
- typeof SyncMcpToolResponseBodyType
2276
- > = z.nativeEnum(SyncMcpToolResponseBodyType);
2277
- /** @internal */
2278
- export const SyncMcpToolResponseBodyType$outboundSchema: z.ZodNativeEnum<
2279
- typeof SyncMcpToolResponseBodyType
2280
- > = SyncMcpToolResponseBodyType$inboundSchema;
2281
-
2282
- /** @internal */
2283
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema:
2284
- z.ZodNativeEnum<
2285
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type
2286
- > = z.nativeEnum(SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type);
2287
- /** @internal */
2288
- export const SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema:
2289
- z.ZodNativeEnum<
2290
- typeof SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type
2291
- > = SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema;
2292
-
2293
- /** @internal */
2294
- export const SyncMcpToolResponseBodyParameters$inboundSchema: z.ZodType<
2295
- SyncMcpToolResponseBodyParameters,
2296
- z.ZodTypeDef,
2297
- unknown
2298
- > = collectExtraKeys$(
2299
- z.object({
2300
- type:
2301
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
2302
- properties: z.record(z.any()),
2303
- required: z.array(z.string()),
2304
- }).catchall(z.any()),
2305
- "additionalProperties",
2306
- true,
2307
- );
2308
- /** @internal */
2309
- export type SyncMcpToolResponseBodyParameters$Outbound = {
2310
- type: string;
2311
- properties: { [k: string]: any };
2312
- required: Array<string>;
2313
- [additionalProperties: string]: unknown;
2314
- };
2315
-
2316
- /** @internal */
2317
- export const SyncMcpToolResponseBodyParameters$outboundSchema: z.ZodType<
2318
- SyncMcpToolResponseBodyParameters$Outbound,
2319
- z.ZodTypeDef,
2320
- SyncMcpToolResponseBodyParameters
2321
- > = z.object({
2322
- type:
2323
- SyncMcpToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema,
2324
- properties: z.record(z.any()),
2325
- required: z.array(z.string()),
2326
- additionalProperties: z.record(z.any()).optional(),
2327
- }).transform((v) => {
2328
- return {
2329
- ...v.additionalProperties,
2330
- ...remap$(v, {
2331
- additionalProperties: null,
2332
- }),
2333
- };
2334
- });
2335
-
2336
- export function syncMcpToolResponseBodyParametersToJSON(
2337
- syncMcpToolResponseBodyParameters: SyncMcpToolResponseBodyParameters,
2338
- ): string {
2339
- return JSON.stringify(
2340
- SyncMcpToolResponseBodyParameters$outboundSchema.parse(
2341
- syncMcpToolResponseBodyParameters,
2342
- ),
2343
- );
2344
- }
2345
- export function syncMcpToolResponseBodyParametersFromJSON(
2346
- jsonString: string,
2347
- ): SafeParseResult<SyncMcpToolResponseBodyParameters, SDKValidationError> {
2348
- return safeParse(
2349
- jsonString,
2350
- (x) => SyncMcpToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
2351
- `Failed to parse 'SyncMcpToolResponseBodyParameters' from JSON`,
2352
- );
2353
- }
2354
-
2355
- /** @internal */
2356
- export const SyncMcpToolResponseBodyFunction$inboundSchema: z.ZodType<
2357
- SyncMcpToolResponseBodyFunction,
2358
- z.ZodTypeDef,
2359
- unknown
2360
- > = z.object({
2361
- name: z.string(),
2362
- description: z.string().optional(),
2363
- strict: z.boolean().optional(),
2364
- parameters: z.lazy(() => SyncMcpToolResponseBodyParameters$inboundSchema)
2365
- .optional(),
2366
- });
2367
- /** @internal */
2368
- export type SyncMcpToolResponseBodyFunction$Outbound = {
2369
- name: string;
2370
- description?: string | undefined;
2371
- strict?: boolean | undefined;
2372
- parameters?: SyncMcpToolResponseBodyParameters$Outbound | undefined;
2373
- };
2374
-
2375
- /** @internal */
2376
- export const SyncMcpToolResponseBodyFunction$outboundSchema: z.ZodType<
2377
- SyncMcpToolResponseBodyFunction$Outbound,
2378
- z.ZodTypeDef,
2379
- SyncMcpToolResponseBodyFunction
2380
- > = z.object({
2381
- name: z.string(),
2382
- description: z.string().optional(),
2383
- strict: z.boolean().optional(),
2384
- parameters: z.lazy(() => SyncMcpToolResponseBodyParameters$outboundSchema)
2385
- .optional(),
2386
- });
2387
-
2388
- export function syncMcpToolResponseBodyFunctionToJSON(
2389
- syncMcpToolResponseBodyFunction: SyncMcpToolResponseBodyFunction,
2390
- ): string {
2391
- return JSON.stringify(
2392
- SyncMcpToolResponseBodyFunction$outboundSchema.parse(
2393
- syncMcpToolResponseBodyFunction,
2394
- ),
2395
- );
2396
- }
2397
- export function syncMcpToolResponseBodyFunctionFromJSON(
2398
- jsonString: string,
2399
- ): SafeParseResult<SyncMcpToolResponseBodyFunction, SDKValidationError> {
2400
- return safeParse(
2401
- jsonString,
2402
- (x) => SyncMcpToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
2403
- `Failed to parse 'SyncMcpToolResponseBodyFunction' from JSON`,
2404
- );
2405
- }
2406
-
2407
- /** @internal */
2408
- export const SyncResult$inboundSchema: z.ZodType<
2409
- SyncResult,
2410
- z.ZodTypeDef,
2411
- unknown
2412
- > = z.object({
2413
- toolsTotal: z.number(),
2414
- toolsAdded: z.number(),
2415
- toolsRemoved: z.number(),
2416
- errors: z.array(z.string()),
2417
- });
2418
- /** @internal */
2419
- export type SyncResult$Outbound = {
2420
- toolsTotal: number;
2421
- toolsAdded: number;
2422
- toolsRemoved: number;
2423
- errors: Array<string>;
2424
- };
2425
-
2426
- /** @internal */
2427
- export const SyncResult$outboundSchema: z.ZodType<
2428
- SyncResult$Outbound,
2429
- z.ZodTypeDef,
2430
- SyncResult
2431
- > = z.object({
2432
- toolsTotal: z.number(),
2433
- toolsAdded: z.number(),
2434
- toolsRemoved: z.number(),
2435
- errors: z.array(z.string()),
2436
- });
2437
-
2438
- export function syncResultToJSON(syncResult: SyncResult): string {
2439
- return JSON.stringify(SyncResult$outboundSchema.parse(syncResult));
2440
- }
2441
- export function syncResultFromJSON(
2442
- jsonString: string,
2443
- ): SafeParseResult<SyncResult, SDKValidationError> {
2444
- return safeParse(
2445
- jsonString,
2446
- (x) => SyncResult$inboundSchema.parse(JSON.parse(x)),
2447
- `Failed to parse 'SyncResult' from JSON`,
2448
- );
2449
- }
2450
-
2451
- /** @internal */
2452
- export const SyncMcpToolResponseBody1$inboundSchema: z.ZodType<
2453
- SyncMcpToolResponseBody1,
2454
- z.ZodTypeDef,
2455
- unknown
2456
- > = z.object({
2457
- _id: z.string().default("tool_01KADVBBNS21PJG0QG3DEXH6A9"),
2458
- path: z.string(),
2459
- key: z.string(),
2460
- display_name: z.string().optional(),
2461
- description: z.string(),
2462
- created_by_id: z.string().optional(),
2463
- updated_by_id: z.string().optional(),
2464
- project_id: z.string(),
2465
- workspace_id: z.string(),
2466
- created: z.string(),
2467
- updated: z.string(),
2468
- status: SyncMcpToolResponseBodyStatus$inboundSchema.default("live"),
2469
- version_hash: z.string().optional(),
2470
- type: SyncMcpToolResponseBodyType$inboundSchema,
2471
- function: z.lazy(() => SyncMcpToolResponseBodyFunction$inboundSchema),
2472
- syncResult: z.lazy(() => SyncResult$inboundSchema),
2473
- }).transform((v) => {
2474
- return remap$(v, {
2475
- "_id": "id",
2476
- "display_name": "displayName",
2477
- "created_by_id": "createdById",
2478
- "updated_by_id": "updatedById",
2479
- "project_id": "projectId",
2480
- "workspace_id": "workspaceId",
2481
- "version_hash": "versionHash",
2482
- });
2483
- });
2484
- /** @internal */
2485
- export type SyncMcpToolResponseBody1$Outbound = {
2486
- _id: string;
2487
- path: string;
2488
- key: string;
2489
- display_name?: string | undefined;
2490
- description: string;
2491
- created_by_id?: string | undefined;
2492
- updated_by_id?: string | undefined;
2493
- project_id: string;
2494
- workspace_id: string;
2495
- created: string;
2496
- updated: string;
2497
- status: string;
2498
- version_hash?: string | undefined;
2499
- type: string;
2500
- function: SyncMcpToolResponseBodyFunction$Outbound;
2501
- syncResult: SyncResult$Outbound;
2502
- };
2503
-
2504
- /** @internal */
2505
- export const SyncMcpToolResponseBody1$outboundSchema: z.ZodType<
2506
- SyncMcpToolResponseBody1$Outbound,
2507
- z.ZodTypeDef,
2508
- SyncMcpToolResponseBody1
2509
- > = z.object({
2510
- id: z.string().default("tool_01KADVBBNS21PJG0QG3DEXH6A9"),
2511
- path: z.string(),
2512
- key: z.string(),
2513
- displayName: z.string().optional(),
2514
- description: z.string(),
2515
- createdById: z.string().optional(),
2516
- updatedById: z.string().optional(),
2517
- projectId: z.string(),
2518
- workspaceId: z.string(),
2519
- created: z.string(),
2520
- updated: z.string(),
2521
- status: SyncMcpToolResponseBodyStatus$outboundSchema.default("live"),
2522
- versionHash: z.string().optional(),
2523
- type: SyncMcpToolResponseBodyType$outboundSchema,
2524
- function: z.lazy(() => SyncMcpToolResponseBodyFunction$outboundSchema),
2525
- syncResult: z.lazy(() => SyncResult$outboundSchema),
2526
- }).transform((v) => {
2527
- return remap$(v, {
2528
- id: "_id",
2529
- displayName: "display_name",
2530
- createdById: "created_by_id",
2531
- updatedById: "updated_by_id",
2532
- projectId: "project_id",
2533
- workspaceId: "workspace_id",
2534
- versionHash: "version_hash",
2535
- });
2536
- });
2537
-
2538
- export function syncMcpToolResponseBody1ToJSON(
2539
- syncMcpToolResponseBody1: SyncMcpToolResponseBody1,
2540
- ): string {
2541
- return JSON.stringify(
2542
- SyncMcpToolResponseBody1$outboundSchema.parse(syncMcpToolResponseBody1),
2543
- );
2544
- }
2545
- export function syncMcpToolResponseBody1FromJSON(
2546
- jsonString: string,
2547
- ): SafeParseResult<SyncMcpToolResponseBody1, SDKValidationError> {
2548
- return safeParse(
2549
- jsonString,
2550
- (x) => SyncMcpToolResponseBody1$inboundSchema.parse(JSON.parse(x)),
2551
- `Failed to parse 'SyncMcpToolResponseBody1' from JSON`,
2552
- );
2553
- }
2554
-
2555
- /** @internal */
2556
- export const SyncMcpToolResponseBody$inboundSchema: z.ZodType<
2557
- SyncMcpToolResponseBody,
2558
- z.ZodTypeDef,
2559
- unknown
2560
- > = z.union([
2561
- z.lazy(() => SyncMcpToolResponseBody1$inboundSchema),
2562
- z.lazy(() => SyncMcpToolResponseBody2$inboundSchema),
2563
- z.lazy(() => SyncMcpToolResponseBody3$inboundSchema),
2564
- z.lazy(() => SyncMcpToolResponseBody4$inboundSchema),
2565
- z.lazy(() => SyncMcpToolResponseBody5$inboundSchema),
2566
- ]);
2567
- /** @internal */
2568
- export type SyncMcpToolResponseBody$Outbound =
2569
- | SyncMcpToolResponseBody1$Outbound
2570
- | SyncMcpToolResponseBody2$Outbound
2571
- | SyncMcpToolResponseBody3$Outbound
2572
- | SyncMcpToolResponseBody4$Outbound
2573
- | SyncMcpToolResponseBody5$Outbound;
2574
-
2575
- /** @internal */
2576
- export const SyncMcpToolResponseBody$outboundSchema: z.ZodType<
2577
- SyncMcpToolResponseBody$Outbound,
2578
- z.ZodTypeDef,
2579
- SyncMcpToolResponseBody
2580
- > = z.union([
2581
- z.lazy(() => SyncMcpToolResponseBody1$outboundSchema),
2582
- z.lazy(() => SyncMcpToolResponseBody2$outboundSchema),
2583
- z.lazy(() => SyncMcpToolResponseBody3$outboundSchema),
2584
- z.lazy(() => SyncMcpToolResponseBody4$outboundSchema),
2585
- z.lazy(() => SyncMcpToolResponseBody5$outboundSchema),
2586
- ]);
2587
-
2588
- export function syncMcpToolResponseBodyToJSON(
2589
- syncMcpToolResponseBody: SyncMcpToolResponseBody,
2590
- ): string {
2591
- return JSON.stringify(
2592
- SyncMcpToolResponseBody$outboundSchema.parse(syncMcpToolResponseBody),
2593
- );
2594
- }
2595
- export function syncMcpToolResponseBodyFromJSON(
2596
- jsonString: string,
2597
- ): SafeParseResult<SyncMcpToolResponseBody, SDKValidationError> {
2598
- return safeParse(
2599
- jsonString,
2600
- (x) => SyncMcpToolResponseBody$inboundSchema.parse(JSON.parse(x)),
2601
- `Failed to parse 'SyncMcpToolResponseBody' from JSON`,
2602
- );
2603
- }