@taico/client 0.2.8 → 0.2.9
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 +147 -0
- package/dist/src/v1/client/index.d.ts +3 -0
- package/dist/src/v1/client/index.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/WorkerResponseDto.d.ts +8 -0
- package/dist/src/v1/client/models/WorkerResponseDto.js +1 -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/WorkersService.d.ts +11 -0
- package/dist/src/v1/client/services/WorkersService.js +15 -0
- package/dist/src/v2/agent-resource.js +2 -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 +2 -0
- package/dist/src/v2/client.js +3 -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 +11 -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
|
@@ -1508,6 +1508,40 @@ export interface paths {
|
|
|
1508
1508
|
patch?: never;
|
|
1509
1509
|
trace?: never;
|
|
1510
1510
|
};
|
|
1511
|
+
"/api/v1/context/blocks/export": {
|
|
1512
|
+
parameters: {
|
|
1513
|
+
query?: never;
|
|
1514
|
+
header?: never;
|
|
1515
|
+
path?: never;
|
|
1516
|
+
cookie?: never;
|
|
1517
|
+
};
|
|
1518
|
+
/** Export all context blocks as markdown zip */
|
|
1519
|
+
get: operations["ContextController_exportBlocks"];
|
|
1520
|
+
put?: never;
|
|
1521
|
+
post?: never;
|
|
1522
|
+
delete?: never;
|
|
1523
|
+
options?: never;
|
|
1524
|
+
head?: never;
|
|
1525
|
+
patch?: never;
|
|
1526
|
+
trace?: never;
|
|
1527
|
+
};
|
|
1528
|
+
"/api/v1/context/blocks/import": {
|
|
1529
|
+
parameters: {
|
|
1530
|
+
query?: never;
|
|
1531
|
+
header?: never;
|
|
1532
|
+
path?: never;
|
|
1533
|
+
cookie?: never;
|
|
1534
|
+
};
|
|
1535
|
+
get?: never;
|
|
1536
|
+
put?: never;
|
|
1537
|
+
/** Import context blocks from markdown zip */
|
|
1538
|
+
post: operations["ContextController_importBlocks"];
|
|
1539
|
+
delete?: never;
|
|
1540
|
+
options?: never;
|
|
1541
|
+
head?: never;
|
|
1542
|
+
patch?: never;
|
|
1543
|
+
trace?: never;
|
|
1544
|
+
};
|
|
1511
1545
|
"/api/v1/context/blocks/{id}": {
|
|
1512
1546
|
parameters: {
|
|
1513
1547
|
query?: never;
|
|
@@ -1768,6 +1802,23 @@ export interface paths {
|
|
|
1768
1802
|
patch?: never;
|
|
1769
1803
|
trace?: never;
|
|
1770
1804
|
};
|
|
1805
|
+
"/api/v1/workers": {
|
|
1806
|
+
parameters: {
|
|
1807
|
+
query?: never;
|
|
1808
|
+
header?: never;
|
|
1809
|
+
path?: never;
|
|
1810
|
+
cookie?: never;
|
|
1811
|
+
};
|
|
1812
|
+
/** List all workers */
|
|
1813
|
+
get: operations["WorkersController_listWorkers"];
|
|
1814
|
+
put?: never;
|
|
1815
|
+
post?: never;
|
|
1816
|
+
delete?: never;
|
|
1817
|
+
options?: never;
|
|
1818
|
+
head?: never;
|
|
1819
|
+
patch?: never;
|
|
1820
|
+
trace?: never;
|
|
1821
|
+
};
|
|
1771
1822
|
"/api/v1/task-blueprints": {
|
|
1772
1823
|
parameters: {
|
|
1773
1824
|
query?: never;
|
|
@@ -4915,6 +4966,13 @@ export interface components {
|
|
|
4915
4966
|
*/
|
|
4916
4967
|
updatedAt: string;
|
|
4917
4968
|
};
|
|
4969
|
+
ImportBlocksResponseDto: {
|
|
4970
|
+
/**
|
|
4971
|
+
* @description Number of context blocks imported from the archive
|
|
4972
|
+
* @example 12
|
|
4973
|
+
*/
|
|
4974
|
+
importedCount: number;
|
|
4975
|
+
};
|
|
4918
4976
|
UpdateBlockDto: {
|
|
4919
4977
|
/**
|
|
4920
4978
|
* @description Updated title of the context block
|
|
@@ -5152,6 +5210,18 @@ export interface components {
|
|
|
5152
5210
|
*/
|
|
5153
5211
|
sessionId: string;
|
|
5154
5212
|
};
|
|
5213
|
+
WorkerResponseDto: {
|
|
5214
|
+
/** Format: uuid */
|
|
5215
|
+
id: string;
|
|
5216
|
+
oauthClientId: string;
|
|
5217
|
+
/** Format: date-time */
|
|
5218
|
+
lastSeenAt: string;
|
|
5219
|
+
harnesses: ("claude" | "codex" | "opencode" | "adk" | "githubcopilot" | "other")[];
|
|
5220
|
+
/** Format: date-time */
|
|
5221
|
+
createdAt: string;
|
|
5222
|
+
/** Format: date-time */
|
|
5223
|
+
updatedAt: string;
|
|
5224
|
+
};
|
|
5155
5225
|
CreateTaskBlueprintDto: {
|
|
5156
5226
|
/**
|
|
5157
5227
|
* @description Name of the task blueprint
|
|
@@ -9259,6 +9329,63 @@ export interface operations {
|
|
|
9259
9329
|
};
|
|
9260
9330
|
};
|
|
9261
9331
|
};
|
|
9332
|
+
ContextController_exportBlocks: {
|
|
9333
|
+
parameters: {
|
|
9334
|
+
query?: never;
|
|
9335
|
+
header?: never;
|
|
9336
|
+
path?: never;
|
|
9337
|
+
cookie?: never;
|
|
9338
|
+
};
|
|
9339
|
+
requestBody?: never;
|
|
9340
|
+
responses: {
|
|
9341
|
+
/** @description Context blocks archive downloaded successfully */
|
|
9342
|
+
200: {
|
|
9343
|
+
headers: {
|
|
9344
|
+
[name: string]: unknown;
|
|
9345
|
+
};
|
|
9346
|
+
content: {
|
|
9347
|
+
"application/zip": string;
|
|
9348
|
+
};
|
|
9349
|
+
};
|
|
9350
|
+
};
|
|
9351
|
+
};
|
|
9352
|
+
ContextController_importBlocks: {
|
|
9353
|
+
parameters: {
|
|
9354
|
+
query?: never;
|
|
9355
|
+
header?: never;
|
|
9356
|
+
path?: never;
|
|
9357
|
+
cookie?: never;
|
|
9358
|
+
};
|
|
9359
|
+
requestBody: {
|
|
9360
|
+
content: {
|
|
9361
|
+
"multipart/form-data": {
|
|
9362
|
+
/**
|
|
9363
|
+
* Format: binary
|
|
9364
|
+
* @description Zip file exported from context blocks
|
|
9365
|
+
*/
|
|
9366
|
+
file: string;
|
|
9367
|
+
};
|
|
9368
|
+
};
|
|
9369
|
+
};
|
|
9370
|
+
responses: {
|
|
9371
|
+
/** @description Context blocks imported successfully */
|
|
9372
|
+
201: {
|
|
9373
|
+
headers: {
|
|
9374
|
+
[name: string]: unknown;
|
|
9375
|
+
};
|
|
9376
|
+
content: {
|
|
9377
|
+
"application/json": components["schemas"]["ImportBlocksResponseDto"];
|
|
9378
|
+
};
|
|
9379
|
+
};
|
|
9380
|
+
/** @description No archive file uploaded or invalid file type */
|
|
9381
|
+
400: {
|
|
9382
|
+
headers: {
|
|
9383
|
+
[name: string]: unknown;
|
|
9384
|
+
};
|
|
9385
|
+
content?: never;
|
|
9386
|
+
};
|
|
9387
|
+
};
|
|
9388
|
+
};
|
|
9262
9389
|
ContextController_getBlock: {
|
|
9263
9390
|
parameters: {
|
|
9264
9391
|
query?: never;
|
|
@@ -9750,6 +9877,26 @@ export interface operations {
|
|
|
9750
9877
|
};
|
|
9751
9878
|
};
|
|
9752
9879
|
};
|
|
9880
|
+
WorkersController_listWorkers: {
|
|
9881
|
+
parameters: {
|
|
9882
|
+
query?: never;
|
|
9883
|
+
header?: never;
|
|
9884
|
+
path?: never;
|
|
9885
|
+
cookie?: never;
|
|
9886
|
+
};
|
|
9887
|
+
requestBody?: never;
|
|
9888
|
+
responses: {
|
|
9889
|
+
/** @description List of all registered workers */
|
|
9890
|
+
200: {
|
|
9891
|
+
headers: {
|
|
9892
|
+
[name: string]: unknown;
|
|
9893
|
+
};
|
|
9894
|
+
content: {
|
|
9895
|
+
"application/json": components["schemas"]["WorkerResponseDto"][];
|
|
9896
|
+
};
|
|
9897
|
+
};
|
|
9898
|
+
};
|
|
9899
|
+
};
|
|
9753
9900
|
TaskBlueprintsController_listTaskBlueprints: {
|
|
9754
9901
|
parameters: {
|
|
9755
9902
|
query?: {
|
|
@@ -64,6 +64,7 @@ export type { FlowClientDto } from './models/FlowClientDto.js';
|
|
|
64
64
|
export type { FlowServerDto } from './models/FlowServerDto.js';
|
|
65
65
|
export { GetConsentMetadataResponseDto } from './models/GetConsentMetadataResponseDto.js';
|
|
66
66
|
export { GlobalSearchResultDto } from './models/GlobalSearchResultDto.js';
|
|
67
|
+
export type { ImportBlocksResponseDto } from './models/ImportBlocksResponseDto.js';
|
|
67
68
|
export type { InputRequestResponseDto } from './models/InputRequestResponseDto.js';
|
|
68
69
|
export { IntrospectTokenRequestDto } from './models/IntrospectTokenRequestDto.js';
|
|
69
70
|
export { IntrospectTokenResponseDto } from './models/IntrospectTokenResponseDto.js';
|
|
@@ -133,6 +134,7 @@ export type { UpdateThreadDto } from './models/UpdateThreadDto.js';
|
|
|
133
134
|
export type { UpdateThreadStateDto } from './models/UpdateThreadStateDto.js';
|
|
134
135
|
export type { UpsertAgentToolPermissionDto } from './models/UpsertAgentToolPermissionDto.js';
|
|
135
136
|
export { UserResponseDto } from './models/UserResponseDto.js';
|
|
137
|
+
export type { WorkerResponseDto } from './models/WorkerResponseDto.js';
|
|
136
138
|
export { ActorsService } from './services/ActorsService.js';
|
|
137
139
|
export { AgentService } from './services/AgentService.js';
|
|
138
140
|
export { AgentExecutionTokensService } from './services/AgentExecutionTokensService.js';
|
|
@@ -156,3 +158,4 @@ export { TaskBlueprintsService } from './services/TaskBlueprintsService.js';
|
|
|
156
158
|
export { ThreadsService } from './services/ThreadsService.js';
|
|
157
159
|
export { ToolsService } from './services/ToolsService.js';
|
|
158
160
|
export { WebAuthenticationService } from './services/WebAuthenticationService.js';
|
|
161
|
+
export { WorkersService } from './services/WorkersService.js';
|
|
@@ -58,3 +58,4 @@ export { TaskBlueprintsService } from './services/TaskBlueprintsService.js';
|
|
|
58
58
|
export { ThreadsService } from './services/ThreadsService.js';
|
|
59
59
|
export { ToolsService } from './services/ToolsService.js';
|
|
60
60
|
export { WebAuthenticationService } from './services/WebAuthenticationService.js';
|
|
61
|
+
export { WorkersService } from './services/WorkersService.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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
|
+
}
|
|
@@ -21,7 +21,7 @@ export class AgentResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Delete an agent */
|
|
23
23
|
async AgentsController_deleteAgent(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/agents/${params.actorId}`, { signal: params?.signal });
|
|
24
|
+
return this.request('DELETE', `/api/v1/agents/${params.actorId}`, { responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** List tool permissions for an agent */
|
|
27
27
|
async AgentToolPermissionsController_listAgentToolPermissions(params) {
|
|
@@ -33,6 +33,6 @@ export class AgentResource extends BaseClient {
|
|
|
33
33
|
}
|
|
34
34
|
/** Delete an agent tool permission assignment */
|
|
35
35
|
async AgentToolPermissionsController_deleteAgentToolPermission(params) {
|
|
36
|
-
return this.request('DELETE', `/api/v1/agents/${params.actorId}/tool-permissions/${params.serverId}`, { signal: params?.signal });
|
|
36
|
+
return this.request('DELETE', `/api/v1/agents/${params.actorId}/tool-permissions/${params.serverId}`, { responseType: 'void', signal: params?.signal });
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -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,6 +18,7 @@ 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';
|
|
@@ -42,6 +43,7 @@ export declare class ApiClient {
|
|
|
42
43
|
readonly secrets: SecretsResource;
|
|
43
44
|
readonly context: ContextResource;
|
|
44
45
|
readonly executions: ExecutionsResource;
|
|
46
|
+
readonly workers: WorkersResource;
|
|
45
47
|
readonly taskBlueprints: TaskBlueprintsResource;
|
|
46
48
|
readonly scheduledTasks: ScheduledTasksResource;
|
|
47
49
|
readonly discovery: DiscoveryResource;
|
package/dist/src/v2/client.js
CHANGED
|
@@ -17,6 +17,7 @@ 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';
|
|
@@ -41,6 +42,7 @@ export class ApiClient {
|
|
|
41
42
|
secrets;
|
|
42
43
|
context;
|
|
43
44
|
executions;
|
|
45
|
+
workers;
|
|
44
46
|
taskBlueprints;
|
|
45
47
|
scheduledTasks;
|
|
46
48
|
discovery;
|
|
@@ -65,6 +67,7 @@ export class ApiClient {
|
|
|
65
67
|
this.secrets = new SecretsResource(config);
|
|
66
68
|
this.context = new ContextResource(config);
|
|
67
69
|
this.executions = new ExecutionsResource(config);
|
|
70
|
+
this.workers = new WorkersResource(config);
|
|
68
71
|
this.taskBlueprints = new TaskBlueprintsResource(config);
|
|
69
72
|
this.scheduledTasks = new ScheduledTasksResource(config);
|
|
70
73
|
this.discovery = new DiscoveryResource(config);
|
|
@@ -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
|
}
|
|
@@ -17,6 +17,6 @@ export class MetaResource extends BaseClient {
|
|
|
17
17
|
}
|
|
18
18
|
/** Delete a tag from the system */
|
|
19
19
|
async MetaController_deleteTag(params) {
|
|
20
|
-
return this.request('DELETE', `/api/v1/meta/tags/${params.tagId}`, { signal: params?.signal });
|
|
20
|
+
return this.request('DELETE', `/api/v1/meta/tags/${params.tagId}`, { responseType: 'void', signal: params?.signal });
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -21,6 +21,6 @@ export class ScheduledTasksResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Delete a scheduled task */
|
|
23
23
|
async ScheduledTasksController_deleteScheduledTask(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/scheduled-tasks/${params.id}`, { signal: params?.signal });
|
|
24
|
+
return this.request('DELETE', `/api/v1/scheduled-tasks/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -21,7 +21,7 @@ export class SecretsResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Delete a secret */
|
|
23
23
|
async SecretsController_deleteSecret(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/secrets/${params.id}`, { signal: params?.signal });
|
|
24
|
+
return this.request('DELETE', `/api/v1/secrets/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** Get decrypted secret value */
|
|
27
27
|
async SecretsController_getSecretValue(params) {
|
|
@@ -21,7 +21,7 @@ export class TaskBlueprintsResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Delete a task blueprint */
|
|
23
23
|
async TaskBlueprintsController_deleteTaskBlueprint(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/task-blueprints/${params.id}`, { signal: params?.signal });
|
|
24
|
+
return this.request('DELETE', `/api/v1/task-blueprints/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** Create a task from a blueprint */
|
|
27
27
|
async TaskBlueprintsController_createTaskFromBlueprint(params) {
|
|
@@ -17,7 +17,7 @@ export class TaskResource extends BaseClient {
|
|
|
17
17
|
}
|
|
18
18
|
/** Delete a task */
|
|
19
19
|
async TasksController_deleteTask(params) {
|
|
20
|
-
return this.request('DELETE', `/api/v1/tasks/tasks/${params.id}`, { signal: params?.signal });
|
|
20
|
+
return this.request('DELETE', `/api/v1/tasks/tasks/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
21
21
|
}
|
|
22
22
|
/** Get a task by ID */
|
|
23
23
|
async TasksController_getTask(params) {
|
|
@@ -64,24 +64,24 @@ export class TaskResource extends BaseClient {
|
|
|
64
64
|
return this.request('POST', `/api/v1/tasks/tasks/${params.id}/input-requests/${params.inputRequestId}/answer`, { body: params.body, signal: params?.signal });
|
|
65
65
|
}
|
|
66
66
|
async TasksController_handleMcp_get(params) {
|
|
67
|
-
return this.request('GET', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
67
|
+
return this.request('GET', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
68
68
|
}
|
|
69
69
|
async TasksController_handleMcp_post(params) {
|
|
70
|
-
return this.request('POST', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
70
|
+
return this.request('POST', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
71
71
|
}
|
|
72
72
|
async TasksController_handleMcp_put(params) {
|
|
73
|
-
return this.request('PUT', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
73
|
+
return this.request('PUT', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
74
74
|
}
|
|
75
75
|
async TasksController_handleMcp_delete(params) {
|
|
76
|
-
return this.request('DELETE', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
76
|
+
return this.request('DELETE', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
77
77
|
}
|
|
78
78
|
async TasksController_handleMcp_patch(params) {
|
|
79
|
-
return this.request('PATCH', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
79
|
+
return this.request('PATCH', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
80
80
|
}
|
|
81
81
|
async TasksController_handleMcp_options(params) {
|
|
82
|
-
return this.request('OPTIONS', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
82
|
+
return this.request('OPTIONS', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
83
83
|
}
|
|
84
84
|
async TasksController_handleMcp_head(params) {
|
|
85
|
-
return this.request('HEAD', '/api/v1/tasks/tasks/mcp', { signal: params?.signal });
|
|
85
|
+
return this.request('HEAD', '/api/v1/tasks/tasks/mcp', { responseType: 'void', signal: params?.signal });
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -21,7 +21,7 @@ export class ThreadsResource extends BaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
/** Delete a thread */
|
|
23
23
|
async ThreadsController_deleteThread(params) {
|
|
24
|
-
return this.request('DELETE', `/api/v1/threads/${params.id}`, { signal: params?.signal });
|
|
24
|
+
return this.request('DELETE', `/api/v1/threads/${params.id}`, { responseType: 'void', signal: params?.signal });
|
|
25
25
|
}
|
|
26
26
|
/** Get a thread by task ID */
|
|
27
27
|
async ThreadsController_getThreadByTaskId(params) {
|
package/dist/src/v2/types.d.ts
CHANGED
|
@@ -761,6 +761,9 @@ export interface BlockTreeResponseDto {
|
|
|
761
761
|
createdAt: string;
|
|
762
762
|
updatedAt: string;
|
|
763
763
|
}
|
|
764
|
+
export interface ImportBlocksResponseDto {
|
|
765
|
+
importedCount: number;
|
|
766
|
+
}
|
|
764
767
|
export interface UpdateBlockDto {
|
|
765
768
|
title?: string;
|
|
766
769
|
content?: string;
|
|
@@ -824,6 +827,14 @@ export interface TaskExecutionHistoryResponseDto {
|
|
|
824
827
|
export interface UpdateRunnerSessionIdDto {
|
|
825
828
|
sessionId: string;
|
|
826
829
|
}
|
|
830
|
+
export interface WorkerResponseDto {
|
|
831
|
+
id: string;
|
|
832
|
+
oauthClientId: string;
|
|
833
|
+
lastSeenAt: string;
|
|
834
|
+
harnesses: ('claude' | 'codex' | 'opencode' | 'adk' | 'githubcopilot' | 'other')[];
|
|
835
|
+
createdAt: string;
|
|
836
|
+
updatedAt: string;
|
|
837
|
+
}
|
|
827
838
|
export interface CreateTaskBlueprintDto {
|
|
828
839
|
name: string;
|
|
829
840
|
description: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseClient, ClientConfig } from './base-client.js';
|
|
2
|
+
import type { WorkerResponseDto } from './types.js';
|
|
3
|
+
export declare class WorkersResource extends BaseClient {
|
|
4
|
+
constructor(config: ClientConfig);
|
|
5
|
+
/** List all workers */
|
|
6
|
+
WorkersController_listWorkers(params?: {
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}): Promise<WorkerResponseDto[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseClient } from './base-client.js';
|
|
2
|
+
export class WorkersResource extends BaseClient {
|
|
3
|
+
constructor(config) {
|
|
4
|
+
super(config);
|
|
5
|
+
}
|
|
6
|
+
/** List all workers */
|
|
7
|
+
async WorkersController_listWorkers(params) {
|
|
8
|
+
return this.request('GET', '/api/v1/workers', { signal: params?.signal });
|
|
9
|
+
}
|
|
10
|
+
}
|