candidhealth 0.26.1 → 0.28.0

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 (602) hide show
  1. package/api/resources/auth/resources/v2/client/Client.js +1 -1
  2. package/api/resources/billingNotes/resources/v2/client/Client.js +1 -1
  3. package/api/resources/claims/types/Claim.d.ts +37 -0
  4. package/api/resources/contracts/resources/v2/client/Client.js +5 -5
  5. package/api/resources/customSchemas/resources/v1/client/Client.js +4 -4
  6. package/api/resources/eligibility/resources/v2/client/Client.js +3 -3
  7. package/api/resources/encounters/resources/v4/client/Client.js +4 -4
  8. package/api/resources/encounters/resources/v4/types/Encounter.d.ts +37 -0
  9. package/api/resources/encounters/resources/v4/types/EncounterPage.d.ts +37 -0
  10. package/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
  11. package/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +2 -2
  12. package/api/resources/exports/resources/v3/client/Client.js +1 -1
  13. package/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +1 -1
  14. package/api/resources/feeSchedules/resources/v3/client/Client.js +10 -10
  15. package/api/resources/guarantor/resources/v1/client/Client.js +3 -3
  16. package/api/resources/importInvoice/resources/v1/client/Client.js +4 -4
  17. package/api/resources/index.d.ts +1 -0
  18. package/api/resources/index.js +1 -0
  19. package/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
  20. package/api/resources/insurancePayments/resources/v1/client/Client.js +5 -5
  21. package/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
  22. package/api/resources/invoices/index.d.ts +1 -0
  23. package/api/resources/invoices/index.js +1 -0
  24. package/api/resources/invoices/types/Invoice.d.ts +19 -0
  25. package/api/resources/invoices/types/InvoiceItem.d.ts +8 -0
  26. package/api/resources/invoices/types/InvoiceStatus.d.ts +12 -0
  27. package/api/resources/invoices/types/InvoiceStatus.js +14 -0
  28. package/api/resources/invoices/types/index.d.ts +3 -0
  29. package/api/resources/invoices/types/index.js +19 -0
  30. package/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
  31. package/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +5 -5
  32. package/api/resources/patientPayments/resources/v4/client/Client.js +5 -5
  33. package/api/resources/patientRefunds/resources/v1/client/Client.js +5 -5
  34. package/api/resources/payers/resources/v3/client/Client.js +2 -2
  35. package/api/resources/preEncounter/client/Client.d.ts +3 -0
  36. package/api/resources/preEncounter/client/Client.js +9 -4
  37. package/api/resources/preEncounter/resources/appointments/client/Client.d.ts +26 -0
  38. package/api/resources/preEncounter/resources/appointments/client/Client.js +17 -0
  39. package/api/resources/preEncounter/resources/appointments/client/index.d.ts +1 -0
  40. package/api/resources/preEncounter/resources/appointments/client/index.js +2 -0
  41. package/api/resources/preEncounter/resources/appointments/index.d.ts +2 -0
  42. package/api/resources/preEncounter/resources/appointments/index.js +18 -0
  43. package/api/resources/preEncounter/resources/appointments/resources/index.d.ts +1 -0
  44. package/api/resources/preEncounter/resources/appointments/resources/index.js +27 -0
  45. package/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.d.ts +132 -0
  46. package/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.js +493 -0
  47. package/api/resources/preEncounter/resources/appointments/resources/v1/client/create.d.ts +28 -0
  48. package/api/resources/preEncounter/resources/appointments/resources/v1/client/create.js +58 -0
  49. package/api/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.d.ts +34 -0
  50. package/api/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.js +69 -0
  51. package/api/resources/preEncounter/resources/appointments/resources/v1/client/get.d.ts +28 -0
  52. package/api/resources/preEncounter/resources/appointments/resources/v1/client/get.js +58 -0
  53. package/api/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.d.ts +28 -0
  54. package/api/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.js +58 -0
  55. package/api/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.d.ts +22 -0
  56. package/api/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.js +47 -0
  57. package/api/resources/preEncounter/resources/appointments/resources/v1/client/index.d.ts +7 -0
  58. package/api/resources/preEncounter/resources/appointments/resources/v1/client/index.js +36 -0
  59. package/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/AppointmentsSearchRequest.d.ts +38 -0
  60. package/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/index.d.ts +1 -0
  61. package/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/index.js +2 -0
  62. package/api/resources/preEncounter/resources/appointments/resources/v1/client/update.d.ts +34 -0
  63. package/api/resources/preEncounter/resources/appointments/resources/v1/client/update.js +69 -0
  64. package/api/resources/preEncounter/resources/appointments/resources/v1/index.d.ts +2 -0
  65. package/api/resources/preEncounter/resources/appointments/resources/v1/index.js +18 -0
  66. package/api/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +19 -0
  67. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.d.ts +11 -0
  68. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.js +10 -0
  69. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.d.ts +11 -0
  70. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.js +13 -0
  71. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.d.ts +8 -0
  72. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.js +10 -0
  73. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.d.ts +9 -0
  74. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.js +11 -0
  75. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.d.ts +9 -0
  76. package/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.js +11 -0
  77. package/api/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.d.ts +32 -0
  78. package/api/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.js +5 -0
  79. package/api/resources/preEncounter/resources/appointments/resources/v1/types/Service.d.ts +9 -0
  80. package/api/resources/preEncounter/resources/appointments/resources/v1/types/Service.js +5 -0
  81. package/api/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.d.ts +10 -0
  82. package/api/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.js +12 -0
  83. package/api/resources/preEncounter/resources/appointments/resources/v1/types/index.d.ts +9 -0
  84. package/api/resources/preEncounter/resources/appointments/resources/v1/types/index.js +25 -0
  85. package/api/resources/preEncounter/resources/common/types/CanonicalProviderId.d.ts +11 -0
  86. package/api/resources/preEncounter/resources/common/types/CanonicalProviderId.js +10 -0
  87. package/api/resources/preEncounter/resources/common/types/ExternalProvider.d.ts +1 -0
  88. package/api/resources/preEncounter/resources/common/types/ExternalProviderType.d.ts +2 -1
  89. package/api/resources/preEncounter/resources/common/types/ExternalProviderType.js +1 -0
  90. package/api/resources/preEncounter/resources/common/types/PageToken.d.ts +11 -0
  91. package/api/resources/preEncounter/resources/common/types/PageToken.js +10 -0
  92. package/api/resources/preEncounter/resources/common/types/ResourcePage.d.ts +8 -0
  93. package/api/resources/preEncounter/resources/common/types/ResourcePage.js +5 -0
  94. package/api/resources/preEncounter/resources/common/types/SortDirection.d.ts +8 -0
  95. package/api/resources/preEncounter/resources/common/types/SortDirection.js +10 -0
  96. package/api/resources/preEncounter/resources/common/types/index.d.ts +4 -0
  97. package/api/resources/preEncounter/resources/common/types/index.js +4 -0
  98. package/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.d.ts +54 -6
  99. package/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.js +136 -11
  100. package/api/resources/preEncounter/resources/coverages/resources/v1/client/checkEligibility.d.ts +22 -0
  101. package/api/resources/preEncounter/resources/coverages/resources/v1/client/checkEligibility.js +47 -0
  102. package/api/resources/preEncounter/resources/coverages/resources/v1/client/getEligibility.d.ts +22 -0
  103. package/api/resources/preEncounter/resources/coverages/resources/v1/client/getEligibility.js +47 -0
  104. package/api/resources/preEncounter/resources/coverages/resources/v1/client/index.d.ts +2 -0
  105. package/api/resources/preEncounter/resources/coverages/resources/v1/client/index.js +3 -1
  106. package/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.d.ts +17 -0
  107. package/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.js +5 -0
  108. package/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/{GetAllCoveragesRequest.d.ts → CoverageGetMultiRequest.d.ts} +1 -1
  109. package/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/CoverageGetMultiRequest.js +5 -0
  110. package/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/index.d.ts +2 -1
  111. package/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.d.ts +8 -0
  112. package/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.js +5 -0
  113. package/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.d.ts +9 -0
  114. package/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.js +5 -0
  115. package/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.d.ts +7 -0
  116. package/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.js +5 -0
  117. package/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.d.ts +6 -0
  118. package/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.js +5 -0
  119. package/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.d.ts +11 -0
  120. package/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.js +5 -0
  121. package/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.d.ts +13 -0
  122. package/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.js +12 -0
  123. package/api/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.d.ts +0 -4
  124. package/api/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.js +0 -1
  125. package/api/resources/preEncounter/resources/coverages/resources/v1/types/MutableCoverage.d.ts +4 -0
  126. package/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.d.ts +8 -0
  127. package/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.js +5 -0
  128. package/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.d.ts +11 -0
  129. package/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.js +5 -0
  130. package/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.d.ts +9 -0
  131. package/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.js +5 -0
  132. package/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.d.ts +11 -0
  133. package/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.js +5 -0
  134. package/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.d.ts +757 -0
  135. package/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.js +195 -0
  136. package/api/resources/preEncounter/resources/coverages/resources/v1/types/index.d.ts +11 -0
  137. package/api/resources/preEncounter/resources/coverages/resources/v1/types/index.js +11 -0
  138. package/api/resources/preEncounter/resources/index.d.ts +1 -0
  139. package/api/resources/preEncounter/resources/index.js +2 -1
  140. package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +26 -8
  141. package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.js +90 -17
  142. package/api/resources/preEncounter/resources/patients/resources/v1/client/getMulti.d.ts +22 -0
  143. package/api/resources/preEncounter/resources/patients/resources/v1/client/getMulti.js +47 -0
  144. package/api/resources/preEncounter/resources/patients/resources/v1/client/index.d.ts +1 -0
  145. package/api/resources/preEncounter/resources/patients/resources/v1/client/index.js +2 -1
  146. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientGetMultiRequest.d.ts +17 -0
  147. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientGetMultiRequest.js +5 -0
  148. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequestPaginated.d.ts +22 -0
  149. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequestPaginated.js +5 -0
  150. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/index.d.ts +2 -1
  151. package/api/resources/preEncounter/resources/patients/resources/v1/types/Contact.d.ts +1 -0
  152. package/api/resources/preEncounter/resources/patients/resources/v1/types/Patient.d.ts +1 -1
  153. package/api/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.d.ts +7 -0
  154. package/api/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.js +5 -0
  155. package/api/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.d.ts +11 -0
  156. package/api/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.js +10 -0
  157. package/api/resources/preEncounter/resources/patients/resources/v1/types/index.d.ts +2 -0
  158. package/api/resources/preEncounter/resources/patients/resources/v1/types/index.js +2 -0
  159. package/api/resources/serviceFacility/client/Client.js +1 -1
  160. package/api/resources/serviceLines/resources/v2/client/Client.d.ts +8 -0
  161. package/api/resources/serviceLines/resources/v2/client/Client.js +57 -2
  162. package/api/resources/serviceLines/resources/v2/client/delete.d.ts +34 -0
  163. package/api/resources/serviceLines/resources/v2/client/delete.js +69 -0
  164. package/api/resources/serviceLines/resources/v2/client/index.d.ts +1 -0
  165. package/api/resources/serviceLines/resources/v2/client/index.js +2 -1
  166. package/api/resources/serviceLines/resources/v2/types/ServiceLine.d.ts +41 -0
  167. package/api/resources/serviceLines/resources/v2/types/ServiceLineEraData.d.ts +8 -0
  168. package/api/resources/serviceLines/resources/v2/types/ServiceLineEraData.js +5 -0
  169. package/api/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  170. package/api/resources/serviceLines/resources/v2/types/index.js +1 -0
  171. package/api/resources/tasks/resources/v3/client/Client.js +5 -5
  172. package/api/resources/thirdPartyPayerPayments/resources/v1/client/Client.js +5 -5
  173. package/api/resources/thirdPartyPayerRefunds/resources/v1/client/Client.js +5 -5
  174. package/api/resources/thirdPartyPayers/resources/v1/client/Client.js +6 -6
  175. package/api/resources/writeOffs/resources/v1/client/Client.js +4 -4
  176. package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
  177. package/dist/api/resources/billingNotes/resources/v2/client/Client.js +1 -1
  178. package/dist/api/resources/claims/types/Claim.d.ts +37 -0
  179. package/dist/api/resources/contracts/resources/v2/client/Client.js +5 -5
  180. package/dist/api/resources/customSchemas/resources/v1/client/Client.js +4 -4
  181. package/dist/api/resources/eligibility/resources/v2/client/Client.js +3 -3
  182. package/dist/api/resources/encounters/resources/v4/client/Client.js +4 -4
  183. package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +37 -0
  184. package/dist/api/resources/encounters/resources/v4/types/EncounterPage.d.ts +37 -0
  185. package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
  186. package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +2 -2
  187. package/dist/api/resources/exports/resources/v3/client/Client.js +1 -1
  188. package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +1 -1
  189. package/dist/api/resources/feeSchedules/resources/v3/client/Client.js +10 -10
  190. package/dist/api/resources/guarantor/resources/v1/client/Client.js +3 -3
  191. package/dist/api/resources/importInvoice/resources/v1/client/Client.js +4 -4
  192. package/dist/api/resources/index.d.ts +1 -0
  193. package/dist/api/resources/index.js +1 -0
  194. package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
  195. package/dist/api/resources/insurancePayments/resources/v1/client/Client.js +5 -5
  196. package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
  197. package/dist/api/resources/invoices/index.d.ts +1 -0
  198. package/dist/api/resources/invoices/index.js +1 -0
  199. package/dist/api/resources/invoices/types/Invoice.d.ts +19 -0
  200. package/dist/api/resources/invoices/types/Invoice.js +5 -0
  201. package/dist/api/resources/invoices/types/InvoiceItem.d.ts +8 -0
  202. package/dist/api/resources/invoices/types/InvoiceItem.js +5 -0
  203. package/dist/api/resources/invoices/types/InvoiceStatus.d.ts +12 -0
  204. package/dist/api/resources/invoices/types/InvoiceStatus.js +14 -0
  205. package/dist/api/resources/invoices/types/index.d.ts +3 -0
  206. package/dist/api/resources/invoices/types/index.js +19 -0
  207. package/dist/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
  208. package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +5 -5
  209. package/dist/api/resources/patientPayments/resources/v4/client/Client.js +5 -5
  210. package/dist/api/resources/patientRefunds/resources/v1/client/Client.js +5 -5
  211. package/dist/api/resources/payers/resources/v3/client/Client.js +2 -2
  212. package/dist/api/resources/preEncounter/client/Client.d.ts +3 -0
  213. package/dist/api/resources/preEncounter/client/Client.js +9 -4
  214. package/dist/api/resources/preEncounter/resources/appointments/client/Client.d.ts +26 -0
  215. package/dist/api/resources/preEncounter/resources/appointments/client/Client.js +17 -0
  216. package/dist/api/resources/preEncounter/resources/appointments/client/index.d.ts +1 -0
  217. package/dist/api/resources/preEncounter/resources/appointments/client/index.js +2 -0
  218. package/dist/api/resources/preEncounter/resources/appointments/index.d.ts +2 -0
  219. package/dist/api/resources/preEncounter/resources/appointments/index.js +18 -0
  220. package/dist/api/resources/preEncounter/resources/appointments/resources/index.d.ts +1 -0
  221. package/dist/api/resources/preEncounter/resources/appointments/resources/index.js +27 -0
  222. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.d.ts +132 -0
  223. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.js +493 -0
  224. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/create.d.ts +28 -0
  225. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/create.js +58 -0
  226. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.d.ts +34 -0
  227. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.js +69 -0
  228. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/get.d.ts +28 -0
  229. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/get.js +58 -0
  230. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.d.ts +28 -0
  231. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.js +58 -0
  232. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.d.ts +22 -0
  233. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.js +47 -0
  234. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/index.d.ts +7 -0
  235. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/index.js +36 -0
  236. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/AppointmentsSearchRequest.d.ts +38 -0
  237. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/AppointmentsSearchRequest.js +5 -0
  238. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/index.d.ts +1 -0
  239. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/requests/index.js +2 -0
  240. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/update.d.ts +34 -0
  241. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/update.js +69 -0
  242. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/index.d.ts +2 -0
  243. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/index.js +18 -0
  244. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +19 -0
  245. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.js +5 -0
  246. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.d.ts +11 -0
  247. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.js +10 -0
  248. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.d.ts +11 -0
  249. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.js +13 -0
  250. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.d.ts +8 -0
  251. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.js +10 -0
  252. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.d.ts +9 -0
  253. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.js +11 -0
  254. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.d.ts +9 -0
  255. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.js +11 -0
  256. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.d.ts +32 -0
  257. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.js +5 -0
  258. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/Service.d.ts +9 -0
  259. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/Service.js +5 -0
  260. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.d.ts +10 -0
  261. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.js +12 -0
  262. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/index.d.ts +9 -0
  263. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/index.js +25 -0
  264. package/dist/api/resources/preEncounter/resources/common/types/CanonicalProviderId.d.ts +11 -0
  265. package/dist/api/resources/preEncounter/resources/common/types/CanonicalProviderId.js +10 -0
  266. package/dist/api/resources/preEncounter/resources/common/types/ExternalProvider.d.ts +1 -0
  267. package/dist/api/resources/preEncounter/resources/common/types/ExternalProviderType.d.ts +2 -1
  268. package/dist/api/resources/preEncounter/resources/common/types/ExternalProviderType.js +1 -0
  269. package/dist/api/resources/preEncounter/resources/common/types/PageToken.d.ts +11 -0
  270. package/dist/api/resources/preEncounter/resources/common/types/PageToken.js +10 -0
  271. package/dist/api/resources/preEncounter/resources/common/types/ResourcePage.d.ts +8 -0
  272. package/dist/api/resources/preEncounter/resources/common/types/ResourcePage.js +5 -0
  273. package/dist/api/resources/preEncounter/resources/common/types/SortDirection.d.ts +8 -0
  274. package/dist/api/resources/preEncounter/resources/common/types/SortDirection.js +10 -0
  275. package/dist/api/resources/preEncounter/resources/common/types/index.d.ts +4 -0
  276. package/dist/api/resources/preEncounter/resources/common/types/index.js +4 -0
  277. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.d.ts +54 -6
  278. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.js +136 -11
  279. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/checkEligibility.d.ts +22 -0
  280. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/checkEligibility.js +47 -0
  281. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/getEligibility.d.ts +22 -0
  282. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/getEligibility.js +47 -0
  283. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/index.d.ts +2 -0
  284. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/index.js +3 -1
  285. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.d.ts +17 -0
  286. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.js +5 -0
  287. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/{GetAllCoveragesRequest.d.ts → CoverageGetMultiRequest.d.ts} +1 -1
  288. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/CoverageGetMultiRequest.js +5 -0
  289. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/index.d.ts +2 -1
  290. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.d.ts +8 -0
  291. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.js +5 -0
  292. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.d.ts +9 -0
  293. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.js +5 -0
  294. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.d.ts +7 -0
  295. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.js +5 -0
  296. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.d.ts +6 -0
  297. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.js +5 -0
  298. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.d.ts +11 -0
  299. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.js +5 -0
  300. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.d.ts +13 -0
  301. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.js +12 -0
  302. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.d.ts +0 -4
  303. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.js +0 -1
  304. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/MutableCoverage.d.ts +4 -0
  305. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.d.ts +8 -0
  306. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.js +5 -0
  307. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.d.ts +11 -0
  308. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.js +5 -0
  309. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.d.ts +9 -0
  310. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.js +5 -0
  311. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.d.ts +11 -0
  312. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.js +5 -0
  313. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.d.ts +757 -0
  314. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.js +195 -0
  315. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/index.d.ts +11 -0
  316. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/index.js +11 -0
  317. package/dist/api/resources/preEncounter/resources/index.d.ts +1 -0
  318. package/dist/api/resources/preEncounter/resources/index.js +2 -1
  319. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +26 -8
  320. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.js +90 -17
  321. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/getMulti.d.ts +22 -0
  322. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/getMulti.js +47 -0
  323. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/index.d.ts +1 -0
  324. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/index.js +2 -1
  325. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientGetMultiRequest.d.ts +17 -0
  326. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientGetMultiRequest.js +5 -0
  327. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequestPaginated.d.ts +22 -0
  328. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequestPaginated.js +5 -0
  329. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/index.d.ts +2 -1
  330. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/Contact.d.ts +1 -0
  331. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/Patient.d.ts +1 -1
  332. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.d.ts +7 -0
  333. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.js +5 -0
  334. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.d.ts +11 -0
  335. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.js +10 -0
  336. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/index.d.ts +2 -0
  337. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/index.js +2 -0
  338. package/dist/api/resources/serviceFacility/client/Client.js +1 -1
  339. package/dist/api/resources/serviceLines/resources/v2/client/Client.d.ts +8 -0
  340. package/dist/api/resources/serviceLines/resources/v2/client/Client.js +57 -2
  341. package/dist/api/resources/serviceLines/resources/v2/client/delete.d.ts +34 -0
  342. package/dist/api/resources/serviceLines/resources/v2/client/delete.js +69 -0
  343. package/dist/api/resources/serviceLines/resources/v2/client/index.d.ts +1 -0
  344. package/dist/api/resources/serviceLines/resources/v2/client/index.js +2 -1
  345. package/dist/api/resources/serviceLines/resources/v2/types/ServiceLine.d.ts +41 -0
  346. package/dist/api/resources/serviceLines/resources/v2/types/ServiceLineEraData.d.ts +8 -0
  347. package/dist/api/resources/serviceLines/resources/v2/types/ServiceLineEraData.js +5 -0
  348. package/dist/api/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  349. package/dist/api/resources/serviceLines/resources/v2/types/index.js +1 -0
  350. package/dist/api/resources/tasks/resources/v3/client/Client.js +5 -5
  351. package/dist/api/resources/thirdPartyPayerPayments/resources/v1/client/Client.js +5 -5
  352. package/dist/api/resources/thirdPartyPayerRefunds/resources/v1/client/Client.js +5 -5
  353. package/dist/api/resources/thirdPartyPayers/resources/v1/client/Client.js +6 -6
  354. package/dist/api/resources/writeOffs/resources/v1/client/Client.js +4 -4
  355. package/dist/serialization/resources/index.d.ts +1 -0
  356. package/dist/serialization/resources/index.js +1 -0
  357. package/dist/serialization/resources/invoices/index.d.ts +1 -0
  358. package/dist/serialization/resources/invoices/index.js +1 -0
  359. package/dist/serialization/resources/invoices/types/Invoice.d.ts +30 -0
  360. package/dist/serialization/resources/invoices/types/Invoice.js +51 -0
  361. package/dist/serialization/resources/invoices/types/InvoiceItem.d.ts +14 -0
  362. package/dist/serialization/resources/invoices/types/InvoiceItem.js +35 -0
  363. package/dist/serialization/resources/invoices/types/InvoiceStatus.d.ts +10 -0
  364. package/dist/serialization/resources/invoices/types/InvoiceStatus.js +31 -0
  365. package/dist/serialization/resources/invoices/types/index.d.ts +3 -0
  366. package/dist/serialization/resources/invoices/types/index.js +19 -0
  367. package/dist/serialization/resources/preEncounter/resources/appointments/index.d.ts +1 -0
  368. package/dist/serialization/resources/preEncounter/resources/appointments/index.js +17 -0
  369. package/dist/serialization/resources/preEncounter/resources/appointments/resources/index.d.ts +1 -0
  370. package/dist/serialization/resources/preEncounter/resources/appointments/resources/index.js +27 -0
  371. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/create.d.ts +15 -0
  372. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/create.js +61 -0
  373. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.d.ts +20 -0
  374. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.js +67 -0
  375. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/get.d.ts +15 -0
  376. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/get.js +61 -0
  377. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.d.ts +20 -0
  378. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.js +63 -0
  379. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.d.ts +11 -0
  380. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.js +32 -0
  381. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/index.d.ts +6 -0
  382. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/index.js +32 -0
  383. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/update.d.ts +20 -0
  384. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/client/update.js +67 -0
  385. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/index.d.ts +2 -0
  386. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/index.js +18 -0
  387. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +21 -0
  388. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.js +44 -0
  389. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.d.ts +10 -0
  390. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.js +35 -0
  391. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.d.ts +10 -0
  392. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.js +31 -0
  393. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.d.ts +10 -0
  394. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.js +31 -0
  395. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.d.ts +10 -0
  396. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.js +31 -0
  397. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.d.ts +10 -0
  398. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.js +31 -0
  399. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.d.ts +30 -0
  400. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.js +51 -0
  401. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Service.d.ts +14 -0
  402. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Service.js +35 -0
  403. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.d.ts +10 -0
  404. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.js +31 -0
  405. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/index.d.ts +9 -0
  406. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/index.js +25 -0
  407. package/dist/serialization/resources/preEncounter/resources/common/types/CanonicalProviderId.d.ts +10 -0
  408. package/dist/serialization/resources/preEncounter/resources/common/types/CanonicalProviderId.js +35 -0
  409. package/dist/serialization/resources/preEncounter/resources/common/types/ExternalProvider.d.ts +2 -0
  410. package/dist/serialization/resources/preEncounter/resources/common/types/ExternalProvider.js +2 -0
  411. package/dist/serialization/resources/preEncounter/resources/common/types/ExternalProviderType.d.ts +1 -1
  412. package/dist/serialization/resources/preEncounter/resources/common/types/ExternalProviderType.js +1 -1
  413. package/dist/serialization/resources/preEncounter/resources/common/types/PageToken.d.ts +10 -0
  414. package/dist/serialization/resources/preEncounter/resources/common/types/PageToken.js +35 -0
  415. package/dist/serialization/resources/preEncounter/resources/common/types/ResourcePage.d.ts +14 -0
  416. package/dist/serialization/resources/preEncounter/resources/common/types/ResourcePage.js +35 -0
  417. package/dist/serialization/resources/preEncounter/resources/common/types/SortDirection.d.ts +10 -0
  418. package/dist/serialization/resources/preEncounter/resources/common/types/SortDirection.js +31 -0
  419. package/dist/serialization/resources/preEncounter/resources/common/types/index.d.ts +4 -0
  420. package/dist/serialization/resources/preEncounter/resources/common/types/index.js +4 -0
  421. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/client/index.d.ts +1 -0
  422. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/client/index.js +4 -0
  423. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.d.ts +15 -0
  424. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.js +36 -0
  425. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/index.d.ts +1 -0
  426. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/index.js +5 -0
  427. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.d.ts +15 -0
  428. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.js +36 -0
  429. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.d.ts +16 -0
  430. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.js +37 -0
  431. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.d.ts +13 -0
  432. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.js +34 -0
  433. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.d.ts +12 -0
  434. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.js +33 -0
  435. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.d.ts +19 -0
  436. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.js +40 -0
  437. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.d.ts +10 -0
  438. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.js +31 -0
  439. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.d.ts +1 -1
  440. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.js +0 -1
  441. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/MutableCoverage.d.ts +4 -0
  442. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/MutableCoverage.js +4 -0
  443. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.d.ts +14 -0
  444. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.js +35 -0
  445. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.d.ts +17 -0
  446. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.js +38 -0
  447. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.d.ts +16 -0
  448. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.js +37 -0
  449. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.d.ts +17 -0
  450. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.js +38 -0
  451. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.d.ts +10 -0
  452. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.js +219 -0
  453. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/index.d.ts +11 -0
  454. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/index.js +11 -0
  455. package/dist/serialization/resources/preEncounter/resources/index.d.ts +1 -0
  456. package/dist/serialization/resources/preEncounter/resources/index.js +2 -1
  457. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/Contact.d.ts +1 -0
  458. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/Contact.js +1 -0
  459. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.d.ts +14 -0
  460. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.js +37 -0
  461. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.d.ts +10 -0
  462. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.js +35 -0
  463. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/index.d.ts +2 -0
  464. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/index.js +2 -0
  465. package/dist/serialization/resources/serviceLines/resources/v2/client/delete.d.ts +20 -0
  466. package/dist/serialization/resources/serviceLines/resources/v2/client/delete.js +67 -0
  467. package/dist/serialization/resources/serviceLines/resources/v2/client/index.d.ts +1 -0
  468. package/dist/serialization/resources/serviceLines/resources/v2/client/index.js +2 -1
  469. package/dist/serialization/resources/serviceLines/resources/v2/types/ServiceLine.d.ts +6 -0
  470. package/dist/serialization/resources/serviceLines/resources/v2/types/ServiceLine.js +6 -0
  471. package/dist/serialization/resources/serviceLines/resources/v2/types/ServiceLineEraData.d.ts +14 -0
  472. package/dist/serialization/resources/serviceLines/resources/v2/types/ServiceLineEraData.js +35 -0
  473. package/dist/serialization/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  474. package/dist/serialization/resources/serviceLines/resources/v2/types/index.js +1 -0
  475. package/package.json +1 -1
  476. package/reference.md +879 -133
  477. package/serialization/resources/index.d.ts +1 -0
  478. package/serialization/resources/index.js +1 -0
  479. package/serialization/resources/invoices/index.d.ts +1 -0
  480. package/serialization/resources/invoices/index.js +1 -0
  481. package/serialization/resources/invoices/types/Invoice.d.ts +30 -0
  482. package/serialization/resources/invoices/types/Invoice.js +51 -0
  483. package/serialization/resources/invoices/types/InvoiceItem.d.ts +14 -0
  484. package/serialization/resources/invoices/types/InvoiceItem.js +35 -0
  485. package/serialization/resources/invoices/types/InvoiceStatus.d.ts +10 -0
  486. package/serialization/resources/invoices/types/InvoiceStatus.js +31 -0
  487. package/serialization/resources/invoices/types/index.d.ts +3 -0
  488. package/serialization/resources/invoices/types/index.js +19 -0
  489. package/serialization/resources/preEncounter/resources/appointments/index.d.ts +1 -0
  490. package/serialization/resources/preEncounter/resources/appointments/index.js +17 -0
  491. package/serialization/resources/preEncounter/resources/appointments/resources/index.d.ts +1 -0
  492. package/serialization/resources/preEncounter/resources/appointments/resources/index.js +27 -0
  493. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/create.d.ts +15 -0
  494. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/create.js +61 -0
  495. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.d.ts +20 -0
  496. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/deactivate.js +67 -0
  497. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/get.d.ts +15 -0
  498. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/get.js +61 -0
  499. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.d.ts +20 -0
  500. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getHistory.js +63 -0
  501. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.d.ts +11 -0
  502. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/getMulti.js +32 -0
  503. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/index.d.ts +6 -0
  504. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/index.js +32 -0
  505. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/update.d.ts +20 -0
  506. package/serialization/resources/preEncounter/resources/appointments/resources/v1/client/update.js +67 -0
  507. package/serialization/resources/preEncounter/resources/appointments/resources/v1/index.d.ts +2 -0
  508. package/serialization/resources/preEncounter/resources/appointments/resources/v1/index.js +18 -0
  509. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +21 -0
  510. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.js +44 -0
  511. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.d.ts +10 -0
  512. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentId.js +35 -0
  513. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.d.ts +10 -0
  514. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentReason.js +31 -0
  515. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.d.ts +10 -0
  516. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentSortField.js +31 -0
  517. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.d.ts +10 -0
  518. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentType.js +31 -0
  519. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.d.ts +10 -0
  520. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/AppointmentWorkQueue.js +31 -0
  521. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.d.ts +30 -0
  522. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/MutableAppointment.js +51 -0
  523. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Service.d.ts +14 -0
  524. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Service.js +35 -0
  525. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.d.ts +10 -0
  526. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/UniversalServiceIdentifier.js +31 -0
  527. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/index.d.ts +9 -0
  528. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/index.js +25 -0
  529. package/serialization/resources/preEncounter/resources/common/types/CanonicalProviderId.d.ts +10 -0
  530. package/serialization/resources/preEncounter/resources/common/types/CanonicalProviderId.js +35 -0
  531. package/serialization/resources/preEncounter/resources/common/types/ExternalProvider.d.ts +2 -0
  532. package/serialization/resources/preEncounter/resources/common/types/ExternalProvider.js +2 -0
  533. package/serialization/resources/preEncounter/resources/common/types/ExternalProviderType.d.ts +1 -1
  534. package/serialization/resources/preEncounter/resources/common/types/ExternalProviderType.js +1 -1
  535. package/serialization/resources/preEncounter/resources/common/types/PageToken.d.ts +10 -0
  536. package/serialization/resources/preEncounter/resources/common/types/PageToken.js +35 -0
  537. package/serialization/resources/preEncounter/resources/common/types/ResourcePage.d.ts +14 -0
  538. package/serialization/resources/preEncounter/resources/common/types/ResourcePage.js +35 -0
  539. package/serialization/resources/preEncounter/resources/common/types/SortDirection.d.ts +10 -0
  540. package/serialization/resources/preEncounter/resources/common/types/SortDirection.js +31 -0
  541. package/serialization/resources/preEncounter/resources/common/types/index.d.ts +4 -0
  542. package/serialization/resources/preEncounter/resources/common/types/index.js +4 -0
  543. package/serialization/resources/preEncounter/resources/coverages/resources/v1/client/index.d.ts +1 -0
  544. package/serialization/resources/preEncounter/resources/coverages/resources/v1/client/index.js +4 -0
  545. package/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.d.ts +15 -0
  546. package/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/CheckEligibilityRequest.js +36 -0
  547. package/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/index.d.ts +1 -0
  548. package/serialization/resources/preEncounter/resources/coverages/resources/v1/client/requests/index.js +5 -0
  549. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.d.ts +15 -0
  550. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageBenefits.js +36 -0
  551. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.d.ts +16 -0
  552. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageEligibilityCheckResponse.js +37 -0
  553. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.d.ts +13 -0
  554. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/CoverageValue.js +34 -0
  555. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.d.ts +12 -0
  556. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheck.js +33 -0
  557. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.d.ts +19 -0
  558. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckMetadata.js +40 -0
  559. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.d.ts +10 -0
  560. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/EligibilityCheckStatus.js +31 -0
  561. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.d.ts +1 -1
  562. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/InsuranceTypeCode.js +0 -1
  563. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/MutableCoverage.d.ts +4 -0
  564. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/MutableCoverage.js +4 -0
  565. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.d.ts +14 -0
  566. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverage.js +35 -0
  567. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.d.ts +17 -0
  568. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/PlanCoverageDetails.js +38 -0
  569. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.d.ts +16 -0
  570. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverage.js +37 -0
  571. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.d.ts +17 -0
  572. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceCoverageDetails.js +38 -0
  573. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.d.ts +10 -0
  574. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/ServiceTypeCode.js +219 -0
  575. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/index.d.ts +11 -0
  576. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/index.js +11 -0
  577. package/serialization/resources/preEncounter/resources/index.d.ts +1 -0
  578. package/serialization/resources/preEncounter/resources/index.js +2 -1
  579. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/Contact.d.ts +1 -0
  580. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/Contact.js +1 -0
  581. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.d.ts +14 -0
  582. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientPage.js +37 -0
  583. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.d.ts +10 -0
  584. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/PatientSortField.js +35 -0
  585. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/index.d.ts +2 -0
  586. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/index.js +2 -0
  587. package/serialization/resources/serviceLines/resources/v2/client/delete.d.ts +20 -0
  588. package/serialization/resources/serviceLines/resources/v2/client/delete.js +67 -0
  589. package/serialization/resources/serviceLines/resources/v2/client/index.d.ts +1 -0
  590. package/serialization/resources/serviceLines/resources/v2/client/index.js +2 -1
  591. package/serialization/resources/serviceLines/resources/v2/types/ServiceLine.d.ts +6 -0
  592. package/serialization/resources/serviceLines/resources/v2/types/ServiceLine.js +6 -0
  593. package/serialization/resources/serviceLines/resources/v2/types/ServiceLineEraData.d.ts +14 -0
  594. package/serialization/resources/serviceLines/resources/v2/types/ServiceLineEraData.js +35 -0
  595. package/serialization/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  596. package/serialization/resources/serviceLines/resources/v2/types/index.js +1 -0
  597. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequest.d.ts +0 -12
  598. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequest.d.ts +0 -12
  599. /package/api/resources/{preEncounter/resources/coverages/resources/v1/client/requests/GetAllCoveragesRequest.js → invoices/types/Invoice.js} +0 -0
  600. /package/api/resources/{preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequest.js → invoices/types/InvoiceItem.js} +0 -0
  601. /package/{dist/api/resources/preEncounter/resources/coverages/resources/v1/client/requests/GetAllCoveragesRequest.js → api/resources/preEncounter/resources/appointments/resources/v1/client/requests/AppointmentsSearchRequest.js} +0 -0
  602. /package/{dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/PatientsSearchRequest.js → api/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.js} +0 -0
@@ -0,0 +1,493 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.V1 = void 0;
42
+ const environments = __importStar(require("../../../../../../../../environments"));
43
+ const core = __importStar(require("../../../../../../../../core"));
44
+ const CandidApi = __importStar(require("../../../../../../../index"));
45
+ const serializers = __importStar(require("../../../../../../../../serialization/index"));
46
+ const url_join_1 = __importDefault(require("url-join"));
47
+ class V1 {
48
+ constructor(_options = {}) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * Adds an appointment. VersionConflictError is returned when the placer_appointment_id is already in use.
53
+ *
54
+ * @param {CandidApi.preEncounter.appointments.v1.MutableAppointment} request
55
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @example
58
+ * await client.preEncounter.appointments.v1.create({
59
+ * patientId: CandidApi.preEncounter.patients.v1.PatientId("string"),
60
+ * checkedIn: true,
61
+ * assignedPatientLocation: "string",
62
+ * attendingDoctor: {},
63
+ * referringDoctor: {},
64
+ * startTimestamp: new Date("2024-01-15T09:30:00.000Z"),
65
+ * serviceDuration: 1,
66
+ * services: [{
67
+ * universalServiceIdentifier: CandidApi.preEncounter.appointments.v1.UniversalServiceIdentifier.MdVisit,
68
+ * startTimestamp: new Date("2024-01-15T09:30:00.000Z")
69
+ * }],
70
+ * placerAppointmentId: "string",
71
+ * appointmentReason: CandidApi.preEncounter.appointments.v1.AppointmentReason.Checkup,
72
+ * appointmentType: CandidApi.preEncounter.appointments.v1.AppointmentType.Complete,
73
+ * locationResourceId: "string",
74
+ * workQueue: CandidApi.preEncounter.appointments.v1.AppointmentWorkQueue.EmergentIssue
75
+ * })
76
+ */
77
+ create(request, requestOptions) {
78
+ var _a, _b;
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const _response = yield core.fetcher({
81
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
82
+ .preEncounter, "/appointments/v1"),
83
+ method: "POST",
84
+ headers: {
85
+ Authorization: yield this._getAuthorizationHeader(),
86
+ "X-Fern-Language": "JavaScript",
87
+ "X-Fern-SDK-Name": "candidhealth",
88
+ "X-Fern-SDK-Version": "0.28.0",
89
+ "X-Fern-Runtime": core.RUNTIME.type,
90
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
91
+ },
92
+ contentType: "application/json",
93
+ requestType: "json",
94
+ body: serializers.preEncounter.appointments.v1.MutableAppointment.jsonOrThrow(request, {
95
+ unrecognizedObjectKeys: "strip",
96
+ }),
97
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
98
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
99
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
+ });
101
+ if (_response.ok) {
102
+ return {
103
+ ok: true,
104
+ body: serializers.preEncounter.appointments.v1.Appointment.parseOrThrow(_response.body, {
105
+ unrecognizedObjectKeys: "passthrough",
106
+ allowUnrecognizedUnionMembers: true,
107
+ allowUnrecognizedEnumValues: true,
108
+ breadcrumbsPrefix: ["response"],
109
+ }),
110
+ };
111
+ }
112
+ if (_response.error.reason === "status-code") {
113
+ switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
114
+ case "VersionConflictError":
115
+ return {
116
+ ok: false,
117
+ error: serializers.preEncounter.appointments.v1.create.Error.parseOrThrow(_response.error.body, {
118
+ unrecognizedObjectKeys: "passthrough",
119
+ allowUnrecognizedUnionMembers: true,
120
+ allowUnrecognizedEnumValues: true,
121
+ breadcrumbsPrefix: ["response"],
122
+ }),
123
+ };
124
+ }
125
+ }
126
+ return {
127
+ ok: false,
128
+ error: CandidApi.preEncounter.appointments.v1.create.Error._unknown(_response.error),
129
+ };
130
+ });
131
+ }
132
+ /**
133
+ * Gets an appointment.
134
+ *
135
+ * @param {CandidApi.preEncounter.appointments.v1.AppointmentId} id
136
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
137
+ *
138
+ * @example
139
+ * await client.preEncounter.appointments.v1.get(CandidApi.preEncounter.appointments.v1.AppointmentId("string"))
140
+ */
141
+ get(id, requestOptions) {
142
+ var _a, _b;
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const _response = yield core.fetcher({
145
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
146
+ .preEncounter, `/appointments/v1/${encodeURIComponent(serializers.preEncounter.appointments.v1.AppointmentId.jsonOrThrow(id))}`),
147
+ method: "GET",
148
+ headers: {
149
+ Authorization: yield this._getAuthorizationHeader(),
150
+ "X-Fern-Language": "JavaScript",
151
+ "X-Fern-SDK-Name": "candidhealth",
152
+ "X-Fern-SDK-Version": "0.28.0",
153
+ "X-Fern-Runtime": core.RUNTIME.type,
154
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
155
+ },
156
+ contentType: "application/json",
157
+ requestType: "json",
158
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
159
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
160
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
161
+ });
162
+ if (_response.ok) {
163
+ return {
164
+ ok: true,
165
+ body: serializers.preEncounter.appointments.v1.Appointment.parseOrThrow(_response.body, {
166
+ unrecognizedObjectKeys: "passthrough",
167
+ allowUnrecognizedUnionMembers: true,
168
+ allowUnrecognizedEnumValues: true,
169
+ breadcrumbsPrefix: ["response"],
170
+ }),
171
+ };
172
+ }
173
+ if (_response.error.reason === "status-code") {
174
+ switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
175
+ case "NotFoundError":
176
+ return {
177
+ ok: false,
178
+ error: serializers.preEncounter.appointments.v1.get.Error.parseOrThrow(_response.error.body, {
179
+ unrecognizedObjectKeys: "passthrough",
180
+ allowUnrecognizedUnionMembers: true,
181
+ allowUnrecognizedEnumValues: true,
182
+ breadcrumbsPrefix: ["response"],
183
+ }),
184
+ };
185
+ }
186
+ }
187
+ return {
188
+ ok: false,
189
+ error: CandidApi.preEncounter.appointments.v1.get.Error._unknown(_response.error),
190
+ };
191
+ });
192
+ }
193
+ /**
194
+ * Gets an appointment along with it's full history. The return list is ordered by version ascending.
195
+ *
196
+ * @param {CandidApi.preEncounter.appointments.v1.AppointmentId} id
197
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
198
+ *
199
+ * @example
200
+ * await client.preEncounter.appointments.v1.getHistory(CandidApi.preEncounter.appointments.v1.AppointmentId("string"))
201
+ */
202
+ getHistory(id, requestOptions) {
203
+ var _a, _b;
204
+ return __awaiter(this, void 0, void 0, function* () {
205
+ const _response = yield core.fetcher({
206
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
207
+ .preEncounter, `/appointments/v1/${encodeURIComponent(serializers.preEncounter.appointments.v1.AppointmentId.jsonOrThrow(id))}/history`),
208
+ method: "GET",
209
+ headers: {
210
+ Authorization: yield this._getAuthorizationHeader(),
211
+ "X-Fern-Language": "JavaScript",
212
+ "X-Fern-SDK-Name": "candidhealth",
213
+ "X-Fern-SDK-Version": "0.28.0",
214
+ "X-Fern-Runtime": core.RUNTIME.type,
215
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
216
+ },
217
+ contentType: "application/json",
218
+ requestType: "json",
219
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
220
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
221
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
222
+ });
223
+ if (_response.ok) {
224
+ return {
225
+ ok: true,
226
+ body: serializers.preEncounter.appointments.v1.getHistory.Response.parseOrThrow(_response.body, {
227
+ unrecognizedObjectKeys: "passthrough",
228
+ allowUnrecognizedUnionMembers: true,
229
+ allowUnrecognizedEnumValues: true,
230
+ breadcrumbsPrefix: ["response"],
231
+ }),
232
+ };
233
+ }
234
+ if (_response.error.reason === "status-code") {
235
+ switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
236
+ case "NotFoundError":
237
+ return {
238
+ ok: false,
239
+ error: serializers.preEncounter.appointments.v1.getHistory.Error.parseOrThrow(_response.error.body, {
240
+ unrecognizedObjectKeys: "passthrough",
241
+ allowUnrecognizedUnionMembers: true,
242
+ allowUnrecognizedEnumValues: true,
243
+ breadcrumbsPrefix: ["response"],
244
+ }),
245
+ };
246
+ }
247
+ }
248
+ return {
249
+ ok: false,
250
+ error: CandidApi.preEncounter.appointments.v1.getHistory.Error._unknown(_response.error),
251
+ };
252
+ });
253
+ }
254
+ /**
255
+ * Updates an appointment. The path must contain the most recent version to prevent race conditions. Updating historic versions is not supported.
256
+ *
257
+ * @param {CandidApi.preEncounter.appointments.v1.AppointmentId} id
258
+ * @param {string} version
259
+ * @param {CandidApi.preEncounter.appointments.v1.MutableAppointment} request
260
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
261
+ *
262
+ * @example
263
+ * await client.preEncounter.appointments.v1.update(CandidApi.preEncounter.appointments.v1.AppointmentId("string"), "string", {
264
+ * patientId: CandidApi.preEncounter.patients.v1.PatientId("string"),
265
+ * checkedIn: true,
266
+ * assignedPatientLocation: "string",
267
+ * attendingDoctor: {},
268
+ * referringDoctor: {},
269
+ * startTimestamp: new Date("2024-01-15T09:30:00.000Z"),
270
+ * serviceDuration: 1,
271
+ * services: [{
272
+ * universalServiceIdentifier: CandidApi.preEncounter.appointments.v1.UniversalServiceIdentifier.MdVisit,
273
+ * startTimestamp: new Date("2024-01-15T09:30:00.000Z")
274
+ * }],
275
+ * placerAppointmentId: "string",
276
+ * appointmentReason: CandidApi.preEncounter.appointments.v1.AppointmentReason.Checkup,
277
+ * appointmentType: CandidApi.preEncounter.appointments.v1.AppointmentType.Complete,
278
+ * locationResourceId: "string",
279
+ * workQueue: CandidApi.preEncounter.appointments.v1.AppointmentWorkQueue.EmergentIssue
280
+ * })
281
+ */
282
+ update(id, version, request, requestOptions) {
283
+ var _a, _b;
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const _response = yield core.fetcher({
286
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
287
+ .preEncounter, `/appointments/v1/${encodeURIComponent(serializers.preEncounter.appointments.v1.AppointmentId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
288
+ method: "PUT",
289
+ headers: {
290
+ Authorization: yield this._getAuthorizationHeader(),
291
+ "X-Fern-Language": "JavaScript",
292
+ "X-Fern-SDK-Name": "candidhealth",
293
+ "X-Fern-SDK-Version": "0.28.0",
294
+ "X-Fern-Runtime": core.RUNTIME.type,
295
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
296
+ },
297
+ contentType: "application/json",
298
+ requestType: "json",
299
+ body: serializers.preEncounter.appointments.v1.MutableAppointment.jsonOrThrow(request, {
300
+ unrecognizedObjectKeys: "strip",
301
+ }),
302
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
303
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
304
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
305
+ });
306
+ if (_response.ok) {
307
+ return {
308
+ ok: true,
309
+ body: serializers.preEncounter.appointments.v1.Appointment.parseOrThrow(_response.body, {
310
+ unrecognizedObjectKeys: "passthrough",
311
+ allowUnrecognizedUnionMembers: true,
312
+ allowUnrecognizedEnumValues: true,
313
+ breadcrumbsPrefix: ["response"],
314
+ }),
315
+ };
316
+ }
317
+ if (_response.error.reason === "status-code") {
318
+ switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
319
+ case "NotFoundError":
320
+ case "VersionConflictError":
321
+ return {
322
+ ok: false,
323
+ error: serializers.preEncounter.appointments.v1.update.Error.parseOrThrow(_response.error.body, {
324
+ unrecognizedObjectKeys: "passthrough",
325
+ allowUnrecognizedUnionMembers: true,
326
+ allowUnrecognizedEnumValues: true,
327
+ breadcrumbsPrefix: ["response"],
328
+ }),
329
+ };
330
+ }
331
+ }
332
+ return {
333
+ ok: false,
334
+ error: CandidApi.preEncounter.appointments.v1.update.Error._unknown(_response.error),
335
+ };
336
+ });
337
+ }
338
+ /**
339
+ * Sets an appointment as deactivated. The path must contain the most recent version to prevent race conditions. Deactivating historic versions is not supported. Subsequent updates via PUT to the appointment will "reactivate" the appointment and set the deactivated flag to false.
340
+ *
341
+ * @param {CandidApi.preEncounter.appointments.v1.AppointmentId} id
342
+ * @param {string} version
343
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
344
+ *
345
+ * @example
346
+ * await client.preEncounter.appointments.v1.deactivate(CandidApi.preEncounter.appointments.v1.AppointmentId("string"), "string")
347
+ */
348
+ deactivate(id, version, requestOptions) {
349
+ var _a, _b;
350
+ return __awaiter(this, void 0, void 0, function* () {
351
+ const _response = yield core.fetcher({
352
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
353
+ .preEncounter, `/appointments/v1/${encodeURIComponent(serializers.preEncounter.appointments.v1.AppointmentId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
354
+ method: "DELETE",
355
+ headers: {
356
+ Authorization: yield this._getAuthorizationHeader(),
357
+ "X-Fern-Language": "JavaScript",
358
+ "X-Fern-SDK-Name": "candidhealth",
359
+ "X-Fern-SDK-Version": "0.28.0",
360
+ "X-Fern-Runtime": core.RUNTIME.type,
361
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
362
+ },
363
+ contentType: "application/json",
364
+ requestType: "json",
365
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
366
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
367
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
368
+ });
369
+ if (_response.ok) {
370
+ return {
371
+ ok: true,
372
+ body: undefined,
373
+ };
374
+ }
375
+ if (_response.error.reason === "status-code") {
376
+ switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
377
+ case "NotFoundError":
378
+ case "VersionConflictError":
379
+ return {
380
+ ok: false,
381
+ error: serializers.preEncounter.appointments.v1.deactivate.Error.parseOrThrow(_response.error.body, {
382
+ unrecognizedObjectKeys: "passthrough",
383
+ allowUnrecognizedUnionMembers: true,
384
+ allowUnrecognizedEnumValues: true,
385
+ breadcrumbsPrefix: ["response"],
386
+ }),
387
+ };
388
+ }
389
+ }
390
+ return {
391
+ ok: false,
392
+ error: CandidApi.preEncounter.appointments.v1.deactivate.Error._unknown(_response.error),
393
+ };
394
+ });
395
+ }
396
+ /**
397
+ * Searches for appointments that match the query parameters.
398
+ *
399
+ * @param {CandidApi.preEncounter.appointments.v1.AppointmentsSearchRequest} request
400
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
401
+ *
402
+ * @example
403
+ * await client.preEncounter.appointments.v1.getMulti({
404
+ * checkedIn: true,
405
+ * patientId: CandidApi.preEncounter.patients.v1.PatientId("string"),
406
+ * minStartTimestamp: new Date("2024-01-15T09:30:00.000Z"),
407
+ * maxStartTimestamp: new Date("2024-01-15T09:30:00.000Z"),
408
+ * placerAppointmentId: "string",
409
+ * workQueue: CandidApi.preEncounter.appointments.v1.AppointmentWorkQueue.EmergentIssue,
410
+ * sortField: CandidApi.preEncounter.appointments.v1.AppointmentSortField.StartTimestamp,
411
+ * sortDirection: CandidApi.preEncounter.SortDirection.Asc,
412
+ * limit: 1
413
+ * })
414
+ */
415
+ getMulti(request = {}, requestOptions) {
416
+ var _a;
417
+ return __awaiter(this, void 0, void 0, function* () {
418
+ const { checkedIn, patientId, minStartTimestamp, maxStartTimestamp, placerAppointmentId, workQueue, sortField, sortDirection, limit, } = request;
419
+ const _queryParams = {};
420
+ if (checkedIn != null) {
421
+ _queryParams["checked_in"] = checkedIn.toString();
422
+ }
423
+ if (patientId != null) {
424
+ _queryParams["patient_id"] = patientId;
425
+ }
426
+ if (minStartTimestamp != null) {
427
+ _queryParams["min_start_timestamp"] = minStartTimestamp.toISOString();
428
+ }
429
+ if (maxStartTimestamp != null) {
430
+ _queryParams["max_start_timestamp"] = maxStartTimestamp.toISOString();
431
+ }
432
+ if (placerAppointmentId != null) {
433
+ _queryParams["placer_appointment_id"] = placerAppointmentId;
434
+ }
435
+ if (workQueue != null) {
436
+ _queryParams["work_queue"] = workQueue;
437
+ }
438
+ if (sortField != null) {
439
+ _queryParams["sort_field"] = sortField;
440
+ }
441
+ if (sortDirection != null) {
442
+ _queryParams["sort_direction"] = sortDirection;
443
+ }
444
+ if (limit != null) {
445
+ _queryParams["limit"] = limit.toString();
446
+ }
447
+ const _response = yield core.fetcher({
448
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
449
+ .preEncounter, "/appointments/v1"),
450
+ method: "GET",
451
+ headers: {
452
+ Authorization: yield this._getAuthorizationHeader(),
453
+ "X-Fern-Language": "JavaScript",
454
+ "X-Fern-SDK-Name": "candidhealth",
455
+ "X-Fern-SDK-Version": "0.28.0",
456
+ "X-Fern-Runtime": core.RUNTIME.type,
457
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
458
+ },
459
+ contentType: "application/json",
460
+ queryParameters: _queryParams,
461
+ requestType: "json",
462
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
463
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
464
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
465
+ });
466
+ if (_response.ok) {
467
+ return {
468
+ ok: true,
469
+ body: serializers.preEncounter.appointments.v1.getMulti.Response.parseOrThrow(_response.body, {
470
+ unrecognizedObjectKeys: "passthrough",
471
+ allowUnrecognizedUnionMembers: true,
472
+ allowUnrecognizedEnumValues: true,
473
+ breadcrumbsPrefix: ["response"],
474
+ }),
475
+ };
476
+ }
477
+ return {
478
+ ok: false,
479
+ error: CandidApi.preEncounter.appointments.v1.getMulti.Error._unknown(_response.error),
480
+ };
481
+ });
482
+ }
483
+ _getAuthorizationHeader() {
484
+ return __awaiter(this, void 0, void 0, function* () {
485
+ const bearer = yield core.Supplier.get(this._options.token);
486
+ if (bearer != null) {
487
+ return `Bearer ${bearer}`;
488
+ }
489
+ return undefined;
490
+ });
491
+ }
492
+ }
493
+ exports.V1 = V1;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../../../../../../index";
5
+ import * as core from "../../../../../../../../core";
6
+ export declare type Error = CandidApi.preEncounter.appointments.v1.create.Error.VersionConflictError | CandidApi.preEncounter.appointments.v1.create.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface VersionConflictError extends _Utils {
9
+ errorName: "VersionConflictError";
10
+ content: CandidApi.preEncounter.VersionConflictErrorBody;
11
+ }
12
+ interface _Unknown extends _Utils {
13
+ errorName: void;
14
+ content: core.Fetcher.Error;
15
+ }
16
+ interface _Utils {
17
+ _visit: <_Result>(visitor: CandidApi.preEncounter.appointments.v1.create.Error._Visitor<_Result>) => _Result;
18
+ }
19
+ interface _Visitor<_Result> {
20
+ versionConflictError: (value: CandidApi.preEncounter.VersionConflictErrorBody) => _Result;
21
+ _other: (value: core.Fetcher.Error) => _Result;
22
+ }
23
+ }
24
+ export declare const Error: {
25
+ readonly versionConflictError: (value: CandidApi.preEncounter.VersionConflictErrorBody) => CandidApi.preEncounter.appointments.v1.create.Error.VersionConflictError;
26
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.preEncounter.appointments.v1.create.Error._Unknown;
27
+ readonly _visit: <_Result>(value: CandidApi.preEncounter.appointments.v1.create.Error, visitor: CandidApi.preEncounter.appointments.v1.create.Error._Visitor<_Result>) => _Result;
28
+ };
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.Error = void 0;
30
+ const CandidApi = __importStar(require("../../../../../../../index"));
31
+ exports.Error = {
32
+ versionConflictError: (value) => {
33
+ return {
34
+ content: value,
35
+ errorName: "VersionConflictError",
36
+ _visit: function (visitor) {
37
+ return CandidApi.preEncounter.appointments.v1.create.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
41
+ _unknown: (fetcherError) => {
42
+ return {
43
+ errorName: undefined,
44
+ content: fetcherError,
45
+ _visit: function (visitor) {
46
+ return CandidApi.preEncounter.appointments.v1.create.Error._visit(this, visitor);
47
+ },
48
+ };
49
+ },
50
+ _visit: (value, visitor) => {
51
+ switch (value.errorName) {
52
+ case "VersionConflictError":
53
+ return visitor.versionConflictError(value.content);
54
+ default:
55
+ return visitor._other(value);
56
+ }
57
+ },
58
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../../../../../../index";
5
+ import * as core from "../../../../../../../../core";
6
+ export declare type Error = CandidApi.preEncounter.appointments.v1.deactivate.Error.NotFoundError | CandidApi.preEncounter.appointments.v1.deactivate.Error.VersionConflictError | CandidApi.preEncounter.appointments.v1.deactivate.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface NotFoundError extends _Utils {
9
+ errorName: "NotFoundError";
10
+ content: CandidApi.preEncounter.NotFoundErrorBody;
11
+ }
12
+ interface VersionConflictError extends _Utils {
13
+ errorName: "VersionConflictError";
14
+ content: CandidApi.preEncounter.VersionConflictErrorBody;
15
+ }
16
+ interface _Unknown extends _Utils {
17
+ errorName: void;
18
+ content: core.Fetcher.Error;
19
+ }
20
+ interface _Utils {
21
+ _visit: <_Result>(visitor: CandidApi.preEncounter.appointments.v1.deactivate.Error._Visitor<_Result>) => _Result;
22
+ }
23
+ interface _Visitor<_Result> {
24
+ notFoundError: (value: CandidApi.preEncounter.NotFoundErrorBody) => _Result;
25
+ versionConflictError: (value: CandidApi.preEncounter.VersionConflictErrorBody) => _Result;
26
+ _other: (value: core.Fetcher.Error) => _Result;
27
+ }
28
+ }
29
+ export declare const Error: {
30
+ readonly notFoundError: (value: CandidApi.preEncounter.NotFoundErrorBody) => CandidApi.preEncounter.appointments.v1.deactivate.Error.NotFoundError;
31
+ readonly versionConflictError: (value: CandidApi.preEncounter.VersionConflictErrorBody) => CandidApi.preEncounter.appointments.v1.deactivate.Error.VersionConflictError;
32
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.preEncounter.appointments.v1.deactivate.Error._Unknown;
33
+ readonly _visit: <_Result>(value: CandidApi.preEncounter.appointments.v1.deactivate.Error, visitor: CandidApi.preEncounter.appointments.v1.deactivate.Error._Visitor<_Result>) => _Result;
34
+ };