quidproquo-actionprocessor-awslambda 0.0.197 → 0.0.199
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/getActionProcessor/core/event/apiGatwayEvent/api/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/autoRespond.js +47 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/getRecords.js +47 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/matchStory.js +45 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/transformResponseResult.js +64 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/types.d.ts +10 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/api/types.js +2 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/index.d.ts +2 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/index.js +18 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/autoRespond.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/getRecords.js +38 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/matchStory.js +43 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/transformResponseResult.js +29 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/types.d.ts +16 -0
- package/lib/commonjs/getActionProcessor/core/event/apiGatwayEvent/websocket/types.js +5 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/autoRespond.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/getRecords.js +39 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/matchStory.js +43 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/transformResponseResult.js +71 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/types.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/cloudFrontOriginRequest/types.js +2 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/autoRespond.js +46 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/getRecords.js +45 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/matchStory.js +45 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/transformResponseResult.js +30 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/types.d.ts +9 -0
- package/lib/commonjs/getActionProcessor/core/event/cognitoCustomMessage/types.js +4 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/autoRespond.js +26 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getRecords.js +44 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/matchStory.js +31 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/transformResponseResult.js +28 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/types.d.ts +15 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/types.js +2 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/index.d.ts +2 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/index.js +18 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/autoRespond.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getRecords.js +27 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/matchStory.js +28 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/transformResponseResult.js +28 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.d.ts +7 -0
- package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.js +2 -0
- package/lib/commonjs/getActionProcessor/core/event/index.d.ts +7 -0
- package/lib/commonjs/getActionProcessor/core/event/index.js +23 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/index.d.ts +1 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/index.js +17 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/autoRespond.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/getRecords.js +26 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/{getServiceFunctionExecuteEventActionProcessor.js → lambda/serviceFunction/matchStory.js} +3 -21
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/transformResponseResult.js +25 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/types.d.ts +11 -0
- package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/types.js +2 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/autoRespond.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/getRecords.js +33 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/getStorySession.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/matchStory.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/matchStory.js +23 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/transformResponseResult.js +28 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/types.d.ts +10 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/fileEvent/types.js +6 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/index.d.ts +1 -0
- package/lib/commonjs/getActionProcessor/core/event/s3/index.js +17 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/index.d.ts +1 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/index.js +17 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/autoRespond.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/autoRespond.js +22 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/getRecords.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/getRecords.js +35 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/getStorySession.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/getStorySession.js +28 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/index.d.ts +8 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/index.js +13 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/matchStory.d.ts +7 -0
- package/lib/commonjs/getActionProcessor/core/event/{getSQSEventRecordActionProcessor.js → sqs/queue/matchStory.js} +5 -28
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/transformResponseResult.d.ts +6 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/transformResponseResult.js +35 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/types.d.ts +12 -0
- package/lib/commonjs/getActionProcessor/core/event/sqs/queue/types.js +2 -0
- package/lib/commonjs/getActionProcessor/core/index.d.ts +1 -10
- package/lib/commonjs/getActionProcessor/core/index.js +16 -21
- package/lib/commonjs/getActionProcessor/core/system/getExecuteStoryActionProcessor.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/core/system/getExecuteStoryActionProcessor.js +7 -1
- package/lib/commonjs/getActionProcessor/core/system/index.d.ts +1 -1
- package/lib/commonjs/getActionProcessor/webserver/serviceFunction/getServiceFunctionActionProcessor.js +6 -3
- package/package.json +5 -5
- package/lib/commonjs/getActionProcessor/core/event/getAPIGatewayEventActionProcessor.d.ts +0 -12
- package/lib/commonjs/getActionProcessor/core/event/getAPIGatewayEventActionProcessor.js +0 -127
- package/lib/commonjs/getActionProcessor/core/event/getCloudFrontOriginRequestEventActionProcessor.d.ts +0 -11
- package/lib/commonjs/getActionProcessor/core/event/getCloudFrontOriginRequestEventActionProcessor.js +0 -73
- package/lib/commonjs/getActionProcessor/core/event/getCustomResourceCloudflareDnsEventActionProcessor.d.ts +0 -12
- package/lib/commonjs/getActionProcessor/core/event/getCustomResourceCloudflareDnsEventActionProcessor.js +0 -80
- package/lib/commonjs/getActionProcessor/core/event/getEventBridgeEventActionProcessor.d.ts +0 -13
- package/lib/commonjs/getActionProcessor/core/event/getEventBridgeEventActionProcessor.js +0 -49
- package/lib/commonjs/getActionProcessor/core/event/getEventBridgeEventStackDeployActionProcessor.d.ts +0 -18
- package/lib/commonjs/getActionProcessor/core/event/getEventBridgeEventStackDeployActionProcessor.js +0 -75
- package/lib/commonjs/getActionProcessor/core/event/getLambdaCognitoCustomMessage.d.ts +0 -12
- package/lib/commonjs/getActionProcessor/core/event/getLambdaCognitoCustomMessage.js +0 -104
- package/lib/commonjs/getActionProcessor/core/event/getS3FileEventActionProcessor.d.ts +0 -12
- package/lib/commonjs/getActionProcessor/core/event/getS3FileEventActionProcessor.js +0 -54
- package/lib/commonjs/getActionProcessor/core/event/getSQSEventRecordActionProcessor.d.ts +0 -13
- package/lib/commonjs/getActionProcessor/core/event/getServiceFunctionExecuteEventActionProcessor.d.ts +0 -14
- package/lib/commonjs/getActionProcessor/core/event/getWebsocketAPIGatewayEventActionProcessor.d.ts +0 -22
- package/lib/commonjs/getActionProcessor/core/event/getWebsocketAPIGatewayEventActionProcessor.js +0 -82
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/getStorySession.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessGetStorySession = (qpqConfig) => {
|
|
14
|
+
return ({ qpqEventRecord, eventParams }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.default = (qpqConfig) => {
|
|
19
|
+
return {
|
|
20
|
+
[quidproquo_core_1.EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QPQConfig } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventBridgeStackDeployEventActionProcessor: (qpqConfig: QPQConfig) => {
|
|
3
|
+
"@quidproquo-core/event/TransformResponseResult": import("quidproquo-core").EventTransformResponseResultActionProcessor<import("./types").EventInput, void, void>;
|
|
4
|
+
"@quidproquo-core/event/AutoRespond": import("quidproquo-core").EventAutoRespondActionProcessor<import("quidproquo-core").DeployEvent, import("./types").MatchResult, void>;
|
|
5
|
+
"@quidproquo-core/event/MatchStory": import("quidproquo-core").EventMatchStoryActionProcessor<import("quidproquo-core").DeployEvent, import("./types").MatchResult>;
|
|
6
|
+
"@quidproquo-core/Event/GetRecords": import("quidproquo-core").EventGetRecordsActionProcessor<import("./types").EventInput, import("quidproquo-core").DeployEvent>;
|
|
7
|
+
"@quidproquo-core/event/GetStorySession": import("quidproquo-core").EventGetStorySessionActionProcessor<import("./types").EventInput, import("quidproquo-core").DeployEvent>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEventBridgeStackDeployEventActionProcessor = void 0;
|
|
7
|
+
const autoRespond_1 = __importDefault(require("./autoRespond"));
|
|
8
|
+
const getRecords_1 = __importDefault(require("./getRecords"));
|
|
9
|
+
const matchStory_1 = __importDefault(require("./matchStory"));
|
|
10
|
+
const transformResponseResult_1 = __importDefault(require("./transformResponseResult"));
|
|
11
|
+
const getStorySession_1 = __importDefault(require("./getStorySession"));
|
|
12
|
+
const getEventBridgeStackDeployEventActionProcessor = (qpqConfig) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, getStorySession_1.default)(qpqConfig)), (0, getRecords_1.default)(qpqConfig)), (0, matchStory_1.default)(qpqConfig)), (0, autoRespond_1.default)(qpqConfig)), (0, transformResponseResult_1.default)(qpqConfig)));
|
|
13
|
+
exports.getEventBridgeStackDeployEventActionProcessor = getEventBridgeStackDeployEventActionProcessor;
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/deployStack/matchStory.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventMatchStoryActionProcessor, QPQConfig } from 'quidproquo-core';
|
|
2
|
+
import { MatchResult } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/MatchStory": EventMatchStoryActionProcessor<import("quidproquo-core").DeployEvent, MatchResult>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
// TODO: Globals? Are these bad....
|
|
14
|
+
const GLOBAL_DEPLOY_EVENT_NAME = process.env.deployEventConfigName;
|
|
15
|
+
const getProcessMatchStory = (qpqConfig) => {
|
|
16
|
+
const deployConfig = quidproquo_core_1.qpqCoreUtils.getDeployEventConfigs(qpqConfig).find((c) => c.name === GLOBAL_DEPLOY_EVENT_NAME);
|
|
17
|
+
return ({ qpqEventRecord }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
if (!deployConfig) {
|
|
19
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.NotFound, `Could not find deploy event config ${GLOBAL_DEPLOY_EVENT_NAME}`);
|
|
20
|
+
}
|
|
21
|
+
return (0, quidproquo_core_1.actionResult)({
|
|
22
|
+
src: deployConfig.src.src,
|
|
23
|
+
runtime: deployConfig.src.runtime,
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
exports.default = (qpqConfig) => {
|
|
28
|
+
return {
|
|
29
|
+
[quidproquo_core_1.EventActionType.MatchStory]: getProcessMatchStory(qpqConfig),
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventTransformResponseResultActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { EventInput } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/TransformResponseResult": EventTransformResponseResultActionProcessor<EventInput, void, void>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessTransformResponseResult = (qpqConfig) => {
|
|
14
|
+
return ({ eventParams, qpqEventRecordResponses }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const [record] = qpqEventRecordResponses;
|
|
16
|
+
// Throw back to caller if the logic errors..
|
|
17
|
+
if (!record.success) {
|
|
18
|
+
return (0, quidproquo_core_1.actionResultError)(record.error.errorType, record.error.errorText, record.error.errorStack);
|
|
19
|
+
}
|
|
20
|
+
// Transform back to api gateway
|
|
21
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.default = (qpqConfig) => {
|
|
25
|
+
return {
|
|
26
|
+
[quidproquo_core_1.EventActionType.TransformResponseResult]: getProcessTransformResponseResult(qpqConfig),
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventBridgeEvent, Context } from 'aws-lambda';
|
|
2
|
+
import { DeployEvent, DeployEventResponse, MatchStoryResult } from 'quidproquo-core';
|
|
3
|
+
interface CloudFormationEventDetail {
|
|
4
|
+
'stack-id': string;
|
|
5
|
+
'status-details': {
|
|
6
|
+
status: string;
|
|
7
|
+
'status-reason': string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export type EventInput = [EventBridgeEvent<'CloudFormation Stack Status Change', CloudFormationEventDetail>, Context];
|
|
11
|
+
export type EventOutput = void;
|
|
12
|
+
export type InternalEventRecord = DeployEvent;
|
|
13
|
+
export type InternalEventOutput = DeployEventResponse;
|
|
14
|
+
export type MatchResult = MatchStoryResult<any, any>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./recurringSchedule"), exports);
|
|
18
|
+
__exportStar(require("./deployStack"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventAutoRespondActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { InternalEventRecord, MatchResult } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/AutoRespond": EventAutoRespondActionProcessor<InternalEventRecord, MatchResult, void>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/autoRespond.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessAutoRespond = (qpqConfig) => {
|
|
14
|
+
return ({ qpqEventRecord, matchResult }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (0, quidproquo_core_1.actionResult)(null);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.default = (qpqConfig) => {
|
|
19
|
+
return {
|
|
20
|
+
[quidproquo_core_1.EventActionType.AutoRespond]: getProcessAutoRespond(qpqConfig),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventGetRecordsActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { EventInput, InternalEventRecord } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/Event/GetRecords": EventGetRecordsActionProcessor<EventInput, InternalEventRecord>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/getRecords.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessGetRecords = (qpqConfig) => {
|
|
14
|
+
return ({ eventParams: [eventBridgeEvent, context] }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const internalEventRecord = {
|
|
16
|
+
time: eventBridgeEvent.time,
|
|
17
|
+
correlation: context.awsRequestId,
|
|
18
|
+
detail: eventBridgeEvent.detail,
|
|
19
|
+
};
|
|
20
|
+
return (0, quidproquo_core_1.actionResult)([internalEventRecord]);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
exports.default = (qpqConfig) => {
|
|
24
|
+
return {
|
|
25
|
+
[quidproquo_core_1.EventActionType.GetRecords]: getProcessGetRecords(qpqConfig),
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventGetStorySessionActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { EventInput, InternalEventRecord } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/GetStorySession": EventGetStorySessionActionProcessor<EventInput, InternalEventRecord>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessGetStorySession = (qpqConfig) => {
|
|
14
|
+
return ({ qpqEventRecord, eventParams }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.default = (qpqConfig) => {
|
|
19
|
+
return {
|
|
20
|
+
[quidproquo_core_1.EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
21
|
+
};
|
|
22
|
+
};
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QPQConfig } from 'quidproquo-core';
|
|
2
|
+
export declare const getEventBridgeEventActionProcessor: (qpqConfig: QPQConfig) => {
|
|
3
|
+
"@quidproquo-core/event/TransformResponseResult": import("quidproquo-core").EventTransformResponseResultActionProcessor<import("./types").EventInput, void, void>;
|
|
4
|
+
"@quidproquo-core/event/AutoRespond": import("quidproquo-core").EventAutoRespondActionProcessor<import("./types").InternalEventRecord, import("./types").MatchResult, void>;
|
|
5
|
+
"@quidproquo-core/event/MatchStory": import("quidproquo-core").EventMatchStoryActionProcessor<import("./types").InternalEventRecord, import("./types").MatchResult>;
|
|
6
|
+
"@quidproquo-core/Event/GetRecords": import("quidproquo-core").EventGetRecordsActionProcessor<import("./types").EventInput, import("./types").InternalEventRecord>;
|
|
7
|
+
"@quidproquo-core/event/GetStorySession": import("quidproquo-core").EventGetStorySessionActionProcessor<import("./types").EventInput, import("./types").InternalEventRecord>;
|
|
8
|
+
};
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getEventBridgeEventActionProcessor = void 0;
|
|
7
|
+
const autoRespond_1 = __importDefault(require("./autoRespond"));
|
|
8
|
+
const getRecords_1 = __importDefault(require("./getRecords"));
|
|
9
|
+
const matchStory_1 = __importDefault(require("./matchStory"));
|
|
10
|
+
const transformResponseResult_1 = __importDefault(require("./transformResponseResult"));
|
|
11
|
+
const getStorySession_1 = __importDefault(require("./getStorySession"));
|
|
12
|
+
const getEventBridgeEventActionProcessor = (qpqConfig) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, getStorySession_1.default)(qpqConfig)), (0, getRecords_1.default)(qpqConfig)), (0, matchStory_1.default)(qpqConfig)), (0, autoRespond_1.default)(qpqConfig)), (0, transformResponseResult_1.default)(qpqConfig)));
|
|
13
|
+
exports.getEventBridgeEventActionProcessor = getEventBridgeEventActionProcessor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventMatchStoryActionProcessor, QPQConfig } from 'quidproquo-core';
|
|
2
|
+
import { InternalEventRecord, MatchResult } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/MatchStory": EventMatchStoryActionProcessor<InternalEventRecord, MatchResult>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/matchStory.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
// TODO: Clean this shit up
|
|
14
|
+
const lambdaRuntimeConfig = JSON.parse(process.env.lambdaRuntimeConfig || '{}');
|
|
15
|
+
const getProcessMatchStory = (qpqConfig) => {
|
|
16
|
+
return ({ qpqEventRecord }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
+
return (0, quidproquo_core_1.actionResult)({
|
|
18
|
+
src: lambdaRuntimeConfig.src,
|
|
19
|
+
runtime: lambdaRuntimeConfig.runtime,
|
|
20
|
+
runtimeOptions: {},
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.default = (qpqConfig) => {
|
|
25
|
+
return {
|
|
26
|
+
[quidproquo_core_1.EventActionType.MatchStory]: getProcessMatchStory(qpqConfig),
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventTransformResponseResultActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { EventInput } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/TransformResponseResult": EventTransformResponseResultActionProcessor<EventInput, void, void>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessTransformResponseResult = (qpqConfig) => {
|
|
14
|
+
return ({ eventParams, qpqEventRecordResponses }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const [record] = qpqEventRecordResponses;
|
|
16
|
+
// Throw back to caller if the logic errors..
|
|
17
|
+
if (!record.success) {
|
|
18
|
+
return (0, quidproquo_core_1.actionResultError)(record.error.errorType, record.error.errorText, record.error.errorStack);
|
|
19
|
+
}
|
|
20
|
+
// Transform back to api gateway
|
|
21
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.default = (qpqConfig) => {
|
|
25
|
+
return {
|
|
26
|
+
[quidproquo_core_1.EventActionType.TransformResponseResult]: getProcessTransformResponseResult(qpqConfig),
|
|
27
|
+
};
|
|
28
|
+
};
|
package/lib/commonjs/getActionProcessor/core/event/eventBridgeEvent/recurringSchedule/types.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EventBridgeEvent, Context } from 'aws-lambda';
|
|
2
|
+
import { MatchStoryResult, ScheduledEventParams } from 'quidproquo-core';
|
|
3
|
+
export type EventInput = [EventBridgeEvent<any, any>, Context];
|
|
4
|
+
export type EventOutput = void;
|
|
5
|
+
export type InternalEventRecord = ScheduledEventParams<any>;
|
|
6
|
+
export type InternalEventOutput = void;
|
|
7
|
+
export type MatchResult = MatchStoryResult<{}, any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./apiGatwayEvent"), exports);
|
|
18
|
+
__exportStar(require("./cloudFrontOriginRequest"), exports);
|
|
19
|
+
__exportStar(require("./eventBridgeEvent"), exports);
|
|
20
|
+
__exportStar(require("./cognitoCustomMessage"), exports);
|
|
21
|
+
__exportStar(require("./s3"), exports);
|
|
22
|
+
__exportStar(require("./lambda"), exports);
|
|
23
|
+
__exportStar(require("./sqs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './serviceFunction';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./serviceFunction"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventAutoRespondActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { InternalEventRecord, MatchResult } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/AutoRespond": EventAutoRespondActionProcessor<InternalEventRecord, MatchResult, any>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessAutoRespond = (qpqConfig) => {
|
|
14
|
+
return ({ qpqEventRecord, matchResult }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (0, quidproquo_core_1.actionResult)(null);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.default = (qpqConfig) => {
|
|
19
|
+
return {
|
|
20
|
+
[quidproquo_core_1.EventActionType.AutoRespond]: getProcessAutoRespond(qpqConfig),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventGetRecordsActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { EventInput, InternalEventRecord } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/Event/GetRecords": EventGetRecordsActionProcessor<EventInput, InternalEventRecord>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessGetRecords = (qpqConfig) => {
|
|
14
|
+
return ({ eventParams: [event, context] }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
const internalEventRecord = {
|
|
16
|
+
functionName: event.functionName,
|
|
17
|
+
payload: event.payload,
|
|
18
|
+
};
|
|
19
|
+
return (0, quidproquo_core_1.actionResult)([internalEventRecord]);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.default = (qpqConfig) => {
|
|
23
|
+
return {
|
|
24
|
+
[quidproquo_core_1.EventActionType.GetRecords]: getProcessGetRecords(qpqConfig),
|
|
25
|
+
};
|
|
26
|
+
};
|
package/lib/commonjs/getActionProcessor/core/event/lambda/serviceFunction/getStorySession.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { QPQConfig, EventGetStorySessionActionProcessor } from 'quidproquo-core';
|
|
2
|
+
import { EventInput, InternalEventRecord } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/GetStorySession": EventGetStorySessionActionProcessor<EventInput, InternalEventRecord>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
|
+
const getProcessGetStorySession = (qpqConfig) => {
|
|
14
|
+
return ({ qpqEventRecord, eventParams }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
return (0, quidproquo_core_1.actionResult)(void 0);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.default = (qpqConfig) => {
|
|
19
|
+
return {
|
|
20
|
+
[quidproquo_core_1.EventActionType.GetStorySession]: getProcessGetStorySession(qpqConfig),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { QPQConfig } from 'quidproquo-core';
|
|
2
|
+
export declare const getLambdaServiceFunctionEventProcessor: (qpqConfig: QPQConfig) => {
|
|
3
|
+
"@quidproquo-core/event/TransformResponseResult": import("quidproquo-core").EventTransformResponseResultActionProcessor<import("./types").EventInput, any, import("./types").EventOutput>;
|
|
4
|
+
"@quidproquo-core/event/AutoRespond": import("quidproquo-core").EventAutoRespondActionProcessor<import("./types").InternalEventRecord, import("./types").MatchResult, any>;
|
|
5
|
+
"@quidproquo-core/event/MatchStory": import("quidproquo-core").EventMatchStoryActionProcessor<import("./types").InternalEventRecord, import("./types").MatchResult>;
|
|
6
|
+
"@quidproquo-core/Event/GetRecords": import("quidproquo-core").EventGetRecordsActionProcessor<import("./types").EventInput, import("./types").InternalEventRecord>;
|
|
7
|
+
"@quidproquo-core/event/GetStorySession": import("quidproquo-core").EventGetStorySessionActionProcessor<import("./types").EventInput, import("./types").InternalEventRecord>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getLambdaServiceFunctionEventProcessor = void 0;
|
|
7
|
+
const autoRespond_1 = __importDefault(require("./autoRespond"));
|
|
8
|
+
const getRecords_1 = __importDefault(require("./getRecords"));
|
|
9
|
+
const matchStory_1 = __importDefault(require("./matchStory"));
|
|
10
|
+
const transformResponseResult_1 = __importDefault(require("./transformResponseResult"));
|
|
11
|
+
const getStorySession_1 = __importDefault(require("./getStorySession"));
|
|
12
|
+
const getLambdaServiceFunctionEventProcessor = (qpqConfig) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, getStorySession_1.default)(qpqConfig)), (0, getRecords_1.default)(qpqConfig)), (0, matchStory_1.default)(qpqConfig)), (0, autoRespond_1.default)(qpqConfig)), (0, transformResponseResult_1.default)(qpqConfig)));
|
|
13
|
+
exports.getLambdaServiceFunctionEventProcessor = getLambdaServiceFunctionEventProcessor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventMatchStoryActionProcessor, QPQConfig } from 'quidproquo-core';
|
|
2
|
+
import { InternalEventRecord, MatchResult } from './types';
|
|
3
|
+
declare const _default: (qpqConfig: QPQConfig) => {
|
|
4
|
+
"@quidproquo-core/event/MatchStory": EventMatchStoryActionProcessor<InternalEventRecord, MatchResult>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
@@ -11,28 +11,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const quidproquo_core_1 = require("quidproquo-core");
|
|
13
13
|
const quidproquo_webserver_1 = require("quidproquo-webserver");
|
|
14
|
-
const getProcessTransformEventParams = (qpqConfig) => {
|
|
15
|
-
return ({ eventParams: [executeServiceFunctionEvent, context] }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
return (0, quidproquo_core_1.actionResult)(executeServiceFunctionEvent);
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const getProcessTransformResponseResult = (qpqConfig) => {
|
|
20
|
-
return (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
return (0, quidproquo_core_1.actionResult)(payload.response);
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
const getProcessAutoRespond = (qpqConfig) => {
|
|
25
|
-
return (payload) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
return (0, quidproquo_core_1.actionResult)(null);
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
14
|
const getProcessMatchStory = (qpqConfig) => {
|
|
30
15
|
const serviceFunctions = quidproquo_webserver_1.qpqWebServerUtils.getAllServiceFunctions(qpqConfig);
|
|
31
|
-
return ({
|
|
16
|
+
return ({ qpqEventRecord }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
17
|
// Find the most relevant match
|
|
33
|
-
const matchedRoute = serviceFunctions.find((sf) => sf.functionName ===
|
|
18
|
+
const matchedRoute = serviceFunctions.find((sf) => sf.functionName === qpqEventRecord.functionName);
|
|
34
19
|
if (!matchedRoute) {
|
|
35
|
-
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.NotFound, `service function not found [${
|
|
20
|
+
return (0, quidproquo_core_1.actionResultError)(quidproquo_core_1.ErrorTypeEnum.NotFound, `service function not found [${qpqEventRecord.functionName}]`);
|
|
36
21
|
}
|
|
37
22
|
return (0, quidproquo_core_1.actionResult)({
|
|
38
23
|
src: matchedRoute.src,
|
|
@@ -42,9 +27,6 @@ const getProcessMatchStory = (qpqConfig) => {
|
|
|
42
27
|
};
|
|
43
28
|
exports.default = (qpqConfig) => {
|
|
44
29
|
return {
|
|
45
|
-
[quidproquo_core_1.EventActionType.TransformEventParams]: getProcessTransformEventParams(qpqConfig),
|
|
46
|
-
[quidproquo_core_1.EventActionType.TransformResponseResult]: getProcessTransformResponseResult(qpqConfig),
|
|
47
|
-
[quidproquo_core_1.EventActionType.AutoRespond]: getProcessAutoRespond(qpqConfig),
|
|
48
30
|
[quidproquo_core_1.EventActionType.MatchStory]: getProcessMatchStory(qpqConfig),
|
|
49
31
|
};
|
|
50
32
|
};
|