@taico/client 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/contracts/types.d.ts +238 -2
- package/dist/src/v1/client/index.d.ts +6 -0
- package/dist/src/v1/client/index.js +2 -0
- 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/UpdateAiProviderConnectionDto.d.ts +6 -0
- package/dist/src/v1/client/models/UpdateAiProviderConnectionDto.js +1 -0
- package/dist/src/v1/client/services/AiProviderConnectionsService.d.ts +46 -0
- package/dist/src/v1/client/services/AiProviderConnectionsService.js +88 -0
- 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/types.d.ts +31 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# @taico/client
|
|
2
2
|
|
|
3
|
-
[](https://badge.socket.dev/npm/package/@taico/client/0.8.0)
|
|
@@ -941,6 +941,59 @@ export interface paths {
|
|
|
941
941
|
patch?: never;
|
|
942
942
|
trace?: never;
|
|
943
943
|
};
|
|
944
|
+
"/api/v1/ai-providers/{id}/connection": {
|
|
945
|
+
parameters: {
|
|
946
|
+
query?: never;
|
|
947
|
+
header?: never;
|
|
948
|
+
path?: never;
|
|
949
|
+
cookie?: never;
|
|
950
|
+
};
|
|
951
|
+
/** Get your own connection to the provider */
|
|
952
|
+
get: operations["AiProviderConnectionsController_getConnection"];
|
|
953
|
+
put?: never;
|
|
954
|
+
post?: never;
|
|
955
|
+
/** Disconnect your account and revoke its grant at the provider */
|
|
956
|
+
delete: operations["AiProviderConnectionsController_disconnect"];
|
|
957
|
+
options?: never;
|
|
958
|
+
head?: never;
|
|
959
|
+
/** Change what your connection may be used for */
|
|
960
|
+
patch: operations["AiProviderConnectionsController_updateConnection"];
|
|
961
|
+
trace?: never;
|
|
962
|
+
};
|
|
963
|
+
"/api/v1/ai-providers/{id}/connection/authorize": {
|
|
964
|
+
parameters: {
|
|
965
|
+
query?: never;
|
|
966
|
+
header?: never;
|
|
967
|
+
path?: never;
|
|
968
|
+
cookie?: never;
|
|
969
|
+
};
|
|
970
|
+
get?: never;
|
|
971
|
+
put?: never;
|
|
972
|
+
/** Start signing in to the provider with your own account */
|
|
973
|
+
post: operations["AiProviderConnectionsController_startAuthorization"];
|
|
974
|
+
delete?: never;
|
|
975
|
+
options?: never;
|
|
976
|
+
head?: never;
|
|
977
|
+
patch?: never;
|
|
978
|
+
trace?: never;
|
|
979
|
+
};
|
|
980
|
+
"/api/v1/ai-providers/{id}/connection/callback": {
|
|
981
|
+
parameters: {
|
|
982
|
+
query?: never;
|
|
983
|
+
header?: never;
|
|
984
|
+
path?: never;
|
|
985
|
+
cookie?: never;
|
|
986
|
+
};
|
|
987
|
+
get?: never;
|
|
988
|
+
put?: never;
|
|
989
|
+
/** Finish the sign-in you started with what the provider sent back */
|
|
990
|
+
post: operations["AiProviderConnectionsController_completeAuthorization"];
|
|
991
|
+
delete?: never;
|
|
992
|
+
options?: never;
|
|
993
|
+
head?: never;
|
|
994
|
+
patch?: never;
|
|
995
|
+
trace?: never;
|
|
996
|
+
};
|
|
944
997
|
"/api/v1/secrets": {
|
|
945
998
|
parameters: {
|
|
946
999
|
query?: never;
|
|
@@ -3728,7 +3781,7 @@ export interface components {
|
|
|
3728
3781
|
* @example openai
|
|
3729
3782
|
* @enum {string}
|
|
3730
3783
|
*/
|
|
3731
|
-
type: "openai" | "anthropic" | "google" | "google_vertex" | "xai" | "openai_compatible";
|
|
3784
|
+
type: "openai" | "anthropic" | "google" | "google_vertex" | "xai" | "openai_compatible" | "chatgpt_subscription";
|
|
3732
3785
|
/**
|
|
3733
3786
|
* @description ID of the secret containing the API key
|
|
3734
3787
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
@@ -3766,7 +3819,7 @@ export interface components {
|
|
|
3766
3819
|
* @example openai
|
|
3767
3820
|
* @enum {string}
|
|
3768
3821
|
*/
|
|
3769
|
-
type: "openai" | "anthropic" | "google" | "google_vertex" | "xai" | "openai_compatible";
|
|
3822
|
+
type: "openai" | "anthropic" | "google" | "google_vertex" | "xai" | "openai_compatible" | "chatgpt_subscription";
|
|
3770
3823
|
/**
|
|
3771
3824
|
* @description ID of the secret containing the API key
|
|
3772
3825
|
* @example 123e4567-e89b-12d3-a456-426614174000
|
|
@@ -3908,6 +3961,64 @@ export interface components {
|
|
|
3908
3961
|
*/
|
|
3909
3962
|
modelId: string;
|
|
3910
3963
|
};
|
|
3964
|
+
AiProviderConnectionResponseDto: {
|
|
3965
|
+
/** @description AI provider identifier */
|
|
3966
|
+
aiProviderId: string;
|
|
3967
|
+
/**
|
|
3968
|
+
* @description State of your own connection to the provider
|
|
3969
|
+
* @example connected
|
|
3970
|
+
* @enum {string}
|
|
3971
|
+
*/
|
|
3972
|
+
status: "connected" | "plan_access_not_granted" | "needs_reauthorization" | "disconnected";
|
|
3973
|
+
/** @description Email of the connected account */
|
|
3974
|
+
accountEmail?: string | null;
|
|
3975
|
+
/** @description Whether requests can run on your plan right now */
|
|
3976
|
+
canUsePlan: boolean;
|
|
3977
|
+
/** @description Whether turns nobody typed (task updates) may run on your plan */
|
|
3978
|
+
automatedTurnsAllowed: boolean;
|
|
3979
|
+
/** @description Whether a sign-in was started and not finished */
|
|
3980
|
+
isAuthorizationPending: boolean;
|
|
3981
|
+
/**
|
|
3982
|
+
* @description The provider's code for the last failed request, cleared by the next success
|
|
3983
|
+
* @example subscription_sharing_usage_limit_exceeded
|
|
3984
|
+
*/
|
|
3985
|
+
lastErrorCode?: string | null;
|
|
3986
|
+
/** @description ISO timestamp of the last failed request */
|
|
3987
|
+
lastErrorAt?: string | null;
|
|
3988
|
+
/** @description Where you see and manage your plan usage */
|
|
3989
|
+
manageUsageUrl: string;
|
|
3990
|
+
};
|
|
3991
|
+
StartAiProviderAuthorizationResponseDto: {
|
|
3992
|
+
/** @description Address to open in the browser to sign in at the provider */
|
|
3993
|
+
authorizationUrl: string;
|
|
3994
|
+
/** @description ISO timestamp after which this sign-in can no longer be finished */
|
|
3995
|
+
expiresAt: string;
|
|
3996
|
+
};
|
|
3997
|
+
CompleteAiProviderAuthorizationDto: {
|
|
3998
|
+
/**
|
|
3999
|
+
* @description The full address the browser was sent back to, pasted as is
|
|
4000
|
+
* @example http://127.0.0.1:41873/auth/callback?code=...&state=...
|
|
4001
|
+
*/
|
|
4002
|
+
callbackUrl?: string;
|
|
4003
|
+
/** @description The `state` query parameter */
|
|
4004
|
+
state?: string;
|
|
4005
|
+
/** @description The `code` query parameter */
|
|
4006
|
+
code?: string;
|
|
4007
|
+
/** @description The `client_id` query parameter */
|
|
4008
|
+
clientId?: string;
|
|
4009
|
+
/** @description The `error` query parameter */
|
|
4010
|
+
error?: string;
|
|
4011
|
+
/** @description The `error_description` query parameter */
|
|
4012
|
+
errorDescription?: string;
|
|
4013
|
+
};
|
|
4014
|
+
UpdateAiProviderConnectionDto: {
|
|
4015
|
+
/** @description Allow turns nobody typed (task updates in threads you subscribed to) to run on your plan */
|
|
4016
|
+
automatedTurnsAllowed: boolean;
|
|
4017
|
+
};
|
|
4018
|
+
DisconnectAiProviderResponseDto: {
|
|
4019
|
+
/** @description False when the provider could not be told. The tokens stored in Taico are removed either way. */
|
|
4020
|
+
revokedAtProvider: boolean;
|
|
4021
|
+
};
|
|
3911
4022
|
CreateSecretDto: {
|
|
3912
4023
|
/**
|
|
3913
4024
|
* @description Unique name for the secret
|
|
@@ -8906,6 +9017,131 @@ export interface operations {
|
|
|
8906
9017
|
};
|
|
8907
9018
|
};
|
|
8908
9019
|
};
|
|
9020
|
+
AiProviderConnectionsController_getConnection: {
|
|
9021
|
+
parameters: {
|
|
9022
|
+
query?: never;
|
|
9023
|
+
header?: never;
|
|
9024
|
+
path: {
|
|
9025
|
+
/** @description AI provider identifier */
|
|
9026
|
+
id: string;
|
|
9027
|
+
};
|
|
9028
|
+
cookie?: never;
|
|
9029
|
+
};
|
|
9030
|
+
requestBody?: never;
|
|
9031
|
+
responses: {
|
|
9032
|
+
200: {
|
|
9033
|
+
headers: {
|
|
9034
|
+
[name: string]: unknown;
|
|
9035
|
+
};
|
|
9036
|
+
content: {
|
|
9037
|
+
"application/json": components["schemas"]["AiProviderConnectionResponseDto"];
|
|
9038
|
+
};
|
|
9039
|
+
};
|
|
9040
|
+
/** @description AI provider not found */
|
|
9041
|
+
404: {
|
|
9042
|
+
headers: {
|
|
9043
|
+
[name: string]: unknown;
|
|
9044
|
+
};
|
|
9045
|
+
content?: never;
|
|
9046
|
+
};
|
|
9047
|
+
};
|
|
9048
|
+
};
|
|
9049
|
+
AiProviderConnectionsController_disconnect: {
|
|
9050
|
+
parameters: {
|
|
9051
|
+
query?: never;
|
|
9052
|
+
header?: never;
|
|
9053
|
+
path: {
|
|
9054
|
+
/** @description AI provider identifier */
|
|
9055
|
+
id: string;
|
|
9056
|
+
};
|
|
9057
|
+
cookie?: never;
|
|
9058
|
+
};
|
|
9059
|
+
requestBody?: never;
|
|
9060
|
+
responses: {
|
|
9061
|
+
200: {
|
|
9062
|
+
headers: {
|
|
9063
|
+
[name: string]: unknown;
|
|
9064
|
+
};
|
|
9065
|
+
content: {
|
|
9066
|
+
"application/json": components["schemas"]["DisconnectAiProviderResponseDto"];
|
|
9067
|
+
};
|
|
9068
|
+
};
|
|
9069
|
+
};
|
|
9070
|
+
};
|
|
9071
|
+
AiProviderConnectionsController_updateConnection: {
|
|
9072
|
+
parameters: {
|
|
9073
|
+
query?: never;
|
|
9074
|
+
header?: never;
|
|
9075
|
+
path: {
|
|
9076
|
+
/** @description AI provider identifier */
|
|
9077
|
+
id: string;
|
|
9078
|
+
};
|
|
9079
|
+
cookie?: never;
|
|
9080
|
+
};
|
|
9081
|
+
requestBody: {
|
|
9082
|
+
content: {
|
|
9083
|
+
"application/json": components["schemas"]["UpdateAiProviderConnectionDto"];
|
|
9084
|
+
};
|
|
9085
|
+
};
|
|
9086
|
+
responses: {
|
|
9087
|
+
200: {
|
|
9088
|
+
headers: {
|
|
9089
|
+
[name: string]: unknown;
|
|
9090
|
+
};
|
|
9091
|
+
content: {
|
|
9092
|
+
"application/json": components["schemas"]["AiProviderConnectionResponseDto"];
|
|
9093
|
+
};
|
|
9094
|
+
};
|
|
9095
|
+
};
|
|
9096
|
+
};
|
|
9097
|
+
AiProviderConnectionsController_startAuthorization: {
|
|
9098
|
+
parameters: {
|
|
9099
|
+
query?: never;
|
|
9100
|
+
header?: never;
|
|
9101
|
+
path: {
|
|
9102
|
+
/** @description AI provider identifier */
|
|
9103
|
+
id: string;
|
|
9104
|
+
};
|
|
9105
|
+
cookie?: never;
|
|
9106
|
+
};
|
|
9107
|
+
requestBody?: never;
|
|
9108
|
+
responses: {
|
|
9109
|
+
201: {
|
|
9110
|
+
headers: {
|
|
9111
|
+
[name: string]: unknown;
|
|
9112
|
+
};
|
|
9113
|
+
content: {
|
|
9114
|
+
"application/json": components["schemas"]["StartAiProviderAuthorizationResponseDto"];
|
|
9115
|
+
};
|
|
9116
|
+
};
|
|
9117
|
+
};
|
|
9118
|
+
};
|
|
9119
|
+
AiProviderConnectionsController_completeAuthorization: {
|
|
9120
|
+
parameters: {
|
|
9121
|
+
query?: never;
|
|
9122
|
+
header?: never;
|
|
9123
|
+
path: {
|
|
9124
|
+
/** @description AI provider identifier */
|
|
9125
|
+
id: string;
|
|
9126
|
+
};
|
|
9127
|
+
cookie?: never;
|
|
9128
|
+
};
|
|
9129
|
+
requestBody: {
|
|
9130
|
+
content: {
|
|
9131
|
+
"application/json": components["schemas"]["CompleteAiProviderAuthorizationDto"];
|
|
9132
|
+
};
|
|
9133
|
+
};
|
|
9134
|
+
responses: {
|
|
9135
|
+
201: {
|
|
9136
|
+
headers: {
|
|
9137
|
+
[name: string]: unknown;
|
|
9138
|
+
};
|
|
9139
|
+
content: {
|
|
9140
|
+
"application/json": components["schemas"]["AiProviderConnectionResponseDto"];
|
|
9141
|
+
};
|
|
9142
|
+
};
|
|
9143
|
+
};
|
|
9144
|
+
};
|
|
8909
9145
|
SecretsController_listSecrets: {
|
|
8910
9146
|
parameters: {
|
|
8911
9147
|
query?: never;
|
|
@@ -23,6 +23,7 @@ export type { AgentToolPermissionResponseDto } from './models/AgentToolPermissio
|
|
|
23
23
|
export type { AgentToolPermissionScopeResponseDto } from './models/AgentToolPermissionScopeResponseDto.js';
|
|
24
24
|
export { AgentToolPermissionServerResponseDto } from './models/AgentToolPermissionServerResponseDto.js';
|
|
25
25
|
export { AiModelSelectionResponseDto } from './models/AiModelSelectionResponseDto.js';
|
|
26
|
+
export { AiProviderConnectionResponseDto } from './models/AiProviderConnectionResponseDto.js';
|
|
26
27
|
export { AiProviderModelResponseDto } from './models/AiProviderModelResponseDto.js';
|
|
27
28
|
export { AiProviderResponseDto } from './models/AiProviderResponseDto.js';
|
|
28
29
|
export type { AnswerInputRequestDto } from './models/AnswerInputRequestDto.js';
|
|
@@ -42,6 +43,7 @@ export type { ChangePasswordRequestDto } from './models/ChangePasswordRequestDto
|
|
|
42
43
|
export { ChangeTaskStatusDto } from './models/ChangeTaskStatusDto.js';
|
|
43
44
|
export { ClientRegistrationResponseDto } from './models/ClientRegistrationResponseDto.js';
|
|
44
45
|
export type { CommentResponseDto } from './models/CommentResponseDto.js';
|
|
46
|
+
export type { CompleteAiProviderAuthorizationDto } from './models/CompleteAiProviderAuthorizationDto.js';
|
|
45
47
|
export { ConnectionFlowResponseDto } from './models/ConnectionFlowResponseDto.js';
|
|
46
48
|
export type { ConnectionResponseDto } from './models/ConnectionResponseDto.js';
|
|
47
49
|
export type { ConsentDecisionDto } from './models/ConsentDecisionDto.js';
|
|
@@ -71,6 +73,7 @@ export type { DeleteConnectionResponseDto } from './models/DeleteConnectionRespo
|
|
|
71
73
|
export type { DeleteMappingResponseDto } from './models/DeleteMappingResponseDto.js';
|
|
72
74
|
export type { DeleteScopeResponseDto } from './models/DeleteScopeResponseDto.js';
|
|
73
75
|
export type { DeleteServerResponseDto } from './models/DeleteServerResponseDto.js';
|
|
76
|
+
export type { DisconnectAiProviderResponseDto } from './models/DisconnectAiProviderResponseDto.js';
|
|
74
77
|
export type { ExecutionStatsResponseDto } from './models/ExecutionStatsResponseDto.js';
|
|
75
78
|
export { FlowClientDto } from './models/FlowClientDto.js';
|
|
76
79
|
export type { FlowServerDto } from './models/FlowServerDto.js';
|
|
@@ -120,6 +123,7 @@ export type { ServerListResponseDto } from './models/ServerListResponseDto.js';
|
|
|
120
123
|
export { ServerResponseDto } from './models/ServerResponseDto.js';
|
|
121
124
|
export type { SetAiModelSelectionDto } from './models/SetAiModelSelectionDto.js';
|
|
122
125
|
export type { SetupManagedUserRequestDto } from './models/SetupManagedUserRequestDto.js';
|
|
126
|
+
export type { StartAiProviderAuthorizationResponseDto } from './models/StartAiProviderAuthorizationResponseDto.js';
|
|
123
127
|
export { StopActiveTaskExecutionDto } from './models/StopActiveTaskExecutionDto.js';
|
|
124
128
|
export type { TagResponseDto } from './models/TagResponseDto.js';
|
|
125
129
|
export type { TaskBlueprintListResponseDto } from './models/TaskBlueprintListResponseDto.js';
|
|
@@ -145,6 +149,7 @@ export type { TokenExchangeResponseDto } from './models/TokenExchangeResponseDto
|
|
|
145
149
|
export { TokenRequestDto } from './models/TokenRequestDto.js';
|
|
146
150
|
export { TokenResponseDto } from './models/TokenResponseDto.js';
|
|
147
151
|
export type { UpdateAgentRunDto } from './models/UpdateAgentRunDto.js';
|
|
152
|
+
export type { UpdateAiProviderConnectionDto } from './models/UpdateAiProviderConnectionDto.js';
|
|
148
153
|
export type { UpdateAiProviderDto } from './models/UpdateAiProviderDto.js';
|
|
149
154
|
export type { UpdateBlockDto } from './models/UpdateBlockDto.js';
|
|
150
155
|
export type { UpdateConnectionDto } from './models/UpdateConnectionDto.js';
|
|
@@ -169,6 +174,7 @@ export { AgentExecutionTokensService } from './services/AgentExecutionTokensServ
|
|
|
169
174
|
export { AgentRunService } from './services/AgentRunService.js';
|
|
170
175
|
export { AgentTokensService } from './services/AgentTokensService.js';
|
|
171
176
|
export { AiModelSelectionsService } from './services/AiModelSelectionsService.js';
|
|
177
|
+
export { AiProviderConnectionsService } from './services/AiProviderConnectionsService.js';
|
|
172
178
|
export { AiProvidersService } from './services/AiProvidersService.js';
|
|
173
179
|
export { AppService } from './services/AppService.js';
|
|
174
180
|
export { AuthorizationJourneysService } from './services/AuthorizationJourneysService.js';
|
|
@@ -12,6 +12,7 @@ export { AgentTemplateDto } from './models/AgentTemplateDto.js';
|
|
|
12
12
|
export { AgentTemplateHarnessDto } from './models/AgentTemplateHarnessDto.js';
|
|
13
13
|
export { AgentToolPermissionServerResponseDto } from './models/AgentToolPermissionServerResponseDto.js';
|
|
14
14
|
export { AiModelSelectionResponseDto } from './models/AiModelSelectionResponseDto.js';
|
|
15
|
+
export { AiProviderConnectionResponseDto } from './models/AiProviderConnectionResponseDto.js';
|
|
15
16
|
export { AiProviderModelResponseDto } from './models/AiProviderModelResponseDto.js';
|
|
16
17
|
export { AiProviderResponseDto } from './models/AiProviderResponseDto.js';
|
|
17
18
|
export { AuthJourneyResponseDto } from './models/AuthJourneyResponseDto.js';
|
|
@@ -52,6 +53,7 @@ export { AgentExecutionTokensService } from './services/AgentExecutionTokensServ
|
|
|
52
53
|
export { AgentRunService } from './services/AgentRunService.js';
|
|
53
54
|
export { AgentTokensService } from './services/AgentTokensService.js';
|
|
54
55
|
export { AiModelSelectionsService } from './services/AiModelSelectionsService.js';
|
|
56
|
+
export { AiProviderConnectionsService } from './services/AiProviderConnectionsService.js';
|
|
55
57
|
export { AiProvidersService } from './services/AiProvidersService.js';
|
|
56
58
|
export { AppService } from './services/AppService.js';
|
|
57
59
|
export { AuthorizationJourneysService } from './services/AuthorizationJourneysService.js';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type AiProviderConnectionResponseDto = {
|
|
2
|
+
/**
|
|
3
|
+
* AI provider identifier
|
|
4
|
+
*/
|
|
5
|
+
aiProviderId: string;
|
|
6
|
+
/**
|
|
7
|
+
* State of your own connection to the provider
|
|
8
|
+
*/
|
|
9
|
+
status: AiProviderConnectionResponseDto.status;
|
|
10
|
+
/**
|
|
11
|
+
* Email of the connected account
|
|
12
|
+
*/
|
|
13
|
+
accountEmail?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Whether requests can run on your plan right now
|
|
16
|
+
*/
|
|
17
|
+
canUsePlan: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether turns nobody typed (task updates) may run on your plan
|
|
20
|
+
*/
|
|
21
|
+
automatedTurnsAllowed: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether a sign-in was started and not finished
|
|
24
|
+
*/
|
|
25
|
+
isAuthorizationPending: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The provider's code for the last failed request, cleared by the next success
|
|
28
|
+
*/
|
|
29
|
+
lastErrorCode?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* ISO timestamp of the last failed request
|
|
32
|
+
*/
|
|
33
|
+
lastErrorAt?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Where you see and manage your plan usage
|
|
36
|
+
*/
|
|
37
|
+
manageUsageUrl: string;
|
|
38
|
+
};
|
|
39
|
+
export declare namespace AiProviderConnectionResponseDto {
|
|
40
|
+
/**
|
|
41
|
+
* State of your own connection to the provider
|
|
42
|
+
*/
|
|
43
|
+
enum status {
|
|
44
|
+
CONNECTED = "connected",
|
|
45
|
+
PLAN_ACCESS_NOT_GRANTED = "plan_access_not_granted",
|
|
46
|
+
NEEDS_REAUTHORIZATION = "needs_reauthorization",
|
|
47
|
+
DISCONNECTED = "disconnected"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export var AiProviderConnectionResponseDto;
|
|
2
|
+
(function (AiProviderConnectionResponseDto) {
|
|
3
|
+
/**
|
|
4
|
+
* State of your own connection to the provider
|
|
5
|
+
*/
|
|
6
|
+
let status;
|
|
7
|
+
(function (status) {
|
|
8
|
+
status["CONNECTED"] = "connected";
|
|
9
|
+
status["PLAN_ACCESS_NOT_GRANTED"] = "plan_access_not_granted";
|
|
10
|
+
status["NEEDS_REAUTHORIZATION"] = "needs_reauthorization";
|
|
11
|
+
status["DISCONNECTED"] = "disconnected";
|
|
12
|
+
})(status = AiProviderConnectionResponseDto.status || (AiProviderConnectionResponseDto.status = {}));
|
|
13
|
+
})(AiProviderConnectionResponseDto || (AiProviderConnectionResponseDto = {}));
|
|
@@ -54,6 +54,7 @@ export declare namespace AiProviderResponseDto {
|
|
|
54
54
|
GOOGLE = "google",
|
|
55
55
|
GOOGLE_VERTEX = "google_vertex",
|
|
56
56
|
XAI = "xai",
|
|
57
|
-
OPENAI_COMPATIBLE = "openai_compatible"
|
|
57
|
+
OPENAI_COMPATIBLE = "openai_compatible",
|
|
58
|
+
CHATGPT_SUBSCRIPTION = "chatgpt_subscription"
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -11,5 +11,6 @@ export var AiProviderResponseDto;
|
|
|
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 = AiProviderResponseDto.type || (AiProviderResponseDto.type = {}));
|
|
15
16
|
})(AiProviderResponseDto || (AiProviderResponseDto = {}));
|
|
@@ -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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
}
|
|
@@ -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);
|
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;
|
|
@@ -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;
|