candidhealth 0.24.0-2a6d412 → 0.24.2

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 (235) hide show
  1. package/Client.d.ts +3 -0
  2. package/README.md +134 -6
  3. package/api/resources/auth/client/Client.d.ts +3 -0
  4. package/api/resources/auth/resources/v2/client/Client.d.ts +4 -1
  5. package/api/resources/auth/resources/v2/client/Client.js +6 -7
  6. package/api/resources/billingNotes/client/Client.d.ts +3 -0
  7. package/api/resources/billingNotes/resources/v2/client/Client.d.ts +4 -1
  8. package/api/resources/billingNotes/resources/v2/client/Client.js +5 -4
  9. package/api/resources/contracts/client/Client.d.ts +3 -0
  10. package/api/resources/contracts/resources/v2/client/Client.d.ts +8 -5
  11. package/api/resources/contracts/resources/v2/client/Client.js +27 -26
  12. package/api/resources/eligibility/client/Client.d.ts +3 -0
  13. package/api/resources/eligibility/resources/v2/client/Client.d.ts +6 -3
  14. package/api/resources/eligibility/resources/v2/client/Client.js +12 -9
  15. package/api/resources/encounters/client/Client.d.ts +3 -0
  16. package/api/resources/encounters/resources/v4/client/Client.d.ts +7 -19
  17. package/api/resources/encounters/resources/v4/client/Client.js +22 -37
  18. package/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -21
  19. package/api/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
  20. package/api/resources/expectedNetworkStatus/client/Client.d.ts +3 -0
  21. package/api/resources/expectedNetworkStatus/resources/v1/client/Client.d.ts +4 -1
  22. package/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +5 -4
  23. package/api/resources/expectedNetworkStatus/resources/v2/client/Client.d.ts +5 -2
  24. package/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +13 -11
  25. package/api/resources/exports/client/Client.d.ts +3 -0
  26. package/api/resources/exports/resources/v3/client/Client.d.ts +4 -1
  27. package/api/resources/exports/resources/v3/client/Client.js +5 -4
  28. package/api/resources/externalPaymentAccountConfig/client/Client.d.ts +3 -0
  29. package/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.d.ts +4 -1
  30. package/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +4 -3
  31. package/api/resources/feeSchedules/client/Client.d.ts +3 -0
  32. package/api/resources/feeSchedules/resources/v3/client/Client.d.ts +13 -10
  33. package/api/resources/feeSchedules/resources/v3/client/Client.js +52 -44
  34. package/api/resources/guarantor/client/Client.d.ts +3 -0
  35. package/api/resources/guarantor/resources/v1/client/Client.d.ts +6 -3
  36. package/api/resources/guarantor/resources/v1/client/Client.js +18 -19
  37. package/api/resources/importInvoice/client/Client.d.ts +3 -0
  38. package/api/resources/importInvoice/resources/v1/client/Client.d.ts +7 -4
  39. package/api/resources/importInvoice/resources/v1/client/Client.js +22 -18
  40. package/api/resources/insuranceAdjudications/client/Client.d.ts +3 -0
  41. package/api/resources/insuranceAdjudications/resources/v1/client/Client.d.ts +6 -3
  42. package/api/resources/insuranceAdjudications/resources/v1/client/Client.js +15 -12
  43. package/api/resources/insurancePayments/client/Client.d.ts +3 -0
  44. package/api/resources/insurancePayments/resources/v1/client/Client.d.ts +8 -5
  45. package/api/resources/insurancePayments/resources/v1/client/Client.js +29 -24
  46. package/api/resources/insuranceRefunds/client/Client.d.ts +3 -0
  47. package/api/resources/insuranceRefunds/resources/v1/client/Client.d.ts +8 -5
  48. package/api/resources/insuranceRefunds/resources/v1/client/Client.js +29 -24
  49. package/api/resources/organizationProviders/client/Client.d.ts +3 -0
  50. package/api/resources/organizationProviders/resources/v3/client/Client.d.ts +7 -4
  51. package/api/resources/organizationProviders/resources/v3/client/Client.js +23 -19
  52. package/api/resources/organizationServiceFacilities/client/Client.d.ts +3 -0
  53. package/api/resources/organizationServiceFacilities/resources/v2/client/Client.d.ts +8 -5
  54. package/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +32 -23
  55. package/api/resources/patientPayments/client/Client.d.ts +3 -0
  56. package/api/resources/patientPayments/resources/v4/client/Client.d.ts +8 -5
  57. package/api/resources/patientPayments/resources/v4/client/Client.js +29 -24
  58. package/api/resources/patientRefunds/client/Client.d.ts +3 -0
  59. package/api/resources/patientRefunds/resources/v1/client/Client.d.ts +8 -5
  60. package/api/resources/patientRefunds/resources/v1/client/Client.js +29 -24
  61. package/api/resources/payers/client/Client.d.ts +3 -0
  62. package/api/resources/payers/resources/v3/client/Client.d.ts +5 -2
  63. package/api/resources/payers/resources/v3/client/Client.js +9 -7
  64. package/api/resources/preEncounter/client/Client.d.ts +3 -0
  65. package/api/resources/preEncounter/resources/coverages/client/Client.d.ts +3 -0
  66. package/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.d.ts +3 -0
  67. package/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.d.ts +9 -6
  68. package/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.js +31 -25
  69. package/api/resources/preEncounter/resources/patients/client/Client.d.ts +3 -0
  70. package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +3 -0
  71. package/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.d.ts +10 -7
  72. package/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.js +38 -31
  73. package/api/resources/serviceFacility/client/Client.d.ts +4 -1
  74. package/api/resources/serviceFacility/client/Client.js +6 -7
  75. package/api/resources/tasks/client/Client.d.ts +3 -0
  76. package/api/resources/tasks/resources/v3/client/Client.d.ts +8 -5
  77. package/api/resources/tasks/resources/v3/client/Client.js +28 -23
  78. package/api/resources/writeOffs/client/Client.d.ts +3 -0
  79. package/api/resources/writeOffs/resources/v1/client/Client.d.ts +7 -4
  80. package/api/resources/writeOffs/resources/v1/client/Client.js +19 -15
  81. package/core/fetcher/Fetcher.d.ts +3 -0
  82. package/core/fetcher/Fetcher.js +22 -153
  83. package/core/fetcher/createRequestUrl.d.ts +1 -0
  84. package/core/fetcher/createRequestUrl.js +13 -0
  85. package/core/fetcher/getFetchFn.d.ts +4 -0
  86. package/core/fetcher/getFetchFn.js +59 -0
  87. package/core/fetcher/getRequestBody.d.ts +7 -0
  88. package/core/fetcher/getRequestBody.js +23 -0
  89. package/core/fetcher/getResponseBody.d.ts +1 -0
  90. package/core/fetcher/getResponseBody.js +48 -0
  91. package/core/fetcher/makeRequest.d.ts +1 -0
  92. package/core/fetcher/makeRequest.js +42 -0
  93. package/core/fetcher/requestWithRetries.d.ts +1 -0
  94. package/core/fetcher/requestWithRetries.js +32 -0
  95. package/core/fetcher/signals.d.ts +12 -0
  96. package/core/fetcher/signals.js +37 -0
  97. package/core/runtime/runtime.d.ts +2 -1
  98. package/core/runtime/runtime.js +12 -1
  99. package/core/schemas/Schema.d.ts +7 -4
  100. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  101. package/core/schemas/builders/lazy/lazy.js +8 -19
  102. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  103. package/core/schemas/builders/list/list.js +31 -44
  104. package/core/schemas/builders/object/object.js +90 -111
  105. package/core/schemas/builders/object/types.d.ts +2 -2
  106. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  107. package/core/schemas/builders/record/record.js +49 -60
  108. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  109. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  110. package/core/schemas/builders/set/set.js +6 -15
  111. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  112. package/core/schemas/builders/union/union.js +51 -62
  113. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  114. package/dist/Client.d.ts +3 -0
  115. package/dist/api/resources/auth/client/Client.d.ts +3 -0
  116. package/dist/api/resources/auth/resources/v2/client/Client.d.ts +4 -1
  117. package/dist/api/resources/auth/resources/v2/client/Client.js +6 -7
  118. package/dist/api/resources/billingNotes/client/Client.d.ts +3 -0
  119. package/dist/api/resources/billingNotes/resources/v2/client/Client.d.ts +4 -1
  120. package/dist/api/resources/billingNotes/resources/v2/client/Client.js +5 -4
  121. package/dist/api/resources/contracts/client/Client.d.ts +3 -0
  122. package/dist/api/resources/contracts/resources/v2/client/Client.d.ts +8 -5
  123. package/dist/api/resources/contracts/resources/v2/client/Client.js +27 -26
  124. package/dist/api/resources/eligibility/client/Client.d.ts +3 -0
  125. package/dist/api/resources/eligibility/resources/v2/client/Client.d.ts +6 -3
  126. package/dist/api/resources/eligibility/resources/v2/client/Client.js +12 -9
  127. package/dist/api/resources/encounters/client/Client.d.ts +3 -0
  128. package/dist/api/resources/encounters/resources/v4/client/Client.d.ts +7 -19
  129. package/dist/api/resources/encounters/resources/v4/client/Client.js +22 -37
  130. package/dist/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -21
  131. package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
  132. package/dist/api/resources/expectedNetworkStatus/client/Client.d.ts +3 -0
  133. package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.d.ts +4 -1
  134. package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +5 -4
  135. package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.d.ts +5 -2
  136. package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +13 -11
  137. package/dist/api/resources/exports/client/Client.d.ts +3 -0
  138. package/dist/api/resources/exports/resources/v3/client/Client.d.ts +4 -1
  139. package/dist/api/resources/exports/resources/v3/client/Client.js +5 -4
  140. package/dist/api/resources/externalPaymentAccountConfig/client/Client.d.ts +3 -0
  141. package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.d.ts +4 -1
  142. package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +4 -3
  143. package/dist/api/resources/feeSchedules/client/Client.d.ts +3 -0
  144. package/dist/api/resources/feeSchedules/resources/v3/client/Client.d.ts +13 -10
  145. package/dist/api/resources/feeSchedules/resources/v3/client/Client.js +52 -44
  146. package/dist/api/resources/guarantor/client/Client.d.ts +3 -0
  147. package/dist/api/resources/guarantor/resources/v1/client/Client.d.ts +6 -3
  148. package/dist/api/resources/guarantor/resources/v1/client/Client.js +18 -19
  149. package/dist/api/resources/importInvoice/client/Client.d.ts +3 -0
  150. package/dist/api/resources/importInvoice/resources/v1/client/Client.d.ts +7 -4
  151. package/dist/api/resources/importInvoice/resources/v1/client/Client.js +22 -18
  152. package/dist/api/resources/insuranceAdjudications/client/Client.d.ts +3 -0
  153. package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.d.ts +6 -3
  154. package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +15 -12
  155. package/dist/api/resources/insurancePayments/client/Client.d.ts +3 -0
  156. package/dist/api/resources/insurancePayments/resources/v1/client/Client.d.ts +8 -5
  157. package/dist/api/resources/insurancePayments/resources/v1/client/Client.js +29 -24
  158. package/dist/api/resources/insuranceRefunds/client/Client.d.ts +3 -0
  159. package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.d.ts +8 -5
  160. package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.js +29 -24
  161. package/dist/api/resources/organizationProviders/client/Client.d.ts +3 -0
  162. package/dist/api/resources/organizationProviders/resources/v3/client/Client.d.ts +7 -4
  163. package/dist/api/resources/organizationProviders/resources/v3/client/Client.js +23 -19
  164. package/dist/api/resources/organizationServiceFacilities/client/Client.d.ts +3 -0
  165. package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.d.ts +8 -5
  166. package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +32 -23
  167. package/dist/api/resources/patientPayments/client/Client.d.ts +3 -0
  168. package/dist/api/resources/patientPayments/resources/v4/client/Client.d.ts +8 -5
  169. package/dist/api/resources/patientPayments/resources/v4/client/Client.js +29 -24
  170. package/dist/api/resources/patientRefunds/client/Client.d.ts +3 -0
  171. package/dist/api/resources/patientRefunds/resources/v1/client/Client.d.ts +8 -5
  172. package/dist/api/resources/patientRefunds/resources/v1/client/Client.js +29 -24
  173. package/dist/api/resources/payers/client/Client.d.ts +3 -0
  174. package/dist/api/resources/payers/resources/v3/client/Client.d.ts +5 -2
  175. package/dist/api/resources/payers/resources/v3/client/Client.js +9 -7
  176. package/dist/api/resources/preEncounter/client/Client.d.ts +3 -0
  177. package/dist/api/resources/preEncounter/resources/coverages/client/Client.d.ts +3 -0
  178. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.d.ts +3 -0
  179. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.d.ts +9 -6
  180. package/dist/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.js +31 -25
  181. package/dist/api/resources/preEncounter/resources/patients/client/Client.d.ts +3 -0
  182. package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.d.ts +3 -0
  183. package/dist/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.d.ts +10 -7
  184. package/dist/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.js +38 -31
  185. package/dist/api/resources/serviceFacility/client/Client.d.ts +4 -1
  186. package/dist/api/resources/serviceFacility/client/Client.js +6 -7
  187. package/dist/api/resources/tasks/client/Client.d.ts +3 -0
  188. package/dist/api/resources/tasks/resources/v3/client/Client.d.ts +8 -5
  189. package/dist/api/resources/tasks/resources/v3/client/Client.js +28 -23
  190. package/dist/api/resources/writeOffs/client/Client.d.ts +3 -0
  191. package/dist/api/resources/writeOffs/resources/v1/client/Client.d.ts +7 -4
  192. package/dist/api/resources/writeOffs/resources/v1/client/Client.js +19 -15
  193. package/dist/core/fetcher/Fetcher.d.ts +3 -0
  194. package/dist/core/fetcher/Fetcher.js +22 -153
  195. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  196. package/dist/core/fetcher/createRequestUrl.js +13 -0
  197. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  198. package/dist/core/fetcher/getFetchFn.js +59 -0
  199. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  200. package/dist/core/fetcher/getRequestBody.js +23 -0
  201. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  202. package/dist/core/fetcher/getResponseBody.js +48 -0
  203. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  204. package/dist/core/fetcher/makeRequest.js +42 -0
  205. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  206. package/dist/core/fetcher/requestWithRetries.js +32 -0
  207. package/dist/core/fetcher/signals.d.ts +12 -0
  208. package/dist/core/fetcher/signals.js +37 -0
  209. package/dist/core/runtime/runtime.d.ts +2 -1
  210. package/dist/core/runtime/runtime.js +12 -1
  211. package/dist/core/schemas/Schema.d.ts +7 -4
  212. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  213. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  214. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  215. package/dist/core/schemas/builders/list/list.js +31 -44
  216. package/dist/core/schemas/builders/object/object.js +90 -111
  217. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  218. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  219. package/dist/core/schemas/builders/record/record.js +49 -60
  220. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  221. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  222. package/dist/core/schemas/builders/set/set.js +6 -15
  223. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  224. package/dist/core/schemas/builders/union/union.js +51 -62
  225. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  226. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -2
  227. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -2
  228. package/dist/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
  229. package/dist/serialization/resources/encounters/resources/v4/types/Encounter.js +0 -1
  230. package/package.json +7 -2
  231. package/reference.md +7177 -0
  232. package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -2
  233. package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -2
  234. package/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +0 -1
  235. package/serialization/resources/encounters/resources/v4/types/Encounter.js +0 -1
@@ -56,7 +56,7 @@ class V4 {
56
56
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
57
57
  *
58
58
  * @example
59
- * await candidApi.patientPayments.v4.getMulti({
59
+ * await client.patientPayments.v4.getMulti({
60
60
  * limit: 1,
61
61
  * patientExternalId: CandidApi.PatientExternalId("string"),
62
62
  * claimId: CandidApi.ClaimId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -121,12 +121,13 @@ class V4 {
121
121
  Authorization: yield this._getAuthorizationHeader(),
122
122
  "X-Fern-Language": "JavaScript",
123
123
  "X-Fern-SDK-Name": "candidhealth",
124
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
124
+ "X-Fern-SDK-Version": "0.24.2",
125
125
  "X-Fern-Runtime": core.RUNTIME.type,
126
126
  "X-Fern-Runtime-Version": core.RUNTIME.version,
127
127
  },
128
128
  contentType: "application/json",
129
129
  queryParameters: _queryParams,
130
+ requestType: "json",
130
131
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
131
132
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
132
133
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -134,7 +135,7 @@ class V4 {
134
135
  if (_response.ok) {
135
136
  return {
136
137
  ok: true,
137
- body: yield serializers.patientPayments.v4.PatientPaymentsPage.parseOrThrow(_response.body, {
138
+ body: serializers.patientPayments.v4.PatientPaymentsPage.parseOrThrow(_response.body, {
138
139
  unrecognizedObjectKeys: "passthrough",
139
140
  allowUnrecognizedUnionMembers: true,
140
141
  allowUnrecognizedEnumValues: true,
@@ -148,7 +149,7 @@ class V4 {
148
149
  case "UnprocessableEntityError":
149
150
  return {
150
151
  ok: false,
151
- error: yield serializers.patientPayments.v4.getMulti.Error.parseOrThrow(_response.error.body, {
152
+ error: serializers.patientPayments.v4.getMulti.Error.parseOrThrow(_response.error.body, {
152
153
  unrecognizedObjectKeys: "passthrough",
153
154
  allowUnrecognizedUnionMembers: true,
154
155
  allowUnrecognizedEnumValues: true,
@@ -170,24 +171,25 @@ class V4 {
170
171
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
171
172
  *
172
173
  * @example
173
- * await candidApi.patientPayments.v4.get(CandidApi.patientPayments.v4.PatientPaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
174
+ * await client.patientPayments.v4.get(CandidApi.patientPayments.v4.PatientPaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
174
175
  */
175
176
  get(patientPaymentId, requestOptions) {
176
177
  var _a, _b;
177
178
  return __awaiter(this, void 0, void 0, function* () {
178
179
  const _response = yield core.fetcher({
179
180
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
180
- .candidApi, `/api/patient-payments/v4/${encodeURIComponent(yield serializers.patientPayments.v4.PatientPaymentId.jsonOrThrow(patientPaymentId))}`),
181
+ .candidApi, `/api/patient-payments/v4/${encodeURIComponent(serializers.patientPayments.v4.PatientPaymentId.jsonOrThrow(patientPaymentId))}`),
181
182
  method: "GET",
182
183
  headers: {
183
184
  Authorization: yield this._getAuthorizationHeader(),
184
185
  "X-Fern-Language": "JavaScript",
185
186
  "X-Fern-SDK-Name": "candidhealth",
186
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
187
+ "X-Fern-SDK-Version": "0.24.2",
187
188
  "X-Fern-Runtime": core.RUNTIME.type,
188
189
  "X-Fern-Runtime-Version": core.RUNTIME.version,
189
190
  },
190
191
  contentType: "application/json",
192
+ requestType: "json",
191
193
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
192
194
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
193
195
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -195,7 +197,7 @@ class V4 {
195
197
  if (_response.ok) {
196
198
  return {
197
199
  ok: true,
198
- body: yield serializers.patientPayments.v4.PatientPayment.parseOrThrow(_response.body, {
200
+ body: serializers.patientPayments.v4.PatientPayment.parseOrThrow(_response.body, {
199
201
  unrecognizedObjectKeys: "passthrough",
200
202
  allowUnrecognizedUnionMembers: true,
201
203
  allowUnrecognizedEnumValues: true,
@@ -209,7 +211,7 @@ class V4 {
209
211
  case "UnauthorizedError":
210
212
  return {
211
213
  ok: false,
212
- error: yield serializers.patientPayments.v4.get.Error.parseOrThrow(_response.error.body, {
214
+ error: serializers.patientPayments.v4.get.Error.parseOrThrow(_response.error.body, {
213
215
  unrecognizedObjectKeys: "passthrough",
214
216
  allowUnrecognizedUnionMembers: true,
215
217
  allowUnrecognizedEnumValues: true,
@@ -233,7 +235,7 @@ class V4 {
233
235
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
234
236
  *
235
237
  * @example
236
- * await candidApi.patientPayments.v4.create({
238
+ * await client.patientPayments.v4.create({
237
239
  * amountCents: 1,
238
240
  * paymentTimestamp: new Date("2024-01-15T09:30:00.000Z"),
239
241
  * paymentNote: "string",
@@ -259,12 +261,13 @@ class V4 {
259
261
  Authorization: yield this._getAuthorizationHeader(),
260
262
  "X-Fern-Language": "JavaScript",
261
263
  "X-Fern-SDK-Name": "candidhealth",
262
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
264
+ "X-Fern-SDK-Version": "0.24.2",
263
265
  "X-Fern-Runtime": core.RUNTIME.type,
264
266
  "X-Fern-Runtime-Version": core.RUNTIME.version,
265
267
  },
266
268
  contentType: "application/json",
267
- body: yield serializers.patientPayments.v4.PatientPaymentCreate.jsonOrThrow(request, {
269
+ requestType: "json",
270
+ body: serializers.patientPayments.v4.PatientPaymentCreate.jsonOrThrow(request, {
268
271
  unrecognizedObjectKeys: "strip",
269
272
  }),
270
273
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -274,7 +277,7 @@ class V4 {
274
277
  if (_response.ok) {
275
278
  return {
276
279
  ok: true,
277
- body: yield serializers.patientPayments.v4.PatientPayment.parseOrThrow(_response.body, {
280
+ body: serializers.patientPayments.v4.PatientPayment.parseOrThrow(_response.body, {
278
281
  unrecognizedObjectKeys: "passthrough",
279
282
  allowUnrecognizedUnionMembers: true,
280
283
  allowUnrecognizedEnumValues: true,
@@ -289,7 +292,7 @@ class V4 {
289
292
  case "UnprocessableEntityError":
290
293
  return {
291
294
  ok: false,
292
- error: yield serializers.patientPayments.v4.create.Error.parseOrThrow(_response.error.body, {
295
+ error: serializers.patientPayments.v4.create.Error.parseOrThrow(_response.error.body, {
293
296
  unrecognizedObjectKeys: "passthrough",
294
297
  allowUnrecognizedUnionMembers: true,
295
298
  allowUnrecognizedEnumValues: true,
@@ -312,7 +315,7 @@ class V4 {
312
315
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
313
316
  *
314
317
  * @example
315
- * await candidApi.patientPayments.v4.update(CandidApi.patientPayments.v4.PatientPaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
318
+ * await client.patientPayments.v4.update(CandidApi.patientPayments.v4.PatientPaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
316
319
  * paymentTimestamp: new Date("2024-01-15T09:30:00.000Z"),
317
320
  * paymentNote: {
318
321
  * type: "set",
@@ -329,18 +332,19 @@ class V4 {
329
332
  return __awaiter(this, void 0, void 0, function* () {
330
333
  const _response = yield core.fetcher({
331
334
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
332
- .candidApi, `/api/patient-payments/v4/${encodeURIComponent(yield serializers.patientPayments.v4.PatientPaymentId.jsonOrThrow(patientPaymentId))}`),
335
+ .candidApi, `/api/patient-payments/v4/${encodeURIComponent(serializers.patientPayments.v4.PatientPaymentId.jsonOrThrow(patientPaymentId))}`),
333
336
  method: "PATCH",
334
337
  headers: {
335
338
  Authorization: yield this._getAuthorizationHeader(),
336
339
  "X-Fern-Language": "JavaScript",
337
340
  "X-Fern-SDK-Name": "candidhealth",
338
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
341
+ "X-Fern-SDK-Version": "0.24.2",
339
342
  "X-Fern-Runtime": core.RUNTIME.type,
340
343
  "X-Fern-Runtime-Version": core.RUNTIME.version,
341
344
  },
342
345
  contentType: "application/json",
343
- body: yield serializers.patientPayments.v4.PatientPaymentUpdate.jsonOrThrow(request, {
346
+ requestType: "json",
347
+ body: serializers.patientPayments.v4.PatientPaymentUpdate.jsonOrThrow(request, {
344
348
  unrecognizedObjectKeys: "strip",
345
349
  }),
346
350
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -350,7 +354,7 @@ class V4 {
350
354
  if (_response.ok) {
351
355
  return {
352
356
  ok: true,
353
- body: yield serializers.patientPayments.v4.PatientPayment.parseOrThrow(_response.body, {
357
+ body: serializers.patientPayments.v4.PatientPayment.parseOrThrow(_response.body, {
354
358
  unrecognizedObjectKeys: "passthrough",
355
359
  allowUnrecognizedUnionMembers: true,
356
360
  allowUnrecognizedEnumValues: true,
@@ -365,7 +369,7 @@ class V4 {
365
369
  case "UnprocessableEntityError":
366
370
  return {
367
371
  ok: false,
368
- error: yield serializers.patientPayments.v4.update.Error.parseOrThrow(_response.error.body, {
372
+ error: serializers.patientPayments.v4.update.Error.parseOrThrow(_response.error.body, {
369
373
  unrecognizedObjectKeys: "passthrough",
370
374
  allowUnrecognizedUnionMembers: true,
371
375
  allowUnrecognizedEnumValues: true,
@@ -387,24 +391,25 @@ class V4 {
387
391
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
388
392
  *
389
393
  * @example
390
- * await candidApi.patientPayments.v4.delete(CandidApi.patientPayments.v4.PatientPaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
394
+ * await client.patientPayments.v4.delete(CandidApi.patientPayments.v4.PatientPaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
391
395
  */
392
396
  delete(patientPaymentId, requestOptions) {
393
397
  var _a, _b;
394
398
  return __awaiter(this, void 0, void 0, function* () {
395
399
  const _response = yield core.fetcher({
396
400
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
397
- .candidApi, `/api/patient-payments/v4/${encodeURIComponent(yield serializers.patientPayments.v4.PatientPaymentId.jsonOrThrow(patientPaymentId))}`),
401
+ .candidApi, `/api/patient-payments/v4/${encodeURIComponent(serializers.patientPayments.v4.PatientPaymentId.jsonOrThrow(patientPaymentId))}`),
398
402
  method: "DELETE",
399
403
  headers: {
400
404
  Authorization: yield this._getAuthorizationHeader(),
401
405
  "X-Fern-Language": "JavaScript",
402
406
  "X-Fern-SDK-Name": "candidhealth",
403
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
407
+ "X-Fern-SDK-Version": "0.24.2",
404
408
  "X-Fern-Runtime": core.RUNTIME.type,
405
409
  "X-Fern-Runtime-Version": core.RUNTIME.version,
406
410
  },
407
411
  contentType: "application/json",
412
+ requestType: "json",
408
413
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
409
414
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
410
415
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -422,7 +427,7 @@ class V4 {
422
427
  case "UnprocessableEntityError":
423
428
  return {
424
429
  ok: false,
425
- error: yield serializers.patientPayments.v4.delete.Error.parseOrThrow(_response.error.body, {
430
+ error: serializers.patientPayments.v4.delete.Error.parseOrThrow(_response.error.body, {
426
431
  unrecognizedObjectKeys: "passthrough",
427
432
  allowUnrecognizedUnionMembers: true,
428
433
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace PatientRefunds {
10
10
  token?: core.Supplier<core.BearerToken | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
13
14
  timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
14
16
  maxRetries?: number;
17
+ /** A hook to abort the request. */
15
18
  abortSignal?: AbortSignal;
16
19
  }
17
20
  }
@@ -10,8 +10,11 @@ export declare namespace V1 {
10
10
  token?: core.Supplier<core.BearerToken | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
13
14
  timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
14
16
  maxRetries?: number;
17
+ /** A hook to abort the request. */
15
18
  abortSignal?: AbortSignal;
16
19
  }
17
20
  }
@@ -26,7 +29,7 @@ export declare class V1 {
26
29
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
27
30
  *
28
31
  * @example
29
- * await candidApi.patientRefunds.v1.getMulti({
32
+ * await client.patientRefunds.v1.getMulti({
30
33
  * limit: 1,
31
34
  * patientExternalId: CandidApi.PatientExternalId("string"),
32
35
  * claimId: CandidApi.ClaimId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -48,7 +51,7 @@ export declare class V1 {
48
51
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
49
52
  *
50
53
  * @example
51
- * await candidApi.patientRefunds.v1.get(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
54
+ * await client.patientRefunds.v1.get(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
52
55
  */
53
56
  get(patientRefundId: CandidApi.patientRefunds.v1.PatientRefundId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.patientRefunds.v1.PatientRefund, CandidApi.patientRefunds.v1.get.Error>>;
54
57
  /**
@@ -60,7 +63,7 @@ export declare class V1 {
60
63
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
61
64
  *
62
65
  * @example
63
- * await candidApi.patientRefunds.v1.create({
66
+ * await client.patientRefunds.v1.create({
64
67
  * amountCents: 1,
65
68
  * refundTimestamp: new Date("2024-01-15T09:30:00.000Z"),
66
69
  * refundNote: "string",
@@ -85,7 +88,7 @@ export declare class V1 {
85
88
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
86
89
  *
87
90
  * @example
88
- * await candidApi.patientRefunds.v1.update(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
91
+ * await client.patientRefunds.v1.update(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
89
92
  * refundTimestamp: new Date("2024-01-15T09:30:00.000Z"),
90
93
  * refundNote: {
91
94
  * type: "set",
@@ -109,7 +112,7 @@ export declare class V1 {
109
112
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
110
113
  *
111
114
  * @example
112
- * await candidApi.patientRefunds.v1.delete(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
115
+ * await client.patientRefunds.v1.delete(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
113
116
  */
114
117
  delete(patientRefundId: CandidApi.patientRefunds.v1.PatientRefundId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<void, CandidApi.patientRefunds.v1.delete.Error>>;
115
118
  protected _getAuthorizationHeader(): Promise<string | undefined>;
@@ -56,7 +56,7 @@ class V1 {
56
56
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
57
57
  *
58
58
  * @example
59
- * await candidApi.patientRefunds.v1.getMulti({
59
+ * await client.patientRefunds.v1.getMulti({
60
60
  * limit: 1,
61
61
  * patientExternalId: CandidApi.PatientExternalId("string"),
62
62
  * claimId: CandidApi.ClaimId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -121,12 +121,13 @@ class V1 {
121
121
  Authorization: yield this._getAuthorizationHeader(),
122
122
  "X-Fern-Language": "JavaScript",
123
123
  "X-Fern-SDK-Name": "candidhealth",
124
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
124
+ "X-Fern-SDK-Version": "0.24.2",
125
125
  "X-Fern-Runtime": core.RUNTIME.type,
126
126
  "X-Fern-Runtime-Version": core.RUNTIME.version,
127
127
  },
128
128
  contentType: "application/json",
129
129
  queryParameters: _queryParams,
130
+ requestType: "json",
130
131
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
131
132
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
132
133
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -134,7 +135,7 @@ class V1 {
134
135
  if (_response.ok) {
135
136
  return {
136
137
  ok: true,
137
- body: yield serializers.patientRefunds.v1.PatientRefundsPage.parseOrThrow(_response.body, {
138
+ body: serializers.patientRefunds.v1.PatientRefundsPage.parseOrThrow(_response.body, {
138
139
  unrecognizedObjectKeys: "passthrough",
139
140
  allowUnrecognizedUnionMembers: true,
140
141
  allowUnrecognizedEnumValues: true,
@@ -148,7 +149,7 @@ class V1 {
148
149
  case "UnprocessableEntityError":
149
150
  return {
150
151
  ok: false,
151
- error: yield serializers.patientRefunds.v1.getMulti.Error.parseOrThrow(_response.error.body, {
152
+ error: serializers.patientRefunds.v1.getMulti.Error.parseOrThrow(_response.error.body, {
152
153
  unrecognizedObjectKeys: "passthrough",
153
154
  allowUnrecognizedUnionMembers: true,
154
155
  allowUnrecognizedEnumValues: true,
@@ -170,24 +171,25 @@ class V1 {
170
171
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
171
172
  *
172
173
  * @example
173
- * await candidApi.patientRefunds.v1.get(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
174
+ * await client.patientRefunds.v1.get(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
174
175
  */
175
176
  get(patientRefundId, requestOptions) {
176
177
  var _a, _b;
177
178
  return __awaiter(this, void 0, void 0, function* () {
178
179
  const _response = yield core.fetcher({
179
180
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
180
- .candidApi, `/api/patient-refunds/v1/${encodeURIComponent(yield serializers.patientRefunds.v1.PatientRefundId.jsonOrThrow(patientRefundId))}`),
181
+ .candidApi, `/api/patient-refunds/v1/${encodeURIComponent(serializers.patientRefunds.v1.PatientRefundId.jsonOrThrow(patientRefundId))}`),
181
182
  method: "GET",
182
183
  headers: {
183
184
  Authorization: yield this._getAuthorizationHeader(),
184
185
  "X-Fern-Language": "JavaScript",
185
186
  "X-Fern-SDK-Name": "candidhealth",
186
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
187
+ "X-Fern-SDK-Version": "0.24.2",
187
188
  "X-Fern-Runtime": core.RUNTIME.type,
188
189
  "X-Fern-Runtime-Version": core.RUNTIME.version,
189
190
  },
190
191
  contentType: "application/json",
192
+ requestType: "json",
191
193
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
192
194
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
193
195
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -195,7 +197,7 @@ class V1 {
195
197
  if (_response.ok) {
196
198
  return {
197
199
  ok: true,
198
- body: yield serializers.patientRefunds.v1.PatientRefund.parseOrThrow(_response.body, {
200
+ body: serializers.patientRefunds.v1.PatientRefund.parseOrThrow(_response.body, {
199
201
  unrecognizedObjectKeys: "passthrough",
200
202
  allowUnrecognizedUnionMembers: true,
201
203
  allowUnrecognizedEnumValues: true,
@@ -209,7 +211,7 @@ class V1 {
209
211
  case "UnauthorizedError":
210
212
  return {
211
213
  ok: false,
212
- error: yield serializers.patientRefunds.v1.get.Error.parseOrThrow(_response.error.body, {
214
+ error: serializers.patientRefunds.v1.get.Error.parseOrThrow(_response.error.body, {
213
215
  unrecognizedObjectKeys: "passthrough",
214
216
  allowUnrecognizedUnionMembers: true,
215
217
  allowUnrecognizedEnumValues: true,
@@ -233,7 +235,7 @@ class V1 {
233
235
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
234
236
  *
235
237
  * @example
236
- * await candidApi.patientRefunds.v1.create({
238
+ * await client.patientRefunds.v1.create({
237
239
  * amountCents: 1,
238
240
  * refundTimestamp: new Date("2024-01-15T09:30:00.000Z"),
239
241
  * refundNote: "string",
@@ -260,12 +262,13 @@ class V1 {
260
262
  Authorization: yield this._getAuthorizationHeader(),
261
263
  "X-Fern-Language": "JavaScript",
262
264
  "X-Fern-SDK-Name": "candidhealth",
263
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
265
+ "X-Fern-SDK-Version": "0.24.2",
264
266
  "X-Fern-Runtime": core.RUNTIME.type,
265
267
  "X-Fern-Runtime-Version": core.RUNTIME.version,
266
268
  },
267
269
  contentType: "application/json",
268
- body: yield serializers.patientRefunds.v1.PatientRefundCreate.jsonOrThrow(request, {
270
+ requestType: "json",
271
+ body: serializers.patientRefunds.v1.PatientRefundCreate.jsonOrThrow(request, {
269
272
  unrecognizedObjectKeys: "strip",
270
273
  }),
271
274
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -275,7 +278,7 @@ class V1 {
275
278
  if (_response.ok) {
276
279
  return {
277
280
  ok: true,
278
- body: yield serializers.patientRefunds.v1.PatientRefund.parseOrThrow(_response.body, {
281
+ body: serializers.patientRefunds.v1.PatientRefund.parseOrThrow(_response.body, {
279
282
  unrecognizedObjectKeys: "passthrough",
280
283
  allowUnrecognizedUnionMembers: true,
281
284
  allowUnrecognizedEnumValues: true,
@@ -290,7 +293,7 @@ class V1 {
290
293
  case "UnprocessableEntityError":
291
294
  return {
292
295
  ok: false,
293
- error: yield serializers.patientRefunds.v1.create.Error.parseOrThrow(_response.error.body, {
296
+ error: serializers.patientRefunds.v1.create.Error.parseOrThrow(_response.error.body, {
294
297
  unrecognizedObjectKeys: "passthrough",
295
298
  allowUnrecognizedUnionMembers: true,
296
299
  allowUnrecognizedEnumValues: true,
@@ -313,7 +316,7 @@ class V1 {
313
316
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
314
317
  *
315
318
  * @example
316
- * await candidApi.patientRefunds.v1.update(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
319
+ * await client.patientRefunds.v1.update(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
317
320
  * refundTimestamp: new Date("2024-01-15T09:30:00.000Z"),
318
321
  * refundNote: {
319
322
  * type: "set",
@@ -334,18 +337,19 @@ class V1 {
334
337
  return __awaiter(this, void 0, void 0, function* () {
335
338
  const _response = yield core.fetcher({
336
339
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
337
- .candidApi, `/api/patient-refunds/v1/${encodeURIComponent(yield serializers.patientRefunds.v1.PatientRefundId.jsonOrThrow(patientRefundId))}`),
340
+ .candidApi, `/api/patient-refunds/v1/${encodeURIComponent(serializers.patientRefunds.v1.PatientRefundId.jsonOrThrow(patientRefundId))}`),
338
341
  method: "PATCH",
339
342
  headers: {
340
343
  Authorization: yield this._getAuthorizationHeader(),
341
344
  "X-Fern-Language": "JavaScript",
342
345
  "X-Fern-SDK-Name": "candidhealth",
343
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
346
+ "X-Fern-SDK-Version": "0.24.2",
344
347
  "X-Fern-Runtime": core.RUNTIME.type,
345
348
  "X-Fern-Runtime-Version": core.RUNTIME.version,
346
349
  },
347
350
  contentType: "application/json",
348
- body: yield serializers.patientRefunds.v1.PatientRefundUpdate.jsonOrThrow(request, {
351
+ requestType: "json",
352
+ body: serializers.patientRefunds.v1.PatientRefundUpdate.jsonOrThrow(request, {
349
353
  unrecognizedObjectKeys: "strip",
350
354
  }),
351
355
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -355,7 +359,7 @@ class V1 {
355
359
  if (_response.ok) {
356
360
  return {
357
361
  ok: true,
358
- body: yield serializers.patientRefunds.v1.PatientRefund.parseOrThrow(_response.body, {
362
+ body: serializers.patientRefunds.v1.PatientRefund.parseOrThrow(_response.body, {
359
363
  unrecognizedObjectKeys: "passthrough",
360
364
  allowUnrecognizedUnionMembers: true,
361
365
  allowUnrecognizedEnumValues: true,
@@ -370,7 +374,7 @@ class V1 {
370
374
  case "UnprocessableEntityError":
371
375
  return {
372
376
  ok: false,
373
- error: yield serializers.patientRefunds.v1.update.Error.parseOrThrow(_response.error.body, {
377
+ error: serializers.patientRefunds.v1.update.Error.parseOrThrow(_response.error.body, {
374
378
  unrecognizedObjectKeys: "passthrough",
375
379
  allowUnrecognizedUnionMembers: true,
376
380
  allowUnrecognizedEnumValues: true,
@@ -392,24 +396,25 @@ class V1 {
392
396
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
393
397
  *
394
398
  * @example
395
- * await candidApi.patientRefunds.v1.delete(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
399
+ * await client.patientRefunds.v1.delete(CandidApi.patientRefunds.v1.PatientRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
396
400
  */
397
401
  delete(patientRefundId, requestOptions) {
398
402
  var _a, _b;
399
403
  return __awaiter(this, void 0, void 0, function* () {
400
404
  const _response = yield core.fetcher({
401
405
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
402
- .candidApi, `/api/patient-refunds/v1/${encodeURIComponent(yield serializers.patientRefunds.v1.PatientRefundId.jsonOrThrow(patientRefundId))}`),
406
+ .candidApi, `/api/patient-refunds/v1/${encodeURIComponent(serializers.patientRefunds.v1.PatientRefundId.jsonOrThrow(patientRefundId))}`),
403
407
  method: "DELETE",
404
408
  headers: {
405
409
  Authorization: yield this._getAuthorizationHeader(),
406
410
  "X-Fern-Language": "JavaScript",
407
411
  "X-Fern-SDK-Name": "candidhealth",
408
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
412
+ "X-Fern-SDK-Version": "0.24.2",
409
413
  "X-Fern-Runtime": core.RUNTIME.type,
410
414
  "X-Fern-Runtime-Version": core.RUNTIME.version,
411
415
  },
412
416
  contentType: "application/json",
417
+ requestType: "json",
413
418
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
414
419
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
415
420
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -427,7 +432,7 @@ class V1 {
427
432
  case "UnprocessableEntityError":
428
433
  return {
429
434
  ok: false,
430
- error: yield serializers.patientRefunds.v1.delete.Error.parseOrThrow(_response.error.body, {
435
+ error: serializers.patientRefunds.v1.delete.Error.parseOrThrow(_response.error.body, {
431
436
  unrecognizedObjectKeys: "passthrough",
432
437
  allowUnrecognizedUnionMembers: true,
433
438
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace Payers {
10
10
  token?: core.Supplier<core.BearerToken | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
13
14
  timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
14
16
  maxRetries?: number;
17
+ /** A hook to abort the request. */
15
18
  abortSignal?: AbortSignal;
16
19
  }
17
20
  }
@@ -10,8 +10,11 @@ export declare namespace V3 {
10
10
  token?: core.Supplier<core.BearerToken | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
13
14
  timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
14
16
  maxRetries?: number;
17
+ /** A hook to abort the request. */
15
18
  abortSignal?: AbortSignal;
16
19
  }
17
20
  }
@@ -23,7 +26,7 @@ export declare class V3 {
23
26
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
24
27
  *
25
28
  * @example
26
- * await candidApi.payers.v3.get(CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
29
+ * await client.payers.v3.get(CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
27
30
  */
28
31
  get(payerUuid: CandidApi.payers.v3.PayerUuid, requestOptions?: V3.RequestOptions): Promise<core.APIResponse<CandidApi.payers.v3.Payer, CandidApi.payers.v3.get.Error>>;
29
32
  /**
@@ -31,7 +34,7 @@ export declare class V3 {
31
34
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
32
35
  *
33
36
  * @example
34
- * await candidApi.payers.v3.getAll({
37
+ * await client.payers.v3.getAll({
35
38
  * limit: 100,
36
39
  * searchTerm: "john",
37
40
  * pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9")
@@ -53,24 +53,25 @@ class V3 {
53
53
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
54
54
  *
55
55
  * @example
56
- * await candidApi.payers.v3.get(CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
56
+ * await client.payers.v3.get(CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
57
57
  */
58
58
  get(payerUuid, requestOptions) {
59
59
  var _a;
60
60
  return __awaiter(this, void 0, void 0, function* () {
61
61
  const _response = yield core.fetcher({
62
62
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
63
- .candidApi, `/api/payers/v3/${encodeURIComponent(yield serializers.payers.v3.PayerUuid.jsonOrThrow(payerUuid))}`),
63
+ .candidApi, `/api/payers/v3/${encodeURIComponent(serializers.payers.v3.PayerUuid.jsonOrThrow(payerUuid))}`),
64
64
  method: "GET",
65
65
  headers: {
66
66
  Authorization: yield this._getAuthorizationHeader(),
67
67
  "X-Fern-Language": "JavaScript",
68
68
  "X-Fern-SDK-Name": "candidhealth",
69
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
69
+ "X-Fern-SDK-Version": "0.24.2",
70
70
  "X-Fern-Runtime": core.RUNTIME.type,
71
71
  "X-Fern-Runtime-Version": core.RUNTIME.version,
72
72
  },
73
73
  contentType: "application/json",
74
+ requestType: "json",
74
75
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
75
76
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
76
77
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -78,7 +79,7 @@ class V3 {
78
79
  if (_response.ok) {
79
80
  return {
80
81
  ok: true,
81
- body: yield serializers.payers.v3.Payer.parseOrThrow(_response.body, {
82
+ body: serializers.payers.v3.Payer.parseOrThrow(_response.body, {
82
83
  unrecognizedObjectKeys: "passthrough",
83
84
  allowUnrecognizedUnionMembers: true,
84
85
  allowUnrecognizedEnumValues: true,
@@ -97,7 +98,7 @@ class V3 {
97
98
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
98
99
  *
99
100
  * @example
100
- * await candidApi.payers.v3.getAll({
101
+ * await client.payers.v3.getAll({
101
102
  * limit: 100,
102
103
  * searchTerm: "john",
103
104
  * pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9")
@@ -125,12 +126,13 @@ class V3 {
125
126
  Authorization: yield this._getAuthorizationHeader(),
126
127
  "X-Fern-Language": "JavaScript",
127
128
  "X-Fern-SDK-Name": "candidhealth",
128
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
129
+ "X-Fern-SDK-Version": "0.24.2",
129
130
  "X-Fern-Runtime": core.RUNTIME.type,
130
131
  "X-Fern-Runtime-Version": core.RUNTIME.version,
131
132
  },
132
133
  contentType: "application/json",
133
134
  queryParameters: _queryParams,
135
+ requestType: "json",
134
136
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
135
137
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
136
138
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -138,7 +140,7 @@ class V3 {
138
140
  if (_response.ok) {
139
141
  return {
140
142
  ok: true,
141
- body: yield serializers.payers.v3.PayerPage.parseOrThrow(_response.body, {
143
+ body: serializers.payers.v3.PayerPage.parseOrThrow(_response.body, {
142
144
  unrecognizedObjectKeys: "passthrough",
143
145
  allowUnrecognizedUnionMembers: true,
144
146
  allowUnrecognizedEnumValues: true,
@@ -11,8 +11,11 @@ export declare namespace PreEncounter {
11
11
  token?: core.Supplier<core.BearerToken | undefined>;
12
12
  }
13
13
  interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
14
15
  timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
15
17
  maxRetries?: number;
18
+ /** A hook to abort the request. */
16
19
  abortSignal?: AbortSignal;
17
20
  }
18
21
  }
@@ -10,8 +10,11 @@ export declare namespace Coverages {
10
10
  token?: core.Supplier<core.BearerToken | undefined>;
11
11
  }
12
12
  interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
13
14
  timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
14
16
  maxRetries?: number;
17
+ /** A hook to abort the request. */
15
18
  abortSignal?: AbortSignal;
16
19
  }
17
20
  }