@metriport/shared 0.33.1-alpha.0 → 0.33.1

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 (421) hide show
  1. package/dist/__tests__/env-setup.js +17 -7
  2. package/dist/__tests__/env-setup.js.map +1 -1
  3. package/dist/common/__tests__/npi.js +1 -2
  4. package/dist/common/__tests__/npi.js.map +1 -1
  5. package/dist/common/__tests__/oid.js +1 -2
  6. package/dist/common/__tests__/oid.js.map +1 -1
  7. package/dist/common/__tests__/retry.test.js.map +1 -1
  8. package/dist/common/__tests__/validate-npi.test.js.map +1 -1
  9. package/dist/common/array.js +1 -2
  10. package/dist/common/array.js.map +1 -1
  11. package/dist/common/boolean.js +2 -3
  12. package/dist/common/boolean.js.map +1 -1
  13. package/dist/common/date.js +18 -18
  14. package/dist/common/date.js.map +1 -1
  15. package/dist/common/demographics.d.ts +2 -2
  16. package/dist/common/demographics.d.ts.map +1 -1
  17. package/dist/common/demographics.js +7 -7
  18. package/dist/common/demographics.js.map +1 -1
  19. package/dist/common/duration.js +1 -2
  20. package/dist/common/duration.js.map +1 -1
  21. package/dist/common/email.js +1 -2
  22. package/dist/common/email.js.map +1 -1
  23. package/dist/common/env-var.js +7 -7
  24. package/dist/common/env-var.js.map +1 -1
  25. package/dist/common/filter-map.js +1 -2
  26. package/dist/common/filter-map.js.map +1 -1
  27. package/dist/common/general.js +2 -3
  28. package/dist/common/general.js.map +1 -1
  29. package/dist/common/html.js +1 -2
  30. package/dist/common/html.js.map +1 -1
  31. package/dist/common/merge-settings.js +1 -2
  32. package/dist/common/merge-settings.js.map +1 -1
  33. package/dist/common/net.js +1 -2
  34. package/dist/common/net.js.map +1 -1
  35. package/dist/common/normalize-oid.js +2 -3
  36. package/dist/common/normalize-oid.js.map +1 -1
  37. package/dist/common/numbers.js +6 -7
  38. package/dist/common/numbers.js.map +1 -1
  39. package/dist/common/purpose-of-use.js +3 -3
  40. package/dist/common/purpose-of-use.js.map +1 -1
  41. package/dist/common/response.js +2 -3
  42. package/dist/common/response.js.map +1 -1
  43. package/dist/common/retry.js +4 -4
  44. package/dist/common/retry.js.map +1 -1
  45. package/dist/common/sleep.js +2 -3
  46. package/dist/common/sleep.js.map +1 -1
  47. package/dist/common/string.js +6 -7
  48. package/dist/common/string.js.map +1 -1
  49. package/dist/common/timer.d.ts.map +1 -1
  50. package/dist/common/timer.js +1 -2
  51. package/dist/common/timer.js.map +1 -1
  52. package/dist/common/title-case.js +2 -3
  53. package/dist/common/title-case.js.map +1 -1
  54. package/dist/common/types.js +2 -3
  55. package/dist/common/types.js.map +1 -1
  56. package/dist/common/uuid.js +1 -2
  57. package/dist/common/uuid.js.map +1 -1
  58. package/dist/common/validate-npi.js +1 -2
  59. package/dist/common/validate-npi.js.map +1 -1
  60. package/dist/common/xml-parser.js +1 -2
  61. package/dist/common/xml-parser.js.map +1 -1
  62. package/dist/common/zod.js.map +1 -1
  63. package/dist/domain/__tests__/dob.test.js.map +1 -1
  64. package/dist/domain/__tests__/gender.test.js.map +1 -1
  65. package/dist/domain/address/__tests__/country.test.js.map +1 -1
  66. package/dist/domain/address/__tests__/state.test.js.map +1 -1
  67. package/dist/domain/address/__tests__/territory.test.js.map +1 -1
  68. package/dist/domain/address/__tests__/zip.test.js +5 -5
  69. package/dist/domain/address/__tests__/zip.test.js.map +1 -1
  70. package/dist/domain/address/city.js +1 -2
  71. package/dist/domain/address/city.js.map +1 -1
  72. package/dist/domain/address/country.js +3 -3
  73. package/dist/domain/address/country.js.map +1 -1
  74. package/dist/domain/address/index.js +2 -3
  75. package/dist/domain/address/index.js.map +1 -1
  76. package/dist/domain/address/state.js +6 -6
  77. package/dist/domain/address/state.js.map +1 -1
  78. package/dist/domain/address/territory.js +4 -4
  79. package/dist/domain/address/territory.js.map +1 -1
  80. package/dist/domain/address/zip.js +7 -7
  81. package/dist/domain/address/zip.js.map +1 -1
  82. package/dist/domain/baseDto.js +1 -2
  83. package/dist/domain/baseDto.js.map +1 -1
  84. package/dist/domain/cohort.d.ts.map +1 -1
  85. package/dist/domain/cohort.js +4 -4
  86. package/dist/domain/cohort.js.map +1 -1
  87. package/dist/domain/consolidated/ai-brief-cache-mode.d.ts +11 -0
  88. package/dist/domain/consolidated/ai-brief-cache-mode.d.ts.map +1 -0
  89. package/dist/domain/consolidated/ai-brief-cache-mode.js +17 -0
  90. package/dist/domain/consolidated/ai-brief-cache-mode.js.map +1 -0
  91. package/dist/domain/consolidated/filename.d.ts +4 -0
  92. package/dist/domain/consolidated/filename.d.ts.map +1 -0
  93. package/dist/domain/consolidated/filename.js +7 -0
  94. package/dist/domain/consolidated/filename.js.map +1 -0
  95. package/dist/domain/consolidated/index.d.ts +4 -0
  96. package/dist/domain/consolidated/index.d.ts.map +1 -0
  97. package/dist/domain/consolidated/index.js +20 -0
  98. package/dist/domain/consolidated/index.js.map +1 -0
  99. package/dist/domain/consolidated/recreate/event-type.js +1 -1
  100. package/dist/domain/consolidated/recreate/event-type.js.map +1 -1
  101. package/dist/domain/consolidated/recreate/supported-event-types.d.ts +2 -1
  102. package/dist/domain/consolidated/recreate/supported-event-types.d.ts.map +1 -1
  103. package/dist/domain/consolidated/recreate/supported-event-types.js +13 -9
  104. package/dist/domain/consolidated/recreate/supported-event-types.js.map +1 -1
  105. package/dist/domain/contact/__tests__/phone.test.js.map +1 -1
  106. package/dist/domain/contact/email.js +9 -9
  107. package/dist/domain/contact/email.js.map +1 -1
  108. package/dist/domain/contact/phone.js +7 -7
  109. package/dist/domain/contact/phone.js.map +1 -1
  110. package/dist/domain/cql-engine/transform.d.ts +2 -2
  111. package/dist/domain/cql-engine/transform.js.map +1 -1
  112. package/dist/domain/cursor-utils.js +3 -4
  113. package/dist/domain/cursor-utils.js.map +1 -1
  114. package/dist/domain/customer.d.ts +24 -24
  115. package/dist/domain/customer.js +2 -2
  116. package/dist/domain/customer.js.map +1 -1
  117. package/dist/domain/db.d.ts +5 -5
  118. package/dist/domain/db.js +2 -2
  119. package/dist/domain/db.js.map +1 -1
  120. package/dist/domain/dob.js +2 -3
  121. package/dist/domain/dob.js.map +1 -1
  122. package/dist/domain/externalId.js +1 -2
  123. package/dist/domain/externalId.js.map +1 -1
  124. package/dist/domain/gender.js +3 -3
  125. package/dist/domain/gender.js.map +1 -1
  126. package/dist/domain/job/job-status.d.ts.map +1 -1
  127. package/dist/domain/job/job-status.js +4 -4
  128. package/dist/domain/job/job-status.js.map +1 -1
  129. package/dist/domain/job/patient-job.d.ts.map +1 -1
  130. package/dist/domain/job/types.d.ts.map +1 -1
  131. package/dist/domain/job/types.js +2 -2
  132. package/dist/domain/job/types.js.map +1 -1
  133. package/dist/domain/metriport.d.ts.map +1 -1
  134. package/dist/domain/network-query/__tests__/source.test.js.map +1 -1
  135. package/dist/domain/network-query/query.d.ts +57 -57
  136. package/dist/domain/network-query/query.js.map +1 -1
  137. package/dist/domain/network-query/source.d.ts +66 -66
  138. package/dist/domain/network-query/source.d.ts.map +1 -1
  139. package/dist/domain/network-query/source.js +12 -12
  140. package/dist/domain/network-query/source.js.map +1 -1
  141. package/dist/domain/network-query/supported-event-types.js +2 -2
  142. package/dist/domain/network-query/supported-event-types.js.map +1 -1
  143. package/dist/domain/notification-webhooks/types.js +4 -4
  144. package/dist/domain/notification-webhooks/types.js.map +1 -1
  145. package/dist/domain/organization.d.ts +20 -20
  146. package/dist/domain/organization.js +2 -2
  147. package/dist/domain/organization.js.map +1 -1
  148. package/dist/domain/pagination-v2.d.ts +24 -24
  149. package/dist/domain/pagination-v2.d.ts.map +1 -1
  150. package/dist/domain/pagination-v2.js +2 -2
  151. package/dist/domain/pagination-v2.js.map +1 -1
  152. package/dist/domain/pagination.d.ts +2 -2
  153. package/dist/domain/pagination.js +2 -2
  154. package/dist/domain/pagination.js.map +1 -1
  155. package/dist/domain/patient/__tests__/ssn.test.js.map +1 -1
  156. package/dist/domain/patient/patient-import/__tests__/status.test.js.map +1 -1
  157. package/dist/domain/patient/patient-import/__tests__/types.js +2 -3
  158. package/dist/domain/patient/patient-import/__tests__/types.js.map +1 -1
  159. package/dist/domain/patient/patient-import/create.js +2 -2
  160. package/dist/domain/patient/patient-import/create.js.map +1 -1
  161. package/dist/domain/patient/patient-import/metadata.js +2 -3
  162. package/dist/domain/patient/patient-import/metadata.js.map +1 -1
  163. package/dist/domain/patient/patient-import/schemas.d.ts +7 -7
  164. package/dist/domain/patient/patient-import/status.d.ts.map +1 -1
  165. package/dist/domain/patient/patient-import/status.js +3 -3
  166. package/dist/domain/patient/patient-import/status.js.map +1 -1
  167. package/dist/domain/patient/patient-import/types.d.ts.map +1 -1
  168. package/dist/domain/patient/patient-import/types.js +3 -3
  169. package/dist/domain/patient/patient-import/types.js.map +1 -1
  170. package/dist/domain/patient/patient-monitoring/discharge-requery.d.ts +56 -56
  171. package/dist/domain/patient/patient-monitoring/discharge-requery.js +3 -3
  172. package/dist/domain/patient/patient-monitoring/discharge-requery.js.map +1 -1
  173. package/dist/domain/patient/patient-monitoring/utils.d.ts +1 -1
  174. package/dist/domain/patient/patient-monitoring/utils.d.ts.map +1 -1
  175. package/dist/domain/patient/patient-monitoring/utils.js +7 -7
  176. package/dist/domain/patient/patient-monitoring/utils.js.map +1 -1
  177. package/dist/domain/patient/patient-settings.d.ts +4 -4
  178. package/dist/domain/patient/patient-settings.js.map +1 -1
  179. package/dist/domain/patient/ssn.js +2 -3
  180. package/dist/domain/patient/ssn.js.map +1 -1
  181. package/dist/domain/patient-or-all.js +2 -2
  182. package/dist/domain/patient-or-all.js.map +1 -1
  183. package/dist/domain/patient.d.ts +24 -24
  184. package/dist/domain/rate-limiting/index.d.ts.map +1 -1
  185. package/dist/domain/rate-limiting/index.js +3 -3
  186. package/dist/domain/rate-limiting/index.js.map +1 -1
  187. package/dist/domain/roster/patient-roster-added-by.js +3 -3
  188. package/dist/domain/roster/patient-roster-added-by.js.map +1 -1
  189. package/dist/domain/roster/roster-status.d.ts.map +1 -1
  190. package/dist/domain/roster/roster-status.js +5 -5
  191. package/dist/domain/roster/roster-status.js.map +1 -1
  192. package/dist/domain/tcm-encounter.d.ts +76 -76
  193. package/dist/domain/tcm-encounter.d.ts.map +1 -1
  194. package/dist/domain/tcm-encounter.js.map +1 -1
  195. package/dist/error/bad-request.d.ts.map +1 -1
  196. package/dist/error/bad-request.js.map +1 -1
  197. package/dist/error/metriport-error.d.ts.map +1 -1
  198. package/dist/error/metriport-error.js +2 -2
  199. package/dist/error/metriport-error.js.map +1 -1
  200. package/dist/error/not-found.d.ts.map +1 -1
  201. package/dist/error/not-found.js.map +1 -1
  202. package/dist/error/shared.js +5 -6
  203. package/dist/error/shared.js.map +1 -1
  204. package/dist/error/too-many-requests.d.ts.map +1 -1
  205. package/dist/error/too-many-requests.js.map +1 -1
  206. package/dist/external/ehr/practicefusion/shared.js +1 -2
  207. package/dist/external/ehr/practicefusion/shared.js.map +1 -1
  208. package/dist/external/hl7v2/constants.js +4 -4
  209. package/dist/external/hl7v2/constants.js.map +1 -1
  210. package/dist/external/ihe/constants.d.ts.map +1 -1
  211. package/dist/external/ihe/constants.js +50 -50
  212. package/dist/external/ihe/constants.js.map +1 -1
  213. package/dist/external/ihe/shared.js +4 -5
  214. package/dist/external/ihe/shared.js.map +1 -1
  215. package/dist/external/zod/__tests__/iso-date.test.js +32 -32
  216. package/dist/external/zod/__tests__/iso-date.test.js.map +1 -1
  217. package/dist/external/zod/date.js +2 -2
  218. package/dist/external/zod/date.js.map +1 -1
  219. package/dist/external/zod/string.d.ts +4 -4
  220. package/dist/external/zod/string.d.ts.map +1 -1
  221. package/dist/external/zod/string.js +4 -4
  222. package/dist/external/zod/string.js.map +1 -1
  223. package/dist/external/zod/us-state.js +1 -2
  224. package/dist/external/zod/us-state.js.map +1 -1
  225. package/dist/index.js +17 -7
  226. package/dist/index.js.map +1 -1
  227. package/dist/interface/external/ehr/athenahealth/allergy.d.ts +12 -12
  228. package/dist/interface/external/ehr/athenahealth/allergy.js.map +1 -1
  229. package/dist/interface/external/ehr/athenahealth/appointment.d.ts +12 -12
  230. package/dist/interface/external/ehr/athenahealth/appointment.js.map +1 -1
  231. package/dist/interface/external/ehr/athenahealth/cx-mapping.d.ts +51 -51
  232. package/dist/interface/external/ehr/athenahealth/department.js.map +1 -1
  233. package/dist/interface/external/ehr/athenahealth/encounter.d.ts +4 -4
  234. package/dist/interface/external/ehr/athenahealth/family-history.d.ts +52 -52
  235. package/dist/interface/external/ehr/athenahealth/jwt-token.d.ts +4 -4
  236. package/dist/interface/external/ehr/athenahealth/jwt-token.js.map +1 -1
  237. package/dist/interface/external/ehr/athenahealth/patient.js.map +1 -1
  238. package/dist/interface/external/ehr/canvas/allergen.d.ts +2 -2
  239. package/dist/interface/external/ehr/canvas/appointment.d.ts +32 -32
  240. package/dist/interface/external/ehr/canvas/appointment.js.map +1 -1
  241. package/dist/interface/external/ehr/canvas/cx-mapping.d.ts +49 -49
  242. package/dist/interface/external/ehr/canvas/external-event.d.ts +4 -4
  243. package/dist/interface/external/ehr/canvas/external-event.d.ts.map +1 -1
  244. package/dist/interface/external/ehr/canvas/external-event.js.map +1 -1
  245. package/dist/interface/external/ehr/canvas/jwt-token.d.ts +8 -8
  246. package/dist/interface/external/ehr/canvas/jwt-token.js.map +1 -1
  247. package/dist/interface/external/ehr/canvas/note.js.map +1 -1
  248. package/dist/interface/external/ehr/eclinicalworks/cx-mapping.d.ts +49 -49
  249. package/dist/interface/external/ehr/eclinicalworks/jwt-token.d.ts +4 -4
  250. package/dist/interface/external/ehr/eclinicalworks/jwt-token.js.map +1 -1
  251. package/dist/interface/external/ehr/elation/appointment.d.ts +8 -8
  252. package/dist/interface/external/ehr/elation/appointment.js.map +1 -1
  253. package/dist/interface/external/ehr/elation/cx-mapping.d.ts +55 -55
  254. package/dist/interface/external/ehr/elation/event.d.ts +25 -25
  255. package/dist/interface/external/ehr/elation/jwt-token.d.ts +6 -6
  256. package/dist/interface/external/ehr/elation/jwt-token.js.map +1 -1
  257. package/dist/interface/external/ehr/elation/patient.d.ts +18 -18
  258. package/dist/interface/external/ehr/elation/practice.d.ts +6 -6
  259. package/dist/interface/external/ehr/elation/practice.js.map +1 -1
  260. package/dist/interface/external/ehr/elation/subscription.d.ts +8 -8
  261. package/dist/interface/external/ehr/elation/subscription.d.ts.map +1 -1
  262. package/dist/interface/external/ehr/elation/subscription.js +2 -2
  263. package/dist/interface/external/ehr/elation/subscription.js.map +1 -1
  264. package/dist/interface/external/ehr/embed/jwt-token.d.ts +2 -2
  265. package/dist/interface/external/ehr/embed/jwt-token.js.map +1 -1
  266. package/dist/interface/external/ehr/fhir-resource.d.ts +38 -38
  267. package/dist/interface/external/ehr/fhir-resource.js +4 -4
  268. package/dist/interface/external/ehr/fhir-resource.js.map +1 -1
  269. package/dist/interface/external/ehr/healthie/allergy.d.ts +64 -64
  270. package/dist/interface/external/ehr/healthie/allergy.js.map +1 -1
  271. package/dist/interface/external/ehr/healthie/appointment.js.map +1 -1
  272. package/dist/interface/external/ehr/healthie/condition.d.ts +10 -10
  273. package/dist/interface/external/ehr/healthie/condition.js.map +1 -1
  274. package/dist/interface/external/ehr/healthie/cx-mapping.d.ts +124 -124
  275. package/dist/interface/external/ehr/healthie/cx-mapping.js.map +1 -1
  276. package/dist/interface/external/ehr/healthie/event.d.ts +6 -6
  277. package/dist/interface/external/ehr/healthie/form-answer-group.d.ts +99 -99
  278. package/dist/interface/external/ehr/healthie/form-answer-group.js +1 -1
  279. package/dist/interface/external/ehr/healthie/form-answer-group.js.map +1 -1
  280. package/dist/interface/external/ehr/healthie/immunization.js.map +1 -1
  281. package/dist/interface/external/ehr/healthie/jwt-token.d.ts +4 -4
  282. package/dist/interface/external/ehr/healthie/jwt-token.js.map +1 -1
  283. package/dist/interface/external/ehr/healthie/lab.d.ts +64 -64
  284. package/dist/interface/external/ehr/healthie/lab.js.map +1 -1
  285. package/dist/interface/external/ehr/healthie/medication.d.ts +52 -52
  286. package/dist/interface/external/ehr/healthie/medication.js.map +1 -1
  287. package/dist/interface/external/ehr/healthie/patient.d.ts +78 -78
  288. package/dist/interface/external/ehr/healthie/patient.js.map +1 -1
  289. package/dist/interface/external/ehr/healthie/subscription.d.ts +18 -18
  290. package/dist/interface/external/ehr/healthie/subscription.d.ts.map +1 -1
  291. package/dist/interface/external/ehr/healthie/subscription.js +2 -2
  292. package/dist/interface/external/ehr/healthie/subscription.js.map +1 -1
  293. package/dist/interface/external/ehr/patient.d.ts +44 -44
  294. package/dist/interface/external/ehr/patient.js.map +1 -1
  295. package/dist/interface/external/ehr/practicefusion/appointment.d.ts +21 -21
  296. package/dist/interface/external/ehr/practicefusion/appointment.js.map +1 -1
  297. package/dist/interface/external/ehr/practicefusion/cx-mapping.d.ts +51 -51
  298. package/dist/interface/external/ehr/practicefusion/jwt-token.d.ts +6 -6
  299. package/dist/interface/external/ehr/practicefusion/jwt-token.js.map +1 -1
  300. package/dist/interface/external/ehr/practicefusion/refresh-token.d.ts +2 -2
  301. package/dist/interface/external/ehr/practitioner.d.ts +6 -6
  302. package/dist/interface/external/ehr/salesforce/cx-mapping.d.ts +49 -49
  303. package/dist/interface/external/ehr/salesforce/jwt-token.d.ts +4 -4
  304. package/dist/interface/external/ehr/salesforce/jwt-token.js.map +1 -1
  305. package/dist/interface/external/ehr/salesforce/patient.d.ts +4 -4
  306. package/dist/interface/external/ehr/salesforce/patient.js.map +1 -1
  307. package/dist/interface/external/ehr/shared.d.ts +204 -204
  308. package/dist/interface/external/ehr/shared.js.map +1 -1
  309. package/dist/interface/external/ehr/source.js +9 -9
  310. package/dist/interface/external/ehr/source.js.map +1 -1
  311. package/dist/interface/external/quest/roster.d.ts.map +1 -1
  312. package/dist/interface/external/quest/roster.js +6 -6
  313. package/dist/interface/external/quest/roster.js.map +1 -1
  314. package/dist/interface/external/quest/source.js.map +1 -1
  315. package/dist/interface/external/surescripts/added-by.js +3 -3
  316. package/dist/interface/external/surescripts/added-by.js.map +1 -1
  317. package/dist/interface/external/surescripts/code-list-qualifier.d.ts.map +1 -1
  318. package/dist/interface/external/surescripts/dea-schedule.d.ts.map +1 -1
  319. package/dist/interface/external/surescripts/dea-schedule.js +2 -2
  320. package/dist/interface/external/surescripts/dea-schedule.js.map +1 -1
  321. package/dist/interface/external/surescripts/ncpdp.d.ts.map +1 -1
  322. package/dist/interface/external/surescripts/ncpdp.js +2 -2
  323. package/dist/interface/external/surescripts/ncpdp.js.map +1 -1
  324. package/dist/interface/external/surescripts/payment-code.d.ts.map +1 -1
  325. package/dist/interface/external/surescripts/payment-code.js +11 -11
  326. package/dist/interface/external/surescripts/payment-code.js.map +1 -1
  327. package/dist/interface/external/surescripts/plan-code.d.ts.map +1 -1
  328. package/dist/interface/external/surescripts/plan-code.js +2 -2
  329. package/dist/interface/external/surescripts/plan-code.js.map +1 -1
  330. package/dist/interface/external/surescripts/realtime-pulls/file-name.js +1 -1
  331. package/dist/interface/external/surescripts/realtime-pulls/file-name.js.map +1 -1
  332. package/dist/interface/external/surescripts/realtime-pulls/status-codes.d.ts +8 -8
  333. package/dist/interface/external/surescripts/realtime-pulls/status-codes.d.ts.map +1 -1
  334. package/dist/interface/external/surescripts/realtime-pulls/status-codes.js +8 -8
  335. package/dist/interface/external/surescripts/realtime-pulls/status-codes.js.map +1 -1
  336. package/dist/interface/external/surescripts/roster.d.ts.map +1 -1
  337. package/dist/interface/external/surescripts/roster.js +7 -7
  338. package/dist/interface/external/surescripts/roster.js.map +1 -1
  339. package/dist/interface/internal/cohort.d.ts +312 -312
  340. package/dist/interface/internal/cohort.js.map +1 -1
  341. package/dist/interface/internal/consolidated.d.ts +76 -70
  342. package/dist/interface/internal/consolidated.d.ts.map +1 -1
  343. package/dist/interface/internal/consolidated.js +2 -0
  344. package/dist/interface/internal/consolidated.js.map +1 -1
  345. package/dist/interface/internal/customer.js +2 -2
  346. package/dist/interface/internal/customer.js.map +1 -1
  347. package/dist/interface/internal/document-query.d.ts +4 -4
  348. package/dist/interface/schema/feedback.d.ts +2 -2
  349. package/dist/medical/fhir/__tests__/procedure-category-from-cpt.test.d.ts +2 -0
  350. package/dist/medical/fhir/__tests__/procedure-category-from-cpt.test.d.ts.map +1 -0
  351. package/dist/medical/fhir/__tests__/procedure-category-from-cpt.test.js +79 -0
  352. package/dist/medical/fhir/__tests__/procedure-category-from-cpt.test.js.map +1 -0
  353. package/dist/medical/fhir/bundle.js +3 -4
  354. package/dist/medical/fhir/bundle.js.map +1 -1
  355. package/dist/medical/fhir/coding.js +4 -5
  356. package/dist/medical/fhir/coding.js.map +1 -1
  357. package/dist/medical/fhir/constants.js.map +1 -1
  358. package/dist/medical/fhir/conversion.d.ts.map +1 -1
  359. package/dist/medical/fhir/imaging-detection.d.ts +3 -16
  360. package/dist/medical/fhir/imaging-detection.d.ts.map +1 -1
  361. package/dist/medical/fhir/imaging-detection.js +35 -35
  362. package/dist/medical/fhir/imaging-detection.js.map +1 -1
  363. package/dist/medical/fhir/observations.js +4 -5
  364. package/dist/medical/fhir/observations.js.map +1 -1
  365. package/dist/medical/fhir/procedure-category-from-cpt.d.ts +4 -0
  366. package/dist/medical/fhir/procedure-category-from-cpt.d.ts.map +1 -0
  367. package/dist/medical/fhir/procedure-category-from-cpt.js +106 -0
  368. package/dist/medical/fhir/procedure-category-from-cpt.js.map +1 -0
  369. package/dist/medical/fhir/procedure-category.d.ts +12 -0
  370. package/dist/medical/fhir/procedure-category.d.ts.map +1 -0
  371. package/dist/medical/fhir/procedure-category.js +45 -0
  372. package/dist/medical/fhir/procedure-category.js.map +1 -0
  373. package/dist/medical/fhir/procedure-type.d.ts.map +1 -1
  374. package/dist/medical/fhir/procedure-type.js +3 -3
  375. package/dist/medical/fhir/procedure-type.js.map +1 -1
  376. package/dist/medical/fhir/resources.d.ts.map +1 -1
  377. package/dist/medical/fhir/resources.js.map +1 -1
  378. package/dist/medical/fhir/specialty-codes.d.ts.map +1 -1
  379. package/dist/medical/index.d.ts +2 -0
  380. package/dist/medical/index.d.ts.map +1 -1
  381. package/dist/medical/index.js +2 -0
  382. package/dist/medical/index.js.map +1 -1
  383. package/dist/medical/webhook/webhook-request.d.ts +1009 -983
  384. package/dist/medical/webhook/webhook-request.d.ts.map +1 -1
  385. package/dist/medical/webhook/webhook-request.js +21 -20
  386. package/dist/medical/webhook/webhook-request.js.map +1 -1
  387. package/dist/net/__tests__/axios.d.ts +6 -7
  388. package/dist/net/__tests__/axios.d.ts.map +1 -1
  389. package/dist/net/__tests__/axios.js +22 -12
  390. package/dist/net/__tests__/axios.js.map +1 -1
  391. package/dist/net/__tests__/retry.test.js +17 -7
  392. package/dist/net/__tests__/retry.test.js.map +1 -1
  393. package/dist/net/error.d.ts +1 -1
  394. package/dist/net/error.d.ts.map +1 -1
  395. package/dist/net/error.js +22 -12
  396. package/dist/net/error.js.map +1 -1
  397. package/dist/net/http.js +6 -7
  398. package/dist/net/http.js.map +1 -1
  399. package/dist/net/retry.d.ts +1 -0
  400. package/dist/net/retry.d.ts.map +1 -1
  401. package/dist/net/retry.js +10 -9
  402. package/dist/net/retry.js.map +1 -1
  403. package/dist/net/url.js +1 -2
  404. package/dist/net/url.js.map +1 -1
  405. package/dist/util/base64.d.ts +0 -2
  406. package/dist/util/base64.d.ts.map +1 -1
  407. package/dist/util/base64.js +7 -7
  408. package/dist/util/base64.js.map +1 -1
  409. package/dist/util/duration.js +2 -3
  410. package/dist/util/duration.js.map +1 -1
  411. package/dist/util/sqs-delay-from-uuid.js +2 -2
  412. package/dist/util/sqs-delay-from-uuid.js.map +1 -1
  413. package/dist/util/stack-trace.js +2 -3
  414. package/dist/util/stack-trace.js.map +1 -1
  415. package/dist/util/uuid-v7.d.ts +1 -1
  416. package/dist/util/uuid-v7.d.ts.map +1 -1
  417. package/dist/util/uuid-v7.js +23 -13
  418. package/dist/util/uuid-v7.js.map +1 -1
  419. package/dist/util/zod.js +2 -2
  420. package/dist/util/zod.js.map +1 -1
  421. package/package.json +26 -9
@@ -55,14 +55,14 @@ export declare const baseWebhookMetadataSchema: z.ZodObject<{
55
55
  data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
56
56
  }, "strip", z.ZodTypeAny, {
57
57
  messageId: string;
58
+ requestId?: string | undefined;
58
59
  when: string;
59
60
  data?: unknown;
60
- requestId?: string | undefined;
61
61
  }, {
62
62
  messageId: string;
63
+ requestId?: string | undefined;
63
64
  when: string;
64
65
  data?: unknown;
65
- requestId?: string | undefined;
66
66
  }>;
67
67
  export declare const webhookMetadataSchema: z.ZodObject<z.objectUtil.extendShape<{
68
68
  messageId: z.ZodString;
@@ -75,17 +75,17 @@ export declare const webhookMetadataSchema: z.ZodObject<z.objectUtil.extendShape
75
75
  }, {
76
76
  type: z.ZodString;
77
77
  }>, "strip", z.ZodTypeAny, {
78
- type: string;
79
78
  messageId: string;
79
+ requestId?: string | undefined;
80
80
  when: string;
81
81
  data?: unknown;
82
- requestId?: string | undefined;
83
- }, {
84
82
  type: string;
83
+ }, {
85
84
  messageId: string;
85
+ requestId?: string | undefined;
86
86
  when: string;
87
87
  data?: unknown;
88
- requestId?: string | undefined;
88
+ type: string;
89
89
  }>;
90
90
  export type WebhookMetadata = z.infer<typeof webhookMetadataSchema>;
91
91
  export declare const pingWebhookRequestDataSchema: z.ZodObject<{
@@ -100,35 +100,35 @@ export declare const pingWebhookRequestDataSchema: z.ZodObject<{
100
100
  }, {
101
101
  type: z.ZodLiteral<"ping">;
102
102
  }>, "strip", z.ZodTypeAny, {
103
- type: "ping";
104
103
  messageId: string;
104
+ requestId?: string | undefined;
105
105
  when: string;
106
106
  data?: unknown;
107
- requestId?: string | undefined;
108
- }, {
109
107
  type: "ping";
108
+ }, {
110
109
  messageId: string;
110
+ requestId?: string | undefined;
111
111
  when: string;
112
112
  data?: unknown;
113
- requestId?: string | undefined;
113
+ type: "ping";
114
114
  }>;
115
115
  ping: z.ZodString;
116
116
  }, "strip", z.ZodTypeAny, {
117
117
  meta: {
118
- type: "ping";
119
118
  messageId: string;
119
+ requestId?: string | undefined;
120
120
  when: string;
121
121
  data?: unknown;
122
- requestId?: string | undefined;
122
+ type: "ping";
123
123
  };
124
124
  ping: string;
125
125
  }, {
126
126
  meta: {
127
- type: "ping";
128
127
  messageId: string;
128
+ requestId?: string | undefined;
129
129
  when: string;
130
130
  data?: unknown;
131
- requestId?: string | undefined;
131
+ type: "ping";
132
132
  };
133
133
  ping: string;
134
134
  }>;
@@ -141,20 +141,26 @@ export declare const consolidatedWebhookPatientSchema: z.ZodObject<{
141
141
  status: z.ZodEnum<["completed", "failed"]>;
142
142
  bundle: z.ZodType<SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined, z.ZodTypeDef, SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined>;
143
143
  filters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>>>>;
144
+ truncatedGzipKey: z.ZodOptional<z.ZodString>;
145
+ fastLoadGzipKey: z.ZodOptional<z.ZodString>;
144
146
  }, "strip", z.ZodTypeAny, {
145
- status: "completed" | "failed";
146
147
  patientId: string;
147
148
  externalId?: string | undefined;
148
149
  additionalIds?: Record<string, string[]> | undefined;
150
+ status: "completed" | "failed";
149
151
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
150
152
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
153
+ truncatedGzipKey?: string | undefined;
154
+ fastLoadGzipKey?: string | undefined;
151
155
  }, {
152
- status: "completed" | "failed";
153
156
  patientId: string;
154
157
  externalId?: string | undefined;
155
158
  additionalIds?: Record<string, string[]> | undefined;
159
+ status: "completed" | "failed";
156
160
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
157
161
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
162
+ truncatedGzipKey?: string | undefined;
163
+ fastLoadGzipKey?: string | undefined;
158
164
  }>;
159
165
  export type ConsolidatedWebhookPatient = z.infer<typeof consolidatedWebhookPatientSchema>;
160
166
  export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
@@ -169,17 +175,17 @@ export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
169
175
  }, {
170
176
  type: z.ZodLiteral<"medical.consolidated-data">;
171
177
  }>, "strip", z.ZodTypeAny, {
172
- type: "medical.consolidated-data";
173
178
  messageId: string;
179
+ requestId?: string | undefined;
174
180
  when: string;
175
181
  data?: unknown;
176
- requestId?: string | undefined;
177
- }, {
178
182
  type: "medical.consolidated-data";
183
+ }, {
179
184
  messageId: string;
185
+ requestId?: string | undefined;
180
186
  when: string;
181
187
  data?: unknown;
182
- requestId?: string | undefined;
188
+ type: "medical.consolidated-data";
183
189
  }>;
184
190
  patients: z.ZodArray<z.ZodObject<{
185
191
  patientId: z.ZodString;
@@ -188,52 +194,62 @@ export declare const consolidatedWebhookRequestSchema: z.ZodObject<{
188
194
  status: z.ZodEnum<["completed", "failed"]>;
189
195
  bundle: z.ZodType<SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined, z.ZodTypeDef, SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined>;
190
196
  filters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>>>>;
197
+ truncatedGzipKey: z.ZodOptional<z.ZodString>;
198
+ fastLoadGzipKey: z.ZodOptional<z.ZodString>;
191
199
  }, "strip", z.ZodTypeAny, {
192
- status: "completed" | "failed";
193
200
  patientId: string;
194
201
  externalId?: string | undefined;
195
202
  additionalIds?: Record<string, string[]> | undefined;
203
+ status: "completed" | "failed";
196
204
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
197
205
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
206
+ truncatedGzipKey?: string | undefined;
207
+ fastLoadGzipKey?: string | undefined;
198
208
  }, {
199
- status: "completed" | "failed";
200
209
  patientId: string;
201
210
  externalId?: string | undefined;
202
211
  additionalIds?: Record<string, string[]> | undefined;
212
+ status: "completed" | "failed";
203
213
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
204
214
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
215
+ truncatedGzipKey?: string | undefined;
216
+ fastLoadGzipKey?: string | undefined;
205
217
  }>, "many">;
206
218
  }, "strip", z.ZodTypeAny, {
207
219
  meta: {
208
- type: "medical.consolidated-data";
209
220
  messageId: string;
221
+ requestId?: string | undefined;
210
222
  when: string;
211
223
  data?: unknown;
212
- requestId?: string | undefined;
224
+ type: "medical.consolidated-data";
213
225
  };
214
226
  patients: {
215
- status: "completed" | "failed";
216
227
  patientId: string;
217
228
  externalId?: string | undefined;
218
229
  additionalIds?: Record<string, string[]> | undefined;
230
+ status: "completed" | "failed";
219
231
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
220
232
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
233
+ truncatedGzipKey?: string | undefined;
234
+ fastLoadGzipKey?: string | undefined;
221
235
  }[];
222
236
  }, {
223
237
  meta: {
224
- type: "medical.consolidated-data";
225
238
  messageId: string;
239
+ requestId?: string | undefined;
226
240
  when: string;
227
241
  data?: unknown;
228
- requestId?: string | undefined;
242
+ type: "medical.consolidated-data";
229
243
  };
230
244
  patients: {
231
- status: "completed" | "failed";
232
245
  patientId: string;
233
246
  externalId?: string | undefined;
234
247
  additionalIds?: Record<string, string[]> | undefined;
248
+ status: "completed" | "failed";
235
249
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
236
250
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
251
+ truncatedGzipKey?: string | undefined;
252
+ fastLoadGzipKey?: string | undefined;
237
253
  }[];
238
254
  }>;
239
255
  export type ConsolidatedWebhookRequest = z.infer<typeof consolidatedWebhookRequestSchema>;
@@ -256,107 +272,107 @@ export declare const documentDownloadWebhookPatientSchema: z.ZodObject<{
256
272
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
257
273
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
258
274
  }, "strip", z.ZodTypeAny, {
275
+ system?: string | null | undefined;
259
276
  code?: string | null | undefined;
260
277
  display?: string | null | undefined;
261
- system?: string | null | undefined;
262
278
  }, {
279
+ system?: string | null | undefined;
263
280
  code?: string | null | undefined;
264
281
  display?: string | null | undefined;
265
- system?: string | null | undefined;
266
282
  }>, "many">>;
267
283
  text: z.ZodOptional<z.ZodString>;
268
284
  }, "strip", z.ZodTypeAny, {
269
- text?: string | undefined;
270
285
  coding?: {
286
+ system?: string | null | undefined;
271
287
  code?: string | null | undefined;
272
288
  display?: string | null | undefined;
273
- system?: string | null | undefined;
274
289
  }[] | undefined;
275
- }, {
276
290
  text?: string | undefined;
291
+ }, {
277
292
  coding?: {
293
+ system?: string | null | undefined;
278
294
  code?: string | null | undefined;
279
295
  display?: string | null | undefined;
280
- system?: string | null | undefined;
281
296
  }[] | undefined;
297
+ text?: string | undefined;
282
298
  }>>;
283
299
  }, "strip", z.ZodTypeAny, {
284
300
  id: string;
285
301
  fileName: string;
302
+ description?: string | undefined;
303
+ status?: string | undefined;
304
+ indexed?: string | undefined;
305
+ mimeType?: string | undefined;
306
+ size?: number | undefined;
286
307
  type?: {
287
- text?: string | undefined;
288
308
  coding?: {
309
+ system?: string | null | undefined;
289
310
  code?: string | null | undefined;
290
311
  display?: string | null | undefined;
291
- system?: string | null | undefined;
292
312
  }[] | undefined;
313
+ text?: string | undefined;
293
314
  } | undefined;
294
- status?: string | undefined;
295
- description?: string | undefined;
296
- size?: number | undefined;
297
- indexed?: string | undefined;
298
- mimeType?: string | undefined;
299
315
  }, {
300
316
  id: string;
301
317
  fileName: string;
318
+ description?: string | undefined;
319
+ status?: string | undefined;
320
+ indexed?: string | undefined;
321
+ mimeType?: string | undefined;
322
+ size?: number | undefined;
302
323
  type?: {
303
- text?: string | undefined;
304
324
  coding?: {
325
+ system?: string | null | undefined;
305
326
  code?: string | null | undefined;
306
327
  display?: string | null | undefined;
307
- system?: string | null | undefined;
308
328
  }[] | undefined;
329
+ text?: string | undefined;
309
330
  } | undefined;
310
- status?: string | undefined;
311
- description?: string | undefined;
312
- size?: number | undefined;
313
- indexed?: string | undefined;
314
- mimeType?: string | undefined;
315
331
  }>, "many">;
316
332
  }, "strip", z.ZodTypeAny, {
317
- status: "completed" | "failed";
318
333
  patientId: string;
334
+ externalId?: string | undefined;
335
+ additionalIds?: Record<string, string[]> | undefined;
336
+ status: "completed" | "failed";
319
337
  documents: {
320
338
  id: string;
321
339
  fileName: string;
340
+ description?: string | undefined;
341
+ status?: string | undefined;
342
+ indexed?: string | undefined;
343
+ mimeType?: string | undefined;
344
+ size?: number | undefined;
322
345
  type?: {
323
- text?: string | undefined;
324
346
  coding?: {
347
+ system?: string | null | undefined;
325
348
  code?: string | null | undefined;
326
349
  display?: string | null | undefined;
327
- system?: string | null | undefined;
328
350
  }[] | undefined;
351
+ text?: string | undefined;
329
352
  } | undefined;
330
- status?: string | undefined;
331
- description?: string | undefined;
332
- size?: number | undefined;
333
- indexed?: string | undefined;
334
- mimeType?: string | undefined;
335
353
  }[];
354
+ }, {
355
+ patientId: string;
336
356
  externalId?: string | undefined;
337
357
  additionalIds?: Record<string, string[]> | undefined;
338
- }, {
339
358
  status: "completed" | "failed";
340
- patientId: string;
341
359
  documents: {
342
360
  id: string;
343
361
  fileName: string;
362
+ description?: string | undefined;
363
+ status?: string | undefined;
364
+ indexed?: string | undefined;
365
+ mimeType?: string | undefined;
366
+ size?: number | undefined;
344
367
  type?: {
345
- text?: string | undefined;
346
368
  coding?: {
369
+ system?: string | null | undefined;
347
370
  code?: string | null | undefined;
348
371
  display?: string | null | undefined;
349
- system?: string | null | undefined;
350
372
  }[] | undefined;
373
+ text?: string | undefined;
351
374
  } | undefined;
352
- status?: string | undefined;
353
- description?: string | undefined;
354
- size?: number | undefined;
355
- indexed?: string | undefined;
356
- mimeType?: string | undefined;
357
375
  }[];
358
- externalId?: string | undefined;
359
- additionalIds?: Record<string, string[]> | undefined;
360
376
  }>;
361
377
  export type DocumentDownloadWebhookPatient = z.infer<typeof documentDownloadWebhookPatientSchema>;
362
378
  export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
@@ -371,17 +387,17 @@ export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
371
387
  }, {
372
388
  type: z.ZodLiteral<"medical.document-download">;
373
389
  }>, "strip", z.ZodTypeAny, {
374
- type: "medical.document-download";
375
390
  messageId: string;
391
+ requestId?: string | undefined;
376
392
  when: string;
377
393
  data?: unknown;
378
- requestId?: string | undefined;
379
- }, {
380
394
  type: "medical.document-download";
395
+ }, {
381
396
  messageId: string;
397
+ requestId?: string | undefined;
382
398
  when: string;
383
399
  data?: unknown;
384
- requestId?: string | undefined;
400
+ type: "medical.document-download";
385
401
  }>;
386
402
  patients: z.ZodArray<z.ZodObject<{
387
403
  patientId: z.ZodString;
@@ -402,169 +418,169 @@ export declare const documentDownloadWebhookRequestSchema: z.ZodObject<{
402
418
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
403
419
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
404
420
  }, "strip", z.ZodTypeAny, {
421
+ system?: string | null | undefined;
405
422
  code?: string | null | undefined;
406
423
  display?: string | null | undefined;
407
- system?: string | null | undefined;
408
424
  }, {
425
+ system?: string | null | undefined;
409
426
  code?: string | null | undefined;
410
427
  display?: string | null | undefined;
411
- system?: string | null | undefined;
412
428
  }>, "many">>;
413
429
  text: z.ZodOptional<z.ZodString>;
414
430
  }, "strip", z.ZodTypeAny, {
415
- text?: string | undefined;
416
431
  coding?: {
432
+ system?: string | null | undefined;
417
433
  code?: string | null | undefined;
418
434
  display?: string | null | undefined;
419
- system?: string | null | undefined;
420
435
  }[] | undefined;
421
- }, {
422
436
  text?: string | undefined;
437
+ }, {
423
438
  coding?: {
439
+ system?: string | null | undefined;
424
440
  code?: string | null | undefined;
425
441
  display?: string | null | undefined;
426
- system?: string | null | undefined;
427
442
  }[] | undefined;
443
+ text?: string | undefined;
428
444
  }>>;
429
445
  }, "strip", z.ZodTypeAny, {
430
446
  id: string;
431
447
  fileName: string;
448
+ description?: string | undefined;
449
+ status?: string | undefined;
450
+ indexed?: string | undefined;
451
+ mimeType?: string | undefined;
452
+ size?: number | undefined;
432
453
  type?: {
433
- text?: string | undefined;
434
454
  coding?: {
455
+ system?: string | null | undefined;
435
456
  code?: string | null | undefined;
436
457
  display?: string | null | undefined;
437
- system?: string | null | undefined;
438
458
  }[] | undefined;
459
+ text?: string | undefined;
439
460
  } | undefined;
440
- status?: string | undefined;
441
- description?: string | undefined;
442
- size?: number | undefined;
443
- indexed?: string | undefined;
444
- mimeType?: string | undefined;
445
461
  }, {
446
462
  id: string;
447
463
  fileName: string;
464
+ description?: string | undefined;
465
+ status?: string | undefined;
466
+ indexed?: string | undefined;
467
+ mimeType?: string | undefined;
468
+ size?: number | undefined;
448
469
  type?: {
449
- text?: string | undefined;
450
470
  coding?: {
471
+ system?: string | null | undefined;
451
472
  code?: string | null | undefined;
452
473
  display?: string | null | undefined;
453
- system?: string | null | undefined;
454
474
  }[] | undefined;
475
+ text?: string | undefined;
455
476
  } | undefined;
456
- status?: string | undefined;
457
- description?: string | undefined;
458
- size?: number | undefined;
459
- indexed?: string | undefined;
460
- mimeType?: string | undefined;
461
477
  }>, "many">;
462
478
  }, "strip", z.ZodTypeAny, {
463
- status: "completed" | "failed";
464
479
  patientId: string;
480
+ externalId?: string | undefined;
481
+ additionalIds?: Record<string, string[]> | undefined;
482
+ status: "completed" | "failed";
465
483
  documents: {
466
484
  id: string;
467
485
  fileName: string;
486
+ description?: string | undefined;
487
+ status?: string | undefined;
488
+ indexed?: string | undefined;
489
+ mimeType?: string | undefined;
490
+ size?: number | undefined;
468
491
  type?: {
469
- text?: string | undefined;
470
492
  coding?: {
493
+ system?: string | null | undefined;
471
494
  code?: string | null | undefined;
472
495
  display?: string | null | undefined;
473
- system?: string | null | undefined;
474
496
  }[] | undefined;
497
+ text?: string | undefined;
475
498
  } | undefined;
476
- status?: string | undefined;
477
- description?: string | undefined;
478
- size?: number | undefined;
479
- indexed?: string | undefined;
480
- mimeType?: string | undefined;
481
499
  }[];
500
+ }, {
501
+ patientId: string;
482
502
  externalId?: string | undefined;
483
503
  additionalIds?: Record<string, string[]> | undefined;
484
- }, {
485
504
  status: "completed" | "failed";
486
- patientId: string;
487
505
  documents: {
488
506
  id: string;
489
507
  fileName: string;
508
+ description?: string | undefined;
509
+ status?: string | undefined;
510
+ indexed?: string | undefined;
511
+ mimeType?: string | undefined;
512
+ size?: number | undefined;
490
513
  type?: {
491
- text?: string | undefined;
492
514
  coding?: {
515
+ system?: string | null | undefined;
493
516
  code?: string | null | undefined;
494
517
  display?: string | null | undefined;
495
- system?: string | null | undefined;
496
518
  }[] | undefined;
519
+ text?: string | undefined;
497
520
  } | undefined;
498
- status?: string | undefined;
499
- description?: string | undefined;
500
- size?: number | undefined;
501
- indexed?: string | undefined;
502
- mimeType?: string | undefined;
503
521
  }[];
504
- externalId?: string | undefined;
505
- additionalIds?: Record<string, string[]> | undefined;
506
522
  }>, "many">;
507
523
  }, "strip", z.ZodTypeAny, {
508
524
  meta: {
509
- type: "medical.document-download";
510
525
  messageId: string;
526
+ requestId?: string | undefined;
511
527
  when: string;
512
528
  data?: unknown;
513
- requestId?: string | undefined;
529
+ type: "medical.document-download";
514
530
  };
515
531
  patients: {
516
- status: "completed" | "failed";
517
532
  patientId: string;
533
+ externalId?: string | undefined;
534
+ additionalIds?: Record<string, string[]> | undefined;
535
+ status: "completed" | "failed";
518
536
  documents: {
519
537
  id: string;
520
538
  fileName: string;
539
+ description?: string | undefined;
540
+ status?: string | undefined;
541
+ indexed?: string | undefined;
542
+ mimeType?: string | undefined;
543
+ size?: number | undefined;
521
544
  type?: {
522
- text?: string | undefined;
523
545
  coding?: {
546
+ system?: string | null | undefined;
524
547
  code?: string | null | undefined;
525
548
  display?: string | null | undefined;
526
- system?: string | null | undefined;
527
549
  }[] | undefined;
550
+ text?: string | undefined;
528
551
  } | undefined;
529
- status?: string | undefined;
530
- description?: string | undefined;
531
- size?: number | undefined;
532
- indexed?: string | undefined;
533
- mimeType?: string | undefined;
534
552
  }[];
535
- externalId?: string | undefined;
536
- additionalIds?: Record<string, string[]> | undefined;
537
553
  }[];
538
554
  }, {
539
555
  meta: {
540
- type: "medical.document-download";
541
556
  messageId: string;
557
+ requestId?: string | undefined;
542
558
  when: string;
543
559
  data?: unknown;
544
- requestId?: string | undefined;
560
+ type: "medical.document-download";
545
561
  };
546
562
  patients: {
547
- status: "completed" | "failed";
548
563
  patientId: string;
564
+ externalId?: string | undefined;
565
+ additionalIds?: Record<string, string[]> | undefined;
566
+ status: "completed" | "failed";
549
567
  documents: {
550
568
  id: string;
551
569
  fileName: string;
552
- type?: {
553
- text?: string | undefined;
554
- coding?: {
555
- code?: string | null | undefined;
556
- display?: string | null | undefined;
557
- system?: string | null | undefined;
558
- }[] | undefined;
559
- } | undefined;
560
- status?: string | undefined;
561
570
  description?: string | undefined;
562
- size?: number | undefined;
571
+ status?: string | undefined;
563
572
  indexed?: string | undefined;
564
573
  mimeType?: string | undefined;
574
+ size?: number | undefined;
575
+ type?: {
576
+ coding?: {
577
+ system?: string | null | undefined;
578
+ code?: string | null | undefined;
579
+ display?: string | null | undefined;
580
+ }[] | undefined;
581
+ text?: string | undefined;
582
+ } | undefined;
565
583
  }[];
566
- externalId?: string | undefined;
567
- additionalIds?: Record<string, string[]> | undefined;
568
584
  }[];
569
585
  }>;
570
586
  export type DocumentDownloadWebhookRequest = z.infer<typeof documentDownloadWebhookRequestSchema>;
@@ -574,15 +590,15 @@ export declare const documentConversionWebhookPatientSchema: z.ZodObject<{
574
590
  additionalIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
575
591
  status: z.ZodEnum<["completed", "failed"]>;
576
592
  }, "strip", z.ZodTypeAny, {
577
- status: "completed" | "failed";
578
593
  patientId: string;
579
594
  externalId?: string | undefined;
580
595
  additionalIds?: Record<string, string[]> | undefined;
581
- }, {
582
596
  status: "completed" | "failed";
597
+ }, {
583
598
  patientId: string;
584
599
  externalId?: string | undefined;
585
600
  additionalIds?: Record<string, string[]> | undefined;
601
+ status: "completed" | "failed";
586
602
  }>;
587
603
  export type DocumentConversionWebhookPatient = z.infer<typeof documentConversionWebhookPatientSchema>;
588
604
  export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
@@ -597,17 +613,17 @@ export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
597
613
  }, {
598
614
  type: z.ZodLiteral<"medical.document-conversion">;
599
615
  }>, "strip", z.ZodTypeAny, {
600
- type: "medical.document-conversion";
601
616
  messageId: string;
617
+ requestId?: string | undefined;
602
618
  when: string;
603
619
  data?: unknown;
604
- requestId?: string | undefined;
605
- }, {
606
620
  type: "medical.document-conversion";
621
+ }, {
607
622
  messageId: string;
623
+ requestId?: string | undefined;
608
624
  when: string;
609
625
  data?: unknown;
610
- requestId?: string | undefined;
626
+ type: "medical.document-conversion";
611
627
  }>;
612
628
  patients: z.ZodArray<z.ZodObject<{
613
629
  patientId: z.ZodString;
@@ -615,43 +631,43 @@ export declare const documentConversionWebhookRequestSchema: z.ZodObject<{
615
631
  additionalIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
616
632
  status: z.ZodEnum<["completed", "failed"]>;
617
633
  }, "strip", z.ZodTypeAny, {
618
- status: "completed" | "failed";
619
634
  patientId: string;
620
635
  externalId?: string | undefined;
621
636
  additionalIds?: Record<string, string[]> | undefined;
622
- }, {
623
637
  status: "completed" | "failed";
638
+ }, {
624
639
  patientId: string;
625
640
  externalId?: string | undefined;
626
641
  additionalIds?: Record<string, string[]> | undefined;
642
+ status: "completed" | "failed";
627
643
  }>, "many">;
628
644
  }, "strip", z.ZodTypeAny, {
629
645
  meta: {
630
- type: "medical.document-conversion";
631
646
  messageId: string;
647
+ requestId?: string | undefined;
632
648
  when: string;
633
649
  data?: unknown;
634
- requestId?: string | undefined;
650
+ type: "medical.document-conversion";
635
651
  };
636
652
  patients: {
637
- status: "completed" | "failed";
638
653
  patientId: string;
639
654
  externalId?: string | undefined;
640
655
  additionalIds?: Record<string, string[]> | undefined;
656
+ status: "completed" | "failed";
641
657
  }[];
642
658
  }, {
643
659
  meta: {
644
- type: "medical.document-conversion";
645
660
  messageId: string;
661
+ requestId?: string | undefined;
646
662
  when: string;
647
663
  data?: unknown;
648
- requestId?: string | undefined;
664
+ type: "medical.document-conversion";
649
665
  };
650
666
  patients: {
651
- status: "completed" | "failed";
652
667
  patientId: string;
653
668
  externalId?: string | undefined;
654
669
  additionalIds?: Record<string, string[]> | undefined;
670
+ status: "completed" | "failed";
655
671
  }[];
656
672
  }>;
657
673
  export type DocumentConversionWebhookRequest = z.infer<typeof documentConversionWebhookRequestSchema>;
@@ -675,29 +691,29 @@ export declare const documentBulkDownloadWebhookPatientSchema: z.ZodObject<z.obj
675
691
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
676
692
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
677
693
  }, "strip", z.ZodTypeAny, {
694
+ system?: string | null | undefined;
678
695
  code?: string | null | undefined;
679
696
  display?: string | null | undefined;
680
- system?: string | null | undefined;
681
697
  }, {
698
+ system?: string | null | undefined;
682
699
  code?: string | null | undefined;
683
700
  display?: string | null | undefined;
684
- system?: string | null | undefined;
685
701
  }>, "many">>;
686
702
  text: z.ZodOptional<z.ZodString>;
687
703
  }, "strip", z.ZodTypeAny, {
688
- text?: string | undefined;
689
704
  coding?: {
705
+ system?: string | null | undefined;
690
706
  code?: string | null | undefined;
691
707
  display?: string | null | undefined;
692
- system?: string | null | undefined;
693
708
  }[] | undefined;
694
- }, {
695
709
  text?: string | undefined;
710
+ }, {
696
711
  coding?: {
712
+ system?: string | null | undefined;
697
713
  code?: string | null | undefined;
698
714
  display?: string | null | undefined;
699
- system?: string | null | undefined;
700
715
  }[] | undefined;
716
+ text?: string | undefined;
701
717
  }>>;
702
718
  }, {
703
719
  url: z.ZodString;
@@ -713,101 +729,101 @@ export declare const documentBulkDownloadWebhookPatientSchema: z.ZodObject<z.obj
713
729
  }>, "many">>;
714
730
  }>, "strip", z.ZodTypeAny, {
715
731
  id: string;
716
- url: string;
717
732
  fileName: string;
733
+ description?: string | undefined;
734
+ status?: string | undefined;
735
+ indexed?: string | undefined;
736
+ mimeType?: string | undefined;
737
+ size?: number | undefined;
718
738
  type?: {
719
- text?: string | undefined;
720
739
  coding?: {
740
+ system?: string | null | undefined;
721
741
  code?: string | null | undefined;
722
742
  display?: string | null | undefined;
723
- system?: string | null | undefined;
724
743
  }[] | undefined;
744
+ text?: string | undefined;
725
745
  } | undefined;
726
- status?: string | undefined;
727
- description?: string | undefined;
728
- size?: number | undefined;
729
- indexed?: string | undefined;
730
- mimeType?: string | undefined;
746
+ url: string;
731
747
  organizationIdentifiers?: {
732
748
  name?: string | undefined;
733
749
  identifierValues?: string[] | undefined;
734
750
  }[] | undefined;
735
751
  }, {
736
752
  id: string;
737
- url: string;
738
753
  fileName: string;
754
+ description?: string | undefined;
755
+ status?: string | undefined;
756
+ indexed?: string | undefined;
757
+ mimeType?: string | undefined;
758
+ size?: number | undefined;
739
759
  type?: {
740
- text?: string | undefined;
741
760
  coding?: {
761
+ system?: string | null | undefined;
742
762
  code?: string | null | undefined;
743
763
  display?: string | null | undefined;
744
- system?: string | null | undefined;
745
764
  }[] | undefined;
765
+ text?: string | undefined;
746
766
  } | undefined;
747
- status?: string | undefined;
748
- description?: string | undefined;
749
- size?: number | undefined;
750
- indexed?: string | undefined;
751
- mimeType?: string | undefined;
767
+ url: string;
752
768
  organizationIdentifiers?: {
753
769
  name?: string | undefined;
754
770
  identifierValues?: string[] | undefined;
755
771
  }[] | undefined;
756
772
  }>, "many">;
757
773
  }>, "strip", z.ZodTypeAny, {
758
- status: "completed" | "failed";
759
774
  patientId: string;
775
+ externalId?: string | undefined;
776
+ additionalIds?: Record<string, string[]> | undefined;
777
+ status: "completed" | "failed";
760
778
  documents: {
761
779
  id: string;
762
- url: string;
763
780
  fileName: string;
781
+ description?: string | undefined;
782
+ status?: string | undefined;
783
+ indexed?: string | undefined;
784
+ mimeType?: string | undefined;
785
+ size?: number | undefined;
764
786
  type?: {
765
- text?: string | undefined;
766
787
  coding?: {
788
+ system?: string | null | undefined;
767
789
  code?: string | null | undefined;
768
790
  display?: string | null | undefined;
769
- system?: string | null | undefined;
770
791
  }[] | undefined;
792
+ text?: string | undefined;
771
793
  } | undefined;
772
- status?: string | undefined;
773
- description?: string | undefined;
774
- size?: number | undefined;
775
- indexed?: string | undefined;
776
- mimeType?: string | undefined;
794
+ url: string;
777
795
  organizationIdentifiers?: {
778
796
  name?: string | undefined;
779
797
  identifierValues?: string[] | undefined;
780
798
  }[] | undefined;
781
799
  }[];
800
+ }, {
801
+ patientId: string;
782
802
  externalId?: string | undefined;
783
803
  additionalIds?: Record<string, string[]> | undefined;
784
- }, {
785
804
  status: "completed" | "failed";
786
- patientId: string;
787
805
  documents: {
788
806
  id: string;
789
- url: string;
790
807
  fileName: string;
808
+ description?: string | undefined;
809
+ status?: string | undefined;
810
+ indexed?: string | undefined;
811
+ mimeType?: string | undefined;
812
+ size?: number | undefined;
791
813
  type?: {
792
- text?: string | undefined;
793
814
  coding?: {
815
+ system?: string | null | undefined;
794
816
  code?: string | null | undefined;
795
817
  display?: string | null | undefined;
796
- system?: string | null | undefined;
797
818
  }[] | undefined;
819
+ text?: string | undefined;
798
820
  } | undefined;
799
- status?: string | undefined;
800
- description?: string | undefined;
801
- size?: number | undefined;
802
- indexed?: string | undefined;
803
- mimeType?: string | undefined;
821
+ url: string;
804
822
  organizationIdentifiers?: {
805
823
  name?: string | undefined;
806
824
  identifierValues?: string[] | undefined;
807
825
  }[] | undefined;
808
826
  }[];
809
- externalId?: string | undefined;
810
- additionalIds?: Record<string, string[]> | undefined;
811
827
  }>;
812
828
  export type DocumentBulkDownloadWebhookPatient = z.infer<typeof documentBulkDownloadWebhookPatientSchema>;
813
829
  export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
@@ -822,17 +838,17 @@ export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
822
838
  }, {
823
839
  type: z.ZodLiteral<"medical.document-bulk-download-urls">;
824
840
  }>, "strip", z.ZodTypeAny, {
825
- type: "medical.document-bulk-download-urls";
826
841
  messageId: string;
842
+ requestId?: string | undefined;
827
843
  when: string;
828
844
  data?: unknown;
829
- requestId?: string | undefined;
830
- }, {
831
845
  type: "medical.document-bulk-download-urls";
846
+ }, {
832
847
  messageId: string;
848
+ requestId?: string | undefined;
833
849
  when: string;
834
850
  data?: unknown;
835
- requestId?: string | undefined;
851
+ type: "medical.document-bulk-download-urls";
836
852
  }>;
837
853
  patients: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
838
854
  patientId: z.ZodString;
@@ -854,29 +870,29 @@ export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
854
870
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
855
871
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
856
872
  }, "strip", z.ZodTypeAny, {
873
+ system?: string | null | undefined;
857
874
  code?: string | null | undefined;
858
875
  display?: string | null | undefined;
859
- system?: string | null | undefined;
860
876
  }, {
877
+ system?: string | null | undefined;
861
878
  code?: string | null | undefined;
862
879
  display?: string | null | undefined;
863
- system?: string | null | undefined;
864
880
  }>, "many">>;
865
881
  text: z.ZodOptional<z.ZodString>;
866
882
  }, "strip", z.ZodTypeAny, {
867
- text?: string | undefined;
868
883
  coding?: {
884
+ system?: string | null | undefined;
869
885
  code?: string | null | undefined;
870
886
  display?: string | null | undefined;
871
- system?: string | null | undefined;
872
887
  }[] | undefined;
873
- }, {
874
888
  text?: string | undefined;
889
+ }, {
875
890
  coding?: {
891
+ system?: string | null | undefined;
876
892
  code?: string | null | undefined;
877
893
  display?: string | null | undefined;
878
- system?: string | null | undefined;
879
894
  }[] | undefined;
895
+ text?: string | undefined;
880
896
  }>>;
881
897
  }, {
882
898
  url: z.ZodString;
@@ -892,173 +908,173 @@ export declare const documentBulkDownloadWebhookRequestSchema: z.ZodObject<{
892
908
  }>, "many">>;
893
909
  }>, "strip", z.ZodTypeAny, {
894
910
  id: string;
895
- url: string;
896
911
  fileName: string;
912
+ description?: string | undefined;
913
+ status?: string | undefined;
914
+ indexed?: string | undefined;
915
+ mimeType?: string | undefined;
916
+ size?: number | undefined;
897
917
  type?: {
898
- text?: string | undefined;
899
918
  coding?: {
919
+ system?: string | null | undefined;
900
920
  code?: string | null | undefined;
901
921
  display?: string | null | undefined;
902
- system?: string | null | undefined;
903
922
  }[] | undefined;
923
+ text?: string | undefined;
904
924
  } | undefined;
905
- status?: string | undefined;
906
- description?: string | undefined;
907
- size?: number | undefined;
908
- indexed?: string | undefined;
909
- mimeType?: string | undefined;
925
+ url: string;
910
926
  organizationIdentifiers?: {
911
927
  name?: string | undefined;
912
928
  identifierValues?: string[] | undefined;
913
929
  }[] | undefined;
914
930
  }, {
915
931
  id: string;
916
- url: string;
917
932
  fileName: string;
933
+ description?: string | undefined;
934
+ status?: string | undefined;
935
+ indexed?: string | undefined;
936
+ mimeType?: string | undefined;
937
+ size?: number | undefined;
918
938
  type?: {
919
- text?: string | undefined;
920
939
  coding?: {
940
+ system?: string | null | undefined;
921
941
  code?: string | null | undefined;
922
942
  display?: string | null | undefined;
923
- system?: string | null | undefined;
924
943
  }[] | undefined;
944
+ text?: string | undefined;
925
945
  } | undefined;
926
- status?: string | undefined;
927
- description?: string | undefined;
928
- size?: number | undefined;
929
- indexed?: string | undefined;
930
- mimeType?: string | undefined;
946
+ url: string;
931
947
  organizationIdentifiers?: {
932
948
  name?: string | undefined;
933
949
  identifierValues?: string[] | undefined;
934
950
  }[] | undefined;
935
951
  }>, "many">;
936
952
  }>, "strip", z.ZodTypeAny, {
937
- status: "completed" | "failed";
938
953
  patientId: string;
954
+ externalId?: string | undefined;
955
+ additionalIds?: Record<string, string[]> | undefined;
956
+ status: "completed" | "failed";
939
957
  documents: {
940
958
  id: string;
941
- url: string;
942
959
  fileName: string;
960
+ description?: string | undefined;
961
+ status?: string | undefined;
962
+ indexed?: string | undefined;
963
+ mimeType?: string | undefined;
964
+ size?: number | undefined;
943
965
  type?: {
944
- text?: string | undefined;
945
966
  coding?: {
967
+ system?: string | null | undefined;
946
968
  code?: string | null | undefined;
947
969
  display?: string | null | undefined;
948
- system?: string | null | undefined;
949
970
  }[] | undefined;
971
+ text?: string | undefined;
950
972
  } | undefined;
951
- status?: string | undefined;
952
- description?: string | undefined;
953
- size?: number | undefined;
954
- indexed?: string | undefined;
955
- mimeType?: string | undefined;
973
+ url: string;
956
974
  organizationIdentifiers?: {
957
975
  name?: string | undefined;
958
976
  identifierValues?: string[] | undefined;
959
977
  }[] | undefined;
960
978
  }[];
979
+ }, {
980
+ patientId: string;
961
981
  externalId?: string | undefined;
962
982
  additionalIds?: Record<string, string[]> | undefined;
963
- }, {
964
983
  status: "completed" | "failed";
965
- patientId: string;
966
984
  documents: {
967
985
  id: string;
968
- url: string;
969
986
  fileName: string;
987
+ description?: string | undefined;
988
+ status?: string | undefined;
989
+ indexed?: string | undefined;
990
+ mimeType?: string | undefined;
991
+ size?: number | undefined;
970
992
  type?: {
971
- text?: string | undefined;
972
993
  coding?: {
994
+ system?: string | null | undefined;
973
995
  code?: string | null | undefined;
974
996
  display?: string | null | undefined;
975
- system?: string | null | undefined;
976
997
  }[] | undefined;
998
+ text?: string | undefined;
977
999
  } | undefined;
978
- status?: string | undefined;
979
- description?: string | undefined;
980
- size?: number | undefined;
981
- indexed?: string | undefined;
982
- mimeType?: string | undefined;
1000
+ url: string;
983
1001
  organizationIdentifiers?: {
984
1002
  name?: string | undefined;
985
1003
  identifierValues?: string[] | undefined;
986
1004
  }[] | undefined;
987
1005
  }[];
988
- externalId?: string | undefined;
989
- additionalIds?: Record<string, string[]> | undefined;
990
1006
  }>, "many">;
991
1007
  }, "strip", z.ZodTypeAny, {
992
1008
  meta: {
993
- type: "medical.document-bulk-download-urls";
994
1009
  messageId: string;
1010
+ requestId?: string | undefined;
995
1011
  when: string;
996
1012
  data?: unknown;
997
- requestId?: string | undefined;
1013
+ type: "medical.document-bulk-download-urls";
998
1014
  };
999
1015
  patients: {
1000
- status: "completed" | "failed";
1001
1016
  patientId: string;
1017
+ externalId?: string | undefined;
1018
+ additionalIds?: Record<string, string[]> | undefined;
1019
+ status: "completed" | "failed";
1002
1020
  documents: {
1003
1021
  id: string;
1004
- url: string;
1005
1022
  fileName: string;
1023
+ description?: string | undefined;
1024
+ status?: string | undefined;
1025
+ indexed?: string | undefined;
1026
+ mimeType?: string | undefined;
1027
+ size?: number | undefined;
1006
1028
  type?: {
1007
- text?: string | undefined;
1008
1029
  coding?: {
1030
+ system?: string | null | undefined;
1009
1031
  code?: string | null | undefined;
1010
1032
  display?: string | null | undefined;
1011
- system?: string | null | undefined;
1012
1033
  }[] | undefined;
1034
+ text?: string | undefined;
1013
1035
  } | undefined;
1014
- status?: string | undefined;
1015
- description?: string | undefined;
1016
- size?: number | undefined;
1017
- indexed?: string | undefined;
1018
- mimeType?: string | undefined;
1036
+ url: string;
1019
1037
  organizationIdentifiers?: {
1020
1038
  name?: string | undefined;
1021
1039
  identifierValues?: string[] | undefined;
1022
1040
  }[] | undefined;
1023
1041
  }[];
1024
- externalId?: string | undefined;
1025
- additionalIds?: Record<string, string[]> | undefined;
1026
1042
  }[];
1027
1043
  }, {
1028
1044
  meta: {
1029
- type: "medical.document-bulk-download-urls";
1030
1045
  messageId: string;
1046
+ requestId?: string | undefined;
1031
1047
  when: string;
1032
1048
  data?: unknown;
1033
- requestId?: string | undefined;
1049
+ type: "medical.document-bulk-download-urls";
1034
1050
  };
1035
1051
  patients: {
1036
- status: "completed" | "failed";
1037
1052
  patientId: string;
1053
+ externalId?: string | undefined;
1054
+ additionalIds?: Record<string, string[]> | undefined;
1055
+ status: "completed" | "failed";
1038
1056
  documents: {
1039
1057
  id: string;
1040
- url: string;
1041
1058
  fileName: string;
1059
+ description?: string | undefined;
1060
+ status?: string | undefined;
1061
+ indexed?: string | undefined;
1062
+ mimeType?: string | undefined;
1063
+ size?: number | undefined;
1042
1064
  type?: {
1043
- text?: string | undefined;
1044
1065
  coding?: {
1066
+ system?: string | null | undefined;
1045
1067
  code?: string | null | undefined;
1046
1068
  display?: string | null | undefined;
1047
- system?: string | null | undefined;
1048
1069
  }[] | undefined;
1070
+ text?: string | undefined;
1049
1071
  } | undefined;
1050
- status?: string | undefined;
1051
- description?: string | undefined;
1052
- size?: number | undefined;
1053
- indexed?: string | undefined;
1054
- mimeType?: string | undefined;
1072
+ url: string;
1055
1073
  organizationIdentifiers?: {
1056
1074
  name?: string | undefined;
1057
1075
  identifierValues?: string[] | undefined;
1058
1076
  }[] | undefined;
1059
1077
  }[];
1060
- externalId?: string | undefined;
1061
- additionalIds?: Record<string, string[]> | undefined;
1062
1078
  }[];
1063
1079
  }>;
1064
1080
  export type DocumentBulkDownloadWebhookRequest = z.infer<typeof documentBulkDownloadWebhookRequestSchema>;
@@ -1082,29 +1098,29 @@ export declare const documentBulkDownloadWebhookPatientSchemaPaged: z.ZodObject<
1082
1098
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1083
1099
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1084
1100
  }, "strip", z.ZodTypeAny, {
1101
+ system?: string | null | undefined;
1085
1102
  code?: string | null | undefined;
1086
1103
  display?: string | null | undefined;
1087
- system?: string | null | undefined;
1088
1104
  }, {
1105
+ system?: string | null | undefined;
1089
1106
  code?: string | null | undefined;
1090
1107
  display?: string | null | undefined;
1091
- system?: string | null | undefined;
1092
1108
  }>, "many">>;
1093
1109
  text: z.ZodOptional<z.ZodString>;
1094
1110
  }, "strip", z.ZodTypeAny, {
1095
- text?: string | undefined;
1096
1111
  coding?: {
1112
+ system?: string | null | undefined;
1097
1113
  code?: string | null | undefined;
1098
1114
  display?: string | null | undefined;
1099
- system?: string | null | undefined;
1100
1115
  }[] | undefined;
1101
- }, {
1102
1116
  text?: string | undefined;
1117
+ }, {
1103
1118
  coding?: {
1119
+ system?: string | null | undefined;
1104
1120
  code?: string | null | undefined;
1105
1121
  display?: string | null | undefined;
1106
- system?: string | null | undefined;
1107
1122
  }[] | undefined;
1123
+ text?: string | undefined;
1108
1124
  }>>;
1109
1125
  }, {
1110
1126
  url: z.ZodString;
@@ -1121,48 +1137,48 @@ export declare const documentBulkDownloadWebhookPatientSchemaPaged: z.ZodObject<
1121
1137
  downloadUrl: z.ZodString;
1122
1138
  }>, "strip", z.ZodTypeAny, {
1123
1139
  id: string;
1124
- url: string;
1125
1140
  fileName: string;
1126
- downloadUrl: string;
1141
+ description?: string | undefined;
1142
+ status?: string | undefined;
1143
+ indexed?: string | undefined;
1144
+ mimeType?: string | undefined;
1145
+ size?: number | undefined;
1127
1146
  type?: {
1128
- text?: string | undefined;
1129
1147
  coding?: {
1148
+ system?: string | null | undefined;
1130
1149
  code?: string | null | undefined;
1131
1150
  display?: string | null | undefined;
1132
- system?: string | null | undefined;
1133
1151
  }[] | undefined;
1152
+ text?: string | undefined;
1134
1153
  } | undefined;
1135
- status?: string | undefined;
1136
- description?: string | undefined;
1137
- size?: number | undefined;
1138
- indexed?: string | undefined;
1139
- mimeType?: string | undefined;
1154
+ url: string;
1140
1155
  organizationIdentifiers?: {
1141
1156
  name?: string | undefined;
1142
1157
  identifierValues?: string[] | undefined;
1143
1158
  }[] | undefined;
1159
+ downloadUrl: string;
1144
1160
  }, {
1145
1161
  id: string;
1146
- url: string;
1147
1162
  fileName: string;
1148
- downloadUrl: string;
1163
+ description?: string | undefined;
1164
+ status?: string | undefined;
1165
+ indexed?: string | undefined;
1166
+ mimeType?: string | undefined;
1167
+ size?: number | undefined;
1149
1168
  type?: {
1150
- text?: string | undefined;
1151
1169
  coding?: {
1170
+ system?: string | null | undefined;
1152
1171
  code?: string | null | undefined;
1153
1172
  display?: string | null | undefined;
1154
- system?: string | null | undefined;
1155
1173
  }[] | undefined;
1174
+ text?: string | undefined;
1156
1175
  } | undefined;
1157
- status?: string | undefined;
1158
- description?: string | undefined;
1159
- size?: number | undefined;
1160
- indexed?: string | undefined;
1161
- mimeType?: string | undefined;
1176
+ url: string;
1162
1177
  organizationIdentifiers?: {
1163
1178
  name?: string | undefined;
1164
1179
  identifierValues?: string[] | undefined;
1165
1180
  }[] | undefined;
1181
+ downloadUrl: string;
1166
1182
  }>, "many">;
1167
1183
  pagination: z.ZodObject<{
1168
1184
  page: z.ZodNumber;
@@ -1178,71 +1194,71 @@ export declare const documentBulkDownloadWebhookPatientSchemaPaged: z.ZodObject<
1178
1194
  totalItems: number;
1179
1195
  }>;
1180
1196
  }>, "strip", z.ZodTypeAny, {
1181
- status: "completed" | "failed";
1182
1197
  patientId: string;
1198
+ externalId?: string | undefined;
1199
+ additionalIds?: Record<string, string[]> | undefined;
1200
+ status: "completed" | "failed";
1183
1201
  documents: {
1184
1202
  id: string;
1185
- url: string;
1186
1203
  fileName: string;
1187
- downloadUrl: string;
1204
+ description?: string | undefined;
1205
+ status?: string | undefined;
1206
+ indexed?: string | undefined;
1207
+ mimeType?: string | undefined;
1208
+ size?: number | undefined;
1188
1209
  type?: {
1189
- text?: string | undefined;
1190
1210
  coding?: {
1211
+ system?: string | null | undefined;
1191
1212
  code?: string | null | undefined;
1192
1213
  display?: string | null | undefined;
1193
- system?: string | null | undefined;
1194
1214
  }[] | undefined;
1215
+ text?: string | undefined;
1195
1216
  } | undefined;
1196
- status?: string | undefined;
1197
- description?: string | undefined;
1198
- size?: number | undefined;
1199
- indexed?: string | undefined;
1200
- mimeType?: string | undefined;
1217
+ url: string;
1201
1218
  organizationIdentifiers?: {
1202
1219
  name?: string | undefined;
1203
1220
  identifierValues?: string[] | undefined;
1204
1221
  }[] | undefined;
1222
+ downloadUrl: string;
1205
1223
  }[];
1206
1224
  pagination: {
1207
1225
  page: number;
1208
1226
  totalPages: number;
1209
1227
  totalItems: number;
1210
1228
  };
1229
+ }, {
1230
+ patientId: string;
1211
1231
  externalId?: string | undefined;
1212
1232
  additionalIds?: Record<string, string[]> | undefined;
1213
- }, {
1214
1233
  status: "completed" | "failed";
1215
- patientId: string;
1216
1234
  documents: {
1217
1235
  id: string;
1218
- url: string;
1219
1236
  fileName: string;
1220
- downloadUrl: string;
1237
+ description?: string | undefined;
1238
+ status?: string | undefined;
1239
+ indexed?: string | undefined;
1240
+ mimeType?: string | undefined;
1241
+ size?: number | undefined;
1221
1242
  type?: {
1222
- text?: string | undefined;
1223
1243
  coding?: {
1244
+ system?: string | null | undefined;
1224
1245
  code?: string | null | undefined;
1225
1246
  display?: string | null | undefined;
1226
- system?: string | null | undefined;
1227
1247
  }[] | undefined;
1248
+ text?: string | undefined;
1228
1249
  } | undefined;
1229
- status?: string | undefined;
1230
- description?: string | undefined;
1231
- size?: number | undefined;
1232
- indexed?: string | undefined;
1233
- mimeType?: string | undefined;
1250
+ url: string;
1234
1251
  organizationIdentifiers?: {
1235
1252
  name?: string | undefined;
1236
1253
  identifierValues?: string[] | undefined;
1237
1254
  }[] | undefined;
1255
+ downloadUrl: string;
1238
1256
  }[];
1239
1257
  pagination: {
1240
1258
  page: number;
1241
1259
  totalPages: number;
1242
1260
  totalItems: number;
1243
1261
  };
1244
- externalId?: string | undefined;
1245
- additionalIds?: Record<string, string[]> | undefined;
1246
1262
  }>;
1247
1263
  export type DocumentBulkDownloadWebhookPatientPaged = z.infer<typeof documentBulkDownloadWebhookPatientSchemaPaged>;
1248
1264
  export declare const documentBulkDownloadWebhookRequestSchemaPaged: z.ZodObject<{
@@ -1257,17 +1273,17 @@ export declare const documentBulkDownloadWebhookRequestSchemaPaged: z.ZodObject<
1257
1273
  }, {
1258
1274
  type: z.ZodLiteral<"medical.document-bulk-download-paged">;
1259
1275
  }>, "strip", z.ZodTypeAny, {
1260
- type: "medical.document-bulk-download-paged";
1261
1276
  messageId: string;
1277
+ requestId?: string | undefined;
1262
1278
  when: string;
1263
1279
  data?: unknown;
1264
- requestId?: string | undefined;
1265
- }, {
1266
1280
  type: "medical.document-bulk-download-paged";
1281
+ }, {
1267
1282
  messageId: string;
1283
+ requestId?: string | undefined;
1268
1284
  when: string;
1269
1285
  data?: unknown;
1270
- requestId?: string | undefined;
1286
+ type: "medical.document-bulk-download-paged";
1271
1287
  }>;
1272
1288
  patients: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
1273
1289
  patientId: z.ZodString;
@@ -1289,29 +1305,29 @@ export declare const documentBulkDownloadWebhookRequestSchemaPaged: z.ZodObject<
1289
1305
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1290
1306
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1291
1307
  }, "strip", z.ZodTypeAny, {
1308
+ system?: string | null | undefined;
1292
1309
  code?: string | null | undefined;
1293
1310
  display?: string | null | undefined;
1294
- system?: string | null | undefined;
1295
1311
  }, {
1312
+ system?: string | null | undefined;
1296
1313
  code?: string | null | undefined;
1297
1314
  display?: string | null | undefined;
1298
- system?: string | null | undefined;
1299
1315
  }>, "many">>;
1300
1316
  text: z.ZodOptional<z.ZodString>;
1301
1317
  }, "strip", z.ZodTypeAny, {
1302
- text?: string | undefined;
1303
1318
  coding?: {
1319
+ system?: string | null | undefined;
1304
1320
  code?: string | null | undefined;
1305
1321
  display?: string | null | undefined;
1306
- system?: string | null | undefined;
1307
1322
  }[] | undefined;
1308
- }, {
1309
1323
  text?: string | undefined;
1324
+ }, {
1310
1325
  coding?: {
1326
+ system?: string | null | undefined;
1311
1327
  code?: string | null | undefined;
1312
1328
  display?: string | null | undefined;
1313
- system?: string | null | undefined;
1314
1329
  }[] | undefined;
1330
+ text?: string | undefined;
1315
1331
  }>>;
1316
1332
  }, {
1317
1333
  url: z.ZodString;
@@ -1328,48 +1344,48 @@ export declare const documentBulkDownloadWebhookRequestSchemaPaged: z.ZodObject<
1328
1344
  downloadUrl: z.ZodString;
1329
1345
  }>, "strip", z.ZodTypeAny, {
1330
1346
  id: string;
1331
- url: string;
1332
1347
  fileName: string;
1333
- downloadUrl: string;
1348
+ description?: string | undefined;
1349
+ status?: string | undefined;
1350
+ indexed?: string | undefined;
1351
+ mimeType?: string | undefined;
1352
+ size?: number | undefined;
1334
1353
  type?: {
1335
- text?: string | undefined;
1336
1354
  coding?: {
1355
+ system?: string | null | undefined;
1337
1356
  code?: string | null | undefined;
1338
1357
  display?: string | null | undefined;
1339
- system?: string | null | undefined;
1340
1358
  }[] | undefined;
1359
+ text?: string | undefined;
1341
1360
  } | undefined;
1342
- status?: string | undefined;
1343
- description?: string | undefined;
1344
- size?: number | undefined;
1345
- indexed?: string | undefined;
1346
- mimeType?: string | undefined;
1361
+ url: string;
1347
1362
  organizationIdentifiers?: {
1348
1363
  name?: string | undefined;
1349
1364
  identifierValues?: string[] | undefined;
1350
1365
  }[] | undefined;
1366
+ downloadUrl: string;
1351
1367
  }, {
1352
1368
  id: string;
1353
- url: string;
1354
1369
  fileName: string;
1355
- downloadUrl: string;
1370
+ description?: string | undefined;
1371
+ status?: string | undefined;
1372
+ indexed?: string | undefined;
1373
+ mimeType?: string | undefined;
1374
+ size?: number | undefined;
1356
1375
  type?: {
1357
- text?: string | undefined;
1358
1376
  coding?: {
1377
+ system?: string | null | undefined;
1359
1378
  code?: string | null | undefined;
1360
1379
  display?: string | null | undefined;
1361
- system?: string | null | undefined;
1362
1380
  }[] | undefined;
1381
+ text?: string | undefined;
1363
1382
  } | undefined;
1364
- status?: string | undefined;
1365
- description?: string | undefined;
1366
- size?: number | undefined;
1367
- indexed?: string | undefined;
1368
- mimeType?: string | undefined;
1383
+ url: string;
1369
1384
  organizationIdentifiers?: {
1370
1385
  name?: string | undefined;
1371
1386
  identifierValues?: string[] | undefined;
1372
1387
  }[] | undefined;
1388
+ downloadUrl: string;
1373
1389
  }>, "many">;
1374
1390
  pagination: z.ZodObject<{
1375
1391
  page: z.ZodNumber;
@@ -1385,155 +1401,155 @@ export declare const documentBulkDownloadWebhookRequestSchemaPaged: z.ZodObject<
1385
1401
  totalItems: number;
1386
1402
  }>;
1387
1403
  }>, "strip", z.ZodTypeAny, {
1388
- status: "completed" | "failed";
1389
1404
  patientId: string;
1405
+ externalId?: string | undefined;
1406
+ additionalIds?: Record<string, string[]> | undefined;
1407
+ status: "completed" | "failed";
1390
1408
  documents: {
1391
1409
  id: string;
1392
- url: string;
1393
1410
  fileName: string;
1394
- downloadUrl: string;
1411
+ description?: string | undefined;
1412
+ status?: string | undefined;
1413
+ indexed?: string | undefined;
1414
+ mimeType?: string | undefined;
1415
+ size?: number | undefined;
1395
1416
  type?: {
1396
- text?: string | undefined;
1397
1417
  coding?: {
1418
+ system?: string | null | undefined;
1398
1419
  code?: string | null | undefined;
1399
1420
  display?: string | null | undefined;
1400
- system?: string | null | undefined;
1401
1421
  }[] | undefined;
1422
+ text?: string | undefined;
1402
1423
  } | undefined;
1403
- status?: string | undefined;
1404
- description?: string | undefined;
1405
- size?: number | undefined;
1406
- indexed?: string | undefined;
1407
- mimeType?: string | undefined;
1424
+ url: string;
1408
1425
  organizationIdentifiers?: {
1409
1426
  name?: string | undefined;
1410
1427
  identifierValues?: string[] | undefined;
1411
1428
  }[] | undefined;
1429
+ downloadUrl: string;
1412
1430
  }[];
1413
1431
  pagination: {
1414
1432
  page: number;
1415
1433
  totalPages: number;
1416
1434
  totalItems: number;
1417
1435
  };
1436
+ }, {
1437
+ patientId: string;
1418
1438
  externalId?: string | undefined;
1419
1439
  additionalIds?: Record<string, string[]> | undefined;
1420
- }, {
1421
1440
  status: "completed" | "failed";
1422
- patientId: string;
1423
1441
  documents: {
1424
1442
  id: string;
1425
- url: string;
1426
1443
  fileName: string;
1427
- downloadUrl: string;
1444
+ description?: string | undefined;
1445
+ status?: string | undefined;
1446
+ indexed?: string | undefined;
1447
+ mimeType?: string | undefined;
1448
+ size?: number | undefined;
1428
1449
  type?: {
1429
- text?: string | undefined;
1430
1450
  coding?: {
1451
+ system?: string | null | undefined;
1431
1452
  code?: string | null | undefined;
1432
1453
  display?: string | null | undefined;
1433
- system?: string | null | undefined;
1434
1454
  }[] | undefined;
1455
+ text?: string | undefined;
1435
1456
  } | undefined;
1436
- status?: string | undefined;
1437
- description?: string | undefined;
1438
- size?: number | undefined;
1439
- indexed?: string | undefined;
1440
- mimeType?: string | undefined;
1457
+ url: string;
1441
1458
  organizationIdentifiers?: {
1442
1459
  name?: string | undefined;
1443
1460
  identifierValues?: string[] | undefined;
1444
1461
  }[] | undefined;
1462
+ downloadUrl: string;
1445
1463
  }[];
1446
1464
  pagination: {
1447
1465
  page: number;
1448
1466
  totalPages: number;
1449
1467
  totalItems: number;
1450
1468
  };
1451
- externalId?: string | undefined;
1452
- additionalIds?: Record<string, string[]> | undefined;
1453
1469
  }>, "many">;
1454
1470
  }, "strip", z.ZodTypeAny, {
1455
1471
  meta: {
1456
- type: "medical.document-bulk-download-paged";
1457
1472
  messageId: string;
1473
+ requestId?: string | undefined;
1458
1474
  when: string;
1459
1475
  data?: unknown;
1460
- requestId?: string | undefined;
1476
+ type: "medical.document-bulk-download-paged";
1461
1477
  };
1462
1478
  patients: {
1463
- status: "completed" | "failed";
1464
1479
  patientId: string;
1480
+ externalId?: string | undefined;
1481
+ additionalIds?: Record<string, string[]> | undefined;
1482
+ status: "completed" | "failed";
1465
1483
  documents: {
1466
1484
  id: string;
1467
- url: string;
1468
1485
  fileName: string;
1469
- downloadUrl: string;
1486
+ description?: string | undefined;
1487
+ status?: string | undefined;
1488
+ indexed?: string | undefined;
1489
+ mimeType?: string | undefined;
1490
+ size?: number | undefined;
1470
1491
  type?: {
1471
- text?: string | undefined;
1472
1492
  coding?: {
1493
+ system?: string | null | undefined;
1473
1494
  code?: string | null | undefined;
1474
1495
  display?: string | null | undefined;
1475
- system?: string | null | undefined;
1476
1496
  }[] | undefined;
1497
+ text?: string | undefined;
1477
1498
  } | undefined;
1478
- status?: string | undefined;
1479
- description?: string | undefined;
1480
- size?: number | undefined;
1481
- indexed?: string | undefined;
1482
- mimeType?: string | undefined;
1499
+ url: string;
1483
1500
  organizationIdentifiers?: {
1484
1501
  name?: string | undefined;
1485
1502
  identifierValues?: string[] | undefined;
1486
1503
  }[] | undefined;
1504
+ downloadUrl: string;
1487
1505
  }[];
1488
1506
  pagination: {
1489
1507
  page: number;
1490
1508
  totalPages: number;
1491
1509
  totalItems: number;
1492
1510
  };
1493
- externalId?: string | undefined;
1494
- additionalIds?: Record<string, string[]> | undefined;
1495
1511
  }[];
1496
1512
  }, {
1497
1513
  meta: {
1498
- type: "medical.document-bulk-download-paged";
1499
1514
  messageId: string;
1515
+ requestId?: string | undefined;
1500
1516
  when: string;
1501
1517
  data?: unknown;
1502
- requestId?: string | undefined;
1518
+ type: "medical.document-bulk-download-paged";
1503
1519
  };
1504
1520
  patients: {
1505
- status: "completed" | "failed";
1506
1521
  patientId: string;
1522
+ externalId?: string | undefined;
1523
+ additionalIds?: Record<string, string[]> | undefined;
1524
+ status: "completed" | "failed";
1507
1525
  documents: {
1508
1526
  id: string;
1509
- url: string;
1510
1527
  fileName: string;
1511
- downloadUrl: string;
1528
+ description?: string | undefined;
1529
+ status?: string | undefined;
1530
+ indexed?: string | undefined;
1531
+ mimeType?: string | undefined;
1532
+ size?: number | undefined;
1512
1533
  type?: {
1513
- text?: string | undefined;
1514
1534
  coding?: {
1535
+ system?: string | null | undefined;
1515
1536
  code?: string | null | undefined;
1516
1537
  display?: string | null | undefined;
1517
- system?: string | null | undefined;
1518
1538
  }[] | undefined;
1539
+ text?: string | undefined;
1519
1540
  } | undefined;
1520
- status?: string | undefined;
1521
- description?: string | undefined;
1522
- size?: number | undefined;
1523
- indexed?: string | undefined;
1524
- mimeType?: string | undefined;
1541
+ url: string;
1525
1542
  organizationIdentifiers?: {
1526
1543
  name?: string | undefined;
1527
1544
  identifierValues?: string[] | undefined;
1528
1545
  }[] | undefined;
1546
+ downloadUrl: string;
1529
1547
  }[];
1530
1548
  pagination: {
1531
1549
  page: number;
1532
1550
  totalPages: number;
1533
1551
  totalItems: number;
1534
1552
  };
1535
- externalId?: string | undefined;
1536
- additionalIds?: Record<string, string[]> | undefined;
1537
1553
  }[];
1538
1554
  }>;
1539
1555
  export type DocumentBulkDownloadWebhookRequestPaged = z.infer<typeof documentBulkDownloadWebhookRequestSchemaPaged>;
@@ -1542,12 +1558,12 @@ export declare const bulkPatientImportWebhookEntrySchema: z.ZodObject<{
1542
1558
  status: z.ZodEnum<["waiting", "processing", "completed", "failed"]>;
1543
1559
  result: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1544
1560
  }, "strip", z.ZodTypeAny, {
1545
- status: "waiting" | "processing" | "completed" | "failed";
1546
1561
  requestId: string;
1562
+ status: "completed" | "failed" | "processing" | "waiting";
1547
1563
  result?: string | null | undefined;
1548
1564
  }, {
1549
- status: "waiting" | "processing" | "completed" | "failed";
1550
1565
  requestId: string;
1566
+ status: "completed" | "failed" | "processing" | "waiting";
1551
1567
  result?: string | null | undefined;
1552
1568
  }>;
1553
1569
  export type BulkPatientImportWebhookEntry = z.infer<typeof bulkPatientImportWebhookEntrySchema>;
@@ -1563,55 +1579,55 @@ export declare const bulkPatientImportWebhookRequestSchema: z.ZodObject<{
1563
1579
  }, {
1564
1580
  type: z.ZodLiteral<"medical.bulk-patient-create">;
1565
1581
  }>, "strip", z.ZodTypeAny, {
1566
- type: "medical.bulk-patient-create";
1567
1582
  messageId: string;
1583
+ requestId?: string | undefined;
1568
1584
  when: string;
1569
1585
  data?: unknown;
1570
- requestId?: string | undefined;
1571
- }, {
1572
1586
  type: "medical.bulk-patient-create";
1587
+ }, {
1573
1588
  messageId: string;
1589
+ requestId?: string | undefined;
1574
1590
  when: string;
1575
1591
  data?: unknown;
1576
- requestId?: string | undefined;
1592
+ type: "medical.bulk-patient-create";
1577
1593
  }>;
1578
1594
  bulkPatientCreate: z.ZodObject<{
1579
1595
  requestId: z.ZodString;
1580
1596
  status: z.ZodEnum<["waiting", "processing", "completed", "failed"]>;
1581
1597
  result: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1582
1598
  }, "strip", z.ZodTypeAny, {
1583
- status: "waiting" | "processing" | "completed" | "failed";
1584
1599
  requestId: string;
1600
+ status: "completed" | "failed" | "processing" | "waiting";
1585
1601
  result?: string | null | undefined;
1586
1602
  }, {
1587
- status: "waiting" | "processing" | "completed" | "failed";
1588
1603
  requestId: string;
1604
+ status: "completed" | "failed" | "processing" | "waiting";
1589
1605
  result?: string | null | undefined;
1590
1606
  }>;
1591
1607
  }, "strip", z.ZodTypeAny, {
1592
1608
  meta: {
1593
- type: "medical.bulk-patient-create";
1594
1609
  messageId: string;
1610
+ requestId?: string | undefined;
1595
1611
  when: string;
1596
1612
  data?: unknown;
1597
- requestId?: string | undefined;
1613
+ type: "medical.bulk-patient-create";
1598
1614
  };
1599
1615
  bulkPatientCreate: {
1600
- status: "waiting" | "processing" | "completed" | "failed";
1601
1616
  requestId: string;
1617
+ status: "completed" | "failed" | "processing" | "waiting";
1602
1618
  result?: string | null | undefined;
1603
1619
  };
1604
1620
  }, {
1605
1621
  meta: {
1606
- type: "medical.bulk-patient-create";
1607
1622
  messageId: string;
1623
+ requestId?: string | undefined;
1608
1624
  when: string;
1609
1625
  data?: unknown;
1610
- requestId?: string | undefined;
1626
+ type: "medical.bulk-patient-create";
1611
1627
  };
1612
1628
  bulkPatientCreate: {
1613
- status: "waiting" | "processing" | "completed" | "failed";
1614
1629
  requestId: string;
1630
+ status: "completed" | "failed" | "processing" | "waiting";
1615
1631
  result?: string | null | undefined;
1616
1632
  };
1617
1633
  }>;
@@ -1640,36 +1656,36 @@ export declare const networkQueryWebhookPayloadSchema: z.ZodObject<{
1640
1656
  status: z.ZodEnum<["completed", "failed"]>;
1641
1657
  completedAt: z.ZodEffects<z.ZodString, string, string>;
1642
1658
  }, "strip", z.ZodTypeAny, {
1643
- type: "pharmacy" | "hie" | "lab";
1659
+ type: "hie" | "lab" | "pharmacy";
1660
+ source?: string | undefined;
1644
1661
  status: "completed" | "failed";
1645
1662
  completedAt: string;
1646
- source?: string | undefined;
1647
1663
  }, {
1648
- type: "pharmacy" | "hie" | "lab";
1664
+ type: "hie" | "lab" | "pharmacy";
1665
+ source?: string | undefined;
1649
1666
  status: "completed" | "failed";
1650
1667
  completedAt: string;
1651
- source?: string | undefined;
1652
1668
  }>;
1653
1669
  }, "strip", z.ZodTypeAny, {
1670
+ patientId: string;
1671
+ externalId?: string | undefined;
1672
+ consolidatedDataUrl: string;
1654
1673
  source: {
1655
- type: "pharmacy" | "hie" | "lab";
1674
+ type: "hie" | "lab" | "pharmacy";
1675
+ source?: string | undefined;
1656
1676
  status: "completed" | "failed";
1657
1677
  completedAt: string;
1658
- source?: string | undefined;
1659
1678
  };
1679
+ }, {
1660
1680
  patientId: string;
1661
- consolidatedDataUrl: string;
1662
1681
  externalId?: string | undefined;
1663
- }, {
1682
+ consolidatedDataUrl: string;
1664
1683
  source: {
1665
- type: "pharmacy" | "hie" | "lab";
1684
+ type: "hie" | "lab" | "pharmacy";
1685
+ source?: string | undefined;
1666
1686
  status: "completed" | "failed";
1667
1687
  completedAt: string;
1668
- source?: string | undefined;
1669
1688
  };
1670
- patientId: string;
1671
- consolidatedDataUrl: string;
1672
- externalId?: string | undefined;
1673
1689
  }>;
1674
1690
  export type NetworkQueryWebhookPayload = z.infer<typeof networkQueryWebhookPayloadSchema>;
1675
1691
  export declare const networkQueryHieWebhookRequestSchema: z.ZodObject<{
@@ -1684,17 +1700,17 @@ export declare const networkQueryHieWebhookRequestSchema: z.ZodObject<{
1684
1700
  }, {
1685
1701
  type: z.ZodLiteral<"network-query.hie">;
1686
1702
  }>, "strip", z.ZodTypeAny, {
1687
- type: "network-query.hie";
1688
1703
  messageId: string;
1704
+ requestId?: string | undefined;
1689
1705
  when: string;
1690
1706
  data?: unknown;
1691
- requestId?: string | undefined;
1692
- }, {
1693
1707
  type: "network-query.hie";
1708
+ }, {
1694
1709
  messageId: string;
1710
+ requestId?: string | undefined;
1695
1711
  when: string;
1696
1712
  data?: unknown;
1697
- requestId?: string | undefined;
1713
+ type: "network-query.hie";
1698
1714
  }>;
1699
1715
  payload: z.ZodObject<{
1700
1716
  patientId: z.ZodString;
@@ -1706,74 +1722,74 @@ export declare const networkQueryHieWebhookRequestSchema: z.ZodObject<{
1706
1722
  status: z.ZodEnum<["completed", "failed"]>;
1707
1723
  completedAt: z.ZodEffects<z.ZodString, string, string>;
1708
1724
  }, "strip", z.ZodTypeAny, {
1709
- type: "pharmacy" | "hie" | "lab";
1725
+ type: "hie" | "lab" | "pharmacy";
1726
+ source?: string | undefined;
1710
1727
  status: "completed" | "failed";
1711
1728
  completedAt: string;
1712
- source?: string | undefined;
1713
1729
  }, {
1714
- type: "pharmacy" | "hie" | "lab";
1730
+ type: "hie" | "lab" | "pharmacy";
1731
+ source?: string | undefined;
1715
1732
  status: "completed" | "failed";
1716
1733
  completedAt: string;
1717
- source?: string | undefined;
1718
1734
  }>;
1719
1735
  }, "strip", z.ZodTypeAny, {
1736
+ patientId: string;
1737
+ externalId?: string | undefined;
1738
+ consolidatedDataUrl: string;
1720
1739
  source: {
1721
- type: "pharmacy" | "hie" | "lab";
1740
+ type: "hie" | "lab" | "pharmacy";
1741
+ source?: string | undefined;
1722
1742
  status: "completed" | "failed";
1723
1743
  completedAt: string;
1724
- source?: string | undefined;
1725
1744
  };
1745
+ }, {
1726
1746
  patientId: string;
1727
- consolidatedDataUrl: string;
1728
1747
  externalId?: string | undefined;
1729
- }, {
1748
+ consolidatedDataUrl: string;
1730
1749
  source: {
1731
- type: "pharmacy" | "hie" | "lab";
1750
+ type: "hie" | "lab" | "pharmacy";
1751
+ source?: string | undefined;
1732
1752
  status: "completed" | "failed";
1733
1753
  completedAt: string;
1734
- source?: string | undefined;
1735
1754
  };
1736
- patientId: string;
1737
- consolidatedDataUrl: string;
1738
- externalId?: string | undefined;
1739
1755
  }>;
1740
1756
  }, "strip", z.ZodTypeAny, {
1741
1757
  meta: {
1742
- type: "network-query.hie";
1743
1758
  messageId: string;
1759
+ requestId?: string | undefined;
1744
1760
  when: string;
1745
1761
  data?: unknown;
1746
- requestId?: string | undefined;
1762
+ type: "network-query.hie";
1747
1763
  };
1748
1764
  payload: {
1765
+ patientId: string;
1766
+ externalId?: string | undefined;
1767
+ consolidatedDataUrl: string;
1749
1768
  source: {
1750
- type: "pharmacy" | "hie" | "lab";
1769
+ type: "hie" | "lab" | "pharmacy";
1770
+ source?: string | undefined;
1751
1771
  status: "completed" | "failed";
1752
1772
  completedAt: string;
1753
- source?: string | undefined;
1754
1773
  };
1755
- patientId: string;
1756
- consolidatedDataUrl: string;
1757
- externalId?: string | undefined;
1758
1774
  };
1759
1775
  }, {
1760
1776
  meta: {
1761
- type: "network-query.hie";
1762
1777
  messageId: string;
1778
+ requestId?: string | undefined;
1763
1779
  when: string;
1764
1780
  data?: unknown;
1765
- requestId?: string | undefined;
1781
+ type: "network-query.hie";
1766
1782
  };
1767
1783
  payload: {
1784
+ patientId: string;
1785
+ externalId?: string | undefined;
1786
+ consolidatedDataUrl: string;
1768
1787
  source: {
1769
- type: "pharmacy" | "hie" | "lab";
1788
+ type: "hie" | "lab" | "pharmacy";
1789
+ source?: string | undefined;
1770
1790
  status: "completed" | "failed";
1771
1791
  completedAt: string;
1772
- source?: string | undefined;
1773
1792
  };
1774
- patientId: string;
1775
- consolidatedDataUrl: string;
1776
- externalId?: string | undefined;
1777
1793
  };
1778
1794
  }>;
1779
1795
  export type NetworkQueryHieWebhookRequest = z.infer<typeof networkQueryHieWebhookRequestSchema>;
@@ -1789,17 +1805,17 @@ export declare const networkQueryPharmacyWebhookRequestSchema: z.ZodObject<{
1789
1805
  }, {
1790
1806
  type: z.ZodLiteral<"network-query.pharmacy">;
1791
1807
  }>, "strip", z.ZodTypeAny, {
1792
- type: "network-query.pharmacy";
1793
1808
  messageId: string;
1809
+ requestId?: string | undefined;
1794
1810
  when: string;
1795
1811
  data?: unknown;
1796
- requestId?: string | undefined;
1797
- }, {
1798
1812
  type: "network-query.pharmacy";
1813
+ }, {
1799
1814
  messageId: string;
1815
+ requestId?: string | undefined;
1800
1816
  when: string;
1801
1817
  data?: unknown;
1802
- requestId?: string | undefined;
1818
+ type: "network-query.pharmacy";
1803
1819
  }>;
1804
1820
  payload: z.ZodObject<{
1805
1821
  patientId: z.ZodString;
@@ -1811,74 +1827,74 @@ export declare const networkQueryPharmacyWebhookRequestSchema: z.ZodObject<{
1811
1827
  status: z.ZodEnum<["completed", "failed"]>;
1812
1828
  completedAt: z.ZodEffects<z.ZodString, string, string>;
1813
1829
  }, "strip", z.ZodTypeAny, {
1814
- type: "pharmacy" | "hie" | "lab";
1830
+ type: "hie" | "lab" | "pharmacy";
1831
+ source?: string | undefined;
1815
1832
  status: "completed" | "failed";
1816
1833
  completedAt: string;
1817
- source?: string | undefined;
1818
1834
  }, {
1819
- type: "pharmacy" | "hie" | "lab";
1835
+ type: "hie" | "lab" | "pharmacy";
1836
+ source?: string | undefined;
1820
1837
  status: "completed" | "failed";
1821
1838
  completedAt: string;
1822
- source?: string | undefined;
1823
1839
  }>;
1824
1840
  }, "strip", z.ZodTypeAny, {
1841
+ patientId: string;
1842
+ externalId?: string | undefined;
1843
+ consolidatedDataUrl: string;
1825
1844
  source: {
1826
- type: "pharmacy" | "hie" | "lab";
1845
+ type: "hie" | "lab" | "pharmacy";
1846
+ source?: string | undefined;
1827
1847
  status: "completed" | "failed";
1828
1848
  completedAt: string;
1829
- source?: string | undefined;
1830
1849
  };
1850
+ }, {
1831
1851
  patientId: string;
1832
- consolidatedDataUrl: string;
1833
1852
  externalId?: string | undefined;
1834
- }, {
1853
+ consolidatedDataUrl: string;
1835
1854
  source: {
1836
- type: "pharmacy" | "hie" | "lab";
1855
+ type: "hie" | "lab" | "pharmacy";
1856
+ source?: string | undefined;
1837
1857
  status: "completed" | "failed";
1838
1858
  completedAt: string;
1839
- source?: string | undefined;
1840
1859
  };
1841
- patientId: string;
1842
- consolidatedDataUrl: string;
1843
- externalId?: string | undefined;
1844
1860
  }>;
1845
1861
  }, "strip", z.ZodTypeAny, {
1846
1862
  meta: {
1847
- type: "network-query.pharmacy";
1848
1863
  messageId: string;
1864
+ requestId?: string | undefined;
1849
1865
  when: string;
1850
1866
  data?: unknown;
1851
- requestId?: string | undefined;
1867
+ type: "network-query.pharmacy";
1852
1868
  };
1853
1869
  payload: {
1870
+ patientId: string;
1871
+ externalId?: string | undefined;
1872
+ consolidatedDataUrl: string;
1854
1873
  source: {
1855
- type: "pharmacy" | "hie" | "lab";
1874
+ type: "hie" | "lab" | "pharmacy";
1875
+ source?: string | undefined;
1856
1876
  status: "completed" | "failed";
1857
1877
  completedAt: string;
1858
- source?: string | undefined;
1859
1878
  };
1860
- patientId: string;
1861
- consolidatedDataUrl: string;
1862
- externalId?: string | undefined;
1863
1879
  };
1864
1880
  }, {
1865
1881
  meta: {
1866
- type: "network-query.pharmacy";
1867
1882
  messageId: string;
1883
+ requestId?: string | undefined;
1868
1884
  when: string;
1869
1885
  data?: unknown;
1870
- requestId?: string | undefined;
1886
+ type: "network-query.pharmacy";
1871
1887
  };
1872
1888
  payload: {
1889
+ patientId: string;
1890
+ externalId?: string | undefined;
1891
+ consolidatedDataUrl: string;
1873
1892
  source: {
1874
- type: "pharmacy" | "hie" | "lab";
1893
+ type: "hie" | "lab" | "pharmacy";
1894
+ source?: string | undefined;
1875
1895
  status: "completed" | "failed";
1876
1896
  completedAt: string;
1877
- source?: string | undefined;
1878
1897
  };
1879
- patientId: string;
1880
- consolidatedDataUrl: string;
1881
- externalId?: string | undefined;
1882
1898
  };
1883
1899
  }>;
1884
1900
  export type NetworkQueryPharmacyWebhookRequest = z.infer<typeof networkQueryPharmacyWebhookRequestSchema>;
@@ -1894,17 +1910,17 @@ export declare const networkQueryLabWebhookRequestSchema: z.ZodObject<{
1894
1910
  }, {
1895
1911
  type: z.ZodLiteral<"network-query.lab">;
1896
1912
  }>, "strip", z.ZodTypeAny, {
1897
- type: "network-query.lab";
1898
1913
  messageId: string;
1914
+ requestId?: string | undefined;
1899
1915
  when: string;
1900
1916
  data?: unknown;
1901
- requestId?: string | undefined;
1902
- }, {
1903
1917
  type: "network-query.lab";
1918
+ }, {
1904
1919
  messageId: string;
1920
+ requestId?: string | undefined;
1905
1921
  when: string;
1906
1922
  data?: unknown;
1907
- requestId?: string | undefined;
1923
+ type: "network-query.lab";
1908
1924
  }>;
1909
1925
  payload: z.ZodObject<{
1910
1926
  patientId: z.ZodString;
@@ -1916,74 +1932,74 @@ export declare const networkQueryLabWebhookRequestSchema: z.ZodObject<{
1916
1932
  status: z.ZodEnum<["completed", "failed"]>;
1917
1933
  completedAt: z.ZodEffects<z.ZodString, string, string>;
1918
1934
  }, "strip", z.ZodTypeAny, {
1919
- type: "pharmacy" | "hie" | "lab";
1935
+ type: "hie" | "lab" | "pharmacy";
1936
+ source?: string | undefined;
1920
1937
  status: "completed" | "failed";
1921
1938
  completedAt: string;
1922
- source?: string | undefined;
1923
1939
  }, {
1924
- type: "pharmacy" | "hie" | "lab";
1940
+ type: "hie" | "lab" | "pharmacy";
1941
+ source?: string | undefined;
1925
1942
  status: "completed" | "failed";
1926
1943
  completedAt: string;
1927
- source?: string | undefined;
1928
1944
  }>;
1929
1945
  }, "strip", z.ZodTypeAny, {
1946
+ patientId: string;
1947
+ externalId?: string | undefined;
1948
+ consolidatedDataUrl: string;
1930
1949
  source: {
1931
- type: "pharmacy" | "hie" | "lab";
1950
+ type: "hie" | "lab" | "pharmacy";
1951
+ source?: string | undefined;
1932
1952
  status: "completed" | "failed";
1933
1953
  completedAt: string;
1934
- source?: string | undefined;
1935
1954
  };
1955
+ }, {
1936
1956
  patientId: string;
1937
- consolidatedDataUrl: string;
1938
1957
  externalId?: string | undefined;
1939
- }, {
1958
+ consolidatedDataUrl: string;
1940
1959
  source: {
1941
- type: "pharmacy" | "hie" | "lab";
1960
+ type: "hie" | "lab" | "pharmacy";
1961
+ source?: string | undefined;
1942
1962
  status: "completed" | "failed";
1943
1963
  completedAt: string;
1944
- source?: string | undefined;
1945
1964
  };
1946
- patientId: string;
1947
- consolidatedDataUrl: string;
1948
- externalId?: string | undefined;
1949
1965
  }>;
1950
1966
  }, "strip", z.ZodTypeAny, {
1951
1967
  meta: {
1952
- type: "network-query.lab";
1953
1968
  messageId: string;
1969
+ requestId?: string | undefined;
1954
1970
  when: string;
1955
1971
  data?: unknown;
1956
- requestId?: string | undefined;
1972
+ type: "network-query.lab";
1957
1973
  };
1958
1974
  payload: {
1975
+ patientId: string;
1976
+ externalId?: string | undefined;
1977
+ consolidatedDataUrl: string;
1959
1978
  source: {
1960
- type: "pharmacy" | "hie" | "lab";
1979
+ type: "hie" | "lab" | "pharmacy";
1980
+ source?: string | undefined;
1961
1981
  status: "completed" | "failed";
1962
1982
  completedAt: string;
1963
- source?: string | undefined;
1964
1983
  };
1965
- patientId: string;
1966
- consolidatedDataUrl: string;
1967
- externalId?: string | undefined;
1968
1984
  };
1969
1985
  }, {
1970
1986
  meta: {
1971
- type: "network-query.lab";
1972
1987
  messageId: string;
1988
+ requestId?: string | undefined;
1973
1989
  when: string;
1974
1990
  data?: unknown;
1975
- requestId?: string | undefined;
1991
+ type: "network-query.lab";
1976
1992
  };
1977
1993
  payload: {
1994
+ patientId: string;
1995
+ externalId?: string | undefined;
1996
+ consolidatedDataUrl: string;
1978
1997
  source: {
1979
- type: "pharmacy" | "hie" | "lab";
1998
+ type: "hie" | "lab" | "pharmacy";
1999
+ source?: string | undefined;
1980
2000
  status: "completed" | "failed";
1981
2001
  completedAt: string;
1982
- source?: string | undefined;
1983
2002
  };
1984
- patientId: string;
1985
- consolidatedDataUrl: string;
1986
- externalId?: string | undefined;
1987
2003
  };
1988
2004
  }>;
1989
2005
  export type NetworkQueryLabWebhookRequest = z.infer<typeof networkQueryLabWebhookRequestSchema>;
@@ -1998,16 +2014,16 @@ export declare const patientAdmitWebhookPayloadSchema: z.ZodObject<{
1998
2014
  }, "strip", z.ZodTypeAny, {
1999
2015
  url: string;
2000
2016
  patientId: string;
2001
- admitTimestamp: string;
2002
2017
  externalId?: string | undefined;
2003
2018
  additionalIds?: Record<string, string[]> | undefined;
2019
+ admitTimestamp: string;
2004
2020
  whenSourceSent?: string | undefined;
2005
2021
  }, {
2006
2022
  url: string;
2007
2023
  patientId: string;
2008
- admitTimestamp: string;
2009
2024
  externalId?: string | undefined;
2010
2025
  additionalIds?: Record<string, string[]> | undefined;
2026
+ admitTimestamp: string;
2011
2027
  whenSourceSent?: string | undefined;
2012
2028
  }>;
2013
2029
  export type PatientAdmitPayload = z.infer<typeof patientAdmitWebhookPayloadSchema>;
@@ -2064,6 +2080,8 @@ export declare const patientTransferWebhookPayloadSchema: z.ZodObject<{
2064
2080
  }, "strip", z.ZodTypeAny, {
2065
2081
  url: string;
2066
2082
  patientId: string;
2083
+ externalId?: string | undefined;
2084
+ additionalIds?: Record<string, string[]> | undefined;
2067
2085
  admitTimestamp: string;
2068
2086
  transfers: {
2069
2087
  timestamp: string;
@@ -2076,12 +2094,12 @@ export declare const patientTransferWebhookPayloadSchema: z.ZodObject<{
2076
2094
  type: string;
2077
2095
  };
2078
2096
  }[];
2079
- externalId?: string | undefined;
2080
- additionalIds?: Record<string, string[]> | undefined;
2081
2097
  whenSourceSent?: string | undefined;
2082
2098
  }, {
2083
2099
  url: string;
2084
2100
  patientId: string;
2101
+ externalId?: string | undefined;
2102
+ additionalIds?: Record<string, string[]> | undefined;
2085
2103
  admitTimestamp: string;
2086
2104
  transfers: {
2087
2105
  timestamp: string;
@@ -2094,8 +2112,6 @@ export declare const patientTransferWebhookPayloadSchema: z.ZodObject<{
2094
2112
  type: string;
2095
2113
  };
2096
2114
  }[];
2097
- externalId?: string | undefined;
2098
- additionalIds?: Record<string, string[]> | undefined;
2099
2115
  whenSourceSent?: string | undefined;
2100
2116
  }>;
2101
2117
  export type PatientTransferPayload = z.infer<typeof patientTransferWebhookPayloadSchema>;
@@ -2110,18 +2126,18 @@ export declare const patientDischargeWebhookPayloadSchema: z.ZodObject<{
2110
2126
  }, "strip", z.ZodTypeAny, {
2111
2127
  url: string;
2112
2128
  patientId: string;
2113
- admitTimestamp: string;
2114
- dischargeTimestamp: string;
2115
2129
  externalId?: string | undefined;
2116
2130
  additionalIds?: Record<string, string[]> | undefined;
2131
+ admitTimestamp: string;
2132
+ dischargeTimestamp: string;
2117
2133
  whenSourceSent?: string | undefined;
2118
2134
  }, {
2119
2135
  url: string;
2120
2136
  patientId: string;
2121
- admitTimestamp: string;
2122
- dischargeTimestamp: string;
2123
2137
  externalId?: string | undefined;
2124
2138
  additionalIds?: Record<string, string[]> | undefined;
2139
+ admitTimestamp: string;
2140
+ dischargeTimestamp: string;
2125
2141
  whenSourceSent?: string | undefined;
2126
2142
  }>;
2127
2143
  export type PatientDischargePayload = z.infer<typeof patientDischargeWebhookPayloadSchema>;
@@ -2137,17 +2153,17 @@ export declare const patientAdmitWebhookRequestSchema: z.ZodObject<{
2137
2153
  }, {
2138
2154
  type: z.ZodLiteral<"patient.admit">;
2139
2155
  }>, "strip", z.ZodTypeAny, {
2140
- type: "patient.admit";
2141
2156
  messageId: string;
2157
+ requestId?: string | undefined;
2142
2158
  when: string;
2143
2159
  data?: unknown;
2144
- requestId?: string | undefined;
2145
- }, {
2146
2160
  type: "patient.admit";
2161
+ }, {
2147
2162
  messageId: string;
2163
+ requestId?: string | undefined;
2148
2164
  when: string;
2149
2165
  data?: unknown;
2150
- requestId?: string | undefined;
2166
+ type: "patient.admit";
2151
2167
  }>;
2152
2168
  payload: z.ZodObject<{
2153
2169
  url: z.ZodString;
@@ -2159,48 +2175,48 @@ export declare const patientAdmitWebhookRequestSchema: z.ZodObject<{
2159
2175
  }, "strip", z.ZodTypeAny, {
2160
2176
  url: string;
2161
2177
  patientId: string;
2162
- admitTimestamp: string;
2163
2178
  externalId?: string | undefined;
2164
2179
  additionalIds?: Record<string, string[]> | undefined;
2180
+ admitTimestamp: string;
2165
2181
  whenSourceSent?: string | undefined;
2166
2182
  }, {
2167
2183
  url: string;
2168
2184
  patientId: string;
2169
- admitTimestamp: string;
2170
2185
  externalId?: string | undefined;
2171
2186
  additionalIds?: Record<string, string[]> | undefined;
2187
+ admitTimestamp: string;
2172
2188
  whenSourceSent?: string | undefined;
2173
2189
  }>;
2174
2190
  }, "strip", z.ZodTypeAny, {
2175
2191
  meta: {
2176
- type: "patient.admit";
2177
2192
  messageId: string;
2193
+ requestId?: string | undefined;
2178
2194
  when: string;
2179
2195
  data?: unknown;
2180
- requestId?: string | undefined;
2196
+ type: "patient.admit";
2181
2197
  };
2182
2198
  payload: {
2183
2199
  url: string;
2184
2200
  patientId: string;
2185
- admitTimestamp: string;
2186
2201
  externalId?: string | undefined;
2187
2202
  additionalIds?: Record<string, string[]> | undefined;
2203
+ admitTimestamp: string;
2188
2204
  whenSourceSent?: string | undefined;
2189
2205
  };
2190
2206
  }, {
2191
2207
  meta: {
2192
- type: "patient.admit";
2193
2208
  messageId: string;
2209
+ requestId?: string | undefined;
2194
2210
  when: string;
2195
2211
  data?: unknown;
2196
- requestId?: string | undefined;
2212
+ type: "patient.admit";
2197
2213
  };
2198
2214
  payload: {
2199
2215
  url: string;
2200
2216
  patientId: string;
2201
- admitTimestamp: string;
2202
2217
  externalId?: string | undefined;
2203
2218
  additionalIds?: Record<string, string[]> | undefined;
2219
+ admitTimestamp: string;
2204
2220
  whenSourceSent?: string | undefined;
2205
2221
  };
2206
2222
  }>;
@@ -2217,17 +2233,17 @@ export declare const patientTransferWebhookRequestSchema: z.ZodObject<{
2217
2233
  }, {
2218
2234
  type: z.ZodLiteral<"patient.transfer">;
2219
2235
  }>, "strip", z.ZodTypeAny, {
2220
- type: "patient.transfer";
2221
2236
  messageId: string;
2237
+ requestId?: string | undefined;
2222
2238
  when: string;
2223
2239
  data?: unknown;
2224
- requestId?: string | undefined;
2225
- }, {
2226
2240
  type: "patient.transfer";
2241
+ }, {
2227
2242
  messageId: string;
2243
+ requestId?: string | undefined;
2228
2244
  when: string;
2229
2245
  data?: unknown;
2230
- requestId?: string | undefined;
2246
+ type: "patient.transfer";
2231
2247
  }>;
2232
2248
  payload: z.ZodObject<{
2233
2249
  url: z.ZodString;
@@ -2282,6 +2298,8 @@ export declare const patientTransferWebhookRequestSchema: z.ZodObject<{
2282
2298
  }, "strip", z.ZodTypeAny, {
2283
2299
  url: string;
2284
2300
  patientId: string;
2301
+ externalId?: string | undefined;
2302
+ additionalIds?: Record<string, string[]> | undefined;
2285
2303
  admitTimestamp: string;
2286
2304
  transfers: {
2287
2305
  timestamp: string;
@@ -2294,12 +2312,12 @@ export declare const patientTransferWebhookRequestSchema: z.ZodObject<{
2294
2312
  type: string;
2295
2313
  };
2296
2314
  }[];
2297
- externalId?: string | undefined;
2298
- additionalIds?: Record<string, string[]> | undefined;
2299
2315
  whenSourceSent?: string | undefined;
2300
2316
  }, {
2301
2317
  url: string;
2302
2318
  patientId: string;
2319
+ externalId?: string | undefined;
2320
+ additionalIds?: Record<string, string[]> | undefined;
2303
2321
  admitTimestamp: string;
2304
2322
  transfers: {
2305
2323
  timestamp: string;
@@ -2312,21 +2330,21 @@ export declare const patientTransferWebhookRequestSchema: z.ZodObject<{
2312
2330
  type: string;
2313
2331
  };
2314
2332
  }[];
2315
- externalId?: string | undefined;
2316
- additionalIds?: Record<string, string[]> | undefined;
2317
2333
  whenSourceSent?: string | undefined;
2318
2334
  }>;
2319
2335
  }, "strip", z.ZodTypeAny, {
2320
2336
  meta: {
2321
- type: "patient.transfer";
2322
2337
  messageId: string;
2338
+ requestId?: string | undefined;
2323
2339
  when: string;
2324
2340
  data?: unknown;
2325
- requestId?: string | undefined;
2341
+ type: "patient.transfer";
2326
2342
  };
2327
2343
  payload: {
2328
2344
  url: string;
2329
2345
  patientId: string;
2346
+ externalId?: string | undefined;
2347
+ additionalIds?: Record<string, string[]> | undefined;
2330
2348
  admitTimestamp: string;
2331
2349
  transfers: {
2332
2350
  timestamp: string;
@@ -2339,21 +2357,21 @@ export declare const patientTransferWebhookRequestSchema: z.ZodObject<{
2339
2357
  type: string;
2340
2358
  };
2341
2359
  }[];
2342
- externalId?: string | undefined;
2343
- additionalIds?: Record<string, string[]> | undefined;
2344
2360
  whenSourceSent?: string | undefined;
2345
2361
  };
2346
2362
  }, {
2347
2363
  meta: {
2348
- type: "patient.transfer";
2349
2364
  messageId: string;
2365
+ requestId?: string | undefined;
2350
2366
  when: string;
2351
2367
  data?: unknown;
2352
- requestId?: string | undefined;
2368
+ type: "patient.transfer";
2353
2369
  };
2354
2370
  payload: {
2355
2371
  url: string;
2356
2372
  patientId: string;
2373
+ externalId?: string | undefined;
2374
+ additionalIds?: Record<string, string[]> | undefined;
2357
2375
  admitTimestamp: string;
2358
2376
  transfers: {
2359
2377
  timestamp: string;
@@ -2366,8 +2384,6 @@ export declare const patientTransferWebhookRequestSchema: z.ZodObject<{
2366
2384
  type: string;
2367
2385
  };
2368
2386
  }[];
2369
- externalId?: string | undefined;
2370
- additionalIds?: Record<string, string[]> | undefined;
2371
2387
  whenSourceSent?: string | undefined;
2372
2388
  };
2373
2389
  }>;
@@ -2384,17 +2400,17 @@ export declare const patientDischargeWebhookRequestSchema: z.ZodObject<{
2384
2400
  }, {
2385
2401
  type: z.ZodLiteral<"patient.discharge">;
2386
2402
  }>, "strip", z.ZodTypeAny, {
2387
- type: "patient.discharge";
2388
2403
  messageId: string;
2404
+ requestId?: string | undefined;
2389
2405
  when: string;
2390
2406
  data?: unknown;
2391
- requestId?: string | undefined;
2392
- }, {
2393
2407
  type: "patient.discharge";
2408
+ }, {
2394
2409
  messageId: string;
2410
+ requestId?: string | undefined;
2395
2411
  when: string;
2396
2412
  data?: unknown;
2397
- requestId?: string | undefined;
2413
+ type: "patient.discharge";
2398
2414
  }>;
2399
2415
  payload: z.ZodObject<{
2400
2416
  url: z.ZodString;
@@ -2407,52 +2423,52 @@ export declare const patientDischargeWebhookRequestSchema: z.ZodObject<{
2407
2423
  }, "strip", z.ZodTypeAny, {
2408
2424
  url: string;
2409
2425
  patientId: string;
2410
- admitTimestamp: string;
2411
- dischargeTimestamp: string;
2412
2426
  externalId?: string | undefined;
2413
2427
  additionalIds?: Record<string, string[]> | undefined;
2428
+ admitTimestamp: string;
2429
+ dischargeTimestamp: string;
2414
2430
  whenSourceSent?: string | undefined;
2415
2431
  }, {
2416
2432
  url: string;
2417
2433
  patientId: string;
2418
- admitTimestamp: string;
2419
- dischargeTimestamp: string;
2420
2434
  externalId?: string | undefined;
2421
2435
  additionalIds?: Record<string, string[]> | undefined;
2436
+ admitTimestamp: string;
2437
+ dischargeTimestamp: string;
2422
2438
  whenSourceSent?: string | undefined;
2423
2439
  }>;
2424
2440
  }, "strip", z.ZodTypeAny, {
2425
2441
  meta: {
2426
- type: "patient.discharge";
2427
2442
  messageId: string;
2443
+ requestId?: string | undefined;
2428
2444
  when: string;
2429
2445
  data?: unknown;
2430
- requestId?: string | undefined;
2446
+ type: "patient.discharge";
2431
2447
  };
2432
2448
  payload: {
2433
2449
  url: string;
2434
2450
  patientId: string;
2435
- admitTimestamp: string;
2436
- dischargeTimestamp: string;
2437
2451
  externalId?: string | undefined;
2438
2452
  additionalIds?: Record<string, string[]> | undefined;
2453
+ admitTimestamp: string;
2454
+ dischargeTimestamp: string;
2439
2455
  whenSourceSent?: string | undefined;
2440
2456
  };
2441
2457
  }, {
2442
2458
  meta: {
2443
- type: "patient.discharge";
2444
2459
  messageId: string;
2460
+ requestId?: string | undefined;
2445
2461
  when: string;
2446
2462
  data?: unknown;
2447
- requestId?: string | undefined;
2463
+ type: "patient.discharge";
2448
2464
  };
2449
2465
  payload: {
2450
2466
  url: string;
2451
2467
  patientId: string;
2452
- admitTimestamp: string;
2453
- dischargeTimestamp: string;
2454
2468
  externalId?: string | undefined;
2455
2469
  additionalIds?: Record<string, string[]> | undefined;
2470
+ admitTimestamp: string;
2471
+ dischargeTimestamp: string;
2456
2472
  whenSourceSent?: string | undefined;
2457
2473
  };
2458
2474
  }>;
@@ -2469,35 +2485,35 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2469
2485
  }, {
2470
2486
  type: z.ZodLiteral<"ping">;
2471
2487
  }>, "strip", z.ZodTypeAny, {
2472
- type: "ping";
2473
2488
  messageId: string;
2489
+ requestId?: string | undefined;
2474
2490
  when: string;
2475
2491
  data?: unknown;
2476
- requestId?: string | undefined;
2477
- }, {
2478
2492
  type: "ping";
2493
+ }, {
2479
2494
  messageId: string;
2495
+ requestId?: string | undefined;
2480
2496
  when: string;
2481
2497
  data?: unknown;
2482
- requestId?: string | undefined;
2498
+ type: "ping";
2483
2499
  }>;
2484
2500
  ping: z.ZodString;
2485
2501
  }, "strip", z.ZodTypeAny, {
2486
2502
  meta: {
2487
- type: "ping";
2488
2503
  messageId: string;
2504
+ requestId?: string | undefined;
2489
2505
  when: string;
2490
2506
  data?: unknown;
2491
- requestId?: string | undefined;
2507
+ type: "ping";
2492
2508
  };
2493
2509
  ping: string;
2494
2510
  }, {
2495
2511
  meta: {
2496
- type: "ping";
2497
2512
  messageId: string;
2513
+ requestId?: string | undefined;
2498
2514
  when: string;
2499
2515
  data?: unknown;
2500
- requestId?: string | undefined;
2516
+ type: "ping";
2501
2517
  };
2502
2518
  ping: string;
2503
2519
  }>, z.ZodObject<{
@@ -2512,17 +2528,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2512
2528
  }, {
2513
2529
  type: z.ZodLiteral<"medical.consolidated-data">;
2514
2530
  }>, "strip", z.ZodTypeAny, {
2515
- type: "medical.consolidated-data";
2516
2531
  messageId: string;
2532
+ requestId?: string | undefined;
2517
2533
  when: string;
2518
2534
  data?: unknown;
2519
- requestId?: string | undefined;
2520
- }, {
2521
2535
  type: "medical.consolidated-data";
2536
+ }, {
2522
2537
  messageId: string;
2538
+ requestId?: string | undefined;
2523
2539
  when: string;
2524
2540
  data?: unknown;
2525
- requestId?: string | undefined;
2541
+ type: "medical.consolidated-data";
2526
2542
  }>;
2527
2543
  patients: z.ZodArray<z.ZodObject<{
2528
2544
  patientId: z.ZodString;
@@ -2531,52 +2547,62 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2531
2547
  status: z.ZodEnum<["completed", "failed"]>;
2532
2548
  bundle: z.ZodType<SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined, z.ZodTypeDef, SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined>;
2533
2549
  filters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodBoolean>>]>>>>;
2550
+ truncatedGzipKey: z.ZodOptional<z.ZodString>;
2551
+ fastLoadGzipKey: z.ZodOptional<z.ZodString>;
2534
2552
  }, "strip", z.ZodTypeAny, {
2535
- status: "completed" | "failed";
2536
2553
  patientId: string;
2537
2554
  externalId?: string | undefined;
2538
2555
  additionalIds?: Record<string, string[]> | undefined;
2556
+ status: "completed" | "failed";
2539
2557
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
2540
2558
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
2559
+ truncatedGzipKey?: string | undefined;
2560
+ fastLoadGzipKey?: string | undefined;
2541
2561
  }, {
2542
- status: "completed" | "failed";
2543
2562
  patientId: string;
2544
2563
  externalId?: string | undefined;
2545
2564
  additionalIds?: Record<string, string[]> | undefined;
2565
+ status: "completed" | "failed";
2546
2566
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
2547
2567
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
2568
+ truncatedGzipKey?: string | undefined;
2569
+ fastLoadGzipKey?: string | undefined;
2548
2570
  }>, "many">;
2549
2571
  }, "strip", z.ZodTypeAny, {
2550
2572
  meta: {
2551
- type: "medical.consolidated-data";
2552
2573
  messageId: string;
2574
+ requestId?: string | undefined;
2553
2575
  when: string;
2554
2576
  data?: unknown;
2555
- requestId?: string | undefined;
2577
+ type: "medical.consolidated-data";
2556
2578
  };
2557
2579
  patients: {
2558
- status: "completed" | "failed";
2559
2580
  patientId: string;
2560
2581
  externalId?: string | undefined;
2561
2582
  additionalIds?: Record<string, string[]> | undefined;
2583
+ status: "completed" | "failed";
2562
2584
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
2563
2585
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
2586
+ truncatedGzipKey?: string | undefined;
2587
+ fastLoadGzipKey?: string | undefined;
2564
2588
  }[];
2565
2589
  }, {
2566
2590
  meta: {
2567
- type: "medical.consolidated-data";
2568
2591
  messageId: string;
2592
+ requestId?: string | undefined;
2569
2593
  when: string;
2570
2594
  data?: unknown;
2571
- requestId?: string | undefined;
2595
+ type: "medical.consolidated-data";
2572
2596
  };
2573
2597
  patients: {
2574
- status: "completed" | "failed";
2575
2598
  patientId: string;
2576
2599
  externalId?: string | undefined;
2577
2600
  additionalIds?: Record<string, string[]> | undefined;
2601
+ status: "completed" | "failed";
2578
2602
  bundle?: SearchSetBundle<import("@medplum/fhirtypes").Resource> | undefined;
2579
2603
  filters?: Record<string, string | boolean | null | undefined> | null | undefined;
2604
+ truncatedGzipKey?: string | undefined;
2605
+ fastLoadGzipKey?: string | undefined;
2580
2606
  }[];
2581
2607
  }>, z.ZodObject<{
2582
2608
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -2590,17 +2616,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2590
2616
  }, {
2591
2617
  type: z.ZodLiteral<"medical.document-download">;
2592
2618
  }>, "strip", z.ZodTypeAny, {
2593
- type: "medical.document-download";
2594
2619
  messageId: string;
2620
+ requestId?: string | undefined;
2595
2621
  when: string;
2596
2622
  data?: unknown;
2597
- requestId?: string | undefined;
2598
- }, {
2599
2623
  type: "medical.document-download";
2624
+ }, {
2600
2625
  messageId: string;
2626
+ requestId?: string | undefined;
2601
2627
  when: string;
2602
2628
  data?: unknown;
2603
- requestId?: string | undefined;
2629
+ type: "medical.document-download";
2604
2630
  }>;
2605
2631
  patients: z.ZodArray<z.ZodObject<{
2606
2632
  patientId: z.ZodString;
@@ -2621,169 +2647,169 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2621
2647
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2622
2648
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2623
2649
  }, "strip", z.ZodTypeAny, {
2650
+ system?: string | null | undefined;
2624
2651
  code?: string | null | undefined;
2625
2652
  display?: string | null | undefined;
2626
- system?: string | null | undefined;
2627
2653
  }, {
2654
+ system?: string | null | undefined;
2628
2655
  code?: string | null | undefined;
2629
2656
  display?: string | null | undefined;
2630
- system?: string | null | undefined;
2631
2657
  }>, "many">>;
2632
2658
  text: z.ZodOptional<z.ZodString>;
2633
2659
  }, "strip", z.ZodTypeAny, {
2634
- text?: string | undefined;
2635
2660
  coding?: {
2661
+ system?: string | null | undefined;
2636
2662
  code?: string | null | undefined;
2637
2663
  display?: string | null | undefined;
2638
- system?: string | null | undefined;
2639
2664
  }[] | undefined;
2640
- }, {
2641
2665
  text?: string | undefined;
2666
+ }, {
2642
2667
  coding?: {
2668
+ system?: string | null | undefined;
2643
2669
  code?: string | null | undefined;
2644
2670
  display?: string | null | undefined;
2645
- system?: string | null | undefined;
2646
2671
  }[] | undefined;
2672
+ text?: string | undefined;
2647
2673
  }>>;
2648
2674
  }, "strip", z.ZodTypeAny, {
2649
2675
  id: string;
2650
2676
  fileName: string;
2677
+ description?: string | undefined;
2678
+ status?: string | undefined;
2679
+ indexed?: string | undefined;
2680
+ mimeType?: string | undefined;
2681
+ size?: number | undefined;
2651
2682
  type?: {
2652
- text?: string | undefined;
2653
2683
  coding?: {
2684
+ system?: string | null | undefined;
2654
2685
  code?: string | null | undefined;
2655
2686
  display?: string | null | undefined;
2656
- system?: string | null | undefined;
2657
2687
  }[] | undefined;
2688
+ text?: string | undefined;
2658
2689
  } | undefined;
2659
- status?: string | undefined;
2660
- description?: string | undefined;
2661
- size?: number | undefined;
2662
- indexed?: string | undefined;
2663
- mimeType?: string | undefined;
2664
2690
  }, {
2665
2691
  id: string;
2666
2692
  fileName: string;
2693
+ description?: string | undefined;
2694
+ status?: string | undefined;
2695
+ indexed?: string | undefined;
2696
+ mimeType?: string | undefined;
2697
+ size?: number | undefined;
2667
2698
  type?: {
2668
- text?: string | undefined;
2669
2699
  coding?: {
2700
+ system?: string | null | undefined;
2670
2701
  code?: string | null | undefined;
2671
2702
  display?: string | null | undefined;
2672
- system?: string | null | undefined;
2673
2703
  }[] | undefined;
2704
+ text?: string | undefined;
2674
2705
  } | undefined;
2675
- status?: string | undefined;
2676
- description?: string | undefined;
2677
- size?: number | undefined;
2678
- indexed?: string | undefined;
2679
- mimeType?: string | undefined;
2680
2706
  }>, "many">;
2681
2707
  }, "strip", z.ZodTypeAny, {
2682
- status: "completed" | "failed";
2683
2708
  patientId: string;
2709
+ externalId?: string | undefined;
2710
+ additionalIds?: Record<string, string[]> | undefined;
2711
+ status: "completed" | "failed";
2684
2712
  documents: {
2685
2713
  id: string;
2686
2714
  fileName: string;
2715
+ description?: string | undefined;
2716
+ status?: string | undefined;
2717
+ indexed?: string | undefined;
2718
+ mimeType?: string | undefined;
2719
+ size?: number | undefined;
2687
2720
  type?: {
2688
- text?: string | undefined;
2689
2721
  coding?: {
2722
+ system?: string | null | undefined;
2690
2723
  code?: string | null | undefined;
2691
2724
  display?: string | null | undefined;
2692
- system?: string | null | undefined;
2693
2725
  }[] | undefined;
2726
+ text?: string | undefined;
2694
2727
  } | undefined;
2695
- status?: string | undefined;
2696
- description?: string | undefined;
2697
- size?: number | undefined;
2698
- indexed?: string | undefined;
2699
- mimeType?: string | undefined;
2700
2728
  }[];
2729
+ }, {
2730
+ patientId: string;
2701
2731
  externalId?: string | undefined;
2702
2732
  additionalIds?: Record<string, string[]> | undefined;
2703
- }, {
2704
2733
  status: "completed" | "failed";
2705
- patientId: string;
2706
2734
  documents: {
2707
2735
  id: string;
2708
2736
  fileName: string;
2737
+ description?: string | undefined;
2738
+ status?: string | undefined;
2739
+ indexed?: string | undefined;
2740
+ mimeType?: string | undefined;
2741
+ size?: number | undefined;
2709
2742
  type?: {
2710
- text?: string | undefined;
2711
2743
  coding?: {
2744
+ system?: string | null | undefined;
2712
2745
  code?: string | null | undefined;
2713
2746
  display?: string | null | undefined;
2714
- system?: string | null | undefined;
2715
2747
  }[] | undefined;
2748
+ text?: string | undefined;
2716
2749
  } | undefined;
2717
- status?: string | undefined;
2718
- description?: string | undefined;
2719
- size?: number | undefined;
2720
- indexed?: string | undefined;
2721
- mimeType?: string | undefined;
2722
2750
  }[];
2723
- externalId?: string | undefined;
2724
- additionalIds?: Record<string, string[]> | undefined;
2725
2751
  }>, "many">;
2726
2752
  }, "strip", z.ZodTypeAny, {
2727
2753
  meta: {
2728
- type: "medical.document-download";
2729
2754
  messageId: string;
2755
+ requestId?: string | undefined;
2730
2756
  when: string;
2731
2757
  data?: unknown;
2732
- requestId?: string | undefined;
2758
+ type: "medical.document-download";
2733
2759
  };
2734
2760
  patients: {
2735
- status: "completed" | "failed";
2736
2761
  patientId: string;
2762
+ externalId?: string | undefined;
2763
+ additionalIds?: Record<string, string[]> | undefined;
2764
+ status: "completed" | "failed";
2737
2765
  documents: {
2738
2766
  id: string;
2739
2767
  fileName: string;
2768
+ description?: string | undefined;
2769
+ status?: string | undefined;
2770
+ indexed?: string | undefined;
2771
+ mimeType?: string | undefined;
2772
+ size?: number | undefined;
2740
2773
  type?: {
2741
- text?: string | undefined;
2742
2774
  coding?: {
2775
+ system?: string | null | undefined;
2743
2776
  code?: string | null | undefined;
2744
2777
  display?: string | null | undefined;
2745
- system?: string | null | undefined;
2746
2778
  }[] | undefined;
2779
+ text?: string | undefined;
2747
2780
  } | undefined;
2748
- status?: string | undefined;
2749
- description?: string | undefined;
2750
- size?: number | undefined;
2751
- indexed?: string | undefined;
2752
- mimeType?: string | undefined;
2753
2781
  }[];
2754
- externalId?: string | undefined;
2755
- additionalIds?: Record<string, string[]> | undefined;
2756
2782
  }[];
2757
2783
  }, {
2758
2784
  meta: {
2759
- type: "medical.document-download";
2760
2785
  messageId: string;
2786
+ requestId?: string | undefined;
2761
2787
  when: string;
2762
2788
  data?: unknown;
2763
- requestId?: string | undefined;
2789
+ type: "medical.document-download";
2764
2790
  };
2765
2791
  patients: {
2766
- status: "completed" | "failed";
2767
2792
  patientId: string;
2793
+ externalId?: string | undefined;
2794
+ additionalIds?: Record<string, string[]> | undefined;
2795
+ status: "completed" | "failed";
2768
2796
  documents: {
2769
2797
  id: string;
2770
2798
  fileName: string;
2799
+ description?: string | undefined;
2800
+ status?: string | undefined;
2801
+ indexed?: string | undefined;
2802
+ mimeType?: string | undefined;
2803
+ size?: number | undefined;
2771
2804
  type?: {
2772
- text?: string | undefined;
2773
2805
  coding?: {
2806
+ system?: string | null | undefined;
2774
2807
  code?: string | null | undefined;
2775
2808
  display?: string | null | undefined;
2776
- system?: string | null | undefined;
2777
2809
  }[] | undefined;
2810
+ text?: string | undefined;
2778
2811
  } | undefined;
2779
- status?: string | undefined;
2780
- description?: string | undefined;
2781
- size?: number | undefined;
2782
- indexed?: string | undefined;
2783
- mimeType?: string | undefined;
2784
2812
  }[];
2785
- externalId?: string | undefined;
2786
- additionalIds?: Record<string, string[]> | undefined;
2787
2813
  }[];
2788
2814
  }>, z.ZodObject<{
2789
2815
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -2797,17 +2823,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2797
2823
  }, {
2798
2824
  type: z.ZodLiteral<"medical.document-conversion">;
2799
2825
  }>, "strip", z.ZodTypeAny, {
2800
- type: "medical.document-conversion";
2801
2826
  messageId: string;
2827
+ requestId?: string | undefined;
2802
2828
  when: string;
2803
2829
  data?: unknown;
2804
- requestId?: string | undefined;
2805
- }, {
2806
2830
  type: "medical.document-conversion";
2831
+ }, {
2807
2832
  messageId: string;
2833
+ requestId?: string | undefined;
2808
2834
  when: string;
2809
2835
  data?: unknown;
2810
- requestId?: string | undefined;
2836
+ type: "medical.document-conversion";
2811
2837
  }>;
2812
2838
  patients: z.ZodArray<z.ZodObject<{
2813
2839
  patientId: z.ZodString;
@@ -2815,43 +2841,43 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2815
2841
  additionalIds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
2816
2842
  status: z.ZodEnum<["completed", "failed"]>;
2817
2843
  }, "strip", z.ZodTypeAny, {
2818
- status: "completed" | "failed";
2819
2844
  patientId: string;
2820
2845
  externalId?: string | undefined;
2821
2846
  additionalIds?: Record<string, string[]> | undefined;
2822
- }, {
2823
2847
  status: "completed" | "failed";
2848
+ }, {
2824
2849
  patientId: string;
2825
2850
  externalId?: string | undefined;
2826
2851
  additionalIds?: Record<string, string[]> | undefined;
2852
+ status: "completed" | "failed";
2827
2853
  }>, "many">;
2828
2854
  }, "strip", z.ZodTypeAny, {
2829
2855
  meta: {
2830
- type: "medical.document-conversion";
2831
2856
  messageId: string;
2857
+ requestId?: string | undefined;
2832
2858
  when: string;
2833
2859
  data?: unknown;
2834
- requestId?: string | undefined;
2860
+ type: "medical.document-conversion";
2835
2861
  };
2836
2862
  patients: {
2837
- status: "completed" | "failed";
2838
2863
  patientId: string;
2839
2864
  externalId?: string | undefined;
2840
2865
  additionalIds?: Record<string, string[]> | undefined;
2866
+ status: "completed" | "failed";
2841
2867
  }[];
2842
2868
  }, {
2843
2869
  meta: {
2844
- type: "medical.document-conversion";
2845
2870
  messageId: string;
2871
+ requestId?: string | undefined;
2846
2872
  when: string;
2847
2873
  data?: unknown;
2848
- requestId?: string | undefined;
2874
+ type: "medical.document-conversion";
2849
2875
  };
2850
2876
  patients: {
2851
- status: "completed" | "failed";
2852
2877
  patientId: string;
2853
2878
  externalId?: string | undefined;
2854
2879
  additionalIds?: Record<string, string[]> | undefined;
2880
+ status: "completed" | "failed";
2855
2881
  }[];
2856
2882
  }>, z.ZodObject<{
2857
2883
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -2865,17 +2891,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2865
2891
  }, {
2866
2892
  type: z.ZodLiteral<"medical.document-bulk-download-urls">;
2867
2893
  }>, "strip", z.ZodTypeAny, {
2868
- type: "medical.document-bulk-download-urls";
2869
2894
  messageId: string;
2895
+ requestId?: string | undefined;
2870
2896
  when: string;
2871
2897
  data?: unknown;
2872
- requestId?: string | undefined;
2873
- }, {
2874
2898
  type: "medical.document-bulk-download-urls";
2899
+ }, {
2875
2900
  messageId: string;
2901
+ requestId?: string | undefined;
2876
2902
  when: string;
2877
2903
  data?: unknown;
2878
- requestId?: string | undefined;
2904
+ type: "medical.document-bulk-download-urls";
2879
2905
  }>;
2880
2906
  patients: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
2881
2907
  patientId: z.ZodString;
@@ -2897,29 +2923,29 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2897
2923
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2898
2924
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
2899
2925
  }, "strip", z.ZodTypeAny, {
2926
+ system?: string | null | undefined;
2900
2927
  code?: string | null | undefined;
2901
2928
  display?: string | null | undefined;
2902
- system?: string | null | undefined;
2903
2929
  }, {
2930
+ system?: string | null | undefined;
2904
2931
  code?: string | null | undefined;
2905
2932
  display?: string | null | undefined;
2906
- system?: string | null | undefined;
2907
2933
  }>, "many">>;
2908
2934
  text: z.ZodOptional<z.ZodString>;
2909
2935
  }, "strip", z.ZodTypeAny, {
2910
- text?: string | undefined;
2911
2936
  coding?: {
2937
+ system?: string | null | undefined;
2912
2938
  code?: string | null | undefined;
2913
2939
  display?: string | null | undefined;
2914
- system?: string | null | undefined;
2915
2940
  }[] | undefined;
2916
- }, {
2917
2941
  text?: string | undefined;
2942
+ }, {
2918
2943
  coding?: {
2944
+ system?: string | null | undefined;
2919
2945
  code?: string | null | undefined;
2920
2946
  display?: string | null | undefined;
2921
- system?: string | null | undefined;
2922
2947
  }[] | undefined;
2948
+ text?: string | undefined;
2923
2949
  }>>;
2924
2950
  }, {
2925
2951
  url: z.ZodString;
@@ -2935,173 +2961,173 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
2935
2961
  }>, "many">>;
2936
2962
  }>, "strip", z.ZodTypeAny, {
2937
2963
  id: string;
2938
- url: string;
2939
2964
  fileName: string;
2965
+ description?: string | undefined;
2966
+ status?: string | undefined;
2967
+ indexed?: string | undefined;
2968
+ mimeType?: string | undefined;
2969
+ size?: number | undefined;
2940
2970
  type?: {
2941
- text?: string | undefined;
2942
2971
  coding?: {
2972
+ system?: string | null | undefined;
2943
2973
  code?: string | null | undefined;
2944
2974
  display?: string | null | undefined;
2945
- system?: string | null | undefined;
2946
2975
  }[] | undefined;
2976
+ text?: string | undefined;
2947
2977
  } | undefined;
2948
- status?: string | undefined;
2949
- description?: string | undefined;
2950
- size?: number | undefined;
2951
- indexed?: string | undefined;
2952
- mimeType?: string | undefined;
2978
+ url: string;
2953
2979
  organizationIdentifiers?: {
2954
2980
  name?: string | undefined;
2955
2981
  identifierValues?: string[] | undefined;
2956
2982
  }[] | undefined;
2957
2983
  }, {
2958
2984
  id: string;
2959
- url: string;
2960
2985
  fileName: string;
2986
+ description?: string | undefined;
2987
+ status?: string | undefined;
2988
+ indexed?: string | undefined;
2989
+ mimeType?: string | undefined;
2990
+ size?: number | undefined;
2961
2991
  type?: {
2962
- text?: string | undefined;
2963
2992
  coding?: {
2993
+ system?: string | null | undefined;
2964
2994
  code?: string | null | undefined;
2965
2995
  display?: string | null | undefined;
2966
- system?: string | null | undefined;
2967
2996
  }[] | undefined;
2997
+ text?: string | undefined;
2968
2998
  } | undefined;
2969
- status?: string | undefined;
2970
- description?: string | undefined;
2971
- size?: number | undefined;
2972
- indexed?: string | undefined;
2973
- mimeType?: string | undefined;
2999
+ url: string;
2974
3000
  organizationIdentifiers?: {
2975
3001
  name?: string | undefined;
2976
3002
  identifierValues?: string[] | undefined;
2977
3003
  }[] | undefined;
2978
3004
  }>, "many">;
2979
3005
  }>, "strip", z.ZodTypeAny, {
2980
- status: "completed" | "failed";
2981
3006
  patientId: string;
3007
+ externalId?: string | undefined;
3008
+ additionalIds?: Record<string, string[]> | undefined;
3009
+ status: "completed" | "failed";
2982
3010
  documents: {
2983
3011
  id: string;
2984
- url: string;
2985
3012
  fileName: string;
3013
+ description?: string | undefined;
3014
+ status?: string | undefined;
3015
+ indexed?: string | undefined;
3016
+ mimeType?: string | undefined;
3017
+ size?: number | undefined;
2986
3018
  type?: {
2987
- text?: string | undefined;
2988
3019
  coding?: {
3020
+ system?: string | null | undefined;
2989
3021
  code?: string | null | undefined;
2990
3022
  display?: string | null | undefined;
2991
- system?: string | null | undefined;
2992
3023
  }[] | undefined;
3024
+ text?: string | undefined;
2993
3025
  } | undefined;
2994
- status?: string | undefined;
2995
- description?: string | undefined;
2996
- size?: number | undefined;
2997
- indexed?: string | undefined;
2998
- mimeType?: string | undefined;
3026
+ url: string;
2999
3027
  organizationIdentifiers?: {
3000
3028
  name?: string | undefined;
3001
3029
  identifierValues?: string[] | undefined;
3002
3030
  }[] | undefined;
3003
3031
  }[];
3032
+ }, {
3033
+ patientId: string;
3004
3034
  externalId?: string | undefined;
3005
3035
  additionalIds?: Record<string, string[]> | undefined;
3006
- }, {
3007
3036
  status: "completed" | "failed";
3008
- patientId: string;
3009
3037
  documents: {
3010
3038
  id: string;
3011
- url: string;
3012
3039
  fileName: string;
3040
+ description?: string | undefined;
3041
+ status?: string | undefined;
3042
+ indexed?: string | undefined;
3043
+ mimeType?: string | undefined;
3044
+ size?: number | undefined;
3013
3045
  type?: {
3014
- text?: string | undefined;
3015
3046
  coding?: {
3047
+ system?: string | null | undefined;
3016
3048
  code?: string | null | undefined;
3017
3049
  display?: string | null | undefined;
3018
- system?: string | null | undefined;
3019
3050
  }[] | undefined;
3051
+ text?: string | undefined;
3020
3052
  } | undefined;
3021
- status?: string | undefined;
3022
- description?: string | undefined;
3023
- size?: number | undefined;
3024
- indexed?: string | undefined;
3025
- mimeType?: string | undefined;
3053
+ url: string;
3026
3054
  organizationIdentifiers?: {
3027
3055
  name?: string | undefined;
3028
3056
  identifierValues?: string[] | undefined;
3029
3057
  }[] | undefined;
3030
3058
  }[];
3031
- externalId?: string | undefined;
3032
- additionalIds?: Record<string, string[]> | undefined;
3033
3059
  }>, "many">;
3034
3060
  }, "strip", z.ZodTypeAny, {
3035
3061
  meta: {
3036
- type: "medical.document-bulk-download-urls";
3037
3062
  messageId: string;
3063
+ requestId?: string | undefined;
3038
3064
  when: string;
3039
3065
  data?: unknown;
3040
- requestId?: string | undefined;
3066
+ type: "medical.document-bulk-download-urls";
3041
3067
  };
3042
3068
  patients: {
3043
- status: "completed" | "failed";
3044
3069
  patientId: string;
3070
+ externalId?: string | undefined;
3071
+ additionalIds?: Record<string, string[]> | undefined;
3072
+ status: "completed" | "failed";
3045
3073
  documents: {
3046
3074
  id: string;
3047
- url: string;
3048
3075
  fileName: string;
3076
+ description?: string | undefined;
3077
+ status?: string | undefined;
3078
+ indexed?: string | undefined;
3079
+ mimeType?: string | undefined;
3080
+ size?: number | undefined;
3049
3081
  type?: {
3050
- text?: string | undefined;
3051
3082
  coding?: {
3083
+ system?: string | null | undefined;
3052
3084
  code?: string | null | undefined;
3053
3085
  display?: string | null | undefined;
3054
- system?: string | null | undefined;
3055
3086
  }[] | undefined;
3087
+ text?: string | undefined;
3056
3088
  } | undefined;
3057
- status?: string | undefined;
3058
- description?: string | undefined;
3059
- size?: number | undefined;
3060
- indexed?: string | undefined;
3061
- mimeType?: string | undefined;
3089
+ url: string;
3062
3090
  organizationIdentifiers?: {
3063
3091
  name?: string | undefined;
3064
3092
  identifierValues?: string[] | undefined;
3065
3093
  }[] | undefined;
3066
3094
  }[];
3067
- externalId?: string | undefined;
3068
- additionalIds?: Record<string, string[]> | undefined;
3069
3095
  }[];
3070
3096
  }, {
3071
3097
  meta: {
3072
- type: "medical.document-bulk-download-urls";
3073
3098
  messageId: string;
3099
+ requestId?: string | undefined;
3074
3100
  when: string;
3075
3101
  data?: unknown;
3076
- requestId?: string | undefined;
3102
+ type: "medical.document-bulk-download-urls";
3077
3103
  };
3078
3104
  patients: {
3079
- status: "completed" | "failed";
3080
3105
  patientId: string;
3106
+ externalId?: string | undefined;
3107
+ additionalIds?: Record<string, string[]> | undefined;
3108
+ status: "completed" | "failed";
3081
3109
  documents: {
3082
3110
  id: string;
3083
- url: string;
3084
3111
  fileName: string;
3112
+ description?: string | undefined;
3113
+ status?: string | undefined;
3114
+ indexed?: string | undefined;
3115
+ mimeType?: string | undefined;
3116
+ size?: number | undefined;
3085
3117
  type?: {
3086
- text?: string | undefined;
3087
3118
  coding?: {
3119
+ system?: string | null | undefined;
3088
3120
  code?: string | null | undefined;
3089
3121
  display?: string | null | undefined;
3090
- system?: string | null | undefined;
3091
3122
  }[] | undefined;
3123
+ text?: string | undefined;
3092
3124
  } | undefined;
3093
- status?: string | undefined;
3094
- description?: string | undefined;
3095
- size?: number | undefined;
3096
- indexed?: string | undefined;
3097
- mimeType?: string | undefined;
3125
+ url: string;
3098
3126
  organizationIdentifiers?: {
3099
3127
  name?: string | undefined;
3100
3128
  identifierValues?: string[] | undefined;
3101
3129
  }[] | undefined;
3102
3130
  }[];
3103
- externalId?: string | undefined;
3104
- additionalIds?: Record<string, string[]> | undefined;
3105
3131
  }[];
3106
3132
  }>, z.ZodObject<{
3107
3133
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -3115,17 +3141,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3115
3141
  }, {
3116
3142
  type: z.ZodLiteral<"medical.document-bulk-download-paged">;
3117
3143
  }>, "strip", z.ZodTypeAny, {
3118
- type: "medical.document-bulk-download-paged";
3119
3144
  messageId: string;
3145
+ requestId?: string | undefined;
3120
3146
  when: string;
3121
3147
  data?: unknown;
3122
- requestId?: string | undefined;
3123
- }, {
3124
3148
  type: "medical.document-bulk-download-paged";
3149
+ }, {
3125
3150
  messageId: string;
3151
+ requestId?: string | undefined;
3126
3152
  when: string;
3127
3153
  data?: unknown;
3128
- requestId?: string | undefined;
3154
+ type: "medical.document-bulk-download-paged";
3129
3155
  }>;
3130
3156
  patients: z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
3131
3157
  patientId: z.ZodString;
@@ -3147,29 +3173,29 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3147
3173
  code: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3148
3174
  display: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3149
3175
  }, "strip", z.ZodTypeAny, {
3176
+ system?: string | null | undefined;
3150
3177
  code?: string | null | undefined;
3151
3178
  display?: string | null | undefined;
3152
- system?: string | null | undefined;
3153
3179
  }, {
3180
+ system?: string | null | undefined;
3154
3181
  code?: string | null | undefined;
3155
3182
  display?: string | null | undefined;
3156
- system?: string | null | undefined;
3157
3183
  }>, "many">>;
3158
3184
  text: z.ZodOptional<z.ZodString>;
3159
3185
  }, "strip", z.ZodTypeAny, {
3160
- text?: string | undefined;
3161
3186
  coding?: {
3187
+ system?: string | null | undefined;
3162
3188
  code?: string | null | undefined;
3163
3189
  display?: string | null | undefined;
3164
- system?: string | null | undefined;
3165
3190
  }[] | undefined;
3166
- }, {
3167
3191
  text?: string | undefined;
3192
+ }, {
3168
3193
  coding?: {
3194
+ system?: string | null | undefined;
3169
3195
  code?: string | null | undefined;
3170
3196
  display?: string | null | undefined;
3171
- system?: string | null | undefined;
3172
3197
  }[] | undefined;
3198
+ text?: string | undefined;
3173
3199
  }>>;
3174
3200
  }, {
3175
3201
  url: z.ZodString;
@@ -3186,48 +3212,48 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3186
3212
  downloadUrl: z.ZodString;
3187
3213
  }>, "strip", z.ZodTypeAny, {
3188
3214
  id: string;
3189
- url: string;
3190
3215
  fileName: string;
3191
- downloadUrl: string;
3216
+ description?: string | undefined;
3217
+ status?: string | undefined;
3218
+ indexed?: string | undefined;
3219
+ mimeType?: string | undefined;
3220
+ size?: number | undefined;
3192
3221
  type?: {
3193
- text?: string | undefined;
3194
3222
  coding?: {
3223
+ system?: string | null | undefined;
3195
3224
  code?: string | null | undefined;
3196
3225
  display?: string | null | undefined;
3197
- system?: string | null | undefined;
3198
3226
  }[] | undefined;
3227
+ text?: string | undefined;
3199
3228
  } | undefined;
3200
- status?: string | undefined;
3201
- description?: string | undefined;
3202
- size?: number | undefined;
3203
- indexed?: string | undefined;
3204
- mimeType?: string | undefined;
3229
+ url: string;
3205
3230
  organizationIdentifiers?: {
3206
3231
  name?: string | undefined;
3207
3232
  identifierValues?: string[] | undefined;
3208
3233
  }[] | undefined;
3234
+ downloadUrl: string;
3209
3235
  }, {
3210
3236
  id: string;
3211
- url: string;
3212
3237
  fileName: string;
3213
- downloadUrl: string;
3238
+ description?: string | undefined;
3239
+ status?: string | undefined;
3240
+ indexed?: string | undefined;
3241
+ mimeType?: string | undefined;
3242
+ size?: number | undefined;
3214
3243
  type?: {
3215
- text?: string | undefined;
3216
3244
  coding?: {
3245
+ system?: string | null | undefined;
3217
3246
  code?: string | null | undefined;
3218
3247
  display?: string | null | undefined;
3219
- system?: string | null | undefined;
3220
3248
  }[] | undefined;
3249
+ text?: string | undefined;
3221
3250
  } | undefined;
3222
- status?: string | undefined;
3223
- description?: string | undefined;
3224
- size?: number | undefined;
3225
- indexed?: string | undefined;
3226
- mimeType?: string | undefined;
3251
+ url: string;
3227
3252
  organizationIdentifiers?: {
3228
3253
  name?: string | undefined;
3229
3254
  identifierValues?: string[] | undefined;
3230
3255
  }[] | undefined;
3256
+ downloadUrl: string;
3231
3257
  }>, "many">;
3232
3258
  pagination: z.ZodObject<{
3233
3259
  page: z.ZodNumber;
@@ -3243,155 +3269,155 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3243
3269
  totalItems: number;
3244
3270
  }>;
3245
3271
  }>, "strip", z.ZodTypeAny, {
3246
- status: "completed" | "failed";
3247
3272
  patientId: string;
3273
+ externalId?: string | undefined;
3274
+ additionalIds?: Record<string, string[]> | undefined;
3275
+ status: "completed" | "failed";
3248
3276
  documents: {
3249
3277
  id: string;
3250
- url: string;
3251
3278
  fileName: string;
3252
- downloadUrl: string;
3279
+ description?: string | undefined;
3280
+ status?: string | undefined;
3281
+ indexed?: string | undefined;
3282
+ mimeType?: string | undefined;
3283
+ size?: number | undefined;
3253
3284
  type?: {
3254
- text?: string | undefined;
3255
3285
  coding?: {
3286
+ system?: string | null | undefined;
3256
3287
  code?: string | null | undefined;
3257
3288
  display?: string | null | undefined;
3258
- system?: string | null | undefined;
3259
3289
  }[] | undefined;
3290
+ text?: string | undefined;
3260
3291
  } | undefined;
3261
- status?: string | undefined;
3262
- description?: string | undefined;
3263
- size?: number | undefined;
3264
- indexed?: string | undefined;
3265
- mimeType?: string | undefined;
3292
+ url: string;
3266
3293
  organizationIdentifiers?: {
3267
3294
  name?: string | undefined;
3268
3295
  identifierValues?: string[] | undefined;
3269
3296
  }[] | undefined;
3297
+ downloadUrl: string;
3270
3298
  }[];
3271
3299
  pagination: {
3272
3300
  page: number;
3273
3301
  totalPages: number;
3274
3302
  totalItems: number;
3275
3303
  };
3304
+ }, {
3305
+ patientId: string;
3276
3306
  externalId?: string | undefined;
3277
3307
  additionalIds?: Record<string, string[]> | undefined;
3278
- }, {
3279
3308
  status: "completed" | "failed";
3280
- patientId: string;
3281
3309
  documents: {
3282
3310
  id: string;
3283
- url: string;
3284
3311
  fileName: string;
3285
- downloadUrl: string;
3312
+ description?: string | undefined;
3313
+ status?: string | undefined;
3314
+ indexed?: string | undefined;
3315
+ mimeType?: string | undefined;
3316
+ size?: number | undefined;
3286
3317
  type?: {
3287
- text?: string | undefined;
3288
3318
  coding?: {
3319
+ system?: string | null | undefined;
3289
3320
  code?: string | null | undefined;
3290
3321
  display?: string | null | undefined;
3291
- system?: string | null | undefined;
3292
3322
  }[] | undefined;
3323
+ text?: string | undefined;
3293
3324
  } | undefined;
3294
- status?: string | undefined;
3295
- description?: string | undefined;
3296
- size?: number | undefined;
3297
- indexed?: string | undefined;
3298
- mimeType?: string | undefined;
3325
+ url: string;
3299
3326
  organizationIdentifiers?: {
3300
3327
  name?: string | undefined;
3301
3328
  identifierValues?: string[] | undefined;
3302
3329
  }[] | undefined;
3330
+ downloadUrl: string;
3303
3331
  }[];
3304
3332
  pagination: {
3305
3333
  page: number;
3306
3334
  totalPages: number;
3307
3335
  totalItems: number;
3308
3336
  };
3309
- externalId?: string | undefined;
3310
- additionalIds?: Record<string, string[]> | undefined;
3311
3337
  }>, "many">;
3312
3338
  }, "strip", z.ZodTypeAny, {
3313
3339
  meta: {
3314
- type: "medical.document-bulk-download-paged";
3315
3340
  messageId: string;
3341
+ requestId?: string | undefined;
3316
3342
  when: string;
3317
3343
  data?: unknown;
3318
- requestId?: string | undefined;
3344
+ type: "medical.document-bulk-download-paged";
3319
3345
  };
3320
3346
  patients: {
3321
- status: "completed" | "failed";
3322
3347
  patientId: string;
3348
+ externalId?: string | undefined;
3349
+ additionalIds?: Record<string, string[]> | undefined;
3350
+ status: "completed" | "failed";
3323
3351
  documents: {
3324
3352
  id: string;
3325
- url: string;
3326
3353
  fileName: string;
3327
- downloadUrl: string;
3354
+ description?: string | undefined;
3355
+ status?: string | undefined;
3356
+ indexed?: string | undefined;
3357
+ mimeType?: string | undefined;
3358
+ size?: number | undefined;
3328
3359
  type?: {
3329
- text?: string | undefined;
3330
3360
  coding?: {
3361
+ system?: string | null | undefined;
3331
3362
  code?: string | null | undefined;
3332
3363
  display?: string | null | undefined;
3333
- system?: string | null | undefined;
3334
3364
  }[] | undefined;
3365
+ text?: string | undefined;
3335
3366
  } | undefined;
3336
- status?: string | undefined;
3337
- description?: string | undefined;
3338
- size?: number | undefined;
3339
- indexed?: string | undefined;
3340
- mimeType?: string | undefined;
3367
+ url: string;
3341
3368
  organizationIdentifiers?: {
3342
3369
  name?: string | undefined;
3343
3370
  identifierValues?: string[] | undefined;
3344
3371
  }[] | undefined;
3372
+ downloadUrl: string;
3345
3373
  }[];
3346
3374
  pagination: {
3347
3375
  page: number;
3348
3376
  totalPages: number;
3349
3377
  totalItems: number;
3350
3378
  };
3351
- externalId?: string | undefined;
3352
- additionalIds?: Record<string, string[]> | undefined;
3353
3379
  }[];
3354
3380
  }, {
3355
3381
  meta: {
3356
- type: "medical.document-bulk-download-paged";
3357
3382
  messageId: string;
3383
+ requestId?: string | undefined;
3358
3384
  when: string;
3359
3385
  data?: unknown;
3360
- requestId?: string | undefined;
3386
+ type: "medical.document-bulk-download-paged";
3361
3387
  };
3362
3388
  patients: {
3363
- status: "completed" | "failed";
3364
3389
  patientId: string;
3390
+ externalId?: string | undefined;
3391
+ additionalIds?: Record<string, string[]> | undefined;
3392
+ status: "completed" | "failed";
3365
3393
  documents: {
3366
3394
  id: string;
3367
- url: string;
3368
3395
  fileName: string;
3369
- downloadUrl: string;
3396
+ description?: string | undefined;
3397
+ status?: string | undefined;
3398
+ indexed?: string | undefined;
3399
+ mimeType?: string | undefined;
3400
+ size?: number | undefined;
3370
3401
  type?: {
3371
- text?: string | undefined;
3372
3402
  coding?: {
3403
+ system?: string | null | undefined;
3373
3404
  code?: string | null | undefined;
3374
3405
  display?: string | null | undefined;
3375
- system?: string | null | undefined;
3376
3406
  }[] | undefined;
3407
+ text?: string | undefined;
3377
3408
  } | undefined;
3378
- status?: string | undefined;
3379
- description?: string | undefined;
3380
- size?: number | undefined;
3381
- indexed?: string | undefined;
3382
- mimeType?: string | undefined;
3409
+ url: string;
3383
3410
  organizationIdentifiers?: {
3384
3411
  name?: string | undefined;
3385
3412
  identifierValues?: string[] | undefined;
3386
3413
  }[] | undefined;
3414
+ downloadUrl: string;
3387
3415
  }[];
3388
3416
  pagination: {
3389
3417
  page: number;
3390
3418
  totalPages: number;
3391
3419
  totalItems: number;
3392
3420
  };
3393
- externalId?: string | undefined;
3394
- additionalIds?: Record<string, string[]> | undefined;
3395
3421
  }[];
3396
3422
  }>, z.ZodObject<{
3397
3423
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -3405,55 +3431,55 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3405
3431
  }, {
3406
3432
  type: z.ZodLiteral<"medical.bulk-patient-create">;
3407
3433
  }>, "strip", z.ZodTypeAny, {
3408
- type: "medical.bulk-patient-create";
3409
3434
  messageId: string;
3435
+ requestId?: string | undefined;
3410
3436
  when: string;
3411
3437
  data?: unknown;
3412
- requestId?: string | undefined;
3413
- }, {
3414
3438
  type: "medical.bulk-patient-create";
3439
+ }, {
3415
3440
  messageId: string;
3441
+ requestId?: string | undefined;
3416
3442
  when: string;
3417
3443
  data?: unknown;
3418
- requestId?: string | undefined;
3444
+ type: "medical.bulk-patient-create";
3419
3445
  }>;
3420
3446
  bulkPatientCreate: z.ZodObject<{
3421
3447
  requestId: z.ZodString;
3422
3448
  status: z.ZodEnum<["waiting", "processing", "completed", "failed"]>;
3423
3449
  result: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3424
3450
  }, "strip", z.ZodTypeAny, {
3425
- status: "waiting" | "processing" | "completed" | "failed";
3426
3451
  requestId: string;
3452
+ status: "completed" | "failed" | "processing" | "waiting";
3427
3453
  result?: string | null | undefined;
3428
3454
  }, {
3429
- status: "waiting" | "processing" | "completed" | "failed";
3430
3455
  requestId: string;
3456
+ status: "completed" | "failed" | "processing" | "waiting";
3431
3457
  result?: string | null | undefined;
3432
3458
  }>;
3433
3459
  }, "strip", z.ZodTypeAny, {
3434
3460
  meta: {
3435
- type: "medical.bulk-patient-create";
3436
3461
  messageId: string;
3462
+ requestId?: string | undefined;
3437
3463
  when: string;
3438
3464
  data?: unknown;
3439
- requestId?: string | undefined;
3465
+ type: "medical.bulk-patient-create";
3440
3466
  };
3441
3467
  bulkPatientCreate: {
3442
- status: "waiting" | "processing" | "completed" | "failed";
3443
3468
  requestId: string;
3469
+ status: "completed" | "failed" | "processing" | "waiting";
3444
3470
  result?: string | null | undefined;
3445
3471
  };
3446
3472
  }, {
3447
3473
  meta: {
3448
- type: "medical.bulk-patient-create";
3449
3474
  messageId: string;
3475
+ requestId?: string | undefined;
3450
3476
  when: string;
3451
3477
  data?: unknown;
3452
- requestId?: string | undefined;
3478
+ type: "medical.bulk-patient-create";
3453
3479
  };
3454
3480
  bulkPatientCreate: {
3455
- status: "waiting" | "processing" | "completed" | "failed";
3456
3481
  requestId: string;
3482
+ status: "completed" | "failed" | "processing" | "waiting";
3457
3483
  result?: string | null | undefined;
3458
3484
  };
3459
3485
  }>, z.ZodObject<{
@@ -3468,17 +3494,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3468
3494
  }, {
3469
3495
  type: z.ZodLiteral<NotificationWebhookEvent.PharmacyNotification>;
3470
3496
  }>, "strip", z.ZodTypeAny, {
3471
- type: NotificationWebhookEvent.PharmacyNotification;
3472
3497
  messageId: string;
3498
+ requestId?: string | undefined;
3473
3499
  when: string;
3474
3500
  data?: unknown;
3475
- requestId?: string | undefined;
3476
- }, {
3477
3501
  type: NotificationWebhookEvent.PharmacyNotification;
3502
+ }, {
3478
3503
  messageId: string;
3504
+ requestId?: string | undefined;
3479
3505
  when: string;
3480
3506
  data?: unknown;
3481
- requestId?: string | undefined;
3507
+ type: NotificationWebhookEvent.PharmacyNotification;
3482
3508
  }>;
3483
3509
  payload: z.ZodObject<{
3484
3510
  url: z.ZodString;
@@ -3501,11 +3527,11 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3501
3527
  }>;
3502
3528
  }, "strip", z.ZodTypeAny, {
3503
3529
  meta: {
3504
- type: NotificationWebhookEvent.PharmacyNotification;
3505
3530
  messageId: string;
3531
+ requestId?: string | undefined;
3506
3532
  when: string;
3507
3533
  data?: unknown;
3508
- requestId?: string | undefined;
3534
+ type: NotificationWebhookEvent.PharmacyNotification;
3509
3535
  };
3510
3536
  payload: {
3511
3537
  url: string;
@@ -3516,11 +3542,11 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3516
3542
  };
3517
3543
  }, {
3518
3544
  meta: {
3519
- type: NotificationWebhookEvent.PharmacyNotification;
3520
3545
  messageId: string;
3546
+ requestId?: string | undefined;
3521
3547
  when: string;
3522
3548
  data?: unknown;
3523
- requestId?: string | undefined;
3549
+ type: NotificationWebhookEvent.PharmacyNotification;
3524
3550
  };
3525
3551
  payload: {
3526
3552
  url: string;
@@ -3541,17 +3567,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3541
3567
  }, {
3542
3568
  type: z.ZodLiteral<NotificationWebhookEvent.LaboratoryNotification>;
3543
3569
  }>, "strip", z.ZodTypeAny, {
3544
- type: NotificationWebhookEvent.LaboratoryNotification;
3545
3570
  messageId: string;
3571
+ requestId?: string | undefined;
3546
3572
  when: string;
3547
3573
  data?: unknown;
3548
- requestId?: string | undefined;
3549
- }, {
3550
3574
  type: NotificationWebhookEvent.LaboratoryNotification;
3575
+ }, {
3551
3576
  messageId: string;
3577
+ requestId?: string | undefined;
3552
3578
  when: string;
3553
3579
  data?: unknown;
3554
- requestId?: string | undefined;
3580
+ type: NotificationWebhookEvent.LaboratoryNotification;
3555
3581
  }>;
3556
3582
  payload: z.ZodObject<{
3557
3583
  url: z.ZodString;
@@ -3574,11 +3600,11 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3574
3600
  }>;
3575
3601
  }, "strip", z.ZodTypeAny, {
3576
3602
  meta: {
3577
- type: NotificationWebhookEvent.LaboratoryNotification;
3578
3603
  messageId: string;
3604
+ requestId?: string | undefined;
3579
3605
  when: string;
3580
3606
  data?: unknown;
3581
- requestId?: string | undefined;
3607
+ type: NotificationWebhookEvent.LaboratoryNotification;
3582
3608
  };
3583
3609
  payload: {
3584
3610
  url: string;
@@ -3589,11 +3615,11 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3589
3615
  };
3590
3616
  }, {
3591
3617
  meta: {
3592
- type: NotificationWebhookEvent.LaboratoryNotification;
3593
3618
  messageId: string;
3619
+ requestId?: string | undefined;
3594
3620
  when: string;
3595
3621
  data?: unknown;
3596
- requestId?: string | undefined;
3622
+ type: NotificationWebhookEvent.LaboratoryNotification;
3597
3623
  };
3598
3624
  payload: {
3599
3625
  url: string;
@@ -3614,17 +3640,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3614
3640
  }, {
3615
3641
  type: z.ZodLiteral<"network-query.hie">;
3616
3642
  }>, "strip", z.ZodTypeAny, {
3617
- type: "network-query.hie";
3618
3643
  messageId: string;
3644
+ requestId?: string | undefined;
3619
3645
  when: string;
3620
3646
  data?: unknown;
3621
- requestId?: string | undefined;
3622
- }, {
3623
3647
  type: "network-query.hie";
3648
+ }, {
3624
3649
  messageId: string;
3650
+ requestId?: string | undefined;
3625
3651
  when: string;
3626
3652
  data?: unknown;
3627
- requestId?: string | undefined;
3653
+ type: "network-query.hie";
3628
3654
  }>;
3629
3655
  payload: z.ZodObject<{
3630
3656
  patientId: z.ZodString;
@@ -3636,74 +3662,74 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3636
3662
  status: z.ZodEnum<["completed", "failed"]>;
3637
3663
  completedAt: z.ZodEffects<z.ZodString, string, string>;
3638
3664
  }, "strip", z.ZodTypeAny, {
3639
- type: "pharmacy" | "hie" | "lab";
3665
+ type: "hie" | "lab" | "pharmacy";
3666
+ source?: string | undefined;
3640
3667
  status: "completed" | "failed";
3641
3668
  completedAt: string;
3642
- source?: string | undefined;
3643
3669
  }, {
3644
- type: "pharmacy" | "hie" | "lab";
3670
+ type: "hie" | "lab" | "pharmacy";
3671
+ source?: string | undefined;
3645
3672
  status: "completed" | "failed";
3646
3673
  completedAt: string;
3647
- source?: string | undefined;
3648
3674
  }>;
3649
3675
  }, "strip", z.ZodTypeAny, {
3676
+ patientId: string;
3677
+ externalId?: string | undefined;
3678
+ consolidatedDataUrl: string;
3650
3679
  source: {
3651
- type: "pharmacy" | "hie" | "lab";
3680
+ type: "hie" | "lab" | "pharmacy";
3681
+ source?: string | undefined;
3652
3682
  status: "completed" | "failed";
3653
3683
  completedAt: string;
3654
- source?: string | undefined;
3655
3684
  };
3685
+ }, {
3656
3686
  patientId: string;
3657
- consolidatedDataUrl: string;
3658
3687
  externalId?: string | undefined;
3659
- }, {
3688
+ consolidatedDataUrl: string;
3660
3689
  source: {
3661
- type: "pharmacy" | "hie" | "lab";
3690
+ type: "hie" | "lab" | "pharmacy";
3691
+ source?: string | undefined;
3662
3692
  status: "completed" | "failed";
3663
3693
  completedAt: string;
3664
- source?: string | undefined;
3665
3694
  };
3666
- patientId: string;
3667
- consolidatedDataUrl: string;
3668
- externalId?: string | undefined;
3669
3695
  }>;
3670
3696
  }, "strip", z.ZodTypeAny, {
3671
3697
  meta: {
3672
- type: "network-query.hie";
3673
3698
  messageId: string;
3699
+ requestId?: string | undefined;
3674
3700
  when: string;
3675
3701
  data?: unknown;
3676
- requestId?: string | undefined;
3702
+ type: "network-query.hie";
3677
3703
  };
3678
3704
  payload: {
3705
+ patientId: string;
3706
+ externalId?: string | undefined;
3707
+ consolidatedDataUrl: string;
3679
3708
  source: {
3680
- type: "pharmacy" | "hie" | "lab";
3709
+ type: "hie" | "lab" | "pharmacy";
3710
+ source?: string | undefined;
3681
3711
  status: "completed" | "failed";
3682
3712
  completedAt: string;
3683
- source?: string | undefined;
3684
3713
  };
3685
- patientId: string;
3686
- consolidatedDataUrl: string;
3687
- externalId?: string | undefined;
3688
3714
  };
3689
3715
  }, {
3690
3716
  meta: {
3691
- type: "network-query.hie";
3692
3717
  messageId: string;
3718
+ requestId?: string | undefined;
3693
3719
  when: string;
3694
3720
  data?: unknown;
3695
- requestId?: string | undefined;
3721
+ type: "network-query.hie";
3696
3722
  };
3697
3723
  payload: {
3724
+ patientId: string;
3725
+ externalId?: string | undefined;
3726
+ consolidatedDataUrl: string;
3698
3727
  source: {
3699
- type: "pharmacy" | "hie" | "lab";
3728
+ type: "hie" | "lab" | "pharmacy";
3729
+ source?: string | undefined;
3700
3730
  status: "completed" | "failed";
3701
3731
  completedAt: string;
3702
- source?: string | undefined;
3703
3732
  };
3704
- patientId: string;
3705
- consolidatedDataUrl: string;
3706
- externalId?: string | undefined;
3707
3733
  };
3708
3734
  }>, z.ZodObject<{
3709
3735
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -3717,17 +3743,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3717
3743
  }, {
3718
3744
  type: z.ZodLiteral<"network-query.pharmacy">;
3719
3745
  }>, "strip", z.ZodTypeAny, {
3720
- type: "network-query.pharmacy";
3721
3746
  messageId: string;
3747
+ requestId?: string | undefined;
3722
3748
  when: string;
3723
3749
  data?: unknown;
3724
- requestId?: string | undefined;
3725
- }, {
3726
3750
  type: "network-query.pharmacy";
3751
+ }, {
3727
3752
  messageId: string;
3753
+ requestId?: string | undefined;
3728
3754
  when: string;
3729
3755
  data?: unknown;
3730
- requestId?: string | undefined;
3756
+ type: "network-query.pharmacy";
3731
3757
  }>;
3732
3758
  payload: z.ZodObject<{
3733
3759
  patientId: z.ZodString;
@@ -3739,74 +3765,74 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3739
3765
  status: z.ZodEnum<["completed", "failed"]>;
3740
3766
  completedAt: z.ZodEffects<z.ZodString, string, string>;
3741
3767
  }, "strip", z.ZodTypeAny, {
3742
- type: "pharmacy" | "hie" | "lab";
3768
+ type: "hie" | "lab" | "pharmacy";
3769
+ source?: string | undefined;
3743
3770
  status: "completed" | "failed";
3744
3771
  completedAt: string;
3745
- source?: string | undefined;
3746
3772
  }, {
3747
- type: "pharmacy" | "hie" | "lab";
3773
+ type: "hie" | "lab" | "pharmacy";
3774
+ source?: string | undefined;
3748
3775
  status: "completed" | "failed";
3749
3776
  completedAt: string;
3750
- source?: string | undefined;
3751
3777
  }>;
3752
3778
  }, "strip", z.ZodTypeAny, {
3779
+ patientId: string;
3780
+ externalId?: string | undefined;
3781
+ consolidatedDataUrl: string;
3753
3782
  source: {
3754
- type: "pharmacy" | "hie" | "lab";
3783
+ type: "hie" | "lab" | "pharmacy";
3784
+ source?: string | undefined;
3755
3785
  status: "completed" | "failed";
3756
3786
  completedAt: string;
3757
- source?: string | undefined;
3758
3787
  };
3788
+ }, {
3759
3789
  patientId: string;
3760
- consolidatedDataUrl: string;
3761
3790
  externalId?: string | undefined;
3762
- }, {
3791
+ consolidatedDataUrl: string;
3763
3792
  source: {
3764
- type: "pharmacy" | "hie" | "lab";
3793
+ type: "hie" | "lab" | "pharmacy";
3794
+ source?: string | undefined;
3765
3795
  status: "completed" | "failed";
3766
3796
  completedAt: string;
3767
- source?: string | undefined;
3768
3797
  };
3769
- patientId: string;
3770
- consolidatedDataUrl: string;
3771
- externalId?: string | undefined;
3772
3798
  }>;
3773
3799
  }, "strip", z.ZodTypeAny, {
3774
3800
  meta: {
3775
- type: "network-query.pharmacy";
3776
3801
  messageId: string;
3802
+ requestId?: string | undefined;
3777
3803
  when: string;
3778
3804
  data?: unknown;
3779
- requestId?: string | undefined;
3805
+ type: "network-query.pharmacy";
3780
3806
  };
3781
3807
  payload: {
3808
+ patientId: string;
3809
+ externalId?: string | undefined;
3810
+ consolidatedDataUrl: string;
3782
3811
  source: {
3783
- type: "pharmacy" | "hie" | "lab";
3812
+ type: "hie" | "lab" | "pharmacy";
3813
+ source?: string | undefined;
3784
3814
  status: "completed" | "failed";
3785
3815
  completedAt: string;
3786
- source?: string | undefined;
3787
3816
  };
3788
- patientId: string;
3789
- consolidatedDataUrl: string;
3790
- externalId?: string | undefined;
3791
3817
  };
3792
3818
  }, {
3793
3819
  meta: {
3794
- type: "network-query.pharmacy";
3795
3820
  messageId: string;
3821
+ requestId?: string | undefined;
3796
3822
  when: string;
3797
3823
  data?: unknown;
3798
- requestId?: string | undefined;
3824
+ type: "network-query.pharmacy";
3799
3825
  };
3800
3826
  payload: {
3827
+ patientId: string;
3828
+ externalId?: string | undefined;
3829
+ consolidatedDataUrl: string;
3801
3830
  source: {
3802
- type: "pharmacy" | "hie" | "lab";
3831
+ type: "hie" | "lab" | "pharmacy";
3832
+ source?: string | undefined;
3803
3833
  status: "completed" | "failed";
3804
3834
  completedAt: string;
3805
- source?: string | undefined;
3806
3835
  };
3807
- patientId: string;
3808
- consolidatedDataUrl: string;
3809
- externalId?: string | undefined;
3810
3836
  };
3811
3837
  }>, z.ZodObject<{
3812
3838
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -3820,17 +3846,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3820
3846
  }, {
3821
3847
  type: z.ZodLiteral<"network-query.lab">;
3822
3848
  }>, "strip", z.ZodTypeAny, {
3823
- type: "network-query.lab";
3824
3849
  messageId: string;
3850
+ requestId?: string | undefined;
3825
3851
  when: string;
3826
3852
  data?: unknown;
3827
- requestId?: string | undefined;
3828
- }, {
3829
3853
  type: "network-query.lab";
3854
+ }, {
3830
3855
  messageId: string;
3856
+ requestId?: string | undefined;
3831
3857
  when: string;
3832
3858
  data?: unknown;
3833
- requestId?: string | undefined;
3859
+ type: "network-query.lab";
3834
3860
  }>;
3835
3861
  payload: z.ZodObject<{
3836
3862
  patientId: z.ZodString;
@@ -3842,74 +3868,74 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3842
3868
  status: z.ZodEnum<["completed", "failed"]>;
3843
3869
  completedAt: z.ZodEffects<z.ZodString, string, string>;
3844
3870
  }, "strip", z.ZodTypeAny, {
3845
- type: "pharmacy" | "hie" | "lab";
3871
+ type: "hie" | "lab" | "pharmacy";
3872
+ source?: string | undefined;
3846
3873
  status: "completed" | "failed";
3847
3874
  completedAt: string;
3848
- source?: string | undefined;
3849
3875
  }, {
3850
- type: "pharmacy" | "hie" | "lab";
3876
+ type: "hie" | "lab" | "pharmacy";
3877
+ source?: string | undefined;
3851
3878
  status: "completed" | "failed";
3852
3879
  completedAt: string;
3853
- source?: string | undefined;
3854
3880
  }>;
3855
3881
  }, "strip", z.ZodTypeAny, {
3882
+ patientId: string;
3883
+ externalId?: string | undefined;
3884
+ consolidatedDataUrl: string;
3856
3885
  source: {
3857
- type: "pharmacy" | "hie" | "lab";
3886
+ type: "hie" | "lab" | "pharmacy";
3887
+ source?: string | undefined;
3858
3888
  status: "completed" | "failed";
3859
3889
  completedAt: string;
3860
- source?: string | undefined;
3861
3890
  };
3891
+ }, {
3862
3892
  patientId: string;
3863
- consolidatedDataUrl: string;
3864
3893
  externalId?: string | undefined;
3865
- }, {
3894
+ consolidatedDataUrl: string;
3866
3895
  source: {
3867
- type: "pharmacy" | "hie" | "lab";
3896
+ type: "hie" | "lab" | "pharmacy";
3897
+ source?: string | undefined;
3868
3898
  status: "completed" | "failed";
3869
3899
  completedAt: string;
3870
- source?: string | undefined;
3871
3900
  };
3872
- patientId: string;
3873
- consolidatedDataUrl: string;
3874
- externalId?: string | undefined;
3875
3901
  }>;
3876
3902
  }, "strip", z.ZodTypeAny, {
3877
3903
  meta: {
3878
- type: "network-query.lab";
3879
3904
  messageId: string;
3905
+ requestId?: string | undefined;
3880
3906
  when: string;
3881
3907
  data?: unknown;
3882
- requestId?: string | undefined;
3908
+ type: "network-query.lab";
3883
3909
  };
3884
3910
  payload: {
3911
+ patientId: string;
3912
+ externalId?: string | undefined;
3913
+ consolidatedDataUrl: string;
3885
3914
  source: {
3886
- type: "pharmacy" | "hie" | "lab";
3915
+ type: "hie" | "lab" | "pharmacy";
3916
+ source?: string | undefined;
3887
3917
  status: "completed" | "failed";
3888
3918
  completedAt: string;
3889
- source?: string | undefined;
3890
3919
  };
3891
- patientId: string;
3892
- consolidatedDataUrl: string;
3893
- externalId?: string | undefined;
3894
3920
  };
3895
3921
  }, {
3896
3922
  meta: {
3897
- type: "network-query.lab";
3898
3923
  messageId: string;
3924
+ requestId?: string | undefined;
3899
3925
  when: string;
3900
3926
  data?: unknown;
3901
- requestId?: string | undefined;
3927
+ type: "network-query.lab";
3902
3928
  };
3903
3929
  payload: {
3930
+ patientId: string;
3931
+ externalId?: string | undefined;
3932
+ consolidatedDataUrl: string;
3904
3933
  source: {
3905
- type: "pharmacy" | "hie" | "lab";
3934
+ type: "hie" | "lab" | "pharmacy";
3935
+ source?: string | undefined;
3906
3936
  status: "completed" | "failed";
3907
3937
  completedAt: string;
3908
- source?: string | undefined;
3909
3938
  };
3910
- patientId: string;
3911
- consolidatedDataUrl: string;
3912
- externalId?: string | undefined;
3913
3939
  };
3914
3940
  }>, z.ZodObject<{
3915
3941
  meta: z.ZodObject<z.objectUtil.extendShape<{
@@ -3923,17 +3949,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3923
3949
  }, {
3924
3950
  type: z.ZodLiteral<"patient.admit">;
3925
3951
  }>, "strip", z.ZodTypeAny, {
3926
- type: "patient.admit";
3927
3952
  messageId: string;
3953
+ requestId?: string | undefined;
3928
3954
  when: string;
3929
3955
  data?: unknown;
3930
- requestId?: string | undefined;
3931
- }, {
3932
3956
  type: "patient.admit";
3957
+ }, {
3933
3958
  messageId: string;
3959
+ requestId?: string | undefined;
3934
3960
  when: string;
3935
3961
  data?: unknown;
3936
- requestId?: string | undefined;
3962
+ type: "patient.admit";
3937
3963
  }>;
3938
3964
  payload: z.ZodObject<{
3939
3965
  url: z.ZodString;
@@ -3945,48 +3971,48 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
3945
3971
  }, "strip", z.ZodTypeAny, {
3946
3972
  url: string;
3947
3973
  patientId: string;
3948
- admitTimestamp: string;
3949
3974
  externalId?: string | undefined;
3950
3975
  additionalIds?: Record<string, string[]> | undefined;
3976
+ admitTimestamp: string;
3951
3977
  whenSourceSent?: string | undefined;
3952
3978
  }, {
3953
3979
  url: string;
3954
3980
  patientId: string;
3955
- admitTimestamp: string;
3956
3981
  externalId?: string | undefined;
3957
3982
  additionalIds?: Record<string, string[]> | undefined;
3983
+ admitTimestamp: string;
3958
3984
  whenSourceSent?: string | undefined;
3959
3985
  }>;
3960
3986
  }, "strip", z.ZodTypeAny, {
3961
3987
  meta: {
3962
- type: "patient.admit";
3963
3988
  messageId: string;
3989
+ requestId?: string | undefined;
3964
3990
  when: string;
3965
3991
  data?: unknown;
3966
- requestId?: string | undefined;
3992
+ type: "patient.admit";
3967
3993
  };
3968
3994
  payload: {
3969
3995
  url: string;
3970
3996
  patientId: string;
3971
- admitTimestamp: string;
3972
3997
  externalId?: string | undefined;
3973
3998
  additionalIds?: Record<string, string[]> | undefined;
3999
+ admitTimestamp: string;
3974
4000
  whenSourceSent?: string | undefined;
3975
4001
  };
3976
4002
  }, {
3977
4003
  meta: {
3978
- type: "patient.admit";
3979
4004
  messageId: string;
4005
+ requestId?: string | undefined;
3980
4006
  when: string;
3981
4007
  data?: unknown;
3982
- requestId?: string | undefined;
4008
+ type: "patient.admit";
3983
4009
  };
3984
4010
  payload: {
3985
4011
  url: string;
3986
4012
  patientId: string;
3987
- admitTimestamp: string;
3988
4013
  externalId?: string | undefined;
3989
4014
  additionalIds?: Record<string, string[]> | undefined;
4015
+ admitTimestamp: string;
3990
4016
  whenSourceSent?: string | undefined;
3991
4017
  };
3992
4018
  }>, z.ZodObject<{
@@ -4001,17 +4027,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4001
4027
  }, {
4002
4028
  type: z.ZodLiteral<"patient.transfer">;
4003
4029
  }>, "strip", z.ZodTypeAny, {
4004
- type: "patient.transfer";
4005
4030
  messageId: string;
4031
+ requestId?: string | undefined;
4006
4032
  when: string;
4007
4033
  data?: unknown;
4008
- requestId?: string | undefined;
4009
- }, {
4010
4034
  type: "patient.transfer";
4035
+ }, {
4011
4036
  messageId: string;
4037
+ requestId?: string | undefined;
4012
4038
  when: string;
4013
4039
  data?: unknown;
4014
- requestId?: string | undefined;
4040
+ type: "patient.transfer";
4015
4041
  }>;
4016
4042
  payload: z.ZodObject<{
4017
4043
  url: z.ZodString;
@@ -4066,6 +4092,8 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4066
4092
  }, "strip", z.ZodTypeAny, {
4067
4093
  url: string;
4068
4094
  patientId: string;
4095
+ externalId?: string | undefined;
4096
+ additionalIds?: Record<string, string[]> | undefined;
4069
4097
  admitTimestamp: string;
4070
4098
  transfers: {
4071
4099
  timestamp: string;
@@ -4078,12 +4106,12 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4078
4106
  type: string;
4079
4107
  };
4080
4108
  }[];
4081
- externalId?: string | undefined;
4082
- additionalIds?: Record<string, string[]> | undefined;
4083
4109
  whenSourceSent?: string | undefined;
4084
4110
  }, {
4085
4111
  url: string;
4086
4112
  patientId: string;
4113
+ externalId?: string | undefined;
4114
+ additionalIds?: Record<string, string[]> | undefined;
4087
4115
  admitTimestamp: string;
4088
4116
  transfers: {
4089
4117
  timestamp: string;
@@ -4096,21 +4124,21 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4096
4124
  type: string;
4097
4125
  };
4098
4126
  }[];
4099
- externalId?: string | undefined;
4100
- additionalIds?: Record<string, string[]> | undefined;
4101
4127
  whenSourceSent?: string | undefined;
4102
4128
  }>;
4103
4129
  }, "strip", z.ZodTypeAny, {
4104
4130
  meta: {
4105
- type: "patient.transfer";
4106
4131
  messageId: string;
4132
+ requestId?: string | undefined;
4107
4133
  when: string;
4108
4134
  data?: unknown;
4109
- requestId?: string | undefined;
4135
+ type: "patient.transfer";
4110
4136
  };
4111
4137
  payload: {
4112
4138
  url: string;
4113
4139
  patientId: string;
4140
+ externalId?: string | undefined;
4141
+ additionalIds?: Record<string, string[]> | undefined;
4114
4142
  admitTimestamp: string;
4115
4143
  transfers: {
4116
4144
  timestamp: string;
@@ -4123,21 +4151,21 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4123
4151
  type: string;
4124
4152
  };
4125
4153
  }[];
4126
- externalId?: string | undefined;
4127
- additionalIds?: Record<string, string[]> | undefined;
4128
4154
  whenSourceSent?: string | undefined;
4129
4155
  };
4130
4156
  }, {
4131
4157
  meta: {
4132
- type: "patient.transfer";
4133
4158
  messageId: string;
4159
+ requestId?: string | undefined;
4134
4160
  when: string;
4135
4161
  data?: unknown;
4136
- requestId?: string | undefined;
4162
+ type: "patient.transfer";
4137
4163
  };
4138
4164
  payload: {
4139
4165
  url: string;
4140
4166
  patientId: string;
4167
+ externalId?: string | undefined;
4168
+ additionalIds?: Record<string, string[]> | undefined;
4141
4169
  admitTimestamp: string;
4142
4170
  transfers: {
4143
4171
  timestamp: string;
@@ -4150,8 +4178,6 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4150
4178
  type: string;
4151
4179
  };
4152
4180
  }[];
4153
- externalId?: string | undefined;
4154
- additionalIds?: Record<string, string[]> | undefined;
4155
4181
  whenSourceSent?: string | undefined;
4156
4182
  };
4157
4183
  }>, z.ZodObject<{
@@ -4166,17 +4192,17 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4166
4192
  }, {
4167
4193
  type: z.ZodLiteral<"patient.discharge">;
4168
4194
  }>, "strip", z.ZodTypeAny, {
4169
- type: "patient.discharge";
4170
4195
  messageId: string;
4196
+ requestId?: string | undefined;
4171
4197
  when: string;
4172
4198
  data?: unknown;
4173
- requestId?: string | undefined;
4174
- }, {
4175
4199
  type: "patient.discharge";
4200
+ }, {
4176
4201
  messageId: string;
4202
+ requestId?: string | undefined;
4177
4203
  when: string;
4178
4204
  data?: unknown;
4179
- requestId?: string | undefined;
4205
+ type: "patient.discharge";
4180
4206
  }>;
4181
4207
  payload: z.ZodObject<{
4182
4208
  url: z.ZodString;
@@ -4189,52 +4215,52 @@ export declare const webhookRequestSchema: z.ZodUnion<[z.ZodObject<{
4189
4215
  }, "strip", z.ZodTypeAny, {
4190
4216
  url: string;
4191
4217
  patientId: string;
4192
- admitTimestamp: string;
4193
- dischargeTimestamp: string;
4194
4218
  externalId?: string | undefined;
4195
4219
  additionalIds?: Record<string, string[]> | undefined;
4220
+ admitTimestamp: string;
4221
+ dischargeTimestamp: string;
4196
4222
  whenSourceSent?: string | undefined;
4197
4223
  }, {
4198
4224
  url: string;
4199
4225
  patientId: string;
4200
- admitTimestamp: string;
4201
- dischargeTimestamp: string;
4202
4226
  externalId?: string | undefined;
4203
4227
  additionalIds?: Record<string, string[]> | undefined;
4228
+ admitTimestamp: string;
4229
+ dischargeTimestamp: string;
4204
4230
  whenSourceSent?: string | undefined;
4205
4231
  }>;
4206
4232
  }, "strip", z.ZodTypeAny, {
4207
4233
  meta: {
4208
- type: "patient.discharge";
4209
4234
  messageId: string;
4235
+ requestId?: string | undefined;
4210
4236
  when: string;
4211
4237
  data?: unknown;
4212
- requestId?: string | undefined;
4238
+ type: "patient.discharge";
4213
4239
  };
4214
4240
  payload: {
4215
4241
  url: string;
4216
4242
  patientId: string;
4217
- admitTimestamp: string;
4218
- dischargeTimestamp: string;
4219
4243
  externalId?: string | undefined;
4220
4244
  additionalIds?: Record<string, string[]> | undefined;
4245
+ admitTimestamp: string;
4246
+ dischargeTimestamp: string;
4221
4247
  whenSourceSent?: string | undefined;
4222
4248
  };
4223
4249
  }, {
4224
4250
  meta: {
4225
- type: "patient.discharge";
4226
4251
  messageId: string;
4252
+ requestId?: string | undefined;
4227
4253
  when: string;
4228
4254
  data?: unknown;
4229
- requestId?: string | undefined;
4255
+ type: "patient.discharge";
4230
4256
  };
4231
4257
  payload: {
4232
4258
  url: string;
4233
4259
  patientId: string;
4234
- admitTimestamp: string;
4235
- dischargeTimestamp: string;
4236
4260
  externalId?: string | undefined;
4237
4261
  additionalIds?: Record<string, string[]> | undefined;
4262
+ admitTimestamp: string;
4263
+ dischargeTimestamp: string;
4238
4264
  whenSourceSent?: string | undefined;
4239
4265
  };
4240
4266
  }>]>;