@awell-health/awell-extensions 1.0.224 → 1.0.226
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/experimental/index.js +2 -0
- package/dist/extensions/experimental/index.js.map +1 -1
- package/dist/extensions/experimental/v1/actions/index.d.ts +2 -0
- package/dist/extensions/experimental/v1/actions/index.js +5 -1
- package/dist/extensions/experimental/v1/actions/index.js.map +1 -1
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.d.ts +6 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.js +10 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/fields.d.ts +58 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/fields.js +50 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/fields.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/index.d.ts +2 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/index.js +9 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/config/index.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/index.d.ts +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/index.js +6 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/index.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.d.ts +4 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.js +32 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.d.ts +1 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.js +20 -0
- package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/datapoints.d.ts +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/datapoints.js +5 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/datapoints.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/fields.d.ts +28 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/fields.js +26 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/fields.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/index.d.ts +2 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/index.js +9 -0
- package/dist/extensions/experimental/v1/actions/redirect/config/index.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/index.d.ts +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/index.js +6 -0
- package/dist/extensions/experimental/v1/actions/redirect/index.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/redirect.d.ts +4 -0
- package/dist/extensions/experimental/v1/actions/redirect/redirect.js +32 -0
- package/dist/extensions/experimental/v1/actions/redirect/redirect.js.map +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/redirect.test.d.ts +1 -0
- package/dist/extensions/experimental/v1/actions/redirect/redirect.test.js +17 -0
- package/dist/extensions/experimental/v1/actions/redirect/redirect.test.js.map +1 -0
- package/package.json +1 -1
@@ -18,6 +18,8 @@ exports.Experimental = {
|
|
18
18
|
requestVideoVisit: actions_1.requestVideoVisit,
|
19
19
|
enterMedication: actions_1.enterMedication,
|
20
20
|
wait: actions_1.wait,
|
21
|
+
patientRecommendation: actions_1.patientRecommendation,
|
22
|
+
redirect: actions_1.redirect,
|
21
23
|
},
|
22
24
|
};
|
23
25
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/experimental/index.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/experimental/index.ts"],"names":[],"mappings":";;;AAAA,0CAMqB;AAErB,yCAAqC;AACrC,mEAAoE;AAEvD,QAAA,YAAY,GAAc;IACrC,GAAG,EAAE,cAAc;IACnB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,yDAAyD;IACnE,WAAW,EAAE,qCAAqC;IAClD,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,MAAM,EAAE;QACN,UAAU,EAAE,4BAAU,CAAC,KAAK;KAC7B;IACD,QAAQ,EAAR,mBAAQ;IACR,OAAO,EAAE;QACP,iBAAiB,EAAjB,2BAAiB;QACjB,eAAe,EAAf,yBAAe;QACf,IAAI,EAAJ,cAAI;QACJ,qBAAqB,EAArB,+BAAqB;QACrB,QAAQ,EAAR,kBAAQ;KACT;CACF,CAAA"}
|
@@ -1,10 +1,14 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.wait = exports.enterMedication = exports.requestVideoVisit = void 0;
|
3
|
+
exports.redirect = exports.patientRecommendation = exports.wait = exports.enterMedication = exports.requestVideoVisit = void 0;
|
4
4
|
var requestVideoVisit_1 = require("./requestVideoVisit");
|
5
5
|
Object.defineProperty(exports, "requestVideoVisit", { enumerable: true, get: function () { return requestVideoVisit_1.requestVideoVisit; } });
|
6
6
|
var enterMedication_1 = require("./enterMedication");
|
7
7
|
Object.defineProperty(exports, "enterMedication", { enumerable: true, get: function () { return enterMedication_1.enterMedication; } });
|
8
8
|
var wait_1 = require("./wait");
|
9
9
|
Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return wait_1.wait; } });
|
10
|
+
var patientRecommendation_1 = require("./patientRecommendation");
|
11
|
+
Object.defineProperty(exports, "patientRecommendation", { enumerable: true, get: function () { return patientRecommendation_1.patientRecommendation; } });
|
12
|
+
var redirect_1 = require("./redirect");
|
13
|
+
Object.defineProperty(exports, "redirect", { enumerable: true, get: function () { return redirect_1.redirect; } });
|
10
14
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/experimental/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,+BAA6B;AAApB,4FAAA,IAAI,OAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/experimental/v1/actions/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,+BAA6B;AAApB,4FAAA,IAAI,OAAA;AACb,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = void 0;
|
4
|
+
exports.dataPoints = {
|
5
|
+
acceptRecommendation: {
|
6
|
+
key: 'acceptRecommendation',
|
7
|
+
valueType: 'boolean',
|
8
|
+
},
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=datapoints.js.map
|
package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/patientRecommendation/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,oBAAoB,EAAE;QACpB,GAAG,EAAE,sBAAsB;QAC3B,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA"}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
title: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
message: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.HTML;
|
16
|
+
required: true;
|
17
|
+
};
|
18
|
+
acceptRecommendationButtonLabel: {
|
19
|
+
id: string;
|
20
|
+
label: string;
|
21
|
+
description: string;
|
22
|
+
type: FieldType.STRING;
|
23
|
+
required: true;
|
24
|
+
};
|
25
|
+
acceptRecommendationDeepLink: {
|
26
|
+
id: string;
|
27
|
+
label: string;
|
28
|
+
description: string;
|
29
|
+
type: FieldType.STRING;
|
30
|
+
required: true;
|
31
|
+
};
|
32
|
+
discardRecommendationButtonLabel: {
|
33
|
+
id: string;
|
34
|
+
label: string;
|
35
|
+
description: string;
|
36
|
+
type: FieldType.STRING;
|
37
|
+
required: true;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
41
|
+
title: z.ZodString;
|
42
|
+
message: z.ZodString;
|
43
|
+
acceptRecommendationButtonLabel: z.ZodString;
|
44
|
+
acceptRecommendationDeepLink: z.ZodString;
|
45
|
+
discardRecommendationButtonLabel: z.ZodString;
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
47
|
+
message: string;
|
48
|
+
title: string;
|
49
|
+
acceptRecommendationButtonLabel: string;
|
50
|
+
acceptRecommendationDeepLink: string;
|
51
|
+
discardRecommendationButtonLabel: string;
|
52
|
+
}, {
|
53
|
+
message: string;
|
54
|
+
title: string;
|
55
|
+
acceptRecommendationButtonLabel: string;
|
56
|
+
acceptRecommendationDeepLink: string;
|
57
|
+
discardRecommendationButtonLabel: string;
|
58
|
+
}>;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.fields = {
|
7
|
+
title: {
|
8
|
+
id: 'title',
|
9
|
+
label: 'Title',
|
10
|
+
description: 'Descriptive title that is shown on the page',
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
12
|
+
required: true,
|
13
|
+
},
|
14
|
+
message: {
|
15
|
+
id: 'message',
|
16
|
+
label: 'Message',
|
17
|
+
description: 'Inform the patient about the recommendation and decision they have to make',
|
18
|
+
type: extensions_core_1.FieldType.HTML,
|
19
|
+
required: true,
|
20
|
+
},
|
21
|
+
acceptRecommendationButtonLabel: {
|
22
|
+
id: 'acceptRecommendationButtonLabel',
|
23
|
+
label: 'Accept recommendation button label',
|
24
|
+
description: 'The label of the buton to accept the recommendation and redirect the patient to a different page with a deep link',
|
25
|
+
type: extensions_core_1.FieldType.STRING,
|
26
|
+
required: true,
|
27
|
+
},
|
28
|
+
acceptRecommendationDeepLink: {
|
29
|
+
id: 'acceptRecommendationDeepLink',
|
30
|
+
label: 'Deep link',
|
31
|
+
description: 'The deep link the patient is redirected to when accepting the recommendation',
|
32
|
+
type: extensions_core_1.FieldType.STRING,
|
33
|
+
required: true,
|
34
|
+
},
|
35
|
+
discardRecommendationButtonLabel: {
|
36
|
+
id: 'discardRecommendationButtonLabel',
|
37
|
+
label: 'Discard recommendation button label',
|
38
|
+
description: 'The label of the button allowing patients to continue and discard the recommendation',
|
39
|
+
type: extensions_core_1.FieldType.STRING,
|
40
|
+
required: true,
|
41
|
+
},
|
42
|
+
};
|
43
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
44
|
+
title: zod_1.z.string().min(1),
|
45
|
+
message: zod_1.z.string().min(1),
|
46
|
+
acceptRecommendationButtonLabel: zod_1.z.string().min(1),
|
47
|
+
acceptRecommendationDeepLink: zod_1.z.string().min(1),
|
48
|
+
discardRecommendationButtonLabel: zod_1.z.string().min(1),
|
49
|
+
});
|
50
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/patientRecommendation/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,6CAA6C;QAC1D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EACT,4EAA4E;QAC9E,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;IACD,+BAA+B,EAAE;QAC/B,EAAE,EAAE,iCAAiC;QACrC,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EACT,mHAAmH;QACrH,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,4BAA4B,EAAE;QAC5B,EAAE,EAAE,8BAA8B;QAClC,KAAK,EAAE,WAAW;QAClB,WAAW,EACT,8EAA8E;QAChF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,gCAAgC,EAAE;QAChC,EAAE,EAAE,kCAAkC;QACtC,KAAK,EAAE,qCAAqC;QAC5C,WAAW,EACT,sFAAsF;QACxF,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,+BAA+B,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,4BAA4B,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,gCAAgC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACF,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var datapoints_1 = require("./datapoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return datapoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/patientRecommendation/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { patientRecommendation } from './patientRecommendation';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.patientRecommendation = void 0;
|
4
|
+
var patientRecommendation_1 = require("./patientRecommendation");
|
5
|
+
Object.defineProperty(exports, "patientRecommendation", { enumerable: true, get: function () { return patientRecommendation_1.patientRecommendation; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/patientRecommendation/index.ts"],"names":[],"mappings":";;;AAAA,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA"}
|
package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.js
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.patientRecommendation = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const extensions_core_2 = require("@awell-health/extensions-core");
|
6
|
+
const config_1 = require("./config");
|
7
|
+
const zod_1 = require("zod");
|
8
|
+
exports.patientRecommendation = {
|
9
|
+
key: 'patientRecommendation',
|
10
|
+
category: extensions_core_2.Category.WORKFLOW,
|
11
|
+
title: 'Patient recommendation',
|
12
|
+
description: 'Recommend the patient with an office visit, video chat, ...',
|
13
|
+
fields: config_1.fields,
|
14
|
+
dataPoints: config_1.dataPoints,
|
15
|
+
options: {
|
16
|
+
stakeholders: {
|
17
|
+
label: 'Stakeholder',
|
18
|
+
mode: 'single',
|
19
|
+
},
|
20
|
+
},
|
21
|
+
previewable: false,
|
22
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
23
|
+
(0, extensions_core_1.validate)({
|
24
|
+
schema: zod_1.z.object({
|
25
|
+
fields: config_1.FieldsValidationSchema,
|
26
|
+
}),
|
27
|
+
payload,
|
28
|
+
});
|
29
|
+
// Completion happens in Hosted Pages
|
30
|
+
},
|
31
|
+
};
|
32
|
+
//# sourceMappingURL=patientRecommendation.js.map
|
package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"patientRecommendation.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,mEAAwD;AACxD,qCAAqE;AACrE,6BAAuB;AAEV,QAAA,qBAAqB,GAA2C;IAC3E,GAAG,EAAE,uBAAuB;IAC5B,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,6DAA6D;IAC1E,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,IAAA,0BAAQ,EAAC;YACP,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;aAC/B,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,qCAAqC;IACvC,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.js
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const config_1 = require("./config");
|
4
|
+
describe('Patient recommendation action', () => {
|
5
|
+
beforeEach(() => {
|
6
|
+
jest.clearAllMocks();
|
7
|
+
});
|
8
|
+
test('Action fields validation validation work', async () => {
|
9
|
+
expect(() => {
|
10
|
+
config_1.FieldsValidationSchema.parse({
|
11
|
+
title: 'title',
|
12
|
+
message: 'message',
|
13
|
+
acceptRecommendationButtonLabel: 'Button label',
|
14
|
+
acceptRecommendationDeepLink: 'https://www.test.com',
|
15
|
+
discardRecommendationButtonLabel: 'Button label',
|
16
|
+
});
|
17
|
+
}).not.toThrow();
|
18
|
+
});
|
19
|
+
});
|
20
|
+
//# sourceMappingURL=patientRecommendation.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"patientRecommendation.test.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.ts"],"names":[],"mappings":";;AAAA,qCAAiD;AAEjD,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,CAAC,GAAG,EAAE;YACV,+BAAsB,CAAC,KAAK,CAAC;gBAC3B,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,SAAS;gBAClB,+BAA+B,EAAE,cAAc;gBAC/C,4BAA4B,EAAE,sBAAsB;gBACpD,gCAAgC,EAAE,cAAc;aACjD,CAAC,CAAA;QACJ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;IAClB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const dataPoints: {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/redirect/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,EAAgD,CAAA"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { FieldType } from '@awell-health/extensions-core';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export declare const fields: {
|
4
|
+
redirectUrl: {
|
5
|
+
id: string;
|
6
|
+
label: string;
|
7
|
+
description: string;
|
8
|
+
type: FieldType.STRING;
|
9
|
+
required: true;
|
10
|
+
};
|
11
|
+
redirectMessage: {
|
12
|
+
id: string;
|
13
|
+
label: string;
|
14
|
+
description: string;
|
15
|
+
type: FieldType.HTML;
|
16
|
+
required: false;
|
17
|
+
};
|
18
|
+
};
|
19
|
+
export declare const FieldsValidationSchema: z.ZodObject<{
|
20
|
+
redirectUrl: z.ZodString;
|
21
|
+
redirectMessage: z.ZodOptional<z.ZodString>;
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
23
|
+
redirectUrl: string;
|
24
|
+
redirectMessage?: string | undefined;
|
25
|
+
}, {
|
26
|
+
redirectUrl: string;
|
27
|
+
redirectMessage?: string | undefined;
|
28
|
+
}>;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const zod_1 = require("zod");
|
6
|
+
exports.fields = {
|
7
|
+
redirectUrl: {
|
8
|
+
id: 'redirectUrl',
|
9
|
+
label: 'Redirect URL',
|
10
|
+
description: '',
|
11
|
+
type: extensions_core_1.FieldType.STRING,
|
12
|
+
required: true,
|
13
|
+
},
|
14
|
+
redirectMessage: {
|
15
|
+
id: 'redirectMessage',
|
16
|
+
label: 'Message',
|
17
|
+
description: 'A message that is briefly shown to the user when doing the redirect, leave blank to show nothing',
|
18
|
+
type: extensions_core_1.FieldType.HTML,
|
19
|
+
required: false,
|
20
|
+
},
|
21
|
+
};
|
22
|
+
exports.FieldsValidationSchema = zod_1.z.object({
|
23
|
+
redirectUrl: zod_1.z.string().min(1),
|
24
|
+
redirectMessage: zod_1.z.string().optional(),
|
25
|
+
});
|
26
|
+
//# sourceMappingURL=fields.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/redirect/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AACrE,6BAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,SAAS;QAChB,WAAW,EACT,kGAAkG;QACpG,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACW,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.dataPoints = exports.FieldsValidationSchema = exports.fields = void 0;
|
4
|
+
var fields_1 = require("./fields");
|
5
|
+
Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
|
6
|
+
Object.defineProperty(exports, "FieldsValidationSchema", { enumerable: true, get: function () { return fields_1.FieldsValidationSchema; } });
|
7
|
+
var datapoints_1 = require("./datapoints");
|
8
|
+
Object.defineProperty(exports, "dataPoints", { enumerable: true, get: function () { return datapoints_1.dataPoints; } });
|
9
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/experimental/v1/actions/redirect/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { redirect } from './redirect';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.redirect = void 0;
|
4
|
+
var redirect_1 = require("./redirect");
|
5
|
+
Object.defineProperty(exports, "redirect", { enumerable: true, get: function () { return redirect_1.redirect; } });
|
6
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/redirect/index.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.redirect = void 0;
|
4
|
+
const extensions_core_1 = require("@awell-health/extensions-core");
|
5
|
+
const extensions_core_2 = require("@awell-health/extensions-core");
|
6
|
+
const config_1 = require("./config");
|
7
|
+
const zod_1 = require("zod");
|
8
|
+
exports.redirect = {
|
9
|
+
key: 'redirect',
|
10
|
+
category: extensions_core_2.Category.WORKFLOW,
|
11
|
+
title: 'Redirect',
|
12
|
+
description: 'Redirect the user to a website or a location within your app',
|
13
|
+
fields: config_1.fields,
|
14
|
+
dataPoints: config_1.dataPoints,
|
15
|
+
options: {
|
16
|
+
stakeholders: {
|
17
|
+
label: 'Stakeholder',
|
18
|
+
mode: 'single',
|
19
|
+
},
|
20
|
+
},
|
21
|
+
previewable: false,
|
22
|
+
onActivityCreated: async (payload, onComplete, onError) => {
|
23
|
+
(0, extensions_core_1.validate)({
|
24
|
+
schema: zod_1.z.object({
|
25
|
+
fields: config_1.FieldsValidationSchema,
|
26
|
+
}),
|
27
|
+
payload,
|
28
|
+
});
|
29
|
+
// Completion happens in Hosted Pages
|
30
|
+
},
|
31
|
+
};
|
32
|
+
//# sourceMappingURL=redirect.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"redirect.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/redirect/redirect.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,mEAAwD;AACxD,qCAAqE;AACrE,6BAAuB;AAEV,QAAA,QAAQ,GAA2C;IAC9D,GAAG,EAAE,UAAU;IACf,QAAQ,EAAE,0BAAQ,CAAC,QAAQ;IAC3B,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,8DAA8D;IAC3E,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,OAAO,EAAE;QACP,YAAY,EAAE;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;SACf;KACF;IACD,WAAW,EAAE,KAAK;IAClB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,IAAA,0BAAQ,EAAC;YACP,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACf,MAAM,EAAE,+BAAsB;aAC/B,CAAC;YACF,OAAO;SACR,CAAC,CAAA;QAEF,qCAAqC;IACvC,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const config_1 = require("./config");
|
4
|
+
describe('Redirect action', () => {
|
5
|
+
beforeEach(() => {
|
6
|
+
jest.clearAllMocks();
|
7
|
+
});
|
8
|
+
test('Action fields validation validation work', async () => {
|
9
|
+
expect(() => {
|
10
|
+
config_1.FieldsValidationSchema.parse({
|
11
|
+
redirectUrl: 'url',
|
12
|
+
redirectMessage: 'message',
|
13
|
+
});
|
14
|
+
}).not.toThrow();
|
15
|
+
});
|
16
|
+
});
|
17
|
+
//# sourceMappingURL=redirect.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"redirect.test.js","sourceRoot":"","sources":["../../../../../../extensions/experimental/v1/actions/redirect/redirect.test.ts"],"names":[],"mappings":";;AAAA,qCAAiD;AAEjD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,CAAC,GAAG,EAAE;YACV,+BAAsB,CAAC,KAAK,CAAC;gBAC3B,WAAW,EAAE,KAAK;gBAClB,eAAe,EAAE,SAAS;aAC3B,CAAC,CAAA;QACJ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;IAClB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|