@taico/client 0.0.1
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/dist/contracts/types.d.ts +7484 -0
- package/dist/contracts/types.js +5 -0
- package/dist/src/client/core/ApiError.d.ts +10 -0
- package/dist/src/client/core/ApiError.js +16 -0
- package/dist/src/client/core/ApiRequestOptions.d.ts +13 -0
- package/dist/src/client/core/ApiRequestOptions.js +1 -0
- package/dist/src/client/core/ApiResult.d.ts +7 -0
- package/dist/src/client/core/ApiResult.js +1 -0
- package/dist/src/client/core/CancelablePromise.d.ts +20 -0
- package/dist/src/client/core/CancelablePromise.js +99 -0
- package/dist/src/client/core/OpenAPI.d.ts +16 -0
- package/dist/src/client/core/OpenAPI.js +11 -0
- package/dist/src/client/core/request.d.ts +30 -0
- package/dist/src/client/core/request.js +275 -0
- package/dist/src/client/index.d.ts +116 -0
- package/dist/src/client/index.js +42 -0
- package/dist/src/client/models/ActorResponseDto.d.ts +35 -0
- package/dist/src/client/models/ActorResponseDto.js +11 -0
- package/dist/src/client/models/AddParticipantDto.d.ts +6 -0
- package/dist/src/client/models/AddParticipantDto.js +1 -0
- package/dist/src/client/models/AgentListResponseDto.d.ts +23 -0
- package/dist/src/client/models/AgentListResponseDto.js +1 -0
- package/dist/src/client/models/AgentResponseDto.d.ts +91 -0
- package/dist/src/client/models/AgentResponseDto.js +15 -0
- package/dist/src/client/models/AgentRunListResponseDto.d.ts +19 -0
- package/dist/src/client/models/AgentRunListResponseDto.js +1 -0
- package/dist/src/client/models/AgentRunResponseDto.d.ts +40 -0
- package/dist/src/client/models/AgentRunResponseDto.js +1 -0
- package/dist/src/client/models/AnswerInputRequestDto.d.ts +6 -0
- package/dist/src/client/models/AnswerInputRequestDto.js +1 -0
- package/dist/src/client/models/AppendBlockDto.d.ts +6 -0
- package/dist/src/client/models/AppendBlockDto.js +1 -0
- package/dist/src/client/models/AppendThreadStateDto.d.ts +6 -0
- package/dist/src/client/models/AppendThreadStateDto.js +1 -0
- package/dist/src/client/models/ArtefactResponseDto.d.ts +22 -0
- package/dist/src/client/models/ArtefactResponseDto.js +1 -0
- package/dist/src/client/models/AssignTaskDto.d.ts +10 -0
- package/dist/src/client/models/AssignTaskDto.js +1 -0
- package/dist/src/client/models/AttachTaskDto.d.ts +6 -0
- package/dist/src/client/models/AttachTaskDto.js +1 -0
- package/dist/src/client/models/AuthJourneyResponseDto.d.ts +48 -0
- package/dist/src/client/models/AuthJourneyResponseDto.js +17 -0
- package/dist/src/client/models/AuthorizationServerMetadataDto.d.ts +38 -0
- package/dist/src/client/models/AuthorizationServerMetadataDto.js +1 -0
- package/dist/src/client/models/BlockListResponseDto.d.ts +7 -0
- package/dist/src/client/models/BlockListResponseDto.js +1 -0
- package/dist/src/client/models/BlockResponseDto.d.ts +43 -0
- package/dist/src/client/models/BlockResponseDto.js +1 -0
- package/dist/src/client/models/BlockSummaryDto.d.ts +39 -0
- package/dist/src/client/models/BlockSummaryDto.js +1 -0
- package/dist/src/client/models/BlockTreeResponseDto.d.ts +38 -0
- package/dist/src/client/models/BlockTreeResponseDto.js +1 -0
- package/dist/src/client/models/ChangePasswordRequestDto.d.ts +10 -0
- package/dist/src/client/models/ChangePasswordRequestDto.js +1 -0
- package/dist/src/client/models/ChangeTaskStatusDto.d.ts +21 -0
- package/dist/src/client/models/ChangeTaskStatusDto.js +13 -0
- package/dist/src/client/models/ClientRegistrationResponseDto.d.ts +43 -0
- package/dist/src/client/models/ClientRegistrationResponseDto.js +11 -0
- package/dist/src/client/models/CommentResponseDto.d.ts +27 -0
- package/dist/src/client/models/CommentResponseDto.js +1 -0
- package/dist/src/client/models/ConnectionFlowResponseDto.d.ts +44 -0
- package/dist/src/client/models/ConnectionFlowResponseDto.js +12 -0
- package/dist/src/client/models/ConnectionResponseDto.d.ts +38 -0
- package/dist/src/client/models/ConnectionResponseDto.js +1 -0
- package/dist/src/client/models/ConsentDecisionDto.d.ts +10 -0
- package/dist/src/client/models/ConsentDecisionDto.js +1 -0
- package/dist/src/client/models/ContextBlockSummaryResponseDto.d.ts +10 -0
- package/dist/src/client/models/ContextBlockSummaryResponseDto.js +1 -0
- package/dist/src/client/models/ContextTagResponseDto.d.ts +14 -0
- package/dist/src/client/models/ContextTagResponseDto.js +1 -0
- package/dist/src/client/models/CreateAgentDto.d.ts +71 -0
- package/dist/src/client/models/CreateAgentDto.js +15 -0
- package/dist/src/client/models/CreateAgentRunDto.d.ts +6 -0
- package/dist/src/client/models/CreateAgentRunDto.js +1 -0
- package/dist/src/client/models/CreateArtefactDto.d.ts +10 -0
- package/dist/src/client/models/CreateArtefactDto.js +1 -0
- package/dist/src/client/models/CreateBlockDto.d.ts +18 -0
- package/dist/src/client/models/CreateBlockDto.js +1 -0
- package/dist/src/client/models/CreateCommentDto.d.ts +6 -0
- package/dist/src/client/models/CreateCommentDto.js +1 -0
- package/dist/src/client/models/CreateConnectionDto.d.ts +26 -0
- package/dist/src/client/models/CreateConnectionDto.js +1 -0
- package/dist/src/client/models/CreateInputRequestDto.d.ts +10 -0
- package/dist/src/client/models/CreateInputRequestDto.js +1 -0
- package/dist/src/client/models/CreateMappingDto.d.ts +14 -0
- package/dist/src/client/models/CreateMappingDto.js +1 -0
- package/dist/src/client/models/CreateProjectDto.d.ts +18 -0
- package/dist/src/client/models/CreateProjectDto.js +1 -0
- package/dist/src/client/models/CreateScopeDto.d.ts +10 -0
- package/dist/src/client/models/CreateScopeDto.js +1 -0
- package/dist/src/client/models/CreateServerDto.d.ts +18 -0
- package/dist/src/client/models/CreateServerDto.js +1 -0
- package/dist/src/client/models/CreateTagDto.d.ts +6 -0
- package/dist/src/client/models/CreateTagDto.js +1 -0
- package/dist/src/client/models/CreateTaskDto.d.ts +26 -0
- package/dist/src/client/models/CreateTaskDto.js +1 -0
- package/dist/src/client/models/CreateThreadDto.d.ts +26 -0
- package/dist/src/client/models/CreateThreadDto.js +1 -0
- package/dist/src/client/models/DeleteConnectionResponseDto.d.ts +6 -0
- package/dist/src/client/models/DeleteConnectionResponseDto.js +1 -0
- package/dist/src/client/models/DeleteMappingResponseDto.d.ts +6 -0
- package/dist/src/client/models/DeleteMappingResponseDto.js +1 -0
- package/dist/src/client/models/DeleteScopeResponseDto.d.ts +6 -0
- package/dist/src/client/models/DeleteScopeResponseDto.js +1 -0
- package/dist/src/client/models/DeleteServerResponseDto.d.ts +6 -0
- package/dist/src/client/models/DeleteServerResponseDto.js +1 -0
- package/dist/src/client/models/FlowClientDto.d.ts +10 -0
- package/dist/src/client/models/FlowClientDto.js +1 -0
- package/dist/src/client/models/FlowServerDto.d.ts +14 -0
- package/dist/src/client/models/FlowServerDto.js +1 -0
- package/dist/src/client/models/GetConsentMetadataResponseDto.d.ts +51 -0
- package/dist/src/client/models/GetConsentMetadataResponseDto.js +17 -0
- package/dist/src/client/models/InputRequestResponseDto.d.ts +38 -0
- package/dist/src/client/models/InputRequestResponseDto.js +1 -0
- package/dist/src/client/models/IntrospectTokenRequestDto.d.ts +27 -0
- package/dist/src/client/models/IntrospectTokenRequestDto.js +11 -0
- package/dist/src/client/models/IntrospectTokenResponseDto.d.ts +62 -0
- package/dist/src/client/models/IntrospectTokenResponseDto.js +10 -0
- package/dist/src/client/models/IssueAccessTokenRequestDto.d.ts +14 -0
- package/dist/src/client/models/IssueAccessTokenRequestDto.js +1 -0
- package/dist/src/client/models/IssueAccessTokenResponseDto.d.ts +26 -0
- package/dist/src/client/models/IssueAccessTokenResponseDto.js +1 -0
- package/dist/src/client/models/IssuedAccessTokenResponseDto.d.ts +54 -0
- package/dist/src/client/models/IssuedAccessTokenResponseDto.js +1 -0
- package/dist/src/client/models/JwkResponseDto.d.ts +38 -0
- package/dist/src/client/models/JwkResponseDto.js +1 -0
- package/dist/src/client/models/JwksResponseDto.d.ts +7 -0
- package/dist/src/client/models/JwksResponseDto.js +1 -0
- package/dist/src/client/models/LoginRequestDto.d.ts +10 -0
- package/dist/src/client/models/LoginRequestDto.js +1 -0
- package/dist/src/client/models/LoginResponseDto.d.ts +11 -0
- package/dist/src/client/models/LoginResponseDto.js +1 -0
- package/dist/src/client/models/MappingResponseDto.d.ts +30 -0
- package/dist/src/client/models/MappingResponseDto.js +1 -0
- package/dist/src/client/models/McpFlowResponseDto.d.ts +61 -0
- package/dist/src/client/models/McpFlowResponseDto.js +17 -0
- package/dist/src/client/models/MetaTagResponseDto.d.ts +22 -0
- package/dist/src/client/models/MetaTagResponseDto.js +1 -0
- package/dist/src/client/models/MoveBlockDto.d.ts +6 -0
- package/dist/src/client/models/MoveBlockDto.js +1 -0
- package/dist/src/client/models/PatchAgentDto.d.ts +47 -0
- package/dist/src/client/models/PatchAgentDto.js +15 -0
- package/dist/src/client/models/PatchProjectDto.d.ts +10 -0
- package/dist/src/client/models/PatchProjectDto.js +1 -0
- package/dist/src/client/models/ProjectResponseDto.d.ts +38 -0
- package/dist/src/client/models/ProjectResponseDto.js +1 -0
- package/dist/src/client/models/ProtectedResourceMetadataResponseDto.d.ts +22 -0
- package/dist/src/client/models/ProtectedResourceMetadataResponseDto.js +1 -0
- package/dist/src/client/models/ReferenceContextBlockDto.d.ts +6 -0
- package/dist/src/client/models/ReferenceContextBlockDto.js +1 -0
- package/dist/src/client/models/RegisterClientDto.d.ts +71 -0
- package/dist/src/client/models/RegisterClientDto.js +11 -0
- package/dist/src/client/models/ReorderBlockDto.d.ts +6 -0
- package/dist/src/client/models/ReorderBlockDto.js +1 -0
- package/dist/src/client/models/ScopeDto.d.ts +10 -0
- package/dist/src/client/models/ScopeDto.js +1 -0
- package/dist/src/client/models/ScopeResponseDto.d.ts +22 -0
- package/dist/src/client/models/ScopeResponseDto.js +1 -0
- package/dist/src/client/models/ScopesResponseDto.d.ts +7 -0
- package/dist/src/client/models/ScopesResponseDto.js +1 -0
- package/dist/src/client/models/ServerListResponseDto.d.ts +19 -0
- package/dist/src/client/models/ServerListResponseDto.js +1 -0
- package/dist/src/client/models/ServerResponseDto.d.ts +30 -0
- package/dist/src/client/models/ServerResponseDto.js +1 -0
- package/dist/src/client/models/TagResponseDto.d.ts +14 -0
- package/dist/src/client/models/TagResponseDto.js +1 -0
- package/dist/src/client/models/TaskInfoDto.d.ts +10 -0
- package/dist/src/client/models/TaskInfoDto.js +1 -0
- package/dist/src/client/models/TaskListResponseDto.d.ts +23 -0
- package/dist/src/client/models/TaskListResponseDto.js +1 -0
- package/dist/src/client/models/TaskResponseDto.d.ts +78 -0
- package/dist/src/client/models/TaskResponseDto.js +13 -0
- package/dist/src/client/models/TaskSearchResultDto.d.ts +14 -0
- package/dist/src/client/models/TaskSearchResultDto.js +1 -0
- package/dist/src/client/models/TaskSummaryResponseDto.d.ts +56 -0
- package/dist/src/client/models/TaskSummaryResponseDto.js +13 -0
- package/dist/src/client/models/ThreadListItemResponseDto.d.ts +10 -0
- package/dist/src/client/models/ThreadListItemResponseDto.js +1 -0
- package/dist/src/client/models/ThreadListResponseDto.d.ts +23 -0
- package/dist/src/client/models/ThreadListResponseDto.js +1 -0
- package/dist/src/client/models/ThreadResponseDto.d.ts +54 -0
- package/dist/src/client/models/ThreadResponseDto.js +1 -0
- package/dist/src/client/models/ThreadStateResponseDto.d.ts +6 -0
- package/dist/src/client/models/ThreadStateResponseDto.js +1 -0
- package/dist/src/client/models/TokenExchangeRequestDto.d.ts +36 -0
- package/dist/src/client/models/TokenExchangeRequestDto.js +17 -0
- package/dist/src/client/models/TokenExchangeResponseDto.d.ts +22 -0
- package/dist/src/client/models/TokenExchangeResponseDto.js +1 -0
- package/dist/src/client/models/TokenRequestDto.d.ts +43 -0
- package/dist/src/client/models/TokenRequestDto.js +11 -0
- package/dist/src/client/models/TokenResponseDto.d.ts +30 -0
- package/dist/src/client/models/TokenResponseDto.js +10 -0
- package/dist/src/client/models/UpdateAgentRunDto.d.ts +14 -0
- package/dist/src/client/models/UpdateAgentRunDto.js +1 -0
- package/dist/src/client/models/UpdateBlockDto.d.ts +22 -0
- package/dist/src/client/models/UpdateBlockDto.js +1 -0
- package/dist/src/client/models/UpdateConnectionDto.d.ts +26 -0
- package/dist/src/client/models/UpdateConnectionDto.js +1 -0
- package/dist/src/client/models/UpdateServerDto.d.ts +14 -0
- package/dist/src/client/models/UpdateServerDto.js +1 -0
- package/dist/src/client/models/UpdateTaskDto.d.ts +26 -0
- package/dist/src/client/models/UpdateTaskDto.js +1 -0
- package/dist/src/client/models/UpdateThreadDto.d.ts +6 -0
- package/dist/src/client/models/UpdateThreadDto.js +1 -0
- package/dist/src/client/models/UpdateThreadStateDto.d.ts +6 -0
- package/dist/src/client/models/UpdateThreadStateDto.js +1 -0
- package/dist/src/client/models/UserResponseDto.d.ts +31 -0
- package/dist/src/client/models/UserResponseDto.js +11 -0
- package/dist/src/client/services/ActorsService.d.ts +19 -0
- package/dist/src/client/services/ActorsService.js +34 -0
- package/dist/src/client/services/AgentRunService.d.ts +39 -0
- package/dist/src/client/services/AgentRunService.js +82 -0
- package/dist/src/client/services/AgentService.d.ts +45 -0
- package/dist/src/client/services/AgentService.js +85 -0
- package/dist/src/client/services/AgentTokensService.d.ts +29 -0
- package/dist/src/client/services/AgentTokensService.js +54 -0
- package/dist/src/client/services/AppService.d.ts +9 -0
- package/dist/src/client/services/AppService.js +15 -0
- package/dist/src/client/services/AuthorizationJourneysService.d.ts +11 -0
- package/dist/src/client/services/AuthorizationJourneysService.js +22 -0
- package/dist/src/client/services/AuthorizationServerService.d.ts +123 -0
- package/dist/src/client/services/AuthorizationServerService.js +265 -0
- package/dist/src/client/services/ContextService.d.ts +129 -0
- package/dist/src/client/services/ContextService.js +263 -0
- package/dist/src/client/services/DiscoveryService.d.ts +29 -0
- package/dist/src/client/services/DiscoveryService.js +48 -0
- package/dist/src/client/services/JwksService.d.ts +11 -0
- package/dist/src/client/services/JwksService.js +16 -0
- package/dist/src/client/services/MetaProjectsService.d.ts +57 -0
- package/dist/src/client/services/MetaProjectsService.js +127 -0
- package/dist/src/client/services/MetaService.d.ts +31 -0
- package/dist/src/client/services/MetaService.js +61 -0
- package/dist/src/client/services/TaskService.d.ts +174 -0
- package/dist/src/client/services/TaskService.js +385 -0
- package/dist/src/client/services/ThreadsService.d.ts +114 -0
- package/dist/src/client/services/ThreadsService.js +266 -0
- package/dist/src/client/services/ToolsService.d.ts +146 -0
- package/dist/src/client/services/ToolsService.js +336 -0
- package/dist/src/client/services/WebAuthenticationService.d.ts +43 -0
- package/dist/src/client/services/WebAuthenticationService.js +77 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +4 -0
- package/package.json +42 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class AgentService {
|
|
4
|
+
/**
|
|
5
|
+
* Create a new agent
|
|
6
|
+
* @param requestBody
|
|
7
|
+
* @returns AgentResponseDto
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static agentsControllerCreateAgent(requestBody) {
|
|
11
|
+
return __request(OpenAPI, {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
url: '/api/v1/agents',
|
|
14
|
+
body: requestBody,
|
|
15
|
+
mediaType: 'application/json',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List agents with optional filtering and pagination
|
|
20
|
+
* @param isActive Filter by active status
|
|
21
|
+
* @param page Page number for pagination
|
|
22
|
+
* @param limit Number of items per page
|
|
23
|
+
* @returns AgentListResponseDto
|
|
24
|
+
* @throws ApiError
|
|
25
|
+
*/
|
|
26
|
+
static agentsControllerListAgents(isActive, page = 1, limit = 20) {
|
|
27
|
+
return __request(OpenAPI, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
url: '/api/v1/agents',
|
|
30
|
+
query: {
|
|
31
|
+
'isActive': isActive,
|
|
32
|
+
'page': page,
|
|
33
|
+
'limit': limit,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get an agent by slug
|
|
39
|
+
* @param slug Agent slug
|
|
40
|
+
* @returns AgentResponseDto
|
|
41
|
+
* @throws ApiError
|
|
42
|
+
*/
|
|
43
|
+
static agentsControllerGetAgentBySlug(slug) {
|
|
44
|
+
return __request(OpenAPI, {
|
|
45
|
+
method: 'GET',
|
|
46
|
+
url: '/api/v1/agents/{slug}',
|
|
47
|
+
path: {
|
|
48
|
+
'slug': slug,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Patch an agent (update system prompt, status triggers, tag triggers, and/or type)
|
|
54
|
+
* @param actorId Agent actor ID
|
|
55
|
+
* @param requestBody
|
|
56
|
+
* @returns AgentResponseDto
|
|
57
|
+
* @throws ApiError
|
|
58
|
+
*/
|
|
59
|
+
static agentsControllerPatchAgent(actorId, requestBody) {
|
|
60
|
+
return __request(OpenAPI, {
|
|
61
|
+
method: 'PATCH',
|
|
62
|
+
url: '/api/v1/agents/{actorId}',
|
|
63
|
+
path: {
|
|
64
|
+
'actorId': actorId,
|
|
65
|
+
},
|
|
66
|
+
body: requestBody,
|
|
67
|
+
mediaType: 'application/json',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Delete an agent
|
|
72
|
+
* @param actorId Agent actor ID
|
|
73
|
+
* @returns void
|
|
74
|
+
* @throws ApiError
|
|
75
|
+
*/
|
|
76
|
+
static agentsControllerDeleteAgent(actorId) {
|
|
77
|
+
return __request(OpenAPI, {
|
|
78
|
+
method: 'DELETE',
|
|
79
|
+
url: '/api/v1/agents/{actorId}',
|
|
80
|
+
path: {
|
|
81
|
+
'actorId': actorId,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IssueAccessTokenRequestDto } from '../models/IssueAccessTokenRequestDto.js';
|
|
2
|
+
import type { IssueAccessTokenResponseDto } from '../models/IssueAccessTokenResponseDto.js';
|
|
3
|
+
import type { IssuedAccessTokenResponseDto } from '../models/IssuedAccessTokenResponseDto.js';
|
|
4
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
5
|
+
export declare class AgentTokensService {
|
|
6
|
+
/**
|
|
7
|
+
* Issue a new access token for an agent
|
|
8
|
+
* @param slug Agent slug
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns IssueAccessTokenResponseDto
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static agentTokensControllerIssueToken(slug: string, requestBody: IssueAccessTokenRequestDto): CancelablePromise<IssueAccessTokenResponseDto>;
|
|
14
|
+
/**
|
|
15
|
+
* List all tokens for an agent
|
|
16
|
+
* @param slug Agent slug
|
|
17
|
+
* @returns IssuedAccessTokenResponseDto
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
static agentTokensControllerListTokens(slug: string): CancelablePromise<Array<IssuedAccessTokenResponseDto>>;
|
|
21
|
+
/**
|
|
22
|
+
* Revoke an agent token
|
|
23
|
+
* @param slug Agent slug
|
|
24
|
+
* @param tokenId Token ID to revoke
|
|
25
|
+
* @returns IssuedAccessTokenResponseDto
|
|
26
|
+
* @throws ApiError
|
|
27
|
+
*/
|
|
28
|
+
static agentTokensControllerRevokeToken(slug: string, tokenId: string): CancelablePromise<IssuedAccessTokenResponseDto>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class AgentTokensService {
|
|
4
|
+
/**
|
|
5
|
+
* Issue a new access token for an agent
|
|
6
|
+
* @param slug Agent slug
|
|
7
|
+
* @param requestBody
|
|
8
|
+
* @returns IssueAccessTokenResponseDto
|
|
9
|
+
* @throws ApiError
|
|
10
|
+
*/
|
|
11
|
+
static agentTokensControllerIssueToken(slug, requestBody) {
|
|
12
|
+
return __request(OpenAPI, {
|
|
13
|
+
method: 'POST',
|
|
14
|
+
url: '/api/v1/agents/{slug}/tokens',
|
|
15
|
+
path: {
|
|
16
|
+
'slug': slug,
|
|
17
|
+
},
|
|
18
|
+
body: requestBody,
|
|
19
|
+
mediaType: 'application/json',
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List all tokens for an agent
|
|
24
|
+
* @param slug Agent slug
|
|
25
|
+
* @returns IssuedAccessTokenResponseDto
|
|
26
|
+
* @throws ApiError
|
|
27
|
+
*/
|
|
28
|
+
static agentTokensControllerListTokens(slug) {
|
|
29
|
+
return __request(OpenAPI, {
|
|
30
|
+
method: 'GET',
|
|
31
|
+
url: '/api/v1/agents/{slug}/tokens',
|
|
32
|
+
path: {
|
|
33
|
+
'slug': slug,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Revoke an agent token
|
|
39
|
+
* @param slug Agent slug
|
|
40
|
+
* @param tokenId Token ID to revoke
|
|
41
|
+
* @returns IssuedAccessTokenResponseDto
|
|
42
|
+
* @throws ApiError
|
|
43
|
+
*/
|
|
44
|
+
static agentTokensControllerRevokeToken(slug, tokenId) {
|
|
45
|
+
return __request(OpenAPI, {
|
|
46
|
+
method: 'DELETE',
|
|
47
|
+
url: '/api/v1/agents/{slug}/tokens/{tokenId}',
|
|
48
|
+
path: {
|
|
49
|
+
'slug': slug,
|
|
50
|
+
'tokenId': tokenId,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
2
|
+
export declare class AppService {
|
|
3
|
+
/**
|
|
4
|
+
* Health check endpoint
|
|
5
|
+
* @returns string Returns a greeting message
|
|
6
|
+
* @throws ApiError
|
|
7
|
+
*/
|
|
8
|
+
static appControllerGetHello(): CancelablePromise<string>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class AppService {
|
|
4
|
+
/**
|
|
5
|
+
* Health check endpoint
|
|
6
|
+
* @returns string Returns a greeting message
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static appControllerGetHello() {
|
|
10
|
+
return __request(OpenAPI, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/api/v1',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AuthJourneyResponseDto } from '../models/AuthJourneyResponseDto.js';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
3
|
+
export declare class AuthorizationJourneysService {
|
|
4
|
+
/**
|
|
5
|
+
* Get authorization journeys for an MCP server (debug/monitoring)
|
|
6
|
+
* @param serverId Server UUID
|
|
7
|
+
* @returns AuthJourneyResponseDto List of authorization journeys
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static authJourneysControllerGetAuthJourneys(serverId: string): CancelablePromise<Array<AuthJourneyResponseDto>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class AuthorizationJourneysService {
|
|
4
|
+
/**
|
|
5
|
+
* Get authorization journeys for an MCP server (debug/monitoring)
|
|
6
|
+
* @param serverId Server UUID
|
|
7
|
+
* @returns AuthJourneyResponseDto List of authorization journeys
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static authJourneysControllerGetAuthJourneys(serverId) {
|
|
11
|
+
return __request(OpenAPI, {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
url: '/api/v1/auth-journeys/servers/{serverId}',
|
|
14
|
+
path: {
|
|
15
|
+
'serverId': serverId,
|
|
16
|
+
},
|
|
17
|
+
errors: {
|
|
18
|
+
404: `Server not found`,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import type { ClientRegistrationResponseDto } from '../models/ClientRegistrationResponseDto.js';
|
|
2
|
+
import type { ConsentDecisionDto } from '../models/ConsentDecisionDto.js';
|
|
3
|
+
import type { GetConsentMetadataResponseDto } from '../models/GetConsentMetadataResponseDto.js';
|
|
4
|
+
import type { IntrospectTokenRequestDto } from '../models/IntrospectTokenRequestDto.js';
|
|
5
|
+
import type { IntrospectTokenResponseDto } from '../models/IntrospectTokenResponseDto.js';
|
|
6
|
+
import type { RegisterClientDto } from '../models/RegisterClientDto.js';
|
|
7
|
+
import type { ScopesResponseDto } from '../models/ScopesResponseDto.js';
|
|
8
|
+
import type { TokenExchangeRequestDto } from '../models/TokenExchangeRequestDto.js';
|
|
9
|
+
import type { TokenExchangeResponseDto } from '../models/TokenExchangeResponseDto.js';
|
|
10
|
+
import type { TokenRequestDto } from '../models/TokenRequestDto.js';
|
|
11
|
+
import type { TokenResponseDto } from '../models/TokenResponseDto.js';
|
|
12
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
13
|
+
export declare class AuthorizationServerService {
|
|
14
|
+
/**
|
|
15
|
+
* Register a new OAuth 2.0 client (Dynamic Client Registration)
|
|
16
|
+
* Implements RFC 7591 Dynamic Client Registration for OAuth 2.0. Validates client metadata, generates credentials, and persists the client configuration. Requires authorization_code and refresh_token grant types with PKCE support per MCP specification.
|
|
17
|
+
* @param serverId
|
|
18
|
+
* @param version
|
|
19
|
+
* @param requestBody
|
|
20
|
+
* @returns ClientRegistrationResponseDto Client registered successfully with generated credentials
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
static clientRegistrationControllerRegisterClient(serverId: string, version: string, requestBody: RegisterClientDto): CancelablePromise<ClientRegistrationResponseDto>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve client registration information
|
|
26
|
+
* Returns the registration metadata for a client. The client_secret is NOT included in the response for security reasons.
|
|
27
|
+
* @param clientId
|
|
28
|
+
* @returns ClientRegistrationResponseDto Client registration information retrieved successfully
|
|
29
|
+
* @throws ApiError
|
|
30
|
+
*/
|
|
31
|
+
static clientRegistrationControllerGetClient(clientId: string): CancelablePromise<ClientRegistrationResponseDto>;
|
|
32
|
+
/**
|
|
33
|
+
* List all registered clients (Admin)
|
|
34
|
+
* Returns a list of all registered OAuth clients. Intended for administrative purposes. Client secrets are not included.
|
|
35
|
+
* @returns ClientRegistrationResponseDto List of registered clients
|
|
36
|
+
* @throws ApiError
|
|
37
|
+
*/
|
|
38
|
+
static clientRegistrationControllerListClients(): CancelablePromise<Array<ClientRegistrationResponseDto>>;
|
|
39
|
+
/**
|
|
40
|
+
* OAuth 2.0 Authorization Endpoint
|
|
41
|
+
* Handles authorization requests from MCP clients. Validates the request, stores PKCE parameters, and redirects to the consent screen UI.
|
|
42
|
+
* @param responseType OAuth 2.0 response type (must be "code" for authorization code flow)
|
|
43
|
+
* @param clientId Client identifier issued during registration
|
|
44
|
+
* @param codeChallenge PKCE code challenge derived from the code verifier
|
|
45
|
+
* @param codeChallengeMethod PKCE code challenge method (S256 for SHA-256)
|
|
46
|
+
* @param redirectUri Redirect URI where the authorization response will be sent
|
|
47
|
+
* @param state Opaque state value for CSRF protection
|
|
48
|
+
* @param resource Resource server URL that the client wants to access
|
|
49
|
+
* @param serverIdentifier
|
|
50
|
+
* @param version
|
|
51
|
+
* @param scope Space-delimited list of scopes being requested
|
|
52
|
+
* @returns void
|
|
53
|
+
* @throws ApiError
|
|
54
|
+
*/
|
|
55
|
+
static authorizationControllerAuthorize(responseType: 'code', clientId: string, codeChallenge: string, codeChallengeMethod: string, redirectUri: string, state: string, resource: string, serverIdentifier: string, version: string, scope?: string): CancelablePromise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* OAuth 2.0 Authorization Consent Handler
|
|
58
|
+
* Handles user consent decision. Validates the flow ID (CSRF token), generates an authorization code if approved, and redirects back to the client with the code or error.
|
|
59
|
+
* @param serverIdentifier
|
|
60
|
+
* @param version
|
|
61
|
+
* @param requestBody
|
|
62
|
+
* @returns void
|
|
63
|
+
* @throws ApiError
|
|
64
|
+
*/
|
|
65
|
+
static authorizationControllerAuthorizeConsent(serverIdentifier: string, version: string, requestBody: ConsentDecisionDto): CancelablePromise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Get metadata for the consent screen from flow ID
|
|
68
|
+
* Retrieves authorization flow details for the consent screen
|
|
69
|
+
* @param flowId Unique identifier of the authorization flow
|
|
70
|
+
* @returns GetConsentMetadataResponseDto Consent metadata retrieved successfully
|
|
71
|
+
* @throws ApiError
|
|
72
|
+
*/
|
|
73
|
+
static authorizationControllerGetConsentMetadata(flowId: string): CancelablePromise<GetConsentMetadataResponseDto>;
|
|
74
|
+
/**
|
|
75
|
+
* OAuth 2.0 Token Endpoint
|
|
76
|
+
* Exchanges authorization code for access token. Validates PKCE code_verifier, issues signed JWT access token and refresh token.
|
|
77
|
+
* @param serverIdentifier
|
|
78
|
+
* @param version
|
|
79
|
+
* @param requestBody
|
|
80
|
+
* @returns TokenResponseDto Access token issued successfully
|
|
81
|
+
* @throws ApiError
|
|
82
|
+
*/
|
|
83
|
+
static authorizationControllerToken(serverIdentifier: string, version: string, requestBody: TokenRequestDto): CancelablePromise<TokenResponseDto>;
|
|
84
|
+
/**
|
|
85
|
+
* OAuth 2.0 Token Introspection Endpoint
|
|
86
|
+
* Introspects an access token to validate it and retrieve its metadata. Verifies JWT signature, expiration, and claims according to RFC 7662.
|
|
87
|
+
* @param serverIdentifier
|
|
88
|
+
* @param version
|
|
89
|
+
* @param requestBody
|
|
90
|
+
* @returns IntrospectTokenResponseDto Token introspection response (active true/false with metadata)
|
|
91
|
+
* @throws ApiError
|
|
92
|
+
*/
|
|
93
|
+
static authorizationControllerIntrospect(serverIdentifier: string, version: string, requestBody: IntrospectTokenRequestDto): CancelablePromise<IntrospectTokenResponseDto>;
|
|
94
|
+
/**
|
|
95
|
+
* RFC 8693 Token Exchange Endpoint
|
|
96
|
+
* Exchanges MCP JWT access token for downstream system tokens. Validates MCP token, resolves scope mappings, and returns downstream access token with automatic refresh if needed.
|
|
97
|
+
* @param serverIdentifier
|
|
98
|
+
* @param version
|
|
99
|
+
* @param requestBody
|
|
100
|
+
* @returns TokenExchangeResponseDto Token exchange successful - returns downstream access token
|
|
101
|
+
* @throws ApiError
|
|
102
|
+
*/
|
|
103
|
+
static authorizationControllerTokenExchange(serverIdentifier: string, version: string, requestBody: TokenExchangeRequestDto): CancelablePromise<TokenExchangeResponseDto>;
|
|
104
|
+
/**
|
|
105
|
+
* OAuth 2.0 Callback Endpoint for Downstream Systems
|
|
106
|
+
* Handles callbacks from downstream OAuth providers. Validates the state, exchanges authorization code for tokens, and continues the auth flow.
|
|
107
|
+
* @param code Authorization code from downstream OAuth provider
|
|
108
|
+
* @param state State parameter that identifies the connection flow
|
|
109
|
+
* @param error Error code if authorization failed
|
|
110
|
+
* @param scope Space-delimited list of scopes that were granted
|
|
111
|
+
* @param errorDescription Error description if authorization failed
|
|
112
|
+
* @returns void
|
|
113
|
+
* @throws ApiError
|
|
114
|
+
*/
|
|
115
|
+
static authorizationControllerCallback(code: string, state: string, error?: string, scope?: string, errorDescription?: string): CancelablePromise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* List All Available Scopes
|
|
118
|
+
* Returns a list of all scopes available in the system. Each scope includes its identifier string and a human-readable description.
|
|
119
|
+
* @returns ScopesResponseDto List of all available scopes
|
|
120
|
+
* @throws ApiError
|
|
121
|
+
*/
|
|
122
|
+
static authorizationControllerGetScopes(): CancelablePromise<ScopesResponseDto>;
|
|
123
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class AuthorizationServerService {
|
|
4
|
+
/**
|
|
5
|
+
* Register a new OAuth 2.0 client (Dynamic Client Registration)
|
|
6
|
+
* Implements RFC 7591 Dynamic Client Registration for OAuth 2.0. Validates client metadata, generates credentials, and persists the client configuration. Requires authorization_code and refresh_token grant types with PKCE support per MCP specification.
|
|
7
|
+
* @param serverId
|
|
8
|
+
* @param version
|
|
9
|
+
* @param requestBody
|
|
10
|
+
* @returns ClientRegistrationResponseDto Client registered successfully with generated credentials
|
|
11
|
+
* @throws ApiError
|
|
12
|
+
*/
|
|
13
|
+
static clientRegistrationControllerRegisterClient(serverId, version, requestBody) {
|
|
14
|
+
return __request(OpenAPI, {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
url: '/api/v1/auth/clients/register/mcp/{serverId}/{version}',
|
|
17
|
+
path: {
|
|
18
|
+
'serverId': serverId,
|
|
19
|
+
'version': version,
|
|
20
|
+
},
|
|
21
|
+
body: requestBody,
|
|
22
|
+
mediaType: 'application/json',
|
|
23
|
+
errors: {
|
|
24
|
+
400: `Invalid client metadata (missing fields, invalid redirect URIs, unsupported grant types, or PKCE not configured)`,
|
|
25
|
+
409: `A client with this name is already registered`,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve client registration information
|
|
31
|
+
* Returns the registration metadata for a client. The client_secret is NOT included in the response for security reasons.
|
|
32
|
+
* @param clientId
|
|
33
|
+
* @returns ClientRegistrationResponseDto Client registration information retrieved successfully
|
|
34
|
+
* @throws ApiError
|
|
35
|
+
*/
|
|
36
|
+
static clientRegistrationControllerGetClient(clientId) {
|
|
37
|
+
return __request(OpenAPI, {
|
|
38
|
+
method: 'GET',
|
|
39
|
+
url: '/api/v1/auth/clients/{clientId}',
|
|
40
|
+
path: {
|
|
41
|
+
'clientId': clientId,
|
|
42
|
+
},
|
|
43
|
+
errors: {
|
|
44
|
+
404: `Client not found`,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* List all registered clients (Admin)
|
|
50
|
+
* Returns a list of all registered OAuth clients. Intended for administrative purposes. Client secrets are not included.
|
|
51
|
+
* @returns ClientRegistrationResponseDto List of registered clients
|
|
52
|
+
* @throws ApiError
|
|
53
|
+
*/
|
|
54
|
+
static clientRegistrationControllerListClients() {
|
|
55
|
+
return __request(OpenAPI, {
|
|
56
|
+
method: 'GET',
|
|
57
|
+
url: '/api/v1/auth/clients',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* OAuth 2.0 Authorization Endpoint
|
|
62
|
+
* Handles authorization requests from MCP clients. Validates the request, stores PKCE parameters, and redirects to the consent screen UI.
|
|
63
|
+
* @param responseType OAuth 2.0 response type (must be "code" for authorization code flow)
|
|
64
|
+
* @param clientId Client identifier issued during registration
|
|
65
|
+
* @param codeChallenge PKCE code challenge derived from the code verifier
|
|
66
|
+
* @param codeChallengeMethod PKCE code challenge method (S256 for SHA-256)
|
|
67
|
+
* @param redirectUri Redirect URI where the authorization response will be sent
|
|
68
|
+
* @param state Opaque state value for CSRF protection
|
|
69
|
+
* @param resource Resource server URL that the client wants to access
|
|
70
|
+
* @param serverIdentifier
|
|
71
|
+
* @param version
|
|
72
|
+
* @param scope Space-delimited list of scopes being requested
|
|
73
|
+
* @returns void
|
|
74
|
+
* @throws ApiError
|
|
75
|
+
*/
|
|
76
|
+
static authorizationControllerAuthorize(responseType, clientId, codeChallenge, codeChallengeMethod, redirectUri, state, resource, serverIdentifier, version, scope) {
|
|
77
|
+
return __request(OpenAPI, {
|
|
78
|
+
method: 'GET',
|
|
79
|
+
url: '/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}',
|
|
80
|
+
path: {
|
|
81
|
+
'serverIdentifier': serverIdentifier,
|
|
82
|
+
'version': version,
|
|
83
|
+
},
|
|
84
|
+
query: {
|
|
85
|
+
'response_type': responseType,
|
|
86
|
+
'scope': scope,
|
|
87
|
+
'client_id': clientId,
|
|
88
|
+
'code_challenge': codeChallenge,
|
|
89
|
+
'code_challenge_method': codeChallengeMethod,
|
|
90
|
+
'redirect_uri': redirectUri,
|
|
91
|
+
'state': state,
|
|
92
|
+
'resource': resource,
|
|
93
|
+
},
|
|
94
|
+
errors: {
|
|
95
|
+
302: `Redirects to consent screen with authorization request ID`,
|
|
96
|
+
400: `Invalid authorization request parameters`,
|
|
97
|
+
404: `MCP server or client not found`,
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* OAuth 2.0 Authorization Consent Handler
|
|
103
|
+
* Handles user consent decision. Validates the flow ID (CSRF token), generates an authorization code if approved, and redirects back to the client with the code or error.
|
|
104
|
+
* @param serverIdentifier
|
|
105
|
+
* @param version
|
|
106
|
+
* @param requestBody
|
|
107
|
+
* @returns void
|
|
108
|
+
* @throws ApiError
|
|
109
|
+
*/
|
|
110
|
+
static authorizationControllerAuthorizeConsent(serverIdentifier, version, requestBody) {
|
|
111
|
+
return __request(OpenAPI, {
|
|
112
|
+
method: 'POST',
|
|
113
|
+
url: '/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}',
|
|
114
|
+
path: {
|
|
115
|
+
'serverIdentifier': serverIdentifier,
|
|
116
|
+
'version': version,
|
|
117
|
+
},
|
|
118
|
+
body: requestBody,
|
|
119
|
+
mediaType: 'application/json',
|
|
120
|
+
errors: {
|
|
121
|
+
302: `Redirects to client redirect_uri with authorization code or error`,
|
|
122
|
+
400: `Invalid consent decision or flow state`,
|
|
123
|
+
401: `Authorization flow has already been used`,
|
|
124
|
+
404: `Authorization flow not found`,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get metadata for the consent screen from flow ID
|
|
130
|
+
* Retrieves authorization flow details for the consent screen
|
|
131
|
+
* @param flowId Unique identifier of the authorization flow
|
|
132
|
+
* @returns GetConsentMetadataResponseDto Consent metadata retrieved successfully
|
|
133
|
+
* @throws ApiError
|
|
134
|
+
*/
|
|
135
|
+
static authorizationControllerGetConsentMetadata(flowId) {
|
|
136
|
+
return __request(OpenAPI, {
|
|
137
|
+
method: 'GET',
|
|
138
|
+
url: '/api/v1/auth/consent/{flowId}',
|
|
139
|
+
path: {
|
|
140
|
+
'flowId': flowId,
|
|
141
|
+
},
|
|
142
|
+
errors: {
|
|
143
|
+
401: `Authentication required to access consent metadata`,
|
|
144
|
+
404: `Authorization flow not found`,
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* OAuth 2.0 Token Endpoint
|
|
150
|
+
* Exchanges authorization code for access token. Validates PKCE code_verifier, issues signed JWT access token and refresh token.
|
|
151
|
+
* @param serverIdentifier
|
|
152
|
+
* @param version
|
|
153
|
+
* @param requestBody
|
|
154
|
+
* @returns TokenResponseDto Access token issued successfully
|
|
155
|
+
* @throws ApiError
|
|
156
|
+
*/
|
|
157
|
+
static authorizationControllerToken(serverIdentifier, version, requestBody) {
|
|
158
|
+
return __request(OpenAPI, {
|
|
159
|
+
method: 'POST',
|
|
160
|
+
url: '/api/v1/auth/token/mcp/{serverIdentifier}/{version}',
|
|
161
|
+
path: {
|
|
162
|
+
'serverIdentifier': serverIdentifier,
|
|
163
|
+
'version': version,
|
|
164
|
+
},
|
|
165
|
+
body: requestBody,
|
|
166
|
+
mediaType: 'application/json',
|
|
167
|
+
errors: {
|
|
168
|
+
400: `Invalid token request parameters`,
|
|
169
|
+
401: `Invalid authorization code, code_verifier, or expired code`,
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* OAuth 2.0 Token Introspection Endpoint
|
|
175
|
+
* Introspects an access token to validate it and retrieve its metadata. Verifies JWT signature, expiration, and claims according to RFC 7662.
|
|
176
|
+
* @param serverIdentifier
|
|
177
|
+
* @param version
|
|
178
|
+
* @param requestBody
|
|
179
|
+
* @returns IntrospectTokenResponseDto Token introspection response (active true/false with metadata)
|
|
180
|
+
* @throws ApiError
|
|
181
|
+
*/
|
|
182
|
+
static authorizationControllerIntrospect(serverIdentifier, version, requestBody) {
|
|
183
|
+
return __request(OpenAPI, {
|
|
184
|
+
method: 'POST',
|
|
185
|
+
url: '/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}',
|
|
186
|
+
path: {
|
|
187
|
+
'serverIdentifier': serverIdentifier,
|
|
188
|
+
'version': version,
|
|
189
|
+
},
|
|
190
|
+
body: requestBody,
|
|
191
|
+
mediaType: 'application/json',
|
|
192
|
+
errors: {
|
|
193
|
+
400: `Invalid introspection request parameters`,
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* RFC 8693 Token Exchange Endpoint
|
|
199
|
+
* Exchanges MCP JWT access token for downstream system tokens. Validates MCP token, resolves scope mappings, and returns downstream access token with automatic refresh if needed.
|
|
200
|
+
* @param serverIdentifier
|
|
201
|
+
* @param version
|
|
202
|
+
* @param requestBody
|
|
203
|
+
* @returns TokenExchangeResponseDto Token exchange successful - returns downstream access token
|
|
204
|
+
* @throws ApiError
|
|
205
|
+
*/
|
|
206
|
+
static authorizationControllerTokenExchange(serverIdentifier, version, requestBody) {
|
|
207
|
+
return __request(OpenAPI, {
|
|
208
|
+
method: 'POST',
|
|
209
|
+
url: '/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}',
|
|
210
|
+
path: {
|
|
211
|
+
'serverIdentifier': serverIdentifier,
|
|
212
|
+
'version': version,
|
|
213
|
+
},
|
|
214
|
+
body: requestBody,
|
|
215
|
+
mediaType: 'application/json',
|
|
216
|
+
errors: {
|
|
217
|
+
400: `Invalid token exchange request parameters`,
|
|
218
|
+
401: `Invalid or expired MCP JWT`,
|
|
219
|
+
403: `Insufficient scope - requested scope not entitled`,
|
|
220
|
+
404: `Connection not found`,
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* OAuth 2.0 Callback Endpoint for Downstream Systems
|
|
226
|
+
* Handles callbacks from downstream OAuth providers. Validates the state, exchanges authorization code for tokens, and continues the auth flow.
|
|
227
|
+
* @param code Authorization code from downstream OAuth provider
|
|
228
|
+
* @param state State parameter that identifies the connection flow
|
|
229
|
+
* @param error Error code if authorization failed
|
|
230
|
+
* @param scope Space-delimited list of scopes that were granted
|
|
231
|
+
* @param errorDescription Error description if authorization failed
|
|
232
|
+
* @returns void
|
|
233
|
+
* @throws ApiError
|
|
234
|
+
*/
|
|
235
|
+
static authorizationControllerCallback(code, state, error, scope, errorDescription) {
|
|
236
|
+
return __request(OpenAPI, {
|
|
237
|
+
method: 'GET',
|
|
238
|
+
url: '/api/v1/auth/callback',
|
|
239
|
+
query: {
|
|
240
|
+
'code': code,
|
|
241
|
+
'state': state,
|
|
242
|
+
'error': error,
|
|
243
|
+
'scope': scope,
|
|
244
|
+
'error_description': errorDescription,
|
|
245
|
+
},
|
|
246
|
+
errors: {
|
|
247
|
+
302: `Redirects to next step in the authorization flow`,
|
|
248
|
+
400: `Invalid callback parameters or state`,
|
|
249
|
+
404: `Connection flow not found for provided state`,
|
|
250
|
+
},
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* List All Available Scopes
|
|
255
|
+
* Returns a list of all scopes available in the system. Each scope includes its identifier string and a human-readable description.
|
|
256
|
+
* @returns ScopesResponseDto List of all available scopes
|
|
257
|
+
* @throws ApiError
|
|
258
|
+
*/
|
|
259
|
+
static authorizationControllerGetScopes() {
|
|
260
|
+
return __request(OpenAPI, {
|
|
261
|
+
method: 'GET',
|
|
262
|
+
url: '/api/v1/auth/scopes',
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|