@squidcloud/client 1.0.20 → 1.0.22
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 +17 -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/index.js +2 -2
- 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,66 +1,66 @@
|
|
|
1
|
-
import { ActionType } from './bundle-data.types';
|
|
2
|
-
import { Auth, RunContext } from './context.types';
|
|
3
|
-
import { DocumentData, SquidDocId, SquidDocument } from './document.types';
|
|
4
|
-
import { Logger } from './logger.types';
|
|
5
|
-
import { MutationContext } from './mutation.context';
|
|
6
|
-
import { Mutation, MutationType } from './mutation.types';
|
|
7
|
-
import { QueryContext } from './query';
|
|
8
|
-
import { SecretKey } from './secret.types';
|
|
9
|
-
import { ExecutableContext } from './executable.context';
|
|
10
|
-
import { ApiCallContext } from './api-call.context';
|
|
11
|
-
import { NamedQueryContext } from './named-query.context';
|
|
12
|
-
import { GraphqlContext } from './graphql.context';
|
|
13
|
-
export type DocHash = string;
|
|
14
|
-
export type SecurityResponse = {
|
|
15
|
-
docsToHash: Record<SquidDocId, DocHash | undefined>;
|
|
16
|
-
rulesPassed: true;
|
|
17
|
-
} | {
|
|
18
|
-
rulesPassed: false;
|
|
19
|
-
};
|
|
20
|
-
export interface ServiceConfig {
|
|
21
|
-
context: RunContext;
|
|
22
|
-
logger: Logger;
|
|
23
|
-
secrets: Record<SecretKey, any>;
|
|
24
|
-
backendApiKey: string;
|
|
25
|
-
codeDir: string;
|
|
26
|
-
auth: Auth | undefined;
|
|
27
|
-
}
|
|
28
|
-
export type SecureDatabaseAction<T extends ActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? (context?: QueryContext) => boolean | Promise<boolean> : (context?: MutationContext) => boolean | Promise<boolean>;
|
|
29
|
-
export type SecureApiAction = (context?: ApiCallContext) => boolean | Promise<boolean>;
|
|
30
|
-
export type SecureExecutableAction = (context?: ExecutableContext) => boolean | Promise<boolean>;
|
|
31
|
-
export type SecureNamedQueryAction = (context?: NamedQueryContext) => boolean | Promise<boolean>;
|
|
32
|
-
export type SecureGraphQLAction = (context?: GraphqlContext) => boolean | Promise<boolean>;
|
|
33
|
-
export type TransformDatabaseAction<T extends ActionType> = T extends 'read' ? (request?: TransformDatabaseReadRequest) => TransformDatabaseReadResponse | Promise<TransformDatabaseReadResponse> : (request?: TransformDatabaseWriteRequest) => TransformDatabaseWriteResponse | Promise<TransformDatabaseWriteResponse>;
|
|
34
|
-
export interface TransformDatabaseReadRequest {
|
|
35
|
-
documents: Array<SquidDocument>;
|
|
36
|
-
}
|
|
37
|
-
export interface TransformDatabaseWriteRequest {
|
|
38
|
-
mutations: Array<Mutation>;
|
|
39
|
-
}
|
|
40
|
-
export type TransformDatabaseReadResponse = Array<SquidDocument>;
|
|
41
|
-
export type TransformDatabaseWriteResponse = Array<Mutation>;
|
|
42
|
-
export type ExecutableAction = (...args: any[]) => any;
|
|
43
|
-
export type TriggerAction = (request?: TriggerRequest) => void | Promise<void>;
|
|
44
|
-
export interface TriggerRequest<T extends DocumentData = any> {
|
|
45
|
-
squidDocId: SquidDocId;
|
|
46
|
-
mutationType: MutationType;
|
|
47
|
-
docBefore?: T;
|
|
48
|
-
docAfter?: T;
|
|
49
|
-
}
|
|
50
|
-
export type SchedulerAction = () => void | Promise<void>;
|
|
51
|
-
export type WebhookAction = (request?: WebhookRequest) => any;
|
|
52
|
-
export interface WebhookRequest {
|
|
53
|
-
body: any;
|
|
54
|
-
queryParams: Record<string, string>;
|
|
55
|
-
headers: Record<string, string>;
|
|
56
|
-
files: Array<SquidFile>;
|
|
57
|
-
}
|
|
58
|
-
export interface SquidFile {
|
|
59
|
-
data: Uint8Array;
|
|
60
|
-
fieldName: string;
|
|
61
|
-
mimetype: string;
|
|
62
|
-
originalName: string;
|
|
63
|
-
size: number;
|
|
64
|
-
encoding?: string;
|
|
65
|
-
}
|
|
66
|
-
export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
1
|
+
import { ActionType } from './bundle-data.types';
|
|
2
|
+
import { Auth, RunContext } from './context.types';
|
|
3
|
+
import { DocumentData, SquidDocId, SquidDocument } from './document.types';
|
|
4
|
+
import { Logger } from './logger.types';
|
|
5
|
+
import { MutationContext } from './mutation.context';
|
|
6
|
+
import { Mutation, MutationType } from './mutation.types';
|
|
7
|
+
import { QueryContext } from './query';
|
|
8
|
+
import { SecretKey } from './secret.types';
|
|
9
|
+
import { ExecutableContext } from './executable.context';
|
|
10
|
+
import { ApiCallContext } from './api-call.context';
|
|
11
|
+
import { NamedQueryContext } from './named-query.context';
|
|
12
|
+
import { GraphqlContext } from './graphql.context';
|
|
13
|
+
export type DocHash = string;
|
|
14
|
+
export type SecurityResponse = {
|
|
15
|
+
docsToHash: Record<SquidDocId, DocHash | undefined>;
|
|
16
|
+
rulesPassed: true;
|
|
17
|
+
} | {
|
|
18
|
+
rulesPassed: false;
|
|
19
|
+
};
|
|
20
|
+
export interface ServiceConfig {
|
|
21
|
+
context: RunContext;
|
|
22
|
+
logger: Logger;
|
|
23
|
+
secrets: Record<SecretKey, any>;
|
|
24
|
+
backendApiKey: string;
|
|
25
|
+
codeDir: string;
|
|
26
|
+
auth: Auth | undefined;
|
|
27
|
+
}
|
|
28
|
+
export type SecureDatabaseAction<T extends ActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? (context?: QueryContext) => boolean | Promise<boolean> : (context?: MutationContext) => boolean | Promise<boolean>;
|
|
29
|
+
export type SecureApiAction = (context?: ApiCallContext) => boolean | Promise<boolean>;
|
|
30
|
+
export type SecureExecutableAction = (context?: ExecutableContext) => boolean | Promise<boolean>;
|
|
31
|
+
export type SecureNamedQueryAction = (context?: NamedQueryContext) => boolean | Promise<boolean>;
|
|
32
|
+
export type SecureGraphQLAction = (context?: GraphqlContext) => boolean | Promise<boolean>;
|
|
33
|
+
export type TransformDatabaseAction<T extends ActionType> = T extends 'read' ? (request?: TransformDatabaseReadRequest) => TransformDatabaseReadResponse | Promise<TransformDatabaseReadResponse> : (request?: TransformDatabaseWriteRequest) => TransformDatabaseWriteResponse | Promise<TransformDatabaseWriteResponse>;
|
|
34
|
+
export interface TransformDatabaseReadRequest {
|
|
35
|
+
documents: Array<SquidDocument>;
|
|
36
|
+
}
|
|
37
|
+
export interface TransformDatabaseWriteRequest {
|
|
38
|
+
mutations: Array<Mutation>;
|
|
39
|
+
}
|
|
40
|
+
export type TransformDatabaseReadResponse = Array<SquidDocument>;
|
|
41
|
+
export type TransformDatabaseWriteResponse = Array<Mutation>;
|
|
42
|
+
export type ExecutableAction = (...args: any[]) => any;
|
|
43
|
+
export type TriggerAction = (request?: TriggerRequest) => void | Promise<void>;
|
|
44
|
+
export interface TriggerRequest<T extends DocumentData = any> {
|
|
45
|
+
squidDocId: SquidDocId;
|
|
46
|
+
mutationType: MutationType;
|
|
47
|
+
docBefore?: T;
|
|
48
|
+
docAfter?: T;
|
|
49
|
+
}
|
|
50
|
+
export type SchedulerAction = () => void | Promise<void>;
|
|
51
|
+
export type WebhookAction = (request?: WebhookRequest) => any;
|
|
52
|
+
export interface WebhookRequest {
|
|
53
|
+
body: any;
|
|
54
|
+
queryParams: Record<string, string>;
|
|
55
|
+
headers: Record<string, string>;
|
|
56
|
+
files: Array<SquidFile>;
|
|
57
|
+
}
|
|
58
|
+
export interface SquidFile {
|
|
59
|
+
data: Uint8Array;
|
|
60
|
+
fieldName: string;
|
|
61
|
+
mimetype: string;
|
|
62
|
+
originalName: string;
|
|
63
|
+
size: number;
|
|
64
|
+
encoding?: string;
|
|
65
|
+
}
|
|
66
|
+
export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { QueryName, SchedulerConfig, SchedulerId, TriggerConfig, TriggerId, WebhookConfig, WebhookId } from './application.types';
|
|
2
|
-
import { IntegrationId } from './communication.types';
|
|
3
|
-
import { CollectionName } from './document.types';
|
|
4
|
-
import { ApiEndpointId } from './integration.types';
|
|
5
|
-
export type ActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
6
|
-
export type ServiceName = string;
|
|
7
|
-
export type FunctionName = string;
|
|
8
|
-
export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
|
|
9
|
-
export interface ApplicationBundleData {
|
|
10
|
-
databases: Record<IntegrationId, DatabaseMetadata>;
|
|
11
|
-
apis: Record<IntegrationId, {
|
|
12
|
-
endpoints: Record<ApiEndpointId, ApiMetadata>;
|
|
13
|
-
} & ApiMetadata>;
|
|
14
|
-
graphql: Record<IntegrationId, GraphQLMetadata>;
|
|
15
|
-
executables: Record<FunctionName, ExecutableMetadata>;
|
|
16
|
-
triggers: Record<TriggerId, TriggerConfig>;
|
|
17
|
-
schedulers: Record<SchedulerId, SchedulerConfig>;
|
|
18
|
-
webhooks: Record<WebhookId, WebhookConfig>;
|
|
19
|
-
namedQueries: Record<IntegrationId, Record<QueryName, NamedQueryMetadata>>;
|
|
20
|
-
}
|
|
21
|
-
export interface DatabaseMetadata {
|
|
22
|
-
collections: Record<CollectionName, CollectionMetadata>;
|
|
23
|
-
security?: Record<ActionType, Array<ServiceFunctionName>>;
|
|
24
|
-
transform?: Record<ActionType, DatabaseTransformMetadata>;
|
|
25
|
-
}
|
|
26
|
-
export interface CollectionMetadata {
|
|
27
|
-
security?: Record<ActionType, Array<ServiceFunctionName>>;
|
|
28
|
-
transform?: Record<ActionType, DatabaseTransformMetadata>;
|
|
29
|
-
}
|
|
30
|
-
export interface DatabaseTransformMetadata {
|
|
31
|
-
serviceFunction: ServiceFunctionName;
|
|
32
|
-
}
|
|
33
|
-
export interface ExecutableMetadata {
|
|
34
|
-
security?: Array<ServiceFunctionName>;
|
|
35
|
-
serviceFunction: ServiceFunctionName;
|
|
36
|
-
}
|
|
37
|
-
export interface NamedQueryMetadata {
|
|
38
|
-
security?: Array<ServiceFunctionName>;
|
|
39
|
-
queryString: string;
|
|
40
|
-
}
|
|
41
|
-
export interface ApiMetadata {
|
|
42
|
-
security: Array<ServiceFunctionName>;
|
|
43
|
-
}
|
|
44
|
-
interface GraphQLMetadata {
|
|
45
|
-
security: Array<ServiceFunctionName>;
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
1
|
+
import { QueryName, SchedulerConfig, SchedulerId, TriggerConfig, TriggerId, WebhookConfig, WebhookId } from './application.types';
|
|
2
|
+
import { IntegrationId } from './communication.types';
|
|
3
|
+
import { CollectionName } from './document.types';
|
|
4
|
+
import { ApiEndpointId } from './integration.types';
|
|
5
|
+
export type ActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
6
|
+
export type ServiceName = string;
|
|
7
|
+
export type FunctionName = string;
|
|
8
|
+
export type ServiceFunctionName = `${ServiceName}:${FunctionName}`;
|
|
9
|
+
export interface ApplicationBundleData {
|
|
10
|
+
databases: Record<IntegrationId, DatabaseMetadata>;
|
|
11
|
+
apis: Record<IntegrationId, {
|
|
12
|
+
endpoints: Record<ApiEndpointId, ApiMetadata>;
|
|
13
|
+
} & ApiMetadata>;
|
|
14
|
+
graphql: Record<IntegrationId, GraphQLMetadata>;
|
|
15
|
+
executables: Record<FunctionName, ExecutableMetadata>;
|
|
16
|
+
triggers: Record<TriggerId, TriggerConfig>;
|
|
17
|
+
schedulers: Record<SchedulerId, SchedulerConfig>;
|
|
18
|
+
webhooks: Record<WebhookId, WebhookConfig>;
|
|
19
|
+
namedQueries: Record<IntegrationId, Record<QueryName, NamedQueryMetadata>>;
|
|
20
|
+
}
|
|
21
|
+
export interface DatabaseMetadata {
|
|
22
|
+
collections: Record<CollectionName, CollectionMetadata>;
|
|
23
|
+
security?: Record<ActionType, Array<ServiceFunctionName>>;
|
|
24
|
+
transform?: Record<ActionType, DatabaseTransformMetadata>;
|
|
25
|
+
}
|
|
26
|
+
export interface CollectionMetadata {
|
|
27
|
+
security?: Record<ActionType, Array<ServiceFunctionName>>;
|
|
28
|
+
transform?: Record<ActionType, DatabaseTransformMetadata>;
|
|
29
|
+
}
|
|
30
|
+
export interface DatabaseTransformMetadata {
|
|
31
|
+
serviceFunction: ServiceFunctionName;
|
|
32
|
+
}
|
|
33
|
+
export interface ExecutableMetadata {
|
|
34
|
+
security?: Array<ServiceFunctionName>;
|
|
35
|
+
serviceFunction: ServiceFunctionName;
|
|
36
|
+
}
|
|
37
|
+
export interface NamedQueryMetadata {
|
|
38
|
+
security?: Array<ServiceFunctionName>;
|
|
39
|
+
queryString: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ApiMetadata {
|
|
42
|
+
security: Array<ServiceFunctionName>;
|
|
43
|
+
}
|
|
44
|
+
interface GraphQLMetadata {
|
|
45
|
+
security: Array<ServiceFunctionName>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AppId = string;
|
|
2
|
-
export type IntegrationId = string;
|
|
3
|
-
export type ClientId = string;
|
|
4
|
-
export type ClientRequestId = string;
|
|
1
|
+
export type AppId = string;
|
|
2
|
+
export type IntegrationId = string;
|
|
3
|
+
export type ClientId = string;
|
|
4
|
+
export type ClientRequestId = string;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export type AuthType = 'Bearer' | 'ApiKey';
|
|
2
|
-
export interface AuthWithBearer {
|
|
3
|
-
type: 'Bearer';
|
|
4
|
-
userId: string;
|
|
5
|
-
expiration: number;
|
|
6
|
-
attributes: Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
export interface AuthWithApiKey {
|
|
9
|
-
type: 'ApiKey';
|
|
10
|
-
apiKey: string;
|
|
11
|
-
}
|
|
12
|
-
export type Auth = AuthWithBearer | AuthWithApiKey;
|
|
13
|
-
export interface AuthToken {
|
|
14
|
-
type: AuthType;
|
|
15
|
-
token: string;
|
|
16
|
-
}
|
|
17
|
-
export interface RunContext {
|
|
18
|
-
appId: string;
|
|
19
|
-
sourceIp?: string;
|
|
20
|
-
headers?: Record<string, any>;
|
|
21
|
-
}
|
|
1
|
+
export type AuthType = 'Bearer' | 'ApiKey';
|
|
2
|
+
export interface AuthWithBearer {
|
|
3
|
+
type: 'Bearer';
|
|
4
|
+
userId: string;
|
|
5
|
+
expiration: number;
|
|
6
|
+
attributes: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
export interface AuthWithApiKey {
|
|
9
|
+
type: 'ApiKey';
|
|
10
|
+
apiKey: string;
|
|
11
|
+
}
|
|
12
|
+
export type Auth = AuthWithBearer | AuthWithApiKey;
|
|
13
|
+
export interface AuthToken {
|
|
14
|
+
type: AuthType;
|
|
15
|
+
token: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RunContext {
|
|
18
|
+
appId: string;
|
|
19
|
+
sourceIp?: string;
|
|
20
|
+
headers?: Record<string, any>;
|
|
21
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { IntegrationId } from './communication.types';
|
|
2
|
-
export type FieldName<T = any> = string & keyof T;
|
|
3
|
-
export type PrimitiveFieldType = string | number | boolean | null;
|
|
4
|
-
export type FieldType = PrimitiveFieldType | Array<FieldType> | {
|
|
5
|
-
[key: string]: FieldType;
|
|
6
|
-
};
|
|
7
|
-
export type DocId = string;
|
|
8
|
-
export type DocIdObj = Record<FieldName, any>;
|
|
9
|
-
export type CollectionName = string;
|
|
10
|
-
export type DocTimestamp = number;
|
|
11
|
-
export interface SquidDocIdObj {
|
|
12
|
-
collectionName: CollectionName;
|
|
13
|
-
docId: DocId;
|
|
14
|
-
integrationId: IntegrationId;
|
|
15
|
-
}
|
|
16
|
-
export interface BeforeAndAfterDocs<T = SquidDocument> {
|
|
17
|
-
before: T | undefined;
|
|
18
|
-
after: T | undefined;
|
|
19
|
-
}
|
|
20
|
-
export type SquidDocId = string;
|
|
21
|
-
export interface SquidDocument {
|
|
22
|
-
__docId__: DocId;
|
|
23
|
-
__ts__: DocTimestamp;
|
|
24
|
-
[fieldName: string]: FieldType | undefined;
|
|
25
|
-
}
|
|
26
|
-
export type DocumentData = Record<FieldName, any | undefined>;
|
|
27
|
-
export declare function parseSquidDocId(squidDocId: SquidDocId): SquidDocIdObj;
|
|
28
|
-
export declare function getSquidDocId(squidDocIdObj: SquidDocIdObj): SquidDocId;
|
|
29
|
-
export declare function getSquidDocId(docId: DocId, collectionName: CollectionName, integrationId: IntegrationId): SquidDocId;
|
|
30
|
-
/**
|
|
31
|
-
* Determines whether a beforeDoc and an afterDoc have the same properties.
|
|
32
|
-
* Our internal properties such as __docId__ and __ts__ are excluded from the
|
|
33
|
-
* comparison, as well as any primary keys changes.
|
|
34
|
-
*/
|
|
35
|
-
export declare function hasDocumentDiff(beforeDoc: SquidDocument | undefined, afterDoc: SquidDocument | undefined): boolean;
|
|
1
|
+
import { IntegrationId } from './communication.types';
|
|
2
|
+
export type FieldName<T = any> = string & keyof T;
|
|
3
|
+
export type PrimitiveFieldType = string | number | boolean | null;
|
|
4
|
+
export type FieldType = PrimitiveFieldType | Array<FieldType> | {
|
|
5
|
+
[key: string]: FieldType;
|
|
6
|
+
};
|
|
7
|
+
export type DocId = string;
|
|
8
|
+
export type DocIdObj = Record<FieldName, any>;
|
|
9
|
+
export type CollectionName = string;
|
|
10
|
+
export type DocTimestamp = number;
|
|
11
|
+
export interface SquidDocIdObj {
|
|
12
|
+
collectionName: CollectionName;
|
|
13
|
+
docId: DocId;
|
|
14
|
+
integrationId: IntegrationId;
|
|
15
|
+
}
|
|
16
|
+
export interface BeforeAndAfterDocs<T = SquidDocument> {
|
|
17
|
+
before: T | undefined;
|
|
18
|
+
after: T | undefined;
|
|
19
|
+
}
|
|
20
|
+
export type SquidDocId = string;
|
|
21
|
+
export interface SquidDocument {
|
|
22
|
+
__docId__: DocId;
|
|
23
|
+
__ts__: DocTimestamp;
|
|
24
|
+
[fieldName: string]: FieldType | undefined;
|
|
25
|
+
}
|
|
26
|
+
export type DocumentData = Record<FieldName, any | undefined>;
|
|
27
|
+
export declare function parseSquidDocId(squidDocId: SquidDocId): SquidDocIdObj;
|
|
28
|
+
export declare function getSquidDocId(squidDocIdObj: SquidDocIdObj): SquidDocId;
|
|
29
|
+
export declare function getSquidDocId(docId: DocId, collectionName: CollectionName, integrationId: IntegrationId): SquidDocId;
|
|
30
|
+
/**
|
|
31
|
+
* Determines whether a beforeDoc and an afterDoc have the same properties.
|
|
32
|
+
* Our internal properties such as __docId__ and __ts__ are excluded from the
|
|
33
|
+
* comparison, as well as any primary keys changes.
|
|
34
|
+
*/
|
|
35
|
+
export declare function hasDocumentDiff(beforeDoc: SquidDocument | undefined, afterDoc: SquidDocument | undefined): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class ExecutableContext<F extends (...args: any[]) => any = (...args: any[]) => any> {
|
|
2
|
-
readonly params: Parameters<F>;
|
|
3
|
-
constructor(params: Parameters<F>);
|
|
4
|
-
}
|
|
1
|
+
export declare class ExecutableContext<F extends (...args: any[]) => any = (...args: any[]) => any> {
|
|
2
|
+
readonly params: Parameters<F>;
|
|
3
|
+
constructor(params: Parameters<F>);
|
|
4
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
interface GraphQlRequest {
|
|
2
|
-
isGraphiQL: boolean;
|
|
3
|
-
query?: string;
|
|
4
|
-
operationName?: string;
|
|
5
|
-
variables?: string | Record<string, any>;
|
|
6
|
-
}
|
|
7
|
-
export declare class GraphqlContext {
|
|
8
|
-
readonly isGraphiQL: boolean;
|
|
9
|
-
readonly query: string | undefined;
|
|
10
|
-
readonly variables: string | Record<string, any> | undefined;
|
|
11
|
-
readonly operationName: string | undefined;
|
|
12
|
-
constructor(graphQlRequest: GraphQlRequest);
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
1
|
+
interface GraphQlRequest {
|
|
2
|
+
isGraphiQL: boolean;
|
|
3
|
+
query?: string;
|
|
4
|
+
operationName?: string;
|
|
5
|
+
variables?: string | Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
export declare class GraphqlContext {
|
|
8
|
+
readonly isGraphiQL: boolean;
|
|
9
|
+
readonly query: string | undefined;
|
|
10
|
+
readonly variables: string | Record<string, any> | undefined;
|
|
11
|
+
readonly operationName: string | undefined;
|
|
12
|
+
constructor(graphQlRequest: GraphQlRequest);
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IntrospectionQuery } from 'graphql';
|
|
2
|
-
export { ExecutionResult, IntrospectionQuery } from 'graphql';
|
|
3
|
-
export interface GraphQLRequest {
|
|
4
|
-
operationName?: string;
|
|
5
|
-
query?: string;
|
|
6
|
-
variables?: string | Record<string, any>;
|
|
7
|
-
}
|
|
8
|
-
export declare const EmptyIntrospection: IntrospectionQuery;
|
|
1
|
+
import { IntrospectionQuery } from 'graphql';
|
|
2
|
+
export { ExecutionResult, IntrospectionQuery } from 'graphql';
|
|
3
|
+
export interface GraphQLRequest {
|
|
4
|
+
operationName?: string;
|
|
5
|
+
query?: string;
|
|
6
|
+
variables?: string | Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
export declare const EmptyIntrospection: IntrospectionQuery;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
export declare enum HttpStatus {
|
|
2
|
-
CONTINUE = 100,
|
|
3
|
-
SWITCHING_PROTOCOLS = 101,
|
|
4
|
-
PROCESSING = 102,
|
|
5
|
-
EARLYHINTS = 103,
|
|
6
|
-
OK = 200,
|
|
7
|
-
CREATED = 201,
|
|
8
|
-
ACCEPTED = 202,
|
|
9
|
-
NON_AUTHORITATIVE_INFORMATION = 203,
|
|
10
|
-
NO_CONTENT = 204,
|
|
11
|
-
RESET_CONTENT = 205,
|
|
12
|
-
PARTIAL_CONTENT = 206,
|
|
13
|
-
AMBIGUOUS = 300,
|
|
14
|
-
MOVED_PERMANENTLY = 301,
|
|
15
|
-
FOUND = 302,
|
|
16
|
-
SEE_OTHER = 303,
|
|
17
|
-
NOT_MODIFIED = 304,
|
|
18
|
-
TEMPORARY_REDIRECT = 307,
|
|
19
|
-
PERMANENT_REDIRECT = 308,
|
|
20
|
-
BAD_REQUEST = 400,
|
|
21
|
-
UNAUTHORIZED = 401,
|
|
22
|
-
PAYMENT_REQUIRED = 402,
|
|
23
|
-
FORBIDDEN = 403,
|
|
24
|
-
NOT_FOUND = 404,
|
|
25
|
-
METHOD_NOT_ALLOWED = 405,
|
|
26
|
-
NOT_ACCEPTABLE = 406,
|
|
27
|
-
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
28
|
-
REQUEST_TIMEOUT = 408,
|
|
29
|
-
CONFLICT = 409,
|
|
30
|
-
GONE = 410,
|
|
31
|
-
LENGTH_REQUIRED = 411,
|
|
32
|
-
PRECONDITION_FAILED = 412,
|
|
33
|
-
PAYLOAD_TOO_LARGE = 413,
|
|
34
|
-
URI_TOO_LONG = 414,
|
|
35
|
-
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
36
|
-
REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
|
37
|
-
EXPECTATION_FAILED = 417,
|
|
38
|
-
I_AM_A_TEAPOT = 418,
|
|
39
|
-
MISDIRECTED = 421,
|
|
40
|
-
UNPROCESSABLE_ENTITY = 422,
|
|
41
|
-
FAILED_DEPENDENCY = 424,
|
|
42
|
-
PRECONDITION_REQUIRED = 428,
|
|
43
|
-
TOO_MANY_REQUESTS = 429,
|
|
44
|
-
INTERNAL_SERVER_ERROR = 500,
|
|
45
|
-
NOT_IMPLEMENTED = 501,
|
|
46
|
-
BAD_GATEWAY = 502,
|
|
47
|
-
SERVICE_UNAVAILABLE = 503,
|
|
48
|
-
GATEWAY_TIMEOUT = 504,
|
|
49
|
-
HTTP_VERSION_NOT_SUPPORTED = 505
|
|
50
|
-
}
|
|
1
|
+
export declare enum HttpStatus {
|
|
2
|
+
CONTINUE = 100,
|
|
3
|
+
SWITCHING_PROTOCOLS = 101,
|
|
4
|
+
PROCESSING = 102,
|
|
5
|
+
EARLYHINTS = 103,
|
|
6
|
+
OK = 200,
|
|
7
|
+
CREATED = 201,
|
|
8
|
+
ACCEPTED = 202,
|
|
9
|
+
NON_AUTHORITATIVE_INFORMATION = 203,
|
|
10
|
+
NO_CONTENT = 204,
|
|
11
|
+
RESET_CONTENT = 205,
|
|
12
|
+
PARTIAL_CONTENT = 206,
|
|
13
|
+
AMBIGUOUS = 300,
|
|
14
|
+
MOVED_PERMANENTLY = 301,
|
|
15
|
+
FOUND = 302,
|
|
16
|
+
SEE_OTHER = 303,
|
|
17
|
+
NOT_MODIFIED = 304,
|
|
18
|
+
TEMPORARY_REDIRECT = 307,
|
|
19
|
+
PERMANENT_REDIRECT = 308,
|
|
20
|
+
BAD_REQUEST = 400,
|
|
21
|
+
UNAUTHORIZED = 401,
|
|
22
|
+
PAYMENT_REQUIRED = 402,
|
|
23
|
+
FORBIDDEN = 403,
|
|
24
|
+
NOT_FOUND = 404,
|
|
25
|
+
METHOD_NOT_ALLOWED = 405,
|
|
26
|
+
NOT_ACCEPTABLE = 406,
|
|
27
|
+
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
28
|
+
REQUEST_TIMEOUT = 408,
|
|
29
|
+
CONFLICT = 409,
|
|
30
|
+
GONE = 410,
|
|
31
|
+
LENGTH_REQUIRED = 411,
|
|
32
|
+
PRECONDITION_FAILED = 412,
|
|
33
|
+
PAYLOAD_TOO_LARGE = 413,
|
|
34
|
+
URI_TOO_LONG = 414,
|
|
35
|
+
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
36
|
+
REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
|
37
|
+
EXPECTATION_FAILED = 417,
|
|
38
|
+
I_AM_A_TEAPOT = 418,
|
|
39
|
+
MISDIRECTED = 421,
|
|
40
|
+
UNPROCESSABLE_ENTITY = 422,
|
|
41
|
+
FAILED_DEPENDENCY = 424,
|
|
42
|
+
PRECONDITION_REQUIRED = 428,
|
|
43
|
+
TOO_MANY_REQUESTS = 429,
|
|
44
|
+
INTERNAL_SERVER_ERROR = 500,
|
|
45
|
+
NOT_IMPLEMENTED = 501,
|
|
46
|
+
BAD_GATEWAY = 502,
|
|
47
|
+
SERVICE_UNAVAILABLE = 503,
|
|
48
|
+
GATEWAY_TIMEOUT = 504,
|
|
49
|
+
HTTP_VERSION_NOT_SUPPORTED = 505
|
|
50
|
+
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
export * from './api-call.context';
|
|
2
|
-
export * from './api.types';
|
|
3
|
-
export * from './application.schemas';
|
|
4
|
-
export * from './application.types';
|
|
5
|
-
export * from './backend-function.schemas';
|
|
6
|
-
export * from './backend-function.types';
|
|
7
|
-
export * from './backend-run.types';
|
|
8
|
-
export * from './bundle-api.types';
|
|
9
|
-
export * from './bundle-data.types';
|
|
10
|
-
export * from './communication.types';
|
|
11
|
-
export * from './context.types';
|
|
12
|
-
export * from './document.types';
|
|
13
|
-
export * from './executable.context';
|
|
14
|
-
export * from './graphql.context';
|
|
15
|
-
export * from './graphql.types';
|
|
16
|
-
export * from './http-status.enum';
|
|
17
|
-
export * from './integration.types';
|
|
18
|
-
export * from './logger.types';
|
|
19
|
-
export * from './metrics.schemas';
|
|
20
|
-
export * from './metrics.types';
|
|
21
|
-
export * from './mutation.context';
|
|
22
|
-
export * from './mutation.schemas';
|
|
23
|
-
export * from './mutation.types';
|
|
24
|
-
export * from './named-query.context';
|
|
25
|
-
export * from './named-query.schemas';
|
|
26
|
-
export * from './named-query.types';
|
|
27
|
-
export * from './query';
|
|
28
|
-
export * from './query.schemas';
|
|
29
|
-
export * from './query.types';
|
|
30
|
-
export * from './regions';
|
|
31
|
-
export * from './schema/schema.types';
|
|
32
|
-
export * from './secret.schemas';
|
|
33
|
-
export * from './secret.types';
|
|
34
|
-
export * from './socket.schemas';
|
|
35
|
-
export * from './socket.types';
|
|
36
|
-
export * from './time-units';
|
|
37
|
-
export * from './trigger.types';
|
|
38
|
-
export * from './types';
|
|
39
|
-
export * from './utils/array';
|
|
40
|
-
export * from './utils/assert';
|
|
41
|
-
export * from './utils/error';
|
|
42
|
-
export * from './utils/id';
|
|
43
|
-
export * from './utils/lock.manager';
|
|
44
|
-
export * from './utils/nullish';
|
|
45
|
-
export * from './utils/object';
|
|
46
|
-
export * from './utils/serialization';
|
|
47
|
-
export * from './utils/transforms';
|
|
48
|
-
export * from './utils/url';
|
|
49
|
-
export * from './utils/validation';
|
|
50
|
-
export * from './webhook-response';
|
|
1
|
+
export * from './api-call.context';
|
|
2
|
+
export * from './api.types';
|
|
3
|
+
export * from './application.schemas';
|
|
4
|
+
export * from './application.types';
|
|
5
|
+
export * from './backend-function.schemas';
|
|
6
|
+
export * from './backend-function.types';
|
|
7
|
+
export * from './backend-run.types';
|
|
8
|
+
export * from './bundle-api.types';
|
|
9
|
+
export * from './bundle-data.types';
|
|
10
|
+
export * from './communication.types';
|
|
11
|
+
export * from './context.types';
|
|
12
|
+
export * from './document.types';
|
|
13
|
+
export * from './executable.context';
|
|
14
|
+
export * from './graphql.context';
|
|
15
|
+
export * from './graphql.types';
|
|
16
|
+
export * from './http-status.enum';
|
|
17
|
+
export * from './integration.types';
|
|
18
|
+
export * from './logger.types';
|
|
19
|
+
export * from './metrics.schemas';
|
|
20
|
+
export * from './metrics.types';
|
|
21
|
+
export * from './mutation.context';
|
|
22
|
+
export * from './mutation.schemas';
|
|
23
|
+
export * from './mutation.types';
|
|
24
|
+
export * from './named-query.context';
|
|
25
|
+
export * from './named-query.schemas';
|
|
26
|
+
export * from './named-query.types';
|
|
27
|
+
export * from './query';
|
|
28
|
+
export * from './query.schemas';
|
|
29
|
+
export * from './query.types';
|
|
30
|
+
export * from './regions';
|
|
31
|
+
export * from './schema/schema.types';
|
|
32
|
+
export * from './secret.schemas';
|
|
33
|
+
export * from './secret.types';
|
|
34
|
+
export * from './socket.schemas';
|
|
35
|
+
export * from './socket.types';
|
|
36
|
+
export * from './time-units';
|
|
37
|
+
export * from './trigger.types';
|
|
38
|
+
export * from './types';
|
|
39
|
+
export * from './utils/array';
|
|
40
|
+
export * from './utils/assert';
|
|
41
|
+
export * from './utils/error';
|
|
42
|
+
export * from './utils/id';
|
|
43
|
+
export * from './utils/lock.manager';
|
|
44
|
+
export * from './utils/nullish';
|
|
45
|
+
export * from './utils/object';
|
|
46
|
+
export * from './utils/serialization';
|
|
47
|
+
export * from './utils/transforms';
|
|
48
|
+
export * from './utils/url';
|
|
49
|
+
export * from './utils/validation';
|
|
50
|
+
export * from './webhook-response';
|