case-editor-tools 1.0.0-beta.46 → 1.0.0-beta.47
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/exporter/index.js +1 -1
- package/package.json +1 -1
- package/types/messageConfig.d.ts +1 -2
- package/types/messageConfig.js +2 -2
package/exporter/index.js
CHANGED
|
@@ -112,7 +112,7 @@ const generateMessageConfigs = (study, outputPath, pretty) => {
|
|
|
112
112
|
}
|
|
113
113
|
study.messageConfigs.forEach(conf => {
|
|
114
114
|
const fileName = `${messageConfigPath}/${conf.label.replace(' ', '_').toLocaleLowerCase()}.json`;
|
|
115
|
-
const outputObject = types_messageConfig.buildMessageConfig(conf);
|
|
115
|
+
const outputObject = types_messageConfig.buildMessageConfig(conf, study.studyKey);
|
|
116
116
|
try {
|
|
117
117
|
fs__default["default"].writeFileSync(fileName, JSON.stringify(outputObject, undefined, pretty ? 2 : undefined));
|
|
118
118
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "case-editor-tools",
|
|
3
3
|
"description": "Javascript tools to simplify survey and study coding for CASE.",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.47",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|
package/types/messageConfig.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Duration } from "./duration";
|
|
|
3
3
|
export declare type MessageType = 'registration' | 'invitation' | 'verify-email' | 'verification-code' | 'password-reset' | 'password-changed' | 'account-id-changed' | 'weekly' | 'study-reminder' | 'newsletter' | 'account-deleted';
|
|
4
4
|
export interface MessageConfig {
|
|
5
5
|
sendTo: 'study-participants' | 'all-users' | 'scheduled-participant-messages';
|
|
6
|
-
studyKey: string;
|
|
7
6
|
label: string;
|
|
8
7
|
headerOverrides?: {
|
|
9
8
|
from: string;
|
|
@@ -23,7 +22,7 @@ export interface MessageConfig {
|
|
|
23
22
|
subject: string;
|
|
24
23
|
}>;
|
|
25
24
|
}
|
|
26
|
-
export declare const buildMessageConfig: (props: MessageConfig) => {
|
|
25
|
+
export declare const buildMessageConfig: (props: MessageConfig, studyKey: string) => {
|
|
27
26
|
sendTo: "study-participants" | "all-users" | "scheduled-participant-messages";
|
|
28
27
|
studyKey: string;
|
|
29
28
|
label: string;
|
package/types/messageConfig.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var types_duration = require('./duration.js');
|
|
6
6
|
|
|
7
|
-
const buildMessageConfig = (props) => {
|
|
7
|
+
const buildMessageConfig = (props, studyKey) => {
|
|
8
8
|
return {
|
|
9
9
|
sendTo: props.sendTo,
|
|
10
|
-
studyKey:
|
|
10
|
+
studyKey: studyKey,
|
|
11
11
|
label: props.label,
|
|
12
12
|
headerOverrides: props.headerOverrides,
|
|
13
13
|
messageType: props.messageType,
|