@squidcloud/client 1.0.60 → 1.0.62

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