candidhealth 0.35.2 → 0.35.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) 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/contracts/resources/v2/client/Client.js +5 -5
  4. package/api/resources/credentialing/resources/v2/client/Client.js +5 -5
  5. package/api/resources/customSchemas/resources/v1/client/Client.js +4 -4
  6. package/api/resources/diagnoses/client/Client.js +3 -3
  7. package/api/resources/eligibility/resources/v2/client/Client.js +3 -3
  8. package/api/resources/encounterProviders/resources/v2/client/Client.js +12 -12
  9. package/api/resources/encounters/resources/v4/client/Client.js +5 -5
  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/insuranceAdjudications/resources/v1/client/Client.js +3 -3
  18. package/api/resources/insurancePayments/resources/v1/client/Client.js +5 -5
  19. package/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
  20. package/api/resources/medicationDispense/resources/v1/client/Client.js +1 -1
  21. package/api/resources/nonInsurancePayerPayments/resources/v1/client/Client.js +5 -5
  22. package/api/resources/nonInsurancePayerRefunds/resources/v1/client/Client.js +5 -5
  23. package/api/resources/nonInsurancePayers/resources/v1/client/Client.js +6 -6
  24. package/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
  25. package/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +5 -5
  26. package/api/resources/patientPayments/resources/v4/client/Client.js +5 -5
  27. package/api/resources/patientRefunds/resources/v1/client/Client.js +5 -5
  28. package/api/resources/payers/resources/v3/client/Client.js +2 -2
  29. package/api/resources/preEncounter/client/Client.d.ts +6 -0
  30. package/api/resources/preEncounter/client/Client.js +12 -2
  31. package/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.js +6 -6
  32. package/api/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +1 -10
  33. package/api/resources/preEncounter/resources/common/types/BaseModel.d.ts +15 -0
  34. package/api/resources/preEncounter/resources/common/types/BaseModel.js +5 -0
  35. package/api/resources/preEncounter/resources/common/types/NoteId.d.ts +11 -0
  36. package/api/resources/preEncounter/resources/common/types/NoteId.js +10 -0
  37. package/api/resources/preEncounter/resources/common/types/TagId.d.ts +11 -0
  38. package/api/resources/preEncounter/resources/common/types/TagId.js +10 -0
  39. package/api/resources/preEncounter/resources/common/types/index.d.ts +3 -0
  40. package/api/resources/preEncounter/resources/common/types/index.js +3 -0
  41. package/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.js +8 -8
  42. package/api/resources/preEncounter/resources/coverages/resources/v1/types/Coverage.d.ts +1 -10
  43. package/api/resources/preEncounter/resources/index.d.ts +2 -0
  44. package/api/resources/preEncounter/resources/index.js +3 -1
  45. package/api/resources/preEncounter/resources/lists/resources/v1/client/Client.js +2 -2
  46. package/api/resources/preEncounter/resources/lists/resources/v1/types/FilterQueryString.d.ts +1 -1
  47. package/api/resources/preEncounter/resources/notes/client/Client.d.ts +26 -0
  48. package/api/resources/preEncounter/resources/notes/client/Client.js +17 -0
  49. package/api/resources/preEncounter/resources/notes/client/index.d.ts +1 -0
  50. package/api/resources/preEncounter/resources/notes/client/index.js +2 -0
  51. package/api/resources/preEncounter/resources/notes/index.d.ts +2 -0
  52. package/api/resources/preEncounter/resources/notes/index.js +18 -0
  53. package/api/resources/preEncounter/resources/notes/resources/index.d.ts +1 -0
  54. package/api/resources/preEncounter/resources/notes/resources/index.js +27 -0
  55. package/api/resources/preEncounter/resources/notes/resources/v1/client/Client.d.ts +76 -0
  56. package/api/resources/preEncounter/resources/notes/resources/v1/client/Client.js +261 -0
  57. package/api/resources/preEncounter/resources/notes/resources/v1/client/create.d.ts +22 -0
  58. package/api/resources/preEncounter/resources/notes/resources/v1/client/create.js +47 -0
  59. package/api/resources/preEncounter/resources/notes/resources/v1/client/deactivate.d.ts +22 -0
  60. package/api/resources/preEncounter/resources/notes/resources/v1/client/deactivate.js +47 -0
  61. package/api/resources/preEncounter/resources/notes/resources/v1/client/get.d.ts +22 -0
  62. package/api/resources/preEncounter/resources/notes/resources/v1/client/get.js +47 -0
  63. package/api/resources/preEncounter/resources/notes/resources/v1/client/index.d.ts +4 -0
  64. package/api/resources/preEncounter/resources/notes/resources/v1/client/index.js +30 -0
  65. package/api/resources/preEncounter/resources/notes/resources/v1/client/update.d.ts +22 -0
  66. package/api/resources/preEncounter/resources/notes/resources/v1/client/update.js +47 -0
  67. package/api/resources/preEncounter/resources/notes/resources/v1/index.d.ts +2 -0
  68. package/api/resources/preEncounter/resources/notes/resources/v1/index.js +18 -0
  69. package/api/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.d.ts +11 -0
  70. package/api/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.js +5 -0
  71. package/api/resources/preEncounter/resources/notes/resources/v1/types/Note.d.ts +11 -0
  72. package/api/resources/preEncounter/resources/notes/resources/v1/types/Note.js +5 -0
  73. package/api/resources/preEncounter/resources/notes/resources/v1/types/index.d.ts +2 -0
  74. package/api/resources/preEncounter/resources/notes/resources/v1/types/index.js +18 -0
  75. package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +9 -3
  76. package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.js +18 -12
  77. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/CreatePatientRequest.d.ts +3 -1
  78. package/api/resources/preEncounter/resources/patients/resources/v1/client/requests/CreatePatientWithMrnRequest.d.ts +3 -1
  79. package/api/resources/preEncounter/resources/patients/resources/v1/types/MutablePatient.d.ts +2 -0
  80. package/api/resources/preEncounter/resources/patients/resources/v1/types/Patient.d.ts +1 -10
  81. package/api/resources/preEncounter/resources/tags/client/Client.d.ts +26 -0
  82. package/api/resources/preEncounter/resources/tags/client/Client.js +17 -0
  83. package/api/resources/preEncounter/resources/tags/client/index.d.ts +1 -0
  84. package/api/resources/preEncounter/resources/tags/client/index.js +2 -0
  85. package/api/resources/preEncounter/resources/tags/index.d.ts +2 -0
  86. package/api/resources/preEncounter/resources/tags/index.js +18 -0
  87. package/api/resources/preEncounter/resources/tags/resources/index.d.ts +1 -0
  88. package/api/resources/preEncounter/resources/tags/resources/index.js +27 -0
  89. package/api/resources/preEncounter/resources/tags/resources/v1/client/Client.d.ts +85 -0
  90. package/api/resources/preEncounter/resources/tags/resources/v1/client/Client.js +312 -0
  91. package/api/resources/preEncounter/resources/tags/resources/v1/client/create.d.ts +22 -0
  92. package/api/resources/preEncounter/resources/tags/resources/v1/client/create.js +47 -0
  93. package/api/resources/preEncounter/resources/tags/resources/v1/client/deactivate.d.ts +22 -0
  94. package/api/resources/preEncounter/resources/tags/resources/v1/client/deactivate.js +47 -0
  95. package/api/resources/preEncounter/resources/tags/resources/v1/client/get.d.ts +22 -0
  96. package/api/resources/preEncounter/resources/tags/resources/v1/client/get.js +47 -0
  97. package/api/resources/preEncounter/resources/tags/resources/v1/client/getAll.d.ts +22 -0
  98. package/api/resources/preEncounter/resources/tags/resources/v1/client/getAll.js +47 -0
  99. package/api/resources/preEncounter/resources/tags/resources/v1/client/index.d.ts +6 -0
  100. package/api/resources/preEncounter/resources/tags/resources/v1/client/index.js +35 -0
  101. package/api/resources/preEncounter/resources/tags/resources/v1/client/requests/GetAllTagsRequest.d.ts +15 -0
  102. package/api/resources/preEncounter/resources/tags/resources/v1/client/requests/GetAllTagsRequest.js +5 -0
  103. package/api/resources/preEncounter/resources/tags/resources/v1/client/requests/index.d.ts +1 -0
  104. package/api/resources/preEncounter/resources/tags/resources/v1/client/requests/index.js +2 -0
  105. package/api/resources/preEncounter/resources/tags/resources/v1/client/update.d.ts +22 -0
  106. package/api/resources/preEncounter/resources/tags/resources/v1/client/update.js +47 -0
  107. package/api/resources/preEncounter/resources/tags/resources/v1/index.d.ts +2 -0
  108. package/api/resources/preEncounter/resources/tags/resources/v1/index.js +18 -0
  109. package/api/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.d.ts +9 -0
  110. package/api/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.js +5 -0
  111. package/api/resources/preEncounter/resources/tags/resources/v1/types/Tag.d.ts +10 -0
  112. package/api/resources/preEncounter/resources/tags/resources/v1/types/Tag.js +5 -0
  113. package/api/resources/preEncounter/resources/tags/resources/v1/types/TagPage.d.ts +7 -0
  114. package/api/resources/preEncounter/resources/tags/resources/v1/types/TagPage.js +5 -0
  115. package/api/resources/preEncounter/resources/tags/resources/v1/types/index.d.ts +3 -0
  116. package/api/resources/preEncounter/resources/tags/resources/v1/types/index.js +19 -0
  117. package/api/resources/serviceFacility/client/Client.js +1 -1
  118. package/api/resources/serviceLines/resources/v2/client/Client.js +3 -3
  119. package/api/resources/tasks/resources/v3/client/Client.js +5 -5
  120. package/api/resources/writeOffs/resources/v1/client/Client.js +4 -4
  121. package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
  122. package/dist/api/resources/billingNotes/resources/v2/client/Client.js +1 -1
  123. package/dist/api/resources/contracts/resources/v2/client/Client.js +5 -5
  124. package/dist/api/resources/credentialing/resources/v2/client/Client.js +5 -5
  125. package/dist/api/resources/customSchemas/resources/v1/client/Client.js +4 -4
  126. package/dist/api/resources/diagnoses/client/Client.js +3 -3
  127. package/dist/api/resources/eligibility/resources/v2/client/Client.js +3 -3
  128. package/dist/api/resources/encounterProviders/resources/v2/client/Client.js +12 -12
  129. package/dist/api/resources/encounters/resources/v4/client/Client.js +5 -5
  130. package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
  131. package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +2 -2
  132. package/dist/api/resources/exports/resources/v3/client/Client.js +1 -1
  133. package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +1 -1
  134. package/dist/api/resources/feeSchedules/resources/v3/client/Client.js +10 -10
  135. package/dist/api/resources/guarantor/resources/v1/client/Client.js +3 -3
  136. package/dist/api/resources/importInvoice/resources/v1/client/Client.js +4 -4
  137. package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
  138. package/dist/api/resources/insurancePayments/resources/v1/client/Client.js +5 -5
  139. package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
  140. package/dist/api/resources/medicationDispense/resources/v1/client/Client.js +1 -1
  141. package/dist/api/resources/nonInsurancePayerPayments/resources/v1/client/Client.js +5 -5
  142. package/dist/api/resources/nonInsurancePayerRefunds/resources/v1/client/Client.js +5 -5
  143. package/dist/api/resources/nonInsurancePayers/resources/v1/client/Client.js +6 -6
  144. package/dist/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
  145. package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +5 -5
  146. package/dist/api/resources/patientPayments/resources/v4/client/Client.js +5 -5
  147. package/dist/api/resources/patientRefunds/resources/v1/client/Client.js +5 -5
  148. package/dist/api/resources/payers/resources/v3/client/Client.js +2 -2
  149. package/dist/api/resources/preEncounter/client/Client.d.ts +6 -0
  150. package/dist/api/resources/preEncounter/client/Client.js +12 -2
  151. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.js +6 -6
  152. package/dist/api/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +1 -10
  153. package/dist/api/resources/preEncounter/resources/common/types/BaseModel.d.ts +15 -0
  154. package/dist/api/resources/preEncounter/resources/common/types/BaseModel.js +5 -0
  155. package/dist/api/resources/preEncounter/resources/common/types/NoteId.d.ts +11 -0
  156. package/dist/api/resources/preEncounter/resources/common/types/NoteId.js +10 -0
  157. package/dist/api/resources/preEncounter/resources/common/types/TagId.d.ts +11 -0
  158. package/dist/api/resources/preEncounter/resources/common/types/TagId.js +10 -0
  159. package/dist/api/resources/preEncounter/resources/common/types/index.d.ts +3 -0
  160. package/dist/api/resources/preEncounter/resources/common/types/index.js +3 -0
  161. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.js +8 -8
  162. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/types/Coverage.d.ts +1 -10
  163. package/dist/api/resources/preEncounter/resources/index.d.ts +2 -0
  164. package/dist/api/resources/preEncounter/resources/index.js +3 -1
  165. package/dist/api/resources/preEncounter/resources/lists/resources/v1/client/Client.js +2 -2
  166. package/dist/api/resources/preEncounter/resources/lists/resources/v1/types/FilterQueryString.d.ts +1 -1
  167. package/dist/api/resources/preEncounter/resources/notes/client/Client.d.ts +26 -0
  168. package/dist/api/resources/preEncounter/resources/notes/client/Client.js +17 -0
  169. package/dist/api/resources/preEncounter/resources/notes/client/index.d.ts +1 -0
  170. package/dist/api/resources/preEncounter/resources/notes/client/index.js +2 -0
  171. package/dist/api/resources/preEncounter/resources/notes/index.d.ts +2 -0
  172. package/dist/api/resources/preEncounter/resources/notes/index.js +18 -0
  173. package/dist/api/resources/preEncounter/resources/notes/resources/index.d.ts +1 -0
  174. package/dist/api/resources/preEncounter/resources/notes/resources/index.js +27 -0
  175. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/Client.d.ts +76 -0
  176. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/Client.js +261 -0
  177. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/create.d.ts +22 -0
  178. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/create.js +47 -0
  179. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/deactivate.d.ts +22 -0
  180. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/deactivate.js +47 -0
  181. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/get.d.ts +22 -0
  182. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/get.js +47 -0
  183. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/index.d.ts +4 -0
  184. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/index.js +30 -0
  185. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/update.d.ts +22 -0
  186. package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/update.js +47 -0
  187. package/dist/api/resources/preEncounter/resources/notes/resources/v1/index.d.ts +2 -0
  188. package/dist/api/resources/preEncounter/resources/notes/resources/v1/index.js +18 -0
  189. package/dist/api/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.d.ts +11 -0
  190. package/dist/api/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.js +5 -0
  191. package/dist/api/resources/preEncounter/resources/notes/resources/v1/types/Note.d.ts +11 -0
  192. package/dist/api/resources/preEncounter/resources/notes/resources/v1/types/Note.js +5 -0
  193. package/dist/api/resources/preEncounter/resources/notes/resources/v1/types/index.d.ts +2 -0
  194. package/dist/api/resources/preEncounter/resources/notes/resources/v1/types/index.js +18 -0
  195. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +9 -3
  196. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.js +18 -12
  197. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/CreatePatientRequest.d.ts +3 -1
  198. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/requests/CreatePatientWithMrnRequest.d.ts +3 -1
  199. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/MutablePatient.d.ts +2 -0
  200. package/dist/api/resources/preEncounter/resources/patients/resources/v1/types/Patient.d.ts +1 -10
  201. package/dist/api/resources/preEncounter/resources/tags/client/Client.d.ts +26 -0
  202. package/dist/api/resources/preEncounter/resources/tags/client/Client.js +17 -0
  203. package/dist/api/resources/preEncounter/resources/tags/client/index.d.ts +1 -0
  204. package/dist/api/resources/preEncounter/resources/tags/client/index.js +2 -0
  205. package/dist/api/resources/preEncounter/resources/tags/index.d.ts +2 -0
  206. package/dist/api/resources/preEncounter/resources/tags/index.js +18 -0
  207. package/dist/api/resources/preEncounter/resources/tags/resources/index.d.ts +1 -0
  208. package/dist/api/resources/preEncounter/resources/tags/resources/index.js +27 -0
  209. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/Client.d.ts +85 -0
  210. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/Client.js +312 -0
  211. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/create.d.ts +22 -0
  212. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/create.js +47 -0
  213. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/deactivate.d.ts +22 -0
  214. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/deactivate.js +47 -0
  215. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/get.d.ts +22 -0
  216. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/get.js +47 -0
  217. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/getAll.d.ts +22 -0
  218. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/getAll.js +47 -0
  219. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/index.d.ts +6 -0
  220. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/index.js +35 -0
  221. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/requests/GetAllTagsRequest.d.ts +15 -0
  222. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/requests/GetAllTagsRequest.js +5 -0
  223. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/requests/index.d.ts +1 -0
  224. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/requests/index.js +2 -0
  225. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/update.d.ts +22 -0
  226. package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/update.js +47 -0
  227. package/dist/api/resources/preEncounter/resources/tags/resources/v1/index.d.ts +2 -0
  228. package/dist/api/resources/preEncounter/resources/tags/resources/v1/index.js +18 -0
  229. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.d.ts +9 -0
  230. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.js +5 -0
  231. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/Tag.d.ts +10 -0
  232. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/Tag.js +5 -0
  233. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/TagPage.d.ts +7 -0
  234. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/TagPage.js +5 -0
  235. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/index.d.ts +3 -0
  236. package/dist/api/resources/preEncounter/resources/tags/resources/v1/types/index.js +19 -0
  237. package/dist/api/resources/serviceFacility/client/Client.js +1 -1
  238. package/dist/api/resources/serviceLines/resources/v2/client/Client.js +3 -3
  239. package/dist/api/resources/tasks/resources/v3/client/Client.js +5 -5
  240. package/dist/api/resources/writeOffs/resources/v1/client/Client.js +4 -4
  241. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +2 -8
  242. package/dist/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.js +2 -7
  243. package/dist/serialization/resources/preEncounter/resources/common/types/BaseModel.d.ts +18 -0
  244. package/dist/serialization/resources/preEncounter/resources/common/types/BaseModel.js +39 -0
  245. package/dist/serialization/resources/preEncounter/resources/common/types/NoteId.d.ts +10 -0
  246. package/dist/serialization/resources/preEncounter/resources/common/types/NoteId.js +35 -0
  247. package/dist/serialization/resources/preEncounter/resources/common/types/TagId.d.ts +10 -0
  248. package/dist/serialization/resources/preEncounter/resources/common/types/TagId.js +35 -0
  249. package/dist/serialization/resources/preEncounter/resources/common/types/index.d.ts +3 -0
  250. package/dist/serialization/resources/preEncounter/resources/common/types/index.js +3 -0
  251. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/Coverage.d.ts +2 -8
  252. package/dist/serialization/resources/preEncounter/resources/coverages/resources/v1/types/Coverage.js +2 -7
  253. package/dist/serialization/resources/preEncounter/resources/index.d.ts +2 -0
  254. package/dist/serialization/resources/preEncounter/resources/index.js +3 -1
  255. package/dist/serialization/resources/preEncounter/resources/notes/index.d.ts +1 -0
  256. package/dist/serialization/resources/preEncounter/resources/notes/index.js +17 -0
  257. package/dist/serialization/resources/preEncounter/resources/notes/resources/index.d.ts +1 -0
  258. package/dist/serialization/resources/preEncounter/resources/notes/resources/index.js +27 -0
  259. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/index.d.ts +1 -0
  260. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/index.js +17 -0
  261. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.d.ts +14 -0
  262. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.js +35 -0
  263. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/types/Note.d.ts +16 -0
  264. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/types/Note.js +40 -0
  265. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/types/index.d.ts +2 -0
  266. package/dist/serialization/resources/preEncounter/resources/notes/resources/v1/types/index.js +18 -0
  267. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/MutablePatient.d.ts +4 -0
  268. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/MutablePatient.js +4 -0
  269. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/Patient.d.ts +2 -8
  270. package/dist/serialization/resources/preEncounter/resources/patients/resources/v1/types/Patient.js +2 -7
  271. package/dist/serialization/resources/preEncounter/resources/tags/index.d.ts +1 -0
  272. package/dist/serialization/resources/preEncounter/resources/tags/index.js +17 -0
  273. package/dist/serialization/resources/preEncounter/resources/tags/resources/index.d.ts +1 -0
  274. package/dist/serialization/resources/preEncounter/resources/tags/resources/index.js +27 -0
  275. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/index.d.ts +1 -0
  276. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/index.js +17 -0
  277. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.d.ts +12 -0
  278. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.js +33 -0
  279. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/Tag.d.ts +15 -0
  280. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/Tag.js +39 -0
  281. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/TagPage.d.ts +14 -0
  282. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/TagPage.js +37 -0
  283. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/index.d.ts +3 -0
  284. package/dist/serialization/resources/preEncounter/resources/tags/resources/v1/types/index.js +19 -0
  285. package/package.json +1 -1
  286. package/reference.md +1225 -585
  287. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.d.ts +2 -8
  288. package/serialization/resources/preEncounter/resources/appointments/resources/v1/types/Appointment.js +2 -7
  289. package/serialization/resources/preEncounter/resources/common/types/BaseModel.d.ts +18 -0
  290. package/serialization/resources/preEncounter/resources/common/types/BaseModel.js +39 -0
  291. package/serialization/resources/preEncounter/resources/common/types/NoteId.d.ts +10 -0
  292. package/serialization/resources/preEncounter/resources/common/types/NoteId.js +35 -0
  293. package/serialization/resources/preEncounter/resources/common/types/TagId.d.ts +10 -0
  294. package/serialization/resources/preEncounter/resources/common/types/TagId.js +35 -0
  295. package/serialization/resources/preEncounter/resources/common/types/index.d.ts +3 -0
  296. package/serialization/resources/preEncounter/resources/common/types/index.js +3 -0
  297. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/Coverage.d.ts +2 -8
  298. package/serialization/resources/preEncounter/resources/coverages/resources/v1/types/Coverage.js +2 -7
  299. package/serialization/resources/preEncounter/resources/index.d.ts +2 -0
  300. package/serialization/resources/preEncounter/resources/index.js +3 -1
  301. package/serialization/resources/preEncounter/resources/notes/index.d.ts +1 -0
  302. package/serialization/resources/preEncounter/resources/notes/index.js +17 -0
  303. package/serialization/resources/preEncounter/resources/notes/resources/index.d.ts +1 -0
  304. package/serialization/resources/preEncounter/resources/notes/resources/index.js +27 -0
  305. package/serialization/resources/preEncounter/resources/notes/resources/v1/index.d.ts +1 -0
  306. package/serialization/resources/preEncounter/resources/notes/resources/v1/index.js +17 -0
  307. package/serialization/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.d.ts +14 -0
  308. package/serialization/resources/preEncounter/resources/notes/resources/v1/types/MutableNote.js +35 -0
  309. package/serialization/resources/preEncounter/resources/notes/resources/v1/types/Note.d.ts +16 -0
  310. package/serialization/resources/preEncounter/resources/notes/resources/v1/types/Note.js +40 -0
  311. package/serialization/resources/preEncounter/resources/notes/resources/v1/types/index.d.ts +2 -0
  312. package/serialization/resources/preEncounter/resources/notes/resources/v1/types/index.js +18 -0
  313. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/MutablePatient.d.ts +4 -0
  314. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/MutablePatient.js +4 -0
  315. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/Patient.d.ts +2 -8
  316. package/serialization/resources/preEncounter/resources/patients/resources/v1/types/Patient.js +2 -7
  317. package/serialization/resources/preEncounter/resources/tags/index.d.ts +1 -0
  318. package/serialization/resources/preEncounter/resources/tags/index.js +17 -0
  319. package/serialization/resources/preEncounter/resources/tags/resources/index.d.ts +1 -0
  320. package/serialization/resources/preEncounter/resources/tags/resources/index.js +27 -0
  321. package/serialization/resources/preEncounter/resources/tags/resources/v1/index.d.ts +1 -0
  322. package/serialization/resources/preEncounter/resources/tags/resources/v1/index.js +17 -0
  323. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.d.ts +12 -0
  324. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/MutableTag.js +33 -0
  325. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/Tag.d.ts +15 -0
  326. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/Tag.js +39 -0
  327. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/TagPage.d.ts +14 -0
  328. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/TagPage.js +37 -0
  329. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/index.d.ts +3 -0
  330. package/serialization/resources/preEncounter/resources/tags/resources/v1/types/index.js +19 -0
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1 @@
1
+ export * as v1 from "./v1";
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.v1 = void 0;
27
+ exports.v1 = __importStar(require("./v1"));
@@ -0,0 +1,85 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../../../environments";
5
+ import * as core from "../../../../../../../../core";
6
+ import * as CandidApi from "../../../../../../../index";
7
+ export declare namespace V1 {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.CandidApiEnvironment | environments.CandidApiEnvironmentUrls>;
10
+ token?: core.Supplier<core.BearerToken | undefined>;
11
+ }
12
+ interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
14
+ timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
16
+ maxRetries?: number;
17
+ /** A hook to abort the request. */
18
+ abortSignal?: AbortSignal;
19
+ }
20
+ }
21
+ export declare class V1 {
22
+ protected readonly _options: V1.Options;
23
+ constructor(_options?: V1.Options);
24
+ /**
25
+ * Gets a tag by TagId.
26
+ *
27
+ * @param {CandidApi.preEncounter.TagId} id
28
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @example
31
+ * await client.preEncounter.tags.v1.get(CandidApi.preEncounter.TagId("string"))
32
+ */
33
+ get(id: CandidApi.preEncounter.TagId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.preEncounter.tags.v1.Tag, CandidApi.preEncounter.tags.v1.get.Error>>;
34
+ /**
35
+ * Gets all tags. Defaults to page size of 1000.
36
+ *
37
+ * @param {CandidApi.preEncounter.tags.v1.GetAllTagsRequest} request
38
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @example
41
+ * await client.preEncounter.tags.v1.getAll({
42
+ * limit: 1,
43
+ * pageToken: CandidApi.preEncounter.PageToken("string")
44
+ * })
45
+ */
46
+ getAll(request?: CandidApi.preEncounter.tags.v1.GetAllTagsRequest, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.preEncounter.tags.v1.TagPage, CandidApi.preEncounter.tags.v1.getAll.Error>>;
47
+ /**
48
+ * Adds a new tag if it does not already exist, otherwise, returns the existing tag.
49
+ *
50
+ * @param {CandidApi.preEncounter.tags.v1.MutableTag} request
51
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
53
+ * @example
54
+ * await client.preEncounter.tags.v1.create({
55
+ * value: "string"
56
+ * })
57
+ */
58
+ create(request: CandidApi.preEncounter.tags.v1.MutableTag, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.preEncounter.tags.v1.Tag, CandidApi.preEncounter.tags.v1.create.Error>>;
59
+ /**
60
+ * Updates a tag. The path must contain the most recent version to prevent races.
61
+ *
62
+ * @param {CandidApi.preEncounter.TagId} id
63
+ * @param {string} version
64
+ * @param {CandidApi.preEncounter.tags.v1.MutableTag} request
65
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @example
68
+ * await client.preEncounter.tags.v1.update(CandidApi.preEncounter.TagId("string"), "string", {
69
+ * value: "string"
70
+ * })
71
+ */
72
+ update(id: CandidApi.preEncounter.TagId, version: string, request: CandidApi.preEncounter.tags.v1.MutableTag, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.preEncounter.tags.v1.Tag, CandidApi.preEncounter.tags.v1.update.Error>>;
73
+ /**
74
+ * Sets a tag as deactivated. The path must contain the most recent version to prevent races.
75
+ *
76
+ * @param {CandidApi.preEncounter.TagId} id
77
+ * @param {string} version
78
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
79
+ *
80
+ * @example
81
+ * await client.preEncounter.tags.v1.deactivate(CandidApi.preEncounter.TagId("string"), "string")
82
+ */
83
+ deactivate(id: CandidApi.preEncounter.TagId, version: string, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<void, CandidApi.preEncounter.tags.v1.deactivate.Error>>;
84
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
85
+ }
@@ -0,0 +1,312 @@
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
+ * Gets a tag by TagId.
53
+ *
54
+ * @param {CandidApi.preEncounter.TagId} id
55
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @example
58
+ * await client.preEncounter.tags.v1.get(CandidApi.preEncounter.TagId("string"))
59
+ */
60
+ get(id, requestOptions) {
61
+ var _a;
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const _response = yield core.fetcher({
64
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
65
+ .preEncounter, `/tags/v1/${encodeURIComponent(serializers.preEncounter.TagId.jsonOrThrow(id))}`),
66
+ method: "GET",
67
+ headers: {
68
+ Authorization: yield this._getAuthorizationHeader(),
69
+ "X-Fern-Language": "JavaScript",
70
+ "X-Fern-SDK-Name": "candidhealth",
71
+ "X-Fern-SDK-Version": "0.35.3",
72
+ "X-Fern-Runtime": core.RUNTIME.type,
73
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
74
+ },
75
+ contentType: "application/json",
76
+ requestType: "json",
77
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
78
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
79
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
80
+ });
81
+ if (_response.ok) {
82
+ return {
83
+ ok: true,
84
+ body: serializers.preEncounter.tags.v1.Tag.parseOrThrow(_response.body, {
85
+ unrecognizedObjectKeys: "passthrough",
86
+ allowUnrecognizedUnionMembers: true,
87
+ allowUnrecognizedEnumValues: true,
88
+ breadcrumbsPrefix: ["response"],
89
+ }),
90
+ };
91
+ }
92
+ return {
93
+ ok: false,
94
+ error: CandidApi.preEncounter.tags.v1.get.Error._unknown(_response.error),
95
+ };
96
+ });
97
+ }
98
+ /**
99
+ * Gets all tags. Defaults to page size of 1000.
100
+ *
101
+ * @param {CandidApi.preEncounter.tags.v1.GetAllTagsRequest} request
102
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
103
+ *
104
+ * @example
105
+ * await client.preEncounter.tags.v1.getAll({
106
+ * limit: 1,
107
+ * pageToken: CandidApi.preEncounter.PageToken("string")
108
+ * })
109
+ */
110
+ getAll(request = {}, requestOptions) {
111
+ var _a;
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const { limit, pageToken } = request;
114
+ const _queryParams = {};
115
+ if (limit != null) {
116
+ _queryParams["limit"] = limit.toString();
117
+ }
118
+ if (pageToken != null) {
119
+ _queryParams["page_token"] = pageToken;
120
+ }
121
+ const _response = yield core.fetcher({
122
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
123
+ .preEncounter, "/tags/v1"),
124
+ method: "GET",
125
+ headers: {
126
+ Authorization: yield this._getAuthorizationHeader(),
127
+ "X-Fern-Language": "JavaScript",
128
+ "X-Fern-SDK-Name": "candidhealth",
129
+ "X-Fern-SDK-Version": "0.35.3",
130
+ "X-Fern-Runtime": core.RUNTIME.type,
131
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
132
+ },
133
+ contentType: "application/json",
134
+ queryParameters: _queryParams,
135
+ requestType: "json",
136
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
137
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
138
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
139
+ });
140
+ if (_response.ok) {
141
+ return {
142
+ ok: true,
143
+ body: serializers.preEncounter.tags.v1.TagPage.parseOrThrow(_response.body, {
144
+ unrecognizedObjectKeys: "passthrough",
145
+ allowUnrecognizedUnionMembers: true,
146
+ allowUnrecognizedEnumValues: true,
147
+ breadcrumbsPrefix: ["response"],
148
+ }),
149
+ };
150
+ }
151
+ return {
152
+ ok: false,
153
+ error: CandidApi.preEncounter.tags.v1.getAll.Error._unknown(_response.error),
154
+ };
155
+ });
156
+ }
157
+ /**
158
+ * Adds a new tag if it does not already exist, otherwise, returns the existing tag.
159
+ *
160
+ * @param {CandidApi.preEncounter.tags.v1.MutableTag} request
161
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
162
+ *
163
+ * @example
164
+ * await client.preEncounter.tags.v1.create({
165
+ * value: "string"
166
+ * })
167
+ */
168
+ create(request, requestOptions) {
169
+ var _a;
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ const _response = yield core.fetcher({
172
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
173
+ .preEncounter, "/tags/v1"),
174
+ method: "POST",
175
+ headers: {
176
+ Authorization: yield this._getAuthorizationHeader(),
177
+ "X-Fern-Language": "JavaScript",
178
+ "X-Fern-SDK-Name": "candidhealth",
179
+ "X-Fern-SDK-Version": "0.35.3",
180
+ "X-Fern-Runtime": core.RUNTIME.type,
181
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
182
+ },
183
+ contentType: "application/json",
184
+ requestType: "json",
185
+ body: serializers.preEncounter.tags.v1.MutableTag.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
186
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
187
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
188
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
189
+ });
190
+ if (_response.ok) {
191
+ return {
192
+ ok: true,
193
+ body: serializers.preEncounter.tags.v1.Tag.parseOrThrow(_response.body, {
194
+ unrecognizedObjectKeys: "passthrough",
195
+ allowUnrecognizedUnionMembers: true,
196
+ allowUnrecognizedEnumValues: true,
197
+ breadcrumbsPrefix: ["response"],
198
+ }),
199
+ };
200
+ }
201
+ return {
202
+ ok: false,
203
+ error: CandidApi.preEncounter.tags.v1.create.Error._unknown(_response.error),
204
+ };
205
+ });
206
+ }
207
+ /**
208
+ * Updates a tag. The path must contain the most recent version to prevent races.
209
+ *
210
+ * @param {CandidApi.preEncounter.TagId} id
211
+ * @param {string} version
212
+ * @param {CandidApi.preEncounter.tags.v1.MutableTag} request
213
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
214
+ *
215
+ * @example
216
+ * await client.preEncounter.tags.v1.update(CandidApi.preEncounter.TagId("string"), "string", {
217
+ * value: "string"
218
+ * })
219
+ */
220
+ update(id, version, request, requestOptions) {
221
+ var _a;
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ const _response = yield core.fetcher({
224
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
225
+ .preEncounter, `/tags/v1/${encodeURIComponent(serializers.preEncounter.TagId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
226
+ method: "PUT",
227
+ headers: {
228
+ Authorization: yield this._getAuthorizationHeader(),
229
+ "X-Fern-Language": "JavaScript",
230
+ "X-Fern-SDK-Name": "candidhealth",
231
+ "X-Fern-SDK-Version": "0.35.3",
232
+ "X-Fern-Runtime": core.RUNTIME.type,
233
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
234
+ },
235
+ contentType: "application/json",
236
+ requestType: "json",
237
+ body: serializers.preEncounter.tags.v1.MutableTag.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
238
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
239
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
240
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
241
+ });
242
+ if (_response.ok) {
243
+ return {
244
+ ok: true,
245
+ body: serializers.preEncounter.tags.v1.Tag.parseOrThrow(_response.body, {
246
+ unrecognizedObjectKeys: "passthrough",
247
+ allowUnrecognizedUnionMembers: true,
248
+ allowUnrecognizedEnumValues: true,
249
+ breadcrumbsPrefix: ["response"],
250
+ }),
251
+ };
252
+ }
253
+ return {
254
+ ok: false,
255
+ error: CandidApi.preEncounter.tags.v1.update.Error._unknown(_response.error),
256
+ };
257
+ });
258
+ }
259
+ /**
260
+ * Sets a tag as deactivated. The path must contain the most recent version to prevent races.
261
+ *
262
+ * @param {CandidApi.preEncounter.TagId} id
263
+ * @param {string} version
264
+ * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
265
+ *
266
+ * @example
267
+ * await client.preEncounter.tags.v1.deactivate(CandidApi.preEncounter.TagId("string"), "string")
268
+ */
269
+ deactivate(id, version, requestOptions) {
270
+ var _a;
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const _response = yield core.fetcher({
273
+ url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
274
+ .preEncounter, `/tags/v1/${encodeURIComponent(serializers.preEncounter.TagId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
275
+ method: "DELETE",
276
+ headers: {
277
+ Authorization: yield this._getAuthorizationHeader(),
278
+ "X-Fern-Language": "JavaScript",
279
+ "X-Fern-SDK-Name": "candidhealth",
280
+ "X-Fern-SDK-Version": "0.35.3",
281
+ "X-Fern-Runtime": core.RUNTIME.type,
282
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
283
+ },
284
+ contentType: "application/json",
285
+ requestType: "json",
286
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
287
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
288
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
289
+ });
290
+ if (_response.ok) {
291
+ return {
292
+ ok: true,
293
+ body: undefined,
294
+ };
295
+ }
296
+ return {
297
+ ok: false,
298
+ error: CandidApi.preEncounter.tags.v1.deactivate.Error._unknown(_response.error),
299
+ };
300
+ });
301
+ }
302
+ _getAuthorizationHeader() {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ const bearer = yield core.Supplier.get(this._options.token);
305
+ if (bearer != null) {
306
+ return `Bearer ${bearer}`;
307
+ }
308
+ return undefined;
309
+ });
310
+ }
311
+ }
312
+ exports.V1 = V1;
@@ -0,0 +1,22 @@
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.tags.v1.create.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface _Unknown extends _Utils {
9
+ errorName: void;
10
+ content: core.Fetcher.Error;
11
+ }
12
+ interface _Utils {
13
+ _visit: <_Result>(visitor: CandidApi.preEncounter.tags.v1.create.Error._Visitor<_Result>) => _Result;
14
+ }
15
+ interface _Visitor<_Result> {
16
+ _other: (value: core.Fetcher.Error) => _Result;
17
+ }
18
+ }
19
+ export declare const Error: {
20
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.preEncounter.tags.v1.create.Error._Unknown;
21
+ readonly _visit: <_Result>(value: CandidApi.preEncounter.tags.v1.create.Error, visitor: CandidApi.preEncounter.tags.v1.create.Error._Visitor<_Result>) => _Result;
22
+ };
@@ -0,0 +1,47 @@
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
+ _unknown: (fetcherError) => {
33
+ return {
34
+ errorName: undefined,
35
+ content: fetcherError,
36
+ _visit: function (visitor) {
37
+ return CandidApi.preEncounter.tags.v1.create.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
41
+ _visit: (value, visitor) => {
42
+ switch (value.errorName) {
43
+ default:
44
+ return visitor._other(value);
45
+ }
46
+ },
47
+ };
@@ -0,0 +1,22 @@
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.tags.v1.deactivate.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface _Unknown extends _Utils {
9
+ errorName: void;
10
+ content: core.Fetcher.Error;
11
+ }
12
+ interface _Utils {
13
+ _visit: <_Result>(visitor: CandidApi.preEncounter.tags.v1.deactivate.Error._Visitor<_Result>) => _Result;
14
+ }
15
+ interface _Visitor<_Result> {
16
+ _other: (value: core.Fetcher.Error) => _Result;
17
+ }
18
+ }
19
+ export declare const Error: {
20
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.preEncounter.tags.v1.deactivate.Error._Unknown;
21
+ readonly _visit: <_Result>(value: CandidApi.preEncounter.tags.v1.deactivate.Error, visitor: CandidApi.preEncounter.tags.v1.deactivate.Error._Visitor<_Result>) => _Result;
22
+ };
@@ -0,0 +1,47 @@
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
+ _unknown: (fetcherError) => {
33
+ return {
34
+ errorName: undefined,
35
+ content: fetcherError,
36
+ _visit: function (visitor) {
37
+ return CandidApi.preEncounter.tags.v1.deactivate.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
41
+ _visit: (value, visitor) => {
42
+ switch (value.errorName) {
43
+ default:
44
+ return visitor._other(value);
45
+ }
46
+ },
47
+ };
@@ -0,0 +1,22 @@
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.tags.v1.get.Error._Unknown;
7
+ export declare namespace Error {
8
+ interface _Unknown extends _Utils {
9
+ errorName: void;
10
+ content: core.Fetcher.Error;
11
+ }
12
+ interface _Utils {
13
+ _visit: <_Result>(visitor: CandidApi.preEncounter.tags.v1.get.Error._Visitor<_Result>) => _Result;
14
+ }
15
+ interface _Visitor<_Result> {
16
+ _other: (value: core.Fetcher.Error) => _Result;
17
+ }
18
+ }
19
+ export declare const Error: {
20
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.preEncounter.tags.v1.get.Error._Unknown;
21
+ readonly _visit: <_Result>(value: CandidApi.preEncounter.tags.v1.get.Error, visitor: CandidApi.preEncounter.tags.v1.get.Error._Visitor<_Result>) => _Result;
22
+ };
@@ -0,0 +1,47 @@
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
+ _unknown: (fetcherError) => {
33
+ return {
34
+ errorName: undefined,
35
+ content: fetcherError,
36
+ _visit: function (visitor) {
37
+ return CandidApi.preEncounter.tags.v1.get.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
41
+ _visit: (value, visitor) => {
42
+ switch (value.errorName) {
43
+ default:
44
+ return visitor._other(value);
45
+ }
46
+ },
47
+ };