@squidcloud/client 1.0.20 → 1.0.21
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 +17 -17
- package/dist/common/src/api.types.d.ts +10 -10
- package/dist/common/src/application.schemas.d.ts +608 -608
- package/dist/common/src/application.types.d.ts +197 -197
- 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 +60 -60
- package/dist/common/src/bundle-api.types.d.ts +66 -66
- package/dist/common/src/bundle-data.types.d.ts +47 -47
- package/dist/common/src/communication.types.d.ts +4 -4
- package/dist/common/src/context.types.d.ts +21 -21
- package/dist/common/src/document.types.d.ts +35 -35
- package/dist/common/src/executable.context.d.ts +4 -4
- package/dist/common/src/graphql.context.d.ts +14 -14
- package/dist/common/src/graphql.types.d.ts +8 -8
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +50 -50
- package/dist/common/src/integration.types.d.ts +249 -249
- package/dist/common/src/logger.types.d.ts +22 -22
- package/dist/common/src/metrics.schemas.d.ts +3 -3
- package/dist/common/src/metrics.types.d.ts +65 -65
- package/dist/common/src/mutation.context.d.ts +11 -11
- 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 +38 -38
- package/dist/common/src/query/simple-query-builder.d.ts +14 -14
- 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 +4 -4
- 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 +38 -38
- 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/id.d.ts +1 -1
- 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/url.d.ts +1 -1
- package/dist/common/src/utils/validation.d.ts +30 -30
- package/dist/common/src/webhook-response.d.ts +7 -7
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/package.json +1 -1
- 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 +19 -19
- package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
- package/dist/typescript-client/src/data.manager.d.ts +164 -164
- package/dist/typescript-client/src/destruct.manager.d.ts +9 -9
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +23 -23
- 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 +9 -9
- 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 +35 -35
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +37 -37
- 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 +7 -7
- package/dist/typescript-client/src/rpc.manager.d.ts +24 -24
- package/dist/typescript-client/src/socket.manager.d.ts +27 -27
- package/dist/typescript-client/src/squid.d.ts +51 -51
- 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,249 +1,249 @@
|
|
|
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
|
-
export interface MssqlConnectionOptions {
|
|
42
|
-
secrets: MssqlConnectionSecretOptions;
|
|
43
|
-
host: string;
|
|
44
|
-
user: string;
|
|
45
|
-
schema: string;
|
|
46
|
-
database: string;
|
|
47
|
-
connectionLimit?: number;
|
|
48
|
-
sslEnabled?: boolean;
|
|
49
|
-
}
|
|
50
|
-
export interface PostgresConnectionOptions {
|
|
51
|
-
host: string;
|
|
52
|
-
user: string;
|
|
53
|
-
database: string;
|
|
54
|
-
schema?: string;
|
|
55
|
-
sslEnabled?: boolean;
|
|
56
|
-
secrets: PostgresConnectionSecretOptions;
|
|
57
|
-
}
|
|
58
|
-
export interface GraphQLConnectionOptions {
|
|
59
|
-
baseUrl: string;
|
|
60
|
-
}
|
|
61
|
-
export declare enum IntegrationType {
|
|
62
|
-
'internal' = "internal",
|
|
63
|
-
'mongo' = "mongo",
|
|
64
|
-
'mysql' = "mysql",
|
|
65
|
-
'mssql' = "mssql",
|
|
66
|
-
'postgres' = "postgres",
|
|
67
|
-
'cockroach' = "cockroach",
|
|
68
|
-
'api' = "api",
|
|
69
|
-
'graphql' = "graphql"
|
|
70
|
-
}
|
|
71
|
-
export type DataIntegration = MySqlIntegration | MssqlIntegration | MongoIntegration | InternalIntegration | PostgresIntegration | CockroachIntegration;
|
|
72
|
-
export type Integration = DataIntegration | ApiIntegration | GraphQLIntegration;
|
|
73
|
-
type TableName = string;
|
|
74
|
-
export interface IntegrationDataSchema {
|
|
75
|
-
collections: Record<TableName, CollectionSchema>;
|
|
76
|
-
}
|
|
77
|
-
export interface IntegrationGraphQLSchema {
|
|
78
|
-
introspection: IntrospectionQuery;
|
|
79
|
-
}
|
|
80
|
-
export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
81
|
-
export type IntegrationSchema = IntegrationDataSchema | IntegrationGraphQLSchema;
|
|
82
|
-
interface BaseIntegration {
|
|
83
|
-
id: IntegrationId;
|
|
84
|
-
type: IntegrationType;
|
|
85
|
-
creationDate: Date;
|
|
86
|
-
updateDate: Date;
|
|
87
|
-
secured: boolean;
|
|
88
|
-
}
|
|
89
|
-
export interface BaseDataIntegration extends BaseIntegration {
|
|
90
|
-
schema?: IntegrationDataSchema;
|
|
91
|
-
supportsExternalChanges: boolean;
|
|
92
|
-
}
|
|
93
|
-
export declare function isDataIntegration(integration: any): integration is BaseDataIntegration;
|
|
94
|
-
export declare function isDataIntegrationType(type: IntegrationType): boolean;
|
|
95
|
-
export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
|
|
96
|
-
export type ApiEndpointId = string;
|
|
97
|
-
export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
|
|
98
|
-
export type FieldPath = string;
|
|
99
|
-
export interface ApiRequestField {
|
|
100
|
-
paramLocation?: ApiParameterLocation;
|
|
101
|
-
fieldNameInRequest?: FieldName;
|
|
102
|
-
}
|
|
103
|
-
export interface ApiResponseField {
|
|
104
|
-
paramLocation: 'body' | 'header';
|
|
105
|
-
fieldPathInResponse?: FieldPath;
|
|
106
|
-
}
|
|
107
|
-
export interface ApiEndpoint {
|
|
108
|
-
relativePath: string;
|
|
109
|
-
method: HttpMethod;
|
|
110
|
-
requestSchema?: Record<FieldName, ApiRequestField>;
|
|
111
|
-
responseSchema?: Record<FieldPath, ApiResponseField>;
|
|
112
|
-
}
|
|
113
|
-
export interface ApiIntegration extends BaseIntegration {
|
|
114
|
-
type: IntegrationType.api;
|
|
115
|
-
baseUrl: string;
|
|
116
|
-
endpoints: IntegrationApiEndpoints;
|
|
117
|
-
}
|
|
118
|
-
export interface GraphQLIntegration extends BaseIntegration {
|
|
119
|
-
type: IntegrationType.graphql;
|
|
120
|
-
schema?: IntegrationGraphQLSchema;
|
|
121
|
-
configuration: {
|
|
122
|
-
connectionOptions: GraphQLConnectionOptions;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
export interface MySqlIntegrationConfiguration {
|
|
126
|
-
connectionOptions: MySqlConnectionOptions;
|
|
127
|
-
}
|
|
128
|
-
export interface MssqlIntegrationConfiguration {
|
|
129
|
-
connectionOptions: MssqlConnectionOptions;
|
|
130
|
-
}
|
|
131
|
-
export interface PostgresIntegrationConfiguration {
|
|
132
|
-
connectionOptions: PostgresConnectionOptions;
|
|
133
|
-
}
|
|
134
|
-
export interface MongoIntegrationConfiguration {
|
|
135
|
-
connectionOptions: MongoConnectionOptions;
|
|
136
|
-
}
|
|
137
|
-
export interface MySqlIntegration extends BaseDataIntegration {
|
|
138
|
-
type: IntegrationType.mysql;
|
|
139
|
-
configuration: MySqlIntegrationConfiguration;
|
|
140
|
-
schema: IntegrationDataSchema;
|
|
141
|
-
supportsExternalChanges: true;
|
|
142
|
-
}
|
|
143
|
-
export interface MssqlIntegration extends BaseDataIntegration {
|
|
144
|
-
type: IntegrationType.mssql;
|
|
145
|
-
configuration: MssqlIntegrationConfiguration;
|
|
146
|
-
schema: IntegrationDataSchema;
|
|
147
|
-
supportsExternalChanges: true;
|
|
148
|
-
}
|
|
149
|
-
export interface BasePostgresIntegration extends BaseDataIntegration {
|
|
150
|
-
type: IntegrationType.postgres | IntegrationType.cockroach;
|
|
151
|
-
configuration: PostgresIntegrationConfiguration;
|
|
152
|
-
schema: IntegrationDataSchema;
|
|
153
|
-
}
|
|
154
|
-
export interface PostgresIntegration extends BasePostgresIntegration {
|
|
155
|
-
type: IntegrationType.postgres;
|
|
156
|
-
supportsExternalChanges: true;
|
|
157
|
-
}
|
|
158
|
-
export interface CockroachIntegration extends BasePostgresIntegration {
|
|
159
|
-
type: IntegrationType.cockroach;
|
|
160
|
-
supportsExternalChanges: false;
|
|
161
|
-
}
|
|
162
|
-
export interface InternalIntegration extends BaseDataIntegration {
|
|
163
|
-
type: IntegrationType.internal;
|
|
164
|
-
}
|
|
165
|
-
export interface MongoIntegration extends BaseDataIntegration {
|
|
166
|
-
type: IntegrationType.mongo;
|
|
167
|
-
configuration: MongoIntegrationConfiguration;
|
|
168
|
-
supportsExternalChanges: true;
|
|
169
|
-
}
|
|
170
|
-
export interface InternalIntegration extends BaseDataIntegration {
|
|
171
|
-
type: IntegrationType.internal;
|
|
172
|
-
}
|
|
173
|
-
export interface TestDataConnectionResponse {
|
|
174
|
-
success: boolean;
|
|
175
|
-
errorMessage?: string;
|
|
176
|
-
}
|
|
177
|
-
interface TestMongoDataConnectionRequest {
|
|
178
|
-
type: IntegrationType.mongo;
|
|
179
|
-
configuration: {
|
|
180
|
-
connectionOptions: MongoConnectionOptions;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
interface TestMysqlDataConnectionRequest {
|
|
184
|
-
type: IntegrationType.mysql;
|
|
185
|
-
configuration: {
|
|
186
|
-
connectionOptions: MySqlConnectionOptions;
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
interface TestMssqlDataConnectionRequest {
|
|
190
|
-
type: IntegrationType.mssql;
|
|
191
|
-
configuration: {
|
|
192
|
-
connectionOptions: MssqlConnectionOptions;
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
interface TestPostgresDataConnectionRequest {
|
|
196
|
-
type: IntegrationType.postgres;
|
|
197
|
-
configuration: {
|
|
198
|
-
connectionOptions: PostgresConnectionOptions;
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
interface TestCockroachDataConnectionRequest {
|
|
202
|
-
type: IntegrationType.cockroach;
|
|
203
|
-
configuration: {
|
|
204
|
-
connectionOptions: PostgresConnectionOptions;
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
export type TestDataConnectionRequest = TestMongoDataConnectionRequest | TestMysqlDataConnectionRequest | TestMssqlDataConnectionRequest | TestCockroachDataConnectionRequest | TestPostgresDataConnectionRequest;
|
|
208
|
-
export interface DiscoverDataConnectionSchemaResponse {
|
|
209
|
-
schema: IntegrationDataSchema;
|
|
210
|
-
}
|
|
211
|
-
export interface DiscoverGraphQLConnectionSchemaResponse {
|
|
212
|
-
schema: IntegrationGraphQLSchema;
|
|
213
|
-
}
|
|
214
|
-
interface DiscoverMongoDataConnectionSchemaRequest {
|
|
215
|
-
integrationType: IntegrationType.mongo;
|
|
216
|
-
connectionOptions: MongoConnectionOptions;
|
|
217
|
-
}
|
|
218
|
-
interface DiscoverInternalDataConnectionSchemaRequest {
|
|
219
|
-
integrationType: IntegrationType.internal;
|
|
220
|
-
}
|
|
221
|
-
interface DiscoverMysqlDataConnectionSchemaRequest {
|
|
222
|
-
integrationType: IntegrationType.mysql;
|
|
223
|
-
connectionOptions: MySqlConnectionOptions;
|
|
224
|
-
}
|
|
225
|
-
interface DiscoverMssqlDataConnectionSchemaRequest {
|
|
226
|
-
integrationType: IntegrationType.mssql;
|
|
227
|
-
connectionOptions: MssqlConnectionOptions;
|
|
228
|
-
}
|
|
229
|
-
export interface DiscoverGraphQLConnectionSchemaRequest {
|
|
230
|
-
integrationType: IntegrationType.graphql;
|
|
231
|
-
connectionOptions: GraphQLConnectionOptions;
|
|
232
|
-
}
|
|
233
|
-
interface DiscoverPostgresDataConnectionSchemaRequest {
|
|
234
|
-
integrationType: IntegrationType.postgres;
|
|
235
|
-
connectionOptions: PostgresConnectionOptions;
|
|
236
|
-
}
|
|
237
|
-
interface DiscoverCockroachDataConnectionSchemaRequest {
|
|
238
|
-
integrationType: IntegrationType.cockroach;
|
|
239
|
-
connectionOptions: PostgresConnectionOptions;
|
|
240
|
-
}
|
|
241
|
-
export type DiscoverDataConnectionSchemaRequest = DiscoverMongoDataConnectionSchemaRequest | DiscoverInternalDataConnectionSchemaRequest | DiscoverMysqlDataConnectionSchemaRequest | DiscoverMssqlDataConnectionSchemaRequest | DiscoverCockroachDataConnectionSchemaRequest | DiscoverPostgresDataConnectionSchemaRequest;
|
|
242
|
-
export interface DiscoverOpenApiEndpointsRequest {
|
|
243
|
-
openApiSpecUrl: string;
|
|
244
|
-
}
|
|
245
|
-
export interface DiscoverOpenApiEndpointsResponse {
|
|
246
|
-
baseUrl: string;
|
|
247
|
-
endpoints: Record<ApiEndpointId, ApiEndpoint>;
|
|
248
|
-
}
|
|
249
|
-
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
|
+
}
|
|
41
|
+
export interface MssqlConnectionOptions {
|
|
42
|
+
secrets: MssqlConnectionSecretOptions;
|
|
43
|
+
host: string;
|
|
44
|
+
user: string;
|
|
45
|
+
schema: string;
|
|
46
|
+
database: string;
|
|
47
|
+
connectionLimit?: number;
|
|
48
|
+
sslEnabled?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface PostgresConnectionOptions {
|
|
51
|
+
host: string;
|
|
52
|
+
user: string;
|
|
53
|
+
database: string;
|
|
54
|
+
schema?: string;
|
|
55
|
+
sslEnabled?: boolean;
|
|
56
|
+
secrets: PostgresConnectionSecretOptions;
|
|
57
|
+
}
|
|
58
|
+
export interface GraphQLConnectionOptions {
|
|
59
|
+
baseUrl: string;
|
|
60
|
+
}
|
|
61
|
+
export declare enum IntegrationType {
|
|
62
|
+
'internal' = "internal",
|
|
63
|
+
'mongo' = "mongo",
|
|
64
|
+
'mysql' = "mysql",
|
|
65
|
+
'mssql' = "mssql",
|
|
66
|
+
'postgres' = "postgres",
|
|
67
|
+
'cockroach' = "cockroach",
|
|
68
|
+
'api' = "api",
|
|
69
|
+
'graphql' = "graphql"
|
|
70
|
+
}
|
|
71
|
+
export type DataIntegration = MySqlIntegration | MssqlIntegration | MongoIntegration | InternalIntegration | PostgresIntegration | CockroachIntegration;
|
|
72
|
+
export type Integration = DataIntegration | ApiIntegration | GraphQLIntegration;
|
|
73
|
+
type TableName = string;
|
|
74
|
+
export interface IntegrationDataSchema {
|
|
75
|
+
collections: Record<TableName, CollectionSchema>;
|
|
76
|
+
}
|
|
77
|
+
export interface IntegrationGraphQLSchema {
|
|
78
|
+
introspection: IntrospectionQuery;
|
|
79
|
+
}
|
|
80
|
+
export type IntegrationApiEndpoints = Record<ApiEndpointId, ApiEndpoint>;
|
|
81
|
+
export type IntegrationSchema = IntegrationDataSchema | IntegrationGraphQLSchema;
|
|
82
|
+
interface BaseIntegration {
|
|
83
|
+
id: IntegrationId;
|
|
84
|
+
type: IntegrationType;
|
|
85
|
+
creationDate: Date;
|
|
86
|
+
updateDate: Date;
|
|
87
|
+
secured: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface BaseDataIntegration extends BaseIntegration {
|
|
90
|
+
schema?: IntegrationDataSchema;
|
|
91
|
+
supportsExternalChanges: boolean;
|
|
92
|
+
}
|
|
93
|
+
export declare function isDataIntegration(integration: any): integration is BaseDataIntegration;
|
|
94
|
+
export declare function isDataIntegrationType(type: IntegrationType): boolean;
|
|
95
|
+
export type HttpMethod = 'post' | 'get' | 'delete' | 'patch' | 'put';
|
|
96
|
+
export type ApiEndpointId = string;
|
|
97
|
+
export type ApiParameterLocation = 'query' | 'body' | 'header' | 'path';
|
|
98
|
+
export type FieldPath = string;
|
|
99
|
+
export interface ApiRequestField {
|
|
100
|
+
paramLocation?: ApiParameterLocation;
|
|
101
|
+
fieldNameInRequest?: FieldName;
|
|
102
|
+
}
|
|
103
|
+
export interface ApiResponseField {
|
|
104
|
+
paramLocation: 'body' | 'header';
|
|
105
|
+
fieldPathInResponse?: FieldPath;
|
|
106
|
+
}
|
|
107
|
+
export interface ApiEndpoint {
|
|
108
|
+
relativePath: string;
|
|
109
|
+
method: HttpMethod;
|
|
110
|
+
requestSchema?: Record<FieldName, ApiRequestField>;
|
|
111
|
+
responseSchema?: Record<FieldPath, ApiResponseField>;
|
|
112
|
+
}
|
|
113
|
+
export interface ApiIntegration extends BaseIntegration {
|
|
114
|
+
type: IntegrationType.api;
|
|
115
|
+
baseUrl: string;
|
|
116
|
+
endpoints: IntegrationApiEndpoints;
|
|
117
|
+
}
|
|
118
|
+
export interface GraphQLIntegration extends BaseIntegration {
|
|
119
|
+
type: IntegrationType.graphql;
|
|
120
|
+
schema?: IntegrationGraphQLSchema;
|
|
121
|
+
configuration: {
|
|
122
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface MySqlIntegrationConfiguration {
|
|
126
|
+
connectionOptions: MySqlConnectionOptions;
|
|
127
|
+
}
|
|
128
|
+
export interface MssqlIntegrationConfiguration {
|
|
129
|
+
connectionOptions: MssqlConnectionOptions;
|
|
130
|
+
}
|
|
131
|
+
export interface PostgresIntegrationConfiguration {
|
|
132
|
+
connectionOptions: PostgresConnectionOptions;
|
|
133
|
+
}
|
|
134
|
+
export interface MongoIntegrationConfiguration {
|
|
135
|
+
connectionOptions: MongoConnectionOptions;
|
|
136
|
+
}
|
|
137
|
+
export interface MySqlIntegration extends BaseDataIntegration {
|
|
138
|
+
type: IntegrationType.mysql;
|
|
139
|
+
configuration: MySqlIntegrationConfiguration;
|
|
140
|
+
schema: IntegrationDataSchema;
|
|
141
|
+
supportsExternalChanges: true;
|
|
142
|
+
}
|
|
143
|
+
export interface MssqlIntegration extends BaseDataIntegration {
|
|
144
|
+
type: IntegrationType.mssql;
|
|
145
|
+
configuration: MssqlIntegrationConfiguration;
|
|
146
|
+
schema: IntegrationDataSchema;
|
|
147
|
+
supportsExternalChanges: true;
|
|
148
|
+
}
|
|
149
|
+
export interface BasePostgresIntegration extends BaseDataIntegration {
|
|
150
|
+
type: IntegrationType.postgres | IntegrationType.cockroach;
|
|
151
|
+
configuration: PostgresIntegrationConfiguration;
|
|
152
|
+
schema: IntegrationDataSchema;
|
|
153
|
+
}
|
|
154
|
+
export interface PostgresIntegration extends BasePostgresIntegration {
|
|
155
|
+
type: IntegrationType.postgres;
|
|
156
|
+
supportsExternalChanges: true;
|
|
157
|
+
}
|
|
158
|
+
export interface CockroachIntegration extends BasePostgresIntegration {
|
|
159
|
+
type: IntegrationType.cockroach;
|
|
160
|
+
supportsExternalChanges: false;
|
|
161
|
+
}
|
|
162
|
+
export interface InternalIntegration extends BaseDataIntegration {
|
|
163
|
+
type: IntegrationType.internal;
|
|
164
|
+
}
|
|
165
|
+
export interface MongoIntegration extends BaseDataIntegration {
|
|
166
|
+
type: IntegrationType.mongo;
|
|
167
|
+
configuration: MongoIntegrationConfiguration;
|
|
168
|
+
supportsExternalChanges: true;
|
|
169
|
+
}
|
|
170
|
+
export interface InternalIntegration extends BaseDataIntegration {
|
|
171
|
+
type: IntegrationType.internal;
|
|
172
|
+
}
|
|
173
|
+
export interface TestDataConnectionResponse {
|
|
174
|
+
success: boolean;
|
|
175
|
+
errorMessage?: string;
|
|
176
|
+
}
|
|
177
|
+
interface TestMongoDataConnectionRequest {
|
|
178
|
+
type: IntegrationType.mongo;
|
|
179
|
+
configuration: {
|
|
180
|
+
connectionOptions: MongoConnectionOptions;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
interface TestMysqlDataConnectionRequest {
|
|
184
|
+
type: IntegrationType.mysql;
|
|
185
|
+
configuration: {
|
|
186
|
+
connectionOptions: MySqlConnectionOptions;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
interface TestMssqlDataConnectionRequest {
|
|
190
|
+
type: IntegrationType.mssql;
|
|
191
|
+
configuration: {
|
|
192
|
+
connectionOptions: MssqlConnectionOptions;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
interface TestPostgresDataConnectionRequest {
|
|
196
|
+
type: IntegrationType.postgres;
|
|
197
|
+
configuration: {
|
|
198
|
+
connectionOptions: PostgresConnectionOptions;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
interface TestCockroachDataConnectionRequest {
|
|
202
|
+
type: IntegrationType.cockroach;
|
|
203
|
+
configuration: {
|
|
204
|
+
connectionOptions: PostgresConnectionOptions;
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
export type TestDataConnectionRequest = TestMongoDataConnectionRequest | TestMysqlDataConnectionRequest | TestMssqlDataConnectionRequest | TestCockroachDataConnectionRequest | TestPostgresDataConnectionRequest;
|
|
208
|
+
export interface DiscoverDataConnectionSchemaResponse {
|
|
209
|
+
schema: IntegrationDataSchema;
|
|
210
|
+
}
|
|
211
|
+
export interface DiscoverGraphQLConnectionSchemaResponse {
|
|
212
|
+
schema: IntegrationGraphQLSchema;
|
|
213
|
+
}
|
|
214
|
+
interface DiscoverMongoDataConnectionSchemaRequest {
|
|
215
|
+
integrationType: IntegrationType.mongo;
|
|
216
|
+
connectionOptions: MongoConnectionOptions;
|
|
217
|
+
}
|
|
218
|
+
interface DiscoverInternalDataConnectionSchemaRequest {
|
|
219
|
+
integrationType: IntegrationType.internal;
|
|
220
|
+
}
|
|
221
|
+
interface DiscoverMysqlDataConnectionSchemaRequest {
|
|
222
|
+
integrationType: IntegrationType.mysql;
|
|
223
|
+
connectionOptions: MySqlConnectionOptions;
|
|
224
|
+
}
|
|
225
|
+
interface DiscoverMssqlDataConnectionSchemaRequest {
|
|
226
|
+
integrationType: IntegrationType.mssql;
|
|
227
|
+
connectionOptions: MssqlConnectionOptions;
|
|
228
|
+
}
|
|
229
|
+
export interface DiscoverGraphQLConnectionSchemaRequest {
|
|
230
|
+
integrationType: IntegrationType.graphql;
|
|
231
|
+
connectionOptions: GraphQLConnectionOptions;
|
|
232
|
+
}
|
|
233
|
+
interface DiscoverPostgresDataConnectionSchemaRequest {
|
|
234
|
+
integrationType: IntegrationType.postgres;
|
|
235
|
+
connectionOptions: PostgresConnectionOptions;
|
|
236
|
+
}
|
|
237
|
+
interface DiscoverCockroachDataConnectionSchemaRequest {
|
|
238
|
+
integrationType: IntegrationType.cockroach;
|
|
239
|
+
connectionOptions: PostgresConnectionOptions;
|
|
240
|
+
}
|
|
241
|
+
export type DiscoverDataConnectionSchemaRequest = DiscoverMongoDataConnectionSchemaRequest | DiscoverInternalDataConnectionSchemaRequest | DiscoverMysqlDataConnectionSchemaRequest | DiscoverMssqlDataConnectionSchemaRequest | DiscoverCockroachDataConnectionSchemaRequest | DiscoverPostgresDataConnectionSchemaRequest;
|
|
242
|
+
export interface DiscoverOpenApiEndpointsRequest {
|
|
243
|
+
openApiSpecUrl: string;
|
|
244
|
+
}
|
|
245
|
+
export interface DiscoverOpenApiEndpointsResponse {
|
|
246
|
+
baseUrl: string;
|
|
247
|
+
endpoints: Record<ApiEndpointId, ApiEndpoint>;
|
|
248
|
+
}
|
|
249
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export type LoggerContext = Record<string, any>;
|
|
2
|
-
export interface Logger {
|
|
3
|
-
trace(message: string, context?: LoggerContext): void;
|
|
4
|
-
debug(message: string, context?: LoggerContext): void;
|
|
5
|
-
info(message: string, context?: LoggerContext): void;
|
|
6
|
-
warn(message: string, context?: LoggerContext): void;
|
|
7
|
-
error(message: string, context?: LoggerContext): void;
|
|
8
|
-
child(context: LoggerContext): Logger;
|
|
9
|
-
log(record: LogRecord): void;
|
|
10
|
-
}
|
|
11
|
-
export declare enum LogLevel {
|
|
12
|
-
TRACE = "trace",
|
|
13
|
-
DEBUG = "debug",
|
|
14
|
-
INFO = "info",
|
|
15
|
-
WARN = "warn",
|
|
16
|
-
ERROR = "error"
|
|
17
|
-
}
|
|
18
|
-
export interface LogRecord {
|
|
19
|
-
level?: LogLevel;
|
|
20
|
-
message?: string;
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}
|
|
1
|
+
export type LoggerContext = Record<string, any>;
|
|
2
|
+
export interface Logger {
|
|
3
|
+
trace(message: string, context?: LoggerContext): void;
|
|
4
|
+
debug(message: string, context?: LoggerContext): void;
|
|
5
|
+
info(message: string, context?: LoggerContext): void;
|
|
6
|
+
warn(message: string, context?: LoggerContext): void;
|
|
7
|
+
error(message: string, context?: LoggerContext): void;
|
|
8
|
+
child(context: LoggerContext): Logger;
|
|
9
|
+
log(record: LogRecord): void;
|
|
10
|
+
}
|
|
11
|
+
export declare enum LogLevel {
|
|
12
|
+
TRACE = "trace",
|
|
13
|
+
DEBUG = "debug",
|
|
14
|
+
INFO = "info",
|
|
15
|
+
WARN = "warn",
|
|
16
|
+
ERROR = "error"
|
|
17
|
+
}
|
|
18
|
+
export interface LogRecord {
|
|
19
|
+
level?: LogLevel;
|
|
20
|
+
message?: string;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JSONSchemaType } from 'ajv';
|
|
2
|
-
import { GetMetricDataRequest } from './metrics.types';
|
|
3
|
-
export declare const GetMetricDataRequestSchema: JSONSchemaType<GetMetricDataRequest>;
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { GetMetricDataRequest } from './metrics.types';
|
|
3
|
+
export declare const GetMetricDataRequestSchema: JSONSchemaType<GetMetricDataRequest>;
|