@awell-health/awell-extensions 1.0.224 → 1.0.225

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. package/dist/extensions/experimental/index.js +1 -0
  2. package/dist/extensions/experimental/index.js.map +1 -1
  3. package/dist/extensions/experimental/v1/actions/index.d.ts +1 -0
  4. package/dist/extensions/experimental/v1/actions/index.js +3 -1
  5. package/dist/extensions/experimental/v1/actions/index.js.map +1 -1
  6. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.d.ts +6 -0
  7. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.js +10 -0
  8. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/datapoints.js.map +1 -0
  9. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/fields.d.ts +58 -0
  10. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/fields.js +50 -0
  11. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/fields.js.map +1 -0
  12. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/index.d.ts +2 -0
  13. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/index.js +9 -0
  14. package/dist/extensions/experimental/v1/actions/patientRecommendation/config/index.js.map +1 -0
  15. package/dist/extensions/experimental/v1/actions/patientRecommendation/index.d.ts +1 -0
  16. package/dist/extensions/experimental/v1/actions/patientRecommendation/index.js +6 -0
  17. package/dist/extensions/experimental/v1/actions/patientRecommendation/index.js.map +1 -0
  18. package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.d.ts +4 -0
  19. package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.js +32 -0
  20. package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.js.map +1 -0
  21. package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.d.ts +1 -0
  22. package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.js +20 -0
  23. package/dist/extensions/experimental/v1/actions/patientRecommendation/patientRecommendation.test.js.map +1 -0
  24. package/package.json +1 -1
@@ -18,6 +18,7 @@ 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,
21
22
  },
22
23
  };
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/experimental/index.ts"],"names":[],"mappings":";;;AAAA,0CAAuE;AAEvE,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;KACL;CACF,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../extensions/experimental/index.ts"],"names":[],"mappings":";;;AAAA,0CAKqB;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;KACtB;CACF,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export { requestVideoVisit } from './requestVideoVisit';
2
2
  export { enterMedication } from './enterMedication';
3
3
  export { wait } from './wait';
4
+ export { patientRecommendation } from './patientRecommendation';
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.wait = exports.enterMedication = exports.requestVideoVisit = void 0;
3
+ 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; } });
10
12
  //# 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"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ acceptRecommendation: {
3
+ key: string;
4
+ valueType: "boolean";
5
+ };
6
+ };
@@ -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
@@ -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,2 @@
1
+ export { fields, FieldsValidationSchema } from './fields';
2
+ export { dataPoints } from './datapoints';
@@ -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"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../../settings';
3
+ import { fields } from './config';
4
+ export declare const patientRecommendation: Action<typeof fields, typeof settings>;
@@ -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
@@ -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,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.224",
3
+ "version": "1.0.225",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {