@squidcloud/client 1.0.115 → 1.0.116
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 +11348 -11327
- 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 +12 -12
- 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 +66 -66
- package/dist/common/src/application.types.d.ts +143 -140
- 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 +39 -39
- 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 +55 -55
- package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -26
- 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 +231 -231
- package/dist/common/src/integrations/index.d.ts +126 -126
- 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/base-query-builder.d.ts +147 -147
- package/dist/common/src/query/index.d.ts +4 -4
- package/dist/common/src/query/pagination.d.ts +44 -44
- package/dist/common/src/query/query-context.d.ts +137 -137
- package/dist/common/src/query/serialized-query.types.d.ts +24 -24
- package/dist/common/src/query.types.d.ts +64 -64
- 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 +22 -22
- 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 +5 -5
- 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 +14 -14
- 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/global.utils.d.ts +1 -1
- 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 +2 -2
- package/dist/common/src/utils/object.d.ts +5 -5
- 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/common/src/websocket.impl.d.ts +21 -21
- package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
- package/dist/typescript-client/src/ai-assistant-client.d.ts +172 -172
- 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 +27 -27
- package/dist/typescript-client/src/collection-reference.d.ts +80 -81
- package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -13
- package/dist/typescript-client/src/connection-details.d.ts +23 -23
- package/dist/typescript-client/src/data.manager.d.ts +173 -173
- package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
- package/dist/typescript-client/src/distributed-lock.manager.d.ts +16 -16
- package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
- package/dist/typescript-client/src/document-reference.d.ts +140 -140
- package/dist/typescript-client/src/document-reference.factory.d.ts +13 -13
- package/dist/typescript-client/src/document-store.d.ts +11 -11
- package/dist/typescript-client/src/graphql-client.d.ts +14 -14
- package/dist/typescript-client/src/graphql-client.factory.d.ts +11 -11
- 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/deserializer.d.ts +3 -3
- package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +161 -161
- package/dist/typescript-client/src/query/local-query-manager.d.ts +9 -9
- package/dist/typescript-client/src/query/query-builder.factory.d.ts +77 -77
- package/dist/typescript-client/src/query/query-sender.d.ts +33 -33
- package/dist/typescript-client/src/query/query-subscription.manager.d.ts +130 -130
- package/dist/typescript-client/src/query/query.types.d.ts +49 -49
- package/dist/typescript-client/src/rpc.manager.d.ts +27 -27
- package/dist/typescript-client/src/secret.client.d.ts +22 -22
- package/dist/typescript-client/src/socket.manager.d.ts +35 -35
- package/dist/typescript-client/src/squid.d.ts +222 -222
- 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,12 +1,12 @@
|
|
|
1
|
-
import { AiAssistantMutationType, AiAssistantResourceType } from './ai-assistant.types';
|
|
2
|
-
export declare class AiAssistantChatContext {
|
|
3
|
-
readonly prompt: string;
|
|
4
|
-
readonly profileId: string;
|
|
5
|
-
}
|
|
6
|
-
/** A context provided to the security rules of an AI Assistant mutation. */
|
|
7
|
-
export declare class AiAssistantMutationContext {
|
|
8
|
-
readonly type: AiAssistantMutationType;
|
|
9
|
-
readonly resource: AiAssistantResourceType;
|
|
10
|
-
readonly profileId: string;
|
|
11
|
-
readonly payload: any;
|
|
12
|
-
}
|
|
1
|
+
import { AiAssistantMutationType, AiAssistantResourceType } from './ai-assistant.types';
|
|
2
|
+
export declare class AiAssistantChatContext {
|
|
3
|
+
readonly prompt: string;
|
|
4
|
+
readonly profileId: string;
|
|
5
|
+
}
|
|
6
|
+
/** A context provided to the security rules of an AI Assistant mutation. */
|
|
7
|
+
export declare class AiAssistantMutationContext {
|
|
8
|
+
readonly type: AiAssistantMutationType;
|
|
9
|
+
readonly resource: AiAssistantResourceType;
|
|
10
|
+
readonly profileId: string;
|
|
11
|
+
readonly payload: any;
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/** The supported Open AI model names. */
|
|
2
|
-
export type OpenAiModelName = 'gpt-3.5-turbo' | 'gpt-4';
|
|
3
|
-
export type AiAssistantContextType = 'text' | 'url';
|
|
4
|
-
export interface AiAssistantTextContext {
|
|
5
|
-
type: 'text';
|
|
6
|
-
data: string;
|
|
7
|
-
}
|
|
8
|
-
export interface AiAssistantUrlContext {
|
|
9
|
-
type: 'url';
|
|
10
|
-
data: string;
|
|
11
|
-
}
|
|
12
|
-
export type AiAssistantContext = AiAssistantTextContext | AiAssistantUrlContext;
|
|
1
|
+
/** The supported Open AI model names. */
|
|
2
|
+
export type OpenAiModelName = 'gpt-3.5-turbo' | 'gpt-4';
|
|
3
|
+
export type AiAssistantContextType = 'text' | 'url';
|
|
4
|
+
export interface AiAssistantTextContext {
|
|
5
|
+
type: 'text';
|
|
6
|
+
data: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AiAssistantUrlContext {
|
|
9
|
+
type: 'url';
|
|
10
|
+
data: string;
|
|
11
|
+
}
|
|
12
|
+
export type AiAssistantContext = AiAssistantTextContext | AiAssistantUrlContext;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ApiHeaders } from './api.types';
|
|
2
|
-
import { ApiEndpointId, HttpMethod } from './integrations';
|
|
3
|
-
/** The context of an API call. */
|
|
4
|
-
export declare class ApiCallContext {
|
|
5
|
-
readonly endpointId: ApiEndpointId;
|
|
6
|
-
readonly url: string;
|
|
7
|
-
readonly method: HttpMethod;
|
|
8
|
-
readonly headers: ApiHeaders;
|
|
9
|
-
readonly body: Record<string, any>;
|
|
10
|
-
readonly queryParams: Record<string, string | number | boolean>;
|
|
11
|
-
readonly pathParams: Record<string, string>;
|
|
12
|
-
readonly serverUrlOverride: string | undefined;
|
|
13
|
-
}
|
|
1
|
+
import { ApiHeaders } from './api.types';
|
|
2
|
+
import { ApiEndpointId, HttpMethod } from './integrations';
|
|
3
|
+
/** The context of an API call. */
|
|
4
|
+
export declare class ApiCallContext {
|
|
5
|
+
readonly endpointId: ApiEndpointId;
|
|
6
|
+
readonly url: string;
|
|
7
|
+
readonly method: HttpMethod;
|
|
8
|
+
readonly headers: ApiHeaders;
|
|
9
|
+
readonly body: Record<string, any>;
|
|
10
|
+
readonly queryParams: Record<string, string | number | boolean>;
|
|
11
|
+
readonly pathParams: Record<string, string>;
|
|
12
|
+
readonly serverUrlOverride: string | undefined;
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The headers of an API call. */
|
|
2
|
-
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
3
|
-
/** The query parameters of an API call. */
|
|
4
|
-
export type ApiQueryParams = Record<string, string | number | boolean>;
|
|
1
|
+
/** The headers of an API call. */
|
|
2
|
+
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
3
|
+
/** The query parameters of an API call. */
|
|
4
|
+
export type ApiQueryParams = Record<string, string | number | boolean>;
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { IntegrationSchemaType } from './integrations';
|
|
2
|
-
export declare const UpsertIntegrationSchemaRequestSchema: {
|
|
3
|
-
type: string;
|
|
4
|
-
required: string[];
|
|
5
|
-
properties: {
|
|
6
|
-
id: {
|
|
7
|
-
type: string;
|
|
8
|
-
nullable: boolean;
|
|
9
|
-
};
|
|
10
|
-
type: {
|
|
11
|
-
type: string;
|
|
12
|
-
nullable: boolean;
|
|
13
|
-
};
|
|
14
|
-
schema: {
|
|
15
|
-
oneOf: ({
|
|
16
|
-
type: string;
|
|
17
|
-
required: string[];
|
|
18
|
-
properties: {
|
|
19
|
-
type: {
|
|
20
|
-
const: IntegrationSchemaType;
|
|
21
|
-
};
|
|
22
|
-
collections: {
|
|
23
|
-
type: string;
|
|
24
|
-
nullable: boolean;
|
|
25
|
-
};
|
|
26
|
-
baseUrl?: undefined;
|
|
27
|
-
endpoints?: undefined;
|
|
28
|
-
introspection?: undefined;
|
|
29
|
-
};
|
|
30
|
-
} | {
|
|
31
|
-
type: string;
|
|
32
|
-
required: string[];
|
|
33
|
-
properties: {
|
|
34
|
-
type: {
|
|
35
|
-
const: IntegrationSchemaType;
|
|
36
|
-
};
|
|
37
|
-
baseUrl: {
|
|
38
|
-
type: string;
|
|
39
|
-
nullable: boolean;
|
|
40
|
-
};
|
|
41
|
-
endpoints: {
|
|
42
|
-
type: string;
|
|
43
|
-
nullable: boolean;
|
|
44
|
-
};
|
|
45
|
-
collections?: undefined;
|
|
46
|
-
introspection?: undefined;
|
|
47
|
-
};
|
|
48
|
-
} | {
|
|
49
|
-
type: string;
|
|
50
|
-
required: string[];
|
|
51
|
-
properties: {
|
|
52
|
-
type: {
|
|
53
|
-
const: IntegrationSchemaType;
|
|
54
|
-
};
|
|
55
|
-
introspection: {
|
|
56
|
-
type: string;
|
|
57
|
-
nullable: boolean;
|
|
58
|
-
};
|
|
59
|
-
collections?: undefined;
|
|
60
|
-
baseUrl?: undefined;
|
|
61
|
-
endpoints?: undefined;
|
|
62
|
-
};
|
|
63
|
-
})[];
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
};
|
|
1
|
+
import { IntegrationSchemaType } from './integrations';
|
|
2
|
+
export declare const UpsertIntegrationSchemaRequestSchema: {
|
|
3
|
+
type: string;
|
|
4
|
+
required: string[];
|
|
5
|
+
properties: {
|
|
6
|
+
id: {
|
|
7
|
+
type: string;
|
|
8
|
+
nullable: boolean;
|
|
9
|
+
};
|
|
10
|
+
type: {
|
|
11
|
+
type: string;
|
|
12
|
+
nullable: boolean;
|
|
13
|
+
};
|
|
14
|
+
schema: {
|
|
15
|
+
oneOf: ({
|
|
16
|
+
type: string;
|
|
17
|
+
required: string[];
|
|
18
|
+
properties: {
|
|
19
|
+
type: {
|
|
20
|
+
const: IntegrationSchemaType;
|
|
21
|
+
};
|
|
22
|
+
collections: {
|
|
23
|
+
type: string;
|
|
24
|
+
nullable: boolean;
|
|
25
|
+
};
|
|
26
|
+
baseUrl?: undefined;
|
|
27
|
+
endpoints?: undefined;
|
|
28
|
+
introspection?: undefined;
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
type: string;
|
|
32
|
+
required: string[];
|
|
33
|
+
properties: {
|
|
34
|
+
type: {
|
|
35
|
+
const: IntegrationSchemaType;
|
|
36
|
+
};
|
|
37
|
+
baseUrl: {
|
|
38
|
+
type: string;
|
|
39
|
+
nullable: boolean;
|
|
40
|
+
};
|
|
41
|
+
endpoints: {
|
|
42
|
+
type: string;
|
|
43
|
+
nullable: boolean;
|
|
44
|
+
};
|
|
45
|
+
collections?: undefined;
|
|
46
|
+
introspection?: undefined;
|
|
47
|
+
};
|
|
48
|
+
} | {
|
|
49
|
+
type: string;
|
|
50
|
+
required: string[];
|
|
51
|
+
properties: {
|
|
52
|
+
type: {
|
|
53
|
+
const: IntegrationSchemaType;
|
|
54
|
+
};
|
|
55
|
+
introspection: {
|
|
56
|
+
type: string;
|
|
57
|
+
nullable: boolean;
|
|
58
|
+
};
|
|
59
|
+
collections?: undefined;
|
|
60
|
+
baseUrl?: undefined;
|
|
61
|
+
endpoints?: undefined;
|
|
62
|
+
};
|
|
63
|
+
})[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -1,140 +1,143 @@
|
|
|
1
|
-
import { AppId, EnvironmentId, IntegrationId } from './communication.types';
|
|
2
|
-
import { AuthIntegrationType, DatabaseIntegrationType, IntegrationConfig, IntegrationConfigTypes, IntegrationSchema, IntegrationSchemaKeys, IntegrationSchemaTypes, IntegrationType, IntegrationTypeWithConfig } from './integrations';
|
|
3
|
-
/** A type alias for a string that represents a webhook. */
|
|
4
|
-
export type WebhookId = string;
|
|
5
|
-
/** A type alias for a string that represents a named query. */
|
|
6
|
-
export type QueryName = string;
|
|
7
|
-
/** A type alias for a string that represents a trigger id. */
|
|
8
|
-
export type TriggerId = string;
|
|
9
|
-
/** A type alias for a string that represents a scheduler id. */
|
|
10
|
-
export type SchedulerId = string;
|
|
11
|
-
/** The supported cron expression string. */
|
|
12
|
-
export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
|
|
13
|
-
/** A set of predefined cron expressions. */
|
|
14
|
-
export declare enum CronExpression {
|
|
15
|
-
EVERY_SECOND = "* * * * * *",
|
|
16
|
-
EVERY_5_SECONDS = "*/5 * * * * *",
|
|
17
|
-
EVERY_10_SECONDS = "*/10 * * * * *",
|
|
18
|
-
EVERY_30_SECONDS = "*/30 * * * * *",
|
|
19
|
-
EVERY_MINUTE = "*/1 * * * *",
|
|
20
|
-
EVERY_5_MINUTES = "0 */5 * * * *",
|
|
21
|
-
EVERY_10_MINUTES = "0 */10 * * * *",
|
|
22
|
-
EVERY_30_MINUTES = "0 */30 * * * *",
|
|
23
|
-
EVERY_HOUR = "0 0-23/1 * * *",
|
|
24
|
-
EVERY_2_HOURS = "0 0-23/2 * * *",
|
|
25
|
-
EVERY_3_HOURS = "0 0-23/3 * * *",
|
|
26
|
-
EVERY_4_HOURS = "0 0-23/4 * * *",
|
|
27
|
-
EVERY_5_HOURS = "0 0-23/5 * * *",
|
|
28
|
-
EVERY_6_HOURS = "0 0-23/6 * * *",
|
|
29
|
-
EVERY_7_HOURS = "0 0-23/7 * * *",
|
|
30
|
-
EVERY_8_HOURS = "0 0-23/8 * * *",
|
|
31
|
-
EVERY_9_HOURS = "0 0-23/9 * * *",
|
|
32
|
-
EVERY_10_HOURS = "0 0-23/10 * * *",
|
|
33
|
-
EVERY_11_HOURS = "0 0-23/11 * * *",
|
|
34
|
-
EVERY_12_HOURS = "0 0-23/12 * * *",
|
|
35
|
-
EVERY_DAY_AT_1AM = "0 01 * * *",
|
|
36
|
-
EVERY_DAY_AT_2AM = "0 02 * * *",
|
|
37
|
-
EVERY_DAY_AT_3AM = "0 03 * * *",
|
|
38
|
-
EVERY_DAY_AT_4AM = "0 04 * * *",
|
|
39
|
-
EVERY_DAY_AT_5AM = "0 05 * * *",
|
|
40
|
-
EVERY_DAY_AT_6AM = "0 06 * * *",
|
|
41
|
-
EVERY_DAY_AT_7AM = "0 07 * * *",
|
|
42
|
-
EVERY_DAY_AT_8AM = "0 08 * * *",
|
|
43
|
-
EVERY_DAY_AT_9AM = "0 09 * * *",
|
|
44
|
-
EVERY_DAY_AT_10AM = "0 10 * * *",
|
|
45
|
-
EVERY_DAY_AT_11AM = "0 11 * * *",
|
|
46
|
-
EVERY_DAY_AT_NOON = "0 12 * * *",
|
|
47
|
-
EVERY_DAY_AT_1PM = "0 13 * * *",
|
|
48
|
-
EVERY_DAY_AT_2PM = "0 14 * * *",
|
|
49
|
-
EVERY_DAY_AT_3PM = "0 15 * * *",
|
|
50
|
-
EVERY_DAY_AT_4PM = "0 16 * * *",
|
|
51
|
-
EVERY_DAY_AT_5PM = "0 17 * * *",
|
|
52
|
-
EVERY_DAY_AT_6PM = "0 18 * * *",
|
|
53
|
-
EVERY_DAY_AT_7PM = "0 19 * * *",
|
|
54
|
-
EVERY_DAY_AT_8PM = "0 20 * * *",
|
|
55
|
-
EVERY_DAY_AT_9PM = "0 21 * * *",
|
|
56
|
-
EVERY_DAY_AT_10PM = "0 22 * * *",
|
|
57
|
-
EVERY_DAY_AT_11PM = "0 23 * * *",
|
|
58
|
-
EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
|
|
59
|
-
EVERY_WEEK = "0 0 * * 0",
|
|
60
|
-
EVERY_WEEKDAY = "0 0 * * 1-5",
|
|
61
|
-
EVERY_WEEKEND = "0 0 * * 6,0",
|
|
62
|
-
EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT = "0 0 1 * *",
|
|
63
|
-
EVERY_1ST_DAY_OF_MONTH_AT_NOON = "0 12 1 * *",
|
|
64
|
-
EVERY_2ND_HOUR = "0 */2 * * *",
|
|
65
|
-
EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM = "0 1-23/2 * * *",
|
|
66
|
-
EVERY_2ND_MONTH = "0 0 1 */2 *",
|
|
67
|
-
EVERY_QUARTER = "0 0 1 */3 *",
|
|
68
|
-
EVERY_6_MONTHS = "0 0 1 */6 *",
|
|
69
|
-
EVERY_YEAR = "0 0 1 0 *",
|
|
70
|
-
EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
|
|
71
|
-
EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
|
|
72
|
-
EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
|
|
73
|
-
MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
|
|
74
|
-
MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
|
|
75
|
-
MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
|
|
76
|
-
MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
|
|
77
|
-
MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
|
|
78
|
-
MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
|
|
79
|
-
MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
|
|
80
|
-
MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
|
|
81
|
-
MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
|
|
82
|
-
MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
|
|
83
|
-
MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
|
|
84
|
-
MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
|
|
85
|
-
MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
|
|
86
|
-
MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
|
|
87
|
-
MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
|
|
88
|
-
MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
|
|
89
|
-
MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
|
|
90
|
-
MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
|
|
91
|
-
MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
|
|
92
|
-
MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
|
|
93
|
-
MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
|
|
94
|
-
MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
|
|
95
|
-
MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
|
|
96
|
-
MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
|
|
97
|
-
MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
|
|
98
|
-
}
|
|
99
|
-
export interface DeleteIntegrationRequest {
|
|
100
|
-
integrationId: IntegrationId;
|
|
101
|
-
}
|
|
102
|
-
export interface UpdateAllowedHostsRequest {
|
|
103
|
-
allowedHosts: string[];
|
|
104
|
-
}
|
|
105
|
-
export interface CreateEnvironmentRequest {
|
|
106
|
-
sourceAppId: AppId;
|
|
107
|
-
environmentId: EnvironmentId;
|
|
108
|
-
}
|
|
109
|
-
interface BaseUpsertIntegrationRequest<T extends IntegrationTypeWithConfig, C extends IntegrationConfig> {
|
|
110
|
-
id: IntegrationId;
|
|
111
|
-
type: T;
|
|
112
|
-
config: Partial<C>;
|
|
113
|
-
}
|
|
114
|
-
type ConfigurationTypes = {
|
|
115
|
-
[K in IntegrationTypeWithConfig]: IntegrationConfigTypes[K];
|
|
116
|
-
};
|
|
117
|
-
type UpsertIntegrationRequests = {
|
|
118
|
-
[K in IntegrationTypeWithConfig]: BaseUpsertIntegrationRequest<K, ConfigurationTypes[K]>;
|
|
119
|
-
};
|
|
120
|
-
export type UpsertDataIntegrationRequest = UpsertIntegrationRequests[DatabaseIntegrationType];
|
|
121
|
-
export type UpsertGraphQLIntegrationRequest = UpsertIntegrationRequests[IntegrationType.graphql];
|
|
122
|
-
export type UpsertApiIntegrationRequest = UpsertIntegrationRequests[IntegrationType.api];
|
|
123
|
-
export type UpsertAiAssistantIntegrationRequest = UpsertIntegrationRequests[IntegrationType.ai_assistant];
|
|
124
|
-
export type UpsertAuthIntegrationRequest = UpsertIntegrationRequests[AuthIntegrationType];
|
|
125
|
-
interface BaseUpsertIntegrationSchemaRequest<T extends IntegrationType, S extends IntegrationSchema> {
|
|
126
|
-
id: IntegrationId;
|
|
127
|
-
type: T;
|
|
128
|
-
schema: S;
|
|
129
|
-
}
|
|
130
|
-
type SchemaTypes = {
|
|
131
|
-
[K in IntegrationSchemaKeys]: IntegrationSchemaTypes[K];
|
|
132
|
-
};
|
|
133
|
-
type UpsertIntegrationSchemaRequests = {
|
|
134
|
-
[K in IntegrationSchemaKeys]: BaseUpsertIntegrationSchemaRequest<K, SchemaTypes[K]>;
|
|
135
|
-
};
|
|
136
|
-
export type UpsertIntegrationSchemaRequest = UpsertDataIntegrationSchemaRequest | UpsertGraphQLIntegrationSchemaRequest | UpsertApiIntegrationSchemaRequest;
|
|
137
|
-
export type UpsertDataIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[DatabaseIntegrationType];
|
|
138
|
-
export type UpsertGraphQLIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.graphql];
|
|
139
|
-
export type UpsertApiIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.api];
|
|
140
|
-
export {
|
|
1
|
+
import { AppId, EnvironmentId, IntegrationId } from './communication.types';
|
|
2
|
+
import { AuthIntegrationType, DatabaseIntegrationType, IntegrationConfig, IntegrationConfigTypes, IntegrationSchema, IntegrationSchemaKeys, IntegrationSchemaTypes, IntegrationType, IntegrationTypeWithConfig } from './integrations';
|
|
3
|
+
/** A type alias for a string that represents a webhook. */
|
|
4
|
+
export type WebhookId = string;
|
|
5
|
+
/** A type alias for a string that represents a named query. */
|
|
6
|
+
export type QueryName = string;
|
|
7
|
+
/** A type alias for a string that represents a trigger id. */
|
|
8
|
+
export type TriggerId = string;
|
|
9
|
+
/** A type alias for a string that represents a scheduler id. */
|
|
10
|
+
export type SchedulerId = string;
|
|
11
|
+
/** The supported cron expression string. */
|
|
12
|
+
export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
|
|
13
|
+
/** A set of predefined cron expressions. */
|
|
14
|
+
export declare enum CronExpression {
|
|
15
|
+
EVERY_SECOND = "* * * * * *",
|
|
16
|
+
EVERY_5_SECONDS = "*/5 * * * * *",
|
|
17
|
+
EVERY_10_SECONDS = "*/10 * * * * *",
|
|
18
|
+
EVERY_30_SECONDS = "*/30 * * * * *",
|
|
19
|
+
EVERY_MINUTE = "*/1 * * * *",
|
|
20
|
+
EVERY_5_MINUTES = "0 */5 * * * *",
|
|
21
|
+
EVERY_10_MINUTES = "0 */10 * * * *",
|
|
22
|
+
EVERY_30_MINUTES = "0 */30 * * * *",
|
|
23
|
+
EVERY_HOUR = "0 0-23/1 * * *",
|
|
24
|
+
EVERY_2_HOURS = "0 0-23/2 * * *",
|
|
25
|
+
EVERY_3_HOURS = "0 0-23/3 * * *",
|
|
26
|
+
EVERY_4_HOURS = "0 0-23/4 * * *",
|
|
27
|
+
EVERY_5_HOURS = "0 0-23/5 * * *",
|
|
28
|
+
EVERY_6_HOURS = "0 0-23/6 * * *",
|
|
29
|
+
EVERY_7_HOURS = "0 0-23/7 * * *",
|
|
30
|
+
EVERY_8_HOURS = "0 0-23/8 * * *",
|
|
31
|
+
EVERY_9_HOURS = "0 0-23/9 * * *",
|
|
32
|
+
EVERY_10_HOURS = "0 0-23/10 * * *",
|
|
33
|
+
EVERY_11_HOURS = "0 0-23/11 * * *",
|
|
34
|
+
EVERY_12_HOURS = "0 0-23/12 * * *",
|
|
35
|
+
EVERY_DAY_AT_1AM = "0 01 * * *",
|
|
36
|
+
EVERY_DAY_AT_2AM = "0 02 * * *",
|
|
37
|
+
EVERY_DAY_AT_3AM = "0 03 * * *",
|
|
38
|
+
EVERY_DAY_AT_4AM = "0 04 * * *",
|
|
39
|
+
EVERY_DAY_AT_5AM = "0 05 * * *",
|
|
40
|
+
EVERY_DAY_AT_6AM = "0 06 * * *",
|
|
41
|
+
EVERY_DAY_AT_7AM = "0 07 * * *",
|
|
42
|
+
EVERY_DAY_AT_8AM = "0 08 * * *",
|
|
43
|
+
EVERY_DAY_AT_9AM = "0 09 * * *",
|
|
44
|
+
EVERY_DAY_AT_10AM = "0 10 * * *",
|
|
45
|
+
EVERY_DAY_AT_11AM = "0 11 * * *",
|
|
46
|
+
EVERY_DAY_AT_NOON = "0 12 * * *",
|
|
47
|
+
EVERY_DAY_AT_1PM = "0 13 * * *",
|
|
48
|
+
EVERY_DAY_AT_2PM = "0 14 * * *",
|
|
49
|
+
EVERY_DAY_AT_3PM = "0 15 * * *",
|
|
50
|
+
EVERY_DAY_AT_4PM = "0 16 * * *",
|
|
51
|
+
EVERY_DAY_AT_5PM = "0 17 * * *",
|
|
52
|
+
EVERY_DAY_AT_6PM = "0 18 * * *",
|
|
53
|
+
EVERY_DAY_AT_7PM = "0 19 * * *",
|
|
54
|
+
EVERY_DAY_AT_8PM = "0 20 * * *",
|
|
55
|
+
EVERY_DAY_AT_9PM = "0 21 * * *",
|
|
56
|
+
EVERY_DAY_AT_10PM = "0 22 * * *",
|
|
57
|
+
EVERY_DAY_AT_11PM = "0 23 * * *",
|
|
58
|
+
EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
|
|
59
|
+
EVERY_WEEK = "0 0 * * 0",
|
|
60
|
+
EVERY_WEEKDAY = "0 0 * * 1-5",
|
|
61
|
+
EVERY_WEEKEND = "0 0 * * 6,0",
|
|
62
|
+
EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT = "0 0 1 * *",
|
|
63
|
+
EVERY_1ST_DAY_OF_MONTH_AT_NOON = "0 12 1 * *",
|
|
64
|
+
EVERY_2ND_HOUR = "0 */2 * * *",
|
|
65
|
+
EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM = "0 1-23/2 * * *",
|
|
66
|
+
EVERY_2ND_MONTH = "0 0 1 */2 *",
|
|
67
|
+
EVERY_QUARTER = "0 0 1 */3 *",
|
|
68
|
+
EVERY_6_MONTHS = "0 0 1 */6 *",
|
|
69
|
+
EVERY_YEAR = "0 0 1 0 *",
|
|
70
|
+
EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
|
|
71
|
+
EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
|
|
72
|
+
EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
|
|
73
|
+
MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
|
|
74
|
+
MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
|
|
75
|
+
MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
|
|
76
|
+
MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
|
|
77
|
+
MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
|
|
78
|
+
MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
|
|
79
|
+
MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
|
|
80
|
+
MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
|
|
81
|
+
MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
|
|
82
|
+
MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
|
|
83
|
+
MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
|
|
84
|
+
MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
|
|
85
|
+
MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
|
|
86
|
+
MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
|
|
87
|
+
MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
|
|
88
|
+
MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
|
|
89
|
+
MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
|
|
90
|
+
MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
|
|
91
|
+
MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
|
|
92
|
+
MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
|
|
93
|
+
MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
|
|
94
|
+
MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
|
|
95
|
+
MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
|
|
96
|
+
MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
|
|
97
|
+
MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
|
|
98
|
+
}
|
|
99
|
+
export interface DeleteIntegrationRequest {
|
|
100
|
+
integrationId: IntegrationId;
|
|
101
|
+
}
|
|
102
|
+
export interface UpdateAllowedHostsRequest {
|
|
103
|
+
allowedHosts: string[];
|
|
104
|
+
}
|
|
105
|
+
export interface CreateEnvironmentRequest {
|
|
106
|
+
sourceAppId: AppId;
|
|
107
|
+
environmentId: EnvironmentId;
|
|
108
|
+
}
|
|
109
|
+
interface BaseUpsertIntegrationRequest<T extends IntegrationTypeWithConfig, C extends IntegrationConfig> {
|
|
110
|
+
id: IntegrationId;
|
|
111
|
+
type: T;
|
|
112
|
+
config: Partial<C>;
|
|
113
|
+
}
|
|
114
|
+
type ConfigurationTypes = {
|
|
115
|
+
[K in IntegrationTypeWithConfig]: IntegrationConfigTypes[K];
|
|
116
|
+
};
|
|
117
|
+
type UpsertIntegrationRequests = {
|
|
118
|
+
[K in IntegrationTypeWithConfig]: BaseUpsertIntegrationRequest<K, ConfigurationTypes[K]>;
|
|
119
|
+
};
|
|
120
|
+
export type UpsertDataIntegrationRequest = UpsertIntegrationRequests[DatabaseIntegrationType];
|
|
121
|
+
export type UpsertGraphQLIntegrationRequest = UpsertIntegrationRequests[IntegrationType.graphql];
|
|
122
|
+
export type UpsertApiIntegrationRequest = UpsertIntegrationRequests[IntegrationType.api];
|
|
123
|
+
export type UpsertAiAssistantIntegrationRequest = UpsertIntegrationRequests[IntegrationType.ai_assistant];
|
|
124
|
+
export type UpsertAuthIntegrationRequest = UpsertIntegrationRequests[AuthIntegrationType];
|
|
125
|
+
interface BaseUpsertIntegrationSchemaRequest<T extends IntegrationType, S extends IntegrationSchema> {
|
|
126
|
+
id: IntegrationId;
|
|
127
|
+
type: T;
|
|
128
|
+
schema: S;
|
|
129
|
+
}
|
|
130
|
+
type SchemaTypes = {
|
|
131
|
+
[K in IntegrationSchemaKeys]: IntegrationSchemaTypes[K];
|
|
132
|
+
};
|
|
133
|
+
type UpsertIntegrationSchemaRequests = {
|
|
134
|
+
[K in IntegrationSchemaKeys]: BaseUpsertIntegrationSchemaRequest<K, SchemaTypes[K]>;
|
|
135
|
+
};
|
|
136
|
+
export type UpsertIntegrationSchemaRequest = UpsertDataIntegrationSchemaRequest | UpsertGraphQLIntegrationSchemaRequest | UpsertApiIntegrationSchemaRequest;
|
|
137
|
+
export type UpsertDataIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[DatabaseIntegrationType];
|
|
138
|
+
export type UpsertGraphQLIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.graphql];
|
|
139
|
+
export type UpsertApiIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.api];
|
|
140
|
+
export interface GetSchemaRequest {
|
|
141
|
+
integrationId: IntegrationId;
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ApplicationSecrets } from './secret.types';
|
|
2
|
-
export declare function convertToRunSecrets(appSecrets: ApplicationSecrets): RunSecrets;
|
|
1
|
+
import { ApplicationSecrets } from './secret.types';
|
|
2
|
+
export declare function convertToRunSecrets(appSecrets: ApplicationSecrets): RunSecrets;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { AiAssistantActionType, DatabaseActionType } from './bundle-data.types';
|
|
2
|
-
import { DocumentData, SquidDocId } from './document.types';
|
|
3
|
-
import { MutationContext } from './mutation.context';
|
|
4
|
-
import { MutationType } from './mutation.types';
|
|
5
|
-
import { QueryContext } from './query';
|
|
6
|
-
import { ApiCallContext } from './api-call.context';
|
|
7
|
-
import { NamedQueryContext } from './named-query.context';
|
|
8
|
-
import { GraphqlContext } from './graphql.context';
|
|
9
|
-
import { DistributedLockContext } from './distributed-lock.context';
|
|
10
|
-
import { AiAssistantChatContext, AiAssistantMutationContext } from './ai-assistant.context';
|
|
11
|
-
import { ClientId } from './communication.types';
|
|
12
|
-
import { ClientConnectionState } from './socket.types';
|
|
13
|
-
export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
14
|
-
export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
15
|
-
export type SecureNamedQueryAction = ((context: NamedQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
16
|
-
export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
17
|
-
export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
18
|
-
export type SecureAiAssistantAction<T extends AiAssistantActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context: AiAssistantChatContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: AiAssistantMutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
19
|
-
export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
|
|
20
|
-
export type ExecutableAction = (...args: any[]) => any;
|
|
21
|
-
export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
|
|
22
|
-
/** The context provided to a trigger function. */
|
|
23
|
-
export interface TriggerRequest<T extends DocumentData = any> {
|
|
24
|
-
squidDocId: SquidDocId;
|
|
25
|
-
mutationType: MutationType;
|
|
26
|
-
docBefore?: T;
|
|
27
|
-
docAfter?: T;
|
|
28
|
-
}
|
|
29
|
-
export type SchedulerAction = () => void | Promise<void>;
|
|
30
|
-
export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
|
|
31
|
-
/** The context provided to a webhook function. */
|
|
32
|
-
export interface WebhookRequest {
|
|
33
|
-
body: any;
|
|
34
|
-
queryParams: Record<string, string>;
|
|
35
|
-
headers: Record<string, string>;
|
|
36
|
-
httpMethod: 'post' | 'get' | 'put' | 'delete';
|
|
37
|
-
files?: Array<SquidFile>;
|
|
38
|
-
}
|
|
39
|
-
export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
1
|
+
import { AiAssistantActionType, DatabaseActionType } from './bundle-data.types';
|
|
2
|
+
import { DocumentData, SquidDocId } from './document.types';
|
|
3
|
+
import { MutationContext } from './mutation.context';
|
|
4
|
+
import { MutationType } from './mutation.types';
|
|
5
|
+
import { QueryContext } from './query';
|
|
6
|
+
import { ApiCallContext } from './api-call.context';
|
|
7
|
+
import { NamedQueryContext } from './named-query.context';
|
|
8
|
+
import { GraphqlContext } from './graphql.context';
|
|
9
|
+
import { DistributedLockContext } from './distributed-lock.context';
|
|
10
|
+
import { AiAssistantChatContext, AiAssistantMutationContext } from './ai-assistant.context';
|
|
11
|
+
import { ClientId } from './communication.types';
|
|
12
|
+
import { ClientConnectionState } from './socket.types';
|
|
13
|
+
export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
14
|
+
export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
15
|
+
export type SecureNamedQueryAction = ((context: NamedQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
16
|
+
export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
17
|
+
export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
18
|
+
export type SecureAiAssistantAction<T extends AiAssistantActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context: AiAssistantChatContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: AiAssistantMutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
|
|
19
|
+
export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
|
|
20
|
+
export type ExecutableAction = (...args: any[]) => any;
|
|
21
|
+
export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
|
|
22
|
+
/** The context provided to a trigger function. */
|
|
23
|
+
export interface TriggerRequest<T extends DocumentData = any> {
|
|
24
|
+
squidDocId: SquidDocId;
|
|
25
|
+
mutationType: MutationType;
|
|
26
|
+
docBefore?: T;
|
|
27
|
+
docAfter?: T;
|
|
28
|
+
}
|
|
29
|
+
export type SchedulerAction = () => void | Promise<void>;
|
|
30
|
+
export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
|
|
31
|
+
/** The context provided to a webhook function. */
|
|
32
|
+
export interface WebhookRequest {
|
|
33
|
+
body: any;
|
|
34
|
+
queryParams: Record<string, string>;
|
|
35
|
+
headers: Record<string, string>;
|
|
36
|
+
httpMethod: 'post' | 'get' | 'put' | 'delete';
|
|
37
|
+
files?: Array<SquidFile>;
|
|
38
|
+
}
|
|
39
|
+
export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** The different types of actions that can be performed on a database. */
|
|
2
|
-
export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
3
|
-
/** The different types of actions that can be performed on an AI assistant. */
|
|
4
|
-
export type AiAssistantActionType = 'chat' | 'mutate' | 'all';
|
|
1
|
+
/** The different types of actions that can be performed on a database. */
|
|
2
|
+
export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
|
|
3
|
+
/** The different types of actions that can be performed on an AI assistant. */
|
|
4
|
+
export type AiAssistantActionType = 'chat' | 'mutate' | 'all';
|