quidproquo-core 0.0.87 → 0.0.88
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/userDirectory/UserDirectoryCreateUserActionTypes.d.ts +3 -3
- package/lib/config/settings/emailTemplates/index.d.ts +2 -0
- package/lib/config/settings/emailTemplates/index.js +18 -0
- package/lib/config/settings/emailTemplates/types/index.d.ts +7 -0
- package/lib/config/settings/emailTemplates/types/index.js +2 -0
- package/lib/config/settings/emailTemplates/verifyEmailTemplate.d.ts +2 -0
- package/lib/config/settings/emailTemplates/verifyEmailTemplate.js +7 -0
- package/lib/config/settings/index.d.ts +1 -0
- package/lib/config/settings/index.js +1 -0
- package/lib/config/settings/userDirectory.d.ts +5 -1
- package/lib/config/settings/userDirectory.js +15 -7
- package/lib/qpqCoreUtils.d.ts +3 -0
- package/lib/qpqCoreUtils.js +11 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
|
|
2
|
-
import { UserDirectoryActionType } from './UserDirectoryActionType';
|
|
2
|
+
import { UserDirectoryActionType, AuthenticateUserResponse } from './UserDirectoryActionType';
|
|
3
3
|
export interface CreateUserRequest {
|
|
4
4
|
email: string;
|
|
5
5
|
password: string;
|
|
@@ -13,5 +13,5 @@ export interface UserDirectoryCreateUserAction extends Action<UserDirectoryCreat
|
|
|
13
13
|
type: UserDirectoryActionType.CreateUser;
|
|
14
14
|
payload: UserDirectoryCreateUserActionPayload;
|
|
15
15
|
}
|
|
16
|
-
export type UserDirectoryCreateUserActionProcessor = ActionProcessor<UserDirectoryCreateUserAction,
|
|
17
|
-
export type UserDirectoryCreateUserActionRequester = ActionRequester<UserDirectoryCreateUserAction,
|
|
16
|
+
export type UserDirectoryCreateUserActionProcessor = ActionProcessor<UserDirectoryCreateUserAction, AuthenticateUserResponse>;
|
|
17
|
+
export type UserDirectoryCreateUserActionRequester = ActionRequester<UserDirectoryCreateUserAction, AuthenticateUserResponse>;
|
|
@@ -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("./types"), exports);
|
|
18
|
+
__exportStar(require("./verifyEmailTemplate"), exports);
|
|
@@ -14,6 +14,7 @@ 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("./emailTemplates"), exports);
|
|
17
18
|
__exportStar(require("./actionProcessors"), exports);
|
|
18
19
|
__exportStar(require("./applicationModule"), exports);
|
|
19
20
|
__exportStar(require("./buildPath"), exports);
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { QPQConfigSetting, QPQConfigAdvancedSettings } from '../QPQConfig';
|
|
2
|
+
import { EmailTemplates } from './emailTemplates/types';
|
|
2
3
|
export interface QPQConfigAdvancedUserDirectorySettings extends QPQConfigAdvancedSettings {
|
|
3
4
|
phoneRequired?: boolean;
|
|
4
5
|
selfSignUpEnabled?: boolean;
|
|
6
|
+
emailTemplates?: EmailTemplates;
|
|
5
7
|
}
|
|
6
8
|
export interface UserDirectoryQPQConfigSetting extends QPQConfigSetting {
|
|
7
9
|
name: string;
|
|
10
|
+
buildPath: string;
|
|
8
11
|
phoneRequired: boolean;
|
|
9
12
|
selfSignUpEnabled: boolean;
|
|
13
|
+
emailTemplates: EmailTemplates;
|
|
10
14
|
}
|
|
11
|
-
export declare const defineUserDirectory: (name: string, options?: QPQConfigAdvancedUserDirectorySettings) => UserDirectoryQPQConfigSetting;
|
|
15
|
+
export declare const defineUserDirectory: (name: string, buildPath: string, options?: QPQConfigAdvancedUserDirectorySettings) => UserDirectoryQPQConfigSetting;
|
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineUserDirectory = void 0;
|
|
4
4
|
const QPQConfig_1 = require("../QPQConfig");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const emailTemplates_1 = require("./emailTemplates");
|
|
6
|
+
const defineUserDirectory = (name, buildPath, options) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return ({
|
|
9
|
+
configSettingType: QPQConfig_1.QPQCoreConfigSettingType.userDirectory,
|
|
10
|
+
uniqueKey: name,
|
|
11
|
+
name,
|
|
12
|
+
buildPath,
|
|
13
|
+
phoneRequired: (options === null || options === void 0 ? void 0 : options.phoneRequired) || false,
|
|
14
|
+
selfSignUpEnabled: (options === null || options === void 0 ? void 0 : options.selfSignUpEnabled) || true,
|
|
15
|
+
emailTemplates: {
|
|
16
|
+
verifyEmail: ((_a = options === null || options === void 0 ? void 0 : options.emailTemplates) === null || _a === void 0 ? void 0 : _a.verifyEmail) || emailTemplates_1.verifyEmailTemplate,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
};
|
|
12
20
|
exports.defineUserDirectory = defineUserDirectory;
|
package/lib/qpqCoreUtils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { QPQConfig, QPQConfigSetting } from './config/QPQConfig';
|
|
2
2
|
import { ApplicationModuleQPQConfigSetting, StorageDriveQPQConfigSetting, EventBusQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, ParameterQPQConfigSetting, QueueQPQConfigSetting, QpqQueueProcessors, UserDirectoryQPQConfigSetting } from './config/settings';
|
|
3
|
+
import { EmailTemplates } from './config/settings/emailTemplates/types';
|
|
3
4
|
export declare const getConfigSettings: <T extends QPQConfigSetting>(configs: QPQConfig, configSettingType: string) => T[];
|
|
4
5
|
export declare const getConfigSetting: <T extends QPQConfigSetting>(configs: QPQConfig, serviceInfrastructureConfigType: string) => T | undefined;
|
|
5
6
|
export declare const getApplicationModuleSetting: (qpqConfig: QPQConfig) => ApplicationModuleQPQConfigSetting;
|
|
@@ -14,6 +15,7 @@ export declare const getQueues: (configs: QPQConfig) => QueueQPQConfigSetting[];
|
|
|
14
15
|
export declare const getStorageDriveNames: (configs: QPQConfig) => string[];
|
|
15
16
|
export declare const getAllEventBusConfigs: (qpqConfig: QPQConfig) => EventBusQPQConfigSetting[];
|
|
16
17
|
export declare const getActionProcessorSources: (configs: QPQConfig) => string[];
|
|
18
|
+
export declare const getUserDirectoryEmailTemplates: (qpqConfig: QPQConfig) => Record<string, EmailTemplates>;
|
|
17
19
|
export declare const getScheduleEvents: (configs: QPQConfig) => ScheduleQPQConfigSetting[];
|
|
18
20
|
export declare const getQueueSrcEntries: (configs: QPQConfig) => string[];
|
|
19
21
|
export declare const getAllSrcEntries: (qpqConfig: QPQConfig) => string[];
|
|
@@ -25,4 +27,5 @@ export declare const getUniqueKeyForSetting: (setting: QPQConfigSetting) => stri
|
|
|
25
27
|
export declare const getScheduleEntryFullPath: (qpqConfig: QPQConfig, scheduleConfig: ScheduleQPQConfigSetting) => string;
|
|
26
28
|
export declare const getStorageDriveUploadFullPath: (qpqConfig: QPQConfig, storageDriveConfig: StorageDriveQPQConfigSetting) => string;
|
|
27
29
|
export declare const getQueueEntryFullPath: (qpqConfig: QPQConfig, queueConfig: QueueQPQConfigSetting) => string;
|
|
30
|
+
export declare const getUserDirectoryEntryFullPath: (qpqConfig: QPQConfig, userDirectoryConfig: UserDirectoryQPQConfigSetting) => string;
|
|
28
31
|
export declare const getQueueQueueProcessors: (name: string, qpqConfig: QPQConfig) => QpqQueueProcessors;
|
package/lib/qpqCoreUtils.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getQueueQueueProcessors = exports.getQueueEntryFullPath = exports.getStorageDriveUploadFullPath = exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getSharedSecrets = exports.getOwnedParameters = exports.getUserDirectories = exports.getOwnedSecrets = exports.getAllSrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getActionProcessorSources = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueues = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationModuleName = exports.getApplicationName = exports.getApplicationModuleSetting = exports.getConfigSetting = exports.getConfigSettings = void 0;
|
|
26
|
+
exports.getQueueQueueProcessors = exports.getUserDirectoryEntryFullPath = exports.getQueueEntryFullPath = exports.getStorageDriveUploadFullPath = exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getSharedSecrets = exports.getOwnedParameters = exports.getUserDirectories = exports.getOwnedSecrets = exports.getAllSrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueues = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationModuleName = exports.getApplicationName = exports.getApplicationModuleSetting = exports.getConfigSetting = exports.getConfigSettings = void 0;
|
|
27
27
|
const path = __importStar(require("path"));
|
|
28
28
|
const QPQConfig_1 = require("./config/QPQConfig");
|
|
29
29
|
const getConfigSettings = (configs, configSettingType) => {
|
|
@@ -90,6 +90,12 @@ const getActionProcessorSources = (configs) => {
|
|
|
90
90
|
return sources;
|
|
91
91
|
};
|
|
92
92
|
exports.getActionProcessorSources = getActionProcessorSources;
|
|
93
|
+
const getUserDirectoryEmailTemplates = (qpqConfig) => {
|
|
94
|
+
const userDirectories = (0, exports.getConfigSettings)(qpqConfig, QPQConfig_1.QPQCoreConfigSettingType.userDirectory);
|
|
95
|
+
const record = userDirectories.reduce((acc, ud) => (Object.assign(Object.assign({}, acc), { [ud.name]: ud.emailTemplates })), {});
|
|
96
|
+
return record;
|
|
97
|
+
};
|
|
98
|
+
exports.getUserDirectoryEmailTemplates = getUserDirectoryEmailTemplates;
|
|
93
99
|
const getScheduleEvents = (configs) => {
|
|
94
100
|
return (0, exports.getConfigSettings)(configs, QPQConfig_1.QPQCoreConfigSettingType.schedule);
|
|
95
101
|
};
|
|
@@ -142,6 +148,10 @@ const getQueueEntryFullPath = (qpqConfig, queueConfig) => {
|
|
|
142
148
|
return path.join((0, exports.getConfigRoot)(qpqConfig), queueConfig.buildPath);
|
|
143
149
|
};
|
|
144
150
|
exports.getQueueEntryFullPath = getQueueEntryFullPath;
|
|
151
|
+
const getUserDirectoryEntryFullPath = (qpqConfig, userDirectoryConfig) => {
|
|
152
|
+
return path.join((0, exports.getConfigRoot)(qpqConfig), userDirectoryConfig.buildPath);
|
|
153
|
+
};
|
|
154
|
+
exports.getUserDirectoryEntryFullPath = getUserDirectoryEntryFullPath;
|
|
145
155
|
const getQueueQueueProcessors = (name, qpqConfig) => {
|
|
146
156
|
const seoConfigs = (0, exports.getConfigSettings)(qpqConfig, QPQConfig_1.QPQCoreConfigSettingType.queue);
|
|
147
157
|
const queueConfig = seoConfigs.find((c) => c.name === name);
|