case-editor-tools 1.6.7 → 1.6.8
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.
|
@@ -30,6 +30,7 @@ export declare const NativeStudyEngineExpressions: {
|
|
|
30
30
|
hasParticipantFlagKey: (key: string) => Expression;
|
|
31
31
|
getParticipantFlagValue: (key: string) => Expression;
|
|
32
32
|
getParticipantFlagValueAsNum: (key: string) => Expression;
|
|
33
|
+
getLastSubmissionDate: (surveyKey?: string) => Expression;
|
|
33
34
|
lastSubmissionDateOlderThan: (reference: number | Expression, surveyKey?: string) => Expression;
|
|
34
35
|
hasMessageTypeAssigned: (messageType: string) => Expression;
|
|
35
36
|
getMessageNextTime: (messageType: string) => Expression;
|
|
@@ -42,6 +43,7 @@ export declare const NativeStudyEngineExpressions: {
|
|
|
42
43
|
hasParticipantFlagKeyAndValue: (key: string, value: string) => Expression;
|
|
43
44
|
hasParticipantFlagKey: (key: string) => Expression;
|
|
44
45
|
getParticipantFlagValue: (key: string) => Expression;
|
|
46
|
+
getLastSubmissionDate: (surveyKey?: string) => Expression;
|
|
45
47
|
lastSubmissionDateOlderThan: (reference: number | Expression, surveyKey?: string) => Expression;
|
|
46
48
|
hasMessageTypeAssigned: (messageType: string) => Expression;
|
|
47
49
|
getMessageNextTime: (messageType: string) => Expression;
|
|
@@ -194,6 +196,7 @@ export declare const StudyEngine: {
|
|
|
194
196
|
hasParticipantFlagKey: (key: string) => Expression;
|
|
195
197
|
getParticipantFlagValue: (key: string) => Expression;
|
|
196
198
|
getParticipantFlagValueAsNum: (key: string) => Expression;
|
|
199
|
+
getLastSubmissionDate: (surveyKey?: string) => Expression;
|
|
197
200
|
lastSubmissionDateOlderThan: (reference: number | Expression, surveyKey?: string) => Expression;
|
|
198
201
|
hasMessageTypeAssigned: (messageType: string) => Expression;
|
|
199
202
|
getMessageNextTime: (messageType: string) => Expression;
|
|
@@ -206,6 +209,7 @@ export declare const StudyEngine: {
|
|
|
206
209
|
hasParticipantFlagKeyAndValue: (key: string, value: string) => Expression;
|
|
207
210
|
hasParticipantFlagKey: (key: string) => Expression;
|
|
208
211
|
getParticipantFlagValue: (key: string) => Expression;
|
|
212
|
+
getLastSubmissionDate: (surveyKey?: string) => Expression;
|
|
209
213
|
lastSubmissionDateOlderThan: (reference: number | Expression, surveyKey?: string) => Expression;
|
|
210
214
|
hasMessageTypeAssigned: (messageType: string) => Expression;
|
|
211
215
|
getMessageNextTime: (messageType: string) => Expression;
|
|
@@ -169,6 +169,13 @@ const hasMessageTypeAssignedForIncoming = (messageType) => expressionUtils_expre
|
|
|
169
169
|
*/
|
|
170
170
|
const getMessageNextTime = (messageType) => expressionUtils_expressionGen.generateExpression('getMessageNextTime', undefined, messageType);
|
|
171
171
|
const getMessageNextTimeForIncoming = (messageType) => expressionUtils_expressionGen.generateExpression('incomingState:getMessageNextTime', undefined, messageType);
|
|
172
|
+
/**
|
|
173
|
+
* Retrieve the timestamp of the last submission
|
|
174
|
+
* @param surveyKey - optional - check for this specific survey key. If empty, it would check for all the submissions.
|
|
175
|
+
* @returns timestamp value or zero
|
|
176
|
+
*/
|
|
177
|
+
const getLastSubmissionDate = (surveyKey) => expressionUtils_expressionGen.generateExpression('getLastSubmissionDate', undefined, surveyKey);
|
|
178
|
+
const getLastSubmissionDateForIncoming = (surveyKey) => expressionUtils_expressionGen.generateExpression('incomingState:getLastSubmissionDate', undefined, surveyKey);
|
|
172
179
|
/**
|
|
173
180
|
* Check if the last submission is older than the reference timestamp
|
|
174
181
|
* @param reference look up this flag
|
|
@@ -454,6 +461,7 @@ const NativeStudyEngineExpressions = {
|
|
|
454
461
|
hasParticipantFlagKey,
|
|
455
462
|
getParticipantFlagValue,
|
|
456
463
|
getParticipantFlagValueAsNum,
|
|
464
|
+
getLastSubmissionDate,
|
|
457
465
|
lastSubmissionDateOlderThan,
|
|
458
466
|
hasMessageTypeAssigned,
|
|
459
467
|
getMessageNextTime,
|
|
@@ -467,6 +475,7 @@ const NativeStudyEngineExpressions = {
|
|
|
467
475
|
hasParticipantFlagKeyAndValue: hasParticipantFlagKeyAndValueForIncoming,
|
|
468
476
|
hasParticipantFlagKey: hasParticipantFlagKeyForIncoming,
|
|
469
477
|
getParticipantFlagValue: getParticipantFlagValueForIncoming,
|
|
478
|
+
getLastSubmissionDate: getLastSubmissionDateForIncoming,
|
|
470
479
|
lastSubmissionDateOlderThan: lastSubmissionDateOlderThanForIncoming,
|
|
471
480
|
hasMessageTypeAssigned: hasMessageTypeAssignedForIncoming,
|
|
472
481
|
getMessageNextTime: getMessageNextTimeForIncoming,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studyEngineExpressions.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"studyEngineExpressions.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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.6.
|
|
4
|
+
"version": "1.6.8",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "github:case-framework/case-editor-tools",
|