@awell-health/awell-extensions 1.0.225 → 1.0.226

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/redirect/config/datapoints.d.ts +1 -0
  7. package/dist/extensions/experimental/v1/actions/redirect/config/datapoints.js +5 -0
  8. package/dist/extensions/experimental/v1/actions/redirect/config/datapoints.js.map +1 -0
  9. package/dist/extensions/experimental/v1/actions/redirect/config/fields.d.ts +28 -0
  10. package/dist/extensions/experimental/v1/actions/redirect/config/fields.js +26 -0
  11. package/dist/extensions/experimental/v1/actions/redirect/config/fields.js.map +1 -0
  12. package/dist/extensions/experimental/v1/actions/redirect/config/index.d.ts +2 -0
  13. package/dist/extensions/experimental/v1/actions/redirect/config/index.js +9 -0
  14. package/dist/extensions/experimental/v1/actions/redirect/config/index.js.map +1 -0
  15. package/dist/extensions/experimental/v1/actions/redirect/index.d.ts +1 -0
  16. package/dist/extensions/experimental/v1/actions/redirect/index.js +6 -0
  17. package/dist/extensions/experimental/v1/actions/redirect/index.js.map +1 -0
  18. package/dist/extensions/experimental/v1/actions/redirect/redirect.d.ts +4 -0
  19. package/dist/extensions/experimental/v1/actions/redirect/redirect.js +32 -0
  20. package/dist/extensions/experimental/v1/actions/redirect/redirect.js.map +1 -0
  21. package/dist/extensions/experimental/v1/actions/redirect/redirect.test.d.ts +1 -0
  22. package/dist/extensions/experimental/v1/actions/redirect/redirect.test.js +17 -0
  23. package/dist/extensions/experimental/v1/actions/redirect/redirect.test.js.map +1 -0
  24. package/package.json +1 -1
@@ -19,6 +19,7 @@ exports.Experimental = {
19
19
  enterMedication: actions_1.enterMedication,
20
20
  wait: actions_1.wait,
21
21
  patientRecommendation: actions_1.patientRecommendation,
22
+ redirect: actions_1.redirect,
22
23
  },
23
24
  };
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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
+ {"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"}
@@ -2,3 +2,4 @@ export { requestVideoVisit } from './requestVideoVisit';
2
2
  export { enterMedication } from './enterMedication';
3
3
  export { wait } from './wait';
4
4
  export { patientRecommendation } from './patientRecommendation';
5
+ export { redirect } from './redirect';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.patientRecommendation = 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");
@@ -9,4 +9,6 @@ var wait_1 = require("./wait");
9
9
  Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return wait_1.wait; } });
10
10
  var patientRecommendation_1 = require("./patientRecommendation");
11
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; } });
12
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;AACb,iEAA+D;AAAtD,8HAAA,qBAAqB,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 @@
1
+ export declare const dataPoints: {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {};
5
+ //# sourceMappingURL=datapoints.js.map
@@ -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,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/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,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 redirect: Action<typeof fields, typeof settings>;
@@ -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,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "1.0.225",
3
+ "version": "1.0.226",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {