@awell-health/awell-extensions 2.0.15 → 2.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/extensions/healthie/actions/index.d.ts +31 -0
  2. package/dist/extensions/healthie/actions/index.js +2 -0
  3. package/dist/extensions/healthie/actions/index.js.map +1 -1
  4. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/datapoints.d.ts +6 -0
  5. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/datapoints.js +10 -0
  6. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/datapoints.js.map +1 -0
  7. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/fields.d.ts +28 -0
  8. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/fields.js +29 -0
  9. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/fields.js.map +1 -0
  10. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/index.d.ts +2 -0
  11. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/index.js +9 -0
  12. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/index.js.map +1 -0
  13. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/errors.d.ts +6 -0
  14. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/errors.js +27 -0
  15. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/errors.js.map +1 -0
  16. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/index.d.ts +1 -0
  17. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/index.js +6 -0
  18. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/index.js.map +1 -0
  19. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.d.ts +9 -0
  20. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.js +89 -0
  21. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.js.map +1 -0
  22. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.d.ts +1 -0
  23. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.js +71 -0
  24. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.js.map +1 -0
  25. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/index.d.ts +1 -0
  26. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/index.js +18 -0
  27. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/index.js.map +1 -0
  28. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/index.d.ts +1 -0
  29. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/index.js +18 -0
  30. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/index.js.map +1 -0
  31. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.d.ts +4 -0
  32. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.js +98 -0
  33. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.js.map +1 -0
  34. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.test.d.ts +1 -0
  35. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.test.js +84 -0
  36. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.test.js.map +1 -0
  37. package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.d.ts +7 -2
  38. package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.js +10 -1
  39. package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.js.map +1 -1
  40. package/dist/extensions/shelly/actions/summarizeForm/summarizeForm.js +2 -3
  41. package/dist/extensions/shelly/actions/summarizeForm/summarizeForm.js.map +1 -1
  42. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/formDefinitionResponse.d.ts +37 -0
  43. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/formDefinitionResponse.js +288 -0
  44. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/formDefinitionResponse.js.map +1 -0
  45. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/formResponseResponse.d.ts +17 -0
  46. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/formResponseResponse.js +94 -0
  47. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/formResponseResponse.js.map +1 -0
  48. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/index.d.ts +3 -0
  49. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/index.js +20 -0
  50. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/index.js.map +1 -0
  51. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/pathwayActivitiesResponse.d.ts +26 -0
  52. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/pathwayActivitiesResponse.js +81 -0
  53. package/dist/src/lib/awell/getLatestFormInCurrentStep/__testdata__/pathwayActivitiesResponse.js.map +1 -0
  54. package/dist/{extensions/shelly/lib/utils/getLatestFormInStep.d.ts → src/lib/awell/getLatestFormInCurrentStep/getLatestFormInCurrentStep.d.ts} +4 -2
  55. package/dist/{extensions/shelly/lib/utils/getLatestFormInStep.js → src/lib/awell/getLatestFormInCurrentStep/getLatestFormInCurrentStep.js} +6 -4
  56. package/dist/src/lib/awell/getLatestFormInCurrentStep/getLatestFormInCurrentStep.js.map +1 -0
  57. package/dist/src/lib/awell/getLatestFormInCurrentStep/getLatestFormInCurrentStep.test.d.ts +1 -0
  58. package/dist/src/lib/awell/getLatestFormInCurrentStep/getLatestFormInCurrentStep.test.js +46 -0
  59. package/dist/src/lib/awell/getLatestFormInCurrentStep/getLatestFormInCurrentStep.test.js.map +1 -0
  60. package/dist/src/lib/awell/getLatestFormInCurrentStep/index.d.ts +1 -0
  61. package/dist/src/lib/awell/getLatestFormInCurrentStep/index.js +18 -0
  62. package/dist/src/lib/awell/getLatestFormInCurrentStep/index.js.map +1 -0
  63. package/dist/src/lib/awell/index.d.ts +1 -0
  64. package/dist/src/lib/awell/index.js +18 -0
  65. package/dist/src/lib/awell/index.js.map +1 -0
  66. package/package.json +3 -3
  67. package/dist/extensions/shelly/lib/utils/getLatestFormInStep.js.map +0 -1
  68. package/dist/extensions/shelly/lib/utils/index.d.ts +0 -1
  69. package/dist/extensions/shelly/lib/utils/index.js +0 -6
  70. package/dist/extensions/shelly/lib/utils/index.js.map +0 -1
@@ -1071,4 +1071,35 @@ export declare const actions: {
1071
1071
  description: string;
1072
1072
  };
1073
1073
  }, string>;
1074
+ pushFormResponseToHealthie: import("@awell-health/extensions-core").Action<{
1075
+ healthiePatientId: {
1076
+ id: string;
1077
+ label: string;
1078
+ description: string;
1079
+ type: import("@awell-health/extensions-core").FieldType.STRING;
1080
+ required: true;
1081
+ };
1082
+ healthieFormId: {
1083
+ id: string;
1084
+ label: string;
1085
+ description: string;
1086
+ type: import("@awell-health/extensions-core").FieldType.STRING;
1087
+ required: true;
1088
+ };
1089
+ }, {
1090
+ apiUrl: {
1091
+ key: string;
1092
+ label: string;
1093
+ obfuscated: false;
1094
+ required: true;
1095
+ description: string;
1096
+ };
1097
+ apiKey: {
1098
+ key: string;
1099
+ label: string;
1100
+ obfuscated: true;
1101
+ required: true;
1102
+ description: string;
1103
+ };
1104
+ }, "formAnswerGroupId">;
1074
1105
  };
@@ -29,6 +29,7 @@ const getFormAnswers_1 = require("./getFormAnswers");
29
29
  const createGoal_1 = require("./createGoal");
30
30
  const deleteGoal_1 = require("./deleteGoal");
31
31
  const getSetPasswordLink_1 = require("./getSetPasswordLink");
32
+ const pushFormResponseToHealthie_1 = require("./pushFormResponseToHealthie");
32
33
  exports.actions = {
33
34
  deleteGoal: deleteGoal_1.deleteGoal,
34
35
  getSetPasswordLink: getSetPasswordLink_1.getSetPasswordLink,
@@ -67,5 +68,6 @@ exports.actions = {
67
68
  checkPatientTag: checkPatientTag_1.checkPatientTag,
68
69
  checkScheduledAppointments: checkScheduledAppointments_1.checkScheduledAppointments,
69
70
  getFormAnswers: getFormAnswers_1.getFormAnswers,
71
+ pushFormResponseToHealthie: pushFormResponseToHealthie_1.pushFormResponseToHealthie,
70
72
  };
71
73
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/index.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AACvD,wDAAoD;AACpD,qDAAiD;AACjD,uDAAmD;AACnD,mDAA+C;AAC/C,iEAA6D;AAC7D,6DAAyD;AACzD,2EAAuE;AACvE,qDAAiD;AACjD,oDAAoD;AACpD,mEAA+D;AAC/D,2DAAuD;AACvD,2DAAuD;AACvD,6CAAyC;AACzC,iDAA6C;AAC7C,iEAA6D;AAC7D,mDAA+C;AAC/C,6CAAyC;AACzC,2DAAuD;AACvD,qDAAiD;AACjD,qEAAiE;AACjE,2DAAuD;AACvD,uDAAmD;AACnD,6EAAyE;AACzE,qDAAiD;AACjD,6CAAyC;AACzC,6CAAyC;AACzC,6DAAyD;AAE5C,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,uBAAU;IACV,kBAAkB,EAAlB,uCAAkB;IAClB,iBAAiB,EAAjB,qCAAiB;IACjB,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV,eAAe,EAAf,iCAAe;IACf,aAAa,EAAb,6BAAa;IACb,aAAa,EAAb,6BAAa;IACb,iBAAiB,EAAjB,qCAAiB;IACjB,oBAAoB,EAApB,2CAAoB;IACpB,kBAAkB,EAAlB,uCAAkB;IAClB,yBAAyB,EAAzB,qDAAyB;IACzB,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV;;;QAGI;IACJ,kBAAkB;IAClB,qBAAqB,EAArB,6CAAqB;IACrB,iBAAiB,EAAjB,qCAAiB;IACjB,iBAAiB,EAAjB,qCAAiB;IACjB;;;QAGI;IACJ,sBAAsB;IACtB,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,oBAAoB,EAApB,2CAAoB;IACpB,cAAc,EAAd,+BAAc;IACd,sBAAsB,EAAtB,+CAAsB;IACtB,iBAAiB,EAAjB,qCAAiB;IACjB,eAAe,EAAf,iCAAe;IACf,0BAA0B,EAA1B,uDAA0B;IAC1B,cAAc,EAAd,+BAAc;CACf,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../extensions/healthie/actions/index.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AACvD,wDAAoD;AACpD,qDAAiD;AACjD,uDAAmD;AACnD,mDAA+C;AAC/C,iEAA6D;AAC7D,6DAAyD;AACzD,2EAAuE;AACvE,qDAAiD;AACjD,oDAAoD;AACpD,mEAA+D;AAC/D,2DAAuD;AACvD,2DAAuD;AACvD,6CAAyC;AACzC,iDAA6C;AAC7C,iEAA6D;AAC7D,mDAA+C;AAC/C,6CAAyC;AACzC,2DAAuD;AACvD,qDAAiD;AACjD,qEAAiE;AACjE,2DAAuD;AACvD,uDAAmD;AACnD,6EAAyE;AACzE,qDAAiD;AACjD,6CAAyC;AACzC,6CAAyC;AACzC,6DAAyD;AACzD,6EAAyE;AAE5D,QAAA,OAAO,GAAG;IACrB,UAAU,EAAV,uBAAU;IACV,kBAAkB,EAAlB,uCAAkB;IAClB,iBAAiB,EAAjB,qCAAiB;IACjB,UAAU,EAAV,uBAAU;IACV,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV,eAAe,EAAf,iCAAe;IACf,aAAa,EAAb,6BAAa;IACb,aAAa,EAAb,6BAAa;IACb,iBAAiB,EAAjB,qCAAiB;IACjB,oBAAoB,EAApB,2CAAoB;IACpB,kBAAkB,EAAlB,uCAAkB;IAClB,yBAAyB,EAAzB,qDAAyB;IACzB,cAAc,EAAd,+BAAc;IACd,UAAU,EAAV,uBAAU;IACV;;;QAGI;IACJ,kBAAkB;IAClB,qBAAqB,EAArB,6CAAqB;IACrB,iBAAiB,EAAjB,qCAAiB;IACjB,iBAAiB,EAAjB,qCAAiB;IACjB;;;QAGI;IACJ,sBAAsB;IACtB,UAAU,EAAV,uBAAU;IACV,YAAY,EAAZ,2BAAY;IACZ,oBAAoB,EAApB,2CAAoB;IACpB,cAAc,EAAd,+BAAc;IACd,sBAAsB,EAAtB,+CAAsB;IACtB,iBAAiB,EAAjB,qCAAiB;IACjB,eAAe,EAAf,iCAAe;IACf,0BAA0B,EAA1B,uDAA0B;IAC1B,cAAc,EAAd,+BAAc;IACd,0BAA0B,EAA1B,uDAA0B;CAC3B,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const datapoints: {
2
+ formAnswerGroupId: {
3
+ key: string;
4
+ valueType: "string";
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
+ formAnswerGroupId: {
6
+ key: 'formAnswerGroupId',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=datapoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/pushFormResponseToHealthie/config/datapoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,iBAAiB,EAAE;QACjB,GAAG,EAAE,mBAAmB;QACxB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ export declare const fields: {
4
+ healthiePatientId: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: true;
10
+ };
11
+ healthieFormId: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.STRING;
16
+ required: true;
17
+ };
18
+ };
19
+ export declare const FieldsValidationSchema: z.ZodObject<{
20
+ healthiePatientId: z.ZodString;
21
+ healthieFormId: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ healthiePatientId: string;
24
+ healthieFormId: string;
25
+ }, {
26
+ healthiePatientId: string;
27
+ healthieFormId: string;
28
+ }>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.FieldsValidationSchema = exports.fields = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ exports.fields = {
10
+ healthiePatientId: {
11
+ id: 'healthiePatientId',
12
+ label: 'Healthie patient ID',
13
+ description: 'The ID of the patient in Healthie',
14
+ type: extensions_core_1.FieldType.STRING,
15
+ required: true,
16
+ },
17
+ healthieFormId: {
18
+ id: 'healthieFormId',
19
+ label: 'Healthie form ID',
20
+ description: 'The ID of the form in Healthie',
21
+ type: extensions_core_1.FieldType.STRING,
22
+ required: true,
23
+ },
24
+ };
25
+ exports.FieldsValidationSchema = zod_1.default.object({
26
+ healthiePatientId: zod_1.default.string().min(1),
27
+ healthieFormId: zod_1.default.string().min(1),
28
+ });
29
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/pushFormResponseToHealthie/config/fields.ts"],"names":[],"mappings":";;;;;;AAAA,mEAAqE;AACrE,8CAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,mCAAmC;QAChD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,aAAC,CAAC,MAAM,CAAC;IAC7C,iBAAiB,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACpC,cAAc,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACgB,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/healthie/actions/pushFormResponseToHealthie/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAyD;AAAhD,gGAAA,MAAM,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AACvC,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,6 @@
1
+ import { type ActivityEvent } from '@awell-health/extensions-core';
2
+ export declare class HealthieFormResponseNotCreated extends Error {
3
+ errors: Record<string, unknown>;
4
+ constructor(errors: Record<string, unknown>);
5
+ }
6
+ export declare const parseHealthieFormResponseNotCreatedError: (error: Record<string, unknown>) => ActivityEvent;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseHealthieFormResponseNotCreatedError = exports.HealthieFormResponseNotCreated = void 0;
4
+ class HealthieFormResponseNotCreated extends Error {
5
+ constructor(errors) {
6
+ super('Failed to create Healthie form response.');
7
+ this.name = 'HealthieFormResponseNotCreated';
8
+ this.errors = errors;
9
+ }
10
+ }
11
+ exports.HealthieFormResponseNotCreated = HealthieFormResponseNotCreated;
12
+ const parseHealthieFormResponseNotCreatedError = (error) => {
13
+ const category = 'BAD_REQUEST';
14
+ const message = JSON.stringify(error, null, 2);
15
+ return {
16
+ date: new Date().toISOString(),
17
+ text: {
18
+ en: message,
19
+ },
20
+ error: {
21
+ category,
22
+ message,
23
+ },
24
+ };
25
+ };
26
+ exports.parseHealthieFormResponseNotCreatedError = parseHealthieFormResponseNotCreatedError;
27
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/pushFormResponseToHealthie/errors.ts"],"names":[],"mappings":";;;AAEA,MAAa,8BAA+B,SAAQ,KAAK;IAGvD,YAAY,MAA+B;QACzC,KAAK,CAAC,0CAA0C,CAAC,CAAA;QACjD,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAA;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;CACF;AARD,wEAQC;AAEM,MAAM,wCAAwC,GAAG,CACtD,KAA8B,EACf,EAAE;IACjB,MAAM,QAAQ,GAAG,aAAa,CAAA;IAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAE9C,OAAO;QACL,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC9B,IAAI,EAAE;YACJ,EAAE,EAAE,OAAO;SACZ;QACD,KAAK,EAAE;YACL,QAAQ;YACR,OAAO;SACR;KACF,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,wCAAwC,4CAgBpD"}
@@ -0,0 +1 @@
1
+ export { pushFormResponseToHealthie } from './pushFormResponseToHealthie';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushFormResponseToHealthie = void 0;
4
+ var pushFormResponseToHealthie_1 = require("./pushFormResponseToHealthie");
5
+ Object.defineProperty(exports, "pushFormResponseToHealthie", { enumerable: true, get: function () { return pushFormResponseToHealthie_1.pushFormResponseToHealthie; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/pushFormResponseToHealthie/index.ts"],"names":[],"mappings":";;;AAAA,2EAAyE;AAAhE,wIAAA,0BAA0B,OAAA"}
@@ -0,0 +1,9 @@
1
+ import { HealthieOmitType } from '@awell-health/awell-sdk';
2
+ import { type ActivityEvent } from '@awell-health/extensions-core';
3
+ interface OmittedFormAnswer {
4
+ questionId: string;
5
+ reason: string;
6
+ omitType: HealthieOmitType;
7
+ }
8
+ export declare const getSubActivityLogs: (data: OmittedFormAnswer[]) => ActivityEvent[];
9
+ export {};
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSubActivityLogs = void 0;
4
+ const awell_sdk_1 = require("@awell-health/awell-sdk");
5
+ const getMappingLogs = (data) => {
6
+ const errors = data.filter((item) => item.omitType === awell_sdk_1.HealthieOmitType.MISSING_MAPPING);
7
+ if (errors.length === 0)
8
+ return undefined;
9
+ const getMessage = () => {
10
+ const errorText = errors
11
+ .map((err) => {
12
+ return `${err.questionId}`;
13
+ })
14
+ .join(', ');
15
+ return `Missing mapping for the below questions: ${errorText}`;
16
+ };
17
+ const category = 'MISSING_SETTINGS';
18
+ const message = getMessage();
19
+ return {
20
+ date: new Date().toISOString(),
21
+ text: {
22
+ en: message,
23
+ },
24
+ error: {
25
+ category,
26
+ message,
27
+ },
28
+ };
29
+ };
30
+ const getFormDefinitionLogs = (data) => {
31
+ const errors = data.filter((item) => item.omitType === awell_sdk_1.HealthieOmitType.QUESTION_NOT_FOUND_IN_FORM_DEFINITION);
32
+ if (errors.length === 0)
33
+ return undefined;
34
+ const getMessage = () => {
35
+ const errorText = errors
36
+ .map((err) => {
37
+ return `${err.questionId}`;
38
+ })
39
+ .join(', ');
40
+ return `The following questions in the response could not be linked to a question definition in the form definition: ${errorText}`;
41
+ };
42
+ const category = 'SERVER_ERROR';
43
+ const message = getMessage();
44
+ return {
45
+ date: new Date().toISOString(),
46
+ text: {
47
+ en: message,
48
+ },
49
+ error: {
50
+ category,
51
+ message,
52
+ },
53
+ };
54
+ };
55
+ const getOtherErrors = (data) => {
56
+ const errors = data.filter((item) => item.omitType === awell_sdk_1.HealthieOmitType.OTHER);
57
+ if (errors.length === 0)
58
+ return undefined;
59
+ const getMessage = () => {
60
+ const errorText = errors
61
+ .map((err) => {
62
+ return `${err.questionId}: ${err.reason}`;
63
+ })
64
+ .join(', ');
65
+ return `There was an unexpected error transforming the following Awell form answers to Healthie form answers: ${errorText}`;
66
+ };
67
+ const category = 'SERVER_ERROR';
68
+ const message = getMessage();
69
+ return {
70
+ date: new Date().toISOString(),
71
+ text: {
72
+ en: message,
73
+ },
74
+ error: {
75
+ category,
76
+ message,
77
+ },
78
+ };
79
+ };
80
+ const getSubActivityLogs = (data) => {
81
+ const activityEvents = [
82
+ getMappingLogs(data),
83
+ getFormDefinitionLogs(data),
84
+ getOtherErrors(data),
85
+ ].filter((_) => _ !== undefined);
86
+ return activityEvents;
87
+ };
88
+ exports.getSubActivityLogs = getSubActivityLogs;
89
+ //# sourceMappingURL=getSubActivityLogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSubActivityLogs.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.ts"],"names":[],"mappings":";;;AAAA,uDAA0D;AAS1D,MAAM,cAAc,GAAG,CACrB,IAAyB,EACE,EAAE;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,4BAAgB,CAAC,eAAe,CAC7D,CAAA;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IAEzC,MAAM,UAAU,GAAG,GAAW,EAAE;QAC9B,MAAM,SAAS,GAAG,MAAM;aACrB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACX,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAA;QAC5B,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAA;QAEb,OAAO,4CAA4C,SAAS,EAAE,CAAA;IAChE,CAAC,CAAA;IAED,MAAM,QAAQ,GAAG,kBAAkB,CAAA;IACnC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAA;IAE5B,OAAO;QACL,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC9B,IAAI,EAAE;YACJ,EAAE,EAAE,OAAO;SACZ;QACD,KAAK,EAAE;YACL,QAAQ;YACR,OAAO;SACR;KACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,qBAAqB,GAAG,CAC5B,IAAyB,EACE,EAAE;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,QAAQ,KAAK,4BAAgB,CAAC,qCAAqC,CAC3E,CAAA;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IAEzC,MAAM,UAAU,GAAG,GAAW,EAAE;QAC9B,MAA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KAAK,EAAE;YACL,QAAQ;YACR,OAAO;SACR;KACF,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,kBAAkB,GAAG,CAChC,IAAyB,EACR,EAAE;IACnB,MAAM,cAAc,GAAG;QACrB,cAAc,CAAC,IAAI,CAAC;QACpB,qBAAqB,CAAC,IAAI,CAAC;QAC3B,cAAc,CAAC,IAAI,CAAC;KACrB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAA;IAEhC,OAAO,cAAiC,CAAA;AAC1C,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const awell_sdk_1 = require("@awell-health/awell-sdk");
4
+ const _1 = require(".");
5
+ describe('getMappingStatus', () => {
6
+ beforeEach(() => {
7
+ jest.clearAllMocks();
8
+ });
9
+ test('Should work when there are mapping errors', async () => {
10
+ const data = [
11
+ {
12
+ questionId: 'question_1',
13
+ reason: 'No corresponding question definition found in the form definition',
14
+ omitType: awell_sdk_1.HealthieOmitType.QUESTION_NOT_FOUND_IN_FORM_DEFINITION,
15
+ },
16
+ {
17
+ questionId: 'question_2',
18
+ reason: 'Unable to map this question to a Healthie question because it misses the `healthieCustomModuleId` metadata required for proper integration.',
19
+ omitType: awell_sdk_1.HealthieOmitType.MISSING_MAPPING,
20
+ },
21
+ {
22
+ questionId: 'question_3',
23
+ reason: 'Unknown error',
24
+ omitType: awell_sdk_1.HealthieOmitType.OTHER,
25
+ },
26
+ {
27
+ questionId: 'question_4',
28
+ reason: 'Unable to map this question to a Healthie question because it misses the `healthieCustomModuleId` metadata required for proper integration.',
29
+ omitType: awell_sdk_1.HealthieOmitType.MISSING_MAPPING,
30
+ },
31
+ ];
32
+ const res = (0, _1.getSubActivityLogs)(data);
33
+ expect(res).toEqual([
34
+ {
35
+ date: expect.any(String),
36
+ text: {
37
+ en: 'Missing mapping for the below questions: question_2, question_4',
38
+ },
39
+ error: {
40
+ category: 'MISSING_SETTINGS',
41
+ message: 'Missing mapping for the below questions: question_2, question_4',
42
+ },
43
+ },
44
+ {
45
+ date: expect.any(String),
46
+ text: {
47
+ en: 'The following questions in the response could not be linked to a question definition in the form definition: question_1',
48
+ },
49
+ error: {
50
+ category: 'SERVER_ERROR',
51
+ message: 'The following questions in the response could not be linked to a question definition in the form definition: question_1',
52
+ },
53
+ },
54
+ {
55
+ date: expect.any(String),
56
+ text: {
57
+ en: 'There was an unexpected error transforming the following Awell form answers to Healthie form answers: question_3: Unknown error',
58
+ },
59
+ error: {
60
+ category: 'SERVER_ERROR',
61
+ message: 'There was an unexpected error transforming the following Awell form answers to Healthie form answers: question_3: Unknown error',
62
+ },
63
+ },
64
+ ]);
65
+ });
66
+ test('Should work when there are no mapping errors', async () => {
67
+ const res = (0, _1.getSubActivityLogs)([]);
68
+ expect(res).toEqual([]);
69
+ });
70
+ });
71
+ //# sourceMappingURL=getSubActivityLogs.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSubActivityLogs.test.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.ts"],"names":[],"mappings":";;AAAA,uDAA0D;AAC1D,wBAAsC;AAEtC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,2CAA2C,EAAE,KAAK,IAAI,EAAE;QAC3D,MAAM,IAAI,GAAG;YACX;gBACE,UAAU,EAAE,YAAY;gBACxB,MAAM,EACJ,mEAAmE;gBACrE,QAAQ,EAAE,4BAAgB,CAAC,qCAAqC;aACjE;YACD;gBACE,UAAU,EAAE,YAAY;gBACxB,MAAM,EACJ,6IAA6I;gBAC/I,QAAQ,EAAE,4BAAgB,CAAC,eAA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
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./getSubActivityLogs"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC"}
@@ -0,0 +1 @@
1
+ export * from './getSubActivityLogs';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./getSubActivityLogs"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/pushFormResponseToHealthie/logs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { datapoints, fields } from './config';
4
+ export declare const pushFormResponseToHealthie: Action<typeof fields, typeof settings, keyof typeof datapoints>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushFormResponseToHealthie = void 0;
4
+ const awell_1 = require("../../../../src/lib/awell");
5
+ const extensions_core_1 = require("@awell-health/extensions-core");
6
+ const validatePayloadAndCreateSdk_1 = require("../../lib/sdk/validatePayloadAndCreateSdk");
7
+ const config_1 = require("./config");
8
+ const logs_1 = require("./logs");
9
+ const lodash_1 = require("lodash");
10
+ const errors_1 = require("./errors");
11
+ const errors_2 = require("../../lib/sdk/graphql-codegen/errors");
12
+ exports.pushFormResponseToHealthie = {
13
+ key: 'pushFormResponseToHealthie',
14
+ category: extensions_core_1.Category.DEMO,
15
+ title: 'Push form response to Healthie',
16
+ description: 'Pushes an Awell form response to a Healthie form',
17
+ fields: config_1.fields,
18
+ previewable: true,
19
+ dataPoints: config_1.datapoints,
20
+ onEvent: async ({ payload, onComplete, onError, helpers }) => {
21
+ var _a, _b, _c, _d;
22
+ const { fields, pathway, activity, healthieSdk } = await (0, validatePayloadAndCreateSdk_1.validatePayloadAndCreateSdk)({
23
+ fieldsSchema: config_1.FieldsValidationSchema,
24
+ payload,
25
+ });
26
+ const awellSdk = await helpers.awellSdk();
27
+ /**
28
+ * Returns the last completed form in a step at the time
29
+ * the current activity in that step is activated.
30
+ *
31
+ * Example:
32
+ * - Form 1 (completed)
33
+ * - Form 2 (completed)
34
+ * - Current activity
35
+ * - Form 3 (not activated yet thus not-completed)
36
+ *
37
+ * Outcome:
38
+ * Will return the `formDefinition` and `formResponse` of Form 2.
39
+ */
40
+ const { formDefinition, formResponse } = await (0, awell_1.getLatestFormInCurrentStep)({
41
+ awellSdk,
42
+ pathwayId: pathway.id,
43
+ activityId: activity.id,
44
+ });
45
+ const { formAnswers: healthieFormAnswerInputs, omittedFormAnswers } = awellSdk.utils.healthie.awellFormResponseToHealthieFormAnswers({
46
+ awellFormDefinition: formDefinition,
47
+ awellFormResponse: formResponse,
48
+ });
49
+ try {
50
+ const res = await healthieSdk.client.mutation({
51
+ createFormAnswerGroup: {
52
+ __args: {
53
+ input: {
54
+ finished: true,
55
+ custom_module_form_id: fields.healthieFormId,
56
+ user_id: fields.healthiePatientId,
57
+ form_answers: healthieFormAnswerInputs.map((input) => ({
58
+ ...input,
59
+ user_id: fields.healthiePatientId,
60
+ })),
61
+ },
62
+ },
63
+ form_answer_group: {
64
+ id: true,
65
+ },
66
+ },
67
+ });
68
+ if ((0, lodash_1.isEmpty)((_b = (_a = res === null || res === void 0 ? void 0 : res.createFormAnswerGroup) === null || _a === void 0 ? void 0 : _a.form_answer_group) === null || _b === void 0 ? void 0 : _b.id))
69
+ throw new errors_1.HealthieFormResponseNotCreated(res);
70
+ await onComplete({
71
+ data_points: {
72
+ formAnswerGroupId: String((_d = (_c = res.createFormAnswerGroup) === null || _c === void 0 ? void 0 : _c.form_answer_group) === null || _d === void 0 ? void 0 : _d.id),
73
+ },
74
+ events: (0, logs_1.getSubActivityLogs)(omittedFormAnswers),
75
+ });
76
+ }
77
+ catch (error) {
78
+ if (error instanceof errors_2.HealthieError) {
79
+ const errors = (0, errors_2.mapHealthieToActivityError)(error.errors);
80
+ await onError({
81
+ events: [...errors, ...(0, logs_1.getSubActivityLogs)(omittedFormAnswers)],
82
+ });
83
+ }
84
+ else if (error instanceof errors_1.HealthieFormResponseNotCreated) {
85
+ await onError({
86
+ events: [
87
+ (0, errors_1.parseHealthieFormResponseNotCreatedError)(error.errors),
88
+ ...(0, logs_1.getSubActivityLogs)(omittedFormAnswers),
89
+ ],
90
+ });
91
+ }
92
+ else {
93
+ throw error;
94
+ }
95
+ }
96
+ },
97
+ };
98
+ //# sourceMappingURL=pushFormResponseToHealthie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pushFormResponseToHealthie.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.ts"],"names":[],"mappings":";;;AAAA,qDAAsE;AACtE,mEAAqE;AACrE,2FAAuF;AAEvF,qCAAqE;AACrE,iCAA2C;AAC3C,mCAAgC;AAChC,qCAGiB;AACjB,iEAG6C;AAEhC,QAAA,0BAA0B,GAInC;IACF,GAAG,EAAE,4BAA4B;IACjC,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,KAAK,EAAE,gCAAgC;IACvC,WAAW,EAAE,kDAAkD;IAC/D,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,mBAAU;IACtB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;;QAC3D,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,GAC9C,MAAM,IAAA,yDAA2B,EAAC;YAChC,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEJ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAA;QAEzC;;;;;;;;;;;;WAYG;QACH,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,kCAA0B,EAAC;YACxE,QAAQ;YACR,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,UAAU,EAAE,QAAQ,CAAC,EAAE;SACxB,CAAC,CAAA;QAEF,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,GACjE,QAAQ,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