@squidcloud/client 1.0.34 → 1.0.35
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/api-call.context.d.ts +12 -12
- package/dist/common/src/api.types.d.ts +23 -23
- package/dist/common/src/application.schemas.d.ts +883 -883
- package/dist/common/src/application.types.d.ts +205 -205
- package/dist/common/src/backend-function.schemas.d.ts +3 -3
- package/dist/common/src/backend-function.types.d.ts +7 -7
- package/dist/common/src/backend-run.types.d.ts +66 -66
- package/dist/common/src/bundle-api.types.d.ts +64 -64
- package/dist/common/src/bundle-data.types.d.ts +46 -46
- package/dist/common/src/communication.types.d.ts +4 -4
- package/dist/common/src/context.types.d.ts +31 -31
- package/dist/common/src/document.types.d.ts +35 -35
- package/dist/common/src/graphql.context.d.ts +6 -6
- package/dist/common/src/graphql.types.d.ts +16 -16
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +49 -49
- package/dist/common/src/integration.types.d.ts +316 -319
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/metrics.types.d.ts +58 -58
- package/dist/common/src/mutation.context.d.ts +10 -10
- package/dist/common/src/mutation.schemas.d.ts +5 -5
- package/dist/common/src/mutation.types.d.ts +72 -72
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.schemas.d.ts +3 -3
- package/dist/common/src/named-query.types.d.ts +9 -9
- package/dist/common/src/query/index.d.ts +2 -2
- package/dist/common/src/query/query-context.d.ts +37 -37
- package/dist/common/src/query/simple-query-builder.d.ts +90 -90
- package/dist/common/src/query.schemas.d.ts +5 -5
- package/dist/common/src/query.types.d.ts +118 -118
- package/dist/common/src/regions.d.ts +22 -22
- package/dist/common/src/schema/schema.types.d.ts +54 -54
- package/dist/common/src/secret.schemas.d.ts +6 -6
- package/dist/common/src/secret.types.d.ts +40 -40
- package/dist/common/src/security.types.d.ts +3 -3
- package/dist/common/src/socket.schemas.d.ts +3 -3
- package/dist/common/src/socket.types.d.ts +68 -68
- package/dist/common/src/time-units.d.ts +5 -5
- package/dist/common/src/trigger.types.d.ts +15 -15
- package/dist/common/src/types.d.ts +15 -15
- package/dist/common/src/utils/array.d.ts +8 -8
- package/dist/common/src/utils/assert.d.ts +8 -8
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/lock.manager.d.ts +14 -14
- package/dist/common/src/utils/nullish.d.ts +1 -1
- package/dist/common/src/utils/object.d.ts +6 -6
- package/dist/common/src/utils/serialization.d.ts +6 -6
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/validation.d.ts +30 -30
- package/dist/common/src/webhook-response.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/api.manager.d.ts +14 -14
- package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
- package/dist/typescript-client/src/collection-reference.d.ts +53 -53
- package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
- package/dist/typescript-client/src/data.manager.d.ts +166 -166
- package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +100 -100
- package/dist/typescript-client/src/document-reference.factory.d.ts +9 -9
- package/dist/typescript-client/src/document-store.d.ts +11 -11
- package/dist/typescript-client/src/graphql-client.d.ts +12 -12
- package/dist/typescript-client/src/graphql-client.factory.d.ts +9 -9
- package/dist/typescript-client/src/index.d.ts +7 -7
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +11 -11
- package/dist/typescript-client/src/mutation/mutation.spec.d.ts +1 -1
- package/dist/typescript-client/src/named-query.manager.d.ts +13 -13
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +71 -71
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +67 -60
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +59 -59
- package/dist/typescript-client/src/query/query-subscription.manager.spec.d.ts +1 -1
- package/dist/typescript-client/src/query/query.spec.d.ts +1 -1
- package/dist/typescript-client/src/query/query.types.d.ts +14 -14
- package/dist/typescript-client/src/rpc.manager.d.ts +30 -30
- package/dist/typescript-client/src/socket.manager.d.ts +27 -27
- package/dist/typescript-client/src/squid.d.ts +173 -173
- package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
- package/dist/typescript-client/src/state/actions.d.ts +29 -29
- package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
- package/dist/typescript-client/src/state/state.service.d.ts +22 -22
- package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
- package/dist/typescript-client/src/testing/fake-rpc.manager.d.ts +20 -20
- package/dist/typescript-client/src/testing/fake-socket.manager.d.ts +9 -9
- package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
- package/dist/typescript-client/src/testing/squid-env-setup.d.ts +79 -79
- package/dist/typescript-client/src/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,319 +1,316 @@
|
|
|
1
|
-
import { IntegrationId } from './communication.types';
|
|
2
|
-
import { FieldName } from './document.types';
|
|
3
|
-
import { IntrospectionQuery } from './graphql.types';
|
|
4
|
-
import { CollectionSchema } from './schema/schema.types';
|
|
5
|
-
export interface MongoConnectionSecretOptions {
|
|
6
|
-
password?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface MongoConnectionOptions {
|
|
9
|
-
secrets: MongoConnectionSecretOptions;
|
|
10
|
-
connectionString: string;
|
|
11
|
-
user?: string;
|
|
12
|
-
replicaSet?: string;
|
|
13
|
-
ssl?: {
|
|
14
|
-
certificateFile: string;
|
|
15
|
-
validate: boolean;
|
|
16
|
-
};
|
|
17
|
-
maxPoolSize?: number;
|
|
18
|
-
minPoolSize?: number;
|
|
19
|
-
socketTimeoutMS?: number;
|
|
20
|
-
serverSelectionTimeoutMS?: number;
|
|
21
|
-
keepAlive?: boolean;
|
|
22
|
-
directConnection?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface MySqlConnectionSecretOptions {
|
|
25
|
-
password: string;
|
|
26
|
-
}
|
|
27
|
-
export interface MssqlConnectionSecretOptions {
|
|
28
|
-
password: string;
|
|
29
|
-
}
|
|
30
|
-
export interface PostgresConnectionSecretOptions {
|
|
31
|
-
password: string;
|
|
32
|
-
sslCertificate?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface MySqlConnectionOptions {
|
|
35
|
-
secrets: MySqlConnectionSecretOptions;
|
|
36
|
-
host: string;
|
|
37
|
-
user: string;
|
|
38
|
-
database: string;
|
|
39
|
-
connectionLimit?: number;
|
|
40
|
-
sslEnabled?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface MssqlConnectionOptions {
|
|
43
|
-
secrets: MssqlConnectionSecretOptions;
|
|
44
|
-
host: string;
|
|
45
|
-
user: string;
|
|
46
|
-
schema: string;
|
|
47
|
-
database: string;
|
|
48
|
-
connectionLimit?: number;
|
|
49
|
-
sslEnabled?: boolean;
|
|
50
|
-
}
|
|
51
|
-
export interface PostgresConnectionOptions {
|
|
52
|
-
host: string;
|
|
53
|
-
user: string;
|
|
54
|
-
database: string;
|
|
55
|
-
schema?: string;
|
|
56
|
-
sslEnabled?: boolean;
|
|
57
|
-
secrets: PostgresConnectionSecretOptions;
|
|
58
|
-
}
|
|
59
|
-
export interface GraphQLConnectionOptions {
|
|
60
|
-
baseUrl: string;
|
|
61
|
-
}
|
|
62
|
-
export interface OpenApiDiscoveryOptions {
|
|
63
|
-
openApiSpecUrl: string;
|
|
64
|
-
}
|
|
65
|
-
export interface SnowflakeConnectionSecretOptions {
|
|
66
|
-
password: string;
|
|
67
|
-
}
|
|
68
|
-
export interface SnowflakeConnectionOptions {
|
|
69
|
-
secrets: SnowflakeConnectionSecretOptions;
|
|
70
|
-
account: string;
|
|
71
|
-
username: string;
|
|
72
|
-
database: string;
|
|
73
|
-
schema: string;
|
|
74
|
-
warehouse: string;
|
|
75
|
-
role: string;
|
|
76
|
-
}
|
|
77
|
-
export declare enum IntegrationType {
|
|
78
|
-
'built_in_db' = "built_in_db",
|
|
79
|
-
'mongo' = "mongo",
|
|
80
|
-
'mysql' = "mysql",
|
|
81
|
-
'mssql' = "mssql",
|
|
82
|
-
'postgres' = "postgres",
|
|
83
|
-
'cockroach' = "cockroach",
|
|
84
|
-
'api' = "api",
|
|
85
|
-
'graphql' = "graphql",
|
|
86
|
-
'snowflake' = "snowflake",
|
|
87
|
-
'datadog' = "datadog",
|
|
88
|
-
'newrelic' = "newrelic"
|
|
89
|
-
}
|
|
90
|
-
export type
|
|
91
|
-
export type
|
|
92
|
-
type TableName = string;
|
|
93
|
-
export interface IntegrationDataSchema {
|
|
94
|
-
collections: Record<TableName, CollectionSchema>;
|
|
95
|
-
}
|
|
96
|
-
export interface IntegrationGraphQLSchema {
|
|
97
|
-
introspection: IntrospectionQuery;
|
|
98
|
-
injectionSchema?: Record<FieldName, ApiInjectionField>;
|
|
99
|
-
}
|
|
100
|
-
export interface IntegrationApiSchema {
|
|
101
|
-
baseUrl: string;
|
|
102
|
-
endpoints: IntegrationApiEndpoints;
|
|
103
|
-
injectionSchema?: Record<FieldName, ApiInjectionField>;
|
|
104
|
-
}
|
|
105
|
-
export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
106
|
-
export type IntegrationSchema = IntegrationDataSchema | IntegrationGraphQLSchema;
|
|
107
|
-
interface
|
|
108
|
-
id: IntegrationId;
|
|
109
|
-
type: IntegrationType;
|
|
110
|
-
creationDate: Date;
|
|
111
|
-
updateDate: Date;
|
|
112
|
-
}
|
|
113
|
-
export interface
|
|
114
|
-
type: IntegrationType.datadog;
|
|
115
|
-
configuration: DatadogIntegrationConfiguration;
|
|
116
|
-
}
|
|
117
|
-
export interface
|
|
118
|
-
type: IntegrationType.newrelic;
|
|
119
|
-
configuration: NewRelicIntegrationConfiguration;
|
|
120
|
-
}
|
|
121
|
-
export type DatadogRegion = 'us1' | 'us3' | 'us5' | 'eu1' | 'us1-fed';
|
|
122
|
-
export declare const datadogRegionMap: Record<DatadogRegion, string>;
|
|
123
|
-
export interface DatadogIntegrationConfiguration {
|
|
124
|
-
apiKey: string;
|
|
125
|
-
appKey: string;
|
|
126
|
-
datadogRegion: DatadogRegion;
|
|
127
|
-
}
|
|
128
|
-
export type NewRelicRegion = 'worldwide' | 'eu';
|
|
129
|
-
export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
|
|
130
|
-
export interface NewRelicIntegrationConfiguration {
|
|
131
|
-
apiKey: string;
|
|
132
|
-
newRelicRegion: NewRelicRegion;
|
|
133
|
-
}
|
|
134
|
-
export interface
|
|
135
|
-
schema?: IntegrationDataSchema;
|
|
136
|
-
supportsExternalChanges: boolean;
|
|
137
|
-
}
|
|
138
|
-
export declare function isDataIntegration(integration: any): integration is
|
|
139
|
-
export declare function isDataIntegrationType(type: IntegrationType): boolean;
|
|
140
|
-
export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
|
|
141
|
-
export type ApiEndpointId = string;
|
|
142
|
-
export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
|
|
143
|
-
export type ApiResponseParameterLocation = 'header' | 'body';
|
|
144
|
-
export type ApiInjectionParameterLocation = 'header';
|
|
145
|
-
export type FieldPath = string;
|
|
146
|
-
export interface ApiRequestField {
|
|
147
|
-
location: ApiParameterLocation;
|
|
148
|
-
}
|
|
149
|
-
export interface ApiResponseField {
|
|
150
|
-
location: ApiResponseParameterLocation;
|
|
151
|
-
path?: FieldPath;
|
|
152
|
-
}
|
|
153
|
-
export type ApiInjectionFieldType = 'secret' | 'regular';
|
|
154
|
-
export interface ApiInjectionField {
|
|
155
|
-
value: string;
|
|
156
|
-
type: ApiInjectionFieldType;
|
|
157
|
-
location: ApiInjectionParameterLocation;
|
|
158
|
-
}
|
|
159
|
-
export interface ApiEndpoint {
|
|
160
|
-
relativePath: string;
|
|
161
|
-
method: HttpMethod;
|
|
162
|
-
requestSchema?: Record<FieldName, ApiRequestField>;
|
|
163
|
-
responseSchema?: Record<FieldPath, ApiResponseField>;
|
|
164
|
-
injectionSchema?: Record<FieldName, ApiInjectionField>;
|
|
165
|
-
}
|
|
166
|
-
export interface
|
|
167
|
-
type: IntegrationType.api;
|
|
168
|
-
configuration?: {
|
|
169
|
-
discoveryOptions: OpenApiDiscoveryOptions;
|
|
170
|
-
};
|
|
171
|
-
schema: IntegrationApiSchema;
|
|
172
|
-
}
|
|
173
|
-
export interface
|
|
174
|
-
type: IntegrationType.graphql;
|
|
175
|
-
schema?: IntegrationGraphQLSchema;
|
|
176
|
-
configuration: {
|
|
177
|
-
connectionOptions: GraphQLConnectionOptions;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
export interface MySqlIntegrationConfiguration {
|
|
181
|
-
connectionOptions: MySqlConnectionOptions;
|
|
182
|
-
}
|
|
183
|
-
export interface MssqlIntegrationConfiguration {
|
|
184
|
-
connectionOptions: MssqlConnectionOptions;
|
|
185
|
-
}
|
|
186
|
-
export interface PostgresIntegrationConfiguration {
|
|
187
|
-
connectionOptions: PostgresConnectionOptions;
|
|
188
|
-
}
|
|
189
|
-
export interface MongoIntegrationConfiguration {
|
|
190
|
-
connectionOptions: MongoConnectionOptions;
|
|
191
|
-
}
|
|
192
|
-
export interface SnowflakeIntegrationConfiguration {
|
|
193
|
-
connectionOptions: SnowflakeConnectionOptions;
|
|
194
|
-
}
|
|
195
|
-
export interface
|
|
196
|
-
type: IntegrationType.mysql;
|
|
197
|
-
configuration: MySqlIntegrationConfiguration;
|
|
198
|
-
schema: IntegrationDataSchema;
|
|
199
|
-
}
|
|
200
|
-
export interface
|
|
201
|
-
type: IntegrationType.mssql;
|
|
202
|
-
configuration: MssqlIntegrationConfiguration;
|
|
203
|
-
schema: IntegrationDataSchema;
|
|
204
|
-
}
|
|
205
|
-
export interface BasePostgresIntegration extends
|
|
206
|
-
type: IntegrationType.postgres | IntegrationType.cockroach;
|
|
207
|
-
configuration: PostgresIntegrationConfiguration;
|
|
208
|
-
schema: IntegrationDataSchema;
|
|
209
|
-
}
|
|
210
|
-
export interface
|
|
211
|
-
type: IntegrationType.postgres;
|
|
212
|
-
}
|
|
213
|
-
export interface
|
|
214
|
-
type: IntegrationType.cockroach;
|
|
215
|
-
supportsExternalChanges: false;
|
|
216
|
-
}
|
|
217
|
-
export interface
|
|
218
|
-
type: IntegrationType.built_in_db;
|
|
219
|
-
}
|
|
220
|
-
export interface
|
|
221
|
-
type: IntegrationType.mongo;
|
|
222
|
-
configuration: MongoIntegrationConfiguration;
|
|
223
|
-
}
|
|
224
|
-
export interface
|
|
225
|
-
type: IntegrationType.snowflake;
|
|
226
|
-
configuration: SnowflakeIntegrationConfiguration;
|
|
227
|
-
schema: IntegrationDataSchema;
|
|
228
|
-
supportsExternalChanges: false;
|
|
229
|
-
}
|
|
230
|
-
export interface
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
export interface
|
|
275
|
-
schema:
|
|
276
|
-
}
|
|
277
|
-
export interface
|
|
278
|
-
schema:
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
interface
|
|
288
|
-
integrationType: IntegrationType.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
discoveryOptions: OpenApiDiscoveryOptions;
|
|
318
|
-
}
|
|
319
|
-
export {};
|
|
1
|
+
import { IntegrationId } from './communication.types';
|
|
2
|
+
import { FieldName } from './document.types';
|
|
3
|
+
import { IntrospectionQuery } from './graphql.types';
|
|
4
|
+
import { CollectionSchema } from './schema/schema.types';
|
|
5
|
+
export interface MongoConnectionSecretOptions {
|
|
6
|
+
password?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MongoConnectionOptions {
|
|
9
|
+
secrets: MongoConnectionSecretOptions;
|
|
10
|
+
connectionString: string;
|
|
11
|
+
user?: string;
|
|
12
|
+
replicaSet?: string;
|
|
13
|
+
ssl?: {
|
|
14
|
+
certificateFile: string;
|
|
15
|
+
validate: boolean;
|
|
16
|
+
};
|
|
17
|
+
maxPoolSize?: number;
|
|
18
|
+
minPoolSize?: number;
|
|
19
|
+
socketTimeoutMS?: number;
|
|
20
|
+
serverSelectionTimeoutMS?: number;
|
|
21
|
+
keepAlive?: boolean;
|
|
22
|
+
directConnection?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface MySqlConnectionSecretOptions {
|
|
25
|
+
password: string;
|
|
26
|
+
}
|
|
27
|
+
export interface MssqlConnectionSecretOptions {
|
|
28
|
+
password: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PostgresConnectionSecretOptions {
|
|
31
|
+
password: string;
|
|
32
|
+
sslCertificate?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface MySqlConnectionOptions {
|
|
35
|
+
secrets: MySqlConnectionSecretOptions;
|
|
36
|
+
host: string;
|
|
37
|
+
user: string;
|
|
38
|
+
database: string;
|
|
39
|
+
connectionLimit?: number;
|
|
40
|
+
sslEnabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface MssqlConnectionOptions {
|
|
43
|
+
secrets: MssqlConnectionSecretOptions;
|
|
44
|
+
host: string;
|
|
45
|
+
user: string;
|
|
46
|
+
schema: string;
|
|
47
|
+
database: string;
|
|
48
|
+
connectionLimit?: number;
|
|
49
|
+
sslEnabled?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface PostgresConnectionOptions {
|
|
52
|
+
host: string;
|
|
53
|
+
user: string;
|
|
54
|
+
database: string;
|
|
55
|
+
schema?: string;
|
|
56
|
+
sslEnabled?: boolean;
|
|
57
|
+
secrets: PostgresConnectionSecretOptions;
|
|
58
|
+
}
|
|
59
|
+
export interface GraphQLConnectionOptions {
|
|
60
|
+
baseUrl: string;
|
|
61
|
+
}
|
|
62
|
+
export interface OpenApiDiscoveryOptions {
|
|
63
|
+
openApiSpecUrl: string;
|
|
64
|
+
}
|
|
65
|
+
export interface SnowflakeConnectionSecretOptions {
|
|
66
|
+
password: string;
|
|
67
|
+
}
|
|
68
|
+
export interface SnowflakeConnectionOptions {
|
|
69
|
+
secrets: SnowflakeConnectionSecretOptions;
|
|
70
|
+
account: string;
|
|
71
|
+
username: string;
|
|
72
|
+
database: string;
|
|
73
|
+
schema: string;
|
|
74
|
+
warehouse: string;
|
|
75
|
+
role: string;
|
|
76
|
+
}
|
|
77
|
+
export declare enum IntegrationType {
|
|
78
|
+
'built_in_db' = "built_in_db",
|
|
79
|
+
'mongo' = "mongo",
|
|
80
|
+
'mysql' = "mysql",
|
|
81
|
+
'mssql' = "mssql",
|
|
82
|
+
'postgres' = "postgres",
|
|
83
|
+
'cockroach' = "cockroach",
|
|
84
|
+
'api' = "api",
|
|
85
|
+
'graphql' = "graphql",
|
|
86
|
+
'snowflake' = "snowflake",
|
|
87
|
+
'datadog' = "datadog",
|
|
88
|
+
'newrelic' = "newrelic"
|
|
89
|
+
}
|
|
90
|
+
export type DatabaseIntegrationConfig = MySqlIntegrationConfig | MssqlIntegrationConfig | MongoIntegrationConfig | InternalIntegrationConfig | PostgresIntegrationConfig | CockroachIntegrationConfig | SnowflakeIntegrationConfig;
|
|
91
|
+
export type IntegrationConfig = DatabaseIntegrationConfig | ApiIntegrationConfig | GraphQLIntegrationConfig | DatadogIntegrationConfig | NewRelicIntegrationConfig;
|
|
92
|
+
type TableName = string;
|
|
93
|
+
export interface IntegrationDataSchema {
|
|
94
|
+
collections: Record<TableName, CollectionSchema>;
|
|
95
|
+
}
|
|
96
|
+
export interface IntegrationGraphQLSchema {
|
|
97
|
+
introspection: IntrospectionQuery;
|
|
98
|
+
injectionSchema?: Record<FieldName, ApiInjectionField>;
|
|
99
|
+
}
|
|
100
|
+
export interface IntegrationApiSchema {
|
|
101
|
+
baseUrl: string;
|
|
102
|
+
endpoints: IntegrationApiEndpoints;
|
|
103
|
+
injectionSchema?: Record<FieldName, ApiInjectionField>;
|
|
104
|
+
}
|
|
105
|
+
export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
106
|
+
export type IntegrationSchema = IntegrationDataSchema | IntegrationGraphQLSchema;
|
|
107
|
+
interface BaseIntegrationConfig {
|
|
108
|
+
id: IntegrationId;
|
|
109
|
+
type: IntegrationType;
|
|
110
|
+
creationDate: Date;
|
|
111
|
+
updateDate: Date;
|
|
112
|
+
}
|
|
113
|
+
export interface DatadogIntegrationConfig extends BaseIntegrationConfig {
|
|
114
|
+
type: IntegrationType.datadog;
|
|
115
|
+
configuration: DatadogIntegrationConfiguration;
|
|
116
|
+
}
|
|
117
|
+
export interface NewRelicIntegrationConfig extends BaseIntegrationConfig {
|
|
118
|
+
type: IntegrationType.newrelic;
|
|
119
|
+
configuration: NewRelicIntegrationConfiguration;
|
|
120
|
+
}
|
|
121
|
+
export type DatadogRegion = 'us1' | 'us3' | 'us5' | 'eu1' | 'us1-fed';
|
|
122
|
+
export declare const datadogRegionMap: Record<DatadogRegion, string>;
|
|
123
|
+
export interface DatadogIntegrationConfiguration {
|
|
124
|
+
apiKey: string;
|
|
125
|
+
appKey: string;
|
|
126
|
+
datadogRegion: DatadogRegion;
|
|
127
|
+
}
|
|
128
|
+
export type NewRelicRegion = 'worldwide' | 'eu';
|
|
129
|
+
export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
|
|
130
|
+
export interface NewRelicIntegrationConfiguration {
|
|
131
|
+
apiKey: string;
|
|
132
|
+
newRelicRegion: NewRelicRegion;
|
|
133
|
+
}
|
|
134
|
+
export interface BaseDatabaseIntegrationConfig extends BaseIntegrationConfig {
|
|
135
|
+
schema?: IntegrationDataSchema;
|
|
136
|
+
supportsExternalChanges: boolean;
|
|
137
|
+
}
|
|
138
|
+
export declare function isDataIntegration(integration: any): integration is BaseDatabaseIntegrationConfig;
|
|
139
|
+
export declare function isDataIntegrationType(type: IntegrationType): boolean;
|
|
140
|
+
export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
|
|
141
|
+
export type ApiEndpointId = string;
|
|
142
|
+
export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
|
|
143
|
+
export type ApiResponseParameterLocation = 'header' | 'body';
|
|
144
|
+
export type ApiInjectionParameterLocation = 'header';
|
|
145
|
+
export type FieldPath = string;
|
|
146
|
+
export interface ApiRequestField {
|
|
147
|
+
location: ApiParameterLocation;
|
|
148
|
+
}
|
|
149
|
+
export interface ApiResponseField {
|
|
150
|
+
location: ApiResponseParameterLocation;
|
|
151
|
+
path?: FieldPath;
|
|
152
|
+
}
|
|
153
|
+
export type ApiInjectionFieldType = 'secret' | 'regular';
|
|
154
|
+
export interface ApiInjectionField {
|
|
155
|
+
value: string;
|
|
156
|
+
type: ApiInjectionFieldType;
|
|
157
|
+
location: ApiInjectionParameterLocation;
|
|
158
|
+
}
|
|
159
|
+
export interface ApiEndpoint {
|
|
160
|
+
relativePath: string;
|
|
161
|
+
method: HttpMethod;
|
|
162
|
+
requestSchema?: Record<FieldName, ApiRequestField>;
|
|
163
|
+
responseSchema?: Record<FieldPath, ApiResponseField>;
|
|
164
|
+
injectionSchema?: Record<FieldName, ApiInjectionField>;
|
|
165
|
+
}
|
|
166
|
+
export interface ApiIntegrationConfig extends BaseIntegrationConfig {
|
|
167
|
+
type: IntegrationType.api;
|
|
168
|
+
configuration?: {
|
|
169
|
+
discoveryOptions: OpenApiDiscoveryOptions;
|
|
170
|
+
};
|
|
171
|
+
schema: IntegrationApiSchema;
|
|
172
|
+
}
|
|
173
|
+
export interface GraphQLIntegrationConfig extends BaseIntegrationConfig {
|
|
174
|
+
type: IntegrationType.graphql;
|
|
175
|
+
schema?: IntegrationGraphQLSchema;
|
|
176
|
+
configuration: {
|
|
177
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export interface MySqlIntegrationConfiguration {
|
|
181
|
+
connectionOptions: MySqlConnectionOptions;
|
|
182
|
+
}
|
|
183
|
+
export interface MssqlIntegrationConfiguration {
|
|
184
|
+
connectionOptions: MssqlConnectionOptions;
|
|
185
|
+
}
|
|
186
|
+
export interface PostgresIntegrationConfiguration {
|
|
187
|
+
connectionOptions: PostgresConnectionOptions;
|
|
188
|
+
}
|
|
189
|
+
export interface MongoIntegrationConfiguration {
|
|
190
|
+
connectionOptions: MongoConnectionOptions;
|
|
191
|
+
}
|
|
192
|
+
export interface SnowflakeIntegrationConfiguration {
|
|
193
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
194
|
+
}
|
|
195
|
+
export interface MySqlIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
196
|
+
type: IntegrationType.mysql;
|
|
197
|
+
configuration: MySqlIntegrationConfiguration;
|
|
198
|
+
schema: IntegrationDataSchema;
|
|
199
|
+
}
|
|
200
|
+
export interface MssqlIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
201
|
+
type: IntegrationType.mssql;
|
|
202
|
+
configuration: MssqlIntegrationConfiguration;
|
|
203
|
+
schema: IntegrationDataSchema;
|
|
204
|
+
}
|
|
205
|
+
export interface BasePostgresIntegration extends BaseDatabaseIntegrationConfig {
|
|
206
|
+
type: IntegrationType.postgres | IntegrationType.cockroach;
|
|
207
|
+
configuration: PostgresIntegrationConfiguration;
|
|
208
|
+
schema: IntegrationDataSchema;
|
|
209
|
+
}
|
|
210
|
+
export interface PostgresIntegrationConfig extends BasePostgresIntegration {
|
|
211
|
+
type: IntegrationType.postgres;
|
|
212
|
+
}
|
|
213
|
+
export interface CockroachIntegrationConfig extends BasePostgresIntegration {
|
|
214
|
+
type: IntegrationType.cockroach;
|
|
215
|
+
supportsExternalChanges: false;
|
|
216
|
+
}
|
|
217
|
+
export interface InternalIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
218
|
+
type: IntegrationType.built_in_db;
|
|
219
|
+
}
|
|
220
|
+
export interface MongoIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
221
|
+
type: IntegrationType.mongo;
|
|
222
|
+
configuration: MongoIntegrationConfiguration;
|
|
223
|
+
}
|
|
224
|
+
export interface SnowflakeIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
225
|
+
type: IntegrationType.snowflake;
|
|
226
|
+
configuration: SnowflakeIntegrationConfiguration;
|
|
227
|
+
schema: IntegrationDataSchema;
|
|
228
|
+
supportsExternalChanges: false;
|
|
229
|
+
}
|
|
230
|
+
export interface TestDataConnectionResponse {
|
|
231
|
+
success: boolean;
|
|
232
|
+
errorMessage?: string;
|
|
233
|
+
}
|
|
234
|
+
interface TestMongoDataConnectionRequest {
|
|
235
|
+
type: IntegrationType.mongo;
|
|
236
|
+
configuration: {
|
|
237
|
+
connectionOptions: MongoConnectionOptions;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
interface TestMysqlDataConnectionRequest {
|
|
241
|
+
type: IntegrationType.mysql;
|
|
242
|
+
configuration: {
|
|
243
|
+
connectionOptions: MySqlConnectionOptions;
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
interface TestMssqlDataConnectionRequest {
|
|
247
|
+
type: IntegrationType.mssql;
|
|
248
|
+
configuration: {
|
|
249
|
+
connectionOptions: MssqlConnectionOptions;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
interface TestPostgresDataConnectionRequest {
|
|
253
|
+
type: IntegrationType.postgres;
|
|
254
|
+
configuration: {
|
|
255
|
+
connectionOptions: PostgresConnectionOptions;
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
interface TestSnowflakeDataConnectionRequest {
|
|
259
|
+
type: IntegrationType.snowflake;
|
|
260
|
+
configuration: {
|
|
261
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
interface TestCockroachDataConnectionRequest {
|
|
265
|
+
type: IntegrationType.cockroach;
|
|
266
|
+
configuration: {
|
|
267
|
+
connectionOptions: PostgresConnectionOptions;
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
export type TestDataConnectionRequest = TestMongoDataConnectionRequest | TestMysqlDataConnectionRequest | TestMssqlDataConnectionRequest | TestCockroachDataConnectionRequest | TestPostgresDataConnectionRequest | TestSnowflakeDataConnectionRequest;
|
|
271
|
+
export interface DiscoverDataConnectionSchemaResponse {
|
|
272
|
+
schema: IntegrationDataSchema;
|
|
273
|
+
}
|
|
274
|
+
export interface DiscoverGraphQLConnectionSchemaResponse {
|
|
275
|
+
schema: IntegrationGraphQLSchema;
|
|
276
|
+
}
|
|
277
|
+
export interface DiscoverOpenApiSchemaResponse {
|
|
278
|
+
schema: IntegrationApiSchema;
|
|
279
|
+
}
|
|
280
|
+
interface DiscoverMongoDataConnectionSchemaRequest {
|
|
281
|
+
integrationType: IntegrationType.mongo;
|
|
282
|
+
connectionOptions: MongoConnectionOptions;
|
|
283
|
+
}
|
|
284
|
+
interface DiscoverInternalDataConnectionSchemaRequest {
|
|
285
|
+
integrationType: IntegrationType.built_in_db;
|
|
286
|
+
}
|
|
287
|
+
interface DiscoverMysqlDataConnectionSchemaRequest {
|
|
288
|
+
integrationType: IntegrationType.mysql;
|
|
289
|
+
connectionOptions: MySqlConnectionOptions;
|
|
290
|
+
}
|
|
291
|
+
interface DiscoverMssqlDataConnectionSchemaRequest {
|
|
292
|
+
integrationType: IntegrationType.mssql;
|
|
293
|
+
connectionOptions: MssqlConnectionOptions;
|
|
294
|
+
}
|
|
295
|
+
interface DiscoverPostgresDataConnectionSchemaRequest {
|
|
296
|
+
integrationType: IntegrationType.postgres;
|
|
297
|
+
connectionOptions: PostgresConnectionOptions;
|
|
298
|
+
}
|
|
299
|
+
interface DiscoverSnowflakeDataConnectionSchemaRequest {
|
|
300
|
+
integrationType: IntegrationType.snowflake;
|
|
301
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
302
|
+
}
|
|
303
|
+
interface DiscoverCockroachDataConnectionSchemaRequest {
|
|
304
|
+
integrationType: IntegrationType.cockroach;
|
|
305
|
+
connectionOptions: PostgresConnectionOptions;
|
|
306
|
+
}
|
|
307
|
+
export type DiscoverDataConnectionSchemaRequest = DiscoverMongoDataConnectionSchemaRequest | DiscoverInternalDataConnectionSchemaRequest | DiscoverMysqlDataConnectionSchemaRequest | DiscoverMssqlDataConnectionSchemaRequest | DiscoverCockroachDataConnectionSchemaRequest | DiscoverPostgresDataConnectionSchemaRequest | DiscoverSnowflakeDataConnectionSchemaRequest;
|
|
308
|
+
export interface DiscoverGraphQLConnectionSchemaRequest {
|
|
309
|
+
integrationType: IntegrationType.graphql;
|
|
310
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
311
|
+
}
|
|
312
|
+
export interface DiscoverOpenApiSchemaRequest {
|
|
313
|
+
integrationType: IntegrationType.api;
|
|
314
|
+
discoveryOptions: OpenApiDiscoveryOptions;
|
|
315
|
+
}
|
|
316
|
+
export {};
|