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 Patients {
55
55
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
56
56
  *
57
57
  * @example
58
- * await candidApi.preEncounter.patients.v1.patients.create({
58
+ * await client.preEncounter.patients.v1.patients.create({
59
59
  * name: {
60
60
  * family: "string",
61
61
  * given: ["string"],
@@ -186,12 +186,13 @@ class Patients {
186
186
  Authorization: yield this._getAuthorizationHeader(),
187
187
  "X-Fern-Language": "JavaScript",
188
188
  "X-Fern-SDK-Name": "candidhealth",
189
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
189
+ "X-Fern-SDK-Version": "0.24.2",
190
190
  "X-Fern-Runtime": core.RUNTIME.type,
191
191
  "X-Fern-Runtime-Version": core.RUNTIME.version,
192
192
  },
193
193
  contentType: "application/json",
194
- body: yield serializers.preEncounter.patients.v1.MutablePatient.jsonOrThrow(request, {
194
+ requestType: "json",
195
+ body: serializers.preEncounter.patients.v1.MutablePatient.jsonOrThrow(request, {
195
196
  unrecognizedObjectKeys: "strip",
196
197
  }),
197
198
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -201,7 +202,7 @@ class Patients {
201
202
  if (_response.ok) {
202
203
  return {
203
204
  ok: true,
204
- body: yield serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
205
+ body: serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
205
206
  unrecognizedObjectKeys: "passthrough",
206
207
  allowUnrecognizedUnionMembers: true,
207
208
  allowUnrecognizedEnumValues: true,
@@ -214,7 +215,7 @@ class Patients {
214
215
  case "VersionConflictError":
215
216
  return {
216
217
  ok: false,
217
- error: yield serializers.preEncounter.patients.v1.patients.create.Error.parseOrThrow(_response.error.body, {
218
+ error: serializers.preEncounter.patients.v1.patients.create.Error.parseOrThrow(_response.error.body, {
218
219
  unrecognizedObjectKeys: "passthrough",
219
220
  allowUnrecognizedUnionMembers: true,
220
221
  allowUnrecognizedEnumValues: true,
@@ -236,24 +237,25 @@ class Patients {
236
237
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
237
238
  *
238
239
  * @example
239
- * await candidApi.preEncounter.patients.v1.patients.get(CandidApi.preEncounter.patients.v1.PatientId("string"))
240
+ * await client.preEncounter.patients.v1.patients.get(CandidApi.preEncounter.patients.v1.PatientId("string"))
240
241
  */
241
242
  get(id, requestOptions) {
242
243
  var _a, _b;
243
244
  return __awaiter(this, void 0, void 0, function* () {
244
245
  const _response = yield core.fetcher({
245
246
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
246
- .preEncounter, `/patients/v1/${encodeURIComponent(yield serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}`),
247
+ .preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}`),
247
248
  method: "GET",
248
249
  headers: {
249
250
  Authorization: yield this._getAuthorizationHeader(),
250
251
  "X-Fern-Language": "JavaScript",
251
252
  "X-Fern-SDK-Name": "candidhealth",
252
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
253
+ "X-Fern-SDK-Version": "0.24.2",
253
254
  "X-Fern-Runtime": core.RUNTIME.type,
254
255
  "X-Fern-Runtime-Version": core.RUNTIME.version,
255
256
  },
256
257
  contentType: "application/json",
258
+ requestType: "json",
257
259
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
258
260
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
259
261
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -261,7 +263,7 @@ class Patients {
261
263
  if (_response.ok) {
262
264
  return {
263
265
  ok: true,
264
- body: yield serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
266
+ body: serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
265
267
  unrecognizedObjectKeys: "passthrough",
266
268
  allowUnrecognizedUnionMembers: true,
267
269
  allowUnrecognizedEnumValues: true,
@@ -274,7 +276,7 @@ class Patients {
274
276
  case "NotFoundError":
275
277
  return {
276
278
  ok: false,
277
- error: yield serializers.preEncounter.patients.v1.patients.get.Error.parseOrThrow(_response.error.body, {
279
+ error: serializers.preEncounter.patients.v1.patients.get.Error.parseOrThrow(_response.error.body, {
278
280
  unrecognizedObjectKeys: "passthrough",
279
281
  allowUnrecognizedUnionMembers: true,
280
282
  allowUnrecognizedEnumValues: true,
@@ -296,24 +298,25 @@ class Patients {
296
298
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
297
299
  *
298
300
  * @example
299
- * await candidApi.preEncounter.patients.v1.patients.getHistory(CandidApi.preEncounter.patients.v1.PatientId("string"))
301
+ * await client.preEncounter.patients.v1.patients.getHistory(CandidApi.preEncounter.patients.v1.PatientId("string"))
300
302
  */
301
303
  getHistory(id, requestOptions) {
302
304
  var _a, _b;
303
305
  return __awaiter(this, void 0, void 0, function* () {
304
306
  const _response = yield core.fetcher({
305
307
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
306
- .preEncounter, `/patients/v1/${encodeURIComponent(yield serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/history`),
308
+ .preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/history`),
307
309
  method: "GET",
308
310
  headers: {
309
311
  Authorization: yield this._getAuthorizationHeader(),
310
312
  "X-Fern-Language": "JavaScript",
311
313
  "X-Fern-SDK-Name": "candidhealth",
312
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
314
+ "X-Fern-SDK-Version": "0.24.2",
313
315
  "X-Fern-Runtime": core.RUNTIME.type,
314
316
  "X-Fern-Runtime-Version": core.RUNTIME.version,
315
317
  },
316
318
  contentType: "application/json",
319
+ requestType: "json",
317
320
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
318
321
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
319
322
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -321,7 +324,7 @@ class Patients {
321
324
  if (_response.ok) {
322
325
  return {
323
326
  ok: true,
324
- body: yield serializers.preEncounter.patients.v1.patients.getHistory.Response.parseOrThrow(_response.body, {
327
+ body: serializers.preEncounter.patients.v1.patients.getHistory.Response.parseOrThrow(_response.body, {
325
328
  unrecognizedObjectKeys: "passthrough",
326
329
  allowUnrecognizedUnionMembers: true,
327
330
  allowUnrecognizedEnumValues: true,
@@ -334,7 +337,7 @@ class Patients {
334
337
  case "NotFoundError":
335
338
  return {
336
339
  ok: false,
337
- error: yield serializers.preEncounter.patients.v1.patients.getHistory.Error.parseOrThrow(_response.error.body, {
340
+ error: serializers.preEncounter.patients.v1.patients.getHistory.Error.parseOrThrow(_response.error.body, {
338
341
  unrecognizedObjectKeys: "passthrough",
339
342
  allowUnrecognizedUnionMembers: true,
340
343
  allowUnrecognizedEnumValues: true,
@@ -358,7 +361,7 @@ class Patients {
358
361
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
359
362
  *
360
363
  * @example
361
- * await candidApi.preEncounter.patients.v1.patients.update(CandidApi.preEncounter.patients.v1.PatientId("string"), 1, {
364
+ * await client.preEncounter.patients.v1.patients.update(CandidApi.preEncounter.patients.v1.PatientId("string"), 1, {
362
365
  * name: {
363
366
  * family: "string",
364
367
  * given: ["string"],
@@ -483,18 +486,19 @@ class Patients {
483
486
  return __awaiter(this, void 0, void 0, function* () {
484
487
  const _response = yield core.fetcher({
485
488
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
486
- .preEncounter, `/patients/v1/${encodeURIComponent(yield serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
489
+ .preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
487
490
  method: "PUT",
488
491
  headers: {
489
492
  Authorization: yield this._getAuthorizationHeader(),
490
493
  "X-Fern-Language": "JavaScript",
491
494
  "X-Fern-SDK-Name": "candidhealth",
492
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
495
+ "X-Fern-SDK-Version": "0.24.2",
493
496
  "X-Fern-Runtime": core.RUNTIME.type,
494
497
  "X-Fern-Runtime-Version": core.RUNTIME.version,
495
498
  },
496
499
  contentType: "application/json",
497
- body: yield serializers.preEncounter.patients.v1.MutablePatient.jsonOrThrow(request, {
500
+ requestType: "json",
501
+ body: serializers.preEncounter.patients.v1.MutablePatient.jsonOrThrow(request, {
498
502
  unrecognizedObjectKeys: "strip",
499
503
  }),
500
504
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -504,7 +508,7 @@ class Patients {
504
508
  if (_response.ok) {
505
509
  return {
506
510
  ok: true,
507
- body: yield serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
511
+ body: serializers.preEncounter.patients.v1.Patient.parseOrThrow(_response.body, {
508
512
  unrecognizedObjectKeys: "passthrough",
509
513
  allowUnrecognizedUnionMembers: true,
510
514
  allowUnrecognizedEnumValues: true,
@@ -518,7 +522,7 @@ class Patients {
518
522
  case "VersionConflictError":
519
523
  return {
520
524
  ok: false,
521
- error: yield serializers.preEncounter.patients.v1.patients.update.Error.parseOrThrow(_response.error.body, {
525
+ error: serializers.preEncounter.patients.v1.patients.update.Error.parseOrThrow(_response.error.body, {
522
526
  unrecognizedObjectKeys: "passthrough",
523
527
  allowUnrecognizedUnionMembers: true,
524
528
  allowUnrecognizedEnumValues: true,
@@ -541,24 +545,25 @@ class Patients {
541
545
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
542
546
  *
543
547
  * @example
544
- * await candidApi.preEncounter.patients.v1.patients.deactivate(CandidApi.preEncounter.patients.v1.PatientId("string"), 1)
548
+ * await client.preEncounter.patients.v1.patients.deactivate(CandidApi.preEncounter.patients.v1.PatientId("string"), 1)
545
549
  */
546
550
  deactivate(id, version, requestOptions) {
547
551
  var _a, _b;
548
552
  return __awaiter(this, void 0, void 0, function* () {
549
553
  const _response = yield core.fetcher({
550
554
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
551
- .preEncounter, `/patients/v1/${encodeURIComponent(yield serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
555
+ .preEncounter, `/patients/v1/${encodeURIComponent(serializers.preEncounter.patients.v1.PatientId.jsonOrThrow(id))}/${encodeURIComponent(version)}`),
552
556
  method: "DELETE",
553
557
  headers: {
554
558
  Authorization: yield this._getAuthorizationHeader(),
555
559
  "X-Fern-Language": "JavaScript",
556
560
  "X-Fern-SDK-Name": "candidhealth",
557
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
561
+ "X-Fern-SDK-Version": "0.24.2",
558
562
  "X-Fern-Runtime": core.RUNTIME.type,
559
563
  "X-Fern-Runtime-Version": core.RUNTIME.version,
560
564
  },
561
565
  contentType: "application/json",
566
+ requestType: "json",
562
567
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
563
568
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
564
569
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -575,7 +580,7 @@ class Patients {
575
580
  case "VersionConflictError":
576
581
  return {
577
582
  ok: false,
578
- error: yield serializers.preEncounter.patients.v1.patients.deactivate.Error.parseOrThrow(_response.error.body, {
583
+ error: serializers.preEncounter.patients.v1.patients.deactivate.Error.parseOrThrow(_response.error.body, {
579
584
  unrecognizedObjectKeys: "passthrough",
580
585
  allowUnrecognizedUnionMembers: true,
581
586
  allowUnrecognizedEnumValues: true,
@@ -597,7 +602,7 @@ class Patients {
597
602
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
598
603
  *
599
604
  * @example
600
- * await candidApi.preEncounter.patients.v1.patients.search({
605
+ * await client.preEncounter.patients.v1.patients.search({
601
606
  * nameContains: "string"
602
607
  * })
603
608
  */
@@ -617,12 +622,13 @@ class Patients {
617
622
  Authorization: yield this._getAuthorizationHeader(),
618
623
  "X-Fern-Language": "JavaScript",
619
624
  "X-Fern-SDK-Name": "candidhealth",
620
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
625
+ "X-Fern-SDK-Version": "0.24.2",
621
626
  "X-Fern-Runtime": core.RUNTIME.type,
622
627
  "X-Fern-Runtime-Version": core.RUNTIME.version,
623
628
  },
624
629
  contentType: "application/json",
625
630
  queryParameters: _queryParams,
631
+ requestType: "json",
626
632
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
627
633
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
628
634
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -630,7 +636,7 @@ class Patients {
630
636
  if (_response.ok) {
631
637
  return {
632
638
  ok: true,
633
- body: yield serializers.preEncounter.patients.v1.patients.search.Response.parseOrThrow(_response.body, {
639
+ body: serializers.preEncounter.patients.v1.patients.search.Response.parseOrThrow(_response.body, {
634
640
  unrecognizedObjectKeys: "passthrough",
635
641
  allowUnrecognizedUnionMembers: true,
636
642
  allowUnrecognizedEnumValues: true,
@@ -651,7 +657,7 @@ class Patients {
651
657
  * @param {Patients.RequestOptions} requestOptions - Request-specific configuration.
652
658
  *
653
659
  * @example
654
- * await candidApi.preEncounter.patients.v1.patients.scan({
660
+ * await client.preEncounter.patients.v1.patients.scan({
655
661
  * since: new Date("2024-01-15T09:30:00.000Z")
656
662
  * })
657
663
  */
@@ -669,12 +675,13 @@ class Patients {
669
675
  Authorization: yield this._getAuthorizationHeader(),
670
676
  "X-Fern-Language": "JavaScript",
671
677
  "X-Fern-SDK-Name": "candidhealth",
672
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
678
+ "X-Fern-SDK-Version": "0.24.2",
673
679
  "X-Fern-Runtime": core.RUNTIME.type,
674
680
  "X-Fern-Runtime-Version": core.RUNTIME.version,
675
681
  },
676
682
  contentType: "application/json",
677
683
  queryParameters: _queryParams,
684
+ requestType: "json",
678
685
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
679
686
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
680
687
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -682,7 +689,7 @@ class Patients {
682
689
  if (_response.ok) {
683
690
  return {
684
691
  ok: true,
685
- body: yield serializers.preEncounter.patients.v1.patients.scan.Response.parseOrThrow(_response.body, {
692
+ body: serializers.preEncounter.patients.v1.patients.scan.Response.parseOrThrow(_response.body, {
686
693
  unrecognizedObjectKeys: "passthrough",
687
694
  allowUnrecognizedUnionMembers: true,
688
695
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace ServiceFacility {
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
  }
@@ -24,7 +27,7 @@ export declare class ServiceFacility {
24
27
  * @param {ServiceFacility.RequestOptions} requestOptions - Request-specific configuration.
25
28
  *
26
29
  * @example
27
- * await candidApi.serviceFacility.update(CandidApi.ServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
30
+ * await client.serviceFacility.update(CandidApi.ServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
28
31
  * organizationName: "string",
29
32
  * npi: "string",
30
33
  * address: {
@@ -54,7 +54,7 @@ class ServiceFacility {
54
54
  * @param {ServiceFacility.RequestOptions} requestOptions - Request-specific configuration.
55
55
  *
56
56
  * @example
57
- * await candidApi.serviceFacility.update(CandidApi.ServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
57
+ * await client.serviceFacility.update(CandidApi.ServiceFacilityId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
58
58
  * organizationName: "string",
59
59
  * npi: "string",
60
60
  * address: {
@@ -72,20 +72,19 @@ class ServiceFacility {
72
72
  return __awaiter(this, void 0, void 0, function* () {
73
73
  const _response = yield core.fetcher({
74
74
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
75
- .candidApi, `/api/service_facility/v2/${encodeURIComponent(yield serializers.ServiceFacilityId.jsonOrThrow(serviceFacilityId))}`),
75
+ .candidApi, `/api/service_facility/v2/${encodeURIComponent(serializers.ServiceFacilityId.jsonOrThrow(serviceFacilityId))}`),
76
76
  method: "PATCH",
77
77
  headers: {
78
78
  Authorization: yield this._getAuthorizationHeader(),
79
79
  "X-Fern-Language": "JavaScript",
80
80
  "X-Fern-SDK-Name": "candidhealth",
81
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
81
+ "X-Fern-SDK-Version": "0.24.2",
82
82
  "X-Fern-Runtime": core.RUNTIME.type,
83
83
  "X-Fern-Runtime-Version": core.RUNTIME.version,
84
84
  },
85
85
  contentType: "application/json",
86
- body: yield serializers.EncounterServiceFacilityUpdate.jsonOrThrow(request, {
87
- unrecognizedObjectKeys: "strip",
88
- }),
86
+ requestType: "json",
87
+ body: serializers.EncounterServiceFacilityUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
89
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
90
89
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
91
90
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -93,7 +92,7 @@ class ServiceFacility {
93
92
  if (_response.ok) {
94
93
  return {
95
94
  ok: true,
96
- body: yield serializers.EncounterServiceFacility.parseOrThrow(_response.body, {
95
+ body: serializers.EncounterServiceFacility.parseOrThrow(_response.body, {
97
96
  unrecognizedObjectKeys: "passthrough",
98
97
  allowUnrecognizedUnionMembers: true,
99
98
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace Tasks {
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.tasks.v3.getActions(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
29
+ * await client.tasks.v3.getActions(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
27
30
  */
28
31
  getActions(taskId: CandidApi.TaskId, requestOptions?: V3.RequestOptions): Promise<core.APIResponse<CandidApi.tasks.v3.TaskActions, CandidApi.tasks.v3.getActions.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.tasks.v3.getMulti({
37
+ * await client.tasks.v3.getMulti({
35
38
  * limit: 1,
36
39
  * pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"),
37
40
  * status: CandidApi.tasks.TaskStatus.Finished,
@@ -53,7 +56,7 @@ export declare class V3 {
53
56
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
54
57
  *
55
58
  * @example
56
- * await candidApi.tasks.v3.get(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
59
+ * await client.tasks.v3.get(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
57
60
  */
58
61
  get(taskId: CandidApi.TaskId, requestOptions?: V3.RequestOptions): Promise<core.APIResponse<CandidApi.tasks.v3.Task, CandidApi.tasks.v3.get.Error>>;
59
62
  /**
@@ -61,7 +64,7 @@ export declare class V3 {
61
64
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
62
65
  *
63
66
  * @example
64
- * await candidApi.tasks.v3.create({
67
+ * await client.tasks.v3.create({
65
68
  * encounterId: CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
66
69
  * taskType: CandidApi.tasks.TaskType.CustomerDataRequest,
67
70
  * description: "string",
@@ -78,7 +81,7 @@ export declare class V3 {
78
81
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
79
82
  *
80
83
  * @example
81
- * await candidApi.tasks.v3.update(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
84
+ * await client.tasks.v3.update(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
82
85
  * status: CandidApi.tasks.TaskStatus.Finished,
83
86
  * assigneeUserId: CandidApi.UserId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
84
87
  * blocksClaimSubmission: true
@@ -53,24 +53,25 @@ class V3 {
53
53
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
54
54
  *
55
55
  * @example
56
- * await candidApi.tasks.v3.getActions(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
56
+ * await client.tasks.v3.getActions(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
57
57
  */
58
58
  getActions(taskId, 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/tasks/v3/${encodeURIComponent(yield serializers.TaskId.jsonOrThrow(taskId))}/actions`),
63
+ .candidApi, `/api/tasks/v3/${encodeURIComponent(serializers.TaskId.jsonOrThrow(taskId))}/actions`),
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.tasks.v3.TaskActions.parseOrThrow(_response.body, {
82
+ body: serializers.tasks.v3.TaskActions.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.tasks.v3.getMulti({
101
+ * await client.tasks.v3.getMulti({
101
102
  * limit: 1,
102
103
  * pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"),
103
104
  * status: CandidApi.tasks.TaskStatus.Finished,
@@ -165,12 +166,13 @@ class V3 {
165
166
  Authorization: yield this._getAuthorizationHeader(),
166
167
  "X-Fern-Language": "JavaScript",
167
168
  "X-Fern-SDK-Name": "candidhealth",
168
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
169
+ "X-Fern-SDK-Version": "0.24.2",
169
170
  "X-Fern-Runtime": core.RUNTIME.type,
170
171
  "X-Fern-Runtime-Version": core.RUNTIME.version,
171
172
  },
172
173
  contentType: "application/json",
173
174
  queryParameters: _queryParams,
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 V3 {
178
180
  if (_response.ok) {
179
181
  return {
180
182
  ok: true,
181
- body: yield serializers.tasks.v3.TaskPage.parseOrThrow(_response.body, {
183
+ body: serializers.tasks.v3.TaskPage.parseOrThrow(_response.body, {
182
184
  unrecognizedObjectKeys: "passthrough",
183
185
  allowUnrecognizedUnionMembers: true,
184
186
  allowUnrecognizedEnumValues: true,
@@ -191,7 +193,7 @@ class V3 {
191
193
  case "UnprocessableEntityError":
192
194
  return {
193
195
  ok: false,
194
- error: yield serializers.tasks.v3.getMulti.Error.parseOrThrow(_response.error.body, {
196
+ error: serializers.tasks.v3.getMulti.Error.parseOrThrow(_response.error.body, {
195
197
  unrecognizedObjectKeys: "passthrough",
196
198
  allowUnrecognizedUnionMembers: true,
197
199
  allowUnrecognizedEnumValues: true,
@@ -211,24 +213,25 @@ class V3 {
211
213
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
212
214
  *
213
215
  * @example
214
- * await candidApi.tasks.v3.get(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
216
+ * await client.tasks.v3.get(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
215
217
  */
216
218
  get(taskId, requestOptions) {
217
219
  var _a, _b;
218
220
  return __awaiter(this, void 0, void 0, function* () {
219
221
  const _response = yield core.fetcher({
220
222
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
221
- .candidApi, `/api/tasks/v3/${encodeURIComponent(yield serializers.TaskId.jsonOrThrow(taskId))}`),
223
+ .candidApi, `/api/tasks/v3/${encodeURIComponent(serializers.TaskId.jsonOrThrow(taskId))}`),
222
224
  method: "GET",
223
225
  headers: {
224
226
  Authorization: yield this._getAuthorizationHeader(),
225
227
  "X-Fern-Language": "JavaScript",
226
228
  "X-Fern-SDK-Name": "candidhealth",
227
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
229
+ "X-Fern-SDK-Version": "0.24.2",
228
230
  "X-Fern-Runtime": core.RUNTIME.type,
229
231
  "X-Fern-Runtime-Version": core.RUNTIME.version,
230
232
  },
231
233
  contentType: "application/json",
234
+ requestType: "json",
232
235
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
233
236
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
234
237
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -236,7 +239,7 @@ class V3 {
236
239
  if (_response.ok) {
237
240
  return {
238
241
  ok: true,
239
- body: yield serializers.tasks.v3.Task.parseOrThrow(_response.body, {
242
+ body: serializers.tasks.v3.Task.parseOrThrow(_response.body, {
240
243
  unrecognizedObjectKeys: "passthrough",
241
244
  allowUnrecognizedUnionMembers: true,
242
245
  allowUnrecognizedEnumValues: true,
@@ -250,7 +253,7 @@ class V3 {
250
253
  case "UnauthorizedError":
251
254
  return {
252
255
  ok: false,
253
- error: yield serializers.tasks.v3.get.Error.parseOrThrow(_response.error.body, {
256
+ error: serializers.tasks.v3.get.Error.parseOrThrow(_response.error.body, {
254
257
  unrecognizedObjectKeys: "passthrough",
255
258
  allowUnrecognizedUnionMembers: true,
256
259
  allowUnrecognizedEnumValues: true,
@@ -270,7 +273,7 @@ class V3 {
270
273
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
271
274
  *
272
275
  * @example
273
- * await candidApi.tasks.v3.create({
276
+ * await client.tasks.v3.create({
274
277
  * encounterId: CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
275
278
  * taskType: CandidApi.tasks.TaskType.CustomerDataRequest,
276
279
  * description: "string",
@@ -291,12 +294,13 @@ class V3 {
291
294
  Authorization: yield this._getAuthorizationHeader(),
292
295
  "X-Fern-Language": "JavaScript",
293
296
  "X-Fern-SDK-Name": "candidhealth",
294
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
297
+ "X-Fern-SDK-Version": "0.24.2",
295
298
  "X-Fern-Runtime": core.RUNTIME.type,
296
299
  "X-Fern-Runtime-Version": core.RUNTIME.version,
297
300
  },
298
301
  contentType: "application/json",
299
- body: yield serializers.tasks.v3.TaskCreateV3.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
302
+ requestType: "json",
303
+ body: serializers.tasks.v3.TaskCreateV3.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
300
304
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
301
305
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
302
306
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -304,7 +308,7 @@ class V3 {
304
308
  if (_response.ok) {
305
309
  return {
306
310
  ok: true,
307
- body: yield serializers.tasks.v3.Task.parseOrThrow(_response.body, {
311
+ body: serializers.tasks.v3.Task.parseOrThrow(_response.body, {
308
312
  unrecognizedObjectKeys: "passthrough",
309
313
  allowUnrecognizedUnionMembers: true,
310
314
  allowUnrecognizedEnumValues: true,
@@ -324,7 +328,7 @@ class V3 {
324
328
  * @param {V3.RequestOptions} requestOptions - Request-specific configuration.
325
329
  *
326
330
  * @example
327
- * await candidApi.tasks.v3.update(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
331
+ * await client.tasks.v3.update(CandidApi.TaskId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
328
332
  * status: CandidApi.tasks.TaskStatus.Finished,
329
333
  * assigneeUserId: CandidApi.UserId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
330
334
  * blocksClaimSubmission: true
@@ -335,18 +339,19 @@ class V3 {
335
339
  return __awaiter(this, void 0, void 0, function* () {
336
340
  const _response = yield core.fetcher({
337
341
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
338
- .candidApi, `/api/tasks/v3/${encodeURIComponent(yield serializers.TaskId.jsonOrThrow(taskId))}`),
342
+ .candidApi, `/api/tasks/v3/${encodeURIComponent(serializers.TaskId.jsonOrThrow(taskId))}`),
339
343
  method: "PATCH",
340
344
  headers: {
341
345
  Authorization: yield this._getAuthorizationHeader(),
342
346
  "X-Fern-Language": "JavaScript",
343
347
  "X-Fern-SDK-Name": "candidhealth",
344
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
348
+ "X-Fern-SDK-Version": "0.24.2",
345
349
  "X-Fern-Runtime": core.RUNTIME.type,
346
350
  "X-Fern-Runtime-Version": core.RUNTIME.version,
347
351
  },
348
352
  contentType: "application/json",
349
- body: yield serializers.tasks.v3.TaskUpdateV3.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
353
+ requestType: "json",
354
+ body: serializers.tasks.v3.TaskUpdateV3.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
350
355
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
351
356
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
352
357
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -354,7 +359,7 @@ class V3 {
354
359
  if (_response.ok) {
355
360
  return {
356
361
  ok: true,
357
- body: yield serializers.tasks.v3.Task.parseOrThrow(_response.body, {
362
+ body: serializers.tasks.v3.Task.parseOrThrow(_response.body, {
358
363
  unrecognizedObjectKeys: "passthrough",
359
364
  allowUnrecognizedUnionMembers: true,
360
365
  allowUnrecognizedEnumValues: true,
@@ -369,7 +374,7 @@ class V3 {
369
374
  case "TaskUpdatedToDeprecatedStatusError":
370
375
  return {
371
376
  ok: false,
372
- error: yield serializers.tasks.v3.update.Error.parseOrThrow(_response.error.body, {
377
+ error: serializers.tasks.v3.update.Error.parseOrThrow(_response.error.body, {
373
378
  unrecognizedObjectKeys: "passthrough",
374
379
  allowUnrecognizedUnionMembers: true,
375
380
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace WriteOffs {
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
  }