quidproquo-core 0.0.18 → 0.0.19
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/actions/config/ConfigActionType.d.ts +3 -0
- package/lib/actions/config/ConfigActionType.js +7 -0
- package/lib/actions/config/ConfigGetSecretActionRequester.d.ts +2 -0
- package/lib/actions/config/ConfigGetSecretActionRequester.js +8 -0
- package/lib/actions/config/ConfigGetSecretActionTypes.d.ts +11 -0
- package/lib/actions/{date/DateActionTypes.js → config/ConfigGetSecretActionTypes.js} +0 -0
- package/lib/actions/config/index.d.ts +3 -0
- package/lib/actions/config/index.js +19 -0
- package/lib/actions/date/DateActionType.d.ts +3 -0
- package/lib/actions/date/DateActionType.js +7 -0
- package/lib/actions/date/DateNowActionRequester.d.ts +2 -0
- package/lib/actions/date/DateNowActionRequester.js +8 -0
- package/lib/actions/date/DateNowActionTypes.d.ts +9 -0
- package/lib/actions/{event/EventActionTypes.js → date/DateNowActionTypes.js} +0 -0
- package/lib/actions/date/index.d.ts +3 -3
- package/lib/actions/date/index.js +3 -3
- package/lib/actions/error/ErrorActionType.d.ts +3 -0
- package/lib/actions/error/ErrorActionType.js +7 -0
- package/lib/actions/error/ErrorThrowErrorActionRequester.d.ts +3 -0
- package/lib/actions/error/ErrorThrowErrorActionRequester.js +11 -0
- package/lib/actions/error/ErrorThrowErrorActionRequesterTypes.d.ts +14 -0
- package/lib/actions/{guid/GuidActionRequesterTypes.js → error/ErrorThrowErrorActionRequesterTypes.js} +0 -0
- package/lib/actions/error/index.d.ts +3 -0
- package/lib/actions/error/index.js +19 -0
- package/lib/actions/event/{EventActionTypeEnum.d.ts → EventActionType.d.ts} +1 -2
- package/lib/actions/event/EventActionType.js +10 -0
- package/lib/actions/event/EventAutoRespondActionRequester.d.ts +2 -0
- package/lib/actions/event/EventAutoRespondActionRequester.js +11 -0
- package/lib/actions/event/EventAutoRespondActionTypes.d.ts +11 -0
- package/lib/actions/{math/MathActionRequesterTypes.js → event/EventAutoRespondActionTypes.js} +0 -0
- package/lib/actions/event/EventMatchStoryActionRequester.d.ts +2 -0
- package/lib/actions/event/EventMatchStoryActionRequester.js +11 -0
- package/lib/actions/event/EventMatchStoryActionTypes.d.ts +18 -0
- package/lib/actions/{platform/PlatformActionRequesterTypes.js → event/EventMatchStoryActionTypes.js} +0 -0
- package/lib/actions/event/EventTransformEventParamsActionRequester.d.ts +2 -0
- package/lib/actions/event/EventTransformEventParamsActionRequester.js +11 -0
- package/lib/actions/event/EventTransformEventParamsActionTypes.d.ts +11 -0
- package/lib/actions/{system/SystemActionTypes.js → event/EventTransformEventParamsActionTypes.js} +0 -0
- package/lib/actions/event/EventTransformResponseResultActionRequester.d.ts +2 -0
- package/lib/actions/event/EventTransformResponseResultActionRequester.js +11 -0
- package/lib/actions/event/EventTransformResponseResultActionTypes.d.ts +11 -0
- package/lib/actions/event/EventTransformResponseResultActionTypes.js +2 -0
- package/lib/actions/event/index.d.ts +9 -3
- package/lib/actions/event/index.js +9 -3
- package/lib/actions/file/FileActionType.d.ts +18 -0
- package/lib/actions/file/FileActionType.js +12 -0
- package/lib/actions/file/FileDeleteActionRequester.d.ts +2 -0
- package/lib/actions/file/FileDeleteActionRequester.js +14 -0
- package/lib/actions/file/FileDeleteActionTypes.d.ts +12 -0
- package/lib/actions/file/FileDeleteActionTypes.js +2 -0
- package/lib/actions/file/FileExistsActionRequester.d.ts +2 -0
- package/lib/actions/file/FileExistsActionRequester.js +14 -0
- package/lib/actions/file/FileExistsActionTypes.d.ts +12 -0
- package/lib/actions/file/FileExistsActionTypes.js +2 -0
- package/lib/actions/file/FileListDirectoryActionRequester.d.ts +5 -0
- package/lib/actions/file/FileListDirectoryActionRequester.js +30 -0
- package/lib/actions/file/FileListDirectoryActionTypes.d.ts +14 -0
- package/lib/actions/file/FileListDirectoryActionTypes.js +2 -0
- package/lib/actions/file/FileReadTextContentsActionRequester.d.ts +2 -0
- package/lib/actions/file/FileReadTextContentsActionRequester.js +14 -0
- package/lib/actions/file/FileReadTextContentsActionTypes.d.ts +12 -0
- package/lib/actions/file/FileReadTextContentsActionTypes.js +2 -0
- package/lib/actions/file/FileWriteTextContentsActionRequester.d.ts +2 -0
- package/lib/actions/file/FileWriteTextContentsActionRequester.js +15 -0
- package/lib/actions/file/FileWriteTextContentsActionTypes.d.ts +13 -0
- package/lib/actions/file/FileWriteTextContentsActionTypes.js +2 -0
- package/lib/actions/file/index.d.ts +11 -0
- package/lib/actions/file/index.js +27 -0
- package/lib/actions/guid/GuidActionType.d.ts +3 -0
- package/lib/actions/guid/GuidActionType.js +7 -0
- package/lib/actions/guid/GuidNewActionRequester.d.ts +2 -0
- package/lib/actions/guid/GuidNewActionRequester.js +8 -0
- package/lib/actions/guid/GuidNewActionRequesterTypes.d.ts +9 -0
- package/lib/actions/guid/GuidNewActionRequesterTypes.js +2 -0
- package/lib/actions/guid/index.d.ts +3 -3
- package/lib/actions/guid/index.js +3 -3
- package/lib/actions/index.d.ts +5 -0
- package/lib/actions/index.js +5 -0
- package/lib/actions/log/LogActionType.d.ts +3 -0
- package/lib/actions/log/LogActionType.js +7 -0
- package/lib/actions/log/LogCreateActionRequester.d.ts +3 -0
- package/lib/actions/log/LogCreateActionRequester.js +15 -0
- package/lib/actions/log/LogCreateActionTypes.d.ts +14 -0
- package/lib/actions/log/LogCreateActionTypes.js +2 -0
- package/lib/actions/log/index.d.ts +3 -0
- package/lib/actions/log/index.js +19 -0
- package/lib/actions/math/MathActionType.d.ts +3 -0
- package/lib/actions/math/MathActionType.js +7 -0
- package/lib/actions/math/MathRandomNumberActionRequester.d.ts +2 -0
- package/lib/actions/math/MathRandomNumberActionRequester.js +8 -0
- package/lib/actions/math/MathRandomNumberActionRequesterTypes.d.ts +9 -0
- package/lib/actions/math/MathRandomNumberActionRequesterTypes.js +2 -0
- package/lib/actions/math/index.d.ts +3 -3
- package/lib/actions/math/index.js +3 -3
- package/lib/actions/network/NetworkActionType.d.ts +16 -0
- package/lib/actions/network/NetworkActionType.js +7 -0
- package/lib/actions/network/NetworkRequestActionRequester.d.ts +3 -0
- package/lib/actions/network/NetworkRequestActionRequester.js +18 -0
- package/lib/actions/network/NetworkRequestActionTypes.d.ts +16 -0
- package/lib/actions/network/NetworkRequestActionTypes.js +2 -0
- package/lib/actions/network/index.d.ts +3 -0
- package/lib/actions/network/index.js +19 -0
- package/lib/actions/platform/PlatformActionType.d.ts +3 -0
- package/lib/actions/platform/PlatformActionType.js +7 -0
- package/lib/actions/platform/PlatformDelayActionRequester.d.ts +2 -0
- package/lib/actions/platform/PlatformDelayActionRequester.js +8 -0
- package/lib/actions/platform/PlatformDelayActionRequesterTypes.d.ts +11 -0
- package/lib/actions/platform/PlatformDelayActionRequesterTypes.js +2 -0
- package/lib/actions/platform/index.d.ts +3 -3
- package/lib/actions/platform/index.js +3 -3
- package/lib/actions/system/{SystemActionTypeEnum.d.ts → SystemActionType.d.ts} +1 -2
- package/lib/actions/system/SystemActionType.js +15 -0
- package/lib/actions/system/SystemBatchActionRequester.d.ts +3 -0
- package/lib/actions/system/SystemBatchActionRequester.js +9 -0
- package/lib/actions/system/SystemBatchActionTypes.d.ts +11 -0
- package/lib/actions/system/SystemBatchActionTypes.js +2 -0
- package/lib/actions/system/SystemExecuteStoryActionRequester.d.ts +2 -0
- package/lib/actions/system/SystemExecuteStoryActionRequester.js +16 -0
- package/lib/actions/system/SystemExecuteStoryActionTypes.d.ts +14 -0
- package/lib/actions/system/SystemExecuteStoryActionTypes.js +2 -0
- package/lib/actions/system/SystemRunParallelActionRequester.d.ts +2 -0
- package/lib/actions/system/{SystemActionRequester.js → SystemRunParallelActionRequester.js} +3 -23
- package/lib/actions/system/SystemRunParallelActionTypes.d.ts +1 -0
- package/lib/actions/system/SystemRunParallelActionTypes.js +2 -0
- package/lib/actions/system/index.d.ts +7 -3
- package/lib/actions/system/index.js +7 -3
- package/lib/config/QPQConfig.d.ts +4 -1
- package/lib/config/QPQConfig.js +3 -0
- package/lib/config/index.d.ts +2 -0
- package/lib/config/index.js +18 -0
- package/lib/config/settings/index.d.ts +4 -0
- package/lib/config/settings/index.js +20 -0
- package/lib/config/settings/schedule.d.ts +11 -0
- package/lib/config/settings/schedule.js +16 -0
- package/lib/config/settings/secret.d.ts +7 -0
- package/lib/config/settings/secret.js +11 -0
- package/lib/config/settings/storageDrive.d.ts +5 -0
- package/lib/config/settings/storageDrive.js +9 -0
- package/lib/index.d.ts +7 -3
- package/lib/index.js +9 -7
- package/lib/logic/actionLogic.d.ts +8 -0
- package/lib/logic/actionLogic.js +30 -0
- package/lib/qpqCoreUtils.d.ts +7 -1
- package/lib/qpqCoreUtils.js +27 -2
- package/lib/qpqRuntime.d.ts +5 -0
- package/lib/qpqRuntime.js +83 -0
- package/lib/stories/askProcessEvent.d.ts +1 -1
- package/lib/stories/askProcessEvent.js +10 -10
- package/lib/types/Action.d.ts +7 -1
- package/lib/types/ErrorTypeEnum.d.ts +18 -0
- package/lib/types/ErrorTypeEnum.js +31 -0
- package/lib/types/LogLevelEnum.d.ts +8 -0
- package/lib/types/LogLevelEnum.js +44 -0
- package/lib/types/ScheduledEvent.d.ts +5 -0
- package/lib/types/ScheduledEvent.js +2 -0
- package/lib/types/StorySession.d.ts +26 -0
- package/package.json +3 -2
- package/lib/actionProcessor.d.ts +0 -22
- package/lib/actionProcessor.js +0 -75
- package/lib/actions/date/DateActionRequester.d.ts +0 -2
- package/lib/actions/date/DateActionRequester.js +0 -19
- package/lib/actions/date/DateActionTypeEnum.d.ts +0 -4
- package/lib/actions/date/DateActionTypeEnum.js +0 -8
- package/lib/actions/date/DateActionTypes.d.ts +0 -8
- package/lib/actions/event/EventActionRequester.d.ts +0 -5
- package/lib/actions/event/EventActionRequester.js +0 -35
- package/lib/actions/event/EventActionTypeEnum.js +0 -11
- package/lib/actions/event/EventActionTypes.d.ts +0 -30
- package/lib/actions/guid/GuidActionRequester.d.ts +0 -2
- package/lib/actions/guid/GuidActionRequester.js +0 -11
- package/lib/actions/guid/GuidActionRequesterTypes.d.ts +0 -8
- package/lib/actions/guid/GuidActionTypeEnum.d.ts +0 -4
- package/lib/actions/guid/GuidActionTypeEnum.js +0 -8
- package/lib/actions/math/MathActionRequester.d.ts +0 -2
- package/lib/actions/math/MathActionRequester.js +0 -11
- package/lib/actions/math/MathActionRequesterTypes.d.ts +0 -8
- package/lib/actions/math/MathActionTypeEnum.d.ts +0 -4
- package/lib/actions/math/MathActionTypeEnum.js +0 -8
- package/lib/actions/platform/PlatformActionRequester.d.ts +0 -2
- package/lib/actions/platform/PlatformActionRequester.js +0 -11
- package/lib/actions/platform/PlatformActionRequesterTypes.d.ts +0 -9
- package/lib/actions/platform/PlatformActionTypeEnum.d.ts +0 -4
- package/lib/actions/platform/PlatformActionTypeEnum.js +0 -8
- package/lib/actions/system/SystemActionRequester.d.ts +0 -5
- package/lib/actions/system/SystemActionTypeEnum.js +0 -11
- package/lib/actions/system/SystemActionTypes.d.ts +0 -19
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigActionType = void 0;
|
|
4
|
+
var ConfigActionType;
|
|
5
|
+
(function (ConfigActionType) {
|
|
6
|
+
ConfigActionType["GetSecret"] = "@quidproquo-core/Config/GetSecret";
|
|
7
|
+
})(ConfigActionType = exports.ConfigActionType || (exports.ConfigActionType = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askConfigGetSecret = void 0;
|
|
4
|
+
const ConfigActionType_1 = require("./ConfigActionType");
|
|
5
|
+
function* askConfigGetSecret(secretName) {
|
|
6
|
+
return yield { type: ConfigActionType_1.ConfigActionType.GetSecret, payload: { secretName } };
|
|
7
|
+
}
|
|
8
|
+
exports.askConfigGetSecret = askConfigGetSecret;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { ConfigActionType } from './ConfigActionType';
|
|
3
|
+
export interface ConfigGetSecretActionPayload {
|
|
4
|
+
secretName: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ConfigGetSecretAction extends Action<ConfigGetSecretActionPayload> {
|
|
7
|
+
type: ConfigActionType.GetSecret;
|
|
8
|
+
payload: ConfigGetSecretActionPayload;
|
|
9
|
+
}
|
|
10
|
+
export type ConfigGetSecretActionProcessor = ActionProcessor<ConfigGetSecretAction, string>;
|
|
11
|
+
export type ConfigGetSecretActionRequester = ActionRequester<ConfigGetSecretAction, string>;
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./ConfigActionType"), exports);
|
|
18
|
+
__exportStar(require("./ConfigGetSecretActionRequester"), exports);
|
|
19
|
+
__exportStar(require("./ConfigGetSecretActionTypes"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateActionType = void 0;
|
|
4
|
+
var DateActionType;
|
|
5
|
+
(function (DateActionType) {
|
|
6
|
+
DateActionType["Now"] = "@quidproquo-core/Date/Now";
|
|
7
|
+
})(DateActionType = exports.DateActionType || (exports.DateActionType = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askDateNow = void 0;
|
|
4
|
+
const DateActionType_1 = require("./DateActionType");
|
|
5
|
+
function* askDateNow() {
|
|
6
|
+
return yield { type: DateActionType_1.DateActionType.Now };
|
|
7
|
+
}
|
|
8
|
+
exports.askDateNow = askDateNow;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { DateActionType } from './DateActionType';
|
|
3
|
+
export interface DateNowActionPayload {
|
|
4
|
+
}
|
|
5
|
+
export interface DateNowAction extends Action<DateNowActionPayload> {
|
|
6
|
+
type: DateActionType.Now;
|
|
7
|
+
}
|
|
8
|
+
export type DateNowActionProcessor = ActionProcessor<DateNowAction, string>;
|
|
9
|
+
export type DateNowActionRequester = ActionRequester<DateNowAction, string>;
|
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './DateActionType';
|
|
2
|
+
export * from './DateNowActionRequester';
|
|
3
|
+
export * from './DateNowActionTypes';
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./DateActionType"), exports);
|
|
18
|
+
__exportStar(require("./DateNowActionRequester"), exports);
|
|
19
|
+
__exportStar(require("./DateNowActionTypes"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorActionType = void 0;
|
|
4
|
+
var ErrorActionType;
|
|
5
|
+
(function (ErrorActionType) {
|
|
6
|
+
ErrorActionType["ThrowError"] = "@quidproquo-core/error/ThrowError";
|
|
7
|
+
})(ErrorActionType = exports.ErrorActionType || (exports.ErrorActionType = {}));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ErrorThrowErrorActionRequester } from './ErrorThrowErrorActionRequesterTypes';
|
|
2
|
+
import { ErrorTypeEnum } from '../../types/ErrorTypeEnum';
|
|
3
|
+
export declare function askThrowError(errorType: ErrorTypeEnum, errorText: string, errorStack?: string): ErrorThrowErrorActionRequester;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askThrowError = void 0;
|
|
4
|
+
const ErrorActionType_1 = require("./ErrorActionType");
|
|
5
|
+
function* askThrowError(errorType, errorText, errorStack) {
|
|
6
|
+
yield {
|
|
7
|
+
type: ErrorActionType_1.ErrorActionType.ThrowError,
|
|
8
|
+
payload: { errorType, errorText, errorStack },
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.askThrowError = askThrowError;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ErrorActionType } from './ErrorActionType';
|
|
2
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
3
|
+
import { ErrorTypeEnum } from '../../types/ErrorTypeEnum';
|
|
4
|
+
export interface ErrorThrowErrorActionPayload {
|
|
5
|
+
errorType: ErrorTypeEnum;
|
|
6
|
+
errorText: string;
|
|
7
|
+
errorStack?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ErrorThrowErrorAction extends Action<ErrorThrowErrorActionPayload> {
|
|
10
|
+
type: ErrorActionType.ThrowError;
|
|
11
|
+
payload: ErrorThrowErrorActionPayload;
|
|
12
|
+
}
|
|
13
|
+
export type ErrorThrowErrorActionProcessor = ActionProcessor<ErrorThrowErrorAction, void>;
|
|
14
|
+
export type ErrorThrowErrorActionRequester = ActionRequester<ErrorThrowErrorAction, void>;
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
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("./ErrorActionType"), exports);
|
|
18
|
+
__exportStar(require("./ErrorThrowErrorActionRequester"), exports);
|
|
19
|
+
__exportStar(require("./ErrorThrowErrorActionRequesterTypes"), exports);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum EventActionType {
|
|
2
2
|
TransformEventParams = "@quidproquo-core/event/TransformEventParams",
|
|
3
3
|
TransformResponseResult = "@quidproquo-core/event/TransformResponseResult",
|
|
4
4
|
AutoRespond = "@quidproquo-core/event/AutoRespond",
|
|
5
5
|
MatchStory = "@quidproquo-core/event/MatchStory"
|
|
6
6
|
}
|
|
7
|
-
export default EventActionTypeEnum;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventActionType = void 0;
|
|
4
|
+
var EventActionType;
|
|
5
|
+
(function (EventActionType) {
|
|
6
|
+
EventActionType["TransformEventParams"] = "@quidproquo-core/event/TransformEventParams";
|
|
7
|
+
EventActionType["TransformResponseResult"] = "@quidproquo-core/event/TransformResponseResult";
|
|
8
|
+
EventActionType["AutoRespond"] = "@quidproquo-core/event/AutoRespond";
|
|
9
|
+
EventActionType["MatchStory"] = "@quidproquo-core/event/MatchStory";
|
|
10
|
+
})(EventActionType = exports.EventActionType || (exports.EventActionType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askEventAutoRespond = void 0;
|
|
4
|
+
const EventActionType_1 = require("./EventActionType");
|
|
5
|
+
function* askEventAutoRespond(transformedEventParams) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: EventActionType_1.EventActionType.AutoRespond,
|
|
8
|
+
payload: { transformedEventParams },
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.askEventAutoRespond = askEventAutoRespond;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { EventActionType } from './EventActionType';
|
|
3
|
+
export interface EventAutoRespondActionPayload<T> {
|
|
4
|
+
transformedEventParams: T;
|
|
5
|
+
}
|
|
6
|
+
export interface EventAutoRespondAction<T> extends Action<EventAutoRespondActionPayload<T>> {
|
|
7
|
+
type: EventActionType.AutoRespond;
|
|
8
|
+
payload: EventAutoRespondActionPayload<T>;
|
|
9
|
+
}
|
|
10
|
+
export type EventAutoRespondActionProcessor<T> = ActionProcessor<EventAutoRespondAction<T>, any>;
|
|
11
|
+
export type EventAutoRespondActionRequester<T> = ActionRequester<EventAutoRespondAction<T>, any>;
|
package/lib/actions/{math/MathActionRequesterTypes.js → event/EventAutoRespondActionTypes.js}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askEventMatchStory = void 0;
|
|
4
|
+
const EventActionType_1 = require("./EventActionType");
|
|
5
|
+
function* askEventMatchStory(transformedEventParams) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: EventActionType_1.EventActionType.MatchStory,
|
|
8
|
+
payload: { transformedEventParams },
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.askEventMatchStory = askEventMatchStory;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { EventActionType } from './EventActionType';
|
|
3
|
+
export type MatchStoryResult = {
|
|
4
|
+
src?: string;
|
|
5
|
+
runtime?: string;
|
|
6
|
+
options?: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export interface EventMatchStoryActionPayload<T> {
|
|
11
|
+
transformedEventParams: T;
|
|
12
|
+
}
|
|
13
|
+
export interface EventMatchStoryAction<T> extends Action<EventMatchStoryActionPayload<T>> {
|
|
14
|
+
type: EventActionType.MatchStory;
|
|
15
|
+
payload: EventMatchStoryActionPayload<T>;
|
|
16
|
+
}
|
|
17
|
+
export type EventMatchStoryActionProcessor<T> = ActionProcessor<EventMatchStoryAction<T>, MatchStoryResult>;
|
|
18
|
+
export type EventMatchStoryActionRequester<T> = ActionRequester<EventMatchStoryAction<T>, MatchStoryResult>;
|
package/lib/actions/{platform/PlatformActionRequesterTypes.js → event/EventMatchStoryActionTypes.js}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askEventTransformEventParams = void 0;
|
|
4
|
+
const EventActionType_1 = require("./EventActionType");
|
|
5
|
+
function* askEventTransformEventParams(...eventParams) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: EventActionType_1.EventActionType.TransformEventParams,
|
|
8
|
+
payload: { eventParams },
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.askEventTransformEventParams = askEventTransformEventParams;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { EventActionType } from './EventActionType';
|
|
3
|
+
export interface EventTransformEventParamsActionPayload<T extends Array<unknown>> {
|
|
4
|
+
eventParams: T;
|
|
5
|
+
}
|
|
6
|
+
export interface EventTransformEventParamsAction<T extends Array<unknown>> extends Action<EventTransformEventParamsActionPayload<T>> {
|
|
7
|
+
type: EventActionType.TransformEventParams;
|
|
8
|
+
payload: EventTransformEventParamsActionPayload<T>;
|
|
9
|
+
}
|
|
10
|
+
export type EventTransformEventParamsActionProcessor<T extends Array<unknown>, TRes> = ActionProcessor<EventTransformEventParamsAction<T>, TRes>;
|
|
11
|
+
export type EventTransformEventParamsActionRequester<T extends Array<unknown>, TRes> = ActionRequester<EventTransformEventParamsAction<T>, TRes>;
|
package/lib/actions/{system/SystemActionTypes.js → event/EventTransformEventParamsActionTypes.js}
RENAMED
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askEventTransformResponseResult = void 0;
|
|
4
|
+
const EventActionType_1 = require("./EventActionType");
|
|
5
|
+
function* askEventTransformResponseResult(response) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: EventActionType_1.EventActionType.TransformResponseResult,
|
|
8
|
+
payload: { response },
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.askEventTransformResponseResult = askEventTransformResponseResult;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { EventActionType } from './EventActionType';
|
|
3
|
+
export interface EventTransformResponseResultActionPayload {
|
|
4
|
+
response: any;
|
|
5
|
+
}
|
|
6
|
+
export interface EventTransformResponseResultAction extends Action<EventTransformResponseResultActionPayload> {
|
|
7
|
+
type: EventActionType.TransformResponseResult;
|
|
8
|
+
payload: EventTransformResponseResultActionPayload;
|
|
9
|
+
}
|
|
10
|
+
export type EventTransformResponseResultActionProcessor<TRes> = ActionProcessor<EventTransformResponseResultAction, TRes>;
|
|
11
|
+
export type EventTransformResponseResultActionRequester<TRes> = ActionRequester<EventTransformResponseResultAction, TRes>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './EventActionType';
|
|
2
|
+
export * from './EventAutoRespondActionRequester';
|
|
3
|
+
export * from './EventAutoRespondActionTypes';
|
|
4
|
+
export * from './EventMatchStoryActionRequester';
|
|
5
|
+
export * from './EventMatchStoryActionTypes';
|
|
6
|
+
export * from './EventTransformEventParamsActionRequester';
|
|
7
|
+
export * from './EventTransformEventParamsActionTypes';
|
|
8
|
+
export * from './EventTransformResponseResultActionRequester';
|
|
9
|
+
export * from './EventTransformResponseResultActionTypes';
|
|
@@ -14,6 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./EventActionType"), exports);
|
|
18
|
+
__exportStar(require("./EventAutoRespondActionRequester"), exports);
|
|
19
|
+
__exportStar(require("./EventAutoRespondActionTypes"), exports);
|
|
20
|
+
__exportStar(require("./EventMatchStoryActionRequester"), exports);
|
|
21
|
+
__exportStar(require("./EventMatchStoryActionTypes"), exports);
|
|
22
|
+
__exportStar(require("./EventTransformEventParamsActionRequester"), exports);
|
|
23
|
+
__exportStar(require("./EventTransformEventParamsActionTypes"), exports);
|
|
24
|
+
__exportStar(require("./EventTransformResponseResultActionRequester"), exports);
|
|
25
|
+
__exportStar(require("./EventTransformResponseResultActionTypes"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum FileActionType {
|
|
2
|
+
ReadTextContents = "@quidproquo-core/File/ReadTextContents",
|
|
3
|
+
WriteTextContents = "@quidproquo-core/File/WriteTextContents",
|
|
4
|
+
ListDirectory = "@quidproquo-core/File/ListDirectory",
|
|
5
|
+
Exists = "@quidproquo-core/File/Exists",
|
|
6
|
+
Delete = "@quidproquo-core/File/Delete"
|
|
7
|
+
}
|
|
8
|
+
export declare const filePathDelimiter = "/";
|
|
9
|
+
export interface FileInfo {
|
|
10
|
+
filepath: string;
|
|
11
|
+
drive: string;
|
|
12
|
+
isDir: boolean;
|
|
13
|
+
hashMd5?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DirectoryList {
|
|
16
|
+
fileInfos: FileInfo[];
|
|
17
|
+
pageToken?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filePathDelimiter = exports.FileActionType = void 0;
|
|
4
|
+
var FileActionType;
|
|
5
|
+
(function (FileActionType) {
|
|
6
|
+
FileActionType["ReadTextContents"] = "@quidproquo-core/File/ReadTextContents";
|
|
7
|
+
FileActionType["WriteTextContents"] = "@quidproquo-core/File/WriteTextContents";
|
|
8
|
+
FileActionType["ListDirectory"] = "@quidproquo-core/File/ListDirectory";
|
|
9
|
+
FileActionType["Exists"] = "@quidproquo-core/File/Exists";
|
|
10
|
+
FileActionType["Delete"] = "@quidproquo-core/File/Delete";
|
|
11
|
+
})(FileActionType = exports.FileActionType || (exports.FileActionType = {}));
|
|
12
|
+
exports.filePathDelimiter = `/`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askFileDelete = void 0;
|
|
4
|
+
const FileActionType_1 = require("./FileActionType");
|
|
5
|
+
function* askFileDelete(drive, filepaths) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: FileActionType_1.FileActionType.Delete,
|
|
8
|
+
payload: {
|
|
9
|
+
drive,
|
|
10
|
+
filepaths,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.askFileDelete = askFileDelete;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { FileActionType } from './FileActionType';
|
|
3
|
+
export interface FileDeleteActionPayload {
|
|
4
|
+
drive: string;
|
|
5
|
+
filepaths: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface FileDeleteAction extends Action<FileDeleteActionPayload> {
|
|
8
|
+
type: FileActionType.Delete;
|
|
9
|
+
payload: FileDeleteActionPayload;
|
|
10
|
+
}
|
|
11
|
+
export type FileDeleteActionProcessor = ActionProcessor<FileDeleteAction, string[]>;
|
|
12
|
+
export type FileDeleteActionRequester = ActionRequester<FileDeleteAction, string[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askFileExists = void 0;
|
|
4
|
+
const FileActionType_1 = require("./FileActionType");
|
|
5
|
+
function* askFileExists(drive, filepath) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: FileActionType_1.FileActionType.Exists,
|
|
8
|
+
payload: {
|
|
9
|
+
drive,
|
|
10
|
+
filepath,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.askFileExists = askFileExists;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { FileActionType } from './FileActionType';
|
|
3
|
+
export interface FileExistsActionPayload {
|
|
4
|
+
drive: string;
|
|
5
|
+
filepath: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FileExistsAction extends Action<FileExistsActionPayload> {
|
|
8
|
+
type: FileActionType.Exists;
|
|
9
|
+
payload: FileExistsActionPayload;
|
|
10
|
+
}
|
|
11
|
+
export type FileExistsActionProcessor = ActionProcessor<FileExistsAction, boolean>;
|
|
12
|
+
export type FileExistsActionRequester = ActionRequester<FileExistsAction, boolean>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FileListDirectoryActionRequester } from './FileListDirectoryActionTypes';
|
|
2
|
+
import { FileInfo } from './FileActionType';
|
|
3
|
+
import { AskResponse } from '../../types/StorySession';
|
|
4
|
+
export declare function askFileListDirectory(drive: string, folderPath: string, maxFiles?: number, pageToken?: string): FileListDirectoryActionRequester;
|
|
5
|
+
export declare function askFileListAllDirectory(drive: string, folderPath: string): AskResponse<FileInfo[]>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askFileListAllDirectory = exports.askFileListDirectory = void 0;
|
|
4
|
+
const FileActionType_1 = require("./FileActionType");
|
|
5
|
+
function* askFileListDirectory(drive, folderPath, maxFiles = 1000, pageToken) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: FileActionType_1.FileActionType.ListDirectory,
|
|
8
|
+
payload: {
|
|
9
|
+
drive,
|
|
10
|
+
folderPath,
|
|
11
|
+
pageToken,
|
|
12
|
+
maxFiles,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
exports.askFileListDirectory = askFileListDirectory;
|
|
17
|
+
function* askFileListAllDirectory(drive, folderPath) {
|
|
18
|
+
var pageToken;
|
|
19
|
+
let fileInfos = [];
|
|
20
|
+
while (true) {
|
|
21
|
+
const directoryInfo = yield* askFileListDirectory(drive, folderPath, 1000, pageToken);
|
|
22
|
+
fileInfos = [...fileInfos, ...directoryInfo.fileInfos];
|
|
23
|
+
if (!directoryInfo.pageToken) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
pageToken = directoryInfo.pageToken;
|
|
27
|
+
}
|
|
28
|
+
return fileInfos;
|
|
29
|
+
}
|
|
30
|
+
exports.askFileListAllDirectory = askFileListAllDirectory;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { FileActionType, DirectoryList } from './FileActionType';
|
|
3
|
+
export interface FileListDirectoryActionPayload {
|
|
4
|
+
drive: string;
|
|
5
|
+
folderPath: string;
|
|
6
|
+
maxFiles: number;
|
|
7
|
+
pageToken?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FileListDirectoryAction extends Action<FileListDirectoryActionPayload> {
|
|
10
|
+
type: FileActionType.ListDirectory;
|
|
11
|
+
payload: FileListDirectoryActionPayload;
|
|
12
|
+
}
|
|
13
|
+
export type FileListDirectoryActionProcessor = ActionProcessor<FileListDirectoryAction, DirectoryList>;
|
|
14
|
+
export type FileListDirectoryActionRequester = ActionRequester<FileListDirectoryAction, DirectoryList>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.askFileReadTextContents = void 0;
|
|
4
|
+
const FileActionType_1 = require("./FileActionType");
|
|
5
|
+
function* askFileReadTextContents(drive, filepath) {
|
|
6
|
+
return yield {
|
|
7
|
+
type: FileActionType_1.FileActionType.ReadTextContents,
|
|
8
|
+
payload: {
|
|
9
|
+
drive,
|
|
10
|
+
filepath,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
exports.askFileReadTextContents = askFileReadTextContents;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
+
import { FileActionType } from './FileActionType';
|
|
3
|
+
export interface FileReadTextContentsActionPayload {
|
|
4
|
+
drive: string;
|
|
5
|
+
filepath: string;
|
|
6
|
+
}
|
|
7
|
+
export interface FileReadTextContentsAction extends Action<FileReadTextContentsActionPayload> {
|
|
8
|
+
type: FileActionType.ReadTextContents;
|
|
9
|
+
payload: FileReadTextContentsActionPayload;
|
|
10
|
+
}
|
|
11
|
+
export type FileReadTextContentsActionProcessor = ActionProcessor<FileReadTextContentsAction, string>;
|
|
12
|
+
export type FileReadTextContentsActionRequester = ActionRequester<FileReadTextContentsAction, string>;
|