quidproquo-actionprocessor-node 0.0.253 → 0.0.255
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 -2
- package/lib/commonjs/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.js +74 -64
- package/lib/commonjs/actionProcessor/core/claudeAi/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/claudeAi/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/config/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/config/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/context/getContextListActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/context/getContextListActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/context/getContextReadActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/context/getContextReadActionProcessor.js +27 -27
- package/lib/commonjs/actionProcessor/core/context/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/context/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/customActions/getCustomActionActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/customActions/getCustomActionActionProcessor.js +58 -58
- package/lib/commonjs/actionProcessor/core/customActions/index.d.ts +1 -1
- package/lib/commonjs/actionProcessor/core/customActions/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/date/getDateNowActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/date/getDateNowActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/date/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/date/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/error/getErrorThrowErrorActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/error/getErrorThrowErrorActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/error/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/error/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewSortableActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/guid/getGuidNewSortableActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/guid/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/guid/index.js +18 -18
- package/lib/commonjs/actionProcessor/core/index.d.ts +14 -14
- package/lib/commonjs/actionProcessor/core/index.js +54 -54
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogCreateActionProcessor.js +30 -30
- package/lib/commonjs/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.js +25 -25
- package/lib/commonjs/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.js +26 -26
- package/lib/commonjs/actionProcessor/core/log/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/log/index.js +19 -19
- package/lib/commonjs/actionProcessor/core/math/getMathRandomNumberActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/math/getMathRandomNumberActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/math/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/math/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/network/getNetworkRequestActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/network/getNetworkRequestActionProcessor.js +150 -150
- package/lib/commonjs/actionProcessor/core/network/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/network/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/platform/getPlatformDelayActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/platform/getPlatformDelayActionProcessor.js +24 -24
- package/lib/commonjs/actionProcessor/core/platform/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/platform/index.js +17 -17
- package/lib/commonjs/actionProcessor/core/system/getSystemBatchActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/system/getSystemBatchActionProcessor.js +51 -51
- package/lib/commonjs/actionProcessor/core/system/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/core/system/index.js +17 -17
- package/lib/commonjs/actionProcessor/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/index.js +18 -18
- package/lib/commonjs/actionProcessor/webserver/dns/getDnsListActionProcessor.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/dns/getDnsListActionProcessor.js +26 -26
- package/lib/commonjs/actionProcessor/webserver/dns/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/dns/index.js +17 -17
- package/lib/commonjs/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/commonjs/actionProcessor/webserver/index.js +17 -17
- package/lib/commonjs/index.d.ts +1 -1
- package/lib/commonjs/index.js +17 -17
- package/lib/esm/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/claudeAi/getClaudeAiMessagesApiActionProcessor.js +26 -26
- package/lib/esm/actionProcessor/core/claudeAi/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/claudeAi/index.js +4 -4
- package/lib/esm/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/getConfigGetApplicationInfoActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/config/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/config/index.js +4 -4
- package/lib/esm/actionProcessor/core/context/getContextListActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/context/getContextListActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/context/getContextReadActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/context/getContextReadActionProcessor.js +12 -12
- package/lib/esm/actionProcessor/core/context/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/context/index.js +6 -6
- package/lib/esm/actionProcessor/core/customActions/getCustomActionActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/customActions/getCustomActionActionProcessor.js +43 -43
- package/lib/esm/actionProcessor/core/customActions/index.d.ts +1 -1
- package/lib/esm/actionProcessor/core/customActions/index.js +2 -2
- package/lib/esm/actionProcessor/core/date/getDateNowActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/date/getDateNowActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/date/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/date/index.js +4 -4
- package/lib/esm/actionProcessor/core/error/getErrorThrowErrorActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/error/getErrorThrowErrorActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/error/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/error/index.js +4 -4
- package/lib/esm/actionProcessor/core/guid/getGuidNewActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/guid/getGuidNewActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/guid/getGuidNewSortableActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/guid/getGuidNewSortableActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/guid/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/guid/index.js +6 -6
- package/lib/esm/actionProcessor/core/index.d.ts +14 -14
- package/lib/esm/actionProcessor/core/index.js +37 -37
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogCreateActionProcessor.js +15 -15
- package/lib/esm/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogDisableEventHistoryActionProcessor.js +10 -10
- package/lib/esm/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/getLogTemplateLiteralActionProcessor.js +11 -11
- package/lib/esm/actionProcessor/core/log/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/log/index.js +8 -8
- package/lib/esm/actionProcessor/core/math/getMathRandomNumberActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/math/getMathRandomNumberActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/math/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/math/index.js +4 -4
- package/lib/esm/actionProcessor/core/network/getNetworkRequestActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/network/getNetworkRequestActionProcessor.js +134 -134
- package/lib/esm/actionProcessor/core/network/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/network/index.js +4 -4
- package/lib/esm/actionProcessor/core/platform/getPlatformDelayActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/platform/getPlatformDelayActionProcessor.js +9 -9
- package/lib/esm/actionProcessor/core/platform/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/platform/index.js +4 -4
- package/lib/esm/actionProcessor/core/system/getSystemBatchActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/core/system/getSystemBatchActionProcessor.js +36 -36
- package/lib/esm/actionProcessor/core/system/index.d.ts +2 -2
- package/lib/esm/actionProcessor/core/system/index.js +4 -4
- package/lib/esm/actionProcessor/index.d.ts +2 -2
- package/lib/esm/actionProcessor/index.js +2 -2
- package/lib/esm/actionProcessor/webserver/dns/getDnsListActionProcessor.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/dns/getDnsListActionProcessor.js +11 -11
- package/lib/esm/actionProcessor/webserver/dns/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/dns/index.js +4 -4
- package/lib/esm/actionProcessor/webserver/index.d.ts +2 -2
- package/lib/esm/actionProcessor/webserver/index.js +4 -4
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/package.json +5 -5
|
@@ -1,25 +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.getLogDisableEventHistoryActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
const getProcessLogDisableEventHistory = (qpqConfig) => {
|
|
15
|
-
return (
|
|
16
|
-
yield logger.enableLogs(enable, reason, session.correlation || '');
|
|
17
|
-
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
const getLogDisableEventHistoryActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
return ({
|
|
22
|
-
[quidproquo_core_1.LogActionType.DisableEventHistory]: getProcessLogDisableEventHistory(qpqConfig),
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
exports.getLogDisableEventHistoryActionProcessor = getLogDisableEventHistoryActionProcessor;
|
|
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.getLogDisableEventHistoryActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessLogDisableEventHistory = (qpqConfig) => {
|
|
15
|
+
return (_a, session_1, _actionProcessors_1, logger_1) => __awaiter(void 0, [_a, session_1, _actionProcessors_1, logger_1], void 0, function* ({ enable, reason }, session, _actionProcessors, logger) {
|
|
16
|
+
yield logger.enableLogs(enable, reason, session.correlation || '');
|
|
17
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const getLogDisableEventHistoryActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
return ({
|
|
22
|
+
[quidproquo_core_1.LogActionType.DisableEventHistory]: getProcessLogDisableEventHistory(qpqConfig),
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
exports.getLogDisableEventHistoryActionProcessor = getLogDisableEventHistoryActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getLogTemplateLiteralActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getLogTemplateLiteralActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,26 +1,26 @@
|
|
|
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.getLogTemplateLiteralActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
const getProcessLogTemplateLiteral = (qpqConfig) => {
|
|
15
|
-
return (
|
|
16
|
-
const message = (0, quidproquo_core_1.decomposedStringToString)(messageParts);
|
|
17
|
-
console.log(message);
|
|
18
|
-
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
const getLogTemplateLiteralActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
-
return ({
|
|
23
|
-
[quidproquo_core_1.LogActionType.TemplateLiteral]: getProcessLogTemplateLiteral(qpqConfig),
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
exports.getLogTemplateLiteralActionProcessor = getLogTemplateLiteralActionProcessor;
|
|
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.getLogTemplateLiteralActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessLogTemplateLiteral = (qpqConfig) => {
|
|
15
|
+
return (_a) => __awaiter(void 0, [_a], void 0, function* ({ messageParts }) {
|
|
16
|
+
const message = (0, quidproquo_core_1.decomposedStringToString)(messageParts);
|
|
17
|
+
console.log(message);
|
|
18
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const getLogTemplateLiteralActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
+
return ({
|
|
23
|
+
[quidproquo_core_1.LogActionType.TemplateLiteral]: getProcessLogTemplateLiteral(qpqConfig),
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
exports.getLogTemplateLiteralActionProcessor = getLogTemplateLiteralActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getLogActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getLogActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,19 +1,19 @@
|
|
|
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.getLogActionProcessor = void 0;
|
|
13
|
-
const getLogCreateActionProcessor_1 = require("./getLogCreateActionProcessor");
|
|
14
|
-
const getLogDisableEventHistoryActionProcessor_1 = require("./getLogDisableEventHistoryActionProcessor");
|
|
15
|
-
const getLogTemplateLiteralActionProcessor_1 = require("./getLogTemplateLiteralActionProcessor");
|
|
16
|
-
const getLogActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
-
return (Object.assign(Object.assign(Object.assign({}, (yield (0, getLogCreateActionProcessor_1.getLogCreateActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getLogDisableEventHistoryActionProcessor_1.getLogDisableEventHistoryActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getLogTemplateLiteralActionProcessor_1.getLogTemplateLiteralActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
18
|
-
});
|
|
19
|
-
exports.getLogActionProcessor = getLogActionProcessor;
|
|
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.getLogActionProcessor = void 0;
|
|
13
|
+
const getLogCreateActionProcessor_1 = require("./getLogCreateActionProcessor");
|
|
14
|
+
const getLogDisableEventHistoryActionProcessor_1 = require("./getLogDisableEventHistoryActionProcessor");
|
|
15
|
+
const getLogTemplateLiteralActionProcessor_1 = require("./getLogTemplateLiteralActionProcessor");
|
|
16
|
+
const getLogActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
return (Object.assign(Object.assign(Object.assign({}, (yield (0, getLogCreateActionProcessor_1.getLogCreateActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getLogDisableEventHistoryActionProcessor_1.getLogDisableEventHistoryActionProcessor)(qpqConfig, dynamicModuleLoader))), (yield (0, getLogTemplateLiteralActionProcessor_1.getLogTemplateLiteralActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
18
|
+
});
|
|
19
|
+
exports.getLogActionProcessor = getLogActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getMathRandomNumberActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getMathRandomNumberActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,24 +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.getMathRandomNumberActionProcessor = void 0;
|
|
13
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
-
const getProcessMathRandomNumber = (qpqConfig) => {
|
|
15
|
-
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
return (0, quidproquo_core_1.actionResult)(Math.random());
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const getMathRandomNumberActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
-
return ({
|
|
21
|
-
[quidproquo_core_1.MathActionType.RandomNumber]: getProcessMathRandomNumber(qpqConfig),
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
exports.getMathRandomNumberActionProcessor = getMathRandomNumberActionProcessor;
|
|
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.getMathRandomNumberActionProcessor = void 0;
|
|
13
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
14
|
+
const getProcessMathRandomNumber = (qpqConfig) => {
|
|
15
|
+
return () => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
return (0, quidproquo_core_1.actionResult)(Math.random());
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const getMathRandomNumberActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
return ({
|
|
21
|
+
[quidproquo_core_1.MathActionType.RandomNumber]: getProcessMathRandomNumber(qpqConfig),
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
exports.getMathRandomNumberActionProcessor = getMathRandomNumberActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getMathActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getMathActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,17 +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.getMathActionProcessor = void 0;
|
|
13
|
-
const getMathRandomNumberActionProcessor_1 = require("./getMathRandomNumberActionProcessor");
|
|
14
|
-
const getMathActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
return (Object.assign({}, (yield (0, getMathRandomNumberActionProcessor_1.getMathRandomNumberActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
-
});
|
|
17
|
-
exports.getMathActionProcessor = getMathActionProcessor;
|
|
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.getMathActionProcessor = void 0;
|
|
13
|
+
const getMathRandomNumberActionProcessor_1 = require("./getMathRandomNumberActionProcessor");
|
|
14
|
+
const getMathActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getMathRandomNumberActionProcessor_1.getMathRandomNumberActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getMathActionProcessor = getMathActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getNetworkRequestActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getNetworkRequestActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,150 +1,150 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.getNetworkRequestActionProcessor = void 0;
|
|
16
|
-
const quidproquo_core_1 = require("quidproquo-core");
|
|
17
|
-
const axios_1 = __importDefault(require("axios"));
|
|
18
|
-
const mime_types_1 = require("mime-types");
|
|
19
|
-
const getAxiosResponseType = (responseType) => {
|
|
20
|
-
if (responseType === 'binary') {
|
|
21
|
-
return 'arraybuffer';
|
|
22
|
-
}
|
|
23
|
-
return 'json';
|
|
24
|
-
};
|
|
25
|
-
const transformResponse = (payload, response) => {
|
|
26
|
-
var _a, _b;
|
|
27
|
-
if (payload.responseType === 'binary') {
|
|
28
|
-
const headers = response.headers || {};
|
|
29
|
-
const mimeType = headers['content-type'] || 'application/octet-stream';
|
|
30
|
-
const filename = ((_b = (_a = headers['content-disposition']) === null || _a === void 0 ? void 0 : _a.match(/filename="([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1]) || `file.${(0, mime_types_1.extension)(mimeType)}`;
|
|
31
|
-
return Object.assign(Object.assign({}, response), { data: {
|
|
32
|
-
base64Data: Buffer.from(response.data).toString('base64'),
|
|
33
|
-
mimetype: mimeType,
|
|
34
|
-
filename,
|
|
35
|
-
} });
|
|
36
|
-
}
|
|
37
|
-
return response;
|
|
38
|
-
};
|
|
39
|
-
const axiosInstance = axios_1.default.create({
|
|
40
|
-
timeout: 25000,
|
|
41
|
-
headers: {
|
|
42
|
-
// Fixes: https://github.com/axios/axios/issues/5346
|
|
43
|
-
'Accept-Encoding': 'gzip,deflate,compress',
|
|
44
|
-
},
|
|
45
|
-
validateStatus: () => true,
|
|
46
|
-
});
|
|
47
|
-
const processNetworkRequestGet = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
-
const response = yield axiosInstance.get(payload.url, {
|
|
49
|
-
baseURL: payload.basePath,
|
|
50
|
-
headers: payload.headers,
|
|
51
|
-
params: payload.params,
|
|
52
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
53
|
-
});
|
|
54
|
-
return transformResponse(payload, response);
|
|
55
|
-
});
|
|
56
|
-
const processNetworkRequestPost = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
-
const response = yield axiosInstance.post(payload.url, payload.body, {
|
|
58
|
-
baseURL: payload.basePath,
|
|
59
|
-
headers: payload.headers,
|
|
60
|
-
params: payload.params,
|
|
61
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
62
|
-
});
|
|
63
|
-
return transformResponse(payload, response);
|
|
64
|
-
});
|
|
65
|
-
const processNetworkRequestDelete = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
-
const response = yield axiosInstance.delete(payload.url, {
|
|
67
|
-
baseURL: payload.basePath,
|
|
68
|
-
headers: payload.headers,
|
|
69
|
-
params: payload.params,
|
|
70
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
71
|
-
});
|
|
72
|
-
return transformResponse(payload, response);
|
|
73
|
-
});
|
|
74
|
-
const processNetworkRequestHead = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
-
const response = yield axiosInstance.head(payload.url, {
|
|
76
|
-
baseURL: payload.basePath,
|
|
77
|
-
headers: payload.headers,
|
|
78
|
-
params: payload.params,
|
|
79
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
80
|
-
});
|
|
81
|
-
return transformResponse(payload, response);
|
|
82
|
-
});
|
|
83
|
-
const processNetworkRequestOptions = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
84
|
-
const response = yield axiosInstance.options(payload.url, {
|
|
85
|
-
baseURL: payload.basePath,
|
|
86
|
-
headers: payload.headers,
|
|
87
|
-
params: payload.params,
|
|
88
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
89
|
-
});
|
|
90
|
-
return transformResponse(payload, response);
|
|
91
|
-
});
|
|
92
|
-
const processNetworkRequestPut = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
93
|
-
const response = yield axiosInstance.put(payload.url, payload.body, {
|
|
94
|
-
baseURL: payload.basePath,
|
|
95
|
-
headers: payload.headers,
|
|
96
|
-
params: payload.params,
|
|
97
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
98
|
-
});
|
|
99
|
-
return transformResponse(payload, response);
|
|
100
|
-
});
|
|
101
|
-
const processNetworkRequestPatch = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
102
|
-
const response = yield axiosInstance.patch(payload.url, payload.body, {
|
|
103
|
-
baseURL: payload.basePath,
|
|
104
|
-
headers: payload.headers,
|
|
105
|
-
params: payload.params,
|
|
106
|
-
responseType: getAxiosResponseType(payload.responseType),
|
|
107
|
-
});
|
|
108
|
-
return transformResponse(payload, response);
|
|
109
|
-
});
|
|
110
|
-
const processNetworkRequestConnect = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
-
throw new Error('Function not implemented.');
|
|
112
|
-
});
|
|
113
|
-
const requestMethodMap = {
|
|
114
|
-
GET: processNetworkRequestGet,
|
|
115
|
-
POST: processNetworkRequestPost,
|
|
116
|
-
DELETE: processNetworkRequestDelete,
|
|
117
|
-
HEAD: processNetworkRequestHead,
|
|
118
|
-
OPTIONS: processNetworkRequestOptions,
|
|
119
|
-
PUT: processNetworkRequestPut,
|
|
120
|
-
PATCH: processNetworkRequestPatch,
|
|
121
|
-
CONNECT: processNetworkRequestConnect,
|
|
122
|
-
};
|
|
123
|
-
const getProcessNetworkRequest = (qpqConfig) => {
|
|
124
|
-
return (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
125
|
-
const requestMethod = requestMethodMap[payload.method];
|
|
126
|
-
if (!requestMethod) {
|
|
127
|
-
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.NotImplemented, `${payload.method}: Not implemented`);
|
|
128
|
-
}
|
|
129
|
-
console.log(payload.url);
|
|
130
|
-
try {
|
|
131
|
-
const response = yield requestMethod(payload);
|
|
132
|
-
return (0, quidproquo_core_1.actionResult)({
|
|
133
|
-
headers: response.headers,
|
|
134
|
-
status: response.status,
|
|
135
|
-
statusText: response.statusText,
|
|
136
|
-
data: response.data,
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
catch (err) {
|
|
140
|
-
console.log(err);
|
|
141
|
-
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, err.stack);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
const getNetworkRequestActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
146
|
-
return ({
|
|
147
|
-
[quidproquo_core_1.NetworkActionType.Request]: getProcessNetworkRequest(qpqConfig),
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
exports.getNetworkRequestActionProcessor = getNetworkRequestActionProcessor;
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.getNetworkRequestActionProcessor = void 0;
|
|
16
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
18
|
+
const mime_types_1 = require("mime-types");
|
|
19
|
+
const getAxiosResponseType = (responseType) => {
|
|
20
|
+
if (responseType === 'binary') {
|
|
21
|
+
return 'arraybuffer';
|
|
22
|
+
}
|
|
23
|
+
return 'json';
|
|
24
|
+
};
|
|
25
|
+
const transformResponse = (payload, response) => {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
if (payload.responseType === 'binary') {
|
|
28
|
+
const headers = response.headers || {};
|
|
29
|
+
const mimeType = headers['content-type'] || 'application/octet-stream';
|
|
30
|
+
const filename = ((_b = (_a = headers['content-disposition']) === null || _a === void 0 ? void 0 : _a.match(/filename="([^"]+)"/)) === null || _b === void 0 ? void 0 : _b[1]) || `file.${(0, mime_types_1.extension)(mimeType)}`;
|
|
31
|
+
return Object.assign(Object.assign({}, response), { data: {
|
|
32
|
+
base64Data: Buffer.from(response.data).toString('base64'),
|
|
33
|
+
mimetype: mimeType,
|
|
34
|
+
filename,
|
|
35
|
+
} });
|
|
36
|
+
}
|
|
37
|
+
return response;
|
|
38
|
+
};
|
|
39
|
+
const axiosInstance = axios_1.default.create({
|
|
40
|
+
timeout: 25000,
|
|
41
|
+
headers: {
|
|
42
|
+
// Fixes: https://github.com/axios/axios/issues/5346
|
|
43
|
+
'Accept-Encoding': 'gzip,deflate,compress',
|
|
44
|
+
},
|
|
45
|
+
validateStatus: () => true,
|
|
46
|
+
});
|
|
47
|
+
const processNetworkRequestGet = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
+
const response = yield axiosInstance.get(payload.url, {
|
|
49
|
+
baseURL: payload.basePath,
|
|
50
|
+
headers: payload.headers,
|
|
51
|
+
params: payload.params,
|
|
52
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
53
|
+
});
|
|
54
|
+
return transformResponse(payload, response);
|
|
55
|
+
});
|
|
56
|
+
const processNetworkRequestPost = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
const response = yield axiosInstance.post(payload.url, payload.body, {
|
|
58
|
+
baseURL: payload.basePath,
|
|
59
|
+
headers: payload.headers,
|
|
60
|
+
params: payload.params,
|
|
61
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
62
|
+
});
|
|
63
|
+
return transformResponse(payload, response);
|
|
64
|
+
});
|
|
65
|
+
const processNetworkRequestDelete = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
|
+
const response = yield axiosInstance.delete(payload.url, {
|
|
67
|
+
baseURL: payload.basePath,
|
|
68
|
+
headers: payload.headers,
|
|
69
|
+
params: payload.params,
|
|
70
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
71
|
+
});
|
|
72
|
+
return transformResponse(payload, response);
|
|
73
|
+
});
|
|
74
|
+
const processNetworkRequestHead = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
+
const response = yield axiosInstance.head(payload.url, {
|
|
76
|
+
baseURL: payload.basePath,
|
|
77
|
+
headers: payload.headers,
|
|
78
|
+
params: payload.params,
|
|
79
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
80
|
+
});
|
|
81
|
+
return transformResponse(payload, response);
|
|
82
|
+
});
|
|
83
|
+
const processNetworkRequestOptions = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
84
|
+
const response = yield axiosInstance.options(payload.url, {
|
|
85
|
+
baseURL: payload.basePath,
|
|
86
|
+
headers: payload.headers,
|
|
87
|
+
params: payload.params,
|
|
88
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
89
|
+
});
|
|
90
|
+
return transformResponse(payload, response);
|
|
91
|
+
});
|
|
92
|
+
const processNetworkRequestPut = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
93
|
+
const response = yield axiosInstance.put(payload.url, payload.body, {
|
|
94
|
+
baseURL: payload.basePath,
|
|
95
|
+
headers: payload.headers,
|
|
96
|
+
params: payload.params,
|
|
97
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
98
|
+
});
|
|
99
|
+
return transformResponse(payload, response);
|
|
100
|
+
});
|
|
101
|
+
const processNetworkRequestPatch = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
102
|
+
const response = yield axiosInstance.patch(payload.url, payload.body, {
|
|
103
|
+
baseURL: payload.basePath,
|
|
104
|
+
headers: payload.headers,
|
|
105
|
+
params: payload.params,
|
|
106
|
+
responseType: getAxiosResponseType(payload.responseType),
|
|
107
|
+
});
|
|
108
|
+
return transformResponse(payload, response);
|
|
109
|
+
});
|
|
110
|
+
const processNetworkRequestConnect = (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
+
throw new Error('Function not implemented.');
|
|
112
|
+
});
|
|
113
|
+
const requestMethodMap = {
|
|
114
|
+
GET: processNetworkRequestGet,
|
|
115
|
+
POST: processNetworkRequestPost,
|
|
116
|
+
DELETE: processNetworkRequestDelete,
|
|
117
|
+
HEAD: processNetworkRequestHead,
|
|
118
|
+
OPTIONS: processNetworkRequestOptions,
|
|
119
|
+
PUT: processNetworkRequestPut,
|
|
120
|
+
PATCH: processNetworkRequestPatch,
|
|
121
|
+
CONNECT: processNetworkRequestConnect,
|
|
122
|
+
};
|
|
123
|
+
const getProcessNetworkRequest = (qpqConfig) => {
|
|
124
|
+
return (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
125
|
+
const requestMethod = requestMethodMap[payload.method];
|
|
126
|
+
if (!requestMethod) {
|
|
127
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.NotImplemented, `${payload.method}: Not implemented`);
|
|
128
|
+
}
|
|
129
|
+
console.log(payload.url);
|
|
130
|
+
try {
|
|
131
|
+
const response = yield requestMethod(payload);
|
|
132
|
+
return (0, quidproquo_core_1.actionResult)({
|
|
133
|
+
headers: response.headers,
|
|
134
|
+
status: response.status,
|
|
135
|
+
statusText: response.statusText,
|
|
136
|
+
data: response.data,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
console.log(err);
|
|
141
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.GenericError, err.stack);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
const getNetworkRequestActionProcessor = (qpqConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
|
146
|
+
return ({
|
|
147
|
+
[quidproquo_core_1.NetworkActionType.Request]: getProcessNetworkRequest(qpqConfig),
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
exports.getNetworkRequestActionProcessor = getNetworkRequestActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getNetworkActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getNetworkActionProcessor: ActionProcessorListResolver;
|
|
@@ -1,17 +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.getNetworkActionProcessor = void 0;
|
|
13
|
-
const getNetworkRequestActionProcessor_1 = require("./getNetworkRequestActionProcessor");
|
|
14
|
-
const getNetworkActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
-
return (Object.assign({}, (yield (0, getNetworkRequestActionProcessor_1.getNetworkRequestActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
-
});
|
|
17
|
-
exports.getNetworkActionProcessor = getNetworkActionProcessor;
|
|
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.getNetworkActionProcessor = void 0;
|
|
13
|
+
const getNetworkRequestActionProcessor_1 = require("./getNetworkRequestActionProcessor");
|
|
14
|
+
const getNetworkActionProcessor = (qpqConfig, dynamicModuleLoader) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (Object.assign({}, (yield (0, getNetworkRequestActionProcessor_1.getNetworkRequestActionProcessor)(qpqConfig, dynamicModuleLoader))));
|
|
16
|
+
});
|
|
17
|
+
exports.getNetworkActionProcessor = getNetworkActionProcessor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
-
export declare const getPlatformDelayActionProcessor: ActionProcessorListResolver;
|
|
1
|
+
import { ActionProcessorListResolver } from 'quidproquo-core';
|
|
2
|
+
export declare const getPlatformDelayActionProcessor: ActionProcessorListResolver;
|