@squidcloud/client 1.0.59 → 1.0.60
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/common/src/ai-assistant.schemas.d.ts +210 -0
- package/dist/common/src/ai-assistant.types.d.ts +76 -0
- package/dist/common/src/api-call.context.d.ts +1 -1
- package/dist/common/src/api.types.d.ts +1 -1
- package/dist/common/src/application.schemas.d.ts +32 -1
- package/dist/common/src/application.types.d.ts +16 -4
- package/dist/common/src/bundle-data.types.d.ts +1 -1
- package/dist/common/src/index.d.ts +3 -1
- package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -0
- package/dist/common/src/integrations/api.types.d.ts +80 -0
- package/dist/common/src/integrations/auth.types.d.ts +22 -0
- package/dist/common/src/integrations/database.types.d.ts +236 -0
- package/dist/common/src/integrations/index.d.ts +97 -0
- package/dist/common/src/integrations/observability.types.d.ts +22 -0
- package/dist/common/src/secret.types.d.ts +0 -3
- package/dist/common/src/socket.types.d.ts +11 -3
- package/dist/common/src/utils/validation.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/typescript-client/src/ai-assistant-client.d.ts +66 -0
- package/dist/typescript-client/src/ai-client.factory.d.ts +13 -0
- package/dist/typescript-client/src/api.manager.d.ts +4 -3
- package/dist/typescript-client/src/backend-function.manager.d.ts +3 -3
- package/dist/typescript-client/src/client-id.service.d.ts +24 -0
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +4 -3
- package/dist/typescript-client/src/named-query.manager.d.ts +4 -3
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +9 -4
- package/dist/typescript-client/src/rpc.manager.d.ts +4 -3
- package/dist/typescript-client/src/socket.manager.d.ts +11 -3
- package/dist/typescript-client/src/squid.d.ts +2 -1
- package/package.json +1 -1
- package/dist/common/src/integration.types.d.ts +0 -404
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
export declare const AiAssistantChatRequestSchema: {
|
|
2
|
+
type: string;
|
|
3
|
+
properties: {
|
|
4
|
+
profileId: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
integrationId: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
clientId: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
clientRequestId: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
prompt: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
required: string[];
|
|
21
|
+
};
|
|
22
|
+
export declare const AiAssistantMutateRequestSchema: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: {
|
|
25
|
+
profileId: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
integrationId: {
|
|
29
|
+
type: string;
|
|
30
|
+
};
|
|
31
|
+
action: {
|
|
32
|
+
type: string;
|
|
33
|
+
enum: string[];
|
|
34
|
+
};
|
|
35
|
+
type: {
|
|
36
|
+
type: string;
|
|
37
|
+
enum: string[];
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
required: string[];
|
|
41
|
+
oneOf: ({
|
|
42
|
+
properties: {
|
|
43
|
+
action: {
|
|
44
|
+
const: string;
|
|
45
|
+
};
|
|
46
|
+
type: {
|
|
47
|
+
const: string;
|
|
48
|
+
};
|
|
49
|
+
payload: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
modelName: {
|
|
53
|
+
type: string;
|
|
54
|
+
enum: string[];
|
|
55
|
+
};
|
|
56
|
+
strictContext: {
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
id?: undefined;
|
|
60
|
+
instruction?: undefined;
|
|
61
|
+
title?: undefined;
|
|
62
|
+
context?: undefined;
|
|
63
|
+
};
|
|
64
|
+
required: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
} | {
|
|
68
|
+
properties: {
|
|
69
|
+
action: {
|
|
70
|
+
const: string;
|
|
71
|
+
};
|
|
72
|
+
type: {
|
|
73
|
+
const: string;
|
|
74
|
+
};
|
|
75
|
+
payload: {
|
|
76
|
+
type: string;
|
|
77
|
+
properties: {
|
|
78
|
+
id: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
instruction: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
modelName?: undefined;
|
|
85
|
+
strictContext?: undefined;
|
|
86
|
+
title?: undefined;
|
|
87
|
+
context?: undefined;
|
|
88
|
+
};
|
|
89
|
+
required: string[];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
properties: {
|
|
94
|
+
action: {
|
|
95
|
+
const: string;
|
|
96
|
+
};
|
|
97
|
+
type: {
|
|
98
|
+
const: string;
|
|
99
|
+
};
|
|
100
|
+
payload: {
|
|
101
|
+
type: string;
|
|
102
|
+
properties: {
|
|
103
|
+
id: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
106
|
+
title: {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
context: {
|
|
110
|
+
type: string;
|
|
111
|
+
};
|
|
112
|
+
modelName?: undefined;
|
|
113
|
+
strictContext?: undefined;
|
|
114
|
+
instruction?: undefined;
|
|
115
|
+
};
|
|
116
|
+
required: string[];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
} | {
|
|
120
|
+
properties: {
|
|
121
|
+
action: {
|
|
122
|
+
const: string;
|
|
123
|
+
};
|
|
124
|
+
type: {
|
|
125
|
+
const: string;
|
|
126
|
+
};
|
|
127
|
+
payload: {
|
|
128
|
+
type: string;
|
|
129
|
+
properties: {
|
|
130
|
+
modelName: {
|
|
131
|
+
type: string;
|
|
132
|
+
enum: string[];
|
|
133
|
+
};
|
|
134
|
+
strictContext: {
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
id?: undefined;
|
|
138
|
+
instruction?: undefined;
|
|
139
|
+
title?: undefined;
|
|
140
|
+
context?: undefined;
|
|
141
|
+
};
|
|
142
|
+
required?: undefined;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
} | {
|
|
146
|
+
properties: {
|
|
147
|
+
action: {
|
|
148
|
+
const: string;
|
|
149
|
+
};
|
|
150
|
+
type: {
|
|
151
|
+
const: string;
|
|
152
|
+
};
|
|
153
|
+
payload: {
|
|
154
|
+
type: string;
|
|
155
|
+
properties: {
|
|
156
|
+
id: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
title: {
|
|
160
|
+
type: string;
|
|
161
|
+
};
|
|
162
|
+
context: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
modelName?: undefined;
|
|
166
|
+
strictContext?: undefined;
|
|
167
|
+
instruction?: undefined;
|
|
168
|
+
};
|
|
169
|
+
required?: undefined;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
} | {
|
|
173
|
+
properties: {
|
|
174
|
+
action: {
|
|
175
|
+
const: string;
|
|
176
|
+
};
|
|
177
|
+
type: {
|
|
178
|
+
const: string;
|
|
179
|
+
};
|
|
180
|
+
payload: {
|
|
181
|
+
type: string;
|
|
182
|
+
properties: {
|
|
183
|
+
id: {
|
|
184
|
+
type: string;
|
|
185
|
+
};
|
|
186
|
+
modelName?: undefined;
|
|
187
|
+
strictContext?: undefined;
|
|
188
|
+
instruction?: undefined;
|
|
189
|
+
title?: undefined;
|
|
190
|
+
context?: undefined;
|
|
191
|
+
};
|
|
192
|
+
required: string[];
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
} | {
|
|
196
|
+
properties: {
|
|
197
|
+
action: {
|
|
198
|
+
const: string;
|
|
199
|
+
};
|
|
200
|
+
type: {
|
|
201
|
+
const: string;
|
|
202
|
+
};
|
|
203
|
+
payload: {
|
|
204
|
+
type: string;
|
|
205
|
+
properties?: undefined;
|
|
206
|
+
required?: undefined;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
})[];
|
|
210
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ClientId, ClientRequestId, IntegrationId } from './communication.types';
|
|
2
|
+
export type OpenAiModelName = 'gpt-3.5-turbo' | 'gpt-4';
|
|
3
|
+
export interface BaseAiAssistantRequest {
|
|
4
|
+
profileId: string;
|
|
5
|
+
integrationId: IntegrationId;
|
|
6
|
+
}
|
|
7
|
+
export interface AiAssistantChatRequest extends BaseAiAssistantRequest {
|
|
8
|
+
clientId: ClientId;
|
|
9
|
+
clientRequestId: ClientRequestId;
|
|
10
|
+
prompt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BaseAiAssistantMutateRequest extends BaseAiAssistantRequest {
|
|
13
|
+
action: AiAssistantMutationType;
|
|
14
|
+
type: AiAssistantRequestType;
|
|
15
|
+
}
|
|
16
|
+
export interface AiAssistantInsertProfileRequest extends BaseAiAssistantMutateRequest {
|
|
17
|
+
action: 'insert';
|
|
18
|
+
type: 'profile';
|
|
19
|
+
payload: {
|
|
20
|
+
modelName: OpenAiModelName;
|
|
21
|
+
strictContext: boolean;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface AiAssistantInsertInstructionRequest extends BaseAiAssistantMutateRequest {
|
|
25
|
+
action: 'insert';
|
|
26
|
+
type: 'instruction';
|
|
27
|
+
payload: {
|
|
28
|
+
id: string;
|
|
29
|
+
instruction: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface AiAssistantInsertContextRequest extends BaseAiAssistantMutateRequest {
|
|
33
|
+
action: 'insert';
|
|
34
|
+
type: 'context';
|
|
35
|
+
payload: {
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
context: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface AiAssistantUpdateProfileRequest extends BaseAiAssistantMutateRequest {
|
|
42
|
+
action: 'update';
|
|
43
|
+
type: 'profile';
|
|
44
|
+
payload: {
|
|
45
|
+
modelName?: OpenAiModelName;
|
|
46
|
+
strictContext?: boolean;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface AiAssistantUpdateInstructionRequest extends BaseAiAssistantMutateRequest {
|
|
50
|
+
action: 'update';
|
|
51
|
+
type: 'instruction';
|
|
52
|
+
payload: {
|
|
53
|
+
id: string;
|
|
54
|
+
instruction: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface AiAssistantUpdateContextRequest extends BaseAiAssistantMutateRequest {
|
|
58
|
+
action: 'update';
|
|
59
|
+
type: 'context';
|
|
60
|
+
payload: {
|
|
61
|
+
id: string;
|
|
62
|
+
title?: string;
|
|
63
|
+
context?: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface AiAssistantDeleteRequest extends BaseAiAssistantMutateRequest {
|
|
67
|
+
action: 'delete';
|
|
68
|
+
payload: {
|
|
69
|
+
id?: string;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export type AiAssistantInsertRequest = AiAssistantInsertProfileRequest | AiAssistantInsertInstructionRequest | AiAssistantInsertContextRequest;
|
|
73
|
+
export type AiAssistantUpdateRequest = AiAssistantUpdateProfileRequest | AiAssistantUpdateInstructionRequest | AiAssistantUpdateContextRequest;
|
|
74
|
+
export type AiAssistantMutateRequest = AiAssistantInsertRequest | AiAssistantUpdateRequest | AiAssistantDeleteRequest;
|
|
75
|
+
export type AiAssistantRequestType = 'instruction' | 'context' | 'profile';
|
|
76
|
+
export type AiAssistantMutationType = 'insert' | 'update' | 'delete';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiHeaders } from './api.types';
|
|
2
|
-
import { ApiEndpointId, HttpMethod } from './
|
|
2
|
+
import { ApiEndpointId, HttpMethod } from './integrations';
|
|
3
3
|
export declare class ApiCallContext {
|
|
4
4
|
readonly endpointId: ApiEndpointId;
|
|
5
5
|
readonly url: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClientId, ClientRequestId, IntegrationId } from './communication.types';
|
|
2
|
-
import { ApiEndpointId, HttpMethod } from './
|
|
2
|
+
import { ApiEndpointId, HttpMethod } from './integrations';
|
|
3
3
|
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
4
4
|
export type ApiQueryParams = Record<string, string | number | boolean>;
|
|
5
5
|
export interface CallApiRequest {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSONSchemaType } from 'ajv';
|
|
2
2
|
import { UpdateOpenIdProviderRequest } from './application.types';
|
|
3
|
-
import { IntegrationType } from './
|
|
3
|
+
import { IntegrationType } from './integrations';
|
|
4
4
|
export declare const UpdateOpenIdProviderRequestSchema: JSONSchemaType<UpdateOpenIdProviderRequest>;
|
|
5
5
|
export declare const UpsertIntegrationRequestSchema: {
|
|
6
6
|
type: string;
|
|
@@ -576,6 +576,37 @@ export declare const UpsertIntegrationRequestSchema: {
|
|
|
576
576
|
};
|
|
577
577
|
supportsExternalChanges?: undefined;
|
|
578
578
|
};
|
|
579
|
+
} | {
|
|
580
|
+
type: string;
|
|
581
|
+
required: never[];
|
|
582
|
+
properties: {
|
|
583
|
+
type: {
|
|
584
|
+
const: IntegrationType;
|
|
585
|
+
};
|
|
586
|
+
configuration: {
|
|
587
|
+
type: string;
|
|
588
|
+
nullable: boolean;
|
|
589
|
+
required: never[];
|
|
590
|
+
properties: {
|
|
591
|
+
apiKey: {
|
|
592
|
+
type: string;
|
|
593
|
+
nullable: boolean;
|
|
594
|
+
isSecret?: undefined;
|
|
595
|
+
};
|
|
596
|
+
connectionOptions?: undefined;
|
|
597
|
+
discoveryOptions?: undefined;
|
|
598
|
+
appKey?: undefined;
|
|
599
|
+
datadogRegion?: undefined;
|
|
600
|
+
newRelicRegion?: undefined;
|
|
601
|
+
clientId?: undefined;
|
|
602
|
+
domain?: undefined;
|
|
603
|
+
jwksUri?: undefined;
|
|
604
|
+
validations?: undefined;
|
|
605
|
+
verifyUri?: undefined;
|
|
606
|
+
};
|
|
607
|
+
};
|
|
608
|
+
supportsExternalChanges?: undefined;
|
|
609
|
+
};
|
|
579
610
|
})[];
|
|
580
611
|
};
|
|
581
612
|
export declare const DeleteIntegrationRequestSchema: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { RunPermissions } from './backend-run.types';
|
|
1
2
|
import { ApplicationBundleData, ServiceFunctionName } from './bundle-data.types';
|
|
2
3
|
import { AppId, IntegrationId } from './communication.types';
|
|
3
4
|
import { CollectionName } from './document.types';
|
|
4
|
-
import { GraphQLConnectionOptions,
|
|
5
|
-
import { RunPermissions } from './backend-run.types';
|
|
5
|
+
import { AiAssistantConfiguration, GraphQLConnectionOptions, IntegrationAiAssistantSchema, IntegrationApiSchema, IntegrationConfig, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType, MongoConnectionOptions, MssqlConnectionOptions, MySqlConnectionOptions, OpenApiDiscoveryOptions, OracleConnectionOptions, PostgresConnectionOptions, SnowflakeConnectionOptions } from './integrations';
|
|
6
6
|
export type WebhookId = string;
|
|
7
7
|
export type QueryName = string;
|
|
8
8
|
export type TriggerId = string;
|
|
@@ -134,8 +134,8 @@ export interface UpdateOpenIdProviderRequest {
|
|
|
134
134
|
export interface CreateApplicationResponse {
|
|
135
135
|
appId: AppId;
|
|
136
136
|
}
|
|
137
|
-
export type UpsertIntegrationRequest = UpsertDataIntegrationRequest | UpsertGraphQLIntegrationRequest | UpsertApiIntegrationRequest;
|
|
138
|
-
export type UpsertDataIntegrationRequest = UpsertInternalIntegrationRequest | UpsertMongoDbIntegrationRequest | UpsertMssqlIntegrationRequest | UpsertMySqlIntegrationRequest | UpsertPostgresIntegrationRequest | UpsertCockroachIntegrationRequest | UpsertSnowflakeIntegrationRequest;
|
|
137
|
+
export type UpsertIntegrationRequest = UpsertDataIntegrationRequest | UpsertGraphQLIntegrationRequest | UpsertApiIntegrationRequest | UpsertAiAssistantIntegrationRequest;
|
|
138
|
+
export type UpsertDataIntegrationRequest = UpsertInternalIntegrationRequest | UpsertMongoDbIntegrationRequest | UpsertMssqlIntegrationRequest | UpsertMySqlIntegrationRequest | UpsertOracleIntegrationRequest | UpsertPostgresIntegrationRequest | UpsertCockroachIntegrationRequest | UpsertSnowflakeIntegrationRequest;
|
|
139
139
|
interface BaseUpsertIntegrationRequest {
|
|
140
140
|
id: IntegrationId;
|
|
141
141
|
type: IntegrationType;
|
|
@@ -161,6 +161,13 @@ export interface UpsertMySqlIntegrationRequest extends BaseUpsertDataIntegration
|
|
|
161
161
|
connectionOptions: MySqlConnectionOptions;
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
+
export interface UpsertOracleIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
165
|
+
type: IntegrationType.oracledb;
|
|
166
|
+
schema?: IntegrationDataSchema;
|
|
167
|
+
configuration: {
|
|
168
|
+
connectionOptions: OracleConnectionOptions;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
164
171
|
export interface UpsertMssqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
|
|
165
172
|
type: IntegrationType.mssql;
|
|
166
173
|
schema?: IntegrationDataSchema;
|
|
@@ -203,6 +210,11 @@ export interface UpsertApiIntegrationRequest extends BaseUpsertIntegrationReques
|
|
|
203
210
|
discoveryOptions: OpenApiDiscoveryOptions;
|
|
204
211
|
};
|
|
205
212
|
}
|
|
213
|
+
export interface UpsertAiAssistantIntegrationRequest extends BaseUpsertIntegrationRequest {
|
|
214
|
+
type: IntegrationType.ai_assistant;
|
|
215
|
+
schema?: IntegrationAiAssistantSchema;
|
|
216
|
+
configuration: AiAssistantConfiguration;
|
|
217
|
+
}
|
|
206
218
|
export interface DeleteIntegrationRequest {
|
|
207
219
|
integrationId: IntegrationId;
|
|
208
220
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { QueryName, SchedulerConfig, SchedulerId, TriggerConfig, TriggerId, WebhookConfig, WebhookId } from './application.types';
|
|
2
2
|
import { IntegrationId } from './communication.types';
|
|
3
3
|
import { CollectionName } from './document.types';
|
|
4
|
-
import { ApiEndpointId } from './
|
|
4
|
+
import { ApiEndpointId } from './integrations';
|
|
5
5
|
export type ActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
6
6
|
export type ServiceName = string;
|
|
7
7
|
export type FunctionName = string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './ai-assistant.schemas';
|
|
2
|
+
export * from './ai-assistant.types';
|
|
1
3
|
export * from './api-call.context';
|
|
2
4
|
export * from './api.types';
|
|
3
5
|
export * from './application.schemas';
|
|
@@ -15,7 +17,7 @@ export * from './document.types';
|
|
|
15
17
|
export * from './graphql.context';
|
|
16
18
|
export * from './graphql.types';
|
|
17
19
|
export * from './http-status.enum';
|
|
18
|
-
export * from './
|
|
20
|
+
export * from './integrations';
|
|
19
21
|
export * from './logger.types';
|
|
20
22
|
export * from './metrics.types';
|
|
21
23
|
export * from './mutation.context';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseIntegrationConfig, IntegrationType } from './index';
|
|
2
|
+
import { IntegrationId } from '../communication.types';
|
|
3
|
+
export interface AiAssistantIntegrationConfig extends BaseIntegrationConfig {
|
|
4
|
+
type: IntegrationType.ai_assistant;
|
|
5
|
+
configuration: AiAssistantConfiguration;
|
|
6
|
+
schema: IntegrationAiAssistantSchema;
|
|
7
|
+
}
|
|
8
|
+
export type AiAssistantConfiguration = {
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
};
|
|
11
|
+
export type AiAssistantProfile = {
|
|
12
|
+
modelName: string;
|
|
13
|
+
strictContext: boolean;
|
|
14
|
+
instructions: Record<string, string>;
|
|
15
|
+
contexts: Record<string, AiAssistantContext>;
|
|
16
|
+
};
|
|
17
|
+
export type AiAssistantContext = {
|
|
18
|
+
title: string;
|
|
19
|
+
text: string;
|
|
20
|
+
preview: boolean;
|
|
21
|
+
};
|
|
22
|
+
export interface IntegrationAiAssistantSchema {
|
|
23
|
+
profiles: Record<string, AiAssistantProfile>;
|
|
24
|
+
}
|
|
25
|
+
export interface DiscoverAiAssistantSchemaRequest {
|
|
26
|
+
integrationId: IntegrationId;
|
|
27
|
+
}
|
|
28
|
+
export interface DiscoverAiAssistantSchemaResponse {
|
|
29
|
+
schema: IntegrationAiAssistantSchema;
|
|
30
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { FieldName } from '../document.types';
|
|
2
|
+
import { IntrospectionQuery } from '../graphql.types';
|
|
3
|
+
import { BaseIntegrationConfig, IntegrationType } from './index';
|
|
4
|
+
export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
|
|
5
|
+
export type ApiEndpointId = string;
|
|
6
|
+
export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
|
|
7
|
+
export type ApiResponseParameterLocation = 'header' | 'body';
|
|
8
|
+
export type ApiInjectionParameterLocation = 'header' | 'query';
|
|
9
|
+
export type FieldPath = string;
|
|
10
|
+
export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
11
|
+
export interface IntegrationGraphQLSchema {
|
|
12
|
+
introspection: IntrospectionQuery;
|
|
13
|
+
}
|
|
14
|
+
export interface IntegrationApiSchema {
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
endpoints: IntegrationApiEndpoints;
|
|
17
|
+
injectionSchema?: ApiInjectionSchema;
|
|
18
|
+
}
|
|
19
|
+
export interface ApiRequestField {
|
|
20
|
+
location: ApiParameterLocation;
|
|
21
|
+
}
|
|
22
|
+
export interface ApiResponseField {
|
|
23
|
+
location: ApiResponseParameterLocation;
|
|
24
|
+
path?: FieldPath;
|
|
25
|
+
}
|
|
26
|
+
export type ApiInjectionFieldType = 'secret' | 'regular';
|
|
27
|
+
export interface ApiInjectionField {
|
|
28
|
+
value: string;
|
|
29
|
+
type: ApiInjectionFieldType;
|
|
30
|
+
location: ApiInjectionParameterLocation;
|
|
31
|
+
}
|
|
32
|
+
export interface GraphQLConnectionOptions {
|
|
33
|
+
baseUrl: string;
|
|
34
|
+
injectionSchema?: ApiInjectionSchema;
|
|
35
|
+
}
|
|
36
|
+
export type ApiInjectionSchema = Record<FieldName, ApiInjectionField>;
|
|
37
|
+
export interface OpenApiDiscoveryOptions {
|
|
38
|
+
openApiSpecUrl: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ApiEndpoint {
|
|
41
|
+
relativePath: string;
|
|
42
|
+
method: HttpMethod;
|
|
43
|
+
requestSchema?: Record<FieldName, ApiRequestField>;
|
|
44
|
+
responseSchema?: Record<FieldPath, ApiResponseField>;
|
|
45
|
+
injectionSchema?: ApiInjectionSchema;
|
|
46
|
+
}
|
|
47
|
+
export interface HttpApiIntegrationConfig extends BaseIntegrationConfig {
|
|
48
|
+
type: IntegrationType.api;
|
|
49
|
+
configuration?: {
|
|
50
|
+
discoveryOptions: OpenApiDiscoveryOptions;
|
|
51
|
+
};
|
|
52
|
+
schema: IntegrationApiSchema;
|
|
53
|
+
}
|
|
54
|
+
export interface GraphQLIntegrationConfig extends BaseIntegrationConfig {
|
|
55
|
+
type: IntegrationType.graphql;
|
|
56
|
+
schema?: IntegrationGraphQLSchema;
|
|
57
|
+
configuration: {
|
|
58
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export interface DiscoverGraphQLConnectionSchemaRequest {
|
|
62
|
+
integrationType: IntegrationType.graphql;
|
|
63
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
64
|
+
}
|
|
65
|
+
export interface DiscoverOpenApiSchemaRequest {
|
|
66
|
+
integrationType: IntegrationType.api;
|
|
67
|
+
discoveryOptions: OpenApiDiscoveryOptions;
|
|
68
|
+
}
|
|
69
|
+
export interface TestGraphQLDataConnectionRequest {
|
|
70
|
+
type: IntegrationType.graphql;
|
|
71
|
+
configuration: {
|
|
72
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export interface DiscoverGraphQLConnectionSchemaResponse {
|
|
76
|
+
schema: IntegrationGraphQLSchema;
|
|
77
|
+
}
|
|
78
|
+
export interface DiscoverOpenApiSchemaResponse {
|
|
79
|
+
schema: IntegrationApiSchema;
|
|
80
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Validations } from '../auth.types';
|
|
2
|
+
import { BaseIntegrationConfig, IntegrationType } from './index';
|
|
3
|
+
export interface Auth0IntegrationConfig extends BaseIntegrationConfig {
|
|
4
|
+
type: IntegrationType.auth0;
|
|
5
|
+
configuration: {
|
|
6
|
+
clientId: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface JwtRsaIntegrationConfig extends BaseIntegrationConfig {
|
|
11
|
+
type: IntegrationType.jwt_rsa;
|
|
12
|
+
configuration: {
|
|
13
|
+
jwksUri: string;
|
|
14
|
+
validations?: Validations;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface JwtHmacIntegrationConfig extends BaseIntegrationConfig {
|
|
18
|
+
type: IntegrationType.jwt_hmac;
|
|
19
|
+
configuration: {
|
|
20
|
+
verifyUri?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|