@squidcloud/local-backend 1.0.168 → 1.0.170
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.
- package/dist/internal-common/src/code-executor.types.d.ts +15 -0
- package/dist/internal-common/src/code-executor.types.js +3 -0
- package/dist/internal-common/src/code-executor.types.js.map +1 -0
- package/dist/internal-common/src/local-dev.types.d.ts +54 -0
- package/dist/internal-common/src/local-dev.types.js +11 -0
- package/dist/internal-common/src/local-dev.types.js.map +1 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-context.d.ts +13 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-context.js +20 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-types.d.ts +29 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-types.js +11 -0
- package/dist/internal-common/src/public-types/ai-chatbot.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/api-call.public-context.d.ts +13 -0
- package/dist/internal-common/src/public-types/api-call.public-context.js +17 -0
- package/dist/internal-common/src/public-types/api-call.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/application.public-types.d.ts +126 -0
- package/dist/internal-common/src/public-types/application.public-types.js +90 -0
- package/dist/internal-common/src/public-types/application.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/bundle-api.public-types.d.ts +55 -0
- package/dist/internal-common/src/public-types/bundle-api.public-types.js +3 -0
- package/dist/internal-common/src/public-types/bundle-api.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/bundle-data.public-types.d.ts +5 -0
- package/dist/internal-common/src/public-types/bundle-data.public-types.js +3 -0
- package/dist/internal-common/src/public-types/bundle-data.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/communication.public-types.d.ts +9 -0
- package/dist/internal-common/src/public-types/communication.public-types.js +6 -0
- package/dist/internal-common/src/public-types/communication.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/context.public-types.d.ts +24 -0
- package/dist/internal-common/src/public-types/context.public-types.js +3 -0
- package/dist/internal-common/src/public-types/context.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/distributed-lock.public-context.d.ts +4 -0
- package/dist/internal-common/src/public-types/distributed-lock.public-context.js +10 -0
- package/dist/internal-common/src/public-types/distributed-lock.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/document.public-types.d.ts +25 -0
- package/dist/internal-common/src/public-types/document.public-types.js +3 -0
- package/dist/internal-common/src/public-types/document.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/graphql.public-context.d.ts +7 -0
- package/dist/internal-common/src/public-types/graphql.public-context.js +13 -0
- package/dist/internal-common/src/public-types/graphql.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/graphql.public-types.d.ts +9 -0
- package/dist/internal-common/src/public-types/graphql.public-types.js +3 -0
- package/dist/internal-common/src/public-types/graphql.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/integration.public-types.d.ts +61 -0
- package/dist/internal-common/src/public-types/integration.public-types.js +68 -0
- package/dist/internal-common/src/public-types/integration.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.d.ts +32 -0
- package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.js +3 -0
- package/dist/internal-common/src/public-types/integrations/ai_chatbot.types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/api.types.d.ts +81 -0
- package/dist/internal-common/src/public-types/integrations/api.types.js +3 -0
- package/dist/internal-common/src/public-types/integrations/api.types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/auth.types.d.ts +46 -0
- package/dist/internal-common/src/public-types/integrations/auth.types.js +3 -0
- package/dist/internal-common/src/public-types/integrations/auth.types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/database.types.d.ts +228 -0
- package/dist/internal-common/src/public-types/integrations/database.types.js +3 -0
- package/dist/internal-common/src/public-types/integrations/database.types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/observability.types.d.ts +24 -0
- package/dist/internal-common/src/public-types/integrations/observability.types.js +24 -0
- package/dist/internal-common/src/public-types/integrations/observability.types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/queue-types.d.ts +40 -0
- package/dist/internal-common/src/public-types/integrations/queue-types.js +3 -0
- package/dist/internal-common/src/public-types/integrations/queue-types.js.map +1 -0
- package/dist/internal-common/src/public-types/integrations/schemas.d.ts +72 -0
- package/dist/internal-common/src/public-types/integrations/schemas.js +46 -0
- package/dist/internal-common/src/public-types/integrations/schemas.js.map +1 -0
- package/dist/internal-common/src/public-types/mutation.public-context.d.ts +13 -0
- package/dist/internal-common/src/public-types/mutation.public-context.js +27 -0
- package/dist/internal-common/src/public-types/mutation.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/mutation.public-types.d.ts +44 -0
- package/dist/internal-common/src/public-types/mutation.public-types.js +3 -0
- package/dist/internal-common/src/public-types/mutation.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/native-query.public-context.d.ts +7 -0
- package/dist/internal-common/src/public-types/native-query.public-context.js +12 -0
- package/dist/internal-common/src/public-types/native-query.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/query.public-context.d.ts +47 -0
- package/dist/internal-common/src/public-types/query.public-context.js +161 -0
- package/dist/internal-common/src/public-types/query.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/query.public-types.d.ts +45 -0
- package/dist/internal-common/src/public-types/query.public-types.js +8 -0
- package/dist/internal-common/src/public-types/query.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/schema.public-types.d.ts +22 -0
- package/dist/internal-common/src/public-types/schema.public-types.js +3 -0
- package/dist/internal-common/src/public-types/schema.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/secret.public-types.d.ts +13 -0
- package/dist/internal-common/src/public-types/secret.public-types.js +3 -0
- package/dist/internal-common/src/public-types/secret.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/socket.public-types.d.ts +5 -0
- package/dist/internal-common/src/public-types/socket.public-types.js +10 -0
- package/dist/internal-common/src/public-types/socket.public-types.js.map +1 -0
- package/dist/internal-common/src/public-types/topic.public-context.d.ts +10 -0
- package/dist/internal-common/src/public-types/topic.public-context.js +3 -0
- package/dist/internal-common/src/public-types/topic.public-context.js.map +1 -0
- package/dist/internal-common/src/public-types/typescript.public-types.d.ts +15 -0
- package/dist/internal-common/src/public-types/typescript.public-types.js +3 -0
- package/dist/internal-common/src/public-types/typescript.public-types.js.map +1 -0
- package/dist/internal-common/src/types/ai-chatbot.types.d.ts +99 -0
- package/dist/internal-common/src/types/ai-chatbot.types.js +21 -0
- package/dist/internal-common/src/types/ai-chatbot.types.js.map +1 -0
- package/dist/internal-common/src/types/api.types.d.ts +22 -0
- package/dist/internal-common/src/types/api.types.js +3 -0
- package/dist/internal-common/src/types/api.types.js.map +1 -0
- package/dist/internal-common/src/types/application.types.d.ts +60 -0
- package/dist/internal-common/src/types/application.types.js +3 -0
- package/dist/internal-common/src/types/application.types.js.map +1 -0
- package/dist/internal-common/src/types/backend-run.types.d.ts +53 -0
- package/dist/internal-common/src/types/backend-run.types.js +30 -0
- package/dist/internal-common/src/types/backend-run.types.js.map +1 -0
- package/dist/internal-common/src/types/bundle-data.types.d.ts +83 -0
- package/dist/internal-common/src/types/bundle-data.types.js +3 -0
- package/dist/internal-common/src/types/bundle-data.types.js.map +1 -0
- package/dist/internal-common/src/types/communication.types.d.ts +13 -0
- package/dist/internal-common/src/types/communication.types.js +40 -0
- package/dist/internal-common/src/types/communication.types.js.map +1 -0
- package/dist/internal-common/src/types/logger.types.d.ts +21 -0
- package/dist/internal-common/src/types/logger.types.js +12 -0
- package/dist/internal-common/src/types/logger.types.js.map +1 -0
- package/dist/internal-common/src/types/openapi-response.d.ts +6 -0
- package/dist/internal-common/src/types/openapi-response.js +3 -0
- package/dist/internal-common/src/types/openapi-response.js.map +1 -0
- package/dist/internal-common/src/types/openapi.types.d.ts +26 -0
- package/dist/internal-common/src/types/openapi.types.js +3 -0
- package/dist/internal-common/src/types/openapi.types.js.map +1 -0
- package/dist/internal-common/src/types/query.types.d.ts +34 -0
- package/dist/internal-common/src/types/query.types.js +94 -0
- package/dist/internal-common/src/types/query.types.js.map +1 -0
- package/dist/internal-common/src/types/secret.types.d.ts +55 -0
- package/dist/internal-common/src/types/secret.types.js +6 -0
- package/dist/internal-common/src/types/secret.types.js.map +1 -0
- package/dist/internal-common/src/types/security.types.d.ts +22 -0
- package/dist/internal-common/src/types/security.types.js +3 -0
- package/dist/internal-common/src/types/security.types.js.map +1 -0
- package/dist/internal-common/src/utils/backend-transforms.d.ts +3 -0
- package/dist/internal-common/src/utils/backend-transforms.js +93 -0
- package/dist/internal-common/src/utils/backend-transforms.js.map +1 -0
- package/dist/internal-common/src/utils/global.utils.d.ts +12 -0
- package/dist/internal-common/src/utils/global.utils.js +56 -0
- package/dist/internal-common/src/utils/global.utils.js.map +1 -0
- package/dist/internal-common/src/utils/http.d.ts +2 -0
- package/dist/internal-common/src/utils/http.js +58 -0
- package/dist/internal-common/src/utils/http.js.map +1 -0
- package/dist/internal-common/src/utils/serialization.d.ts +5 -0
- package/dist/internal-common/src/utils/serialization.js +74 -0
- package/dist/internal-common/src/utils/serialization.js.map +1 -0
- package/dist/internal-common/src/websocket.impl.d.ts +21 -0
- package/dist/internal-common/src/websocket.impl.js +80 -0
- package/dist/internal-common/src/websocket.impl.js.map +1 -0
- package/dist/local-backend/openapi-template.hbs +1 -0
- package/dist/local-backend/package.json +55 -0
- package/dist/local-backend/src/index.d.ts +4 -0
- package/dist/local-backend/src/index.js.map +1 -0
- package/dist/local-backend/src/local-backend-socket.service.d.ts +22 -0
- package/dist/local-backend/src/local-backend-socket.service.js +213 -0
- package/dist/local-backend/src/local-backend-socket.service.js.map +1 -0
- package/dist/local-backend/src/local-backend.app.d.ts +2 -0
- package/dist/local-backend/src/local-backend.app.js +26 -0
- package/dist/local-backend/src/local-backend.app.js.map +1 -0
- package/dist/local-backend/src/local-backend.controller.d.ts +9 -0
- package/dist/local-backend/src/local-backend.controller.js +50 -0
- package/dist/local-backend/src/local-backend.controller.js.map +1 -0
- package/dist/local-backend/src/local-backend.module.d.ts +8 -0
- package/dist/local-backend/src/local-backend.module.js +54 -0
- package/dist/local-backend/src/local-backend.module.js.map +1 -0
- package/dist/local-backend/src/local-backend.service.d.ts +17 -0
- package/dist/local-backend/src/local-backend.service.js +180 -0
- package/dist/local-backend/src/local-backend.service.js.map +1 -0
- package/dist/local-backend/src/utils/shell-runner.d.ts +4 -0
- package/dist/local-backend/src/utils/shell-runner.js +28 -0
- package/dist/local-backend/src/utils/shell-runner.js.map +1 -0
- package/dist/local-backend/tsoa.json +15 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +2 -1
|
@@ -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 @@
|
|
|
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,13 @@
|
|
|
1
|
+
import { AiChatbotMutationType, AiChatbotResourceType } from './ai-chatbot.public-types';
|
|
2
|
+
export declare class AiChatbotChatContext {
|
|
3
|
+
readonly prompt: string;
|
|
4
|
+
readonly profileId: string;
|
|
5
|
+
constructor(prototype: AiChatbotChatContext);
|
|
6
|
+
}
|
|
7
|
+
export declare class AiChatbotMutationContext {
|
|
8
|
+
readonly type: AiChatbotMutationType;
|
|
9
|
+
readonly resource: AiChatbotResourceType;
|
|
10
|
+
readonly profileId: string;
|
|
11
|
+
readonly payload: any;
|
|
12
|
+
constructor(prototype: AiChatbotMutationContext);
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AiChatbotMutationContext = exports.AiChatbotChatContext = void 0;
|
|
4
|
+
class AiChatbotChatContext {
|
|
5
|
+
constructor(prototype) {
|
|
6
|
+
this.profileId = prototype.profileId;
|
|
7
|
+
this.prompt = prototype.prompt;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.AiChatbotChatContext = AiChatbotChatContext;
|
|
11
|
+
class AiChatbotMutationContext {
|
|
12
|
+
constructor(prototype) {
|
|
13
|
+
this.profileId = prototype.profileId;
|
|
14
|
+
this.type = prototype.type;
|
|
15
|
+
this.resource = prototype.resource;
|
|
16
|
+
this.payload = prototype.payload;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.AiChatbotMutationContext = AiChatbotMutationContext;
|
|
20
|
+
//# sourceMappingURL=ai-chatbot.public-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-chatbot.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/ai-chatbot.public-context.ts"],"names":[],"mappings":";;;AAEA,MAAa,oBAAoB;IAO/B,YAAY,SAA+B;QACzC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;IACjC,CAAC;CACF;AAXD,oDAWC;AAGD,MAAa,wBAAwB;IASnC,YAAY,SAAmC;QAC7C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACnC,CAAC;CACF;AAfD,4DAeC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 type AiChatbotMutationType = 'insert' | 'update' | 'delete';
|
|
28
|
+
export type AiChatbotResourceType = 'instruction' | 'context' | 'profile';
|
|
29
|
+
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,13 @@
|
|
|
1
|
+
import { ApiEndpointId, HttpMethod } from './integrations/api.types';
|
|
2
|
+
export type ApiHeaders = Record<string, string | number | boolean>;
|
|
3
|
+
export declare class ApiCallContext {
|
|
4
|
+
readonly endpointId: ApiEndpointId;
|
|
5
|
+
readonly url: string;
|
|
6
|
+
readonly method: HttpMethod;
|
|
7
|
+
readonly headers: ApiHeaders;
|
|
8
|
+
readonly body: Record<string, any>;
|
|
9
|
+
readonly queryParams: Record<string, string | number | boolean>;
|
|
10
|
+
readonly pathParams: Record<string, string>;
|
|
11
|
+
readonly serverUrlOverride: string | undefined;
|
|
12
|
+
constructor(prototype: ApiCallContext);
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiCallContext = void 0;
|
|
4
|
+
class ApiCallContext {
|
|
5
|
+
constructor(prototype) {
|
|
6
|
+
this.endpointId = prototype.endpointId;
|
|
7
|
+
this.url = prototype.url;
|
|
8
|
+
this.method = prototype.method;
|
|
9
|
+
this.headers = prototype.headers;
|
|
10
|
+
this.body = prototype.body;
|
|
11
|
+
this.queryParams = prototype.queryParams;
|
|
12
|
+
this.pathParams = prototype.pathParams;
|
|
13
|
+
this.serverUrlOverride = prototype.serverUrlOverride;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ApiCallContext = ApiCallContext;
|
|
17
|
+
//# sourceMappingURL=api-call.public-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-call.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/api-call.public-context.ts"],"names":[],"mappings":";;;AAMA,MAAa,cAAc;IAWzB,YAAY,SAAyB;QACnC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;QACvC,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAC;IACvD,CAAC;CACF;AArBD,wCAqBC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { AuthIntegrationType, DatabaseIntegrationType, IntegrationConfig, IntegrationConfigTypes, IntegrationSchema, IntegrationSchemaKeys, IntegrationSchemaTypes, IntegrationTypeWithConfig } from './integrations/schemas';
|
|
2
|
+
import { IntegrationType } from './integration.public-types';
|
|
3
|
+
import { IntegrationId } from './communication.public-types';
|
|
4
|
+
export type WebhookId = string;
|
|
5
|
+
export type TriggerId = string;
|
|
6
|
+
export type SchedulerId = string;
|
|
7
|
+
export type CronExpressionString = `${string} ${string} ${string} ${string} ${string}` | `${string} ${string} ${string} ${string}`;
|
|
8
|
+
export declare enum CronExpression {
|
|
9
|
+
EVERY_SECOND = "* * * * * *",
|
|
10
|
+
EVERY_5_SECONDS = "*/5 * * * * *",
|
|
11
|
+
EVERY_10_SECONDS = "*/10 * * * * *",
|
|
12
|
+
EVERY_30_SECONDS = "*/30 * * * * *",
|
|
13
|
+
EVERY_MINUTE = "*/1 * * * *",
|
|
14
|
+
EVERY_5_MINUTES = "0 */5 * * * *",
|
|
15
|
+
EVERY_10_MINUTES = "0 */10 * * * *",
|
|
16
|
+
EVERY_30_MINUTES = "0 */30 * * * *",
|
|
17
|
+
EVERY_HOUR = "0 0-23/1 * * *",
|
|
18
|
+
EVERY_2_HOURS = "0 0-23/2 * * *",
|
|
19
|
+
EVERY_3_HOURS = "0 0-23/3 * * *",
|
|
20
|
+
EVERY_4_HOURS = "0 0-23/4 * * *",
|
|
21
|
+
EVERY_5_HOURS = "0 0-23/5 * * *",
|
|
22
|
+
EVERY_6_HOURS = "0 0-23/6 * * *",
|
|
23
|
+
EVERY_7_HOURS = "0 0-23/7 * * *",
|
|
24
|
+
EVERY_8_HOURS = "0 0-23/8 * * *",
|
|
25
|
+
EVERY_9_HOURS = "0 0-23/9 * * *",
|
|
26
|
+
EVERY_10_HOURS = "0 0-23/10 * * *",
|
|
27
|
+
EVERY_11_HOURS = "0 0-23/11 * * *",
|
|
28
|
+
EVERY_12_HOURS = "0 0-23/12 * * *",
|
|
29
|
+
EVERY_DAY_AT_1AM = "0 01 * * *",
|
|
30
|
+
EVERY_DAY_AT_2AM = "0 02 * * *",
|
|
31
|
+
EVERY_DAY_AT_3AM = "0 03 * * *",
|
|
32
|
+
EVERY_DAY_AT_4AM = "0 04 * * *",
|
|
33
|
+
EVERY_DAY_AT_5AM = "0 05 * * *",
|
|
34
|
+
EVERY_DAY_AT_6AM = "0 06 * * *",
|
|
35
|
+
EVERY_DAY_AT_7AM = "0 07 * * *",
|
|
36
|
+
EVERY_DAY_AT_8AM = "0 08 * * *",
|
|
37
|
+
EVERY_DAY_AT_9AM = "0 09 * * *",
|
|
38
|
+
EVERY_DAY_AT_10AM = "0 10 * * *",
|
|
39
|
+
EVERY_DAY_AT_11AM = "0 11 * * *",
|
|
40
|
+
EVERY_DAY_AT_NOON = "0 12 * * *",
|
|
41
|
+
EVERY_DAY_AT_1PM = "0 13 * * *",
|
|
42
|
+
EVERY_DAY_AT_2PM = "0 14 * * *",
|
|
43
|
+
EVERY_DAY_AT_3PM = "0 15 * * *",
|
|
44
|
+
EVERY_DAY_AT_4PM = "0 16 * * *",
|
|
45
|
+
EVERY_DAY_AT_5PM = "0 17 * * *",
|
|
46
|
+
EVERY_DAY_AT_6PM = "0 18 * * *",
|
|
47
|
+
EVERY_DAY_AT_7PM = "0 19 * * *",
|
|
48
|
+
EVERY_DAY_AT_8PM = "0 20 * * *",
|
|
49
|
+
EVERY_DAY_AT_9PM = "0 21 * * *",
|
|
50
|
+
EVERY_DAY_AT_10PM = "0 22 * * *",
|
|
51
|
+
EVERY_DAY_AT_11PM = "0 23 * * *",
|
|
52
|
+
EVERY_DAY_AT_MIDNIGHT = "0 0 * * *",
|
|
53
|
+
EVERY_WEEK = "0 0 * * 7",
|
|
54
|
+
EVERY_WEEKDAY = "0 0 * * 1-5",
|
|
55
|
+
EVERY_WEEKEND = "0 0 * * 6,7",
|
|
56
|
+
EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT = "0 0 1 * *",
|
|
57
|
+
EVERY_1ST_DAY_OF_MONTH_AT_NOON = "0 12 1 * *",
|
|
58
|
+
EVERY_2ND_HOUR = "0 */2 * * *",
|
|
59
|
+
EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM = "0 1-23/2 * * *",
|
|
60
|
+
EVERY_2ND_MONTH = "0 0 1 */2 *",
|
|
61
|
+
EVERY_QUARTER = "0 0 1 */3 *",
|
|
62
|
+
EVERY_6_MONTHS = "0 0 1 */6 *",
|
|
63
|
+
EVERY_YEAR = "0 0 1 1 *",
|
|
64
|
+
EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM = "0 */30 9-17 * * *",
|
|
65
|
+
EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM = "0 */30 9-18 * * *",
|
|
66
|
+
EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM = "0 */30 10-19 * * *",
|
|
67
|
+
MONDAY_TO_FRIDAY_AT_1AM = "0 0 01 * * 1-5",
|
|
68
|
+
MONDAY_TO_FRIDAY_AT_2AM = "0 0 02 * * 1-5",
|
|
69
|
+
MONDAY_TO_FRIDAY_AT_3AM = "0 0 03 * * 1-5",
|
|
70
|
+
MONDAY_TO_FRIDAY_AT_4AM = "0 0 04 * * 1-5",
|
|
71
|
+
MONDAY_TO_FRIDAY_AT_5AM = "0 0 05 * * 1-5",
|
|
72
|
+
MONDAY_TO_FRIDAY_AT_6AM = "0 0 06 * * 1-5",
|
|
73
|
+
MONDAY_TO_FRIDAY_AT_7AM = "0 0 07 * * 1-5",
|
|
74
|
+
MONDAY_TO_FRIDAY_AT_8AM = "0 0 08 * * 1-5",
|
|
75
|
+
MONDAY_TO_FRIDAY_AT_9AM = "0 0 09 * * 1-5",
|
|
76
|
+
MONDAY_TO_FRIDAY_AT_09_30AM = "0 30 09 * * 1-5",
|
|
77
|
+
MONDAY_TO_FRIDAY_AT_10AM = "0 0 10 * * 1-5",
|
|
78
|
+
MONDAY_TO_FRIDAY_AT_11AM = "0 0 11 * * 1-5",
|
|
79
|
+
MONDAY_TO_FRIDAY_AT_11_30AM = "0 30 11 * * 1-5",
|
|
80
|
+
MONDAY_TO_FRIDAY_AT_12PM = "0 0 12 * * 1-5",
|
|
81
|
+
MONDAY_TO_FRIDAY_AT_1PM = "0 0 13 * * 1-5",
|
|
82
|
+
MONDAY_TO_FRIDAY_AT_2PM = "0 0 14 * * 1-5",
|
|
83
|
+
MONDAY_TO_FRIDAY_AT_3PM = "0 0 15 * * 1-5",
|
|
84
|
+
MONDAY_TO_FRIDAY_AT_4PM = "0 0 16 * * 1-5",
|
|
85
|
+
MONDAY_TO_FRIDAY_AT_5PM = "0 0 17 * * 1-5",
|
|
86
|
+
MONDAY_TO_FRIDAY_AT_6PM = "0 0 18 * * 1-5",
|
|
87
|
+
MONDAY_TO_FRIDAY_AT_7PM = "0 0 19 * * 1-5",
|
|
88
|
+
MONDAY_TO_FRIDAY_AT_8PM = "0 0 20 * * 1-5",
|
|
89
|
+
MONDAY_TO_FRIDAY_AT_9PM = "0 0 21 * * 1-5",
|
|
90
|
+
MONDAY_TO_FRIDAY_AT_10PM = "0 0 22 * * 1-5",
|
|
91
|
+
MONDAY_TO_FRIDAY_AT_11PM = "0 0 23 * * 1-5"
|
|
92
|
+
}
|
|
93
|
+
interface BaseUpsertIntegrationRequest<T extends IntegrationTypeWithConfig, C extends IntegrationConfig> {
|
|
94
|
+
id: IntegrationId;
|
|
95
|
+
type: T;
|
|
96
|
+
config: Partial<C>;
|
|
97
|
+
}
|
|
98
|
+
type ConfigurationTypes = {
|
|
99
|
+
[K in IntegrationTypeWithConfig]: IntegrationConfigTypes[K];
|
|
100
|
+
};
|
|
101
|
+
type UpsertIntegrationRequests = {
|
|
102
|
+
[K in IntegrationTypeWithConfig]: BaseUpsertIntegrationRequest<K, ConfigurationTypes[K]>;
|
|
103
|
+
};
|
|
104
|
+
export type UpsertDataIntegrationRequest = UpsertIntegrationRequests[DatabaseIntegrationType];
|
|
105
|
+
export type UpsertGraphQLIntegrationRequest = UpsertIntegrationRequests[IntegrationType.graphql];
|
|
106
|
+
export type UpsertApiIntegrationRequest = UpsertIntegrationRequests[IntegrationType.api];
|
|
107
|
+
export type UpsertAiChatbotIntegrationRequest = UpsertIntegrationRequests[IntegrationType.ai_chatbot];
|
|
108
|
+
export type UpsertKafkaIntegrationRequest = UpsertIntegrationRequests[IntegrationType.kafka];
|
|
109
|
+
export type UpsertConfluentIntegrationRequest = UpsertIntegrationRequests[IntegrationType.confluent];
|
|
110
|
+
export type UpsertAuthIntegrationRequest = UpsertIntegrationRequests[AuthIntegrationType];
|
|
111
|
+
interface BaseUpsertIntegrationSchemaRequest<T extends IntegrationType, S extends IntegrationSchema> {
|
|
112
|
+
id: IntegrationId;
|
|
113
|
+
type: T;
|
|
114
|
+
schema: S;
|
|
115
|
+
}
|
|
116
|
+
type SchemaTypes = {
|
|
117
|
+
[K in IntegrationSchemaKeys]: IntegrationSchemaTypes[K];
|
|
118
|
+
};
|
|
119
|
+
type UpsertIntegrationSchemaRequests = {
|
|
120
|
+
[K in IntegrationSchemaKeys]: BaseUpsertIntegrationSchemaRequest<K, SchemaTypes[K]>;
|
|
121
|
+
};
|
|
122
|
+
export type UpsertIntegrationSchemaRequest = UpsertDataIntegrationSchemaRequest | UpsertGraphQLIntegrationSchemaRequest | UpsertApiIntegrationSchemaRequest;
|
|
123
|
+
export type UpsertDataIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[DatabaseIntegrationType];
|
|
124
|
+
export type UpsertGraphQLIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.graphql];
|
|
125
|
+
export type UpsertApiIntegrationSchemaRequest = UpsertIntegrationSchemaRequests[IntegrationType.api];
|
|
126
|
+
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":";;;AA6BA,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 { MutationContext } from './mutation.public-context';
|
|
2
|
+
import { ApiCallContext } from './api-call.public-context';
|
|
3
|
+
import { QueryContext } from './query.public-context';
|
|
4
|
+
import { AiChatbotActionType, DatabaseActionType, TopicActionType } from './bundle-data.public-types';
|
|
5
|
+
import { ClientConnectionState } from './socket.public-types';
|
|
6
|
+
import { DocumentData } from './document.public-types';
|
|
7
|
+
import { MutationType } from './mutation.public-types';
|
|
8
|
+
import { ClientId, SquidDocId } from './communication.public-types';
|
|
9
|
+
import { TopicReadContext, TopicWriteContext } from './topic.public-context';
|
|
10
|
+
import { NativeQueryContext } from './native-query.public-context';
|
|
11
|
+
import { DistributedLockContext } from './distributed-lock.public-context';
|
|
12
|
+
import { GraphqlContext } from './graphql.public-context';
|
|
13
|
+
import { AiChatbotChatContext, AiChatbotMutationContext } from './ai-chatbot.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: MutationContext) => 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"context.public-types.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/context.public-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DistributedLockContext = void 0;
|
|
4
|
+
class DistributedLockContext {
|
|
5
|
+
constructor(mutex) {
|
|
6
|
+
this.mutex = mutex;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.DistributedLockContext = DistributedLockContext;
|
|
10
|
+
//# sourceMappingURL=distributed-lock.public-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distributed-lock.public-context.js","sourceRoot":"","sources":["../../../../../internal-common/src/public-types/distributed-lock.public-context.ts"],"names":[],"mappings":";;;AACA,MAAa,sBAAsB;IAEjC,YAAqB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;CACvC;AAHD,wDAGC"}
|
|
@@ -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
|
+
}
|