@squidcloud/client 1.0.78 → 1.0.80
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/cjs/index.js +3 -3
- package/dist/common/src/ai-assistant.context.d.ts +12 -12
- package/dist/common/src/ai-assistant.schemas.d.ts +1 -1
- package/dist/common/src/ai-assistant.types.d.ts +2 -2
- package/dist/common/src/api-call.context.d.ts +13 -13
- package/dist/common/src/api.types.d.ts +4 -4
- package/dist/common/src/application.schemas.d.ts +1 -1
- package/dist/common/src/application.types.d.ts +184 -184
- package/dist/common/src/backend-function.schemas.d.ts +1 -1
- package/dist/common/src/backend-function.types.d.ts +1 -1
- package/dist/common/src/backend-run.types.d.ts +2 -2
- package/dist/common/src/bundle-api.types.d.ts +36 -36
- package/dist/common/src/bundle-data.types.d.ts +4 -4
- package/dist/common/src/communication.types.d.ts +12 -12
- package/dist/common/src/context.types.d.ts +40 -40
- package/dist/common/src/distributed-lock.context.d.ts +5 -5
- package/dist/common/src/document.types.d.ts +22 -22
- package/dist/common/src/graphql.context.d.ts +7 -7
- package/dist/common/src/graphql.types.d.ts +9 -9
- package/dist/common/src/heartbeat.types.d.ts +1 -1
- package/dist/common/src/http-status.enum.d.ts +50 -50
- package/dist/common/src/index.d.ts +54 -54
- package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -30
- package/dist/common/src/integrations/api.types.d.ts +80 -80
- package/dist/common/src/integrations/auth.types.d.ts +39 -39
- package/dist/common/src/integrations/database.types.d.ts +236 -236
- package/dist/common/src/integrations/index.d.ts +101 -101
- package/dist/common/src/integrations/observability.types.d.ts +23 -23
- package/dist/common/src/logger.types.d.ts +21 -21
- package/dist/common/src/metrics.types.d.ts +1 -1
- package/dist/common/src/mutation.context.d.ts +14 -14
- package/dist/common/src/mutation.schemas.d.ts +1 -1
- package/dist/common/src/mutation.types.d.ts +53 -53
- package/dist/common/src/named-query.context.d.ts +4 -4
- package/dist/common/src/named-query.schemas.d.ts +1 -1
- package/dist/common/src/named-query.types.d.ts +1 -1
- package/dist/common/src/query/index.d.ts +2 -2
- package/dist/common/src/query/query-context.d.ts +109 -42
- package/dist/common/src/query/simple-query-builder.d.ts +117 -117
- package/dist/common/src/query.schemas.d.ts +3 -3
- package/dist/common/src/query.types.d.ts +57 -57
- package/dist/common/src/regions.d.ts +1 -1
- package/dist/common/src/schema/schema.types.d.ts +54 -54
- package/dist/common/src/secret.schemas.d.ts +1 -1
- package/dist/common/src/secret.types.d.ts +8 -8
- package/dist/common/src/security.types.d.ts +1 -1
- package/dist/common/src/socket.schemas.d.ts +1 -1
- package/dist/common/src/socket.types.d.ts +1 -1
- package/dist/common/src/time-units.d.ts +1 -1
- package/dist/common/src/trigger.types.d.ts +1 -1
- package/dist/common/src/types.d.ts +8 -8
- package/dist/common/src/utils/array.d.ts +1 -1
- package/dist/common/src/utils/assert.d.ts +1 -1
- package/dist/common/src/utils/error.d.ts +4 -4
- package/dist/common/src/utils/http.d.ts +2 -2
- package/dist/common/src/utils/id.d.ts +2 -2
- package/dist/common/src/utils/lock.manager.d.ts +14 -14
- package/dist/common/src/utils/nullish.d.ts +1 -1
- package/dist/common/src/utils/object.d.ts +6 -6
- package/dist/common/src/utils/serialization.d.ts +6 -6
- package/dist/common/src/utils/transforms.d.ts +18 -18
- package/dist/common/src/utils/url.d.ts +1 -1
- package/dist/common/src/utils/validation.d.ts +30 -30
- package/dist/common/src/webhook-response.d.ts +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/ai-assistant-client.d.ts +167 -167
- package/dist/typescript-client/src/ai-client.factory.d.ts +11 -11
- package/dist/typescript-client/src/api.manager.d.ts +15 -15
- package/dist/typescript-client/src/auth.manager.d.ts +23 -23
- package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
- package/dist/typescript-client/src/client-id.service.d.ts +25 -25
- package/dist/typescript-client/src/collection-reference.d.ts +80 -81
- package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -16
- package/dist/typescript-client/src/connection-details.d.ts +23 -23
- package/dist/typescript-client/src/data.manager.d.ts +172 -172
- package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +19 -19
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +134 -134
- package/dist/typescript-client/src/document-reference.factory.d.ts +12 -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 +8 -8
- package/dist/typescript-client/src/mutation/mutation-sender.d.ts +10 -10
- package/dist/typescript-client/src/named-query.manager.d.ts +12 -12
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +72 -72
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +89 -89
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +135 -135
- package/dist/typescript-client/src/query/query.types.d.ts +14 -14
- package/dist/typescript-client/src/rpc.manager.d.ts +28 -28
- package/dist/typescript-client/src/socket.manager.d.ts +32 -32
- package/dist/typescript-client/src/squid.d.ts +218 -218
- 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/setup-tests.d.ts +1 -1
- package/dist/typescript-client/src/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,101 +1,101 @@
|
|
|
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, CognitoIntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig, OktaIntegrationConfig } 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
|
-
'cognito' = "cognito",
|
|
37
|
-
'okta' = "okta",
|
|
38
|
-
'algolia' = "algolia",
|
|
39
|
-
'elastic_observability' = "elastic_observability",
|
|
40
|
-
'elastic_search' = "elastic_search",
|
|
41
|
-
'elastic_enterprise_search' = "elastic_enterprise_search",
|
|
42
|
-
'sentry' = "sentry",
|
|
43
|
-
'sap_hana' = "sap_hana",
|
|
44
|
-
'salesforce_crm' = "salesforce_crm",
|
|
45
|
-
'documentdb' = "documentdb",
|
|
46
|
-
'dynamodb' = "dynamodb",
|
|
47
|
-
'cassandra' = "cassandra",
|
|
48
|
-
'clickhouse' = "clickhouse",
|
|
49
|
-
'alloydb' = "alloydb",
|
|
50
|
-
'spanner' = "spanner",
|
|
51
|
-
'db2' = "db2",
|
|
52
|
-
'mariadb' = "mariadb",
|
|
53
|
-
'oracledb' = "oracledb",
|
|
54
|
-
'redis' = "redis",
|
|
55
|
-
'xata' = "xata",
|
|
56
|
-
'azure_sql' = "azure_sql"
|
|
57
|
-
}
|
|
58
|
-
export interface IntegrationConfigTypes {
|
|
59
|
-
[IntegrationType.built_in_db]: InternalIntegrationConfig;
|
|
60
|
-
[IntegrationType.mongo]: MongoIntegrationConfig;
|
|
61
|
-
[IntegrationType.mysql]: MySqlIntegrationConfig;
|
|
62
|
-
[IntegrationType.oracledb]: OracleIntegrationConfig;
|
|
63
|
-
[IntegrationType.mssql]: MssqlIntegrationConfig;
|
|
64
|
-
[IntegrationType.postgres]: PostgresIntegrationConfig;
|
|
65
|
-
[IntegrationType.cockroach]: CockroachIntegrationConfig;
|
|
66
|
-
[IntegrationType.snowflake]: SnowflakeIntegrationConfig;
|
|
67
|
-
[IntegrationType.api]: HttpApiIntegrationConfig;
|
|
68
|
-
[IntegrationType.graphql]: GraphQLIntegrationConfig;
|
|
69
|
-
[IntegrationType.datadog]: DatadogIntegrationConfig;
|
|
70
|
-
[IntegrationType.newrelic]: NewRelicIntegrationConfig;
|
|
71
|
-
[IntegrationType.auth0]: Auth0IntegrationConfig;
|
|
72
|
-
[IntegrationType.jwt_rsa]: JwtRsaIntegrationConfig;
|
|
73
|
-
[IntegrationType.jwt_hmac]: JwtHmacIntegrationConfig;
|
|
74
|
-
[IntegrationType.ai_assistant]: AiAssistantIntegrationConfig;
|
|
75
|
-
[IntegrationType.cognito]: CognitoIntegrationConfig;
|
|
76
|
-
[IntegrationType.okta]: OktaIntegrationConfig;
|
|
77
|
-
}
|
|
78
|
-
export declare const DatabaseIntegrationTypes: readonly [IntegrationType.built_in_db, IntegrationType.mongo, IntegrationType.mysql, IntegrationType.mssql, IntegrationType.postgres, IntegrationType.cockroach, IntegrationType.snowflake, IntegrationType.oracledb];
|
|
79
|
-
export type DatabaseIntegrationType = (typeof DatabaseIntegrationTypes)[number];
|
|
80
|
-
export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
|
|
81
|
-
export declare const ApiIntegrationTypes: readonly [IntegrationType.api, IntegrationType.graphql];
|
|
82
|
-
export declare const ObservabilityIntegrationTypes: readonly [IntegrationType.datadog, IntegrationType.newrelic];
|
|
83
|
-
export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac, IntegrationType.cognito, IntegrationType.okta];
|
|
84
|
-
export type ApiIntegrationType = (typeof ApiIntegrationTypes)[number];
|
|
85
|
-
export type ApiIntegrationConfig = IntegrationConfigTypes[ApiIntegrationType];
|
|
86
|
-
export type ObservabilityIntegrationType = (typeof ObservabilityIntegrationTypes)[number];
|
|
87
|
-
export type ObservabilityIntegrationConfig = IntegrationConfigTypes[ObservabilityIntegrationType];
|
|
88
|
-
export type AuthIntegrationType = (typeof AuthIntegrationTypes)[number];
|
|
89
|
-
export type AuthIntegrationConfig = IntegrationConfigTypes[AuthIntegrationType];
|
|
90
|
-
export declare function isDataIntegrationType(type: IntegrationType): type is DatabaseIntegrationType;
|
|
91
|
-
export declare function isDataIntegration(integration: any): integration is BaseDatabaseIntegrationConfig;
|
|
92
|
-
export declare function isAuthIntegrationType(type: IntegrationType): type is AuthIntegrationType;
|
|
93
|
-
export declare function isAuthIntegration(integration: any): integration is AuthIntegrationConfig;
|
|
94
|
-
export type IntegrationConfig = DatabaseIntegrationConfig | ApiIntegrationConfig | ObservabilityIntegrationConfig | AuthIntegrationConfig | AiAssistantIntegrationConfig;
|
|
95
|
-
export interface BaseIntegrationConfig {
|
|
96
|
-
id: IntegrationId;
|
|
97
|
-
type: IntegrationType;
|
|
98
|
-
creationDate: Date;
|
|
99
|
-
updateDate: Date;
|
|
100
|
-
}
|
|
101
|
-
export type TestConnectionRequest = TestDataConnectionRequest | TestGraphQLDataConnectionRequest;
|
|
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, CognitoIntegrationConfig, JwtHmacIntegrationConfig, JwtRsaIntegrationConfig, OktaIntegrationConfig } 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
|
+
'cognito' = "cognito",
|
|
37
|
+
'okta' = "okta",
|
|
38
|
+
'algolia' = "algolia",
|
|
39
|
+
'elastic_observability' = "elastic_observability",
|
|
40
|
+
'elastic_search' = "elastic_search",
|
|
41
|
+
'elastic_enterprise_search' = "elastic_enterprise_search",
|
|
42
|
+
'sentry' = "sentry",
|
|
43
|
+
'sap_hana' = "sap_hana",
|
|
44
|
+
'salesforce_crm' = "salesforce_crm",
|
|
45
|
+
'documentdb' = "documentdb",
|
|
46
|
+
'dynamodb' = "dynamodb",
|
|
47
|
+
'cassandra' = "cassandra",
|
|
48
|
+
'clickhouse' = "clickhouse",
|
|
49
|
+
'alloydb' = "alloydb",
|
|
50
|
+
'spanner' = "spanner",
|
|
51
|
+
'db2' = "db2",
|
|
52
|
+
'mariadb' = "mariadb",
|
|
53
|
+
'oracledb' = "oracledb",
|
|
54
|
+
'redis' = "redis",
|
|
55
|
+
'xata' = "xata",
|
|
56
|
+
'azure_sql' = "azure_sql"
|
|
57
|
+
}
|
|
58
|
+
export interface IntegrationConfigTypes {
|
|
59
|
+
[IntegrationType.built_in_db]: InternalIntegrationConfig;
|
|
60
|
+
[IntegrationType.mongo]: MongoIntegrationConfig;
|
|
61
|
+
[IntegrationType.mysql]: MySqlIntegrationConfig;
|
|
62
|
+
[IntegrationType.oracledb]: OracleIntegrationConfig;
|
|
63
|
+
[IntegrationType.mssql]: MssqlIntegrationConfig;
|
|
64
|
+
[IntegrationType.postgres]: PostgresIntegrationConfig;
|
|
65
|
+
[IntegrationType.cockroach]: CockroachIntegrationConfig;
|
|
66
|
+
[IntegrationType.snowflake]: SnowflakeIntegrationConfig;
|
|
67
|
+
[IntegrationType.api]: HttpApiIntegrationConfig;
|
|
68
|
+
[IntegrationType.graphql]: GraphQLIntegrationConfig;
|
|
69
|
+
[IntegrationType.datadog]: DatadogIntegrationConfig;
|
|
70
|
+
[IntegrationType.newrelic]: NewRelicIntegrationConfig;
|
|
71
|
+
[IntegrationType.auth0]: Auth0IntegrationConfig;
|
|
72
|
+
[IntegrationType.jwt_rsa]: JwtRsaIntegrationConfig;
|
|
73
|
+
[IntegrationType.jwt_hmac]: JwtHmacIntegrationConfig;
|
|
74
|
+
[IntegrationType.ai_assistant]: AiAssistantIntegrationConfig;
|
|
75
|
+
[IntegrationType.cognito]: CognitoIntegrationConfig;
|
|
76
|
+
[IntegrationType.okta]: OktaIntegrationConfig;
|
|
77
|
+
}
|
|
78
|
+
export declare const DatabaseIntegrationTypes: readonly [IntegrationType.built_in_db, IntegrationType.mongo, IntegrationType.mysql, IntegrationType.mssql, IntegrationType.postgres, IntegrationType.cockroach, IntegrationType.snowflake, IntegrationType.oracledb];
|
|
79
|
+
export type DatabaseIntegrationType = (typeof DatabaseIntegrationTypes)[number];
|
|
80
|
+
export type DatabaseIntegrationConfig = IntegrationConfigTypes[DatabaseIntegrationType];
|
|
81
|
+
export declare const ApiIntegrationTypes: readonly [IntegrationType.api, IntegrationType.graphql];
|
|
82
|
+
export declare const ObservabilityIntegrationTypes: readonly [IntegrationType.datadog, IntegrationType.newrelic];
|
|
83
|
+
export declare const AuthIntegrationTypes: readonly [IntegrationType.auth0, IntegrationType.jwt_rsa, IntegrationType.jwt_hmac, IntegrationType.cognito, IntegrationType.okta];
|
|
84
|
+
export type ApiIntegrationType = (typeof ApiIntegrationTypes)[number];
|
|
85
|
+
export type ApiIntegrationConfig = IntegrationConfigTypes[ApiIntegrationType];
|
|
86
|
+
export type ObservabilityIntegrationType = (typeof ObservabilityIntegrationTypes)[number];
|
|
87
|
+
export type ObservabilityIntegrationConfig = IntegrationConfigTypes[ObservabilityIntegrationType];
|
|
88
|
+
export type AuthIntegrationType = (typeof AuthIntegrationTypes)[number];
|
|
89
|
+
export type AuthIntegrationConfig = IntegrationConfigTypes[AuthIntegrationType];
|
|
90
|
+
export declare function isDataIntegrationType(type: IntegrationType): type is DatabaseIntegrationType;
|
|
91
|
+
export declare function isDataIntegration(integration: any): integration is BaseDatabaseIntegrationConfig;
|
|
92
|
+
export declare function isAuthIntegrationType(type: IntegrationType): type is AuthIntegrationType;
|
|
93
|
+
export declare function isAuthIntegration(integration: any): integration is AuthIntegrationConfig;
|
|
94
|
+
export type IntegrationConfig = DatabaseIntegrationConfig | ApiIntegrationConfig | ObservabilityIntegrationConfig | AuthIntegrationConfig | AiAssistantIntegrationConfig;
|
|
95
|
+
export interface BaseIntegrationConfig {
|
|
96
|
+
id: IntegrationId;
|
|
97
|
+
type: IntegrationType;
|
|
98
|
+
creationDate: Date;
|
|
99
|
+
updateDate: Date;
|
|
100
|
+
}
|
|
101
|
+
export type TestConnectionRequest = TestDataConnectionRequest | TestGraphQLDataConnectionRequest;
|
|
@@ -1,23 +1,23 @@
|
|
|
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' | 'ap1';
|
|
11
|
-
export declare const datadogRegionMap: Record<DatadogRegion, string>;
|
|
12
|
-
export declare const datadogLogsUrlMap: Record<DatadogRegion, string>;
|
|
13
|
-
export interface DatadogIntegrationConfiguration {
|
|
14
|
-
apiKey: string;
|
|
15
|
-
appKey: string;
|
|
16
|
-
datadogRegion: DatadogRegion;
|
|
17
|
-
}
|
|
18
|
-
export type NewRelicRegion = 'worldwide' | 'eu';
|
|
19
|
-
export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
|
|
20
|
-
export interface NewRelicIntegrationConfiguration {
|
|
21
|
-
apiKey: string;
|
|
22
|
-
newRelicRegion: NewRelicRegion;
|
|
23
|
-
}
|
|
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' | 'ap1';
|
|
11
|
+
export declare const datadogRegionMap: Record<DatadogRegion, string>;
|
|
12
|
+
export declare const datadogLogsUrlMap: Record<DatadogRegion, string>;
|
|
13
|
+
export interface DatadogIntegrationConfiguration {
|
|
14
|
+
apiKey: string;
|
|
15
|
+
appKey: string;
|
|
16
|
+
datadogRegion: DatadogRegion;
|
|
17
|
+
}
|
|
18
|
+
export type NewRelicRegion = 'worldwide' | 'eu';
|
|
19
|
+
export declare const newRelicRegionMap: Record<NewRelicRegion, string>;
|
|
20
|
+
export interface NewRelicIntegrationConfiguration {
|
|
21
|
+
apiKey: string;
|
|
22
|
+
newRelicRegion: NewRelicRegion;
|
|
23
|
+
}
|
|
@@ -1,21 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type MetricType = 'count' | 'gauge';
|
|
1
|
+
export type MetricType = 'count' | 'gauge';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BeforeAndAfterDocs } from './document.types';
|
|
2
|
-
import { Mutation, MutationType } from './mutation.types';
|
|
3
|
-
import { Paths } from './types';
|
|
4
|
-
/** The mutation context that will be provided to the security function. */
|
|
5
|
-
export declare class MutationContext<T = any> {
|
|
6
|
-
readonly mutation: Mutation<T>;
|
|
7
|
-
readonly beforeAndAfterDocs: BeforeAndAfterDocs<T>;
|
|
8
|
-
readonly serverTimeStamp: Date;
|
|
9
|
-
getMutationType(): MutationType;
|
|
10
|
-
get before(): T | undefined;
|
|
11
|
-
get after(): T | undefined;
|
|
12
|
-
/** Returns true if the mutation affects the provided path. */
|
|
13
|
-
affectsPath(path: Paths<T>): boolean;
|
|
14
|
-
}
|
|
1
|
+
import { BeforeAndAfterDocs } from './document.types';
|
|
2
|
+
import { Mutation, MutationType } from './mutation.types';
|
|
3
|
+
import { Paths } from './types';
|
|
4
|
+
/** The mutation context that will be provided to the security function. */
|
|
5
|
+
export declare class MutationContext<T = any> {
|
|
6
|
+
readonly mutation: Mutation<T>;
|
|
7
|
+
readonly beforeAndAfterDocs: BeforeAndAfterDocs<T>;
|
|
8
|
+
readonly serverTimeStamp: Date;
|
|
9
|
+
getMutationType(): MutationType;
|
|
10
|
+
get before(): T | undefined;
|
|
11
|
+
get after(): T | undefined;
|
|
12
|
+
/** Returns true if the mutation affects the provided path. */
|
|
13
|
+
affectsPath(path: Paths<T>): boolean;
|
|
14
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { SquidDocIdObj } from './document.types';
|
|
2
|
-
/** A mutation on a document. */
|
|
3
|
-
export type Mutation<T = any> = UpdateMutation<T> | InsertMutation<T> | DeleteMutation;
|
|
4
|
-
/** The mutation type. */
|
|
5
|
-
export type MutationType = 'insert' | 'update' | 'delete';
|
|
6
|
-
interface BaseMutation {
|
|
7
|
-
type: MutationType;
|
|
8
|
-
squidDocIdObj: SquidDocIdObj;
|
|
9
|
-
}
|
|
10
|
-
export interface DeleteMutation extends BaseMutation {
|
|
11
|
-
type: 'delete';
|
|
12
|
-
}
|
|
13
|
-
export interface UpdateMutation<T = any> extends BaseMutation {
|
|
14
|
-
type: 'update';
|
|
15
|
-
/** The updated properties */
|
|
16
|
-
properties: {
|
|
17
|
-
[key in keyof T & string]?: Array<PropertyMutation<T[key]>>;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export interface InsertMutation<T = any> extends BaseMutation {
|
|
21
|
-
type: 'insert';
|
|
22
|
-
/** The inserted document */
|
|
23
|
-
properties: T;
|
|
24
|
-
}
|
|
25
|
-
/** A representation of a single property update */
|
|
26
|
-
export type PropertyMutation<Value = any> = ApplyNumericFnPropertyMutation | ApplyStringFnPropertyMutation | ValueUpdatePropertyMutation<Value> | RemovePropertyMutation;
|
|
27
|
-
/** A value update property mutation */
|
|
28
|
-
export interface ValueUpdatePropertyMutation<Value = any> {
|
|
29
|
-
type: 'update';
|
|
30
|
-
value: Value;
|
|
31
|
-
}
|
|
32
|
-
/** Applying a numeric function to a property */
|
|
33
|
-
export interface ApplyNumericFnPropertyMutation {
|
|
34
|
-
type: 'applyNumericFn';
|
|
35
|
-
fn: 'increment';
|
|
36
|
-
value: number;
|
|
37
|
-
}
|
|
38
|
-
/** A property update that removes a property from a document */
|
|
39
|
-
export interface RemovePropertyMutation {
|
|
40
|
-
type: 'removeProperty';
|
|
41
|
-
}
|
|
42
|
-
interface ApplyExtendString {
|
|
43
|
-
type: 'applyStringFn';
|
|
44
|
-
fn: 'extendString';
|
|
45
|
-
value: string;
|
|
46
|
-
}
|
|
47
|
-
interface ApplyTrimString {
|
|
48
|
-
type: 'applyStringFn';
|
|
49
|
-
fn: 'trim';
|
|
50
|
-
}
|
|
51
|
-
/** A property mutation that modifies a string */
|
|
52
|
-
export type ApplyStringFnPropertyMutation = ApplyExtendString | ApplyTrimString;
|
|
53
|
-
export {};
|
|
1
|
+
import { SquidDocIdObj } from './document.types';
|
|
2
|
+
/** A mutation on a document. */
|
|
3
|
+
export type Mutation<T = any> = UpdateMutation<T> | InsertMutation<T> | DeleteMutation;
|
|
4
|
+
/** The mutation type. */
|
|
5
|
+
export type MutationType = 'insert' | 'update' | 'delete';
|
|
6
|
+
interface BaseMutation {
|
|
7
|
+
type: MutationType;
|
|
8
|
+
squidDocIdObj: SquidDocIdObj;
|
|
9
|
+
}
|
|
10
|
+
export interface DeleteMutation extends BaseMutation {
|
|
11
|
+
type: 'delete';
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateMutation<T = any> extends BaseMutation {
|
|
14
|
+
type: 'update';
|
|
15
|
+
/** The updated properties */
|
|
16
|
+
properties: {
|
|
17
|
+
[key in keyof T & string]?: Array<PropertyMutation<T[key]>>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface InsertMutation<T = any> extends BaseMutation {
|
|
21
|
+
type: 'insert';
|
|
22
|
+
/** The inserted document */
|
|
23
|
+
properties: T;
|
|
24
|
+
}
|
|
25
|
+
/** A representation of a single property update */
|
|
26
|
+
export type PropertyMutation<Value = any> = ApplyNumericFnPropertyMutation | ApplyStringFnPropertyMutation | ValueUpdatePropertyMutation<Value> | RemovePropertyMutation;
|
|
27
|
+
/** A value update property mutation */
|
|
28
|
+
export interface ValueUpdatePropertyMutation<Value = any> {
|
|
29
|
+
type: 'update';
|
|
30
|
+
value: Value;
|
|
31
|
+
}
|
|
32
|
+
/** Applying a numeric function to a property */
|
|
33
|
+
export interface ApplyNumericFnPropertyMutation {
|
|
34
|
+
type: 'applyNumericFn';
|
|
35
|
+
fn: 'increment';
|
|
36
|
+
value: number;
|
|
37
|
+
}
|
|
38
|
+
/** A property update that removes a property from a document */
|
|
39
|
+
export interface RemovePropertyMutation {
|
|
40
|
+
type: 'removeProperty';
|
|
41
|
+
}
|
|
42
|
+
interface ApplyExtendString {
|
|
43
|
+
type: 'applyStringFn';
|
|
44
|
+
fn: 'extendString';
|
|
45
|
+
value: string;
|
|
46
|
+
}
|
|
47
|
+
interface ApplyTrimString {
|
|
48
|
+
type: 'applyStringFn';
|
|
49
|
+
fn: 'trim';
|
|
50
|
+
}
|
|
51
|
+
/** A property mutation that modifies a string */
|
|
52
|
+
export type ApplyStringFnPropertyMutation = ApplyExtendString | ApplyTrimString;
|
|
53
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The context provided to the secure named query function. */
|
|
2
|
-
export declare class NamedQueryContext {
|
|
3
|
-
readonly params: Record<string, any>;
|
|
4
|
-
}
|
|
1
|
+
/** The context provided to the secure named query function. */
|
|
2
|
+
export declare class NamedQueryContext {
|
|
3
|
+
readonly params: Record<string, any>;
|
|
4
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './query-context';
|
|
2
|
-
export * from './simple-query-builder';
|
|
1
|
+
export * from './query-context';
|
|
2
|
+
export * from './simple-query-builder';
|
|
@@ -1,42 +1,109 @@
|
|
|
1
|
-
import { IntegrationId } from '../communication.types';
|
|
2
|
-
import { CollectionName, DocumentData, FieldName } from '../document.types';
|
|
3
|
-
import { AllOperators,
|
|
4
|
-
import { PartialBy, Paths } from '../types';
|
|
5
|
-
export declare class QueryContext<T = any> {
|
|
6
|
-
readonly query: Query<T>;
|
|
7
|
-
private readonly parsedConditions;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
import { IntegrationId } from '../communication.types';
|
|
2
|
+
import { CollectionName, DocumentData, FieldName } from '../document.types';
|
|
3
|
+
import { AllOperators, ContextConditions, FieldSort, GeneralCondition, GeneralConditions, GenericValue, Query } from '../query.types';
|
|
4
|
+
import { PartialBy, Paths } from '../types';
|
|
5
|
+
export declare class QueryContext<T = any> {
|
|
6
|
+
readonly query: Query<T>;
|
|
7
|
+
private readonly parsedConditions;
|
|
8
|
+
/**
|
|
9
|
+
* The ID of the integration being queried.
|
|
10
|
+
*/
|
|
11
|
+
get integrationId(): IntegrationId;
|
|
12
|
+
/**
|
|
13
|
+
* The name of the collection being queried.
|
|
14
|
+
*/
|
|
15
|
+
get collectionName(): CollectionName;
|
|
16
|
+
/**
|
|
17
|
+
* The query limit if one exists, -1 otherwise.
|
|
18
|
+
*/
|
|
19
|
+
get limit(): number;
|
|
20
|
+
/**
|
|
21
|
+
* Verifies that the query's sort order aligns with the provided field sorts. The fields specified in the `sorts`
|
|
22
|
+
* parameter must appear in the exact order at the beginning of the query's sort sequence. The query can include
|
|
23
|
+
* additional fields in its sort order, but only after the specified sorts.
|
|
24
|
+
*
|
|
25
|
+
* @param sorts An array of field sorts.
|
|
26
|
+
* @returns Whether the query's sorts matches the provided field sorts.
|
|
27
|
+
*/
|
|
28
|
+
sortedBy(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Verifies that the query's sort order exactly matches the provided field sorts. The fields specified in the
|
|
31
|
+
* `sorts` parameter must appear in the exact order in the query's sort sequence. No additional sorts may be present
|
|
32
|
+
* in the query.
|
|
33
|
+
*
|
|
34
|
+
* @param sorts An array of field sorts.
|
|
35
|
+
* @returns Whether the query's sorts exactly match the provided field sorts.
|
|
36
|
+
*/
|
|
37
|
+
sortedByExact(sorts: Array<PartialBy<FieldSort<T>, 'asc'>>): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Verifies that the query is a subquery of the specified condition. A subquery is defined as a query that evaluates
|
|
40
|
+
* to a subset of the results that would be obtained by applying the parent condition. The subquery may also include
|
|
41
|
+
* additional conditions, as these only narrow the result set.
|
|
42
|
+
*
|
|
43
|
+
* @param fieldName The name of the field for the condition.
|
|
44
|
+
* @param operator The operator of the condition.
|
|
45
|
+
* @param value The value of the condition.
|
|
46
|
+
* @returns Whether the query is a subquery of the parent condition.
|
|
47
|
+
*/
|
|
48
|
+
isSubqueryOf<F extends FieldName<T>, O extends AllOperators>(fieldName: F, operator: O, value: GenericValue<T, F, O> | null): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Verifies that the query is a subquery of the specified condition. A subquery is defined as a query that evaluates
|
|
51
|
+
* to a subset of the results that would be obtained by applying the parent condition. The subquery may also include
|
|
52
|
+
* additional conditions, as these only narrow the result set.
|
|
53
|
+
*
|
|
54
|
+
* @param condition The condition to validate.
|
|
55
|
+
* @returns Whether the query is a subquery of the parent condition.
|
|
56
|
+
*/
|
|
57
|
+
isSubqueryOfCondition(condition: GeneralCondition<T>): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Verifies that the query is a subquery of the specified conditions. A subquery is defined as a query that evaluates
|
|
60
|
+
* to a subset of the results that would be obtained by applying the parent conditions. The subquery may also include
|
|
61
|
+
* additional conditions, as these only narrow the result set.
|
|
62
|
+
*
|
|
63
|
+
* @param conditions The conditions to validate.
|
|
64
|
+
* @returns Whether the query includes subquery of the parent conditions.
|
|
65
|
+
*/
|
|
66
|
+
isSubqueryOfConditions(conditions: GeneralConditions<T>): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Verifies that the query is a subquery of the specified query. A subquery is defined as a query that evaluates
|
|
69
|
+
* to a subset of the results that obtained for the parent query, including sorts and limits.
|
|
70
|
+
*
|
|
71
|
+
* @param query The query to validate.
|
|
72
|
+
* @returns Whether the query is a subquery of the parent query.
|
|
73
|
+
*/
|
|
74
|
+
isSubqueryOfQuery(query: Query<T>): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Returns all conditions that apply to any of the specified field names. This method
|
|
77
|
+
* provides a convenient way to retrieve all conditions that involve a specific set of fields.
|
|
78
|
+
*
|
|
79
|
+
* @param fieldNames The field names for which to retrieve conditions.
|
|
80
|
+
* @returns An array of conditions that involve any of the specified field names.
|
|
81
|
+
*/
|
|
82
|
+
getConditionsFor<K extends FieldName<T>>(...fieldNames: K[]): ContextConditions<T, K>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns all conditions that apply to the specified field name. This method provides
|
|
85
|
+
* a convenient way to retrieve all conditions that involve a specific field.
|
|
86
|
+
*
|
|
87
|
+
* @param fieldName The field name for which to retrieve conditions.
|
|
88
|
+
* @returns An array of conditions that involve the specified field name.
|
|
89
|
+
*/
|
|
90
|
+
getConditionsForField<K extends Paths<T>>(fieldName: K): ContextConditions<T>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns true if the given document can be a result of the query.
|
|
93
|
+
* The method does not account for limit and sort order.
|
|
94
|
+
*/
|
|
95
|
+
documentMatchesQuery(doc: DocumentData): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Compares a condition against a given operator and value to determine if the
|
|
98
|
+
* provided condition is a subset of the operator and value. A condition is
|
|
99
|
+
* considered a subset if all values that satisfy (return true for) the
|
|
100
|
+
* condition also satisfy the operator and value.
|
|
101
|
+
*
|
|
102
|
+
* This is done using the underlying CompareTable, which provides a comparison
|
|
103
|
+
* function for each operator pair, or undefined if the comparison would
|
|
104
|
+
* always be false, regardless of the values.
|
|
105
|
+
*/
|
|
106
|
+
private evaluateSubset;
|
|
107
|
+
private evaluateIncludes;
|
|
108
|
+
private parseConditions;
|
|
109
|
+
}
|