@orq-ai/node 4.0.0-rc.30 → 4.0.0-rc.31
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.
- package/README.md +24 -22
- package/bin/mcp-server.js +2116 -596
- package/bin/mcp-server.js.map +50 -47
- package/docs/sdks/tools/README.md +93 -12
- package/examples/package-lock.json +1 -1
- package/funcs/toolsCreate.d.ts +2 -1
- package/funcs/toolsCreate.d.ts.map +1 -1
- package/funcs/toolsCreate.js +6 -2
- package/funcs/toolsCreate.js.map +1 -1
- package/funcs/toolsSync.d.ts +18 -0
- package/funcs/toolsSync.d.ts.map +1 -0
- package/funcs/toolsSync.js +123 -0
- package/funcs/toolsSync.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/toolsSync.d.ts +8 -0
- package/mcp-server/tools/toolsSync.d.ts.map +1 -0
- package/mcp-server/tools/toolsSync.js +64 -0
- package/mcp-server/tools/toolsSync.js.map +1 -0
- package/models/operations/createagent.d.ts +53 -24
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +51 -25
- package/models/operations/createagent.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.d.ts +373 -144
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +332 -133
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +8 -8
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +13 -12
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/duplicateagent.d.ts +0 -19
- package/models/operations/duplicateagent.d.ts.map +1 -1
- package/models/operations/duplicateagent.js +3 -21
- package/models/operations/duplicateagent.js.map +1 -1
- package/models/operations/duplicatetool.d.ts +189 -49
- package/models/operations/duplicatetool.d.ts.map +1 -1
- package/models/operations/duplicatetool.js +172 -44
- package/models/operations/duplicatetool.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagent.d.ts +0 -19
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js +3 -20
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getalltools.d.ts +194 -54
- package/models/operations/getalltools.d.ts.map +1 -1
- package/models/operations/getalltools.js +176 -51
- package/models/operations/getalltools.js.map +1 -1
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listagents.d.ts +0 -19
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +3 -22
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.d.ts +189 -49
- package/models/operations/retrievetool.d.ts.map +1 -1
- package/models/operations/retrievetool.js +172 -44
- package/models/operations/retrievetool.js.map +1 -1
- package/models/operations/runagent.d.ts +279 -23
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +274 -15
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +282 -26
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +268 -22
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/syncmcptool.d.ts +1113 -0
- package/models/operations/syncmcptool.d.ts.map +1 -0
- package/models/operations/syncmcptool.js +1070 -0
- package/models/operations/syncmcptool.js.map +1 -0
- package/models/operations/updateagent.d.ts +53 -43
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +52 -43
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.d.ts +394 -114
- package/models/operations/updatetool.d.ts.map +1 -1
- package/models/operations/updatetool.js +356 -95
- package/models/operations/updatetool.js.map +1 -1
- package/package.json +1 -1
- package/sdk/tools.d.ts +7 -0
- package/sdk/tools.d.ts.map +1 -1
- package/sdk/tools.js +10 -0
- package/sdk/tools.js.map +1 -1
- package/src/funcs/toolsCreate.ts +11 -2
- package/src/funcs/toolsSync.ts +176 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/toolsSync.ts +37 -0
- package/src/models/operations/createagent.ts +114 -40
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +873 -277
- package/src/models/operations/deploymentgetconfig.ts +29 -20
- package/src/models/operations/duplicateagent.ts +0 -37
- package/src/models/operations/duplicatetool.ts +466 -87
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getagent.ts +0 -38
- package/src/models/operations/getalltools.ts +447 -96
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/listagents.ts +0 -37
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +466 -85
- package/src/models/operations/runagent.ts +656 -25
- package/src/models/operations/streamrunagent.ts +749 -34
- package/src/models/operations/syncmcptool.ts +2599 -0
- package/src/models/operations/updateagent.ts +121 -77
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +910 -190
- package/src/sdk/tools.ts +18 -0
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
8
11
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
12
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
13
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -32,6 +35,38 @@ export type CreateToolRequestBodyToolsRequest5Type = ClosedEnum<
|
|
|
32
35
|
typeof CreateToolRequestBodyToolsRequest5Type
|
|
33
36
|
>;
|
|
34
37
|
|
|
38
|
+
/**
|
|
39
|
+
* The type must be "object"
|
|
40
|
+
*/
|
|
41
|
+
export const CreateToolRequestBodyToolsRequest5CodeToolType = {
|
|
42
|
+
Object: "object",
|
|
43
|
+
} as const;
|
|
44
|
+
/**
|
|
45
|
+
* The type must be "object"
|
|
46
|
+
*/
|
|
47
|
+
export type CreateToolRequestBodyToolsRequest5CodeToolType = ClosedEnum<
|
|
48
|
+
typeof CreateToolRequestBodyToolsRequest5CodeToolType
|
|
49
|
+
>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 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.
|
|
53
|
+
*/
|
|
54
|
+
export type CreateToolRequestBodyParameters = {
|
|
55
|
+
/**
|
|
56
|
+
* The type must be "object"
|
|
57
|
+
*/
|
|
58
|
+
type: CreateToolRequestBodyToolsRequest5CodeToolType;
|
|
59
|
+
/**
|
|
60
|
+
* The properties of the function parameters
|
|
61
|
+
*/
|
|
62
|
+
properties: { [k: string]: any };
|
|
63
|
+
/**
|
|
64
|
+
* Array of required parameter names
|
|
65
|
+
*/
|
|
66
|
+
required: Array<string>;
|
|
67
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
68
|
+
};
|
|
69
|
+
|
|
35
70
|
export const RequestBodyLanguage = {
|
|
36
71
|
Python: "python",
|
|
37
72
|
} as const;
|
|
@@ -41,7 +76,7 @@ export type RequestBodyCodeTool = {
|
|
|
41
76
|
/**
|
|
42
77
|
* The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
43
78
|
*/
|
|
44
|
-
parameters?:
|
|
79
|
+
parameters?: CreateToolRequestBodyParameters | undefined;
|
|
45
80
|
language: RequestBodyLanguage;
|
|
46
81
|
/**
|
|
47
82
|
* The code to execute.
|
|
@@ -111,65 +146,39 @@ export type RequestBodyHeaders = {
|
|
|
111
146
|
encrypted?: boolean | undefined;
|
|
112
147
|
};
|
|
113
148
|
|
|
114
|
-
export const CreateToolRequestBodyToolsRequest4McpType = {
|
|
115
|
-
Object: "object",
|
|
116
|
-
} as const;
|
|
117
|
-
export type CreateToolRequestBodyToolsRequest4McpType = ClosedEnum<
|
|
118
|
-
typeof CreateToolRequestBodyToolsRequest4McpType
|
|
119
|
-
>;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The original MCP tool input schema for LLM conversion
|
|
123
|
-
*/
|
|
124
|
-
export type InputSchema = {
|
|
125
|
-
type: CreateToolRequestBodyToolsRequest4McpType;
|
|
126
|
-
properties?: { [k: string]: any } | undefined;
|
|
127
|
-
required?: Array<string> | undefined;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
149
|
/**
|
|
131
150
|
* The connection type used by the MCP server
|
|
132
151
|
*/
|
|
133
|
-
export const
|
|
152
|
+
export const RequestBodyConnectionType = {
|
|
134
153
|
Http: "http",
|
|
135
154
|
Sse: "sse",
|
|
136
155
|
} as const;
|
|
137
156
|
/**
|
|
138
157
|
* The connection type used by the MCP server
|
|
139
158
|
*/
|
|
140
|
-
export type
|
|
159
|
+
export type RequestBodyConnectionType = ClosedEnum<
|
|
160
|
+
typeof RequestBodyConnectionType
|
|
161
|
+
>;
|
|
141
162
|
|
|
142
|
-
export type
|
|
143
|
-
/**
|
|
144
|
-
* The ID of the MCP server this tool belongs to
|
|
145
|
-
*/
|
|
146
|
-
serverId: string;
|
|
147
|
-
/**
|
|
148
|
-
* The original tool name from the MCP server
|
|
149
|
-
*/
|
|
150
|
-
toolName: string;
|
|
163
|
+
export type RequestBodyMcp = {
|
|
151
164
|
/**
|
|
152
165
|
* The MCP server URL (cached for execution)
|
|
153
166
|
*/
|
|
154
167
|
serverUrl: string;
|
|
155
168
|
/**
|
|
156
|
-
* HTTP headers for MCP server requests
|
|
169
|
+
* HTTP headers for MCP server requests with encryption support
|
|
157
170
|
*/
|
|
158
171
|
headers?: { [k: string]: RequestBodyHeaders } | undefined;
|
|
159
|
-
/**
|
|
160
|
-
* The original MCP tool input schema for LLM conversion
|
|
161
|
-
*/
|
|
162
|
-
inputSchema: InputSchema;
|
|
163
172
|
/**
|
|
164
173
|
* The connection type used by the MCP server
|
|
165
174
|
*/
|
|
166
|
-
connectionType:
|
|
175
|
+
connectionType: RequestBodyConnectionType;
|
|
167
176
|
};
|
|
168
177
|
|
|
169
178
|
/**
|
|
170
179
|
* A tool from a Model Context Protocol (MCP) server that provides standardized access to external capabilities.
|
|
171
180
|
*/
|
|
172
|
-
export type
|
|
181
|
+
export type RequestBodyMCPTool = {
|
|
173
182
|
/**
|
|
174
183
|
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
175
184
|
*
|
|
@@ -197,7 +206,7 @@ export type MCPTool = {
|
|
|
197
206
|
*/
|
|
198
207
|
status?: CreateToolRequestBodyToolsRequestStatus | undefined;
|
|
199
208
|
type: CreateToolRequestBodyToolsRequest4Type;
|
|
200
|
-
mcp:
|
|
209
|
+
mcp: RequestBodyMcp;
|
|
201
210
|
};
|
|
202
211
|
|
|
203
212
|
/**
|
|
@@ -239,11 +248,13 @@ export type CreateToolRequestBodyMethod = ClosedEnum<
|
|
|
239
248
|
typeof CreateToolRequestBodyMethod
|
|
240
249
|
>;
|
|
241
250
|
|
|
242
|
-
export type
|
|
251
|
+
export type CreateToolHeaders2 = {
|
|
243
252
|
value: string;
|
|
244
253
|
encrypted?: boolean | undefined;
|
|
245
254
|
};
|
|
246
255
|
|
|
256
|
+
export type CreateToolRequestBodyHeaders = CreateToolHeaders2 | string;
|
|
257
|
+
|
|
247
258
|
/**
|
|
248
259
|
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
249
260
|
*/
|
|
@@ -257,9 +268,9 @@ export type RequestBodyBlueprint = {
|
|
|
257
268
|
*/
|
|
258
269
|
method: CreateToolRequestBodyMethod;
|
|
259
270
|
/**
|
|
260
|
-
* The headers to send with the request.
|
|
271
|
+
* The headers to send with the request. Can be a string value or an object with value and encrypted properties.
|
|
261
272
|
*/
|
|
262
|
-
headers?: { [k: string]:
|
|
273
|
+
headers?: { [k: string]: CreateToolHeaders2 | string } | undefined;
|
|
263
274
|
/**
|
|
264
275
|
* The body to send with the request.
|
|
265
276
|
*/
|
|
@@ -373,6 +384,25 @@ export type CreateToolRequestBodyToolsType = ClosedEnum<
|
|
|
373
384
|
typeof CreateToolRequestBodyToolsType
|
|
374
385
|
>;
|
|
375
386
|
|
|
387
|
+
/**
|
|
388
|
+
* 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.
|
|
389
|
+
*/
|
|
390
|
+
export type RequestBodySchema = {
|
|
391
|
+
/**
|
|
392
|
+
* The JSON Schema type
|
|
393
|
+
*/
|
|
394
|
+
type: string;
|
|
395
|
+
/**
|
|
396
|
+
* The properties of the JSON Schema object
|
|
397
|
+
*/
|
|
398
|
+
properties: { [k: string]: any };
|
|
399
|
+
/**
|
|
400
|
+
* Array of required property names
|
|
401
|
+
*/
|
|
402
|
+
required: Array<string>;
|
|
403
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
404
|
+
};
|
|
405
|
+
|
|
376
406
|
export type RequestBodyJsonSchema = {
|
|
377
407
|
/**
|
|
378
408
|
* 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.
|
|
@@ -381,11 +411,11 @@ export type RequestBodyJsonSchema = {
|
|
|
381
411
|
/**
|
|
382
412
|
* A description of what the response format is for. This will be shown to the user.
|
|
383
413
|
*/
|
|
384
|
-
description
|
|
414
|
+
description: string;
|
|
385
415
|
/**
|
|
386
416
|
* 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.
|
|
387
417
|
*/
|
|
388
|
-
schema:
|
|
418
|
+
schema: RequestBodySchema;
|
|
389
419
|
/**
|
|
390
420
|
* 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.
|
|
391
421
|
*/
|
|
@@ -447,6 +477,38 @@ export type CreateToolRequestBodyType = ClosedEnum<
|
|
|
447
477
|
typeof CreateToolRequestBodyType
|
|
448
478
|
>;
|
|
449
479
|
|
|
480
|
+
/**
|
|
481
|
+
* The type must be "object"
|
|
482
|
+
*/
|
|
483
|
+
export const CreateToolRequestBodyToolsRequest1Type = {
|
|
484
|
+
Object: "object",
|
|
485
|
+
} as const;
|
|
486
|
+
/**
|
|
487
|
+
* The type must be "object"
|
|
488
|
+
*/
|
|
489
|
+
export type CreateToolRequestBodyToolsRequest1Type = ClosedEnum<
|
|
490
|
+
typeof CreateToolRequestBodyToolsRequest1Type
|
|
491
|
+
>;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* 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.
|
|
495
|
+
*/
|
|
496
|
+
export type RequestBodyParameters = {
|
|
497
|
+
/**
|
|
498
|
+
* The type must be "object"
|
|
499
|
+
*/
|
|
500
|
+
type: CreateToolRequestBodyToolsRequest1Type;
|
|
501
|
+
/**
|
|
502
|
+
* The properties of the function parameters
|
|
503
|
+
*/
|
|
504
|
+
properties: { [k: string]: any };
|
|
505
|
+
/**
|
|
506
|
+
* Array of required parameter names
|
|
507
|
+
*/
|
|
508
|
+
required: Array<string>;
|
|
509
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
510
|
+
};
|
|
511
|
+
|
|
450
512
|
export type RequestBodyFunction = {
|
|
451
513
|
/**
|
|
452
514
|
* 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.
|
|
@@ -463,7 +525,7 @@ export type RequestBodyFunction = {
|
|
|
463
525
|
/**
|
|
464
526
|
* 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.
|
|
465
527
|
*/
|
|
466
|
-
parameters?:
|
|
528
|
+
parameters?: RequestBodyParameters | undefined;
|
|
467
529
|
};
|
|
468
530
|
|
|
469
531
|
/**
|
|
@@ -507,7 +569,7 @@ export type CreateToolRequestBody =
|
|
|
507
569
|
| RequestBodyFunctionTool
|
|
508
570
|
| JSONSchemaTool
|
|
509
571
|
| RequestBodyHTTPTool
|
|
510
|
-
|
|
|
572
|
+
| RequestBodyMCPTool
|
|
511
573
|
| RequestBodyCodeExecutionTool;
|
|
512
574
|
|
|
513
575
|
/**
|
|
@@ -532,6 +594,37 @@ export const CreateToolResponseBodyToolsResponse200ApplicationJSONType = {
|
|
|
532
594
|
export type CreateToolResponseBodyToolsResponse200ApplicationJSONType =
|
|
533
595
|
ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJSONType>;
|
|
534
596
|
|
|
597
|
+
/**
|
|
598
|
+
* The type must be "object"
|
|
599
|
+
*/
|
|
600
|
+
export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type = {
|
|
601
|
+
Object: "object",
|
|
602
|
+
} as const;
|
|
603
|
+
/**
|
|
604
|
+
* The type must be "object"
|
|
605
|
+
*/
|
|
606
|
+
export type CreateToolResponseBodyToolsResponse200ApplicationJson5Type =
|
|
607
|
+
ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type>;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* 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.
|
|
611
|
+
*/
|
|
612
|
+
export type CreateToolResponseBodyParameters = {
|
|
613
|
+
/**
|
|
614
|
+
* The type must be "object"
|
|
615
|
+
*/
|
|
616
|
+
type: CreateToolResponseBodyToolsResponse200ApplicationJson5Type;
|
|
617
|
+
/**
|
|
618
|
+
* The properties of the function parameters
|
|
619
|
+
*/
|
|
620
|
+
properties: { [k: string]: any };
|
|
621
|
+
/**
|
|
622
|
+
* Array of required parameter names
|
|
623
|
+
*/
|
|
624
|
+
required: Array<string>;
|
|
625
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
626
|
+
};
|
|
627
|
+
|
|
535
628
|
export const ResponseBodyLanguage = {
|
|
536
629
|
Python: "python",
|
|
537
630
|
} as const;
|
|
@@ -541,7 +634,7 @@ export type ResponseBodyCodeTool = {
|
|
|
541
634
|
/**
|
|
542
635
|
* 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.
|
|
543
636
|
*/
|
|
544
|
-
parameters?:
|
|
637
|
+
parameters?: CreateToolResponseBodyParameters | undefined;
|
|
545
638
|
language: ResponseBodyLanguage;
|
|
546
639
|
/**
|
|
547
640
|
* The code to execute.
|
|
@@ -628,15 +721,18 @@ export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type = {
|
|
|
628
721
|
export type CreateToolResponseBodyToolsResponse200ApplicationJson4Type =
|
|
629
722
|
ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson4Type>;
|
|
630
723
|
|
|
631
|
-
|
|
632
|
-
* The original MCP tool input schema for LLM conversion
|
|
633
|
-
*/
|
|
634
|
-
export type ResponseBodyInputSchema = {
|
|
724
|
+
export type CreateToolResponseBodySchema = {
|
|
635
725
|
type: CreateToolResponseBodyToolsResponse200ApplicationJson4Type;
|
|
636
726
|
properties?: { [k: string]: any } | undefined;
|
|
637
727
|
required?: Array<string> | undefined;
|
|
638
728
|
};
|
|
639
729
|
|
|
730
|
+
export type ResponseBodyTools = {
|
|
731
|
+
name: string;
|
|
732
|
+
description?: string | undefined;
|
|
733
|
+
schema: CreateToolResponseBodySchema;
|
|
734
|
+
};
|
|
735
|
+
|
|
640
736
|
/**
|
|
641
737
|
* The connection type used by the MCP server
|
|
642
738
|
*/
|
|
@@ -652,26 +748,18 @@ export type ResponseBodyConnectionType = ClosedEnum<
|
|
|
652
748
|
>;
|
|
653
749
|
|
|
654
750
|
export type ResponseBodyMcp = {
|
|
655
|
-
/**
|
|
656
|
-
* The ID of the MCP server this tool belongs to
|
|
657
|
-
*/
|
|
658
|
-
serverId: string;
|
|
659
|
-
/**
|
|
660
|
-
* The original tool name from the MCP server
|
|
661
|
-
*/
|
|
662
|
-
toolName: string;
|
|
663
751
|
/**
|
|
664
752
|
* The MCP server URL (cached for execution)
|
|
665
753
|
*/
|
|
666
754
|
serverUrl: string;
|
|
667
755
|
/**
|
|
668
|
-
* HTTP headers for MCP server requests
|
|
756
|
+
* HTTP headers for MCP server requests with encryption support
|
|
669
757
|
*/
|
|
670
758
|
headers?: { [k: string]: ResponseBodyHeaders } | undefined;
|
|
671
759
|
/**
|
|
672
|
-
*
|
|
760
|
+
* Array of tools available from the MCP server
|
|
673
761
|
*/
|
|
674
|
-
|
|
762
|
+
tools: Array<ResponseBodyTools>;
|
|
675
763
|
/**
|
|
676
764
|
* The connection type used by the MCP server
|
|
677
765
|
*/
|
|
@@ -762,11 +850,13 @@ export type CreateToolResponseBodyMethod = ClosedEnum<
|
|
|
762
850
|
typeof CreateToolResponseBodyMethod
|
|
763
851
|
>;
|
|
764
852
|
|
|
765
|
-
export type
|
|
853
|
+
export type CreateToolHeadersTools2 = {
|
|
766
854
|
value: string;
|
|
767
855
|
encrypted?: boolean | undefined;
|
|
768
856
|
};
|
|
769
857
|
|
|
858
|
+
export type CreateToolResponseBodyHeaders = CreateToolHeadersTools2 | string;
|
|
859
|
+
|
|
770
860
|
/**
|
|
771
861
|
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
772
862
|
*/
|
|
@@ -780,9 +870,9 @@ export type ResponseBodyBlueprint = {
|
|
|
780
870
|
*/
|
|
781
871
|
method: CreateToolResponseBodyMethod;
|
|
782
872
|
/**
|
|
783
|
-
* The headers to send with the request.
|
|
873
|
+
* The headers to send with the request. Can be a string value or an object with value and encrypted properties.
|
|
784
874
|
*/
|
|
785
|
-
headers?: { [k: string]:
|
|
875
|
+
headers?: { [k: string]: CreateToolHeadersTools2 | string } | undefined;
|
|
786
876
|
/**
|
|
787
877
|
* The body to send with the request.
|
|
788
878
|
*/
|
|
@@ -906,6 +996,25 @@ export type CreateToolResponseBodyToolsType = ClosedEnum<
|
|
|
906
996
|
typeof CreateToolResponseBodyToolsType
|
|
907
997
|
>;
|
|
908
998
|
|
|
999
|
+
/**
|
|
1000
|
+
* 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.
|
|
1001
|
+
*/
|
|
1002
|
+
export type ResponseBodySchema = {
|
|
1003
|
+
/**
|
|
1004
|
+
* The JSON Schema type
|
|
1005
|
+
*/
|
|
1006
|
+
type: string;
|
|
1007
|
+
/**
|
|
1008
|
+
* The properties of the JSON Schema object
|
|
1009
|
+
*/
|
|
1010
|
+
properties: { [k: string]: any };
|
|
1011
|
+
/**
|
|
1012
|
+
* Array of required property names
|
|
1013
|
+
*/
|
|
1014
|
+
required: Array<string>;
|
|
1015
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
1016
|
+
};
|
|
1017
|
+
|
|
909
1018
|
export type ResponseBodyJsonSchema = {
|
|
910
1019
|
/**
|
|
911
1020
|
* 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.
|
|
@@ -914,11 +1023,11 @@ export type ResponseBodyJsonSchema = {
|
|
|
914
1023
|
/**
|
|
915
1024
|
* A description of what the response format is for. This will be shown to the user.
|
|
916
1025
|
*/
|
|
917
|
-
description
|
|
1026
|
+
description: string;
|
|
918
1027
|
/**
|
|
919
1028
|
* 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.
|
|
920
1029
|
*/
|
|
921
|
-
schema:
|
|
1030
|
+
schema: ResponseBodySchema;
|
|
922
1031
|
/**
|
|
923
1032
|
* 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.
|
|
924
1033
|
*/
|
|
@@ -991,6 +1100,37 @@ export type CreateToolResponseBodyType = ClosedEnum<
|
|
|
991
1100
|
typeof CreateToolResponseBodyType
|
|
992
1101
|
>;
|
|
993
1102
|
|
|
1103
|
+
/**
|
|
1104
|
+
* The type must be "object"
|
|
1105
|
+
*/
|
|
1106
|
+
export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type = {
|
|
1107
|
+
Object: "object",
|
|
1108
|
+
} as const;
|
|
1109
|
+
/**
|
|
1110
|
+
* The type must be "object"
|
|
1111
|
+
*/
|
|
1112
|
+
export type CreateToolResponseBodyToolsResponse200ApplicationJson1Type =
|
|
1113
|
+
ClosedEnum<typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type>;
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* 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.
|
|
1117
|
+
*/
|
|
1118
|
+
export type ResponseBodyParameters = {
|
|
1119
|
+
/**
|
|
1120
|
+
* The type must be "object"
|
|
1121
|
+
*/
|
|
1122
|
+
type: CreateToolResponseBodyToolsResponse200ApplicationJson1Type;
|
|
1123
|
+
/**
|
|
1124
|
+
* The properties of the function parameters
|
|
1125
|
+
*/
|
|
1126
|
+
properties: { [k: string]: any };
|
|
1127
|
+
/**
|
|
1128
|
+
* Array of required parameter names
|
|
1129
|
+
*/
|
|
1130
|
+
required: Array<string>;
|
|
1131
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
1132
|
+
};
|
|
1133
|
+
|
|
994
1134
|
export type CreateToolResponseBodyFunction = {
|
|
995
1135
|
/**
|
|
996
1136
|
* 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.
|
|
@@ -1007,7 +1147,7 @@ export type CreateToolResponseBodyFunction = {
|
|
|
1007
1147
|
/**
|
|
1008
1148
|
* 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.
|
|
1009
1149
|
*/
|
|
1010
|
-
parameters?:
|
|
1150
|
+
parameters?: ResponseBodyParameters | undefined;
|
|
1011
1151
|
};
|
|
1012
1152
|
|
|
1013
1153
|
export type ResponseBody1 = {
|
|
@@ -1084,6 +1224,75 @@ export const CreateToolRequestBodyToolsRequest5Type$outboundSchema:
|
|
|
1084
1224
|
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest5Type> =
|
|
1085
1225
|
CreateToolRequestBodyToolsRequest5Type$inboundSchema;
|
|
1086
1226
|
|
|
1227
|
+
/** @internal */
|
|
1228
|
+
export const CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema:
|
|
1229
|
+
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest5CodeToolType> = z
|
|
1230
|
+
.nativeEnum(CreateToolRequestBodyToolsRequest5CodeToolType);
|
|
1231
|
+
/** @internal */
|
|
1232
|
+
export const CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema:
|
|
1233
|
+
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest5CodeToolType> =
|
|
1234
|
+
CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema;
|
|
1235
|
+
|
|
1236
|
+
/** @internal */
|
|
1237
|
+
export const CreateToolRequestBodyParameters$inboundSchema: z.ZodType<
|
|
1238
|
+
CreateToolRequestBodyParameters,
|
|
1239
|
+
z.ZodTypeDef,
|
|
1240
|
+
unknown
|
|
1241
|
+
> = collectExtraKeys$(
|
|
1242
|
+
z.object({
|
|
1243
|
+
type: CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema,
|
|
1244
|
+
properties: z.record(z.any()),
|
|
1245
|
+
required: z.array(z.string()),
|
|
1246
|
+
}).catchall(z.any()),
|
|
1247
|
+
"additionalProperties",
|
|
1248
|
+
true,
|
|
1249
|
+
);
|
|
1250
|
+
/** @internal */
|
|
1251
|
+
export type CreateToolRequestBodyParameters$Outbound = {
|
|
1252
|
+
type: string;
|
|
1253
|
+
properties: { [k: string]: any };
|
|
1254
|
+
required: Array<string>;
|
|
1255
|
+
[additionalProperties: string]: unknown;
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
/** @internal */
|
|
1259
|
+
export const CreateToolRequestBodyParameters$outboundSchema: z.ZodType<
|
|
1260
|
+
CreateToolRequestBodyParameters$Outbound,
|
|
1261
|
+
z.ZodTypeDef,
|
|
1262
|
+
CreateToolRequestBodyParameters
|
|
1263
|
+
> = z.object({
|
|
1264
|
+
type: CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema,
|
|
1265
|
+
properties: z.record(z.any()),
|
|
1266
|
+
required: z.array(z.string()),
|
|
1267
|
+
additionalProperties: z.record(z.any()).optional(),
|
|
1268
|
+
}).transform((v) => {
|
|
1269
|
+
return {
|
|
1270
|
+
...v.additionalProperties,
|
|
1271
|
+
...remap$(v, {
|
|
1272
|
+
additionalProperties: null,
|
|
1273
|
+
}),
|
|
1274
|
+
};
|
|
1275
|
+
});
|
|
1276
|
+
|
|
1277
|
+
export function createToolRequestBodyParametersToJSON(
|
|
1278
|
+
createToolRequestBodyParameters: CreateToolRequestBodyParameters,
|
|
1279
|
+
): string {
|
|
1280
|
+
return JSON.stringify(
|
|
1281
|
+
CreateToolRequestBodyParameters$outboundSchema.parse(
|
|
1282
|
+
createToolRequestBodyParameters,
|
|
1283
|
+
),
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
export function createToolRequestBodyParametersFromJSON(
|
|
1287
|
+
jsonString: string,
|
|
1288
|
+
): SafeParseResult<CreateToolRequestBodyParameters, SDKValidationError> {
|
|
1289
|
+
return safeParse(
|
|
1290
|
+
jsonString,
|
|
1291
|
+
(x) => CreateToolRequestBodyParameters$inboundSchema.parse(JSON.parse(x)),
|
|
1292
|
+
`Failed to parse 'CreateToolRequestBodyParameters' from JSON`,
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1087
1296
|
/** @internal */
|
|
1088
1297
|
export const RequestBodyLanguage$inboundSchema: z.ZodNativeEnum<
|
|
1089
1298
|
typeof RequestBodyLanguage
|
|
@@ -1099,13 +1308,14 @@ export const RequestBodyCodeTool$inboundSchema: z.ZodType<
|
|
|
1099
1308
|
z.ZodTypeDef,
|
|
1100
1309
|
unknown
|
|
1101
1310
|
> = z.object({
|
|
1102
|
-
parameters: z.
|
|
1311
|
+
parameters: z.lazy(() => CreateToolRequestBodyParameters$inboundSchema)
|
|
1312
|
+
.optional(),
|
|
1103
1313
|
language: RequestBodyLanguage$inboundSchema,
|
|
1104
1314
|
code: z.string(),
|
|
1105
1315
|
});
|
|
1106
1316
|
/** @internal */
|
|
1107
1317
|
export type RequestBodyCodeTool$Outbound = {
|
|
1108
|
-
parameters?:
|
|
1318
|
+
parameters?: CreateToolRequestBodyParameters$Outbound | undefined;
|
|
1109
1319
|
language: string;
|
|
1110
1320
|
code: string;
|
|
1111
1321
|
};
|
|
@@ -1116,7 +1326,8 @@ export const RequestBodyCodeTool$outboundSchema: z.ZodType<
|
|
|
1116
1326
|
z.ZodTypeDef,
|
|
1117
1327
|
RequestBodyCodeTool
|
|
1118
1328
|
> = z.object({
|
|
1119
|
-
parameters: z.
|
|
1329
|
+
parameters: z.lazy(() => CreateToolRequestBodyParameters$outboundSchema)
|
|
1330
|
+
.optional(),
|
|
1120
1331
|
language: RequestBodyLanguage$outboundSchema,
|
|
1121
1332
|
code: z.string(),
|
|
1122
1333
|
});
|
|
@@ -1273,159 +1484,99 @@ export function requestBodyHeadersFromJSON(
|
|
|
1273
1484
|
}
|
|
1274
1485
|
|
|
1275
1486
|
/** @internal */
|
|
1276
|
-
export const
|
|
1277
|
-
|
|
1278
|
-
|
|
1487
|
+
export const RequestBodyConnectionType$inboundSchema: z.ZodNativeEnum<
|
|
1488
|
+
typeof RequestBodyConnectionType
|
|
1489
|
+
> = z.nativeEnum(RequestBodyConnectionType);
|
|
1279
1490
|
/** @internal */
|
|
1280
|
-
export const
|
|
1281
|
-
|
|
1282
|
-
|
|
1491
|
+
export const RequestBodyConnectionType$outboundSchema: z.ZodNativeEnum<
|
|
1492
|
+
typeof RequestBodyConnectionType
|
|
1493
|
+
> = RequestBodyConnectionType$inboundSchema;
|
|
1283
1494
|
|
|
1284
1495
|
/** @internal */
|
|
1285
|
-
export const
|
|
1286
|
-
|
|
1496
|
+
export const RequestBodyMcp$inboundSchema: z.ZodType<
|
|
1497
|
+
RequestBodyMcp,
|
|
1287
1498
|
z.ZodTypeDef,
|
|
1288
1499
|
unknown
|
|
1289
1500
|
> = z.object({
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
})
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
properties?: { [k: string]: any } | undefined;
|
|
1298
|
-
required?: Array<string> | undefined;
|
|
1299
|
-
};
|
|
1300
|
-
|
|
1301
|
-
/** @internal */
|
|
1302
|
-
export const InputSchema$outboundSchema: z.ZodType<
|
|
1303
|
-
InputSchema$Outbound,
|
|
1304
|
-
z.ZodTypeDef,
|
|
1305
|
-
InputSchema
|
|
1306
|
-
> = z.object({
|
|
1307
|
-
type: CreateToolRequestBodyToolsRequest4McpType$outboundSchema,
|
|
1308
|
-
properties: z.record(z.any()).optional(),
|
|
1309
|
-
required: z.array(z.string()).optional(),
|
|
1310
|
-
});
|
|
1311
|
-
|
|
1312
|
-
export function inputSchemaToJSON(inputSchema: InputSchema): string {
|
|
1313
|
-
return JSON.stringify(InputSchema$outboundSchema.parse(inputSchema));
|
|
1314
|
-
}
|
|
1315
|
-
export function inputSchemaFromJSON(
|
|
1316
|
-
jsonString: string,
|
|
1317
|
-
): SafeParseResult<InputSchema, SDKValidationError> {
|
|
1318
|
-
return safeParse(
|
|
1319
|
-
jsonString,
|
|
1320
|
-
(x) => InputSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1321
|
-
`Failed to parse 'InputSchema' from JSON`,
|
|
1322
|
-
);
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
/** @internal */
|
|
1326
|
-
export const ConnectionType$inboundSchema: z.ZodNativeEnum<
|
|
1327
|
-
typeof ConnectionType
|
|
1328
|
-
> = z.nativeEnum(ConnectionType);
|
|
1329
|
-
/** @internal */
|
|
1330
|
-
export const ConnectionType$outboundSchema: z.ZodNativeEnum<
|
|
1331
|
-
typeof ConnectionType
|
|
1332
|
-
> = ConnectionType$inboundSchema;
|
|
1333
|
-
|
|
1334
|
-
/** @internal */
|
|
1335
|
-
export const Mcp$inboundSchema: z.ZodType<Mcp, z.ZodTypeDef, unknown> = z
|
|
1336
|
-
.object({
|
|
1337
|
-
server_id: z.string(),
|
|
1338
|
-
tool_name: z.string(),
|
|
1339
|
-
server_url: z.string(),
|
|
1340
|
-
headers: z.record(z.lazy(() => RequestBodyHeaders$inboundSchema))
|
|
1341
|
-
.optional(),
|
|
1342
|
-
input_schema: z.lazy(() => InputSchema$inboundSchema),
|
|
1343
|
-
connection_type: ConnectionType$inboundSchema,
|
|
1344
|
-
}).transform((v) => {
|
|
1345
|
-
return remap$(v, {
|
|
1346
|
-
"server_id": "serverId",
|
|
1347
|
-
"tool_name": "toolName",
|
|
1348
|
-
"server_url": "serverUrl",
|
|
1349
|
-
"input_schema": "inputSchema",
|
|
1350
|
-
"connection_type": "connectionType",
|
|
1351
|
-
});
|
|
1501
|
+
server_url: z.string(),
|
|
1502
|
+
headers: z.record(z.lazy(() => RequestBodyHeaders$inboundSchema)).optional(),
|
|
1503
|
+
connection_type: RequestBodyConnectionType$inboundSchema,
|
|
1504
|
+
}).transform((v) => {
|
|
1505
|
+
return remap$(v, {
|
|
1506
|
+
"server_url": "serverUrl",
|
|
1507
|
+
"connection_type": "connectionType",
|
|
1352
1508
|
});
|
|
1509
|
+
});
|
|
1353
1510
|
/** @internal */
|
|
1354
|
-
export type
|
|
1355
|
-
server_id: string;
|
|
1356
|
-
tool_name: string;
|
|
1511
|
+
export type RequestBodyMcp$Outbound = {
|
|
1357
1512
|
server_url: string;
|
|
1358
1513
|
headers?: { [k: string]: RequestBodyHeaders$Outbound } | undefined;
|
|
1359
|
-
input_schema: InputSchema$Outbound;
|
|
1360
1514
|
connection_type: string;
|
|
1361
1515
|
};
|
|
1362
1516
|
|
|
1363
1517
|
/** @internal */
|
|
1364
|
-
export const
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
toolName: "tool_name",
|
|
1377
|
-
serverUrl: "server_url",
|
|
1378
|
-
inputSchema: "input_schema",
|
|
1379
|
-
connectionType: "connection_type",
|
|
1380
|
-
});
|
|
1518
|
+
export const RequestBodyMcp$outboundSchema: z.ZodType<
|
|
1519
|
+
RequestBodyMcp$Outbound,
|
|
1520
|
+
z.ZodTypeDef,
|
|
1521
|
+
RequestBodyMcp
|
|
1522
|
+
> = z.object({
|
|
1523
|
+
serverUrl: z.string(),
|
|
1524
|
+
headers: z.record(z.lazy(() => RequestBodyHeaders$outboundSchema)).optional(),
|
|
1525
|
+
connectionType: RequestBodyConnectionType$outboundSchema,
|
|
1526
|
+
}).transform((v) => {
|
|
1527
|
+
return remap$(v, {
|
|
1528
|
+
serverUrl: "server_url",
|
|
1529
|
+
connectionType: "connection_type",
|
|
1381
1530
|
});
|
|
1531
|
+
});
|
|
1382
1532
|
|
|
1383
|
-
export function
|
|
1384
|
-
return JSON.stringify(
|
|
1533
|
+
export function requestBodyMcpToJSON(requestBodyMcp: RequestBodyMcp): string {
|
|
1534
|
+
return JSON.stringify(RequestBodyMcp$outboundSchema.parse(requestBodyMcp));
|
|
1385
1535
|
}
|
|
1386
|
-
export function
|
|
1536
|
+
export function requestBodyMcpFromJSON(
|
|
1387
1537
|
jsonString: string,
|
|
1388
|
-
): SafeParseResult<
|
|
1538
|
+
): SafeParseResult<RequestBodyMcp, SDKValidationError> {
|
|
1389
1539
|
return safeParse(
|
|
1390
1540
|
jsonString,
|
|
1391
|
-
(x) =>
|
|
1392
|
-
`Failed to parse '
|
|
1541
|
+
(x) => RequestBodyMcp$inboundSchema.parse(JSON.parse(x)),
|
|
1542
|
+
`Failed to parse 'RequestBodyMcp' from JSON`,
|
|
1393
1543
|
);
|
|
1394
1544
|
}
|
|
1395
1545
|
|
|
1396
1546
|
/** @internal */
|
|
1397
|
-
export const
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1547
|
+
export const RequestBodyMCPTool$inboundSchema: z.ZodType<
|
|
1548
|
+
RequestBodyMCPTool,
|
|
1549
|
+
z.ZodTypeDef,
|
|
1550
|
+
unknown
|
|
1551
|
+
> = z.object({
|
|
1552
|
+
path: z.string(),
|
|
1553
|
+
key: z.string(),
|
|
1554
|
+
display_name: z.string().optional(),
|
|
1555
|
+
description: z.string(),
|
|
1556
|
+
status: CreateToolRequestBodyToolsRequestStatus$inboundSchema.default("live"),
|
|
1557
|
+
type: CreateToolRequestBodyToolsRequest4Type$inboundSchema,
|
|
1558
|
+
mcp: z.lazy(() => RequestBodyMcp$inboundSchema),
|
|
1559
|
+
}).transform((v) => {
|
|
1560
|
+
return remap$(v, {
|
|
1561
|
+
"display_name": "displayName",
|
|
1412
1562
|
});
|
|
1563
|
+
});
|
|
1413
1564
|
/** @internal */
|
|
1414
|
-
export type
|
|
1565
|
+
export type RequestBodyMCPTool$Outbound = {
|
|
1415
1566
|
path: string;
|
|
1416
1567
|
key: string;
|
|
1417
1568
|
display_name?: string | undefined;
|
|
1418
1569
|
description: string;
|
|
1419
1570
|
status: string;
|
|
1420
1571
|
type: string;
|
|
1421
|
-
mcp:
|
|
1572
|
+
mcp: RequestBodyMcp$Outbound;
|
|
1422
1573
|
};
|
|
1423
1574
|
|
|
1424
1575
|
/** @internal */
|
|
1425
|
-
export const
|
|
1426
|
-
|
|
1576
|
+
export const RequestBodyMCPTool$outboundSchema: z.ZodType<
|
|
1577
|
+
RequestBodyMCPTool$Outbound,
|
|
1427
1578
|
z.ZodTypeDef,
|
|
1428
|
-
|
|
1579
|
+
RequestBodyMCPTool
|
|
1429
1580
|
> = z.object({
|
|
1430
1581
|
path: z.string(),
|
|
1431
1582
|
key: z.string(),
|
|
@@ -1435,23 +1586,27 @@ export const MCPTool$outboundSchema: z.ZodType<
|
|
|
1435
1586
|
"live",
|
|
1436
1587
|
),
|
|
1437
1588
|
type: CreateToolRequestBodyToolsRequest4Type$outboundSchema,
|
|
1438
|
-
mcp: z.lazy(() =>
|
|
1589
|
+
mcp: z.lazy(() => RequestBodyMcp$outboundSchema),
|
|
1439
1590
|
}).transform((v) => {
|
|
1440
1591
|
return remap$(v, {
|
|
1441
1592
|
displayName: "display_name",
|
|
1442
1593
|
});
|
|
1443
1594
|
});
|
|
1444
1595
|
|
|
1445
|
-
export function
|
|
1446
|
-
|
|
1596
|
+
export function requestBodyMCPToolToJSON(
|
|
1597
|
+
requestBodyMCPTool: RequestBodyMCPTool,
|
|
1598
|
+
): string {
|
|
1599
|
+
return JSON.stringify(
|
|
1600
|
+
RequestBodyMCPTool$outboundSchema.parse(requestBodyMCPTool),
|
|
1601
|
+
);
|
|
1447
1602
|
}
|
|
1448
|
-
export function
|
|
1603
|
+
export function requestBodyMCPToolFromJSON(
|
|
1449
1604
|
jsonString: string,
|
|
1450
|
-
): SafeParseResult<
|
|
1605
|
+
): SafeParseResult<RequestBodyMCPTool, SDKValidationError> {
|
|
1451
1606
|
return safeParse(
|
|
1452
1607
|
jsonString,
|
|
1453
|
-
(x) =>
|
|
1454
|
-
`Failed to parse '
|
|
1608
|
+
(x) => RequestBodyMCPTool$inboundSchema.parse(JSON.parse(x)),
|
|
1609
|
+
`Failed to parse 'RequestBodyMCPTool' from JSON`,
|
|
1455
1610
|
);
|
|
1456
1611
|
}
|
|
1457
1612
|
|
|
@@ -1484,8 +1639,8 @@ export const CreateToolRequestBodyMethod$outboundSchema: z.ZodNativeEnum<
|
|
|
1484
1639
|
> = CreateToolRequestBodyMethod$inboundSchema;
|
|
1485
1640
|
|
|
1486
1641
|
/** @internal */
|
|
1487
|
-
export const
|
|
1488
|
-
|
|
1642
|
+
export const CreateToolHeaders2$inboundSchema: z.ZodType<
|
|
1643
|
+
CreateToolHeaders2,
|
|
1489
1644
|
z.ZodTypeDef,
|
|
1490
1645
|
unknown
|
|
1491
1646
|
> = z.object({
|
|
@@ -1493,21 +1648,56 @@ export const CreateToolRequestBodyHeaders$inboundSchema: z.ZodType<
|
|
|
1493
1648
|
encrypted: z.boolean().default(false),
|
|
1494
1649
|
});
|
|
1495
1650
|
/** @internal */
|
|
1496
|
-
export type
|
|
1651
|
+
export type CreateToolHeaders2$Outbound = {
|
|
1497
1652
|
value: string;
|
|
1498
1653
|
encrypted: boolean;
|
|
1499
1654
|
};
|
|
1500
1655
|
|
|
1501
1656
|
/** @internal */
|
|
1502
|
-
export const
|
|
1503
|
-
|
|
1657
|
+
export const CreateToolHeaders2$outboundSchema: z.ZodType<
|
|
1658
|
+
CreateToolHeaders2$Outbound,
|
|
1504
1659
|
z.ZodTypeDef,
|
|
1505
|
-
|
|
1660
|
+
CreateToolHeaders2
|
|
1506
1661
|
> = z.object({
|
|
1507
1662
|
value: z.string(),
|
|
1508
1663
|
encrypted: z.boolean().default(false),
|
|
1509
1664
|
});
|
|
1510
1665
|
|
|
1666
|
+
export function createToolHeaders2ToJSON(
|
|
1667
|
+
createToolHeaders2: CreateToolHeaders2,
|
|
1668
|
+
): string {
|
|
1669
|
+
return JSON.stringify(
|
|
1670
|
+
CreateToolHeaders2$outboundSchema.parse(createToolHeaders2),
|
|
1671
|
+
);
|
|
1672
|
+
}
|
|
1673
|
+
export function createToolHeaders2FromJSON(
|
|
1674
|
+
jsonString: string,
|
|
1675
|
+
): SafeParseResult<CreateToolHeaders2, SDKValidationError> {
|
|
1676
|
+
return safeParse(
|
|
1677
|
+
jsonString,
|
|
1678
|
+
(x) => CreateToolHeaders2$inboundSchema.parse(JSON.parse(x)),
|
|
1679
|
+
`Failed to parse 'CreateToolHeaders2' from JSON`,
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
/** @internal */
|
|
1684
|
+
export const CreateToolRequestBodyHeaders$inboundSchema: z.ZodType<
|
|
1685
|
+
CreateToolRequestBodyHeaders,
|
|
1686
|
+
z.ZodTypeDef,
|
|
1687
|
+
unknown
|
|
1688
|
+
> = z.union([z.lazy(() => CreateToolHeaders2$inboundSchema), z.string()]);
|
|
1689
|
+
/** @internal */
|
|
1690
|
+
export type CreateToolRequestBodyHeaders$Outbound =
|
|
1691
|
+
| CreateToolHeaders2$Outbound
|
|
1692
|
+
| string;
|
|
1693
|
+
|
|
1694
|
+
/** @internal */
|
|
1695
|
+
export const CreateToolRequestBodyHeaders$outboundSchema: z.ZodType<
|
|
1696
|
+
CreateToolRequestBodyHeaders$Outbound,
|
|
1697
|
+
z.ZodTypeDef,
|
|
1698
|
+
CreateToolRequestBodyHeaders
|
|
1699
|
+
> = z.union([z.lazy(() => CreateToolHeaders2$outboundSchema), z.string()]);
|
|
1700
|
+
|
|
1511
1701
|
export function createToolRequestBodyHeadersToJSON(
|
|
1512
1702
|
createToolRequestBodyHeaders: CreateToolRequestBodyHeaders,
|
|
1513
1703
|
): string {
|
|
@@ -1535,15 +1725,16 @@ export const RequestBodyBlueprint$inboundSchema: z.ZodType<
|
|
|
1535
1725
|
> = z.object({
|
|
1536
1726
|
url: z.string(),
|
|
1537
1727
|
method: CreateToolRequestBodyMethod$inboundSchema,
|
|
1538
|
-
headers: z.record(
|
|
1539
|
-
.
|
|
1728
|
+
headers: z.record(
|
|
1729
|
+
z.union([z.lazy(() => CreateToolHeaders2$inboundSchema), z.string()]),
|
|
1730
|
+
).optional(),
|
|
1540
1731
|
body: z.record(z.any()).optional(),
|
|
1541
1732
|
});
|
|
1542
1733
|
/** @internal */
|
|
1543
1734
|
export type RequestBodyBlueprint$Outbound = {
|
|
1544
1735
|
url: string;
|
|
1545
1736
|
method: string;
|
|
1546
|
-
headers?: { [k: string]:
|
|
1737
|
+
headers?: { [k: string]: CreateToolHeaders2$Outbound | string } | undefined;
|
|
1547
1738
|
body?: { [k: string]: any } | undefined;
|
|
1548
1739
|
};
|
|
1549
1740
|
|
|
@@ -1555,8 +1746,9 @@ export const RequestBodyBlueprint$outboundSchema: z.ZodType<
|
|
|
1555
1746
|
> = z.object({
|
|
1556
1747
|
url: z.string(),
|
|
1557
1748
|
method: CreateToolRequestBodyMethod$outboundSchema,
|
|
1558
|
-
headers: z.record(
|
|
1559
|
-
.
|
|
1749
|
+
headers: z.record(
|
|
1750
|
+
z.union([z.lazy(() => CreateToolHeaders2$outboundSchema), z.string()]),
|
|
1751
|
+
).optional(),
|
|
1560
1752
|
body: z.record(z.any()).optional(),
|
|
1561
1753
|
});
|
|
1562
1754
|
|
|
@@ -1805,6 +1997,64 @@ export const CreateToolRequestBodyToolsType$outboundSchema: z.ZodNativeEnum<
|
|
|
1805
1997
|
typeof CreateToolRequestBodyToolsType
|
|
1806
1998
|
> = CreateToolRequestBodyToolsType$inboundSchema;
|
|
1807
1999
|
|
|
2000
|
+
/** @internal */
|
|
2001
|
+
export const RequestBodySchema$inboundSchema: z.ZodType<
|
|
2002
|
+
RequestBodySchema,
|
|
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 RequestBodySchema$Outbound = {
|
|
2016
|
+
type: string;
|
|
2017
|
+
properties: { [k: string]: any };
|
|
2018
|
+
required: Array<string>;
|
|
2019
|
+
[additionalProperties: string]: unknown;
|
|
2020
|
+
};
|
|
2021
|
+
|
|
2022
|
+
/** @internal */
|
|
2023
|
+
export const RequestBodySchema$outboundSchema: z.ZodType<
|
|
2024
|
+
RequestBodySchema$Outbound,
|
|
2025
|
+
z.ZodTypeDef,
|
|
2026
|
+
RequestBodySchema
|
|
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 requestBodySchemaToJSON(
|
|
2042
|
+
requestBodySchema: RequestBodySchema,
|
|
2043
|
+
): string {
|
|
2044
|
+
return JSON.stringify(
|
|
2045
|
+
RequestBodySchema$outboundSchema.parse(requestBodySchema),
|
|
2046
|
+
);
|
|
2047
|
+
}
|
|
2048
|
+
export function requestBodySchemaFromJSON(
|
|
2049
|
+
jsonString: string,
|
|
2050
|
+
): SafeParseResult<RequestBodySchema, SDKValidationError> {
|
|
2051
|
+
return safeParse(
|
|
2052
|
+
jsonString,
|
|
2053
|
+
(x) => RequestBodySchema$inboundSchema.parse(JSON.parse(x)),
|
|
2054
|
+
`Failed to parse 'RequestBodySchema' from JSON`,
|
|
2055
|
+
);
|
|
2056
|
+
}
|
|
2057
|
+
|
|
1808
2058
|
/** @internal */
|
|
1809
2059
|
export const RequestBodyJsonSchema$inboundSchema: z.ZodType<
|
|
1810
2060
|
RequestBodyJsonSchema,
|
|
@@ -1812,15 +2062,15 @@ export const RequestBodyJsonSchema$inboundSchema: z.ZodType<
|
|
|
1812
2062
|
unknown
|
|
1813
2063
|
> = z.object({
|
|
1814
2064
|
name: z.string(),
|
|
1815
|
-
description: z.string()
|
|
1816
|
-
schema: z.
|
|
2065
|
+
description: z.string(),
|
|
2066
|
+
schema: z.lazy(() => RequestBodySchema$inboundSchema),
|
|
1817
2067
|
strict: z.boolean().optional(),
|
|
1818
2068
|
});
|
|
1819
2069
|
/** @internal */
|
|
1820
2070
|
export type RequestBodyJsonSchema$Outbound = {
|
|
1821
2071
|
name: string;
|
|
1822
|
-
description
|
|
1823
|
-
schema:
|
|
2072
|
+
description: string;
|
|
2073
|
+
schema: RequestBodySchema$Outbound;
|
|
1824
2074
|
strict?: boolean | undefined;
|
|
1825
2075
|
};
|
|
1826
2076
|
|
|
@@ -1831,8 +2081,8 @@ export const RequestBodyJsonSchema$outboundSchema: z.ZodType<
|
|
|
1831
2081
|
RequestBodyJsonSchema
|
|
1832
2082
|
> = z.object({
|
|
1833
2083
|
name: z.string(),
|
|
1834
|
-
description: z.string()
|
|
1835
|
-
schema: z.
|
|
2084
|
+
description: z.string(),
|
|
2085
|
+
schema: z.lazy(() => RequestBodySchema$outboundSchema),
|
|
1836
2086
|
strict: z.boolean().optional(),
|
|
1837
2087
|
});
|
|
1838
2088
|
|
|
@@ -1934,6 +2184,74 @@ export const CreateToolRequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
|
1934
2184
|
typeof CreateToolRequestBodyType
|
|
1935
2185
|
> = CreateToolRequestBodyType$inboundSchema;
|
|
1936
2186
|
|
|
2187
|
+
/** @internal */
|
|
2188
|
+
export const CreateToolRequestBodyToolsRequest1Type$inboundSchema:
|
|
2189
|
+
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Type> = z.nativeEnum(
|
|
2190
|
+
CreateToolRequestBodyToolsRequest1Type,
|
|
2191
|
+
);
|
|
2192
|
+
/** @internal */
|
|
2193
|
+
export const CreateToolRequestBodyToolsRequest1Type$outboundSchema:
|
|
2194
|
+
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequest1Type> =
|
|
2195
|
+
CreateToolRequestBodyToolsRequest1Type$inboundSchema;
|
|
2196
|
+
|
|
2197
|
+
/** @internal */
|
|
2198
|
+
export const RequestBodyParameters$inboundSchema: z.ZodType<
|
|
2199
|
+
RequestBodyParameters,
|
|
2200
|
+
z.ZodTypeDef,
|
|
2201
|
+
unknown
|
|
2202
|
+
> = collectExtraKeys$(
|
|
2203
|
+
z.object({
|
|
2204
|
+
type: CreateToolRequestBodyToolsRequest1Type$inboundSchema,
|
|
2205
|
+
properties: z.record(z.any()),
|
|
2206
|
+
required: z.array(z.string()),
|
|
2207
|
+
}).catchall(z.any()),
|
|
2208
|
+
"additionalProperties",
|
|
2209
|
+
true,
|
|
2210
|
+
);
|
|
2211
|
+
/** @internal */
|
|
2212
|
+
export type RequestBodyParameters$Outbound = {
|
|
2213
|
+
type: string;
|
|
2214
|
+
properties: { [k: string]: any };
|
|
2215
|
+
required: Array<string>;
|
|
2216
|
+
[additionalProperties: string]: unknown;
|
|
2217
|
+
};
|
|
2218
|
+
|
|
2219
|
+
/** @internal */
|
|
2220
|
+
export const RequestBodyParameters$outboundSchema: z.ZodType<
|
|
2221
|
+
RequestBodyParameters$Outbound,
|
|
2222
|
+
z.ZodTypeDef,
|
|
2223
|
+
RequestBodyParameters
|
|
2224
|
+
> = z.object({
|
|
2225
|
+
type: CreateToolRequestBodyToolsRequest1Type$outboundSchema,
|
|
2226
|
+
properties: z.record(z.any()),
|
|
2227
|
+
required: z.array(z.string()),
|
|
2228
|
+
additionalProperties: z.record(z.any()).optional(),
|
|
2229
|
+
}).transform((v) => {
|
|
2230
|
+
return {
|
|
2231
|
+
...v.additionalProperties,
|
|
2232
|
+
...remap$(v, {
|
|
2233
|
+
additionalProperties: null,
|
|
2234
|
+
}),
|
|
2235
|
+
};
|
|
2236
|
+
});
|
|
2237
|
+
|
|
2238
|
+
export function requestBodyParametersToJSON(
|
|
2239
|
+
requestBodyParameters: RequestBodyParameters,
|
|
2240
|
+
): string {
|
|
2241
|
+
return JSON.stringify(
|
|
2242
|
+
RequestBodyParameters$outboundSchema.parse(requestBodyParameters),
|
|
2243
|
+
);
|
|
2244
|
+
}
|
|
2245
|
+
export function requestBodyParametersFromJSON(
|
|
2246
|
+
jsonString: string,
|
|
2247
|
+
): SafeParseResult<RequestBodyParameters, SDKValidationError> {
|
|
2248
|
+
return safeParse(
|
|
2249
|
+
jsonString,
|
|
2250
|
+
(x) => RequestBodyParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2251
|
+
`Failed to parse 'RequestBodyParameters' from JSON`,
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
|
|
1937
2255
|
/** @internal */
|
|
1938
2256
|
export const RequestBodyFunction$inboundSchema: z.ZodType<
|
|
1939
2257
|
RequestBodyFunction,
|
|
@@ -1943,14 +2261,14 @@ export const RequestBodyFunction$inboundSchema: z.ZodType<
|
|
|
1943
2261
|
name: z.string(),
|
|
1944
2262
|
description: z.string().optional(),
|
|
1945
2263
|
strict: z.boolean().optional(),
|
|
1946
|
-
parameters: z.
|
|
2264
|
+
parameters: z.lazy(() => RequestBodyParameters$inboundSchema).optional(),
|
|
1947
2265
|
});
|
|
1948
2266
|
/** @internal */
|
|
1949
2267
|
export type RequestBodyFunction$Outbound = {
|
|
1950
2268
|
name: string;
|
|
1951
2269
|
description?: string | undefined;
|
|
1952
2270
|
strict?: boolean | undefined;
|
|
1953
|
-
parameters?:
|
|
2271
|
+
parameters?: RequestBodyParameters$Outbound | undefined;
|
|
1954
2272
|
};
|
|
1955
2273
|
|
|
1956
2274
|
/** @internal */
|
|
@@ -1962,7 +2280,7 @@ export const RequestBodyFunction$outboundSchema: z.ZodType<
|
|
|
1962
2280
|
name: z.string(),
|
|
1963
2281
|
description: z.string().optional(),
|
|
1964
2282
|
strict: z.boolean().optional(),
|
|
1965
|
-
parameters: z.
|
|
2283
|
+
parameters: z.lazy(() => RequestBodyParameters$outboundSchema).optional(),
|
|
1966
2284
|
});
|
|
1967
2285
|
|
|
1968
2286
|
export function requestBodyFunctionToJSON(
|
|
@@ -2056,7 +2374,7 @@ export const CreateToolRequestBody$inboundSchema: z.ZodType<
|
|
|
2056
2374
|
z.lazy(() => RequestBodyFunctionTool$inboundSchema),
|
|
2057
2375
|
z.lazy(() => JSONSchemaTool$inboundSchema),
|
|
2058
2376
|
z.lazy(() => RequestBodyHTTPTool$inboundSchema),
|
|
2059
|
-
z.lazy(() =>
|
|
2377
|
+
z.lazy(() => RequestBodyMCPTool$inboundSchema),
|
|
2060
2378
|
z.lazy(() => RequestBodyCodeExecutionTool$inboundSchema),
|
|
2061
2379
|
]);
|
|
2062
2380
|
/** @internal */
|
|
@@ -2064,7 +2382,7 @@ export type CreateToolRequestBody$Outbound =
|
|
|
2064
2382
|
| RequestBodyFunctionTool$Outbound
|
|
2065
2383
|
| JSONSchemaTool$Outbound
|
|
2066
2384
|
| RequestBodyHTTPTool$Outbound
|
|
2067
|
-
|
|
|
2385
|
+
| RequestBodyMCPTool$Outbound
|
|
2068
2386
|
| RequestBodyCodeExecutionTool$Outbound;
|
|
2069
2387
|
|
|
2070
2388
|
/** @internal */
|
|
@@ -2076,7 +2394,7 @@ export const CreateToolRequestBody$outboundSchema: z.ZodType<
|
|
|
2076
2394
|
z.lazy(() => RequestBodyFunctionTool$outboundSchema),
|
|
2077
2395
|
z.lazy(() => JSONSchemaTool$outboundSchema),
|
|
2078
2396
|
z.lazy(() => RequestBodyHTTPTool$outboundSchema),
|
|
2079
|
-
z.lazy(() =>
|
|
2397
|
+
z.lazy(() => RequestBodyMCPTool$outboundSchema),
|
|
2080
2398
|
z.lazy(() => RequestBodyCodeExecutionTool$outboundSchema),
|
|
2081
2399
|
]);
|
|
2082
2400
|
|
|
@@ -2117,6 +2435,79 @@ export const CreateToolResponseBodyToolsResponse200ApplicationJSONType$outboundS
|
|
|
2117
2435
|
typeof CreateToolResponseBodyToolsResponse200ApplicationJSONType
|
|
2118
2436
|
> = CreateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
|
|
2119
2437
|
|
|
2438
|
+
/** @internal */
|
|
2439
|
+
export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema:
|
|
2440
|
+
z.ZodNativeEnum<
|
|
2441
|
+
typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type
|
|
2442
|
+
> = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson5Type);
|
|
2443
|
+
/** @internal */
|
|
2444
|
+
export const CreateToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema:
|
|
2445
|
+
z.ZodNativeEnum<
|
|
2446
|
+
typeof CreateToolResponseBodyToolsResponse200ApplicationJson5Type
|
|
2447
|
+
> = CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema;
|
|
2448
|
+
|
|
2449
|
+
/** @internal */
|
|
2450
|
+
export const CreateToolResponseBodyParameters$inboundSchema: z.ZodType<
|
|
2451
|
+
CreateToolResponseBodyParameters,
|
|
2452
|
+
z.ZodTypeDef,
|
|
2453
|
+
unknown
|
|
2454
|
+
> = collectExtraKeys$(
|
|
2455
|
+
z.object({
|
|
2456
|
+
type:
|
|
2457
|
+
CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
|
|
2458
|
+
properties: z.record(z.any()),
|
|
2459
|
+
required: z.array(z.string()),
|
|
2460
|
+
}).catchall(z.any()),
|
|
2461
|
+
"additionalProperties",
|
|
2462
|
+
true,
|
|
2463
|
+
);
|
|
2464
|
+
/** @internal */
|
|
2465
|
+
export type CreateToolResponseBodyParameters$Outbound = {
|
|
2466
|
+
type: string;
|
|
2467
|
+
properties: { [k: string]: any };
|
|
2468
|
+
required: Array<string>;
|
|
2469
|
+
[additionalProperties: string]: unknown;
|
|
2470
|
+
};
|
|
2471
|
+
|
|
2472
|
+
/** @internal */
|
|
2473
|
+
export const CreateToolResponseBodyParameters$outboundSchema: z.ZodType<
|
|
2474
|
+
CreateToolResponseBodyParameters$Outbound,
|
|
2475
|
+
z.ZodTypeDef,
|
|
2476
|
+
CreateToolResponseBodyParameters
|
|
2477
|
+
> = z.object({
|
|
2478
|
+
type:
|
|
2479
|
+
CreateToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema,
|
|
2480
|
+
properties: z.record(z.any()),
|
|
2481
|
+
required: z.array(z.string()),
|
|
2482
|
+
additionalProperties: z.record(z.any()).optional(),
|
|
2483
|
+
}).transform((v) => {
|
|
2484
|
+
return {
|
|
2485
|
+
...v.additionalProperties,
|
|
2486
|
+
...remap$(v, {
|
|
2487
|
+
additionalProperties: null,
|
|
2488
|
+
}),
|
|
2489
|
+
};
|
|
2490
|
+
});
|
|
2491
|
+
|
|
2492
|
+
export function createToolResponseBodyParametersToJSON(
|
|
2493
|
+
createToolResponseBodyParameters: CreateToolResponseBodyParameters,
|
|
2494
|
+
): string {
|
|
2495
|
+
return JSON.stringify(
|
|
2496
|
+
CreateToolResponseBodyParameters$outboundSchema.parse(
|
|
2497
|
+
createToolResponseBodyParameters,
|
|
2498
|
+
),
|
|
2499
|
+
);
|
|
2500
|
+
}
|
|
2501
|
+
export function createToolResponseBodyParametersFromJSON(
|
|
2502
|
+
jsonString: string,
|
|
2503
|
+
): SafeParseResult<CreateToolResponseBodyParameters, SDKValidationError> {
|
|
2504
|
+
return safeParse(
|
|
2505
|
+
jsonString,
|
|
2506
|
+
(x) => CreateToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
|
|
2507
|
+
`Failed to parse 'CreateToolResponseBodyParameters' from JSON`,
|
|
2508
|
+
);
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2120
2511
|
/** @internal */
|
|
2121
2512
|
export const ResponseBodyLanguage$inboundSchema: z.ZodNativeEnum<
|
|
2122
2513
|
typeof ResponseBodyLanguage
|
|
@@ -2132,13 +2523,14 @@ export const ResponseBodyCodeTool$inboundSchema: z.ZodType<
|
|
|
2132
2523
|
z.ZodTypeDef,
|
|
2133
2524
|
unknown
|
|
2134
2525
|
> = z.object({
|
|
2135
|
-
parameters: z.
|
|
2526
|
+
parameters: z.lazy(() => CreateToolResponseBodyParameters$inboundSchema)
|
|
2527
|
+
.optional(),
|
|
2136
2528
|
language: ResponseBodyLanguage$inboundSchema,
|
|
2137
2529
|
code: z.string(),
|
|
2138
2530
|
});
|
|
2139
2531
|
/** @internal */
|
|
2140
2532
|
export type ResponseBodyCodeTool$Outbound = {
|
|
2141
|
-
parameters?:
|
|
2533
|
+
parameters?: CreateToolResponseBodyParameters$Outbound | undefined;
|
|
2142
2534
|
language: string;
|
|
2143
2535
|
code: string;
|
|
2144
2536
|
};
|
|
@@ -2149,7 +2541,8 @@ export const ResponseBodyCodeTool$outboundSchema: z.ZodType<
|
|
|
2149
2541
|
z.ZodTypeDef,
|
|
2150
2542
|
ResponseBodyCodeTool
|
|
2151
2543
|
> = z.object({
|
|
2152
|
-
parameters: z.
|
|
2544
|
+
parameters: z.lazy(() => CreateToolResponseBodyParameters$outboundSchema)
|
|
2545
|
+
.optional(),
|
|
2153
2546
|
language: ResponseBodyLanguage$outboundSchema,
|
|
2154
2547
|
code: z.string(),
|
|
2155
2548
|
});
|
|
@@ -2177,7 +2570,7 @@ export const ResponseBody5$inboundSchema: z.ZodType<
|
|
|
2177
2570
|
z.ZodTypeDef,
|
|
2178
2571
|
unknown
|
|
2179
2572
|
> = z.object({
|
|
2180
|
-
_id: z.string().default("
|
|
2573
|
+
_id: z.string().default("tool_01KA0EAFP5ZJQ7NKTQF1M3E402"),
|
|
2181
2574
|
path: z.string(),
|
|
2182
2575
|
key: z.string(),
|
|
2183
2576
|
display_name: z.string().optional(),
|
|
@@ -2231,7 +2624,7 @@ export const ResponseBody5$outboundSchema: z.ZodType<
|
|
|
2231
2624
|
z.ZodTypeDef,
|
|
2232
2625
|
ResponseBody5
|
|
2233
2626
|
> = z.object({
|
|
2234
|
-
id: z.string().default("
|
|
2627
|
+
id: z.string().default("tool_01KA0EAFP5ZJQ7NKTQF1M3E402"),
|
|
2235
2628
|
path: z.string(),
|
|
2236
2629
|
key: z.string(),
|
|
2237
2630
|
displayName: z.string().optional(),
|
|
@@ -2347,8 +2740,8 @@ export const CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outbound
|
|
|
2347
2740
|
> = CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
|
|
2348
2741
|
|
|
2349
2742
|
/** @internal */
|
|
2350
|
-
export const
|
|
2351
|
-
|
|
2743
|
+
export const CreateToolResponseBodySchema$inboundSchema: z.ZodType<
|
|
2744
|
+
CreateToolResponseBodySchema,
|
|
2352
2745
|
z.ZodTypeDef,
|
|
2353
2746
|
unknown
|
|
2354
2747
|
> = z.object({
|
|
@@ -2358,17 +2751,17 @@ export const ResponseBodyInputSchema$inboundSchema: z.ZodType<
|
|
|
2358
2751
|
required: z.array(z.string()).optional(),
|
|
2359
2752
|
});
|
|
2360
2753
|
/** @internal */
|
|
2361
|
-
export type
|
|
2754
|
+
export type CreateToolResponseBodySchema$Outbound = {
|
|
2362
2755
|
type: string;
|
|
2363
2756
|
properties?: { [k: string]: any } | undefined;
|
|
2364
2757
|
required?: Array<string> | undefined;
|
|
2365
2758
|
};
|
|
2366
2759
|
|
|
2367
2760
|
/** @internal */
|
|
2368
|
-
export const
|
|
2369
|
-
|
|
2761
|
+
export const CreateToolResponseBodySchema$outboundSchema: z.ZodType<
|
|
2762
|
+
CreateToolResponseBodySchema$Outbound,
|
|
2370
2763
|
z.ZodTypeDef,
|
|
2371
|
-
|
|
2764
|
+
CreateToolResponseBodySchema
|
|
2372
2765
|
> = z.object({
|
|
2373
2766
|
type:
|
|
2374
2767
|
CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
|
|
@@ -2376,20 +2769,67 @@ export const ResponseBodyInputSchema$outboundSchema: z.ZodType<
|
|
|
2376
2769
|
required: z.array(z.string()).optional(),
|
|
2377
2770
|
});
|
|
2378
2771
|
|
|
2379
|
-
export function
|
|
2380
|
-
|
|
2772
|
+
export function createToolResponseBodySchemaToJSON(
|
|
2773
|
+
createToolResponseBodySchema: CreateToolResponseBodySchema,
|
|
2774
|
+
): string {
|
|
2775
|
+
return JSON.stringify(
|
|
2776
|
+
CreateToolResponseBodySchema$outboundSchema.parse(
|
|
2777
|
+
createToolResponseBodySchema,
|
|
2778
|
+
),
|
|
2779
|
+
);
|
|
2780
|
+
}
|
|
2781
|
+
export function createToolResponseBodySchemaFromJSON(
|
|
2782
|
+
jsonString: string,
|
|
2783
|
+
): SafeParseResult<CreateToolResponseBodySchema, SDKValidationError> {
|
|
2784
|
+
return safeParse(
|
|
2785
|
+
jsonString,
|
|
2786
|
+
(x) => CreateToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
|
|
2787
|
+
`Failed to parse 'CreateToolResponseBodySchema' from JSON`,
|
|
2788
|
+
);
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
/** @internal */
|
|
2792
|
+
export const ResponseBodyTools$inboundSchema: z.ZodType<
|
|
2793
|
+
ResponseBodyTools,
|
|
2794
|
+
z.ZodTypeDef,
|
|
2795
|
+
unknown
|
|
2796
|
+
> = z.object({
|
|
2797
|
+
name: z.string(),
|
|
2798
|
+
description: z.string().optional(),
|
|
2799
|
+
schema: z.lazy(() => CreateToolResponseBodySchema$inboundSchema),
|
|
2800
|
+
});
|
|
2801
|
+
/** @internal */
|
|
2802
|
+
export type ResponseBodyTools$Outbound = {
|
|
2803
|
+
name: string;
|
|
2804
|
+
description?: string | undefined;
|
|
2805
|
+
schema: CreateToolResponseBodySchema$Outbound;
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
/** @internal */
|
|
2809
|
+
export const ResponseBodyTools$outboundSchema: z.ZodType<
|
|
2810
|
+
ResponseBodyTools$Outbound,
|
|
2811
|
+
z.ZodTypeDef,
|
|
2812
|
+
ResponseBodyTools
|
|
2813
|
+
> = z.object({
|
|
2814
|
+
name: z.string(),
|
|
2815
|
+
description: z.string().optional(),
|
|
2816
|
+
schema: z.lazy(() => CreateToolResponseBodySchema$outboundSchema),
|
|
2817
|
+
});
|
|
2818
|
+
|
|
2819
|
+
export function responseBodyToolsToJSON(
|
|
2820
|
+
responseBodyTools: ResponseBodyTools,
|
|
2381
2821
|
): string {
|
|
2382
2822
|
return JSON.stringify(
|
|
2383
|
-
|
|
2823
|
+
ResponseBodyTools$outboundSchema.parse(responseBodyTools),
|
|
2384
2824
|
);
|
|
2385
2825
|
}
|
|
2386
|
-
export function
|
|
2826
|
+
export function responseBodyToolsFromJSON(
|
|
2387
2827
|
jsonString: string,
|
|
2388
|
-
): SafeParseResult<
|
|
2828
|
+
): SafeParseResult<ResponseBodyTools, SDKValidationError> {
|
|
2389
2829
|
return safeParse(
|
|
2390
2830
|
jsonString,
|
|
2391
|
-
(x) =>
|
|
2392
|
-
`Failed to parse '
|
|
2831
|
+
(x) => ResponseBodyTools$inboundSchema.parse(JSON.parse(x)),
|
|
2832
|
+
`Failed to parse 'ResponseBodyTools' from JSON`,
|
|
2393
2833
|
);
|
|
2394
2834
|
}
|
|
2395
2835
|
|
|
@@ -2408,28 +2848,21 @@ export const ResponseBodyMcp$inboundSchema: z.ZodType<
|
|
|
2408
2848
|
z.ZodTypeDef,
|
|
2409
2849
|
unknown
|
|
2410
2850
|
> = z.object({
|
|
2411
|
-
server_id: z.string(),
|
|
2412
|
-
tool_name: z.string(),
|
|
2413
2851
|
server_url: z.string(),
|
|
2414
2852
|
headers: z.record(z.lazy(() => ResponseBodyHeaders$inboundSchema)).optional(),
|
|
2415
|
-
|
|
2853
|
+
tools: z.array(z.lazy(() => ResponseBodyTools$inboundSchema)),
|
|
2416
2854
|
connection_type: ResponseBodyConnectionType$inboundSchema,
|
|
2417
2855
|
}).transform((v) => {
|
|
2418
2856
|
return remap$(v, {
|
|
2419
|
-
"server_id": "serverId",
|
|
2420
|
-
"tool_name": "toolName",
|
|
2421
2857
|
"server_url": "serverUrl",
|
|
2422
|
-
"input_schema": "inputSchema",
|
|
2423
2858
|
"connection_type": "connectionType",
|
|
2424
2859
|
});
|
|
2425
2860
|
});
|
|
2426
2861
|
/** @internal */
|
|
2427
2862
|
export type ResponseBodyMcp$Outbound = {
|
|
2428
|
-
server_id: string;
|
|
2429
|
-
tool_name: string;
|
|
2430
2863
|
server_url: string;
|
|
2431
2864
|
headers?: { [k: string]: ResponseBodyHeaders$Outbound } | undefined;
|
|
2432
|
-
|
|
2865
|
+
tools: Array<ResponseBodyTools$Outbound>;
|
|
2433
2866
|
connection_type: string;
|
|
2434
2867
|
};
|
|
2435
2868
|
|
|
@@ -2439,19 +2872,14 @@ export const ResponseBodyMcp$outboundSchema: z.ZodType<
|
|
|
2439
2872
|
z.ZodTypeDef,
|
|
2440
2873
|
ResponseBodyMcp
|
|
2441
2874
|
> = z.object({
|
|
2442
|
-
serverId: z.string(),
|
|
2443
|
-
toolName: z.string(),
|
|
2444
2875
|
serverUrl: z.string(),
|
|
2445
2876
|
headers: z.record(z.lazy(() => ResponseBodyHeaders$outboundSchema))
|
|
2446
2877
|
.optional(),
|
|
2447
|
-
|
|
2878
|
+
tools: z.array(z.lazy(() => ResponseBodyTools$outboundSchema)),
|
|
2448
2879
|
connectionType: ResponseBodyConnectionType$outboundSchema,
|
|
2449
2880
|
}).transform((v) => {
|
|
2450
2881
|
return remap$(v, {
|
|
2451
|
-
serverId: "server_id",
|
|
2452
|
-
toolName: "tool_name",
|
|
2453
2882
|
serverUrl: "server_url",
|
|
2454
|
-
inputSchema: "input_schema",
|
|
2455
2883
|
connectionType: "connection_type",
|
|
2456
2884
|
});
|
|
2457
2885
|
});
|
|
@@ -2477,7 +2905,7 @@ export const ResponseBody4$inboundSchema: z.ZodType<
|
|
|
2477
2905
|
z.ZodTypeDef,
|
|
2478
2906
|
unknown
|
|
2479
2907
|
> = z.object({
|
|
2480
|
-
_id: z.string().default("
|
|
2908
|
+
_id: z.string().default("tool_01KA0EAFP38QJ1YM61WBSXG7WW"),
|
|
2481
2909
|
path: z.string(),
|
|
2482
2910
|
key: z.string(),
|
|
2483
2911
|
display_name: z.string().optional(),
|
|
@@ -2530,7 +2958,7 @@ export const ResponseBody4$outboundSchema: z.ZodType<
|
|
|
2530
2958
|
z.ZodTypeDef,
|
|
2531
2959
|
ResponseBody4
|
|
2532
2960
|
> = z.object({
|
|
2533
|
-
id: z.string().default("
|
|
2961
|
+
id: z.string().default("tool_01KA0EAFP38QJ1YM61WBSXG7WW"),
|
|
2534
2962
|
path: z.string(),
|
|
2535
2963
|
key: z.string(),
|
|
2536
2964
|
displayName: z.string().optional(),
|
|
@@ -2600,8 +3028,8 @@ export const CreateToolResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
|
|
|
2600
3028
|
> = CreateToolResponseBodyMethod$inboundSchema;
|
|
2601
3029
|
|
|
2602
3030
|
/** @internal */
|
|
2603
|
-
export const
|
|
2604
|
-
|
|
3031
|
+
export const CreateToolHeadersTools2$inboundSchema: z.ZodType<
|
|
3032
|
+
CreateToolHeadersTools2,
|
|
2605
3033
|
z.ZodTypeDef,
|
|
2606
3034
|
unknown
|
|
2607
3035
|
> = z.object({
|
|
@@ -2609,21 +3037,56 @@ export const CreateToolResponseBodyHeaders$inboundSchema: z.ZodType<
|
|
|
2609
3037
|
encrypted: z.boolean().default(false),
|
|
2610
3038
|
});
|
|
2611
3039
|
/** @internal */
|
|
2612
|
-
export type
|
|
3040
|
+
export type CreateToolHeadersTools2$Outbound = {
|
|
2613
3041
|
value: string;
|
|
2614
3042
|
encrypted: boolean;
|
|
2615
3043
|
};
|
|
2616
3044
|
|
|
2617
3045
|
/** @internal */
|
|
2618
|
-
export const
|
|
2619
|
-
|
|
3046
|
+
export const CreateToolHeadersTools2$outboundSchema: z.ZodType<
|
|
3047
|
+
CreateToolHeadersTools2$Outbound,
|
|
2620
3048
|
z.ZodTypeDef,
|
|
2621
|
-
|
|
3049
|
+
CreateToolHeadersTools2
|
|
2622
3050
|
> = z.object({
|
|
2623
3051
|
value: z.string(),
|
|
2624
3052
|
encrypted: z.boolean().default(false),
|
|
2625
3053
|
});
|
|
2626
3054
|
|
|
3055
|
+
export function createToolHeadersTools2ToJSON(
|
|
3056
|
+
createToolHeadersTools2: CreateToolHeadersTools2,
|
|
3057
|
+
): string {
|
|
3058
|
+
return JSON.stringify(
|
|
3059
|
+
CreateToolHeadersTools2$outboundSchema.parse(createToolHeadersTools2),
|
|
3060
|
+
);
|
|
3061
|
+
}
|
|
3062
|
+
export function createToolHeadersTools2FromJSON(
|
|
3063
|
+
jsonString: string,
|
|
3064
|
+
): SafeParseResult<CreateToolHeadersTools2, SDKValidationError> {
|
|
3065
|
+
return safeParse(
|
|
3066
|
+
jsonString,
|
|
3067
|
+
(x) => CreateToolHeadersTools2$inboundSchema.parse(JSON.parse(x)),
|
|
3068
|
+
`Failed to parse 'CreateToolHeadersTools2' from JSON`,
|
|
3069
|
+
);
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
|
+
/** @internal */
|
|
3073
|
+
export const CreateToolResponseBodyHeaders$inboundSchema: z.ZodType<
|
|
3074
|
+
CreateToolResponseBodyHeaders,
|
|
3075
|
+
z.ZodTypeDef,
|
|
3076
|
+
unknown
|
|
3077
|
+
> = z.union([z.lazy(() => CreateToolHeadersTools2$inboundSchema), z.string()]);
|
|
3078
|
+
/** @internal */
|
|
3079
|
+
export type CreateToolResponseBodyHeaders$Outbound =
|
|
3080
|
+
| CreateToolHeadersTools2$Outbound
|
|
3081
|
+
| string;
|
|
3082
|
+
|
|
3083
|
+
/** @internal */
|
|
3084
|
+
export const CreateToolResponseBodyHeaders$outboundSchema: z.ZodType<
|
|
3085
|
+
CreateToolResponseBodyHeaders$Outbound,
|
|
3086
|
+
z.ZodTypeDef,
|
|
3087
|
+
CreateToolResponseBodyHeaders
|
|
3088
|
+
> = z.union([z.lazy(() => CreateToolHeadersTools2$outboundSchema), z.string()]);
|
|
3089
|
+
|
|
2627
3090
|
export function createToolResponseBodyHeadersToJSON(
|
|
2628
3091
|
createToolResponseBodyHeaders: CreateToolResponseBodyHeaders,
|
|
2629
3092
|
): string {
|
|
@@ -2651,15 +3114,18 @@ export const ResponseBodyBlueprint$inboundSchema: z.ZodType<
|
|
|
2651
3114
|
> = z.object({
|
|
2652
3115
|
url: z.string(),
|
|
2653
3116
|
method: CreateToolResponseBodyMethod$inboundSchema,
|
|
2654
|
-
headers: z.record(
|
|
2655
|
-
.
|
|
3117
|
+
headers: z.record(
|
|
3118
|
+
z.union([z.lazy(() => CreateToolHeadersTools2$inboundSchema), z.string()]),
|
|
3119
|
+
).optional(),
|
|
2656
3120
|
body: z.record(z.any()).optional(),
|
|
2657
3121
|
});
|
|
2658
3122
|
/** @internal */
|
|
2659
3123
|
export type ResponseBodyBlueprint$Outbound = {
|
|
2660
3124
|
url: string;
|
|
2661
3125
|
method: string;
|
|
2662
|
-
headers?:
|
|
3126
|
+
headers?:
|
|
3127
|
+
| { [k: string]: CreateToolHeadersTools2$Outbound | string }
|
|
3128
|
+
| undefined;
|
|
2663
3129
|
body?: { [k: string]: any } | undefined;
|
|
2664
3130
|
};
|
|
2665
3131
|
|
|
@@ -2671,8 +3137,9 @@ export const ResponseBodyBlueprint$outboundSchema: z.ZodType<
|
|
|
2671
3137
|
> = z.object({
|
|
2672
3138
|
url: z.string(),
|
|
2673
3139
|
method: CreateToolResponseBodyMethod$outboundSchema,
|
|
2674
|
-
headers: z.record(
|
|
2675
|
-
.
|
|
3140
|
+
headers: z.record(
|
|
3141
|
+
z.union([z.lazy(() => CreateToolHeadersTools2$outboundSchema), z.string()]),
|
|
3142
|
+
).optional(),
|
|
2676
3143
|
body: z.record(z.any()).optional(),
|
|
2677
3144
|
});
|
|
2678
3145
|
|
|
@@ -2847,7 +3314,7 @@ export const ResponseBody3$inboundSchema: z.ZodType<
|
|
|
2847
3314
|
z.ZodTypeDef,
|
|
2848
3315
|
unknown
|
|
2849
3316
|
> = z.object({
|
|
2850
|
-
_id: z.string().default("
|
|
3317
|
+
_id: z.string().default("tool_01KA0EAFP0F37B8TFY95186BFF"),
|
|
2851
3318
|
path: z.string(),
|
|
2852
3319
|
key: z.string(),
|
|
2853
3320
|
display_name: z.string().optional(),
|
|
@@ -2898,7 +3365,7 @@ export const ResponseBody3$outboundSchema: z.ZodType<
|
|
|
2898
3365
|
z.ZodTypeDef,
|
|
2899
3366
|
ResponseBody3
|
|
2900
3367
|
> = z.object({
|
|
2901
|
-
id: z.string().default("
|
|
3368
|
+
id: z.string().default("tool_01KA0EAFP0F37B8TFY95186BFF"),
|
|
2902
3369
|
path: z.string(),
|
|
2903
3370
|
key: z.string(),
|
|
2904
3371
|
displayName: z.string().optional(),
|
|
@@ -2956,6 +3423,64 @@ export const CreateToolResponseBodyToolsType$outboundSchema: z.ZodNativeEnum<
|
|
|
2956
3423
|
typeof CreateToolResponseBodyToolsType
|
|
2957
3424
|
> = CreateToolResponseBodyToolsType$inboundSchema;
|
|
2958
3425
|
|
|
3426
|
+
/** @internal */
|
|
3427
|
+
export const ResponseBodySchema$inboundSchema: z.ZodType<
|
|
3428
|
+
ResponseBodySchema,
|
|
3429
|
+
z.ZodTypeDef,
|
|
3430
|
+
unknown
|
|
3431
|
+
> = collectExtraKeys$(
|
|
3432
|
+
z.object({
|
|
3433
|
+
type: z.string(),
|
|
3434
|
+
properties: z.record(z.any()),
|
|
3435
|
+
required: z.array(z.string()),
|
|
3436
|
+
}).catchall(z.any()),
|
|
3437
|
+
"additionalProperties",
|
|
3438
|
+
true,
|
|
3439
|
+
);
|
|
3440
|
+
/** @internal */
|
|
3441
|
+
export type ResponseBodySchema$Outbound = {
|
|
3442
|
+
type: string;
|
|
3443
|
+
properties: { [k: string]: any };
|
|
3444
|
+
required: Array<string>;
|
|
3445
|
+
[additionalProperties: string]: unknown;
|
|
3446
|
+
};
|
|
3447
|
+
|
|
3448
|
+
/** @internal */
|
|
3449
|
+
export const ResponseBodySchema$outboundSchema: z.ZodType<
|
|
3450
|
+
ResponseBodySchema$Outbound,
|
|
3451
|
+
z.ZodTypeDef,
|
|
3452
|
+
ResponseBodySchema
|
|
3453
|
+
> = z.object({
|
|
3454
|
+
type: z.string(),
|
|
3455
|
+
properties: z.record(z.any()),
|
|
3456
|
+
required: z.array(z.string()),
|
|
3457
|
+
additionalProperties: z.record(z.any()).optional(),
|
|
3458
|
+
}).transform((v) => {
|
|
3459
|
+
return {
|
|
3460
|
+
...v.additionalProperties,
|
|
3461
|
+
...remap$(v, {
|
|
3462
|
+
additionalProperties: null,
|
|
3463
|
+
}),
|
|
3464
|
+
};
|
|
3465
|
+
});
|
|
3466
|
+
|
|
3467
|
+
export function responseBodySchemaToJSON(
|
|
3468
|
+
responseBodySchema: ResponseBodySchema,
|
|
3469
|
+
): string {
|
|
3470
|
+
return JSON.stringify(
|
|
3471
|
+
ResponseBodySchema$outboundSchema.parse(responseBodySchema),
|
|
3472
|
+
);
|
|
3473
|
+
}
|
|
3474
|
+
export function responseBodySchemaFromJSON(
|
|
3475
|
+
jsonString: string,
|
|
3476
|
+
): SafeParseResult<ResponseBodySchema, SDKValidationError> {
|
|
3477
|
+
return safeParse(
|
|
3478
|
+
jsonString,
|
|
3479
|
+
(x) => ResponseBodySchema$inboundSchema.parse(JSON.parse(x)),
|
|
3480
|
+
`Failed to parse 'ResponseBodySchema' from JSON`,
|
|
3481
|
+
);
|
|
3482
|
+
}
|
|
3483
|
+
|
|
2959
3484
|
/** @internal */
|
|
2960
3485
|
export const ResponseBodyJsonSchema$inboundSchema: z.ZodType<
|
|
2961
3486
|
ResponseBodyJsonSchema,
|
|
@@ -2963,15 +3488,15 @@ export const ResponseBodyJsonSchema$inboundSchema: z.ZodType<
|
|
|
2963
3488
|
unknown
|
|
2964
3489
|
> = z.object({
|
|
2965
3490
|
name: z.string(),
|
|
2966
|
-
description: z.string()
|
|
2967
|
-
schema: z.
|
|
3491
|
+
description: z.string(),
|
|
3492
|
+
schema: z.lazy(() => ResponseBodySchema$inboundSchema),
|
|
2968
3493
|
strict: z.boolean().optional(),
|
|
2969
3494
|
});
|
|
2970
3495
|
/** @internal */
|
|
2971
3496
|
export type ResponseBodyJsonSchema$Outbound = {
|
|
2972
3497
|
name: string;
|
|
2973
|
-
description
|
|
2974
|
-
schema:
|
|
3498
|
+
description: string;
|
|
3499
|
+
schema: ResponseBodySchema$Outbound;
|
|
2975
3500
|
strict?: boolean | undefined;
|
|
2976
3501
|
};
|
|
2977
3502
|
|
|
@@ -2982,8 +3507,8 @@ export const ResponseBodyJsonSchema$outboundSchema: z.ZodType<
|
|
|
2982
3507
|
ResponseBodyJsonSchema
|
|
2983
3508
|
> = z.object({
|
|
2984
3509
|
name: z.string(),
|
|
2985
|
-
description: z.string()
|
|
2986
|
-
schema: z.
|
|
3510
|
+
description: z.string(),
|
|
3511
|
+
schema: z.lazy(() => ResponseBodySchema$outboundSchema),
|
|
2987
3512
|
strict: z.boolean().optional(),
|
|
2988
3513
|
});
|
|
2989
3514
|
|
|
@@ -3010,7 +3535,7 @@ export const ResponseBody2$inboundSchema: z.ZodType<
|
|
|
3010
3535
|
z.ZodTypeDef,
|
|
3011
3536
|
unknown
|
|
3012
3537
|
> = z.object({
|
|
3013
|
-
_id: z.string().default("
|
|
3538
|
+
_id: z.string().default("tool_01KA0EAFNX6FT2THET1WJPH59D"),
|
|
3014
3539
|
path: z.string(),
|
|
3015
3540
|
key: z.string(),
|
|
3016
3541
|
display_name: z.string().optional(),
|
|
@@ -3062,7 +3587,7 @@ export const ResponseBody2$outboundSchema: z.ZodType<
|
|
|
3062
3587
|
z.ZodTypeDef,
|
|
3063
3588
|
ResponseBody2
|
|
3064
3589
|
> = z.object({
|
|
3065
|
-
id: z.string().default("
|
|
3590
|
+
id: z.string().default("tool_01KA0EAFNX6FT2THET1WJPH59D"),
|
|
3066
3591
|
path: z.string(),
|
|
3067
3592
|
key: z.string(),
|
|
3068
3593
|
displayName: z.string().optional(),
|
|
@@ -3121,6 +3646,77 @@ export const CreateToolResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
|
3121
3646
|
typeof CreateToolResponseBodyType
|
|
3122
3647
|
> = CreateToolResponseBodyType$inboundSchema;
|
|
3123
3648
|
|
|
3649
|
+
/** @internal */
|
|
3650
|
+
export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema:
|
|
3651
|
+
z.ZodNativeEnum<
|
|
3652
|
+
typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type
|
|
3653
|
+
> = z.nativeEnum(CreateToolResponseBodyToolsResponse200ApplicationJson1Type);
|
|
3654
|
+
/** @internal */
|
|
3655
|
+
export const CreateToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema:
|
|
3656
|
+
z.ZodNativeEnum<
|
|
3657
|
+
typeof CreateToolResponseBodyToolsResponse200ApplicationJson1Type
|
|
3658
|
+
> = CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema;
|
|
3659
|
+
|
|
3660
|
+
/** @internal */
|
|
3661
|
+
export const ResponseBodyParameters$inboundSchema: z.ZodType<
|
|
3662
|
+
ResponseBodyParameters,
|
|
3663
|
+
z.ZodTypeDef,
|
|
3664
|
+
unknown
|
|
3665
|
+
> = collectExtraKeys$(
|
|
3666
|
+
z.object({
|
|
3667
|
+
type:
|
|
3668
|
+
CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
|
|
3669
|
+
properties: z.record(z.any()),
|
|
3670
|
+
required: z.array(z.string()),
|
|
3671
|
+
}).catchall(z.any()),
|
|
3672
|
+
"additionalProperties",
|
|
3673
|
+
true,
|
|
3674
|
+
);
|
|
3675
|
+
/** @internal */
|
|
3676
|
+
export type ResponseBodyParameters$Outbound = {
|
|
3677
|
+
type: string;
|
|
3678
|
+
properties: { [k: string]: any };
|
|
3679
|
+
required: Array<string>;
|
|
3680
|
+
[additionalProperties: string]: unknown;
|
|
3681
|
+
};
|
|
3682
|
+
|
|
3683
|
+
/** @internal */
|
|
3684
|
+
export const ResponseBodyParameters$outboundSchema: z.ZodType<
|
|
3685
|
+
ResponseBodyParameters$Outbound,
|
|
3686
|
+
z.ZodTypeDef,
|
|
3687
|
+
ResponseBodyParameters
|
|
3688
|
+
> = z.object({
|
|
3689
|
+
type:
|
|
3690
|
+
CreateToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema,
|
|
3691
|
+
properties: z.record(z.any()),
|
|
3692
|
+
required: z.array(z.string()),
|
|
3693
|
+
additionalProperties: z.record(z.any()).optional(),
|
|
3694
|
+
}).transform((v) => {
|
|
3695
|
+
return {
|
|
3696
|
+
...v.additionalProperties,
|
|
3697
|
+
...remap$(v, {
|
|
3698
|
+
additionalProperties: null,
|
|
3699
|
+
}),
|
|
3700
|
+
};
|
|
3701
|
+
});
|
|
3702
|
+
|
|
3703
|
+
export function responseBodyParametersToJSON(
|
|
3704
|
+
responseBodyParameters: ResponseBodyParameters,
|
|
3705
|
+
): string {
|
|
3706
|
+
return JSON.stringify(
|
|
3707
|
+
ResponseBodyParameters$outboundSchema.parse(responseBodyParameters),
|
|
3708
|
+
);
|
|
3709
|
+
}
|
|
3710
|
+
export function responseBodyParametersFromJSON(
|
|
3711
|
+
jsonString: string,
|
|
3712
|
+
): SafeParseResult<ResponseBodyParameters, SDKValidationError> {
|
|
3713
|
+
return safeParse(
|
|
3714
|
+
jsonString,
|
|
3715
|
+
(x) => ResponseBodyParameters$inboundSchema.parse(JSON.parse(x)),
|
|
3716
|
+
`Failed to parse 'ResponseBodyParameters' from JSON`,
|
|
3717
|
+
);
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3124
3720
|
/** @internal */
|
|
3125
3721
|
export const CreateToolResponseBodyFunction$inboundSchema: z.ZodType<
|
|
3126
3722
|
CreateToolResponseBodyFunction,
|
|
@@ -3130,14 +3726,14 @@ export const CreateToolResponseBodyFunction$inboundSchema: z.ZodType<
|
|
|
3130
3726
|
name: z.string(),
|
|
3131
3727
|
description: z.string().optional(),
|
|
3132
3728
|
strict: z.boolean().optional(),
|
|
3133
|
-
parameters: z.
|
|
3729
|
+
parameters: z.lazy(() => ResponseBodyParameters$inboundSchema).optional(),
|
|
3134
3730
|
});
|
|
3135
3731
|
/** @internal */
|
|
3136
3732
|
export type CreateToolResponseBodyFunction$Outbound = {
|
|
3137
3733
|
name: string;
|
|
3138
3734
|
description?: string | undefined;
|
|
3139
3735
|
strict?: boolean | undefined;
|
|
3140
|
-
parameters?:
|
|
3736
|
+
parameters?: ResponseBodyParameters$Outbound | undefined;
|
|
3141
3737
|
};
|
|
3142
3738
|
|
|
3143
3739
|
/** @internal */
|
|
@@ -3149,7 +3745,7 @@ export const CreateToolResponseBodyFunction$outboundSchema: z.ZodType<
|
|
|
3149
3745
|
name: z.string(),
|
|
3150
3746
|
description: z.string().optional(),
|
|
3151
3747
|
strict: z.boolean().optional(),
|
|
3152
|
-
parameters: z.
|
|
3748
|
+
parameters: z.lazy(() => ResponseBodyParameters$outboundSchema).optional(),
|
|
3153
3749
|
});
|
|
3154
3750
|
|
|
3155
3751
|
export function createToolResponseBodyFunctionToJSON(
|
|
@@ -3177,7 +3773,7 @@ export const ResponseBody1$inboundSchema: z.ZodType<
|
|
|
3177
3773
|
z.ZodTypeDef,
|
|
3178
3774
|
unknown
|
|
3179
3775
|
> = z.object({
|
|
3180
|
-
_id: z.string().default("
|
|
3776
|
+
_id: z.string().default("tool_01KA0EAFNV0J6C6ET9BM3RSJV8"),
|
|
3181
3777
|
path: z.string(),
|
|
3182
3778
|
key: z.string(),
|
|
3183
3779
|
display_name: z.string().optional(),
|
|
@@ -3228,7 +3824,7 @@ export const ResponseBody1$outboundSchema: z.ZodType<
|
|
|
3228
3824
|
z.ZodTypeDef,
|
|
3229
3825
|
ResponseBody1
|
|
3230
3826
|
> = z.object({
|
|
3231
|
-
id: z.string().default("
|
|
3827
|
+
id: z.string().default("tool_01KA0EAFNV0J6C6ET9BM3RSJV8"),
|
|
3232
3828
|
path: z.string(),
|
|
3233
3829
|
key: z.string(),
|
|
3234
3830
|
displayName: z.string().optional(),
|