@squidcloud/client 1.0.34 → 1.0.35

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 (90) hide show
  1. package/dist/common/src/api-call.context.d.ts +12 -12
  2. package/dist/common/src/api.types.d.ts +23 -23
  3. package/dist/common/src/application.schemas.d.ts +883 -883
  4. package/dist/common/src/application.types.d.ts +205 -205
  5. package/dist/common/src/backend-function.schemas.d.ts +3 -3
  6. package/dist/common/src/backend-function.types.d.ts +7 -7
  7. package/dist/common/src/backend-run.types.d.ts +66 -66
  8. package/dist/common/src/bundle-api.types.d.ts +64 -64
  9. package/dist/common/src/bundle-data.types.d.ts +46 -46
  10. package/dist/common/src/communication.types.d.ts +4 -4
  11. package/dist/common/src/context.types.d.ts +31 -31
  12. package/dist/common/src/document.types.d.ts +35 -35
  13. package/dist/common/src/graphql.context.d.ts +6 -6
  14. package/dist/common/src/graphql.types.d.ts +16 -16
  15. package/dist/common/src/http-status.enum.d.ts +50 -50
  16. package/dist/common/src/index.d.ts +49 -49
  17. package/dist/common/src/integration.types.d.ts +316 -319
  18. package/dist/common/src/logger.types.d.ts +21 -21
  19. package/dist/common/src/metrics.types.d.ts +58 -58
  20. package/dist/common/src/mutation.context.d.ts +10 -10
  21. package/dist/common/src/mutation.schemas.d.ts +5 -5
  22. package/dist/common/src/mutation.types.d.ts +72 -72
  23. package/dist/common/src/named-query.context.d.ts +4 -4
  24. package/dist/common/src/named-query.schemas.d.ts +3 -3
  25. package/dist/common/src/named-query.types.d.ts +9 -9
  26. package/dist/common/src/query/index.d.ts +2 -2
  27. package/dist/common/src/query/query-context.d.ts +37 -37
  28. package/dist/common/src/query/simple-query-builder.d.ts +90 -90
  29. package/dist/common/src/query.schemas.d.ts +5 -5
  30. package/dist/common/src/query.types.d.ts +118 -118
  31. package/dist/common/src/regions.d.ts +22 -22
  32. package/dist/common/src/schema/schema.types.d.ts +54 -54
  33. package/dist/common/src/secret.schemas.d.ts +6 -6
  34. package/dist/common/src/secret.types.d.ts +40 -40
  35. package/dist/common/src/security.types.d.ts +3 -3
  36. package/dist/common/src/socket.schemas.d.ts +3 -3
  37. package/dist/common/src/socket.types.d.ts +68 -68
  38. package/dist/common/src/time-units.d.ts +5 -5
  39. package/dist/common/src/trigger.types.d.ts +15 -15
  40. package/dist/common/src/types.d.ts +15 -15
  41. package/dist/common/src/utils/array.d.ts +8 -8
  42. package/dist/common/src/utils/assert.d.ts +8 -8
  43. package/dist/common/src/utils/error.d.ts +4 -4
  44. package/dist/common/src/utils/http.d.ts +2 -2
  45. package/dist/common/src/utils/id.d.ts +2 -2
  46. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  47. package/dist/common/src/utils/nullish.d.ts +1 -1
  48. package/dist/common/src/utils/object.d.ts +6 -6
  49. package/dist/common/src/utils/serialization.d.ts +6 -6
  50. package/dist/common/src/utils/transforms.d.ts +18 -18
  51. package/dist/common/src/utils/validation.d.ts +30 -30
  52. package/dist/common/src/webhook-response.d.ts +7 -7
  53. package/dist/index.js +1 -1
  54. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  55. package/dist/typescript-client/src/api.manager.d.ts +14 -14
  56. package/dist/typescript-client/src/backend-function.manager.d.ts +13 -13
  57. package/dist/typescript-client/src/collection-reference.d.ts +53 -53
  58. package/dist/typescript-client/src/collection-reference.factory.d.ts +16 -16
  59. package/dist/typescript-client/src/data.manager.d.ts +166 -166
  60. package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
  61. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  62. package/dist/typescript-client/src/document-reference.d.ts +100 -100
  63. package/dist/typescript-client/src/document-reference.factory.d.ts +9 -9
  64. package/dist/typescript-client/src/document-store.d.ts +11 -11
  65. package/dist/typescript-client/src/graphql-client.d.ts +12 -12
  66. package/dist/typescript-client/src/graphql-client.factory.d.ts +9 -9
  67. package/dist/typescript-client/src/index.d.ts +7 -7
  68. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +11 -11
  69. package/dist/typescript-client/src/mutation/mutation.spec.d.ts +1 -1
  70. package/dist/typescript-client/src/named-query.manager.d.ts +13 -13
  71. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +71 -71
  72. package/dist/typescript-client/src/query/query-builder.factory.d.ts +67 -60
  73. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +59 -59
  74. package/dist/typescript-client/src/query/query-subscription.manager.spec.d.ts +1 -1
  75. package/dist/typescript-client/src/query/query.spec.d.ts +1 -1
  76. package/dist/typescript-client/src/query/query.types.d.ts +14 -14
  77. package/dist/typescript-client/src/rpc.manager.d.ts +30 -30
  78. package/dist/typescript-client/src/socket.manager.d.ts +27 -27
  79. package/dist/typescript-client/src/squid.d.ts +173 -173
  80. package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
  81. package/dist/typescript-client/src/state/actions.d.ts +29 -29
  82. package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
  83. package/dist/typescript-client/src/state/state.service.d.ts +22 -22
  84. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  85. package/dist/typescript-client/src/testing/fake-rpc.manager.d.ts +20 -20
  86. package/dist/typescript-client/src/testing/fake-socket.manager.d.ts +9 -9
  87. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  88. package/dist/typescript-client/src/testing/squid-env-setup.d.ts +79 -79
  89. package/dist/typescript-client/src/types.d.ts +2 -2
  90. package/package.json +1 -1
@@ -1,205 +1,205 @@
1
- import { ApplicationBundleData, ServiceFunctionName } from './bundle-data.types';
2
- import { AppId, IntegrationId } from './communication.types';
3
- import { CollectionName } from './document.types';
4
- import { GraphQLConnectionOptions, Integration, IntegrationApiSchema, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType, MongoConnectionOptions, MssqlConnectionOptions, MySqlConnectionOptions, OpenApiDiscoveryOptions, PostgresConnectionOptions, SnowflakeConnectionOptions } from './integration.types';
5
- export type WebhookId = string;
6
- export type QueryName = string;
7
- export type TriggerId = string;
8
- export type SchedulerId = string;
9
- export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
10
- export declare enum CronExpression {
11
- EVERY_SECOND = "* * * * * *",
12
- EVERY_5_SECONDS = "*/5 * * * * *",
13
- EVERY_10_SECONDS = "*/10 * * * * *",
14
- EVERY_30_SECONDS = "*/30 * * * * *",
15
- EVERY_MINUTE = "*/1 * * * *",
16
- EVERY_5_MINUTES = "0 */5 * * * *",
17
- EVERY_10_MINUTES = "0 */10 * * * *",
18
- EVERY_30_MINUTES = "0 */30 * * * *",
19
- EVERY_HOUR = "0 0-23/1 * * *",
20
- EVERY_2_HOURS = "0 0-23/2 * * *",
21
- EVERY_3_HOURS = "0 0-23/3 * * *",
22
- EVERY_4_HOURS = "0 0-23/4 * * *",
23
- EVERY_5_HOURS = "0 0-23/5 * * *",
24
- EVERY_6_HOURS = "0 0-23/6 * * *",
25
- EVERY_7_HOURS = "0 0-23/7 * * *",
26
- EVERY_8_HOURS = "0 0-23/8 * * *",
27
- EVERY_9_HOURS = "0 0-23/9 * * *",
28
- EVERY_10_HOURS = "0 0-23/10 * * *",
29
- EVERY_11_HOURS = "0 0-23/11 * * *",
30
- EVERY_12_HOURS = "0 0-23/12 * * *",
31
- EVERY_DAY_AT_1AM = "0 01 * * *",
32
- EVERY_DAY_AT_2AM = "0 02 * * *",
33
- EVERY_DAY_AT_3AM = "0 03 * * *",
34
- EVERY_DAY_AT_4AM = "0 04 * * *",
35
- EVERY_DAY_AT_5AM = "0 05 * * *",
36
- EVERY_DAY_AT_6AM = "0 06 * * *",
37
- EVERY_DAY_AT_7AM = "0 07 * * *",
38
- EVERY_DAY_AT_8AM = "0 08 * * *",
39
- EVERY_DAY_AT_9AM = "0 09 * * *",
40
- EVERY_DAY_AT_10AM = "0 10 * * *",
41
- EVERY_DAY_AT_11AM = "0 11 * * *",
42
- EVERY_DAY_AT_NOON = "0 12 * * *",
43
- EVERY_DAY_AT_1PM = "0 13 * * *",
44
- EVERY_DAY_AT_2PM = "0 14 * * *",
45
- EVERY_DAY_AT_3PM = "0 15 * * *",
46
- EVERY_DAY_AT_4PM = "0 16 * * *",
47
- EVERY_DAY_AT_5PM = "0 17 * * *",
48
- EVERY_DAY_AT_6PM = "0 18 * * *",
49
- EVERY_DAY_AT_7PM = "0 19 * * *",
50
- EVERY_DAY_AT_8PM = "0 20 * * *",
51
- EVERY_DAY_AT_9PM = "0 21 * * *",
52
- EVERY_DAY_AT_10PM = "0 22 * * *",
53
- EVERY_DAY_AT_11PM = "0 23 * * *",
54
- EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
55
- EVERY_WEEK = "0 0 * * 0",
56
- EVERY_WEEKDAY = "0 0 * * 1-5",
57
- EVERY_WEEKEND = "0 0 * * 6,0",
58
- EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT = "0 0 1 * *",
59
- EVERY_1ST_DAY_OF_MONTH_AT_NOON = "0 12 1 * *",
60
- EVERY_2ND_HOUR = "0 */2 * * *",
61
- EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM = "0 1-23/2 * * *",
62
- EVERY_2ND_MONTH = "0 0 1 */2 *",
63
- EVERY_QUARTER = "0 0 1 */3 *",
64
- EVERY_6_MONTHS = "0 0 1 */6 *",
65
- EVERY_YEAR = "0 0 1 0 *",
66
- EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
67
- EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
68
- EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
69
- MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
70
- MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
71
- MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
72
- MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
73
- MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
74
- MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
75
- MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
76
- MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
77
- MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
78
- MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
79
- MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
80
- MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
81
- MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
82
- MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
83
- MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
84
- MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
85
- MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
86
- MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
87
- MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
88
- MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
89
- MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
90
- MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
91
- MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
92
- MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
93
- MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
94
- }
95
- export type OpenIdProviderType = 'auth0';
96
- export type CodeUrl = string;
97
- export interface TriggerConfig {
98
- integrationId: IntegrationId;
99
- collectionName: CollectionName;
100
- functionName: ServiceFunctionName;
101
- }
102
- export interface SchedulerConfig {
103
- functionName: ServiceFunctionName;
104
- cronExpression: string;
105
- }
106
- export interface WebhookConfig {
107
- functionName: ServiceFunctionName;
108
- }
109
- export interface OpenIdProvider {
110
- providerType: OpenIdProviderType;
111
- clientId: string;
112
- domain: string;
113
- }
114
- export interface Application {
115
- appId: AppId;
116
- createdAt: Date;
117
- updatedAt: Date;
118
- allowedHosts: string[];
119
- openIdProvider?: OpenIdProvider;
120
- integrations: Record<IntegrationId, Integration>;
121
- codeUrl?: string;
122
- bundleMetadata?: ApplicationBundleData;
123
- }
124
- export interface UpdateOpenIdProviderRequest {
125
- openIdProvider: OpenIdProvider;
126
- }
127
- export interface CreateApplicationResponse {
128
- appId: AppId;
129
- }
130
- export type UpsertIntegrationRequest = UpsertDataIntegrationRequest | UpsertGraphQLIntegrationRequest | UpsertApiIntegrationRequest;
131
- export type UpsertDataIntegrationRequest = UpsertInternalIntegrationRequest | UpsertMongoDbIntegrationRequest | UpsertMssqlIntegrationRequest | UpsertMySqlIntegrationRequest | UpsertPostgresIntegrationRequest | UpsertCockroachIntegrationRequest | UpsertSnowflakeIntegrationRequest;
132
- interface BaseUpsertIntegrationRequest {
133
- id: IntegrationId;
134
- type: IntegrationType;
135
- }
136
- interface BaseUpsertDataIntegrationRequest extends BaseUpsertIntegrationRequest {
137
- supportsExternalChanges?: boolean;
138
- }
139
- export interface UpsertInternalIntegrationRequest extends BaseUpsertDataIntegrationRequest {
140
- type: IntegrationType.built_in_db;
141
- schema?: IntegrationDataSchema;
142
- }
143
- export interface UpsertMongoDbIntegrationRequest extends BaseUpsertDataIntegrationRequest {
144
- type: IntegrationType.mongo;
145
- schema?: IntegrationDataSchema;
146
- configuration: {
147
- connectionOptions: MongoConnectionOptions;
148
- };
149
- }
150
- export interface UpsertMySqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
151
- type: IntegrationType.mysql;
152
- schema?: IntegrationDataSchema;
153
- configuration: {
154
- connectionOptions: MySqlConnectionOptions;
155
- };
156
- }
157
- export interface UpsertMssqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
158
- type: IntegrationType.mssql;
159
- schema?: IntegrationDataSchema;
160
- configuration: {
161
- connectionOptions: MssqlConnectionOptions;
162
- };
163
- }
164
- export interface UpsertPostgresIntegrationRequest extends BaseUpsertDataIntegrationRequest {
165
- type: IntegrationType.postgres;
166
- schema?: IntegrationDataSchema;
167
- configuration: {
168
- connectionOptions: PostgresConnectionOptions;
169
- };
170
- }
171
- export interface UpsertCockroachIntegrationRequest extends BaseUpsertDataIntegrationRequest {
172
- type: IntegrationType.cockroach;
173
- schema?: IntegrationDataSchema;
174
- configuration: {
175
- connectionOptions: PostgresConnectionOptions;
176
- };
177
- }
178
- export interface UpsertSnowflakeIntegrationRequest extends BaseUpsertDataIntegrationRequest {
179
- type: IntegrationType.snowflake;
180
- schema?: IntegrationDataSchema;
181
- configuration: {
182
- connectionOptions: SnowflakeConnectionOptions;
183
- };
184
- }
185
- export interface UpsertGraphQLIntegrationRequest extends BaseUpsertIntegrationRequest {
186
- type: IntegrationType.graphql;
187
- schema?: IntegrationGraphQLSchema;
188
- configuration: {
189
- connectionOptions: GraphQLConnectionOptions;
190
- };
191
- }
192
- export interface UpsertApiIntegrationRequest extends BaseUpsertIntegrationRequest {
193
- type: IntegrationType.api;
194
- schema?: IntegrationApiSchema;
195
- configuration?: {
196
- discoveryOptions: OpenApiDiscoveryOptions;
197
- };
198
- }
199
- export interface DeleteIntegrationRequest {
200
- integrationId: IntegrationId;
201
- }
202
- export interface UpdateAllowedHostsRequest {
203
- allowedHosts: string[];
204
- }
205
- export {};
1
+ import { ApplicationBundleData, ServiceFunctionName } from './bundle-data.types';
2
+ import { AppId, IntegrationId } from './communication.types';
3
+ import { CollectionName } from './document.types';
4
+ import { GraphQLConnectionOptions, IntegrationConfig, IntegrationApiSchema, IntegrationDataSchema, IntegrationGraphQLSchema, IntegrationType, MongoConnectionOptions, MssqlConnectionOptions, MySqlConnectionOptions, OpenApiDiscoveryOptions, PostgresConnectionOptions, SnowflakeConnectionOptions } from './integration.types';
5
+ export type WebhookId = string;
6
+ export type QueryName = string;
7
+ export type TriggerId = string;
8
+ export type SchedulerId = string;
9
+ export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
10
+ export declare enum CronExpression {
11
+ EVERY_SECOND = "* * * * * *",
12
+ EVERY_5_SECONDS = "*/5 * * * * *",
13
+ EVERY_10_SECONDS = "*/10 * * * * *",
14
+ EVERY_30_SECONDS = "*/30 * * * * *",
15
+ EVERY_MINUTE = "*/1 * * * *",
16
+ EVERY_5_MINUTES = "0 */5 * * * *",
17
+ EVERY_10_MINUTES = "0 */10 * * * *",
18
+ EVERY_30_MINUTES = "0 */30 * * * *",
19
+ EVERY_HOUR = "0 0-23/1 * * *",
20
+ EVERY_2_HOURS = "0 0-23/2 * * *",
21
+ EVERY_3_HOURS = "0 0-23/3 * * *",
22
+ EVERY_4_HOURS = "0 0-23/4 * * *",
23
+ EVERY_5_HOURS = "0 0-23/5 * * *",
24
+ EVERY_6_HOURS = "0 0-23/6 * * *",
25
+ EVERY_7_HOURS = "0 0-23/7 * * *",
26
+ EVERY_8_HOURS = "0 0-23/8 * * *",
27
+ EVERY_9_HOURS = "0 0-23/9 * * *",
28
+ EVERY_10_HOURS = "0 0-23/10 * * *",
29
+ EVERY_11_HOURS = "0 0-23/11 * * *",
30
+ EVERY_12_HOURS = "0 0-23/12 * * *",
31
+ EVERY_DAY_AT_1AM = "0 01 * * *",
32
+ EVERY_DAY_AT_2AM = "0 02 * * *",
33
+ EVERY_DAY_AT_3AM = "0 03 * * *",
34
+ EVERY_DAY_AT_4AM = "0 04 * * *",
35
+ EVERY_DAY_AT_5AM = "0 05 * * *",
36
+ EVERY_DAY_AT_6AM = "0 06 * * *",
37
+ EVERY_DAY_AT_7AM = "0 07 * * *",
38
+ EVERY_DAY_AT_8AM = "0 08 * * *",
39
+ EVERY_DAY_AT_9AM = "0 09 * * *",
40
+ EVERY_DAY_AT_10AM = "0 10 * * *",
41
+ EVERY_DAY_AT_11AM = "0 11 * * *",
42
+ EVERY_DAY_AT_NOON = "0 12 * * *",
43
+ EVERY_DAY_AT_1PM = "0 13 * * *",
44
+ EVERY_DAY_AT_2PM = "0 14 * * *",
45
+ EVERY_DAY_AT_3PM = "0 15 * * *",
46
+ EVERY_DAY_AT_4PM = "0 16 * * *",
47
+ EVERY_DAY_AT_5PM = "0 17 * * *",
48
+ EVERY_DAY_AT_6PM = "0 18 * * *",
49
+ EVERY_DAY_AT_7PM = "0 19 * * *",
50
+ EVERY_DAY_AT_8PM = "0 20 * * *",
51
+ EVERY_DAY_AT_9PM = "0 21 * * *",
52
+ EVERY_DAY_AT_10PM = "0 22 * * *",
53
+ EVERY_DAY_AT_11PM = "0 23 * * *",
54
+ EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
55
+ EVERY_WEEK = "0 0 * * 0",
56
+ EVERY_WEEKDAY = "0 0 * * 1-5",
57
+ EVERY_WEEKEND = "0 0 * * 6,0",
58
+ EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT = "0 0 1 * *",
59
+ EVERY_1ST_DAY_OF_MONTH_AT_NOON = "0 12 1 * *",
60
+ EVERY_2ND_HOUR = "0 */2 * * *",
61
+ EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM = "0 1-23/2 * * *",
62
+ EVERY_2ND_MONTH = "0 0 1 */2 *",
63
+ EVERY_QUARTER = "0 0 1 */3 *",
64
+ EVERY_6_MONTHS = "0 0 1 */6 *",
65
+ EVERY_YEAR = "0 0 1 0 *",
66
+ EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
67
+ EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
68
+ EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
69
+ MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
70
+ MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
71
+ MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
72
+ MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
73
+ MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
74
+ MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
75
+ MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
76
+ MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
77
+ MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
78
+ MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
79
+ MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
80
+ MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
81
+ MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
82
+ MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
83
+ MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
84
+ MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
85
+ MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
86
+ MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
87
+ MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
88
+ MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
89
+ MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
90
+ MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
91
+ MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
92
+ MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
93
+ MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
94
+ }
95
+ export type OpenIdProviderType = 'auth0';
96
+ export type CodeUrl = string;
97
+ export interface TriggerConfig {
98
+ integrationId: IntegrationId;
99
+ collectionName: CollectionName;
100
+ functionName: ServiceFunctionName;
101
+ }
102
+ export interface SchedulerConfig {
103
+ functionName: ServiceFunctionName;
104
+ cronExpression: string;
105
+ }
106
+ export interface WebhookConfig {
107
+ functionName: ServiceFunctionName;
108
+ }
109
+ export interface OpenIdProvider {
110
+ providerType: OpenIdProviderType;
111
+ clientId: string;
112
+ domain: string;
113
+ }
114
+ export interface Application {
115
+ appId: AppId;
116
+ createdAt: Date;
117
+ updatedAt: Date;
118
+ allowedHosts: string[];
119
+ openIdProvider?: OpenIdProvider;
120
+ integrations: Record<IntegrationId, IntegrationConfig>;
121
+ codeUrl?: string;
122
+ bundleMetadata?: ApplicationBundleData;
123
+ }
124
+ export interface UpdateOpenIdProviderRequest {
125
+ openIdProvider: OpenIdProvider;
126
+ }
127
+ export interface CreateApplicationResponse {
128
+ appId: AppId;
129
+ }
130
+ export type UpsertIntegrationRequest = UpsertDataIntegrationRequest | UpsertGraphQLIntegrationRequest | UpsertApiIntegrationRequest;
131
+ export type UpsertDataIntegrationRequest = UpsertInternalIntegrationRequest | UpsertMongoDbIntegrationRequest | UpsertMssqlIntegrationRequest | UpsertMySqlIntegrationRequest | UpsertPostgresIntegrationRequest | UpsertCockroachIntegrationRequest | UpsertSnowflakeIntegrationRequest;
132
+ interface BaseUpsertIntegrationRequest {
133
+ id: IntegrationId;
134
+ type: IntegrationType;
135
+ }
136
+ interface BaseUpsertDataIntegrationRequest extends BaseUpsertIntegrationRequest {
137
+ supportsExternalChanges?: boolean;
138
+ }
139
+ export interface UpsertInternalIntegrationRequest extends BaseUpsertDataIntegrationRequest {
140
+ type: IntegrationType.built_in_db;
141
+ schema?: IntegrationDataSchema;
142
+ }
143
+ export interface UpsertMongoDbIntegrationRequest extends BaseUpsertDataIntegrationRequest {
144
+ type: IntegrationType.mongo;
145
+ schema?: IntegrationDataSchema;
146
+ configuration: {
147
+ connectionOptions: MongoConnectionOptions;
148
+ };
149
+ }
150
+ export interface UpsertMySqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
151
+ type: IntegrationType.mysql;
152
+ schema?: IntegrationDataSchema;
153
+ configuration: {
154
+ connectionOptions: MySqlConnectionOptions;
155
+ };
156
+ }
157
+ export interface UpsertMssqlIntegrationRequest extends BaseUpsertDataIntegrationRequest {
158
+ type: IntegrationType.mssql;
159
+ schema?: IntegrationDataSchema;
160
+ configuration: {
161
+ connectionOptions: MssqlConnectionOptions;
162
+ };
163
+ }
164
+ export interface UpsertPostgresIntegrationRequest extends BaseUpsertDataIntegrationRequest {
165
+ type: IntegrationType.postgres;
166
+ schema?: IntegrationDataSchema;
167
+ configuration: {
168
+ connectionOptions: PostgresConnectionOptions;
169
+ };
170
+ }
171
+ export interface UpsertCockroachIntegrationRequest extends BaseUpsertDataIntegrationRequest {
172
+ type: IntegrationType.cockroach;
173
+ schema?: IntegrationDataSchema;
174
+ configuration: {
175
+ connectionOptions: PostgresConnectionOptions;
176
+ };
177
+ }
178
+ export interface UpsertSnowflakeIntegrationRequest extends BaseUpsertDataIntegrationRequest {
179
+ type: IntegrationType.snowflake;
180
+ schema?: IntegrationDataSchema;
181
+ configuration: {
182
+ connectionOptions: SnowflakeConnectionOptions;
183
+ };
184
+ }
185
+ export interface UpsertGraphQLIntegrationRequest extends BaseUpsertIntegrationRequest {
186
+ type: IntegrationType.graphql;
187
+ schema?: IntegrationGraphQLSchema;
188
+ configuration: {
189
+ connectionOptions: GraphQLConnectionOptions;
190
+ };
191
+ }
192
+ export interface UpsertApiIntegrationRequest extends BaseUpsertIntegrationRequest {
193
+ type: IntegrationType.api;
194
+ schema?: IntegrationApiSchema;
195
+ configuration?: {
196
+ discoveryOptions: OpenApiDiscoveryOptions;
197
+ };
198
+ }
199
+ export interface DeleteIntegrationRequest {
200
+ integrationId: IntegrationId;
201
+ }
202
+ export interface UpdateAllowedHostsRequest {
203
+ allowedHosts: string[];
204
+ }
205
+ export {};
@@ -1,3 +1,3 @@
1
- import { JSONSchemaType } from 'ajv';
2
- import { ExecuteBackendFunctionRequest } from './backend-function.types';
3
- export declare const ExecuteBackendFunctionRequestSchema: JSONSchemaType<ExecuteBackendFunctionRequest>;
1
+ import { JSONSchemaType } from 'ajv';
2
+ import { ExecuteBackendFunctionRequest } from './backend-function.types';
3
+ export declare const ExecuteBackendFunctionRequestSchema: JSONSchemaType<ExecuteBackendFunctionRequest>;
@@ -1,7 +1,7 @@
1
- import { ClientId, ClientRequestId } from './communication.types';
2
- export interface ExecuteBackendFunctionRequest {
3
- functionName: string;
4
- paramsArrayStr: string;
5
- clientRequestId: ClientRequestId;
6
- clientId: ClientId;
7
- }
1
+ import { ClientId, ClientRequestId } from './communication.types';
2
+ export interface ExecuteBackendFunctionRequest {
3
+ functionName: string;
4
+ paramsArrayStr: string;
5
+ clientRequestId: ClientRequestId;
6
+ clientId: ClientId;
7
+ }
@@ -1,66 +1,66 @@
1
- import { Auth, RunContext } from './context.types';
2
- import { ServiceFunctionName } from './bundle-data.types';
3
- import { SecretKey, SecretValue } from './secret.types';
4
- export interface RunPermissions {
5
- hosts: Array<string>;
6
- }
7
- export interface ErrorResponse extends GeneralResponse {
8
- ok: false;
9
- error: string;
10
- details?: string;
11
- }
12
- export interface GeneralResponse {
13
- ok: boolean;
14
- }
15
- export interface RunConfiguration {
16
- codeUrl: string;
17
- codeUrlId: string;
18
- isSecurityRules: boolean;
19
- permissions: RunPermissions;
20
- }
21
- export interface RunConfigurationRequest {
22
- configuration: RunConfiguration;
23
- context: RunContext;
24
- auth: Auth | undefined;
25
- functionToRun: string;
26
- params: Array<unknown>;
27
- secrets?: RunSecrets;
28
- executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
29
- }
30
- export type EvaluateRulesFunctionRequest = {
31
- functionName: ServiceFunctionName;
32
- params: Array<any>;
33
- };
34
- export interface LoadJsPayload {
35
- codeUrl: string;
36
- }
37
- export declare const executeFunctionSecureAnnotationType: Array<ExecuteFunctionAnnotationType>;
38
- export type ExecuteFunctionSecureAnnotationType = 'secureQuery' | 'secureMutation' | 'secureNamedQuery' | 'secureGraphQL' | 'secureApi';
39
- export type ExecuteFunctionAnnotationType = 'executable' | 'webhook' | 'scheduler' | 'trigger' | 'transformRead' | 'transformWrite' | 'metadata' | ExecuteFunctionSecureAnnotationType;
40
- export interface ExecuteFunctionPayload {
41
- functionName: string;
42
- params: Array<unknown>;
43
- context: RunContext;
44
- auth: Auth | undefined;
45
- secrets?: Record<SecretKey, SecretValue>;
46
- backendApiKey: string;
47
- codeDir: string;
48
- executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
49
- }
50
- export declare function transformParams(args: Array<any>, executeFunctionAnnotationType: ExecuteFunctionAnnotationType): unknown[];
51
- export declare function transformResponse(functionResponse: any, executeFunctionAnnotationType: ExecuteFunctionAnnotationType): any;
52
- export type WorkerActionType = 'loadJs' | 'executeFunction' | 'ping' | 'terminate';
53
- export interface ActionRequest {
54
- action: WorkerActionType;
55
- payload?: LoadJsPayload | ExecuteFunctionPayload;
56
- }
57
- export type LoadJsResponse = GeneralResponse;
58
- export type TerminateResponse = GeneralResponse;
59
- export interface ExecuteFunctionResponse extends GeneralResponse {
60
- ok: true;
61
- functionResponse: unknown;
62
- }
63
- export interface RunSecrets {
64
- custom: Record<SecretKey, SecretValue>;
65
- backendApiKey: string;
66
- }
1
+ import { Auth, RunContext } from './context.types';
2
+ import { ServiceFunctionName } from './bundle-data.types';
3
+ import { SecretKey, SecretValue } from './secret.types';
4
+ export interface RunPermissions {
5
+ hosts: Array<string>;
6
+ }
7
+ export interface ErrorResponse extends GeneralResponse {
8
+ ok: false;
9
+ error: string;
10
+ details?: string;
11
+ }
12
+ export interface GeneralResponse {
13
+ ok: boolean;
14
+ }
15
+ export interface RunConfiguration {
16
+ codeUrl: string;
17
+ codeUrlId: string;
18
+ isSecurityRules: boolean;
19
+ permissions: RunPermissions;
20
+ }
21
+ export interface RunConfigurationRequest {
22
+ configuration: RunConfiguration;
23
+ context: RunContext;
24
+ auth: Auth | undefined;
25
+ functionToRun: string;
26
+ params: Array<unknown>;
27
+ secrets?: RunSecrets;
28
+ executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
29
+ }
30
+ export type EvaluateRulesFunctionRequest = {
31
+ functionName: ServiceFunctionName;
32
+ params: Array<any>;
33
+ };
34
+ export interface LoadJsPayload {
35
+ codeUrl: string;
36
+ }
37
+ export declare const executeFunctionSecureAnnotationType: Array<ExecuteFunctionAnnotationType>;
38
+ export type ExecuteFunctionSecureAnnotationType = 'secureQuery' | 'secureMutation' | 'secureNamedQuery' | 'secureGraphQL' | 'secureApi';
39
+ export type ExecuteFunctionAnnotationType = 'executable' | 'webhook' | 'scheduler' | 'trigger' | 'transformRead' | 'transformWrite' | 'metadata' | ExecuteFunctionSecureAnnotationType;
40
+ export interface ExecuteFunctionPayload {
41
+ functionName: string;
42
+ params: Array<unknown>;
43
+ context: RunContext;
44
+ auth: Auth | undefined;
45
+ secrets?: Record<SecretKey, SecretValue>;
46
+ backendApiKey: string;
47
+ codeDir: string;
48
+ executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
49
+ }
50
+ export declare function transformParams(args: Array<any>, executeFunctionAnnotationType: ExecuteFunctionAnnotationType): unknown[];
51
+ export declare function transformResponse(functionResponse: any, executeFunctionAnnotationType: ExecuteFunctionAnnotationType): any;
52
+ export type WorkerActionType = 'loadJs' | 'executeFunction' | 'ping' | 'terminate';
53
+ export interface ActionRequest {
54
+ action: WorkerActionType;
55
+ payload?: LoadJsPayload | ExecuteFunctionPayload;
56
+ }
57
+ export type LoadJsResponse = GeneralResponse;
58
+ export type TerminateResponse = GeneralResponse;
59
+ export interface ExecuteFunctionResponse extends GeneralResponse {
60
+ ok: true;
61
+ functionResponse: unknown;
62
+ }
63
+ export interface RunSecrets {
64
+ custom: Record<SecretKey, SecretValue>;
65
+ backendApiKey: string;
66
+ }