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
@@ -10,8 +10,11 @@ export declare namespace V2 {
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 V2 {
23
26
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
24
27
  *
25
28
  * @example
26
- * await candidApi.billingNotes.v2.create({
29
+ * await client.billingNotes.v2.create({
27
30
  * encounterId: CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
28
31
  * text: "string"
29
32
  * })
@@ -53,7 +53,7 @@ class V2 {
53
53
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
54
54
  *
55
55
  * @example
56
- * await candidApi.billingNotes.v2.create({
56
+ * await client.billingNotes.v2.create({
57
57
  * encounterId: CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
58
58
  * text: "string"
59
59
  * })
@@ -69,12 +69,13 @@ class V2 {
69
69
  Authorization: yield this._getAuthorizationHeader(),
70
70
  "X-Fern-Language": "JavaScript",
71
71
  "X-Fern-SDK-Name": "candidhealth",
72
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
72
+ "X-Fern-SDK-Version": "0.24.2",
73
73
  "X-Fern-Runtime": core.RUNTIME.type,
74
74
  "X-Fern-Runtime-Version": core.RUNTIME.version,
75
75
  },
76
76
  contentType: "application/json",
77
- body: yield serializers.billingNotes.v2.StandaloneBillingNoteCreate.jsonOrThrow(request, {
77
+ requestType: "json",
78
+ body: serializers.billingNotes.v2.StandaloneBillingNoteCreate.jsonOrThrow(request, {
78
79
  unrecognizedObjectKeys: "strip",
79
80
  }),
80
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -84,7 +85,7 @@ class V2 {
84
85
  if (_response.ok) {
85
86
  return {
86
87
  ok: true,
87
- body: yield serializers.billingNotes.v2.BillingNote.parseOrThrow(_response.body, {
88
+ body: serializers.billingNotes.v2.BillingNote.parseOrThrow(_response.body, {
88
89
  unrecognizedObjectKeys: "passthrough",
89
90
  allowUnrecognizedUnionMembers: true,
90
91
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace Contracts {
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 V2 {
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 V2 {
23
26
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
24
27
  *
25
28
  * @example
26
- * await candidApi.contracts.v2.get(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
29
+ * await client.contracts.v2.get(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
27
30
  */
28
31
  get(contractId: CandidApi.contracts.v2.ContractId, requestOptions?: V2.RequestOptions): Promise<core.APIResponse<CandidApi.contracts.v2.ContractWithProviders, CandidApi.contracts.v2.get.Error>>;
29
32
  /**
@@ -31,7 +34,7 @@ export declare class V2 {
31
34
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
32
35
  *
33
36
  * @example
34
- * await candidApi.contracts.v2.getMulti({
37
+ * await client.contracts.v2.getMulti({
35
38
  * pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"),
36
39
  * limit: 1,
37
40
  * contractingProviderId: CandidApi.contracts.v2.ContractingProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -49,7 +52,7 @@ export declare class V2 {
49
52
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
50
53
  *
51
54
  * @example
52
- * await candidApi.contracts.v2.create({
55
+ * await client.contracts.v2.create({
53
56
  * contractingProviderId: CandidApi.contracts.v2.ContractingProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
54
57
  * renderingProviderIds: new Set([CandidApi.contracts.v2.RenderingProviderid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")]),
55
58
  * payerUuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
@@ -77,7 +80,7 @@ export declare class V2 {
77
80
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
78
81
  *
79
82
  * @example
80
- * await candidApi.contracts.v2.delete(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
83
+ * await client.contracts.v2.delete(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
81
84
  */
82
85
  delete(contractId: CandidApi.contracts.v2.ContractId, requestOptions?: V2.RequestOptions): Promise<core.APIResponse<void, CandidApi.contracts.v2.delete.Error>>;
83
86
  /**
@@ -86,7 +89,7 @@ export declare class V2 {
86
89
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
87
90
  *
88
91
  * @example
89
- * await candidApi.contracts.v2.update(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
92
+ * await client.contracts.v2.update(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
90
93
  * renderingProviderIds: new Set([CandidApi.contracts.v2.RenderingProviderid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")]),
91
94
  * effectiveDate: CandidApi.Date_("string"),
92
95
  * expirationDate: {
@@ -53,24 +53,25 @@ class V2 {
53
53
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
54
54
  *
55
55
  * @example
56
- * await candidApi.contracts.v2.get(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
56
+ * await client.contracts.v2.get(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
57
57
  */
58
58
  get(contractId, requestOptions) {
59
59
  var _a, _b;
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/contracts/v2/${encodeURIComponent(yield serializers.contracts.v2.ContractId.jsonOrThrow(contractId))}`),
63
+ .candidApi, `/api/contracts/v2/${encodeURIComponent(serializers.contracts.v2.ContractId.jsonOrThrow(contractId))}`),
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 V2 {
78
79
  if (_response.ok) {
79
80
  return {
80
81
  ok: true,
81
- body: yield serializers.contracts.v2.ContractWithProviders.parseOrThrow(_response.body, {
82
+ body: serializers.contracts.v2.ContractWithProviders.parseOrThrow(_response.body, {
82
83
  unrecognizedObjectKeys: "passthrough",
83
84
  allowUnrecognizedUnionMembers: true,
84
85
  allowUnrecognizedEnumValues: true,
@@ -91,7 +92,7 @@ class V2 {
91
92
  case "EntityNotFoundError":
92
93
  return {
93
94
  ok: false,
94
- error: yield serializers.contracts.v2.get.Error.parseOrThrow(_response.error.body, {
95
+ error: serializers.contracts.v2.get.Error.parseOrThrow(_response.error.body, {
95
96
  unrecognizedObjectKeys: "passthrough",
96
97
  allowUnrecognizedUnionMembers: true,
97
98
  allowUnrecognizedEnumValues: true,
@@ -111,7 +112,7 @@ class V2 {
111
112
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
112
113
  *
113
114
  * @example
114
- * await candidApi.contracts.v2.getMulti({
115
+ * await client.contracts.v2.getMulti({
115
116
  * pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9"),
116
117
  * limit: 1,
117
118
  * contractingProviderId: CandidApi.contracts.v2.ContractingProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
@@ -170,12 +171,13 @@ class V2 {
170
171
  Authorization: yield this._getAuthorizationHeader(),
171
172
  "X-Fern-Language": "JavaScript",
172
173
  "X-Fern-SDK-Name": "candidhealth",
173
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
174
+ "X-Fern-SDK-Version": "0.24.2",
174
175
  "X-Fern-Runtime": core.RUNTIME.type,
175
176
  "X-Fern-Runtime-Version": core.RUNTIME.version,
176
177
  },
177
178
  contentType: "application/json",
178
179
  queryParameters: _queryParams,
180
+ requestType: "json",
179
181
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
180
182
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
181
183
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -183,7 +185,7 @@ class V2 {
183
185
  if (_response.ok) {
184
186
  return {
185
187
  ok: true,
186
- body: yield serializers.contracts.v2.ContractsPage.parseOrThrow(_response.body, {
188
+ body: serializers.contracts.v2.ContractsPage.parseOrThrow(_response.body, {
187
189
  unrecognizedObjectKeys: "passthrough",
188
190
  allowUnrecognizedUnionMembers: true,
189
191
  allowUnrecognizedEnumValues: true,
@@ -204,7 +206,7 @@ class V2 {
204
206
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
205
207
  *
206
208
  * @example
207
- * await candidApi.contracts.v2.create({
209
+ * await client.contracts.v2.create({
208
210
  * contractingProviderId: CandidApi.contracts.v2.ContractingProviderId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
209
211
  * renderingProviderIds: new Set([CandidApi.contracts.v2.RenderingProviderid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")]),
210
212
  * payerUuid: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
@@ -237,14 +239,13 @@ class V2 {
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.contracts.v2.ContractCreate.jsonOrThrow(request, {
246
- unrecognizedObjectKeys: "strip",
247
- }),
247
+ requestType: "json",
248
+ body: serializers.contracts.v2.ContractCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
248
249
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
249
250
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
250
251
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -252,7 +253,7 @@ class V2 {
252
253
  if (_response.ok) {
253
254
  return {
254
255
  ok: true,
255
- body: yield serializers.contracts.v2.ContractWithProviders.parseOrThrow(_response.body, {
256
+ body: serializers.contracts.v2.ContractWithProviders.parseOrThrow(_response.body, {
256
257
  unrecognizedObjectKeys: "passthrough",
257
258
  allowUnrecognizedUnionMembers: true,
258
259
  allowUnrecognizedEnumValues: true,
@@ -271,24 +272,25 @@ class V2 {
271
272
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
272
273
  *
273
274
  * @example
274
- * await candidApi.contracts.v2.delete(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
275
+ * await client.contracts.v2.delete(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
275
276
  */
276
277
  delete(contractId, requestOptions) {
277
278
  var _a, _b;
278
279
  return __awaiter(this, void 0, void 0, function* () {
279
280
  const _response = yield core.fetcher({
280
281
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
281
- .candidApi, `/api/contracts/v2/${encodeURIComponent(yield serializers.contracts.v2.ContractId.jsonOrThrow(contractId))}`),
282
+ .candidApi, `/api/contracts/v2/${encodeURIComponent(serializers.contracts.v2.ContractId.jsonOrThrow(contractId))}`),
282
283
  method: "DELETE",
283
284
  headers: {
284
285
  Authorization: yield this._getAuthorizationHeader(),
285
286
  "X-Fern-Language": "JavaScript",
286
287
  "X-Fern-SDK-Name": "candidhealth",
287
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
288
+ "X-Fern-SDK-Version": "0.24.2",
288
289
  "X-Fern-Runtime": core.RUNTIME.type,
289
290
  "X-Fern-Runtime-Version": core.RUNTIME.version,
290
291
  },
291
292
  contentType: "application/json",
293
+ requestType: "json",
292
294
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
293
295
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
294
296
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -304,7 +306,7 @@ class V2 {
304
306
  case "ContractIsLinkedToFeeScheduleHttpError":
305
307
  return {
306
308
  ok: false,
307
- error: yield serializers.contracts.v2.delete.Error.parseOrThrow(_response.error.body, {
309
+ error: serializers.contracts.v2.delete.Error.parseOrThrow(_response.error.body, {
308
310
  unrecognizedObjectKeys: "passthrough",
309
311
  allowUnrecognizedUnionMembers: true,
310
312
  allowUnrecognizedEnumValues: true,
@@ -325,7 +327,7 @@ class V2 {
325
327
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
326
328
  *
327
329
  * @example
328
- * await candidApi.contracts.v2.update(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
330
+ * await client.contracts.v2.update(CandidApi.contracts.v2.ContractId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
329
331
  * renderingProviderIds: new Set([CandidApi.contracts.v2.RenderingProviderid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")]),
330
332
  * effectiveDate: CandidApi.Date_("string"),
331
333
  * expirationDate: {
@@ -365,20 +367,19 @@ class V2 {
365
367
  return __awaiter(this, void 0, void 0, function* () {
366
368
  const _response = yield core.fetcher({
367
369
  url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
368
- .candidApi, `/api/contracts/v2/${encodeURIComponent(yield serializers.contracts.v2.ContractId.jsonOrThrow(contractId))}`),
370
+ .candidApi, `/api/contracts/v2/${encodeURIComponent(serializers.contracts.v2.ContractId.jsonOrThrow(contractId))}`),
369
371
  method: "PATCH",
370
372
  headers: {
371
373
  Authorization: yield this._getAuthorizationHeader(),
372
374
  "X-Fern-Language": "JavaScript",
373
375
  "X-Fern-SDK-Name": "candidhealth",
374
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
376
+ "X-Fern-SDK-Version": "0.24.2",
375
377
  "X-Fern-Runtime": core.RUNTIME.type,
376
378
  "X-Fern-Runtime-Version": core.RUNTIME.version,
377
379
  },
378
380
  contentType: "application/json",
379
- body: yield serializers.contracts.v2.ContractUpdate.jsonOrThrow(request, {
380
- unrecognizedObjectKeys: "strip",
381
- }),
381
+ requestType: "json",
382
+ body: serializers.contracts.v2.ContractUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
382
383
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
383
384
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
384
385
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -386,7 +387,7 @@ class V2 {
386
387
  if (_response.ok) {
387
388
  return {
388
389
  ok: true,
389
- body: yield serializers.contracts.v2.ContractWithProviders.parseOrThrow(_response.body, {
390
+ body: serializers.contracts.v2.ContractWithProviders.parseOrThrow(_response.body, {
390
391
  unrecognizedObjectKeys: "passthrough",
391
392
  allowUnrecognizedUnionMembers: true,
392
393
  allowUnrecognizedEnumValues: true,
@@ -399,7 +400,7 @@ class V2 {
399
400
  case "UnprocessableEntityError":
400
401
  return {
401
402
  ok: false,
402
- error: yield serializers.contracts.v2.update.Error.parseOrThrow(_response.error.body, {
403
+ error: serializers.contracts.v2.update.Error.parseOrThrow(_response.error.body, {
403
404
  unrecognizedObjectKeys: "passthrough",
404
405
  allowUnrecognizedUnionMembers: true,
405
406
  allowUnrecognizedEnumValues: true,
@@ -10,8 +10,11 @@ export declare namespace Eligibility {
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 V2 {
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
  }
@@ -38,7 +41,7 @@ export declare class V2 {
38
41
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
39
42
  *
40
43
  * @example
41
- * await candidApi.eligibility.v2.submitEligibilityCheck({
44
+ * await client.eligibility.v2.submitEligibilityCheck({
42
45
  * "key": "value"
43
46
  * })
44
47
  */
@@ -66,7 +69,7 @@ export declare class V2 {
66
69
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
67
70
  *
68
71
  * @example
69
- * await candidApi.eligibility.v2.submitEligibilityCheckAvaility()
72
+ * await client.eligibility.v2.submitEligibilityCheckAvaility()
70
73
  */
71
74
  submitEligibilityCheckAvaility(requestOptions?: V2.RequestOptions): Promise<core.APIResponse<unknown, CandidApi.eligibility.v2.submitEligibilityCheckAvaility.Error>>;
72
75
  /**
@@ -89,7 +92,7 @@ export declare class V2 {
89
92
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
90
93
  *
91
94
  * @example
92
- * await candidApi.eligibility.v2.submitEligibilityCheckAvailityPost({
95
+ * await client.eligibility.v2.submitEligibilityCheckAvailityPost({
93
96
  * "key": "value"
94
97
  * })
95
98
  */
@@ -68,7 +68,7 @@ class V2 {
68
68
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
69
69
  *
70
70
  * @example
71
- * await candidApi.eligibility.v2.submitEligibilityCheck({
71
+ * await client.eligibility.v2.submitEligibilityCheck({
72
72
  * "key": "value"
73
73
  * })
74
74
  */
@@ -83,11 +83,12 @@ class V2 {
83
83
  Authorization: yield this._getAuthorizationHeader(),
84
84
  "X-Fern-Language": "JavaScript",
85
85
  "X-Fern-SDK-Name": "candidhealth",
86
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
86
+ "X-Fern-SDK-Version": "0.24.2",
87
87
  "X-Fern-Runtime": core.RUNTIME.type,
88
88
  "X-Fern-Runtime-Version": core.RUNTIME.version,
89
89
  },
90
90
  contentType: "application/json",
91
+ requestType: "json",
91
92
  body: request,
92
93
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
93
94
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -104,7 +105,7 @@ class V2 {
104
105
  case "HttpServiceUnavailableError":
105
106
  return {
106
107
  ok: false,
107
- error: yield serializers.eligibility.v2.submitEligibilityCheck.Error.parseOrThrow(_response.error.body, {
108
+ error: serializers.eligibility.v2.submitEligibilityCheck.Error.parseOrThrow(_response.error.body, {
108
109
  unrecognizedObjectKeys: "passthrough",
109
110
  allowUnrecognizedUnionMembers: true,
110
111
  allowUnrecognizedEnumValues: true,
@@ -142,7 +143,7 @@ class V2 {
142
143
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
143
144
  *
144
145
  * @example
145
- * await candidApi.eligibility.v2.submitEligibilityCheckAvaility()
146
+ * await client.eligibility.v2.submitEligibilityCheckAvaility()
146
147
  */
147
148
  submitEligibilityCheckAvaility(requestOptions) {
148
149
  var _a, _b;
@@ -155,11 +156,12 @@ class V2 {
155
156
  Authorization: yield this._getAuthorizationHeader(),
156
157
  "X-Fern-Language": "JavaScript",
157
158
  "X-Fern-SDK-Name": "candidhealth",
158
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
159
+ "X-Fern-SDK-Version": "0.24.2",
159
160
  "X-Fern-Runtime": core.RUNTIME.type,
160
161
  "X-Fern-Runtime-Version": core.RUNTIME.version,
161
162
  },
162
163
  contentType: "application/json",
164
+ requestType: "json",
163
165
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
164
166
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
165
167
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -175,7 +177,7 @@ class V2 {
175
177
  case "HttpRequestValidationError":
176
178
  return {
177
179
  ok: false,
178
- error: yield serializers.eligibility.v2.submitEligibilityCheckAvaility.Error.parseOrThrow(_response.error.body, {
180
+ error: serializers.eligibility.v2.submitEligibilityCheckAvaility.Error.parseOrThrow(_response.error.body, {
179
181
  unrecognizedObjectKeys: "passthrough",
180
182
  allowUnrecognizedUnionMembers: true,
181
183
  allowUnrecognizedEnumValues: true,
@@ -210,7 +212,7 @@ class V2 {
210
212
  * @param {V2.RequestOptions} requestOptions - Request-specific configuration.
211
213
  *
212
214
  * @example
213
- * await candidApi.eligibility.v2.submitEligibilityCheckAvailityPost({
215
+ * await client.eligibility.v2.submitEligibilityCheckAvailityPost({
214
216
  * "key": "value"
215
217
  * })
216
218
  */
@@ -225,11 +227,12 @@ class V2 {
225
227
  Authorization: yield this._getAuthorizationHeader(),
226
228
  "X-Fern-Language": "JavaScript",
227
229
  "X-Fern-SDK-Name": "candidhealth",
228
- "X-Fern-SDK-Version": "0.24.0-2a6d412",
230
+ "X-Fern-SDK-Version": "0.24.2",
229
231
  "X-Fern-Runtime": core.RUNTIME.type,
230
232
  "X-Fern-Runtime-Version": core.RUNTIME.version,
231
233
  },
232
234
  contentType: "application/json",
235
+ requestType: "json",
233
236
  body: request,
234
237
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
235
238
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -246,7 +249,7 @@ class V2 {
246
249
  case "HttpRequestValidationError":
247
250
  return {
248
251
  ok: false,
249
- error: yield serializers.eligibility.v2.submitEligibilityCheckAvailityPost.Error.parseOrThrow(_response.error
252
+ error: serializers.eligibility.v2.submitEligibilityCheckAvailityPost.Error.parseOrThrow(_response.error
250
253
  .body, {
251
254
  unrecognizedObjectKeys: "passthrough",
252
255
  allowUnrecognizedUnionMembers: true,
@@ -10,8 +10,11 @@ export declare namespace Encounters {
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 V4 {
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 V4 {
23
26
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
24
27
  *
25
28
  * @example
26
- * await candidApi.encounters.v4.getAll({
29
+ * await client.encounters.v4.getAll({
27
30
  * limit: 100,
28
31
  * claimStatus: CandidApi.ClaimStatus.BillerReceived,
29
32
  * sort: CandidApi.encounters.v4.EncounterSortOptions.CreatedAtAsc,
@@ -42,7 +45,7 @@ export declare class V4 {
42
45
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
43
46
  *
44
47
  * @example
45
- * await candidApi.encounters.v4.get(CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
48
+ * await client.encounters.v4.get(CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
46
49
  */
47
50
  get(encounterId: CandidApi.EncounterId, requestOptions?: V4.RequestOptions): Promise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.get.Error>>;
48
51
  /**
@@ -50,7 +53,7 @@ export declare class V4 {
50
53
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
51
54
  *
52
55
  * @example
53
- * await candidApi.encounters.v4.create({
56
+ * await client.encounters.v4.create({
54
57
  * dateOfService: "2023-01-15",
55
58
  * endDateOfService: "2023-01-15",
56
59
  * patient: {
@@ -152,21 +155,6 @@ export declare class V4 {
152
155
  * lastName: "string",
153
156
  * organizationName: "string"
154
157
  * },
155
- * orderingProvider: {
156
- * npi: "string",
157
- * taxonomyCode: "string",
158
- * address: {
159
- * address1: "123 Main St",
160
- * address2: "Apt 1",
161
- * city: "New York",
162
- * state: CandidApi.State.Ny,
163
- * zipCode: "10001",
164
- * zipPlusFourCode: "1234"
165
- * },
166
- * firstName: "string",
167
- * lastName: "string",
168
- * organizationName: "string"
169
- * },
170
158
  * serviceFacility: {
171
159
  * organizationName: "string",
172
160
  * npi: "string",
@@ -442,7 +430,7 @@ export declare class V4 {
442
430
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
443
431
  *
444
432
  * @example
445
- * await candidApi.encounters.v4.update(CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
433
+ * await client.encounters.v4.update(CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
446
434
  * priorAuthorizationNumber: CandidApi.encounters.v4.PriorAuthorizationNumber("string"),
447
435
  * externalId: CandidApi.EncounterExternalId("string"),
448
436
  * dateOfService: "2023-01-15",