@awell-health/awell-extensions 2.0.33 → 2.0.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/dist/extensions/healthie/actions/dataExchange/index.d.ts +2 -0
  2. package/dist/extensions/healthie/actions/dataExchange/index.js +19 -0
  3. package/dist/extensions/healthie/actions/dataExchange/index.js.map +1 -0
  4. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/config/datapoints.js.map +1 -0
  5. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/config/fields.js.map +1 -0
  6. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/config/index.js.map +1 -0
  7. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/index.js.map +1 -0
  8. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.js.map +1 -0
  9. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.js.map +1 -0
  10. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/getSubActivityLogs/index.js.map +1 -0
  11. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/index.js.map +1 -0
  12. package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/pushFormResponseToHealthie.d.ts +1 -1
  13. package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/pushFormResponseToHealthie.js +5 -5
  14. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/pushFormResponseToHealthie.js.map +1 -0
  15. package/dist/extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/pushFormResponseToHealthie.test.js.map +1 -0
  16. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/datapoints.d.ts +6 -0
  17. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/datapoints.js +10 -0
  18. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/datapoints.js.map +1 -0
  19. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/fields.d.ts +28 -0
  20. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/fields.js +29 -0
  21. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/fields.js.map +1 -0
  22. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/index.d.ts +2 -0
  23. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/index.js +9 -0
  24. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/config/index.js.map +1 -0
  25. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/index.d.ts +1 -0
  26. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/index.js +6 -0
  27. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/index.js.map +1 -0
  28. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.d.ts +13 -0
  29. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.js +94 -0
  30. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.js.map +1 -0
  31. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.d.ts +1 -0
  32. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.js +70 -0
  33. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.js.map +1 -0
  34. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/index.d.ts +1 -0
  35. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/index.js +18 -0
  36. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/index.js.map +1 -0
  37. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/index.d.ts +1 -0
  38. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/index.js +18 -0
  39. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/index.js.map +1 -0
  40. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.d.ts +4 -0
  41. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.js +98 -0
  42. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.js.map +1 -0
  43. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.test.d.ts +1 -0
  44. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.test.js +100 -0
  45. package/dist/extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.test.js.map +1 -0
  46. package/dist/extensions/healthie/actions/dataExchange/shared/errors.js.map +1 -0
  47. package/dist/extensions/healthie/actions/dataExchange/shared/index.d.ts +1 -0
  48. package/dist/extensions/healthie/actions/dataExchange/shared/index.js +18 -0
  49. package/dist/extensions/healthie/actions/dataExchange/shared/index.js.map +1 -0
  50. package/dist/extensions/healthie/actions/index.d.ts +31 -0
  51. package/dist/extensions/healthie/actions/index.js +3 -2
  52. package/dist/extensions/healthie/actions/index.js.map +1 -1
  53. package/dist/extensions/healthie/lib/sdk/genql/generated/schema.d.ts +498 -30
  54. package/dist/extensions/healthie/lib/sdk/genql/generated/schema.js +86 -13
  55. package/dist/extensions/healthie/lib/sdk/genql/generated/schema.js.map +1 -1
  56. package/dist/extensions/healthie/lib/sdk/genql/generated/types.d.ts +140 -8
  57. package/dist/extensions/healthie/lib/sdk/genql/generated/types.js +12282 -11948
  58. package/dist/extensions/healthie/lib/sdk/genql/generated/types.js.map +1 -1
  59. package/dist/extensions/twilio/v2/actions/sendSmsDuringBusinessHours/sendSmsDuringBusinessHours.test.js +3 -0
  60. package/dist/extensions/twilio/v2/actions/sendSmsDuringBusinessHours/sendSmsDuringBusinessHours.test.js.map +1 -1
  61. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/formDefinitionResponse.d.ts +36 -0
  62. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/formDefinitionResponse.js +44 -0
  63. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/formDefinitionResponse.js.map +1 -0
  64. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/formResponseResponse.d.ts +22 -0
  65. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/formResponseResponse.js +30 -0
  66. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/formResponseResponse.js.map +1 -0
  67. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/index.d.ts +3 -0
  68. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/index.js +20 -0
  69. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/index.js.map +1 -0
  70. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/pathwayActivitiesResponse.d.ts +26 -0
  71. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/pathwayActivitiesResponse.js +93 -0
  72. package/dist/src/lib/awell/getAllFormsInCurrentStep/__testdata__/pathwayActivitiesResponse.js.map +1 -0
  73. package/dist/src/lib/awell/getAllFormsInCurrentStep/getAllFormsInCurrentStep.d.ts +13 -0
  74. package/dist/src/lib/awell/getAllFormsInCurrentStep/getAllFormsInCurrentStep.js +88 -0
  75. package/dist/src/lib/awell/getAllFormsInCurrentStep/getAllFormsInCurrentStep.js.map +1 -0
  76. package/dist/src/lib/awell/getAllFormsInCurrentStep/getAllFormsInCurrentStep.test.d.ts +1 -0
  77. package/dist/src/lib/awell/getAllFormsInCurrentStep/getAllFormsInCurrentStep.test.js +113 -0
  78. package/dist/src/lib/awell/getAllFormsInCurrentStep/getAllFormsInCurrentStep.test.js.map +1 -0
  79. package/dist/src/lib/awell/getAllFormsInCurrentStep/index.d.ts +1 -0
  80. package/dist/src/lib/awell/getAllFormsInCurrentStep/index.js +18 -0
  81. package/dist/src/lib/awell/getAllFormsInCurrentStep/index.js.map +1 -0
  82. package/dist/src/lib/awell/index.d.ts +1 -0
  83. package/dist/src/lib/awell/index.js +1 -0
  84. package/dist/src/lib/awell/index.js.map +1 -1
  85. package/package.json +1 -1
  86. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/datapoints.js.map +0 -1
  87. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/fields.js.map +0 -1
  88. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/config/index.js.map +0 -1
  89. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/errors.js.map +0 -1
  90. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/index.js.map +0 -1
  91. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.js.map +0 -1
  92. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.js.map +0 -1
  93. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/getSubActivityLogs/index.js.map +0 -1
  94. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/logs/index.js.map +0 -1
  95. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.js.map +0 -1
  96. package/dist/extensions/healthie/actions/pushFormResponseToHealthie/pushFormResponseToHealthie.test.js.map +0 -1
  97. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/config/datapoints.d.ts +0 -0
  98. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/config/datapoints.js +0 -0
  99. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/config/fields.d.ts +0 -0
  100. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/config/fields.js +0 -0
  101. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/config/index.d.ts +0 -0
  102. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/config/index.js +0 -0
  103. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/index.d.ts +0 -0
  104. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/index.js +0 -0
  105. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/getSubActivityLogs/getSubActivityLogs.d.ts +0 -0
  106. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/getSubActivityLogs/getSubActivityLogs.js +0 -0
  107. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/getSubActivityLogs/getSubActivityLogs.test.d.ts +0 -0
  108. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/getSubActivityLogs/getSubActivityLogs.test.js +0 -0
  109. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/getSubActivityLogs/index.d.ts +0 -0
  110. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/getSubActivityLogs/index.js +0 -0
  111. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/index.d.ts +0 -0
  112. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/logs/index.js +0 -0
  113. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/pushFormResponseToHealthie.test.d.ts +0 -0
  114. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/pushFormResponseToHealthie}/pushFormResponseToHealthie.test.js +0 -0
  115. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/shared}/errors.d.ts +0 -0
  116. /package/dist/extensions/healthie/actions/{pushFormResponseToHealthie → dataExchange/shared}/errors.js +0 -0
@@ -0,0 +1,2 @@
1
+ export * from './pushFormResponseToHealthie';
2
+ export * from './pushFormResponsesToHealthie';
@@ -0,0 +1,19 @@
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("./pushFormResponseToHealthie"), exports);
18
+ __exportStar(require("./pushFormResponsesToHealthie"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/dataExchange/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA4C;AAC5C,gEAA6C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datapoints.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/dataExchange/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 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/dataExchange/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 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/dataExchange/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 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/index.ts"],"names":[],"mappings":";;;AAAA,2EAAyE;AAAhE,wIAAA,0BAA0B,OAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSubActivityLogs.js","sourceRoot":"","sources":["../../../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mGAA+E,CAAA;IAC/E,uDAAmC,CAAA;IACnC,mCAAe,CAAA;AACjB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAQD,MAAM,cAAc,GAAG,CACrB,IAAyB,EACE,EAAE;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,gBAAgB,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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C,MAAM,EAAE,CAAA;QAC3C,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAA;QAEb,OAAO,yGAAyG,SAAS,EAAE,CAAA;IAC7H,CAAC,CAAA;IAED,MAAM,QAAQ,GAAG,cAAc,CAAA;IAC/B,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;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 @@
1
+ {"version":3,"file":"getSubActivityLogs.test.js","sourceRoot":"","sources":["../../../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.ts"],"names":[],"mappings":";;AAAA,wBAAwD;AAExD,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,mBAAgB,CAAC,qCAAqC;aACjE;YACD;gBACE,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AAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/getSubActivityLogs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/logs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC"}
@@ -1,4 +1,4 @@
1
1
  import { type Action } from '@awell-health/extensions-core';
2
- import { type settings } from '../../settings';
2
+ import { type settings } from '../../../settings';
3
3
  import { datapoints, fields } from './config';
4
4
  export declare const pushFormResponseToHealthie: Action<typeof fields, typeof settings, keyof typeof datapoints>;
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.pushFormResponseToHealthie = void 0;
4
- const awell_1 = require("../../../../src/lib/awell");
4
+ const awell_1 = require("../../../../../src/lib/awell");
5
5
  const extensions_core_1 = require("@awell-health/extensions-core");
6
- const validatePayloadAndCreateSdk_1 = require("../../lib/sdk/validatePayloadAndCreateSdk");
6
+ const validatePayloadAndCreateSdk_1 = require("../../../lib/sdk/validatePayloadAndCreateSdk");
7
7
  const config_1 = require("./config");
8
8
  const logs_1 = require("./logs");
9
9
  const lodash_1 = require("lodash");
10
- const errors_1 = require("./errors");
11
- const errors_2 = require("../../lib/sdk/graphql-codegen/errors");
10
+ const errors_1 = require("../shared/errors");
11
+ const errors_2 = require("../../../lib/sdk/graphql-codegen/errors");
12
12
  exports.pushFormResponseToHealthie = {
13
13
  key: 'pushFormResponseToHealthie',
14
14
  category: extensions_core_1.Category.DEMO,
15
15
  title: 'Push form response to Healthie',
16
16
  description: 'Pushes an Awell form response to a Healthie form',
17
17
  fields: config_1.fields,
18
- previewable: true,
18
+ previewable: false,
19
19
  dataPoints: config_1.datapoints,
20
20
  onEvent: async ({ payload, onComplete, onError, helpers }) => {
21
21
  var _a, _b, _c, _d;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pushFormResponseToHealthie.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/pushFormResponseToHealthie.ts"],"names":[],"mappings":";;;AAAA,wDAAyE;AACzE,mEAAqE;AACrE,8FAA0F;AAE1F,qCAAqE;AACrE,iCAA2C;AAC3C,mCAAgC;AAChC,6CAGyB;AACzB,oEAGgD;AAEnC,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,KAAK;IAClB,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,CAAC,KAAK,CAAC,QAAQ,CAAC,sCAAs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D,CAAC,CAAA;aACH;iBAAM,IAAI,KAAK,YAAY,uCAA8B,EAAE;gBAC1D,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN,IAAA,iDAAwC,EAAC,KAAK,CAAC,MAAM,CAAC;wBACtD,GAAG,IAAA,yBAAkB,EAAC,kBAAkB,CAAC;qBAC1C;iBACF,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,KAAK,CAAA;aACZ;SACF;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pushFormResponseToHealthie.test.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/dataExchange/pushFormResponseToHealthie/pushFormResponseToHealthie.test.ts"],"names":[],"mappings":";;AAAA,uDAAkD;AAClD,mEAA2D;AAC3D,wBAAiE;AACjE,8DAAgE;AAChE,0CAIoB;AAEpB,IAAI,CAAC,IAAI,CAAC,oCAAoC,EAAE,GAAG,EAAE,CAAC,CAAC;IACrD,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAC;QAC/C,MAAM,EAAE;YACN,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC;gBACpC,qBAAqB,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE;aAC9D,CAAC;SACH;KACF,CAAC,CAAC;CACJ,CAAC,CAAC,CAAA;AAEH,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,mBAAW,CAAC,CAAA;AAElD,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;IAC1C,MAAM,EACJ,eAAe,EAAE,MAAM,EACvB,UAAU,EACV,OAAO,EACP,OAAO,EACP,UAAU,GACX,GAAG,6BAAW,CAAC,UAAU,CAAC,6BAAe,CAAC,CAAA;IAE3C,MAAM,YAAY,GAAG;QACnB,aAAa,EAAE;YACb,QAAQ,EAAE,IAAI,CAAC,EAAE,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AC,CAAC,CAAC,CAAA;QACjD,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAA;QAEjE,MAAM,CAAC,yBAAyB,CAAC,CAAC,kBAAkB,CAAC;YACnD,WAAW,EAAE;gBACX,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE;gBACrD,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE;gBACtD,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE;gBAChD,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE;aAChD;YACD,kBAAkB,EAAE,EAAE;SACvB,CAAC,CAAA;QAEF,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,iBAAiB,EAAE,OAAO;aAC3B;YACD,MAAM,EAAE,EAAE;SACX,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,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/dataExchange/pushFormResponsesToHealthie/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/dataExchange/pushFormResponsesToHealthie/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/dataExchange/pushFormResponsesToHealthie/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 { pushFormResponsesToHealthie } from './pushFormResponsesToHealthie';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushFormResponsesToHealthie = void 0;
4
+ var pushFormResponsesToHealthie_1 = require("./pushFormResponsesToHealthie");
5
+ Object.defineProperty(exports, "pushFormResponsesToHealthie", { enumerable: true, get: function () { return pushFormResponsesToHealthie_1.pushFormResponsesToHealthie; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/index.ts"],"names":[],"mappings":";;;AAAA,6EAA2E;AAAlE,0IAAA,2BAA2B,OAAA"}
@@ -0,0 +1,13 @@
1
+ import { type ActivityEvent } from '@awell-health/extensions-core';
2
+ export declare enum HealthieOmitType {
3
+ QUESTION_NOT_FOUND_IN_FORM_DEFINITION = "QUESTION_NOT_FOUND_IN_FORM_DEFINITION",
4
+ MISSING_MAPPING = "MISSING_MAPPING",
5
+ OTHER = "OTHER"
6
+ }
7
+ interface OmittedFormAnswer {
8
+ questionId: string;
9
+ reason: string;
10
+ omitType: HealthieOmitType;
11
+ }
12
+ export declare const getSubActivityLogs: (data: OmittedFormAnswer[]) => ActivityEvent[];
13
+ export {};
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSubActivityLogs = exports.HealthieOmitType = void 0;
4
+ var HealthieOmitType;
5
+ (function (HealthieOmitType) {
6
+ HealthieOmitType["QUESTION_NOT_FOUND_IN_FORM_DEFINITION"] = "QUESTION_NOT_FOUND_IN_FORM_DEFINITION";
7
+ HealthieOmitType["MISSING_MAPPING"] = "MISSING_MAPPING";
8
+ HealthieOmitType["OTHER"] = "OTHER";
9
+ })(HealthieOmitType = exports.HealthieOmitType || (exports.HealthieOmitType = {}));
10
+ const getMappingLogs = (data) => {
11
+ const errors = data.filter((item) => item.omitType === HealthieOmitType.MISSING_MAPPING);
12
+ if (errors.length === 0)
13
+ return undefined;
14
+ const getMessage = () => {
15
+ const errorText = errors
16
+ .map((err) => {
17
+ return `${err.questionId}`;
18
+ })
19
+ .join(', ');
20
+ return `Missing mapping for the below questions: ${errorText}`;
21
+ };
22
+ const category = 'MISSING_SETTINGS';
23
+ const message = getMessage();
24
+ return {
25
+ date: new Date().toISOString(),
26
+ text: {
27
+ en: message,
28
+ },
29
+ error: {
30
+ category,
31
+ message,
32
+ },
33
+ };
34
+ };
35
+ const getFormDefinitionLogs = (data) => {
36
+ const errors = data.filter((item) => item.omitType === HealthieOmitType.QUESTION_NOT_FOUND_IN_FORM_DEFINITION);
37
+ if (errors.length === 0)
38
+ return undefined;
39
+ const getMessage = () => {
40
+ const errorText = errors
41
+ .map((err) => {
42
+ return `${err.questionId}`;
43
+ })
44
+ .join(', ');
45
+ return `The following questions in the response could not be linked to a question definition in the form definition: ${errorText}`;
46
+ };
47
+ const category = 'SERVER_ERROR';
48
+ const message = getMessage();
49
+ return {
50
+ date: new Date().toISOString(),
51
+ text: {
52
+ en: message,
53
+ },
54
+ error: {
55
+ category,
56
+ message,
57
+ },
58
+ };
59
+ };
60
+ const getOtherErrors = (data) => {
61
+ const errors = data.filter((item) => item.omitType === HealthieOmitType.OTHER);
62
+ if (errors.length === 0)
63
+ return undefined;
64
+ const getMessage = () => {
65
+ const errorText = errors
66
+ .map((err) => {
67
+ return `${err.questionId}: ${err.reason}`;
68
+ })
69
+ .join(', ');
70
+ return `There was an unexpected error transforming the following Awell form answers to Healthie form answers: ${errorText}`;
71
+ };
72
+ const category = 'SERVER_ERROR';
73
+ const message = getMessage();
74
+ return {
75
+ date: new Date().toISOString(),
76
+ text: {
77
+ en: message,
78
+ },
79
+ error: {
80
+ category,
81
+ message,
82
+ },
83
+ };
84
+ };
85
+ const getSubActivityLogs = (data) => {
86
+ const activityEvents = [
87
+ getMappingLogs(data),
88
+ getFormDefinitionLogs(data),
89
+ getOtherErrors(data),
90
+ ].filter((_) => _ !== undefined);
91
+ return activityEvents;
92
+ };
93
+ exports.getSubActivityLogs = getSubActivityLogs;
94
+ //# sourceMappingURL=getSubActivityLogs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSubActivityLogs.js","sourceRoot":"","sources":["../../../../../../../../extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,mGAA+E,CAAA;IAC/E,uDAAmC,CAAA;IACnC,mCAAe,CAAA;AACjB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAQD,MAAM,cAAc,GAAG,CACrB,IAAyB,EACE,EAAE;IAC7B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CACxB,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,gBAAgB,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;QAC9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,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACX,OAAO,GAAG,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,MAAM,EAAE,CAAA;QAC3C,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAA;QAEb,OAAO,yGAAyG,SAAS,EAAE,CAAA;IAC7H,CAAC,CAAA;IAED,MAAM,QAAQ,GAAG,cAAc,CAAA;IAC/B,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;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,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ describe('getMappingStatus', () => {
5
+ beforeEach(() => {
6
+ jest.clearAllMocks();
7
+ });
8
+ test('Should work when there are mapping errors', async () => {
9
+ const data = [
10
+ {
11
+ questionId: 'question_1',
12
+ reason: 'No corresponding question definition found in the form definition',
13
+ omitType: _1.HealthieOmitType.QUESTION_NOT_FOUND_IN_FORM_DEFINITION,
14
+ },
15
+ {
16
+ questionId: 'question_2',
17
+ reason: 'Unable to map this question to a Healthie question because it misses the `healthieCustomModuleId` metadata required for proper integration.',
18
+ omitType: _1.HealthieOmitType.MISSING_MAPPING,
19
+ },
20
+ {
21
+ questionId: 'question_3',
22
+ reason: 'Unknown error',
23
+ omitType: _1.HealthieOmitType.OTHER,
24
+ },
25
+ {
26
+ questionId: 'question_4',
27
+ reason: 'Unable to map this question to a Healthie question because it misses the `healthieCustomModuleId` metadata required for proper integration.',
28
+ omitType: _1.HealthieOmitType.MISSING_MAPPING,
29
+ },
30
+ ];
31
+ const res = (0, _1.getSubActivityLogs)(data);
32
+ expect(res).toEqual([
33
+ {
34
+ date: expect.any(String),
35
+ text: {
36
+ en: 'Missing mapping for the below questions: question_2, question_4',
37
+ },
38
+ error: {
39
+ category: 'MISSING_SETTINGS',
40
+ message: 'Missing mapping for the below questions: question_2, question_4',
41
+ },
42
+ },
43
+ {
44
+ date: expect.any(String),
45
+ text: {
46
+ en: 'The following questions in the response could not be linked to a question definition in the form definition: question_1',
47
+ },
48
+ error: {
49
+ category: 'SERVER_ERROR',
50
+ message: 'The following questions in the response could not be linked to a question definition in the form definition: question_1',
51
+ },
52
+ },
53
+ {
54
+ date: expect.any(String),
55
+ text: {
56
+ en: 'There was an unexpected error transforming the following Awell form answers to Healthie form answers: question_3: Unknown error',
57
+ },
58
+ error: {
59
+ category: 'SERVER_ERROR',
60
+ message: 'There was an unexpected error transforming the following Awell form answers to Healthie form answers: question_3: Unknown error',
61
+ },
62
+ },
63
+ ]);
64
+ });
65
+ test('Should work when there are no mapping errors', async () => {
66
+ const res = (0, _1.getSubActivityLogs)([]);
67
+ expect(res).toEqual([]);
68
+ });
69
+ });
70
+ //# sourceMappingURL=getSubActivityLogs.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSubActivityLogs.test.js","sourceRoot":"","sources":["../../../../../../../../extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/logs/getSubActivityLogs/getSubActivityLogs.test.ts"],"names":[],"mappings":";;AAAA,wBAAwD;AAExD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,UAAU,CAAC,GA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cAAc;oBACxB,OAAO,EACL,iIAAiI;iBACpI;aACF;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;QAC9D,MAAM,GAAG,GAAG,IAAA,qBAAkB,EAAC,EAAE,CAAC,CAAA;QAElC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -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/dataExchange/pushFormResponsesToHealthie/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/dataExchange/pushFormResponsesToHealthie/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 pushFormResponsesToHealthie: Action<typeof fields, typeof settings, keyof typeof datapoints>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pushFormResponsesToHealthie = 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 shared_1 = require("../shared");
11
+ const errors_1 = require("../../../lib/sdk/graphql-codegen/errors");
12
+ exports.pushFormResponsesToHealthie = {
13
+ key: 'pushFormResponsesToHealthie',
14
+ category: extensions_core_1.Category.DEMO,
15
+ title: 'Push form responses to Healthie',
16
+ description: 'Pushes all form response from the current step to a Healthie form',
17
+ fields: config_1.fields,
18
+ previewable: false,
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 an array of all form definitions and responses
29
+ * in the current step at the time the current activity in that step is activated.
30
+ */
31
+ const formsData = await (0, awell_1.getAllFormsInCurrentStep)({
32
+ awellSdk,
33
+ pathwayId: pathway.id,
34
+ activityId: activity.id,
35
+ });
36
+ const formDataWithHealthieFormAnswers = formsData.map((formData) => {
37
+ const { formAnswers: healthieFormAnswerInputs, omittedFormAnswers } = awellSdk.utils.healthie.awellFormResponseToHealthieFormAnswers({
38
+ awellFormDefinition: formData.formDefinition,
39
+ awellFormResponse: formData.formResponse,
40
+ });
41
+ return {
42
+ ...formData,
43
+ healthieFormAnswerInputs,
44
+ omittedFormAnswers,
45
+ };
46
+ });
47
+ const mergedHealthieFormAnswers = formDataWithHealthieFormAnswers.flatMap(({ healthieFormAnswerInputs }) => healthieFormAnswerInputs);
48
+ const mergedOmittedFormAnswers = formDataWithHealthieFormAnswers.flatMap(({ omittedFormAnswers }) => omittedFormAnswers);
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: mergedHealthieFormAnswers.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 shared_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)(mergedOmittedFormAnswers),
75
+ });
76
+ }
77
+ catch (error) {
78
+ if (error instanceof errors_1.HealthieError) {
79
+ const errors = (0, errors_1.mapHealthieToActivityError)(error.errors);
80
+ await onError({
81
+ events: [...errors, ...(0, logs_1.getSubActivityLogs)(mergedOmittedFormAnswers)],
82
+ });
83
+ }
84
+ else if (error instanceof shared_1.HealthieFormResponseNotCreated) {
85
+ await onError({
86
+ events: [
87
+ (0, shared_1.parseHealthieFormResponseNotCreatedError)(error.errors),
88
+ ...(0, logs_1.getSubActivityLogs)(mergedOmittedFormAnswers),
89
+ ],
90
+ });
91
+ }
92
+ else {
93
+ throw error;
94
+ }
95
+ }
96
+ },
97
+ };
98
+ //# sourceMappingURL=pushFormResponsesToHealthie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pushFormResponsesToHealthie.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/dataExchange/pushFormResponsesToHealthie/pushFormResponsesToHealthie.ts"],"names":[],"mappings":";;;AAAA,wDAAuE;AACvE,mEAAqE;AACrE,8FAA0F;AAE1F,qCAAqE;AACrE,iCAA2C;AAC3C,mCAAgC;AAChC,sCAGkB;AAClB,oEAGgD;AAEnC,QAAA,2BAA2B,GAIpC;IACF,GAAG,EAAE,6BAA6B;IAClC,QAAQ,EAAE,0BAAQ,CAAC,IAAI;IACvB,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,mEAAmE;IACrE,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAE,mBAAU;IACtB,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OA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