@squidcloud/local-backend 1.0.25 → 1.0.27
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.context.d.ts +13 -0
- package/dist/common/src/ai-assistant.context.js +20 -0
- package/dist/common/src/ai-assistant.context.js.map +1 -0
- package/dist/common/src/ai-assistant.schemas.d.ts +210 -0
- package/dist/common/src/ai-assistant.schemas.js +200 -0
- package/dist/common/src/ai-assistant.schemas.js.map +1 -0
- package/dist/common/src/ai-assistant.types.d.ts +81 -0
- package/dist/common/src/ai-assistant.types.js +12 -0
- package/dist/common/src/ai-assistant.types.js.map +1 -0
- package/dist/common/src/api-call.context.d.ts +13 -0
- package/dist/common/src/api-call.context.js +17 -0
- package/dist/common/src/api-call.context.js.map +1 -0
- package/dist/common/src/api.types.d.ts +24 -0
- package/dist/common/src/api.types.js +3 -0
- package/dist/common/src/api.types.js.map +1 -0
- package/dist/common/src/application.schemas.d.ts +1060 -0
- package/dist/common/src/application.schemas.js +711 -0
- package/dist/common/src/application.schemas.js.map +1 -0
- package/dist/common/src/application.types.d.ts +228 -0
- package/dist/common/src/application.types.js +90 -0
- package/dist/common/src/application.types.js.map +1 -0
- package/dist/common/src/auth.types.d.ts +4 -0
- package/dist/common/src/auth.types.js +3 -0
- package/dist/common/src/auth.types.js.map +1 -0
- package/dist/common/src/backend-function.schemas.d.ts +3 -0
- package/dist/common/src/backend-function.schemas.js +14 -0
- package/dist/common/src/backend-function.schemas.js.map +1 -0
- package/dist/common/src/backend-function.types.d.ts +7 -0
- package/dist/common/src/backend-function.types.js +3 -0
- package/dist/common/src/backend-function.types.js.map +1 -0
- package/dist/common/src/backend-run.types.d.ts +54 -0
- package/dist/common/src/backend-run.types.js +74 -0
- package/dist/common/src/backend-run.types.js.map +1 -0
- package/dist/common/src/bundle-api.types.d.ts +71 -0
- package/dist/common/src/bundle-api.types.js +3 -0
- package/dist/common/src/bundle-api.types.js.map +1 -0
- package/dist/common/src/bundle-data.types.d.ts +59 -0
- package/dist/common/src/bundle-data.types.js +3 -0
- package/dist/common/src/bundle-data.types.js.map +1 -0
- package/dist/common/src/communication.types.d.ts +17 -0
- package/dist/common/src/communication.types.js +37 -0
- package/dist/common/src/communication.types.js.map +1 -0
- package/dist/common/src/context.types.d.ts +22 -0
- package/dist/common/src/context.types.js +3 -0
- package/dist/common/src/context.types.js.map +1 -0
- package/dist/common/src/distributed-lock.context.d.ts +5 -0
- package/dist/common/src/distributed-lock.context.js +11 -0
- package/dist/common/src/distributed-lock.context.js.map +1 -0
- package/dist/common/src/document.types.d.ts +31 -0
- package/dist/common/src/document.types.js +50 -0
- package/dist/common/src/document.types.js.map +1 -0
- package/dist/common/src/graphql.context.d.ts +14 -0
- package/dist/common/src/graphql.context.js +13 -0
- package/dist/common/src/graphql.context.js.map +1 -0
- package/dist/common/src/graphql.types.d.ts +11 -0
- package/dist/common/src/graphql.types.js +35 -0
- package/dist/common/src/graphql.types.js.map +1 -0
- package/dist/common/src/http-status.enum.d.ts +50 -0
- package/dist/common/src/http-status.enum.js +55 -0
- package/dist/common/src/http-status.enum.js.map +1 -0
- package/dist/common/src/index.d.ts +54 -0
- package/dist/common/src/index.js +71 -0
- package/dist/common/src/index.js.map +1 -0
- package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -0
- package/dist/common/src/integrations/ai_assistant.types.js +3 -0
- package/dist/common/src/integrations/ai_assistant.types.js.map +1 -0
- package/dist/common/src/integrations/api.types.d.ts +80 -0
- package/dist/common/src/integrations/api.types.js +3 -0
- package/dist/common/src/integrations/api.types.js.map +1 -0
- package/dist/common/src/integrations/auth.types.d.ts +22 -0
- package/dist/common/src/integrations/auth.types.js +3 -0
- package/dist/common/src/integrations/auth.types.js.map +1 -0
- package/dist/common/src/integrations/database.types.d.ts +236 -0
- package/dist/common/src/integrations/database.types.js +3 -0
- package/dist/common/src/integrations/database.types.js.map +1 -0
- package/dist/common/src/integrations/index.d.ts +97 -0
- package/dist/common/src/integrations/index.js +98 -0
- package/dist/common/src/integrations/index.js.map +1 -0
- package/dist/common/src/integrations/observability.types.d.ts +22 -0
- package/dist/common/src/integrations/observability.types.js +15 -0
- package/dist/common/src/integrations/observability.types.js.map +1 -0
- package/dist/common/src/logger.types.d.ts +21 -0
- package/dist/common/src/logger.types.js +12 -0
- package/dist/common/src/logger.types.js.map +1 -0
- package/dist/common/src/metrics.types.d.ts +58 -0
- package/dist/common/src/metrics.types.js +12 -0
- package/dist/common/src/metrics.types.js.map +1 -0
- package/dist/common/src/mutation.context.d.ts +11 -0
- package/dist/common/src/mutation.context.js +21 -0
- package/dist/common/src/mutation.context.js.map +1 -0
- package/dist/common/src/mutation.schemas.d.ts +5 -0
- package/dist/common/src/mutation.schemas.js +116 -0
- package/dist/common/src/mutation.schemas.js.map +1 -0
- package/dist/common/src/mutation.types.d.ts +64 -0
- package/dist/common/src/mutation.types.js +143 -0
- package/dist/common/src/mutation.types.js.map +1 -0
- package/dist/common/src/named-query.context.d.ts +4 -0
- package/dist/common/src/named-query.context.js +10 -0
- package/dist/common/src/named-query.context.js.map +1 -0
- package/dist/common/src/named-query.schemas.d.ts +3 -0
- package/dist/common/src/named-query.schemas.js +15 -0
- package/dist/common/src/named-query.schemas.js.map +1 -0
- package/dist/common/src/named-query.types.d.ts +9 -0
- package/dist/common/src/named-query.types.js +3 -0
- package/dist/common/src/named-query.types.js.map +1 -0
- package/dist/common/src/query/index.d.ts +2 -0
- package/dist/common/src/query/index.js +19 -0
- package/dist/common/src/query/index.js.map +1 -0
- package/dist/common/src/query/query-context.d.ts +28 -0
- package/dist/common/src/query/query-context.js +161 -0
- package/dist/common/src/query/query-context.js.map +1 -0
- package/dist/common/src/query/simple-query-builder.d.ts +39 -0
- package/dist/common/src/query/simple-query-builder.js +111 -0
- package/dist/common/src/query/simple-query-builder.js.map +1 -0
- package/dist/common/src/query.schemas.d.ts +5 -0
- package/dist/common/src/query.schemas.js +90 -0
- package/dist/common/src/query.schemas.js.map +1 -0
- package/dist/common/src/query.types.d.ts +89 -0
- package/dist/common/src/query.types.js +135 -0
- package/dist/common/src/query.types.js.map +1 -0
- package/dist/common/src/regions.d.ts +21 -0
- package/dist/common/src/regions.js +44 -0
- package/dist/common/src/regions.js.map +1 -0
- package/dist/common/src/schema/schema.types.d.ts +30 -0
- package/dist/common/src/schema/schema.types.js +173 -0
- package/dist/common/src/schema/schema.types.js.map +1 -0
- package/dist/common/src/secret.schemas.d.ts +6 -0
- package/dist/common/src/secret.schemas.js +33 -0
- package/dist/common/src/secret.schemas.js.map +1 -0
- package/dist/common/src/secret.types.d.ts +49 -0
- package/dist/common/src/secret.types.js +6 -0
- package/dist/common/src/secret.types.js.map +1 -0
- package/dist/common/src/security.types.d.ts +3 -0
- package/dist/common/src/security.types.js +3 -0
- package/dist/common/src/security.types.js.map +1 -0
- package/dist/common/src/socket.schemas.d.ts +3 -0
- package/dist/common/src/socket.schemas.js +59 -0
- package/dist/common/src/socket.schemas.js.map +1 -0
- package/dist/common/src/socket.types.d.ts +108 -0
- package/dist/common/src/socket.types.js +3 -0
- package/dist/common/src/socket.types.js.map +1 -0
- package/dist/common/src/time-units.d.ts +5 -0
- package/dist/common/src/time-units.js +9 -0
- package/dist/common/src/time-units.js.map +1 -0
- package/dist/common/src/trigger.types.d.ts +15 -0
- package/dist/common/src/trigger.types.js +3 -0
- package/dist/common/src/trigger.types.js.map +1 -0
- package/dist/common/src/types.d.ts +15 -0
- package/dist/common/src/types.js +3 -0
- package/dist/common/src/types.js.map +1 -0
- package/dist/common/src/utils/array.d.ts +8 -0
- package/dist/common/src/utils/array.js +52 -0
- package/dist/common/src/utils/array.js.map +1 -0
- package/dist/common/src/utils/assert.d.ts +8 -0
- package/dist/common/src/utils/assert.js +50 -0
- package/dist/common/src/utils/assert.js.map +1 -0
- package/dist/common/src/utils/error.d.ts +4 -0
- package/dist/common/src/utils/error.js +11 -0
- package/dist/common/src/utils/error.js.map +1 -0
- package/dist/common/src/utils/http.d.ts +2 -0
- package/dist/common/src/utils/http.js +39 -0
- package/dist/common/src/utils/http.js.map +1 -0
- package/dist/common/src/utils/id.d.ts +2 -0
- package/dist/common/src/utils/id.js +22 -0
- package/dist/common/src/utils/id.js.map +1 -0
- package/dist/common/src/utils/lock.manager.d.ts +9 -0
- package/dist/common/src/utils/lock.manager.js +40 -0
- package/dist/common/src/utils/lock.manager.js.map +1 -0
- package/dist/common/src/utils/nullish.d.ts +1 -0
- package/dist/common/src/utils/nullish.js +8 -0
- package/dist/common/src/utils/nullish.js.map +1 -0
- package/dist/common/src/utils/object.d.ts +6 -0
- package/dist/common/src/utils/object.js +90 -0
- package/dist/common/src/utils/object.js.map +1 -0
- package/dist/common/src/utils/serialization.d.ts +6 -0
- package/dist/common/src/utils/serialization.js +51 -0
- package/dist/common/src/utils/serialization.js.map +1 -0
- package/dist/common/src/utils/transforms.d.ts +18 -0
- package/dist/common/src/utils/transforms.js +93 -0
- package/dist/common/src/utils/transforms.js.map +1 -0
- package/dist/common/src/utils/url.d.ts +1 -0
- package/dist/common/src/utils/url.js +16 -0
- package/dist/common/src/utils/url.js.map +1 -0
- package/dist/common/src/utils/validation.d.ts +17 -0
- package/dist/common/src/utils/validation.js +210 -0
- package/dist/common/src/utils/validation.js.map +1 -0
- package/dist/common/src/webhook-response.d.ts +7 -0
- package/dist/common/src/webhook-response.js +8 -0
- package/dist/common/src/webhook-response.js.map +1 -0
- package/dist/internal-common/src/code-executor.types.d.ts +13 -0
- package/dist/internal-common/src/code-executor.types.js +3 -0
- package/dist/internal-common/src/code-executor.types.js.map +1 -0
- package/dist/internal-common/src/environment/environment.types.d.ts +71 -0
- package/dist/internal-common/src/environment/environment.types.js +3 -0
- package/dist/internal-common/src/environment/environment.types.js.map +1 -0
- package/dist/internal-common/src/environment/index.d.ts +6 -0
- package/dist/internal-common/src/environment/index.js +26 -0
- package/dist/internal-common/src/environment/index.js.map +1 -0
- package/dist/internal-common/src/environment/local.environment.d.ts +2 -0
- package/dist/internal-common/src/environment/local.environment.js +60 -0
- package/dist/internal-common/src/environment/local.environment.js.map +1 -0
- package/dist/internal-common/src/index.d.ts +10 -0
- package/dist/internal-common/src/index.js +27 -0
- package/dist/internal-common/src/index.js.map +1 -0
- package/dist/internal-common/src/kafka/kafka.manager.d.ts +17 -0
- package/dist/internal-common/src/kafka/kafka.manager.interface.d.ts +10 -0
- package/dist/internal-common/src/kafka/kafka.manager.interface.js +7 -0
- package/dist/internal-common/src/kafka/kafka.manager.interface.js.map +1 -0
- package/dist/internal-common/src/kafka/kafka.manager.js +104 -0
- package/dist/internal-common/src/kafka/kafka.manager.js.map +1 -0
- package/dist/internal-common/src/kafka/kafka.types.d.ts +17 -0
- package/dist/internal-common/src/kafka/kafka.types.js +3 -0
- package/dist/internal-common/src/kafka/kafka.types.js.map +1 -0
- package/dist/internal-common/src/local-dev.types.d.ts +31 -0
- package/dist/internal-common/src/local-dev.types.js +3 -0
- package/dist/internal-common/src/local-dev.types.js.map +1 -0
- package/dist/internal-common/src/observability-publisher.d.ts +14 -0
- package/dist/internal-common/src/observability-publisher.js +71 -0
- package/dist/internal-common/src/observability-publisher.js.map +1 -0
- package/dist/internal-common/src/observability.types.d.ts +17 -0
- package/dist/internal-common/src/observability.types.js +3 -0
- package/dist/internal-common/src/observability.types.js.map +1 -0
- package/dist/internal-common/src/shutdown.manager.d.ts +20 -0
- package/dist/internal-common/src/shutdown.manager.js +77 -0
- package/dist/internal-common/src/shutdown.manager.js.map +1 -0
- package/dist/internal-common/src/utils.d.ts +5 -0
- package/dist/internal-common/src/utils.js +30 -0
- package/dist/internal-common/src/utils.js.map +1 -0
- package/dist/{index.d.ts → local-backend/src/index.d.ts} +4 -4
- package/dist/{index.js → local-backend/src/index.js} +20 -20
- package/dist/local-backend/src/index.js.map +1 -0
- package/dist/local-backend/src/local-backend-socket.service.d.ts +18 -0
- package/dist/local-backend/src/local-backend-socket.service.js +110 -0
- package/dist/local-backend/src/local-backend-socket.service.js.map +1 -0
- package/dist/{local-backend.app.d.ts → local-backend/src/local-backend.app.d.ts} +2 -2
- package/dist/{local-backend.app.js → local-backend/src/local-backend.app.js} +25 -15
- package/dist/local-backend/src/local-backend.app.js.map +1 -0
- package/dist/{local-backend.controller.d.ts → local-backend/src/local-backend.controller.d.ts} +8 -8
- package/dist/{local-backend.controller.js → local-backend/src/local-backend.controller.js} +49 -49
- package/dist/local-backend/src/local-backend.controller.js.map +1 -0
- package/dist/{local-backend.module.d.ts → local-backend/src/local-backend.module.d.ts} +8 -8
- package/dist/{local-backend.module.js → local-backend/src/local-backend.module.js} +53 -51
- package/dist/local-backend/src/local-backend.module.js.map +1 -0
- package/dist/local-backend/src/local-backend.service.d.ts +15 -0
- package/dist/{local-backend.service.js → local-backend/src/local-backend.service.js} +165 -143
- package/dist/local-backend/src/local-backend.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -4
- package/dist/index.js.map +0 -1
- package/dist/local-backend.app.js.map +0 -1
- package/dist/local-backend.controller.js.map +0 -1
- package/dist/local-backend.module.js.map +0 -1
- package/dist/local-backend.service.d.ts +0 -7
- package/dist/local-backend.service.js.map +0 -1
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"api.types.js","sourceRoot":"","sources":["../../../../../common/src/integrations/api.types.ts"],"names":[],"mappings":""}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.types.js","sourceRoot":"","sources":["../../../../../common/src/integrations/auth.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { CollectionName } from '../document.types';
|
|
2
|
+
import { CollectionSchema } from '../schema/schema.types';
|
|
3
|
+
import { BaseIntegrationConfig, DatabaseIntegrationType, IntegrationType } from './index';
|
|
4
|
+
export interface MongoConnectionSecretOptions {
|
|
5
|
+
password?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MongoConnectionOptions {
|
|
8
|
+
secrets: MongoConnectionSecretOptions;
|
|
9
|
+
connectionString: string;
|
|
10
|
+
user?: string;
|
|
11
|
+
replicaSet?: string;
|
|
12
|
+
ssl?: {
|
|
13
|
+
certificateFile: string;
|
|
14
|
+
validate: boolean;
|
|
15
|
+
};
|
|
16
|
+
maxPoolSize?: number;
|
|
17
|
+
minPoolSize?: number;
|
|
18
|
+
socketTimeoutMS?: number;
|
|
19
|
+
serverSelectionTimeoutMS?: number;
|
|
20
|
+
keepAlive?: boolean;
|
|
21
|
+
directConnection?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface MySqlConnectionSecretOptions {
|
|
24
|
+
password: string;
|
|
25
|
+
}
|
|
26
|
+
export interface OracleConnectionSecretOptions {
|
|
27
|
+
password: string;
|
|
28
|
+
}
|
|
29
|
+
export interface MssqlConnectionSecretOptions {
|
|
30
|
+
password: string;
|
|
31
|
+
}
|
|
32
|
+
export interface PostgresConnectionSecretOptions {
|
|
33
|
+
password: string;
|
|
34
|
+
sslCertificate?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface MySqlConnectionOptions {
|
|
37
|
+
secrets: MySqlConnectionSecretOptions;
|
|
38
|
+
host: string;
|
|
39
|
+
user: string;
|
|
40
|
+
database: string;
|
|
41
|
+
connectionLimit?: number;
|
|
42
|
+
sslEnabled?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface OracleConnectionOptions {
|
|
45
|
+
secrets: OracleConnectionSecretOptions;
|
|
46
|
+
host: string;
|
|
47
|
+
user: string;
|
|
48
|
+
database: string;
|
|
49
|
+
connectionLimit?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface MssqlConnectionOptions {
|
|
52
|
+
secrets: MssqlConnectionSecretOptions;
|
|
53
|
+
host: string;
|
|
54
|
+
user: string;
|
|
55
|
+
schema: string;
|
|
56
|
+
database: string;
|
|
57
|
+
connectionLimit?: number;
|
|
58
|
+
sslEnabled?: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface PostgresConnectionOptions {
|
|
61
|
+
host: string;
|
|
62
|
+
user: string;
|
|
63
|
+
database: string;
|
|
64
|
+
schema?: string;
|
|
65
|
+
sslEnabled?: boolean;
|
|
66
|
+
secrets: PostgresConnectionSecretOptions;
|
|
67
|
+
}
|
|
68
|
+
export interface SnowflakeConnectionSecretOptions {
|
|
69
|
+
password: string;
|
|
70
|
+
}
|
|
71
|
+
export interface SnowflakeConnectionOptions {
|
|
72
|
+
secrets: SnowflakeConnectionSecretOptions;
|
|
73
|
+
account: string;
|
|
74
|
+
username: string;
|
|
75
|
+
database: string;
|
|
76
|
+
schema: string;
|
|
77
|
+
warehouse: string;
|
|
78
|
+
role: string;
|
|
79
|
+
}
|
|
80
|
+
type TableName = string;
|
|
81
|
+
export interface IntegrationDataSchema {
|
|
82
|
+
collections: Record<TableName, CollectionSchema>;
|
|
83
|
+
}
|
|
84
|
+
export interface BaseDatabaseIntegrationConfig extends BaseIntegrationConfig {
|
|
85
|
+
type: DatabaseIntegrationType;
|
|
86
|
+
schema?: IntegrationDataSchema;
|
|
87
|
+
supportsExternalChanges: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface MySqlIntegrationConfiguration {
|
|
90
|
+
connectionOptions: MySqlConnectionOptions;
|
|
91
|
+
}
|
|
92
|
+
export interface OracleIntegrationConfiguration {
|
|
93
|
+
connectionOptions: OracleConnectionOptions;
|
|
94
|
+
}
|
|
95
|
+
export interface MssqlIntegrationConfiguration {
|
|
96
|
+
connectionOptions: MssqlConnectionOptions;
|
|
97
|
+
}
|
|
98
|
+
export interface PostgresIntegrationConfiguration {
|
|
99
|
+
connectionOptions: PostgresConnectionOptions;
|
|
100
|
+
}
|
|
101
|
+
export interface MongoIntegrationConfiguration {
|
|
102
|
+
connectionOptions: MongoConnectionOptions;
|
|
103
|
+
}
|
|
104
|
+
export interface SnowflakeIntegrationConfiguration {
|
|
105
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
106
|
+
}
|
|
107
|
+
export interface MySqlIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
108
|
+
type: IntegrationType.mysql;
|
|
109
|
+
configuration: MySqlIntegrationConfiguration;
|
|
110
|
+
schema: IntegrationDataSchema;
|
|
111
|
+
}
|
|
112
|
+
export interface OracleIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
113
|
+
type: IntegrationType.oracledb;
|
|
114
|
+
configuration: OracleIntegrationConfiguration;
|
|
115
|
+
schema: IntegrationDataSchema;
|
|
116
|
+
}
|
|
117
|
+
export interface MssqlIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
118
|
+
type: IntegrationType.mssql;
|
|
119
|
+
configuration: MssqlIntegrationConfiguration;
|
|
120
|
+
schema: IntegrationDataSchema;
|
|
121
|
+
}
|
|
122
|
+
export interface BasePostgresIntegration extends BaseDatabaseIntegrationConfig {
|
|
123
|
+
type: IntegrationType.postgres | IntegrationType.cockroach;
|
|
124
|
+
configuration: PostgresIntegrationConfiguration;
|
|
125
|
+
schema: IntegrationDataSchema;
|
|
126
|
+
}
|
|
127
|
+
export interface PostgresIntegrationConfig extends BasePostgresIntegration {
|
|
128
|
+
type: IntegrationType.postgres;
|
|
129
|
+
}
|
|
130
|
+
export interface CockroachIntegrationConfig extends BasePostgresIntegration {
|
|
131
|
+
type: IntegrationType.cockroach;
|
|
132
|
+
supportsExternalChanges: false;
|
|
133
|
+
}
|
|
134
|
+
export interface InternalIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
135
|
+
type: IntegrationType.built_in_db;
|
|
136
|
+
}
|
|
137
|
+
export interface MongoIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
138
|
+
type: IntegrationType.mongo;
|
|
139
|
+
configuration: MongoIntegrationConfiguration;
|
|
140
|
+
}
|
|
141
|
+
export interface SnowflakeIntegrationConfig extends BaseDatabaseIntegrationConfig {
|
|
142
|
+
type: IntegrationType.snowflake;
|
|
143
|
+
configuration: SnowflakeIntegrationConfiguration;
|
|
144
|
+
schema: IntegrationDataSchema;
|
|
145
|
+
supportsExternalChanges: false;
|
|
146
|
+
}
|
|
147
|
+
interface TestMongoDataConnectionRequest {
|
|
148
|
+
type: IntegrationType.mongo;
|
|
149
|
+
configuration: {
|
|
150
|
+
connectionOptions: MongoConnectionOptions;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
interface TestMysqlDataConnectionRequest {
|
|
154
|
+
type: IntegrationType.mysql;
|
|
155
|
+
configuration: {
|
|
156
|
+
connectionOptions: MySqlConnectionOptions;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
interface TestOracleDataConnectionRequest {
|
|
160
|
+
type: IntegrationType.oracledb;
|
|
161
|
+
configuration: {
|
|
162
|
+
connectionOptions: OracleConnectionOptions;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
interface TestMssqlDataConnectionRequest {
|
|
166
|
+
type: IntegrationType.mssql;
|
|
167
|
+
configuration: {
|
|
168
|
+
connectionOptions: MssqlConnectionOptions;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
interface TestPostgresDataConnectionRequest {
|
|
172
|
+
type: IntegrationType.postgres;
|
|
173
|
+
configuration: {
|
|
174
|
+
connectionOptions: PostgresConnectionOptions;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
interface TestSnowflakeDataConnectionRequest {
|
|
178
|
+
type: IntegrationType.snowflake;
|
|
179
|
+
configuration: {
|
|
180
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
interface TestCockroachDataConnectionRequest {
|
|
184
|
+
type: IntegrationType.cockroach;
|
|
185
|
+
configuration: {
|
|
186
|
+
connectionOptions: PostgresConnectionOptions;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export type TestDataConnectionRequest = TestMongoDataConnectionRequest | TestMysqlDataConnectionRequest | TestOracleDataConnectionRequest | TestMssqlDataConnectionRequest | TestCockroachDataConnectionRequest | TestPostgresDataConnectionRequest | TestSnowflakeDataConnectionRequest;
|
|
190
|
+
export interface CollectionReadiness {
|
|
191
|
+
hasPermissions: boolean;
|
|
192
|
+
grantPermissionsCommands: string[];
|
|
193
|
+
replicationEnabled: boolean;
|
|
194
|
+
enableReplicationCommands: string[];
|
|
195
|
+
}
|
|
196
|
+
export interface DiscoverDataConnectionSchemaResponse {
|
|
197
|
+
schema: IntegrationDataSchema;
|
|
198
|
+
collectionReadiness: Record<CollectionName, CollectionReadiness>;
|
|
199
|
+
}
|
|
200
|
+
interface DiscoverMongoDataConnectionSchemaRequest {
|
|
201
|
+
integrationType: IntegrationType.mongo;
|
|
202
|
+
connectionOptions: MongoConnectionOptions;
|
|
203
|
+
}
|
|
204
|
+
interface DiscoverInternalDataConnectionSchemaRequest {
|
|
205
|
+
integrationType: IntegrationType.built_in_db;
|
|
206
|
+
}
|
|
207
|
+
interface DiscoverMysqlDataConnectionSchemaRequest {
|
|
208
|
+
integrationType: IntegrationType.mysql;
|
|
209
|
+
connectionOptions: MySqlConnectionOptions;
|
|
210
|
+
}
|
|
211
|
+
interface DiscoverOracleDataConnectionSchemaRequest {
|
|
212
|
+
integrationType: IntegrationType.oracledb;
|
|
213
|
+
connectionOptions: OracleConnectionOptions;
|
|
214
|
+
}
|
|
215
|
+
interface DiscoverMssqlDataConnectionSchemaRequest {
|
|
216
|
+
integrationType: IntegrationType.mssql;
|
|
217
|
+
connectionOptions: MssqlConnectionOptions;
|
|
218
|
+
}
|
|
219
|
+
interface DiscoverPostgresDataConnectionSchemaRequest {
|
|
220
|
+
integrationType: IntegrationType.postgres;
|
|
221
|
+
connectionOptions: PostgresConnectionOptions;
|
|
222
|
+
}
|
|
223
|
+
interface DiscoverSnowflakeDataConnectionSchemaRequest {
|
|
224
|
+
integrationType: IntegrationType.snowflake;
|
|
225
|
+
connectionOptions: SnowflakeConnectionOptions;
|
|
226
|
+
}
|
|
227
|
+
interface DiscoverCockroachDataConnectionSchemaRequest {
|
|
228
|
+
integrationType: IntegrationType.cockroach;
|
|
229
|
+
connectionOptions: PostgresConnectionOptions;
|
|
230
|
+
}
|
|
231
|
+
export interface TestDataConnectionResponse {
|
|
232
|
+
success: boolean;
|
|
233
|
+
errorMessage?: string;
|
|
234
|
+
}
|
|
235
|
+
export type DiscoverDataConnectionSchemaRequest = DiscoverMongoDataConnectionSchemaRequest | DiscoverInternalDataConnectionSchemaRequest | DiscoverMysqlDataConnectionSchemaRequest | DiscoverOracleDataConnectionSchemaRequest | DiscoverMssqlDataConnectionSchemaRequest | DiscoverCockroachDataConnectionSchemaRequest | DiscoverPostgresDataConnectionSchemaRequest | DiscoverSnowflakeDataConnectionSchemaRequest;
|
|
236
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.types.js","sourceRoot":"","sources":["../../../../../common/src/integrations/database.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export * from './ai_assistant.types';
|
|
2
|
+
export * from './api.types';
|
|
3
|
+
export * from './auth.types';
|
|
4
|
+
export * from './database.types';
|
|
5
|
+
export * from './observability.types';
|
|
6
|
+
import { IntegrationId } from '../communication.types';
|
|
7
|
+
import { AiAssistantIntegrationConfig } from './ai_assistant.types';
|
|
8
|
+
import { GraphQLIntegrationConfig, HttpApiIntegrationConfig, TestGraphQLDataConnectionRequest } from './api.types';
|
|
9
|
+
import { Auth0IntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig } from './auth.types';
|
|
10
|
+
import { BaseDatabaseIntegrationConfig, CockroachIntegrationConfig, InternalIntegrationConfig, MongoIntegrationConfig, MssqlIntegrationConfig, MySqlIntegrationConfig, OracleIntegrationConfig, PostgresIntegrationConfig, SnowflakeIntegrationConfig, TestDataConnectionRequest } from './database.types';
|
|
11
|
+
import { DatadogIntegrationConfig, NewRelicIntegrationConfig } from './observability.types';
|
|
12
|
+
export declare enum IntegrationCategory {
|
|
13
|
+
'database' = "database",
|
|
14
|
+
'api' = "api",
|
|
15
|
+
'observability' = "observability",
|
|
16
|
+
'crm' = "crm",
|
|
17
|
+
'auth' = "auth",
|
|
18
|
+
'ai' = "ai"
|
|
19
|
+
}
|
|
20
|
+
export declare enum IntegrationType {
|
|
21
|
+
'built_in_db' = "built_in_db",
|
|
22
|
+
'mongo' = "mongo",
|
|
23
|
+
'mysql' = "mysql",
|
|
24
|
+
'mssql' = "mssql",
|
|
25
|
+
'postgres' = "postgres",
|
|
26
|
+
'cockroach' = "cockroach",
|
|
27
|
+
'api' = "api",
|
|
28
|
+
'graphql' = "graphql",
|
|
29
|
+
'snowflake' = "snowflake",
|
|
30
|
+
'datadog' = "datadog",
|
|
31
|
+
'newrelic' = "newrelic",
|
|
32
|
+
'auth0' = "auth0",
|
|
33
|
+
'jwt_rsa' = "jwt_rsa",
|
|
34
|
+
'jwt_hmac' = "jwt_hmac",
|
|
35
|
+
'ai_assistant' = "ai_assistant",
|
|
36
|
+
'algolia' = "algolia",
|
|
37
|
+
'elastic_observability' = "elastic_observability",
|
|
38
|
+
'elastic_search' = "elastic_search",
|
|
39
|
+
'elastic_enterprise_search' = "elastic_enterprise_search",
|
|
40
|
+
'sentry' = "sentry",
|
|
41
|
+
'sap_hana' = "sap_hana",
|
|
42
|
+
'salesforce_crm' = "salesforce_crm",
|
|
43
|
+
'documentdb' = "documentdb",
|
|
44
|
+
'dynamodb' = "dynamodb",
|
|
45
|
+
'cassandra' = "cassandra",
|
|
46
|
+
'clickhouse' = "clickhouse",
|
|
47
|
+
'alloydb' = "alloydb",
|
|
48
|
+
'spanner' = "spanner",
|
|
49
|
+
'db2' = "db2",
|
|
50
|
+
'mariadb' = "mariadb",
|
|
51
|
+
'oracledb' = "oracledb",
|
|
52
|
+
'redis' = "redis",
|
|
53
|
+
'xata' = "xata",
|
|
54
|
+
'azure_sql' = "azure_sql"
|
|
55
|
+
}
|
|
56
|
+
export interface IntegrationConfigTypes {
|
|
57
|
+
[IntegrationType.built_in_db]: InternalIntegrationConfig;
|
|
58
|
+
[IntegrationType.mongo]: MongoIntegrationConfig;
|
|
59
|
+
[IntegrationType.mysql]: MySqlIntegrationConfig;
|
|
60
|
+
[IntegrationType.oracledb]: OracleIntegrationConfig;
|
|
61
|
+
[IntegrationType.mssql]: MssqlIntegrationConfig;
|
|
62
|
+
[IntegrationType.postgres]: PostgresIntegrationConfig;
|
|
63
|
+
[IntegrationType.cockroach]: CockroachIntegrationConfig;
|
|
64
|
+
[IntegrationType.snowflake]: SnowflakeIntegrationConfig;
|
|
65
|
+
[IntegrationType.api]: HttpApiIntegrationConfig;
|
|
66
|
+
[IntegrationType.graphql]: GraphQLIntegrationConfig;
|
|
67
|
+
[IntegrationType.datadog]: DatadogIntegrationConfig;
|
|
68
|
+
[IntegrationType.newrelic]: NewRelicIntegrationConfig;
|
|
69
|
+
[IntegrationType.auth0]: Auth0IntegrationConfig;
|
|
70
|
+
[IntegrationType.jwt_rsa]: JwtRsaIntegrationConfig;
|
|
71
|
+
[IntegrationType.jwt_hmac]: JwtHmacIntegrationConfig;
|
|
72
|
+
[IntegrationType.ai_assistant]: AiAssistantIntegrationConfig;
|
|
73
|
+
}
|
|
74
|
+
export declare const DatabaseIntegrationTypes: readonly [IntegrationType.built_in_db, IntegrationType.mongo, IntegrationType.mysql, IntegrationType.mssql, IntegrationType.postgres, IntegrationType.cockroach, IntegrationType.snowflake, IntegrationType.oracledb];
|
|
75
|
+
export type DatabaseIntegrationType = (typeof DatabaseIntegrationTypes)[number];
|
|
76
|
+
export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
|
|
77
|
+
export declare const ApiIntegrationTypes: readonly [IntegrationType.api, IntegrationType.graphql];
|
|
78
|
+
export declare const ObservabilityIntegrationTypes: readonly [IntegrationType.datadog, IntegrationType.newrelic];
|
|
79
|
+
export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac];
|
|
80
|
+
export type ApiIntegrationType = (typeof ApiIntegrationTypes)[number];
|
|
81
|
+
export type ApiIntegrationConfig = IntegrationConfigTypes[ApiIntegrationType];
|
|
82
|
+
export type ObservabilityIntegrationType = (typeof ObservabilityIntegrationTypes)[number];
|
|
83
|
+
export type ObservabilityIntegrationConfig = IntegrationConfigTypes[ObservabilityIntegrationType];
|
|
84
|
+
export type AuthIntegrationType = (typeof AuthIntegrationTypes)[number];
|
|
85
|
+
export type AuthIntegrationConfig = IntegrationConfigTypes[AuthIntegrationType];
|
|
86
|
+
export declare function isDataIntegrationType(type: IntegrationType): type is DatabaseIntegrationType;
|
|
87
|
+
export declare function isDataIntegration(integration: any): integration is BaseDatabaseIntegrationConfig;
|
|
88
|
+
export declare function isAuthIntegrationType(type: IntegrationType): type is AuthIntegrationType;
|
|
89
|
+
export declare function isAuthIntegration(integration: any): integration is AuthIntegrationConfig;
|
|
90
|
+
export type IntegrationConfig = DatabaseIntegrationConfig | ApiIntegrationConfig | ObservabilityIntegrationConfig | AuthIntegrationConfig | AiAssistantIntegrationConfig;
|
|
91
|
+
export interface BaseIntegrationConfig {
|
|
92
|
+
id: IntegrationId;
|
|
93
|
+
type: IntegrationType;
|
|
94
|
+
creationDate: Date;
|
|
95
|
+
updateDate: Date;
|
|
96
|
+
}
|
|
97
|
+
export type TestConnectionRequest = TestDataConnectionRequest | TestGraphQLDataConnectionRequest;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.isAuthIntegration = exports.isAuthIntegrationType = exports.isDataIntegration = exports.isDataIntegrationType = exports.AuthIntegrationTypes = exports.ObservabilityIntegrationTypes = exports.ApiIntegrationTypes = exports.DatabaseIntegrationTypes = exports.IntegrationType = exports.IntegrationCategory = void 0;
|
|
18
|
+
__exportStar(require("./ai_assistant.types"), exports);
|
|
19
|
+
__exportStar(require("./api.types"), exports);
|
|
20
|
+
__exportStar(require("./auth.types"), exports);
|
|
21
|
+
__exportStar(require("./database.types"), exports);
|
|
22
|
+
__exportStar(require("./observability.types"), exports);
|
|
23
|
+
var IntegrationCategory;
|
|
24
|
+
(function (IntegrationCategory) {
|
|
25
|
+
IntegrationCategory["database"] = "database";
|
|
26
|
+
IntegrationCategory["api"] = "api";
|
|
27
|
+
IntegrationCategory["observability"] = "observability";
|
|
28
|
+
IntegrationCategory["crm"] = "crm";
|
|
29
|
+
IntegrationCategory["auth"] = "auth";
|
|
30
|
+
IntegrationCategory["ai"] = "ai";
|
|
31
|
+
})(IntegrationCategory = exports.IntegrationCategory || (exports.IntegrationCategory = {}));
|
|
32
|
+
var IntegrationType;
|
|
33
|
+
(function (IntegrationType) {
|
|
34
|
+
IntegrationType["built_in_db"] = "built_in_db";
|
|
35
|
+
IntegrationType["mongo"] = "mongo";
|
|
36
|
+
IntegrationType["mysql"] = "mysql";
|
|
37
|
+
IntegrationType["mssql"] = "mssql";
|
|
38
|
+
IntegrationType["postgres"] = "postgres";
|
|
39
|
+
IntegrationType["cockroach"] = "cockroach";
|
|
40
|
+
IntegrationType["api"] = "api";
|
|
41
|
+
IntegrationType["graphql"] = "graphql";
|
|
42
|
+
IntegrationType["snowflake"] = "snowflake";
|
|
43
|
+
IntegrationType["datadog"] = "datadog";
|
|
44
|
+
IntegrationType["newrelic"] = "newrelic";
|
|
45
|
+
IntegrationType["auth0"] = "auth0";
|
|
46
|
+
IntegrationType["jwt_rsa"] = "jwt_rsa";
|
|
47
|
+
IntegrationType["jwt_hmac"] = "jwt_hmac";
|
|
48
|
+
IntegrationType["ai_assistant"] = "ai_assistant";
|
|
49
|
+
IntegrationType["algolia"] = "algolia";
|
|
50
|
+
IntegrationType["elastic_observability"] = "elastic_observability";
|
|
51
|
+
IntegrationType["elastic_search"] = "elastic_search";
|
|
52
|
+
IntegrationType["elastic_enterprise_search"] = "elastic_enterprise_search";
|
|
53
|
+
IntegrationType["sentry"] = "sentry";
|
|
54
|
+
IntegrationType["sap_hana"] = "sap_hana";
|
|
55
|
+
IntegrationType["salesforce_crm"] = "salesforce_crm";
|
|
56
|
+
IntegrationType["documentdb"] = "documentdb";
|
|
57
|
+
IntegrationType["dynamodb"] = "dynamodb";
|
|
58
|
+
IntegrationType["cassandra"] = "cassandra";
|
|
59
|
+
IntegrationType["clickhouse"] = "clickhouse";
|
|
60
|
+
IntegrationType["alloydb"] = "alloydb";
|
|
61
|
+
IntegrationType["spanner"] = "spanner";
|
|
62
|
+
IntegrationType["db2"] = "db2";
|
|
63
|
+
IntegrationType["mariadb"] = "mariadb";
|
|
64
|
+
IntegrationType["oracledb"] = "oracledb";
|
|
65
|
+
IntegrationType["redis"] = "redis";
|
|
66
|
+
IntegrationType["xata"] = "xata";
|
|
67
|
+
IntegrationType["azure_sql"] = "azure_sql";
|
|
68
|
+
})(IntegrationType = exports.IntegrationType || (exports.IntegrationType = {}));
|
|
69
|
+
exports.DatabaseIntegrationTypes = [
|
|
70
|
+
IntegrationType.built_in_db,
|
|
71
|
+
IntegrationType.mongo,
|
|
72
|
+
IntegrationType.mysql,
|
|
73
|
+
IntegrationType.mssql,
|
|
74
|
+
IntegrationType.postgres,
|
|
75
|
+
IntegrationType.cockroach,
|
|
76
|
+
IntegrationType.snowflake,
|
|
77
|
+
IntegrationType.oracledb,
|
|
78
|
+
];
|
|
79
|
+
exports.ApiIntegrationTypes = [IntegrationType.api, IntegrationType.graphql];
|
|
80
|
+
exports.ObservabilityIntegrationTypes = [IntegrationType.datadog, IntegrationType.newrelic];
|
|
81
|
+
exports.AuthIntegrationTypes = [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac];
|
|
82
|
+
function isDataIntegrationType(type) {
|
|
83
|
+
return exports.DatabaseIntegrationTypes.includes(type);
|
|
84
|
+
}
|
|
85
|
+
exports.isDataIntegrationType = isDataIntegrationType;
|
|
86
|
+
function isDataIntegration(integration) {
|
|
87
|
+
return isDataIntegrationType(integration.type);
|
|
88
|
+
}
|
|
89
|
+
exports.isDataIntegration = isDataIntegration;
|
|
90
|
+
function isAuthIntegrationType(type) {
|
|
91
|
+
return exports.AuthIntegrationTypes.includes(type);
|
|
92
|
+
}
|
|
93
|
+
exports.isAuthIntegrationType = isAuthIntegrationType;
|
|
94
|
+
function isAuthIntegration(integration) {
|
|
95
|
+
return isAuthIntegrationType(integration.type);
|
|
96
|
+
}
|
|
97
|
+
exports.isAuthIntegration = isAuthIntegration;
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../common/src/integrations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,8CAA4B;AAC5B,+CAA6B;AAC7B,mDAAiC;AACjC,wDAAsC;AAoBtC,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,4CAAuB,CAAA;IACvB,kCAAa,CAAA;IACb,sDAAiC,CAAA;IACjC,kCAAa,CAAA;IACb,oCAAe,CAAA;IACf,gCAAW,CAAA;AACb,CAAC,EAPW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAO9B;AAED,IAAY,eAoCX;AApCD,WAAY,eAAe;IACzB,8CAA6B,CAAA;IAC7B,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;IACvB,0CAAyB,CAAA;IACzB,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,gDAA+B,CAAA;IAE/B,sCAAqB,CAAA;IACrB,kEAAiD,CAAA;IACjD,oDAAmC,CAAA;IACnC,0EAAyD,CAAA;IACzD,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;IACvB,oDAAmC,CAAA;IACnC,4CAA2B,CAAA;IAC3B,wCAAuB,CAAA;IACvB,0CAAyB,CAAA;IACzB,4CAA2B,CAAA;IAC3B,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;IACb,sCAAqB,CAAA;IACrB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,0CAAyB,CAAA;AAC3B,CAAC,EApCW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAoC1B;AAqBY,QAAA,wBAAwB,GAAG;IACtC,eAAe,CAAC,WAAW;IAC3B,eAAe,CAAC,KAAK;IACrB,eAAe,CAAC,KAAK;IACrB,eAAe,CAAC,KAAK;IACrB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,QAAQ;CAChB,CAAC;AAIE,QAAA,mBAAmB,GAAG,CAAC,eAAe,CAAC,GAAG,EAAE,eAAe,CAAC,OAAO,CAAU,CAAC;AAE9E,QAAA,6BAA6B,GAAG,CAAC,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAU,CAAC;AAE7F,QAAA,oBAAoB,GAAG,CAAC,eAAe,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAU,CAAC;AAWxH,SAAgB,qBAAqB,CAAC,IAAqB;IACzD,OAAQ,gCAAuD,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjF,CAAC;AAFD,sDAEC;AAED,SAAgB,iBAAiB,CAAC,WAAgB;IAChD,OAAO,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC;AAFD,8CAEC;AAED,SAAgB,qBAAqB,CAAC,IAAqB;IACzD,OAAQ,4BAAmD,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7E,CAAC;AAFD,sDAEC;AAED,SAAgB,iBAAiB,CAAC,WAAgB;IAChD,OAAO,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC;AAFD,8CAEC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseIntegrationConfig, IntegrationType } from './index';
|
|
2
|
+
export interface DatadogIntegrationConfig extends BaseIntegrationConfig {
|
|
3
|
+
type: IntegrationType.datadog;
|
|
4
|
+
configuration: DatadogIntegrationConfiguration;
|
|
5
|
+
}
|
|
6
|
+
export interface NewRelicIntegrationConfig extends BaseIntegrationConfig {
|
|
7
|
+
type: IntegrationType.newrelic;
|
|
8
|
+
configuration: NewRelicIntegrationConfiguration;
|
|
9
|
+
}
|
|
10
|
+
export type DatadogRegion = 'us1' | 'us3' | 'us5' | 'eu1' | 'us1-fed';
|
|
11
|
+
export declare const datadogRegionMap: Record<DatadogRegion, string>;
|
|
12
|
+
export interface DatadogIntegrationConfiguration {
|
|
13
|
+
apiKey: string;
|
|
14
|
+
appKey: string;
|
|
15
|
+
datadogRegion: DatadogRegion;
|
|
16
|
+
}
|
|
17
|
+
export type NewRelicRegion = 'worldwide' | 'eu';
|
|
18
|
+
export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
|
|
19
|
+
export interface NewRelicIntegrationConfiguration {
|
|
20
|
+
apiKey: string;
|
|
21
|
+
newRelicRegion: NewRelicRegion;
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newRelicRegionMap = exports.datadogRegionMap = void 0;
|
|
4
|
+
exports.datadogRegionMap = {
|
|
5
|
+
us1: 'US1 - East',
|
|
6
|
+
us3: 'US3 - West',
|
|
7
|
+
us5: 'US5 - Central',
|
|
8
|
+
eu1: 'EU1 - Europe',
|
|
9
|
+
'us1-fed': 'US1-FED (FedRamp)',
|
|
10
|
+
};
|
|
11
|
+
exports.newRelicRegionMap = {
|
|
12
|
+
worldwide: 'Worldwide',
|
|
13
|
+
eu: 'Europe',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=observability.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observability.types.js","sourceRoot":"","sources":["../../../../../common/src/integrations/observability.types.ts"],"names":[],"mappings":";;;AAca,QAAA,gBAAgB,GAAkC;IAC7D,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,YAAY;IACjB,GAAG,EAAE,eAAe;IACpB,GAAG,EAAE,cAAc;IACnB,SAAS,EAAE,mBAAmB;CAC/B,CAAC;AAUW,QAAA,iBAAiB,GAAmC;IAC/D,SAAS,EAAE,WAAW;IACtB,EAAE,EAAE,QAAQ;CACb,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
log(record: LogRecord): void;
|
|
9
|
+
}
|
|
10
|
+
export declare enum LogLevel {
|
|
11
|
+
TRACE = "trace",
|
|
12
|
+
DEBUG = "debug",
|
|
13
|
+
INFO = "info",
|
|
14
|
+
WARN = "warn",
|
|
15
|
+
ERROR = "error"
|
|
16
|
+
}
|
|
17
|
+
export interface LogRecord {
|
|
18
|
+
level?: LogLevel;
|
|
19
|
+
message?: string;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLevel = void 0;
|
|
4
|
+
var LogLevel;
|
|
5
|
+
(function (LogLevel) {
|
|
6
|
+
LogLevel["TRACE"] = "trace";
|
|
7
|
+
LogLevel["DEBUG"] = "debug";
|
|
8
|
+
LogLevel["INFO"] = "info";
|
|
9
|
+
LogLevel["WARN"] = "warn";
|
|
10
|
+
LogLevel["ERROR"] = "error";
|
|
11
|
+
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
|
|
12
|
+
//# sourceMappingURL=logger.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.types.js","sourceRoot":"","sources":["../../../../common/src/logger.types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EANW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAMnB"}
|