candidhealth 0.40.3 → 0.40.4
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/Client.js +19 -14
- package/api/resources/auth/resources/v2/client/Client.js +1 -1
- package/api/resources/billingNotes/resources/v2/client/Client.js +3 -3
- package/api/resources/chargeCapture/resources/v1/client/Client.js +5 -5
- package/api/resources/chargeCaptureBundles/resources/v1/client/Client.js +4 -4
- package/api/resources/contracts/resources/v2/client/Client.js +5 -5
- package/api/resources/credentialing/resources/v2/client/Client.js +5 -5
- package/api/resources/customSchemas/resources/v1/client/Client.js +4 -4
- package/api/resources/diagnoses/client/Client.js +3 -3
- package/api/resources/eligibility/resources/v2/client/Client.js +3 -3
- package/api/resources/encounterProviders/resources/v2/client/Client.js +12 -12
- package/api/resources/encounters/resources/v4/client/Client.js +5 -5
- package/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
- package/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +2 -2
- package/api/resources/exports/resources/v3/client/Client.js +1 -1
- package/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +1 -1
- package/api/resources/feeSchedules/resources/v3/client/Client.js +10 -10
- package/api/resources/guarantor/resources/v1/client/Client.js +3 -3
- package/api/resources/importInvoice/resources/v1/client/Client.js +4 -4
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +3 -1
- package/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
- package/api/resources/insurancePayments/resources/v1/client/Client.js +2 -2
- package/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
- package/api/resources/medicationDispense/resources/v1/client/Client.js +1 -1
- package/api/resources/nonInsurancePayerPayments/resources/v1/client/Client.js +5 -5
- package/api/resources/nonInsurancePayerRefunds/resources/v1/client/Client.js +5 -5
- package/api/resources/nonInsurancePayers/resources/v1/client/Client.js +6 -6
- package/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
- package/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +5 -5
- package/api/resources/patientPayments/resources/v4/client/Client.js +5 -5
- package/api/resources/patientRefunds/resources/v1/client/Client.js +5 -5
- package/api/resources/payerPlanGroups/client/Client.d.ts +30 -0
- package/api/resources/payerPlanGroups/client/Client.js +17 -0
- package/api/resources/payerPlanGroups/client/index.d.ts +1 -0
- package/api/resources/payerPlanGroups/client/index.js +2 -0
- package/api/resources/payerPlanGroups/index.d.ts +2 -0
- package/api/resources/payerPlanGroups/index.js +18 -0
- package/api/resources/payerPlanGroups/resources/index.d.ts +1 -0
- package/api/resources/payerPlanGroups/resources/index.js +37 -0
- package/api/resources/payerPlanGroups/resources/v1/client/Client.d.ts +100 -0
- package/api/resources/payerPlanGroups/resources/v1/client/Client.js +435 -0
- package/api/resources/payerPlanGroups/resources/v1/client/create.d.ts +34 -0
- package/api/resources/payerPlanGroups/resources/v1/client/create.js +79 -0
- package/api/resources/payerPlanGroups/resources/v1/client/deactivate.d.ts +34 -0
- package/api/resources/payerPlanGroups/resources/v1/client/deactivate.js +79 -0
- package/api/resources/payerPlanGroups/resources/v1/client/get.d.ts +34 -0
- package/api/resources/payerPlanGroups/resources/v1/client/get.js +79 -0
- package/api/resources/payerPlanGroups/resources/v1/client/getMulti.d.ts +28 -0
- package/api/resources/payerPlanGroups/resources/v1/client/getMulti.js +68 -0
- package/api/resources/payerPlanGroups/resources/v1/client/index.d.ts +6 -0
- package/api/resources/payerPlanGroups/resources/v1/client/index.js +45 -0
- package/api/resources/payerPlanGroups/resources/v1/client/requests/PayerPlanGroupGetMultiRequest.d.ts +47 -0
- package/api/resources/payerPlanGroups/resources/v1/client/requests/PayerPlanGroupGetMultiRequest.js +5 -0
- package/api/resources/payerPlanGroups/resources/v1/client/requests/index.d.ts +1 -0
- package/api/resources/payerPlanGroups/resources/v1/client/requests/index.js +2 -0
- package/api/resources/payerPlanGroups/resources/v1/client/update.d.ts +40 -0
- package/api/resources/payerPlanGroups/resources/v1/client/update.js +90 -0
- package/api/resources/payerPlanGroups/resources/v1/index.d.ts +2 -0
- package/api/resources/payerPlanGroups/resources/v1/index.js +18 -0
- package/api/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.d.ts +9 -0
- package/api/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.js +5 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.d.ts +9 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.js +5 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.d.ts +8 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.js +5 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.d.ts +7 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.js +5 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.d.ts +9 -0
- package/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.js +11 -0
- package/api/resources/payerPlanGroups/resources/v1/types/index.d.ts +5 -0
- package/api/resources/payerPlanGroups/resources/v1/types/index.js +21 -0
- package/api/resources/payers/resources/v3/client/Client.js +2 -2
- package/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.js +7 -7
- package/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.js +9 -9
- package/api/resources/preEncounter/resources/eligibilityChecks/resources/v1/client/Client.js +1 -1
- package/api/resources/preEncounter/resources/images/resources/v1/client/Client.js +5 -5
- package/api/resources/preEncounter/resources/lists/resources/v1/client/Client.js +2 -2
- package/api/resources/preEncounter/resources/notes/resources/v1/client/Client.js +4 -4
- package/api/resources/preEncounter/resources/patients/resources/v1/client/Client.js +11 -11
- package/api/resources/preEncounter/resources/tags/resources/v1/client/Client.js +5 -5
- package/api/resources/serviceFacility/client/Client.js +1 -1
- package/api/resources/serviceLines/resources/v2/client/Client.js +3 -3
- package/api/resources/tasks/resources/v3/client/Client.js +5 -5
- package/api/resources/writeOffs/resources/v1/client/Client.js +6 -6
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +19 -14
- package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
- package/dist/api/resources/billingNotes/resources/v2/client/Client.js +3 -3
- package/dist/api/resources/chargeCapture/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/chargeCaptureBundles/resources/v1/client/Client.js +4 -4
- package/dist/api/resources/contracts/resources/v2/client/Client.js +5 -5
- package/dist/api/resources/credentialing/resources/v2/client/Client.js +5 -5
- package/dist/api/resources/customSchemas/resources/v1/client/Client.js +4 -4
- package/dist/api/resources/diagnoses/client/Client.js +3 -3
- package/dist/api/resources/eligibility/resources/v2/client/Client.js +3 -3
- package/dist/api/resources/encounterProviders/resources/v2/client/Client.js +12 -12
- package/dist/api/resources/encounters/resources/v4/client/Client.js +5 -5
- package/dist/api/resources/expectedNetworkStatus/resources/v1/client/Client.js +1 -1
- package/dist/api/resources/expectedNetworkStatus/resources/v2/client/Client.js +2 -2
- package/dist/api/resources/exports/resources/v3/client/Client.js +1 -1
- package/dist/api/resources/externalPaymentAccountConfig/resources/v1/client/Client.js +1 -1
- package/dist/api/resources/feeSchedules/resources/v3/client/Client.js +10 -10
- package/dist/api/resources/guarantor/resources/v1/client/Client.js +3 -3
- package/dist/api/resources/importInvoice/resources/v1/client/Client.js +4 -4
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
- package/dist/api/resources/insurancePayments/resources/v1/client/Client.js +2 -2
- package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/medicationDispense/resources/v1/client/Client.js +1 -1
- package/dist/api/resources/nonInsurancePayerPayments/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/nonInsurancePayerRefunds/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/nonInsurancePayers/resources/v1/client/Client.js +6 -6
- package/dist/api/resources/organizationProviders/resources/v3/client/Client.js +4 -4
- package/dist/api/resources/organizationServiceFacilities/resources/v2/client/Client.js +5 -5
- package/dist/api/resources/patientPayments/resources/v4/client/Client.js +5 -5
- package/dist/api/resources/patientRefunds/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/payerPlanGroups/client/Client.d.ts +30 -0
- package/dist/api/resources/payerPlanGroups/client/Client.js +17 -0
- package/dist/api/resources/payerPlanGroups/client/index.d.ts +1 -0
- package/dist/api/resources/payerPlanGroups/client/index.js +2 -0
- package/dist/api/resources/payerPlanGroups/index.d.ts +2 -0
- package/dist/api/resources/payerPlanGroups/index.js +18 -0
- package/dist/api/resources/payerPlanGroups/resources/index.d.ts +1 -0
- package/dist/api/resources/payerPlanGroups/resources/index.js +37 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/Client.d.ts +100 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/Client.js +435 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/create.d.ts +34 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/create.js +79 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/deactivate.d.ts +34 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/deactivate.js +79 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/get.d.ts +34 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/get.js +79 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/getMulti.d.ts +28 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/getMulti.js +68 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/index.d.ts +6 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/index.js +45 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/requests/PayerPlanGroupGetMultiRequest.d.ts +47 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/requests/PayerPlanGroupGetMultiRequest.js +5 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/requests/index.d.ts +1 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/requests/index.js +2 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/update.d.ts +40 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/client/update.js +90 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/index.d.ts +2 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/index.js +18 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.d.ts +9 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.js +5 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.d.ts +9 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.js +5 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.d.ts +8 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.js +5 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.d.ts +7 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.js +5 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.d.ts +9 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.js +11 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/index.d.ts +5 -0
- package/dist/api/resources/payerPlanGroups/resources/v1/types/index.js +21 -0
- package/dist/api/resources/payers/resources/v3/client/Client.js +2 -2
- package/dist/api/resources/preEncounter/resources/appointments/resources/v1/client/Client.js +7 -7
- package/dist/api/resources/preEncounter/resources/coverages/resources/v1/client/Client.js +9 -9
- package/dist/api/resources/preEncounter/resources/eligibilityChecks/resources/v1/client/Client.js +1 -1
- package/dist/api/resources/preEncounter/resources/images/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/preEncounter/resources/lists/resources/v1/client/Client.js +2 -2
- package/dist/api/resources/preEncounter/resources/notes/resources/v1/client/Client.js +4 -4
- package/dist/api/resources/preEncounter/resources/patients/resources/v1/client/Client.js +11 -11
- package/dist/api/resources/preEncounter/resources/tags/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/serviceFacility/client/Client.js +1 -1
- package/dist/api/resources/serviceLines/resources/v2/client/Client.js +3 -3
- package/dist/api/resources/tasks/resources/v3/client/Client.js +5 -5
- package/dist/api/resources/writeOffs/resources/v1/client/Client.js +6 -6
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/payerPlanGroups/index.d.ts +1 -0
- package/dist/serialization/resources/payerPlanGroups/index.js +17 -0
- package/dist/serialization/resources/payerPlanGroups/resources/index.d.ts +1 -0
- package/dist/serialization/resources/payerPlanGroups/resources/index.js +37 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/create.d.ts +20 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/create.js +77 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/deactivate.d.ts +20 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/deactivate.js +77 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/get.d.ts +20 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/get.js +77 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/getMulti.d.ts +15 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/getMulti.js +71 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/index.d.ts +5 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/index.js +41 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/update.d.ts +25 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/client/update.js +83 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/index.d.ts +2 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/index.js +18 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.d.ts +16 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.js +47 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.d.ts +17 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.js +50 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.d.ts +14 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.js +45 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.d.ts +14 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.js +47 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.d.ts +10 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.js +41 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/index.d.ts +5 -0
- package/dist/serialization/resources/payerPlanGroups/resources/v1/types/index.js +21 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +345 -0
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/payerPlanGroups/index.d.ts +1 -0
- package/serialization/resources/payerPlanGroups/index.js +17 -0
- package/serialization/resources/payerPlanGroups/resources/index.d.ts +1 -0
- package/serialization/resources/payerPlanGroups/resources/index.js +37 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/create.d.ts +20 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/create.js +77 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/deactivate.d.ts +20 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/deactivate.js +77 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/get.d.ts +20 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/get.js +77 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/getMulti.d.ts +15 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/getMulti.js +71 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/index.d.ts +5 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/index.js +41 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/update.d.ts +25 -0
- package/serialization/resources/payerPlanGroups/resources/v1/client/update.js +83 -0
- package/serialization/resources/payerPlanGroups/resources/v1/index.d.ts +2 -0
- package/serialization/resources/payerPlanGroups/resources/v1/index.js +18 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.d.ts +16 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/MutablePayerPlanGroup.js +47 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.d.ts +17 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroup.js +50 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.d.ts +14 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupAlreadyExistsError.js +45 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.d.ts +14 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupPage.js +47 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.d.ts +10 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/PayerPlanGroupSortField.js +41 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/index.d.ts +5 -0
- package/serialization/resources/payerPlanGroups/resources/v1/types/index.js +21 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as CandidApi from "../../../../../index";
|
|
7
|
+
export declare namespace V1 {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.CandidApiEnvironment | environments.CandidApiEnvironmentUrls>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
13
|
+
}
|
|
14
|
+
interface RequestOptions {
|
|
15
|
+
/** The maximum time to wait for a response in seconds. */
|
|
16
|
+
timeoutInSeconds?: number;
|
|
17
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
|
+
maxRetries?: number;
|
|
19
|
+
/** A hook to abort the request. */
|
|
20
|
+
abortSignal?: AbortSignal;
|
|
21
|
+
/** Additional headers to include in the request. */
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export declare class V1 {
|
|
26
|
+
protected readonly _options: V1.Options;
|
|
27
|
+
constructor(_options?: V1.Options);
|
|
28
|
+
/**
|
|
29
|
+
* Returns all payer plan groups matching filter criteria.
|
|
30
|
+
*
|
|
31
|
+
* @param {CandidApi.payerPlanGroups.v1.PayerPlanGroupGetMultiRequest} request
|
|
32
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.payerPlanGroups.v1.getMulti({
|
|
36
|
+
* planGroupName: "string",
|
|
37
|
+
* payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
38
|
+
* payerId: CandidApi.payers.v3.PayerId("string"),
|
|
39
|
+
* planType: "09",
|
|
40
|
+
* isActive: true,
|
|
41
|
+
* payerPlanGroupId: CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
42
|
+
* limit: 1,
|
|
43
|
+
* sortBySimilarity: "string",
|
|
44
|
+
* sort: "plan_group_name",
|
|
45
|
+
* sortDirection: "asc",
|
|
46
|
+
* pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9")
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
getMulti(request?: CandidApi.payerPlanGroups.v1.PayerPlanGroupGetMultiRequest, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.payerPlanGroups.v1.PayerPlanGroupPage, CandidApi.payerPlanGroups.v1.getMulti.Error>>;
|
|
50
|
+
/**
|
|
51
|
+
* Return a plan group with a given ID.
|
|
52
|
+
*
|
|
53
|
+
* @param {CandidApi.PayerPlanGroupId} payerPlanGroupId
|
|
54
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.payerPlanGroups.v1.get(CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
58
|
+
*/
|
|
59
|
+
get(payerPlanGroupId: CandidApi.PayerPlanGroupId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.payerPlanGroups.v1.PayerPlanGroup, CandidApi.payerPlanGroups.v1.get.Error>>;
|
|
60
|
+
/**
|
|
61
|
+
* Create a payer plan group
|
|
62
|
+
*
|
|
63
|
+
* @param {CandidApi.payerPlanGroups.v1.MutablePayerPlanGroup} request
|
|
64
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.payerPlanGroups.v1.create({
|
|
68
|
+
* planGroupName: "string",
|
|
69
|
+
* payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
70
|
+
* planType: "09"
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
create(request: CandidApi.payerPlanGroups.v1.MutablePayerPlanGroup, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.payerPlanGroups.v1.PayerPlanGroup, CandidApi.payerPlanGroups.v1.create.Error>>;
|
|
74
|
+
/**
|
|
75
|
+
* Update any of the fields on a payer plan group
|
|
76
|
+
*
|
|
77
|
+
* @param {CandidApi.PayerPlanGroupId} payerPlanGroupId
|
|
78
|
+
* @param {CandidApi.payerPlanGroups.v1.MutablePayerPlanGroup} request
|
|
79
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.payerPlanGroups.v1.update(CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
83
|
+
* planGroupName: "string",
|
|
84
|
+
* payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
85
|
+
* planType: "09"
|
|
86
|
+
* })
|
|
87
|
+
*/
|
|
88
|
+
update(payerPlanGroupId: CandidApi.PayerPlanGroupId, request: CandidApi.payerPlanGroups.v1.MutablePayerPlanGroup, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.payerPlanGroups.v1.PayerPlanGroup, CandidApi.payerPlanGroups.v1.update.Error>>;
|
|
89
|
+
/**
|
|
90
|
+
* Marks the payer plan group as deactivated
|
|
91
|
+
*
|
|
92
|
+
* @param {CandidApi.PayerPlanGroupId} payerPlanGroupId
|
|
93
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.payerPlanGroups.v1.deactivate(CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
97
|
+
*/
|
|
98
|
+
deactivate(payerPlanGroupId: CandidApi.PayerPlanGroupId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.payerPlanGroups.v1.PayerPlanGroup, CandidApi.payerPlanGroups.v1.deactivate.Error>>;
|
|
99
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
|
+
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.V1 = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../../../core"));
|
|
54
|
+
const CandidApi = __importStar(require("../../../../../index"));
|
|
55
|
+
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
|
+
class V1 {
|
|
58
|
+
constructor(_options = {}) {
|
|
59
|
+
this._options = _options;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Returns all payer plan groups matching filter criteria.
|
|
63
|
+
*
|
|
64
|
+
* @param {CandidApi.payerPlanGroups.v1.PayerPlanGroupGetMultiRequest} request
|
|
65
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.payerPlanGroups.v1.getMulti({
|
|
69
|
+
* planGroupName: "string",
|
|
70
|
+
* payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
71
|
+
* payerId: CandidApi.payers.v3.PayerId("string"),
|
|
72
|
+
* planType: "09",
|
|
73
|
+
* isActive: true,
|
|
74
|
+
* payerPlanGroupId: CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
75
|
+
* limit: 1,
|
|
76
|
+
* sortBySimilarity: "string",
|
|
77
|
+
* sort: "plan_group_name",
|
|
78
|
+
* sortDirection: "asc",
|
|
79
|
+
* pageToken: CandidApi.PageToken("eyJ0b2tlbiI6IjEiLCJwYWdlX3Rva2VuIjoiMiJ9")
|
|
80
|
+
* })
|
|
81
|
+
*/
|
|
82
|
+
getMulti() {
|
|
83
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
const { planGroupName, payerUuid, payerId, planType, isActive, payerPlanGroupId, limit, sortBySimilarity, sort, sortDirection, pageToken, } = request;
|
|
86
|
+
const _queryParams = {};
|
|
87
|
+
if (planGroupName != null) {
|
|
88
|
+
if (Array.isArray(planGroupName)) {
|
|
89
|
+
_queryParams["plan_group_name"] = planGroupName.map((item) => item);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
_queryParams["plan_group_name"] = planGroupName;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (payerUuid != null) {
|
|
96
|
+
if (Array.isArray(payerUuid)) {
|
|
97
|
+
_queryParams["payer_uuid"] = payerUuid.map((item) => serializers.payers.v3.PayerUuid.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
_queryParams["payer_uuid"] = payerUuid;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (payerId != null) {
|
|
104
|
+
if (Array.isArray(payerId)) {
|
|
105
|
+
_queryParams["payer_id"] = payerId.map((item) => serializers.payers.v3.PayerId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
_queryParams["payer_id"] = payerId;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (planType != null) {
|
|
112
|
+
if (Array.isArray(planType)) {
|
|
113
|
+
_queryParams["plan_type"] = planType.map((item) => serializers.SourceOfPaymentCode.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
_queryParams["plan_type"] = serializers.SourceOfPaymentCode.jsonOrThrow(planType, {
|
|
117
|
+
unrecognizedObjectKeys: "strip",
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (isActive != null) {
|
|
122
|
+
_queryParams["is_active"] = isActive.toString();
|
|
123
|
+
}
|
|
124
|
+
if (payerPlanGroupId != null) {
|
|
125
|
+
if (Array.isArray(payerPlanGroupId)) {
|
|
126
|
+
_queryParams["payer_plan_group_id"] = payerPlanGroupId.map((item) => serializers.PayerPlanGroupId.jsonOrThrow(item, { unrecognizedObjectKeys: "strip" }));
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
_queryParams["payer_plan_group_id"] = payerPlanGroupId;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (limit != null) {
|
|
133
|
+
_queryParams["limit"] = limit.toString();
|
|
134
|
+
}
|
|
135
|
+
if (sortBySimilarity != null) {
|
|
136
|
+
_queryParams["sort_by_similarity"] = sortBySimilarity;
|
|
137
|
+
}
|
|
138
|
+
if (sort != null) {
|
|
139
|
+
_queryParams["sort"] = serializers.payerPlanGroups.v1.PayerPlanGroupSortField.jsonOrThrow(sort, {
|
|
140
|
+
unrecognizedObjectKeys: "strip",
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (sortDirection != null) {
|
|
144
|
+
_queryParams["sort_direction"] = serializers.SortDirection.jsonOrThrow(sortDirection, {
|
|
145
|
+
unrecognizedObjectKeys: "strip",
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (pageToken != null) {
|
|
149
|
+
_queryParams["page_token"] = pageToken;
|
|
150
|
+
}
|
|
151
|
+
const _response = yield core.fetcher({
|
|
152
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CandidApiEnvironment.Production).candidApi, "/api/payer-plan-groups/v1"),
|
|
153
|
+
method: "GET",
|
|
154
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.4", "User-Agent": "candidhealth/0.40.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
155
|
+
contentType: "application/json",
|
|
156
|
+
queryParameters: _queryParams,
|
|
157
|
+
requestType: "json",
|
|
158
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
159
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
160
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
161
|
+
});
|
|
162
|
+
if (_response.ok) {
|
|
163
|
+
return {
|
|
164
|
+
ok: true,
|
|
165
|
+
body: serializers.payerPlanGroups.v1.PayerPlanGroupPage.parseOrThrow(_response.body, {
|
|
166
|
+
unrecognizedObjectKeys: "passthrough",
|
|
167
|
+
allowUnrecognizedUnionMembers: true,
|
|
168
|
+
allowUnrecognizedEnumValues: true,
|
|
169
|
+
breadcrumbsPrefix: ["response"],
|
|
170
|
+
}),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
if (_response.error.reason === "status-code") {
|
|
174
|
+
switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c.errorName) {
|
|
175
|
+
case "UnprocessableEntityError":
|
|
176
|
+
return {
|
|
177
|
+
ok: false,
|
|
178
|
+
error: serializers.payerPlanGroups.v1.getMulti.Error.parseOrThrow(_response.error.body, {
|
|
179
|
+
unrecognizedObjectKeys: "passthrough",
|
|
180
|
+
allowUnrecognizedUnionMembers: true,
|
|
181
|
+
allowUnrecognizedEnumValues: true,
|
|
182
|
+
breadcrumbsPrefix: ["response"],
|
|
183
|
+
}),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
ok: false,
|
|
189
|
+
error: CandidApi.payerPlanGroups.v1.getMulti.Error._unknown(_response.error),
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Return a plan group with a given ID.
|
|
195
|
+
*
|
|
196
|
+
* @param {CandidApi.PayerPlanGroupId} payerPlanGroupId
|
|
197
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* await client.payerPlanGroups.v1.get(CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
201
|
+
*/
|
|
202
|
+
get(payerPlanGroupId, requestOptions) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
var _a, _b, _c;
|
|
205
|
+
const _response = yield core.fetcher({
|
|
206
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CandidApiEnvironment.Production).candidApi, `/api/payer-plan-groups/v1/${encodeURIComponent(serializers.PayerPlanGroupId.jsonOrThrow(payerPlanGroupId))}`),
|
|
207
|
+
method: "GET",
|
|
208
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.4", "User-Agent": "candidhealth/0.40.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
209
|
+
contentType: "application/json",
|
|
210
|
+
requestType: "json",
|
|
211
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
212
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
213
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
214
|
+
});
|
|
215
|
+
if (_response.ok) {
|
|
216
|
+
return {
|
|
217
|
+
ok: true,
|
|
218
|
+
body: serializers.payerPlanGroups.v1.PayerPlanGroup.parseOrThrow(_response.body, {
|
|
219
|
+
unrecognizedObjectKeys: "passthrough",
|
|
220
|
+
allowUnrecognizedUnionMembers: true,
|
|
221
|
+
allowUnrecognizedEnumValues: true,
|
|
222
|
+
breadcrumbsPrefix: ["response"],
|
|
223
|
+
}),
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
if (_response.error.reason === "status-code") {
|
|
227
|
+
switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c.errorName) {
|
|
228
|
+
case "EntityNotFoundError":
|
|
229
|
+
case "UnauthorizedError":
|
|
230
|
+
return {
|
|
231
|
+
ok: false,
|
|
232
|
+
error: serializers.payerPlanGroups.v1.get.Error.parseOrThrow(_response.error.body, {
|
|
233
|
+
unrecognizedObjectKeys: "passthrough",
|
|
234
|
+
allowUnrecognizedUnionMembers: true,
|
|
235
|
+
allowUnrecognizedEnumValues: true,
|
|
236
|
+
breadcrumbsPrefix: ["response"],
|
|
237
|
+
}),
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return {
|
|
242
|
+
ok: false,
|
|
243
|
+
error: CandidApi.payerPlanGroups.v1.get.Error._unknown(_response.error),
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Create a payer plan group
|
|
249
|
+
*
|
|
250
|
+
* @param {CandidApi.payerPlanGroups.v1.MutablePayerPlanGroup} request
|
|
251
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
252
|
+
*
|
|
253
|
+
* @example
|
|
254
|
+
* await client.payerPlanGroups.v1.create({
|
|
255
|
+
* planGroupName: "string",
|
|
256
|
+
* payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
257
|
+
* planType: "09"
|
|
258
|
+
* })
|
|
259
|
+
*/
|
|
260
|
+
create(request, requestOptions) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
var _a, _b, _c;
|
|
263
|
+
const _response = yield core.fetcher({
|
|
264
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CandidApiEnvironment.Production).candidApi, "/api/payer-plan-groups/v1"),
|
|
265
|
+
method: "POST",
|
|
266
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.4", "User-Agent": "candidhealth/0.40.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
267
|
+
contentType: "application/json",
|
|
268
|
+
requestType: "json",
|
|
269
|
+
body: serializers.payerPlanGroups.v1.MutablePayerPlanGroup.jsonOrThrow(request, {
|
|
270
|
+
unrecognizedObjectKeys: "strip",
|
|
271
|
+
}),
|
|
272
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
273
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
274
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
275
|
+
});
|
|
276
|
+
if (_response.ok) {
|
|
277
|
+
return {
|
|
278
|
+
ok: true,
|
|
279
|
+
body: serializers.payerPlanGroups.v1.PayerPlanGroup.parseOrThrow(_response.body, {
|
|
280
|
+
unrecognizedObjectKeys: "passthrough",
|
|
281
|
+
allowUnrecognizedUnionMembers: true,
|
|
282
|
+
allowUnrecognizedEnumValues: true,
|
|
283
|
+
breadcrumbsPrefix: ["response"],
|
|
284
|
+
}),
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
if (_response.error.reason === "status-code") {
|
|
288
|
+
switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c.errorName) {
|
|
289
|
+
case "EntityNotFoundError":
|
|
290
|
+
case "PayerPlanGroupAlreadyExistsHttpError":
|
|
291
|
+
return {
|
|
292
|
+
ok: false,
|
|
293
|
+
error: serializers.payerPlanGroups.v1.create.Error.parseOrThrow(_response.error.body, {
|
|
294
|
+
unrecognizedObjectKeys: "passthrough",
|
|
295
|
+
allowUnrecognizedUnionMembers: true,
|
|
296
|
+
allowUnrecognizedEnumValues: true,
|
|
297
|
+
breadcrumbsPrefix: ["response"],
|
|
298
|
+
}),
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return {
|
|
303
|
+
ok: false,
|
|
304
|
+
error: CandidApi.payerPlanGroups.v1.create.Error._unknown(_response.error),
|
|
305
|
+
};
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Update any of the fields on a payer plan group
|
|
310
|
+
*
|
|
311
|
+
* @param {CandidApi.PayerPlanGroupId} payerPlanGroupId
|
|
312
|
+
* @param {CandidApi.payerPlanGroups.v1.MutablePayerPlanGroup} request
|
|
313
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* await client.payerPlanGroups.v1.update(CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
317
|
+
* planGroupName: "string",
|
|
318
|
+
* payerUuid: CandidApi.payers.v3.PayerUuid("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
|
|
319
|
+
* planType: "09"
|
|
320
|
+
* })
|
|
321
|
+
*/
|
|
322
|
+
update(payerPlanGroupId, request, requestOptions) {
|
|
323
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
+
var _a, _b, _c;
|
|
325
|
+
const _response = yield core.fetcher({
|
|
326
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CandidApiEnvironment.Production).candidApi, `/api/payer-plan-groups/v1/${encodeURIComponent(serializers.PayerPlanGroupId.jsonOrThrow(payerPlanGroupId))}`),
|
|
327
|
+
method: "PUT",
|
|
328
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.4", "User-Agent": "candidhealth/0.40.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
329
|
+
contentType: "application/json",
|
|
330
|
+
requestType: "json",
|
|
331
|
+
body: serializers.payerPlanGroups.v1.MutablePayerPlanGroup.jsonOrThrow(request, {
|
|
332
|
+
unrecognizedObjectKeys: "strip",
|
|
333
|
+
}),
|
|
334
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
335
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
336
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
337
|
+
});
|
|
338
|
+
if (_response.ok) {
|
|
339
|
+
return {
|
|
340
|
+
ok: true,
|
|
341
|
+
body: serializers.payerPlanGroups.v1.PayerPlanGroup.parseOrThrow(_response.body, {
|
|
342
|
+
unrecognizedObjectKeys: "passthrough",
|
|
343
|
+
allowUnrecognizedUnionMembers: true,
|
|
344
|
+
allowUnrecognizedEnumValues: true,
|
|
345
|
+
breadcrumbsPrefix: ["response"],
|
|
346
|
+
}),
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
if (_response.error.reason === "status-code") {
|
|
350
|
+
switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c.errorName) {
|
|
351
|
+
case "EntityNotFoundError":
|
|
352
|
+
case "UnauthorizedError":
|
|
353
|
+
case "PayerPlanGroupAlreadyExistsHttpError":
|
|
354
|
+
return {
|
|
355
|
+
ok: false,
|
|
356
|
+
error: serializers.payerPlanGroups.v1.update.Error.parseOrThrow(_response.error.body, {
|
|
357
|
+
unrecognizedObjectKeys: "passthrough",
|
|
358
|
+
allowUnrecognizedUnionMembers: true,
|
|
359
|
+
allowUnrecognizedEnumValues: true,
|
|
360
|
+
breadcrumbsPrefix: ["response"],
|
|
361
|
+
}),
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
ok: false,
|
|
367
|
+
error: CandidApi.payerPlanGroups.v1.update.Error._unknown(_response.error),
|
|
368
|
+
};
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Marks the payer plan group as deactivated
|
|
373
|
+
*
|
|
374
|
+
* @param {CandidApi.PayerPlanGroupId} payerPlanGroupId
|
|
375
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* await client.payerPlanGroups.v1.deactivate(CandidApi.PayerPlanGroupId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
379
|
+
*/
|
|
380
|
+
deactivate(payerPlanGroupId, requestOptions) {
|
|
381
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
382
|
+
var _a, _b, _c;
|
|
383
|
+
const _response = yield core.fetcher({
|
|
384
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CandidApiEnvironment.Production).candidApi, `/api/payer-plan-groups/v1/${encodeURIComponent(serializers.PayerPlanGroupId.jsonOrThrow(payerPlanGroupId))}`),
|
|
385
|
+
method: "PATCH",
|
|
386
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.40.4", "User-Agent": "candidhealth/0.40.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
387
|
+
contentType: "application/json",
|
|
388
|
+
requestType: "json",
|
|
389
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
390
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
391
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
392
|
+
});
|
|
393
|
+
if (_response.ok) {
|
|
394
|
+
return {
|
|
395
|
+
ok: true,
|
|
396
|
+
body: serializers.payerPlanGroups.v1.PayerPlanGroup.parseOrThrow(_response.body, {
|
|
397
|
+
unrecognizedObjectKeys: "passthrough",
|
|
398
|
+
allowUnrecognizedUnionMembers: true,
|
|
399
|
+
allowUnrecognizedEnumValues: true,
|
|
400
|
+
breadcrumbsPrefix: ["response"],
|
|
401
|
+
}),
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
if (_response.error.reason === "status-code") {
|
|
405
|
+
switch ((_c = _response.error.body) === null || _c === void 0 ? void 0 : _c.errorName) {
|
|
406
|
+
case "EntityNotFoundError":
|
|
407
|
+
case "UnauthorizedError":
|
|
408
|
+
return {
|
|
409
|
+
ok: false,
|
|
410
|
+
error: serializers.payerPlanGroups.v1.deactivate.Error.parseOrThrow(_response.error.body, {
|
|
411
|
+
unrecognizedObjectKeys: "passthrough",
|
|
412
|
+
allowUnrecognizedUnionMembers: true,
|
|
413
|
+
allowUnrecognizedEnumValues: true,
|
|
414
|
+
breadcrumbsPrefix: ["response"],
|
|
415
|
+
}),
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return {
|
|
420
|
+
ok: false,
|
|
421
|
+
error: CandidApi.payerPlanGroups.v1.deactivate.Error._unknown(_response.error),
|
|
422
|
+
};
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
_getAuthorizationHeader() {
|
|
426
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
427
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
428
|
+
if (bearer != null) {
|
|
429
|
+
return `Bearer ${bearer}`;
|
|
430
|
+
}
|
|
431
|
+
return undefined;
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
exports.V1 = V1;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CandidApi from "../../../../../index";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
export type Error = CandidApi.payerPlanGroups.v1.create.Error.EntityNotFoundError | CandidApi.payerPlanGroups.v1.create.Error.PayerPlanGroupAlreadyExistsHttpError | CandidApi.payerPlanGroups.v1.create.Error._Unknown;
|
|
7
|
+
export declare namespace Error {
|
|
8
|
+
interface EntityNotFoundError extends _Utils {
|
|
9
|
+
errorName: "EntityNotFoundError";
|
|
10
|
+
content: CandidApi.EntityNotFoundErrorMessage;
|
|
11
|
+
}
|
|
12
|
+
interface PayerPlanGroupAlreadyExistsHttpError extends _Utils {
|
|
13
|
+
errorName: "PayerPlanGroupAlreadyExistsHttpError";
|
|
14
|
+
content: CandidApi.payerPlanGroups.v1.PayerPlanGroupAlreadyExistsError;
|
|
15
|
+
}
|
|
16
|
+
interface _Unknown extends _Utils {
|
|
17
|
+
errorName: void;
|
|
18
|
+
content: core.Fetcher.Error;
|
|
19
|
+
}
|
|
20
|
+
interface _Utils {
|
|
21
|
+
_visit: <_Result>(visitor: CandidApi.payerPlanGroups.v1.create.Error._Visitor<_Result>) => _Result;
|
|
22
|
+
}
|
|
23
|
+
interface _Visitor<_Result> {
|
|
24
|
+
entityNotFoundError: (value: CandidApi.EntityNotFoundErrorMessage) => _Result;
|
|
25
|
+
payerPlanGroupAlreadyExistsHttpError: (value: CandidApi.payerPlanGroups.v1.PayerPlanGroupAlreadyExistsError) => _Result;
|
|
26
|
+
_other: (value: core.Fetcher.Error) => _Result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare const Error: {
|
|
30
|
+
readonly entityNotFoundError: (value: CandidApi.EntityNotFoundErrorMessage) => CandidApi.payerPlanGroups.v1.create.Error.EntityNotFoundError;
|
|
31
|
+
readonly payerPlanGroupAlreadyExistsHttpError: (value: CandidApi.payerPlanGroups.v1.PayerPlanGroupAlreadyExistsError) => CandidApi.payerPlanGroups.v1.create.Error.PayerPlanGroupAlreadyExistsHttpError;
|
|
32
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.payerPlanGroups.v1.create.Error._Unknown;
|
|
33
|
+
readonly _visit: <_Result>(value: CandidApi.payerPlanGroups.v1.create.Error, visitor: CandidApi.payerPlanGroups.v1.create.Error._Visitor<_Result>) => _Result;
|
|
34
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Error = void 0;
|
|
40
|
+
const CandidApi = __importStar(require("../../../../../index"));
|
|
41
|
+
exports.Error = {
|
|
42
|
+
entityNotFoundError: (value) => {
|
|
43
|
+
return {
|
|
44
|
+
content: value,
|
|
45
|
+
errorName: "EntityNotFoundError",
|
|
46
|
+
_visit: function (visitor) {
|
|
47
|
+
return CandidApi.payerPlanGroups.v1.create.Error._visit(this, visitor);
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
payerPlanGroupAlreadyExistsHttpError: (value) => {
|
|
52
|
+
return {
|
|
53
|
+
content: value,
|
|
54
|
+
errorName: "PayerPlanGroupAlreadyExistsHttpError",
|
|
55
|
+
_visit: function (visitor) {
|
|
56
|
+
return CandidApi.payerPlanGroups.v1.create.Error._visit(this, visitor);
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
_unknown: (fetcherError) => {
|
|
61
|
+
return {
|
|
62
|
+
errorName: undefined,
|
|
63
|
+
content: fetcherError,
|
|
64
|
+
_visit: function (visitor) {
|
|
65
|
+
return CandidApi.payerPlanGroups.v1.create.Error._visit(this, visitor);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
_visit: (value, visitor) => {
|
|
70
|
+
switch (value.errorName) {
|
|
71
|
+
case "EntityNotFoundError":
|
|
72
|
+
return visitor.entityNotFoundError(value.content);
|
|
73
|
+
case "PayerPlanGroupAlreadyExistsHttpError":
|
|
74
|
+
return visitor.payerPlanGroupAlreadyExistsHttpError(value.content);
|
|
75
|
+
default:
|
|
76
|
+
return visitor._other(value);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
};
|