@squidcloud/client 1.0.96 → 1.0.98

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.
Files changed (103) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/common/src/ai-assistant.context.d.ts +12 -12
  3. package/dist/common/src/ai-assistant.schemas.d.ts +1 -1
  4. package/dist/common/src/ai-assistant.types.d.ts +12 -12
  5. package/dist/common/src/api-call.context.d.ts +13 -13
  6. package/dist/common/src/api.types.d.ts +4 -4
  7. package/dist/common/src/application.schemas.d.ts +1 -1
  8. package/dist/common/src/application.types.d.ts +184 -184
  9. package/dist/common/src/backend-function.schemas.d.ts +1 -1
  10. package/dist/common/src/backend-function.types.d.ts +1 -1
  11. package/dist/common/src/backend-run.types.d.ts +2 -2
  12. package/dist/common/src/bundle-api.types.d.ts +36 -36
  13. package/dist/common/src/bundle-data.types.d.ts +4 -4
  14. package/dist/common/src/communication.types.d.ts +12 -12
  15. package/dist/common/src/context.types.d.ts +40 -40
  16. package/dist/common/src/distributed-lock.context.d.ts +5 -5
  17. package/dist/common/src/document.types.d.ts +22 -22
  18. package/dist/common/src/graphql.context.d.ts +7 -7
  19. package/dist/common/src/graphql.types.d.ts +9 -9
  20. package/dist/common/src/heartbeat.types.d.ts +1 -1
  21. package/dist/common/src/http-status.enum.d.ts +50 -50
  22. package/dist/common/src/index.d.ts +53 -53
  23. package/dist/common/src/integrations/ai_assistant.types.d.ts +30 -30
  24. package/dist/common/src/integrations/api.types.d.ts +80 -80
  25. package/dist/common/src/integrations/auth.types.d.ts +39 -39
  26. package/dist/common/src/integrations/database.types.d.ts +236 -236
  27. package/dist/common/src/integrations/index.d.ts +101 -101
  28. package/dist/common/src/integrations/observability.types.d.ts +23 -23
  29. package/dist/common/src/logger.types.d.ts +21 -21
  30. package/dist/common/src/metrics.types.d.ts +1 -1
  31. package/dist/common/src/mutation.context.d.ts +14 -14
  32. package/dist/common/src/mutation.schemas.d.ts +1 -1
  33. package/dist/common/src/mutation.types.d.ts +53 -53
  34. package/dist/common/src/named-query.context.d.ts +4 -4
  35. package/dist/common/src/named-query.schemas.d.ts +1 -1
  36. package/dist/common/src/named-query.types.d.ts +1 -1
  37. package/dist/common/src/query/base-query-builder.d.ts +196 -188
  38. package/dist/common/src/query/index.d.ts +3 -3
  39. package/dist/common/src/query/query-context.d.ts +137 -137
  40. package/dist/common/src/query/serialized-query.types.d.ts +24 -24
  41. package/dist/common/src/query.types.d.ts +59 -59
  42. package/dist/common/src/regions.d.ts +1 -1
  43. package/dist/common/src/schema/schema.types.d.ts +54 -54
  44. package/dist/common/src/secret.schemas.d.ts +1 -1
  45. package/dist/common/src/secret.types.d.ts +8 -8
  46. package/dist/common/src/security.types.d.ts +1 -1
  47. package/dist/common/src/socket.schemas.d.ts +1 -1
  48. package/dist/common/src/socket.types.d.ts +1 -1
  49. package/dist/common/src/time-units.d.ts +1 -1
  50. package/dist/common/src/trigger.types.d.ts +1 -1
  51. package/dist/common/src/types.d.ts +14 -14
  52. package/dist/common/src/utils/array.d.ts +1 -1
  53. package/dist/common/src/utils/assert.d.ts +1 -1
  54. package/dist/common/src/utils/error.d.ts +4 -4
  55. package/dist/common/src/utils/http.d.ts +2 -2
  56. package/dist/common/src/utils/id.d.ts +2 -2
  57. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  58. package/dist/common/src/utils/nullish.d.ts +2 -2
  59. package/dist/common/src/utils/object.d.ts +5 -5
  60. package/dist/common/src/utils/serialization.d.ts +6 -6
  61. package/dist/common/src/utils/transforms.d.ts +18 -18
  62. package/dist/common/src/utils/url.d.ts +1 -1
  63. package/dist/common/src/utils/validation.d.ts +30 -30
  64. package/dist/common/src/webhook-response.d.ts +1 -1
  65. package/dist/esm/index.js +1 -1
  66. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  67. package/dist/typescript-client/src/ai-assistant-client.d.ts +167 -167
  68. package/dist/typescript-client/src/ai-client.factory.d.ts +11 -11
  69. package/dist/typescript-client/src/api.manager.d.ts +15 -15
  70. package/dist/typescript-client/src/auth.manager.d.ts +23 -23
  71. package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
  72. package/dist/typescript-client/src/client-id.service.d.ts +25 -25
  73. package/dist/typescript-client/src/collection-reference.d.ts +81 -81
  74. package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -13
  75. package/dist/typescript-client/src/connection-details.d.ts +23 -23
  76. package/dist/typescript-client/src/data.manager.d.ts +172 -172
  77. package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
  78. package/dist/typescript-client/src/distributed-lock.manager.d.ts +19 -19
  79. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  80. package/dist/typescript-client/src/document-reference.d.ts +140 -134
  81. package/dist/typescript-client/src/document-reference.factory.d.ts +13 -13
  82. package/dist/typescript-client/src/document-store.d.ts +11 -11
  83. package/dist/typescript-client/src/graphql-client.d.ts +14 -14
  84. package/dist/typescript-client/src/graphql-client.factory.d.ts +11 -11
  85. package/dist/typescript-client/src/index.d.ts +8 -8
  86. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +10 -10
  87. package/dist/typescript-client/src/named-query.manager.d.ts +12 -12
  88. package/dist/typescript-client/src/query/deserializer.d.ts +3 -3
  89. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +161 -149
  90. package/dist/typescript-client/src/query/local-query-manager.d.ts +9 -9
  91. package/dist/typescript-client/src/query/query-builder.factory.d.ts +76 -80
  92. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +170 -170
  93. package/dist/typescript-client/src/rpc.manager.d.ts +29 -29
  94. package/dist/typescript-client/src/socket.manager.d.ts +33 -33
  95. package/dist/typescript-client/src/squid.d.ts +218 -218
  96. package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
  97. package/dist/typescript-client/src/state/actions.d.ts +29 -29
  98. package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
  99. package/dist/typescript-client/src/state/state.service.d.ts +22 -22
  100. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  101. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  102. package/dist/typescript-client/src/types.d.ts +2 -2
  103. 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 +1 @@
1
- export {};
1
+ export {};
@@ -1,184 +1,184 @@
1
- import { AppId, EnvironmentId, IntegrationId } from './communication.types';
2
- import { AiAssistantConfiguration, GraphQLConnectionOptions, IntegrationAiAssistantSchema, IntegrationApiSchema, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType, MongoConnectionOptions, MssqlConnectionOptions, MySqlConnectionOptions, OpenApiDiscoveryOptions, OracleConnectionOptions, PostgresConnectionOptions, SnowflakeConnectionOptions } 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
- interface BaseUpsertDataIntegrationRequest extends BaseUpsertIntegrationRequest {
100
- supportsExternalChanges?: boolean;
101
- }
102
- export interface UpsertInternalIntegrationRequest extends BaseUpsertDataIntegrationRequest {
103
- type: IntegrationType.built_in_db;
104
- schema?: IntegrationDataSchema;
105
- }
106
- export interface UpsertMongoDbIntegrationRequest extends BaseUpsertDataIntegrationRequest {
107
- type: IntegrationType.mongo;
108
- schema?: IntegrationDataSchema;
109
- configuration: {
110
- connectionOptions: MongoConnectionOptions;
111
- };
112
- }
113
- export interface UpsertMySqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
114
- type: IntegrationType.mysql;
115
- schema?: IntegrationDataSchema;
116
- configuration: {
117
- connectionOptions: MySqlConnectionOptions;
118
- };
119
- }
120
- export interface UpsertOracleIntegrationRequest extends BaseUpsertDataIntegrationRequest {
121
- type: IntegrationType.oracledb;
122
- schema?: IntegrationDataSchema;
123
- configuration: {
124
- connectionOptions: OracleConnectionOptions;
125
- };
126
- }
127
- export interface UpsertMssqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
128
- type: IntegrationType.mssql;
129
- schema?: IntegrationDataSchema;
130
- configuration: {
131
- connectionOptions: MssqlConnectionOptions;
132
- };
133
- }
134
- export interface UpsertPostgresIntegrationRequest extends BaseUpsertDataIntegrationRequest {
135
- type: IntegrationType.postgres;
136
- schema?: IntegrationDataSchema;
137
- configuration: {
138
- connectionOptions: PostgresConnectionOptions;
139
- };
140
- }
141
- export interface UpsertCockroachIntegrationRequest extends BaseUpsertDataIntegrationRequest {
142
- type: IntegrationType.cockroach;
143
- schema?: IntegrationDataSchema;
144
- configuration: {
145
- connectionOptions: PostgresConnectionOptions;
146
- };
147
- }
148
- export interface UpsertSnowflakeIntegrationRequest extends BaseUpsertDataIntegrationRequest {
149
- type: IntegrationType.snowflake;
150
- schema?: IntegrationDataSchema;
151
- configuration: {
152
- connectionOptions: SnowflakeConnectionOptions;
153
- };
154
- }
155
- export interface UpsertGraphQLIntegrationRequest extends BaseUpsertIntegrationRequest {
156
- type: IntegrationType.graphql;
157
- schema?: IntegrationGraphQLSchema;
158
- configuration: {
159
- connectionOptions: GraphQLConnectionOptions;
160
- };
161
- }
162
- export interface UpsertApiIntegrationRequest extends BaseUpsertIntegrationRequest {
163
- type: IntegrationType.api;
164
- schema?: IntegrationApiSchema;
165
- configuration?: {
166
- discoveryOptions: OpenApiDiscoveryOptions;
167
- };
168
- }
169
- export interface UpsertAiAssistantIntegrationRequest extends BaseUpsertIntegrationRequest {
170
- type: IntegrationType.ai_assistant;
171
- schema?: IntegrationAiAssistantSchema;
172
- configuration: AiAssistantConfiguration;
173
- }
174
- export interface DeleteIntegrationRequest {
175
- integrationId: IntegrationId;
176
- }
177
- export interface UpdateAllowedHostsRequest {
178
- allowedHosts: string[];
179
- }
180
- export interface CreateEnvironmentRequest {
181
- sourceAppId: AppId;
182
- environmentId: EnvironmentId;
183
- }
184
- export {};
1
+ import { AppId, EnvironmentId, IntegrationId } from './communication.types';
2
+ import { AiAssistantConfiguration, GraphQLConnectionOptions, IntegrationAiAssistantSchema, IntegrationApiSchema, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType, MongoConnectionOptions, MssqlConnectionOptions, MySqlConnectionOptions, OpenApiDiscoveryOptions, OracleConnectionOptions, PostgresConnectionOptions, SnowflakeConnectionOptions } 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
+ interface BaseUpsertDataIntegrationRequest extends BaseUpsertIntegrationRequest {
100
+ supportsExternalChanges?: boolean;
101
+ }
102
+ export interface UpsertInternalIntegrationRequest extends BaseUpsertDataIntegrationRequest {
103
+ type: IntegrationType.built_in_db;
104
+ schema?: IntegrationDataSchema;
105
+ }
106
+ export interface UpsertMongoDbIntegrationRequest extends BaseUpsertDataIntegrationRequest {
107
+ type: IntegrationType.mongo;
108
+ schema?: IntegrationDataSchema;
109
+ configuration: {
110
+ connectionOptions: MongoConnectionOptions;
111
+ };
112
+ }
113
+ export interface UpsertMySqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
114
+ type: IntegrationType.mysql;
115
+ schema?: IntegrationDataSchema;
116
+ configuration: {
117
+ connectionOptions: MySqlConnectionOptions;
118
+ };
119
+ }
120
+ export interface UpsertOracleIntegrationRequest extends BaseUpsertDataIntegrationRequest {
121
+ type: IntegrationType.oracledb;
122
+ schema?: IntegrationDataSchema;
123
+ configuration: {
124
+ connectionOptions: OracleConnectionOptions;
125
+ };
126
+ }
127
+ export interface UpsertMssqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
128
+ type: IntegrationType.mssql;
129
+ schema?: IntegrationDataSchema;
130
+ configuration: {
131
+ connectionOptions: MssqlConnectionOptions;
132
+ };
133
+ }
134
+ export interface UpsertPostgresIntegrationRequest extends BaseUpsertDataIntegrationRequest {
135
+ type: IntegrationType.postgres;
136
+ schema?: IntegrationDataSchema;
137
+ configuration: {
138
+ connectionOptions: PostgresConnectionOptions;
139
+ };
140
+ }
141
+ export interface UpsertCockroachIntegrationRequest extends BaseUpsertDataIntegrationRequest {
142
+ type: IntegrationType.cockroach;
143
+ schema?: IntegrationDataSchema;
144
+ configuration: {
145
+ connectionOptions: PostgresConnectionOptions;
146
+ };
147
+ }
148
+ export interface UpsertSnowflakeIntegrationRequest extends BaseUpsertDataIntegrationRequest {
149
+ type: IntegrationType.snowflake;
150
+ schema?: IntegrationDataSchema;
151
+ configuration: {
152
+ connectionOptions: SnowflakeConnectionOptions;
153
+ };
154
+ }
155
+ export interface UpsertGraphQLIntegrationRequest extends BaseUpsertIntegrationRequest {
156
+ type: IntegrationType.graphql;
157
+ schema?: IntegrationGraphQLSchema;
158
+ configuration: {
159
+ connectionOptions: GraphQLConnectionOptions;
160
+ };
161
+ }
162
+ export interface UpsertApiIntegrationRequest extends BaseUpsertIntegrationRequest {
163
+ type: IntegrationType.api;
164
+ schema?: IntegrationApiSchema;
165
+ configuration?: {
166
+ discoveryOptions: OpenApiDiscoveryOptions;
167
+ };
168
+ }
169
+ export interface UpsertAiAssistantIntegrationRequest extends BaseUpsertIntegrationRequest {
170
+ type: IntegrationType.ai_assistant;
171
+ schema?: IntegrationAiAssistantSchema;
172
+ configuration: AiAssistantConfiguration;
173
+ }
174
+ export interface DeleteIntegrationRequest {
175
+ integrationId: IntegrationId;
176
+ }
177
+ export interface UpdateAllowedHostsRequest {
178
+ allowedHosts: string[];
179
+ }
180
+ export interface CreateEnvironmentRequest {
181
+ sourceAppId: AppId;
182
+ environmentId: EnvironmentId;
183
+ }
184
+ 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,36 +1,36 @@
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
- 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>);
12
- export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
13
- export type SecureNamedQueryAction = ((context: NamedQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
14
- export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
15
- export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
16
- 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>);
17
- export type ExecutableAction = (...args: any[]) => any;
18
- export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
19
- /** The context provided to a trigger function. */
20
- export interface TriggerRequest<T extends DocumentData = any> {
21
- squidDocId: SquidDocId;
22
- mutationType: MutationType;
23
- docBefore?: T;
24
- docAfter?: T;
25
- }
26
- export type SchedulerAction = () => void | Promise<void>;
27
- export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
28
- /** The context provided to a webhook function. */
29
- export interface WebhookRequest {
30
- body: any;
31
- queryParams: Record<string, string>;
32
- headers: Record<string, string>;
33
- httpMethod: 'post' | 'get' | 'put' | 'delete';
34
- files?: Array<SquidFile>;
35
- }
36
- 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
+ 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>);
12
+ export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
13
+ export type SecureNamedQueryAction = ((context: NamedQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
14
+ export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
15
+ export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
16
+ 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>);
17
+ export type ExecutableAction = (...args: any[]) => any;
18
+ export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
19
+ /** The context provided to a trigger function. */
20
+ export interface TriggerRequest<T extends DocumentData = any> {
21
+ squidDocId: SquidDocId;
22
+ mutationType: MutationType;
23
+ docBefore?: T;
24
+ docAfter?: T;
25
+ }
26
+ export type SchedulerAction = () => void | Promise<void>;
27
+ export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
28
+ /** The context provided to a webhook function. */
29
+ export interface WebhookRequest {
30
+ body: any;
31
+ queryParams: Record<string, string>;
32
+ headers: Record<string, string>;
33
+ httpMethod: 'post' | 'get' | 'put' | 'delete';
34
+ files?: Array<SquidFile>;
35
+ }
36
+ 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';
@@ -1,12 +1,12 @@
1
- /**
2
- * The appId is the unique identifier of an application.
3
- * It is the combination of the application id (as shown in the console), environment id (dev, prod) and the
4
- * developer id (if exists). For example - "fdgfd90ds-dev-1234567890abcdef"
5
- */
6
- /** A type alias for an application id. */
7
- export type AppId = string;
8
- export type EnvironmentId = 'prod' | 'dev';
9
- export declare const allEnvironmentIds: Array<EnvironmentId>;
10
- /** A type alias for an integration id. */
11
- export type IntegrationId = string;
12
- export type SquidDeveloperId = string;
1
+ /**
2
+ * The appId is the unique identifier of an application.
3
+ * It is the combination of the application id (as shown in the console), environment id (dev, prod) and the
4
+ * developer id (if exists). For example - "fdgfd90ds-dev-1234567890abcdef"
5
+ */
6
+ /** A type alias for an application id. */
7
+ export type AppId = string;
8
+ export type EnvironmentId = 'prod' | 'dev';
9
+ export declare const allEnvironmentIds: Array<EnvironmentId>;
10
+ /** A type alias for an integration id. */
11
+ export type IntegrationId = string;
12
+ export type SquidDeveloperId = string;