quidproquo-core 0.0.230 → 0.0.232
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/actions/event/EventGetStorySessionActionRequester.d.ts +2 -1
- package/lib/commonjs/actions/event/EventGetStorySessionActionRequester.js +2 -2
- package/lib/commonjs/actions/event/EventGetStorySessionActionTypes.d.ts +7 -6
- package/lib/commonjs/actions/graphDatabase/GraphDatabaseExecuteOpenCypherQueryActionRequester.d.ts +1 -1
- package/lib/commonjs/actions/userDirectory/UserDirectoryActionType.d.ts +0 -4
- package/lib/commonjs/actions/userDirectory/UserDirectoryDecodeAccessTokenActionTypes.d.ts +2 -1
- package/lib/commonjs/actions/userDirectory/UserDirectoryReadAccessTokenActionTypes.d.ts +2 -1
- package/lib/commonjs/actions/userDirectory/UserDirectorySetAccessTokenActionRequester.d.ts +1 -1
- package/lib/commonjs/actions/userDirectory/UserDirectorySetAccessTokenActionRequester.js +2 -1
- package/lib/commonjs/actions/userDirectory/UserDirectorySetAccessTokenActionTypes.d.ts +4 -2
- package/lib/commonjs/config/QPQConfig.d.ts +1 -2
- package/lib/commonjs/config/QPQConfig.js +1 -2
- package/lib/commonjs/config/settings/apiBuildPath/defineApiBuildPath.d.ts +5 -0
- package/lib/commonjs/config/settings/apiBuildPath/defineApiBuildPath.js +10 -0
- package/lib/commonjs/config/settings/apiBuildPath/index.d.ts +1 -0
- package/lib/commonjs/config/settings/apiBuildPath/index.js +17 -0
- package/lib/commonjs/config/settings/applicationModule.d.ts +1 -1
- package/lib/commonjs/config/settings/applicationModule.js +3 -1
- package/lib/commonjs/config/settings/deployEvent.d.ts +1 -2
- package/lib/commonjs/config/settings/deployEvent.js +1 -2
- package/lib/commonjs/config/settings/index.d.ts +1 -2
- package/lib/commonjs/config/settings/index.js +1 -2
- package/lib/commonjs/config/settings/queue.d.ts +1 -2
- package/lib/commonjs/config/settings/queue.js +1 -2
- package/lib/commonjs/config/settings/schedule.d.ts +6 -3
- package/lib/commonjs/config/settings/schedule.js +2 -2
- package/lib/commonjs/config/settings/storageDrive.d.ts +0 -1
- package/lib/commonjs/config/settings/userDirectory.d.ts +1 -2
- package/lib/commonjs/config/settings/userDirectory.js +1 -2
- package/lib/commonjs/createImplementationRuntime.js +1 -1
- package/lib/commonjs/qpqCoreUtils.d.ts +2 -6
- package/lib/commonjs/qpqCoreUtils.js +13 -31
- package/lib/commonjs/qpqExecuteLog.js +1 -1
- package/lib/commonjs/qpqRuntime.js +1 -1
- package/lib/commonjs/stories/askProcessEvent.js +1 -1
- package/lib/commonjs/types/ScheduledEvent.d.ts +2 -2
- package/lib/commonjs/types/StorySession.d.ts +12 -3
- package/lib/esm/actions/event/EventGetStorySessionActionRequester.d.ts +2 -1
- package/lib/esm/actions/event/EventGetStorySessionActionRequester.js +2 -2
- package/lib/esm/actions/event/EventGetStorySessionActionTypes.d.ts +7 -6
- package/lib/esm/actions/graphDatabase/GraphDatabaseExecuteOpenCypherQueryActionRequester.d.ts +1 -1
- package/lib/esm/actions/userDirectory/UserDirectoryActionType.d.ts +0 -4
- package/lib/esm/actions/userDirectory/UserDirectoryDecodeAccessTokenActionTypes.d.ts +2 -1
- package/lib/esm/actions/userDirectory/UserDirectoryReadAccessTokenActionTypes.d.ts +2 -1
- package/lib/esm/actions/userDirectory/UserDirectorySetAccessTokenActionRequester.d.ts +1 -1
- package/lib/esm/actions/userDirectory/UserDirectorySetAccessTokenActionRequester.js +2 -1
- package/lib/esm/actions/userDirectory/UserDirectorySetAccessTokenActionTypes.d.ts +4 -2
- package/lib/esm/config/QPQConfig.d.ts +1 -2
- package/lib/esm/config/QPQConfig.js +1 -2
- package/lib/esm/config/settings/apiBuildPath/defineApiBuildPath.d.ts +5 -0
- package/lib/esm/config/settings/apiBuildPath/defineApiBuildPath.js +6 -0
- package/lib/esm/config/settings/apiBuildPath/index.d.ts +1 -0
- package/lib/esm/config/settings/apiBuildPath/index.js +1 -0
- package/lib/esm/config/settings/applicationModule.d.ts +1 -1
- package/lib/esm/config/settings/applicationModule.js +3 -1
- package/lib/esm/config/settings/deployEvent.d.ts +1 -2
- package/lib/esm/config/settings/deployEvent.js +1 -2
- package/lib/esm/config/settings/index.d.ts +1 -2
- package/lib/esm/config/settings/index.js +1 -2
- package/lib/esm/config/settings/queue.d.ts +1 -2
- package/lib/esm/config/settings/queue.js +1 -2
- package/lib/esm/config/settings/schedule.d.ts +6 -3
- package/lib/esm/config/settings/schedule.js +2 -2
- package/lib/esm/config/settings/storageDrive.d.ts +0 -1
- package/lib/esm/config/settings/userDirectory.d.ts +1 -2
- package/lib/esm/config/settings/userDirectory.js +1 -2
- package/lib/esm/createImplementationRuntime.js +1 -1
- package/lib/esm/qpqCoreUtils.d.ts +2 -6
- package/lib/esm/qpqCoreUtils.js +9 -22
- package/lib/esm/qpqExecuteLog.js +1 -1
- package/lib/esm/qpqRuntime.js +1 -1
- package/lib/esm/stories/askProcessEvent.js +1 -1
- package/lib/esm/types/ScheduledEvent.d.ts +2 -2
- package/lib/esm/types/StorySession.d.ts +12 -3
- package/package.json +2 -2
- package/lib/commonjs/config/settings/applicationBasePath.d.ts +0 -5
- package/lib/commonjs/config/settings/applicationBasePath.js +0 -11
- package/lib/commonjs/config/settings/buildPath.d.ts +0 -5
- package/lib/commonjs/config/settings/buildPath.js +0 -10
- package/lib/esm/config/settings/applicationBasePath.d.ts +0 -5
- package/lib/esm/config/settings/applicationBasePath.js +0 -7
- package/lib/esm/config/settings/buildPath.d.ts +0 -5
- package/lib/esm/config/settings/buildPath.js +0 -6
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { EventGetStorySessionActionRequester } from './EventGetStorySessionActionTypes';
|
|
2
|
-
|
|
2
|
+
import { AnyMatchStoryResult } from './EventActionType';
|
|
3
|
+
export declare function askEventGetStorySession<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult>(eventParams: EventParams, qpqEventRecord: QpqEventRecord, matchStoryResult: MSR): EventGetStorySessionActionRequester<EventParams, QpqEventRecord, MSR>;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.askEventGetStorySession = void 0;
|
|
4
4
|
const EventActionType_1 = require("./EventActionType");
|
|
5
|
-
function* askEventGetStorySession(eventParams, qpqEventRecord) {
|
|
5
|
+
function* askEventGetStorySession(eventParams, qpqEventRecord, matchStoryResult) {
|
|
6
6
|
return yield {
|
|
7
7
|
type: EventActionType_1.EventActionType.GetStorySession,
|
|
8
|
-
payload: { eventParams, qpqEventRecord },
|
|
8
|
+
payload: { eventParams, qpqEventRecord, matchStoryResult },
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
exports.askEventGetStorySession = askEventGetStorySession;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { StorySession } from '../../types';
|
|
2
2
|
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
3
|
-
import { EventActionType } from './EventActionType';
|
|
4
|
-
export interface EventGetStorySessionActionPayload<EventParams extends Array<unknown>, QpqEventRecord> {
|
|
3
|
+
import { AnyMatchStoryResult, EventActionType } from './EventActionType';
|
|
4
|
+
export interface EventGetStorySessionActionPayload<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> {
|
|
5
5
|
qpqEventRecord: QpqEventRecord;
|
|
6
6
|
eventParams: EventParams;
|
|
7
|
+
matchStoryResult: MSR;
|
|
7
8
|
}
|
|
8
|
-
export interface EventGetStorySessionAction<EventParams extends Array<unknown>, QpqEventRecord> extends Action<EventGetStorySessionActionPayload<EventParams, QpqEventRecord>> {
|
|
9
|
+
export interface EventGetStorySessionAction<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> extends Action<EventGetStorySessionActionPayload<EventParams, QpqEventRecord, MSR>> {
|
|
9
10
|
type: EventActionType.GetStorySession;
|
|
10
|
-
payload: EventGetStorySessionActionPayload<EventParams, QpqEventRecord>;
|
|
11
|
+
payload: EventGetStorySessionActionPayload<EventParams, QpqEventRecord, MSR>;
|
|
11
12
|
}
|
|
12
|
-
export type EventGetStorySessionActionProcessor<EventParams extends Array<unknown>, QpqEventRecord> = ActionProcessor<EventGetStorySessionAction<EventParams, QpqEventRecord>, StorySession | undefined>;
|
|
13
|
-
export type EventGetStorySessionActionRequester<EventParams extends Array<unknown>, QpqEventRecord> = ActionRequester<EventGetStorySessionAction<EventParams, QpqEventRecord>, StorySession | undefined>;
|
|
13
|
+
export type EventGetStorySessionActionProcessor<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> = ActionProcessor<EventGetStorySessionAction<EventParams, QpqEventRecord, MSR>, StorySession | undefined>;
|
|
14
|
+
export type EventGetStorySessionActionRequester<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> = ActionRequester<EventGetStorySessionAction<EventParams, QpqEventRecord, MSR>, StorySession | undefined>;
|
package/lib/commonjs/actions/graphDatabase/GraphDatabaseExecuteOpenCypherQueryActionRequester.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GraphDatabaseExecuteOpenCypherQueryActionPayload, GraphDatabaseExecuteOpenCypherQueryActionRequester, GraphDatabaseInstanceType } from './GraphDatabaseExecuteOpenCypherQueryActionTypes';
|
|
2
2
|
export declare const GraphDatabaseExecuteOpenCypherQueryErrorTypeEnum: {};
|
|
3
|
-
export declare function askGraphDatabaseExecuteOpenCypherQuery(graphDatabaseName: string, instance: GraphDatabaseInstanceType, openCypherQuery: GraphDatabaseExecuteOpenCypherQueryActionPayload['openCypherQuery'], params
|
|
3
|
+
export declare function askGraphDatabaseExecuteOpenCypherQuery(graphDatabaseName: string, instance: GraphDatabaseInstanceType, openCypherQuery: GraphDatabaseExecuteOpenCypherQueryActionPayload['openCypherQuery'], params?: GraphDatabaseExecuteOpenCypherQueryActionPayload['params']): GraphDatabaseExecuteOpenCypherQueryActionRequester;
|
|
@@ -38,10 +38,6 @@ export interface AuthenticateUserResponse {
|
|
|
38
38
|
session?: string;
|
|
39
39
|
authenticationInfo?: AuthenticationInfo;
|
|
40
40
|
}
|
|
41
|
-
export interface DecodedAccessToken {
|
|
42
|
-
userId: string;
|
|
43
|
-
username: string;
|
|
44
|
-
}
|
|
45
41
|
export interface UserAttributes {
|
|
46
42
|
/** The user's email address */
|
|
47
43
|
email?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { DecodedAccessToken } from '../../types';
|
|
1
2
|
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
-
import { UserDirectoryActionType
|
|
3
|
+
import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
3
4
|
export interface UserDirectoryDecodeAccessTokenActionPayload {
|
|
4
5
|
userDirectoryName: string;
|
|
5
6
|
ignoreExpiration: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { DecodedAccessToken } from '../../types';
|
|
1
2
|
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
-
import { UserDirectoryActionType
|
|
3
|
+
import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
3
4
|
export interface UserDirectoryReadAccessTokenActionPayload {
|
|
4
5
|
userDirectoryName: string;
|
|
5
6
|
ignoreExpiration: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { UserDirectorySetAccessTokenActionRequester } from './UserDirectorySetAccessTokenActionTypes';
|
|
2
|
-
export declare function askUserDirectorySetAccessToken(accessToken: string): UserDirectorySetAccessTokenActionRequester;
|
|
2
|
+
export declare function askUserDirectorySetAccessToken(userDirectoryName: string, accessToken: string): UserDirectorySetAccessTokenActionRequester;
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.askUserDirectorySetAccessToken = void 0;
|
|
4
4
|
const UserDirectoryActionType_1 = require("./UserDirectoryActionType");
|
|
5
|
-
function* askUserDirectorySetAccessToken(accessToken) {
|
|
5
|
+
function* askUserDirectorySetAccessToken(userDirectoryName, accessToken) {
|
|
6
6
|
return yield {
|
|
7
7
|
type: UserDirectoryActionType_1.UserDirectoryActionType.SetAccessToken,
|
|
8
8
|
payload: {
|
|
9
9
|
accessToken,
|
|
10
|
+
userDirectoryName,
|
|
10
11
|
},
|
|
11
12
|
};
|
|
12
13
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { DecodedAccessToken } from '../../types';
|
|
1
2
|
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
3
|
import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
3
4
|
export interface UserDirectorySetAccessTokenActionPayload {
|
|
4
5
|
accessToken: string;
|
|
6
|
+
userDirectoryName: string;
|
|
5
7
|
}
|
|
6
8
|
export interface UserDirectorySetAccessTokenAction extends Action<UserDirectorySetAccessTokenActionPayload> {
|
|
7
9
|
type: UserDirectoryActionType.SetAccessToken;
|
|
8
10
|
payload: UserDirectorySetAccessTokenActionPayload;
|
|
9
11
|
}
|
|
10
|
-
export type UserDirectorySetAccessTokenActionProcessor = ActionProcessor<UserDirectorySetAccessTokenAction,
|
|
11
|
-
export type UserDirectorySetAccessTokenActionRequester = ActionRequester<UserDirectorySetAccessTokenAction,
|
|
12
|
+
export type UserDirectorySetAccessTokenActionProcessor = ActionProcessor<UserDirectorySetAccessTokenAction, DecodedAccessToken>;
|
|
13
|
+
export type UserDirectorySetAccessTokenActionRequester = ActionRequester<UserDirectorySetAccessTokenAction, DecodedAccessToken>;
|
|
@@ -2,14 +2,13 @@ import { CrossModuleOwner } from '../types';
|
|
|
2
2
|
export declare enum QPQCoreConfigSettingType {
|
|
3
3
|
appName = "@quidproquo-core/config/AppName",
|
|
4
4
|
moduleName = "@quidproquo-core/config/moduleName",
|
|
5
|
-
appBasePath = "@quidproquo-core/config/appBasePath",
|
|
6
5
|
storageDrive = "@quidproquo-core/config/storageDrive",
|
|
7
6
|
schedule = "@quidproquo-core/config/schedule",
|
|
8
7
|
secret = "@quidproquo-core/config/secret",
|
|
9
8
|
global = "@quidproquo-core/config/global",
|
|
10
9
|
parameter = "@quidproquo-core/config/parameter",
|
|
11
10
|
actionProcessors = "@quidproquo-core/config/actionProcessors",
|
|
12
|
-
|
|
11
|
+
apiBuildPath = "@quidproquo-core/config/apiBuildPath",
|
|
13
12
|
queue = "@quidproquo-core/config/Queue",
|
|
14
13
|
eventBus = "@quidproquo-core/config/EventBus",
|
|
15
14
|
userDirectory = "@quidproquo-core/config/UserDirectory",
|
|
@@ -5,14 +5,13 @@ var QPQCoreConfigSettingType;
|
|
|
5
5
|
(function (QPQCoreConfigSettingType) {
|
|
6
6
|
QPQCoreConfigSettingType["appName"] = "@quidproquo-core/config/AppName";
|
|
7
7
|
QPQCoreConfigSettingType["moduleName"] = "@quidproquo-core/config/moduleName";
|
|
8
|
-
QPQCoreConfigSettingType["appBasePath"] = "@quidproquo-core/config/appBasePath";
|
|
9
8
|
QPQCoreConfigSettingType["storageDrive"] = "@quidproquo-core/config/storageDrive";
|
|
10
9
|
QPQCoreConfigSettingType["schedule"] = "@quidproquo-core/config/schedule";
|
|
11
10
|
QPQCoreConfigSettingType["secret"] = "@quidproquo-core/config/secret";
|
|
12
11
|
QPQCoreConfigSettingType["global"] = "@quidproquo-core/config/global";
|
|
13
12
|
QPQCoreConfigSettingType["parameter"] = "@quidproquo-core/config/parameter";
|
|
14
13
|
QPQCoreConfigSettingType["actionProcessors"] = "@quidproquo-core/config/actionProcessors";
|
|
15
|
-
QPQCoreConfigSettingType["
|
|
14
|
+
QPQCoreConfigSettingType["apiBuildPath"] = "@quidproquo-core/config/apiBuildPath";
|
|
16
15
|
QPQCoreConfigSettingType["queue"] = "@quidproquo-core/config/Queue";
|
|
17
16
|
QPQCoreConfigSettingType["eventBus"] = "@quidproquo-core/config/EventBus";
|
|
18
17
|
QPQCoreConfigSettingType["userDirectory"] = "@quidproquo-core/config/UserDirectory";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineApiBuildPath = void 0;
|
|
4
|
+
const QPQConfig_1 = require("../../QPQConfig");
|
|
5
|
+
const defineApiBuildPath = (apiBuildPath) => ({
|
|
6
|
+
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.apiBuildPath,
|
|
7
|
+
uniqueKey: apiBuildPath,
|
|
8
|
+
apiBuildPath,
|
|
9
|
+
});
|
|
10
|
+
exports.defineApiBuildPath = defineApiBuildPath;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './defineApiBuildPath';
|
|
@@ -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("./defineApiBuildPath"), exports);
|
|
@@ -7,4 +7,4 @@ export interface ApplicationModuleQPQConfigSetting extends QPQConfigSetting {
|
|
|
7
7
|
deployRegion?: string;
|
|
8
8
|
feature?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const defineApplicationModule: (applicationName: string, moduleName: string, environment: string, configRoot: string, deployRegion?: string, feature?: string) => QPQConfig;
|
|
10
|
+
export declare const defineApplicationModule: (applicationName: string, moduleName: string, environment: string, configRoot: string, apiBuildPath: string, deployRegion?: string, feature?: string) => QPQConfig;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineApplicationModule = void 0;
|
|
4
|
+
const apiBuildPath_1 = require("./apiBuildPath");
|
|
4
5
|
const applicationName_1 = require("./applicationName");
|
|
5
6
|
const moduleName_1 = require("./moduleName");
|
|
6
|
-
const defineApplicationModule = (applicationName, moduleName, environment, configRoot, deployRegion, feature) => [
|
|
7
|
+
const defineApplicationModule = (applicationName, moduleName, environment, configRoot, apiBuildPath, deployRegion, feature) => [
|
|
7
8
|
(0, applicationName_1.defineApplication)(applicationName, environment, configRoot, deployRegion, feature),
|
|
8
9
|
(0, moduleName_1.defineModule)(moduleName),
|
|
10
|
+
(0, apiBuildPath_1.defineApiBuildPath)(apiBuildPath),
|
|
9
11
|
];
|
|
10
12
|
exports.defineApplicationModule = defineApplicationModule;
|
|
@@ -2,7 +2,6 @@ import { QpqFunctionRuntime } from '../../types';
|
|
|
2
2
|
import { QPQConfigSetting } from '../QPQConfig';
|
|
3
3
|
export interface DeployEventsQPQConfigSetting extends QPQConfigSetting {
|
|
4
4
|
name: string;
|
|
5
|
-
buildPath: string;
|
|
6
5
|
runtime: QpqFunctionRuntime;
|
|
7
6
|
}
|
|
8
|
-
export declare const defineDeployEvent: (
|
|
7
|
+
export declare const defineDeployEvent: (name: string, runtime: QpqFunctionRuntime) => DeployEventsQPQConfigSetting;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineDeployEvent = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const defineDeployEvent = (
|
|
5
|
+
const defineDeployEvent = (name, runtime) => ({
|
|
6
6
|
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.deployEvent,
|
|
7
7
|
uniqueKey: name,
|
|
8
|
-
buildPath,
|
|
9
8
|
runtime,
|
|
10
9
|
name,
|
|
11
10
|
});
|
|
@@ -2,10 +2,9 @@ export * from './emailTemplates';
|
|
|
2
2
|
export * from './actionProcessors';
|
|
3
3
|
export * from './applicationModule';
|
|
4
4
|
export * from './applicationName';
|
|
5
|
-
export * from './applicationBasePath';
|
|
6
5
|
export * from './applicationVersion';
|
|
7
6
|
export * from './moduleName';
|
|
8
|
-
export * from './
|
|
7
|
+
export * from './apiBuildPath';
|
|
9
8
|
export * from './configValue';
|
|
10
9
|
export * from './environmentSettings';
|
|
11
10
|
export * from './eventBus';
|
|
@@ -18,10 +18,9 @@ __exportStar(require("./emailTemplates"), exports);
|
|
|
18
18
|
__exportStar(require("./actionProcessors"), exports);
|
|
19
19
|
__exportStar(require("./applicationModule"), exports);
|
|
20
20
|
__exportStar(require("./applicationName"), exports);
|
|
21
|
-
__exportStar(require("./applicationBasePath"), exports);
|
|
22
21
|
__exportStar(require("./applicationVersion"), exports);
|
|
23
22
|
__exportStar(require("./moduleName"), exports);
|
|
24
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./apiBuildPath"), exports);
|
|
25
24
|
__exportStar(require("./configValue"), exports);
|
|
26
25
|
__exportStar(require("./environmentSettings"), exports);
|
|
27
26
|
__exportStar(require("./eventBus"), exports);
|
|
@@ -15,7 +15,6 @@ export interface QPQConfigAdvancedQueueSettings extends QPQConfigAdvancedSetting
|
|
|
15
15
|
}
|
|
16
16
|
export interface QueueQPQConfigSetting extends QPQConfigSetting {
|
|
17
17
|
name: string;
|
|
18
|
-
buildPath: string;
|
|
19
18
|
batchSize: number;
|
|
20
19
|
batchWindowInSeconds: number;
|
|
21
20
|
concurrency: number;
|
|
@@ -26,4 +25,4 @@ export interface QueueQPQConfigSetting extends QPQConfigSetting {
|
|
|
26
25
|
eventBusSubscriptions: string[];
|
|
27
26
|
maxConcurrentExecutions?: number;
|
|
28
27
|
}
|
|
29
|
-
export declare const defineQueue: (name: string,
|
|
28
|
+
export declare const defineQueue: (name: string, processors: QpqQueueProcessors, options?: QPQConfigAdvancedQueueSettings) => QueueQPQConfigSetting;
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineQueue = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const defineQueue = (name,
|
|
5
|
+
const defineQueue = (name, processors, options) => ({
|
|
6
6
|
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.queue,
|
|
7
7
|
uniqueKey: name,
|
|
8
8
|
name,
|
|
9
|
-
buildPath,
|
|
10
9
|
batchSize: (options === null || options === void 0 ? void 0 : options.batchSize) || 0,
|
|
11
10
|
batchWindowInSeconds: (options === null || options === void 0 ? void 0 : options.batchWindowInSeconds) || 5,
|
|
12
11
|
concurrency: (options === null || options === void 0 ? void 0 : options.concurrency) || 1,
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { QpqFunctionRuntime } from '../../types';
|
|
2
|
-
import { QPQConfigSetting } from '../QPQConfig';
|
|
2
|
+
import { QPQConfigAdvancedSettings, QPQConfigSetting } from '../QPQConfig';
|
|
3
3
|
export declare enum ScheduleTypeEnum {
|
|
4
4
|
Recurring = "Recurring"
|
|
5
5
|
}
|
|
6
|
+
export interface QPQConfigAdvancedScheduleSettings extends QPQConfigAdvancedSettings {
|
|
7
|
+
metadata?: Record<string, any>;
|
|
8
|
+
}
|
|
6
9
|
export interface ScheduleQPQConfigSetting extends QPQConfigSetting {
|
|
7
10
|
scheduleType: ScheduleTypeEnum;
|
|
8
11
|
runtime: QpqFunctionRuntime;
|
|
9
12
|
cronExpression: string;
|
|
10
|
-
|
|
13
|
+
metadata: Record<string, any>;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Defines a recurring schedule using a cron expression.
|
|
@@ -69,4 +72,4 @@ export interface ScheduleQPQConfigSetting extends QPQConfigSetting {
|
|
|
69
72
|
* @param {string} buildPath - The build path to the function's code.
|
|
70
73
|
* @returns {ScheduleQPQConfigSetting} The configuration setting for the scheduled task.
|
|
71
74
|
*/
|
|
72
|
-
export declare const defineRecurringSchedule: (cronExpression: string, runtime: QpqFunctionRuntime,
|
|
75
|
+
export declare const defineRecurringSchedule: (cronExpression: string, runtime: QpqFunctionRuntime, options?: QPQConfigAdvancedScheduleSettings) => ScheduleQPQConfigSetting;
|
|
@@ -67,7 +67,7 @@ var ScheduleTypeEnum;
|
|
|
67
67
|
* @param {string} buildPath - The build path to the function's code.
|
|
68
68
|
* @returns {ScheduleQPQConfigSetting} The configuration setting for the scheduled task.
|
|
69
69
|
*/
|
|
70
|
-
const defineRecurringSchedule = (cronExpression, runtime,
|
|
70
|
+
const defineRecurringSchedule = (cronExpression, runtime, options) => {
|
|
71
71
|
const uniqueKey = (0, qpqCoreUtils_1.getStoryNameFromQpqFunctionRuntime)(runtime);
|
|
72
72
|
return {
|
|
73
73
|
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.schedule,
|
|
@@ -75,7 +75,7 @@ const defineRecurringSchedule = (cronExpression, runtime, buildPath) => {
|
|
|
75
75
|
scheduleType: ScheduleTypeEnum.Recurring,
|
|
76
76
|
runtime,
|
|
77
77
|
cronExpression,
|
|
78
|
-
|
|
78
|
+
metadata: (options === null || options === void 0 ? void 0 : options.metadata) || {},
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
exports.defineRecurringSchedule = defineRecurringSchedule;
|
|
@@ -35,7 +35,6 @@ export interface QPQConfigAdvancedUserDirectorySettings extends QPQConfigAdvance
|
|
|
35
35
|
}
|
|
36
36
|
export interface UserDirectoryQPQConfigSetting extends QPQConfigSetting {
|
|
37
37
|
name: string;
|
|
38
|
-
buildPath: string;
|
|
39
38
|
phoneRequired: boolean;
|
|
40
39
|
selfSignUpEnabled: boolean;
|
|
41
40
|
emailTemplates: EmailTemplates;
|
|
@@ -44,4 +43,4 @@ export interface UserDirectoryQPQConfigSetting extends QPQConfigSetting {
|
|
|
44
43
|
oAuth?: AuthDirectoryOAuth;
|
|
45
44
|
customAuthRuntime?: CustomAuthRuntime;
|
|
46
45
|
}
|
|
47
|
-
export declare const defineUserDirectory: (name: string,
|
|
46
|
+
export declare const defineUserDirectory: (name: string, options?: QPQConfigAdvancedUserDirectorySettings) => UserDirectoryQPQConfigSetting;
|
|
@@ -8,13 +8,12 @@ var AuthDirectoryFederatedProviderType;
|
|
|
8
8
|
AuthDirectoryFederatedProviderType["Facebook"] = "facebook";
|
|
9
9
|
AuthDirectoryFederatedProviderType["Google"] = "google";
|
|
10
10
|
})(AuthDirectoryFederatedProviderType = exports.AuthDirectoryFederatedProviderType || (exports.AuthDirectoryFederatedProviderType = {}));
|
|
11
|
-
const defineUserDirectory = (name,
|
|
11
|
+
const defineUserDirectory = (name, options) => {
|
|
12
12
|
var _a, _b, _c;
|
|
13
13
|
return ({
|
|
14
14
|
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.userDirectory,
|
|
15
15
|
uniqueKey: name,
|
|
16
16
|
name,
|
|
17
|
-
buildPath,
|
|
18
17
|
phoneRequired: (options === null || options === void 0 ? void 0 : options.phoneRequired) || false,
|
|
19
18
|
selfSignUpEnabled: (options === null || options === void 0 ? void 0 : options.selfSignUpEnabled) || true,
|
|
20
19
|
emailTemplates: {
|
|
@@ -31,7 +31,7 @@ const createImplementationRuntime = (qpqConfig, tags, getDateNow, randomGuid, se
|
|
|
31
31
|
const resolveStory = (0, qpqRuntime_1.createRuntime)(qpqConfig, {
|
|
32
32
|
context: session.context,
|
|
33
33
|
depth: (session.depth || 0) + 1,
|
|
34
|
-
|
|
34
|
+
decodedAccessToken: session.decodedAccessToken,
|
|
35
35
|
correlation: session.correlation,
|
|
36
36
|
}, () => __awaiter(void 0, void 0, void 0, function* () { return actionProcessors; }), getDateNow, logger,
|
|
37
37
|
// TODO: Share this logic.
|
|
@@ -67,7 +67,7 @@ export declare const getScheduleEvents: (configs: QPQConfig) => ScheduleQPQConfi
|
|
|
67
67
|
export declare const getQueueSrcEntries: (configs: QPQConfig) => QpqFunctionRuntime[];
|
|
68
68
|
export declare const getUserDirectorySrcEntries: (qpqConfig: QPQConfig) => QpqFunctionRuntime[];
|
|
69
69
|
export declare const getAllSrcEntries: (qpqConfig: QPQConfig) => QpqFunctionRuntime[];
|
|
70
|
-
export declare const
|
|
70
|
+
export declare const getApiBuildPath: (qpqConfig: QPQConfig) => string;
|
|
71
71
|
export declare const getSrcPathFromQpqFunctionRuntime: (qpqFunctionRuntime: QpqFunctionRuntime) => string;
|
|
72
72
|
export declare function getSrcPathFromQpqFunctionRuntimeWithoutLeadingSlash(runtime: QpqFunctionRuntime): string;
|
|
73
73
|
export declare const getFullSrcPathFromQpqFunctionRuntime: (qpqFunctionRuntime: QpqFunctionRuntime, qpqConfig: QPQConfig, configRootOverride?: string) => string;
|
|
@@ -84,12 +84,8 @@ export declare const getAllParameterConfigs: (qpqConfig: QPQConfig) => Parameter
|
|
|
84
84
|
export declare const getParameterConfig: (name: string, qpqConfig: QPQConfig) => ParameterQPQConfigSetting;
|
|
85
85
|
export declare const getOwnedParameterConfigs: (qpqConfig: QPQConfig) => ParameterQPQConfigSetting[];
|
|
86
86
|
export declare const getUniqueKeyForSetting: (setting: QPQConfigSetting) => string;
|
|
87
|
-
export declare const getScheduleEntryFullPath: (qpqConfig: QPQConfig, scheduleConfig: ScheduleQPQConfigSetting) => string;
|
|
88
|
-
export declare const getStorageDriveEntryFullPath: (qpqConfig: QPQConfig, storageDriveConfig: StorageDriveQPQConfigSetting) => string;
|
|
89
|
-
export declare const getDeployEventFullPath: (qpqConfig: QPQConfig, deployEventConfig: DeployEventsQPQConfigSetting) => string;
|
|
90
87
|
export declare const getStorageDriveUploadFullPath: (qpqConfig: QPQConfig, storageDriveConfig: StorageDriveQPQConfigSetting) => string;
|
|
91
|
-
export declare const
|
|
92
|
-
export declare const getUserDirectoryEntryFullPath: (qpqConfig: QPQConfig, userDirectoryConfig: UserDirectoryQPQConfigSetting) => string;
|
|
88
|
+
export declare const getApiBuildPathFullPath: (qpqConfig: QPQConfig) => string;
|
|
93
89
|
export declare const getQueueQueueProcessors: (name: string, qpqConfig: QPQConfig) => QpqQueueProcessors;
|
|
94
90
|
export declare const convertCrossModuleOwnerToGenericResourceNameOverride: <T extends string>(owner?: CrossModuleOwner<T> | undefined) => CrossModuleOwner<'resourceNameOverride'> | undefined;
|
|
95
91
|
export declare const convertCustomFullyQualifiedResourceToGeneric: <T extends string>(resource: CustomFullyQualifiedResource<T>) => FullyQualifiedResource;
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.getAllParameterConfigs = exports.getUserDirectoryByName = exports.getOwnedUserDirectories = exports.getUserDirectories = exports.getGlobalConfigValue = exports.getOwnedSecrets = exports.getAllSecretConfigs = exports.getSecretByName = exports.getSrcFilenameFromQpqFunctionRuntime = exports.getStoryNameFromQpqFunctionRuntime = exports.getFullSrcPathFromQpqFunctionRuntime = exports.getSrcPathFromQpqFunctionRuntimeWithoutLeadingSlash = exports.getSrcPathFromQpqFunctionRuntime = exports.
|
|
15
|
-
exports.getFullUrlFromConfigUrl = exports.isSameResource = exports.getKeyValueStoreFullyQualifiedResourceName = exports.getFullyQualifiedResourceName = exports.convertCustomFullyQualifiedResourceToGeneric = exports.convertCrossModuleOwnerToGenericResourceNameOverride = exports.getQueueQueueProcessors = exports.
|
|
14
|
+
exports.getAllParameterConfigs = exports.getUserDirectoryByName = exports.getOwnedUserDirectories = exports.getUserDirectories = exports.getGlobalConfigValue = exports.getOwnedSecrets = exports.getAllSecretConfigs = exports.getSecretByName = exports.getSrcFilenameFromQpqFunctionRuntime = exports.getStoryNameFromQpqFunctionRuntime = exports.getFullSrcPathFromQpqFunctionRuntime = exports.getSrcPathFromQpqFunctionRuntimeWithoutLeadingSlash = exports.getSrcPathFromQpqFunctionRuntime = exports.getApiBuildPath = exports.getAllSrcEntries = exports.getUserDirectorySrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getKeyValueStoreByName = exports.resolveCrossServiceResourceName = exports.getOwnedStorageDrives = exports.getOwnedGraphDatabases = exports.getOwnedKeyValueStores = exports.getVirualNetworkConfigs = exports.getDeployEventConfigs = exports.getAllGraphDatabaseConfigs = exports.getAllKeyValueStores = exports.getOwnedItems = exports.getEventBusConfigByName = exports.getOwnedEventBusConfigs = exports.getAllClaudeAiConfigs = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueueByName = exports.getQueues = exports.getStorageDriveByName = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationName = exports.getApplicationConfigRoot = exports.getApplicationModuleName = exports.getApplicationConfigSetting = exports.getConfigSetting = exports.getConfigSettings = exports.flattenQpqConfig = void 0;
|
|
15
|
+
exports.getFullUrlFromConfigUrl = exports.isSameResource = exports.getKeyValueStoreFullyQualifiedResourceName = exports.getFullyQualifiedResourceName = exports.convertCustomFullyQualifiedResourceToGeneric = exports.convertCrossModuleOwnerToGenericResourceNameOverride = exports.getQueueQueueProcessors = exports.getApiBuildPathFullPath = exports.getStorageDriveUploadFullPath = exports.getUniqueKeyForSetting = exports.getOwnedParameterConfigs = exports.getParameterConfig = void 0;
|
|
16
16
|
const utils_1 = require("./utils");
|
|
17
17
|
const config_1 = require("./config");
|
|
18
18
|
/**
|
|
@@ -272,14 +272,14 @@ const getAllSrcEntries = (qpqConfig) => {
|
|
|
272
272
|
return result;
|
|
273
273
|
};
|
|
274
274
|
exports.getAllSrcEntries = getAllSrcEntries;
|
|
275
|
-
const
|
|
276
|
-
const [
|
|
277
|
-
if (!
|
|
278
|
-
throw new Error(`Can not find app base path use
|
|
275
|
+
const getApiBuildPath = (qpqConfig) => {
|
|
276
|
+
const [apiBuildPathConfig] = (0, exports.getConfigSettings)(qpqConfig, config_1.QPQCoreConfigSettingType.apiBuildPath);
|
|
277
|
+
if (!apiBuildPathConfig) {
|
|
278
|
+
throw new Error(`Can not find app base path use defineApiBuildPath or defineApplicationModule`);
|
|
279
279
|
}
|
|
280
|
-
return
|
|
280
|
+
return apiBuildPathConfig.apiBuildPath;
|
|
281
281
|
};
|
|
282
|
-
exports.
|
|
282
|
+
exports.getApiBuildPath = getApiBuildPath;
|
|
283
283
|
const getSrcPathFromQpqFunctionRuntime = (qpqFunctionRuntime) => {
|
|
284
284
|
const [srcPath, _method] = qpqFunctionRuntime.split('::');
|
|
285
285
|
if (srcPath.startsWith('full@')) {
|
|
@@ -385,34 +385,16 @@ const getUniqueKeyForSetting = (setting) => {
|
|
|
385
385
|
return `${type}${key}`;
|
|
386
386
|
};
|
|
387
387
|
exports.getUniqueKeyForSetting = getUniqueKeyForSetting;
|
|
388
|
-
const getScheduleEntryFullPath = (qpqConfig, scheduleConfig) => {
|
|
389
|
-
return (0, utils_1.joinPaths)((0, exports.getConfigRoot)(qpqConfig), scheduleConfig.buildPath);
|
|
390
|
-
};
|
|
391
|
-
exports.getScheduleEntryFullPath = getScheduleEntryFullPath;
|
|
392
|
-
const getStorageDriveEntryFullPath = (qpqConfig, storageDriveConfig) => {
|
|
393
|
-
var _a;
|
|
394
|
-
if (!((_a = storageDriveConfig.onEvent) === null || _a === void 0 ? void 0 : _a.buildPath)) {
|
|
395
|
-
throw new Error('Please specify a build path in your storage drive config (onEvent)');
|
|
396
|
-
}
|
|
397
|
-
return (0, utils_1.joinPaths)((0, exports.getConfigRoot)(qpqConfig), storageDriveConfig.onEvent.buildPath);
|
|
398
|
-
};
|
|
399
|
-
exports.getStorageDriveEntryFullPath = getStorageDriveEntryFullPath;
|
|
400
|
-
const getDeployEventFullPath = (qpqConfig, deployEventConfig) => {
|
|
401
|
-
return (0, utils_1.joinPaths)((0, exports.getConfigRoot)(qpqConfig), deployEventConfig.buildPath);
|
|
402
|
-
};
|
|
403
|
-
exports.getDeployEventFullPath = getDeployEventFullPath;
|
|
404
388
|
const getStorageDriveUploadFullPath = (qpqConfig, storageDriveConfig) => {
|
|
405
389
|
return (0, utils_1.joinPaths)((0, exports.getConfigRoot)(qpqConfig), storageDriveConfig.copyPath || '');
|
|
406
390
|
};
|
|
407
391
|
exports.getStorageDriveUploadFullPath = getStorageDriveUploadFullPath;
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
const getUserDirectoryEntryFullPath = (qpqConfig, userDirectoryConfig) => {
|
|
413
|
-
return (0, utils_1.joinPaths)((0, exports.getConfigRoot)(qpqConfig), userDirectoryConfig.buildPath);
|
|
392
|
+
const getApiBuildPathFullPath = (qpqConfig) => {
|
|
393
|
+
const configRoot = (0, exports.getConfigRoot)(qpqConfig);
|
|
394
|
+
const apiBuildPath = (0, exports.getApiBuildPath)(qpqConfig);
|
|
395
|
+
return (0, utils_1.joinPaths)(configRoot, apiBuildPath);
|
|
414
396
|
};
|
|
415
|
-
exports.
|
|
397
|
+
exports.getApiBuildPathFullPath = getApiBuildPathFullPath;
|
|
416
398
|
const getQueueQueueProcessors = (name, qpqConfig) => {
|
|
417
399
|
const seoConfigs = (0, exports.getConfigSettings)(qpqConfig, config_1.QPQCoreConfigSettingType.queue);
|
|
418
400
|
const queueConfig = seoConfigs.find((c) => c.name === name);
|
|
@@ -30,7 +30,7 @@ const qpqExecuteLog = (storyResult, runtime, overrides = {}) => __awaiter(void 0
|
|
|
30
30
|
},
|
|
31
31
|
});
|
|
32
32
|
// Generate an empty story resolver
|
|
33
|
-
const resolveStory = (0, qpqRuntime_1.createRuntime)([(0, config_1.defineApplicationModule)('Debugger', storyResult.moduleName, 'development', __dirname)], {
|
|
33
|
+
const resolveStory = (0, qpqRuntime_1.createRuntime)([(0, config_1.defineApplicationModule)('Debugger', storyResult.moduleName, 'development', __dirname, './dist')], {
|
|
34
34
|
correlation: storyResult.fromCorrelation,
|
|
35
35
|
depth: storyResult.session.depth,
|
|
36
36
|
context: storyResult.session.context,
|
|
@@ -44,7 +44,7 @@ const createRuntime = (qpqConfig, callerSession, getActionProcessors, getTimeNow
|
|
|
44
44
|
let storySession = {
|
|
45
45
|
correlation: runtimeCorrelation,
|
|
46
46
|
depth: callerSession.depth + 1,
|
|
47
|
-
|
|
47
|
+
decodedAccessToken: callerSession.decodedAccessToken,
|
|
48
48
|
context: callerSession.context,
|
|
49
49
|
};
|
|
50
50
|
const updateSession = (newSession) => {
|
|
@@ -24,7 +24,7 @@ function* askProcessEventRecord(qpqEventRecord, eventArguments) {
|
|
|
24
24
|
// return the result
|
|
25
25
|
return (0, actionLogic_1.getSuccessfulEitherActionResult)(earlyExitQpqEventRecordResponse);
|
|
26
26
|
}
|
|
27
|
-
const messageSession = yield* (0, actions_2.askEventGetStorySession)(eventArguments, qpqEventRecord);
|
|
27
|
+
const messageSession = yield* (0, actions_2.askEventGetStorySession)(eventArguments, qpqEventRecord, matchResultResult.result);
|
|
28
28
|
// Execute the story
|
|
29
29
|
const executeStoryResponse = yield* (0, askCatch_1.askCatch)((0, system_1.askExecuteStory)(matchResultResult.result.runtime, [qpqEventRecord, matchResultResult.result.runtimeOptions], messageSession));
|
|
30
30
|
yield* (0, actions_1.askLogCreate)(types_1.LogLevelEnum.Info, 'executeStoryResponse', executeStoryResponse);
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { QPQError } from './ErrorTypeEnum';
|
|
2
2
|
import { Action } from './Action';
|
|
3
3
|
import { QpqContext } from './QpqContextIdentifier';
|
|
4
|
+
export interface DecodedAccessToken {
|
|
5
|
+
userId: string;
|
|
6
|
+
username: string;
|
|
7
|
+
exp: number;
|
|
8
|
+
roles?: string[];
|
|
9
|
+
userDirectory: string;
|
|
10
|
+
wasValid: boolean;
|
|
11
|
+
}
|
|
4
12
|
export interface StorySession {
|
|
5
13
|
correlation?: string;
|
|
6
14
|
depth: number;
|
|
7
15
|
accessToken?: string;
|
|
16
|
+
decodedAccessToken?: DecodedAccessToken;
|
|
8
17
|
context: QpqContext<any>;
|
|
9
18
|
}
|
|
10
19
|
export type StorySessionUpdater = (newSession: Partial<StorySession>) => void;
|
|
@@ -41,9 +50,9 @@ export type AskResponse<T> = Generator<Action<any>, T, any>;
|
|
|
41
50
|
export type ExtractGeneratorReturnType<T extends Generator> = T extends Generator<any, infer R, any> ? R : never;
|
|
42
51
|
export type AskResponseReturnType<T extends AskResponse<any>> = ExtractGeneratorReturnType<T>;
|
|
43
52
|
export type qpqStory = <T = any>(...args: any[]) => AskResponse<T>;
|
|
44
|
-
export interface ActionHistory<
|
|
45
|
-
act: Action<
|
|
46
|
-
res:
|
|
53
|
+
export interface ActionHistory<P = any, R = any> {
|
|
54
|
+
act: Action<P>;
|
|
55
|
+
res: R;
|
|
47
56
|
startedAt: string;
|
|
48
57
|
finishedAt: string;
|
|
49
58
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { EventGetStorySessionActionRequester } from './EventGetStorySessionActionTypes';
|
|
2
|
-
|
|
2
|
+
import { AnyMatchStoryResult } from './EventActionType';
|
|
3
|
+
export declare function askEventGetStorySession<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult>(eventParams: EventParams, qpqEventRecord: QpqEventRecord, matchStoryResult: MSR): EventGetStorySessionActionRequester<EventParams, QpqEventRecord, MSR>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventActionType } from './EventActionType';
|
|
2
|
-
export function* askEventGetStorySession(eventParams, qpqEventRecord) {
|
|
2
|
+
export function* askEventGetStorySession(eventParams, qpqEventRecord, matchStoryResult) {
|
|
3
3
|
return yield {
|
|
4
4
|
type: EventActionType.GetStorySession,
|
|
5
|
-
payload: { eventParams, qpqEventRecord },
|
|
5
|
+
payload: { eventParams, qpqEventRecord, matchStoryResult },
|
|
6
6
|
};
|
|
7
7
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { StorySession } from '../../types';
|
|
2
2
|
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
3
|
-
import { EventActionType } from './EventActionType';
|
|
4
|
-
export interface EventGetStorySessionActionPayload<EventParams extends Array<unknown>, QpqEventRecord> {
|
|
3
|
+
import { AnyMatchStoryResult, EventActionType } from './EventActionType';
|
|
4
|
+
export interface EventGetStorySessionActionPayload<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> {
|
|
5
5
|
qpqEventRecord: QpqEventRecord;
|
|
6
6
|
eventParams: EventParams;
|
|
7
|
+
matchStoryResult: MSR;
|
|
7
8
|
}
|
|
8
|
-
export interface EventGetStorySessionAction<EventParams extends Array<unknown>, QpqEventRecord> extends Action<EventGetStorySessionActionPayload<EventParams, QpqEventRecord>> {
|
|
9
|
+
export interface EventGetStorySessionAction<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> extends Action<EventGetStorySessionActionPayload<EventParams, QpqEventRecord, MSR>> {
|
|
9
10
|
type: EventActionType.GetStorySession;
|
|
10
|
-
payload: EventGetStorySessionActionPayload<EventParams, QpqEventRecord>;
|
|
11
|
+
payload: EventGetStorySessionActionPayload<EventParams, QpqEventRecord, MSR>;
|
|
11
12
|
}
|
|
12
|
-
export type EventGetStorySessionActionProcessor<EventParams extends Array<unknown>, QpqEventRecord> = ActionProcessor<EventGetStorySessionAction<EventParams, QpqEventRecord>, StorySession | undefined>;
|
|
13
|
-
export type EventGetStorySessionActionRequester<EventParams extends Array<unknown>, QpqEventRecord> = ActionRequester<EventGetStorySessionAction<EventParams, QpqEventRecord>, StorySession | undefined>;
|
|
13
|
+
export type EventGetStorySessionActionProcessor<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> = ActionProcessor<EventGetStorySessionAction<EventParams, QpqEventRecord, MSR>, StorySession | undefined>;
|
|
14
|
+
export type EventGetStorySessionActionRequester<EventParams extends Array<unknown>, QpqEventRecord, MSR extends AnyMatchStoryResult> = ActionRequester<EventGetStorySessionAction<EventParams, QpqEventRecord, MSR>, StorySession | undefined>;
|