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