@awell-health/awell-extensions 1.0.109 → 1.0.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (355) hide show
  1. package/dist/extensions/calDotCom/actions/createBooking/createBooking.js +1 -1
  2. package/dist/extensions/calDotCom/actions/createBooking/createBooking.js.map +1 -1
  3. package/dist/extensions/healthie/actions/applyTagToPatient/applyTagToPatient.d.ts +4 -0
  4. package/dist/extensions/healthie/actions/{applyTagToPatient.js → applyTagToPatient/applyTagToPatient.js} +6 -22
  5. package/dist/extensions/healthie/actions/applyTagToPatient/applyTagToPatient.js.map +1 -0
  6. package/dist/extensions/healthie/actions/applyTagToPatient/applyTagToPatient.test.d.ts +1 -0
  7. package/dist/extensions/healthie/actions/applyTagToPatient/applyTagToPatient.test.js +33 -0
  8. package/dist/extensions/healthie/actions/applyTagToPatient/applyTagToPatient.test.js.map +1 -0
  9. package/dist/extensions/healthie/actions/{applyTagToPatient.d.ts → applyTagToPatient/config/fields.d.ts} +2 -5
  10. package/dist/extensions/healthie/actions/applyTagToPatient/config/fields.js +21 -0
  11. package/dist/extensions/healthie/actions/applyTagToPatient/config/fields.js.map +1 -0
  12. package/dist/extensions/healthie/actions/applyTagToPatient/config/index.d.ts +1 -0
  13. package/dist/extensions/healthie/actions/applyTagToPatient/config/index.js +6 -0
  14. package/dist/extensions/healthie/actions/applyTagToPatient/config/index.js.map +1 -0
  15. package/dist/extensions/healthie/actions/applyTagToPatient/index.d.ts +1 -0
  16. package/dist/extensions/healthie/actions/applyTagToPatient/index.js +18 -0
  17. package/dist/extensions/healthie/actions/applyTagToPatient/index.js.map +1 -0
  18. package/dist/extensions/healthie/actions/archivePatient/archivePatient.d.ts +4 -0
  19. package/dist/extensions/healthie/actions/{archivePatient.js → archivePatient/archivePatient.js} +6 -15
  20. package/dist/extensions/healthie/actions/archivePatient/archivePatient.js.map +1 -0
  21. package/dist/extensions/healthie/actions/archivePatient/archivePatient.test.d.ts +1 -0
  22. package/dist/extensions/healthie/actions/archivePatient/archivePatient.test.js +42 -0
  23. package/dist/extensions/healthie/actions/archivePatient/archivePatient.test.js.map +1 -0
  24. package/dist/extensions/healthie/actions/archivePatient/config/fields.d.ts +10 -0
  25. package/dist/extensions/healthie/actions/archivePatient/config/fields.js +14 -0
  26. package/dist/extensions/healthie/actions/archivePatient/config/fields.js.map +1 -0
  27. package/dist/extensions/healthie/actions/archivePatient/config/index.d.ts +1 -0
  28. package/dist/extensions/healthie/actions/archivePatient/config/index.js +6 -0
  29. package/dist/extensions/healthie/actions/archivePatient/config/index.js.map +1 -0
  30. package/dist/extensions/healthie/actions/archivePatient/index.d.ts +1 -0
  31. package/dist/extensions/healthie/actions/archivePatient/index.js +18 -0
  32. package/dist/extensions/healthie/actions/archivePatient/index.js.map +1 -0
  33. package/dist/extensions/healthie/actions/assignPatientToGroup/assignPatientToGroup.d.ts +4 -0
  34. package/dist/extensions/healthie/actions/{assignPatientToGroup.js → assignPatientToGroup/assignPatientToGroup.js} +6 -22
  35. package/dist/extensions/healthie/actions/assignPatientToGroup/assignPatientToGroup.js.map +1 -0
  36. package/dist/extensions/healthie/actions/assignPatientToGroup/assignPatientToGroup.test.d.ts +1 -0
  37. package/dist/extensions/healthie/actions/assignPatientToGroup/assignPatientToGroup.test.js +42 -0
  38. package/dist/extensions/healthie/actions/assignPatientToGroup/assignPatientToGroup.test.js.map +1 -0
  39. package/dist/extensions/healthie/actions/{assignPatientToGroup.d.ts → assignPatientToGroup/config/fields.d.ts} +2 -5
  40. package/dist/extensions/healthie/actions/assignPatientToGroup/config/fields.js +21 -0
  41. package/dist/extensions/healthie/actions/assignPatientToGroup/config/fields.js.map +1 -0
  42. package/dist/extensions/healthie/actions/assignPatientToGroup/config/index.d.ts +1 -0
  43. package/dist/extensions/healthie/actions/assignPatientToGroup/config/index.js +6 -0
  44. package/dist/extensions/healthie/actions/assignPatientToGroup/config/index.js.map +1 -0
  45. package/dist/extensions/healthie/actions/assignPatientToGroup/index.d.ts +1 -0
  46. package/dist/extensions/healthie/actions/assignPatientToGroup/index.js +18 -0
  47. package/dist/extensions/healthie/actions/assignPatientToGroup/index.js.map +1 -0
  48. package/dist/extensions/healthie/actions/cancelAppointment/cancelAppointment.d.ts +4 -0
  49. package/dist/extensions/healthie/actions/{cancelAppointment.js → cancelAppointment/cancelAppointment.js} +6 -15
  50. package/dist/extensions/healthie/actions/cancelAppointment/cancelAppointment.js.map +1 -0
  51. package/dist/extensions/healthie/actions/cancelAppointment/cancelAppointment.test.d.ts +1 -0
  52. package/dist/extensions/healthie/actions/cancelAppointment/cancelAppointment.test.js +37 -0
  53. package/dist/extensions/healthie/actions/cancelAppointment/cancelAppointment.test.js.map +1 -0
  54. package/dist/extensions/healthie/actions/cancelAppointment/config/fields.d.ts +10 -0
  55. package/dist/extensions/healthie/actions/cancelAppointment/config/fields.js +14 -0
  56. package/dist/extensions/healthie/actions/cancelAppointment/config/fields.js.map +1 -0
  57. package/dist/extensions/healthie/actions/cancelAppointment/config/index.d.ts +1 -0
  58. package/dist/extensions/healthie/actions/cancelAppointment/config/index.js +6 -0
  59. package/dist/extensions/healthie/actions/cancelAppointment/config/index.js.map +1 -0
  60. package/dist/extensions/healthie/actions/cancelAppointment/index.d.ts +1 -0
  61. package/dist/extensions/healthie/actions/cancelAppointment/index.js +6 -0
  62. package/dist/extensions/healthie/actions/cancelAppointment/index.js.map +1 -0
  63. package/dist/extensions/healthie/actions/closeChatConversation/closeChatConversation.d.ts +4 -0
  64. package/dist/extensions/healthie/actions/{closeChatConversation.js → closeChatConversation/closeChatConversation.js} +6 -22
  65. package/dist/extensions/healthie/actions/closeChatConversation/closeChatConversation.js.map +1 -0
  66. package/dist/extensions/healthie/actions/closeChatConversation/closeChatConversation.test.d.ts +1 -0
  67. package/dist/extensions/healthie/actions/closeChatConversation/closeChatConversation.test.js +38 -0
  68. package/dist/extensions/healthie/actions/closeChatConversation/closeChatConversation.test.js.map +1 -0
  69. package/dist/extensions/healthie/actions/{closeChatConversation.d.ts → closeChatConversation/config/fields.d.ts} +2 -5
  70. package/dist/extensions/healthie/actions/closeChatConversation/config/fields.js +21 -0
  71. package/dist/extensions/healthie/actions/closeChatConversation/config/fields.js.map +1 -0
  72. package/dist/extensions/healthie/actions/closeChatConversation/config/index.d.ts +1 -0
  73. package/dist/extensions/healthie/actions/closeChatConversation/config/index.js +6 -0
  74. package/dist/extensions/healthie/actions/closeChatConversation/config/index.js.map +1 -0
  75. package/dist/extensions/healthie/actions/closeChatConversation/index.d.ts +1 -0
  76. package/dist/extensions/healthie/actions/closeChatConversation/index.js +6 -0
  77. package/dist/extensions/healthie/actions/closeChatConversation/index.js.map +1 -0
  78. package/dist/extensions/healthie/actions/completeTask/completeTask.d.ts +4 -0
  79. package/dist/extensions/healthie/actions/{completeTask.js → completeTask/completeTask.js} +6 -15
  80. package/dist/extensions/healthie/actions/completeTask/completeTask.js.map +1 -0
  81. package/dist/extensions/healthie/actions/completeTask/completeTask.test.d.ts +1 -0
  82. package/dist/extensions/healthie/actions/completeTask/completeTask.test.js +37 -0
  83. package/dist/extensions/healthie/actions/completeTask/completeTask.test.js.map +1 -0
  84. package/dist/extensions/healthie/actions/completeTask/config/fields.d.ts +10 -0
  85. package/dist/extensions/healthie/actions/completeTask/config/fields.js +14 -0
  86. package/dist/extensions/healthie/actions/completeTask/config/fields.js.map +1 -0
  87. package/dist/extensions/healthie/actions/completeTask/config/index.d.ts +1 -0
  88. package/dist/extensions/healthie/actions/completeTask/config/index.js +6 -0
  89. package/dist/extensions/healthie/actions/completeTask/config/index.js.map +1 -0
  90. package/dist/extensions/healthie/actions/completeTask/index.d.ts +1 -0
  91. package/dist/extensions/healthie/actions/completeTask/index.js +6 -0
  92. package/dist/extensions/healthie/actions/completeTask/index.js.map +1 -0
  93. package/dist/extensions/healthie/actions/createAppointment/config/dataPoints.d.ts +6 -0
  94. package/dist/extensions/healthie/actions/createAppointment/config/dataPoints.js +10 -0
  95. package/dist/extensions/healthie/actions/createAppointment/config/dataPoints.js.map +1 -0
  96. package/dist/extensions/healthie/actions/{createAppointment.d.ts → createAppointment/config/fields.d.ts} +2 -11
  97. package/dist/extensions/healthie/actions/createAppointment/config/fields.js +41 -0
  98. package/dist/extensions/healthie/actions/createAppointment/config/fields.js.map +1 -0
  99. package/dist/extensions/healthie/actions/createAppointment/config/index.d.ts +2 -0
  100. package/dist/extensions/healthie/actions/createAppointment/config/index.js +8 -0
  101. package/dist/extensions/healthie/actions/createAppointment/config/index.js.map +1 -0
  102. package/dist/extensions/healthie/actions/createAppointment/createAppointment.d.ts +4 -0
  103. package/dist/extensions/healthie/actions/{createAppointment.js → createAppointment/createAppointment.js} +7 -49
  104. package/dist/extensions/healthie/actions/createAppointment/createAppointment.js.map +1 -0
  105. package/dist/extensions/healthie/actions/createAppointment/index.d.ts +1 -0
  106. package/dist/extensions/healthie/actions/createAppointment/index.js +6 -0
  107. package/dist/extensions/healthie/actions/createAppointment/index.js.map +1 -0
  108. package/dist/extensions/healthie/actions/{createChartingNote.d.ts → createChartingNote/config/fields.d.ts} +2 -5
  109. package/dist/extensions/healthie/actions/createChartingNote/config/fields.js +35 -0
  110. package/dist/extensions/healthie/actions/createChartingNote/config/fields.js.map +1 -0
  111. package/dist/extensions/healthie/actions/createChartingNote/config/index.d.ts +1 -0
  112. package/dist/extensions/healthie/actions/createChartingNote/config/index.js +6 -0
  113. package/dist/extensions/healthie/actions/createChartingNote/config/index.js.map +1 -0
  114. package/dist/extensions/healthie/actions/createChartingNote/createChartingNote.d.ts +4 -0
  115. package/dist/extensions/healthie/actions/{createChartingNote.js → createChartingNote/createChartingNote.js} +6 -36
  116. package/dist/extensions/healthie/actions/createChartingNote/createChartingNote.js.map +1 -0
  117. package/dist/extensions/healthie/actions/createChartingNote/createChartingNote.test.d.ts +1 -0
  118. package/dist/extensions/healthie/actions/createChartingNote/createChartingNote.test.js +36 -0
  119. package/dist/extensions/healthie/actions/createChartingNote/createChartingNote.test.js.map +1 -0
  120. package/dist/extensions/healthie/actions/createChartingNote/index.d.ts +1 -0
  121. package/dist/extensions/healthie/actions/createChartingNote/index.js +6 -0
  122. package/dist/extensions/healthie/actions/createChartingNote/index.js.map +1 -0
  123. package/dist/extensions/healthie/actions/createJournalEntry/config/dataPoints.d.ts +6 -0
  124. package/dist/extensions/healthie/actions/createJournalEntry/config/dataPoints.js +10 -0
  125. package/dist/extensions/healthie/actions/createJournalEntry/config/dataPoints.js.map +1 -0
  126. package/dist/extensions/healthie/actions/{createJournalEntry.d.ts → createJournalEntry/config/fields.d.ts} +2 -11
  127. package/dist/extensions/healthie/actions/createJournalEntry/config/fields.js +27 -0
  128. package/dist/extensions/healthie/actions/createJournalEntry/config/fields.js.map +1 -0
  129. package/dist/extensions/healthie/actions/createJournalEntry/config/index.d.ts +2 -0
  130. package/dist/extensions/healthie/actions/createJournalEntry/config/index.js +8 -0
  131. package/dist/extensions/healthie/actions/createJournalEntry/config/index.js.map +1 -0
  132. package/dist/extensions/healthie/actions/createJournalEntry/createJournalEntry.d.ts +4 -0
  133. package/dist/extensions/healthie/actions/{createJournalEntry.js → createJournalEntry/createJournalEntry.js} +7 -35
  134. package/dist/extensions/healthie/actions/createJournalEntry/createJournalEntry.js.map +1 -0
  135. package/dist/extensions/healthie/actions/createJournalEntry/createJournalEntry.test.d.ts +1 -0
  136. package/dist/extensions/healthie/actions/createJournalEntry/createJournalEntry.test.js +34 -0
  137. package/dist/extensions/healthie/actions/createJournalEntry/createJournalEntry.test.js.map +1 -0
  138. package/dist/extensions/healthie/actions/createJournalEntry/index.d.ts +1 -0
  139. package/dist/extensions/healthie/actions/createJournalEntry/index.js +6 -0
  140. package/dist/extensions/healthie/actions/createJournalEntry/index.js.map +1 -0
  141. package/dist/extensions/healthie/actions/createLocation/config/dataPoints.d.ts +6 -0
  142. package/dist/extensions/healthie/actions/createLocation/config/dataPoints.js +10 -0
  143. package/dist/extensions/healthie/actions/createLocation/config/dataPoints.js.map +1 -0
  144. package/dist/extensions/healthie/actions/{createLocation.d.ts → createLocation/config/fields.d.ts} +2 -11
  145. package/dist/extensions/healthie/actions/createLocation/config/fields.js +57 -0
  146. package/dist/extensions/healthie/actions/createLocation/config/fields.js.map +1 -0
  147. package/dist/extensions/healthie/actions/createLocation/config/index.d.ts +2 -0
  148. package/dist/extensions/healthie/actions/createLocation/config/index.js +8 -0
  149. package/dist/extensions/healthie/actions/createLocation/config/index.js.map +1 -0
  150. package/dist/extensions/healthie/actions/createLocation/createLocation.d.ts +4 -0
  151. package/dist/extensions/healthie/actions/createLocation/createLocation.js +100 -0
  152. package/dist/extensions/healthie/actions/createLocation/createLocation.js.map +1 -0
  153. package/dist/extensions/healthie/actions/createLocation/createLocation.test.d.ts +1 -0
  154. package/dist/extensions/healthie/actions/createLocation/createLocation.test.js +39 -0
  155. package/dist/extensions/healthie/actions/createLocation/createLocation.test.js.map +1 -0
  156. package/dist/extensions/healthie/actions/createLocation/index.d.ts +1 -0
  157. package/dist/extensions/healthie/actions/createLocation/index.js +6 -0
  158. package/dist/extensions/healthie/actions/createLocation/index.js.map +1 -0
  159. package/dist/extensions/healthie/actions/{createPatient.d.ts → createPatient/config/fields.d.ts} +2 -11
  160. package/dist/extensions/healthie/actions/createPatient/config/fields.js +59 -0
  161. package/dist/extensions/healthie/actions/createPatient/config/fields.js.map +1 -0
  162. package/dist/extensions/healthie/actions/createPatient/config/index.d.ts +1 -0
  163. package/dist/extensions/healthie/actions/createPatient/config/index.js +6 -0
  164. package/dist/extensions/healthie/actions/createPatient/config/index.js.map +1 -0
  165. package/dist/extensions/healthie/actions/createPatient/createPatient.d.ts +11 -0
  166. package/dist/extensions/healthie/actions/{createPatient.js → createPatient/createPatient.js} +6 -60
  167. package/dist/extensions/healthie/actions/createPatient/createPatient.js.map +1 -0
  168. package/dist/extensions/healthie/actions/createPatient/createPatient.test.d.ts +1 -0
  169. package/dist/extensions/healthie/actions/createPatient/createPatient.test.js +43 -0
  170. package/dist/extensions/healthie/actions/createPatient/createPatient.test.js.map +1 -0
  171. package/dist/extensions/healthie/actions/createPatient/index.d.ts +1 -0
  172. package/dist/extensions/healthie/actions/createPatient/index.js +6 -0
  173. package/dist/extensions/healthie/actions/createPatient/index.js.map +1 -0
  174. package/dist/extensions/healthie/actions/createTask/config/dataPoints.d.ts +6 -0
  175. package/dist/extensions/healthie/actions/createTask/config/dataPoints.js +10 -0
  176. package/dist/extensions/healthie/actions/createTask/config/dataPoints.js.map +1 -0
  177. package/dist/extensions/healthie/actions/{createTask.d.ts → createTask/config/fields.d.ts} +2 -11
  178. package/dist/extensions/healthie/actions/createTask/config/fields.js +64 -0
  179. package/dist/extensions/healthie/actions/createTask/config/fields.js.map +1 -0
  180. package/dist/extensions/healthie/actions/createTask/config/index.d.ts +2 -0
  181. package/dist/extensions/healthie/actions/createTask/config/index.js +8 -0
  182. package/dist/extensions/healthie/actions/createTask/config/index.js.map +1 -0
  183. package/dist/extensions/healthie/actions/createTask/createTask.d.ts +4 -0
  184. package/dist/extensions/healthie/actions/createTask/createTask.js +96 -0
  185. package/dist/extensions/healthie/actions/createTask/createTask.js.map +1 -0
  186. package/dist/extensions/healthie/actions/createTask/createTask.test.d.ts +1 -0
  187. package/dist/extensions/healthie/actions/createTask/createTask.test.js +245 -0
  188. package/dist/extensions/healthie/actions/createTask/createTask.test.js.map +1 -0
  189. package/dist/extensions/healthie/actions/createTask/index.d.ts +1 -0
  190. package/dist/extensions/healthie/actions/createTask/index.js +6 -0
  191. package/dist/extensions/healthie/actions/createTask/index.js.map +1 -0
  192. package/dist/extensions/healthie/actions/deleteAppointment/config/fields.d.ts +10 -0
  193. package/dist/extensions/healthie/actions/deleteAppointment/config/fields.js +14 -0
  194. package/dist/extensions/healthie/actions/deleteAppointment/config/fields.js.map +1 -0
  195. package/dist/extensions/healthie/actions/deleteAppointment/config/index.d.ts +1 -0
  196. package/dist/extensions/healthie/actions/deleteAppointment/config/index.js +6 -0
  197. package/dist/extensions/healthie/actions/deleteAppointment/config/index.js.map +1 -0
  198. package/dist/extensions/healthie/actions/deleteAppointment/deleteAppointment.d.ts +4 -0
  199. package/dist/extensions/healthie/actions/{deleteAppointment.js → deleteAppointment/deleteAppointment.js} +6 -15
  200. package/dist/extensions/healthie/actions/deleteAppointment/deleteAppointment.js.map +1 -0
  201. package/dist/extensions/healthie/actions/deleteAppointment/deleteAppointment.test.d.ts +1 -0
  202. package/dist/extensions/healthie/actions/deleteAppointment/deleteAppointment.test.js +34 -0
  203. package/dist/extensions/healthie/actions/deleteAppointment/deleteAppointment.test.js.map +1 -0
  204. package/dist/extensions/healthie/actions/deleteAppointment/index.d.ts +1 -0
  205. package/dist/extensions/healthie/actions/deleteAppointment/index.js +6 -0
  206. package/dist/extensions/healthie/actions/deleteAppointment/index.js.map +1 -0
  207. package/dist/extensions/healthie/actions/deleteTask/config/fields.d.ts +10 -0
  208. package/dist/extensions/healthie/actions/deleteTask/config/fields.js +14 -0
  209. package/dist/extensions/healthie/actions/deleteTask/config/fields.js.map +1 -0
  210. package/dist/extensions/healthie/actions/deleteTask/config/index.d.ts +1 -0
  211. package/dist/extensions/healthie/actions/deleteTask/config/index.js +6 -0
  212. package/dist/extensions/healthie/actions/deleteTask/config/index.js.map +1 -0
  213. package/dist/extensions/healthie/actions/deleteTask/deleteTask.d.ts +4 -0
  214. package/dist/extensions/healthie/actions/{deleteTask.js → deleteTask/deleteTask.js} +6 -15
  215. package/dist/extensions/healthie/actions/deleteTask/deleteTask.js.map +1 -0
  216. package/dist/extensions/healthie/actions/deleteTask/deleteTask.test.d.ts +1 -0
  217. package/dist/extensions/healthie/actions/deleteTask/deleteTask.test.js +34 -0
  218. package/dist/extensions/healthie/actions/deleteTask/deleteTask.test.js.map +1 -0
  219. package/dist/extensions/healthie/actions/deleteTask/index.d.ts +1 -0
  220. package/dist/extensions/healthie/actions/deleteTask/index.js +6 -0
  221. package/dist/extensions/healthie/actions/deleteTask/index.js.map +1 -0
  222. package/dist/extensions/healthie/actions/getAppointment/config/dataPoints.d.ts +22 -0
  223. package/dist/extensions/healthie/actions/getAppointment/config/dataPoints.js +26 -0
  224. package/dist/extensions/healthie/actions/getAppointment/config/dataPoints.js.map +1 -0
  225. package/dist/extensions/healthie/actions/getAppointment/config/fields.d.ts +9 -0
  226. package/dist/extensions/healthie/actions/getAppointment/config/fields.js +13 -0
  227. package/dist/extensions/healthie/actions/getAppointment/config/fields.js.map +1 -0
  228. package/dist/extensions/healthie/actions/getAppointment/config/index.d.ts +2 -0
  229. package/dist/extensions/healthie/actions/getAppointment/config/index.js +8 -0
  230. package/dist/extensions/healthie/actions/getAppointment/config/index.js.map +1 -0
  231. package/dist/extensions/healthie/actions/getAppointment/getAppointment.d.ts +4 -0
  232. package/dist/extensions/healthie/actions/{getAppointment.js → getAppointment/getAppointment.js} +8 -38
  233. package/dist/extensions/healthie/actions/getAppointment/getAppointment.js.map +1 -0
  234. package/dist/extensions/healthie/actions/getAppointment/getAppointment.test.d.ts +1 -0
  235. package/dist/extensions/healthie/actions/getAppointment/getAppointment.test.js +83 -0
  236. package/dist/extensions/healthie/actions/getAppointment/getAppointment.test.js.map +1 -0
  237. package/dist/extensions/healthie/actions/getAppointment/index.d.ts +1 -0
  238. package/dist/extensions/healthie/actions/getAppointment/index.js +6 -0
  239. package/dist/extensions/healthie/actions/getAppointment/index.js.map +1 -0
  240. package/dist/extensions/healthie/actions/{getPatient.d.ts → getPatient/config/dataPoints.d.ts} +1 -13
  241. package/dist/extensions/healthie/actions/getPatient/config/dataPoints.js +42 -0
  242. package/dist/extensions/healthie/actions/getPatient/config/dataPoints.js.map +1 -0
  243. package/dist/extensions/healthie/actions/getPatient/config/fields.d.ts +9 -0
  244. package/dist/extensions/healthie/actions/getPatient/config/fields.js +13 -0
  245. package/dist/extensions/healthie/actions/getPatient/config/fields.js.map +1 -0
  246. package/dist/extensions/healthie/actions/getPatient/config/index.d.ts +2 -0
  247. package/dist/extensions/healthie/actions/getPatient/config/index.js +8 -0
  248. package/dist/extensions/healthie/actions/getPatient/config/index.js.map +1 -0
  249. package/dist/extensions/healthie/actions/getPatient/getPatient.d.ts +4 -0
  250. package/dist/extensions/healthie/actions/{getPatient.js → getPatient/getPatient.js} +9 -55
  251. package/dist/extensions/healthie/actions/{getPatient.js.map → getPatient/getPatient.js.map} +1 -1
  252. package/dist/extensions/healthie/actions/getPatient/getPatient.test.d.ts +1 -0
  253. package/dist/extensions/healthie/actions/getPatient/getPatient.test.js +235 -0
  254. package/dist/extensions/healthie/actions/getPatient/getPatient.test.js.map +1 -0
  255. package/dist/extensions/healthie/actions/getPatient/index.d.ts +1 -0
  256. package/dist/extensions/healthie/actions/getPatient/index.js +18 -0
  257. package/dist/extensions/healthie/actions/getPatient/index.js.map +1 -0
  258. package/dist/extensions/healthie/actions/index.d.ts +8 -2
  259. package/dist/extensions/healthie/actions/index.js +4 -4
  260. package/dist/extensions/healthie/actions/index.js.map +1 -1
  261. package/dist/extensions/healthie/actions/{removeTagFromPatient.d.ts → removeTagFromPatient/config/fields.d.ts} +2 -5
  262. package/dist/extensions/healthie/actions/removeTagFromPatient/config/fields.js +21 -0
  263. package/dist/extensions/healthie/actions/removeTagFromPatient/config/fields.js.map +1 -0
  264. package/dist/extensions/healthie/actions/removeTagFromPatient/config/index.d.ts +1 -0
  265. package/dist/extensions/healthie/actions/removeTagFromPatient/config/index.js +6 -0
  266. package/dist/extensions/healthie/actions/removeTagFromPatient/config/index.js.map +1 -0
  267. package/dist/extensions/healthie/actions/removeTagFromPatient/index.d.ts +1 -0
  268. package/dist/extensions/healthie/actions/removeTagFromPatient/index.js +6 -0
  269. package/dist/extensions/healthie/actions/removeTagFromPatient/index.js.map +1 -0
  270. package/dist/extensions/healthie/actions/removeTagFromPatient/removeTagFromPatient.d.ts +4 -0
  271. package/dist/extensions/healthie/actions/{removeTagFromPatient.js → removeTagFromPatient/removeTagFromPatient.js} +6 -22
  272. package/dist/extensions/healthie/actions/removeTagFromPatient/removeTagFromPatient.js.map +1 -0
  273. package/dist/extensions/healthie/actions/removeTagFromPatient/removeTagFromPatient.test.d.ts +1 -0
  274. package/dist/extensions/healthie/actions/removeTagFromPatient/removeTagFromPatient.test.js +33 -0
  275. package/dist/extensions/healthie/actions/removeTagFromPatient/removeTagFromPatient.test.js.map +1 -0
  276. package/dist/extensions/healthie/actions/sendChatMessage/config/dataPoints.d.ts +6 -0
  277. package/dist/extensions/healthie/actions/sendChatMessage/config/dataPoints.js +10 -0
  278. package/dist/extensions/healthie/actions/sendChatMessage/config/dataPoints.js.map +1 -0
  279. package/dist/extensions/healthie/actions/{sendChatMessage.d.ts → sendChatMessage/config/fields.d.ts} +2 -11
  280. package/dist/extensions/healthie/actions/sendChatMessage/config/fields.js +28 -0
  281. package/dist/extensions/healthie/actions/sendChatMessage/config/fields.js.map +1 -0
  282. package/dist/extensions/healthie/actions/sendChatMessage/config/index.d.ts +2 -0
  283. package/dist/extensions/healthie/actions/sendChatMessage/config/index.js +8 -0
  284. package/dist/extensions/healthie/actions/sendChatMessage/config/index.js.map +1 -0
  285. package/dist/extensions/healthie/actions/sendChatMessage/index.d.ts +1 -0
  286. package/dist/extensions/healthie/actions/sendChatMessage/index.js +6 -0
  287. package/dist/extensions/healthie/actions/sendChatMessage/index.js.map +1 -0
  288. package/dist/extensions/healthie/actions/sendChatMessage/sendChatMessage.d.ts +4 -0
  289. package/dist/extensions/healthie/actions/{sendChatMessage.js → sendChatMessage/sendChatMessage.js} +7 -36
  290. package/dist/extensions/healthie/actions/sendChatMessage/sendChatMessage.js.map +1 -0
  291. package/dist/extensions/healthie/actions/sendChatMessage/sendChatMessage.test.d.ts +1 -0
  292. package/dist/extensions/healthie/actions/sendChatMessage/sendChatMessage.test.js +142 -0
  293. package/dist/extensions/healthie/actions/sendChatMessage/sendChatMessage.test.js.map +1 -0
  294. package/dist/extensions/healthie/actions/{sendFormCompletionRequest.d.ts → sendFormCompletionRequest/config/fields.d.ts} +2 -5
  295. package/dist/extensions/healthie/actions/sendFormCompletionRequest/config/fields.js +77 -0
  296. package/dist/extensions/healthie/actions/sendFormCompletionRequest/config/fields.js.map +1 -0
  297. package/dist/extensions/healthie/actions/sendFormCompletionRequest/config/index.d.ts +1 -0
  298. package/dist/extensions/healthie/actions/sendFormCompletionRequest/config/index.js +6 -0
  299. package/dist/extensions/healthie/actions/sendFormCompletionRequest/config/index.js.map +1 -0
  300. package/dist/extensions/healthie/actions/sendFormCompletionRequest/index.d.ts +1 -0
  301. package/dist/extensions/healthie/actions/sendFormCompletionRequest/index.js +6 -0
  302. package/dist/extensions/healthie/actions/sendFormCompletionRequest/index.js.map +1 -0
  303. package/dist/extensions/healthie/actions/sendFormCompletionRequest/sendFormCompletionRequest.d.ts +4 -0
  304. package/dist/extensions/healthie/actions/{sendFormCompletionRequest.js → sendFormCompletionRequest/sendFormCompletionRequest.js} +7 -79
  305. package/dist/extensions/healthie/actions/sendFormCompletionRequest/sendFormCompletionRequest.js.map +1 -0
  306. package/dist/extensions/healthie/actions/sendFormCompletionRequest/sendFormCompletionRequest.test.d.ts +1 -0
  307. package/dist/extensions/healthie/actions/sendFormCompletionRequest/sendFormCompletionRequest.test.js +199 -0
  308. package/dist/extensions/healthie/actions/sendFormCompletionRequest/sendFormCompletionRequest.test.js.map +1 -0
  309. package/dist/extensions/healthie/actions/{updatePatient.d.ts → updatePatient/config/fields.d.ts} +2 -6
  310. package/dist/extensions/healthie/actions/updatePatient/config/fields.js +99 -0
  311. package/dist/extensions/healthie/actions/updatePatient/config/fields.js.map +1 -0
  312. package/dist/extensions/healthie/actions/updatePatient/config/index.d.ts +1 -0
  313. package/dist/extensions/healthie/actions/updatePatient/config/index.js +6 -0
  314. package/dist/extensions/healthie/actions/updatePatient/config/index.js.map +1 -0
  315. package/dist/extensions/healthie/actions/updatePatient/index.d.ts +1 -0
  316. package/dist/extensions/healthie/actions/updatePatient/index.js +18 -0
  317. package/dist/extensions/healthie/actions/updatePatient/index.js.map +1 -0
  318. package/dist/extensions/healthie/actions/updatePatient/updatePatient.d.ts +4 -0
  319. package/dist/extensions/healthie/actions/updatePatient/updatePatient.js +100 -0
  320. package/dist/extensions/healthie/actions/updatePatient/updatePatient.js.map +1 -0
  321. package/dist/extensions/healthie/actions/updatePatient/updatePatient.test.d.ts +1 -0
  322. package/dist/extensions/healthie/actions/updatePatient/updatePatient.test.js +46 -0
  323. package/dist/extensions/healthie/actions/updatePatient/updatePatient.test.js.map +1 -0
  324. package/dist/extensions/healthie/graphqlClient.test.d.ts +1 -0
  325. package/dist/extensions/healthie/graphqlClient.test.js +63 -0
  326. package/dist/extensions/healthie/graphqlClient.test.js.map +1 -0
  327. package/package.json +1 -1
  328. package/dist/extensions/healthie/actions/applyTagToPatient.js.map +0 -1
  329. package/dist/extensions/healthie/actions/archivePatient.d.ts +0 -13
  330. package/dist/extensions/healthie/actions/archivePatient.js.map +0 -1
  331. package/dist/extensions/healthie/actions/assignPatientToGroup.js.map +0 -1
  332. package/dist/extensions/healthie/actions/cancelAppointment.d.ts +0 -13
  333. package/dist/extensions/healthie/actions/cancelAppointment.js.map +0 -1
  334. package/dist/extensions/healthie/actions/closeChatConversation.js.map +0 -1
  335. package/dist/extensions/healthie/actions/completeTask.d.ts +0 -13
  336. package/dist/extensions/healthie/actions/completeTask.js.map +0 -1
  337. package/dist/extensions/healthie/actions/createAppointment.js.map +0 -1
  338. package/dist/extensions/healthie/actions/createChartingNote.js.map +0 -1
  339. package/dist/extensions/healthie/actions/createJournalEntry.js.map +0 -1
  340. package/dist/extensions/healthie/actions/createLocation.js +0 -158
  341. package/dist/extensions/healthie/actions/createLocation.js.map +0 -1
  342. package/dist/extensions/healthie/actions/createPatient.js.map +0 -1
  343. package/dist/extensions/healthie/actions/createTask.js +0 -161
  344. package/dist/extensions/healthie/actions/createTask.js.map +0 -1
  345. package/dist/extensions/healthie/actions/deleteAppointment.d.ts +0 -13
  346. package/dist/extensions/healthie/actions/deleteAppointment.js.map +0 -1
  347. package/dist/extensions/healthie/actions/deleteTask.d.ts +0 -13
  348. package/dist/extensions/healthie/actions/deleteTask.js.map +0 -1
  349. package/dist/extensions/healthie/actions/getAppointment.d.ts +0 -34
  350. package/dist/extensions/healthie/actions/getAppointment.js.map +0 -1
  351. package/dist/extensions/healthie/actions/removeTagFromPatient.js.map +0 -1
  352. package/dist/extensions/healthie/actions/sendChatMessage.js.map +0 -1
  353. package/dist/extensions/healthie/actions/sendFormCompletionRequest.js.map +0 -1
  354. package/dist/extensions/healthie/actions/updatePatient.js +0 -194
  355. package/dist/extensions/healthie/actions/updatePatient.js.map +0 -1
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTask = void 0;
4
+ const zod_1 = require("zod");
5
+ const zod_validation_error_1 = require("zod-validation-error");
6
+ const extensions_core_1 = require("@awell-health/extensions-core");
7
+ const sdk_1 = require("../../gql/sdk");
8
+ const graphqlClient_1 = require("../../graphqlClient");
9
+ const createTask_zod_1 = require("../../validation/createTask.zod");
10
+ const errors_1 = require("../../errors");
11
+ const config_1 = require("./config");
12
+ exports.createTask = {
13
+ key: 'createTask',
14
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
15
+ title: 'Create task',
16
+ description: 'Create a new task in Healthie.',
17
+ fields: config_1.fields,
18
+ dataPoints: config_1.dataPoints,
19
+ previewable: true,
20
+ onActivityCreated: async (payload, onComplete, onError) => {
21
+ var _a, _b;
22
+ const { fields, settings } = payload;
23
+ try {
24
+ const { patientId, assignToUserId, content, dueDate, reminder } = createTask_zod_1.createTaskSchema.parse(fields);
25
+ const client = (0, graphqlClient_1.initialiseClient)(settings);
26
+ if (client !== undefined) {
27
+ const sdk = (0, sdk_1.getSdk)(client);
28
+ const { data } = await sdk.createTask({
29
+ client_id: patientId,
30
+ user_id: assignToUserId,
31
+ content,
32
+ due_date: dueDate,
33
+ reminder,
34
+ });
35
+ await onComplete({
36
+ data_points: {
37
+ taskId: (_b = (_a = data.createTask) === null || _a === void 0 ? void 0 : _a.task) === null || _b === void 0 ? void 0 : _b.id,
38
+ },
39
+ });
40
+ }
41
+ else {
42
+ await onError({
43
+ events: [
44
+ {
45
+ date: new Date().toISOString(),
46
+ text: { en: 'API client requires an API url and API key' },
47
+ error: {
48
+ category: 'MISSING_SETTINGS',
49
+ message: 'Missing api url or api key',
50
+ },
51
+ },
52
+ ],
53
+ });
54
+ }
55
+ }
56
+ catch (err) {
57
+ if (err instanceof errors_1.HealthieError) {
58
+ const errors = (0, errors_1.mapHealthieToActivityError)(err.errors);
59
+ await onError({
60
+ events: errors,
61
+ });
62
+ }
63
+ else if (err instanceof zod_1.ZodError) {
64
+ const error = (0, zod_validation_error_1.fromZodError)(err);
65
+ await onError({
66
+ events: [
67
+ {
68
+ date: new Date().toISOString(),
69
+ text: { en: error.message },
70
+ error: {
71
+ category: 'WRONG_INPUT',
72
+ message: error.message,
73
+ },
74
+ },
75
+ ],
76
+ });
77
+ }
78
+ else {
79
+ const error = err;
80
+ await onError({
81
+ events: [
82
+ {
83
+ date: new Date().toISOString(),
84
+ text: { en: 'Healthie API reported an error' },
85
+ error: {
86
+ category: 'SERVER_ERROR',
87
+ message: error.message,
88
+ },
89
+ },
90
+ ],
91
+ });
92
+ }
93
+ }
94
+ },
95
+ };
96
+ //# sourceMappingURL=createTask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTask.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/createTask/createTask.ts"],"names":[],"mappings":";;;AAAA,6BAA8B;AAC9B,+DAAmD;AAEnD,mEAAwD;AACxD,uCAAsC;AACtC,uDAAsD;AAEtD,oEAAkE;AAClE,yCAAwE;AACxE,qCAA6C;AAEhC,QAAA,UAAU,GAInB;IACF,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gCAAgC;IAC7C,MAAM,EAAN,eAAM;IACN,UAAU,EAAV,mBAAU;IACV,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE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ACH;iBAAM,IAAI,GAAG,YAAY,cAAQ,EAAE;gBAClC,MAAM,KAAK,GAAG,IAAA,mCAAY,EAAC,GAAG,CAAC,CAAA;gBAC/B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE;4BAC3B,KAAK,EAAE;gCACL,QAAQ,EAAE,aAAa;gCACvB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,KAAK,GAAG,GAAY,CAAA;gBAC1B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,gCAAgC,EAAE;4BAC9C,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tests_1 = require("../../../../src/tests");
4
+ const sdk_1 = require("../../gql/sdk");
5
+ const sdk_2 = require("../../gql/__mocks__/sdk");
6
+ const createTask_1 = require("../createTask");
7
+ jest.mock('../../gql/sdk');
8
+ jest.mock('../../graphqlClient');
9
+ const samplePayload = (0, tests_1.generateTestPayload)({
10
+ fields: {
11
+ patientId: 'a-patient-id',
12
+ assignToUserId: 'a-user-id',
13
+ content: 'content',
14
+ dueDate: '2023-01-01',
15
+ isReminderEnabled: false,
16
+ reminderIntervalType: undefined,
17
+ reminderIntervalValue: undefined,
18
+ reminderIntervalValueOnce: undefined,
19
+ reminderTime: undefined,
20
+ },
21
+ settings: {
22
+ apiKey: 'apiKey',
23
+ apiUrl: 'test-url',
24
+ },
25
+ });
26
+ const sampleTask = {
27
+ client_id: 'a-patient-id',
28
+ user_id: 'a-user-id',
29
+ content: 'content',
30
+ due_date: '2023-01-01',
31
+ reminder: undefined,
32
+ };
33
+ describe('createTask action', () => {
34
+ const onComplete = jest.fn();
35
+ const onError = jest.fn();
36
+ beforeAll(() => {
37
+ ;
38
+ sdk_1.getSdk.mockImplementation(sdk_2.mockGetSdk);
39
+ });
40
+ beforeEach(() => {
41
+ jest.clearAllMocks();
42
+ });
43
+ test('Should create a task', async () => {
44
+ await createTask_1.createTask.onActivityCreated(samplePayload, onComplete, onError);
45
+ expect(sdk_2.mockGetSdkReturn.createTask).toHaveBeenCalled();
46
+ expect(onComplete).toHaveBeenCalledWith({
47
+ data_points: {
48
+ taskId: 'task-1',
49
+ },
50
+ });
51
+ });
52
+ describe('Reminder validation', () => {
53
+ describe('No reminder', () => {
54
+ test.each([false, undefined])('Should call onComplete when isReminderEnabled is %p and rest is undefined', async (value) => {
55
+ await createTask_1.createTask.onActivityCreated({
56
+ ...samplePayload,
57
+ fields: {
58
+ ...samplePayload.fields,
59
+ isReminderEnabled: value,
60
+ },
61
+ }, onComplete, onError);
62
+ expect(onComplete).toHaveBeenCalled();
63
+ expect(sdk_2.mockGetSdkReturn.createTask).toHaveBeenCalledWith(sampleTask);
64
+ });
65
+ test('Should call onError when isReminderEnabled is undefined and any of the rest fields is not undefined', async () => {
66
+ await createTask_1.createTask.onActivityCreated({
67
+ ...samplePayload,
68
+ fields: {
69
+ ...samplePayload.fields,
70
+ reminderTime: 1,
71
+ },
72
+ }, onComplete, onError);
73
+ expect(onError).toHaveBeenCalled();
74
+ });
75
+ });
76
+ describe('Reminder = daily', () => {
77
+ test.each([
78
+ {
79
+ reminderTime: 1,
80
+ },
81
+ {
82
+ reminderTime: '1',
83
+ },
84
+ ])('Should call onComplete when %p', async (value) => {
85
+ await createTask_1.createTask.onActivityCreated({
86
+ ...samplePayload,
87
+ fields: {
88
+ ...samplePayload.fields,
89
+ reminderIntervalType: 'daily',
90
+ isReminderEnabled: true,
91
+ ...value,
92
+ },
93
+ }, onComplete, onError);
94
+ expect(onComplete).toHaveBeenCalled();
95
+ expect(sdk_2.mockGetSdkReturn.createTask).toHaveBeenCalledWith({
96
+ ...sampleTask,
97
+ reminder: {
98
+ is_enabled: true,
99
+ interval_type: 'daily',
100
+ interval_value: undefined,
101
+ reminder_time: 1,
102
+ },
103
+ });
104
+ });
105
+ test('Should call onError when reminderIntervalValue is not undefined', async () => {
106
+ await createTask_1.createTask.onActivityCreated({
107
+ ...samplePayload,
108
+ fields: {
109
+ ...samplePayload.fields,
110
+ reminderIntervalType: 'daily',
111
+ isReminderEnabled: true,
112
+ reminderIntervalValue: '',
113
+ reminderTime: 1,
114
+ },
115
+ }, onComplete, onError);
116
+ expect(onError).toHaveBeenCalled();
117
+ });
118
+ });
119
+ describe('Reminder = weekly', () => {
120
+ test.each([
121
+ {
122
+ reminderIntervalValue: 'monday',
123
+ },
124
+ {
125
+ reminderIntervalValue: 'tuesday',
126
+ },
127
+ {
128
+ reminderIntervalValue: 'wednesday,thursday',
129
+ },
130
+ {
131
+ reminderIntervalValue: 'Friday, Saturday',
132
+ },
133
+ ])('Should call onComplete when %p', async (value) => {
134
+ await createTask_1.createTask.onActivityCreated({
135
+ ...samplePayload,
136
+ fields: {
137
+ ...samplePayload.fields,
138
+ reminderIntervalType: 'weekly',
139
+ reminderTime: 1,
140
+ isReminderEnabled: true,
141
+ ...value,
142
+ },
143
+ }, onComplete, onError);
144
+ expect(sdk_2.mockGetSdkReturn.createTask).toHaveBeenCalledWith({
145
+ ...sampleTask,
146
+ reminder: {
147
+ is_enabled: true,
148
+ interval_type: 'weekly',
149
+ interval_value: value.reminderIntervalValue.toLowerCase(),
150
+ reminder_time: 1,
151
+ },
152
+ });
153
+ expect(onComplete).toHaveBeenCalled();
154
+ });
155
+ test('Should call onError when reminderIntervalValue is not known day of week', async () => {
156
+ await createTask_1.createTask.onActivityCreated({
157
+ ...samplePayload,
158
+ fields: {
159
+ ...samplePayload.fields,
160
+ reminderIntervalType: 'weekly',
161
+ isReminderEnabled: true,
162
+ reminderIntervalValue: 'test',
163
+ reminderTime: 1,
164
+ },
165
+ }, onComplete, onError);
166
+ expect(onError).toHaveBeenCalled();
167
+ });
168
+ });
169
+ describe('Reminder = once (legacy - reminderIntervalValue)', () => {
170
+ test('Should call onComplete when reminderIntervalValue is correct date', async () => {
171
+ await createTask_1.createTask.onActivityCreated({
172
+ ...samplePayload,
173
+ fields: {
174
+ ...samplePayload.fields,
175
+ reminderIntervalType: 'once',
176
+ reminderTime: 1,
177
+ isReminderEnabled: true,
178
+ reminderIntervalValue: '2023-04-13',
179
+ },
180
+ }, onComplete, onError);
181
+ expect(onComplete).toHaveBeenCalled();
182
+ expect(sdk_2.mockGetSdkReturn.createTask).toHaveBeenCalledWith({
183
+ ...sampleTask,
184
+ reminder: {
185
+ is_enabled: true,
186
+ interval_type: 'once',
187
+ interval_value: '2023-04-13',
188
+ reminder_time: 1,
189
+ },
190
+ });
191
+ });
192
+ test('Should call onError when reminderIntervalValue is incorrect date', async () => {
193
+ await createTask_1.createTask.onActivityCreated({
194
+ ...samplePayload,
195
+ fields: {
196
+ ...samplePayload.fields,
197
+ reminderIntervalType: 'once',
198
+ isReminderEnabled: true,
199
+ reminderIntervalValue: '',
200
+ reminderTime: 1,
201
+ },
202
+ }, onComplete, onError);
203
+ expect(onError).toHaveBeenCalled();
204
+ });
205
+ });
206
+ describe('Reminder = once (reminderIntervalValueOnce)', () => {
207
+ test('Should call onComplete when reminderIntervalValueOnce is correct date', async () => {
208
+ await createTask_1.createTask.onActivityCreated({
209
+ ...samplePayload,
210
+ fields: {
211
+ ...samplePayload.fields,
212
+ reminderIntervalType: 'once',
213
+ reminderTime: 1,
214
+ isReminderEnabled: true,
215
+ reminderIntervalValueOnce: '2023-04-13',
216
+ },
217
+ }, onComplete, onError);
218
+ expect(onComplete).toHaveBeenCalled();
219
+ expect(sdk_2.mockGetSdkReturn.createTask).toHaveBeenCalledWith({
220
+ ...sampleTask,
221
+ reminder: {
222
+ is_enabled: true,
223
+ interval_type: 'once',
224
+ interval_value: '2023-04-13',
225
+ reminder_time: 1,
226
+ },
227
+ });
228
+ });
229
+ test('Should call onError when reminderIntervalValueOnce is incorrect date', async () => {
230
+ await createTask_1.createTask.onActivityCreated({
231
+ ...samplePayload,
232
+ fields: {
233
+ ...samplePayload.fields,
234
+ reminderIntervalType: 'once',
235
+ isReminderEnabled: true,
236
+ reminderIntervalValueOnce: '',
237
+ reminderTime: 1,
238
+ },
239
+ }, onComplete, onError);
240
+ expect(onError).toHaveBeenCalled();
241
+ });
242
+ });
243
+ });
244
+ });
245
+ //# sourceMappingURL=createTask.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTask.test.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/createTask/createTask.test.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAC3D,uCAAsC;AACtC,iDAAsE;AACtE,8CAA0C;AAE1C,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;AAC1B,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;AAEhC,MAAM,aAAa,GAAG,IAAA,2BAAmB,EAAC;IACxC,MAAM,EAAE;QACN,SAAS,EAAE,cAAc;QACzB,cAAc,EAAE,WAAW;QAC3B,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,YAAY;QACrB,iBAAiB,EAAE,KAAK;QACxB,oBAAoB,EAAE,SAAS;QAC/B,qBAAqB,EAAE,SAAS;QAChC,yBAAyB,EAAE,SAAS;QACpC,YAAY,EAAE,SAAS;KACxB;IACD,QAAQ,EAAE;QACR,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,UAAU;KACnB;CACF,CAAC,CAAA;AAEF,MAAM,UAAU,GAAG;IACjB,SAAS,EAAE,cAAc;IACzB,OAAO,EAAE,WAAW;IACp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B,EAAE,EAAE;wBAC7B,YAAY,EAAE,CAAC;qBAChB;iBACF,EACD,UAAU,EACV,OAAO,CACR,CAAA;gBAED,MAAM,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,CAAA;YACpC,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { createTask } from './createTask';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTask = void 0;
4
+ var createTask_1 = require("./createTask");
5
+ Object.defineProperty(exports, "createTask", { enumerable: true, get: function () { return createTask_1.createTask; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/createTask/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,10 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ export declare const fields: {
3
+ id: {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ type: FieldType.STRING;
8
+ required: true;
9
+ };
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ exports.fields = {
6
+ id: {
7
+ id: 'id',
8
+ label: 'ID',
9
+ description: 'The id of the appointment in Healthie you would like to delete.',
10
+ type: extensions_core_1.FieldType.STRING,
11
+ required: true,
12
+ },
13
+ };
14
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/deleteAppointment/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI;QACX,WAAW,EACT,iEAAiE;QACnE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA"}
@@ -0,0 +1 @@
1
+ export { fields } from './fields';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fields = void 0;
4
+ var fields_1 = require("./fields");
5
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/deleteAppointment/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields } from './config';
4
+ export declare const deleteAppointment: Action<typeof fields, typeof settings>;
@@ -2,26 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteAppointment = void 0;
4
4
  const lodash_1 = require("lodash");
5
- const errors_1 = require("../errors");
5
+ const errors_1 = require("../../errors");
6
6
  const extensions_core_1 = require("@awell-health/extensions-core");
7
- const extensions_core_2 = require("@awell-health/extensions-core");
8
- const sdk_1 = require("../gql/sdk");
9
- const graphqlClient_1 = require("../graphqlClient");
10
- const fields = {
11
- id: {
12
- id: 'id',
13
- label: 'ID',
14
- description: 'The id of the appointment in Healthie you would like to delete.',
15
- type: extensions_core_1.FieldType.STRING,
16
- required: true,
17
- },
18
- };
7
+ const sdk_1 = require("../../gql/sdk");
8
+ const graphqlClient_1 = require("../../graphqlClient");
9
+ const config_1 = require("./config");
19
10
  exports.deleteAppointment = {
20
11
  key: 'deleteAppointment',
21
- category: extensions_core_2.Category.EHR_INTEGRATIONS,
12
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
22
13
  title: 'Delete appointment',
23
14
  description: 'Delete an appointment in Healthie.',
24
- fields,
15
+ fields: config_1.fields,
25
16
  previewable: true,
26
17
  onActivityCreated: async (payload, onComplete, onError) => {
27
18
  const { fields, settings } = payload;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteAppointment.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/deleteAppointment/deleteAppointment.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAC9B,yCAAwE;AAExE,mEAAwD;AACxD,uCAAsC;AACtC,uDAAsD;AAEtD,qCAAiC;AAEpB,QAAA,iBAAiB,GAA2C;IACvE,GAAG,EAAE,mBAAmB;IACxB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;QACpC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAA;QACrB,IAAI;YACF,IAAI,IAAA,cAAK,EAAC,EAAE,CAAC,EAAE;gBACb,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE;4BAClC,KAAK,EAAE;gCACL,QAAQ,EAAE,gBAAgB;gCAC1B,OAAO,EAAE,iBAAiB;6BAC3B;yBACF;qBACF;iBACF,CAAC,CAAA;gBACF,OAAM;aACP;YAED,MAAM,MAAM,GAAG,IAAA,gCAAgB,EAAC,QAAQ,CAAC,CAAA;YACzC,IAAI,MAAM,KAAK,SAAS,EAAE;gBACxB,MAAM,GAAG,GAAG,IAAA,YAAM,EAAC,MAAM,CAAC,CAAA;gBAC1B,MAAM,GAAG,CAAC,iBAAiB,CAAC;oBAC1B,EAAE;iBACH,CAAC,CAAA;gBAEF,MAAM,UAAU,EAAE,CAAA;aACnB;iBAAM;gBACL,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,4CAA4C,EAAE;4BAC1D,KAAK,EAAE;gCACL,QAAQ,EAAE,kBAAkB;gCAC5B,OAAO,EAAE,4BAA4B;6BACtC;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,sBAAa,EAAE;gBAChC,MAAM,MAAM,GAAG,IAAA,mCAA0B,EAAC,GAAG,CAAC,MAAM,CAAC,CAAA;gBACrD,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE,MAAM;iBACf,CAAC,CAAA;aACH;iBAAM;gBACL,MAAM,KAAK,GAAG,GAAY,CAAA;gBAC1B,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,gCAAgC,EAAE;4BAC9C,KAAK,EAAE;gCACL,QAAQ,EAAE,cAAc;gCACxB,OAAO,EAAE,KAAK,CAAC,OAAO;6BACvB;yBACF;qBACF;iBACF,CAAC,CAAA;aACH;SACF;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tests_1 = require("../../../../src/tests");
4
+ const sdk_1 = require("../../gql/sdk");
5
+ const sdk_2 = require("../../gql/__mocks__/sdk");
6
+ const deleteAppointment_1 = require("../deleteAppointment");
7
+ jest.mock('../../gql/sdk');
8
+ jest.mock('../../graphqlClient');
9
+ describe('deleteAppointment action', () => {
10
+ const onComplete = jest.fn();
11
+ beforeAll(() => {
12
+ ;
13
+ sdk_1.getSdk.mockImplementation(sdk_2.mockGetSdk);
14
+ });
15
+ beforeEach(() => {
16
+ jest.clearAllMocks();
17
+ });
18
+ test('Should delete an appointment', async () => {
19
+ await deleteAppointment_1.deleteAppointment.onActivityCreated((0, tests_1.generateTestPayload)({
20
+ fields: {
21
+ id: 'appointment-1',
22
+ },
23
+ settings: {
24
+ apiKey: 'apiKey',
25
+ apiUrl: 'test-url',
26
+ },
27
+ }), onComplete, jest.fn());
28
+ expect(sdk_2.mockGetSdkReturn.deleteAppointment).toHaveBeenCalledWith({
29
+ id: 'appointment-1',
30
+ });
31
+ expect(onComplete).toHaveBeenCalled();
32
+ });
33
+ });
34
+ //# sourceMappingURL=deleteAppointment.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteAppointment.test.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/deleteAppointment/deleteAppointment.test.ts"],"names":[],"mappings":";;AAAA,iDAA2D;AAC3D,uCAAsC;AACtC,iDAAsE;AACtE,4DAAwD;AAExD,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;AAC1B,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;AAEhC,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,CAAC;QAAC,YAAoB,CAAC,kBAAkB,CAAC,gBAAU,CAAC,CAAA;IACvD,CAAC,CAAC,CAAA;IAEF,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,8BAA8B,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,qCAAiB,CAAC,iBAAiB,CACvC,IAAA,2BAAmB,EAAC;YAClB,MAAM,EAAE;gBACN,EAAE,EAAE,eAAe;aACpB;YACD,QAAQ,EAAE;gBACR,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,UAAU;aACnB;SACF,CAAC,EACF,UAAU,EACV,IAAI,CAAC,EAAE,EAAE,CACV,CAAA;QAED,MAAM,CAAC,sBAAgB,CAAC,iBAAiB,CAAC,CAAC,oBAAoB,CAAC;YAC9D,EAAE,EAAE,eAAe;SACpB,CAAC,CAAA;QACF,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAA;IACvC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { deleteAppointment } from './deleteAppointment';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteAppointment = void 0;
4
+ var deleteAppointment_1 = require("./deleteAppointment");
5
+ Object.defineProperty(exports, "deleteAppointment", { enumerable: true, get: function () { return deleteAppointment_1.deleteAppointment; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/deleteAppointment/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA"}
@@ -0,0 +1,10 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ export declare const fields: {
3
+ id: {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ type: FieldType.STRING;
8
+ required: true;
9
+ };
10
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ exports.fields = {
6
+ id: {
7
+ id: 'id',
8
+ label: 'Task ID',
9
+ description: 'The id of the task in Healthie you would like to delete.',
10
+ type: extensions_core_1.FieldType.STRING,
11
+ required: true,
12
+ },
13
+ };
14
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/deleteTask/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAExD,QAAA,MAAM,GAAG;IACpB,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,0DAA0D;QACvE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;CAC8B,CAAA"}
@@ -0,0 +1 @@
1
+ export { fields } from './fields';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fields = void 0;
4
+ var fields_1 = require("./fields");
5
+ Object.defineProperty(exports, "fields", { enumerable: true, get: function () { return fields_1.fields; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/healthie/actions/deleteTask/config/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields } from './config';
4
+ export declare const deleteTask: Action<typeof fields, typeof settings>;
@@ -2,26 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteTask = void 0;
4
4
  const lodash_1 = require("lodash");
5
- const errors_1 = require("../errors");
5
+ const errors_1 = require("../../errors");
6
6
  const extensions_core_1 = require("@awell-health/extensions-core");
7
- const extensions_core_2 = require("@awell-health/extensions-core");
8
- const sdk_1 = require("../gql/sdk");
9
- const graphqlClient_1 = require("../graphqlClient");
10
- const fields = {
11
- id: {
12
- id: 'id',
13
- label: 'Task ID',
14
- description: 'The id of the task in Healthie you would like to delete.',
15
- type: extensions_core_1.FieldType.STRING,
16
- required: true,
17
- },
18
- };
7
+ const sdk_1 = require("../../gql/sdk");
8
+ const graphqlClient_1 = require("../../graphqlClient");
9
+ const config_1 = require("./config");
19
10
  exports.deleteTask = {
20
11
  key: 'deleteTask',
21
- category: extensions_core_2.Category.EHR_INTEGRATIONS,
12
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
22
13
  title: 'Delete task',
23
14
  description: 'Delete a task in Healthie.',
24
- fields,
15
+ fields: config_1.fields,
25
16
  previewable: true,
26
17
  onActivityCreated: async (payload, onComplete, onError) => {
27
18
  const { fields, settings } = payload;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteTask.js","sourceRoot":"","sources":["../../../../../extensions/healthie/actions/deleteTask/deleteTask.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAC9B,yCAAwE;AAExE,mEAAwD;AACxD,uCAAsC;AACtC,uDAAsD;AAEtD,qCAAiC;AAEpB,QAAA,UAAU,GAA2C;IAChE,GAAG,EAAE,YAAY;IACjB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,4BAA4B;IACzC,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;QACvE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;QACpC,MAAM,EAAE,EAAE,EAAE,GAAG,MAAM,CAAA;QACrB,IAAI;YACF,IAAI,IAAA,cAAK,EAAC,EAAE,CAAC,EAAE;gBACb,MAAM,OAAO,CAAC;oBACZ,MAAM,EAAE;wBACN;4BACE,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;4BAC9B,IAAI,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE;4BAClC,KAAK,EAAE;gCACL,QAAQ,EAAE,gBAAgB;gCAC1B,OAAO,EAAE,iBAAiB;6BAC3B;yBACF;qBACF;iBACF,CA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