candidhealth 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +59 -54
  3. package/api/resources/commons/types/BadRequestErrorMessage.d.ts +3 -0
  4. package/api/resources/commons/types/BadRequestErrorMessage.js +3 -0
  5. package/api/resources/commons/types/InternalErrorMessage.d.ts +3 -0
  6. package/api/resources/commons/types/InternalErrorMessage.js +3 -0
  7. package/api/resources/commons/types/index.d.ts +2 -0
  8. package/api/resources/commons/types/index.js +2 -0
  9. package/api/resources/contracts/client/Client.d.ts +3 -0
  10. package/api/resources/contracts/client/Client.js +5 -0
  11. package/api/resources/contracts/resources/index.d.ts +1 -0
  12. package/api/resources/contracts/resources/index.js +2 -1
  13. package/api/resources/contracts/resources/v2/client/Client.d.ts +4 -0
  14. package/api/resources/contracts/resources/v2/client/Client.js +4 -0
  15. package/api/resources/contracts/resources/v3/client/Client.d.ts +109 -0
  16. package/api/resources/contracts/resources/v3/client/Client.js +603 -0
  17. package/api/resources/contracts/resources/v3/client/create.d.ts +19 -0
  18. package/api/resources/contracts/resources/v3/client/create.js +55 -0
  19. package/api/resources/contracts/resources/v3/client/createContractServiceFacility.d.ts +25 -0
  20. package/api/resources/contracts/resources/v3/client/createContractServiceFacility.js +66 -0
  21. package/api/resources/contracts/resources/v3/client/delete.d.ts +25 -0
  22. package/api/resources/contracts/resources/v3/client/delete.js +66 -0
  23. package/api/resources/contracts/resources/v3/client/get.d.ts +25 -0
  24. package/api/resources/contracts/resources/v3/client/get.js +66 -0
  25. package/api/resources/contracts/resources/v3/client/getMulti.d.ts +19 -0
  26. package/api/resources/contracts/resources/v3/client/getMulti.js +55 -0
  27. package/api/resources/contracts/resources/v3/client/index.d.ts +8 -0
  28. package/api/resources/contracts/resources/v3/client/index.js +47 -0
  29. package/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.d.ts +10 -0
  30. package/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.js +3 -0
  31. package/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.d.ts +10 -0
  32. package/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.js +3 -0
  33. package/api/resources/contracts/resources/v3/client/requests/GetMultiContractsRequest.d.ts +23 -0
  34. package/api/resources/contracts/resources/v3/client/requests/GetMultiContractsRequest.js +3 -0
  35. package/api/resources/contracts/resources/v3/client/requests/index.d.ts +3 -0
  36. package/api/resources/contracts/resources/v3/client/requests/index.js +2 -0
  37. package/api/resources/contracts/resources/v3/client/update.d.ts +31 -0
  38. package/api/resources/contracts/resources/v3/client/update.js +77 -0
  39. package/api/resources/contracts/resources/v3/client/updateContractServiceFacility.d.ts +25 -0
  40. package/api/resources/contracts/resources/v3/client/updateContractServiceFacility.js +66 -0
  41. package/api/resources/contracts/resources/v3/index.d.ts +2 -0
  42. package/api/resources/contracts/resources/v3/index.js +18 -0
  43. package/api/resources/contracts/resources/v3/types/Contract.d.ts +10 -0
  44. package/api/resources/contracts/resources/v3/types/Contract.js +3 -0
  45. package/api/resources/contracts/resources/v3/types/ContractBase.d.ts +20 -0
  46. package/api/resources/contracts/resources/v3/types/ContractBase.js +3 -0
  47. package/api/resources/contracts/resources/v3/types/ContractCreate.d.ts +9 -0
  48. package/api/resources/contracts/resources/v3/types/ContractCreate.js +3 -0
  49. package/api/resources/contracts/resources/v3/types/ContractCreateUnion.d.ts +10 -0
  50. package/api/resources/contracts/resources/v3/types/ContractCreateUnion.js +3 -0
  51. package/api/resources/contracts/resources/v3/types/ContractId.d.ts +5 -0
  52. package/api/resources/contracts/resources/v3/types/ContractId.js +7 -0
  53. package/api/resources/contracts/resources/v3/types/ContractServiceFacility.d.ts +6 -0
  54. package/api/resources/contracts/resources/v3/types/ContractServiceFacility.js +3 -0
  55. package/api/resources/contracts/resources/v3/types/ContractServiceFacilityBase.d.ts +6 -0
  56. package/api/resources/contracts/resources/v3/types/ContractServiceFacilityBase.js +3 -0
  57. package/api/resources/contracts/resources/v3/types/ContractServiceFacilityId.d.ts +5 -0
  58. package/api/resources/contracts/resources/v3/types/ContractServiceFacilityId.js +7 -0
  59. package/api/resources/contracts/resources/v3/types/ContractType.d.ts +9 -0
  60. package/api/resources/contracts/resources/v3/types/ContractType.js +12 -0
  61. package/api/resources/contracts/resources/v3/types/ContractUnion.d.ts +10 -0
  62. package/api/resources/contracts/resources/v3/types/ContractUnion.js +3 -0
  63. package/api/resources/contracts/resources/v3/types/ContractUpdate.d.ts +17 -0
  64. package/api/resources/contracts/resources/v3/types/ContractUpdate.js +3 -0
  65. package/api/resources/contracts/resources/v3/types/ContractUpdateUnion.d.ts +10 -0
  66. package/api/resources/contracts/resources/v3/types/ContractUpdateUnion.js +3 -0
  67. package/api/resources/contracts/resources/v3/types/ContractWithProvidersUnion.d.ts +10 -0
  68. package/api/resources/contracts/resources/v3/types/ContractWithProvidersUnion.js +3 -0
  69. package/api/resources/contracts/resources/v3/types/ContractingProviderId.d.ts +5 -0
  70. package/api/resources/contracts/resources/v3/types/ContractingProviderId.js +7 -0
  71. package/api/resources/contracts/resources/v3/types/ContractsPage.d.ts +4 -0
  72. package/api/resources/contracts/resources/v3/types/ContractsPage.js +3 -0
  73. package/api/resources/contracts/resources/v3/types/InstitutionalContract.d.ts +5 -0
  74. package/api/resources/contracts/resources/v3/types/InstitutionalContract.js +3 -0
  75. package/api/resources/contracts/resources/v3/types/InstitutionalContractCreate.d.ts +4 -0
  76. package/api/resources/contracts/resources/v3/types/InstitutionalContractCreate.js +3 -0
  77. package/api/resources/contracts/resources/v3/types/InstitutionalContractUpdate.d.ts +4 -0
  78. package/api/resources/contracts/resources/v3/types/InstitutionalContractUpdate.js +3 -0
  79. package/api/resources/contracts/resources/v3/types/ProfessionalContract.d.ts +5 -0
  80. package/api/resources/contracts/resources/v3/types/ProfessionalContract.js +3 -0
  81. package/api/resources/contracts/resources/v3/types/ProfessionalContractCreate.d.ts +4 -0
  82. package/api/resources/contracts/resources/v3/types/ProfessionalContractCreate.js +3 -0
  83. package/api/resources/contracts/resources/v3/types/ProfessionalContractUpdate.d.ts +4 -0
  84. package/api/resources/contracts/resources/v3/types/ProfessionalContractUpdate.js +3 -0
  85. package/api/resources/contracts/resources/v3/types/RenderingProviderid.d.ts +5 -0
  86. package/api/resources/contracts/resources/v3/types/RenderingProviderid.js +7 -0
  87. package/api/resources/contracts/resources/v3/types/index.d.ts +22 -0
  88. package/api/resources/contracts/resources/v3/types/index.js +38 -0
  89. package/api/resources/events/client/Client.d.ts +14 -0
  90. package/api/resources/events/client/Client.js +15 -0
  91. package/api/resources/events/client/index.d.ts +1 -0
  92. package/api/resources/events/client/index.js +2 -0
  93. package/api/resources/events/index.d.ts +2 -0
  94. package/api/resources/events/index.js +18 -0
  95. package/api/resources/events/resources/index.d.ts +1 -0
  96. package/api/resources/events/resources/index.js +37 -0
  97. package/api/resources/events/resources/v1/client/Client.d.ts +35 -0
  98. package/api/resources/events/resources/v1/client/Client.js +227 -0
  99. package/api/resources/events/resources/v1/client/get.d.ts +37 -0
  100. package/api/resources/events/resources/v1/client/get.js +88 -0
  101. package/api/resources/events/resources/v1/client/index.d.ts +3 -0
  102. package/api/resources/events/resources/v1/client/index.js +42 -0
  103. package/api/resources/events/resources/v1/client/requests/GetEventScanRequest.d.ts +16 -0
  104. package/api/resources/events/resources/v1/client/requests/GetEventScanRequest.js +3 -0
  105. package/api/resources/events/resources/v1/client/requests/index.d.ts +1 -0
  106. package/api/resources/events/resources/v1/client/requests/index.js +2 -0
  107. package/api/resources/events/resources/v1/client/scan.d.ts +31 -0
  108. package/api/resources/events/resources/v1/client/scan.js +77 -0
  109. package/api/resources/events/resources/v1/index.d.ts +2 -0
  110. package/api/resources/events/resources/v1/index.js +18 -0
  111. package/api/resources/events/resources/v1/types/Event.d.ts +9 -0
  112. package/api/resources/events/resources/v1/types/Event.js +3 -0
  113. package/api/resources/events/resources/v1/types/EventId.d.ts +5 -0
  114. package/api/resources/events/resources/v1/types/EventId.js +7 -0
  115. package/api/resources/events/resources/v1/types/EventScanPage.d.ts +5 -0
  116. package/api/resources/events/resources/v1/types/EventScanPage.js +3 -0
  117. package/api/resources/events/resources/v1/types/index.d.ts +3 -0
  118. package/api/resources/events/resources/v1/types/index.js +19 -0
  119. package/api/resources/healthCareCodeInformation/resources/v1/types/D8Date.d.ts +5 -1
  120. package/api/resources/healthCareCodeInformation/resources/v1/types/D8Date.js +4 -0
  121. package/api/resources/healthCareCodeInformation/resources/v1/types/Rd8Date.d.ts +2 -14
  122. package/api/resources/index.d.ts +1 -0
  123. package/api/resources/index.js +3 -2
  124. package/api/resources/patientAr/resources/v1/client/Client.d.ts +0 -4
  125. package/api/resources/patientAr/resources/v1/client/Client.js +0 -4
  126. package/dist/Client.d.ts +3 -0
  127. package/dist/Client.js +59 -54
  128. package/dist/api/resources/commons/types/BadRequestErrorMessage.d.ts +3 -0
  129. package/dist/api/resources/commons/types/BadRequestErrorMessage.js +3 -0
  130. package/dist/api/resources/commons/types/InternalErrorMessage.d.ts +3 -0
  131. package/dist/api/resources/commons/types/InternalErrorMessage.js +3 -0
  132. package/dist/api/resources/commons/types/index.d.ts +2 -0
  133. package/dist/api/resources/commons/types/index.js +2 -0
  134. package/dist/api/resources/contracts/client/Client.d.ts +3 -0
  135. package/dist/api/resources/contracts/client/Client.js +5 -0
  136. package/dist/api/resources/contracts/resources/index.d.ts +1 -0
  137. package/dist/api/resources/contracts/resources/index.js +2 -1
  138. package/dist/api/resources/contracts/resources/v2/client/Client.d.ts +4 -0
  139. package/dist/api/resources/contracts/resources/v2/client/Client.js +4 -0
  140. package/dist/api/resources/contracts/resources/v3/client/Client.d.ts +109 -0
  141. package/dist/api/resources/contracts/resources/v3/client/Client.js +603 -0
  142. package/dist/api/resources/contracts/resources/v3/client/create.d.ts +19 -0
  143. package/dist/api/resources/contracts/resources/v3/client/create.js +55 -0
  144. package/dist/api/resources/contracts/resources/v3/client/createContractServiceFacility.d.ts +25 -0
  145. package/dist/api/resources/contracts/resources/v3/client/createContractServiceFacility.js +66 -0
  146. package/dist/api/resources/contracts/resources/v3/client/delete.d.ts +25 -0
  147. package/dist/api/resources/contracts/resources/v3/client/delete.js +66 -0
  148. package/dist/api/resources/contracts/resources/v3/client/get.d.ts +25 -0
  149. package/dist/api/resources/contracts/resources/v3/client/get.js +66 -0
  150. package/dist/api/resources/contracts/resources/v3/client/getMulti.d.ts +19 -0
  151. package/dist/api/resources/contracts/resources/v3/client/getMulti.js +55 -0
  152. package/dist/api/resources/contracts/resources/v3/client/index.d.ts +8 -0
  153. package/dist/api/resources/contracts/resources/v3/client/index.js +47 -0
  154. package/dist/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.d.ts +10 -0
  155. package/dist/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.js +3 -0
  156. package/dist/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.d.ts +10 -0
  157. package/dist/api/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.js +3 -0
  158. package/dist/api/resources/contracts/resources/v3/client/requests/GetMultiContractsRequest.d.ts +23 -0
  159. package/dist/api/resources/contracts/resources/v3/client/requests/GetMultiContractsRequest.js +3 -0
  160. package/dist/api/resources/contracts/resources/v3/client/requests/index.d.ts +3 -0
  161. package/dist/api/resources/contracts/resources/v3/client/requests/index.js +2 -0
  162. package/dist/api/resources/contracts/resources/v3/client/update.d.ts +31 -0
  163. package/dist/api/resources/contracts/resources/v3/client/update.js +77 -0
  164. package/dist/api/resources/contracts/resources/v3/client/updateContractServiceFacility.d.ts +25 -0
  165. package/dist/api/resources/contracts/resources/v3/client/updateContractServiceFacility.js +66 -0
  166. package/dist/api/resources/contracts/resources/v3/index.d.ts +2 -0
  167. package/dist/api/resources/contracts/resources/v3/index.js +18 -0
  168. package/dist/api/resources/contracts/resources/v3/types/Contract.d.ts +10 -0
  169. package/dist/api/resources/contracts/resources/v3/types/Contract.js +3 -0
  170. package/dist/api/resources/contracts/resources/v3/types/ContractBase.d.ts +20 -0
  171. package/dist/api/resources/contracts/resources/v3/types/ContractBase.js +3 -0
  172. package/dist/api/resources/contracts/resources/v3/types/ContractCreate.d.ts +9 -0
  173. package/dist/api/resources/contracts/resources/v3/types/ContractCreate.js +3 -0
  174. package/dist/api/resources/contracts/resources/v3/types/ContractCreateUnion.d.ts +10 -0
  175. package/dist/api/resources/contracts/resources/v3/types/ContractCreateUnion.js +3 -0
  176. package/dist/api/resources/contracts/resources/v3/types/ContractId.d.ts +5 -0
  177. package/dist/api/resources/contracts/resources/v3/types/ContractId.js +7 -0
  178. package/dist/api/resources/contracts/resources/v3/types/ContractServiceFacility.d.ts +6 -0
  179. package/dist/api/resources/contracts/resources/v3/types/ContractServiceFacility.js +3 -0
  180. package/dist/api/resources/contracts/resources/v3/types/ContractServiceFacilityBase.d.ts +6 -0
  181. package/dist/api/resources/contracts/resources/v3/types/ContractServiceFacilityBase.js +3 -0
  182. package/dist/api/resources/contracts/resources/v3/types/ContractServiceFacilityId.d.ts +5 -0
  183. package/dist/api/resources/contracts/resources/v3/types/ContractServiceFacilityId.js +7 -0
  184. package/dist/api/resources/contracts/resources/v3/types/ContractType.d.ts +9 -0
  185. package/dist/api/resources/contracts/resources/v3/types/ContractType.js +12 -0
  186. package/dist/api/resources/contracts/resources/v3/types/ContractUnion.d.ts +10 -0
  187. package/dist/api/resources/contracts/resources/v3/types/ContractUnion.js +3 -0
  188. package/dist/api/resources/contracts/resources/v3/types/ContractUpdate.d.ts +17 -0
  189. package/dist/api/resources/contracts/resources/v3/types/ContractUpdate.js +3 -0
  190. package/dist/api/resources/contracts/resources/v3/types/ContractUpdateUnion.d.ts +10 -0
  191. package/dist/api/resources/contracts/resources/v3/types/ContractUpdateUnion.js +3 -0
  192. package/dist/api/resources/contracts/resources/v3/types/ContractWithProvidersUnion.d.ts +10 -0
  193. package/dist/api/resources/contracts/resources/v3/types/ContractWithProvidersUnion.js +3 -0
  194. package/dist/api/resources/contracts/resources/v3/types/ContractingProviderId.d.ts +5 -0
  195. package/dist/api/resources/contracts/resources/v3/types/ContractingProviderId.js +7 -0
  196. package/dist/api/resources/contracts/resources/v3/types/ContractsPage.d.ts +4 -0
  197. package/dist/api/resources/contracts/resources/v3/types/ContractsPage.js +3 -0
  198. package/dist/api/resources/contracts/resources/v3/types/InstitutionalContract.d.ts +5 -0
  199. package/dist/api/resources/contracts/resources/v3/types/InstitutionalContract.js +3 -0
  200. package/dist/api/resources/contracts/resources/v3/types/InstitutionalContractCreate.d.ts +4 -0
  201. package/dist/api/resources/contracts/resources/v3/types/InstitutionalContractCreate.js +3 -0
  202. package/dist/api/resources/contracts/resources/v3/types/InstitutionalContractUpdate.d.ts +4 -0
  203. package/dist/api/resources/contracts/resources/v3/types/InstitutionalContractUpdate.js +3 -0
  204. package/dist/api/resources/contracts/resources/v3/types/ProfessionalContract.d.ts +5 -0
  205. package/dist/api/resources/contracts/resources/v3/types/ProfessionalContract.js +3 -0
  206. package/dist/api/resources/contracts/resources/v3/types/ProfessionalContractCreate.d.ts +4 -0
  207. package/dist/api/resources/contracts/resources/v3/types/ProfessionalContractCreate.js +3 -0
  208. package/dist/api/resources/contracts/resources/v3/types/ProfessionalContractUpdate.d.ts +4 -0
  209. package/dist/api/resources/contracts/resources/v3/types/ProfessionalContractUpdate.js +3 -0
  210. package/dist/api/resources/contracts/resources/v3/types/RenderingProviderid.d.ts +5 -0
  211. package/dist/api/resources/contracts/resources/v3/types/RenderingProviderid.js +7 -0
  212. package/dist/api/resources/contracts/resources/v3/types/index.d.ts +22 -0
  213. package/dist/api/resources/contracts/resources/v3/types/index.js +38 -0
  214. package/dist/api/resources/events/client/Client.d.ts +14 -0
  215. package/dist/api/resources/events/client/Client.js +15 -0
  216. package/dist/api/resources/events/client/index.d.ts +1 -0
  217. package/dist/api/resources/events/client/index.js +2 -0
  218. package/dist/api/resources/events/index.d.ts +2 -0
  219. package/dist/api/resources/events/index.js +18 -0
  220. package/dist/api/resources/events/resources/index.d.ts +1 -0
  221. package/dist/api/resources/events/resources/index.js +37 -0
  222. package/dist/api/resources/events/resources/v1/client/Client.d.ts +35 -0
  223. package/dist/api/resources/events/resources/v1/client/Client.js +227 -0
  224. package/dist/api/resources/events/resources/v1/client/get.d.ts +37 -0
  225. package/dist/api/resources/events/resources/v1/client/get.js +88 -0
  226. package/dist/api/resources/events/resources/v1/client/index.d.ts +3 -0
  227. package/dist/api/resources/events/resources/v1/client/index.js +42 -0
  228. package/dist/api/resources/events/resources/v1/client/requests/GetEventScanRequest.d.ts +16 -0
  229. package/dist/api/resources/events/resources/v1/client/requests/GetEventScanRequest.js +3 -0
  230. package/dist/api/resources/events/resources/v1/client/requests/index.d.ts +1 -0
  231. package/dist/api/resources/events/resources/v1/client/requests/index.js +2 -0
  232. package/dist/api/resources/events/resources/v1/client/scan.d.ts +31 -0
  233. package/dist/api/resources/events/resources/v1/client/scan.js +77 -0
  234. package/dist/api/resources/events/resources/v1/index.d.ts +2 -0
  235. package/dist/api/resources/events/resources/v1/index.js +18 -0
  236. package/dist/api/resources/events/resources/v1/types/Event.d.ts +9 -0
  237. package/dist/api/resources/events/resources/v1/types/Event.js +3 -0
  238. package/dist/api/resources/events/resources/v1/types/EventId.d.ts +5 -0
  239. package/dist/api/resources/events/resources/v1/types/EventId.js +7 -0
  240. package/dist/api/resources/events/resources/v1/types/EventScanPage.d.ts +5 -0
  241. package/dist/api/resources/events/resources/v1/types/EventScanPage.js +3 -0
  242. package/dist/api/resources/events/resources/v1/types/index.d.ts +3 -0
  243. package/dist/api/resources/events/resources/v1/types/index.js +19 -0
  244. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/D8Date.d.ts +5 -1
  245. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/D8Date.js +4 -0
  246. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/Rd8Date.d.ts +2 -14
  247. package/dist/api/resources/index.d.ts +1 -0
  248. package/dist/api/resources/index.js +3 -2
  249. package/dist/api/resources/patientAr/resources/v1/client/Client.d.ts +0 -4
  250. package/dist/api/resources/patientAr/resources/v1/client/Client.js +0 -4
  251. package/dist/serialization/resources/commons/types/BadRequestErrorMessage.d.ts +9 -0
  252. package/dist/serialization/resources/commons/types/BadRequestErrorMessage.js +41 -0
  253. package/dist/serialization/resources/commons/types/InternalErrorMessage.d.ts +9 -0
  254. package/dist/serialization/resources/commons/types/InternalErrorMessage.js +41 -0
  255. package/dist/serialization/resources/commons/types/index.d.ts +2 -0
  256. package/dist/serialization/resources/commons/types/index.js +2 -0
  257. package/dist/serialization/resources/contracts/resources/index.d.ts +1 -0
  258. package/dist/serialization/resources/contracts/resources/index.js +2 -1
  259. package/dist/serialization/resources/contracts/resources/v3/client/createContractServiceFacility.d.ts +12 -0
  260. package/dist/serialization/resources/contracts/resources/v3/client/createContractServiceFacility.js +69 -0
  261. package/dist/serialization/resources/contracts/resources/v3/client/delete.d.ts +12 -0
  262. package/dist/serialization/resources/contracts/resources/v3/client/delete.js +69 -0
  263. package/dist/serialization/resources/contracts/resources/v3/client/get.d.ts +12 -0
  264. package/dist/serialization/resources/contracts/resources/v3/client/get.js +69 -0
  265. package/dist/serialization/resources/contracts/resources/v3/client/index.d.ts +6 -0
  266. package/dist/serialization/resources/contracts/resources/v3/client/index.js +45 -0
  267. package/dist/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.d.ts +9 -0
  268. package/dist/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.js +40 -0
  269. package/dist/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.d.ts +10 -0
  270. package/dist/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.js +42 -0
  271. package/dist/serialization/resources/contracts/resources/v3/client/requests/index.d.ts +2 -0
  272. package/dist/serialization/resources/contracts/resources/v3/client/requests/index.js +7 -0
  273. package/dist/serialization/resources/contracts/resources/v3/client/update.d.ts +17 -0
  274. package/dist/serialization/resources/contracts/resources/v3/client/update.js +75 -0
  275. package/dist/serialization/resources/contracts/resources/v3/client/updateContractServiceFacility.d.ts +12 -0
  276. package/dist/serialization/resources/contracts/resources/v3/client/updateContractServiceFacility.js +69 -0
  277. package/dist/serialization/resources/contracts/resources/v3/index.d.ts +2 -0
  278. package/dist/serialization/resources/contracts/resources/v3/index.js +18 -0
  279. package/dist/serialization/resources/contracts/resources/v3/types/Contract.d.ts +16 -0
  280. package/dist/serialization/resources/contracts/resources/v3/types/Contract.js +50 -0
  281. package/dist/serialization/resources/contracts/resources/v3/types/ContractBase.d.ts +21 -0
  282. package/dist/serialization/resources/contracts/resources/v3/types/ContractBase.js +53 -0
  283. package/dist/serialization/resources/contracts/resources/v3/types/ContractCreate.d.ts +14 -0
  284. package/dist/serialization/resources/contracts/resources/v3/types/ContractCreate.js +48 -0
  285. package/dist/serialization/resources/contracts/resources/v3/types/ContractCreateUnion.d.ts +15 -0
  286. package/dist/serialization/resources/contracts/resources/v3/types/ContractCreateUnion.js +49 -0
  287. package/dist/serialization/resources/contracts/resources/v3/types/ContractId.d.ts +7 -0
  288. package/dist/serialization/resources/contracts/resources/v3/types/ContractId.js +43 -0
  289. package/dist/serialization/resources/contracts/resources/v3/types/ContractServiceFacility.d.ts +13 -0
  290. package/dist/serialization/resources/contracts/resources/v3/types/ContractServiceFacility.js +47 -0
  291. package/dist/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityBase.d.ts +10 -0
  292. package/dist/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityBase.js +42 -0
  293. package/dist/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityId.d.ts +7 -0
  294. package/dist/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityId.js +43 -0
  295. package/dist/serialization/resources/contracts/resources/v3/types/ContractType.d.ts +7 -0
  296. package/dist/serialization/resources/contracts/resources/v3/types/ContractType.js +39 -0
  297. package/dist/serialization/resources/contracts/resources/v3/types/ContractUnion.d.ts +14 -0
  298. package/dist/serialization/resources/contracts/resources/v3/types/ContractUnion.js +48 -0
  299. package/dist/serialization/resources/contracts/resources/v3/types/ContractUpdate.d.ts +22 -0
  300. package/dist/serialization/resources/contracts/resources/v3/types/ContractUpdate.js +54 -0
  301. package/dist/serialization/resources/contracts/resources/v3/types/ContractUpdateUnion.d.ts +15 -0
  302. package/dist/serialization/resources/contracts/resources/v3/types/ContractUpdateUnion.js +49 -0
  303. package/dist/serialization/resources/contracts/resources/v3/types/ContractWithProvidersUnion.d.ts +15 -0
  304. package/dist/serialization/resources/contracts/resources/v3/types/ContractWithProvidersUnion.js +49 -0
  305. package/dist/serialization/resources/contracts/resources/v3/types/ContractingProviderId.d.ts +7 -0
  306. package/dist/serialization/resources/contracts/resources/v3/types/ContractingProviderId.js +43 -0
  307. package/dist/serialization/resources/contracts/resources/v3/types/ContractsPage.d.ts +11 -0
  308. package/dist/serialization/resources/contracts/resources/v3/types/ContractsPage.js +45 -0
  309. package/dist/serialization/resources/contracts/resources/v3/types/InstitutionalContract.d.ts +11 -0
  310. package/dist/serialization/resources/contracts/resources/v3/types/InstitutionalContract.js +45 -0
  311. package/dist/serialization/resources/contracts/resources/v3/types/InstitutionalContractCreate.d.ts +11 -0
  312. package/dist/serialization/resources/contracts/resources/v3/types/InstitutionalContractCreate.js +45 -0
  313. package/dist/serialization/resources/contracts/resources/v3/types/InstitutionalContractUpdate.d.ts +11 -0
  314. package/dist/serialization/resources/contracts/resources/v3/types/InstitutionalContractUpdate.js +45 -0
  315. package/dist/serialization/resources/contracts/resources/v3/types/ProfessionalContract.d.ts +10 -0
  316. package/dist/serialization/resources/contracts/resources/v3/types/ProfessionalContract.js +44 -0
  317. package/dist/serialization/resources/contracts/resources/v3/types/ProfessionalContractCreate.d.ts +11 -0
  318. package/dist/serialization/resources/contracts/resources/v3/types/ProfessionalContractCreate.js +45 -0
  319. package/dist/serialization/resources/contracts/resources/v3/types/ProfessionalContractUpdate.d.ts +11 -0
  320. package/dist/serialization/resources/contracts/resources/v3/types/ProfessionalContractUpdate.js +45 -0
  321. package/dist/serialization/resources/contracts/resources/v3/types/RenderingProviderid.d.ts +7 -0
  322. package/dist/serialization/resources/contracts/resources/v3/types/RenderingProviderid.js +43 -0
  323. package/dist/serialization/resources/contracts/resources/v3/types/index.d.ts +22 -0
  324. package/dist/serialization/resources/contracts/resources/v3/types/index.js +38 -0
  325. package/dist/serialization/resources/events/index.d.ts +1 -0
  326. package/dist/serialization/resources/events/index.js +17 -0
  327. package/dist/serialization/resources/events/resources/index.d.ts +1 -0
  328. package/dist/serialization/resources/events/resources/index.js +37 -0
  329. package/dist/serialization/resources/events/resources/v1/client/get.d.ts +22 -0
  330. package/dist/serialization/resources/events/resources/v1/client/get.js +81 -0
  331. package/dist/serialization/resources/events/resources/v1/client/index.d.ts +2 -0
  332. package/dist/serialization/resources/events/resources/v1/client/index.js +38 -0
  333. package/dist/serialization/resources/events/resources/v1/client/scan.d.ts +17 -0
  334. package/dist/serialization/resources/events/resources/v1/client/scan.js +75 -0
  335. package/dist/serialization/resources/events/resources/v1/index.d.ts +2 -0
  336. package/dist/serialization/resources/events/resources/v1/index.js +18 -0
  337. package/dist/serialization/resources/events/resources/v1/types/Event.d.ts +15 -0
  338. package/dist/serialization/resources/events/resources/v1/types/Event.js +47 -0
  339. package/dist/serialization/resources/events/resources/v1/types/EventId.d.ts +7 -0
  340. package/dist/serialization/resources/events/resources/v1/types/EventId.js +43 -0
  341. package/dist/serialization/resources/events/resources/v1/types/EventScanPage.d.ts +12 -0
  342. package/dist/serialization/resources/events/resources/v1/types/EventScanPage.js +44 -0
  343. package/dist/serialization/resources/events/resources/v1/types/index.d.ts +3 -0
  344. package/dist/serialization/resources/events/resources/v1/types/index.js +19 -0
  345. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/D8Date.d.ts +1 -1
  346. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/D8Date.js +5 -1
  347. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/Rd8Date.js +2 -2
  348. package/dist/serialization/resources/index.d.ts +1 -0
  349. package/dist/serialization/resources/index.js +3 -2
  350. package/dist/version.d.ts +1 -1
  351. package/dist/version.js +1 -1
  352. package/package.json +1 -1
  353. package/reference.md +574 -22
  354. package/serialization/resources/commons/types/BadRequestErrorMessage.d.ts +9 -0
  355. package/serialization/resources/commons/types/BadRequestErrorMessage.js +41 -0
  356. package/serialization/resources/commons/types/InternalErrorMessage.d.ts +9 -0
  357. package/serialization/resources/commons/types/InternalErrorMessage.js +41 -0
  358. package/serialization/resources/commons/types/index.d.ts +2 -0
  359. package/serialization/resources/commons/types/index.js +2 -0
  360. package/serialization/resources/contracts/resources/index.d.ts +1 -0
  361. package/serialization/resources/contracts/resources/index.js +2 -1
  362. package/serialization/resources/contracts/resources/v3/client/createContractServiceFacility.d.ts +12 -0
  363. package/serialization/resources/contracts/resources/v3/client/createContractServiceFacility.js +69 -0
  364. package/serialization/resources/contracts/resources/v3/client/delete.d.ts +12 -0
  365. package/serialization/resources/contracts/resources/v3/client/delete.js +69 -0
  366. package/serialization/resources/contracts/resources/v3/client/get.d.ts +12 -0
  367. package/serialization/resources/contracts/resources/v3/client/get.js +69 -0
  368. package/serialization/resources/contracts/resources/v3/client/index.d.ts +6 -0
  369. package/serialization/resources/contracts/resources/v3/client/index.js +45 -0
  370. package/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.d.ts +9 -0
  371. package/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityCreate.js +40 -0
  372. package/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.d.ts +10 -0
  373. package/serialization/resources/contracts/resources/v3/client/requests/ContractServiceFacilityUpdate.js +42 -0
  374. package/serialization/resources/contracts/resources/v3/client/requests/index.d.ts +2 -0
  375. package/serialization/resources/contracts/resources/v3/client/requests/index.js +7 -0
  376. package/serialization/resources/contracts/resources/v3/client/update.d.ts +17 -0
  377. package/serialization/resources/contracts/resources/v3/client/update.js +75 -0
  378. package/serialization/resources/contracts/resources/v3/client/updateContractServiceFacility.d.ts +12 -0
  379. package/serialization/resources/contracts/resources/v3/client/updateContractServiceFacility.js +69 -0
  380. package/serialization/resources/contracts/resources/v3/index.d.ts +2 -0
  381. package/serialization/resources/contracts/resources/v3/index.js +18 -0
  382. package/serialization/resources/contracts/resources/v3/types/Contract.d.ts +16 -0
  383. package/serialization/resources/contracts/resources/v3/types/Contract.js +50 -0
  384. package/serialization/resources/contracts/resources/v3/types/ContractBase.d.ts +21 -0
  385. package/serialization/resources/contracts/resources/v3/types/ContractBase.js +53 -0
  386. package/serialization/resources/contracts/resources/v3/types/ContractCreate.d.ts +14 -0
  387. package/serialization/resources/contracts/resources/v3/types/ContractCreate.js +48 -0
  388. package/serialization/resources/contracts/resources/v3/types/ContractCreateUnion.d.ts +15 -0
  389. package/serialization/resources/contracts/resources/v3/types/ContractCreateUnion.js +49 -0
  390. package/serialization/resources/contracts/resources/v3/types/ContractId.d.ts +7 -0
  391. package/serialization/resources/contracts/resources/v3/types/ContractId.js +43 -0
  392. package/serialization/resources/contracts/resources/v3/types/ContractServiceFacility.d.ts +13 -0
  393. package/serialization/resources/contracts/resources/v3/types/ContractServiceFacility.js +47 -0
  394. package/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityBase.d.ts +10 -0
  395. package/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityBase.js +42 -0
  396. package/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityId.d.ts +7 -0
  397. package/serialization/resources/contracts/resources/v3/types/ContractServiceFacilityId.js +43 -0
  398. package/serialization/resources/contracts/resources/v3/types/ContractType.d.ts +7 -0
  399. package/serialization/resources/contracts/resources/v3/types/ContractType.js +39 -0
  400. package/serialization/resources/contracts/resources/v3/types/ContractUnion.d.ts +14 -0
  401. package/serialization/resources/contracts/resources/v3/types/ContractUnion.js +48 -0
  402. package/serialization/resources/contracts/resources/v3/types/ContractUpdate.d.ts +22 -0
  403. package/serialization/resources/contracts/resources/v3/types/ContractUpdate.js +54 -0
  404. package/serialization/resources/contracts/resources/v3/types/ContractUpdateUnion.d.ts +15 -0
  405. package/serialization/resources/contracts/resources/v3/types/ContractUpdateUnion.js +49 -0
  406. package/serialization/resources/contracts/resources/v3/types/ContractWithProvidersUnion.d.ts +15 -0
  407. package/serialization/resources/contracts/resources/v3/types/ContractWithProvidersUnion.js +49 -0
  408. package/serialization/resources/contracts/resources/v3/types/ContractingProviderId.d.ts +7 -0
  409. package/serialization/resources/contracts/resources/v3/types/ContractingProviderId.js +43 -0
  410. package/serialization/resources/contracts/resources/v3/types/ContractsPage.d.ts +11 -0
  411. package/serialization/resources/contracts/resources/v3/types/ContractsPage.js +45 -0
  412. package/serialization/resources/contracts/resources/v3/types/InstitutionalContract.d.ts +11 -0
  413. package/serialization/resources/contracts/resources/v3/types/InstitutionalContract.js +45 -0
  414. package/serialization/resources/contracts/resources/v3/types/InstitutionalContractCreate.d.ts +11 -0
  415. package/serialization/resources/contracts/resources/v3/types/InstitutionalContractCreate.js +45 -0
  416. package/serialization/resources/contracts/resources/v3/types/InstitutionalContractUpdate.d.ts +11 -0
  417. package/serialization/resources/contracts/resources/v3/types/InstitutionalContractUpdate.js +45 -0
  418. package/serialization/resources/contracts/resources/v3/types/ProfessionalContract.d.ts +10 -0
  419. package/serialization/resources/contracts/resources/v3/types/ProfessionalContract.js +44 -0
  420. package/serialization/resources/contracts/resources/v3/types/ProfessionalContractCreate.d.ts +11 -0
  421. package/serialization/resources/contracts/resources/v3/types/ProfessionalContractCreate.js +45 -0
  422. package/serialization/resources/contracts/resources/v3/types/ProfessionalContractUpdate.d.ts +11 -0
  423. package/serialization/resources/contracts/resources/v3/types/ProfessionalContractUpdate.js +45 -0
  424. package/serialization/resources/contracts/resources/v3/types/RenderingProviderid.d.ts +7 -0
  425. package/serialization/resources/contracts/resources/v3/types/RenderingProviderid.js +43 -0
  426. package/serialization/resources/contracts/resources/v3/types/index.d.ts +22 -0
  427. package/serialization/resources/contracts/resources/v3/types/index.js +38 -0
  428. package/serialization/resources/events/index.d.ts +1 -0
  429. package/serialization/resources/events/index.js +17 -0
  430. package/serialization/resources/events/resources/index.d.ts +1 -0
  431. package/serialization/resources/events/resources/index.js +37 -0
  432. package/serialization/resources/events/resources/v1/client/get.d.ts +22 -0
  433. package/serialization/resources/events/resources/v1/client/get.js +81 -0
  434. package/serialization/resources/events/resources/v1/client/index.d.ts +2 -0
  435. package/serialization/resources/events/resources/v1/client/index.js +38 -0
  436. package/serialization/resources/events/resources/v1/client/scan.d.ts +17 -0
  437. package/serialization/resources/events/resources/v1/client/scan.js +75 -0
  438. package/serialization/resources/events/resources/v1/index.d.ts +2 -0
  439. package/serialization/resources/events/resources/v1/index.js +18 -0
  440. package/serialization/resources/events/resources/v1/types/Event.d.ts +15 -0
  441. package/serialization/resources/events/resources/v1/types/Event.js +47 -0
  442. package/serialization/resources/events/resources/v1/types/EventId.d.ts +7 -0
  443. package/serialization/resources/events/resources/v1/types/EventId.js +43 -0
  444. package/serialization/resources/events/resources/v1/types/EventScanPage.d.ts +12 -0
  445. package/serialization/resources/events/resources/v1/types/EventScanPage.js +44 -0
  446. package/serialization/resources/events/resources/v1/types/index.d.ts +3 -0
  447. package/serialization/resources/events/resources/v1/types/index.js +19 -0
  448. package/serialization/resources/healthCareCodeInformation/resources/v1/types/D8Date.d.ts +1 -1
  449. package/serialization/resources/healthCareCodeInformation/resources/v1/types/D8Date.js +5 -1
  450. package/serialization/resources/healthCareCodeInformation/resources/v1/types/Rd8Date.js +2 -2
  451. package/serialization/resources/index.d.ts +1 -0
  452. package/serialization/resources/index.js +3 -2
  453. package/version.d.ts +1 -1
  454. package/version.js +1 -1
@@ -0,0 +1,603 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.V3 = void 0;
47
+ const core = __importStar(require("../../../../../../core"));
48
+ const headers_1 = require("../../../../../../core/headers");
49
+ const environments = __importStar(require("../../../../../../environments"));
50
+ const serializers = __importStar(require("../../../../../../serialization/index"));
51
+ const CandidApi = __importStar(require("../../../../../index"));
52
+ class V3 {
53
+ constructor(_options = {}) {
54
+ this._options = _options;
55
+ }
56
+ /**
57
+ * @param {CandidApi.contracts.v3.ContractId} contractId
58
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @example
61
+ * await client.contracts.v3.get(CandidApi.contracts.v3.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
62
+ */
63
+ get(contractId, requestOptions) {
64
+ return core.HttpResponsePromise.fromPromise(this.__get(contractId, requestOptions));
65
+ }
66
+ __get(contractId, requestOptions) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
69
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
70
+ const _response = yield core.fetcher({
71
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/contracts/v3/${core.url.encodePathParam(serializers.contracts.v3.ContractId.jsonOrThrow(contractId))}`),
72
+ method: "GET",
73
+ headers: _headers,
74
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
75
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
76
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
77
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
78
+ });
79
+ if (_response.ok) {
80
+ return {
81
+ data: {
82
+ ok: true,
83
+ body: serializers.contracts.v3.ContractWithProvidersUnion.parseOrThrow(_response.body, {
84
+ unrecognizedObjectKeys: "passthrough",
85
+ allowUnrecognizedUnionMembers: true,
86
+ allowUnrecognizedEnumValues: true,
87
+ breadcrumbsPrefix: ["response"],
88
+ }),
89
+ headers: _response.headers,
90
+ rawResponse: _response.rawResponse,
91
+ },
92
+ rawResponse: _response.rawResponse,
93
+ };
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
97
+ case "EntityNotFoundError":
98
+ return {
99
+ data: {
100
+ ok: false,
101
+ error: serializers.contracts.v3.get.Error.parseOrThrow(_response.error.body, {
102
+ unrecognizedObjectKeys: "passthrough",
103
+ allowUnrecognizedUnionMembers: true,
104
+ allowUnrecognizedEnumValues: true,
105
+ breadcrumbsPrefix: ["response"],
106
+ }),
107
+ rawResponse: _response.rawResponse,
108
+ },
109
+ rawResponse: _response.rawResponse,
110
+ };
111
+ }
112
+ }
113
+ return {
114
+ data: {
115
+ ok: false,
116
+ error: CandidApi.contracts.v3.get.Error._unknown(_response.error),
117
+ rawResponse: _response.rawResponse,
118
+ },
119
+ rawResponse: _response.rawResponse,
120
+ };
121
+ });
122
+ }
123
+ /**
124
+ * @param {CandidApi.contracts.v3.GetMultiContractsRequest} request
125
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
126
+ *
127
+ * @example
128
+ * await client.contracts.v3.getMulti()
129
+ */
130
+ getMulti(request = {}, requestOptions) {
131
+ return core.HttpResponsePromise.fromPromise(this.__getMulti(request, requestOptions));
132
+ }
133
+ __getMulti() {
134
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
135
+ var _a, _b, _c, _d, _e, _f, _g, _h;
136
+ const { pageToken, limit, type: type_, contractingProviderId, renderingProviderIds, payerNames, states, contractStatus, sort, sortDirection, } = request;
137
+ const _queryParams = {};
138
+ if (pageToken != null) {
139
+ _queryParams.page_token = pageToken;
140
+ }
141
+ if (limit != null) {
142
+ _queryParams.limit = limit.toString();
143
+ }
144
+ if (type_ != null) {
145
+ _queryParams.type = serializers.contracts.v3.ContractType.jsonOrThrow(type_, {
146
+ unrecognizedObjectKeys: "strip",
147
+ });
148
+ }
149
+ if (contractingProviderId != null) {
150
+ _queryParams.contracting_provider_id = contractingProviderId;
151
+ }
152
+ if (renderingProviderIds != null) {
153
+ if (Array.isArray(renderingProviderIds)) {
154
+ _queryParams.rendering_provider_ids = renderingProviderIds.map((item) => serializers.contracts.v3.RenderingProviderid.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
155
+ }
156
+ else {
157
+ _queryParams.rendering_provider_ids = renderingProviderIds;
158
+ }
159
+ }
160
+ if (payerNames != null) {
161
+ if (Array.isArray(payerNames)) {
162
+ _queryParams.payer_names = payerNames.map((item) => item);
163
+ }
164
+ else {
165
+ _queryParams.payer_names = payerNames;
166
+ }
167
+ }
168
+ if (states != null) {
169
+ if (Array.isArray(states)) {
170
+ _queryParams.states = states.map((item) => serializers.State.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
171
+ }
172
+ else {
173
+ _queryParams.states = serializers.State.jsonOrThrow(states, { unrecognizedObjectKeys: "strip" });
174
+ }
175
+ }
176
+ if (contractStatus != null) {
177
+ _queryParams.contract_status = serializers.contracts.v2.ContractStatus.jsonOrThrow(contractStatus, {
178
+ unrecognizedObjectKeys: "strip",
179
+ });
180
+ }
181
+ if (sort != null) {
182
+ _queryParams.sort = serializers.contracts.v2.ContractSortField.jsonOrThrow(sort, {
183
+ unrecognizedObjectKeys: "strip",
184
+ });
185
+ }
186
+ if (sortDirection != null) {
187
+ _queryParams.sort_direction = serializers.SortDirection.jsonOrThrow(sortDirection, {
188
+ unrecognizedObjectKeys: "strip",
189
+ });
190
+ }
191
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
192
+ const _response = yield core.fetcher({
193
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, "/api/contracts/v3"),
194
+ method: "GET",
195
+ headers: _headers,
196
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
197
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
198
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
199
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
200
+ });
201
+ if (_response.ok) {
202
+ return {
203
+ data: {
204
+ ok: true,
205
+ body: serializers.contracts.v3.ContractsPage.parseOrThrow(_response.body, {
206
+ unrecognizedObjectKeys: "passthrough",
207
+ allowUnrecognizedUnionMembers: true,
208
+ allowUnrecognizedEnumValues: true,
209
+ breadcrumbsPrefix: ["response"],
210
+ }),
211
+ headers: _response.headers,
212
+ rawResponse: _response.rawResponse,
213
+ },
214
+ rawResponse: _response.rawResponse,
215
+ };
216
+ }
217
+ return {
218
+ data: {
219
+ ok: false,
220
+ error: CandidApi.contracts.v3.getMulti.Error._unknown(_response.error),
221
+ rawResponse: _response.rawResponse,
222
+ },
223
+ rawResponse: _response.rawResponse,
224
+ };
225
+ });
226
+ }
227
+ /**
228
+ * Creates a new contract within the user's current organization
229
+ *
230
+ * @param {CandidApi.contracts.v3.ContractCreateUnion} request
231
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
232
+ *
233
+ * @example
234
+ * await client.contracts.v3.create({
235
+ * type: "professional",
236
+ * renderingProviderIds: new Set([CandidApi.contracts.v3.RenderingProviderid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")]),
237
+ * contractType: "professional",
238
+ * contractingProviderId: CandidApi.contracts.v3.ContractingProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
239
+ * payerUuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
240
+ * effectiveDate: CandidApi.Date_("effective_date"),
241
+ * regions: {
242
+ * type: "states",
243
+ * states: ["AA", "AA"]
244
+ * },
245
+ * commercialInsuranceTypes: {
246
+ * type: "allApply"
247
+ * },
248
+ * medicareInsuranceTypes: {
249
+ * type: "allApply"
250
+ * },
251
+ * medicaidInsuranceTypes: {
252
+ * type: "allApply"
253
+ * }
254
+ * })
255
+ */
256
+ create(request, requestOptions) {
257
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
258
+ }
259
+ __create(request, requestOptions) {
260
+ return __awaiter(this, void 0, void 0, function* () {
261
+ var _a, _b, _c, _d, _e, _f, _g, _h;
262
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
263
+ const _response = yield core.fetcher({
264
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, "/api/contracts/v3"),
265
+ method: "POST",
266
+ headers: _headers,
267
+ contentType: "application/json",
268
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
269
+ requestType: "json",
270
+ body: serializers.contracts.v3.ContractCreateUnion.jsonOrThrow(request, {
271
+ unrecognizedObjectKeys: "strip",
272
+ }),
273
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
274
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
275
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
276
+ });
277
+ if (_response.ok) {
278
+ return {
279
+ data: {
280
+ ok: true,
281
+ body: serializers.contracts.v3.ContractWithProvidersUnion.parseOrThrow(_response.body, {
282
+ unrecognizedObjectKeys: "passthrough",
283
+ allowUnrecognizedUnionMembers: true,
284
+ allowUnrecognizedEnumValues: true,
285
+ breadcrumbsPrefix: ["response"],
286
+ }),
287
+ headers: _response.headers,
288
+ rawResponse: _response.rawResponse,
289
+ },
290
+ rawResponse: _response.rawResponse,
291
+ };
292
+ }
293
+ return {
294
+ data: {
295
+ ok: false,
296
+ error: CandidApi.contracts.v3.create.Error._unknown(_response.error),
297
+ rawResponse: _response.rawResponse,
298
+ },
299
+ rawResponse: _response.rawResponse,
300
+ };
301
+ });
302
+ }
303
+ /**
304
+ * @param {CandidApi.contracts.v3.ContractId} contractId
305
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
306
+ *
307
+ * @example
308
+ * await client.contracts.v3.delete(CandidApi.contracts.v3.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
309
+ */
310
+ delete(contractId, requestOptions) {
311
+ return core.HttpResponsePromise.fromPromise(this.__delete(contractId, requestOptions));
312
+ }
313
+ __delete(contractId, requestOptions) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
316
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
317
+ const _response = yield core.fetcher({
318
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/contracts/v3/${core.url.encodePathParam(serializers.contracts.v3.ContractId.jsonOrThrow(contractId))}`),
319
+ method: "DELETE",
320
+ headers: _headers,
321
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
322
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
323
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
324
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
325
+ });
326
+ if (_response.ok) {
327
+ return {
328
+ data: {
329
+ ok: true,
330
+ body: undefined,
331
+ headers: _response.headers,
332
+ rawResponse: _response.rawResponse,
333
+ },
334
+ rawResponse: _response.rawResponse,
335
+ };
336
+ }
337
+ if (_response.error.reason === "status-code") {
338
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
339
+ case "ContractIsLinkedToFeeScheduleHttpError":
340
+ return {
341
+ data: {
342
+ ok: false,
343
+ error: serializers.contracts.v3.delete.Error.parseOrThrow(_response.error.body, {
344
+ unrecognizedObjectKeys: "passthrough",
345
+ allowUnrecognizedUnionMembers: true,
346
+ allowUnrecognizedEnumValues: true,
347
+ breadcrumbsPrefix: ["response"],
348
+ }),
349
+ rawResponse: _response.rawResponse,
350
+ },
351
+ rawResponse: _response.rawResponse,
352
+ };
353
+ }
354
+ }
355
+ return {
356
+ data: {
357
+ ok: false,
358
+ error: CandidApi.contracts.v3.delete.Error._unknown(_response.error),
359
+ rawResponse: _response.rawResponse,
360
+ },
361
+ rawResponse: _response.rawResponse,
362
+ };
363
+ });
364
+ }
365
+ /**
366
+ * @param {CandidApi.contracts.v3.ContractId} contractId
367
+ * @param {CandidApi.contracts.v3.ContractUpdateUnion} request
368
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
369
+ *
370
+ * @example
371
+ * await client.contracts.v3.update(CandidApi.contracts.v3.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
372
+ * type: "professional"
373
+ * })
374
+ */
375
+ update(contractId, request, requestOptions) {
376
+ return core.HttpResponsePromise.fromPromise(this.__update(contractId, request, requestOptions));
377
+ }
378
+ __update(contractId, request, requestOptions) {
379
+ return __awaiter(this, void 0, void 0, function* () {
380
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
381
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
382
+ const _response = yield core.fetcher({
383
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/contracts/v3/${core.url.encodePathParam(serializers.contracts.v3.ContractId.jsonOrThrow(contractId))}`),
384
+ method: "PATCH",
385
+ headers: _headers,
386
+ contentType: "application/json",
387
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
388
+ requestType: "json",
389
+ body: serializers.contracts.v3.ContractUpdateUnion.jsonOrThrow(request, {
390
+ unrecognizedObjectKeys: "strip",
391
+ }),
392
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
393
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
394
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
395
+ });
396
+ if (_response.ok) {
397
+ return {
398
+ data: {
399
+ ok: true,
400
+ body: serializers.contracts.v3.ContractWithProvidersUnion.parseOrThrow(_response.body, {
401
+ unrecognizedObjectKeys: "passthrough",
402
+ allowUnrecognizedUnionMembers: true,
403
+ allowUnrecognizedEnumValues: true,
404
+ breadcrumbsPrefix: ["response"],
405
+ }),
406
+ headers: _response.headers,
407
+ rawResponse: _response.rawResponse,
408
+ },
409
+ rawResponse: _response.rawResponse,
410
+ };
411
+ }
412
+ if (_response.error.reason === "status-code") {
413
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
414
+ case "UnprocessableEntityError":
415
+ case "ContractInvalidExpirationDateHttpError":
416
+ return {
417
+ data: {
418
+ ok: false,
419
+ error: serializers.contracts.v3.update.Error.parseOrThrow(_response.error.body, {
420
+ unrecognizedObjectKeys: "passthrough",
421
+ allowUnrecognizedUnionMembers: true,
422
+ allowUnrecognizedEnumValues: true,
423
+ breadcrumbsPrefix: ["response"],
424
+ }),
425
+ rawResponse: _response.rawResponse,
426
+ },
427
+ rawResponse: _response.rawResponse,
428
+ };
429
+ }
430
+ }
431
+ return {
432
+ data: {
433
+ ok: false,
434
+ error: CandidApi.contracts.v3.update.Error._unknown(_response.error),
435
+ rawResponse: _response.rawResponse,
436
+ },
437
+ rawResponse: _response.rawResponse,
438
+ };
439
+ });
440
+ }
441
+ /**
442
+ * @param {CandidApi.contracts.v3.ContractId} contractId
443
+ * @param {CandidApi.contracts.v3.ContractServiceFacilityCreate} request
444
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
445
+ *
446
+ * @example
447
+ * await client.contracts.v3.createContractServiceFacility(CandidApi.contracts.v3.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
448
+ * serviceFacilityId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
449
+ * providerIds: new Set(["d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"])
450
+ * })
451
+ */
452
+ createContractServiceFacility(contractId, request, requestOptions) {
453
+ return core.HttpResponsePromise.fromPromise(this.__createContractServiceFacility(contractId, request, requestOptions));
454
+ }
455
+ __createContractServiceFacility(contractId, request, requestOptions) {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
458
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
459
+ const _response = yield core.fetcher({
460
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/contracts/v3/${core.url.encodePathParam(serializers.contracts.v3.ContractId.jsonOrThrow(contractId))}/service-facilities`),
461
+ method: "POST",
462
+ headers: _headers,
463
+ contentType: "application/json",
464
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
465
+ requestType: "json",
466
+ body: serializers.contracts.v3.ContractServiceFacilityCreate.jsonOrThrow(request, {
467
+ unrecognizedObjectKeys: "strip",
468
+ }),
469
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
470
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
471
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
472
+ });
473
+ if (_response.ok) {
474
+ return {
475
+ data: {
476
+ ok: true,
477
+ body: serializers.contracts.v3.ContractServiceFacility.parseOrThrow(_response.body, {
478
+ unrecognizedObjectKeys: "passthrough",
479
+ allowUnrecognizedUnionMembers: true,
480
+ allowUnrecognizedEnumValues: true,
481
+ breadcrumbsPrefix: ["response"],
482
+ }),
483
+ headers: _response.headers,
484
+ rawResponse: _response.rawResponse,
485
+ },
486
+ rawResponse: _response.rawResponse,
487
+ };
488
+ }
489
+ if (_response.error.reason === "status-code") {
490
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
491
+ case "UnprocessableEntityError":
492
+ return {
493
+ data: {
494
+ ok: false,
495
+ error: serializers.contracts.v3.createContractServiceFacility.Error.parseOrThrow(_response.error
496
+ .body, {
497
+ unrecognizedObjectKeys: "passthrough",
498
+ allowUnrecognizedUnionMembers: true,
499
+ allowUnrecognizedEnumValues: true,
500
+ breadcrumbsPrefix: ["response"],
501
+ }),
502
+ rawResponse: _response.rawResponse,
503
+ },
504
+ rawResponse: _response.rawResponse,
505
+ };
506
+ }
507
+ }
508
+ return {
509
+ data: {
510
+ ok: false,
511
+ error: CandidApi.contracts.v3.createContractServiceFacility.Error._unknown(_response.error),
512
+ rawResponse: _response.rawResponse,
513
+ },
514
+ rawResponse: _response.rawResponse,
515
+ };
516
+ });
517
+ }
518
+ /**
519
+ * @param {CandidApi.contracts.v3.ContractId} contractId
520
+ * @param {CandidApi.contracts.v3.ContractServiceFacilityId} contractServiceFacilityId
521
+ * @param {CandidApi.contracts.v3.ContractServiceFacilityUpdate} request
522
+ * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
523
+ *
524
+ * @example
525
+ * await client.contracts.v3.updateContractServiceFacility(CandidApi.contracts.v3.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), CandidApi.contracts.v3.ContractServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
526
+ */
527
+ updateContractServiceFacility(contractId, contractServiceFacilityId, request = {}, requestOptions) {
528
+ return core.HttpResponsePromise.fromPromise(this.__updateContractServiceFacility(contractId, contractServiceFacilityId, request, requestOptions));
529
+ }
530
+ __updateContractServiceFacility(contractId_1, contractServiceFacilityId_1) {
531
+ return __awaiter(this, arguments, void 0, function* (contractId, contractServiceFacilityId, request = {}, requestOptions) {
532
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
533
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
534
+ const _response = yield core.fetcher({
535
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/contracts/v3/${core.url.encodePathParam(serializers.contracts.v3.ContractId.jsonOrThrow(contractId))}/service-facilities/${core.url.encodePathParam(serializers.contracts.v3.ContractServiceFacilityId.jsonOrThrow(contractServiceFacilityId))}`),
536
+ method: "PATCH",
537
+ headers: _headers,
538
+ contentType: "application/json",
539
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
540
+ requestType: "json",
541
+ body: serializers.contracts.v3.ContractServiceFacilityUpdate.jsonOrThrow(request, {
542
+ unrecognizedObjectKeys: "strip",
543
+ }),
544
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
545
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
546
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
547
+ });
548
+ if (_response.ok) {
549
+ return {
550
+ data: {
551
+ ok: true,
552
+ body: serializers.contracts.v3.ContractServiceFacility.parseOrThrow(_response.body, {
553
+ unrecognizedObjectKeys: "passthrough",
554
+ allowUnrecognizedUnionMembers: true,
555
+ allowUnrecognizedEnumValues: true,
556
+ breadcrumbsPrefix: ["response"],
557
+ }),
558
+ headers: _response.headers,
559
+ rawResponse: _response.rawResponse,
560
+ },
561
+ rawResponse: _response.rawResponse,
562
+ };
563
+ }
564
+ if (_response.error.reason === "status-code") {
565
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
566
+ case "UnprocessableEntityError":
567
+ return {
568
+ data: {
569
+ ok: false,
570
+ error: serializers.contracts.v3.updateContractServiceFacility.Error.parseOrThrow(_response.error
571
+ .body, {
572
+ unrecognizedObjectKeys: "passthrough",
573
+ allowUnrecognizedUnionMembers: true,
574
+ allowUnrecognizedEnumValues: true,
575
+ breadcrumbsPrefix: ["response"],
576
+ }),
577
+ rawResponse: _response.rawResponse,
578
+ },
579
+ rawResponse: _response.rawResponse,
580
+ };
581
+ }
582
+ }
583
+ return {
584
+ data: {
585
+ ok: false,
586
+ error: CandidApi.contracts.v3.updateContractServiceFacility.Error._unknown(_response.error),
587
+ rawResponse: _response.rawResponse,
588
+ },
589
+ rawResponse: _response.rawResponse,
590
+ };
591
+ });
592
+ }
593
+ _getAuthorizationHeader() {
594
+ return __awaiter(this, void 0, void 0, function* () {
595
+ const bearer = yield core.Supplier.get(this._options.token);
596
+ if (bearer != null) {
597
+ return `Bearer ${bearer}`;
598
+ }
599
+ return undefined;
600
+ });
601
+ }
602
+ }
603
+ exports.V3 = V3;
@@ -0,0 +1,19 @@
1
+ import type * as core from "../../../../../../core";
2
+ import * as CandidApi from "../../../../../index";
3
+ export type Error = CandidApi.contracts.v3.create.Error._Unknown;
4
+ export declare namespace Error {
5
+ interface _Unknown extends _Utils {
6
+ errorName: void;
7
+ content: core.Fetcher.Error;
8
+ }
9
+ interface _Utils {
10
+ _visit: <_Result>(visitor: CandidApi.contracts.v3.create.Error._Visitor<_Result>) => _Result;
11
+ }
12
+ interface _Visitor<_Result> {
13
+ _other: (value: core.Fetcher.Error) => _Result;
14
+ }
15
+ }
16
+ export declare const Error: {
17
+ readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.contracts.v3.create.Error._Unknown;
18
+ readonly _visit: <_Result>(value: CandidApi.contracts.v3.create.Error, visitor: CandidApi.contracts.v3.create.Error._Visitor<_Result>) => _Result;
19
+ };