@squidcloud/client 1.0.32 → 1.0.34
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 -896
- package/dist/common/src/application.types.d.ts +205 -202
- 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 +319 -328
- 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 -23
- 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 -0
- 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 +2 -2
- 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 -51
- 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 -9
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +100 -90
- 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 +60 -53
- 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 -24
- package/dist/typescript-client/src/socket.manager.d.ts +27 -27
- package/dist/typescript-client/src/squid.d.ts +173 -171
- 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 +2 -4
- package/dist/common/src/utils/url.d.ts +0 -1
- package/dist/package.json +0 -63
|
@@ -1,328 +1,319 @@
|
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
'
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
-
'
|
|
82
|
-
'
|
|
83
|
-
'
|
|
84
|
-
'
|
|
85
|
-
'graphql' = "graphql",
|
|
86
|
-
'snowflake' = "snowflake",
|
|
87
|
-
'datadog' = "datadog",
|
|
88
|
-
'newrelic' = "newrelic"
|
|
89
|
-
}
|
|
90
|
-
export type DataIntegration = MySqlIntegration | MssqlIntegration | MongoIntegration | InternalIntegration | PostgresIntegration | CockroachIntegration | SnowflakeIntegration;
|
|
91
|
-
export type Integration = DataIntegration | ApiIntegration |
|
|
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 BaseIntegration {
|
|
108
|
-
id: IntegrationId;
|
|
109
|
-
type: IntegrationType;
|
|
110
|
-
creationDate: Date;
|
|
111
|
-
updateDate: Date;
|
|
112
|
-
}
|
|
113
|
-
export interface DatadogIntegration extends BaseIntegration {
|
|
114
|
-
type: IntegrationType.datadog;
|
|
115
|
-
configuration: DatadogIntegrationConfiguration;
|
|
116
|
-
}
|
|
117
|
-
export interface NewRelicIntegration extends BaseIntegration {
|
|
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 BaseDataIntegration extends BaseIntegration {
|
|
135
|
-
schema?: IntegrationDataSchema;
|
|
136
|
-
supportsExternalChanges: boolean;
|
|
137
|
-
}
|
|
138
|
-
export declare function isDataIntegration(integration: any): integration is BaseDataIntegration;
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
export interface
|
|
174
|
-
type: IntegrationType.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
export interface
|
|
187
|
-
connectionOptions:
|
|
188
|
-
}
|
|
189
|
-
export interface
|
|
190
|
-
connectionOptions:
|
|
191
|
-
}
|
|
192
|
-
export interface
|
|
193
|
-
connectionOptions:
|
|
194
|
-
}
|
|
195
|
-
export interface
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
export interface
|
|
214
|
-
type: IntegrationType.
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
interface
|
|
312
|
-
integrationType: IntegrationType.
|
|
313
|
-
connectionOptions:
|
|
314
|
-
}
|
|
315
|
-
interface
|
|
316
|
-
integrationType: IntegrationType.
|
|
317
|
-
|
|
318
|
-
}
|
|
319
|
-
export
|
|
320
|
-
export interface DiscoverGraphQLConnectionSchemaRequest {
|
|
321
|
-
integrationType: IntegrationType.graphql;
|
|
322
|
-
connectionOptions: GraphQLConnectionOptions;
|
|
323
|
-
}
|
|
324
|
-
export interface DiscoverOpenApiSchemaRequest {
|
|
325
|
-
integrationType: IntegrationType.openapi;
|
|
326
|
-
discoveryOptions: OpenApiDiscoveryOptions;
|
|
327
|
-
}
|
|
328
|
-
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 DataIntegration = MySqlIntegration | MssqlIntegration | MongoIntegration | InternalIntegration | PostgresIntegration | CockroachIntegration | SnowflakeIntegration;
|
|
91
|
+
export type Integration = DataIntegration | ApiIntegration | GraphQLIntegration | DatadogIntegration | NewRelicIntegration;
|
|
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 BaseIntegration {
|
|
108
|
+
id: IntegrationId;
|
|
109
|
+
type: IntegrationType;
|
|
110
|
+
creationDate: Date;
|
|
111
|
+
updateDate: Date;
|
|
112
|
+
}
|
|
113
|
+
export interface DatadogIntegration extends BaseIntegration {
|
|
114
|
+
type: IntegrationType.datadog;
|
|
115
|
+
configuration: DatadogIntegrationConfiguration;
|
|
116
|
+
}
|
|
117
|
+
export interface NewRelicIntegration extends BaseIntegration {
|
|
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 BaseDataIntegration extends BaseIntegration {
|
|
135
|
+
schema?: IntegrationDataSchema;
|
|
136
|
+
supportsExternalChanges: boolean;
|
|
137
|
+
}
|
|
138
|
+
export declare function isDataIntegration(integration: any): integration is BaseDataIntegration;
|
|
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 ApiIntegration extends BaseIntegration {
|
|
167
|
+
type: IntegrationType.api;
|
|
168
|
+
configuration?: {
|
|
169
|
+
discoveryOptions: OpenApiDiscoveryOptions;
|
|
170
|
+
};
|
|
171
|
+
schema: IntegrationApiSchema;
|
|
172
|
+
}
|
|
173
|
+
export interface GraphQLIntegration extends BaseIntegration {
|
|
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 MySqlIntegration extends BaseDataIntegration {
|
|
196
|
+
type: IntegrationType.mysql;
|
|
197
|
+
configuration: MySqlIntegrationConfiguration;
|
|
198
|
+
schema: IntegrationDataSchema;
|
|
199
|
+
}
|
|
200
|
+
export interface MssqlIntegration extends BaseDataIntegration {
|
|
201
|
+
type: IntegrationType.mssql;
|
|
202
|
+
configuration: MssqlIntegrationConfiguration;
|
|
203
|
+
schema: IntegrationDataSchema;
|
|
204
|
+
}
|
|
205
|
+
export interface BasePostgresIntegration extends BaseDataIntegration {
|
|
206
|
+
type: IntegrationType.postgres | IntegrationType.cockroach;
|
|
207
|
+
configuration: PostgresIntegrationConfiguration;
|
|
208
|
+
schema: IntegrationDataSchema;
|
|
209
|
+
}
|
|
210
|
+
export interface PostgresIntegration extends BasePostgresIntegration {
|
|
211
|
+
type: IntegrationType.postgres;
|
|
212
|
+
}
|
|
213
|
+
export interface CockroachIntegration extends BasePostgresIntegration {
|
|
214
|
+
type: IntegrationType.cockroach;
|
|
215
|
+
supportsExternalChanges: false;
|
|
216
|
+
}
|
|
217
|
+
export interface InternalIntegration extends BaseDataIntegration {
|
|
218
|
+
type: IntegrationType.built_in_db;
|
|
219
|
+
}
|
|
220
|
+
export interface MongoIntegration extends BaseDataIntegration {
|
|
221
|
+
type: IntegrationType.mongo;
|
|
222
|
+
configuration: MongoIntegrationConfiguration;
|
|
223
|
+
}
|
|
224
|
+
export interface SnowflakeIntegration extends BaseDataIntegration {
|
|
225
|
+
type: IntegrationType.snowflake;
|
|
226
|
+
configuration: SnowflakeIntegrationConfiguration;
|
|
227
|
+
schema: IntegrationDataSchema;
|
|
228
|
+
supportsExternalChanges: false;
|
|
229
|
+
}
|
|
230
|
+
export interface InternalIntegration extends BaseDataIntegration {
|
|
231
|
+
type: IntegrationType.built_in_db;
|
|
232
|
+
}
|
|
233
|
+
export interface TestDataConnectionResponse {
|
|
234
|
+
success: boolean;
|
|
235
|
+
errorMessage?: string;
|
|
236
|
+
}
|
|
237
|
+
interface TestMongoDataConnectionRequest {
|
|
238
|
+
type: IntegrationType.mongo;
|
|
239
|
+
configuration: {
|
|
240
|
+
connectionOptions: MongoConnectionOptions;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
interface TestMysqlDataConnectionRequest {
|
|
244
|
+
type: IntegrationType.mysql;
|
|
245
|
+
configuration: {
|
|
246
|
+
connectionOptions: MySqlConnectionOptions;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
interface TestMssqlDataConnectionRequest {
|
|
250
|
+
type: IntegrationType.mssql;
|
|
251
|
+
configuration: {
|
|
252
|
+
connectionOptions: MssqlConnectionOptions;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
interface TestPostgresDataConnectionRequest {
|
|
256
|
+
type: IntegrationType.postgres;
|
|
257
|
+
configuration: {
|
|
258
|
+
connectionOptions: PostgresConnectionOptions;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
interface TestSnowflakeDataConnectionRequest {
|
|
262
|
+
type: IntegrationType.snowflake;
|
|
263
|
+
configuration: {
|
|
264
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
interface TestCockroachDataConnectionRequest {
|
|
268
|
+
type: IntegrationType.cockroach;
|
|
269
|
+
configuration: {
|
|
270
|
+
connectionOptions: PostgresConnectionOptions;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export type TestDataConnectionRequest = TestMongoDataConnectionRequest | TestMysqlDataConnectionRequest | TestMssqlDataConnectionRequest | TestCockroachDataConnectionRequest | TestPostgresDataConnectionRequest | TestSnowflakeDataConnectionRequest;
|
|
274
|
+
export interface DiscoverDataConnectionSchemaResponse {
|
|
275
|
+
schema: IntegrationDataSchema;
|
|
276
|
+
}
|
|
277
|
+
export interface DiscoverGraphQLConnectionSchemaResponse {
|
|
278
|
+
schema: IntegrationGraphQLSchema;
|
|
279
|
+
}
|
|
280
|
+
export interface DiscoverOpenApiSchemaResponse {
|
|
281
|
+
schema: IntegrationApiSchema;
|
|
282
|
+
}
|
|
283
|
+
interface DiscoverMongoDataConnectionSchemaRequest {
|
|
284
|
+
integrationType: IntegrationType.mongo;
|
|
285
|
+
connectionOptions: MongoConnectionOptions;
|
|
286
|
+
}
|
|
287
|
+
interface DiscoverInternalDataConnectionSchemaRequest {
|
|
288
|
+
integrationType: IntegrationType.built_in_db;
|
|
289
|
+
}
|
|
290
|
+
interface DiscoverMysqlDataConnectionSchemaRequest {
|
|
291
|
+
integrationType: IntegrationType.mysql;
|
|
292
|
+
connectionOptions: MySqlConnectionOptions;
|
|
293
|
+
}
|
|
294
|
+
interface DiscoverMssqlDataConnectionSchemaRequest {
|
|
295
|
+
integrationType: IntegrationType.mssql;
|
|
296
|
+
connectionOptions: MssqlConnectionOptions;
|
|
297
|
+
}
|
|
298
|
+
interface DiscoverPostgresDataConnectionSchemaRequest {
|
|
299
|
+
integrationType: IntegrationType.postgres;
|
|
300
|
+
connectionOptions: PostgresConnectionOptions;
|
|
301
|
+
}
|
|
302
|
+
interface DiscoverSnowflakeDataConnectionSchemaRequest {
|
|
303
|
+
integrationType: IntegrationType.snowflake;
|
|
304
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
305
|
+
}
|
|
306
|
+
interface DiscoverCockroachDataConnectionSchemaRequest {
|
|
307
|
+
integrationType: IntegrationType.cockroach;
|
|
308
|
+
connectionOptions: PostgresConnectionOptions;
|
|
309
|
+
}
|
|
310
|
+
export type DiscoverDataConnectionSchemaRequest = DiscoverMongoDataConnectionSchemaRequest | DiscoverInternalDataConnectionSchemaRequest | DiscoverMysqlDataConnectionSchemaRequest | DiscoverMssqlDataConnectionSchemaRequest | DiscoverCockroachDataConnectionSchemaRequest | DiscoverPostgresDataConnectionSchemaRequest | DiscoverSnowflakeDataConnectionSchemaRequest;
|
|
311
|
+
export interface DiscoverGraphQLConnectionSchemaRequest {
|
|
312
|
+
integrationType: IntegrationType.graphql;
|
|
313
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
314
|
+
}
|
|
315
|
+
export interface DiscoverOpenApiSchemaRequest {
|
|
316
|
+
integrationType: IntegrationType.api;
|
|
317
|
+
discoveryOptions: OpenApiDiscoveryOptions;
|
|
318
|
+
}
|
|
319
|
+
export {};
|