@taico/client 0.2.8 → 0.2.11
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 +383 -3
- package/dist/src/v1/client/index.d.ts +9 -0
- package/dist/src/v1/client/index.js +5 -0
- package/dist/src/v1/client/models/AgentTemplateCatalogResponseDto.d.ts +6 -0
- package/dist/src/v1/client/models/AgentTemplateCatalogResponseDto.js +1 -0
- package/dist/src/v1/client/models/AgentTemplateDto.d.ts +63 -0
- package/dist/src/v1/client/models/AgentTemplateDto.js +15 -0
- package/dist/src/v1/client/models/AgentTemplateHarnessDto.d.ts +29 -0
- package/dist/src/v1/client/models/AgentTemplateHarnessDto.js +15 -0
- package/dist/src/v1/client/models/AgentTemplateModelOptionDto.d.ts +22 -0
- package/dist/src/v1/client/models/AgentTemplateModelOptionDto.js +1 -0
- package/dist/src/v1/client/models/ImportBlocksResponseDto.d.ts +6 -0
- package/dist/src/v1/client/models/ImportBlocksResponseDto.js +1 -0
- package/dist/src/v1/client/models/UserResponseDto.d.ts +10 -2
- package/dist/src/v1/client/models/UserResponseDto.js +9 -0
- package/dist/src/v1/client/models/UserWalkthroughStatusResponseDto.d.ts +18 -0
- package/dist/src/v1/client/models/UserWalkthroughStatusResponseDto.js +9 -0
- package/dist/src/v1/client/models/WorkerResponseDto.d.ts +8 -0
- package/dist/src/v1/client/models/WorkerResponseDto.js +1 -0
- package/dist/src/v1/client/services/AgentService.d.ts +7 -0
- package/dist/src/v1/client/services/AgentService.js +11 -0
- package/dist/src/v1/client/services/ContextService.d.ts +19 -0
- package/dist/src/v1/client/services/ContextService.js +28 -0
- package/dist/src/v1/client/services/WalkthroughService.d.ts +17 -0
- package/dist/src/v1/client/services/WalkthroughService.js +26 -0
- package/dist/src/v1/client/services/WorkersService.d.ts +11 -0
- package/dist/src/v1/client/services/WorkersService.js +15 -0
- package/dist/src/v2/agent-resource.d.ts +5 -1
- package/dist/src/v2/agent-resource.js +6 -2
- package/dist/src/v2/authorization-server-resource.js +3 -3
- package/dist/src/v2/base-client.d.ts +4 -0
- package/dist/src/v2/base-client.js +51 -7
- package/dist/src/v2/chat-providers-resource.js +2 -2
- package/dist/src/v2/client.d.ts +4 -0
- package/dist/src/v2/client.js +6 -0
- package/dist/src/v2/context-resource.d.ts +10 -1
- package/dist/src/v2/context-resource.js +16 -8
- package/dist/src/v2/executions-resource.js +2 -2
- package/dist/src/v2/meta---projects-resource.js +1 -1
- package/dist/src/v2/meta-resource.js +1 -1
- package/dist/src/v2/scheduled-tasks-resource.js +1 -1
- package/dist/src/v2/secrets-resource.js +1 -1
- package/dist/src/v2/task-blueprints-resource.js +1 -1
- package/dist/src/v2/task-resource.js +8 -8
- package/dist/src/v2/threads-resource.js +1 -1
- package/dist/src/v2/types.d.ts +54 -1
- package/dist/src/v2/walkthrough-resource.d.ts +13 -0
- package/dist/src/v2/walkthrough-resource.js +14 -0
- package/dist/src/v2/workers-resource.d.ts +9 -0
- package/dist/src/v2/workers-resource.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -20,9 +20,9 @@ export type UserResponseDto = {
|
|
|
20
20
|
*/
|
|
21
21
|
actorId: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* How onboarding UI should be shown for this user (full page, banner, or off)
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
onboardingDisplayMode: UserResponseDto.onboardingDisplayMode;
|
|
26
26
|
};
|
|
27
27
|
export declare namespace UserResponseDto {
|
|
28
28
|
/**
|
|
@@ -32,4 +32,12 @@ export declare namespace UserResponseDto {
|
|
|
32
32
|
ADMIN = "admin",
|
|
33
33
|
STANDARD = "standard"
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* How onboarding UI should be shown for this user (full page, banner, or off)
|
|
37
|
+
*/
|
|
38
|
+
enum onboardingDisplayMode {
|
|
39
|
+
FULL_PAGE = "FULL_PAGE",
|
|
40
|
+
BANNER = "BANNER",
|
|
41
|
+
OFF = "OFF"
|
|
42
|
+
}
|
|
35
43
|
}
|
|
@@ -8,4 +8,13 @@ export var UserResponseDto;
|
|
|
8
8
|
role["ADMIN"] = "admin";
|
|
9
9
|
role["STANDARD"] = "standard";
|
|
10
10
|
})(role = UserResponseDto.role || (UserResponseDto.role = {}));
|
|
11
|
+
/**
|
|
12
|
+
* How onboarding UI should be shown for this user (full page, banner, or off)
|
|
13
|
+
*/
|
|
14
|
+
let onboardingDisplayMode;
|
|
15
|
+
(function (onboardingDisplayMode) {
|
|
16
|
+
onboardingDisplayMode["FULL_PAGE"] = "FULL_PAGE";
|
|
17
|
+
onboardingDisplayMode["BANNER"] = "BANNER";
|
|
18
|
+
onboardingDisplayMode["OFF"] = "OFF";
|
|
19
|
+
})(onboardingDisplayMode = UserResponseDto.onboardingDisplayMode || (UserResponseDto.onboardingDisplayMode = {}));
|
|
11
20
|
})(UserResponseDto || (UserResponseDto = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type UserWalkthroughStatusResponseDto = {
|
|
2
|
+
workerConfigured: boolean;
|
|
3
|
+
agentCreated: boolean;
|
|
4
|
+
taskCreated: boolean;
|
|
5
|
+
projectCreated: boolean;
|
|
6
|
+
projectConfigured: boolean;
|
|
7
|
+
contextBlockCreated: boolean;
|
|
8
|
+
threadConfigured: boolean;
|
|
9
|
+
taskWithProjectCreated: boolean;
|
|
10
|
+
onboardingDisplayMode: UserWalkthroughStatusResponseDto.onboardingDisplayMode;
|
|
11
|
+
};
|
|
12
|
+
export declare namespace UserWalkthroughStatusResponseDto {
|
|
13
|
+
enum onboardingDisplayMode {
|
|
14
|
+
FULL_PAGE = "FULL_PAGE",
|
|
15
|
+
BANNER = "BANNER",
|
|
16
|
+
OFF = "OFF"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var UserWalkthroughStatusResponseDto;
|
|
2
|
+
(function (UserWalkthroughStatusResponseDto) {
|
|
3
|
+
let onboardingDisplayMode;
|
|
4
|
+
(function (onboardingDisplayMode) {
|
|
5
|
+
onboardingDisplayMode["FULL_PAGE"] = "FULL_PAGE";
|
|
6
|
+
onboardingDisplayMode["BANNER"] = "BANNER";
|
|
7
|
+
onboardingDisplayMode["OFF"] = "OFF";
|
|
8
|
+
})(onboardingDisplayMode = UserWalkthroughStatusResponseDto.onboardingDisplayMode || (UserWalkthroughStatusResponseDto.onboardingDisplayMode = {}));
|
|
9
|
+
})(UserWalkthroughStatusResponseDto || (UserWalkthroughStatusResponseDto = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentListResponseDto } from '../models/AgentListResponseDto.js';
|
|
2
2
|
import type { AgentResponseDto } from '../models/AgentResponseDto.js';
|
|
3
|
+
import type { AgentTemplateCatalogResponseDto } from '../models/AgentTemplateCatalogResponseDto.js';
|
|
3
4
|
import type { AgentToolPermissionResponseDto } from '../models/AgentToolPermissionResponseDto.js';
|
|
4
5
|
import type { CreateAgentDto } from '../models/CreateAgentDto.js';
|
|
5
6
|
import type { PatchAgentDto } from '../models/PatchAgentDto.js';
|
|
@@ -23,6 +24,12 @@ export declare class AgentService {
|
|
|
23
24
|
* @throws ApiError
|
|
24
25
|
*/
|
|
25
26
|
static agentsControllerListAgents(isActive?: boolean, page?: number, limit?: number, config?: OpenAPIConfig): CancelablePromise<AgentListResponseDto>;
|
|
27
|
+
/**
|
|
28
|
+
* List available agent creation templates
|
|
29
|
+
* @returns AgentTemplateCatalogResponseDto
|
|
30
|
+
* @throws ApiError
|
|
31
|
+
*/
|
|
32
|
+
static agentsControllerListAgentTemplates(config?: OpenAPIConfig): CancelablePromise<AgentTemplateCatalogResponseDto>;
|
|
26
33
|
/**
|
|
27
34
|
* Get an agent by slug
|
|
28
35
|
* @param slug Agent slug
|
|
@@ -34,6 +34,17 @@ export class AgentService {
|
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* List available agent creation templates
|
|
39
|
+
* @returns AgentTemplateCatalogResponseDto
|
|
40
|
+
* @throws ApiError
|
|
41
|
+
*/
|
|
42
|
+
static agentsControllerListAgentTemplates(config = OpenAPI) {
|
|
43
|
+
return __request(config, {
|
|
44
|
+
method: 'GET',
|
|
45
|
+
url: '/api/v1/agents/templates',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
37
48
|
/**
|
|
38
49
|
* Get an agent by slug
|
|
39
50
|
* @param slug Agent slug
|
|
@@ -5,6 +5,7 @@ import type { BlockSearchResultDto } from '../models/BlockSearchResultDto.js';
|
|
|
5
5
|
import type { BlockTreeResponseDto } from '../models/BlockTreeResponseDto.js';
|
|
6
6
|
import type { CreateBlockDto } from '../models/CreateBlockDto.js';
|
|
7
7
|
import type { CreateTagDto } from '../models/CreateTagDto.js';
|
|
8
|
+
import type { ImportBlocksResponseDto } from '../models/ImportBlocksResponseDto.js';
|
|
8
9
|
import type { MoveBlockDto } from '../models/MoveBlockDto.js';
|
|
9
10
|
import type { ReorderBlockDto } from '../models/ReorderBlockDto.js';
|
|
10
11
|
import type { UpdateBlockDto } from '../models/UpdateBlockDto.js';
|
|
@@ -40,6 +41,24 @@ export declare class ContextService {
|
|
|
40
41
|
* @throws ApiError
|
|
41
42
|
*/
|
|
42
43
|
static contextControllerGetBlockTree(config?: OpenAPIConfig): CancelablePromise<Array<BlockTreeResponseDto>>;
|
|
44
|
+
/**
|
|
45
|
+
* Export all context blocks as markdown zip
|
|
46
|
+
* @returns binary Context blocks archive downloaded successfully
|
|
47
|
+
* @throws ApiError
|
|
48
|
+
*/
|
|
49
|
+
static contextControllerExportBlocks(config?: OpenAPIConfig): CancelablePromise<Blob>;
|
|
50
|
+
/**
|
|
51
|
+
* Import context blocks from markdown zip
|
|
52
|
+
* @param formData
|
|
53
|
+
* @returns ImportBlocksResponseDto Context blocks imported successfully
|
|
54
|
+
* @throws ApiError
|
|
55
|
+
*/
|
|
56
|
+
static contextControllerImportBlocks(formData: {
|
|
57
|
+
/**
|
|
58
|
+
* Zip file exported from context blocks
|
|
59
|
+
*/
|
|
60
|
+
file: Blob;
|
|
61
|
+
}, config?: OpenAPIConfig): CancelablePromise<ImportBlocksResponseDto>;
|
|
43
62
|
/**
|
|
44
63
|
* Fetch a wiki page by ID
|
|
45
64
|
* @param id Context block identifier
|
|
@@ -63,6 +63,34 @@ export class ContextService {
|
|
|
63
63
|
url: '/api/v1/context/blocks/tree',
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Export all context blocks as markdown zip
|
|
68
|
+
* @returns binary Context blocks archive downloaded successfully
|
|
69
|
+
* @throws ApiError
|
|
70
|
+
*/
|
|
71
|
+
static contextControllerExportBlocks(config = OpenAPI) {
|
|
72
|
+
return __request(config, {
|
|
73
|
+
method: 'GET',
|
|
74
|
+
url: '/api/v1/context/blocks/export',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Import context blocks from markdown zip
|
|
79
|
+
* @param formData
|
|
80
|
+
* @returns ImportBlocksResponseDto Context blocks imported successfully
|
|
81
|
+
* @throws ApiError
|
|
82
|
+
*/
|
|
83
|
+
static contextControllerImportBlocks(formData, config = OpenAPI) {
|
|
84
|
+
return __request(config, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
url: '/api/v1/context/blocks/import',
|
|
87
|
+
formData: formData,
|
|
88
|
+
mediaType: 'multipart/form-data',
|
|
89
|
+
errors: {
|
|
90
|
+
400: `No archive file uploaded or invalid file type`,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
}
|
|
66
94
|
/**
|
|
67
95
|
* Fetch a wiki page by ID
|
|
68
96
|
* @param id Context block identifier
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { UserWalkthroughStatusResponseDto } from '../models/UserWalkthroughStatusResponseDto.js';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
3
|
+
import type { OpenAPIConfig } from '../core/OpenAPI.js';
|
|
4
|
+
export declare class WalkthroughService {
|
|
5
|
+
/**
|
|
6
|
+
* Acknowledge walkthrough — transitions FULL_PAGE display mode to BANNER
|
|
7
|
+
* @returns any Acknowledged
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static walkthroughControllerAcknowledge(config?: OpenAPIConfig): CancelablePromise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* Get walkthrough status for the current user
|
|
13
|
+
* @returns UserWalkthroughStatusResponseDto Current walkthrough progress and display mode
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
static walkthroughControllerGetStatus(config?: OpenAPIConfig): CancelablePromise<UserWalkthroughStatusResponseDto>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class WalkthroughService {
|
|
4
|
+
/**
|
|
5
|
+
* Acknowledge walkthrough — transitions FULL_PAGE display mode to BANNER
|
|
6
|
+
* @returns any Acknowledged
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static walkthroughControllerAcknowledge(config = OpenAPI) {
|
|
10
|
+
return __request(config, {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
url: '/api/v1/walkthrough/acknowledge',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get walkthrough status for the current user
|
|
17
|
+
* @returns UserWalkthroughStatusResponseDto Current walkthrough progress and display mode
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
static walkthroughControllerGetStatus(config = OpenAPI) {
|
|
21
|
+
return __request(config, {
|
|
22
|
+
method: 'GET',
|
|
23
|
+
url: '/api/v1/walkthrough/status',
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WorkerResponseDto } from '../models/WorkerResponseDto.js';
|
|
2
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
3
|
+
import type { OpenAPIConfig } from '../core/OpenAPI.js';
|
|
4
|
+
export declare class WorkersService {
|
|
5
|
+
/**
|
|
6
|
+
* List all workers
|
|
7
|
+
* @returns WorkerResponseDto List of all registered workers
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static workersControllerListWorkers(config?: OpenAPIConfig): CancelablePromise<Array<WorkerResponseDto>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class WorkersService {
|
|
4
|
+
/**
|
|
5
|
+
* List all workers
|
|
6
|
+
* @returns WorkerResponseDto List of all registered workers
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
static workersControllerListWorkers(config = OpenAPI) {
|
|
10
|
+
return __request(config, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
url: '/api/v1/workers',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient, ClientConfig } from './base-client.js';
|
|
2
|
-
import type { AgentListResponseDto, AgentResponseDto, AgentToolPermissionResponseDto, CreateAgentDto, PatchAgentDto, UpsertAgentToolPermissionDto } from './types.js';
|
|
2
|
+
import type { AgentListResponseDto, AgentResponseDto, AgentTemplateCatalogResponseDto, AgentToolPermissionResponseDto, CreateAgentDto, PatchAgentDto, UpsertAgentToolPermissionDto } from './types.js';
|
|
3
3
|
export declare class AgentResource extends BaseClient {
|
|
4
4
|
constructor(config: ClientConfig);
|
|
5
5
|
/** Create a new agent */
|
|
@@ -14,6 +14,10 @@ export declare class AgentResource extends BaseClient {
|
|
|
14
14
|
limit?: number;
|
|
15
15
|
signal?: AbortSignal;
|
|
16
16
|
}): Promise<AgentListResponseDto>;
|
|
17
|
+
/** List available agent creation templates */
|
|
18
|
+
AgentsController_listAgentTemplates(params?: {
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
}): Promise<AgentTemplateCatalogResponseDto>;
|
|
17
21
|
/** Get an agent by slug */
|
|
18
22
|
AgentsController_getAgentBySlug(params: {
|
|
19
23
|
slug: string;
|
|
@@ -11,6 +11,10 @@ export class AgentResource extends BaseClient {
|
|
|
11
11
|
async AgentsController_listAgents(params) {
|
|
12
12
|
return this.request('GET', '/api/v1/agents', { params: { isActive: params?.isActive, page: params?.page, limit: params?.limit }, signal: params?.signal });
|
|
13
13
|
}
|
|
14
|
+
/** List available agent creation templates */
|
|
15
|
+
async AgentsController_listAgentTemplates(params) {
|
|
16
|
+
return this.request('GET', '/api/v1/agents/templates', { signal: params?.signal });
|
|
17
|
+
}
|
|
14
18
|
/** Get an agent by slug */
|
|
15
19
|
async AgentsController_getAgentBySlug(params) {
|
|
16
20
|
return this.request('GET', `/api/v1/agents/${params.slug}`, { signal: params?.signal });
|
|
@@ -21,7 +25,7 @@ export class AgentResource extends BaseClient {
|
|
|
21
25
|
}
|
|
22
26
|
/** Delete an agent */
|
|
23
27
|
async AgentsController_deleteAgent(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/agents/${params.actorId}`, { signal: params?.signal });
|
|
28
|
+
return this.request('DELETE', `/api/v1/agents/${params.actorId}`, { responseType: 'void', signal: params?.signal });
|
|
25
29
|
}
|
|
26
30
|
/** List tool permissions for an agent */
|
|
27
31
|
async AgentToolPermissionsController_listAgentToolPermissions(params) {
|
|
@@ -33,6 +37,6 @@ export class AgentResource extends BaseClient {
|
|
|
33
37
|
}
|
|
34
38
|
/** Delete an agent tool permission assignment */
|
|
35
39
|
async AgentToolPermissionsController_deleteAgentToolPermission(params) {
|
|
36
|
-
return this.request('DELETE', `/api/v1/agents/${params.actorId}/tool-permissions/${params.serverId}`, { signal: params?.signal });
|
|
40
|
+
return this.request('DELETE', `/api/v1/agents/${params.actorId}/tool-permissions/${params.serverId}`, { responseType: 'void', signal: params?.signal });
|
|
37
41
|
}
|
|
38
42
|
}
|
|
@@ -17,11 +17,11 @@ export class AuthorizationServerResource extends BaseClient {
|
|
|
17
17
|
}
|
|
18
18
|
/** OAuth 2.0 Authorization Endpoint */
|
|
19
19
|
async AuthorizationController_authorize(params) {
|
|
20
|
-
return this.request('GET', `/api/v1/auth/authorize/mcp/${params.serverIdentifier}/${params.version}`, { params: { response_type: params.response_type, scope: params.scope, client_id: params.client_id, code_challenge: params.code_challenge, code_challenge_method: params.code_challenge_method, redirect_uri: params.redirect_uri, state: params.state, resource: params.resource }, signal: params?.signal });
|
|
20
|
+
return this.request('GET', `/api/v1/auth/authorize/mcp/${params.serverIdentifier}/${params.version}`, { params: { response_type: params.response_type, scope: params.scope, client_id: params.client_id, code_challenge: params.code_challenge, code_challenge_method: params.code_challenge_method, redirect_uri: params.redirect_uri, state: params.state, resource: params.resource }, responseType: 'void', signal: params?.signal });
|
|
21
21
|
}
|
|
22
22
|
/** OAuth 2.0 Authorization Consent Handler */
|
|
23
23
|
async AuthorizationController_authorizeConsent(params) {
|
|
24
|
-
return this.request('POST', `/api/v1/auth/authorize/mcp/${params.serverIdentifier}/${params.version}`, { body: params.body, signal: params?.signal });
|
|
24
|
+
return this.request('POST', `/api/v1/auth/authorize/mcp/${params.serverIdentifier}/${params.version}`, { body: params.body, responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** Get metadata for the consent screen from flow ID */
|
|
27
27
|
async AuthorizationController_getConsentMetadata(params) {
|
|
@@ -41,7 +41,7 @@ export class AuthorizationServerResource extends BaseClient {
|
|
|
41
41
|
}
|
|
42
42
|
/** OAuth 2.0 Callback Endpoint for Downstream Systems */
|
|
43
43
|
async AuthorizationController_callback(params) {
|
|
44
|
-
return this.request('GET', '/api/v1/auth/callback', { params: { code: params.code, state: params.state, error: params.error, scope: params.scope, error_description: params.error_description }, signal: params?.signal });
|
|
44
|
+
return this.request('GET', '/api/v1/auth/callback', { params: { code: params.code, state: params.state, error: params.error, scope: params.scope, error_description: params.error_description }, responseType: 'void', signal: params?.signal });
|
|
45
45
|
}
|
|
46
46
|
/** List All Available Scopes */
|
|
47
47
|
async AuthorizationController_getScopes(params) {
|
|
@@ -18,10 +18,14 @@ export declare class BaseClient {
|
|
|
18
18
|
protected config: ClientConfig;
|
|
19
19
|
constructor(config: ClientConfig);
|
|
20
20
|
private parseResponseBody;
|
|
21
|
+
private hasHeader;
|
|
22
|
+
private removeHeader;
|
|
21
23
|
private buildAuthHeaders;
|
|
22
24
|
protected request<T>(method: string, path: string, options?: {
|
|
23
25
|
params?: Record<string, any>;
|
|
24
26
|
body?: any;
|
|
27
|
+
bodyType?: 'json' | 'form-data' | 'raw';
|
|
28
|
+
responseType?: 'auto' | 'json' | 'text' | 'arrayBuffer' | 'void';
|
|
25
29
|
headers?: Record<string, string>;
|
|
26
30
|
signal?: AbortSignal;
|
|
27
31
|
}): Promise<T>;
|
|
@@ -41,10 +41,29 @@ export class BaseClient {
|
|
|
41
41
|
constructor(config) {
|
|
42
42
|
this.config = config;
|
|
43
43
|
}
|
|
44
|
-
async parseResponseBody(response) {
|
|
44
|
+
async parseResponseBody(response, responseType = 'auto') {
|
|
45
|
+
if (responseType === 'void') {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
45
48
|
if (response.status === 204 || response.headers.get('content-length') === '0') {
|
|
46
49
|
return undefined;
|
|
47
50
|
}
|
|
51
|
+
if (responseType === 'json') {
|
|
52
|
+
try {
|
|
53
|
+
return await response.json();
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (responseType === 'text') {
|
|
60
|
+
const text = await response.text();
|
|
61
|
+
return text.length > 0 ? text : undefined;
|
|
62
|
+
}
|
|
63
|
+
if (responseType === 'arrayBuffer') {
|
|
64
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
65
|
+
return arrayBuffer.byteLength > 0 ? arrayBuffer : undefined;
|
|
66
|
+
}
|
|
48
67
|
const contentType = response.headers.get('content-type');
|
|
49
68
|
if (contentType?.includes('application/json')) {
|
|
50
69
|
try {
|
|
@@ -57,6 +76,18 @@ export class BaseClient {
|
|
|
57
76
|
const text = await response.text();
|
|
58
77
|
return text.length > 0 ? text : undefined;
|
|
59
78
|
}
|
|
79
|
+
hasHeader(headers, headerName) {
|
|
80
|
+
const target = headerName.toLowerCase();
|
|
81
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === target);
|
|
82
|
+
}
|
|
83
|
+
removeHeader(headers, headerName) {
|
|
84
|
+
const target = headerName.toLowerCase();
|
|
85
|
+
for (const key of Object.keys(headers)) {
|
|
86
|
+
if (key.toLowerCase() === target) {
|
|
87
|
+
delete headers[key];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
60
91
|
async buildAuthHeaders() {
|
|
61
92
|
const headers = {};
|
|
62
93
|
if (this.config.getAccessToken) {
|
|
@@ -98,22 +129,35 @@ export class BaseClient {
|
|
|
98
129
|
}
|
|
99
130
|
// Add auth headers
|
|
100
131
|
Object.assign(headers, await this.buildAuthHeaders());
|
|
101
|
-
|
|
102
|
-
if (options?.body
|
|
103
|
-
|
|
132
|
+
let requestBody;
|
|
133
|
+
if (options?.body !== undefined) {
|
|
134
|
+
const bodyType = options.bodyType ?? 'json';
|
|
135
|
+
if (bodyType === 'form-data') {
|
|
136
|
+
requestBody = options.body;
|
|
137
|
+
this.removeHeader(headers, 'Content-Type');
|
|
138
|
+
}
|
|
139
|
+
else if (bodyType === 'raw') {
|
|
140
|
+
requestBody = options.body;
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
if (!this.hasHeader(headers, 'Content-Type')) {
|
|
144
|
+
headers['Content-Type'] = 'application/json';
|
|
145
|
+
}
|
|
146
|
+
requestBody = JSON.stringify(options.body);
|
|
147
|
+
}
|
|
104
148
|
}
|
|
105
149
|
const response = await fetch(url.toString(), {
|
|
106
150
|
method,
|
|
107
151
|
headers,
|
|
108
|
-
body:
|
|
152
|
+
body: requestBody,
|
|
109
153
|
signal: options?.signal,
|
|
110
154
|
credentials: this.config.credentials,
|
|
111
155
|
});
|
|
112
156
|
if (!response.ok) {
|
|
113
|
-
const errorBody = await this.parseResponseBody(response);
|
|
157
|
+
const errorBody = await this.parseResponseBody(response, 'auto');
|
|
114
158
|
throw new ApiError(response, errorBody);
|
|
115
159
|
}
|
|
116
|
-
return await this.parseResponseBody(response);
|
|
160
|
+
return await this.parseResponseBody(response, options?.responseType ?? 'auto');
|
|
117
161
|
}
|
|
118
162
|
async *streamEvents(path, options) {
|
|
119
163
|
const url = new URL(path, this.config.baseUrl);
|
|
@@ -21,7 +21,7 @@ export class ChatProvidersResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Delete a chat provider */
|
|
23
23
|
async ChatProvidersController_deleteChatProvider(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/chat-providers/${params.id}`, { signal: params?.signal });
|
|
24
|
+
return this.request('DELETE', `/api/v1/chat-providers/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** Set the active chat provider */
|
|
27
27
|
async ChatProvidersController_setActiveChatProvider(params) {
|
|
@@ -29,6 +29,6 @@ export class ChatProvidersResource extends BaseClient {
|
|
|
29
29
|
}
|
|
30
30
|
/** Deactivate the active chat provider */
|
|
31
31
|
async ChatProvidersController_deactivateActiveChatProvider(params) {
|
|
32
|
-
return this.request('POST', '/api/v1/chat-providers/deactivate', { signal: params?.signal });
|
|
32
|
+
return this.request('POST', '/api/v1/chat-providers/deactivate', { responseType: 'void', signal: params?.signal });
|
|
33
33
|
}
|
|
34
34
|
}
|
package/dist/src/v2/client.d.ts
CHANGED
|
@@ -18,10 +18,12 @@ import { ChatProvidersResource } from './chat-providers-resource.js';
|
|
|
18
18
|
import { SecretsResource } from './secrets-resource.js';
|
|
19
19
|
import { ContextResource } from './context-resource.js';
|
|
20
20
|
import { ExecutionsResource } from './executions-resource.js';
|
|
21
|
+
import { WorkersResource } from './workers-resource.js';
|
|
21
22
|
import { TaskBlueprintsResource } from './task-blueprints-resource.js';
|
|
22
23
|
import { ScheduledTasksResource } from './scheduled-tasks-resource.js';
|
|
23
24
|
import { DiscoveryResource } from './discovery-resource.js';
|
|
24
25
|
import { SearchResource } from './search-resource.js';
|
|
26
|
+
import { WalkthroughResource } from './walkthrough-resource.js';
|
|
25
27
|
export declare class ApiClient {
|
|
26
28
|
readonly app: AppResource;
|
|
27
29
|
readonly meta: MetaResource;
|
|
@@ -42,9 +44,11 @@ export declare class ApiClient {
|
|
|
42
44
|
readonly secrets: SecretsResource;
|
|
43
45
|
readonly context: ContextResource;
|
|
44
46
|
readonly executions: ExecutionsResource;
|
|
47
|
+
readonly workers: WorkersResource;
|
|
45
48
|
readonly taskBlueprints: TaskBlueprintsResource;
|
|
46
49
|
readonly scheduledTasks: ScheduledTasksResource;
|
|
47
50
|
readonly discovery: DiscoveryResource;
|
|
48
51
|
readonly search: SearchResource;
|
|
52
|
+
readonly walkthrough: WalkthroughResource;
|
|
49
53
|
constructor(config: ClientConfig);
|
|
50
54
|
}
|
package/dist/src/v2/client.js
CHANGED
|
@@ -17,10 +17,12 @@ import { ChatProvidersResource } from './chat-providers-resource.js';
|
|
|
17
17
|
import { SecretsResource } from './secrets-resource.js';
|
|
18
18
|
import { ContextResource } from './context-resource.js';
|
|
19
19
|
import { ExecutionsResource } from './executions-resource.js';
|
|
20
|
+
import { WorkersResource } from './workers-resource.js';
|
|
20
21
|
import { TaskBlueprintsResource } from './task-blueprints-resource.js';
|
|
21
22
|
import { ScheduledTasksResource } from './scheduled-tasks-resource.js';
|
|
22
23
|
import { DiscoveryResource } from './discovery-resource.js';
|
|
23
24
|
import { SearchResource } from './search-resource.js';
|
|
25
|
+
import { WalkthroughResource } from './walkthrough-resource.js';
|
|
24
26
|
export class ApiClient {
|
|
25
27
|
app;
|
|
26
28
|
meta;
|
|
@@ -41,10 +43,12 @@ export class ApiClient {
|
|
|
41
43
|
secrets;
|
|
42
44
|
context;
|
|
43
45
|
executions;
|
|
46
|
+
workers;
|
|
44
47
|
taskBlueprints;
|
|
45
48
|
scheduledTasks;
|
|
46
49
|
discovery;
|
|
47
50
|
search;
|
|
51
|
+
walkthrough;
|
|
48
52
|
constructor(config) {
|
|
49
53
|
this.app = new AppResource(config);
|
|
50
54
|
this.meta = new MetaResource(config);
|
|
@@ -65,9 +69,11 @@ export class ApiClient {
|
|
|
65
69
|
this.secrets = new SecretsResource(config);
|
|
66
70
|
this.context = new ContextResource(config);
|
|
67
71
|
this.executions = new ExecutionsResource(config);
|
|
72
|
+
this.workers = new WorkersResource(config);
|
|
68
73
|
this.taskBlueprints = new TaskBlueprintsResource(config);
|
|
69
74
|
this.scheduledTasks = new ScheduledTasksResource(config);
|
|
70
75
|
this.discovery = new DiscoveryResource(config);
|
|
71
76
|
this.search = new SearchResource(config);
|
|
77
|
+
this.walkthrough = new WalkthroughResource(config);
|
|
72
78
|
}
|
|
73
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient, ClientConfig } from './base-client.js';
|
|
2
|
-
import type { AppendBlockDto, BlockListResponseDto, BlockResponseDto, BlockSearchResultDto, BlockTreeResponseDto, CreateBlockDto, CreateTagDto, MoveBlockDto, ReorderBlockDto, UpdateBlockDto } from './types.js';
|
|
2
|
+
import type { AppendBlockDto, BlockListResponseDto, BlockResponseDto, BlockSearchResultDto, BlockTreeResponseDto, CreateBlockDto, CreateTagDto, ImportBlocksResponseDto, MoveBlockDto, ReorderBlockDto, UpdateBlockDto } from './types.js';
|
|
3
3
|
export declare class ContextResource extends BaseClient {
|
|
4
4
|
constructor(config: ClientConfig);
|
|
5
5
|
/** Create a new wiki page */
|
|
@@ -23,6 +23,15 @@ export declare class ContextResource extends BaseClient {
|
|
|
23
23
|
ContextController_getBlockTree(params?: {
|
|
24
24
|
signal?: AbortSignal;
|
|
25
25
|
}): Promise<BlockTreeResponseDto[]>;
|
|
26
|
+
/** Export all context blocks as markdown zip */
|
|
27
|
+
ContextController_exportBlocks(params?: {
|
|
28
|
+
signal?: AbortSignal;
|
|
29
|
+
}): Promise<ArrayBuffer>;
|
|
30
|
+
/** Import context blocks from markdown zip */
|
|
31
|
+
ContextController_importBlocks(params: {
|
|
32
|
+
body: FormData;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
}): Promise<ImportBlocksResponseDto>;
|
|
26
35
|
/** Fetch a wiki page by ID */
|
|
27
36
|
ContextController_getBlock(params: {
|
|
28
37
|
id: string;
|
|
@@ -19,6 +19,14 @@ export class ContextResource extends BaseClient {
|
|
|
19
19
|
async ContextController_getBlockTree(params) {
|
|
20
20
|
return this.request('GET', '/api/v1/context/blocks/tree', { signal: params?.signal });
|
|
21
21
|
}
|
|
22
|
+
/** Export all context blocks as markdown zip */
|
|
23
|
+
async ContextController_exportBlocks(params) {
|
|
24
|
+
return this.request('GET', '/api/v1/context/blocks/export', { responseType: 'arrayBuffer', signal: params?.signal });
|
|
25
|
+
}
|
|
26
|
+
/** Import context blocks from markdown zip */
|
|
27
|
+
async ContextController_importBlocks(params) {
|
|
28
|
+
return this.request('POST', '/api/v1/context/blocks/import', { body: params.body, bodyType: 'form-data', signal: params?.signal });
|
|
29
|
+
}
|
|
22
30
|
/** Fetch a wiki page by ID */
|
|
23
31
|
async ContextController_getBlock(params) {
|
|
24
32
|
return this.request('GET', `/api/v1/context/blocks/${params.id}`, { signal: params?.signal });
|
|
@@ -29,7 +37,7 @@ export class ContextResource extends BaseClient {
|
|
|
29
37
|
}
|
|
30
38
|
/** Delete a wiki page */
|
|
31
39
|
async ContextController_deleteBlock(params) {
|
|
32
|
-
return this.request('DELETE', `/api/v1/context/blocks/${params.id}`, { signal: params?.signal });
|
|
40
|
+
return this.request('DELETE', `/api/v1/context/blocks/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
33
41
|
}
|
|
34
42
|
/** Append content to an existing wiki page */
|
|
35
43
|
async ContextController_appendToBlock(params) {
|
|
@@ -52,24 +60,24 @@ export class ContextResource extends BaseClient {
|
|
|
52
60
|
return this.request('DELETE', `/api/v1/context/blocks/${params.id}/tags/${params.tagId}`, { signal: params?.signal });
|
|
53
61
|
}
|
|
54
62
|
async ContextController_handleMcp_get(params) {
|
|
55
|
-
return this.request('GET', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
63
|
+
return this.request('GET', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
56
64
|
}
|
|
57
65
|
async ContextController_handleMcp_post(params) {
|
|
58
|
-
return this.request('POST', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
66
|
+
return this.request('POST', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
59
67
|
}
|
|
60
68
|
async ContextController_handleMcp_put(params) {
|
|
61
|
-
return this.request('PUT', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
69
|
+
return this.request('PUT', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
62
70
|
}
|
|
63
71
|
async ContextController_handleMcp_delete(params) {
|
|
64
|
-
return this.request('DELETE', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
72
|
+
return this.request('DELETE', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
65
73
|
}
|
|
66
74
|
async ContextController_handleMcp_patch(params) {
|
|
67
|
-
return this.request('PATCH', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
75
|
+
return this.request('PATCH', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
68
76
|
}
|
|
69
77
|
async ContextController_handleMcp_options(params) {
|
|
70
|
-
return this.request('OPTIONS', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
78
|
+
return this.request('OPTIONS', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
71
79
|
}
|
|
72
80
|
async ContextController_handleMcp_head(params) {
|
|
73
|
-
return this.request('HEAD', '/api/v1/context/blocks/mcp', { signal: params?.signal });
|
|
81
|
+
return this.request('HEAD', '/api/v1/context/blocks/mcp', { responseType: 'void', signal: params?.signal });
|
|
74
82
|
}
|
|
75
83
|
}
|
|
@@ -21,11 +21,11 @@ export class ExecutionsResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Attach the runner session id to an active execution */
|
|
23
23
|
async ActiveTaskExecutionController_updateRunnerSessionId(params) {
|
|
24
|
-
return this.request('PATCH', `/api/v1/executions/active/${params.executionId}/session`, { body: params.body, signal: params?.signal });
|
|
24
|
+
return this.request('PATCH', `/api/v1/executions/active/${params.executionId}/session`, { body: params.body, responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** Increment tool call count for an active execution */
|
|
27
27
|
async ActiveTaskExecutionController_incrementToolCallCount(params) {
|
|
28
|
-
return this.request('PATCH', `/api/v1/executions/active/${params.executionId}/tool-calls/increment`, { signal: params?.signal });
|
|
28
|
+
return this.request('PATCH', `/api/v1/executions/active/${params.executionId}/tool-calls/increment`, { responseType: 'void', signal: params?.signal });
|
|
29
29
|
}
|
|
30
30
|
/** List task execution history */
|
|
31
31
|
async TaskExecutionHistoryController_listHistory(params) {
|
|
@@ -29,6 +29,6 @@ export class MetaProjectsResource extends BaseClient {
|
|
|
29
29
|
}
|
|
30
30
|
/** Delete a project */
|
|
31
31
|
async ProjectsController_deleteProject(params) {
|
|
32
|
-
return this.request('DELETE', `/api/v1/meta/projects/${params.projectId}`, { signal: params?.signal });
|
|
32
|
+
return this.request('DELETE', `/api/v1/meta/projects/${params.projectId}`, { responseType: 'void', signal: params?.signal });
|
|
33
33
|
}
|
|
34
34
|
}
|