@taico/client 0.7.0 → 0.8.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/README.md +1 -1
- package/dist/contracts/types.d.ts +390 -5
- package/dist/src/v1/client/index.d.ts +8 -0
- package/dist/src/v1/client/index.js +3 -0
- package/dist/src/v1/client/models/AiModelSelectionResponseDto.d.ts +2 -1
- package/dist/src/v1/client/models/AiModelSelectionResponseDto.js +2 -1
- package/dist/src/v1/client/models/AiProviderConnectionResponseDto.d.ts +49 -0
- package/dist/src/v1/client/models/AiProviderConnectionResponseDto.js +13 -0
- package/dist/src/v1/client/models/AiProviderResponseDto.d.ts +2 -1
- package/dist/src/v1/client/models/AiProviderResponseDto.js +1 -0
- package/dist/src/v1/client/models/CompleteAiProviderAuthorizationDto.d.ts +26 -0
- package/dist/src/v1/client/models/CompleteAiProviderAuthorizationDto.js +1 -0
- package/dist/src/v1/client/models/CreateAiProviderDto.d.ts +2 -1
- package/dist/src/v1/client/models/CreateAiProviderDto.js +1 -0
- package/dist/src/v1/client/models/DisconnectAiProviderResponseDto.d.ts +6 -0
- package/dist/src/v1/client/models/DisconnectAiProviderResponseDto.js +1 -0
- package/dist/src/v1/client/models/StartAiProviderAuthorizationResponseDto.d.ts +10 -0
- package/dist/src/v1/client/models/StartAiProviderAuthorizationResponseDto.js +1 -0
- package/dist/src/v1/client/models/ThreadResponseDto.d.ts +5 -0
- package/dist/src/v1/client/models/ThreadTimerKind.d.ts +7 -0
- package/dist/src/v1/client/models/ThreadTimerKind.js +12 -0
- package/dist/src/v1/client/models/ThreadTimerResponseDto.d.ts +35 -0
- package/dist/src/v1/client/models/ThreadTimerResponseDto.js +1 -0
- package/dist/src/v1/client/models/UpdateAiProviderConnectionDto.d.ts +6 -0
- package/dist/src/v1/client/models/UpdateAiProviderConnectionDto.js +1 -0
- package/dist/src/v1/client/services/AiModelSelectionsService.d.ts +2 -2
- package/dist/src/v1/client/services/AiProviderConnectionsService.d.ts +46 -0
- package/dist/src/v1/client/services/AiProviderConnectionsService.js +88 -0
- package/dist/src/v1/client/services/ThreadsService.d.ts +18 -0
- package/dist/src/v1/client/services/ThreadsService.js +42 -0
- package/dist/src/v2/ai-model-selections-resource.d.ts +2 -2
- package/dist/src/v2/ai-provider-connections-resource.d.ts +32 -0
- package/dist/src/v2/ai-provider-connections-resource.js +26 -0
- package/dist/src/v2/client.d.ts +2 -0
- package/dist/src/v2/client.js +3 -0
- package/dist/src/v2/threads-resource.d.ts +12 -0
- package/dist/src/v2/threads-resource.js +8 -0
- package/dist/src/v2/types.d.ts +44 -3
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type CompleteAiProviderAuthorizationDto = {
|
|
2
|
+
/**
|
|
3
|
+
* The full address the browser was sent back to, pasted as is
|
|
4
|
+
*/
|
|
5
|
+
callbackUrl?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The `state` query parameter
|
|
8
|
+
*/
|
|
9
|
+
state?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The `code` query parameter
|
|
12
|
+
*/
|
|
13
|
+
code?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The `client_id` query parameter
|
|
16
|
+
*/
|
|
17
|
+
clientId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The `error` query parameter
|
|
20
|
+
*/
|
|
21
|
+
error?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The `error_description` query parameter
|
|
24
|
+
*/
|
|
25
|
+
errorDescription?: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,6 +34,7 @@ export declare namespace CreateAiProviderDto {
|
|
|
34
34
|
GOOGLE = "google",
|
|
35
35
|
GOOGLE_VERTEX = "google_vertex",
|
|
36
36
|
XAI = "xai",
|
|
37
|
-
OPENAI_COMPATIBLE = "openai_compatible"
|
|
37
|
+
OPENAI_COMPATIBLE = "openai_compatible",
|
|
38
|
+
CHATGPT_SUBSCRIPTION = "chatgpt_subscription"
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -11,5 +11,6 @@ export var CreateAiProviderDto;
|
|
|
11
11
|
type["GOOGLE_VERTEX"] = "google_vertex";
|
|
12
12
|
type["XAI"] = "xai";
|
|
13
13
|
type["OPENAI_COMPATIBLE"] = "openai_compatible";
|
|
14
|
+
type["CHATGPT_SUBSCRIPTION"] = "chatgpt_subscription";
|
|
14
15
|
})(type = CreateAiProviderDto.type || (CreateAiProviderDto.type = {}));
|
|
15
16
|
})(CreateAiProviderDto || (CreateAiProviderDto = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type StartAiProviderAuthorizationResponseDto = {
|
|
2
|
+
/**
|
|
3
|
+
* Address to open in the browser to sign in at the provider
|
|
4
|
+
*/
|
|
5
|
+
authorizationUrl: string;
|
|
6
|
+
/**
|
|
7
|
+
* ISO timestamp after which this sign-in can no longer be finished
|
|
8
|
+
*/
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import type { ContextBlockSummaryResponseDto } from './ContextBlockSummaryRespon
|
|
|
3
3
|
import type { MetaTagResponseDto } from './MetaTagResponseDto.js';
|
|
4
4
|
import type { TaskSubscriptionResponseDto } from './TaskSubscriptionResponseDto.js';
|
|
5
5
|
import type { TaskSummaryResponseDto } from './TaskSummaryResponseDto.js';
|
|
6
|
+
import type { ThreadTimerResponseDto } from './ThreadTimerResponseDto.js';
|
|
6
7
|
export type ThreadResponseDto = {
|
|
7
8
|
/**
|
|
8
9
|
* Thread ID
|
|
@@ -44,6 +45,10 @@ export type ThreadResponseDto = {
|
|
|
44
45
|
* Tasks the threads agent will be notified about when they go to review or are done
|
|
45
46
|
*/
|
|
46
47
|
taskSubscriptions: Array<TaskSubscriptionResponseDto>;
|
|
48
|
+
/**
|
|
49
|
+
* Reminders and recurring schedules of the threads agent that will still fire, soonest first
|
|
50
|
+
*/
|
|
51
|
+
timers: Array<ThreadTimerResponseDto>;
|
|
47
52
|
/**
|
|
48
53
|
* Row version for optimistic locking
|
|
49
54
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* reminder fires once; schedule fires every period, up to maxIterations times
|
|
7
|
+
*/
|
|
8
|
+
export var ThreadTimerKind;
|
|
9
|
+
(function (ThreadTimerKind) {
|
|
10
|
+
ThreadTimerKind["REMINDER"] = "reminder";
|
|
11
|
+
ThreadTimerKind["SCHEDULE"] = "schedule";
|
|
12
|
+
})(ThreadTimerKind || (ThreadTimerKind = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ThreadTimerKind } from './ThreadTimerKind.js';
|
|
2
|
+
export type ThreadTimerResponseDto = {
|
|
3
|
+
/**
|
|
4
|
+
* Timer ID; use it to cancel the timer
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* reminder fires once; schedule fires every period, up to maxIterations times
|
|
9
|
+
*/
|
|
10
|
+
kind: ThreadTimerKind;
|
|
11
|
+
/**
|
|
12
|
+
* What the threads agent wants to be reminded of
|
|
13
|
+
*/
|
|
14
|
+
reason: string;
|
|
15
|
+
/**
|
|
16
|
+
* Seconds between firings (null for a reminder)
|
|
17
|
+
*/
|
|
18
|
+
periodSeconds: number | null;
|
|
19
|
+
/**
|
|
20
|
+
* Most times the timer fires
|
|
21
|
+
*/
|
|
22
|
+
maxIterations: number;
|
|
23
|
+
/**
|
|
24
|
+
* Times the timer has fired so far
|
|
25
|
+
*/
|
|
26
|
+
firedCount: number;
|
|
27
|
+
/**
|
|
28
|
+
* When the timer fires next (UTC)
|
|
29
|
+
*/
|
|
30
|
+
nextFireAt: string;
|
|
31
|
+
/**
|
|
32
|
+
* When the timer was set (UTC)
|
|
33
|
+
*/
|
|
34
|
+
createdAt: string;
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,12 +16,12 @@ export declare class AiModelSelectionsService {
|
|
|
16
16
|
* @returns AiModelSelectionResponseDto Selection saved
|
|
17
17
|
* @throws ApiError
|
|
18
18
|
*/
|
|
19
|
-
static aiModelSelectionsControllerSetAiModelSelection(job: 'conversation' | '
|
|
19
|
+
static aiModelSelectionsControllerSetAiModelSelection(job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings', requestBody: SetAiModelSelectionDto, config?: OpenAPIConfig): CancelablePromise<AiModelSelectionResponseDto>;
|
|
20
20
|
/**
|
|
21
21
|
* Clear a job's selection
|
|
22
22
|
* @param job The job the model is selected for
|
|
23
23
|
* @returns void
|
|
24
24
|
* @throws ApiError
|
|
25
25
|
*/
|
|
26
|
-
static aiModelSelectionsControllerClearAiModelSelection(job: 'conversation' | '
|
|
26
|
+
static aiModelSelectionsControllerClearAiModelSelection(job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings', config?: OpenAPIConfig): CancelablePromise<void>;
|
|
27
27
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AiProviderConnectionResponseDto } from '../models/AiProviderConnectionResponseDto.js';
|
|
2
|
+
import type { CompleteAiProviderAuthorizationDto } from '../models/CompleteAiProviderAuthorizationDto.js';
|
|
3
|
+
import type { DisconnectAiProviderResponseDto } from '../models/DisconnectAiProviderResponseDto.js';
|
|
4
|
+
import type { StartAiProviderAuthorizationResponseDto } from '../models/StartAiProviderAuthorizationResponseDto.js';
|
|
5
|
+
import type { UpdateAiProviderConnectionDto } from '../models/UpdateAiProviderConnectionDto.js';
|
|
6
|
+
import type { CancelablePromise } from '../core/CancelablePromise.js';
|
|
7
|
+
import type { OpenAPIConfig } from '../core/OpenAPI.js';
|
|
8
|
+
export declare class AiProviderConnectionsService {
|
|
9
|
+
/**
|
|
10
|
+
* Get your own connection to the provider
|
|
11
|
+
* @param id AI provider identifier
|
|
12
|
+
* @returns AiProviderConnectionResponseDto
|
|
13
|
+
* @throws ApiError
|
|
14
|
+
*/
|
|
15
|
+
static aiProviderConnectionsControllerGetConnection(id: string, config?: OpenAPIConfig): CancelablePromise<AiProviderConnectionResponseDto>;
|
|
16
|
+
/**
|
|
17
|
+
* Change what your connection may be used for
|
|
18
|
+
* @param id AI provider identifier
|
|
19
|
+
* @param requestBody
|
|
20
|
+
* @returns AiProviderConnectionResponseDto
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
static aiProviderConnectionsControllerUpdateConnection(id: string, requestBody: UpdateAiProviderConnectionDto, config?: OpenAPIConfig): CancelablePromise<AiProviderConnectionResponseDto>;
|
|
24
|
+
/**
|
|
25
|
+
* Disconnect your account and revoke its grant at the provider
|
|
26
|
+
* @param id AI provider identifier
|
|
27
|
+
* @returns DisconnectAiProviderResponseDto
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
static aiProviderConnectionsControllerDisconnect(id: string, config?: OpenAPIConfig): CancelablePromise<DisconnectAiProviderResponseDto>;
|
|
31
|
+
/**
|
|
32
|
+
* Start signing in to the provider with your own account
|
|
33
|
+
* @param id AI provider identifier
|
|
34
|
+
* @returns StartAiProviderAuthorizationResponseDto
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
static aiProviderConnectionsControllerStartAuthorization(id: string, config?: OpenAPIConfig): CancelablePromise<StartAiProviderAuthorizationResponseDto>;
|
|
38
|
+
/**
|
|
39
|
+
* Finish the sign-in you started with what the provider sent back
|
|
40
|
+
* @param id AI provider identifier
|
|
41
|
+
* @param requestBody
|
|
42
|
+
* @returns AiProviderConnectionResponseDto
|
|
43
|
+
* @throws ApiError
|
|
44
|
+
*/
|
|
45
|
+
static aiProviderConnectionsControllerCompleteAuthorization(id: string, requestBody: CompleteAiProviderAuthorizationDto, config?: OpenAPIConfig): CancelablePromise<AiProviderConnectionResponseDto>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { OpenAPI } from '../core/OpenAPI.js';
|
|
2
|
+
import { request as __request } from '../core/request.js';
|
|
3
|
+
export class AiProviderConnectionsService {
|
|
4
|
+
/**
|
|
5
|
+
* Get your own connection to the provider
|
|
6
|
+
* @param id AI provider identifier
|
|
7
|
+
* @returns AiProviderConnectionResponseDto
|
|
8
|
+
* @throws ApiError
|
|
9
|
+
*/
|
|
10
|
+
static aiProviderConnectionsControllerGetConnection(id, config = OpenAPI) {
|
|
11
|
+
return __request(config, {
|
|
12
|
+
method: 'GET',
|
|
13
|
+
url: '/api/v1/ai-providers/{id}/connection',
|
|
14
|
+
path: {
|
|
15
|
+
'id': id,
|
|
16
|
+
},
|
|
17
|
+
errors: {
|
|
18
|
+
404: `AI provider not found`,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Change what your connection may be used for
|
|
24
|
+
* @param id AI provider identifier
|
|
25
|
+
* @param requestBody
|
|
26
|
+
* @returns AiProviderConnectionResponseDto
|
|
27
|
+
* @throws ApiError
|
|
28
|
+
*/
|
|
29
|
+
static aiProviderConnectionsControllerUpdateConnection(id, requestBody, config = OpenAPI) {
|
|
30
|
+
return __request(config, {
|
|
31
|
+
method: 'PATCH',
|
|
32
|
+
url: '/api/v1/ai-providers/{id}/connection',
|
|
33
|
+
path: {
|
|
34
|
+
'id': id,
|
|
35
|
+
},
|
|
36
|
+
body: requestBody,
|
|
37
|
+
mediaType: 'application/json',
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Disconnect your account and revoke its grant at the provider
|
|
42
|
+
* @param id AI provider identifier
|
|
43
|
+
* @returns DisconnectAiProviderResponseDto
|
|
44
|
+
* @throws ApiError
|
|
45
|
+
*/
|
|
46
|
+
static aiProviderConnectionsControllerDisconnect(id, config = OpenAPI) {
|
|
47
|
+
return __request(config, {
|
|
48
|
+
method: 'DELETE',
|
|
49
|
+
url: '/api/v1/ai-providers/{id}/connection',
|
|
50
|
+
path: {
|
|
51
|
+
'id': id,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Start signing in to the provider with your own account
|
|
57
|
+
* @param id AI provider identifier
|
|
58
|
+
* @returns StartAiProviderAuthorizationResponseDto
|
|
59
|
+
* @throws ApiError
|
|
60
|
+
*/
|
|
61
|
+
static aiProviderConnectionsControllerStartAuthorization(id, config = OpenAPI) {
|
|
62
|
+
return __request(config, {
|
|
63
|
+
method: 'POST',
|
|
64
|
+
url: '/api/v1/ai-providers/{id}/connection/authorize',
|
|
65
|
+
path: {
|
|
66
|
+
'id': id,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Finish the sign-in you started with what the provider sent back
|
|
72
|
+
* @param id AI provider identifier
|
|
73
|
+
* @param requestBody
|
|
74
|
+
* @returns AiProviderConnectionResponseDto
|
|
75
|
+
* @throws ApiError
|
|
76
|
+
*/
|
|
77
|
+
static aiProviderConnectionsControllerCompleteAuthorization(id, requestBody, config = OpenAPI) {
|
|
78
|
+
return __request(config, {
|
|
79
|
+
method: 'POST',
|
|
80
|
+
url: '/api/v1/ai-providers/{id}/connection/callback',
|
|
81
|
+
path: {
|
|
82
|
+
'id': id,
|
|
83
|
+
},
|
|
84
|
+
body: requestBody,
|
|
85
|
+
mediaType: 'application/json',
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -75,6 +75,24 @@ export declare class ThreadsService {
|
|
|
75
75
|
* @throws ApiError
|
|
76
76
|
*/
|
|
77
77
|
static threadsControllerAttachTask(id: string, requestBody: AttachTaskDto, config?: OpenAPIConfig): CancelablePromise<ThreadResponseDto>;
|
|
78
|
+
/**
|
|
79
|
+
* Cancel a reminder or schedule of the threads agent
|
|
80
|
+
* Idempotent: cancelling a timer that already finished or was cancelled succeeds.
|
|
81
|
+
* @param id Thread UUID
|
|
82
|
+
* @param timerId Timer UUID
|
|
83
|
+
* @returns void
|
|
84
|
+
* @throws ApiError
|
|
85
|
+
*/
|
|
86
|
+
static threadsControllerCancelTimer(id: string, timerId: string, config?: OpenAPIConfig): CancelablePromise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Stop the threads agent watching a task
|
|
89
|
+
* Idempotent: removing a watch that does not exist succeeds.
|
|
90
|
+
* @param id Thread UUID
|
|
91
|
+
* @param taskId UUID of the watched task
|
|
92
|
+
* @returns void
|
|
93
|
+
* @throws ApiError
|
|
94
|
+
*/
|
|
95
|
+
static threadsControllerRemoveTaskSubscription(id: string, taskId: string, config?: OpenAPIConfig): CancelablePromise<void>;
|
|
78
96
|
/**
|
|
79
97
|
* Reference a context block in the thread
|
|
80
98
|
* @param id Thread UUID
|
|
@@ -145,6 +145,48 @@ export class ThreadsService {
|
|
|
145
145
|
},
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Cancel a reminder or schedule of the threads agent
|
|
150
|
+
* Idempotent: cancelling a timer that already finished or was cancelled succeeds.
|
|
151
|
+
* @param id Thread UUID
|
|
152
|
+
* @param timerId Timer UUID
|
|
153
|
+
* @returns void
|
|
154
|
+
* @throws ApiError
|
|
155
|
+
*/
|
|
156
|
+
static threadsControllerCancelTimer(id, timerId, config = OpenAPI) {
|
|
157
|
+
return __request(config, {
|
|
158
|
+
method: 'DELETE',
|
|
159
|
+
url: '/api/v1/threads/{id}/timers/{timerId}',
|
|
160
|
+
path: {
|
|
161
|
+
'id': id,
|
|
162
|
+
'timerId': timerId,
|
|
163
|
+
},
|
|
164
|
+
errors: {
|
|
165
|
+
404: `Thread not found`,
|
|
166
|
+
},
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Stop the threads agent watching a task
|
|
171
|
+
* Idempotent: removing a watch that does not exist succeeds.
|
|
172
|
+
* @param id Thread UUID
|
|
173
|
+
* @param taskId UUID of the watched task
|
|
174
|
+
* @returns void
|
|
175
|
+
* @throws ApiError
|
|
176
|
+
*/
|
|
177
|
+
static threadsControllerRemoveTaskSubscription(id, taskId, config = OpenAPI) {
|
|
178
|
+
return __request(config, {
|
|
179
|
+
method: 'DELETE',
|
|
180
|
+
url: '/api/v1/threads/{id}/task-subscriptions/{taskId}',
|
|
181
|
+
path: {
|
|
182
|
+
'id': id,
|
|
183
|
+
'taskId': taskId,
|
|
184
|
+
},
|
|
185
|
+
errors: {
|
|
186
|
+
404: `Thread not found`,
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
}
|
|
148
190
|
/**
|
|
149
191
|
* Reference a context block in the thread
|
|
150
192
|
* @param id Thread UUID
|
|
@@ -8,13 +8,13 @@ export declare class AiModelSelectionsResource extends BaseClient {
|
|
|
8
8
|
}): Promise<AiModelSelectionResponseDto[]>;
|
|
9
9
|
/** Select the provider and model a job uses */
|
|
10
10
|
AiModelSelectionsController_setAiModelSelection(params: {
|
|
11
|
-
job: 'conversation' | '
|
|
11
|
+
job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings';
|
|
12
12
|
body: SetAiModelSelectionDto;
|
|
13
13
|
signal?: AbortSignal;
|
|
14
14
|
}): Promise<AiModelSelectionResponseDto>;
|
|
15
15
|
/** Clear a job's selection */
|
|
16
16
|
AiModelSelectionsController_clearAiModelSelection(params: {
|
|
17
|
-
job: 'conversation' | '
|
|
17
|
+
job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings';
|
|
18
18
|
signal?: AbortSignal;
|
|
19
19
|
}): Promise<void>;
|
|
20
20
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseClient, ClientConfig } from './base-client.js';
|
|
2
|
+
import type { AiProviderConnectionResponseDto, CompleteAiProviderAuthorizationDto, DisconnectAiProviderResponseDto, StartAiProviderAuthorizationResponseDto, UpdateAiProviderConnectionDto } from './types.js';
|
|
3
|
+
export declare class AiProviderConnectionsResource extends BaseClient {
|
|
4
|
+
constructor(config: ClientConfig);
|
|
5
|
+
/** Get your own connection to the provider */
|
|
6
|
+
AiProviderConnectionsController_getConnection(params: {
|
|
7
|
+
id: string;
|
|
8
|
+
signal?: AbortSignal;
|
|
9
|
+
}): Promise<AiProviderConnectionResponseDto>;
|
|
10
|
+
/** Change what your connection may be used for */
|
|
11
|
+
AiProviderConnectionsController_updateConnection(params: {
|
|
12
|
+
id: string;
|
|
13
|
+
body: UpdateAiProviderConnectionDto;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}): Promise<AiProviderConnectionResponseDto>;
|
|
16
|
+
/** Disconnect your account and revoke its grant at the provider */
|
|
17
|
+
AiProviderConnectionsController_disconnect(params: {
|
|
18
|
+
id: string;
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
}): Promise<DisconnectAiProviderResponseDto>;
|
|
21
|
+
/** Start signing in to the provider with your own account */
|
|
22
|
+
AiProviderConnectionsController_startAuthorization(params: {
|
|
23
|
+
id: string;
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
}): Promise<StartAiProviderAuthorizationResponseDto>;
|
|
26
|
+
/** Finish the sign-in you started with what the provider sent back */
|
|
27
|
+
AiProviderConnectionsController_completeAuthorization(params: {
|
|
28
|
+
id: string;
|
|
29
|
+
body: CompleteAiProviderAuthorizationDto;
|
|
30
|
+
signal?: AbortSignal;
|
|
31
|
+
}): Promise<AiProviderConnectionResponseDto>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseClient } from './base-client.js';
|
|
2
|
+
export class AiProviderConnectionsResource extends BaseClient {
|
|
3
|
+
constructor(config) {
|
|
4
|
+
super(config);
|
|
5
|
+
}
|
|
6
|
+
/** Get your own connection to the provider */
|
|
7
|
+
async AiProviderConnectionsController_getConnection(params) {
|
|
8
|
+
return this.request('GET', `/api/v1/ai-providers/${params.id}/connection`, { signal: params?.signal });
|
|
9
|
+
}
|
|
10
|
+
/** Change what your connection may be used for */
|
|
11
|
+
async AiProviderConnectionsController_updateConnection(params) {
|
|
12
|
+
return this.request('PATCH', `/api/v1/ai-providers/${params.id}/connection`, { body: params.body, signal: params?.signal });
|
|
13
|
+
}
|
|
14
|
+
/** Disconnect your account and revoke its grant at the provider */
|
|
15
|
+
async AiProviderConnectionsController_disconnect(params) {
|
|
16
|
+
return this.request('DELETE', `/api/v1/ai-providers/${params.id}/connection`, { signal: params?.signal });
|
|
17
|
+
}
|
|
18
|
+
/** Start signing in to the provider with your own account */
|
|
19
|
+
async AiProviderConnectionsController_startAuthorization(params) {
|
|
20
|
+
return this.request('POST', `/api/v1/ai-providers/${params.id}/connection/authorize`, { signal: params?.signal });
|
|
21
|
+
}
|
|
22
|
+
/** Finish the sign-in you started with what the provider sent back */
|
|
23
|
+
async AiProviderConnectionsController_completeAuthorization(params) {
|
|
24
|
+
return this.request('POST', `/api/v1/ai-providers/${params.id}/connection/callback`, { body: params.body, signal: params?.signal });
|
|
25
|
+
}
|
|
26
|
+
}
|
package/dist/src/v2/client.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { JwksResource } from './jwks-resource.js';
|
|
|
10
10
|
import { ActorsResource } from './actors-resource.js';
|
|
11
11
|
import { AiProvidersResource } from './ai-providers-resource.js';
|
|
12
12
|
import { AiModelSelectionsResource } from './ai-model-selections-resource.js';
|
|
13
|
+
import { AiProviderConnectionsResource } from './ai-provider-connections-resource.js';
|
|
13
14
|
import { SecretsResource } from './secrets-resource.js';
|
|
14
15
|
import { TaskResource } from './task-resource.js';
|
|
15
16
|
import { AgentrunResource } from './agent-run-resource.js';
|
|
@@ -37,6 +38,7 @@ export declare class ApiClient {
|
|
|
37
38
|
readonly actors: ActorsResource;
|
|
38
39
|
readonly aiProviders: AiProvidersResource;
|
|
39
40
|
readonly aiModelSelections: AiModelSelectionsResource;
|
|
41
|
+
readonly aiProviderConnections: AiProviderConnectionsResource;
|
|
40
42
|
readonly secrets: SecretsResource;
|
|
41
43
|
readonly task: TaskResource;
|
|
42
44
|
readonly agentrun: AgentrunResource;
|
package/dist/src/v2/client.js
CHANGED
|
@@ -9,6 +9,7 @@ import { JwksResource } from './jwks-resource.js';
|
|
|
9
9
|
import { ActorsResource } from './actors-resource.js';
|
|
10
10
|
import { AiProvidersResource } from './ai-providers-resource.js';
|
|
11
11
|
import { AiModelSelectionsResource } from './ai-model-selections-resource.js';
|
|
12
|
+
import { AiProviderConnectionsResource } from './ai-provider-connections-resource.js';
|
|
12
13
|
import { SecretsResource } from './secrets-resource.js';
|
|
13
14
|
import { TaskResource } from './task-resource.js';
|
|
14
15
|
import { AgentrunResource } from './agent-run-resource.js';
|
|
@@ -36,6 +37,7 @@ export class ApiClient {
|
|
|
36
37
|
actors;
|
|
37
38
|
aiProviders;
|
|
38
39
|
aiModelSelections;
|
|
40
|
+
aiProviderConnections;
|
|
39
41
|
secrets;
|
|
40
42
|
task;
|
|
41
43
|
agentrun;
|
|
@@ -63,6 +65,7 @@ export class ApiClient {
|
|
|
63
65
|
this.actors = new ActorsResource(config);
|
|
64
66
|
this.aiProviders = new AiProvidersResource(config);
|
|
65
67
|
this.aiModelSelections = new AiModelSelectionsResource(config);
|
|
68
|
+
this.aiProviderConnections = new AiProviderConnectionsResource(config);
|
|
66
69
|
this.secrets = new SecretsResource(config);
|
|
67
70
|
this.task = new TaskResource(config);
|
|
68
71
|
this.agentrun = new AgentrunResource(config);
|
|
@@ -45,6 +45,18 @@ export declare class ThreadsResource extends BaseClient {
|
|
|
45
45
|
body: AttachTaskDto;
|
|
46
46
|
signal?: AbortSignal;
|
|
47
47
|
}): Promise<ThreadResponseDto>;
|
|
48
|
+
/** Cancel a reminder or schedule of the threads agent */
|
|
49
|
+
ThreadsController_cancelTimer(params: {
|
|
50
|
+
id: string;
|
|
51
|
+
timerId: string;
|
|
52
|
+
signal?: AbortSignal;
|
|
53
|
+
}): Promise<void>;
|
|
54
|
+
/** Stop the threads agent watching a task */
|
|
55
|
+
ThreadsController_removeTaskSubscription(params: {
|
|
56
|
+
id: string;
|
|
57
|
+
taskId: string;
|
|
58
|
+
signal?: AbortSignal;
|
|
59
|
+
}): Promise<void>;
|
|
48
60
|
/** Reference a context block in the thread */
|
|
49
61
|
ThreadsController_referenceContextBlock(params: {
|
|
50
62
|
id: string;
|
|
@@ -35,6 +35,14 @@ export class ThreadsResource extends BaseClient {
|
|
|
35
35
|
async ThreadsController_attachTask(params) {
|
|
36
36
|
return this.request('POST', `/api/v1/threads/${params.id}/tasks`, { body: params.body, signal: params?.signal });
|
|
37
37
|
}
|
|
38
|
+
/** Cancel a reminder or schedule of the threads agent */
|
|
39
|
+
async ThreadsController_cancelTimer(params) {
|
|
40
|
+
return this.request('DELETE', `/api/v1/threads/${params.id}/timers/${params.timerId}`, { responseType: 'void', signal: params?.signal });
|
|
41
|
+
}
|
|
42
|
+
/** Stop the threads agent watching a task */
|
|
43
|
+
async ThreadsController_removeTaskSubscription(params) {
|
|
44
|
+
return this.request('DELETE', `/api/v1/threads/${params.id}/task-subscriptions/${params.taskId}`, { responseType: 'void', signal: params?.signal });
|
|
45
|
+
}
|
|
38
46
|
/** Reference a context block in the thread */
|
|
39
47
|
async ThreadsController_referenceContextBlock(params) {
|
|
40
48
|
return this.request('POST', `/api/v1/threads/${params.id}/context-blocks`, { body: params.body, signal: params?.signal });
|
package/dist/src/v2/types.d.ts
CHANGED
|
@@ -359,7 +359,7 @@ export interface JwksResponseDto {
|
|
|
359
359
|
}
|
|
360
360
|
export interface CreateAiProviderDto {
|
|
361
361
|
name: string;
|
|
362
|
-
type: 'openai' | 'anthropic' | 'google' | 'google_vertex' | 'xai' | 'openai_compatible';
|
|
362
|
+
type: 'openai' | 'anthropic' | 'google' | 'google_vertex' | 'xai' | 'openai_compatible' | 'chatgpt_subscription';
|
|
363
363
|
secretId?: string;
|
|
364
364
|
baseUrl?: string | null;
|
|
365
365
|
project?: string | null;
|
|
@@ -368,7 +368,7 @@ export interface CreateAiProviderDto {
|
|
|
368
368
|
export interface AiProviderResponseDto {
|
|
369
369
|
id: string;
|
|
370
370
|
name: string;
|
|
371
|
-
type: 'openai' | 'anthropic' | 'google' | 'google_vertex' | 'xai' | 'openai_compatible';
|
|
371
|
+
type: 'openai' | 'anthropic' | 'google' | 'google_vertex' | 'xai' | 'openai_compatible' | 'chatgpt_subscription';
|
|
372
372
|
secretId?: string | null;
|
|
373
373
|
baseUrl?: string | null;
|
|
374
374
|
project?: string | null;
|
|
@@ -392,7 +392,7 @@ export interface AiProviderModelResponseDto {
|
|
|
392
392
|
kind: 'language' | 'embedding';
|
|
393
393
|
}
|
|
394
394
|
export interface AiModelSelectionResponseDto {
|
|
395
|
-
job: 'conversation' | '
|
|
395
|
+
job: 'conversation' | 'user_small_tasks' | 'system_small_tasks' | 'middle_manager' | 'embeddings';
|
|
396
396
|
aiProviderId?: string | null;
|
|
397
397
|
modelId?: string | null;
|
|
398
398
|
followsConversation: boolean;
|
|
@@ -404,6 +404,35 @@ export interface SetAiModelSelectionDto {
|
|
|
404
404
|
aiProviderId: string;
|
|
405
405
|
modelId: string;
|
|
406
406
|
}
|
|
407
|
+
export interface AiProviderConnectionResponseDto {
|
|
408
|
+
aiProviderId: string;
|
|
409
|
+
status: 'connected' | 'plan_access_not_granted' | 'needs_reauthorization' | 'disconnected';
|
|
410
|
+
accountEmail?: string | null;
|
|
411
|
+
canUsePlan: boolean;
|
|
412
|
+
automatedTurnsAllowed: boolean;
|
|
413
|
+
isAuthorizationPending: boolean;
|
|
414
|
+
lastErrorCode?: string | null;
|
|
415
|
+
lastErrorAt?: string | null;
|
|
416
|
+
manageUsageUrl: string;
|
|
417
|
+
}
|
|
418
|
+
export interface StartAiProviderAuthorizationResponseDto {
|
|
419
|
+
authorizationUrl: string;
|
|
420
|
+
expiresAt: string;
|
|
421
|
+
}
|
|
422
|
+
export interface CompleteAiProviderAuthorizationDto {
|
|
423
|
+
callbackUrl?: string;
|
|
424
|
+
state?: string;
|
|
425
|
+
code?: string;
|
|
426
|
+
clientId?: string;
|
|
427
|
+
error?: string;
|
|
428
|
+
errorDescription?: string;
|
|
429
|
+
}
|
|
430
|
+
export interface UpdateAiProviderConnectionDto {
|
|
431
|
+
automatedTurnsAllowed: boolean;
|
|
432
|
+
}
|
|
433
|
+
export interface DisconnectAiProviderResponseDto {
|
|
434
|
+
revokedAtProvider: boolean;
|
|
435
|
+
}
|
|
407
436
|
export interface CreateSecretDto {
|
|
408
437
|
name: string;
|
|
409
438
|
description?: string;
|
|
@@ -598,6 +627,17 @@ export interface TaskSubscriptionResponseDto {
|
|
|
598
627
|
status: 'NOT_STARTED' | 'IN_PROGRESS' | 'FOR_REVIEW' | 'DONE';
|
|
599
628
|
createdAt: string;
|
|
600
629
|
}
|
|
630
|
+
export type ThreadTimerKind = 'reminder' | 'schedule';
|
|
631
|
+
export interface ThreadTimerResponseDto {
|
|
632
|
+
id: string;
|
|
633
|
+
kind: ThreadTimerKind;
|
|
634
|
+
reason: string;
|
|
635
|
+
periodSeconds: number | null;
|
|
636
|
+
maxIterations: number;
|
|
637
|
+
firedCount: number;
|
|
638
|
+
nextFireAt: string;
|
|
639
|
+
createdAt: string;
|
|
640
|
+
}
|
|
601
641
|
export interface ThreadResponseDto {
|
|
602
642
|
id: string;
|
|
603
643
|
title: string;
|
|
@@ -609,6 +649,7 @@ export interface ThreadResponseDto {
|
|
|
609
649
|
tags: MetaTagResponseDto[];
|
|
610
650
|
participants: ActorResponseDto[];
|
|
611
651
|
taskSubscriptions: TaskSubscriptionResponseDto[];
|
|
652
|
+
timers: ThreadTimerResponseDto[];
|
|
612
653
|
rowVersion: number;
|
|
613
654
|
createdAt: string;
|
|
614
655
|
updatedAt: string;
|