@lumoauth/api-client 1.0.0 → 1.2.0
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/.openapi-generator/FILES +16 -0
- package/.openapi-generator-ignore +1 -1
- package/README.md +12 -2
- package/api/aauth-api.ts +5 -5
- package/api/admin-mcp-api.ts +5 -5
- package/api/admin-oauth-clients-api.ts +118 -0
- package/api/agents-api.ts +5 -5
- package/api/authorization-api.ts +5 -26
- package/api/mcp-api.ts +130 -0
- package/api/well-known-api.ts +10 -10
- package/dist/api/aauth-api.d.ts +5 -5
- package/dist/api/aauth-api.js +4 -4
- package/dist/api/admin-mcp-api.d.ts +5 -5
- package/dist/api/admin-mcp-api.js +4 -4
- package/dist/api/admin-oauth-clients-api.d.ts +65 -0
- package/dist/api/admin-oauth-clients-api.js +77 -0
- package/dist/api/agents-api.d.ts +5 -5
- package/dist/api/agents-api.js +4 -4
- package/dist/api/authorization-api.d.ts +5 -5
- package/dist/api/authorization-api.js +4 -18
- package/dist/api/mcp-api.d.ts +73 -0
- package/dist/api/mcp-api.js +82 -0
- package/dist/api/well-known-api.d.ts +10 -10
- package/dist/api/well-known-api.js +8 -8
- package/dist/esm/api/aauth-api.d.ts +5 -5
- package/dist/esm/api/aauth-api.js +4 -4
- package/dist/esm/api/admin-mcp-api.d.ts +5 -5
- package/dist/esm/api/admin-mcp-api.js +4 -4
- package/dist/esm/api/admin-oauth-clients-api.d.ts +65 -0
- package/dist/esm/api/admin-oauth-clients-api.js +78 -1
- package/dist/esm/api/agents-api.d.ts +5 -5
- package/dist/esm/api/agents-api.js +4 -4
- package/dist/esm/api/authorization-api.d.ts +5 -5
- package/dist/esm/api/authorization-api.js +4 -18
- package/dist/esm/api/mcp-api.d.ts +73 -0
- package/dist/esm/api/mcp-api.js +83 -1
- package/dist/esm/api/well-known-api.d.ts +10 -10
- package/dist/esm/api/well-known-api.js +8 -8
- package/dist/esm/models/admin-agents-generate-token-request.d.ts +7 -1
- package/dist/esm/models/admin-agents-generate-token-response-data.d.ts +12 -0
- package/dist/esm/models/admin-clients-cimd-check-request.d.ts +30 -0
- package/dist/esm/models/admin-clients-cimd-check-request.js +14 -0
- package/dist/esm/models/admin-clients-cimd-check-response.d.ts +25 -0
- package/dist/esm/models/admin-clients-cimd-check-response.js +14 -0
- package/dist/esm/models/attest-response.d.ts +2 -1
- package/dist/esm/models/attest-response.js +1 -0
- package/dist/esm/models/authentication-settings.d.ts +1 -1
- package/dist/esm/models/authorization-server-metadata.d.ts +1 -1
- package/dist/esm/models/authorize-mcp-request.d.ts +1 -1
- package/dist/esm/models/cimd-check-result-effective.d.ts +112 -0
- package/dist/esm/models/cimd-check-result-effective.js +31 -0
- package/dist/esm/models/cimd-check-result-shadow-client.d.ts +30 -0
- package/dist/esm/models/cimd-check-result-shadow-client.js +14 -0
- package/dist/esm/models/cimd-check-result.d.ts +76 -0
- package/dist/esm/models/cimd-check-result.js +14 -0
- package/dist/esm/models/get-protected-resource-metadata-root-response1-resources-item.d.ts +1 -1
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/models/mcp-server-tool-authorize-request-subject.d.ts +38 -0
- package/dist/esm/models/mcp-server-tool-authorize-request-subject.js +22 -0
- package/dist/esm/models/mcp-server-tool-authorize-request.d.ts +31 -0
- package/dist/esm/models/mcp-server-tool-authorize-request.js +14 -0
- package/dist/esm/models/mcp-server-tool-authorize-response.d.ts +36 -0
- package/dist/esm/models/mcp-server-tool-authorize-response.js +14 -0
- package/dist/esm/models/mcp-server.d.ts +18 -0
- package/dist/esm/models/open-id-configuration.d.ts +2 -2
- package/dist/esm/models/protected-resource-metadata.d.ts +1 -1
- package/dist/esm/models/push-enrollment-started.d.ts +7 -1
- package/dist/esm/models/single-server-metadata.d.ts +1 -1
- package/dist/models/admin-agents-generate-token-request.d.ts +7 -1
- package/dist/models/admin-agents-generate-token-response-data.d.ts +12 -0
- package/dist/models/admin-clients-cimd-check-request.d.ts +30 -0
- package/dist/models/admin-clients-cimd-check-request.js +15 -0
- package/dist/models/admin-clients-cimd-check-response.d.ts +25 -0
- package/dist/models/admin-clients-cimd-check-response.js +15 -0
- package/dist/models/attest-response.d.ts +2 -1
- package/dist/models/attest-response.js +1 -0
- package/dist/models/authentication-settings.d.ts +1 -1
- package/dist/models/authorization-server-metadata.d.ts +1 -1
- package/dist/models/authorize-mcp-request.d.ts +1 -1
- package/dist/models/cimd-check-result-effective.d.ts +112 -0
- package/dist/models/cimd-check-result-effective.js +34 -0
- package/dist/models/cimd-check-result-shadow-client.d.ts +30 -0
- package/dist/models/cimd-check-result-shadow-client.js +15 -0
- package/dist/models/cimd-check-result.d.ts +76 -0
- package/dist/models/cimd-check-result.js +15 -0
- package/dist/models/get-protected-resource-metadata-root-response1-resources-item.d.ts +1 -1
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/dist/models/mcp-server-tool-authorize-request-subject.d.ts +38 -0
- package/dist/models/mcp-server-tool-authorize-request-subject.js +25 -0
- package/dist/models/mcp-server-tool-authorize-request.d.ts +31 -0
- package/dist/models/mcp-server-tool-authorize-request.js +15 -0
- package/dist/models/mcp-server-tool-authorize-response.d.ts +36 -0
- package/dist/models/mcp-server-tool-authorize-response.js +15 -0
- package/dist/models/mcp-server.d.ts +18 -0
- package/dist/models/open-id-configuration.d.ts +2 -2
- package/dist/models/protected-resource-metadata.d.ts +1 -1
- package/dist/models/push-enrollment-started.d.ts +7 -1
- package/dist/models/single-server-metadata.d.ts +1 -1
- package/docs/AAuthApi.md +1 -1
- package/docs/AdminAgentsApi.md +1 -1
- package/docs/AdminAgentsGenerateTokenRequest.md +3 -1
- package/docs/AdminAgentsGenerateTokenResponseData.md +4 -0
- package/docs/AdminClientsCimdCheckRequest.md +22 -0
- package/docs/AdminClientsCimdCheckResponse.md +20 -0
- package/docs/AdminMcpApi.md +1 -1
- package/docs/AdminOAuthClientsApi.md +57 -0
- package/docs/AgentsApi.md +4 -3
- package/docs/AuthenticationSettings.md +1 -1
- package/docs/AuthorizationApi.md +8 -8
- package/docs/AuthorizationServerMetadata.md +1 -1
- package/docs/AuthorizeMcpRequest.md +1 -1
- package/docs/CimdCheckResult.md +37 -0
- package/docs/CimdCheckResultEffective.md +45 -0
- package/docs/CimdCheckResultShadowClient.md +23 -0
- package/docs/EnrollAuthenticator201Response.md +3 -1
- package/docs/GetProtectedResourceMetadataRoot200Response.md +1 -1
- package/docs/GetProtectedResourceMetadataRootResponse1ResourcesItem.md +1 -1
- package/docs/McpApi.md +64 -0
- package/docs/McpServer.md +6 -0
- package/docs/McpServerToolAuthorizeRequest.md +22 -0
- package/docs/McpServerToolAuthorizeRequestSubject.md +22 -0
- package/docs/McpServerToolAuthorizeResponse.md +24 -0
- package/docs/OpenIdConfiguration.md +2 -2
- package/docs/ProtectedResourceMetadata.md +1 -1
- package/docs/PushEnrollmentStarted.md +3 -1
- package/docs/SingleServerMetadata.md +1 -1
- package/docs/WellKnownApi.md +4 -4
- package/models/admin-agents-generate-token-request.ts +7 -1
- package/models/admin-agents-generate-token-response-data.ts +12 -0
- package/models/admin-clients-cimd-check-request.ts +36 -0
- package/models/admin-clients-cimd-check-response.ts +33 -0
- package/models/attest-response.ts +2 -1
- package/models/authentication-settings.ts +1 -1
- package/models/authorization-server-metadata.ts +1 -1
- package/models/authorize-mcp-request.ts +1 -1
- package/models/cimd-check-result-effective.ts +120 -0
- package/models/cimd-check-result-shadow-client.ts +36 -0
- package/models/cimd-check-result.ts +84 -0
- package/models/get-protected-resource-metadata-root-response1-resources-item.ts +1 -1
- package/models/index.ts +8 -0
- package/models/mcp-server-tool-authorize-request-subject.ts +46 -0
- package/models/mcp-server-tool-authorize-request.ts +39 -0
- package/models/mcp-server-tool-authorize-response.ts +42 -0
- package/models/mcp-server.ts +18 -0
- package/models/open-id-configuration.ts +2 -2
- package/models/protected-resource-metadata.ts +1 -1
- package/models/push-enrollment-started.ts +7 -1
- package/models/single-server-metadata.ts +1 -1
- package/package.json +1 -1
|
@@ -35,6 +35,45 @@ const base_1 = require("../base");
|
|
|
35
35
|
*/
|
|
36
36
|
const AdminOAuthClientsApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
|
+
/**
|
|
39
|
+
* Fetches and validates the metadata document at `client_id` exactly as the authorization server does (SSRF guard, domain allow-list, size and content-type limits, schema rules) and returns the effective client: redirect URIs, grant types and scopes after the organization policy is applied, plus what the document asked for that was dropped. Works even while CIMD is switched off for the organization (`enabled: false`), so a document can be validated before the switch is flipped. Nothing is registered or stored. `refresh: true` discards the cached copy first.
|
|
40
|
+
* @summary Check a Client ID Metadata Document
|
|
41
|
+
* @param {string} orgId
|
|
42
|
+
* @param {AdminClientsCimdCheckRequest} adminClientsCimdCheckRequest
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
adminClientsCimdCheck: (orgId_1, adminClientsCimdCheckRequest_1, ...args_1) => __awaiter(this, [orgId_1, adminClientsCimdCheckRequest_1, ...args_1], void 0, function* (orgId, adminClientsCimdCheckRequest, options = {}) {
|
|
47
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
48
|
+
(0, common_1.assertParamExists)('adminClientsCimdCheck', 'orgId', orgId);
|
|
49
|
+
// verify required parameter 'adminClientsCimdCheckRequest' is not null or undefined
|
|
50
|
+
(0, common_1.assertParamExists)('adminClientsCimdCheck', 'adminClientsCimdCheckRequest', adminClientsCimdCheckRequest);
|
|
51
|
+
const localVarPath = `/orgs/{orgId}/api/v1/admin/clients/cimd/check`
|
|
52
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)));
|
|
53
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
54
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
55
|
+
let baseOptions;
|
|
56
|
+
if (configuration) {
|
|
57
|
+
baseOptions = configuration.baseOptions;
|
|
58
|
+
}
|
|
59
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
60
|
+
const localVarHeaderParameter = {};
|
|
61
|
+
const localVarQueryParameter = {};
|
|
62
|
+
// authentication ApiKeyAuth required
|
|
63
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
64
|
+
// authentication BearerAuth required
|
|
65
|
+
// http bearer authentication required
|
|
66
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
67
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
68
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
69
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
70
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
71
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(adminClientsCimdCheckRequest, localVarRequestOptions, configuration);
|
|
72
|
+
return {
|
|
73
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
74
|
+
options: localVarRequestOptions,
|
|
75
|
+
};
|
|
76
|
+
}),
|
|
38
77
|
/**
|
|
39
78
|
*
|
|
40
79
|
* @summary Create an OAuth client
|
|
@@ -455,6 +494,23 @@ exports.AdminOAuthClientsApiAxiosParamCreator = AdminOAuthClientsApiAxiosParamCr
|
|
|
455
494
|
const AdminOAuthClientsApiFp = function (configuration) {
|
|
456
495
|
const localVarAxiosParamCreator = (0, exports.AdminOAuthClientsApiAxiosParamCreator)(configuration);
|
|
457
496
|
return {
|
|
497
|
+
/**
|
|
498
|
+
* Fetches and validates the metadata document at `client_id` exactly as the authorization server does (SSRF guard, domain allow-list, size and content-type limits, schema rules) and returns the effective client: redirect URIs, grant types and scopes after the organization policy is applied, plus what the document asked for that was dropped. Works even while CIMD is switched off for the organization (`enabled: false`), so a document can be validated before the switch is flipped. Nothing is registered or stored. `refresh: true` discards the cached copy first.
|
|
499
|
+
* @summary Check a Client ID Metadata Document
|
|
500
|
+
* @param {string} orgId
|
|
501
|
+
* @param {AdminClientsCimdCheckRequest} adminClientsCimdCheckRequest
|
|
502
|
+
* @param {*} [options] Override http request option.
|
|
503
|
+
* @throws {RequiredError}
|
|
504
|
+
*/
|
|
505
|
+
adminClientsCimdCheck(orgId, adminClientsCimdCheckRequest, options) {
|
|
506
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
507
|
+
var _a, _b, _c;
|
|
508
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.adminClientsCimdCheck(orgId, adminClientsCimdCheckRequest, options);
|
|
509
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
510
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AdminOAuthClientsApi.adminClientsCimdCheck']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
511
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
512
|
+
});
|
|
513
|
+
},
|
|
458
514
|
/**
|
|
459
515
|
*
|
|
460
516
|
* @summary Create an OAuth client
|
|
@@ -650,6 +706,16 @@ exports.AdminOAuthClientsApiFp = AdminOAuthClientsApiFp;
|
|
|
650
706
|
const AdminOAuthClientsApiFactory = function (configuration, basePath, axios) {
|
|
651
707
|
const localVarFp = (0, exports.AdminOAuthClientsApiFp)(configuration);
|
|
652
708
|
return {
|
|
709
|
+
/**
|
|
710
|
+
* Fetches and validates the metadata document at `client_id` exactly as the authorization server does (SSRF guard, domain allow-list, size and content-type limits, schema rules) and returns the effective client: redirect URIs, grant types and scopes after the organization policy is applied, plus what the document asked for that was dropped. Works even while CIMD is switched off for the organization (`enabled: false`), so a document can be validated before the switch is flipped. Nothing is registered or stored. `refresh: true` discards the cached copy first.
|
|
711
|
+
* @summary Check a Client ID Metadata Document
|
|
712
|
+
* @param {AdminOAuthClientsApiAdminClientsCimdCheckRequest} requestParameters Request parameters.
|
|
713
|
+
* @param {*} [options] Override http request option.
|
|
714
|
+
* @throws {RequiredError}
|
|
715
|
+
*/
|
|
716
|
+
adminClientsCimdCheck(requestParameters, options) {
|
|
717
|
+
return localVarFp.adminClientsCimdCheck(requestParameters.orgId, requestParameters.adminClientsCimdCheckRequest, options).then((request) => request(axios, basePath));
|
|
718
|
+
},
|
|
653
719
|
/**
|
|
654
720
|
*
|
|
655
721
|
* @summary Create an OAuth client
|
|
@@ -770,6 +836,17 @@ exports.AdminOAuthClientsApiFactory = AdminOAuthClientsApiFactory;
|
|
|
770
836
|
* @extends {BaseAPI}
|
|
771
837
|
*/
|
|
772
838
|
class AdminOAuthClientsApi extends base_1.BaseAPI {
|
|
839
|
+
/**
|
|
840
|
+
* Fetches and validates the metadata document at `client_id` exactly as the authorization server does (SSRF guard, domain allow-list, size and content-type limits, schema rules) and returns the effective client: redirect URIs, grant types and scopes after the organization policy is applied, plus what the document asked for that was dropped. Works even while CIMD is switched off for the organization (`enabled: false`), so a document can be validated before the switch is flipped. Nothing is registered or stored. `refresh: true` discards the cached copy first.
|
|
841
|
+
* @summary Check a Client ID Metadata Document
|
|
842
|
+
* @param {AdminOAuthClientsApiAdminClientsCimdCheckRequest} requestParameters Request parameters.
|
|
843
|
+
* @param {*} [options] Override http request option.
|
|
844
|
+
* @throws {RequiredError}
|
|
845
|
+
* @memberof AdminOAuthClientsApi
|
|
846
|
+
*/
|
|
847
|
+
adminClientsCimdCheck(requestParameters, options) {
|
|
848
|
+
return (0, exports.AdminOAuthClientsApiFp)(this.configuration).adminClientsCimdCheck(requestParameters.orgId, requestParameters.adminClientsCimdCheckRequest, options).then((request) => request(this.axios, this.basePath));
|
|
849
|
+
}
|
|
773
850
|
/**
|
|
774
851
|
*
|
|
775
852
|
* @summary Create an OAuth client
|
package/dist/api/agents-api.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const AgentsApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
50
50
|
*/
|
|
51
51
|
attest: (orgId: string, agentId: string, attestRequest: AttestRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
54
54
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
55
55
|
* @param {string} orgId
|
|
56
56
|
* @param {AuthorizeMcpRequest} authorizeMcpRequest
|
|
@@ -136,7 +136,7 @@ export declare const AgentsApiFp: (configuration?: Configuration) => {
|
|
|
136
136
|
*/
|
|
137
137
|
attest(orgId: string, agentId: string, attestRequest: AttestRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AttestResponse>>;
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
140
140
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
141
141
|
* @param {string} orgId
|
|
142
142
|
* @param {AuthorizeMcpRequest} authorizeMcpRequest
|
|
@@ -219,7 +219,7 @@ export declare const AgentsApiFactory: (configuration?: Configuration, basePath?
|
|
|
219
219
|
*/
|
|
220
220
|
attest(requestParameters: AgentsApiAttestRequest, options?: RawAxiosRequestConfig): AxiosPromise<AttestResponse>;
|
|
221
221
|
/**
|
|
222
|
-
*
|
|
222
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
223
223
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
224
224
|
* @param {AgentsApiAuthorizeMcpRequest} requestParameters Request parameters.
|
|
225
225
|
* @param {*} [options] Override http request option.
|
|
@@ -298,7 +298,7 @@ export interface AgentsApiInterface {
|
|
|
298
298
|
*/
|
|
299
299
|
attest(requestParameters: AgentsApiAttestRequest, options?: RawAxiosRequestConfig): AxiosPromise<AttestResponse>;
|
|
300
300
|
/**
|
|
301
|
-
*
|
|
301
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
302
302
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
303
303
|
* @param {AgentsApiAuthorizeMcpRequest} requestParameters Request parameters.
|
|
304
304
|
* @param {*} [options] Override http request option.
|
|
@@ -552,7 +552,7 @@ export declare class AgentsApi extends BaseAPI implements AgentsApiInterface {
|
|
|
552
552
|
*/
|
|
553
553
|
attest(requestParameters: AgentsApiAttestRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AttestResponse, any, {}>>;
|
|
554
554
|
/**
|
|
555
|
-
*
|
|
555
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
556
556
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
557
557
|
* @param {AgentsApiAuthorizeMcpRequest} requestParameters Request parameters.
|
|
558
558
|
* @param {*} [options] Override http request option.
|
package/dist/api/agents-api.js
CHANGED
|
@@ -118,7 +118,7 @@ const AgentsApiAxiosParamCreator = function (configuration) {
|
|
|
118
118
|
};
|
|
119
119
|
}),
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
122
122
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
123
123
|
* @param {string} orgId
|
|
124
124
|
* @param {AuthorizeMcpRequest} authorizeMcpRequest
|
|
@@ -417,7 +417,7 @@ const AgentsApiFp = function (configuration) {
|
|
|
417
417
|
});
|
|
418
418
|
},
|
|
419
419
|
/**
|
|
420
|
-
*
|
|
420
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
421
421
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
422
422
|
* @param {string} orgId
|
|
423
423
|
* @param {AuthorizeMcpRequest} authorizeMcpRequest
|
|
@@ -562,7 +562,7 @@ const AgentsApiFactory = function (configuration, basePath, axios) {
|
|
|
562
562
|
return localVarFp.attest(requestParameters.orgId, requestParameters.agentId, requestParameters.attestRequest, options).then((request) => request(axios, basePath));
|
|
563
563
|
},
|
|
564
564
|
/**
|
|
565
|
-
*
|
|
565
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
566
566
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
567
567
|
* @param {AgentsApiAuthorizeMcpRequest} requestParameters Request parameters.
|
|
568
568
|
* @param {*} [options] Override http request option.
|
|
@@ -662,7 +662,7 @@ class AgentsApi extends base_1.BaseAPI {
|
|
|
662
662
|
return (0, exports.AgentsApiFp)(this.configuration).attest(requestParameters.orgId, requestParameters.agentId, requestParameters.attestRequest, options).then((request) => request(this.axios, this.basePath));
|
|
663
663
|
}
|
|
664
664
|
/**
|
|
665
|
-
*
|
|
665
|
+
* An AGENT asks about itself: \"may I invoke <server>/<tool>?\" — with its own credential, before it calls the tool. Zanzibar-backed allow/deny (tool-level or server-wide grant), audited either way. An MCP SERVER must not use this endpoint: it would have to forward the agent\'s token (MCP 2026-07-28 forbids token passthrough). Servers call POST /orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize with their own client-credentials token instead ({@see \\McpAuthorizationController::authorizeTool()}). POST /orgs/{orgId}/api/v1/agents/me/mcp/authorize Body: { \"server_id\": \"mcp_0123…\", \"tool\": \"send_payment_reminder\" }
|
|
666
666
|
* @summary Per-MCP-tool authorization for the authenticated agent (dx B3).
|
|
667
667
|
* @param {AgentsApiAuthorizeMcpRequest} requestParameters Request parameters.
|
|
668
668
|
* @param {*} [options] Override http request option.
|
|
@@ -152,7 +152,7 @@ export declare const AuthorizationApiAxiosParamCreator: (configuration?: Configu
|
|
|
152
152
|
*/
|
|
153
153
|
listAttributeDefinitions: (orgId: string, type?: ListAttributeDefinitionsType, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
154
154
|
/**
|
|
155
|
-
* GET /api/v1/authz/permissions
|
|
155
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
156
156
|
* @summary List the caller\'s effective permissions
|
|
157
157
|
* @param {*} [options] Override http request option.
|
|
158
158
|
* @throws {RequiredError}
|
|
@@ -303,7 +303,7 @@ export declare const AuthorizationApiFp: (configuration?: Configuration) => {
|
|
|
303
303
|
*/
|
|
304
304
|
listAttributeDefinitions(orgId: string, type?: ListAttributeDefinitionsType, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListAttributeDefinitionsResponse>>;
|
|
305
305
|
/**
|
|
306
|
-
* GET /api/v1/authz/permissions
|
|
306
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
307
307
|
* @summary List the caller\'s effective permissions
|
|
308
308
|
* @param {*} [options] Override http request option.
|
|
309
309
|
* @throws {RequiredError}
|
|
@@ -450,7 +450,7 @@ export declare const AuthorizationApiFactory: (configuration?: Configuration, ba
|
|
|
450
450
|
*/
|
|
451
451
|
listAttributeDefinitions(requestParameters: AuthorizationApiListAttributeDefinitionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListAttributeDefinitionsResponse>;
|
|
452
452
|
/**
|
|
453
|
-
* GET /api/v1/authz/permissions
|
|
453
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
454
454
|
* @summary List the caller\'s effective permissions
|
|
455
455
|
* @param {*} [options] Override http request option.
|
|
456
456
|
* @throws {RequiredError}
|
|
@@ -608,7 +608,7 @@ export interface AuthorizationApiInterface {
|
|
|
608
608
|
*/
|
|
609
609
|
listAttributeDefinitions(requestParameters: AuthorizationApiListAttributeDefinitionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListAttributeDefinitionsResponse>;
|
|
610
610
|
/**
|
|
611
|
-
* GET /api/v1/authz/permissions
|
|
611
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
612
612
|
* @summary List the caller\'s effective permissions
|
|
613
613
|
* @param {*} [options] Override http request option.
|
|
614
614
|
* @throws {RequiredError}
|
|
@@ -954,7 +954,7 @@ export declare class AuthorizationApi extends BaseAPI implements AuthorizationAp
|
|
|
954
954
|
*/
|
|
955
955
|
listAttributeDefinitions(requestParameters: AuthorizationApiListAttributeDefinitionsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAttributeDefinitionsResponse, any, {}>>;
|
|
956
956
|
/**
|
|
957
|
-
* GET /api/v1/authz/permissions
|
|
957
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
958
958
|
* @summary List the caller\'s effective permissions
|
|
959
959
|
* @param {*} [options] Override http request option.
|
|
960
960
|
* @throws {RequiredError}
|
|
@@ -56,8 +56,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
56
56
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
57
57
|
const localVarHeaderParameter = {};
|
|
58
58
|
const localVarQueryParameter = {};
|
|
59
|
-
// authentication ApiKeyAuth required
|
|
60
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
61
59
|
// authentication BearerAuth required
|
|
62
60
|
// http bearer authentication required
|
|
63
61
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -90,8 +88,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
90
88
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
91
89
|
const localVarHeaderParameter = {};
|
|
92
90
|
const localVarQueryParameter = {};
|
|
93
|
-
// authentication ApiKeyAuth required
|
|
94
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
95
91
|
// authentication BearerAuth required
|
|
96
92
|
// http bearer authentication required
|
|
97
93
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -442,8 +438,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
442
438
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
443
439
|
const localVarHeaderParameter = {};
|
|
444
440
|
const localVarQueryParameter = {};
|
|
445
|
-
// authentication ApiKeyAuth required
|
|
446
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
447
441
|
// authentication BearerAuth required
|
|
448
442
|
// http bearer authentication required
|
|
449
443
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -484,8 +478,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
484
478
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
485
479
|
const localVarHeaderParameter = {};
|
|
486
480
|
const localVarQueryParameter = {};
|
|
487
|
-
// authentication ApiKeyAuth required
|
|
488
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
489
481
|
// authentication BearerAuth required
|
|
490
482
|
// http bearer authentication required
|
|
491
483
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -519,8 +511,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
519
511
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
520
512
|
const localVarHeaderParameter = {};
|
|
521
513
|
const localVarQueryParameter = {};
|
|
522
|
-
// authentication ApiKeyAuth required
|
|
523
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
524
514
|
// authentication BearerAuth required
|
|
525
515
|
// http bearer authentication required
|
|
526
516
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -536,7 +526,7 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
536
526
|
};
|
|
537
527
|
}),
|
|
538
528
|
/**
|
|
539
|
-
* GET /api/v1/authz/permissions
|
|
529
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
540
530
|
* @summary List the caller\'s effective permissions
|
|
541
531
|
* @param {*} [options] Override http request option.
|
|
542
532
|
* @throws {RequiredError}
|
|
@@ -598,8 +588,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
598
588
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
599
589
|
const localVarHeaderParameter = {};
|
|
600
590
|
const localVarQueryParameter = {};
|
|
601
|
-
// authentication ApiKeyAuth required
|
|
602
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
603
591
|
// authentication BearerAuth required
|
|
604
592
|
// http bearer authentication required
|
|
605
593
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -640,8 +628,6 @@ const AuthorizationApiAxiosParamCreator = function (configuration) {
|
|
|
640
628
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
|
|
641
629
|
const localVarHeaderParameter = {};
|
|
642
630
|
const localVarQueryParameter = {};
|
|
643
|
-
// authentication ApiKeyAuth required
|
|
644
|
-
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
645
631
|
// authentication BearerAuth required
|
|
646
632
|
// http bearer authentication required
|
|
647
633
|
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
@@ -901,7 +887,7 @@ const AuthorizationApiFp = function (configuration) {
|
|
|
901
887
|
});
|
|
902
888
|
},
|
|
903
889
|
/**
|
|
904
|
-
* GET /api/v1/authz/permissions
|
|
890
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
905
891
|
* @summary List the caller\'s effective permissions
|
|
906
892
|
* @param {*} [options] Override http request option.
|
|
907
893
|
* @throws {RequiredError}
|
|
@@ -1106,7 +1092,7 @@ const AuthorizationApiFactory = function (configuration, basePath, axios) {
|
|
|
1106
1092
|
return localVarFp.listAttributeDefinitions(requestParameters.orgId, requestParameters.type, options).then((request) => request(axios, basePath));
|
|
1107
1093
|
},
|
|
1108
1094
|
/**
|
|
1109
|
-
* GET /api/v1/authz/permissions
|
|
1095
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
1110
1096
|
* @summary List the caller\'s effective permissions
|
|
1111
1097
|
* @param {*} [options] Override http request option.
|
|
1112
1098
|
* @throws {RequiredError}
|
|
@@ -1303,7 +1289,7 @@ class AuthorizationApi extends base_1.BaseAPI {
|
|
|
1303
1289
|
return (0, exports.AuthorizationApiFp)(this.configuration).listAttributeDefinitions(requestParameters.orgId, requestParameters.type, options).then((request) => request(this.axios, this.basePath));
|
|
1304
1290
|
}
|
|
1305
1291
|
/**
|
|
1306
|
-
* GET /api/v1/authz/permissions
|
|
1292
|
+
* GET /api/v1/authz/permissions Inventory endpoint: a bearer access token needs the `authz:read` scope (the check endpoints stay open to any authenticated token).
|
|
1307
1293
|
* @summary List the caller\'s effective permissions
|
|
1308
1294
|
* @param {*} [options] Override http request option.
|
|
1309
1295
|
* @throws {RequiredError}
|
package/dist/api/mcp-api.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import type { GetProtectedResourceMetadataRoot200Response } from '../models';
|
|
|
16
16
|
import type { GetServerChallengeResponse } from '../models';
|
|
17
17
|
import type { GetServerResponse } from '../models';
|
|
18
18
|
import type { ListServersResponse } from '../models';
|
|
19
|
+
import type { McpServerToolAuthorizeRequest } from '../models';
|
|
20
|
+
import type { McpServerToolAuthorizeResponse } from '../models';
|
|
19
21
|
import type { ProtectedResourceMetadata } from '../models';
|
|
20
22
|
/**
|
|
21
23
|
* McpApi - axios parameter creator
|
|
@@ -65,6 +67,16 @@ export declare const McpApiAxiosParamCreator: (configuration?: Configuration) =>
|
|
|
65
67
|
* @throws {RequiredError}
|
|
66
68
|
*/
|
|
67
69
|
listServers: (orgId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
70
|
+
/**
|
|
71
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
72
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
73
|
+
* @param {string} orgId
|
|
74
|
+
* @param {string} serverId
|
|
75
|
+
* @param {McpServerToolAuthorizeRequest} mcpServerToolAuthorizeRequest
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
*/
|
|
79
|
+
mcpServerToolAuthorize: (orgId: string, serverId: string, mcpServerToolAuthorizeRequest: McpServerToolAuthorizeRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
68
80
|
/**
|
|
69
81
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
70
82
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -123,6 +135,16 @@ export declare const McpApiFp: (configuration?: Configuration) => {
|
|
|
123
135
|
* @throws {RequiredError}
|
|
124
136
|
*/
|
|
125
137
|
listServers(orgId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListServersResponse>>;
|
|
138
|
+
/**
|
|
139
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
140
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
141
|
+
* @param {string} orgId
|
|
142
|
+
* @param {string} serverId
|
|
143
|
+
* @param {McpServerToolAuthorizeRequest} mcpServerToolAuthorizeRequest
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
*/
|
|
147
|
+
mcpServerToolAuthorize(orgId: string, serverId: string, mcpServerToolAuthorizeRequest: McpServerToolAuthorizeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<McpServerToolAuthorizeResponse>>;
|
|
126
148
|
/**
|
|
127
149
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
128
150
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -178,6 +200,14 @@ export declare const McpApiFactory: (configuration?: Configuration, basePath?: s
|
|
|
178
200
|
* @throws {RequiredError}
|
|
179
201
|
*/
|
|
180
202
|
listServers(requestParameters: McpApiListServersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListServersResponse>;
|
|
203
|
+
/**
|
|
204
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
205
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
206
|
+
* @param {McpApiMcpServerToolAuthorizeRequest} requestParameters Request parameters.
|
|
207
|
+
* @param {*} [options] Override http request option.
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
*/
|
|
210
|
+
mcpServerToolAuthorize(requestParameters: McpApiMcpServerToolAuthorizeRequest, options?: RawAxiosRequestConfig): AxiosPromise<McpServerToolAuthorizeResponse>;
|
|
181
211
|
/**
|
|
182
212
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
183
213
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -238,6 +268,15 @@ export interface McpApiInterface {
|
|
|
238
268
|
* @memberof McpApiInterface
|
|
239
269
|
*/
|
|
240
270
|
listServers(requestParameters: McpApiListServersRequest, options?: RawAxiosRequestConfig): AxiosPromise<ListServersResponse>;
|
|
271
|
+
/**
|
|
272
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
273
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
274
|
+
* @param {McpApiMcpServerToolAuthorizeRequest} requestParameters Request parameters.
|
|
275
|
+
* @param {*} [options] Override http request option.
|
|
276
|
+
* @throws {RequiredError}
|
|
277
|
+
* @memberof McpApiInterface
|
|
278
|
+
*/
|
|
279
|
+
mcpServerToolAuthorize(requestParameters: McpApiMcpServerToolAuthorizeRequest, options?: RawAxiosRequestConfig): AxiosPromise<McpServerToolAuthorizeResponse>;
|
|
241
280
|
/**
|
|
242
281
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
243
282
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -331,6 +370,31 @@ export interface McpApiListServersRequest {
|
|
|
331
370
|
*/
|
|
332
371
|
readonly orgId: string;
|
|
333
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Request parameters for mcpServerToolAuthorize operation in McpApi.
|
|
375
|
+
* @export
|
|
376
|
+
* @interface McpApiMcpServerToolAuthorizeRequest
|
|
377
|
+
*/
|
|
378
|
+
export interface McpApiMcpServerToolAuthorizeRequest {
|
|
379
|
+
/**
|
|
380
|
+
*
|
|
381
|
+
* @type {string}
|
|
382
|
+
* @memberof McpApiMcpServerToolAuthorize
|
|
383
|
+
*/
|
|
384
|
+
readonly orgId: string;
|
|
385
|
+
/**
|
|
386
|
+
*
|
|
387
|
+
* @type {string}
|
|
388
|
+
* @memberof McpApiMcpServerToolAuthorize
|
|
389
|
+
*/
|
|
390
|
+
readonly serverId: string;
|
|
391
|
+
/**
|
|
392
|
+
*
|
|
393
|
+
* @type {McpServerToolAuthorizeRequest}
|
|
394
|
+
* @memberof McpApiMcpServerToolAuthorize
|
|
395
|
+
*/
|
|
396
|
+
readonly mcpServerToolAuthorizeRequest: McpServerToolAuthorizeRequest;
|
|
397
|
+
}
|
|
334
398
|
/**
|
|
335
399
|
* Request parameters for postServerChallenge operation in McpApi.
|
|
336
400
|
* @export
|
|
@@ -402,6 +466,15 @@ export declare class McpApi extends BaseAPI implements McpApiInterface {
|
|
|
402
466
|
* @memberof McpApi
|
|
403
467
|
*/
|
|
404
468
|
listServers(requestParameters: McpApiListServersRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListServersResponse, any, {}>>;
|
|
469
|
+
/**
|
|
470
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
471
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
472
|
+
* @param {McpApiMcpServerToolAuthorizeRequest} requestParameters Request parameters.
|
|
473
|
+
* @param {*} [options] Override http request option.
|
|
474
|
+
* @throws {RequiredError}
|
|
475
|
+
* @memberof McpApi
|
|
476
|
+
*/
|
|
477
|
+
mcpServerToolAuthorize(requestParameters: McpApiMcpServerToolAuthorizeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<McpServerToolAuthorizeResponse, any, {}>>;
|
|
405
478
|
/**
|
|
406
479
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
407
480
|
* @summary Simulated MCP server authorization challenge (POST)
|
package/dist/api/mcp-api.js
CHANGED
|
@@ -205,6 +205,49 @@ const McpApiAxiosParamCreator = function (configuration) {
|
|
|
205
205
|
options: localVarRequestOptions,
|
|
206
206
|
};
|
|
207
207
|
}),
|
|
208
|
+
/**
|
|
209
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
210
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
211
|
+
* @param {string} orgId
|
|
212
|
+
* @param {string} serverId
|
|
213
|
+
* @param {McpServerToolAuthorizeRequest} mcpServerToolAuthorizeRequest
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
mcpServerToolAuthorize: (orgId_1, serverId_1, mcpServerToolAuthorizeRequest_1, ...args_1) => __awaiter(this, [orgId_1, serverId_1, mcpServerToolAuthorizeRequest_1, ...args_1], void 0, function* (orgId, serverId, mcpServerToolAuthorizeRequest, options = {}) {
|
|
218
|
+
// verify required parameter 'orgId' is not null or undefined
|
|
219
|
+
(0, common_1.assertParamExists)('mcpServerToolAuthorize', 'orgId', orgId);
|
|
220
|
+
// verify required parameter 'serverId' is not null or undefined
|
|
221
|
+
(0, common_1.assertParamExists)('mcpServerToolAuthorize', 'serverId', serverId);
|
|
222
|
+
// verify required parameter 'mcpServerToolAuthorizeRequest' is not null or undefined
|
|
223
|
+
(0, common_1.assertParamExists)('mcpServerToolAuthorize', 'mcpServerToolAuthorizeRequest', mcpServerToolAuthorizeRequest);
|
|
224
|
+
const localVarPath = `/orgs/{orgId}/api/v1/mcp/servers/{serverId}/tools/authorize`
|
|
225
|
+
.replace(`{${"orgId"}}`, encodeURIComponent(String(orgId)))
|
|
226
|
+
.replace(`{${"serverId"}}`, encodeURIComponent(String(serverId)));
|
|
227
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
228
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
229
|
+
let baseOptions;
|
|
230
|
+
if (configuration) {
|
|
231
|
+
baseOptions = configuration.baseOptions;
|
|
232
|
+
}
|
|
233
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
234
|
+
const localVarHeaderParameter = {};
|
|
235
|
+
const localVarQueryParameter = {};
|
|
236
|
+
// authentication ApiKeyAuth required
|
|
237
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "X-API-Key", configuration);
|
|
238
|
+
// authentication BearerAuth required
|
|
239
|
+
// http bearer authentication required
|
|
240
|
+
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
241
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
242
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
243
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
244
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
245
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(mcpServerToolAuthorizeRequest, localVarRequestOptions, configuration);
|
|
246
|
+
return {
|
|
247
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
248
|
+
options: localVarRequestOptions,
|
|
249
|
+
};
|
|
250
|
+
}),
|
|
208
251
|
/**
|
|
209
252
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
210
253
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -334,6 +377,24 @@ const McpApiFp = function (configuration) {
|
|
|
334
377
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
335
378
|
});
|
|
336
379
|
},
|
|
380
|
+
/**
|
|
381
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
382
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
383
|
+
* @param {string} orgId
|
|
384
|
+
* @param {string} serverId
|
|
385
|
+
* @param {McpServerToolAuthorizeRequest} mcpServerToolAuthorizeRequest
|
|
386
|
+
* @param {*} [options] Override http request option.
|
|
387
|
+
* @throws {RequiredError}
|
|
388
|
+
*/
|
|
389
|
+
mcpServerToolAuthorize(orgId, serverId, mcpServerToolAuthorizeRequest, options) {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
391
|
+
var _a, _b, _c;
|
|
392
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.mcpServerToolAuthorize(orgId, serverId, mcpServerToolAuthorizeRequest, options);
|
|
393
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
394
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['McpApi.mcpServerToolAuthorize']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
395
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
396
|
+
});
|
|
397
|
+
},
|
|
337
398
|
/**
|
|
338
399
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
339
400
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -411,6 +472,16 @@ const McpApiFactory = function (configuration, basePath, axios) {
|
|
|
411
472
|
listServers(requestParameters, options) {
|
|
412
473
|
return localVarFp.listServers(requestParameters.orgId, options).then((request) => request(axios, basePath));
|
|
413
474
|
},
|
|
475
|
+
/**
|
|
476
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
477
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
478
|
+
* @param {McpApiMcpServerToolAuthorizeRequest} requestParameters Request parameters.
|
|
479
|
+
* @param {*} [options] Override http request option.
|
|
480
|
+
* @throws {RequiredError}
|
|
481
|
+
*/
|
|
482
|
+
mcpServerToolAuthorize(requestParameters, options) {
|
|
483
|
+
return localVarFp.mcpServerToolAuthorize(requestParameters.orgId, requestParameters.serverId, requestParameters.mcpServerToolAuthorizeRequest, options).then((request) => request(axios, basePath));
|
|
484
|
+
},
|
|
414
485
|
/**
|
|
415
486
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
416
487
|
* @summary Simulated MCP server authorization challenge (POST)
|
|
@@ -486,6 +557,17 @@ class McpApi extends base_1.BaseAPI {
|
|
|
486
557
|
listServers(requestParameters, options) {
|
|
487
558
|
return (0, exports.McpApiFp)(this.configuration).listServers(requestParameters.orgId, options).then((request) => request(this.axios, this.basePath));
|
|
488
559
|
}
|
|
560
|
+
/**
|
|
561
|
+
* Called by the MCP server with its own client-credentials access token (scope mcp:authorize; the client must be listed in the server\'s tool_authorizer_client_ids). The body names the caller the server already verified. The server never forwards the caller\'s token.
|
|
562
|
+
* @summary Per-tool authorization for an MCP server (server credential)
|
|
563
|
+
* @param {McpApiMcpServerToolAuthorizeRequest} requestParameters Request parameters.
|
|
564
|
+
* @param {*} [options] Override http request option.
|
|
565
|
+
* @throws {RequiredError}
|
|
566
|
+
* @memberof McpApi
|
|
567
|
+
*/
|
|
568
|
+
mcpServerToolAuthorize(requestParameters, options) {
|
|
569
|
+
return (0, exports.McpApiFp)(this.configuration).mcpServerToolAuthorize(requestParameters.orgId, requestParameters.serverId, requestParameters.mcpServerToolAuthorizeRequest, options).then((request) => request(this.axios, this.basePath));
|
|
570
|
+
}
|
|
489
571
|
/**
|
|
490
572
|
* Identical to GET; the HTTP method is only recorded in the audit trail.
|
|
491
573
|
* @summary Simulated MCP server authorization challenge (POST)
|