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
@@ -55,7 +55,7 @@ class V1 {
55
55
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
56
56
  *
57
57
  * @example
58
- * await candidApi.insurancePayments.v1.getMulti({
58
+ * await client.insurancePayments.v1.getMulti({
59
59
  * limit: 1,
60
60
  * payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
61
61
  * claimId: CandidApi.ClaimId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -103,12 +103,13 @@ class V1 {
103
103
  Authorization: yield this._getAuthorizationHeader(),
104
104
  "X-Fern-Language": "JavaScript",
105
105
  "X-Fern-SDK-Name": "candidhealth",
106
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
106
+ "X-Fern-SDK-Version": "0.24.2",
107
107
  "X-Fern-Runtime": core.RUNTIME.type,
108
108
  "X-Fern-Runtime-Version": core.RUNTIME.version,
109
109
  },
110
110
  contentType: "application/json",
111
111
  queryParameters: _queryParams,
112
+ requestType: "json",
112
113
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
113
114
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
114
115
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -116,7 +117,7 @@ class V1 {
116
117
  if (_response.ok) {
117
118
  return {
118
119
  ok: true,
119
- body: yield serializers.insurancePayments.v1.InsurancePaymentsPage.parseOrThrow(_response.body, {
120
+ body: serializers.insurancePayments.v1.InsurancePaymentsPage.parseOrThrow(_response.body, {
120
121
  unrecognizedObjectKeys: "passthrough",
121
122
  allowUnrecognizedUnionMembers: true,
122
123
  allowUnrecognizedEnumValues: true,
@@ -130,7 +131,7 @@ class V1 {
130
131
  case "UnprocessableEntityError":
131
132
  return {
132
133
  ok: false,
133
- error: yield serializers.insurancePayments.v1.getMulti.Error.parseOrThrow(_response.error.body, {
134
+ error: serializers.insurancePayments.v1.getMulti.Error.parseOrThrow(_response.error.body, {
134
135
  unrecognizedObjectKeys: "passthrough",
135
136
  allowUnrecognizedUnionMembers: true,
136
137
  allowUnrecognizedEnumValues: true,
@@ -153,24 +154,25 @@ class V1 {
153
154
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
154
155
  *
155
156
  * @example
156
- * await candidApi.insurancePayments.v1.get(CandidApi.insurancePayments.v1.InsurancePaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
157
+ * await client.insurancePayments.v1.get(CandidApi.insurancePayments.v1.InsurancePaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
157
158
  */
158
159
  get(insurancePaymentId, requestOptions) {
159
160
  var _a, _b;
160
161
  return __awaiter(this, void 0, void 0, function* () {
161
162
  const _response = yield core.fetcher({
162
163
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
163
- .candidApi, `/api/insurance-payments/v1/${encodeURIComponent(yield serializers.insurancePayments.v1.InsurancePaymentId.jsonOrThrow(insurancePaymentId))}`),
164
+ .candidApi, `/api/insurance-payments/v1/${encodeURIComponent(serializers.insurancePayments.v1.InsurancePaymentId.jsonOrThrow(insurancePaymentId))}`),
164
165
  method: "GET",
165
166
  headers: {
166
167
  Authorization: yield this._getAuthorizationHeader(),
167
168
  "X-Fern-Language": "JavaScript",
168
169
  "X-Fern-SDK-Name": "candidhealth",
169
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
170
+ "X-Fern-SDK-Version": "0.24.2",
170
171
  "X-Fern-Runtime": core.RUNTIME.type,
171
172
  "X-Fern-Runtime-Version": core.RUNTIME.version,
172
173
  },
173
174
  contentType: "application/json",
175
+ requestType: "json",
174
176
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
175
177
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
176
178
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -178,7 +180,7 @@ class V1 {
178
180
  if (_response.ok) {
179
181
  return {
180
182
  ok: true,
181
- body: yield serializers.insurancePayments.v1.InsurancePayment.parseOrThrow(_response.body, {
183
+ body: serializers.insurancePayments.v1.InsurancePayment.parseOrThrow(_response.body, {
182
184
  unrecognizedObjectKeys: "passthrough",
183
185
  allowUnrecognizedUnionMembers: true,
184
186
  allowUnrecognizedEnumValues: true,
@@ -192,7 +194,7 @@ class V1 {
192
194
  case "UnauthorizedError":
193
195
  return {
194
196
  ok: false,
195
- error: yield serializers.insurancePayments.v1.get.Error.parseOrThrow(_response.error.body, {
197
+ error: serializers.insurancePayments.v1.get.Error.parseOrThrow(_response.error.body, {
196
198
  unrecognizedObjectKeys: "passthrough",
197
199
  allowUnrecognizedUnionMembers: true,
198
200
  allowUnrecognizedEnumValues: true,
@@ -216,7 +218,7 @@ class V1 {
216
218
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
217
219
  *
218
220
  * @example
219
- * await candidApi.insurancePayments.v1.create({
221
+ * await client.insurancePayments.v1.create({
220
222
  * payerIdentifier: {
221
223
  * type: "payer_info"
222
224
  * },
@@ -237,12 +239,13 @@ class V1 {
237
239
  Authorization: yield this._getAuthorizationHeader(),
238
240
  "X-Fern-Language": "JavaScript",
239
241
  "X-Fern-SDK-Name": "candidhealth",
240
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
242
+ "X-Fern-SDK-Version": "0.24.2",
241
243
  "X-Fern-Runtime": core.RUNTIME.type,
242
244
  "X-Fern-Runtime-Version": core.RUNTIME.version,
243
245
  },
244
246
  contentType: "application/json",
245
- body: yield serializers.insurancePayments.v1.InsurancePaymentCreate.jsonOrThrow(request, {
247
+ requestType: "json",
248
+ body: serializers.insurancePayments.v1.InsurancePaymentCreate.jsonOrThrow(request, {
246
249
  unrecognizedObjectKeys: "strip",
247
250
  }),
248
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -252,7 +255,7 @@ class V1 {
252
255
  if (_response.ok) {
253
256
  return {
254
257
  ok: true,
255
- body: yield serializers.insurancePayments.v1.InsurancePayment.parseOrThrow(_response.body, {
258
+ body: serializers.insurancePayments.v1.InsurancePayment.parseOrThrow(_response.body, {
256
259
  unrecognizedObjectKeys: "passthrough",
257
260
  allowUnrecognizedUnionMembers: true,
258
261
  allowUnrecognizedEnumValues: true,
@@ -267,7 +270,7 @@ class V1 {
267
270
  case "UnprocessableEntityError":
268
271
  return {
269
272
  ok: false,
270
- error: yield serializers.insurancePayments.v1.create.Error.parseOrThrow(_response.error.body, {
273
+ error: serializers.insurancePayments.v1.create.Error.parseOrThrow(_response.error.body, {
271
274
  unrecognizedObjectKeys: "passthrough",
272
275
  allowUnrecognizedUnionMembers: true,
273
276
  allowUnrecognizedEnumValues: true,
@@ -291,7 +294,7 @@ class V1 {
291
294
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
292
295
  *
293
296
  * @example
294
- * await candidApi.insurancePayments.v1.update(CandidApi.insurancePayments.v1.InsurancePaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
297
+ * await client.insurancePayments.v1.update(CandidApi.insurancePayments.v1.InsurancePaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
295
298
  * paymentTimestamp: new Date("2024-01-15T09:30:00.000Z"),
296
299
  * paymentNote: {
297
300
  * type: "set",
@@ -304,18 +307,19 @@ class V1 {
304
307
  return __awaiter(this, void 0, void 0, function* () {
305
308
  const _response = yield core.fetcher({
306
309
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
307
- .candidApi, `/api/insurance-payments/v1/${encodeURIComponent(yield serializers.insurancePayments.v1.InsurancePaymentId.jsonOrThrow(insurancePaymentId))}`),
310
+ .candidApi, `/api/insurance-payments/v1/${encodeURIComponent(serializers.insurancePayments.v1.InsurancePaymentId.jsonOrThrow(insurancePaymentId))}`),
308
311
  method: "PATCH",
309
312
  headers: {
310
313
  Authorization: yield this._getAuthorizationHeader(),
311
314
  "X-Fern-Language": "JavaScript",
312
315
  "X-Fern-SDK-Name": "candidhealth",
313
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
316
+ "X-Fern-SDK-Version": "0.24.2",
314
317
  "X-Fern-Runtime": core.RUNTIME.type,
315
318
  "X-Fern-Runtime-Version": core.RUNTIME.version,
316
319
  },
317
320
  contentType: "application/json",
318
- body: yield serializers.insurancePayments.v1.InsurancePaymentUpdate.jsonOrThrow(request, {
321
+ requestType: "json",
322
+ body: serializers.insurancePayments.v1.InsurancePaymentUpdate.jsonOrThrow(request, {
319
323
  unrecognizedObjectKeys: "strip",
320
324
  }),
321
325
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -325,7 +329,7 @@ class V1 {
325
329
  if (_response.ok) {
326
330
  return {
327
331
  ok: true,
328
- body: yield serializers.insurancePayments.v1.InsurancePayment.parseOrThrow(_response.body, {
332
+ body: serializers.insurancePayments.v1.InsurancePayment.parseOrThrow(_response.body, {
329
333
  unrecognizedObjectKeys: "passthrough",
330
334
  allowUnrecognizedUnionMembers: true,
331
335
  allowUnrecognizedEnumValues: true,
@@ -340,7 +344,7 @@ class V1 {
340
344
  case "UnprocessableEntityError":
341
345
  return {
342
346
  ok: false,
343
- error: yield serializers.insurancePayments.v1.update.Error.parseOrThrow(_response.error.body, {
347
+ error: serializers.insurancePayments.v1.update.Error.parseOrThrow(_response.error.body, {
344
348
  unrecognizedObjectKeys: "passthrough",
345
349
  allowUnrecognizedUnionMembers: true,
346
350
  allowUnrecognizedEnumValues: true,
@@ -364,24 +368,25 @@ class V1 {
364
368
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
365
369
  *
366
370
  * @example
367
- * await candidApi.insurancePayments.v1.delete(CandidApi.insurancePayments.v1.InsurancePaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
371
+ * await client.insurancePayments.v1.delete(CandidApi.insurancePayments.v1.InsurancePaymentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
368
372
  */
369
373
  delete(insurancePaymentId, requestOptions) {
370
374
  var _a, _b;
371
375
  return __awaiter(this, void 0, void 0, function* () {
372
376
  const _response = yield core.fetcher({
373
377
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
374
- .candidApi, `/api/insurance-payments/v1/${encodeURIComponent(yield serializers.insurancePayments.v1.InsurancePaymentId.jsonOrThrow(insurancePaymentId))}`),
378
+ .candidApi, `/api/insurance-payments/v1/${encodeURIComponent(serializers.insurancePayments.v1.InsurancePaymentId.jsonOrThrow(insurancePaymentId))}`),
375
379
  method: "DELETE",
376
380
  headers: {
377
381
  Authorization: yield this._getAuthorizationHeader(),
378
382
  "X-Fern-Language": "JavaScript",
379
383
  "X-Fern-SDK-Name": "candidhealth",
380
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
384
+ "X-Fern-SDK-Version": "0.24.2",
381
385
  "X-Fern-Runtime": core.RUNTIME.type,
382
386
  "X-Fern-Runtime-Version": core.RUNTIME.version,
383
387
  },
384
388
  contentType: "application/json",
389
+ requestType: "json",
385
390
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
386
391
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
387
392
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -399,7 +404,7 @@ class V1 {
399
404
  case "UnprocessableEntityError":
400
405
  return {
401
406
  ok: false,
402
- error: yield serializers.insurancePayments.v1.delete.Error.parseOrThrow(_response.error.body, {
407
+ error: serializers.insurancePayments.v1.delete.Error.parseOrThrow(_response.error.body, {
403
408
  unrecognizedObjectKeys: "passthrough",
404
409
  allowUnrecognizedUnionMembers: true,
405
410
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace InsuranceRefunds {
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.insuranceRefunds.v1.getMulti({
32
+ * await client.insuranceRefunds.v1.getMulti({
30
33
  * limit: 1,
31
34
  * payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
32
35
  * claimId: CandidApi.ClaimId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -46,7 +49,7 @@ export declare class V1 {
46
49
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
47
50
  *
48
51
  * @example
49
- * await candidApi.insuranceRefunds.v1.get(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
52
+ * await client.insuranceRefunds.v1.get(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
50
53
  */
51
54
  get(insuranceRefundId: CandidApi.insuranceRefunds.v1.InsuranceRefundId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.insuranceRefunds.v1.InsuranceRefund, CandidApi.insuranceRefunds.v1.get.Error>>;
52
55
  /**
@@ -58,7 +61,7 @@ export declare class V1 {
58
61
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
59
62
  *
60
63
  * @example
61
- * await candidApi.insuranceRefunds.v1.create({
64
+ * await client.insuranceRefunds.v1.create({
62
65
  * payerIdentifier: {
63
66
  * type: "payer_info"
64
67
  * },
@@ -79,7 +82,7 @@ export declare class V1 {
79
82
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
80
83
  *
81
84
  * @example
82
- * await candidApi.insuranceRefunds.v1.update(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
85
+ * await client.insuranceRefunds.v1.update(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
83
86
  * refundTimestamp: new Date("2024-01-15T09:30:00.000Z"),
84
87
  * refundNote: {
85
88
  * type: "set",
@@ -101,7 +104,7 @@ export declare class V1 {
101
104
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
102
105
  *
103
106
  * @example
104
- * await candidApi.insuranceRefunds.v1.delete(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
107
+ * await client.insuranceRefunds.v1.delete(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
105
108
  */
106
109
  delete(insuranceRefundId: CandidApi.insuranceRefunds.v1.InsuranceRefundId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<void, CandidApi.insuranceRefunds.v1.delete.Error>>;
107
110
  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.insuranceRefunds.v1.getMulti({
59
+ * await client.insuranceRefunds.v1.getMulti({
60
60
  * limit: 1,
61
61
  * payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
62
62
  * claimId: CandidApi.ClaimId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -104,12 +104,13 @@ class V1 {
104
104
  Authorization: yield this._getAuthorizationHeader(),
105
105
  "X-Fern-Language": "JavaScript",
106
106
  "X-Fern-SDK-Name": "candidhealth",
107
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
107
+ "X-Fern-SDK-Version": "0.24.2",
108
108
  "X-Fern-Runtime": core.RUNTIME.type,
109
109
  "X-Fern-Runtime-Version": core.RUNTIME.version,
110
110
  },
111
111
  contentType: "application/json",
112
112
  queryParameters: _queryParams,
113
+ requestType: "json",
113
114
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
114
115
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
115
116
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -117,7 +118,7 @@ class V1 {
117
118
  if (_response.ok) {
118
119
  return {
119
120
  ok: true,
120
- body: yield serializers.insuranceRefunds.v1.InsuranceRefundsPage.parseOrThrow(_response.body, {
121
+ body: serializers.insuranceRefunds.v1.InsuranceRefundsPage.parseOrThrow(_response.body, {
121
122
  unrecognizedObjectKeys: "passthrough",
122
123
  allowUnrecognizedUnionMembers: true,
123
124
  allowUnrecognizedEnumValues: true,
@@ -131,7 +132,7 @@ class V1 {
131
132
  case "UnprocessableEntityError":
132
133
  return {
133
134
  ok: false,
134
- error: yield serializers.insuranceRefunds.v1.getMulti.Error.parseOrThrow(_response.error.body, {
135
+ error: serializers.insuranceRefunds.v1.getMulti.Error.parseOrThrow(_response.error.body, {
135
136
  unrecognizedObjectKeys: "passthrough",
136
137
  allowUnrecognizedUnionMembers: true,
137
138
  allowUnrecognizedEnumValues: true,
@@ -154,24 +155,25 @@ class V1 {
154
155
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
155
156
  *
156
157
  * @example
157
- * await candidApi.insuranceRefunds.v1.get(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
158
+ * await client.insuranceRefunds.v1.get(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
158
159
  */
159
160
  get(insuranceRefundId, requestOptions) {
160
161
  var _a, _b;
161
162
  return __awaiter(this, void 0, void 0, function* () {
162
163
  const _response = yield core.fetcher({
163
164
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
164
- .candidApi, `/api/insurance-refunds/v1/${encodeURIComponent(yield serializers.insuranceRefunds.v1.InsuranceRefundId.jsonOrThrow(insuranceRefundId))}`),
165
+ .candidApi, `/api/insurance-refunds/v1/${encodeURIComponent(serializers.insuranceRefunds.v1.InsuranceRefundId.jsonOrThrow(insuranceRefundId))}`),
165
166
  method: "GET",
166
167
  headers: {
167
168
  Authorization: yield this._getAuthorizationHeader(),
168
169
  "X-Fern-Language": "JavaScript",
169
170
  "X-Fern-SDK-Name": "candidhealth",
170
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
171
+ "X-Fern-SDK-Version": "0.24.2",
171
172
  "X-Fern-Runtime": core.RUNTIME.type,
172
173
  "X-Fern-Runtime-Version": core.RUNTIME.version,
173
174
  },
174
175
  contentType: "application/json",
176
+ requestType: "json",
175
177
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
176
178
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
177
179
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -179,7 +181,7 @@ class V1 {
179
181
  if (_response.ok) {
180
182
  return {
181
183
  ok: true,
182
- body: yield serializers.insuranceRefunds.v1.InsuranceRefund.parseOrThrow(_response.body, {
184
+ body: serializers.insuranceRefunds.v1.InsuranceRefund.parseOrThrow(_response.body, {
183
185
  unrecognizedObjectKeys: "passthrough",
184
186
  allowUnrecognizedUnionMembers: true,
185
187
  allowUnrecognizedEnumValues: true,
@@ -193,7 +195,7 @@ class V1 {
193
195
  case "UnauthorizedError":
194
196
  return {
195
197
  ok: false,
196
- error: yield serializers.insuranceRefunds.v1.get.Error.parseOrThrow(_response.error.body, {
198
+ error: serializers.insuranceRefunds.v1.get.Error.parseOrThrow(_response.error.body, {
197
199
  unrecognizedObjectKeys: "passthrough",
198
200
  allowUnrecognizedUnionMembers: true,
199
201
  allowUnrecognizedEnumValues: true,
@@ -217,7 +219,7 @@ class V1 {
217
219
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
218
220
  *
219
221
  * @example
220
- * await candidApi.insuranceRefunds.v1.create({
222
+ * await client.insuranceRefunds.v1.create({
221
223
  * payerIdentifier: {
222
224
  * type: "payer_info"
223
225
  * },
@@ -239,12 +241,13 @@ class V1 {
239
241
  Authorization: yield this._getAuthorizationHeader(),
240
242
  "X-Fern-Language": "JavaScript",
241
243
  "X-Fern-SDK-Name": "candidhealth",
242
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
244
+ "X-Fern-SDK-Version": "0.24.2",
243
245
  "X-Fern-Runtime": core.RUNTIME.type,
244
246
  "X-Fern-Runtime-Version": core.RUNTIME.version,
245
247
  },
246
248
  contentType: "application/json",
247
- body: yield serializers.insuranceRefunds.v1.InsuranceRefundCreate.jsonOrThrow(request, {
249
+ requestType: "json",
250
+ body: serializers.insuranceRefunds.v1.InsuranceRefundCreate.jsonOrThrow(request, {
248
251
  unrecognizedObjectKeys: "strip",
249
252
  }),
250
253
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -254,7 +257,7 @@ class V1 {
254
257
  if (_response.ok) {
255
258
  return {
256
259
  ok: true,
257
- body: yield serializers.insuranceRefunds.v1.InsuranceRefund.parseOrThrow(_response.body, {
260
+ body: serializers.insuranceRefunds.v1.InsuranceRefund.parseOrThrow(_response.body, {
258
261
  unrecognizedObjectKeys: "passthrough",
259
262
  allowUnrecognizedUnionMembers: true,
260
263
  allowUnrecognizedEnumValues: true,
@@ -269,7 +272,7 @@ class V1 {
269
272
  case "UnprocessableEntityError":
270
273
  return {
271
274
  ok: false,
272
- error: yield serializers.insuranceRefunds.v1.create.Error.parseOrThrow(_response.error.body, {
275
+ error: serializers.insuranceRefunds.v1.create.Error.parseOrThrow(_response.error.body, {
273
276
  unrecognizedObjectKeys: "passthrough",
274
277
  allowUnrecognizedUnionMembers: true,
275
278
  allowUnrecognizedEnumValues: true,
@@ -293,7 +296,7 @@ class V1 {
293
296
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
294
297
  *
295
298
  * @example
296
- * await candidApi.insuranceRefunds.v1.update(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
299
+ * await client.insuranceRefunds.v1.update(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
297
300
  * refundTimestamp: new Date("2024-01-15T09:30:00.000Z"),
298
301
  * refundNote: {
299
302
  * type: "set",
@@ -310,18 +313,19 @@ class V1 {
310
313
  return __awaiter(this, void 0, void 0, function* () {
311
314
  const _response = yield core.fetcher({
312
315
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
313
- .candidApi, `/api/insurance-refunds/v1/${encodeURIComponent(yield serializers.insuranceRefunds.v1.InsuranceRefundId.jsonOrThrow(insuranceRefundId))}`),
316
+ .candidApi, `/api/insurance-refunds/v1/${encodeURIComponent(serializers.insuranceRefunds.v1.InsuranceRefundId.jsonOrThrow(insuranceRefundId))}`),
314
317
  method: "PATCH",
315
318
  headers: {
316
319
  Authorization: yield this._getAuthorizationHeader(),
317
320
  "X-Fern-Language": "JavaScript",
318
321
  "X-Fern-SDK-Name": "candidhealth",
319
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
322
+ "X-Fern-SDK-Version": "0.24.2",
320
323
  "X-Fern-Runtime": core.RUNTIME.type,
321
324
  "X-Fern-Runtime-Version": core.RUNTIME.version,
322
325
  },
323
326
  contentType: "application/json",
324
- body: yield serializers.insuranceRefunds.v1.InsuranceRefundUpdate.jsonOrThrow(request, {
327
+ requestType: "json",
328
+ body: serializers.insuranceRefunds.v1.InsuranceRefundUpdate.jsonOrThrow(request, {
325
329
  unrecognizedObjectKeys: "strip",
326
330
  }),
327
331
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -331,7 +335,7 @@ class V1 {
331
335
  if (_response.ok) {
332
336
  return {
333
337
  ok: true,
334
- body: yield serializers.insuranceRefunds.v1.InsuranceRefund.parseOrThrow(_response.body, {
338
+ body: serializers.insuranceRefunds.v1.InsuranceRefund.parseOrThrow(_response.body, {
335
339
  unrecognizedObjectKeys: "passthrough",
336
340
  allowUnrecognizedUnionMembers: true,
337
341
  allowUnrecognizedEnumValues: true,
@@ -346,7 +350,7 @@ class V1 {
346
350
  case "UnprocessableEntityError":
347
351
  return {
348
352
  ok: false,
349
- error: yield serializers.insuranceRefunds.v1.update.Error.parseOrThrow(_response.error.body, {
353
+ error: serializers.insuranceRefunds.v1.update.Error.parseOrThrow(_response.error.body, {
350
354
  unrecognizedObjectKeys: "passthrough",
351
355
  allowUnrecognizedUnionMembers: true,
352
356
  allowUnrecognizedEnumValues: true,
@@ -370,24 +374,25 @@ class V1 {
370
374
  * @param {V1.RequestOptions} requestOptions - Request-specific configuration.
371
375
  *
372
376
  * @example
373
- * await candidApi.insuranceRefunds.v1.delete(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
377
+ * await client.insuranceRefunds.v1.delete(CandidApi.insuranceRefunds.v1.InsuranceRefundId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
374
378
  */
375
379
  delete(insuranceRefundId, requestOptions) {
376
380
  var _a, _b;
377
381
  return __awaiter(this, void 0, void 0, function* () {
378
382
  const _response = yield core.fetcher({
379
383
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
380
- .candidApi, `/api/insurance-refunds/v1/${encodeURIComponent(yield serializers.insuranceRefunds.v1.InsuranceRefundId.jsonOrThrow(insuranceRefundId))}`),
384
+ .candidApi, `/api/insurance-refunds/v1/${encodeURIComponent(serializers.insuranceRefunds.v1.InsuranceRefundId.jsonOrThrow(insuranceRefundId))}`),
381
385
  method: "DELETE",
382
386
  headers: {
383
387
  Authorization: yield this._getAuthorizationHeader(),
384
388
  "X-Fern-Language": "JavaScript",
385
389
  "X-Fern-SDK-Name": "candidhealth",
386
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
390
+ "X-Fern-SDK-Version": "0.24.2",
387
391
  "X-Fern-Runtime": core.RUNTIME.type,
388
392
  "X-Fern-Runtime-Version": core.RUNTIME.version,
389
393
  },
390
394
  contentType: "application/json",
395
+ requestType: "json",
391
396
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
392
397
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
393
398
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -405,7 +410,7 @@ class V1 {
405
410
  case "UnprocessableEntityError":
406
411
  return {
407
412
  ok: false,
408
- error: yield serializers.insuranceRefunds.v1.delete.Error.parseOrThrow(_response.error.body, {
413
+ error: serializers.insuranceRefunds.v1.delete.Error.parseOrThrow(_response.error.body, {
409
414
  unrecognizedObjectKeys: "passthrough",
410
415
  allowUnrecognizedUnionMembers: true,
411
416
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace OrganizationProviders {
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.organizationProviders.v3.get(CandidApi.organizationProviders.v2.OrganizationProviderId("965A563A-0285-4910-9569-E3739C0F6EAB"))
29
+ * await client.organizationProviders.v3.get(CandidApi.organizationProviders.v2.OrganizationProviderId("965A563A-0285-4910-9569-E3739C0F6EAB"))
27
30
  */
28
31
  get(organizationProviderId: CandidApi.organizationProviders.v2.OrganizationProviderId, requestOptions?: V3.RequestOptions): Promise<core.APIResponse<CandidApi.organizationProviders.v3.OrganizationProviderV2, CandidApi.organizationProviders.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.organizationProviders.v3.getMulti({
37
+ * await client.organizationProviders.v3.getMulti({
35
38
  * limit: 100,
36
39
  * searchTerm: "john",
37
40
  * npi: "1234567890",
@@ -47,7 +50,7 @@ export declare class V3 {
47
50
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
48
51
  *
49
52
  * @example
50
- * await candidApi.organizationProviders.v3.create({
53
+ * await client.organizationProviders.v3.create({
51
54
  * npi: "string",
52
55
  * isRendering: true,
53
56
  * isBilling: true,
@@ -81,7 +84,7 @@ export declare class V3 {
81
84
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
82
85
  *
83
86
  * @example
84
- * await candidApi.organizationProviders.v3.update(CandidApi.organizationProviders.v2.OrganizationProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
87
+ * await client.organizationProviders.v3.update(CandidApi.organizationProviders.v2.OrganizationProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
85
88
  * npi: "string",
86
89
  * isRendering: true,
87
90
  * isBilling: true,