@orq-ai/node 4.13.0-rc.16 → 4.13.0-rc.18
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 +37 -39
- package/funcs/mcpGatewaysListTools.d.ts +1 -1
- package/funcs/mcpGatewaysListTools.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/createmcpgatewayrequest.d.ts +3 -0
- package/models/components/createmcpgatewayrequest.d.ts.map +1 -1
- package/models/components/createmcpgatewayrequest.js +2 -0
- package/models/components/createmcpgatewayrequest.js.map +1 -1
- package/models/components/evaluatorresponsefunction.js +2 -2
- package/models/components/evaluatorresponsehttp.js +2 -2
- package/models/components/evaluatorresponsejsonschema.js +2 -2
- package/models/components/evaluatorresponsellm.js +2 -2
- package/models/components/evaluatorresponsepython.js +2 -2
- package/models/components/evaluatorresponseragas.js +2 -2
- package/models/components/evaluatorresponsetypescript.js +2 -2
- package/models/components/index.d.ts +1 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -2
- package/models/components/index.js.map +1 -1
- package/models/components/mcpgateway.d.ts +2 -0
- package/models/components/mcpgateway.d.ts.map +1 -1
- package/models/components/mcpgateway.js +2 -0
- package/models/components/mcpgateway.js.map +1 -1
- package/models/components/mcpgatewaymode.d.ts +13 -0
- package/models/components/mcpgatewaymode.d.ts.map +1 -0
- package/models/components/{testmcpgatewaytoolresponse.js → mcpgatewaymode.js} +10 -11
- package/models/components/mcpgatewaymode.js.map +1 -0
- package/models/components/mcpgatewaytool.d.ts +2 -0
- package/models/components/mcpgatewaytool.d.ts.map +1 -1
- package/models/components/mcpgatewaytool.js +4 -0
- package/models/components/mcpgatewaytool.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/testmcpservertoolrequest.d.ts +6 -6
- package/models/components/testmcpservertoolrequest.d.ts.map +1 -1
- package/models/components/testmcpservertoolrequest.js +6 -7
- package/models/components/testmcpservertoolrequest.js.map +1 -1
- package/models/components/updatemcpgatewayrequest.d.ts +3 -0
- package/models/components/updatemcpgatewayrequest.d.ts.map +1 -1
- package/models/components/updatemcpgatewayrequest.js +2 -0
- package/models/components/updatemcpgatewayrequest.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +5 -5
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +5 -5
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +5 -5
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +5 -5
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +7 -7
- package/sdk/feedback.d.ts +1 -1
- package/sdk/feedback.js +1 -1
- package/sdk/mcpgateways.d.ts +1 -8
- package/sdk/mcpgateways.d.ts.map +1 -1
- package/sdk/mcpgateways.js +1 -11
- package/sdk/mcpgateways.js.map +1 -1
- package/src/funcs/mcpGatewaysListTools.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/createmcpgatewayrequest.ts +7 -0
- package/src/models/components/evaluatorresponsefunction.ts +2 -2
- package/src/models/components/evaluatorresponsehttp.ts +2 -2
- package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
- package/src/models/components/evaluatorresponsellm.ts +2 -2
- package/src/models/components/evaluatorresponsepython.ts +2 -2
- package/src/models/components/evaluatorresponseragas.ts +2 -2
- package/src/models/components/evaluatorresponsetypescript.ts +2 -2
- package/src/models/components/index.ts +1 -2
- package/src/models/components/mcpgateway.ts +6 -0
- package/src/models/components/mcpgatewaymode.ts +22 -0
- package/src/models/components/mcpgatewaytool.ts +6 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/testmcpservertoolrequest.ts +10 -17
- package/src/models/components/updatemcpgatewayrequest.ts +7 -0
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +5 -5
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/index.ts +0 -1
- package/src/models/operations/listdatasetdatapoints.ts +5 -5
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +5 -5
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +5 -5
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +1 -1
- package/src/sdk/mcpgateways.ts +1 -19
- package/funcs/mcpGatewaysTestTool.d.ts +0 -18
- package/funcs/mcpGatewaysTestTool.d.ts.map +0 -1
- package/funcs/mcpGatewaysTestTool.js +0 -124
- package/funcs/mcpGatewaysTestTool.js.map +0 -1
- package/models/components/testmcpgatewaytoolrequest.d.ts +0 -20
- package/models/components/testmcpgatewaytoolrequest.d.ts.map +0 -1
- package/models/components/testmcpgatewaytoolrequest.js +0 -61
- package/models/components/testmcpgatewaytoolrequest.js.map +0 -1
- package/models/components/testmcpgatewaytoolresponse.d.ts +0 -11
- package/models/components/testmcpgatewaytoolresponse.d.ts.map +0 -1
- package/models/components/testmcpgatewaytoolresponse.js.map +0 -1
- package/models/operations/mcpgatewaytesttool.d.ts +0 -15
- package/models/operations/mcpgatewaytesttool.d.ts.map +0 -1
- package/models/operations/mcpgatewaytesttool.js +0 -57
- package/models/operations/mcpgatewaytesttool.js.map +0 -1
- package/src/funcs/mcpGatewaysTestTool.ts +0 -173
- package/src/models/components/testmcpgatewaytoolrequest.ts +0 -55
- package/src/models/components/testmcpgatewaytoolresponse.ts +0 -35
- package/src/models/operations/mcpgatewaytesttool.ts +0 -42
|
@@ -1480,7 +1480,7 @@ export const RequestBodyTools$outboundSchema: z.ZodType<
|
|
|
1480
1480
|
z.ZodTypeDef,
|
|
1481
1481
|
RequestBodyTools
|
|
1482
1482
|
> = z.object({
|
|
1483
|
-
id: z.string().default("
|
|
1483
|
+
id: z.string().default("01KYRRWGX7SZJEMC2XRHSPMCBB"),
|
|
1484
1484
|
name: z.string(),
|
|
1485
1485
|
description: z.string().optional(),
|
|
1486
1486
|
schema: z.lazy(() => UpdateToolRequestBodyToolsSchema$outboundSchema),
|
|
@@ -2203,7 +2203,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
2203
2203
|
z.ZodTypeDef,
|
|
2204
2204
|
unknown
|
|
2205
2205
|
> = z.object({
|
|
2206
|
-
_id: z.string().default("
|
|
2206
|
+
_id: z.string().default("tool_01KYRRWGX2CKRJ6SDV9G9YVAM2"),
|
|
2207
2207
|
path: z.string(),
|
|
2208
2208
|
key: z.string(),
|
|
2209
2209
|
display_name: z.string().optional(),
|
|
@@ -2306,7 +2306,7 @@ export const UpdateToolResponseBodyTools$inboundSchema: z.ZodType<
|
|
|
2306
2306
|
z.ZodTypeDef,
|
|
2307
2307
|
unknown
|
|
2308
2308
|
> = z.object({
|
|
2309
|
-
id: z.string().default("
|
|
2309
|
+
id: z.string().default("01KYRRWGX19WRQJ6FBZXA8K35P"),
|
|
2310
2310
|
name: z.string(),
|
|
2311
2311
|
description: z.string().optional(),
|
|
2312
2312
|
schema: z.lazy(() => UpdateToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -2364,7 +2364,7 @@ export const UpdateToolResponseBodyMCPTool$inboundSchema: z.ZodType<
|
|
|
2364
2364
|
z.ZodTypeDef,
|
|
2365
2365
|
unknown
|
|
2366
2366
|
> = z.object({
|
|
2367
|
-
_id: z.string().default("
|
|
2367
|
+
_id: z.string().default("tool_01KYRRWGX0XCB8W28ZFSYG9CJQ"),
|
|
2368
2368
|
path: z.string(),
|
|
2369
2369
|
key: z.string(),
|
|
2370
2370
|
display_name: z.string().optional(),
|
|
@@ -2554,7 +2554,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
2554
2554
|
z.ZodTypeDef,
|
|
2555
2555
|
unknown
|
|
2556
2556
|
> = z.object({
|
|
2557
|
-
_id: z.string().default("
|
|
2557
|
+
_id: z.string().default("tool_01KYRRWGWYHCKDZ0K9REZF2PJR"),
|
|
2558
2558
|
path: z.string(),
|
|
2559
2559
|
key: z.string(),
|
|
2560
2560
|
display_name: z.string().optional(),
|
|
@@ -2649,7 +2649,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
2649
2649
|
z.ZodTypeDef,
|
|
2650
2650
|
unknown
|
|
2651
2651
|
> = z.object({
|
|
2652
|
-
_id: z.string().default("
|
|
2652
|
+
_id: z.string().default("tool_01KYRRWGWXSGSRYV2K9WJKSQ46"),
|
|
2653
2653
|
path: z.string(),
|
|
2654
2654
|
key: z.string(),
|
|
2655
2655
|
display_name: z.string().optional(),
|
|
@@ -2752,7 +2752,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
2752
2752
|
z.ZodTypeDef,
|
|
2753
2753
|
unknown
|
|
2754
2754
|
> = z.object({
|
|
2755
|
-
_id: z.string().default("
|
|
2755
|
+
_id: z.string().default("tool_01KYRRWGWVPF5HJRCCASP32WAZ"),
|
|
2756
2756
|
path: z.string(),
|
|
2757
2757
|
key: z.string(),
|
|
2758
2758
|
display_name: z.string().optional(),
|
package/src/sdk/feedback.ts
CHANGED
package/src/sdk/mcpgateways.ts
CHANGED
|
@@ -7,7 +7,6 @@ import { mcpGatewaysDelete } from "../funcs/mcpGatewaysDelete.js";
|
|
|
7
7
|
import { mcpGatewaysGet } from "../funcs/mcpGatewaysGet.js";
|
|
8
8
|
import { mcpGatewaysList } from "../funcs/mcpGatewaysList.js";
|
|
9
9
|
import { mcpGatewaysListTools } from "../funcs/mcpGatewaysListTools.js";
|
|
10
|
-
import { mcpGatewaysTestTool } from "../funcs/mcpGatewaysTestTool.js";
|
|
11
10
|
import { mcpGatewaysUpdate } from "../funcs/mcpGatewaysUpdate.js";
|
|
12
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
13
12
|
import * as components from "../models/components/index.js";
|
|
@@ -53,7 +52,7 @@ export class McpGateways extends ClientSDK {
|
|
|
53
52
|
* List exposed tools for a gateway
|
|
54
53
|
*
|
|
55
54
|
* @remarks
|
|
56
|
-
* Returns the namespaced
|
|
55
|
+
* Returns the namespaced tool view for a gateway.
|
|
57
56
|
*/
|
|
58
57
|
async listTools(
|
|
59
58
|
request: operations.McpGatewayListToolsRequest,
|
|
@@ -66,23 +65,6 @@ export class McpGateways extends ClientSDK {
|
|
|
66
65
|
));
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
/**
|
|
70
|
-
* Test an MCP gateway tool
|
|
71
|
-
*
|
|
72
|
-
* @remarks
|
|
73
|
-
* Executes a single exposed tool through a gateway for testing.
|
|
74
|
-
*/
|
|
75
|
-
async testTool(
|
|
76
|
-
request: operations.McpGatewayTestToolRequest,
|
|
77
|
-
options?: RequestOptions,
|
|
78
|
-
): Promise<components.TestMcpGatewayToolResponse> {
|
|
79
|
-
return unwrapAsync(mcpGatewaysTestTool(
|
|
80
|
-
this,
|
|
81
|
-
request,
|
|
82
|
-
options,
|
|
83
|
-
));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
68
|
/**
|
|
87
69
|
* Retrieve an MCP gateway
|
|
88
70
|
*
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { OrqCore } from "../core.js";
|
|
2
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
-
import * as components from "../models/components/index.js";
|
|
4
|
-
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
6
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
-
import * as operations from "../models/operations/index.js";
|
|
9
|
-
import { APIPromise } from "../types/async.js";
|
|
10
|
-
import { Result } from "../types/fp.js";
|
|
11
|
-
/**
|
|
12
|
-
* Test an MCP gateway tool
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Executes a single exposed tool through a gateway for testing.
|
|
16
|
-
*/
|
|
17
|
-
export declare function mcpGatewaysTestTool(client: OrqCore, request: operations.McpGatewayTestToolRequest, options?: RequestOptions): APIPromise<Result<components.TestMcpGatewayToolResponse, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
-
//# sourceMappingURL=mcpGatewaysTestTool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcpGatewaysTestTool.d.ts","sourceRoot":"","sources":["../src/funcs/mcpGatewaysTestTool.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,0BAA0B,EACnC,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.mcpGatewaysTestTool = mcpGatewaysTestTool;
|
|
40
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
-
const http_js_1 = require("../lib/http.js");
|
|
42
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
-
const primitives_js_1 = require("../lib/primitives.js");
|
|
44
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
45
|
-
const security_js_1 = require("../lib/security.js");
|
|
46
|
-
const url_js_1 = require("../lib/url.js");
|
|
47
|
-
const components = __importStar(require("../models/components/index.js"));
|
|
48
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
49
|
-
const async_js_1 = require("../types/async.js");
|
|
50
|
-
/**
|
|
51
|
-
* Test an MCP gateway tool
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Executes a single exposed tool through a gateway for testing.
|
|
55
|
-
*/
|
|
56
|
-
function mcpGatewaysTestTool(client, request, options) {
|
|
57
|
-
return new async_js_1.APIPromise($do(client, request, options));
|
|
58
|
-
}
|
|
59
|
-
async function $do(client, request, options) {
|
|
60
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.McpGatewayTestToolRequest$outboundSchema.parse(value), "Input validation failed");
|
|
61
|
-
if (!parsed.ok) {
|
|
62
|
-
return [parsed, { status: "invalid" }];
|
|
63
|
-
}
|
|
64
|
-
const payload = parsed.value;
|
|
65
|
-
const body = (0, encodings_js_1.encodeJSON)("body", payload.TestMcpGatewayToolRequest, {
|
|
66
|
-
explode: true,
|
|
67
|
-
});
|
|
68
|
-
const pathParams = {
|
|
69
|
-
gateway_id: (0, encodings_js_1.encodeSimple)("gateway_id", payload.gateway_id, {
|
|
70
|
-
explode: false,
|
|
71
|
-
charEncoding: "percent",
|
|
72
|
-
}),
|
|
73
|
-
};
|
|
74
|
-
const path = (0, url_js_1.pathToFunc)("/v2/mcp-gateways/{gateway_id}/tools:test")(pathParams);
|
|
75
|
-
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
76
|
-
"Content-Type": "application/json",
|
|
77
|
-
Accept: "application/json",
|
|
78
|
-
}));
|
|
79
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
80
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
81
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
82
|
-
const context = {
|
|
83
|
-
options: client._options,
|
|
84
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
85
|
-
operationID: "McpGatewayTestTool",
|
|
86
|
-
oAuth2Scopes: null,
|
|
87
|
-
resolvedSecurity: requestSecurity,
|
|
88
|
-
securitySource: client._options.apiKey,
|
|
89
|
-
retryConfig: options?.retries
|
|
90
|
-
|| client._options.retryConfig
|
|
91
|
-
|| { strategy: "none" },
|
|
92
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
93
|
-
};
|
|
94
|
-
const requestRes = client._createRequest(context, {
|
|
95
|
-
security: requestSecurity,
|
|
96
|
-
method: "POST",
|
|
97
|
-
baseURL: options?.serverURL,
|
|
98
|
-
path: path,
|
|
99
|
-
headers: headers,
|
|
100
|
-
body: body,
|
|
101
|
-
userAgent: client._options.userAgent,
|
|
102
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
103
|
-
}, options);
|
|
104
|
-
if (!requestRes.ok) {
|
|
105
|
-
return [requestRes, { status: "invalid" }];
|
|
106
|
-
}
|
|
107
|
-
const req = requestRes.value;
|
|
108
|
-
const doResult = await client._do(req, {
|
|
109
|
-
context,
|
|
110
|
-
isErrorStatusCode: (statusCode) => (0, http_js_1.matchStatusCode)({ status: statusCode }, ["4XX", "5XX"]),
|
|
111
|
-
retryConfig: context.retryConfig,
|
|
112
|
-
retryCodes: context.retryCodes,
|
|
113
|
-
});
|
|
114
|
-
if (!doResult.ok) {
|
|
115
|
-
return [doResult, { status: "request-error", request: req }];
|
|
116
|
-
}
|
|
117
|
-
const response = doResult.value;
|
|
118
|
-
const [result] = await M.match(M.json(200, components.TestMcpGatewayToolResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req);
|
|
119
|
-
if (!result.ok) {
|
|
120
|
-
return [result, { status: "complete", request: req, response }];
|
|
121
|
-
}
|
|
122
|
-
return [result, { status: "complete", request: req, response }];
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingUR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EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
export type Arguments = {};
|
|
3
|
-
export type TestMcpGatewayToolRequest = {
|
|
4
|
-
toolName?: string | undefined;
|
|
5
|
-
arguments?: Arguments | undefined;
|
|
6
|
-
};
|
|
7
|
-
/** @internal */
|
|
8
|
-
export type Arguments$Outbound = {};
|
|
9
|
-
/** @internal */
|
|
10
|
-
export declare const Arguments$outboundSchema: z.ZodType<Arguments$Outbound, z.ZodTypeDef, Arguments>;
|
|
11
|
-
export declare function argumentsToJSON(value: Arguments): string;
|
|
12
|
-
/** @internal */
|
|
13
|
-
export type TestMcpGatewayToolRequest$Outbound = {
|
|
14
|
-
tool_name?: string | undefined;
|
|
15
|
-
arguments?: Arguments$Outbound | undefined;
|
|
16
|
-
};
|
|
17
|
-
/** @internal */
|
|
18
|
-
export declare const TestMcpGatewayToolRequest$outboundSchema: z.ZodType<TestMcpGatewayToolRequest$Outbound, z.ZodTypeDef, TestMcpGatewayToolRequest>;
|
|
19
|
-
export declare function testMcpGatewayToolRequestToJSON(testMcpGatewayToolRequest: TestMcpGatewayToolRequest): string;
|
|
20
|
-
//# sourceMappingURL=testmcpgatewaytoolrequest.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testmcpgatewaytoolrequest.d.ts","sourceRoot":"","sources":["../../src/models/components/testmcpgatewaytoolrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,MAAM,SAAS,GAAG,EAAE,CAAC;AAE3B,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAEpC,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAC9C,kBAAkB,EAClB,CAAC,CAAC,UAAU,EACZ,SAAS,CACK,CAAC;AAEjB,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAExD;AAED,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,yBAAyB,CAQzB,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.TestMcpGatewayToolRequest$outboundSchema = exports.Arguments$outboundSchema = void 0;
|
|
40
|
-
exports.argumentsToJSON = argumentsToJSON;
|
|
41
|
-
exports.testMcpGatewayToolRequestToJSON = testMcpGatewayToolRequestToJSON;
|
|
42
|
-
const z = __importStar(require("zod/v3"));
|
|
43
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
44
|
-
/** @internal */
|
|
45
|
-
exports.Arguments$outboundSchema = z.object({});
|
|
46
|
-
function argumentsToJSON(value) {
|
|
47
|
-
return JSON.stringify(exports.Arguments$outboundSchema.parse(value));
|
|
48
|
-
}
|
|
49
|
-
/** @internal */
|
|
50
|
-
exports.TestMcpGatewayToolRequest$outboundSchema = z.object({
|
|
51
|
-
toolName: z.string().optional(),
|
|
52
|
-
arguments: z.lazy(() => exports.Arguments$outboundSchema).optional(),
|
|
53
|
-
}).transform((v) => {
|
|
54
|
-
return (0, primitives_js_1.remap)(v, {
|
|
55
|
-
toolName: "tool_name",
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
function testMcpGatewayToolRequestToJSON(testMcpGatewayToolRequest) {
|
|
59
|
-
return JSON.stringify(exports.TestMcpGatewayToolRequest$outboundSchema.parse(testMcpGatewayToolRequest));
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=testmcpgatewaytoolrequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testmcpgatewaytoolrequest.js","sourceRoot":"","sources":["../../src/models/components/testmcpgatewaytoolrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,0CAEC;AAsBD,0EAMC;AAlDD,0CAA4B;AAC5B,2DAA0D;AAY1D,gBAAgB;AACH,QAAA,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEjB,SAAgB,eAAe,CAAC,KAAgB;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,gCAAwB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/D,CAAC;AAQD,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,gCAAwB,CAAC,CAAC,QAAQ,EAAE;CAC7D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;KACtB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,gDAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import { McpGatewayToolTestResult } from "./mcpgatewaytooltestresult.js";
|
|
5
|
-
export type TestMcpGatewayToolResponse = {
|
|
6
|
-
result?: McpGatewayToolTestResult | undefined;
|
|
7
|
-
};
|
|
8
|
-
/** @internal */
|
|
9
|
-
export declare const TestMcpGatewayToolResponse$inboundSchema: z.ZodType<TestMcpGatewayToolResponse, z.ZodTypeDef, unknown>;
|
|
10
|
-
export declare function testMcpGatewayToolResponseFromJSON(jsonString: string): SafeParseResult<TestMcpGatewayToolResponse, SDKValidationError>;
|
|
11
|
-
//# sourceMappingURL=testmcpgatewaytoolresponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testmcpgatewaytoolresponse.d.ts","sourceRoot":"","sources":["../../src/models/components/testmcpgatewaytoolresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,MAAM,0BAA0B,GAAG;IACvC,MAAM,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,OAAO,CAGP,CAAC;AAEH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAMjE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testmcpgatewaytoolresponse.js","sourceRoot":"","sources":["../../src/models/components/testmcpgatewaytoolresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBH,gFAQC;AA9BD,0CAA4B;AAC5B,qDAAiD;AAGjD,+EAGuC;AAMvC,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,oEAAsC,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC;AAEH,SAAgB,kCAAkC,CAChD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gDAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpE,wDAAwD,CACzD,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import * as components from "../components/index.js";
|
|
3
|
-
export type McpGatewayTestToolRequest = {
|
|
4
|
-
gatewayId: string;
|
|
5
|
-
testMcpGatewayToolRequest: components.TestMcpGatewayToolRequest;
|
|
6
|
-
};
|
|
7
|
-
/** @internal */
|
|
8
|
-
export type McpGatewayTestToolRequest$Outbound = {
|
|
9
|
-
gateway_id: string;
|
|
10
|
-
TestMcpGatewayToolRequest: components.TestMcpGatewayToolRequest$Outbound;
|
|
11
|
-
};
|
|
12
|
-
/** @internal */
|
|
13
|
-
export declare const McpGatewayTestToolRequest$outboundSchema: z.ZodType<McpGatewayTestToolRequest$Outbound, z.ZodTypeDef, McpGatewayTestToolRequest>;
|
|
14
|
-
export declare function mcpGatewayTestToolRequestToJSON(mcpGatewayTestToolRequest: McpGatewayTestToolRequest): string;
|
|
15
|
-
//# sourceMappingURL=mcpgatewaytesttool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcpgatewaytesttool.d.ts","sourceRoot":"","sources":["../../src/models/operations/mcpgatewaytesttool.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB,EAAE,UAAU,CAAC,yBAAyB,CAAC;CACjE,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB,EAAE,UAAU,CAAC,kCAAkC,CAAC;CAC1E,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,yBAAyB,CAUzB,CAAC;AAEH,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.McpGatewayTestToolRequest$outboundSchema = void 0;
|
|
40
|
-
exports.mcpGatewayTestToolRequestToJSON = mcpGatewayTestToolRequestToJSON;
|
|
41
|
-
const z = __importStar(require("zod/v3"));
|
|
42
|
-
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
|
-
const components = __importStar(require("../components/index.js"));
|
|
44
|
-
/** @internal */
|
|
45
|
-
exports.McpGatewayTestToolRequest$outboundSchema = z.object({
|
|
46
|
-
gatewayId: z.string(),
|
|
47
|
-
testMcpGatewayToolRequest: components.TestMcpGatewayToolRequest$outboundSchema,
|
|
48
|
-
}).transform((v) => {
|
|
49
|
-
return (0, primitives_js_1.remap)(v, {
|
|
50
|
-
gatewayId: "gateway_id",
|
|
51
|
-
testMcpGatewayToolRequest: "TestMcpGatewayToolRequest",
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
function mcpGatewayTestToolRequestToJSON(mcpGatewayTestToolRequest) {
|
|
55
|
-
return JSON.stringify(exports.McpGatewayTestToolRequest$outboundSchema.parse(mcpGatewayTestToolRequest));
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=mcpgatewaytesttool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcpgatewaytesttool.js","sourceRoot":"","sources":["../../src/models/operations/mcpgatewaytesttool.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,0EAMC;AArCD,0CAA4B;AAC5B,2DAA0D;AAC1D,mEAAqD;AAarD,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,yBAAyB,EACvB,UAAU,CAAC,wCAAwC;CACtD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,yBAAyB,EAAE,2BAA2B;KACvD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,gDAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
-
import * as M from "../lib/matchers.js";
|
|
9
|
-
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
-
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import * as components from "../models/components/index.js";
|
|
15
|
-
import {
|
|
16
|
-
ConnectionError,
|
|
17
|
-
InvalidRequestError,
|
|
18
|
-
RequestAbortedError,
|
|
19
|
-
RequestTimeoutError,
|
|
20
|
-
UnexpectedClientError,
|
|
21
|
-
} from "../models/errors/httpclienterrors.js";
|
|
22
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Test an MCP gateway tool
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Executes a single exposed tool through a gateway for testing.
|
|
34
|
-
*/
|
|
35
|
-
export function mcpGatewaysTestTool(
|
|
36
|
-
client: OrqCore,
|
|
37
|
-
request: operations.McpGatewayTestToolRequest,
|
|
38
|
-
options?: RequestOptions,
|
|
39
|
-
): APIPromise<
|
|
40
|
-
Result<
|
|
41
|
-
components.TestMcpGatewayToolResponse,
|
|
42
|
-
| OrqError
|
|
43
|
-
| ResponseValidationError
|
|
44
|
-
| ConnectionError
|
|
45
|
-
| RequestAbortedError
|
|
46
|
-
| RequestTimeoutError
|
|
47
|
-
| InvalidRequestError
|
|
48
|
-
| UnexpectedClientError
|
|
49
|
-
| SDKValidationError
|
|
50
|
-
>
|
|
51
|
-
> {
|
|
52
|
-
return new APIPromise($do(
|
|
53
|
-
client,
|
|
54
|
-
request,
|
|
55
|
-
options,
|
|
56
|
-
));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function $do(
|
|
60
|
-
client: OrqCore,
|
|
61
|
-
request: operations.McpGatewayTestToolRequest,
|
|
62
|
-
options?: RequestOptions,
|
|
63
|
-
): Promise<
|
|
64
|
-
[
|
|
65
|
-
Result<
|
|
66
|
-
components.TestMcpGatewayToolResponse,
|
|
67
|
-
| OrqError
|
|
68
|
-
| ResponseValidationError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
| RequestAbortedError
|
|
71
|
-
| RequestTimeoutError
|
|
72
|
-
| InvalidRequestError
|
|
73
|
-
| UnexpectedClientError
|
|
74
|
-
| SDKValidationError
|
|
75
|
-
>,
|
|
76
|
-
APICall,
|
|
77
|
-
]
|
|
78
|
-
> {
|
|
79
|
-
const parsed = safeParse(
|
|
80
|
-
request,
|
|
81
|
-
(value) => operations.McpGatewayTestToolRequest$outboundSchema.parse(value),
|
|
82
|
-
"Input validation failed",
|
|
83
|
-
);
|
|
84
|
-
if (!parsed.ok) {
|
|
85
|
-
return [parsed, { status: "invalid" }];
|
|
86
|
-
}
|
|
87
|
-
const payload = parsed.value;
|
|
88
|
-
const body = encodeJSON("body", payload.TestMcpGatewayToolRequest, {
|
|
89
|
-
explode: true,
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
const pathParams = {
|
|
93
|
-
gateway_id: encodeSimple("gateway_id", payload.gateway_id, {
|
|
94
|
-
explode: false,
|
|
95
|
-
charEncoding: "percent",
|
|
96
|
-
}),
|
|
97
|
-
};
|
|
98
|
-
const path = pathToFunc("/v2/mcp-gateways/{gateway_id}/tools:test")(
|
|
99
|
-
pathParams,
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
const headers = new Headers(compactMap({
|
|
103
|
-
"Content-Type": "application/json",
|
|
104
|
-
Accept: "application/json",
|
|
105
|
-
}));
|
|
106
|
-
|
|
107
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
108
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
109
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
110
|
-
|
|
111
|
-
const context = {
|
|
112
|
-
options: client._options,
|
|
113
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
114
|
-
operationID: "McpGatewayTestTool",
|
|
115
|
-
oAuth2Scopes: null,
|
|
116
|
-
|
|
117
|
-
resolvedSecurity: requestSecurity,
|
|
118
|
-
|
|
119
|
-
securitySource: client._options.apiKey,
|
|
120
|
-
retryConfig: options?.retries
|
|
121
|
-
|| client._options.retryConfig
|
|
122
|
-
|| { strategy: "none" },
|
|
123
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const requestRes = client._createRequest(context, {
|
|
127
|
-
security: requestSecurity,
|
|
128
|
-
method: "POST",
|
|
129
|
-
baseURL: options?.serverURL,
|
|
130
|
-
path: path,
|
|
131
|
-
headers: headers,
|
|
132
|
-
body: body,
|
|
133
|
-
userAgent: client._options.userAgent,
|
|
134
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
135
|
-
}, options);
|
|
136
|
-
if (!requestRes.ok) {
|
|
137
|
-
return [requestRes, { status: "invalid" }];
|
|
138
|
-
}
|
|
139
|
-
const req = requestRes.value;
|
|
140
|
-
|
|
141
|
-
const doResult = await client._do(req, {
|
|
142
|
-
context,
|
|
143
|
-
isErrorStatusCode: (statusCode: number) =>
|
|
144
|
-
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
145
|
-
retryConfig: context.retryConfig,
|
|
146
|
-
retryCodes: context.retryCodes,
|
|
147
|
-
});
|
|
148
|
-
if (!doResult.ok) {
|
|
149
|
-
return [doResult, { status: "request-error", request: req }];
|
|
150
|
-
}
|
|
151
|
-
const response = doResult.value;
|
|
152
|
-
|
|
153
|
-
const [result] = await M.match<
|
|
154
|
-
components.TestMcpGatewayToolResponse,
|
|
155
|
-
| OrqError
|
|
156
|
-
| ResponseValidationError
|
|
157
|
-
| ConnectionError
|
|
158
|
-
| RequestAbortedError
|
|
159
|
-
| RequestTimeoutError
|
|
160
|
-
| InvalidRequestError
|
|
161
|
-
| UnexpectedClientError
|
|
162
|
-
| SDKValidationError
|
|
163
|
-
>(
|
|
164
|
-
M.json(200, components.TestMcpGatewayToolResponse$inboundSchema),
|
|
165
|
-
M.fail("4XX"),
|
|
166
|
-
M.fail("5XX"),
|
|
167
|
-
)(response, req);
|
|
168
|
-
if (!result.ok) {
|
|
169
|
-
return [result, { status: "complete", request: req, response }];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return [result, { status: "complete", request: req, response }];
|
|
173
|
-
}
|