@squidcloud/local-backend 1.0.159 → 1.0.161

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 (169) hide show
  1. package/dist/internal-common/src/code-executor.types.d.ts +15 -0
  2. package/dist/internal-common/src/code-executor.types.js +3 -0
  3. package/dist/internal-common/src/code-executor.types.js.map +1 -0
  4. package/dist/internal-common/src/local-dev.types.d.ts +54 -0
  5. package/dist/internal-common/src/local-dev.types.js +11 -0
  6. package/dist/internal-common/src/local-dev.types.js.map +1 -0
  7. package/dist/internal-common/src/public-types/ai-chatbot.public-types.d.ts +27 -0
  8. package/dist/internal-common/src/public-types/ai-chatbot.public-types.js +11 -0
  9. package/dist/internal-common/src/public-types/ai-chatbot.public-types.js.map +1 -0
  10. package/dist/internal-common/src/public-types/application.public-types.d.ts +201 -0
  11. package/dist/internal-common/src/public-types/application.public-types.js +90 -0
  12. package/dist/internal-common/src/public-types/application.public-types.js.map +1 -0
  13. package/dist/internal-common/src/public-types/bundle-api.public-types.d.ts +55 -0
  14. package/dist/internal-common/src/public-types/bundle-api.public-types.js +3 -0
  15. package/dist/internal-common/src/public-types/bundle-api.public-types.js.map +1 -0
  16. package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +5 -0
  17. package/dist/internal-common/src/public-types/bundle-data.public-types.js +3 -0
  18. package/dist/internal-common/src/public-types/bundle-data.public-types.js.map +1 -0
  19. package/dist/internal-common/src/public-types/communication.public-types.d.ts +9 -0
  20. package/dist/internal-common/src/public-types/communication.public-types.js +6 -0
  21. package/dist/internal-common/src/public-types/communication.public-types.js.map +1 -0
  22. package/dist/internal-common/src/public-types/context.public-types.d.ts +24 -0
  23. package/dist/internal-common/src/public-types/context.public-types.js +3 -0
  24. package/dist/internal-common/src/public-types/context.public-types.js.map +1 -0
  25. package/dist/internal-common/src/public-types/document.public-types.d.ts +25 -0
  26. package/dist/internal-common/src/public-types/document.public-types.js +3 -0
  27. package/dist/internal-common/src/public-types/document.public-types.js.map +1 -0
  28. package/dist/internal-common/src/public-types/graphql.public-types.d.ts +9 -0
  29. package/dist/internal-common/src/public-types/graphql.public-types.js +3 -0
  30. package/dist/internal-common/src/public-types/graphql.public-types.js.map +1 -0
  31. package/dist/internal-common/src/public-types/integration.public-types.d.ts +62 -0
  32. package/dist/internal-common/src/public-types/integration.public-types.js +69 -0
  33. package/dist/internal-common/src/public-types/integration.public-types.js.map +1 -0
  34. package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.d.ts +32 -0
  35. package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.js +3 -0
  36. package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.js.map +1 -0
  37. package/dist/internal-common/src/public-types/integrations/api.types.d.ts +81 -0
  38. package/dist/internal-common/src/public-types/integrations/api.types.js +3 -0
  39. package/dist/internal-common/src/public-types/integrations/api.types.js.map +1 -0
  40. package/dist/internal-common/src/public-types/integrations/auth.types.d.ts +46 -0
  41. package/dist/internal-common/src/public-types/integrations/auth.types.js +3 -0
  42. package/dist/internal-common/src/public-types/integrations/auth.types.js.map +1 -0
  43. package/dist/internal-common/src/public-types/integrations/database.types.d.ts +275 -0
  44. package/dist/internal-common/src/public-types/integrations/database.types.js +3 -0
  45. package/dist/internal-common/src/public-types/integrations/database.types.js.map +1 -0
  46. package/dist/internal-common/src/public-types/integrations/observability.types.d.ts +24 -0
  47. package/dist/internal-common/src/public-types/integrations/observability.types.js +24 -0
  48. package/dist/internal-common/src/public-types/integrations/observability.types.js.map +1 -0
  49. package/dist/internal-common/src/public-types/integrations/queue-types.d.ts +40 -0
  50. package/dist/internal-common/src/public-types/integrations/queue-types.js +3 -0
  51. package/dist/internal-common/src/public-types/integrations/queue-types.js.map +1 -0
  52. package/dist/internal-common/src/public-types/integrations/schemas.d.ts +79 -0
  53. package/dist/internal-common/src/public-types/integrations/schemas.js +48 -0
  54. package/dist/internal-common/src/public-types/integrations/schemas.js.map +1 -0
  55. package/dist/internal-common/src/public-types/mutation.public-context.d.ts +13 -0
  56. package/dist/internal-common/src/public-types/mutation.public-context.js +27 -0
  57. package/dist/internal-common/src/public-types/mutation.public-context.js.map +1 -0
  58. package/dist/internal-common/src/public-types/mutation.public-types.d.ts +44 -0
  59. package/dist/internal-common/src/public-types/mutation.public-types.js +3 -0
  60. package/dist/internal-common/src/public-types/mutation.public-types.js.map +1 -0
  61. package/dist/internal-common/src/public-types/query.public-context.d.ts +47 -0
  62. package/dist/internal-common/src/public-types/query.public-context.js +161 -0
  63. package/dist/internal-common/src/public-types/query.public-context.js.map +1 -0
  64. package/dist/internal-common/src/public-types/query.public-types.d.ts +56 -0
  65. package/dist/internal-common/src/public-types/query.public-types.js +8 -0
  66. package/dist/internal-common/src/public-types/query.public-types.js.map +1 -0
  67. package/dist/internal-common/src/public-types/schema.public-types.d.ts +22 -0
  68. package/dist/internal-common/src/public-types/schema.public-types.js +3 -0
  69. package/dist/internal-common/src/public-types/schema.public-types.js.map +1 -0
  70. package/dist/internal-common/src/public-types/secret.public-types.d.ts +13 -0
  71. package/dist/internal-common/src/public-types/secret.public-types.js +3 -0
  72. package/dist/internal-common/src/public-types/secret.public-types.js.map +1 -0
  73. package/dist/internal-common/src/public-types/socket.public-types.d.ts +5 -0
  74. package/dist/internal-common/src/public-types/socket.public-types.js +10 -0
  75. package/dist/internal-common/src/public-types/socket.public-types.js.map +1 -0
  76. package/dist/internal-common/src/public-types/topic.public-context.d.ts +10 -0
  77. package/dist/internal-common/src/public-types/topic.public-context.js +3 -0
  78. package/dist/internal-common/src/public-types/topic.public-context.js.map +1 -0
  79. package/dist/internal-common/src/public-types/typescript.public-types.d.ts +21 -0
  80. package/dist/internal-common/src/public-types/typescript.public-types.js +3 -0
  81. package/dist/internal-common/src/public-types/typescript.public-types.js.map +1 -0
  82. package/dist/internal-common/src/types/ai-chatbot.context.d.ts +13 -0
  83. package/dist/internal-common/src/types/ai-chatbot.context.js +20 -0
  84. package/dist/internal-common/src/types/ai-chatbot.context.js.map +1 -0
  85. package/dist/internal-common/src/types/ai-chatbot.types.d.ts +101 -0
  86. package/dist/internal-common/src/types/ai-chatbot.types.js +21 -0
  87. package/dist/internal-common/src/types/ai-chatbot.types.js.map +1 -0
  88. package/dist/internal-common/src/types/api-call.context.d.ts +13 -0
  89. package/dist/internal-common/src/types/api-call.context.js +17 -0
  90. package/dist/internal-common/src/types/api-call.context.js.map +1 -0
  91. package/dist/internal-common/src/types/api.types.d.ts +22 -0
  92. package/dist/internal-common/src/types/api.types.js +3 -0
  93. package/dist/internal-common/src/types/api.types.js.map +1 -0
  94. package/dist/internal-common/src/types/backend-run.types.d.ts +53 -0
  95. package/dist/internal-common/src/types/backend-run.types.js +30 -0
  96. package/dist/internal-common/src/types/backend-run.types.js.map +1 -0
  97. package/dist/internal-common/src/types/bundle-data.types.d.ts +82 -0
  98. package/dist/internal-common/src/types/bundle-data.types.js +3 -0
  99. package/dist/internal-common/src/types/bundle-data.types.js.map +1 -0
  100. package/dist/internal-common/src/types/communication.types.d.ts +13 -0
  101. package/dist/internal-common/src/types/communication.types.js +40 -0
  102. package/dist/internal-common/src/types/communication.types.js.map +1 -0
  103. package/dist/internal-common/src/types/distributed-lock.context.d.ts +4 -0
  104. package/dist/internal-common/src/types/distributed-lock.context.js +10 -0
  105. package/dist/internal-common/src/types/distributed-lock.context.js.map +1 -0
  106. package/dist/internal-common/src/types/graphql.context.d.ts +14 -0
  107. package/dist/internal-common/src/types/graphql.context.js +13 -0
  108. package/dist/internal-common/src/types/graphql.context.js.map +1 -0
  109. package/dist/internal-common/src/types/logger.types.d.ts +21 -0
  110. package/dist/internal-common/src/types/logger.types.js +12 -0
  111. package/dist/internal-common/src/types/logger.types.js.map +1 -0
  112. package/dist/internal-common/src/types/native-query.context.d.ts +7 -0
  113. package/dist/internal-common/src/types/native-query.context.js +12 -0
  114. package/dist/internal-common/src/types/native-query.context.js.map +1 -0
  115. package/dist/internal-common/src/types/openapi-response.d.ts +6 -0
  116. package/dist/internal-common/src/types/openapi-response.js +3 -0
  117. package/dist/internal-common/src/types/openapi-response.js.map +1 -0
  118. package/dist/internal-common/src/types/openapi.types.d.ts +26 -0
  119. package/dist/internal-common/src/types/openapi.types.js +3 -0
  120. package/dist/internal-common/src/types/openapi.types.js.map +1 -0
  121. package/dist/internal-common/src/types/query.types.d.ts +34 -0
  122. package/dist/internal-common/src/types/query.types.js +94 -0
  123. package/dist/internal-common/src/types/query.types.js.map +1 -0
  124. package/dist/internal-common/src/types/secret.types.d.ts +55 -0
  125. package/dist/internal-common/src/types/secret.types.js +6 -0
  126. package/dist/internal-common/src/types/secret.types.js.map +1 -0
  127. package/dist/internal-common/src/types/security.types.d.ts +22 -0
  128. package/dist/internal-common/src/types/security.types.js +3 -0
  129. package/dist/internal-common/src/types/security.types.js.map +1 -0
  130. package/dist/internal-common/src/utils/backend-transforms.d.ts +3 -0
  131. package/dist/internal-common/src/utils/backend-transforms.js +93 -0
  132. package/dist/internal-common/src/utils/backend-transforms.js.map +1 -0
  133. package/dist/internal-common/src/utils/global.utils.d.ts +11 -0
  134. package/dist/internal-common/src/utils/global.utils.js +51 -0
  135. package/dist/internal-common/src/utils/global.utils.js.map +1 -0
  136. package/dist/internal-common/src/utils/http.d.ts +2 -0
  137. package/dist/internal-common/src/utils/http.js +57 -0
  138. package/dist/internal-common/src/utils/http.js.map +1 -0
  139. package/dist/internal-common/src/utils/serialization.d.ts +5 -0
  140. package/dist/internal-common/src/utils/serialization.js +74 -0
  141. package/dist/internal-common/src/utils/serialization.js.map +1 -0
  142. package/dist/internal-common/src/websocket.impl.d.ts +21 -0
  143. package/dist/internal-common/src/websocket.impl.js +80 -0
  144. package/dist/internal-common/src/websocket.impl.js.map +1 -0
  145. package/dist/local-backend/openapi-template.hbs +1 -0
  146. package/dist/local-backend/package.json +54 -0
  147. package/dist/local-backend/src/index.d.ts +4 -0
  148. package/dist/local-backend/src/index.js.map +1 -0
  149. package/dist/local-backend/src/local-backend-socket.service.d.ts +22 -0
  150. package/dist/local-backend/src/local-backend-socket.service.js +213 -0
  151. package/dist/local-backend/src/local-backend-socket.service.js.map +1 -0
  152. package/dist/local-backend/src/local-backend.app.d.ts +2 -0
  153. package/dist/local-backend/src/local-backend.app.js +26 -0
  154. package/dist/local-backend/src/local-backend.app.js.map +1 -0
  155. package/dist/local-backend/src/local-backend.controller.d.ts +9 -0
  156. package/dist/local-backend/src/local-backend.controller.js +50 -0
  157. package/dist/local-backend/src/local-backend.controller.js.map +1 -0
  158. package/dist/local-backend/src/local-backend.module.d.ts +8 -0
  159. package/dist/local-backend/src/local-backend.module.js +54 -0
  160. package/dist/local-backend/src/local-backend.module.js.map +1 -0
  161. package/dist/local-backend/src/local-backend.service.d.ts +17 -0
  162. package/dist/local-backend/src/local-backend.service.js +180 -0
  163. package/dist/local-backend/src/local-backend.service.js.map +1 -0
  164. package/dist/local-backend/src/utils/shell-runner.d.ts +4 -0
  165. package/dist/local-backend/src/utils/shell-runner.js +28 -0
  166. package/dist/local-backend/src/utils/shell-runner.js.map +1 -0
  167. package/dist/local-backend/tsoa.json +15 -0
  168. package/dist/tsconfig.build.tsbuildinfo +1 -0
  169. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ import { ServiceFunctionName } from './types/bundle-data.types';
2
+ import { ExecuteFunctionAnnotationType, RunConfiguration, RunSecrets } from './types/backend-run.types';
3
+ import { Auth, RunContext } from './public-types/context.public-types';
4
+ export type SingleExecuteFunctionRequest = {
5
+ functionName: ServiceFunctionName;
6
+ params: Array<any>;
7
+ };
8
+ export interface BatchRunConfigurationRequest {
9
+ configuration: RunConfiguration;
10
+ context: RunContext;
11
+ auth: Auth | undefined;
12
+ requests: Array<SingleExecuteFunctionRequest>;
13
+ secrets?: RunSecrets;
14
+ executeFunctionAnnotationType: ExecuteFunctionAnnotationType;
15
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=code-executor.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-executor.types.js","sourceRoot":"","sources":["../../../../internal-common/src/code-executor.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ import { BatchRunConfigurationRequest } from './code-executor.types';
2
+ import { LocalBackendData } from './types/bundle-data.types';
3
+ import { RunSecrets } from './types/backend-run.types';
4
+ import { LogLevel } from './types/logger.types';
5
+ export type MessageFromDeveloperType = 'bundleData' | 'response';
6
+ interface BaseMessageFromDeveloper {
7
+ type: MessageFromDeveloperType;
8
+ payload?: unknown;
9
+ requestId: string;
10
+ }
11
+ export type MessageFromDeveloper = ResponseMessageFromDeveloper | BundleDataMessageFromDeveloper;
12
+ export interface ResponseMessageFromDeveloper extends BaseMessageFromDeveloper {
13
+ type: 'response';
14
+ payload: any;
15
+ }
16
+ export interface BundleDataMessageFromDeveloper extends BaseMessageFromDeveloper {
17
+ type: 'bundleData';
18
+ payload: LocalBackendData;
19
+ }
20
+ export type MessageToDeveloperType = 'executeFunction' | 'localBackendData' | 'logMessage';
21
+ interface BaseMessageToDeveloper {
22
+ type: MessageToDeveloperType;
23
+ payload: unknown;
24
+ requestId: string;
25
+ }
26
+ export type MessageToDeveloper = ExecuteFunctionMessageToDeveloper | LocalBackendDataMessageToDeveloper | LogMessageToDeveloper;
27
+ export interface ExecuteFunctionMessageToDeveloper extends BaseMessageToDeveloper {
28
+ type: 'executeFunction';
29
+ payload: BatchRunConfigurationRequest;
30
+ }
31
+ export interface LocalBackendDataMessageToDeveloper extends BaseMessageToDeveloper {
32
+ type: 'localBackendData';
33
+ payload: {
34
+ secrets: RunSecrets;
35
+ };
36
+ }
37
+ export interface LogMessageToDeveloper extends BaseMessageToDeveloper {
38
+ type: 'logMessage';
39
+ payload: LogRequest;
40
+ }
41
+ export declare enum LogType {
42
+ ALL = "ALL",
43
+ QUERY = "QUERY",
44
+ MUTATIONS = "MUTATIONS",
45
+ AI = "AI"
46
+ }
47
+ export interface LogRequest {
48
+ tag: string;
49
+ type: LogType;
50
+ timestamp: number;
51
+ level: LogLevel;
52
+ message: string;
53
+ }
54
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LogType = void 0;
4
+ var LogType;
5
+ (function (LogType) {
6
+ LogType["ALL"] = "ALL";
7
+ LogType["QUERY"] = "QUERY";
8
+ LogType["MUTATIONS"] = "MUTATIONS";
9
+ LogType["AI"] = "AI";
10
+ })(LogType || (exports.LogType = LogType = {}));
11
+ //# sourceMappingURL=local-dev.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-dev.types.js","sourceRoot":"","sources":["../../../../internal-common/src/local-dev.types.ts"],"names":[],"mappings":";;;AA8DA,IAAY,OAKX;AALD,WAAY,OAAO;IACjB,sBAAW,CAAA;IACX,0BAAe,CAAA;IACf,kCAAuB,CAAA;IACvB,oBAAS,CAAA;AACX,CAAC,EALW,OAAO,uBAAP,OAAO,QAKlB"}
@@ -0,0 +1,27 @@
1
+ export declare const AI_MODEL_NAMES: readonly ["gpt-3.5-turbo", "gpt-3.5-turbo-1106", "gpt-4", "claude-2", "gpt-4-1106-preview"];
2
+ export type AiModelName = (typeof AI_MODEL_NAMES)[number];
3
+ export type ApiKeySource = 'user' | 'system';
4
+ export type AiChatbotContextType = 'text' | 'url' | 'file';
5
+ interface AiChatbotContextBase {
6
+ type: AiChatbotContextType;
7
+ data: string;
8
+ }
9
+ export interface AiChatbotTextContext extends AiChatbotContextBase {
10
+ type: 'text';
11
+ }
12
+ export interface AiChatbotUrlContext extends AiChatbotContextBase {
13
+ type: 'url';
14
+ }
15
+ export interface AiChatbotFileContext extends AiChatbotContextBase {
16
+ type: 'file';
17
+ }
18
+ export type AiChatbotContext = AiChatbotTextContext | AiChatbotUrlContext | AiChatbotFileContext;
19
+ export type OpenAiResponseFormat = 'text' | 'json_object';
20
+ export interface AiChatbotChatOptions {
21
+ maxTokens?: number;
22
+ chatId?: string;
23
+ disableHistory?: boolean;
24
+ includeReference?: boolean;
25
+ responseFormat?: OpenAiResponseFormat;
26
+ }
27
+ export {};
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_MODEL_NAMES = void 0;
4
+ exports.AI_MODEL_NAMES = [
5
+ 'gpt-3.5-turbo',
6
+ 'gpt-3.5-turbo-1106',
7
+ 'gpt-4',
8
+ 'claude-2',
9
+ 'gpt-4-1106-preview',
10
+ ];
11
+ //# sourceMappingURL=ai-chatbot.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-chatbot.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/ai-chatbot.public-types.ts"],"names":[],"mappings":";;;AACa,QAAA,cAAc,GAAG;IAC5B,eAAe;IACf,oBAAoB;IACpB,OAAO;IACP,UAAU;IACV,oBAAoB;CACZ,CAAC"}
@@ -0,0 +1,201 @@
1
+ import { RunPermissions } from '../types/backend-run.types';
2
+ import { ApplicationBundleData, ServiceFunctionName } from '../types/bundle-data.types';
3
+ import { AuthIntegrationType, DatabaseIntegrationType, IntegrationConfig, IntegrationConfigTypes, IntegrationSchema, IntegrationSchemaKeys, IntegrationSchemaTypes, IntegrationTypeWithConfig } from './integrations/schemas';
4
+ import { IntegrationType } from './integration.public-types';
5
+ import { AppId, EnvironmentId, IntegrationId } from './communication.public-types';
6
+ import { CollectionName } from './document.public-types';
7
+ export type WebhookId = 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 * * 7",
57
+ EVERY_WEEKDAY = "0 0 * * 1-5",
58
+ EVERY_WEEKEND = "0 0 * * 6,7",
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 1 *",
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
+ organizationId: string;
119
+ creationDate: Date;
120
+ updateDate: Date;
121
+ allowedHosts: string[];
122
+ openIdProvider?: OpenIdProvider;
123
+ integrations: Record<IntegrationId, IntegrationConfig>;
124
+ codeUrl?: string;
125
+ bundleMetadata?: ApplicationBundleData;
126
+ archiveDate?: Date;
127
+ }
128
+ export interface Schema<T extends IntegrationSchema = any> {
129
+ appId: AppId;
130
+ integrationId: IntegrationId;
131
+ schema: T;
132
+ createdAt: Date;
133
+ updatedAt: Date;
134
+ }
135
+ export interface ApplicationInitDetails {
136
+ codeUrl: string;
137
+ codeUrlId: string;
138
+ permissions: RunPermissions;
139
+ }
140
+ export interface UpdateOpenIdProviderRequest {
141
+ openIdProvider: OpenIdProvider;
142
+ }
143
+ export interface CreateApplicationRequest {
144
+ organizationId: string;
145
+ }
146
+ export interface CreateApplicationResponse {
147
+ appId: AppId;
148
+ }
149
+ export interface DeleteIntegrationRequest {
150
+ integrationId: IntegrationId;
151
+ }
152
+ export interface UpdateAllowedHostsRequest {
153
+ allowedHosts: string[];
154
+ }
155
+ export interface CreateEnvironmentRequest {
156
+ sourceAppId: AppId;
157
+ environmentId: EnvironmentId;
158
+ }
159
+ export interface UpdateApplicationCodeRequest {
160
+ appId: AppId;
161
+ openApiSpecStr?: string;
162
+ openApiControllersStr?: string;
163
+ }
164
+ interface BaseUpsertIntegrationRequest<T extends IntegrationTypeWithConfig, C extends IntegrationConfig> {
165
+ id: IntegrationId;
166
+ type: T;
167
+ config: Partial<C>;
168
+ }
169
+ type ConfigurationTypes = {
170
+ [K in IntegrationTypeWithConfig]: IntegrationConfigTypes[K];
171
+ };
172
+ type UpsertIntegrationRequests = {
173
+ [K in IntegrationTypeWithConfig]: BaseUpsertIntegrationRequest<K, ConfigurationTypes[K]>;
174
+ };
175
+ export type UpsertIntegrationRequest = UpsertDataIntegrationRequest | UpsertGraphQLIntegrationRequest | UpsertApiIntegrationRequest | UpsertAiChatbotIntegrationRequest | UpsertConfluentIntegrationRequest | UpsertKafkaIntegrationRequest | UpsertAuthIntegrationRequest;
176
+ export type UpsertDataIntegrationRequest = UpsertIntegrationRequests[DatabaseIntegrationType];
177
+ export type UpsertGraphQLIntegrationRequest = UpsertIntegrationRequests[IntegrationType.graphql];
178
+ export type UpsertApiIntegrationRequest = UpsertIntegrationRequests[IntegrationType.api];
179
+ export type UpsertAiChatbotIntegrationRequest = UpsertIntegrationRequests[IntegrationType.ai_chatbot];
180
+ export type UpsertKafkaIntegrationRequest = UpsertIntegrationRequests[IntegrationType.kafka];
181
+ export type UpsertConfluentIntegrationRequest = UpsertIntegrationRequests[IntegrationType.confluent];
182
+ export type UpsertAuthIntegrationRequest = UpsertIntegrationRequests[AuthIntegrationType];
183
+ interface BaseUpsertIntegrationSchemaRequest<T extends IntegrationType, S extends IntegrationSchema> {
184
+ id: IntegrationId;
185
+ type: T;
186
+ schema: S;
187
+ }
188
+ type SchemaTypes = {
189
+ [K in IntegrationSchemaKeys]: IntegrationSchemaTypes[K];
190
+ };
191
+ type UpsertIntegrationSchemaRequests = {
192
+ [K in IntegrationSchemaKeys]: BaseUpsertIntegrationSchemaRequest<K, SchemaTypes[K]>;
193
+ };
194
+ export type UpsertIntegrationSchemaRequest = UpsertDataIntegrationSchemaRequest | UpsertGraphQLIntegrationSchemaRequest | UpsertApiIntegrationSchemaRequest;
195
+ export type UpsertDataIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[DatabaseIntegrationType];
196
+ export type UpsertGraphQLIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.graphql];
197
+ export type UpsertApiIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.api];
198
+ export interface GetSchemaRequest {
199
+ integrationId: IntegrationId;
200
+ }
201
+ export {};
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CronExpression = void 0;
4
+ var CronExpression;
5
+ (function (CronExpression) {
6
+ CronExpression["EVERY_SECOND"] = "* * * * * *";
7
+ CronExpression["EVERY_5_SECONDS"] = "*/5 * * * * *";
8
+ CronExpression["EVERY_10_SECONDS"] = "*/10 * * * * *";
9
+ CronExpression["EVERY_30_SECONDS"] = "*/30 * * * * *";
10
+ CronExpression["EVERY_MINUTE"] = "*/1 * * * *";
11
+ CronExpression["EVERY_5_MINUTES"] = "0 */5 * * * *";
12
+ CronExpression["EVERY_10_MINUTES"] = "0 */10 * * * *";
13
+ CronExpression["EVERY_30_MINUTES"] = "0 */30 * * * *";
14
+ CronExpression["EVERY_HOUR"] = "0 0-23/1 * * *";
15
+ CronExpression["EVERY_2_HOURS"] = "0 0-23/2 * * *";
16
+ CronExpression["EVERY_3_HOURS"] = "0 0-23/3 * * *";
17
+ CronExpression["EVERY_4_HOURS"] = "0 0-23/4 * * *";
18
+ CronExpression["EVERY_5_HOURS"] = "0 0-23/5 * * *";
19
+ CronExpression["EVERY_6_HOURS"] = "0 0-23/6 * * *";
20
+ CronExpression["EVERY_7_HOURS"] = "0 0-23/7 * * *";
21
+ CronExpression["EVERY_8_HOURS"] = "0 0-23/8 * * *";
22
+ CronExpression["EVERY_9_HOURS"] = "0 0-23/9 * * *";
23
+ CronExpression["EVERY_10_HOURS"] = "0 0-23/10 * * *";
24
+ CronExpression["EVERY_11_HOURS"] = "0 0-23/11 * * *";
25
+ CronExpression["EVERY_12_HOURS"] = "0 0-23/12 * * *";
26
+ CronExpression["EVERY_DAY_AT_1AM"] = "0 01 * * *";
27
+ CronExpression["EVERY_DAY_AT_2AM"] = "0 02 * * *";
28
+ CronExpression["EVERY_DAY_AT_3AM"] = "0 03 * * *";
29
+ CronExpression["EVERY_DAY_AT_4AM"] = "0 04 * * *";
30
+ CronExpression["EVERY_DAY_AT_5AM"] = "0 05 * * *";
31
+ CronExpression["EVERY_DAY_AT_6AM"] = "0 06 * * *";
32
+ CronExpression["EVERY_DAY_AT_7AM"] = "0 07 * * *";
33
+ CronExpression["EVERY_DAY_AT_8AM"] = "0 08 * * *";
34
+ CronExpression["EVERY_DAY_AT_9AM"] = "0 09 * * *";
35
+ CronExpression["EVERY_DAY_AT_10AM"] = "0 10 * * *";
36
+ CronExpression["EVERY_DAY_AT_11AM"] = "0 11 * * *";
37
+ CronExpression["EVERY_DAY_AT_NOON"] = "0 12 * * *";
38
+ CronExpression["EVERY_DAY_AT_1PM"] = "0 13 * * *";
39
+ CronExpression["EVERY_DAY_AT_2PM"] = "0 14 * * *";
40
+ CronExpression["EVERY_DAY_AT_3PM"] = "0 15 * * *";
41
+ CronExpression["EVERY_DAY_AT_4PM"] = "0 16 * * *";
42
+ CronExpression["EVERY_DAY_AT_5PM"] = "0 17 * * *";
43
+ CronExpression["EVERY_DAY_AT_6PM"] = "0 18 * * *";
44
+ CronExpression["EVERY_DAY_AT_7PM"] = "0 19 * * *";
45
+ CronExpression["EVERY_DAY_AT_8PM"] = "0 20 * * *";
46
+ CronExpression["EVERY_DAY_AT_9PM"] = "0 21 * * *";
47
+ CronExpression["EVERY_DAY_AT_10PM"] = "0 22 * * *";
48
+ CronExpression["EVERY_DAY_AT_11PM"] = "0 23 * * *";
49
+ CronExpression["EVERY_DAY_AT_MIDNIGHT"] = "0 0 * * *";
50
+ CronExpression["EVERY_WEEK"] = "0 0 * * 7";
51
+ CronExpression["EVERY_WEEKDAY"] = "0 0 * * 1-5";
52
+ CronExpression["EVERY_WEEKEND"] = "0 0 * * 6,7";
53
+ CronExpression["EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT"] = "0 0 1 * *";
54
+ CronExpression["EVERY_1ST_DAY_OF_MONTH_AT_NOON"] = "0 12 1 * *";
55
+ CronExpression["EVERY_2ND_HOUR"] = "0 */2 * * *";
56
+ CronExpression["EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM"] = "0 1-23/2 * * *";
57
+ CronExpression["EVERY_2ND_MONTH"] = "0 0 1 */2 *";
58
+ CronExpression["EVERY_QUARTER"] = "0 0 1 */3 *";
59
+ CronExpression["EVERY_6_MONTHS"] = "0 0 1 */6 *";
60
+ CronExpression["EVERY_YEAR"] = "0 0 1 1 *";
61
+ CronExpression["EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM"] = "0 */30 9-17 * * *";
62
+ CronExpression["EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM"] = "0 */30 9-18 * * *";
63
+ CronExpression["EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM"] = "0 */30 10-19 * * *";
64
+ CronExpression["MONDAY_TO_FRIDAY_AT_1AM"] = "0 0 01 * * 1-5";
65
+ CronExpression["MONDAY_TO_FRIDAY_AT_2AM"] = "0 0 02 * * 1-5";
66
+ CronExpression["MONDAY_TO_FRIDAY_AT_3AM"] = "0 0 03 * * 1-5";
67
+ CronExpression["MONDAY_TO_FRIDAY_AT_4AM"] = "0 0 04 * * 1-5";
68
+ CronExpression["MONDAY_TO_FRIDAY_AT_5AM"] = "0 0 05 * * 1-5";
69
+ CronExpression["MONDAY_TO_FRIDAY_AT_6AM"] = "0 0 06 * * 1-5";
70
+ CronExpression["MONDAY_TO_FRIDAY_AT_7AM"] = "0 0 07 * * 1-5";
71
+ CronExpression["MONDAY_TO_FRIDAY_AT_8AM"] = "0 0 08 * * 1-5";
72
+ CronExpression["MONDAY_TO_FRIDAY_AT_9AM"] = "0 0 09 * * 1-5";
73
+ CronExpression["MONDAY_TO_FRIDAY_AT_09_30AM"] = "0 30 09 * * 1-5";
74
+ CronExpression["MONDAY_TO_FRIDAY_AT_10AM"] = "0 0 10 * * 1-5";
75
+ CronExpression["MONDAY_TO_FRIDAY_AT_11AM"] = "0 0 11 * * 1-5";
76
+ CronExpression["MONDAY_TO_FRIDAY_AT_11_30AM"] = "0 30 11 * * 1-5";
77
+ CronExpression["MONDAY_TO_FRIDAY_AT_12PM"] = "0 0 12 * * 1-5";
78
+ CronExpression["MONDAY_TO_FRIDAY_AT_1PM"] = "0 0 13 * * 1-5";
79
+ CronExpression["MONDAY_TO_FRIDAY_AT_2PM"] = "0 0 14 * * 1-5";
80
+ CronExpression["MONDAY_TO_FRIDAY_AT_3PM"] = "0 0 15 * * 1-5";
81
+ CronExpression["MONDAY_TO_FRIDAY_AT_4PM"] = "0 0 16 * * 1-5";
82
+ CronExpression["MONDAY_TO_FRIDAY_AT_5PM"] = "0 0 17 * * 1-5";
83
+ CronExpression["MONDAY_TO_FRIDAY_AT_6PM"] = "0 0 18 * * 1-5";
84
+ CronExpression["MONDAY_TO_FRIDAY_AT_7PM"] = "0 0 19 * * 1-5";
85
+ CronExpression["MONDAY_TO_FRIDAY_AT_8PM"] = "0 0 20 * * 1-5";
86
+ CronExpression["MONDAY_TO_FRIDAY_AT_9PM"] = "0 0 21 * * 1-5";
87
+ CronExpression["MONDAY_TO_FRIDAY_AT_10PM"] = "0 0 22 * * 1-5";
88
+ CronExpression["MONDAY_TO_FRIDAY_AT_11PM"] = "0 0 23 * * 1-5";
89
+ })(CronExpression || (exports.CronExpression = CronExpression = {}));
90
+ //# sourceMappingURL=application.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/application.public-types.ts"],"names":[],"mappings":";;;AAgCA,IAAY,cAoFX;AApFD,WAAY,cAAc;IACxB,8CAA4B,CAAA;IAC5B,mDAAiC,CAAA;IACjC,qDAAmC,CAAA;IACnC,qDAAmC,CAAA;IACnC,8CAA4B,CAAA;IAC5B,mDAAiC,CAAA;IACjC,qDAAmC,CAAA;IACnC,qDAAmC,CAAA;IACnC,+CAA6B,CAAA;IAC7B,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,oDAAkC,CAAA;IAClC,oDAAkC,CAAA;IAClC,oDAAkC,CAAA;IAClC,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,kDAAgC,CAAA;IAChC,kDAAgC,CAAA;IAChC,qDAAmC,CAAA;IACnC,0CAAwB,CAAA;IACxB,+CAA6B,CAAA;IAC7B,+CAA6B,CAAA;IAC7B,kEAAgD,CAAA;IAChD,+DAA6C,CAAA;IAC7C,gDAA8B,CAAA;IAC9B,yEAAuD,CAAA;IACvD,iDAA+B,CAAA;IAC/B,+CAA6B,CAAA;IAC7B,gDAA8B,CAAA;IAC9B,0CAAwB,CAAA;IACxB,4EAA0D,CAAA;IAC1D,4EAA0D,CAAA;IAC1D,8EAA4D,CAAA;IAC5D,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,iEAA+C,CAAA;IAC/C,6DAA2C,CAAA;IAC3C,6DAA2C,CAAA;IAC3C,iEAA+C,CAAA;IAC/C,6DAA2C,CAAA;IAC3C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,4DAA0C,CAAA;IAC1C,6DAA2C,CAAA;IAC3C,6DAA2C,CAAA;AAC7C,CAAC,EApFW,cAAc,8BAAd,cAAc,QAoFzB"}
@@ -0,0 +1,55 @@
1
+ import { MutationPublicContext } from './mutation.public-context';
2
+ import { ApiCallContext } from '../types/api-call.context';
3
+ import { GraphqlContext } from '../types/graphql.context';
4
+ import { DistributedLockContext } from '../types/distributed-lock.context';
5
+ import { NativeQueryContext } from '../types/native-query.context';
6
+ import { QueryContext } from './query.public-context';
7
+ import { AiChatbotActionType, DatabaseActionType, TopicActionType } from './bundle-data.public-types';
8
+ import { AiChatbotChatContext, AiChatbotMutationContext } from '../types/ai-chatbot.context';
9
+ import { ClientConnectionState } from './socket.public-types';
10
+ import { DocumentData } from './document.public-types';
11
+ import { MutationType } from './mutation.public-types';
12
+ import { ClientId, SquidDocId } from './communication.public-types';
13
+ import { TopicReadContext, TopicWriteContext } from './topic.public-context';
14
+ export type SecureDatabaseAction<T extends DatabaseActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: QueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: MutationPublicContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
15
+ export type SecureTopicAction<T extends TopicActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'read' ? ((context: TopicReadContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: TopicWriteContext<T>) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
16
+ export type SecureApiAction = ((context: ApiCallContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
17
+ export type SecureNativeQueryAction = ((context: NativeQueryContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
18
+ export type SecureDistributedLockAction = ((context: DistributedLockContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
19
+ export type SecureGraphQLAction = ((context: GraphqlContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
20
+ export type SecureAiChatbotAction<T extends AiChatbotActionType> = T extends 'all' ? () => boolean | Promise<boolean> : T extends 'chat' ? ((context: AiChatbotChatContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>) : ((context: AiChatbotMutationContext) => boolean | Promise<boolean>) | (() => boolean | Promise<boolean>);
21
+ export type ClientConnectionStateChangeAction = (clientId: ClientId, clientConnectionState: ClientConnectionState) => Promise<void> | void;
22
+ export type ExecutableAction = (...args: any[]) => any;
23
+ export type AiFunctionAction<T extends Record<string, any> = any> = (params: T) => any;
24
+ export type TriggerAction = ((request: TriggerRequest) => void | Promise<void>) | (() => void | Promise<void>);
25
+ export interface TriggerRequest<T extends DocumentData = any> {
26
+ squidDocId: SquidDocId;
27
+ mutationType: MutationType;
28
+ docBefore?: T;
29
+ docAfter?: T;
30
+ }
31
+ export type SchedulerAction = () => void | Promise<void>;
32
+ export type WebhookAction = ((request: WebhookRequest) => any) | (() => any);
33
+ export interface WebhookRequest<T = any> {
34
+ body: T;
35
+ rawBody?: string;
36
+ queryParams: Record<string, string>;
37
+ headers: Record<string, string>;
38
+ httpMethod: 'post' | 'get' | 'put' | 'delete';
39
+ files?: Array<SquidFile>;
40
+ }
41
+ export interface WebhookResponse {
42
+ headers: Record<string, any>;
43
+ body: any;
44
+ statusCode: number;
45
+ __isWebhookResponse__: true;
46
+ }
47
+ export interface SquidFile {
48
+ data: Uint8Array;
49
+ fieldName: string;
50
+ mimetype: string;
51
+ originalName: string;
52
+ size: number;
53
+ encoding?: string;
54
+ }
55
+ export type ActionMethodDecorator<U> = <T extends U>(target: Object, propertyName: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=bundle-api.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-api.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/bundle-api.public-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export type DatabaseActionType = 'read' | 'write' | 'update' | 'insert' | 'delete' | 'all';
2
+ export type TopicActionType = 'read' | 'write' | 'all';
3
+ export type AiChatbotActionType = 'chat' | 'mutate' | 'all';
4
+ export type AiFunctionParamType = 'string' | 'number' | 'boolean' | 'date';
5
+ export type FunctionName = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=bundle-data.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle-data.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/bundle-data.public-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export type AppId = string;
2
+ export declare const ENVIRONMENT_IDS: readonly ["dev", "prod"];
3
+ export type EnvironmentId = (typeof ENVIRONMENT_IDS)[number];
4
+ export type SquidDeveloperId = string;
5
+ export declare const allEnvironmentIds: Array<EnvironmentId>;
6
+ export type IntegrationId = string;
7
+ export type ClientId = string;
8
+ export type SquidDocId = string;
9
+ export type ClientRequestId = string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.allEnvironmentIds = exports.ENVIRONMENT_IDS = void 0;
4
+ exports.ENVIRONMENT_IDS = ['dev', 'prod'];
5
+ exports.allEnvironmentIds = [...exports.ENVIRONMENT_IDS];
6
+ //# sourceMappingURL=communication.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communication.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/communication.public-types.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAC;AAM3C,QAAA,iBAAiB,GAAyB,CAAC,GAAG,uBAAe,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { AppId, ClientId } from './communication.public-types';
2
+ export type AuthType = 'Bearer' | 'ApiKey';
3
+ export interface AuthWithBearer {
4
+ type: 'Bearer';
5
+ userId: string;
6
+ expiration: number;
7
+ attributes: Record<string, any>;
8
+ }
9
+ export interface AuthWithApiKey {
10
+ type: 'ApiKey';
11
+ apiKey: string;
12
+ }
13
+ export type Auth = AuthWithBearer | AuthWithApiKey;
14
+ export interface AuthToken {
15
+ type: AuthType;
16
+ token: string;
17
+ integrationId?: string;
18
+ }
19
+ export interface RunContext {
20
+ appId: AppId;
21
+ clientId?: ClientId;
22
+ sourceIp?: string;
23
+ headers?: Record<string, any>;
24
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=context.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/context.public-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import { IntegrationId } from './communication.public-types';
2
+ export type PrimitiveFieldType = string | number | boolean | null | Date;
3
+ export type FieldType = PrimitiveFieldType | Array<FieldType> | {
4
+ [key: string]: FieldType;
5
+ };
6
+ export type FieldName<T = any> = string & keyof T;
7
+ export type DocId = string;
8
+ export type DocIdObj = Record<FieldName, any>;
9
+ export type CollectionName = string;
10
+ export type DocumentData = Record<FieldName, any | undefined>;
11
+ export type DocTimestamp = number;
12
+ export interface SquidDocument {
13
+ __docId__: DocId;
14
+ __ts__: DocTimestamp;
15
+ [fieldName: string]: FieldType | undefined;
16
+ }
17
+ export interface BeforeAndAfterDocs<T = SquidDocument> {
18
+ before: T | undefined;
19
+ after: T | undefined;
20
+ }
21
+ export interface SquidDocIdObj {
22
+ collectionName: CollectionName;
23
+ docId: DocId;
24
+ integrationId: IntegrationId;
25
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=document.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/document.public-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export { type ExecutionResult, type IntrospectionQuery } from 'graphql';
2
+ export interface GraphQLRequest {
3
+ operationName?: string;
4
+ query?: string;
5
+ variables?: string | Record<string, any>;
6
+ }
7
+ export interface SecureGraphQLRequest extends GraphQLRequest {
8
+ isGraphiQL: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=graphql.public-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/graphql.public-types.ts"],"names":[],"mappings":""}