quidproquo-actionprocessor-node 0.0.222 → 0.0.223
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/lib/commonjs/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/claudeAi/{ClaudeAiActionProcessor.js → getClaudeAiMessagesApiActionProcessor.js} +25 -19
- package/lib/commonjs/actionProcessor/core/claudeAi/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/claudeAi/index.js +17 -0
- package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +2 -0
- package/lib/commonjs/{getActionProcessor → actionProcessor}/core/config/getConfigGetApplicationInfoActionProcessor.js +6 -4
- package/lib/commonjs/actionProcessor/core/config/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/config/index.js +17 -0
- package/lib/commonjs/actionProcessor/core/context/getContextListActionProcessor.d.ts +2 -0
- package/lib/commonjs/{getActionProcessor → actionProcessor}/core/context/getContextListActionProcessor.js +8 -6
- package/lib/commonjs/actionProcessor/core/context/getContextReadActionProcessor.d.ts +2 -0
- package/lib/commonjs/{getActionProcessor → actionProcessor}/core/context/getContextReadActionProcessor.js +8 -6
- package/lib/commonjs/actionProcessor/core/context/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/context/index.js +18 -0
- package/lib/commonjs/actionProcessor/core/customActions/getCustomActionActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/customActions/getCustomActionActionProcessor.js +31 -0
- package/lib/commonjs/actionProcessor/core/customActions/index.d.ts +1 -0
- package/lib/commonjs/{getActionProcessor → actionProcessor/core/customActions}/index.js +2 -1
- package/lib/commonjs/actionProcessor/core/date/getDateNowActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/date/getDateNowActionProcessor.js +24 -0
- package/lib/commonjs/actionProcessor/core/date/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/{error/ErrorActionProcessor.js → date/index.js} +5 -6
- package/lib/commonjs/actionProcessor/core/error/getErrorThrowErrorActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/error/getErrorThrowErrorActionProcessor.js +24 -0
- package/lib/commonjs/actionProcessor/core/error/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/{date/DateActionProcessor.js → error/index.js} +5 -6
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/guid/{GuidActionProcessor.js → getGuidNewActionProcessor.js} +11 -10
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewSortableActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewSortableActionProcessor.js +25 -0
- package/lib/commonjs/actionProcessor/core/guid/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/guid/index.js +18 -0
- package/lib/commonjs/actionProcessor/core/index.d.ts +14 -13
- package/lib/commonjs/actionProcessor/core/index.js +51 -13
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.js +30 -0
- package/lib/commonjs/actionProcessor/core/log/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/{math/MathActionProcessor.js → log/index.js} +5 -6
- package/lib/commonjs/actionProcessor/core/math/getMathRandomNumberActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/math/getMathRandomNumberActionProcessor.js +24 -0
- package/lib/commonjs/actionProcessor/core/math/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/math/index.js +17 -0
- package/lib/commonjs/actionProcessor/core/network/getNetworkRequestActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/network/{NetworkActionProcessor.js → getNetworkRequestActionProcessor.js} +28 -22
- package/lib/commonjs/actionProcessor/core/network/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/network/index.js +17 -0
- package/lib/commonjs/actionProcessor/core/platform/getPlatformDelayActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/platform/getPlatformDelayActionProcessor.js +24 -0
- package/lib/commonjs/actionProcessor/core/platform/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/platform/index.js +17 -0
- package/lib/commonjs/actionProcessor/core/system/getSystemBatchActionProcessor.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/system/getSystemBatchActionProcessor.js +51 -0
- package/lib/commonjs/actionProcessor/core/system/index.d.ts +2 -0
- package/lib/commonjs/actionProcessor/core/{log/LogActionProcessor.js → system/index.js} +5 -12
- package/lib/commonjs/actionProcessor/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/index.js +15 -7
- package/lib/commonjs/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/index.js +15 -4
- package/lib/commonjs/index.d.ts +0 -1
- package/lib/commonjs/index.js +0 -1
- package/lib/esm/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.js +26 -0
- package/lib/esm/actionProcessor/core/claudeAi/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/claudeAi/index.js +4 -0
- package/lib/esm/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +2 -0
- package/lib/esm/{getActionProcessor → actionProcessor}/core/config/getConfigGetApplicationInfoActionProcessor.js +3 -5
- package/lib/esm/actionProcessor/core/config/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/config/index.js +4 -0
- package/lib/esm/actionProcessor/core/context/getContextListActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/context/getContextListActionProcessor.js +9 -0
- package/lib/esm/actionProcessor/core/context/getContextReadActionProcessor.d.ts +2 -0
- package/lib/esm/{getActionProcessor → actionProcessor}/core/context/getContextReadActionProcessor.js +4 -6
- package/lib/esm/actionProcessor/core/context/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/context/index.js +6 -0
- package/lib/esm/actionProcessor/core/customActions/getCustomActionActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/customActions/getCustomActionActionProcessor.js +18 -0
- package/lib/esm/actionProcessor/core/customActions/index.d.ts +1 -0
- package/lib/esm/actionProcessor/core/customActions/index.js +2 -0
- package/lib/esm/actionProcessor/core/date/getDateNowActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/date/getDateNowActionProcessor.js +9 -0
- package/lib/esm/actionProcessor/core/date/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/date/index.js +4 -0
- package/lib/esm/actionProcessor/core/error/getErrorThrowErrorActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/error/getErrorThrowErrorActionProcessor.js +9 -0
- package/lib/esm/actionProcessor/core/error/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/error/index.js +4 -0
- package/lib/esm/actionProcessor/core/guid/getGuidNewActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/guid/getGuidNewActionProcessor.js +10 -0
- package/lib/esm/actionProcessor/core/guid/getGuidNewSortableActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/guid/getGuidNewSortableActionProcessor.js +10 -0
- package/lib/esm/actionProcessor/core/guid/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/guid/index.js +6 -0
- package/lib/esm/actionProcessor/core/index.d.ts +14 -13
- package/lib/esm/actionProcessor/core/index.js +37 -22
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.js +15 -0
- package/lib/esm/actionProcessor/core/log/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/log/index.js +4 -0
- package/lib/esm/actionProcessor/core/math/getMathRandomNumberActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/math/getMathRandomNumberActionProcessor.js +9 -0
- package/lib/esm/actionProcessor/core/math/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/math/index.js +4 -0
- package/lib/esm/actionProcessor/core/network/getNetworkRequestActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/network/{NetworkActionProcessor.js → getNetworkRequestActionProcessor.js} +24 -22
- package/lib/esm/actionProcessor/core/network/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/network/index.js +4 -0
- package/lib/esm/actionProcessor/core/platform/getPlatformDelayActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/platform/getPlatformDelayActionProcessor.js +9 -0
- package/lib/esm/actionProcessor/core/platform/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/platform/index.js +4 -0
- package/lib/esm/actionProcessor/core/system/getSystemBatchActionProcessor.d.ts +2 -0
- package/lib/esm/actionProcessor/core/system/getSystemBatchActionProcessor.js +36 -0
- package/lib/esm/actionProcessor/core/system/index.d.ts +2 -0
- package/lib/esm/actionProcessor/core/system/index.js +4 -0
- package/lib/esm/actionProcessor/index.d.ts +2 -2
- package/lib/esm/actionProcessor/index.js +2 -2
- package/lib/esm/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/index.js +3 -4
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -1
- package/package.json +3 -3
- package/lib/commonjs/actionProcessor/core/claudeAi/ClaudeAiActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/date/DateActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/error/ErrorActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/event/EventActionProcessor.d.ts +0 -2
- package/lib/commonjs/actionProcessor/core/event/EventActionProcessor.js +0 -4
- package/lib/commonjs/actionProcessor/core/guid/GuidActionProcessor.d.ts +0 -6
- package/lib/commonjs/actionProcessor/core/log/LogActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/math/MathActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/network/NetworkActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/platform/PlatformActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/platform/PlatformActionProcessor.js +0 -18
- package/lib/commonjs/actionProcessor/core/system/SystemActionProcessor.d.ts +0 -5
- package/lib/commonjs/actionProcessor/core/system/SystemActionProcessor.js +0 -45
- package/lib/commonjs/actionProcessor/webserver/genericDataResource/GenericDataResourceActionProcessor.d.ts +0 -2
- package/lib/commonjs/actionProcessor/webserver/genericDataResource/GenericDataResourceActionProcessor.js +0 -3
- package/lib/commonjs/getActionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +0 -5
- package/lib/commonjs/getActionProcessor/core/config/index.d.ts +0 -5
- package/lib/commonjs/getActionProcessor/core/config/index.js +0 -7
- package/lib/commonjs/getActionProcessor/core/context/getContextListActionProcessor.d.ts +0 -5
- package/lib/commonjs/getActionProcessor/core/context/getContextReadActionProcessor.d.ts +0 -5
- package/lib/commonjs/getActionProcessor/core/context/index.d.ts +0 -6
- package/lib/commonjs/getActionProcessor/core/context/index.js +0 -8
- package/lib/commonjs/getActionProcessor/core/index.d.ts +0 -2
- package/lib/commonjs/getActionProcessor/core/index.js +0 -10
- package/lib/commonjs/getActionProcessor/index.d.ts +0 -1
- package/lib/esm/actionProcessor/core/claudeAi/ClaudeAiActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/claudeAi/ClaudeAiActionProcessor.js +0 -24
- package/lib/esm/actionProcessor/core/date/DateActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/date/DateActionProcessor.js +0 -7
- package/lib/esm/actionProcessor/core/error/ErrorActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/error/ErrorActionProcessor.js +0 -7
- package/lib/esm/actionProcessor/core/event/EventActionProcessor.d.ts +0 -2
- package/lib/esm/actionProcessor/core/event/EventActionProcessor.js +0 -2
- package/lib/esm/actionProcessor/core/guid/GuidActionProcessor.d.ts +0 -6
- package/lib/esm/actionProcessor/core/guid/GuidActionProcessor.js +0 -13
- package/lib/esm/actionProcessor/core/log/LogActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/log/LogActionProcessor.js +0 -13
- package/lib/esm/actionProcessor/core/math/MathActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/math/MathActionProcessor.js +0 -7
- package/lib/esm/actionProcessor/core/network/NetworkActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/platform/PlatformActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/platform/PlatformActionProcessor.js +0 -7
- package/lib/esm/actionProcessor/core/system/SystemActionProcessor.d.ts +0 -5
- package/lib/esm/actionProcessor/core/system/SystemActionProcessor.js +0 -34
- package/lib/esm/actionProcessor/webserver/genericDataResource/GenericDataResourceActionProcessor.d.ts +0 -2
- package/lib/esm/actionProcessor/webserver/genericDataResource/GenericDataResourceActionProcessor.js +0 -1
- package/lib/esm/getActionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +0 -5
- package/lib/esm/getActionProcessor/core/config/index.d.ts +0 -5
- package/lib/esm/getActionProcessor/core/config/index.js +0 -4
- package/lib/esm/getActionProcessor/core/context/getContextListActionProcessor.d.ts +0 -5
- package/lib/esm/getActionProcessor/core/context/getContextListActionProcessor.js +0 -11
- package/lib/esm/getActionProcessor/core/context/getContextReadActionProcessor.d.ts +0 -5
- package/lib/esm/getActionProcessor/core/context/index.d.ts +0 -6
- package/lib/esm/getActionProcessor/core/context/index.js +0 -6
- package/lib/esm/getActionProcessor/core/index.d.ts +0 -2
- package/lib/esm/getActionProcessor/core/index.js +0 -2
- package/lib/esm/getActionProcessor/index.d.ts +0 -1
- package/lib/esm/getActionProcessor/index.js +0 -1
|
@@ -32,27 +32,33 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.getClaudeAiMessagesApiActionProcessor = void 0;
|
|
35
36
|
const sdk_1 = __importStar(require("@anthropic-ai/sdk"));
|
|
36
37
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
catch (error) {
|
|
44
|
-
console.log(error);
|
|
45
|
-
if (error instanceof sdk_1.AuthenticationError) {
|
|
46
|
-
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.Unauthorized, 'Invalid API key.');
|
|
47
|
-
}
|
|
48
|
-
else if (error instanceof Error) {
|
|
49
|
-
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, error.message);
|
|
38
|
+
const getProcessMessagesApi = (qpqConfig) => {
|
|
39
|
+
return ({ body, apiKey }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
|
+
const anthropic = new sdk_1.default({ apiKey });
|
|
41
|
+
try {
|
|
42
|
+
const msg = yield anthropic.messages.create(body);
|
|
43
|
+
return (0, quidproquo_core_1.actionResult)(msg);
|
|
50
44
|
}
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.log(error);
|
|
47
|
+
if (error instanceof sdk_1.AuthenticationError) {
|
|
48
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.Unauthorized, 'Invalid API key.');
|
|
49
|
+
}
|
|
50
|
+
else if (error instanceof Error) {
|
|
51
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, error.message);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, 'An error occurred while processing your request.');
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
exports.default = {
|
|
57
|
-
[quidproquo_core_1.ClaudeAiActionType.MessagesApi]: processMessagesApi,
|
|
57
|
+
});
|
|
58
58
|
};
|
|
59
|
+
const getClaudeAiMessagesApiActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
60
|
+
return ({
|
|
61
|
+
[quidproquo_core_1.ClaudeAiActionType.MessagesApi]: getProcessMessagesApi(qpqConfig),
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
exports.getClaudeAiMessagesApiActionProcessor = getClaudeAiMessagesApiActionProcessor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getClaudeAiActionProcessor = void 0;
|
|
13
|
+
const getClaudeAiMessagesApiActionProcessor_1 = require("./getClaudeAiMessagesApiActionProcessor");
|
|
14
|
+
const getClaudeAiActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getClaudeAiMessagesApiActionProcessor_1.getClaudeAiMessagesApiActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getClaudeAiActionProcessor = getClaudeAiActionProcessor;
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getConfigGetApplicationInfoActionProcessor = void 0;
|
|
12
13
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
14
|
const getProcessConfigGetApplicationConfig = (qpqConfig) => {
|
|
14
15
|
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -21,8 +22,9 @@ const getProcessConfigGetApplicationConfig = (qpqConfig) => {
|
|
|
21
22
|
return (0, quidproquo_core_1.actionResult)(appInfo);
|
|
22
23
|
});
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
-
return {
|
|
25
|
+
const getConfigGetApplicationInfoActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
return ({
|
|
26
27
|
[quidproquo_core_1.ConfigActionType.GetApplicationInfo]: getProcessConfigGetApplicationConfig(qpqConfig),
|
|
27
|
-
};
|
|
28
|
-
};
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
exports.getConfigGetApplicationInfoActionProcessor = getConfigGetApplicationInfoActionProcessor;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getConfigActionProcessor = void 0;
|
|
13
|
+
const getConfigGetApplicationInfoActionProcessor_1 = require("./getConfigGetApplicationInfoActionProcessor");
|
|
14
|
+
const getConfigActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getConfigGetApplicationInfoActionProcessor_1.getConfigGetApplicationInfoActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getConfigActionProcessor = getConfigActionProcessor;
|
|
@@ -9,14 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getContextListActionProcessor = void 0;
|
|
12
13
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
-
const
|
|
14
|
+
const getProcessContextList = (qpqConfig) => {
|
|
14
15
|
return (payload, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
16
|
return (0, quidproquo_core_1.actionResult)(session.context);
|
|
16
17
|
});
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
[quidproquo_core_1.ContextActionType.List]:
|
|
21
|
-
};
|
|
22
|
-
};
|
|
19
|
+
const getContextListActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
return ({
|
|
21
|
+
[quidproquo_core_1.ContextActionType.List]: getProcessContextList(qpqConfig),
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.getContextListActionProcessor = getContextListActionProcessor;
|
|
@@ -9,17 +9,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getContextReadActionProcessor = void 0;
|
|
12
13
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
14
|
const getContextValue = (context, contextIdentifier) => {
|
|
14
15
|
return contextIdentifier.uniqueName in context ? context[contextIdentifier.uniqueName] : contextIdentifier.defaultValue;
|
|
15
16
|
};
|
|
16
|
-
const
|
|
17
|
+
const getProcessContextRead = (qpqConfig) => {
|
|
17
18
|
return ({ contextIdentifier }, session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
19
|
return (0, quidproquo_core_1.actionResult)(getContextValue(session.context, contextIdentifier));
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
[quidproquo_core_1.ContextActionType.Read]:
|
|
24
|
-
};
|
|
25
|
-
};
|
|
22
|
+
const getContextReadActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
return ({
|
|
24
|
+
[quidproquo_core_1.ContextActionType.Read]: getProcessContextRead(qpqConfig),
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
exports.getContextReadActionProcessor = getContextReadActionProcessor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getContextActionProcessor = void 0;
|
|
13
|
+
const getContextListActionProcessor_1 = require("./getContextListActionProcessor");
|
|
14
|
+
const getContextReadActionProcessor_1 = require("./getContextReadActionProcessor");
|
|
15
|
+
const getContextActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (Object.assign(Object.assign({}, (yield (0, getContextListActionProcessor_1.getContextListActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getContextReadActionProcessor_1.getContextReadActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
17
|
+
});
|
|
18
|
+
exports.getContextActionProcessor = getContextActionProcessor;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getCustomActionActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessCustomAction = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const getCustomActionProcessors = quidproquo_core_1.qpqCoreUtils.getActionProcessorSources(qpqConfig);
|
|
17
|
+
const possibleModules = yield Promise.all(getCustomActionProcessors.map((x) => dynamicModuleLoader(x)));
|
|
18
|
+
const modules = possibleModules.filter((m) => typeof m === 'function');
|
|
19
|
+
const actionProcessors = yield Promise.all(modules.flatMap((m) => m(qpqConfig, dynamicModuleLoader)));
|
|
20
|
+
const allActionProcessors = actionProcessors.reduce((acc, cur) => (Object.assign(Object.assign({}, acc), cur)), {});
|
|
21
|
+
return allActionProcessors;
|
|
22
|
+
}
|
|
23
|
+
catch (_a) {
|
|
24
|
+
console.log('Unable to dynamically load action processors');
|
|
25
|
+
return {};
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const getCustomActionActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
return (Object.assign({}, (yield getProcessCustomAction(qpqConfig, dynamicModuleLoader))));
|
|
30
|
+
});
|
|
31
|
+
exports.getCustomActionActionProcessor = getCustomActionActionProcessor;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getCustomActionActionProcessor';
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
17
|
+
// This is a special one because it just has all the custom ones
|
|
18
|
+
__exportStar(require("./getCustomActionActionProcessor"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getDateNowActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessDateNow = (qpqConfig) => {
|
|
15
|
+
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (0, quidproquo_core_1.actionResult)(new Date().toISOString());
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const getDateNowActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
return ({
|
|
21
|
+
[quidproquo_core_1.DateActionType.Now]: getProcessDateNow(qpqConfig),
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.getDateNowActionProcessor = getDateNowActionProcessor;
|
|
@@ -9,10 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
exports.getDateActionProcessor = void 0;
|
|
13
|
+
const getDateNowActionProcessor_1 = require("./getDateNowActionProcessor");
|
|
14
|
+
const getDateActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getDateNowActionProcessor_1.getDateNowActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
15
16
|
});
|
|
16
|
-
exports.
|
|
17
|
-
[quidproquo_core_1.ErrorActionType.ThrowError]: processErrorThrowError,
|
|
18
|
-
};
|
|
17
|
+
exports.getDateActionProcessor = getDateActionProcessor;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getErrorThrowErrorActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessErrorThrowError = (qpqConfig) => {
|
|
15
|
+
return ({ errorStack, errorText, errorType }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (0, quidproquo_core_1.actionResultError)(errorType, errorText, errorStack);
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const getErrorThrowErrorActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
return ({
|
|
21
|
+
[quidproquo_core_1.ErrorActionType.ThrowError]: getProcessErrorThrowError(qpqConfig),
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.getErrorThrowErrorActionProcessor = getErrorThrowErrorActionProcessor;
|
|
@@ -9,10 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
exports.getErrorActionProcessor = void 0;
|
|
13
|
+
const getErrorThrowErrorActionProcessor_1 = require("./getErrorThrowErrorActionProcessor");
|
|
14
|
+
const getErrorActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getErrorThrowErrorActionProcessor_1.getErrorThrowErrorActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
15
16
|
});
|
|
16
|
-
exports.
|
|
17
|
-
[quidproquo_core_1.DateActionType.Now]: processDateNow,
|
|
18
|
-
};
|
|
17
|
+
exports.getErrorActionProcessor = getErrorActionProcessor;
|
|
@@ -9,16 +9,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getGuidNewActionProcessor = void 0;
|
|
12
13
|
const uuid_1 = require("uuid");
|
|
13
|
-
const uuidv7_1 = require("uuidv7");
|
|
14
14
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
15
|
-
const
|
|
16
|
-
return (0,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (0, quidproquo_core_1.actionResult)((0, uuidv7_1.uuidv7)());
|
|
20
|
-
});
|
|
21
|
-
exports.default = {
|
|
22
|
-
[quidproquo_core_1.GuidActionType.New]: processGuidNew,
|
|
23
|
-
[quidproquo_core_1.GuidActionType.NewSortable]: processGuidNewSortable,
|
|
15
|
+
const getProcessGuidNew = (qpqConfig) => {
|
|
16
|
+
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
return (0, quidproquo_core_1.actionResult)((0, uuid_1.v4)());
|
|
18
|
+
});
|
|
24
19
|
};
|
|
20
|
+
const getGuidNewActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
return ({
|
|
22
|
+
[quidproquo_core_1.GuidActionType.New]: getProcessGuidNew(qpqConfig),
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
exports.getGuidNewActionProcessor = getGuidNewActionProcessor;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getGuidNewSortableActionProcessor = void 0;
|
|
13
|
+
const uuidv7_1 = require("uuidv7");
|
|
14
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
15
|
+
const getProcessGuidNewSortable = (qpqConfig) => {
|
|
16
|
+
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
return (0, quidproquo_core_1.actionResult)((0, uuidv7_1.uuidv7)());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const getGuidNewSortableActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
return ({
|
|
22
|
+
[quidproquo_core_1.GuidActionType.NewSortable]: getProcessGuidNewSortable(qpqConfig),
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
exports.getGuidNewSortableActionProcessor = getGuidNewSortableActionProcessor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getGuidProcessor = void 0;
|
|
13
|
+
const getGuidNewActionProcessor_1 = require("./getGuidNewActionProcessor");
|
|
14
|
+
const getGuidNewSortableActionProcessor_1 = require("./getGuidNewSortableActionProcessor");
|
|
15
|
+
const getGuidProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (Object.assign(Object.assign({}, (yield (0, getGuidNewActionProcessor_1.getGuidNewActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getGuidNewSortableActionProcessor_1.getGuidNewSortableActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
17
|
+
});
|
|
18
|
+
exports.getGuidProcessor = getGuidProcessor;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export * from './claudeAi';
|
|
3
|
+
export * from './date';
|
|
4
|
+
export * from './error';
|
|
5
|
+
export * from './guid';
|
|
6
|
+
export * from './log';
|
|
7
|
+
export * from './math';
|
|
8
|
+
export * from './network';
|
|
9
|
+
export * from './platform';
|
|
10
|
+
export * from './system';
|
|
11
|
+
export * from './config';
|
|
12
|
+
export * from './context';
|
|
13
|
+
export * from './customActions';
|
|
14
|
+
export declare const getCoreActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,16 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
4
24
|
};
|
|
5
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
26
|
+
exports.getCoreActionProcessor = void 0;
|
|
27
|
+
const claudeAi_1 = require("./claudeAi");
|
|
28
|
+
const date_1 = require("./date");
|
|
29
|
+
const error_1 = require("./error");
|
|
30
|
+
const guid_1 = require("./guid");
|
|
31
|
+
const log_1 = require("./log");
|
|
32
|
+
const math_1 = require("./math");
|
|
33
|
+
const network_1 = require("./network");
|
|
34
|
+
const platform_1 = require("./platform");
|
|
35
|
+
const system_1 = require("./system");
|
|
36
|
+
const config_1 = require("./config");
|
|
37
|
+
const context_1 = require("./context");
|
|
38
|
+
__exportStar(require("./claudeAi"), exports);
|
|
39
|
+
__exportStar(require("./date"), exports);
|
|
40
|
+
__exportStar(require("./error"), exports);
|
|
41
|
+
__exportStar(require("./guid"), exports);
|
|
42
|
+
__exportStar(require("./log"), exports);
|
|
43
|
+
__exportStar(require("./math"), exports);
|
|
44
|
+
__exportStar(require("./network"), exports);
|
|
45
|
+
__exportStar(require("./platform"), exports);
|
|
46
|
+
__exportStar(require("./system"), exports);
|
|
47
|
+
__exportStar(require("./config"), exports);
|
|
48
|
+
__exportStar(require("./context"), exports);
|
|
49
|
+
// Custom actions is not done here, as it has to be done last after all
|
|
50
|
+
__exportStar(require("./customActions"), exports);
|
|
51
|
+
const getCoreActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
|
+
return (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (yield (0, config_1.getConfigActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, context_1.getContextActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, claudeAi_1.getClaudeAiActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, date_1.getDateActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, error_1.getErrorActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, guid_1.getGuidProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, log_1.getLogActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, math_1.getMathActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, network_1.getNetworkActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, platform_1.getPlatformActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, system_1.getSystemActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
53
|
+
});
|
|
54
|
+
exports.getCoreActionProcessor = getCoreActionProcessor;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getLogCreateActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessLogCreate = (qpqConfig) => {
|
|
15
|
+
return ({ msg, logLevel, data }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
if (data) {
|
|
17
|
+
console.log(`${logLevel}: ${msg}`, data);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
console.log(`${logLevel}: ${msg}`);
|
|
21
|
+
}
|
|
22
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const getLogCreateActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
return ({
|
|
27
|
+
[quidproquo_core_1.LogActionType.Create]: getProcessLogCreate(qpqConfig),
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
exports.getLogCreateActionProcessor = getLogCreateActionProcessor;
|
|
@@ -9,10 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
exports.getLogActionProcessor = void 0;
|
|
13
|
+
const getLogCreateActionProcessor_1 = require("./getLogCreateActionProcessor");
|
|
14
|
+
const getLogActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getLogCreateActionProcessor_1.getLogCreateActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
15
16
|
});
|
|
16
|
-
exports.
|
|
17
|
-
[quidproquo_core_1.MathActionType.RandomNumber]: processMathRandomNumber,
|
|
18
|
-
};
|
|
17
|
+
exports.getLogActionProcessor = getLogActionProcessor;
|