@metriport/shared 0.19.2 → 0.19.3

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 (413) hide show
  1. package/dist/domain/ehr.d.ts +4 -0
  2. package/dist/domain/ehr.d.ts.map +1 -0
  3. package/dist/domain/ehr.js +9 -0
  4. package/dist/domain/ehr.js.map +1 -0
  5. package/dist/domain/jwt-token.d.ts +5 -0
  6. package/dist/domain/jwt-token.d.ts.map +1 -0
  7. package/dist/domain/jwt-token.js +3 -0
  8. package/dist/domain/jwt-token.js.map +1 -0
  9. package/dist/interface/external/canvas/appointment.d.ts +111 -0
  10. package/dist/interface/external/canvas/appointment.d.ts.map +1 -0
  11. package/dist/interface/external/canvas/appointment.js +15 -0
  12. package/dist/interface/external/canvas/appointment.js.map +1 -0
  13. package/dist/interface/external/canvas/cx-mapping.d.ts +16 -0
  14. package/dist/interface/external/canvas/cx-mapping.d.ts.map +1 -0
  15. package/dist/interface/external/canvas/cx-mapping.js +8 -0
  16. package/dist/interface/external/canvas/cx-mapping.js.map +1 -0
  17. package/dist/interface/external/canvas/index.d.ts +3 -0
  18. package/dist/interface/external/canvas/index.d.ts.map +1 -0
  19. package/dist/interface/external/canvas/index.js +19 -0
  20. package/dist/interface/external/canvas/index.js.map +1 -0
  21. package/dist/interface/external/canvas/jwt-token.d.ts +43 -0
  22. package/dist/interface/external/canvas/jwt-token.d.ts.map +1 -0
  23. package/dist/interface/external/canvas/jwt-token.js +17 -0
  24. package/dist/interface/external/canvas/jwt-token.js.map +1 -0
  25. package/dist/interface/external/canvas/patient.d.ts +306 -0
  26. package/dist/interface/external/canvas/patient.d.ts.map +1 -0
  27. package/dist/interface/external/canvas/patient.js +36 -0
  28. package/dist/interface/external/canvas/patient.js.map +1 -0
  29. package/dist/interface/external/elation/jwt-token.d.ts +26 -0
  30. package/dist/interface/external/elation/jwt-token.d.ts.map +1 -0
  31. package/dist/interface/external/elation/jwt-token.js +13 -0
  32. package/dist/interface/external/elation/jwt-token.js.map +1 -0
  33. package/dist/interface/external/shared/ehr/patient.d.ts +577 -0
  34. package/dist/interface/external/shared/ehr/patient.d.ts.map +1 -0
  35. package/dist/interface/external/shared/ehr/patient.js +52 -0
  36. package/dist/interface/external/shared/ehr/patient.js.map +1 -0
  37. package/dist/jwt-token.d.ts +26 -0
  38. package/dist/jwt-token.d.ts.map +1 -0
  39. package/dist/jwt-token.js +13 -0
  40. package/dist/jwt-token.js.map +1 -0
  41. package/dist/medical/webhook/webhook-request.d.ts +452 -0
  42. package/dist/medical/webhook/webhook-request.d.ts.map +1 -1
  43. package/dist/medical/webhook/webhook-request.js +29 -23
  44. package/dist/medical/webhook/webhook-request.js.map +1 -1
  45. package/dist/packages/shared/src/__tests__/env-setup.d.ts +2 -0
  46. package/dist/packages/shared/src/__tests__/env-setup.d.ts.map +1 -0
  47. package/dist/packages/shared/src/__tests__/env-setup.js +35 -0
  48. package/dist/packages/shared/src/__tests__/env-setup.js.map +1 -0
  49. package/dist/packages/shared/src/api/index.d.ts +2 -0
  50. package/dist/packages/shared/src/api/index.d.ts.map +1 -0
  51. package/dist/packages/shared/src/api/index.js +18 -0
  52. package/dist/packages/shared/src/api/index.js.map +1 -0
  53. package/dist/packages/shared/src/api/pagination.d.ts +13 -0
  54. package/dist/packages/shared/src/api/pagination.d.ts.map +1 -0
  55. package/dist/packages/shared/src/api/pagination.js +3 -0
  56. package/dist/packages/shared/src/api/pagination.js.map +1 -0
  57. package/dist/packages/shared/src/common/__tests__/boolean.test.d.ts +2 -0
  58. package/dist/packages/shared/src/common/__tests__/boolean.test.d.ts.map +1 -0
  59. package/dist/packages/shared/src/common/__tests__/boolean.test.js +46 -0
  60. package/dist/packages/shared/src/common/__tests__/boolean.test.js.map +1 -0
  61. package/dist/packages/shared/src/common/__tests__/date.test.d.ts +2 -0
  62. package/dist/packages/shared/src/common/__tests__/date.test.d.ts.map +1 -0
  63. package/dist/packages/shared/src/common/__tests__/date.test.js +12 -0
  64. package/dist/packages/shared/src/common/__tests__/date.test.js.map +1 -0
  65. package/dist/packages/shared/src/common/__tests__/normalize-oid.test.d.ts +2 -0
  66. package/dist/packages/shared/src/common/__tests__/normalize-oid.test.d.ts.map +1 -0
  67. package/dist/packages/shared/src/common/__tests__/normalize-oid.test.js +54 -0
  68. package/dist/packages/shared/src/common/__tests__/normalize-oid.test.js.map +1 -0
  69. package/dist/packages/shared/src/common/__tests__/npi.d.ts +7 -0
  70. package/dist/packages/shared/src/common/__tests__/npi.d.ts.map +1 -0
  71. package/dist/packages/shared/src/common/__tests__/npi.js +32 -0
  72. package/dist/packages/shared/src/common/__tests__/npi.js.map +1 -0
  73. package/dist/packages/shared/src/common/__tests__/retry.test.d.ts +2 -0
  74. package/dist/packages/shared/src/common/__tests__/retry.test.d.ts.map +1 -0
  75. package/dist/packages/shared/src/common/__tests__/retry.test.js +202 -0
  76. package/dist/packages/shared/src/common/__tests__/retry.test.js.map +1 -0
  77. package/dist/packages/shared/src/common/__tests__/string.test.d.ts +2 -0
  78. package/dist/packages/shared/src/common/__tests__/string.test.d.ts.map +1 -0
  79. package/dist/packages/shared/src/common/__tests__/string.test.js +62 -0
  80. package/dist/packages/shared/src/common/__tests__/string.test.js.map +1 -0
  81. package/dist/packages/shared/src/common/__tests__/title-case.test.d.ts +2 -0
  82. package/dist/packages/shared/src/common/__tests__/title-case.test.d.ts.map +1 -0
  83. package/dist/packages/shared/src/common/__tests__/title-case.test.js +66 -0
  84. package/dist/packages/shared/src/common/__tests__/title-case.test.js.map +1 -0
  85. package/dist/packages/shared/src/common/__tests__/validate-npi.test.d.ts +2 -0
  86. package/dist/packages/shared/src/common/__tests__/validate-npi.test.d.ts.map +1 -0
  87. package/dist/packages/shared/src/common/__tests__/validate-npi.test.js +24 -0
  88. package/dist/packages/shared/src/common/__tests__/validate-npi.test.js.map +1 -0
  89. package/dist/packages/shared/src/common/array.d.ts +2 -0
  90. package/dist/packages/shared/src/common/array.d.ts.map +1 -0
  91. package/dist/packages/shared/src/common/array.js +11 -0
  92. package/dist/packages/shared/src/common/array.js.map +1 -0
  93. package/dist/packages/shared/src/common/boolean.d.ts +9 -0
  94. package/dist/packages/shared/src/common/boolean.d.ts.map +1 -0
  95. package/dist/packages/shared/src/common/boolean.js +27 -0
  96. package/dist/packages/shared/src/common/boolean.js.map +1 -0
  97. package/dist/packages/shared/src/common/date.d.ts +25 -0
  98. package/dist/packages/shared/src/common/date.d.ts.map +1 -0
  99. package/dist/packages/shared/src/common/date.js +64 -0
  100. package/dist/packages/shared/src/common/date.js.map +1 -0
  101. package/dist/packages/shared/src/common/duration.d.ts +8 -0
  102. package/dist/packages/shared/src/common/duration.d.ts.map +1 -0
  103. package/dist/packages/shared/src/common/duration.js +30 -0
  104. package/dist/packages/shared/src/common/duration.js.map +1 -0
  105. package/dist/packages/shared/src/common/email.d.ts +5 -0
  106. package/dist/packages/shared/src/common/email.d.ts.map +1 -0
  107. package/dist/packages/shared/src/common/email.js +14 -0
  108. package/dist/packages/shared/src/common/email.js.map +1 -0
  109. package/dist/packages/shared/src/common/env-var.d.ts +10 -0
  110. package/dist/packages/shared/src/common/env-var.d.ts.map +1 -0
  111. package/dist/packages/shared/src/common/env-var.js +31 -0
  112. package/dist/packages/shared/src/common/env-var.js.map +1 -0
  113. package/dist/packages/shared/src/common/error.d.ts +16 -0
  114. package/dist/packages/shared/src/common/error.d.ts.map +1 -0
  115. package/dist/packages/shared/src/common/error.js +36 -0
  116. package/dist/packages/shared/src/common/error.js.map +1 -0
  117. package/dist/packages/shared/src/common/filter-map.d.ts +11 -0
  118. package/dist/packages/shared/src/common/filter-map.d.ts.map +1 -0
  119. package/dist/packages/shared/src/common/filter-map.js +17 -0
  120. package/dist/packages/shared/src/common/filter-map.js.map +1 -0
  121. package/dist/packages/shared/src/common/general.d.ts +2 -0
  122. package/dist/packages/shared/src/common/general.d.ts.map +1 -0
  123. package/dist/packages/shared/src/common/general.js +9 -0
  124. package/dist/packages/shared/src/common/general.js.map +1 -0
  125. package/dist/packages/shared/src/common/metriport-organization.d.ts +3 -0
  126. package/dist/packages/shared/src/common/metriport-organization.d.ts.map +1 -0
  127. package/dist/packages/shared/src/common/metriport-organization.js +25 -0
  128. package/dist/packages/shared/src/common/metriport-organization.js.map +1 -0
  129. package/dist/packages/shared/src/common/net.d.ts +2 -0
  130. package/dist/packages/shared/src/common/net.d.ts.map +1 -0
  131. package/dist/packages/shared/src/common/net.js +16 -0
  132. package/dist/packages/shared/src/common/net.js.map +1 -0
  133. package/dist/packages/shared/src/common/normalize-oid.d.ts +2 -0
  134. package/dist/packages/shared/src/common/normalize-oid.d.ts.map +1 -0
  135. package/dist/packages/shared/src/common/normalize-oid.js +34 -0
  136. package/dist/packages/shared/src/common/normalize-oid.js.map +1 -0
  137. package/dist/packages/shared/src/common/numbers.d.ts +7 -0
  138. package/dist/packages/shared/src/common/numbers.d.ts.map +1 -0
  139. package/dist/packages/shared/src/common/numbers.js +19 -0
  140. package/dist/packages/shared/src/common/numbers.js.map +1 -0
  141. package/dist/packages/shared/src/common/purpose-of-use.d.ts +30 -0
  142. package/dist/packages/shared/src/common/purpose-of-use.d.ts.map +1 -0
  143. package/dist/packages/shared/src/common/purpose-of-use.js +35 -0
  144. package/dist/packages/shared/src/common/purpose-of-use.js.map +1 -0
  145. package/dist/packages/shared/src/common/retry.d.ts +76 -0
  146. package/dist/packages/shared/src/common/retry.d.ts.map +1 -0
  147. package/dist/packages/shared/src/common/retry.js +117 -0
  148. package/dist/packages/shared/src/common/retry.js.map +1 -0
  149. package/dist/packages/shared/src/common/sleep.d.ts +14 -0
  150. package/dist/packages/shared/src/common/sleep.d.ts.map +1 -0
  151. package/dist/packages/shared/src/common/sleep.js +29 -0
  152. package/dist/packages/shared/src/common/sleep.js.map +1 -0
  153. package/dist/packages/shared/src/common/string.d.ts +7 -0
  154. package/dist/packages/shared/src/common/string.d.ts.map +1 -0
  155. package/dist/packages/shared/src/common/string.js +16 -0
  156. package/dist/packages/shared/src/common/string.js.map +1 -0
  157. package/dist/packages/shared/src/common/title-case.d.ts +2 -0
  158. package/dist/packages/shared/src/common/title-case.d.ts.map +1 -0
  159. package/dist/packages/shared/src/common/title-case.js +16 -0
  160. package/dist/packages/shared/src/common/title-case.js.map +1 -0
  161. package/dist/packages/shared/src/common/types.d.ts +9 -0
  162. package/dist/packages/shared/src/common/types.d.ts.map +1 -0
  163. package/dist/packages/shared/src/common/types.js +17 -0
  164. package/dist/packages/shared/src/common/types.js.map +1 -0
  165. package/dist/packages/shared/src/common/uuid.d.ts +5 -0
  166. package/dist/packages/shared/src/common/uuid.d.ts.map +1 -0
  167. package/dist/packages/shared/src/common/uuid.js +12 -0
  168. package/dist/packages/shared/src/common/uuid.js.map +1 -0
  169. package/dist/packages/shared/src/common/validate-npi.d.ts +10 -0
  170. package/dist/packages/shared/src/common/validate-npi.d.ts.map +1 -0
  171. package/dist/packages/shared/src/common/validate-npi.js +41 -0
  172. package/dist/packages/shared/src/common/validate-npi.js.map +1 -0
  173. package/dist/packages/shared/src/common/xml-parser.d.ts +3 -0
  174. package/dist/packages/shared/src/common/xml-parser.d.ts.map +1 -0
  175. package/dist/packages/shared/src/common/xml-parser.js +17 -0
  176. package/dist/packages/shared/src/common/xml-parser.js.map +1 -0
  177. package/dist/packages/shared/src/domain/address/__tests__/normalize-zip.test.d.ts +2 -0
  178. package/dist/packages/shared/src/domain/address/__tests__/normalize-zip.test.d.ts.map +1 -0
  179. package/dist/packages/shared/src/domain/address/__tests__/normalize-zip.test.js +83 -0
  180. package/dist/packages/shared/src/domain/address/__tests__/normalize-zip.test.js.map +1 -0
  181. package/dist/packages/shared/src/domain/address/__tests__/state.test.d.ts +2 -0
  182. package/dist/packages/shared/src/domain/address/__tests__/state.test.d.ts.map +1 -0
  183. package/dist/packages/shared/src/domain/address/__tests__/state.test.js +40 -0
  184. package/dist/packages/shared/src/domain/address/__tests__/state.test.js.map +1 -0
  185. package/dist/packages/shared/src/domain/address/__tests__/territory.test.d.ts +2 -0
  186. package/dist/packages/shared/src/domain/address/__tests__/territory.test.d.ts.map +1 -0
  187. package/dist/packages/shared/src/domain/address/__tests__/territory.test.js +35 -0
  188. package/dist/packages/shared/src/domain/address/__tests__/territory.test.js.map +1 -0
  189. package/dist/packages/shared/src/domain/address/index.d.ts +8 -0
  190. package/dist/packages/shared/src/domain/address/index.d.ts.map +1 -0
  191. package/dist/packages/shared/src/domain/address/index.js +21 -0
  192. package/dist/packages/shared/src/domain/address/index.js.map +1 -0
  193. package/dist/packages/shared/src/domain/address/state.d.ts +57 -0
  194. package/dist/packages/shared/src/domain/address/state.d.ts.map +1 -0
  195. package/dist/packages/shared/src/domain/address/state.js +126 -0
  196. package/dist/packages/shared/src/domain/address/state.js.map +1 -0
  197. package/dist/packages/shared/src/domain/address/territory.d.ts +10 -0
  198. package/dist/packages/shared/src/domain/address/territory.d.ts.map +1 -0
  199. package/dist/packages/shared/src/domain/address/territory.js +32 -0
  200. package/dist/packages/shared/src/domain/address/territory.js.map +1 -0
  201. package/dist/packages/shared/src/domain/address/zip.d.ts +7 -0
  202. package/dist/packages/shared/src/domain/address/zip.d.ts.map +1 -0
  203. package/dist/packages/shared/src/domain/address/zip.js +52 -0
  204. package/dist/packages/shared/src/domain/address/zip.js.map +1 -0
  205. package/dist/packages/shared/src/domain/contact/__tests__/email.test.d.ts +2 -0
  206. package/dist/packages/shared/src/domain/contact/__tests__/email.test.d.ts.map +1 -0
  207. package/dist/packages/shared/src/domain/contact/__tests__/email.test.js +39 -0
  208. package/dist/packages/shared/src/domain/contact/__tests__/email.test.js.map +1 -0
  209. package/dist/packages/shared/src/domain/contact/__tests__/phone.test.d.ts +2 -0
  210. package/dist/packages/shared/src/domain/contact/__tests__/phone.test.d.ts.map +1 -0
  211. package/dist/packages/shared/src/domain/contact/__tests__/phone.test.js +190 -0
  212. package/dist/packages/shared/src/domain/contact/__tests__/phone.test.js.map +1 -0
  213. package/dist/packages/shared/src/domain/contact/email.d.ts +11 -0
  214. package/dist/packages/shared/src/domain/contact/email.d.ts.map +1 -0
  215. package/dist/packages/shared/src/domain/contact/email.js +58 -0
  216. package/dist/packages/shared/src/domain/contact/email.js.map +1 -0
  217. package/dist/packages/shared/src/domain/contact/phone.d.ts +25 -0
  218. package/dist/packages/shared/src/domain/contact/phone.d.ts.map +1 -0
  219. package/dist/packages/shared/src/domain/contact/phone.js +68 -0
  220. package/dist/packages/shared/src/domain/contact/phone.js.map +1 -0
  221. package/dist/packages/shared/src/domain/dob.d.ts +3 -0
  222. package/dist/packages/shared/src/domain/dob.d.ts.map +1 -0
  223. package/dist/packages/shared/src/domain/dob.js +25 -0
  224. package/dist/packages/shared/src/domain/dob.js.map +1 -0
  225. package/dist/packages/shared/src/domain/externalId.d.ts +2 -0
  226. package/dist/packages/shared/src/domain/externalId.d.ts.map +1 -0
  227. package/dist/packages/shared/src/domain/externalId.js +8 -0
  228. package/dist/packages/shared/src/domain/externalId.js.map +1 -0
  229. package/dist/packages/shared/src/domain/gender.d.ts +4 -0
  230. package/dist/packages/shared/src/domain/gender.d.ts.map +1 -0
  231. package/dist/packages/shared/src/domain/gender.js +28 -0
  232. package/dist/packages/shared/src/domain/gender.js.map +1 -0
  233. package/dist/packages/shared/src/domain/jwt-token.d.ts +5 -0
  234. package/dist/packages/shared/src/domain/jwt-token.d.ts.map +1 -0
  235. package/dist/packages/shared/src/domain/jwt-token.js +3 -0
  236. package/dist/packages/shared/src/domain/jwt-token.js.map +1 -0
  237. package/dist/packages/shared/src/domain/metriport.d.ts +9 -0
  238. package/dist/packages/shared/src/domain/metriport.d.ts.map +1 -0
  239. package/dist/packages/shared/src/domain/metriport.js +13 -0
  240. package/dist/packages/shared/src/domain/metriport.js.map +1 -0
  241. package/dist/packages/shared/src/domain/patient/patient-import.d.ts +152 -0
  242. package/dist/packages/shared/src/domain/patient/patient-import.d.ts.map +1 -0
  243. package/dist/packages/shared/src/domain/patient/patient-import.js +32 -0
  244. package/dist/packages/shared/src/domain/patient/patient-import.js.map +1 -0
  245. package/dist/packages/shared/src/domain/patient/patient.d.ts +41 -0
  246. package/dist/packages/shared/src/domain/patient/patient.d.ts.map +1 -0
  247. package/dist/packages/shared/src/domain/patient/patient.js +14 -0
  248. package/dist/packages/shared/src/domain/patient/patient.js.map +1 -0
  249. package/dist/packages/shared/src/domain/rate-limiting/index.d.ts +49 -0
  250. package/dist/packages/shared/src/domain/rate-limiting/index.d.ts.map +1 -0
  251. package/dist/packages/shared/src/domain/rate-limiting/index.js +46 -0
  252. package/dist/packages/shared/src/domain/rate-limiting/index.js.map +1 -0
  253. package/dist/packages/shared/src/domain/secrets.d.ts +3 -0
  254. package/dist/packages/shared/src/domain/secrets.d.ts.map +1 -0
  255. package/dist/packages/shared/src/domain/secrets.js +6 -0
  256. package/dist/packages/shared/src/domain/secrets.js.map +1 -0
  257. package/dist/packages/shared/src/error/bad-request.d.ts +9 -0
  258. package/dist/packages/shared/src/error/bad-request.d.ts.map +1 -0
  259. package/dist/packages/shared/src/error/bad-request.js +18 -0
  260. package/dist/packages/shared/src/error/bad-request.js.map +1 -0
  261. package/dist/packages/shared/src/error/metriport-error.d.ts +8 -0
  262. package/dist/packages/shared/src/error/metriport-error.d.ts.map +1 -0
  263. package/dist/packages/shared/src/error/metriport-error.js +18 -0
  264. package/dist/packages/shared/src/error/metriport-error.js.map +1 -0
  265. package/dist/packages/shared/src/error/not-found.d.ts +5 -0
  266. package/dist/packages/shared/src/error/not-found.d.ts.map +1 -0
  267. package/dist/packages/shared/src/error/not-found.js +18 -0
  268. package/dist/packages/shared/src/error/not-found.js.map +1 -0
  269. package/dist/packages/shared/src/error/shared.d.ts +8 -0
  270. package/dist/packages/shared/src/error/shared.d.ts.map +1 -0
  271. package/dist/packages/shared/src/error/shared.js +34 -0
  272. package/dist/packages/shared/src/error/shared.js.map +1 -0
  273. package/dist/packages/shared/src/error/too-many-requests.d.ts +9 -0
  274. package/dist/packages/shared/src/error/too-many-requests.d.ts.map +1 -0
  275. package/dist/packages/shared/src/error/too-many-requests.js +18 -0
  276. package/dist/packages/shared/src/error/too-many-requests.js.map +1 -0
  277. package/dist/packages/shared/src/index.d.ts +43 -0
  278. package/dist/packages/shared/src/index.d.ts.map +1 -0
  279. package/dist/packages/shared/src/index.js +93 -0
  280. package/dist/packages/shared/src/index.js.map +1 -0
  281. package/dist/packages/shared/src/interface/external/athenahealth/appointment.d.ts +105 -0
  282. package/dist/packages/shared/src/interface/external/athenahealth/appointment.d.ts.map +1 -0
  283. package/dist/packages/shared/src/interface/external/athenahealth/appointment.js +18 -0
  284. package/dist/packages/shared/src/interface/external/athenahealth/appointment.js.map +1 -0
  285. package/dist/packages/shared/src/interface/external/athenahealth/cx-mapping.d.ts +16 -0
  286. package/dist/packages/shared/src/interface/external/athenahealth/cx-mapping.d.ts.map +1 -0
  287. package/dist/packages/shared/src/interface/external/athenahealth/cx-mapping.js +8 -0
  288. package/dist/packages/shared/src/interface/external/athenahealth/cx-mapping.js.map +1 -0
  289. package/dist/packages/shared/src/interface/external/athenahealth/department.d.ts +49 -0
  290. package/dist/packages/shared/src/interface/external/athenahealth/department.d.ts.map +1 -0
  291. package/dist/packages/shared/src/interface/external/athenahealth/department.js +11 -0
  292. package/dist/packages/shared/src/interface/external/athenahealth/department.js.map +1 -0
  293. package/dist/packages/shared/src/interface/external/athenahealth/index.d.ts +10 -0
  294. package/dist/packages/shared/src/interface/external/athenahealth/index.d.ts.map +1 -0
  295. package/dist/packages/shared/src/interface/external/athenahealth/index.js +26 -0
  296. package/dist/packages/shared/src/interface/external/athenahealth/index.js.map +1 -0
  297. package/dist/packages/shared/src/interface/external/athenahealth/jwt-token.d.ts +31 -0
  298. package/dist/packages/shared/src/interface/external/athenahealth/jwt-token.d.ts.map +1 -0
  299. package/dist/packages/shared/src/interface/external/athenahealth/jwt-token.js +13 -0
  300. package/dist/packages/shared/src/interface/external/athenahealth/jwt-token.js.map +1 -0
  301. package/dist/packages/shared/src/interface/external/athenahealth/medication.d.ts +77 -0
  302. package/dist/packages/shared/src/interface/external/athenahealth/medication.d.ts.map +1 -0
  303. package/dist/packages/shared/src/interface/external/athenahealth/medication.js +19 -0
  304. package/dist/packages/shared/src/interface/external/athenahealth/medication.js.map +1 -0
  305. package/dist/packages/shared/src/interface/external/athenahealth/patient.d.ts +825 -0
  306. package/dist/packages/shared/src/interface/external/athenahealth/patient.d.ts.map +1 -0
  307. package/dist/packages/shared/src/interface/external/athenahealth/patient.js +58 -0
  308. package/dist/packages/shared/src/interface/external/athenahealth/patient.js.map +1 -0
  309. package/dist/packages/shared/src/interface/external/athenahealth/problem.d.ts +39 -0
  310. package/dist/packages/shared/src/interface/external/athenahealth/problem.d.ts.map +1 -0
  311. package/dist/packages/shared/src/interface/external/athenahealth/problem.js +14 -0
  312. package/dist/packages/shared/src/interface/external/athenahealth/problem.js.map +1 -0
  313. package/dist/packages/shared/src/interface/external/athenahealth/subscription.d.ts +32 -0
  314. package/dist/packages/shared/src/interface/external/athenahealth/subscription.d.ts.map +1 -0
  315. package/dist/packages/shared/src/interface/external/athenahealth/subscription.js +11 -0
  316. package/dist/packages/shared/src/interface/external/athenahealth/subscription.js.map +1 -0
  317. package/dist/packages/shared/src/interface/external/athenahealth/vitals.d.ts +58 -0
  318. package/dist/packages/shared/src/interface/external/athenahealth/vitals.d.ts.map +1 -0
  319. package/dist/packages/shared/src/interface/external/athenahealth/vitals.js +14 -0
  320. package/dist/packages/shared/src/interface/external/athenahealth/vitals.js.map +1 -0
  321. package/dist/packages/shared/src/interface/external/canvas/index.d.ts +2 -0
  322. package/dist/packages/shared/src/interface/external/canvas/index.d.ts.map +1 -0
  323. package/dist/packages/shared/src/interface/external/canvas/index.js +18 -0
  324. package/dist/packages/shared/src/interface/external/canvas/index.js.map +1 -0
  325. package/dist/packages/shared/src/interface/external/canvas/jwt-token.d.ts +10 -0
  326. package/dist/packages/shared/src/interface/external/canvas/jwt-token.d.ts.map +1 -0
  327. package/dist/packages/shared/src/interface/external/canvas/jwt-token.js +3 -0
  328. package/dist/packages/shared/src/interface/external/canvas/jwt-token.js.map +1 -0
  329. package/dist/packages/shared/src/interface/external/carequality/directory/simplified-org.d.ts +10 -0
  330. package/dist/packages/shared/src/interface/external/carequality/directory/simplified-org.d.ts.map +1 -0
  331. package/dist/packages/shared/src/interface/external/carequality/directory/simplified-org.js +3 -0
  332. package/dist/packages/shared/src/interface/external/carequality/directory/simplified-org.js.map +1 -0
  333. package/dist/packages/shared/src/interface/external/elation/appointment.d.ts +111 -0
  334. package/dist/packages/shared/src/interface/external/elation/appointment.d.ts.map +1 -0
  335. package/dist/packages/shared/src/interface/external/elation/appointment.js +15 -0
  336. package/dist/packages/shared/src/interface/external/elation/appointment.js.map +1 -0
  337. package/dist/packages/shared/src/interface/external/elation/index.d.ts +4 -0
  338. package/dist/packages/shared/src/interface/external/elation/index.d.ts.map +1 -0
  339. package/dist/packages/shared/src/interface/external/elation/index.js +20 -0
  340. package/dist/packages/shared/src/interface/external/elation/index.js.map +1 -0
  341. package/dist/packages/shared/src/interface/external/elation/patient.d.ts +280 -0
  342. package/dist/packages/shared/src/interface/external/elation/patient.d.ts.map +1 -0
  343. package/dist/packages/shared/src/interface/external/elation/patient.js +40 -0
  344. package/dist/packages/shared/src/interface/external/elation/patient.js.map +1 -0
  345. package/dist/packages/shared/src/interface/index.d.ts +3 -0
  346. package/dist/packages/shared/src/interface/index.d.ts.map +1 -0
  347. package/dist/packages/shared/src/interface/index.js +19 -0
  348. package/dist/packages/shared/src/interface/index.js.map +1 -0
  349. package/dist/packages/shared/src/interface/internal/consolidated.d.ts +258 -0
  350. package/dist/packages/shared/src/interface/internal/consolidated.d.ts.map +1 -0
  351. package/dist/packages/shared/src/interface/internal/consolidated.js +16 -0
  352. package/dist/packages/shared/src/interface/internal/consolidated.js.map +1 -0
  353. package/dist/packages/shared/src/interface/internal/index.d.ts +2 -0
  354. package/dist/packages/shared/src/interface/internal/index.d.ts.map +1 -0
  355. package/dist/packages/shared/src/interface/internal/index.js +18 -0
  356. package/dist/packages/shared/src/interface/internal/index.js.map +1 -0
  357. package/dist/packages/shared/src/interface/schema/feedback.d.ts +48 -0
  358. package/dist/packages/shared/src/interface/schema/feedback.d.ts.map +1 -0
  359. package/dist/packages/shared/src/interface/schema/feedback.js +17 -0
  360. package/dist/packages/shared/src/interface/schema/feedback.js.map +1 -0
  361. package/dist/packages/shared/src/interface/schema/index.d.ts +2 -0
  362. package/dist/packages/shared/src/interface/schema/index.d.ts.map +1 -0
  363. package/dist/packages/shared/src/interface/schema/index.js +18 -0
  364. package/dist/packages/shared/src/interface/schema/index.js.map +1 -0
  365. package/dist/packages/shared/src/medical/fhir/bundle.d.ts +8 -0
  366. package/dist/packages/shared/src/medical/fhir/bundle.d.ts.map +1 -0
  367. package/dist/packages/shared/src/medical/fhir/bundle.js +24 -0
  368. package/dist/packages/shared/src/medical/fhir/bundle.js.map +1 -0
  369. package/dist/packages/shared/src/medical/fhir/conversion.d.ts +3 -0
  370. package/dist/packages/shared/src/medical/fhir/conversion.d.ts.map +1 -0
  371. package/dist/packages/shared/src/medical/fhir/conversion.js +5 -0
  372. package/dist/packages/shared/src/medical/fhir/conversion.js.map +1 -0
  373. package/dist/packages/shared/src/medical/fhir/observations.d.ts +9 -0
  374. package/dist/packages/shared/src/medical/fhir/observations.d.ts.map +1 -0
  375. package/dist/packages/shared/src/medical/fhir/observations.js +56 -0
  376. package/dist/packages/shared/src/medical/fhir/observations.js.map +1 -0
  377. package/dist/packages/shared/src/medical/fhir/resources.d.ts +145 -0
  378. package/dist/packages/shared/src/medical/fhir/resources.d.ts.map +1 -0
  379. package/dist/packages/shared/src/medical/fhir/resources.js +81 -0
  380. package/dist/packages/shared/src/medical/fhir/resources.js.map +1 -0
  381. package/dist/packages/shared/src/medical/index.d.ts +7 -0
  382. package/dist/packages/shared/src/medical/index.d.ts.map +1 -0
  383. package/dist/packages/shared/src/medical/index.js +23 -0
  384. package/dist/packages/shared/src/medical/index.js.map +1 -0
  385. package/dist/packages/shared/src/medical/webhook/webhook-request.d.ts +1497 -0
  386. package/dist/packages/shared/src/medical/webhook/webhook-request.d.ts.map +1 -0
  387. package/dist/packages/shared/src/medical/webhook/webhook-request.js +139 -0
  388. package/dist/packages/shared/src/medical/webhook/webhook-request.js.map +1 -0
  389. package/dist/packages/shared/src/medical/webhook/webhook-status-response.d.ts +7 -0
  390. package/dist/packages/shared/src/medical/webhook/webhook-status-response.d.ts.map +1 -0
  391. package/dist/packages/shared/src/medical/webhook/webhook-status-response.js +3 -0
  392. package/dist/packages/shared/src/medical/webhook/webhook-status-response.js.map +1 -0
  393. package/dist/packages/shared/src/net/__tests__/axios.d.ts +92 -0
  394. package/dist/packages/shared/src/net/__tests__/axios.d.ts.map +1 -0
  395. package/dist/packages/shared/src/net/__tests__/axios.js +103 -0
  396. package/dist/packages/shared/src/net/__tests__/axios.js.map +1 -0
  397. package/dist/packages/shared/src/net/__tests__/retry.test.d.ts +2 -0
  398. package/dist/packages/shared/src/net/__tests__/retry.test.d.ts.map +1 -0
  399. package/dist/packages/shared/src/net/__tests__/retry.test.js +257 -0
  400. package/dist/packages/shared/src/net/__tests__/retry.test.js.map +1 -0
  401. package/dist/packages/shared/src/net/error.d.ts +35 -0
  402. package/dist/packages/shared/src/net/error.d.ts.map +1 -0
  403. package/dist/packages/shared/src/net/error.js +57 -0
  404. package/dist/packages/shared/src/net/error.js.map +1 -0
  405. package/dist/packages/shared/src/net/retry.d.ts +36 -0
  406. package/dist/packages/shared/src/net/retry.d.ts.map +1 -0
  407. package/dist/packages/shared/src/net/retry.js +104 -0
  408. package/dist/packages/shared/src/net/retry.js.map +1 -0
  409. package/dist/packages/shared/src/net/url.d.ts +2 -0
  410. package/dist/packages/shared/src/net/url.d.ts.map +1 -0
  411. package/dist/packages/shared/src/net/url.js +16 -0
  412. package/dist/packages/shared/src/net/url.js.map +1 -0
  413. package/package.json +2 -2
@@ -0,0 +1,1497 @@
1
+ import { z, ZodError, ZodFormattedError } from "zod";
2
+ import { SearchSetBundle } from "../fhir/bundle";
3
+ export declare const pingWebhookTypeSchema: z.ZodLiteral<"ping">;
4
+ export type PingWebhookType = z.infer<typeof pingWebhookTypeSchema>;
5
+ export declare const consolidatedWebhookTypeSchema: z.ZodLiteral<"medical.consolidated-data">;
6
+ export type ConsolidatedWebhookType = z.infer<typeof consolidatedWebhookTypeSchema>;
7
+ export declare const docDownloadWebhookTypeSchema: z.ZodLiteral<"medical.document-download">;
8
+ export type DocumentDownloadWebhookType = z.infer<typeof docDownloadWebhookTypeSchema>;
9
+ export declare const docConversionWebhookTypeSchema: z.ZodLiteral<"medical.document-conversion">;
10
+ export type DocumentConversionWebhookType = z.infer<typeof docConversionWebhookTypeSchema>;
11
+ export declare const docBulkDownloadWebhookTypeSchema: z.ZodLiteral<"medical.document-bulk-download-urls">;
12
+ export type DocumentBulkDownloadWebhookType = z.infer<typeof docBulkDownloadWebhookTypeSchema>;
13
+ export declare const mapiWebhookTypeSchema: z.ZodUnion<
14
+ [
15
+ z.ZodUnion<
16
+ [
17
+ z.ZodUnion<
18
+ [
19
+ z.ZodUnion<
20
+ [z.ZodLiteral<"medical.consolidated-data">, z.ZodLiteral<"medical.consolidated-data">]
21
+ >,
22
+ z.ZodLiteral<"medical.document-download">
23
+ ]
24
+ >,
25
+ z.ZodLiteral<"medical.document-conversion">
26
+ ]
27
+ >,
28
+ z.ZodLiteral<"medical.document-bulk-download-urls">
29
+ ]
30
+ >;
31
+ export type MAPIWebhookType = z.infer<typeof mapiWebhookTypeSchema>;
32
+ export declare const webhookTypeSchema: z.ZodUnion<
33
+ [
34
+ z.ZodLiteral<"ping">,
35
+ z.ZodUnion<
36
+ [
37
+ z.ZodUnion<
38
+ [
39
+ z.ZodUnion<
40
+ [
41
+ z.ZodUnion<
42
+ [
43
+ z.ZodLiteral<"medical.consolidated-data">,
44
+ z.ZodLiteral<"medical.consolidated-data">
45
+ ]
46
+ >,
47
+ z.ZodLiteral<"medical.document-download">
48
+ ]
49
+ >,
50
+ z.ZodLiteral<"medical.document-conversion">
51
+ ]
52
+ >,
53
+ z.ZodLiteral<"medical.document-bulk-download-urls">
54
+ ]
55
+ >
56
+ ]
57
+ >;
58
+ export type WebhookType = z.infer<typeof webhookTypeSchema>;
59
+ export declare const webhookRequestStatus: readonly ["processing", "success", "failure"];
60
+ export type WebhookRequestStatus = (typeof webhookRequestStatus)[number];
61
+ export declare const baseWebhookMetadataSchema: z.ZodObject<
62
+ {
63
+ messageId: z.ZodString;
64
+ when: z.ZodEffects<z.ZodString, string, string>;
65
+ /**
66
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
67
+ */
68
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
69
+ },
70
+ "strip",
71
+ z.ZodTypeAny,
72
+ {
73
+ messageId: string;
74
+ when: string;
75
+ data?: unknown;
76
+ },
77
+ {
78
+ messageId: string;
79
+ when: string;
80
+ data?: unknown;
81
+ }
82
+ >;
83
+ export declare const webhookMetadataSchema: z.ZodObject<
84
+ z.objectUtil.extendShape<
85
+ {
86
+ messageId: z.ZodString;
87
+ when: z.ZodEffects<z.ZodString, string, string>;
88
+ /**
89
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
90
+ */
91
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
92
+ },
93
+ {
94
+ type: z.ZodString;
95
+ }
96
+ >,
97
+ "strip",
98
+ z.ZodTypeAny,
99
+ {
100
+ type: string;
101
+ messageId: string;
102
+ when: string;
103
+ data?: unknown;
104
+ },
105
+ {
106
+ type: string;
107
+ messageId: string;
108
+ when: string;
109
+ data?: unknown;
110
+ }
111
+ >;
112
+ export type WebhookMetadata = z.infer<typeof webhookMetadataSchema>;
113
+ export declare const pingWebhookRequestDataSchema: z.ZodObject<
114
+ {
115
+ meta: z.ZodObject<
116
+ z.objectUtil.extendShape<
117
+ {
118
+ messageId: z.ZodString;
119
+ when: z.ZodEffects<z.ZodString, string, string>;
120
+ /**
121
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
122
+ */
123
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
124
+ },
125
+ {
126
+ type: z.ZodLiteral<"ping">;
127
+ }
128
+ >,
129
+ "strip",
130
+ z.ZodTypeAny,
131
+ {
132
+ type: "ping";
133
+ messageId: string;
134
+ when: string;
135
+ data?: unknown;
136
+ },
137
+ {
138
+ type: "ping";
139
+ messageId: string;
140
+ when: string;
141
+ data?: unknown;
142
+ }
143
+ >;
144
+ ping: z.ZodString;
145
+ },
146
+ "strip",
147
+ z.ZodTypeAny,
148
+ {
149
+ meta: {
150
+ type: "ping";
151
+ messageId: string;
152
+ when: string;
153
+ data?: unknown;
154
+ };
155
+ ping: string;
156
+ },
157
+ {
158
+ meta: {
159
+ type: "ping";
160
+ messageId: string;
161
+ when: string;
162
+ data?: unknown;
163
+ };
164
+ ping: string;
165
+ }
166
+ >;
167
+ export type PingWebhookRequest = z.infer<typeof pingWebhookRequestDataSchema>;
168
+ export declare const filtersSchema: z.ZodRecord<
169
+ z.ZodString,
170
+ z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>
171
+ >;
172
+ export declare const consolidatedWebhookPatientSchema: z.ZodObject<
173
+ {
174
+ patientId: z.ZodString;
175
+ externalId: z.ZodOptional<z.ZodString>;
176
+ status: z.ZodEnum<["completed", "failed"]>;
177
+ bundle: z.ZodType<
178
+ SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined,
179
+ z.ZodTypeDef,
180
+ SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined
181
+ >;
182
+ filters: z.ZodOptional<
183
+ z.ZodNullable<
184
+ z.ZodRecord<
185
+ z.ZodString,
186
+ z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>
187
+ >
188
+ >
189
+ >;
190
+ },
191
+ "strip",
192
+ z.ZodTypeAny,
193
+ {
194
+ status: "completed" | "failed";
195
+ patientId: string;
196
+ externalId?: string | undefined;
197
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
198
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
199
+ },
200
+ {
201
+ status: "completed" | "failed";
202
+ patientId: string;
203
+ externalId?: string | undefined;
204
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
205
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
206
+ }
207
+ >;
208
+ export type ConsolidatedWebhookPatient = z.infer<typeof consolidatedWebhookPatientSchema>;
209
+ export declare const consolidatedWebhookRequestSchema: z.ZodObject<
210
+ {
211
+ meta: z.ZodObject<
212
+ z.objectUtil.extendShape<
213
+ {
214
+ messageId: z.ZodString;
215
+ when: z.ZodEffects<z.ZodString, string, string>;
216
+ /**
217
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
218
+ */
219
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
220
+ },
221
+ {
222
+ type: z.ZodLiteral<"medical.consolidated-data">;
223
+ }
224
+ >,
225
+ "strip",
226
+ z.ZodTypeAny,
227
+ {
228
+ type: "medical.consolidated-data";
229
+ messageId: string;
230
+ when: string;
231
+ data?: unknown;
232
+ },
233
+ {
234
+ type: "medical.consolidated-data";
235
+ messageId: string;
236
+ when: string;
237
+ data?: unknown;
238
+ }
239
+ >;
240
+ patients: z.ZodArray<
241
+ z.ZodObject<
242
+ {
243
+ patientId: z.ZodString;
244
+ externalId: z.ZodOptional<z.ZodString>;
245
+ status: z.ZodEnum<["completed", "failed"]>;
246
+ bundle: z.ZodType<
247
+ SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined,
248
+ z.ZodTypeDef,
249
+ SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined
250
+ >;
251
+ filters: z.ZodOptional<
252
+ z.ZodNullable<
253
+ z.ZodRecord<
254
+ z.ZodString,
255
+ z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>
256
+ >
257
+ >
258
+ >;
259
+ },
260
+ "strip",
261
+ z.ZodTypeAny,
262
+ {
263
+ status: "completed" | "failed";
264
+ patientId: string;
265
+ externalId?: string | undefined;
266
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
267
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
268
+ },
269
+ {
270
+ status: "completed" | "failed";
271
+ patientId: string;
272
+ externalId?: string | undefined;
273
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
274
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
275
+ }
276
+ >,
277
+ "many"
278
+ >;
279
+ },
280
+ "strip",
281
+ z.ZodTypeAny,
282
+ {
283
+ patients: {
284
+ status: "completed" | "failed";
285
+ patientId: string;
286
+ externalId?: string | undefined;
287
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
288
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
289
+ }[];
290
+ meta: {
291
+ type: "medical.consolidated-data";
292
+ messageId: string;
293
+ when: string;
294
+ data?: unknown;
295
+ };
296
+ },
297
+ {
298
+ patients: {
299
+ status: "completed" | "failed";
300
+ patientId: string;
301
+ externalId?: string | undefined;
302
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
303
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
304
+ }[];
305
+ meta: {
306
+ type: "medical.consolidated-data";
307
+ messageId: string;
308
+ when: string;
309
+ data?: unknown;
310
+ };
311
+ }
312
+ >;
313
+ export type ConsolidatedWebhookRequest = z.infer<typeof consolidatedWebhookRequestSchema>;
314
+ export declare const documentDownloadWebhookPatientSchema: z.ZodObject<
315
+ {
316
+ patientId: z.ZodString;
317
+ status: z.ZodEnum<["completed", "failed"]>;
318
+ documents: z.ZodArray<
319
+ z.ZodObject<
320
+ {
321
+ id: z.ZodString;
322
+ fileName: z.ZodString;
323
+ description: z.ZodOptional<z.ZodString>;
324
+ status: z.ZodOptional<z.ZodString>;
325
+ indexed: z.ZodOptional<z.ZodString>;
326
+ mimeType: z.ZodOptional<z.ZodString>;
327
+ size: z.ZodOptional<z.ZodNumber>;
328
+ type: z.ZodOptional<
329
+ z.ZodObject<
330
+ {
331
+ coding: z.ZodOptional<
332
+ z.ZodArray<
333
+ z.ZodObject<
334
+ {
335
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
336
+ code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
337
+ display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
338
+ },
339
+ "strip",
340
+ z.ZodTypeAny,
341
+ {
342
+ code?: string | null | undefined;
343
+ system?: string | null | undefined;
344
+ display?: string | null | undefined;
345
+ },
346
+ {
347
+ code?: string | null | undefined;
348
+ system?: string | null | undefined;
349
+ display?: string | null | undefined;
350
+ }
351
+ >,
352
+ "many"
353
+ >
354
+ >;
355
+ text: z.ZodOptional<z.ZodString>;
356
+ },
357
+ "strip",
358
+ z.ZodTypeAny,
359
+ {
360
+ coding?:
361
+ | {
362
+ code?: string | null | undefined;
363
+ system?: string | null | undefined;
364
+ display?: string | null | undefined;
365
+ }[]
366
+ | undefined;
367
+ text?: string | undefined;
368
+ },
369
+ {
370
+ coding?:
371
+ | {
372
+ code?: string | null | undefined;
373
+ system?: string | null | undefined;
374
+ display?: string | null | undefined;
375
+ }[]
376
+ | undefined;
377
+ text?: string | undefined;
378
+ }
379
+ >
380
+ >;
381
+ },
382
+ "strip",
383
+ z.ZodTypeAny,
384
+ {
385
+ id: string;
386
+ fileName: string;
387
+ type?:
388
+ | {
389
+ coding?:
390
+ | {
391
+ code?: string | null | undefined;
392
+ system?: string | null | undefined;
393
+ display?: string | null | undefined;
394
+ }[]
395
+ | undefined;
396
+ text?: string | undefined;
397
+ }
398
+ | undefined;
399
+ status?: string | undefined;
400
+ description?: string | undefined;
401
+ indexed?: string | undefined;
402
+ mimeType?: string | undefined;
403
+ size?: number | undefined;
404
+ },
405
+ {
406
+ id: string;
407
+ fileName: string;
408
+ type?:
409
+ | {
410
+ coding?:
411
+ | {
412
+ code?: string | null | undefined;
413
+ system?: string | null | undefined;
414
+ display?: string | null | undefined;
415
+ }[]
416
+ | undefined;
417
+ text?: string | undefined;
418
+ }
419
+ | undefined;
420
+ status?: string | undefined;
421
+ description?: string | undefined;
422
+ indexed?: string | undefined;
423
+ mimeType?: string | undefined;
424
+ size?: number | undefined;
425
+ }
426
+ >,
427
+ "many"
428
+ >;
429
+ },
430
+ "strip",
431
+ z.ZodTypeAny,
432
+ {
433
+ status: "completed" | "failed";
434
+ patientId: string;
435
+ documents: {
436
+ id: string;
437
+ fileName: string;
438
+ type?:
439
+ | {
440
+ coding?:
441
+ | {
442
+ code?: string | null | undefined;
443
+ system?: string | null | undefined;
444
+ display?: string | null | undefined;
445
+ }[]
446
+ | undefined;
447
+ text?: string | undefined;
448
+ }
449
+ | undefined;
450
+ status?: string | undefined;
451
+ description?: string | undefined;
452
+ indexed?: string | undefined;
453
+ mimeType?: string | undefined;
454
+ size?: number | undefined;
455
+ }[];
456
+ },
457
+ {
458
+ status: "completed" | "failed";
459
+ patientId: string;
460
+ documents: {
461
+ id: string;
462
+ fileName: string;
463
+ type?:
464
+ | {
465
+ coding?:
466
+ | {
467
+ code?: string | null | undefined;
468
+ system?: string | null | undefined;
469
+ display?: string | null | undefined;
470
+ }[]
471
+ | undefined;
472
+ text?: string | undefined;
473
+ }
474
+ | undefined;
475
+ status?: string | undefined;
476
+ description?: string | undefined;
477
+ indexed?: string | undefined;
478
+ mimeType?: string | undefined;
479
+ size?: number | undefined;
480
+ }[];
481
+ }
482
+ >;
483
+ export type DocumentDownloadWebhookPatient = z.infer<typeof documentDownloadWebhookPatientSchema>;
484
+ export declare const documentDownloadWebhookRequestSchema: z.ZodObject<
485
+ {
486
+ meta: z.ZodObject<
487
+ z.objectUtil.extendShape<
488
+ {
489
+ messageId: z.ZodString;
490
+ when: z.ZodEffects<z.ZodString, string, string>;
491
+ /**
492
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
493
+ */
494
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
495
+ },
496
+ {
497
+ type: z.ZodLiteral<"medical.document-download">;
498
+ }
499
+ >,
500
+ "strip",
501
+ z.ZodTypeAny,
502
+ {
503
+ type: "medical.document-download";
504
+ messageId: string;
505
+ when: string;
506
+ data?: unknown;
507
+ },
508
+ {
509
+ type: "medical.document-download";
510
+ messageId: string;
511
+ when: string;
512
+ data?: unknown;
513
+ }
514
+ >;
515
+ patients: z.ZodArray<
516
+ z.ZodObject<
517
+ {
518
+ patientId: z.ZodString;
519
+ status: z.ZodEnum<["completed", "failed"]>;
520
+ documents: z.ZodArray<
521
+ z.ZodObject<
522
+ {
523
+ id: z.ZodString;
524
+ fileName: z.ZodString;
525
+ description: z.ZodOptional<z.ZodString>;
526
+ status: z.ZodOptional<z.ZodString>;
527
+ indexed: z.ZodOptional<z.ZodString>;
528
+ mimeType: z.ZodOptional<z.ZodString>;
529
+ size: z.ZodOptional<z.ZodNumber>;
530
+ type: z.ZodOptional<
531
+ z.ZodObject<
532
+ {
533
+ coding: z.ZodOptional<
534
+ z.ZodArray<
535
+ z.ZodObject<
536
+ {
537
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
538
+ code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
539
+ display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
540
+ },
541
+ "strip",
542
+ z.ZodTypeAny,
543
+ {
544
+ code?: string | null | undefined;
545
+ system?: string | null | undefined;
546
+ display?: string | null | undefined;
547
+ },
548
+ {
549
+ code?: string | null | undefined;
550
+ system?: string | null | undefined;
551
+ display?: string | null | undefined;
552
+ }
553
+ >,
554
+ "many"
555
+ >
556
+ >;
557
+ text: z.ZodOptional<z.ZodString>;
558
+ },
559
+ "strip",
560
+ z.ZodTypeAny,
561
+ {
562
+ coding?:
563
+ | {
564
+ code?: string | null | undefined;
565
+ system?: string | null | undefined;
566
+ display?: string | null | undefined;
567
+ }[]
568
+ | undefined;
569
+ text?: string | undefined;
570
+ },
571
+ {
572
+ coding?:
573
+ | {
574
+ code?: string | null | undefined;
575
+ system?: string | null | undefined;
576
+ display?: string | null | undefined;
577
+ }[]
578
+ | undefined;
579
+ text?: string | undefined;
580
+ }
581
+ >
582
+ >;
583
+ },
584
+ "strip",
585
+ z.ZodTypeAny,
586
+ {
587
+ id: string;
588
+ fileName: string;
589
+ type?:
590
+ | {
591
+ coding?:
592
+ | {
593
+ code?: string | null | undefined;
594
+ system?: string | null | undefined;
595
+ display?: string | null | undefined;
596
+ }[]
597
+ | undefined;
598
+ text?: string | undefined;
599
+ }
600
+ | undefined;
601
+ status?: string | undefined;
602
+ description?: string | undefined;
603
+ indexed?: string | undefined;
604
+ mimeType?: string | undefined;
605
+ size?: number | undefined;
606
+ },
607
+ {
608
+ id: string;
609
+ fileName: string;
610
+ type?:
611
+ | {
612
+ coding?:
613
+ | {
614
+ code?: string | null | undefined;
615
+ system?: string | null | undefined;
616
+ display?: string | null | undefined;
617
+ }[]
618
+ | undefined;
619
+ text?: string | undefined;
620
+ }
621
+ | undefined;
622
+ status?: string | undefined;
623
+ description?: string | undefined;
624
+ indexed?: string | undefined;
625
+ mimeType?: string | undefined;
626
+ size?: number | undefined;
627
+ }
628
+ >,
629
+ "many"
630
+ >;
631
+ },
632
+ "strip",
633
+ z.ZodTypeAny,
634
+ {
635
+ status: "completed" | "failed";
636
+ patientId: string;
637
+ documents: {
638
+ id: string;
639
+ fileName: string;
640
+ type?:
641
+ | {
642
+ coding?:
643
+ | {
644
+ code?: string | null | undefined;
645
+ system?: string | null | undefined;
646
+ display?: string | null | undefined;
647
+ }[]
648
+ | undefined;
649
+ text?: string | undefined;
650
+ }
651
+ | undefined;
652
+ status?: string | undefined;
653
+ description?: string | undefined;
654
+ indexed?: string | undefined;
655
+ mimeType?: string | undefined;
656
+ size?: number | undefined;
657
+ }[];
658
+ },
659
+ {
660
+ status: "completed" | "failed";
661
+ patientId: string;
662
+ documents: {
663
+ id: string;
664
+ fileName: string;
665
+ type?:
666
+ | {
667
+ coding?:
668
+ | {
669
+ code?: string | null | undefined;
670
+ system?: string | null | undefined;
671
+ display?: string | null | undefined;
672
+ }[]
673
+ | undefined;
674
+ text?: string | undefined;
675
+ }
676
+ | undefined;
677
+ status?: string | undefined;
678
+ description?: string | undefined;
679
+ indexed?: string | undefined;
680
+ mimeType?: string | undefined;
681
+ size?: number | undefined;
682
+ }[];
683
+ }
684
+ >,
685
+ "many"
686
+ >;
687
+ },
688
+ "strip",
689
+ z.ZodTypeAny,
690
+ {
691
+ patients: {
692
+ status: "completed" | "failed";
693
+ patientId: string;
694
+ documents: {
695
+ id: string;
696
+ fileName: string;
697
+ type?:
698
+ | {
699
+ coding?:
700
+ | {
701
+ code?: string | null | undefined;
702
+ system?: string | null | undefined;
703
+ display?: string | null | undefined;
704
+ }[]
705
+ | undefined;
706
+ text?: string | undefined;
707
+ }
708
+ | undefined;
709
+ status?: string | undefined;
710
+ description?: string | undefined;
711
+ indexed?: string | undefined;
712
+ mimeType?: string | undefined;
713
+ size?: number | undefined;
714
+ }[];
715
+ }[];
716
+ meta: {
717
+ type: "medical.document-download";
718
+ messageId: string;
719
+ when: string;
720
+ data?: unknown;
721
+ };
722
+ },
723
+ {
724
+ patients: {
725
+ status: "completed" | "failed";
726
+ patientId: string;
727
+ documents: {
728
+ id: string;
729
+ fileName: string;
730
+ type?:
731
+ | {
732
+ coding?:
733
+ | {
734
+ code?: string | null | undefined;
735
+ system?: string | null | undefined;
736
+ display?: string | null | undefined;
737
+ }[]
738
+ | undefined;
739
+ text?: string | undefined;
740
+ }
741
+ | undefined;
742
+ status?: string | undefined;
743
+ description?: string | undefined;
744
+ indexed?: string | undefined;
745
+ mimeType?: string | undefined;
746
+ size?: number | undefined;
747
+ }[];
748
+ }[];
749
+ meta: {
750
+ type: "medical.document-download";
751
+ messageId: string;
752
+ when: string;
753
+ data?: unknown;
754
+ };
755
+ }
756
+ >;
757
+ export type DocumentDownloadWebhookRequest = z.infer<typeof documentDownloadWebhookRequestSchema>;
758
+ export declare const documentConversionWebhookPatientSchema: z.ZodObject<
759
+ {
760
+ patientId: z.ZodString;
761
+ status: z.ZodEnum<["completed", "failed"]>;
762
+ },
763
+ "strip",
764
+ z.ZodTypeAny,
765
+ {
766
+ status: "completed" | "failed";
767
+ patientId: string;
768
+ },
769
+ {
770
+ status: "completed" | "failed";
771
+ patientId: string;
772
+ }
773
+ >;
774
+ export type DocumentConversionWebhookPatient = z.infer<
775
+ typeof documentConversionWebhookPatientSchema
776
+ >;
777
+ export declare const documentConversionWebhookRequestSchema: z.ZodObject<
778
+ {
779
+ meta: z.ZodObject<
780
+ z.objectUtil.extendShape<
781
+ {
782
+ messageId: z.ZodString;
783
+ when: z.ZodEffects<z.ZodString, string, string>;
784
+ /**
785
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
786
+ */
787
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
788
+ },
789
+ {
790
+ type: z.ZodLiteral<"medical.document-conversion">;
791
+ }
792
+ >,
793
+ "strip",
794
+ z.ZodTypeAny,
795
+ {
796
+ type: "medical.document-conversion";
797
+ messageId: string;
798
+ when: string;
799
+ data?: unknown;
800
+ },
801
+ {
802
+ type: "medical.document-conversion";
803
+ messageId: string;
804
+ when: string;
805
+ data?: unknown;
806
+ }
807
+ >;
808
+ patients: z.ZodArray<
809
+ z.ZodObject<
810
+ {
811
+ patientId: z.ZodString;
812
+ status: z.ZodEnum<["completed", "failed"]>;
813
+ },
814
+ "strip",
815
+ z.ZodTypeAny,
816
+ {
817
+ status: "completed" | "failed";
818
+ patientId: string;
819
+ },
820
+ {
821
+ status: "completed" | "failed";
822
+ patientId: string;
823
+ }
824
+ >,
825
+ "many"
826
+ >;
827
+ },
828
+ "strip",
829
+ z.ZodTypeAny,
830
+ {
831
+ patients: {
832
+ status: "completed" | "failed";
833
+ patientId: string;
834
+ }[];
835
+ meta: {
836
+ type: "medical.document-conversion";
837
+ messageId: string;
838
+ when: string;
839
+ data?: unknown;
840
+ };
841
+ },
842
+ {
843
+ patients: {
844
+ status: "completed" | "failed";
845
+ patientId: string;
846
+ }[];
847
+ meta: {
848
+ type: "medical.document-conversion";
849
+ messageId: string;
850
+ when: string;
851
+ data?: unknown;
852
+ };
853
+ }
854
+ >;
855
+ export type DocumentConversionWebhookRequest = z.infer<
856
+ typeof documentConversionWebhookRequestSchema
857
+ >;
858
+ export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<
859
+ {
860
+ meta: z.ZodObject<
861
+ z.objectUtil.extendShape<
862
+ {
863
+ messageId: z.ZodString;
864
+ when: z.ZodEffects<z.ZodString, string, string>;
865
+ /**
866
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
867
+ */
868
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
869
+ },
870
+ {
871
+ type: z.ZodLiteral<"medical.document-bulk-download-urls">;
872
+ }
873
+ >,
874
+ "strip",
875
+ z.ZodTypeAny,
876
+ {
877
+ type: "medical.document-bulk-download-urls";
878
+ messageId: string;
879
+ when: string;
880
+ data?: unknown;
881
+ },
882
+ {
883
+ type: "medical.document-bulk-download-urls";
884
+ messageId: string;
885
+ when: string;
886
+ data?: unknown;
887
+ }
888
+ >;
889
+ },
890
+ "strip",
891
+ z.ZodTypeAny,
892
+ {
893
+ meta: {
894
+ type: "medical.document-bulk-download-urls";
895
+ messageId: string;
896
+ when: string;
897
+ data?: unknown;
898
+ };
899
+ },
900
+ {
901
+ meta: {
902
+ type: "medical.document-bulk-download-urls";
903
+ messageId: string;
904
+ when: string;
905
+ data?: unknown;
906
+ };
907
+ }
908
+ >;
909
+ export type DocumentBulkDownloadWebhookRequest = z.infer<
910
+ typeof documentBulkDownloadWebhookRequestSchema
911
+ >;
912
+ export declare const webhookRequestSchema: z.ZodUnion<
913
+ [
914
+ z.ZodObject<
915
+ {
916
+ meta: z.ZodObject<
917
+ z.objectUtil.extendShape<
918
+ {
919
+ messageId: z.ZodString;
920
+ when: z.ZodEffects<z.ZodString, string, string>;
921
+ /**
922
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
923
+ */
924
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
925
+ },
926
+ {
927
+ type: z.ZodLiteral<"ping">;
928
+ }
929
+ >,
930
+ "strip",
931
+ z.ZodTypeAny,
932
+ {
933
+ type: "ping";
934
+ messageId: string;
935
+ when: string;
936
+ data?: unknown;
937
+ },
938
+ {
939
+ type: "ping";
940
+ messageId: string;
941
+ when: string;
942
+ data?: unknown;
943
+ }
944
+ >;
945
+ ping: z.ZodString;
946
+ },
947
+ "strip",
948
+ z.ZodTypeAny,
949
+ {
950
+ meta: {
951
+ type: "ping";
952
+ messageId: string;
953
+ when: string;
954
+ data?: unknown;
955
+ };
956
+ ping: string;
957
+ },
958
+ {
959
+ meta: {
960
+ type: "ping";
961
+ messageId: string;
962
+ when: string;
963
+ data?: unknown;
964
+ };
965
+ ping: string;
966
+ }
967
+ >,
968
+ z.ZodObject<
969
+ {
970
+ meta: z.ZodObject<
971
+ z.objectUtil.extendShape<
972
+ {
973
+ messageId: z.ZodString;
974
+ when: z.ZodEffects<z.ZodString, string, string>;
975
+ /**
976
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
977
+ */
978
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
979
+ },
980
+ {
981
+ type: z.ZodLiteral<"medical.consolidated-data">;
982
+ }
983
+ >,
984
+ "strip",
985
+ z.ZodTypeAny,
986
+ {
987
+ type: "medical.consolidated-data";
988
+ messageId: string;
989
+ when: string;
990
+ data?: unknown;
991
+ },
992
+ {
993
+ type: "medical.consolidated-data";
994
+ messageId: string;
995
+ when: string;
996
+ data?: unknown;
997
+ }
998
+ >;
999
+ patients: z.ZodArray<
1000
+ z.ZodObject<
1001
+ {
1002
+ patientId: z.ZodString;
1003
+ externalId: z.ZodOptional<z.ZodString>;
1004
+ status: z.ZodEnum<["completed", "failed"]>;
1005
+ bundle: z.ZodType<
1006
+ SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined,
1007
+ z.ZodTypeDef,
1008
+ SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined
1009
+ >;
1010
+ filters: z.ZodOptional<
1011
+ z.ZodNullable<
1012
+ z.ZodRecord<
1013
+ z.ZodString,
1014
+ z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>
1015
+ >
1016
+ >
1017
+ >;
1018
+ },
1019
+ "strip",
1020
+ z.ZodTypeAny,
1021
+ {
1022
+ status: "completed" | "failed";
1023
+ patientId: string;
1024
+ externalId?: string | undefined;
1025
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
1026
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
1027
+ },
1028
+ {
1029
+ status: "completed" | "failed";
1030
+ patientId: string;
1031
+ externalId?: string | undefined;
1032
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
1033
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
1034
+ }
1035
+ >,
1036
+ "many"
1037
+ >;
1038
+ },
1039
+ "strip",
1040
+ z.ZodTypeAny,
1041
+ {
1042
+ patients: {
1043
+ status: "completed" | "failed";
1044
+ patientId: string;
1045
+ externalId?: string | undefined;
1046
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
1047
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
1048
+ }[];
1049
+ meta: {
1050
+ type: "medical.consolidated-data";
1051
+ messageId: string;
1052
+ when: string;
1053
+ data?: unknown;
1054
+ };
1055
+ },
1056
+ {
1057
+ patients: {
1058
+ status: "completed" | "failed";
1059
+ patientId: string;
1060
+ externalId?: string | undefined;
1061
+ bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
1062
+ filters?: Record<string, string | boolean | null | undefined> | null | undefined;
1063
+ }[];
1064
+ meta: {
1065
+ type: "medical.consolidated-data";
1066
+ messageId: string;
1067
+ when: string;
1068
+ data?: unknown;
1069
+ };
1070
+ }
1071
+ >,
1072
+ z.ZodObject<
1073
+ {
1074
+ meta: z.ZodObject<
1075
+ z.objectUtil.extendShape<
1076
+ {
1077
+ messageId: z.ZodString;
1078
+ when: z.ZodEffects<z.ZodString, string, string>;
1079
+ /**
1080
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
1081
+ */
1082
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1083
+ },
1084
+ {
1085
+ type: z.ZodLiteral<"medical.document-download">;
1086
+ }
1087
+ >,
1088
+ "strip",
1089
+ z.ZodTypeAny,
1090
+ {
1091
+ type: "medical.document-download";
1092
+ messageId: string;
1093
+ when: string;
1094
+ data?: unknown;
1095
+ },
1096
+ {
1097
+ type: "medical.document-download";
1098
+ messageId: string;
1099
+ when: string;
1100
+ data?: unknown;
1101
+ }
1102
+ >;
1103
+ patients: z.ZodArray<
1104
+ z.ZodObject<
1105
+ {
1106
+ patientId: z.ZodString;
1107
+ status: z.ZodEnum<["completed", "failed"]>;
1108
+ documents: z.ZodArray<
1109
+ z.ZodObject<
1110
+ {
1111
+ id: z.ZodString;
1112
+ fileName: z.ZodString;
1113
+ description: z.ZodOptional<z.ZodString>;
1114
+ status: z.ZodOptional<z.ZodString>;
1115
+ indexed: z.ZodOptional<z.ZodString>;
1116
+ mimeType: z.ZodOptional<z.ZodString>;
1117
+ size: z.ZodOptional<z.ZodNumber>;
1118
+ type: z.ZodOptional<
1119
+ z.ZodObject<
1120
+ {
1121
+ coding: z.ZodOptional<
1122
+ z.ZodArray<
1123
+ z.ZodObject<
1124
+ {
1125
+ system: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1126
+ code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1127
+ display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1128
+ },
1129
+ "strip",
1130
+ z.ZodTypeAny,
1131
+ {
1132
+ code?: string | null | undefined;
1133
+ system?: string | null | undefined;
1134
+ display?: string | null | undefined;
1135
+ },
1136
+ {
1137
+ code?: string | null | undefined;
1138
+ system?: string | null | undefined;
1139
+ display?: string | null | undefined;
1140
+ }
1141
+ >,
1142
+ "many"
1143
+ >
1144
+ >;
1145
+ text: z.ZodOptional<z.ZodString>;
1146
+ },
1147
+ "strip",
1148
+ z.ZodTypeAny,
1149
+ {
1150
+ coding?:
1151
+ | {
1152
+ code?: string | null | undefined;
1153
+ system?: string | null | undefined;
1154
+ display?: string | null | undefined;
1155
+ }[]
1156
+ | undefined;
1157
+ text?: string | undefined;
1158
+ },
1159
+ {
1160
+ coding?:
1161
+ | {
1162
+ code?: string | null | undefined;
1163
+ system?: string | null | undefined;
1164
+ display?: string | null | undefined;
1165
+ }[]
1166
+ | undefined;
1167
+ text?: string | undefined;
1168
+ }
1169
+ >
1170
+ >;
1171
+ },
1172
+ "strip",
1173
+ z.ZodTypeAny,
1174
+ {
1175
+ id: string;
1176
+ fileName: string;
1177
+ type?:
1178
+ | {
1179
+ coding?:
1180
+ | {
1181
+ code?: string | null | undefined;
1182
+ system?: string | null | undefined;
1183
+ display?: string | null | undefined;
1184
+ }[]
1185
+ | undefined;
1186
+ text?: string | undefined;
1187
+ }
1188
+ | undefined;
1189
+ status?: string | undefined;
1190
+ description?: string | undefined;
1191
+ indexed?: string | undefined;
1192
+ mimeType?: string | undefined;
1193
+ size?: number | undefined;
1194
+ },
1195
+ {
1196
+ id: string;
1197
+ fileName: string;
1198
+ type?:
1199
+ | {
1200
+ coding?:
1201
+ | {
1202
+ code?: string | null | undefined;
1203
+ system?: string | null | undefined;
1204
+ display?: string | null | undefined;
1205
+ }[]
1206
+ | undefined;
1207
+ text?: string | undefined;
1208
+ }
1209
+ | undefined;
1210
+ status?: string | undefined;
1211
+ description?: string | undefined;
1212
+ indexed?: string | undefined;
1213
+ mimeType?: string | undefined;
1214
+ size?: number | undefined;
1215
+ }
1216
+ >,
1217
+ "many"
1218
+ >;
1219
+ },
1220
+ "strip",
1221
+ z.ZodTypeAny,
1222
+ {
1223
+ status: "completed" | "failed";
1224
+ patientId: string;
1225
+ documents: {
1226
+ id: string;
1227
+ fileName: string;
1228
+ type?:
1229
+ | {
1230
+ coding?:
1231
+ | {
1232
+ code?: string | null | undefined;
1233
+ system?: string | null | undefined;
1234
+ display?: string | null | undefined;
1235
+ }[]
1236
+ | undefined;
1237
+ text?: string | undefined;
1238
+ }
1239
+ | undefined;
1240
+ status?: string | undefined;
1241
+ description?: string | undefined;
1242
+ indexed?: string | undefined;
1243
+ mimeType?: string | undefined;
1244
+ size?: number | undefined;
1245
+ }[];
1246
+ },
1247
+ {
1248
+ status: "completed" | "failed";
1249
+ patientId: string;
1250
+ documents: {
1251
+ id: string;
1252
+ fileName: string;
1253
+ type?:
1254
+ | {
1255
+ coding?:
1256
+ | {
1257
+ code?: string | null | undefined;
1258
+ system?: string | null | undefined;
1259
+ display?: string | null | undefined;
1260
+ }[]
1261
+ | undefined;
1262
+ text?: string | undefined;
1263
+ }
1264
+ | undefined;
1265
+ status?: string | undefined;
1266
+ description?: string | undefined;
1267
+ indexed?: string | undefined;
1268
+ mimeType?: string | undefined;
1269
+ size?: number | undefined;
1270
+ }[];
1271
+ }
1272
+ >,
1273
+ "many"
1274
+ >;
1275
+ },
1276
+ "strip",
1277
+ z.ZodTypeAny,
1278
+ {
1279
+ patients: {
1280
+ status: "completed" | "failed";
1281
+ patientId: string;
1282
+ documents: {
1283
+ id: string;
1284
+ fileName: string;
1285
+ type?:
1286
+ | {
1287
+ coding?:
1288
+ | {
1289
+ code?: string | null | undefined;
1290
+ system?: string | null | undefined;
1291
+ display?: string | null | undefined;
1292
+ }[]
1293
+ | undefined;
1294
+ text?: string | undefined;
1295
+ }
1296
+ | undefined;
1297
+ status?: string | undefined;
1298
+ description?: string | undefined;
1299
+ indexed?: string | undefined;
1300
+ mimeType?: string | undefined;
1301
+ size?: number | undefined;
1302
+ }[];
1303
+ }[];
1304
+ meta: {
1305
+ type: "medical.document-download";
1306
+ messageId: string;
1307
+ when: string;
1308
+ data?: unknown;
1309
+ };
1310
+ },
1311
+ {
1312
+ patients: {
1313
+ status: "completed" | "failed";
1314
+ patientId: string;
1315
+ documents: {
1316
+ id: string;
1317
+ fileName: string;
1318
+ type?:
1319
+ | {
1320
+ coding?:
1321
+ | {
1322
+ code?: string | null | undefined;
1323
+ system?: string | null | undefined;
1324
+ display?: string | null | undefined;
1325
+ }[]
1326
+ | undefined;
1327
+ text?: string | undefined;
1328
+ }
1329
+ | undefined;
1330
+ status?: string | undefined;
1331
+ description?: string | undefined;
1332
+ indexed?: string | undefined;
1333
+ mimeType?: string | undefined;
1334
+ size?: number | undefined;
1335
+ }[];
1336
+ }[];
1337
+ meta: {
1338
+ type: "medical.document-download";
1339
+ messageId: string;
1340
+ when: string;
1341
+ data?: unknown;
1342
+ };
1343
+ }
1344
+ >,
1345
+ z.ZodObject<
1346
+ {
1347
+ meta: z.ZodObject<
1348
+ z.objectUtil.extendShape<
1349
+ {
1350
+ messageId: z.ZodString;
1351
+ when: z.ZodEffects<z.ZodString, string, string>;
1352
+ /**
1353
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
1354
+ */
1355
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1356
+ },
1357
+ {
1358
+ type: z.ZodLiteral<"medical.document-conversion">;
1359
+ }
1360
+ >,
1361
+ "strip",
1362
+ z.ZodTypeAny,
1363
+ {
1364
+ type: "medical.document-conversion";
1365
+ messageId: string;
1366
+ when: string;
1367
+ data?: unknown;
1368
+ },
1369
+ {
1370
+ type: "medical.document-conversion";
1371
+ messageId: string;
1372
+ when: string;
1373
+ data?: unknown;
1374
+ }
1375
+ >;
1376
+ patients: z.ZodArray<
1377
+ z.ZodObject<
1378
+ {
1379
+ patientId: z.ZodString;
1380
+ status: z.ZodEnum<["completed", "failed"]>;
1381
+ },
1382
+ "strip",
1383
+ z.ZodTypeAny,
1384
+ {
1385
+ status: "completed" | "failed";
1386
+ patientId: string;
1387
+ },
1388
+ {
1389
+ status: "completed" | "failed";
1390
+ patientId: string;
1391
+ }
1392
+ >,
1393
+ "many"
1394
+ >;
1395
+ },
1396
+ "strip",
1397
+ z.ZodTypeAny,
1398
+ {
1399
+ patients: {
1400
+ status: "completed" | "failed";
1401
+ patientId: string;
1402
+ }[];
1403
+ meta: {
1404
+ type: "medical.document-conversion";
1405
+ messageId: string;
1406
+ when: string;
1407
+ data?: unknown;
1408
+ };
1409
+ },
1410
+ {
1411
+ patients: {
1412
+ status: "completed" | "failed";
1413
+ patientId: string;
1414
+ }[];
1415
+ meta: {
1416
+ type: "medical.document-conversion";
1417
+ messageId: string;
1418
+ when: string;
1419
+ data?: unknown;
1420
+ };
1421
+ }
1422
+ >,
1423
+ z.ZodObject<
1424
+ {
1425
+ meta: z.ZodObject<
1426
+ z.objectUtil.extendShape<
1427
+ {
1428
+ messageId: z.ZodString;
1429
+ when: z.ZodEffects<z.ZodString, string, string>;
1430
+ /**
1431
+ * The metadata sent by the customer when they triggered the operation that resulted in this webhook.
1432
+ */
1433
+ data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1434
+ },
1435
+ {
1436
+ type: z.ZodLiteral<"medical.document-bulk-download-urls">;
1437
+ }
1438
+ >,
1439
+ "strip",
1440
+ z.ZodTypeAny,
1441
+ {
1442
+ type: "medical.document-bulk-download-urls";
1443
+ messageId: string;
1444
+ when: string;
1445
+ data?: unknown;
1446
+ },
1447
+ {
1448
+ type: "medical.document-bulk-download-urls";
1449
+ messageId: string;
1450
+ when: string;
1451
+ data?: unknown;
1452
+ }
1453
+ >;
1454
+ },
1455
+ "strip",
1456
+ z.ZodTypeAny,
1457
+ {
1458
+ meta: {
1459
+ type: "medical.document-bulk-download-urls";
1460
+ messageId: string;
1461
+ when: string;
1462
+ data?: unknown;
1463
+ };
1464
+ },
1465
+ {
1466
+ meta: {
1467
+ type: "medical.document-bulk-download-urls";
1468
+ messageId: string;
1469
+ when: string;
1470
+ data?: unknown;
1471
+ };
1472
+ }
1473
+ >
1474
+ ]
1475
+ >;
1476
+ export type WebhookRequest = z.infer<typeof webhookRequestSchema>;
1477
+ export declare class WebhookRequestParsingFailure {
1478
+ readonly errors: ZodError<WebhookRequest>;
1479
+ readonly flattened: ZodFormattedError<WebhookRequest>;
1480
+ constructor(errors: ZodError<WebhookRequest>, flattened: ZodFormattedError<WebhookRequest>);
1481
+ }
1482
+ export declare function isPingWebhookRequest(
1483
+ whRequest: WebhookRequest
1484
+ ): whRequest is PingWebhookRequest;
1485
+ export declare function isConsolidatedWebhookRequest(
1486
+ whRequest: WebhookRequest
1487
+ ): whRequest is ConsolidatedWebhookRequest;
1488
+ export declare function isDocumentDownloadWebhookRequest(
1489
+ whRequest: WebhookRequest
1490
+ ): whRequest is DocumentDownloadWebhookRequest;
1491
+ export declare function isDocumentConversionWebhookRequest(
1492
+ whRequest: WebhookRequest
1493
+ ): whRequest is DocumentConversionWebhookRequest;
1494
+ export declare function isDocumentBulkDownloadWebhookRequest(
1495
+ whRequest: WebhookRequest
1496
+ ): whRequest is DocumentBulkDownloadWebhookRequest;
1497
+ //# sourceMappingURL=webhook-request.d.ts.map