@squidcloud/client 1.0.142 → 1.0.144-beta

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 (116) hide show
  1. package/dist/cjs/index.js +15649 -15749
  2. package/dist/common/src/ai-assistant.types.d.ts +25 -23
  3. package/dist/common/src/ai-chatbot.context.d.ts +12 -0
  4. package/dist/common/src/{ai-assistant.schemas.d.ts → ai-chatbot.schemas.d.ts} +1 -1
  5. package/dist/common/src/ai-chatbot.types.d.ts +25 -0
  6. package/dist/common/src/api-call.context.d.ts +13 -13
  7. package/dist/common/src/api.types.d.ts +4 -4
  8. package/dist/common/src/application.schemas.d.ts +66 -66
  9. package/dist/common/src/application.types.d.ts +143 -143
  10. package/dist/common/src/backend-function.schemas.d.ts +1 -1
  11. package/dist/common/src/backend-function.types.d.ts +1 -1
  12. package/dist/common/src/backend-run.types.d.ts +2 -2
  13. package/dist/common/src/bundle-api.types.d.ts +43 -42
  14. package/dist/common/src/bundle-data.types.d.ts +5 -4
  15. package/dist/common/src/communication.types.d.ts +8 -8
  16. package/dist/common/src/context.types.d.ts +40 -40
  17. package/dist/common/src/distributed-lock.context.d.ts +4 -4
  18. package/dist/common/src/document.types.d.ts +22 -22
  19. package/dist/common/src/graphql.context.d.ts +7 -7
  20. package/dist/common/src/graphql.types.d.ts +9 -9
  21. package/dist/common/src/heartbeat.types.d.ts +1 -1
  22. package/dist/common/src/http-status.enum.d.ts +50 -50
  23. package/dist/common/src/index.d.ts +57 -56
  24. package/dist/common/src/integrations/ai_chatbot.types.d.ts +31 -0
  25. package/dist/common/src/integrations/api.types.d.ts +80 -80
  26. package/dist/common/src/integrations/auth.types.d.ts +47 -47
  27. package/dist/common/src/integrations/database.types.d.ts +274 -274
  28. package/dist/common/src/integrations/index.d.ts +134 -134
  29. package/dist/common/src/integrations/observability.types.d.ts +23 -23
  30. package/dist/common/src/logger.types.d.ts +21 -21
  31. package/dist/common/src/metrics.types.d.ts +1 -1
  32. package/dist/common/src/mutation.context.d.ts +14 -14
  33. package/dist/common/src/mutation.schemas.d.ts +1 -1
  34. package/dist/common/src/mutation.types.d.ts +53 -53
  35. package/dist/common/src/named-query.context.d.ts +4 -4
  36. package/dist/common/src/named-query.schemas.d.ts +1 -1
  37. package/dist/common/src/named-query.types.d.ts +1 -1
  38. package/dist/common/src/native-query.context.d.ts +7 -7
  39. package/dist/common/src/native-query.types.d.ts +16 -16
  40. package/dist/common/src/query/base-query-builder.d.ts +147 -147
  41. package/dist/common/src/query/index.d.ts +4 -4
  42. package/dist/common/src/query/pagination.d.ts +62 -62
  43. package/dist/common/src/query/query-context.d.ts +137 -137
  44. package/dist/common/src/query/serialized-query.types.d.ts +24 -24
  45. package/dist/common/src/query.types.d.ts +64 -64
  46. package/dist/common/src/regions.d.ts +1 -1
  47. package/dist/common/src/schema/schema.types.d.ts +54 -54
  48. package/dist/common/src/secret.schemas.d.ts +1 -1
  49. package/dist/common/src/secret.types.d.ts +22 -22
  50. package/dist/common/src/security.types.d.ts +1 -1
  51. package/dist/common/src/socket.schemas.d.ts +1 -1
  52. package/dist/common/src/socket.types.d.ts +5 -5
  53. package/dist/common/src/time-units.d.ts +1 -1
  54. package/dist/common/src/trigger.types.d.ts +1 -1
  55. package/dist/common/src/types.d.ts +14 -14
  56. package/dist/common/src/utils/array.d.ts +1 -1
  57. package/dist/common/src/utils/assert.d.ts +1 -1
  58. package/dist/common/src/utils/error.d.ts +4 -4
  59. package/dist/common/src/utils/global.utils.d.ts +1 -1
  60. package/dist/common/src/utils/http.d.ts +2 -2
  61. package/dist/common/src/utils/id.d.ts +2 -2
  62. package/dist/common/src/utils/lock.manager.d.ts +14 -14
  63. package/dist/common/src/utils/object.d.ts +5 -5
  64. package/dist/common/src/utils/serialization.d.ts +6 -6
  65. package/dist/common/src/utils/transforms.d.ts +18 -18
  66. package/dist/common/src/utils/url.d.ts +1 -1
  67. package/dist/common/src/utils/validation.d.ts +25 -25
  68. package/dist/common/src/webhook-response.d.ts +1 -1
  69. package/dist/common/src/websocket.impl.d.ts +21 -21
  70. package/dist/node_modules/json-schema-typed/draft-2020-12.d.ts +1239 -1239
  71. package/dist/typescript-client/src/ai-assistant-client.d.ts +11 -174
  72. package/dist/typescript-client/src/ai-chatbot-client.d.ts +174 -0
  73. package/dist/typescript-client/src/{ai-client.factory.d.ts → ai-chatbot-client.factory.d.ts} +11 -11
  74. package/dist/typescript-client/src/ai.types.d.ts +47 -10
  75. package/dist/typescript-client/src/api.manager.d.ts +11 -11
  76. package/dist/typescript-client/src/auth.manager.d.ts +33 -33
  77. package/dist/typescript-client/src/backend-function.manager.d.ts +9 -9
  78. package/dist/typescript-client/src/client-id.service.d.ts +27 -27
  79. package/dist/typescript-client/src/collection-reference.d.ts +80 -80
  80. package/dist/typescript-client/src/collection-reference.factory.d.ts +13 -13
  81. package/dist/typescript-client/src/connection-details.d.ts +23 -23
  82. package/dist/typescript-client/src/data.manager.d.ts +173 -173
  83. package/dist/typescript-client/src/destruct.manager.d.ts +12 -12
  84. package/dist/typescript-client/src/distributed-lock.manager.d.ts +16 -16
  85. package/dist/typescript-client/src/document-identity.service.d.ts +12 -12
  86. package/dist/typescript-client/src/document-reference.d.ts +140 -140
  87. package/dist/typescript-client/src/document-reference.factory.d.ts +13 -13
  88. package/dist/typescript-client/src/document-store.d.ts +14 -14
  89. package/dist/typescript-client/src/graphql-client.d.ts +14 -14
  90. package/dist/typescript-client/src/graphql-client.factory.d.ts +11 -11
  91. package/dist/typescript-client/src/index.d.ts +9 -9
  92. package/dist/typescript-client/src/mutation/mutation-sender.d.ts +10 -10
  93. package/dist/typescript-client/src/named-query.manager.d.ts +11 -11
  94. package/dist/typescript-client/src/native-query-manager.d.ts +7 -7
  95. package/dist/typescript-client/src/query/deserializer.d.ts +3 -3
  96. package/dist/typescript-client/src/query/join-query-builder.factory.d.ts +161 -161
  97. package/dist/typescript-client/src/query/local-query-manager.d.ts +9 -9
  98. package/dist/typescript-client/src/query/query-builder.factory.d.ts +77 -77
  99. package/dist/typescript-client/src/query/query-sender.d.ts +33 -33
  100. package/dist/typescript-client/src/query/query-subscription.manager.d.ts +130 -130
  101. package/dist/typescript-client/src/query/query.types.d.ts +49 -49
  102. package/dist/typescript-client/src/rate-limiter.d.ts +32 -32
  103. package/dist/typescript-client/src/rpc.manager.d.ts +29 -29
  104. package/dist/typescript-client/src/secret.client.d.ts +22 -22
  105. package/dist/typescript-client/src/socket.manager.d.ts +43 -43
  106. package/dist/typescript-client/src/squid.d.ts +283 -319
  107. package/dist/typescript-client/src/state/action.applier.d.ts +7 -7
  108. package/dist/typescript-client/src/state/actions.d.ts +29 -29
  109. package/dist/typescript-client/src/state/path_trie.d.ts +27 -27
  110. package/dist/typescript-client/src/state/state.service.d.ts +22 -22
  111. package/dist/typescript-client/src/state/state.service.spec.d.ts +1 -1
  112. package/dist/typescript-client/src/testing/setup-tests.d.ts +1 -1
  113. package/dist/typescript-client/src/types.d.ts +2 -2
  114. package/package.json +2 -2
  115. package/dist/common/src/ai-assistant.context.d.ts +0 -12
  116. package/dist/common/src/integrations/ai_assistant.types.d.ts +0 -31
@@ -1,23 +1,25 @@
1
- /** The supported AI model names. */
2
- export type AiModelName = 'gpt-3.5-turbo' | 'gpt-4' | 'claude-2' | 'gpt-4-1106-preview';
3
- /** The possible sources for the LLM provider API key. */
4
- export type ApiKeySource = 'user' | 'system';
5
- export type AiAssistantContextType = 'text' | 'url' | 'file';
6
- export interface AiAssistantTextContext {
7
- type: 'text';
8
- data: string;
9
- }
10
- export interface AiAssistantUrlContext {
11
- type: 'url';
12
- data: string;
13
- }
14
- export interface AiAssistantFileContext {
15
- type: 'file';
16
- data: string;
17
- }
18
- export type AiAssistantContext = AiAssistantTextContext | AiAssistantUrlContext | AiAssistantFileContext;
19
- export interface AiAssistantChatOptions {
20
- maxTokens?: number;
21
- chatId?: string;
22
- disableHistory?: boolean;
23
- }
1
+ import { FunctionName } from './bundle-data.types';
2
+ export type AssistantToolType = 'code_interpreter' | 'retrieval';
3
+ export interface CreateAssistantRequest {
4
+ name: string;
5
+ instructions: string;
6
+ functions: Array<FunctionName>;
7
+ toolTypes?: Array<AssistantToolType>;
8
+ }
9
+ export interface DeleteAssistantRequest {
10
+ assistantId: string;
11
+ }
12
+ export interface CreateAssistantThreadRequest {
13
+ assistantId: string;
14
+ }
15
+ export interface DeleteThreadRequest {
16
+ threadId: string;
17
+ }
18
+ export interface CreateAssistantThreadRequest {
19
+ }
20
+ export interface CreateAssistantResponse {
21
+ assistantId: string;
22
+ }
23
+ export interface CreateAssistantThreadResponse {
24
+ threadId: string;
25
+ }
@@ -0,0 +1,12 @@
1
+ import { AiChatbotMutationType, AiChatbotResourceType } from './ai-chatbot.types';
2
+ export declare class AiChatbotChatContext {
3
+ readonly prompt: string;
4
+ readonly profileId: string;
5
+ }
6
+ /** A context provided to the security rules of an AI Chatbot mutation. */
7
+ export declare class AiChatbotMutationContext {
8
+ readonly type: AiChatbotMutationType;
9
+ readonly resource: AiChatbotResourceType;
10
+ readonly profileId: string;
11
+ readonly payload: any;
12
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -0,0 +1,25 @@
1
+ /** The supported AI model names. */
2
+ export type AiModelName = 'gpt-3.5-turbo' | 'gpt-4' | 'claude-2' | 'gpt-4-1106-preview';
3
+ /** The possible sources for the LLM provider API key. */
4
+ export type ApiKeySource = 'user' | 'system';
5
+ export type AiChatbotContextType = 'text' | 'url' | 'file';
6
+ interface AiChatbotContextBase {
7
+ type: AiChatbotContextType;
8
+ data: string;
9
+ }
10
+ export interface AiChatbotTextContext extends AiChatbotContextBase {
11
+ type: 'text';
12
+ }
13
+ export interface AiChatbotUrlContext extends AiChatbotContextBase {
14
+ type: 'url';
15
+ }
16
+ export interface AiChatbotFileContext extends AiChatbotContextBase {
17
+ type: 'file';
18
+ }
19
+ export type AiChatbotContext = AiChatbotTextContext | AiChatbotUrlContext | AiChatbotFileContext;
20
+ export interface AiChatbotChatOptions {
21
+ maxTokens?: number;
22
+ chatId?: string;
23
+ disableHistory?: boolean;
24
+ }
25
+ export {};
@@ -1,13 +1,13 @@
1
- import { ApiHeaders } from './api.types';
2
- import { ApiEndpointId, HttpMethod } from './integrations';
3
- /** The context of an API call. */
4
- export declare class ApiCallContext {
5
- readonly endpointId: ApiEndpointId;
6
- readonly url: string;
7
- readonly method: HttpMethod;
8
- readonly headers: ApiHeaders;
9
- readonly body: Record<string, any>;
10
- readonly queryParams: Record<string, string | number | boolean>;
11
- readonly pathParams: Record<string, string>;
12
- readonly serverUrlOverride: string | undefined;
13
- }
1
+ import { ApiHeaders } from './api.types';
2
+ import { ApiEndpointId, HttpMethod } from './integrations';
3
+ /** The context of an API call. */
4
+ export declare class ApiCallContext {
5
+ readonly endpointId: ApiEndpointId;
6
+ readonly url: string;
7
+ readonly method: HttpMethod;
8
+ readonly headers: ApiHeaders;
9
+ readonly body: Record<string, any>;
10
+ readonly queryParams: Record<string, string | number | boolean>;
11
+ readonly pathParams: Record<string, string>;
12
+ readonly serverUrlOverride: string | undefined;
13
+ }
@@ -1,4 +1,4 @@
1
- /** The headers of an API call. */
2
- export type ApiHeaders = Record<string, string | number | boolean>;
3
- /** The query parameters of an API call. */
4
- export type ApiQueryParams = Record<string, string | number | boolean>;
1
+ /** The headers of an API call. */
2
+ export type ApiHeaders = Record<string, string | number | boolean>;
3
+ /** The query parameters of an API call. */
4
+ export type ApiQueryParams = Record<string, string | number | boolean>;
@@ -1,66 +1,66 @@
1
- import { IntegrationSchemaType } from './integrations';
2
- export declare const UpsertIntegrationSchemaRequestSchema: {
3
- type: string;
4
- required: string[];
5
- properties: {
6
- id: {
7
- type: string;
8
- nullable: boolean;
9
- };
10
- type: {
11
- type: string;
12
- nullable: boolean;
13
- };
14
- schema: {
15
- oneOf: ({
16
- type: string;
17
- required: string[];
18
- properties: {
19
- type: {
20
- const: IntegrationSchemaType;
21
- };
22
- collections: {
23
- type: string;
24
- nullable: boolean;
25
- };
26
- baseUrl?: undefined;
27
- endpoints?: undefined;
28
- introspection?: undefined;
29
- };
30
- } | {
31
- type: string;
32
- required: string[];
33
- properties: {
34
- type: {
35
- const: IntegrationSchemaType;
36
- };
37
- baseUrl: {
38
- type: string;
39
- nullable: boolean;
40
- };
41
- endpoints: {
42
- type: string;
43
- nullable: boolean;
44
- };
45
- collections?: undefined;
46
- introspection?: undefined;
47
- };
48
- } | {
49
- type: string;
50
- required: string[];
51
- properties: {
52
- type: {
53
- const: IntegrationSchemaType;
54
- };
55
- introspection: {
56
- type: string;
57
- nullable: boolean;
58
- };
59
- collections?: undefined;
60
- baseUrl?: undefined;
61
- endpoints?: undefined;
62
- };
63
- })[];
64
- };
65
- };
66
- };
1
+ import { IntegrationSchemaType } from './integrations';
2
+ export declare const UpsertIntegrationSchemaRequestSchema: {
3
+ type: string;
4
+ required: string[];
5
+ properties: {
6
+ id: {
7
+ type: string;
8
+ nullable: boolean;
9
+ };
10
+ type: {
11
+ type: string;
12
+ nullable: boolean;
13
+ };
14
+ schema: {
15
+ oneOf: ({
16
+ type: string;
17
+ required: string[];
18
+ properties: {
19
+ type: {
20
+ const: IntegrationSchemaType;
21
+ };
22
+ collections: {
23
+ type: string;
24
+ nullable: boolean;
25
+ };
26
+ baseUrl?: undefined;
27
+ endpoints?: undefined;
28
+ introspection?: undefined;
29
+ };
30
+ } | {
31
+ type: string;
32
+ required: string[];
33
+ properties: {
34
+ type: {
35
+ const: IntegrationSchemaType;
36
+ };
37
+ baseUrl: {
38
+ type: string;
39
+ nullable: boolean;
40
+ };
41
+ endpoints: {
42
+ type: string;
43
+ nullable: boolean;
44
+ };
45
+ collections?: undefined;
46
+ introspection?: undefined;
47
+ };
48
+ } | {
49
+ type: string;
50
+ required: string[];
51
+ properties: {
52
+ type: {
53
+ const: IntegrationSchemaType;
54
+ };
55
+ introspection: {
56
+ type: string;
57
+ nullable: boolean;
58
+ };
59
+ collections?: undefined;
60
+ baseUrl?: undefined;
61
+ endpoints?: undefined;
62
+ };
63
+ })[];
64
+ };
65
+ };
66
+ };
@@ -1,143 +1,143 @@
1
- import { AppId, EnvironmentId, IntegrationId } from './communication.types';
2
- import { AuthIntegrationType, DatabaseIntegrationType, IntegrationConfig, IntegrationConfigTypes, IntegrationSchema, IntegrationSchemaKeys, IntegrationSchemaTypes, IntegrationType, IntegrationTypeWithConfig } from './integrations';
3
- /** A type alias for a string that represents a webhook. */
4
- export type WebhookId = string;
5
- /** A type alias for a string that represents a named query. */
6
- export type QueryName = string;
7
- /** A type alias for a string that represents a trigger id. */
8
- export type TriggerId = string;
9
- /** A type alias for a string that represents a scheduler id. */
10
- export type SchedulerId = string;
11
- /** The supported cron expression string. */
12
- export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
13
- /** A set of predefined cron expressions. */
14
- export declare enum CronExpression {
15
- EVERY_SECOND = "* * * * * *",
16
- EVERY_5_SECONDS = "*/5 * * * * *",
17
- EVERY_10_SECONDS = "*/10 * * * * *",
18
- EVERY_30_SECONDS = "*/30 * * * * *",
19
- EVERY_MINUTE = "*/1 * * * *",
20
- EVERY_5_MINUTES = "0 */5 * * * *",
21
- EVERY_10_MINUTES = "0 */10 * * * *",
22
- EVERY_30_MINUTES = "0 */30 * * * *",
23
- EVERY_HOUR = "0 0-23/1 * * *",
24
- EVERY_2_HOURS = "0 0-23/2 * * *",
25
- EVERY_3_HOURS = "0 0-23/3 * * *",
26
- EVERY_4_HOURS = "0 0-23/4 * * *",
27
- EVERY_5_HOURS = "0 0-23/5 * * *",
28
- EVERY_6_HOURS = "0 0-23/6 * * *",
29
- EVERY_7_HOURS = "0 0-23/7 * * *",
30
- EVERY_8_HOURS = "0 0-23/8 * * *",
31
- EVERY_9_HOURS = "0 0-23/9 * * *",
32
- EVERY_10_HOURS = "0 0-23/10 * * *",
33
- EVERY_11_HOURS = "0 0-23/11 * * *",
34
- EVERY_12_HOURS = "0 0-23/12 * * *",
35
- EVERY_DAY_AT_1AM = "0 01 * * *",
36
- EVERY_DAY_AT_2AM = "0 02 * * *",
37
- EVERY_DAY_AT_3AM = "0 03 * * *",
38
- EVERY_DAY_AT_4AM = "0 04 * * *",
39
- EVERY_DAY_AT_5AM = "0 05 * * *",
40
- EVERY_DAY_AT_6AM = "0 06 * * *",
41
- EVERY_DAY_AT_7AM = "0 07 * * *",
42
- EVERY_DAY_AT_8AM = "0 08 * * *",
43
- EVERY_DAY_AT_9AM = "0 09 * * *",
44
- EVERY_DAY_AT_10AM = "0 10 * * *",
45
- EVERY_DAY_AT_11AM = "0 11 * * *",
46
- EVERY_DAY_AT_NOON = "0 12 * * *",
47
- EVERY_DAY_AT_1PM = "0 13 * * *",
48
- EVERY_DAY_AT_2PM = "0 14 * * *",
49
- EVERY_DAY_AT_3PM = "0 15 * * *",
50
- EVERY_DAY_AT_4PM = "0 16 * * *",
51
- EVERY_DAY_AT_5PM = "0 17 * * *",
52
- EVERY_DAY_AT_6PM = "0 18 * * *",
53
- EVERY_DAY_AT_7PM = "0 19 * * *",
54
- EVERY_DAY_AT_8PM = "0 20 * * *",
55
- EVERY_DAY_AT_9PM = "0 21 * * *",
56
- EVERY_DAY_AT_10PM = "0 22 * * *",
57
- EVERY_DAY_AT_11PM = "0 23 * * *",
58
- EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
59
- EVERY_WEEK = "0 0 * * 7",
60
- EVERY_WEEKDAY = "0 0 * * 1-5",
61
- EVERY_WEEKEND = "0 0 * * 6,7",
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 1 *",
70
- EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
71
- EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
72
- EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
73
- MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
74
- MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
75
- MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
76
- MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
77
- MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
78
- MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
79
- MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
80
- MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
81
- MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
82
- MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
83
- MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
84
- MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
85
- MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
86
- MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
87
- MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
88
- MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
89
- MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
90
- MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
91
- MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
92
- MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
93
- MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
94
- MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
95
- MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
96
- MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
97
- MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
98
- }
99
- export interface DeleteIntegrationRequest {
100
- integrationId: IntegrationId;
101
- }
102
- export interface UpdateAllowedHostsRequest {
103
- allowedHosts: string[];
104
- }
105
- export interface CreateEnvironmentRequest {
106
- sourceAppId: AppId;
107
- environmentId: EnvironmentId;
108
- }
109
- interface BaseUpsertIntegrationRequest<T extends IntegrationTypeWithConfig, C extends IntegrationConfig> {
110
- id: IntegrationId;
111
- type: T;
112
- config: Partial<C>;
113
- }
114
- type ConfigurationTypes = {
115
- [K in IntegrationTypeWithConfig]: IntegrationConfigTypes[K];
116
- };
117
- type UpsertIntegrationRequests = {
118
- [K in IntegrationTypeWithConfig]: BaseUpsertIntegrationRequest<K, ConfigurationTypes[K]>;
119
- };
120
- export type UpsertDataIntegrationRequest = UpsertIntegrationRequests[DatabaseIntegrationType];
121
- export type UpsertGraphQLIntegrationRequest = UpsertIntegrationRequests[IntegrationType.graphql];
122
- export type UpsertApiIntegrationRequest = UpsertIntegrationRequests[IntegrationType.api];
123
- export type UpsertAiAssistantIntegrationRequest = UpsertIntegrationRequests[IntegrationType.ai_assistant];
124
- export type UpsertAuthIntegrationRequest = UpsertIntegrationRequests[AuthIntegrationType];
125
- interface BaseUpsertIntegrationSchemaRequest<T extends IntegrationType, S extends IntegrationSchema> {
126
- id: IntegrationId;
127
- type: T;
128
- schema: S;
129
- }
130
- type SchemaTypes = {
131
- [K in IntegrationSchemaKeys]: IntegrationSchemaTypes[K];
132
- };
133
- type UpsertIntegrationSchemaRequests = {
134
- [K in IntegrationSchemaKeys]: BaseUpsertIntegrationSchemaRequest<K, SchemaTypes[K]>;
135
- };
136
- export type UpsertIntegrationSchemaRequest = UpsertDataIntegrationSchemaRequest | UpsertGraphQLIntegrationSchemaRequest | UpsertApiIntegrationSchemaRequest;
137
- export type UpsertDataIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[DatabaseIntegrationType];
138
- export type UpsertGraphQLIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.graphql];
139
- export type UpsertApiIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.api];
140
- export interface GetSchemaRequest {
141
- integrationId: IntegrationId;
142
- }
143
- export {};
1
+ import { AppId, EnvironmentId, IntegrationId } from './communication.types';
2
+ import { AuthIntegrationType, DatabaseIntegrationType, IntegrationConfig, IntegrationConfigTypes, IntegrationSchema, IntegrationSchemaKeys, IntegrationSchemaTypes, IntegrationType, IntegrationTypeWithConfig } from './integrations';
3
+ /** A type alias for a string that represents a webhook. */
4
+ export type WebhookId = string;
5
+ /** A type alias for a string that represents a named query. */
6
+ export type QueryName = string;
7
+ /** A type alias for a string that represents a trigger id. */
8
+ export type TriggerId = string;
9
+ /** A type alias for a string that represents a scheduler id. */
10
+ export type SchedulerId = string;
11
+ /** The supported cron expression string. */
12
+ export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
13
+ /** A set of predefined cron expressions. */
14
+ export declare enum CronExpression {
15
+ EVERY_SECOND = "* * * * * *",
16
+ EVERY_5_SECONDS = "*/5 * * * * *",
17
+ EVERY_10_SECONDS = "*/10 * * * * *",
18
+ EVERY_30_SECONDS = "*/30 * * * * *",
19
+ EVERY_MINUTE = "*/1 * * * *",
20
+ EVERY_5_MINUTES = "0 */5 * * * *",
21
+ EVERY_10_MINUTES = "0 */10 * * * *",
22
+ EVERY_30_MINUTES = "0 */30 * * * *",
23
+ EVERY_HOUR = "0 0-23/1 * * *",
24
+ EVERY_2_HOURS = "0 0-23/2 * * *",
25
+ EVERY_3_HOURS = "0 0-23/3 * * *",
26
+ EVERY_4_HOURS = "0 0-23/4 * * *",
27
+ EVERY_5_HOURS = "0 0-23/5 * * *",
28
+ EVERY_6_HOURS = "0 0-23/6 * * *",
29
+ EVERY_7_HOURS = "0 0-23/7 * * *",
30
+ EVERY_8_HOURS = "0 0-23/8 * * *",
31
+ EVERY_9_HOURS = "0 0-23/9 * * *",
32
+ EVERY_10_HOURS = "0 0-23/10 * * *",
33
+ EVERY_11_HOURS = "0 0-23/11 * * *",
34
+ EVERY_12_HOURS = "0 0-23/12 * * *",
35
+ EVERY_DAY_AT_1AM = "0 01 * * *",
36
+ EVERY_DAY_AT_2AM = "0 02 * * *",
37
+ EVERY_DAY_AT_3AM = "0 03 * * *",
38
+ EVERY_DAY_AT_4AM = "0 04 * * *",
39
+ EVERY_DAY_AT_5AM = "0 05 * * *",
40
+ EVERY_DAY_AT_6AM = "0 06 * * *",
41
+ EVERY_DAY_AT_7AM = "0 07 * * *",
42
+ EVERY_DAY_AT_8AM = "0 08 * * *",
43
+ EVERY_DAY_AT_9AM = "0 09 * * *",
44
+ EVERY_DAY_AT_10AM = "0 10 * * *",
45
+ EVERY_DAY_AT_11AM = "0 11 * * *",
46
+ EVERY_DAY_AT_NOON = "0 12 * * *",
47
+ EVERY_DAY_AT_1PM = "0 13 * * *",
48
+ EVERY_DAY_AT_2PM = "0 14 * * *",
49
+ EVERY_DAY_AT_3PM = "0 15 * * *",
50
+ EVERY_DAY_AT_4PM = "0 16 * * *",
51
+ EVERY_DAY_AT_5PM = "0 17 * * *",
52
+ EVERY_DAY_AT_6PM = "0 18 * * *",
53
+ EVERY_DAY_AT_7PM = "0 19 * * *",
54
+ EVERY_DAY_AT_8PM = "0 20 * * *",
55
+ EVERY_DAY_AT_9PM = "0 21 * * *",
56
+ EVERY_DAY_AT_10PM = "0 22 * * *",
57
+ EVERY_DAY_AT_11PM = "0 23 * * *",
58
+ EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
59
+ EVERY_WEEK = "0 0 * * 7",
60
+ EVERY_WEEKDAY = "0 0 * * 1-5",
61
+ EVERY_WEEKEND = "0 0 * * 6,7",
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 1 *",
70
+ EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
71
+ EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
72
+ EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
73
+ MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
74
+ MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
75
+ MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
76
+ MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
77
+ MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
78
+ MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
79
+ MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
80
+ MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
81
+ MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
82
+ MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
83
+ MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
84
+ MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
85
+ MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
86
+ MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
87
+ MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
88
+ MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
89
+ MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
90
+ MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
91
+ MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
92
+ MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
93
+ MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
94
+ MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
95
+ MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
96
+ MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
97
+ MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
98
+ }
99
+ export interface DeleteIntegrationRequest {
100
+ integrationId: IntegrationId;
101
+ }
102
+ export interface UpdateAllowedHostsRequest {
103
+ allowedHosts: string[];
104
+ }
105
+ export interface CreateEnvironmentRequest {
106
+ sourceAppId: AppId;
107
+ environmentId: EnvironmentId;
108
+ }
109
+ interface BaseUpsertIntegrationRequest<T extends IntegrationTypeWithConfig, C extends IntegrationConfig> {
110
+ id: IntegrationId;
111
+ type: T;
112
+ config: Partial<C>;
113
+ }
114
+ type ConfigurationTypes = {
115
+ [K in IntegrationTypeWithConfig]: IntegrationConfigTypes[K];
116
+ };
117
+ type UpsertIntegrationRequests = {
118
+ [K in IntegrationTypeWithConfig]: BaseUpsertIntegrationRequest<K, ConfigurationTypes[K]>;
119
+ };
120
+ export type UpsertDataIntegrationRequest = UpsertIntegrationRequests[DatabaseIntegrationType];
121
+ export type UpsertGraphQLIntegrationRequest = UpsertIntegrationRequests[IntegrationType.graphql];
122
+ export type UpsertApiIntegrationRequest = UpsertIntegrationRequests[IntegrationType.api];
123
+ export type UpsertAiChatbotIntegrationRequest = UpsertIntegrationRequests[IntegrationType.ai_chatbot];
124
+ export type UpsertAuthIntegrationRequest = UpsertIntegrationRequests[AuthIntegrationType];
125
+ interface BaseUpsertIntegrationSchemaRequest<T extends IntegrationType, S extends IntegrationSchema> {
126
+ id: IntegrationId;
127
+ type: T;
128
+ schema: S;
129
+ }
130
+ type SchemaTypes = {
131
+ [K in IntegrationSchemaKeys]: IntegrationSchemaTypes[K];
132
+ };
133
+ type UpsertIntegrationSchemaRequests = {
134
+ [K in IntegrationSchemaKeys]: BaseUpsertIntegrationSchemaRequest<K, SchemaTypes[K]>;
135
+ };
136
+ export type UpsertIntegrationSchemaRequest = UpsertDataIntegrationSchemaRequest | UpsertGraphQLIntegrationSchemaRequest | UpsertApiIntegrationSchemaRequest;
137
+ export type UpsertDataIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[DatabaseIntegrationType];
138
+ export type UpsertGraphQLIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.graphql];
139
+ export type UpsertApiIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.api];
140
+ export interface GetSchemaRequest {
141
+ integrationId: IntegrationId;
142
+ }
143
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,2 +1,2 @@
1
- import { ApplicationSecrets } from './secret.types';
2
- export declare function convertToRunSecrets(appSecrets: ApplicationSecrets): RunSecrets;
1
+ import { ApplicationSecrets } from './secret.types';
2
+ export declare function convertToRunSecrets(appSecrets: ApplicationSecrets): RunSecrets;