candidhealth 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +11 -6
  3. package/api/resources/auth/resources/v2/client/Client.js +1 -1
  4. package/api/resources/billingNotes/client/Client.js +1 -1
  5. package/api/resources/commons/types/DateRangeOptionalEnd.d.ts +8 -0
  6. package/api/resources/commons/types/Decimal.d.ts +11 -0
  7. package/api/resources/commons/types/Decimal.js +10 -0
  8. package/api/resources/commons/types/EmrPayerCrosswalk.d.ts +8 -0
  9. package/api/resources/commons/types/EmrPayerCrosswalk.js +10 -0
  10. package/api/resources/commons/types/UserId.d.ts +8 -0
  11. package/api/resources/commons/types/index.d.ts +4 -1
  12. package/api/resources/commons/types/index.js +4 -1
  13. package/api/resources/encounters/resources/v4/client/Client.js +16 -12
  14. package/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
  15. package/api/resources/encounters/resources/v4/client/create.js +11 -0
  16. package/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  17. package/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +8 -7
  18. package/api/resources/encounters/resources/v4/client/requests/GetAllEncountersRequest.d.ts +2 -1
  19. package/api/resources/encounters/resources/v4/types/BillableStatusType.d.ts +8 -0
  20. package/api/resources/encounters/resources/v4/types/BillableStatusType.js +10 -0
  21. package/api/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  22. package/api/resources/encounters/resources/v4/types/EncounterBase.d.ts +13 -7
  23. package/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +6 -0
  24. package/api/resources/encounters/resources/v4/types/IntakeFollowUp.d.ts +1 -1
  25. package/api/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +9 -0
  26. package/api/resources/encounters/resources/v4/types/ResponsiblePartyType.js +11 -0
  27. package/api/resources/encounters/resources/v4/types/index.d.ts +3 -0
  28. package/api/resources/encounters/resources/v4/types/index.js +3 -0
  29. package/api/resources/expectedNetworkStatus/client/Client.js +1 -1
  30. package/api/resources/guarantor/resources/v1/client/Client.d.ts +2 -2
  31. package/api/resources/guarantor/resources/v1/client/Client.js +20 -6
  32. package/api/resources/guarantor/resources/v1/client/create.d.ts +7 -1
  33. package/api/resources/guarantor/resources/v1/client/create.js +11 -0
  34. package/api/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  35. package/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +6 -0
  36. package/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js +5 -0
  37. package/api/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  38. package/api/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  39. package/api/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +6 -0
  40. package/api/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  41. package/api/resources/guarantor/resources/v1/types/index.js +1 -0
  42. package/api/resources/index.d.ts +1 -1
  43. package/api/resources/index.js +2 -2
  44. package/api/resources/individual/types/Patient.d.ts +4 -0
  45. package/api/resources/individual/types/PatientBase.d.ts +0 -1
  46. package/api/resources/individual/types/PatientCreate.d.ts +6 -0
  47. package/api/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  48. package/api/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  49. package/api/resources/payers/client/Client.js +2 -2
  50. package/api/resources/serviceLines/types/ServiceLine.d.ts +13 -1
  51. package/api/resources/serviceLines/types/ServiceLineCreate.d.ts +7 -1
  52. package/api/resources/tasks/client/Client.d.ts +18 -0
  53. package/api/resources/tasks/client/Client.js +18 -0
  54. package/api/resources/tasks/client/index.d.ts +1 -0
  55. package/api/resources/tasks/client/index.js +2 -0
  56. package/api/resources/tasks/index.d.ts +2 -0
  57. package/api/resources/tasks/index.js +2 -0
  58. package/api/resources/tasks/resources/index.d.ts +1 -0
  59. package/api/resources/tasks/resources/index.js +27 -0
  60. package/api/resources/tasks/resources/v3/client/Client.d.ts +18 -0
  61. package/api/resources/tasks/resources/v3/client/Client.js +80 -0
  62. package/api/resources/tasks/resources/v3/client/getActions.d.ts +22 -0
  63. package/api/resources/tasks/resources/v3/client/getActions.js +47 -0
  64. package/api/resources/tasks/resources/v3/client/index.d.ts +1 -0
  65. package/api/resources/tasks/resources/v3/client/index.js +27 -0
  66. package/api/resources/tasks/resources/v3/index.d.ts +2 -0
  67. package/api/resources/tasks/resources/v3/index.js +18 -0
  68. package/api/resources/tasks/resources/v3/types/TaskAction.d.ts +8 -0
  69. package/api/resources/tasks/resources/v3/types/TaskAction.js +5 -0
  70. package/api/resources/tasks/resources/v3/types/TaskActionExecutionMethod.d.ts +10 -0
  71. package/api/resources/tasks/resources/v3/types/TaskActionExecutionMethod.js +5 -0
  72. package/api/resources/tasks/resources/v3/types/TaskActions.d.ts +7 -0
  73. package/api/resources/tasks/resources/v3/types/TaskActions.js +5 -0
  74. package/api/resources/tasks/resources/v3/types/index.d.ts +3 -0
  75. package/api/resources/tasks/resources/v3/types/index.js +19 -0
  76. package/api/resources/users/resources/v2/types/UserV2.d.ts +1 -1
  77. package/api/resources/users/resources/v2/types/index.d.ts +0 -1
  78. package/api/resources/users/resources/v2/types/index.js +0 -1
  79. package/dist/Client.d.ts +3 -0
  80. package/dist/Client.js +11 -6
  81. package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
  82. package/dist/api/resources/billingNotes/client/Client.js +1 -1
  83. package/dist/api/resources/commons/types/DateRangeOptionalEnd.d.ts +8 -0
  84. package/dist/api/resources/commons/types/DateRangeOptionalEnd.js +5 -0
  85. package/dist/api/resources/commons/types/Decimal.d.ts +11 -0
  86. package/dist/api/resources/commons/types/Decimal.js +10 -0
  87. package/dist/api/resources/commons/types/EmrPayerCrosswalk.d.ts +8 -0
  88. package/dist/api/resources/commons/types/EmrPayerCrosswalk.js +10 -0
  89. package/dist/api/resources/commons/types/UserId.d.ts +8 -0
  90. package/dist/api/resources/commons/types/index.d.ts +4 -1
  91. package/dist/api/resources/commons/types/index.js +4 -1
  92. package/dist/api/resources/encounters/resources/v4/client/Client.js +16 -12
  93. package/dist/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
  94. package/dist/api/resources/encounters/resources/v4/client/create.js +11 -0
  95. package/dist/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  96. package/dist/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +8 -7
  97. package/dist/api/resources/encounters/resources/v4/client/requests/GetAllEncountersRequest.d.ts +2 -1
  98. package/dist/api/resources/encounters/resources/v4/types/BillableStatusType.d.ts +8 -0
  99. package/dist/api/resources/encounters/resources/v4/types/BillableStatusType.js +10 -0
  100. package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  101. package/dist/api/resources/encounters/resources/v4/types/EncounterBase.d.ts +13 -7
  102. package/dist/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +6 -0
  103. package/dist/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js +5 -0
  104. package/dist/api/resources/encounters/resources/v4/types/IntakeFollowUp.d.ts +1 -1
  105. package/dist/api/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +9 -0
  106. package/dist/api/resources/encounters/resources/v4/types/ResponsiblePartyType.js +11 -0
  107. package/dist/api/resources/encounters/resources/v4/types/index.d.ts +3 -0
  108. package/dist/api/resources/encounters/resources/v4/types/index.js +3 -0
  109. package/dist/api/resources/expectedNetworkStatus/client/Client.js +1 -1
  110. package/dist/api/resources/guarantor/resources/v1/client/Client.d.ts +2 -2
  111. package/dist/api/resources/guarantor/resources/v1/client/Client.js +20 -6
  112. package/dist/api/resources/guarantor/resources/v1/client/create.d.ts +7 -1
  113. package/dist/api/resources/guarantor/resources/v1/client/create.js +11 -0
  114. package/dist/api/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  115. package/dist/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +6 -0
  116. package/dist/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js +5 -0
  117. package/dist/api/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  118. package/dist/api/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  119. package/dist/api/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +6 -0
  120. package/dist/api/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  121. package/dist/api/resources/guarantor/resources/v1/types/index.js +1 -0
  122. package/dist/api/resources/index.d.ts +1 -1
  123. package/dist/api/resources/index.js +2 -2
  124. package/dist/api/resources/individual/types/Patient.d.ts +4 -0
  125. package/dist/api/resources/individual/types/PatientBase.d.ts +0 -1
  126. package/dist/api/resources/individual/types/PatientCreate.d.ts +6 -0
  127. package/dist/api/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  128. package/dist/api/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  129. package/dist/api/resources/payers/client/Client.js +2 -2
  130. package/dist/api/resources/serviceLines/types/ServiceLine.d.ts +13 -1
  131. package/dist/api/resources/serviceLines/types/ServiceLineCreate.d.ts +7 -1
  132. package/dist/api/resources/tasks/client/Client.d.ts +18 -0
  133. package/dist/api/resources/tasks/client/Client.js +18 -0
  134. package/dist/api/resources/tasks/client/index.d.ts +1 -0
  135. package/dist/api/resources/tasks/client/index.js +2 -0
  136. package/dist/api/resources/tasks/index.d.ts +2 -0
  137. package/dist/api/resources/tasks/index.js +2 -0
  138. package/dist/api/resources/tasks/resources/index.d.ts +1 -0
  139. package/dist/api/resources/tasks/resources/index.js +27 -0
  140. package/dist/api/resources/tasks/resources/v3/client/Client.d.ts +18 -0
  141. package/dist/api/resources/tasks/resources/v3/client/Client.js +80 -0
  142. package/dist/api/resources/tasks/resources/v3/client/getActions.d.ts +22 -0
  143. package/dist/api/resources/tasks/resources/v3/client/getActions.js +47 -0
  144. package/dist/api/resources/tasks/resources/v3/client/index.d.ts +1 -0
  145. package/dist/api/resources/tasks/resources/v3/client/index.js +27 -0
  146. package/dist/api/resources/tasks/resources/v3/index.d.ts +2 -0
  147. package/dist/api/resources/tasks/resources/v3/index.js +18 -0
  148. package/dist/api/resources/tasks/resources/v3/types/TaskAction.d.ts +8 -0
  149. package/dist/api/resources/tasks/resources/v3/types/TaskAction.js +5 -0
  150. package/dist/api/resources/tasks/resources/v3/types/TaskActionExecutionMethod.d.ts +10 -0
  151. package/dist/api/resources/tasks/resources/v3/types/TaskActionExecutionMethod.js +5 -0
  152. package/dist/api/resources/tasks/resources/v3/types/TaskActions.d.ts +7 -0
  153. package/dist/api/resources/tasks/resources/v3/types/TaskActions.js +5 -0
  154. package/dist/api/resources/tasks/resources/v3/types/index.d.ts +3 -0
  155. package/dist/api/resources/tasks/resources/v3/types/index.js +19 -0
  156. package/dist/api/resources/users/resources/v2/types/UserV2.d.ts +1 -1
  157. package/dist/api/resources/users/resources/v2/types/index.d.ts +0 -1
  158. package/dist/api/resources/users/resources/v2/types/index.js +0 -1
  159. package/dist/serialization/resources/commons/types/DateRangeOptionalEnd.d.ts +13 -0
  160. package/dist/serialization/resources/commons/types/{ContactInfo.js → DateRangeOptionalEnd.js} +4 -6
  161. package/dist/serialization/resources/commons/types/Decimal.d.ts +10 -0
  162. package/{serialization/resources/commons/types/ContactInfo.js → dist/serialization/resources/commons/types/Decimal.js} +7 -6
  163. package/dist/serialization/resources/commons/types/EmrPayerCrosswalk.d.ts +10 -0
  164. package/dist/serialization/resources/commons/types/EmrPayerCrosswalk.js +31 -0
  165. package/dist/serialization/resources/commons/types/UserId.d.ts +10 -0
  166. package/dist/serialization/resources/commons/types/UserId.js +37 -0
  167. package/dist/serialization/resources/commons/types/index.d.ts +4 -1
  168. package/dist/serialization/resources/commons/types/index.js +4 -1
  169. package/dist/serialization/resources/encounters/resources/v4/client/create.d.ts +5 -1
  170. package/dist/serialization/resources/encounters/resources/v4/client/create.js +5 -0
  171. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  172. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -1
  173. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +8 -2
  174. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +14 -2
  175. package/dist/serialization/resources/encounters/resources/v4/types/BillableStatusType.d.ts +10 -0
  176. package/dist/serialization/resources/encounters/resources/v4/types/BillableStatusType.js +31 -0
  177. package/dist/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  178. package/dist/serialization/resources/encounters/resources/v4/types/Encounter.js +3 -0
  179. package/dist/serialization/resources/encounters/resources/v4/types/EncounterBase.d.ts +3 -2
  180. package/dist/serialization/resources/encounters/resources/v4/types/EncounterBase.js +3 -2
  181. package/dist/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +12 -0
  182. package/dist/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js +33 -0
  183. package/dist/serialization/resources/encounters/resources/v4/types/IntakeFollowUp.d.ts +1 -1
  184. package/dist/serialization/resources/encounters/resources/v4/types/IntakeFollowUp.js +1 -1
  185. package/dist/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +10 -0
  186. package/dist/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.js +31 -0
  187. package/dist/serialization/resources/encounters/resources/v4/types/index.d.ts +3 -0
  188. package/dist/serialization/resources/encounters/resources/v4/types/index.js +3 -0
  189. package/dist/serialization/resources/guarantor/resources/v1/client/create.d.ts +14 -0
  190. package/dist/serialization/resources/guarantor/resources/v1/client/create.js +46 -0
  191. package/dist/serialization/resources/guarantor/resources/v1/client/index.d.ts +1 -0
  192. package/dist/serialization/resources/guarantor/resources/v1/client/index.js +14 -0
  193. package/dist/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  194. package/dist/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.js +8 -3
  195. package/dist/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +12 -0
  196. package/dist/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js +33 -0
  197. package/dist/serialization/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  198. package/dist/serialization/resources/guarantor/resources/v1/types/Guarantor.js +4 -0
  199. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  200. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorBase.js +1 -2
  201. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +4 -0
  202. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.js +8 -1
  203. package/dist/serialization/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  204. package/dist/serialization/resources/guarantor/resources/v1/types/index.js +1 -0
  205. package/dist/serialization/resources/index.d.ts +1 -1
  206. package/dist/serialization/resources/index.js +2 -2
  207. package/dist/serialization/resources/individual/types/Patient.d.ts +4 -0
  208. package/dist/serialization/resources/individual/types/Patient.js +4 -0
  209. package/dist/serialization/resources/individual/types/PatientBase.d.ts +0 -1
  210. package/dist/serialization/resources/individual/types/PatientBase.js +0 -1
  211. package/dist/serialization/resources/individual/types/PatientCreate.d.ts +4 -0
  212. package/dist/serialization/resources/individual/types/PatientCreate.js +8 -1
  213. package/dist/serialization/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  214. package/dist/serialization/resources/insuranceCard/types/InsuranceCardBase.js +1 -1
  215. package/dist/serialization/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  216. package/dist/serialization/resources/insuranceCard/types/InsuranceCardCreate.js +1 -0
  217. package/dist/serialization/resources/serviceLines/types/ServiceLine.d.ts +2 -1
  218. package/dist/serialization/resources/serviceLines/types/ServiceLine.js +2 -1
  219. package/dist/serialization/resources/serviceLines/types/ServiceLineCreate.d.ts +1 -1
  220. package/dist/serialization/resources/serviceLines/types/ServiceLineCreate.js +1 -1
  221. package/dist/serialization/resources/tasks/index.d.ts +1 -0
  222. package/dist/serialization/resources/tasks/index.js +1 -0
  223. package/dist/serialization/resources/tasks/resources/index.d.ts +1 -0
  224. package/dist/serialization/resources/tasks/resources/index.js +27 -0
  225. package/dist/serialization/resources/tasks/resources/v3/index.d.ts +1 -0
  226. package/dist/serialization/resources/tasks/resources/v3/index.js +17 -0
  227. package/dist/serialization/resources/tasks/resources/v3/types/TaskAction.d.ts +13 -0
  228. package/dist/serialization/resources/tasks/resources/v3/types/TaskAction.js +34 -0
  229. package/dist/serialization/resources/tasks/resources/v3/types/TaskActionExecutionMethod.d.ts +13 -0
  230. package/dist/serialization/resources/{users/resources/v2/types/UserId.js → tasks/resources/v3/types/TaskActionExecutionMethod.js} +7 -4
  231. package/dist/serialization/resources/tasks/resources/v3/types/TaskActions.d.ts +12 -0
  232. package/dist/serialization/resources/tasks/resources/v3/types/TaskActions.js +33 -0
  233. package/dist/serialization/resources/tasks/resources/v3/types/index.d.ts +3 -0
  234. package/dist/serialization/resources/tasks/resources/v3/types/index.js +19 -0
  235. package/dist/serialization/resources/users/resources/v2/types/UserV2.d.ts +1 -1
  236. package/dist/serialization/resources/users/resources/v2/types/UserV2.js +1 -1
  237. package/dist/serialization/resources/users/resources/v2/types/index.d.ts +0 -1
  238. package/dist/serialization/resources/users/resources/v2/types/index.js +0 -1
  239. package/package.json +1 -1
  240. package/serialization/resources/commons/types/DateRangeOptionalEnd.d.ts +13 -0
  241. package/serialization/resources/commons/types/DateRangeOptionalEnd.js +34 -0
  242. package/serialization/resources/commons/types/Decimal.d.ts +10 -0
  243. package/serialization/resources/commons/types/Decimal.js +37 -0
  244. package/serialization/resources/commons/types/EmrPayerCrosswalk.d.ts +10 -0
  245. package/serialization/resources/commons/types/EmrPayerCrosswalk.js +31 -0
  246. package/serialization/resources/commons/types/UserId.d.ts +10 -0
  247. package/serialization/resources/commons/types/UserId.js +37 -0
  248. package/serialization/resources/commons/types/index.d.ts +4 -1
  249. package/serialization/resources/commons/types/index.js +4 -1
  250. package/serialization/resources/encounters/resources/v4/client/create.d.ts +5 -1
  251. package/serialization/resources/encounters/resources/v4/client/create.js +5 -0
  252. package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  253. package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -1
  254. package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +8 -2
  255. package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +14 -2
  256. package/serialization/resources/encounters/resources/v4/types/BillableStatusType.d.ts +10 -0
  257. package/serialization/resources/encounters/resources/v4/types/BillableStatusType.js +31 -0
  258. package/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  259. package/serialization/resources/encounters/resources/v4/types/Encounter.js +3 -0
  260. package/serialization/resources/encounters/resources/v4/types/EncounterBase.d.ts +3 -2
  261. package/serialization/resources/encounters/resources/v4/types/EncounterBase.js +3 -2
  262. package/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +12 -0
  263. package/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js +33 -0
  264. package/serialization/resources/encounters/resources/v4/types/IntakeFollowUp.d.ts +1 -1
  265. package/serialization/resources/encounters/resources/v4/types/IntakeFollowUp.js +1 -1
  266. package/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +10 -0
  267. package/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.js +31 -0
  268. package/serialization/resources/encounters/resources/v4/types/index.d.ts +3 -0
  269. package/serialization/resources/encounters/resources/v4/types/index.js +3 -0
  270. package/serialization/resources/guarantor/resources/v1/client/create.d.ts +14 -0
  271. package/serialization/resources/guarantor/resources/v1/client/create.js +46 -0
  272. package/serialization/resources/guarantor/resources/v1/client/index.d.ts +1 -0
  273. package/serialization/resources/guarantor/resources/v1/client/index.js +14 -0
  274. package/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  275. package/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.js +8 -3
  276. package/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +12 -0
  277. package/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js +33 -0
  278. package/serialization/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  279. package/serialization/resources/guarantor/resources/v1/types/Guarantor.js +4 -0
  280. package/serialization/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  281. package/serialization/resources/guarantor/resources/v1/types/GuarantorBase.js +1 -2
  282. package/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +4 -0
  283. package/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.js +8 -1
  284. package/serialization/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  285. package/serialization/resources/guarantor/resources/v1/types/index.js +1 -0
  286. package/serialization/resources/index.d.ts +1 -1
  287. package/serialization/resources/index.js +2 -2
  288. package/serialization/resources/individual/types/Patient.d.ts +4 -0
  289. package/serialization/resources/individual/types/Patient.js +4 -0
  290. package/serialization/resources/individual/types/PatientBase.d.ts +0 -1
  291. package/serialization/resources/individual/types/PatientBase.js +0 -1
  292. package/serialization/resources/individual/types/PatientCreate.d.ts +4 -0
  293. package/serialization/resources/individual/types/PatientCreate.js +8 -1
  294. package/serialization/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  295. package/serialization/resources/insuranceCard/types/InsuranceCardBase.js +1 -1
  296. package/serialization/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  297. package/serialization/resources/insuranceCard/types/InsuranceCardCreate.js +1 -0
  298. package/serialization/resources/serviceLines/types/ServiceLine.d.ts +2 -1
  299. package/serialization/resources/serviceLines/types/ServiceLine.js +2 -1
  300. package/serialization/resources/serviceLines/types/ServiceLineCreate.d.ts +1 -1
  301. package/serialization/resources/serviceLines/types/ServiceLineCreate.js +1 -1
  302. package/serialization/resources/tasks/index.d.ts +1 -0
  303. package/serialization/resources/tasks/index.js +1 -0
  304. package/serialization/resources/tasks/resources/index.d.ts +1 -0
  305. package/serialization/resources/tasks/resources/index.js +27 -0
  306. package/serialization/resources/tasks/resources/v3/index.d.ts +1 -0
  307. package/serialization/resources/tasks/resources/v3/index.js +17 -0
  308. package/serialization/resources/tasks/resources/v3/types/TaskAction.d.ts +13 -0
  309. package/serialization/resources/tasks/resources/v3/types/TaskAction.js +34 -0
  310. package/serialization/resources/tasks/resources/v3/types/TaskActionExecutionMethod.d.ts +13 -0
  311. package/serialization/resources/{users/resources/v2/types/UserId.js → tasks/resources/v3/types/TaskActionExecutionMethod.js} +7 -4
  312. package/serialization/resources/tasks/resources/v3/types/TaskActions.d.ts +12 -0
  313. package/serialization/resources/tasks/resources/v3/types/TaskActions.js +33 -0
  314. package/serialization/resources/tasks/resources/v3/types/index.d.ts +3 -0
  315. package/serialization/resources/tasks/resources/v3/types/index.js +19 -0
  316. package/serialization/resources/users/resources/v2/types/UserV2.d.ts +1 -1
  317. package/serialization/resources/users/resources/v2/types/UserV2.js +1 -1
  318. package/serialization/resources/users/resources/v2/types/index.d.ts +0 -1
  319. package/serialization/resources/users/resources/v2/types/index.js +0 -1
  320. package/api/resources/commons/types/ContactInfo.d.ts +0 -10
  321. package/api/resources/users/resources/v2/types/UserId.d.ts +0 -8
  322. package/dist/api/resources/commons/types/ContactInfo.d.ts +0 -10
  323. package/dist/api/resources/users/resources/v2/types/UserId.d.ts +0 -8
  324. package/dist/serialization/resources/commons/types/ContactInfo.d.ts +0 -15
  325. package/dist/serialization/resources/users/resources/v2/types/UserId.d.ts +0 -10
  326. package/serialization/resources/commons/types/ContactInfo.d.ts +0 -15
  327. package/serialization/resources/users/resources/v2/types/UserId.d.ts +0 -10
  328. /package/api/resources/commons/types/{ContactInfo.js → DateRangeOptionalEnd.js} +0 -0
  329. /package/api/resources/{users/resources/v2 → commons}/types/UserId.js +0 -0
  330. /package/{dist/api/resources/commons/types/ContactInfo.js → api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js} +0 -0
  331. /package/dist/api/resources/{users/resources/v2 → commons}/types/UserId.js +0 -0
@@ -40,15 +40,15 @@ class V1 {
40
40
  constructor(options) {
41
41
  this.options = options;
42
42
  }
43
- async create(request) {
43
+ async create(encounterId, request) {
44
44
  const _response = await core.fetcher({
45
- url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, "/api/guarantors/v1"),
45
+ url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/guarantors/v1/${await serializers.EncounterId.jsonOrThrow(encounterId)}`),
46
46
  method: "POST",
47
47
  headers: {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.2.1",
51
+ "X-Fern-SDK-Version": "0.3.1",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.guarantor.v1.GuarantorCreate.jsonOrThrow(request, {
@@ -67,6 +67,20 @@ class V1 {
67
67
  }),
68
68
  };
69
69
  }
70
+ if (_response.error.reason === "status-code") {
71
+ switch (_response.error.body?.errorName) {
72
+ case "EncounterHasExistingGuarantorError":
73
+ return {
74
+ ok: false,
75
+ error: await serializers.guarantor.v1.create.Error.parseOrThrow(_response.error.body, {
76
+ unrecognizedObjectKeys: "passthrough",
77
+ allowUnrecognizedUnionMembers: true,
78
+ allowUnrecognizedEnumValues: true,
79
+ breadcrumbsPrefix: ["response"],
80
+ }),
81
+ };
82
+ }
83
+ }
70
84
  return {
71
85
  ok: false,
72
86
  error: CandidApi.guarantor.v1.create.Error._unknown(_response.error),
@@ -80,7 +94,7 @@ class V1 {
80
94
  Authorization: await this._getAuthorizationHeader(),
81
95
  "X-Fern-Language": "JavaScript",
82
96
  "X-Fern-SDK-Name": "candidhealth",
83
- "X-Fern-SDK-Version": "0.2.1",
97
+ "X-Fern-SDK-Version": "0.3.1",
84
98
  },
85
99
  contentType: "application/json",
86
100
  timeoutMs: 60000,
@@ -101,7 +115,7 @@ class V1 {
101
115
  error: CandidApi.guarantor.v1.get.Error._unknown(_response.error),
102
116
  };
103
117
  }
104
- async update(guarantorId, request) {
118
+ async update(guarantorId, request = {}) {
105
119
  const _response = await core.fetcher({
106
120
  url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/guarantors/v1/${await serializers.guarantor.v1.GuarantorId.jsonOrThrow(guarantorId)}`),
107
121
  method: "PATCH",
@@ -109,7 +123,7 @@ class V1 {
109
123
  Authorization: await this._getAuthorizationHeader(),
110
124
  "X-Fern-Language": "JavaScript",
111
125
  "X-Fern-SDK-Name": "candidhealth",
112
- "X-Fern-SDK-Version": "0.2.1",
126
+ "X-Fern-SDK-Version": "0.3.1",
113
127
  },
114
128
  contentType: "application/json",
115
129
  body: await serializers.guarantor.v1.GuarantorUpdate.jsonOrThrow(request, {
@@ -3,8 +3,12 @@
3
3
  */
4
4
  import * as CandidApi from "../../../../..";
5
5
  import * as core from "../../../../../../core";
6
- export declare type Error = CandidApi.guarantor.v1.create.Error._Unknown;
6
+ export declare type Error = CandidApi.guarantor.v1.create.Error.EncounterHasExistingGuarantorError | CandidApi.guarantor.v1.create.Error._Unknown;
7
7
  export declare namespace Error {
8
+ interface EncounterHasExistingGuarantorError extends _Utils {
9
+ errorName: "EncounterHasExistingGuarantorError";
10
+ content: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType;
11
+ }
8
12
  interface _Unknown extends _Utils {
9
13
  errorName: void;
10
14
  content: core.Fetcher.Error;
@@ -13,10 +17,12 @@ export declare namespace Error {
13
17
  _visit: <_Result>(visitor: CandidApi.guarantor.v1.create.Error._Visitor<_Result>) => _Result;
14
18
  }
15
19
  interface _Visitor<_Result> {
20
+ encounterHasExistingGuarantorError: (value: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType) => _Result;
16
21
  _other: (value: core.Fetcher.Error) => _Result;
17
22
  }
18
23
  }
19
24
  export declare const Error: {
25
+ readonly encounterHasExistingGuarantorError: (value: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType) => CandidApi.guarantor.v1.create.Error.EncounterHasExistingGuarantorError;
20
26
  readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.guarantor.v1.create.Error._Unknown;
21
27
  readonly _visit: <_Result>(value: CandidApi.guarantor.v1.create.Error, visitor: CandidApi.guarantor.v1.create.Error._Visitor<_Result>) => _Result;
22
28
  };
@@ -29,6 +29,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Error = void 0;
30
30
  const CandidApi = __importStar(require("../../../../.."));
31
31
  exports.Error = {
32
+ encounterHasExistingGuarantorError: (value) => {
33
+ return {
34
+ content: value,
35
+ errorName: "EncounterHasExistingGuarantorError",
36
+ _visit: function (visitor) {
37
+ return CandidApi.guarantor.v1.create.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
32
41
  _unknown: (fetcherError) => {
33
42
  return {
34
43
  errorName: undefined,
@@ -40,6 +49,8 @@ exports.Error = {
40
49
  },
41
50
  _visit: (value, visitor) => {
42
51
  switch (value.errorName) {
52
+ case "EncounterHasExistingGuarantorError":
53
+ return visitor.encounterHasExistingGuarantorError(value.content);
43
54
  default:
44
55
  return visitor._other(value);
45
56
  }
@@ -6,7 +6,10 @@ export interface GuarantorUpdate {
6
6
  firstName?: string;
7
7
  lastName?: string;
8
8
  externalId?: string;
9
- dateOfBirth: string;
10
- address?: CandidApi.StreetAddressLongZip;
11
- contactInfo?: CandidApi.ContactInfo;
9
+ dateOfBirth?: string;
10
+ address?: CandidApi.StreetAddressShortZip;
11
+ phoneNumbers?: CandidApi.PhoneNumber[];
12
+ phoneConsent?: boolean;
13
+ email?: CandidApi.Email;
14
+ emailConsent?: boolean;
12
15
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface EncounterHasExistingGuarantorErrorType {
5
+ message: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,4 +4,8 @@
4
4
  import * as CandidApi from "../../../../..";
5
5
  export interface Guarantor extends CandidApi.guarantor.v1.GuarantorBase {
6
6
  guarantorId: CandidApi.guarantor.v1.GuarantorId;
7
+ phoneNumbers: CandidApi.PhoneNumber[];
8
+ phoneConsent: boolean;
9
+ email?: CandidApi.Email;
10
+ emailConsent: boolean;
7
11
  }
@@ -7,6 +7,5 @@ export interface GuarantorBase {
7
7
  lastName: string;
8
8
  externalId: string;
9
9
  dateOfBirth: string;
10
- address: CandidApi.StreetAddressLongZip;
11
- contactInfo: CandidApi.ContactInfo;
10
+ address: CandidApi.StreetAddressShortZip;
12
11
  }
@@ -3,4 +3,10 @@
3
3
  */
4
4
  import * as CandidApi from "../../../../..";
5
5
  export interface GuarantorCreate extends CandidApi.guarantor.v1.GuarantorBase {
6
+ phoneNumbers?: CandidApi.PhoneNumber[];
7
+ /** Defaults to false */
8
+ phoneConsent?: boolean;
9
+ email?: CandidApi.Email;
10
+ /** Defaults to false */
11
+ emailConsent?: boolean;
6
12
  }
@@ -2,3 +2,4 @@ export * from "./GuarantorId";
2
2
  export * from "./GuarantorBase";
3
3
  export * from "./Guarantor";
4
4
  export * from "./GuarantorCreate";
5
+ export * from "./EncounterHasExistingGuarantorErrorType";
@@ -18,3 +18,4 @@ __exportStar(require("./GuarantorId"), exports);
18
18
  __exportStar(require("./GuarantorBase"), exports);
19
19
  __exportStar(require("./Guarantor"), exports);
20
20
  __exportStar(require("./GuarantorCreate"), exports);
21
+ __exportStar(require("./EncounterHasExistingGuarantorErrorType"), exports);
@@ -4,6 +4,7 @@ export * as encounters from "./encounters";
4
4
  export * as guarantor from "./guarantor";
5
5
  export * as organizationProviders from "./organizationProviders";
6
6
  export * as patientPayments from "./patientPayments";
7
+ export * as tasks from "./tasks";
7
8
  export * as users from "./users";
8
9
  export * as workQueues from "./workQueues";
9
10
  export * as billingNotes from "./billingNotes";
@@ -36,7 +37,6 @@ export * as serviceLines from "./serviceLines";
36
37
  export * from "./serviceLines/types";
37
38
  export * as tags from "./tags";
38
39
  export * from "./tags/types";
39
- export * as tasks from "./tasks";
40
40
  export * from "./tasks/types";
41
41
  export * from "./billingNotes/client/requests";
42
42
  export * from "./expectedNetworkStatus/client/requests";
@@ -26,13 +26,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
26
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.tasks = exports.tags = exports.serviceLines = exports.serviceFacility = exports.payers = exports.invoices = exports.insuranceCard = exports.individual = exports.expectedNetworkStatus = exports.era = exports.diagnoses = exports.credentialing = exports.contracts = exports.commons = exports.claims = exports.billingNotes = exports.workQueues = exports.users = exports.patientPayments = exports.organizationProviders = exports.guarantor = exports.encounters = exports.encounterProviders = exports.auth = void 0;
29
+ exports.tags = exports.serviceLines = exports.serviceFacility = exports.payers = exports.invoices = exports.insuranceCard = exports.individual = exports.expectedNetworkStatus = exports.era = exports.diagnoses = exports.credentialing = exports.contracts = exports.commons = exports.claims = exports.billingNotes = exports.workQueues = exports.users = exports.tasks = exports.patientPayments = exports.organizationProviders = exports.guarantor = exports.encounters = exports.encounterProviders = exports.auth = void 0;
30
30
  exports.auth = __importStar(require("./auth"));
31
31
  exports.encounterProviders = __importStar(require("./encounterProviders"));
32
32
  exports.encounters = __importStar(require("./encounters"));
33
33
  exports.guarantor = __importStar(require("./guarantor"));
34
34
  exports.organizationProviders = __importStar(require("./organizationProviders"));
35
35
  exports.patientPayments = __importStar(require("./patientPayments"));
36
+ exports.tasks = __importStar(require("./tasks"));
36
37
  exports.users = __importStar(require("./users"));
37
38
  exports.workQueues = __importStar(require("./workQueues"));
38
39
  exports.billingNotes = __importStar(require("./billingNotes"));
@@ -65,7 +66,6 @@ exports.serviceLines = __importStar(require("./serviceLines"));
65
66
  __exportStar(require("./serviceLines/types"), exports);
66
67
  exports.tags = __importStar(require("./tags"));
67
68
  __exportStar(require("./tags/types"), exports);
68
- exports.tasks = __importStar(require("./tasks"));
69
69
  __exportStar(require("./tasks/types"), exports);
70
70
  __exportStar(require("./billingNotes/client/requests"), exports);
71
71
  __exportStar(require("./expectedNetworkStatus/client/requests"), exports);
@@ -4,4 +4,8 @@
4
4
  import * as CandidApi from "../../..";
5
5
  export interface Patient extends CandidApi.PatientBase {
6
6
  individualId: CandidApi.IndividualId;
7
+ phoneNumbers: CandidApi.PhoneNumber[];
8
+ phoneConsent: boolean;
9
+ email?: CandidApi.Email;
10
+ emailConsent: boolean;
7
11
  }
@@ -13,5 +13,4 @@ export interface PatientBase extends CandidApi.IndividualBase {
13
13
  dateOfBirth: CandidApi.Date_;
14
14
  /** Box 5 on the CMS-1500 claim form. */
15
15
  address: CandidApi.StreetAddressShortZip;
16
- contactInfo?: CandidApi.ContactInfo;
17
16
  }
@@ -3,4 +3,10 @@
3
3
  */
4
4
  import * as CandidApi from "../../..";
5
5
  export interface PatientCreate extends CandidApi.PatientBase {
6
+ phoneNumbers?: CandidApi.PhoneNumber[];
7
+ /** Defaults to false */
8
+ phoneConsent?: boolean;
9
+ email?: CandidApi.Email;
10
+ /** Defaults to false */
11
+ emailConsent?: boolean;
6
12
  }
@@ -8,5 +8,5 @@ export interface InsuranceCardBase {
8
8
  /** Box 11c on the CMS-1500 claim form. */
9
9
  planName?: string;
10
10
  planType?: CandidApi.SourceOfPaymentCode;
11
- insuranceType?: string;
11
+ insuranceType?: CandidApi.InsuranceTypeCode;
12
12
  }
@@ -10,4 +10,5 @@ export interface InsuranceCardCreate extends CandidApi.InsuranceCardBase {
10
10
  rxPcn?: string;
11
11
  imageUrlFront?: string;
12
12
  imageUrlBack?: string;
13
+ emrPayerCrosswalk?: CandidApi.EmrPayerCrosswalk;
13
14
  }
@@ -49,7 +49,7 @@ class Payers {
49
49
  Authorization: await this._getAuthorizationHeader(),
50
50
  "X-Fern-Language": "JavaScript",
51
51
  "X-Fern-SDK-Name": "candidhealth",
52
- "X-Fern-SDK-Version": "0.2.1",
52
+ "X-Fern-SDK-Version": "0.3.1",
53
53
  },
54
54
  contentType: "application/json",
55
55
  timeoutMs: 60000,
@@ -89,7 +89,7 @@ class Payers {
89
89
  Authorization: await this._getAuthorizationHeader(),
90
90
  "X-Fern-Language": "JavaScript",
91
91
  "X-Fern-SDK-Name": "candidhealth",
92
- "X-Fern-SDK-Version": "0.2.1",
92
+ "X-Fern-SDK-Version": "0.3.1",
93
93
  },
94
94
  contentType: "application/json",
95
95
  queryParameters: _queryParams,
@@ -5,7 +5,19 @@ import * as CandidApi from "../../..";
5
5
  export interface ServiceLine extends CandidApi.ServiceLineBaseWithOptionals {
6
6
  serviceLineId: CandidApi.ServiceLineId;
7
7
  procedureCode: string;
8
- quantity: string;
8
+ /**
9
+ * String representation of a Decimal that can be parsed by most libraries.
10
+ * A ServiceLine quantity cannot contain more than one digit of precision.
11
+ * Example: 1.1 is valid, 1.11 is not.
12
+ *
13
+ */
14
+ quantity: CandidApi.Decimal;
9
15
  units: CandidApi.ServiceLineUnits;
10
16
  claimId: CandidApi.ClaimId;
17
+ /**
18
+ * A range of dates of service for this service line. If the service line is for a single date, the end date
19
+ * will be empty.
20
+ *
21
+ */
22
+ dateOfServiceRange: CandidApi.DateRangeOptionalEnd;
11
23
  }
@@ -4,7 +4,13 @@
4
4
  import * as CandidApi from "../../..";
5
5
  export interface ServiceLineCreate extends CandidApi.ServiceLineBase {
6
6
  procedureCode: string;
7
- quantity: string;
7
+ /**
8
+ * String representation of a Decimal that can be parsed by most libraries.
9
+ * A ServiceLine quantity cannot contain more than one digit of precision.
10
+ * Example: 1.1 is valid, 1.11 is not.
11
+ *
12
+ */
13
+ quantity: CandidApi.Decimal;
8
14
  units: CandidApi.ServiceLineUnits;
9
15
  /**
10
16
  * The total amount charged for this service line taking quantity into account. For example, if a single unit
@@ -0,0 +1,18 @@
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 { V3 } from "../resources/v3/client/Client";
7
+ export declare namespace Tasks {
8
+ interface Options {
9
+ environment?: environments.CandidApiEnvironment | string;
10
+ token?: core.Supplier<core.BearerToken | undefined>;
11
+ }
12
+ }
13
+ export declare class Tasks {
14
+ protected readonly options: Tasks.Options;
15
+ constructor(options: Tasks.Options);
16
+ protected _v3: V3 | undefined;
17
+ get v3(): V3;
18
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Tasks = void 0;
7
+ const Client_1 = require("../resources/v3/client/Client");
8
+ class Tasks {
9
+ options;
10
+ constructor(options) {
11
+ this.options = options;
12
+ }
13
+ _v3;
14
+ get v3() {
15
+ return (this._v3 ??= new Client_1.V3(this.options));
16
+ }
17
+ }
18
+ exports.Tasks = Tasks;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,3 @@
1
+ export * from "./resources";
1
2
  export * from "./types";
3
+ export * from "./client";
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./resources"), exports);
17
18
  __exportStar(require("./types"), exports);
19
+ __exportStar(require("./client"), exports);
@@ -0,0 +1 @@
1
+ export * as v3 from "./v3";
@@ -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.v3 = void 0;
27
+ exports.v3 = __importStar(require("./v3"));
@@ -0,0 +1,18 @@
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 "../../../../..";
7
+ export declare namespace V3 {
8
+ interface Options {
9
+ environment?: environments.CandidApiEnvironment | string;
10
+ token?: core.Supplier<core.BearerToken | undefined>;
11
+ }
12
+ }
13
+ export declare class V3 {
14
+ protected readonly options: V3.Options;
15
+ constructor(options: V3.Options);
16
+ getActions(taskId: CandidApi.TaskId): Promise<core.APIResponse<CandidApi.tasks.v3.TaskActions, CandidApi.tasks.v3.getActions.Error>>;
17
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
18
+ }
@@ -0,0 +1,80 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.V3 = void 0;
33
+ const environments = __importStar(require("../../../../../../environments"));
34
+ const core = __importStar(require("../../../../../../core"));
35
+ const CandidApi = __importStar(require("../../../../.."));
36
+ const serializers = __importStar(require("../../../../../../serialization"));
37
+ const url_join_1 = __importDefault(require("url-join"));
38
+ class V3 {
39
+ options;
40
+ constructor(options) {
41
+ this.options = options;
42
+ }
43
+ async getActions(taskId) {
44
+ const _response = await core.fetcher({
45
+ url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/tasks/v3/${await serializers.TaskId.jsonOrThrow(taskId)}/actions`),
46
+ method: "GET",
47
+ headers: {
48
+ Authorization: await this._getAuthorizationHeader(),
49
+ "X-Fern-Language": "JavaScript",
50
+ "X-Fern-SDK-Name": "candidhealth",
51
+ "X-Fern-SDK-Version": "0.3.1",
52
+ },
53
+ contentType: "application/json",
54
+ timeoutMs: 60000,
55
+ });
56
+ if (_response.ok) {
57
+ return {
58
+ ok: true,
59
+ body: await serializers.tasks.v3.TaskActions.parseOrThrow(_response.body, {
60
+ unrecognizedObjectKeys: "passthrough",
61
+ allowUnrecognizedUnionMembers: true,
62
+ allowUnrecognizedEnumValues: true,
63
+ breadcrumbsPrefix: ["response"],
64
+ }),
65
+ };
66
+ }
67
+ return {
68
+ ok: false,
69
+ error: CandidApi.tasks.v3.getActions.Error._unknown(_response.error),
70
+ };
71
+ }
72
+ async _getAuthorizationHeader() {
73
+ const bearer = await core.Supplier.get(this.options.token);
74
+ if (bearer != null) {
75
+ return `Bearer ${bearer}`;
76
+ }
77
+ return undefined;
78
+ }
79
+ }
80
+ exports.V3 = V3;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../../../..";
5
+ import * as core from "../../../../../../core";
6
+ export declare type Error = CandidApi.tasks.v3.getActions.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.tasks.v3.getActions.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.tasks.v3.getActions.Error._Unknown;
21
+ readonly _visit: <_Result>(value: CandidApi.tasks.v3.getActions.Error, visitor: CandidApi.tasks.v3.getActions.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("../../../../.."));
31
+ exports.Error = {
32
+ _unknown: (fetcherError) => {
33
+ return {
34
+ errorName: undefined,
35
+ content: fetcherError,
36
+ _visit: function (visitor) {
37
+ return CandidApi.tasks.v3.getActions.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 @@
1
+ export * as getActions from "./getActions";
@@ -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.getActions = void 0;
27
+ exports.getActions = __importStar(require("./getActions"));
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";