@awell-health/awell-extensions 1.1.42 → 1.1.43-beta42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. package/dist/extensions/awell/v1/webhooks/index.d.ts +1 -1
  2. package/dist/extensions/awell/v1/webhooks/pathwayStart.d.ts +3 -1
  3. package/dist/extensions/awell/v1/webhooks/pathwayStart.js +13 -3
  4. package/dist/extensions/awell/v1/webhooks/pathwayStart.js.map +1 -1
  5. package/dist/extensions/calDotCom/webhooks/index.d.ts +1 -1
  6. package/dist/extensions/calendly/webhooks/index.d.ts +1 -1
  7. package/dist/extensions/elation/actions/updatePatient.js +1 -0
  8. package/dist/extensions/elation/actions/updatePatient.js.map +1 -1
  9. package/dist/extensions/elation/webhooks/index.d.ts +1 -1
  10. package/dist/extensions/healthie/lib/sdk/createSdk.d.ts +10 -0
  11. package/dist/extensions/healthie/lib/sdk/createSdk.js +17 -0
  12. package/dist/extensions/healthie/lib/sdk/createSdk.js.map +1 -0
  13. package/dist/extensions/healthie/lib/sdk/errors.d.ts +1 -0
  14. package/dist/extensions/healthie/lib/sdk/errors.js +42 -1
  15. package/dist/extensions/healthie/lib/sdk/errors.js.map +1 -1
  16. package/dist/extensions/healthie/lib/sdk/generated/sdk.d.ts +373 -9
  17. package/dist/extensions/healthie/lib/sdk/generated/sdk.js +110 -3
  18. package/dist/extensions/healthie/lib/sdk/generated/sdk.js.map +1 -1
  19. package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.d.ts +11 -1
  20. package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.js +15 -1
  21. package/dist/extensions/healthie/lib/sdk/validatePayloadAndCreateSdk.js.map +1 -1
  22. package/dist/extensions/healthie/lib/types.d.ts +1 -0
  23. package/dist/extensions/healthie/lib/types.js +2 -0
  24. package/dist/extensions/healthie/lib/types.js.map +1 -1
  25. package/dist/extensions/healthie/webhooks/appliedTagCreated.d.ts +2 -1
  26. package/dist/extensions/healthie/webhooks/appliedTagCreated.js +19 -7
  27. package/dist/extensions/healthie/webhooks/appliedTagCreated.js.map +1 -1
  28. package/dist/extensions/healthie/webhooks/appliedTagDeleted.d.ts +2 -1
  29. package/dist/extensions/healthie/webhooks/appliedTagDeleted.js +19 -7
  30. package/dist/extensions/healthie/webhooks/appliedTagDeleted.js.map +1 -1
  31. package/dist/extensions/healthie/webhooks/appointmentCreated.d.ts +6 -1
  32. package/dist/extensions/healthie/webhooks/appointmentCreated.js +25 -6
  33. package/dist/extensions/healthie/webhooks/appointmentCreated.js.map +1 -1
  34. package/dist/extensions/healthie/webhooks/appointmentDeleted.d.ts +2 -1
  35. package/dist/extensions/healthie/webhooks/appointmentDeleted.js +21 -6
  36. package/dist/extensions/healthie/webhooks/appointmentDeleted.js.map +1 -1
  37. package/dist/extensions/healthie/webhooks/appointmentUpdated.d.ts +6 -1
  38. package/dist/extensions/healthie/webhooks/appointmentUpdated.js +25 -6
  39. package/dist/extensions/healthie/webhooks/appointmentUpdated.js.map +1 -1
  40. package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.d.ts +6 -1
  41. package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.js +26 -7
  42. package/dist/extensions/healthie/webhooks/formAnswerGroupCreated.js.map +1 -1
  43. package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.d.ts +2 -1
  44. package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.js +20 -6
  45. package/dist/extensions/healthie/webhooks/formAnswerGroupDeleted.js.map +1 -1
  46. package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.d.ts +6 -1
  47. package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.js +25 -6
  48. package/dist/extensions/healthie/webhooks/formAnswerGroupLocked.js.map +1 -1
  49. package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.d.ts +6 -1
  50. package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.js +25 -6
  51. package/dist/extensions/healthie/webhooks/formAnswerGroupSigned.js.map +1 -1
  52. package/dist/extensions/healthie/webhooks/goalCreated.d.ts +3 -2
  53. package/dist/extensions/healthie/webhooks/goalCreated.js +21 -9
  54. package/dist/extensions/healthie/webhooks/goalCreated.js.map +1 -1
  55. package/dist/extensions/healthie/webhooks/goalUpdated.d.ts +2 -1
  56. package/dist/extensions/healthie/webhooks/goalUpdated.js +20 -8
  57. package/dist/extensions/healthie/webhooks/goalUpdated.js.map +1 -1
  58. package/dist/extensions/healthie/webhooks/index.d.ts +316 -5
  59. package/dist/extensions/healthie/webhooks/index.js +0 -8
  60. package/dist/extensions/healthie/webhooks/index.js.map +1 -1
  61. package/dist/extensions/healthie/webhooks/labOrderCreated.d.ts +2 -1
  62. package/dist/extensions/healthie/webhooks/labOrderCreated.js +19 -7
  63. package/dist/extensions/healthie/webhooks/labOrderCreated.js.map +1 -1
  64. package/dist/extensions/healthie/webhooks/labOrderUpdated.d.ts +2 -1
  65. package/dist/extensions/healthie/webhooks/labOrderUpdated.js +19 -7
  66. package/dist/extensions/healthie/webhooks/labOrderUpdated.js.map +1 -1
  67. package/dist/extensions/healthie/webhooks/messageCreated.d.ts +2 -1
  68. package/dist/extensions/healthie/webhooks/messageCreated.js +20 -7
  69. package/dist/extensions/healthie/webhooks/messageCreated.js.map +1 -1
  70. package/dist/extensions/healthie/webhooks/messageDeleted.d.ts +2 -1
  71. package/dist/extensions/healthie/webhooks/messageDeleted.js +20 -7
  72. package/dist/extensions/healthie/webhooks/messageDeleted.js.map +1 -1
  73. package/dist/extensions/healthie/webhooks/metricEntryCreated.d.ts +2 -1
  74. package/dist/extensions/healthie/webhooks/metricEntryCreated.js +19 -7
  75. package/dist/extensions/healthie/webhooks/metricEntryCreated.js.map +1 -1
  76. package/dist/extensions/healthie/webhooks/metricEntryUpdated.d.ts +2 -1
  77. package/dist/extensions/healthie/webhooks/metricEntryUpdated.js +19 -7
  78. package/dist/extensions/healthie/webhooks/metricEntryUpdated.js.map +1 -1
  79. package/dist/extensions/healthie/webhooks/patientCreated.js +5 -0
  80. package/dist/extensions/healthie/webhooks/patientCreated.js.map +1 -1
  81. package/dist/extensions/healthie/webhooks/patientUpdated.js +5 -0
  82. package/dist/extensions/healthie/webhooks/patientUpdated.js.map +1 -1
  83. package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.d.ts +2 -1
  84. package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.js +19 -7
  85. package/dist/extensions/healthie/webhooks/requestedFormCompletionCreated.js.map +1 -1
  86. package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.d.ts +2 -1
  87. package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.js +19 -7
  88. package/dist/extensions/healthie/webhooks/requestedFormCompletionUpdated.js.map +1 -1
  89. package/dist/extensions/healthie/webhooks/taskCreated.d.ts +2 -1
  90. package/dist/extensions/healthie/webhooks/taskCreated.js +19 -7
  91. package/dist/extensions/healthie/webhooks/taskCreated.js.map +1 -1
  92. package/dist/extensions/healthie/webhooks/taskUpdated.d.ts +2 -1
  93. package/dist/extensions/healthie/webhooks/taskUpdated.js +20 -8
  94. package/dist/extensions/healthie/webhooks/taskUpdated.js.map +1 -1
  95. package/dist/extensions/hello-world/webhooks/index.d.ts +1 -1
  96. package/dist/extensions/markdown.json +0 -4
  97. package/dist/extensions/zusHealth/webhooks/index.d.ts +37 -1
  98. package/dist/extensions/zusHealth/webhooks/patientAdmitted.d.ts +2 -1
  99. package/dist/extensions/zusHealth/webhooks/patientAdmitted.js.map +1 -1
  100. package/dist/extensions/zusHealth/webhooks/patientDischarged.d.ts +2 -1
  101. package/dist/extensions/zusHealth/webhooks/patientDischarged.js.map +1 -1
  102. package/dist/src/test-server.js +4 -0
  103. package/dist/src/test-server.js.map +1 -1
  104. package/package.json +6 -5
  105. package/dist/extensions/healthie/webhooks/goalDeleted.d.ts +0 -11
  106. package/dist/extensions/healthie/webhooks/goalDeleted.js +0 -30
  107. package/dist/extensions/healthie/webhooks/goalDeleted.js.map +0 -1
  108. package/dist/extensions/healthie/webhooks/metricEntryDeleted.d.ts +0 -11
  109. package/dist/extensions/healthie/webhooks/metricEntryDeleted.js +0 -30
  110. package/dist/extensions/healthie/webhooks/metricEntryDeleted.js.map +0 -1
  111. package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.d.ts +0 -11
  112. package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.js +0 -30
  113. package/dist/extensions/healthie/webhooks/requestedFormCompletionDeleted.js.map +0 -1
  114. package/dist/extensions/healthie/webhooks/taskDeleted.d.ts +0 -11
  115. package/dist/extensions/healthie/webhooks/taskDeleted.js +0 -30
  116. package/dist/extensions/healthie/webhooks/taskDeleted.js.map +0 -1
  117. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/checkFlourishCustomer.d.ts +0 -11
  118. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/checkFlourishCustomer.js +0 -39
  119. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/checkFlourishCustomer.js.map +0 -1
  120. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/checkFlourishCustomer.test.d.ts +0 -1
  121. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/checkFlourishCustomer.test.js +0 -85
  122. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/checkFlourishCustomer.test.js.map +0 -1
  123. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/fields.d.ts +0 -18
  124. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/fields.js +0 -18
  125. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/fields.js.map +0 -1
  126. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/index.d.ts +0 -2
  127. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/index.js +0 -9
  128. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/index.js.map +0 -1
  129. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/settings.d.ts +0 -35
  130. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/settings.js +0 -17
  131. package/dist/extensions/wellinks-public/actions/checkFlourishCustomer/config/settings.js.map +0 -1
  132. package/dist/extensions/wellinks-public/actions/checkForChat/checkForChat.d.ts +0 -33
  133. package/dist/extensions/wellinks-public/actions/checkForChat/checkForChat.js +0 -129
  134. package/dist/extensions/wellinks-public/actions/checkForChat/checkForChat.js.map +0 -1
  135. package/dist/extensions/wellinks-public/actions/checkForChat/checkForChat.test.d.ts +0 -1
  136. package/dist/extensions/wellinks-public/actions/checkForChat/checkForChat.test.js +0 -154
  137. package/dist/extensions/wellinks-public/actions/checkForChat/checkForChat.test.js.map +0 -1
  138. package/dist/extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.d.ts +0 -26
  139. package/dist/extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.js +0 -139
  140. package/dist/extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.js.map +0 -1
  141. package/dist/extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.test.d.ts +0 -1
  142. package/dist/extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.test.js +0 -185
  143. package/dist/extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.test.js.map +0 -1
  144. package/dist/extensions/wellinks-public/actions/checkForOverride/checkForOverride.d.ts +0 -23
  145. package/dist/extensions/wellinks-public/actions/checkForOverride/checkForOverride.js +0 -153
  146. package/dist/extensions/wellinks-public/actions/checkForOverride/checkForOverride.js.map +0 -1
  147. package/dist/extensions/wellinks-public/actions/checkForOverride/checkForOverride.test.d.ts +0 -1
  148. package/dist/extensions/wellinks-public/actions/checkForOverride/checkForOverride.test.js +0 -184
  149. package/dist/extensions/wellinks-public/actions/checkForOverride/checkForOverride.test.js.map +0 -1
  150. package/dist/extensions/wellinks-public/actions/checkForScheduledAppointment/checkForScheduledAppointment.d.ts +0 -26
  151. package/dist/extensions/wellinks-public/actions/checkForScheduledAppointment/checkForScheduledAppointment.js +0 -118
  152. package/dist/extensions/wellinks-public/actions/checkForScheduledAppointment/checkForScheduledAppointment.js.map +0 -1
  153. package/dist/extensions/wellinks-public/actions/checkForScheduledAppointment/checkForScheduledAppointment.test.d.ts +0 -1
  154. package/dist/extensions/wellinks-public/actions/checkForScheduledAppointment/checkForScheduledAppointment.test.js +0 -119
  155. package/dist/extensions/wellinks-public/actions/checkForScheduledAppointment/checkForScheduledAppointment.test.js.map +0 -1
  156. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/config/fields.d.ts +0 -82
  157. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/config/fields.js +0 -78
  158. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/config/fields.js.map +0 -1
  159. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/config/index.d.ts +0 -1
  160. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/config/index.js +0 -6
  161. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/config/index.js.map +0 -1
  162. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced-fail.test.d.ts +0 -1
  163. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced-fail.test.js +0 -152
  164. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced-fail.test.js.map +0 -1
  165. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.d.ts +0 -4
  166. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.js +0 -86
  167. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.js.map +0 -1
  168. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.test.d.ts +0 -1
  169. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.test.js +0 -42
  170. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/createChartingNoteAdvanced.test.js.map +0 -1
  171. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/index.d.ts +0 -1
  172. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/index.js +0 -6
  173. package/dist/extensions/wellinks-public/actions/createChartingNoteAdvanced/index.js.map +0 -1
  174. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/fields.d.ts +0 -58
  175. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/fields.js +0 -56
  176. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/fields.js.map +0 -1
  177. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/index.d.ts +0 -2
  178. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/index.js +0 -9
  179. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/index.js.map +0 -1
  180. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/settings.d.ts +0 -35
  181. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/settings.js +0 -17
  182. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/config/settings.js.map +0 -1
  183. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/createFlourishCustomer.d.ts +0 -11
  184. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/createFlourishCustomer.js +0 -56
  185. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/createFlourishCustomer.js.map +0 -1
  186. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/createFlourishCustomer.test.d.ts +0 -1
  187. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/createFlourishCustomer.test.js +0 -53
  188. package/dist/extensions/wellinks-public/actions/createFlourishCustomer/createFlourishCustomer.test.js.map +0 -1
  189. package/dist/extensions/wellinks-public/actions/index.d.ts +0 -967
  190. package/dist/extensions/wellinks-public/actions/index.js +0 -24
  191. package/dist/extensions/wellinks-public/actions/index.js.map +0 -1
  192. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/fields.d.ts +0 -78
  193. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/fields.js +0 -66
  194. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/fields.js.map +0 -1
  195. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/index.d.ts +0 -2
  196. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/index.js +0 -9
  197. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/index.js.map +0 -1
  198. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/settings.d.ts +0 -38
  199. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/settings.js +0 -11
  200. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/config/settings.js.map +0 -1
  201. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/insertMemberListEvent.d.ts +0 -11
  202. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/insertMemberListEvent.js +0 -75
  203. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/insertMemberListEvent.js.map +0 -1
  204. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/insertMemberListEvent.test.d.ts +0 -1
  205. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/insertMemberListEvent.test.js +0 -133
  206. package/dist/extensions/wellinks-public/actions/insertMemberListEvent/insertMemberListEvent.test.js.map +0 -1
  207. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/fields.d.ts +0 -188
  208. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/fields.js +0 -160
  209. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/fields.js.map +0 -1
  210. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/index.d.ts +0 -2
  211. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/index.js +0 -9
  212. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/index.js.map +0 -1
  213. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/settings.d.ts +0 -35
  214. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/settings.js +0 -17
  215. package/dist/extensions/wellinks-public/actions/submitPamSurvey/config/settings.js.map +0 -1
  216. package/dist/extensions/wellinks-public/actions/submitPamSurvey/submitPamSurvey.d.ts +0 -19
  217. package/dist/extensions/wellinks-public/actions/submitPamSurvey/submitPamSurvey.js +0 -66
  218. package/dist/extensions/wellinks-public/actions/submitPamSurvey/submitPamSurvey.js.map +0 -1
  219. package/dist/extensions/wellinks-public/actions/submitPamSurvey/submitPamSurvey.test.d.ts +0 -1
  220. package/dist/extensions/wellinks-public/actions/submitPamSurvey/submitPamSurvey.test.js +0 -125
  221. package/dist/extensions/wellinks-public/actions/submitPamSurvey/submitPamSurvey.test.js.map +0 -1
  222. package/dist/extensions/wellinks-public/api/clients/wellinksClient.d.ts +0 -16
  223. package/dist/extensions/wellinks-public/api/clients/wellinksClient.js +0 -40
  224. package/dist/extensions/wellinks-public/api/clients/wellinksClient.js.map +0 -1
  225. package/dist/extensions/wellinks-public/api/clients/wellinksFlourishClient.d.ts +0 -14
  226. package/dist/extensions/wellinks-public/api/clients/wellinksFlourishClient.js +0 -201
  227. package/dist/extensions/wellinks-public/api/clients/wellinksFlourishClient.js.map +0 -1
  228. package/dist/extensions/wellinks-public/api/clients/wellinksGraphqlClient.d.ts +0 -3
  229. package/dist/extensions/wellinks-public/api/clients/wellinksGraphqlClient.js +0 -23
  230. package/dist/extensions/wellinks-public/api/clients/wellinksGraphqlClient.js.map +0 -1
  231. package/dist/extensions/wellinks-public/api/test/wellinksFlourishClient.test.d.ts +0 -1
  232. package/dist/extensions/wellinks-public/api/test/wellinksFlourishClient.test.js +0 -192
  233. package/dist/extensions/wellinks-public/api/test/wellinksFlourishClient.test.js.map +0 -1
  234. package/dist/extensions/wellinks-public/codegen.d.ts +0 -3
  235. package/dist/extensions/wellinks-public/codegen.js +0 -21
  236. package/dist/extensions/wellinks-public/codegen.js.map +0 -1
  237. package/dist/extensions/wellinks-public/config/settings.d.ts +0 -107
  238. package/dist/extensions/wellinks-public/config/settings.js +0 -89
  239. package/dist/extensions/wellinks-public/config/settings.js.map +0 -1
  240. package/dist/extensions/wellinks-public/config/types.d.ts +0 -5
  241. package/dist/extensions/wellinks-public/config/types.js +0 -3
  242. package/dist/extensions/wellinks-public/config/types.js.map +0 -1
  243. package/dist/extensions/wellinks-public/gql/wellinksSdk.d.ts +0 -24110
  244. package/dist/extensions/wellinks-public/gql/wellinksSdk.js +0 -635
  245. package/dist/extensions/wellinks-public/gql/wellinksSdk.js.map +0 -1
  246. package/dist/extensions/wellinks-public/graphql/mutations.d.ts +0 -1
  247. package/dist/extensions/wellinks-public/graphql/mutations.js +0 -17
  248. package/dist/extensions/wellinks-public/graphql/mutations.js.map +0 -1
  249. package/dist/extensions/wellinks-public/graphql/queries.d.ts +0 -5
  250. package/dist/extensions/wellinks-public/graphql/queries.js +0 -66
  251. package/dist/extensions/wellinks-public/graphql/queries.js.map +0 -1
  252. package/dist/extensions/wellinks-public/index.d.ts +0 -2
  253. package/dist/extensions/wellinks-public/index.js +0 -20
  254. package/dist/extensions/wellinks-public/index.js.map +0 -1
@@ -1,129 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkForChat = void 0;
4
- const extensions_core_1 = require("@awell-health/extensions-core");
5
- const extensions_core_2 = require("@awell-health/extensions-core");
6
- const wellinksSdk_1 = require("../../gql/wellinksSdk");
7
- const wellinksGraphqlClient_1 = require("../../api/clients/wellinksGraphqlClient");
8
- const lodash_1 = require("lodash");
9
- const fields = {
10
- patientId: {
11
- id: 'patientId',
12
- label: 'Patient ID',
13
- description: 'The ID of the patient to check chats for.',
14
- type: extensions_core_1.FieldType.STRING,
15
- required: true,
16
- },
17
- coachId: {
18
- id: 'coachId',
19
- label: 'Coach ID',
20
- description: 'The ID of the coach to check chats for.',
21
- type: extensions_core_1.FieldType.STRING,
22
- required: true,
23
- },
24
- appointmentTime: {
25
- id: 'appointmentTime',
26
- label: 'Appointment Time',
27
- description: 'The appointment time to check against',
28
- type: extensions_core_1.FieldType.DATE,
29
- required: true,
30
- },
31
- };
32
- const dataPoints = {
33
- messageSent: {
34
- key: 'messageSent',
35
- valueType: 'boolean',
36
- },
37
- };
38
- exports.checkForChat = {
39
- key: 'checkForChat',
40
- category: extensions_core_2.Category.SCHEDULING,
41
- title: 'Check for Messages after Appointment',
42
- description: 'Checks that a message has been sent 24 hours after the given Appointment',
43
- fields,
44
- dataPoints,
45
- previewable: true,
46
- onActivityCreated: async (payload, onComplete, onError) => {
47
- var _a, _b;
48
- const { fields, settings } = payload;
49
- const { patientId, coachId, appointmentTime } = fields;
50
- try {
51
- const client = (0, wellinksGraphqlClient_1.initialiseClient)(settings);
52
- if (!(0, lodash_1.isNil)(client)) {
53
- const sdk = (0, wellinksSdk_1.getSdk)(client);
54
- const { data } = await sdk.getConversationMemberships({
55
- client_id: patientId,
56
- });
57
- if (!(0, lodash_1.isNil)(data.conversationMemberships)) {
58
- const conversationMemberships = data.conversationMemberships.filter((conversation) => { var _a; return ((_a = conversation === null || conversation === void 0 ? void 0 : conversation.convo) === null || _a === void 0 ? void 0 : _a.dietitian_id) === coachId; });
59
- for (const conversation of conversationMemberships) {
60
- // check if dates are within 24 hours of each other
61
- if (areDatesMoreThanADayApart(new Date((_b = (_a = conversation === null || conversation === void 0 ? void 0 : conversation.convo) === null || _a === void 0 ? void 0 : _a.updated_at) !== null && _b !== void 0 ? _b : ''), new Date(appointmentTime !== null && appointmentTime !== void 0 ? appointmentTime : ''))) {
62
- await onComplete({
63
- data_points: {
64
- messageSent: 'true',
65
- },
66
- });
67
- return;
68
- }
69
- }
70
- await onComplete({
71
- data_points: {
72
- messageSent: 'false',
73
- },
74
- });
75
- }
76
- else {
77
- await onError({
78
- events: [
79
- {
80
- date: new Date().toISOString(),
81
- text: {
82
- en: 'conversationMemberships returned null or undefined',
83
- },
84
- error: {
85
- category: 'SERVER_ERROR',
86
- message: 'conversationMemberships returned null or undefined',
87
- },
88
- },
89
- ],
90
- });
91
- }
92
- }
93
- else {
94
- await onError({
95
- events: [
96
- {
97
- date: new Date().toISOString(),
98
- text: { en: 'API client requires an API url and API key' },
99
- error: {
100
- category: 'MISSING_SETTINGS',
101
- message: 'Missing api url or api key',
102
- },
103
- },
104
- ],
105
- });
106
- }
107
- }
108
- catch (err) {
109
- const error = err;
110
- await onError({
111
- events: [
112
- {
113
- date: new Date().toISOString(),
114
- text: { en: 'There was in error checking for a recent Chat' },
115
- error: {
116
- category: 'SERVER_ERROR',
117
- message: error.message,
118
- },
119
- },
120
- ],
121
- });
122
- }
123
- },
124
- };
125
- function areDatesMoreThanADayApart(date1, date2) {
126
- const oneDay = 1000 * 60 * 60 * 24;
127
- return date1.getTime() > date2.getTime() + oneDay;
128
- }
129
- //# sourceMappingURL=checkForChat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkForChat.js","sourceRoot":"","sources":["../../../../../extensions/wellinks-public/actions/checkForChat/checkForChat.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AACtC,mEAAwD;AACxD,uDAA8C;AAC9C,mFAA0E;AAE1E,mCAA8B;AAE9B,MAAM,MAAM,GAAG;IACb,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,2CAA2C;QACxD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEjC,MAAM,UAAU,GAAG;IACjB,WAAW,EAAE;QACX,GAAG,EAAE,aAAa;QAClB,SAAS,EAAE,SAAS;KACr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EAAE,KAAW;IACzD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;IAClC,OAAO,KAAK,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAA;AACnD,CAAC"}
@@ -1,154 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tests_1 = require("../../../../src/tests");
4
- const wellinksSdk_1 = require("../../gql/wellinksSdk");
5
- const wellinksSdk_2 = require("../../gql/__mocks__/wellinksSdk");
6
- const checkForChat_1 = require("./checkForChat");
7
- const settings_1 = require("../../__mocks__/config/settings");
8
- jest.mock('../../gql/wellinksSdk');
9
- jest.mock('../../api/clients/wellinksGraphqlClient');
10
- describe('the checkForChat action', () => {
11
- const onComplete = jest.fn();
12
- const onError = jest.fn();
13
- beforeAll(() => {
14
- ;
15
- wellinksSdk_1.getSdk.mockImplementation(wellinksSdk_2.mockGetSdk);
16
- });
17
- beforeEach(() => {
18
- jest.clearAllMocks();
19
- });
20
- // DEFINE TEST CASE
21
- test('when given a null data return from the Healthie API', async () => {
22
- ;
23
- wellinksSdk_1.getSdk.mockReturnValueOnce({
24
- ...wellinksSdk_2.mockGetSdkReturn,
25
- getConversationMemberships: wellinksSdk_2.mockGetSdkReturn.getConversationMemberships.mockReturnValueOnce({
26
- data: {
27
- conversationMemberships: null,
28
- },
29
- }),
30
- });
31
- await checkForChat_1.checkForChat.onActivityCreated((0, tests_1.generateTestPayload)({
32
- fields: {
33
- patientId: 'patientIdTest',
34
- coachId: 'coachId',
35
- appointmentTime: '2023-08-08',
36
- },
37
- settings: settings_1.mockSettings,
38
- }), onComplete, onError);
39
- // DO TESTS
40
- expect(wellinksSdk_2.mockGetSdkReturn.getConversationMemberships).toHaveBeenCalled();
41
- expect(onError).toBeCalledWith({
42
- events: expect.arrayContaining([
43
- expect.objectContaining({
44
- error: {
45
- category: 'SERVER_ERROR',
46
- message: 'conversationMemberships returned null or undefined',
47
- },
48
- }),
49
- ]),
50
- });
51
- });
52
- // DEFINE TEST CASE
53
- test('when given a list of conversationMemberships where there is a message sent 24 hours after the appointmentDate returns true', async () => {
54
- ;
55
- wellinksSdk_1.getSdk.mockReturnValueOnce({
56
- ...wellinksSdk_2.mockGetSdkReturn,
57
- getConversationMemberships: wellinksSdk_2.mockGetSdkReturn.getConversationMemberships.mockReturnValueOnce({
58
- data: {
59
- conversationMemberships: [
60
- {
61
- convo: {
62
- last_message_content: 'Hi this is a message 24 hours after the appointment date',
63
- updated_at: '2023-05-30 15:00:00 -0500',
64
- dietitian_id: 'coachId',
65
- patient_id: '37616',
66
- },
67
- },
68
- {
69
- convo: {
70
- last_message_content: '\nHi Ash, after talking with you today I thought I’d share this resource with you, http://www.findhelp.org/.\nThis is a helpful way to find housing support in your area. By entering your zip code, you can find local resources. \nLet me know what you learn and what options you are considering. I’m excited to hear more. Talk to you soon.\n',
71
- updated_at: '2023-05-31 15:41:38 -0500',
72
- dietitian_id: null,
73
- patient_id: null,
74
- },
75
- },
76
- {
77
- convo: {
78
- last_message_content: '',
79
- updated_at: '2023-02-03 09:41:45 -0600',
80
- dietitian_id: null,
81
- patient_id: null,
82
- },
83
- },
84
- ],
85
- },
86
- }),
87
- });
88
- await checkForChat_1.checkForChat.onActivityCreated((0, tests_1.generateTestPayload)({
89
- fields: {
90
- patientId: 'patientIdTest',
91
- coachId: 'coachId',
92
- appointmentTime: '2023-05-28',
93
- },
94
- settings: settings_1.mockSettings,
95
- }), onComplete, onError);
96
- expect(wellinksSdk_2.mockGetSdkReturn.getConversationMemberships).toHaveBeenCalled();
97
- expect(onComplete).toHaveBeenCalledWith({
98
- data_points: {
99
- messageSent: 'true',
100
- },
101
- });
102
- });
103
- test('when given a list of conversationMemberships where there is not a message sent at least 24 hours after the appointmentDate returns false', async () => {
104
- ;
105
- wellinksSdk_1.getSdk.mockReturnValueOnce({
106
- ...wellinksSdk_2.mockGetSdkReturn,
107
- getConversationMemberships: wellinksSdk_2.mockGetSdkReturn.getConversationMemberships.mockReturnValueOnce({
108
- data: {
109
- conversationMemberships: [
110
- {
111
- convo: {
112
- last_message_content: 'There is no message within 24 hours of the appointment date',
113
- updated_at: '2023-01-30 15:00:00 -0500',
114
- dietitian_id: 'coachId',
115
- patient_id: '37616',
116
- },
117
- },
118
- {
119
- convo: {
120
- last_message_content: '\nHi Ash, after talking with you today I thought I’d share this resource with you, http://www.findhelp.org/.\nThis is a helpful way to find housing support in your area. By entering your zip code, you can find local resources. \nLet me know what you learn and what options you are considering. I’m excited to hear more. Talk to you soon.\n',
121
- updated_at: '2023-05-01 00:00:01 -0500',
122
- dietitian_id: null,
123
- patient_id: null,
124
- },
125
- },
126
- {
127
- convo: {
128
- last_message_content: '',
129
- updated_at: '2023-02-03 09:41:45 -0600',
130
- dietitian_id: null,
131
- patient_id: null,
132
- },
133
- },
134
- ],
135
- },
136
- }),
137
- });
138
- await checkForChat_1.checkForChat.onActivityCreated((0, tests_1.generateTestPayload)({
139
- fields: {
140
- patientId: 'patientIdTest',
141
- coachId: 'coachId',
142
- appointmentTime: '2023-05-01',
143
- },
144
- settings: settings_1.mockSettings,
145
- }), onComplete, onError);
146
- expect(wellinksSdk_2.mockGetSdkReturn.getConversationMemberships).toHaveBeenCalled();
147
- expect(onComplete).toHaveBeenCalledWith({
148
- data_points: {
149
- messageSent: 'false',
150
- },
151
- });
152
- });
153
- });
154
- //# sourceMappingURL=checkForChat.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkForChat.test.js","sourceRoot":"","sources":["../../../../../extensions/wellinks-public/actions/checkForChat/checkForChat.test.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAC3D,uDAA8C;AAC9C,iEAA8E;AAC9E,iDAA6C;AAC7C,8DAA8D;AAE9D,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;AAClC,IAAI,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAA;AACpD,QAAQ,CAAC,yBAAyB,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G,8BAAgB;YACnB,0BAA0B,EACxB,8BAAgB,CAAC,0BAA0B,CAAC,mBAAmB,CAAC;gBAC9D,IAAI,EAAE;oBACJ,uBAAuB,EAAE;wBACvB;4BACE,KAAK,EAAE;gCACL,oBAAoB,EAClB,6DAA6D;gCAC/D,UAAU,EAAE,2BAA2B;gCACvC,YAAY,EAAE,SAAS;gCACvB,UAAU,EAAE,OAAO;6BACpB;yBACF;wBACD;4BACE,KAAK,EAAE;gCACL,oBAAoB,EAClB,qVAAqV;gCACvV,UAAU,EAAE,2BAA2B;gCACvC,YAAY,EAAE,IAAI;gCAClB,UAAU,EAAE,IAAI;6BACjB;yBACF;wBACD;4BACE,KAAK,EAAE;gCACL,oBAAoB,EAAE,EAAE;gCACxB,UAAU,EAAE,2BAA2B;gCACvC,YAAY,EAAE,IAAI;gCAClB,UAAU,EAAE,IAAI;6BACjB;yBACF;qBACF;iBACF;aACF,CAAC;SACL,CAAC,CAAA;QAEF,MAAM,2BAAY,CAAC,iBAAiB,CAClC,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,SAAS,EAAE,eAAe;gBAC1B,OAAO,EAAE,SAAS;gBAClB,eAAe,EAAE,YAAY;aAC9B;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,EACF,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,8BAAgB,CAAC,0BAA0B,CAAC,CAAC,gBAAgB,EAAE,CAAA;QACtE,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,WAAW,EAAE,OAAO;aACrB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,26 +0,0 @@
1
- import { FieldType, type Action } from '@awell-health/extensions-core';
2
- import { type settings } from '../../config/settings';
3
- declare const fields: {
4
- patientId: {
5
- id: string;
6
- label: string;
7
- description: string;
8
- type: FieldType.STRING;
9
- required: true;
10
- };
11
- appointmentTime: {
12
- id: string;
13
- label: string;
14
- description: string;
15
- type: FieldType.DATE;
16
- required: true;
17
- };
18
- };
19
- declare const dataPoints: {
20
- activeOverride: {
21
- key: string;
22
- valueType: "boolean";
23
- };
24
- };
25
- export declare const checkForCheckInOverride: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
26
- export {};
@@ -1,139 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkForCheckInOverride = void 0;
4
- const extensions_core_1 = require("@awell-health/extensions-core");
5
- const extensions_core_2 = require("@awell-health/extensions-core");
6
- const wellinksSdk_1 = require("../../gql/wellinksSdk");
7
- const wellinksGraphqlClient_1 = require("../../api/clients/wellinksGraphqlClient");
8
- const lodash_1 = require("lodash");
9
- const fields = {
10
- patientId: {
11
- id: 'patientId',
12
- label: 'Patient ID',
13
- description: 'The ID of the patient to check an override for.',
14
- type: extensions_core_1.FieldType.STRING,
15
- required: true,
16
- },
17
- appointmentTime: {
18
- id: 'appointmentTime',
19
- label: 'Appointment Time',
20
- description: 'The time of the appointment to check against.',
21
- type: extensions_core_1.FieldType.DATE,
22
- required: true,
23
- },
24
- };
25
- const dataPoints = {
26
- activeOverride: {
27
- key: 'activeOverride',
28
- valueType: 'boolean',
29
- },
30
- };
31
- exports.checkForCheckInOverride = {
32
- key: 'checkForCheckInOverride',
33
- category: extensions_core_2.Category.SCHEDULING,
34
- title: 'Check if a patient has an active Override for Check In Automation',
35
- description: 'Check if a patient has an Override form in Healthie for Check In Automation created after the appointment time.',
36
- fields,
37
- dataPoints,
38
- previewable: true,
39
- onActivityCreated: async (payload, onComplete, onError) => {
40
- var _a, _b;
41
- const { fields, settings } = payload;
42
- const { patientId, appointmentTime } = fields;
43
- try {
44
- const client = (0, wellinksGraphqlClient_1.initialiseClient)(settings);
45
- if (!(0, lodash_1.isNil)(client)) {
46
- const sdk = (0, wellinksSdk_1.getSdk)(client);
47
- const { data } = await sdk.getChartingItems({
48
- user_id: patientId,
49
- custom_module_form_id: settings.memberEventFormId,
50
- });
51
- if (!(0, lodash_1.isNil)(data.chartingItems)) {
52
- const active = parseListOfForms(data.chartingItems, (_a = settings.selectEventTypeQuestion) !== null && _a !== void 0 ? _a : '', (_b = settings.startSendingRemindersQuestions) !== null && _b !== void 0 ? _b : '', appointmentTime !== null && appointmentTime !== void 0 ? appointmentTime : '');
53
- if (active) {
54
- await onComplete({
55
- data_points: {
56
- activeOverride: 'true',
57
- },
58
- });
59
- }
60
- else {
61
- await onComplete({
62
- data_points: {
63
- activeOverride: 'false',
64
- },
65
- });
66
- }
67
- }
68
- else {
69
- await onError({
70
- events: [
71
- {
72
- date: new Date().toISOString(),
73
- text: {
74
- en: 'There was in error processing the Charting Items',
75
- },
76
- error: {
77
- category: 'WRONG_DATA',
78
- message: 'Charting Items returned Null',
79
- },
80
- },
81
- ],
82
- });
83
- }
84
- }
85
- else {
86
- await onError({
87
- events: [
88
- {
89
- date: new Date().toISOString(),
90
- text: { en: 'API client requires an API url and API key' },
91
- error: {
92
- category: 'MISSING_SETTINGS',
93
- message: 'Missing api url or api key',
94
- },
95
- },
96
- ],
97
- });
98
- }
99
- }
100
- catch (err) {
101
- const error = err;
102
- await onError({
103
- events: [
104
- {
105
- date: new Date().toISOString(),
106
- text: { en: 'There was in error processing the Charting Items' },
107
- error: {
108
- category: 'SERVER_ERROR',
109
- message: error.message,
110
- },
111
- },
112
- ],
113
- });
114
- }
115
- },
116
- };
117
- function parseListOfForms(data, eventTypeQuestionId, startDateQuestionId, appointmentTime) {
118
- if ((0, lodash_1.isNil)(data) ||
119
- (0, lodash_1.isNil)(appointmentTime) ||
120
- (0, lodash_1.isNil)(eventTypeQuestionId) ||
121
- (0, lodash_1.isNil)(startDateQuestionId)) {
122
- return false;
123
- }
124
- else {
125
- const overrideForms = data.filter((value) => {
126
- var _a, _b;
127
- return ((_b = (_a = value === null || value === void 0 ? void 0 : value.form_answer_group) === null || _a === void 0 ? void 0 : _a.form_answers.find((value) => value.custom_module_id === eventTypeQuestionId)) === null || _b === void 0 ? void 0 : _b.answer) === 'Override check-in automation';
128
- });
129
- for (const form of overrideForms) {
130
- if (!(0, lodash_1.isNil)(form) && !(0, lodash_1.isNil)(form.created_at)) {
131
- if (new Date(form.created_at) > new Date(appointmentTime)) {
132
- return true;
133
- }
134
- }
135
- }
136
- return false;
137
- }
138
- }
139
- //# sourceMappingURL=checkForCheckInOverride.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkForCheckInOverride.js","sourceRoot":"","sources":["../../../../../extensions/wellinks-public/actions/checkForCheckInOverride/checkForCheckInOverride.ts"],"names":[],"mappings":";;;AAAA,mEAKsC;AACtC,mEAAwD;AACxD,uDAA0E;AAC1E,mFAA0E;AAE1E,mCAA8B;AAE9B,MAAM,MAAM,GAAG;IACb,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,iDAAiD;QAC9D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA;AAEjC,MAAM,UAAU,GAAG;IACjB,cAAc,EAAE;QACd,GAAG,EAAE,gBAAgB;QACrB,SAAS,EAAE,SAAS;KACrB;CAC4C,CAAA;AAElC,QAAA,uBAAuB,GAIhC;IACF,GAAG,EAAE,yBAAyB;IAC9B,QAAQ,EAAE,0BAAQ,CAAC,UAAU;IAC7B,KAAK,EAAE,mEAAmE;IAC1E,WAAW,EACT,iHAAiH;IACnH,MAAM;IACN,UAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;;QACvE,MAAM,EAAE,MAAM,EA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CAC/C,CAAA;QAED,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE;YAChC,IAAI,CAAC,IAAA,cAAK,EAAC,IAAI,CAAC,IAAI,CAAC,IAAA,cAAK,EAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAC3C,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,IAAI,CAAC,eAAe,CAAC,EAAE;oBACzD,OAAO,IAAI,CAAA;iBACZ;aACF;SACF;QACD,OAAO,KAAK,CAAA;KACb;AACH,CAAC"}
@@ -1,185 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tests_1 = require("../../../../src/tests");
4
- const wellinksSdk_1 = require("../../gql/wellinksSdk");
5
- const wellinksSdk_2 = require("../../gql/__mocks__/wellinksSdk");
6
- const checkForCheckInOverride_1 = require("./checkForCheckInOverride");
7
- const settings_1 = require("../../__mocks__/config/settings");
8
- jest.mock('../../gql/wellinksSdk');
9
- jest.mock('../../api/clients/wellinksGraphqlClient');
10
- describe('the checkForOverride action', () => {
11
- const onComplete = jest.fn();
12
- const onError = jest.fn();
13
- beforeAll(() => {
14
- ;
15
- wellinksSdk_1.getSdk.mockImplementation(wellinksSdk_2.mockGetSdk);
16
- });
17
- beforeEach(() => {
18
- jest.clearAllMocks();
19
- });
20
- test('when given an empty list, should raise an error', async () => {
21
- ;
22
- wellinksSdk_1.getSdk.mockReturnValueOnce({
23
- ...wellinksSdk_2.mockGetSdkReturn,
24
- getChartingItems: wellinksSdk_2.mockGetSdkReturn.getChartingItems.mockReturnValueOnce({
25
- data: {
26
- chartingItems: null,
27
- },
28
- }),
29
- });
30
- await checkForCheckInOverride_1.checkForCheckInOverride.onActivityCreated((0, tests_1.generateTestPayload)({
31
- fields: {
32
- patientId: 'patientIdTest',
33
- appointmentTime: '2023-08-08',
34
- },
35
- settings: settings_1.mockSettings,
36
- }), onComplete, onError);
37
- wellinksSdk_2.mockGetSdkReturn.getChartingItems.mockReturnValue({
38
- data: {
39
- chartingItems: null,
40
- },
41
- });
42
- expect(wellinksSdk_2.mockGetSdkReturn.getChartingItems).toHaveBeenCalled();
43
- expect(onError).toHaveBeenCalledWith({
44
- events: expect.arrayContaining([
45
- expect.objectContaining({
46
- error: {
47
- category: 'WRONG_DATA',
48
- message: 'Charting Items returned Null',
49
- },
50
- }),
51
- ]),
52
- });
53
- });
54
- test('when given a list of charting items where there is no Override form created after the appointment time', async () => {
55
- ;
56
- wellinksSdk_1.getSdk.mockReturnValueOnce({
57
- ...wellinksSdk_2.mockGetSdkReturn,
58
- getChartingItems: wellinksSdk_2.mockGetSdkReturn.getChartingItems.mockReturnValueOnce({
59
- data: {
60
- chartingItems: [
61
- {
62
- id: '1111',
63
- created_at: '2023-05-16 10:41:00 -0400',
64
- form_answer_group: {
65
- id: '2222',
66
- created_at: '2023-05-16 10:41:00 -0400',
67
- form_answers: [
68
- {
69
- custom_module_id: '2602707',
70
- label: 'Please select the event type',
71
- answer: 'Override check-in automation',
72
- },
73
- {
74
- custom_module_id: '3860906',
75
- label: 'Start Sending Schedule Reminders On',
76
- answer: '2030-09-05',
77
- },
78
- ],
79
- },
80
- },
81
- {
82
- id: '1111',
83
- created_at: '2023-05-16 11:41:00 -0400',
84
- form_answer_group: {
85
- id: '2222',
86
- created_at: '2023-05-16 11:41:00 -0400',
87
- form_answers: [
88
- {
89
- custom_module_id: '2602707',
90
- label: 'Please select the event type',
91
- answer: 'Override Scheduling Reminder Automations',
92
- },
93
- {
94
- custom_module_id: '3860906',
95
- label: 'Start Sending Schedule Reminders On',
96
- answer: '2000-09-05',
97
- },
98
- ],
99
- },
100
- },
101
- ],
102
- },
103
- }),
104
- });
105
- await checkForCheckInOverride_1.checkForCheckInOverride.onActivityCreated((0, tests_1.generateTestPayload)({
106
- fields: {
107
- patientId: 'patientIdTest',
108
- appointmentTime: '2023-08-08',
109
- },
110
- settings: settings_1.mockSettings,
111
- }), onComplete, onError);
112
- expect(wellinksSdk_2.mockGetSdkReturn.getChartingItems).toHaveBeenCalled();
113
- expect(onComplete).toHaveBeenCalledWith({
114
- data_points: {
115
- activeOverride: 'false',
116
- },
117
- });
118
- });
119
- test('when given a list of charting items with an Override form created after the appointment time', async () => {
120
- ;
121
- wellinksSdk_1.getSdk.mockReturnValueOnce({
122
- ...wellinksSdk_2.mockGetSdkReturn,
123
- getChartingItems: wellinksSdk_2.mockGetSdkReturn.getChartingItems.mockReturnValueOnce({
124
- data: {
125
- chartingItems: [
126
- {
127
- id: '1111',
128
- created_at: '2023-05-16 10:41:00 -0400',
129
- form_answer_group: {
130
- id: '2222',
131
- created_at: '2023-05-16 10:41:00 -0400',
132
- form_answers: [
133
- {
134
- custom_module_id: '2602707',
135
- label: 'Please select the event type',
136
- answer: 'Override check-in automation',
137
- },
138
- {
139
- custom_module_id: '3860906',
140
- label: 'Start Sending Schedule Reminders On',
141
- answer: '2030-09-05',
142
- },
143
- ],
144
- },
145
- },
146
- {
147
- id: '1111',
148
- created_at: '2023-05-16 01:41:00 -0400',
149
- form_answer_group: {
150
- id: '2222',
151
- created_at: '2023-05-16 01:41:00 -0400',
152
- form_answers: [
153
- {
154
- custom_module_id: '2602707',
155
- label: 'Please select the event type',
156
- answer: 'Override Scheduling Reminder Automations',
157
- },
158
- {
159
- custom_module_id: '3860906',
160
- label: 'Start Sending Schedule Reminders On',
161
- answer: '2000-09-05',
162
- },
163
- ],
164
- },
165
- },
166
- ],
167
- },
168
- }),
169
- });
170
- await checkForCheckInOverride_1.checkForCheckInOverride.onActivityCreated((0, tests_1.generateTestPayload)({
171
- fields: {
172
- patientId: 'patientIdTest',
173
- appointmentTime: '2020-08-08',
174
- },
175
- settings: settings_1.mockSettings,
176
- }), onComplete, onError);
177
- expect(wellinksSdk_2.mockGetSdkReturn.getChartingItems).toHaveBeenCalled();
178
- expect(onComplete).toHaveBeenCalledWith({
179
- data_points: {
180
- activeOverride: 'true',
181
- },
182
- });
183
- });
184
- });
185
- //# sourceMappingURL=checkForCheckInOverride.test.js.map