candidhealth 0.24.1 → 0.24.3
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 +45 -40
- package/api/resources/auth/resources/v2/client/Client.js +1 -1
- package/api/resources/billingNotes/resources/v2/client/Client.js +1 -1
- package/api/resources/commons/types/Primitive.d.ts +14 -0
- package/api/resources/commons/types/Primitive.js +12 -0
- package/api/resources/commons/types/SchemaId.d.ts +8 -0
- package/api/resources/commons/types/SchemaId.js +10 -0
- package/api/resources/commons/types/index.d.ts +2 -0
- package/api/resources/commons/types/index.js +2 -0
- package/api/resources/contracts/resources/v2/client/Client.js +5 -5
- package/api/resources/customSchemas/client/Client.d.ts +26 -0
- package/api/resources/customSchemas/client/Client.js +17 -0
- package/api/resources/customSchemas/client/index.d.ts +1 -0
- package/api/resources/customSchemas/client/index.js +2 -0
- package/api/resources/customSchemas/index.d.ts +2 -0
- package/api/resources/customSchemas/index.js +18 -0
- package/api/resources/customSchemas/resources/index.d.ts +1 -0
- package/api/resources/customSchemas/resources/index.js +27 -0
- package/api/resources/customSchemas/resources/v1/client/Client.d.ts +80 -0
- package/api/resources/customSchemas/resources/v1/client/Client.js +325 -0
- package/api/resources/customSchemas/resources/v1/client/create.d.ts +28 -0
- package/api/resources/customSchemas/resources/v1/client/create.js +58 -0
- package/api/resources/customSchemas/resources/v1/client/get.d.ts +34 -0
- package/api/resources/customSchemas/resources/v1/client/get.js +69 -0
- package/api/resources/customSchemas/resources/v1/client/getMulti.d.ts +28 -0
- package/api/resources/customSchemas/resources/v1/client/getMulti.js +58 -0
- package/api/resources/customSchemas/resources/v1/client/index.d.ts +5 -0
- package/api/resources/customSchemas/resources/v1/client/index.js +34 -0
- package/api/resources/customSchemas/resources/v1/client/requests/SchemaCreate.d.ts +20 -0
- package/api/resources/customSchemas/resources/v1/client/requests/SchemaCreate.js +5 -0
- package/api/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.d.ts +21 -0
- package/api/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.js +5 -0
- package/api/resources/customSchemas/resources/v1/client/requests/index.d.ts +2 -0
- package/api/resources/customSchemas/resources/v1/client/requests/index.js +2 -0
- package/api/resources/customSchemas/resources/v1/client/update.d.ts +40 -0
- package/api/resources/customSchemas/resources/v1/client/update.js +80 -0
- package/api/resources/customSchemas/resources/v1/index.d.ts +2 -0
- package/api/resources/customSchemas/resources/v1/index.js +18 -0
- package/api/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.d.ts +8 -0
- package/api/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/Schema.d.ts +10 -0
- package/api/resources/customSchemas/resources/v1/types/Schema.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaField.d.ts +8 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaField.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.d.ts +7 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaInstance.d.ts +22 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaInstance.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaValidationError.d.ts +13 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaValidationError.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaValidationFailure.d.ts +7 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaValidationFailure.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.d.ts +8 -0
- package/api/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.js +5 -0
- package/api/resources/customSchemas/resources/v1/types/index.d.ts +8 -0
- package/api/resources/customSchemas/resources/v1/types/index.js +24 -0
- package/api/resources/eligibility/resources/v2/client/Client.js +3 -3
- package/api/resources/encounters/resources/v4/client/Client.d.ts +19 -1
- package/api/resources/encounters/resources/v4/client/Client.js +25 -5
- package/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
- package/api/resources/encounters/resources/v4/client/create.js +11 -0
- package/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +15 -0
- package/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +18 -1
- package/api/resources/encounters/resources/v4/client/update.d.ts +7 -1
- package/api/resources/encounters/resources/v4/client/update.js +11 -0
- package/api/resources/encounters/resources/v4/types/Encounter.d.ts +15 -1
- package/api/resources/encounters/resources/v4/types/EncounterPage.d.ts +10 -1
- package/api/resources/encounters/resources/v4/types/KeyDoesNotExistError.d.ts +8 -0
- package/api/resources/encounters/resources/v4/types/KeyDoesNotExistError.js +5 -0
- package/api/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.d.ts +7 -0
- package/api/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.js +5 -0
- package/api/resources/encounters/resources/v4/types/SchemaDoesNotExistError.d.ts +7 -0
- package/api/resources/encounters/resources/v4/types/SchemaDoesNotExistError.js +5 -0
- package/api/resources/encounters/resources/v4/types/SchemaInstanceValidationError.d.ts +22 -0
- package/api/resources/encounters/resources/v4/types/SchemaInstanceValidationError.js +5 -0
- package/api/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.d.ts +7 -0
- package/api/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.js +5 -0
- package/api/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.d.ts +7 -0
- package/api/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.js +5 -0
- package/api/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.d.ts +10 -0
- package/api/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.js +5 -0
- package/api/resources/encounters/resources/v4/types/index.d.ts +7 -0
- package/api/resources/encounters/resources/v4/types/index.js +7 -0
- 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 +2 -1
- package/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
- package/api/resources/insurancePayments/resources/v1/client/Client.js +5 -5
- package/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
- 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/payers/resources/v3/client/Client.js +2 -2
- package/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.js +6 -6
- package/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.js +7 -7
- package/api/resources/serviceFacility/client/Client.js +1 -1
- package/api/resources/tasks/resources/v3/client/Client.js +5 -5
- package/api/resources/writeOffs/resources/v1/client/Client.js +4 -4
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +45 -40
- package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
- package/dist/api/resources/billingNotes/resources/v2/client/Client.js +1 -1
- package/dist/api/resources/commons/types/Primitive.d.ts +14 -0
- package/dist/api/resources/commons/types/Primitive.js +12 -0
- package/dist/api/resources/commons/types/SchemaId.d.ts +8 -0
- package/dist/api/resources/commons/types/SchemaId.js +10 -0
- package/dist/api/resources/commons/types/index.d.ts +2 -0
- package/dist/api/resources/commons/types/index.js +2 -0
- package/dist/api/resources/contracts/resources/v2/client/Client.js +5 -5
- package/dist/api/resources/customSchemas/client/Client.d.ts +26 -0
- package/dist/api/resources/customSchemas/client/Client.js +17 -0
- package/dist/api/resources/customSchemas/client/index.d.ts +1 -0
- package/dist/api/resources/customSchemas/client/index.js +2 -0
- package/dist/api/resources/customSchemas/index.d.ts +2 -0
- package/dist/api/resources/customSchemas/index.js +18 -0
- package/dist/api/resources/customSchemas/resources/index.d.ts +1 -0
- package/dist/api/resources/customSchemas/resources/index.js +27 -0
- package/dist/api/resources/customSchemas/resources/v1/client/Client.d.ts +80 -0
- package/dist/api/resources/customSchemas/resources/v1/client/Client.js +325 -0
- package/dist/api/resources/customSchemas/resources/v1/client/create.d.ts +28 -0
- package/dist/api/resources/customSchemas/resources/v1/client/create.js +58 -0
- package/dist/api/resources/customSchemas/resources/v1/client/get.d.ts +34 -0
- package/dist/api/resources/customSchemas/resources/v1/client/get.js +69 -0
- package/dist/api/resources/customSchemas/resources/v1/client/getMulti.d.ts +28 -0
- package/dist/api/resources/customSchemas/resources/v1/client/getMulti.js +58 -0
- package/dist/api/resources/customSchemas/resources/v1/client/index.d.ts +5 -0
- package/dist/api/resources/customSchemas/resources/v1/client/index.js +34 -0
- package/dist/api/resources/customSchemas/resources/v1/client/requests/SchemaCreate.d.ts +20 -0
- package/dist/api/resources/customSchemas/resources/v1/client/requests/SchemaCreate.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.d.ts +21 -0
- package/dist/api/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/client/requests/index.d.ts +2 -0
- package/dist/api/resources/customSchemas/resources/v1/client/requests/index.js +2 -0
- package/dist/api/resources/customSchemas/resources/v1/client/update.d.ts +40 -0
- package/dist/api/resources/customSchemas/resources/v1/client/update.js +80 -0
- package/dist/api/resources/customSchemas/resources/v1/index.d.ts +2 -0
- package/dist/api/resources/customSchemas/resources/v1/index.js +18 -0
- package/dist/api/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.d.ts +8 -0
- package/dist/api/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/Schema.d.ts +10 -0
- package/dist/api/resources/customSchemas/resources/v1/types/Schema.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaField.d.ts +8 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaField.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.d.ts +7 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaInstance.d.ts +22 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaInstance.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaValidationError.d.ts +13 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaValidationError.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaValidationFailure.d.ts +7 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaValidationFailure.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.d.ts +8 -0
- package/dist/api/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.js +5 -0
- package/dist/api/resources/customSchemas/resources/v1/types/index.d.ts +8 -0
- package/dist/api/resources/customSchemas/resources/v1/types/index.js +24 -0
- package/dist/api/resources/eligibility/resources/v2/client/Client.js +3 -3
- package/dist/api/resources/encounters/resources/v4/client/Client.d.ts +19 -1
- package/dist/api/resources/encounters/resources/v4/client/Client.js +25 -5
- package/dist/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
- package/dist/api/resources/encounters/resources/v4/client/create.js +11 -0
- package/dist/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +15 -0
- package/dist/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +18 -1
- package/dist/api/resources/encounters/resources/v4/client/update.d.ts +7 -1
- package/dist/api/resources/encounters/resources/v4/client/update.js +11 -0
- package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +15 -1
- package/dist/api/resources/encounters/resources/v4/types/EncounterPage.d.ts +10 -1
- package/dist/api/resources/encounters/resources/v4/types/KeyDoesNotExistError.d.ts +8 -0
- package/dist/api/resources/encounters/resources/v4/types/KeyDoesNotExistError.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.d.ts +7 -0
- package/dist/api/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaDoesNotExistError.d.ts +7 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaDoesNotExistError.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaInstanceValidationError.d.ts +22 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaInstanceValidationError.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.d.ts +7 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.d.ts +7 -0
- package/dist/api/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.d.ts +10 -0
- package/dist/api/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.js +5 -0
- package/dist/api/resources/encounters/resources/v4/types/index.d.ts +7 -0
- package/dist/api/resources/encounters/resources/v4/types/index.js +7 -0
- 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 +2 -1
- package/dist/api/resources/insuranceAdjudications/resources/v1/client/Client.js +3 -3
- package/dist/api/resources/insurancePayments/resources/v1/client/Client.js +5 -5
- package/dist/api/resources/insuranceRefunds/resources/v1/client/Client.js +5 -5
- 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/payers/resources/v3/client/Client.js +2 -2
- package/dist/api/resources/preEncounter/resources/coverages/resources/v1/resources/coverages/client/Client.js +6 -6
- package/dist/api/resources/preEncounter/resources/patients/resources/v1/resources/patients/client/Client.js +7 -7
- package/dist/api/resources/serviceFacility/client/Client.js +1 -1
- package/dist/api/resources/tasks/resources/v3/client/Client.js +5 -5
- package/dist/api/resources/writeOffs/resources/v1/client/Client.js +4 -4
- package/dist/serialization/resources/commons/types/Primitive.d.ts +10 -0
- package/dist/serialization/resources/commons/types/Primitive.js +31 -0
- package/dist/serialization/resources/commons/types/SchemaId.d.ts +10 -0
- package/dist/serialization/resources/commons/types/SchemaId.js +37 -0
- package/dist/serialization/resources/commons/types/index.d.ts +2 -0
- package/dist/serialization/resources/commons/types/index.js +2 -0
- package/dist/serialization/resources/customSchemas/index.d.ts +1 -0
- package/dist/serialization/resources/customSchemas/index.js +17 -0
- package/dist/serialization/resources/customSchemas/resources/index.d.ts +1 -0
- package/dist/serialization/resources/customSchemas/resources/index.js +27 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/create.d.ts +15 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/create.js +61 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/get.d.ts +20 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/get.js +67 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/getMulti.d.ts +15 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/getMulti.js +61 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/index.d.ts +5 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/index.js +34 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/requests/SchemaCreate.d.ts +15 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/requests/SchemaCreate.js +36 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.d.ts +15 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.js +36 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/requests/index.js +7 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/update.d.ts +25 -0
- package/dist/serialization/resources/customSchemas/resources/v1/client/update.js +73 -0
- package/dist/serialization/resources/customSchemas/resources/v1/index.d.ts +2 -0
- package/dist/serialization/resources/customSchemas/resources/v1/index.js +18 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.d.ts +14 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.js +35 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/Schema.d.ts +17 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/Schema.js +38 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaField.d.ts +14 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaField.js +35 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.d.ts +13 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.js +34 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaInstance.d.ts +14 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaInstance.js +35 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaValidationError.d.ts +18 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaValidationError.js +41 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaValidationFailure.d.ts +13 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaValidationFailure.js +34 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.d.ts +14 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.js +35 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/index.d.ts +8 -0
- package/dist/serialization/resources/customSchemas/resources/v1/types/index.js +24 -0
- package/dist/serialization/resources/encounters/resources/v4/client/create.d.ts +6 -1
- package/dist/serialization/resources/encounters/resources/v4/client/create.js +6 -0
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +2 -0
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +2 -0
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -0
- package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +2 -0
- package/dist/serialization/resources/encounters/resources/v4/client/update.d.ts +6 -1
- package/dist/serialization/resources/encounters/resources/v4/client/update.js +6 -0
- package/dist/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +2 -0
- package/dist/serialization/resources/encounters/resources/v4/types/Encounter.js +2 -0
- package/dist/serialization/resources/encounters/resources/v4/types/KeyDoesNotExistError.d.ts +14 -0
- package/dist/serialization/resources/encounters/resources/v4/types/KeyDoesNotExistError.js +35 -0
- package/dist/serialization/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.d.ts +13 -0
- package/dist/serialization/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.js +34 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaDoesNotExistError.d.ts +13 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaDoesNotExistError.js +34 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationError.d.ts +30 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationError.js +47 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.d.ts +13 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.js +34 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.d.ts +13 -0
- package/dist/serialization/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.js +34 -0
- package/dist/serialization/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.d.ts +17 -0
- package/dist/serialization/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.js +38 -0
- package/dist/serialization/resources/encounters/resources/v4/types/index.d.ts +7 -0
- package/dist/serialization/resources/encounters/resources/v4/types/index.js +7 -0
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +2 -1
- package/package.json +1 -1
- package/reference.md +295 -0
- package/serialization/resources/commons/types/Primitive.d.ts +10 -0
- package/serialization/resources/commons/types/Primitive.js +31 -0
- package/serialization/resources/commons/types/SchemaId.d.ts +10 -0
- package/serialization/resources/commons/types/SchemaId.js +37 -0
- package/serialization/resources/commons/types/index.d.ts +2 -0
- package/serialization/resources/commons/types/index.js +2 -0
- package/serialization/resources/customSchemas/index.d.ts +1 -0
- package/serialization/resources/customSchemas/index.js +17 -0
- package/serialization/resources/customSchemas/resources/index.d.ts +1 -0
- package/serialization/resources/customSchemas/resources/index.js +27 -0
- package/serialization/resources/customSchemas/resources/v1/client/create.d.ts +15 -0
- package/serialization/resources/customSchemas/resources/v1/client/create.js +61 -0
- package/serialization/resources/customSchemas/resources/v1/client/get.d.ts +20 -0
- package/serialization/resources/customSchemas/resources/v1/client/get.js +67 -0
- package/serialization/resources/customSchemas/resources/v1/client/getMulti.d.ts +15 -0
- package/serialization/resources/customSchemas/resources/v1/client/getMulti.js +61 -0
- package/serialization/resources/customSchemas/resources/v1/client/index.d.ts +5 -0
- package/serialization/resources/customSchemas/resources/v1/client/index.js +34 -0
- package/serialization/resources/customSchemas/resources/v1/client/requests/SchemaCreate.d.ts +15 -0
- package/serialization/resources/customSchemas/resources/v1/client/requests/SchemaCreate.js +36 -0
- package/serialization/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.d.ts +15 -0
- package/serialization/resources/customSchemas/resources/v1/client/requests/SchemaUpdate.js +36 -0
- package/serialization/resources/customSchemas/resources/v1/client/requests/index.d.ts +2 -0
- package/serialization/resources/customSchemas/resources/v1/client/requests/index.js +7 -0
- package/serialization/resources/customSchemas/resources/v1/client/update.d.ts +25 -0
- package/serialization/resources/customSchemas/resources/v1/client/update.js +73 -0
- package/serialization/resources/customSchemas/resources/v1/index.d.ts +2 -0
- package/serialization/resources/customSchemas/resources/v1/index.js +18 -0
- package/serialization/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.d.ts +14 -0
- package/serialization/resources/customSchemas/resources/v1/types/KeyWithNameAlreadyExistsError.js +35 -0
- package/serialization/resources/customSchemas/resources/v1/types/Schema.d.ts +17 -0
- package/serialization/resources/customSchemas/resources/v1/types/Schema.js +38 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaField.d.ts +14 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaField.js +35 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.d.ts +13 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaGetMultiResponse.js +34 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaInstance.d.ts +14 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaInstance.js +35 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaValidationError.d.ts +18 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaValidationError.js +41 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaValidationFailure.d.ts +13 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaValidationFailure.js +34 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.d.ts +14 -0
- package/serialization/resources/customSchemas/resources/v1/types/SchemaWithNameAlreadyExistsError.js +35 -0
- package/serialization/resources/customSchemas/resources/v1/types/index.d.ts +8 -0
- package/serialization/resources/customSchemas/resources/v1/types/index.js +24 -0
- package/serialization/resources/encounters/resources/v4/client/create.d.ts +6 -1
- package/serialization/resources/encounters/resources/v4/client/create.js +6 -0
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +2 -0
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +2 -0
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -0
- package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +2 -0
- package/serialization/resources/encounters/resources/v4/client/update.d.ts +6 -1
- package/serialization/resources/encounters/resources/v4/client/update.js +6 -0
- package/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +2 -0
- package/serialization/resources/encounters/resources/v4/types/Encounter.js +2 -0
- package/serialization/resources/encounters/resources/v4/types/KeyDoesNotExistError.d.ts +14 -0
- package/serialization/resources/encounters/resources/v4/types/KeyDoesNotExistError.js +35 -0
- package/serialization/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.d.ts +13 -0
- package/serialization/resources/encounters/resources/v4/types/MultipleInstancesForSchemaError.js +34 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaDoesNotExistError.d.ts +13 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaDoesNotExistError.js +34 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationError.d.ts +30 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationError.js +47 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.d.ts +13 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaInstanceValidationFailure.js +34 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.d.ts +13 -0
- package/serialization/resources/encounters/resources/v4/types/SchemaUnauthorizedAccessError.js +34 -0
- package/serialization/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.d.ts +17 -0
- package/serialization/resources/encounters/resources/v4/types/ValueDoesNotMatchKeyTypeError.js +38 -0
- package/serialization/resources/encounters/resources/v4/types/index.d.ts +7 -0
- package/serialization/resources/encounters/resources/v4/types/index.js +7 -0
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +2 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Primitive = void 0;
|
|
7
|
+
exports.Primitive = {
|
|
8
|
+
Boolean: "BOOLEAN",
|
|
9
|
+
Double: "DOUBLE",
|
|
10
|
+
Integer: "INTEGER",
|
|
11
|
+
String: "STRING",
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.SchemaId = void 0;
|
|
7
|
+
function SchemaId(value) {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
exports.SchemaId = SchemaId;
|
|
@@ -14,6 +14,8 @@ export * from "./TaskNoteId";
|
|
|
14
14
|
export * from "./ProviderId";
|
|
15
15
|
export * from "./InvoiceId";
|
|
16
16
|
export * from "./RateId";
|
|
17
|
+
export * from "./SchemaId";
|
|
18
|
+
export * from "./Primitive";
|
|
17
19
|
export * from "./LinkUrl";
|
|
18
20
|
export * from "./PageToken";
|
|
19
21
|
export * from "./SortDirection";
|
|
@@ -30,6 +30,8 @@ __exportStar(require("./TaskNoteId"), exports);
|
|
|
30
30
|
__exportStar(require("./ProviderId"), exports);
|
|
31
31
|
__exportStar(require("./InvoiceId"), exports);
|
|
32
32
|
__exportStar(require("./RateId"), exports);
|
|
33
|
+
__exportStar(require("./SchemaId"), exports);
|
|
34
|
+
__exportStar(require("./Primitive"), exports);
|
|
33
35
|
__exportStar(require("./LinkUrl"), exports);
|
|
34
36
|
__exportStar(require("./PageToken"), exports);
|
|
35
37
|
__exportStar(require("./SortDirection"), exports);
|
|
@@ -66,7 +66,7 @@ class V2 {
|
|
|
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.3",
|
|
70
70
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
71
71
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
72
72
|
},
|
|
@@ -171,7 +171,7 @@ class V2 {
|
|
|
171
171
|
Authorization: yield this._getAuthorizationHeader(),
|
|
172
172
|
"X-Fern-Language": "JavaScript",
|
|
173
173
|
"X-Fern-SDK-Name": "candidhealth",
|
|
174
|
-
"X-Fern-SDK-Version": "0.24.
|
|
174
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
175
175
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
176
176
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
177
177
|
},
|
|
@@ -239,7 +239,7 @@ class V2 {
|
|
|
239
239
|
Authorization: yield this._getAuthorizationHeader(),
|
|
240
240
|
"X-Fern-Language": "JavaScript",
|
|
241
241
|
"X-Fern-SDK-Name": "candidhealth",
|
|
242
|
-
"X-Fern-SDK-Version": "0.24.
|
|
242
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
243
243
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
244
244
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
245
245
|
},
|
|
@@ -285,7 +285,7 @@ class V2 {
|
|
|
285
285
|
Authorization: yield this._getAuthorizationHeader(),
|
|
286
286
|
"X-Fern-Language": "JavaScript",
|
|
287
287
|
"X-Fern-SDK-Name": "candidhealth",
|
|
288
|
-
"X-Fern-SDK-Version": "0.24.
|
|
288
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
289
289
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
290
290
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
291
291
|
},
|
|
@@ -373,7 +373,7 @@ class V2 {
|
|
|
373
373
|
Authorization: yield this._getAuthorizationHeader(),
|
|
374
374
|
"X-Fern-Language": "JavaScript",
|
|
375
375
|
"X-Fern-SDK-Name": "candidhealth",
|
|
376
|
-
"X-Fern-SDK-Version": "0.24.
|
|
376
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
377
377
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
378
378
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
379
379
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { V1 } from "../resources/v1/client/Client";
|
|
7
|
+
export declare namespace CustomSchemas {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.CandidApiEnvironment | environments.CandidApiEnvironmentUrls>;
|
|
10
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
|
+
}
|
|
12
|
+
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
|
+
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
16
|
+
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
18
|
+
abortSignal?: AbortSignal;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare class CustomSchemas {
|
|
22
|
+
protected readonly _options: CustomSchemas.Options;
|
|
23
|
+
constructor(_options?: CustomSchemas.Options);
|
|
24
|
+
protected _v1: V1 | undefined;
|
|
25
|
+
get v1(): V1;
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CustomSchemas = void 0;
|
|
7
|
+
const Client_1 = require("../resources/v1/client/Client");
|
|
8
|
+
class CustomSchemas {
|
|
9
|
+
constructor(_options = {}) {
|
|
10
|
+
this._options = _options;
|
|
11
|
+
}
|
|
12
|
+
get v1() {
|
|
13
|
+
var _a;
|
|
14
|
+
return ((_a = this._v1) !== null && _a !== void 0 ? _a : (this._v1 = new Client_1.V1(this._options)));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.CustomSchemas = CustomSchemas;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resources"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as v1 from "./v1";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.v1 = void 0;
|
|
27
|
+
exports.v1 = __importStar(require("./v1"));
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
11
|
+
}
|
|
12
|
+
interface RequestOptions {
|
|
13
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
|
+
timeoutInSeconds?: number;
|
|
15
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
16
|
+
maxRetries?: number;
|
|
17
|
+
/** A hook to abort the request. */
|
|
18
|
+
abortSignal?: AbortSignal;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export declare class V1 {
|
|
22
|
+
protected readonly _options: V1.Options;
|
|
23
|
+
constructor(_options?: V1.Options);
|
|
24
|
+
/**
|
|
25
|
+
* Returns all custom schemas.
|
|
26
|
+
*
|
|
27
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.customSchemas.v1.getMulti()
|
|
31
|
+
*/
|
|
32
|
+
getMulti(requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.customSchemas.v1.SchemaGetMultiResponse, CandidApi.customSchemas.v1.getMulti.Error>>;
|
|
33
|
+
/**
|
|
34
|
+
* Return a custom schema with a given ID.
|
|
35
|
+
*
|
|
36
|
+
* @param {CandidApi.SchemaId} schemaId
|
|
37
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* await client.customSchemas.v1.get(CandidApi.SchemaId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
41
|
+
*/
|
|
42
|
+
get(schemaId: CandidApi.SchemaId, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.customSchemas.v1.Schema, CandidApi.customSchemas.v1.get.Error>>;
|
|
43
|
+
/**
|
|
44
|
+
* Create a custom schema. Schema keys can be referenced as inputs in user-configurable rules in the Rules
|
|
45
|
+
* Engine, and key-value pairs can be attached to claims via the Encounters API.
|
|
46
|
+
*
|
|
47
|
+
* @param {CandidApi.customSchemas.v1.SchemaCreate} request
|
|
48
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* await client.customSchemas.v1.create({
|
|
52
|
+
* name: "string",
|
|
53
|
+
* description: "string",
|
|
54
|
+
* fields: [{
|
|
55
|
+
* key: "string",
|
|
56
|
+
* type: CandidApi.Primitive.Boolean
|
|
57
|
+
* }]
|
|
58
|
+
* })
|
|
59
|
+
*/
|
|
60
|
+
create(request: CandidApi.customSchemas.v1.SchemaCreate, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.customSchemas.v1.Schema, CandidApi.customSchemas.v1.create.Error>>;
|
|
61
|
+
/**
|
|
62
|
+
* Update the name, description, or keys on a preexisting schema.
|
|
63
|
+
*
|
|
64
|
+
* @param {CandidApi.SchemaId} schemaId
|
|
65
|
+
* @param {CandidApi.customSchemas.v1.SchemaUpdate} request
|
|
66
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.customSchemas.v1.update(CandidApi.SchemaId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
70
|
+
* name: "string",
|
|
71
|
+
* description: "string",
|
|
72
|
+
* fieldsToAdd: [{
|
|
73
|
+
* key: "string",
|
|
74
|
+
* type: CandidApi.Primitive.Boolean
|
|
75
|
+
* }]
|
|
76
|
+
* })
|
|
77
|
+
*/
|
|
78
|
+
update(schemaId: CandidApi.SchemaId, request?: CandidApi.customSchemas.v1.SchemaUpdate, requestOptions?: V1.RequestOptions): Promise<core.APIResponse<CandidApi.customSchemas.v1.Schema, CandidApi.customSchemas.v1.update.Error>>;
|
|
79
|
+
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
80
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.V1 = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../../../core"));
|
|
44
|
+
const CandidApi = __importStar(require("../../../../../index"));
|
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
+
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
47
|
+
class V1 {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
|
+
this._options = _options;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns all custom schemas.
|
|
53
|
+
*
|
|
54
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.customSchemas.v1.getMulti()
|
|
58
|
+
*/
|
|
59
|
+
getMulti(requestOptions) {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const _response = yield core.fetcher({
|
|
63
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
64
|
+
.candidApi, "/api/custom-schemas/v1"),
|
|
65
|
+
method: "GET",
|
|
66
|
+
headers: {
|
|
67
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
68
|
+
"X-Fern-Language": "JavaScript",
|
|
69
|
+
"X-Fern-SDK-Name": "candidhealth",
|
|
70
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
71
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
72
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
73
|
+
},
|
|
74
|
+
contentType: "application/json",
|
|
75
|
+
requestType: "json",
|
|
76
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
77
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
78
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
79
|
+
});
|
|
80
|
+
if (_response.ok) {
|
|
81
|
+
return {
|
|
82
|
+
ok: true,
|
|
83
|
+
body: serializers.customSchemas.v1.SchemaGetMultiResponse.parseOrThrow(_response.body, {
|
|
84
|
+
unrecognizedObjectKeys: "passthrough",
|
|
85
|
+
allowUnrecognizedUnionMembers: true,
|
|
86
|
+
allowUnrecognizedEnumValues: true,
|
|
87
|
+
breadcrumbsPrefix: ["response"],
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (_response.error.reason === "status-code") {
|
|
92
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
|
|
93
|
+
case "UnauthorizedError":
|
|
94
|
+
return {
|
|
95
|
+
ok: false,
|
|
96
|
+
error: serializers.customSchemas.v1.getMulti.Error.parseOrThrow(_response.error.body, {
|
|
97
|
+
unrecognizedObjectKeys: "passthrough",
|
|
98
|
+
allowUnrecognizedUnionMembers: true,
|
|
99
|
+
allowUnrecognizedEnumValues: true,
|
|
100
|
+
breadcrumbsPrefix: ["response"],
|
|
101
|
+
}),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
ok: false,
|
|
107
|
+
error: CandidApi.customSchemas.v1.getMulti.Error._unknown(_response.error),
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Return a custom schema with a given ID.
|
|
113
|
+
*
|
|
114
|
+
* @param {CandidApi.SchemaId} schemaId
|
|
115
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* await client.customSchemas.v1.get(CandidApi.SchemaId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
119
|
+
*/
|
|
120
|
+
get(schemaId, requestOptions) {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const _response = yield core.fetcher({
|
|
124
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
125
|
+
.candidApi, `/api/custom-schemas/v1/${encodeURIComponent(serializers.SchemaId.jsonOrThrow(schemaId))}`),
|
|
126
|
+
method: "GET",
|
|
127
|
+
headers: {
|
|
128
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
129
|
+
"X-Fern-Language": "JavaScript",
|
|
130
|
+
"X-Fern-SDK-Name": "candidhealth",
|
|
131
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
132
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
133
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
134
|
+
},
|
|
135
|
+
contentType: "application/json",
|
|
136
|
+
requestType: "json",
|
|
137
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
138
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
139
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
140
|
+
});
|
|
141
|
+
if (_response.ok) {
|
|
142
|
+
return {
|
|
143
|
+
ok: true,
|
|
144
|
+
body: serializers.customSchemas.v1.Schema.parseOrThrow(_response.body, {
|
|
145
|
+
unrecognizedObjectKeys: "passthrough",
|
|
146
|
+
allowUnrecognizedUnionMembers: true,
|
|
147
|
+
allowUnrecognizedEnumValues: true,
|
|
148
|
+
breadcrumbsPrefix: ["response"],
|
|
149
|
+
}),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
if (_response.error.reason === "status-code") {
|
|
153
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
|
|
154
|
+
case "EntityNotFoundError":
|
|
155
|
+
case "UnauthorizedError":
|
|
156
|
+
return {
|
|
157
|
+
ok: false,
|
|
158
|
+
error: serializers.customSchemas.v1.get.Error.parseOrThrow(_response.error.body, {
|
|
159
|
+
unrecognizedObjectKeys: "passthrough",
|
|
160
|
+
allowUnrecognizedUnionMembers: true,
|
|
161
|
+
allowUnrecognizedEnumValues: true,
|
|
162
|
+
breadcrumbsPrefix: ["response"],
|
|
163
|
+
}),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
ok: false,
|
|
169
|
+
error: CandidApi.customSchemas.v1.get.Error._unknown(_response.error),
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Create a custom schema. Schema keys can be referenced as inputs in user-configurable rules in the Rules
|
|
175
|
+
* Engine, and key-value pairs can be attached to claims via the Encounters API.
|
|
176
|
+
*
|
|
177
|
+
* @param {CandidApi.customSchemas.v1.SchemaCreate} request
|
|
178
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* await client.customSchemas.v1.create({
|
|
182
|
+
* name: "string",
|
|
183
|
+
* description: "string",
|
|
184
|
+
* fields: [{
|
|
185
|
+
* key: "string",
|
|
186
|
+
* type: CandidApi.Primitive.Boolean
|
|
187
|
+
* }]
|
|
188
|
+
* })
|
|
189
|
+
*/
|
|
190
|
+
create(request, requestOptions) {
|
|
191
|
+
var _a, _b;
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
const _response = yield core.fetcher({
|
|
194
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
195
|
+
.candidApi, "/api/custom-schemas/v1"),
|
|
196
|
+
method: "POST",
|
|
197
|
+
headers: {
|
|
198
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
199
|
+
"X-Fern-Language": "JavaScript",
|
|
200
|
+
"X-Fern-SDK-Name": "candidhealth",
|
|
201
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
202
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
203
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
204
|
+
},
|
|
205
|
+
contentType: "application/json",
|
|
206
|
+
requestType: "json",
|
|
207
|
+
body: serializers.customSchemas.v1.SchemaCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
208
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
209
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
210
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
|
+
});
|
|
212
|
+
if (_response.ok) {
|
|
213
|
+
return {
|
|
214
|
+
ok: true,
|
|
215
|
+
body: serializers.customSchemas.v1.Schema.parseOrThrow(_response.body, {
|
|
216
|
+
unrecognizedObjectKeys: "passthrough",
|
|
217
|
+
allowUnrecognizedUnionMembers: true,
|
|
218
|
+
allowUnrecognizedEnumValues: true,
|
|
219
|
+
breadcrumbsPrefix: ["response"],
|
|
220
|
+
}),
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (_response.error.reason === "status-code") {
|
|
224
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
|
|
225
|
+
case "SchemaValidationHttpFailure":
|
|
226
|
+
return {
|
|
227
|
+
ok: false,
|
|
228
|
+
error: serializers.customSchemas.v1.create.Error.parseOrThrow(_response.error.body, {
|
|
229
|
+
unrecognizedObjectKeys: "passthrough",
|
|
230
|
+
allowUnrecognizedUnionMembers: true,
|
|
231
|
+
allowUnrecognizedEnumValues: true,
|
|
232
|
+
breadcrumbsPrefix: ["response"],
|
|
233
|
+
}),
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
ok: false,
|
|
239
|
+
error: CandidApi.customSchemas.v1.create.Error._unknown(_response.error),
|
|
240
|
+
};
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Update the name, description, or keys on a preexisting schema.
|
|
245
|
+
*
|
|
246
|
+
* @param {CandidApi.SchemaId} schemaId
|
|
247
|
+
* @param {CandidApi.customSchemas.v1.SchemaUpdate} request
|
|
248
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* await client.customSchemas.v1.update(CandidApi.SchemaId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {
|
|
252
|
+
* name: "string",
|
|
253
|
+
* description: "string",
|
|
254
|
+
* fieldsToAdd: [{
|
|
255
|
+
* key: "string",
|
|
256
|
+
* type: CandidApi.Primitive.Boolean
|
|
257
|
+
* }]
|
|
258
|
+
* })
|
|
259
|
+
*/
|
|
260
|
+
update(schemaId, request = {}, requestOptions) {
|
|
261
|
+
var _a, _b;
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
const _response = yield core.fetcher({
|
|
264
|
+
url: (0, url_join_1.default)(((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.CandidApiEnvironment.Production)
|
|
265
|
+
.candidApi, `/api/custom-schemas/v1/${encodeURIComponent(serializers.SchemaId.jsonOrThrow(schemaId))}`),
|
|
266
|
+
method: "PATCH",
|
|
267
|
+
headers: {
|
|
268
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
269
|
+
"X-Fern-Language": "JavaScript",
|
|
270
|
+
"X-Fern-SDK-Name": "candidhealth",
|
|
271
|
+
"X-Fern-SDK-Version": "0.24.3",
|
|
272
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
273
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
274
|
+
},
|
|
275
|
+
contentType: "application/json",
|
|
276
|
+
requestType: "json",
|
|
277
|
+
body: serializers.customSchemas.v1.SchemaUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
278
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
279
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
280
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
281
|
+
});
|
|
282
|
+
if (_response.ok) {
|
|
283
|
+
return {
|
|
284
|
+
ok: true,
|
|
285
|
+
body: serializers.customSchemas.v1.Schema.parseOrThrow(_response.body, {
|
|
286
|
+
unrecognizedObjectKeys: "passthrough",
|
|
287
|
+
allowUnrecognizedUnionMembers: true,
|
|
288
|
+
allowUnrecognizedEnumValues: true,
|
|
289
|
+
breadcrumbsPrefix: ["response"],
|
|
290
|
+
}),
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
if (_response.error.reason === "status-code") {
|
|
294
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.errorName) {
|
|
295
|
+
case "EntityNotFoundError":
|
|
296
|
+
case "UnauthorizedError":
|
|
297
|
+
case "SchemaValidationHttpFailure":
|
|
298
|
+
return {
|
|
299
|
+
ok: false,
|
|
300
|
+
error: serializers.customSchemas.v1.update.Error.parseOrThrow(_response.error.body, {
|
|
301
|
+
unrecognizedObjectKeys: "passthrough",
|
|
302
|
+
allowUnrecognizedUnionMembers: true,
|
|
303
|
+
allowUnrecognizedEnumValues: true,
|
|
304
|
+
breadcrumbsPrefix: ["response"],
|
|
305
|
+
}),
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return {
|
|
310
|
+
ok: false,
|
|
311
|
+
error: CandidApi.customSchemas.v1.update.Error._unknown(_response.error),
|
|
312
|
+
};
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
_getAuthorizationHeader() {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
318
|
+
if (bearer != null) {
|
|
319
|
+
return `Bearer ${bearer}`;
|
|
320
|
+
}
|
|
321
|
+
return undefined;
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
exports.V1 = V1;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 declare type Error = CandidApi.customSchemas.v1.create.Error.SchemaValidationHttpFailure | CandidApi.customSchemas.v1.create.Error._Unknown;
|
|
7
|
+
export declare namespace Error {
|
|
8
|
+
interface SchemaValidationHttpFailure extends _Utils {
|
|
9
|
+
errorName: "SchemaValidationHttpFailure";
|
|
10
|
+
content: CandidApi.customSchemas.v1.SchemaValidationFailure;
|
|
11
|
+
}
|
|
12
|
+
interface _Unknown extends _Utils {
|
|
13
|
+
errorName: void;
|
|
14
|
+
content: core.Fetcher.Error;
|
|
15
|
+
}
|
|
16
|
+
interface _Utils {
|
|
17
|
+
_visit: <_Result>(visitor: CandidApi.customSchemas.v1.create.Error._Visitor<_Result>) => _Result;
|
|
18
|
+
}
|
|
19
|
+
interface _Visitor<_Result> {
|
|
20
|
+
schemaValidationHttpFailure: (value: CandidApi.customSchemas.v1.SchemaValidationFailure) => _Result;
|
|
21
|
+
_other: (value: core.Fetcher.Error) => _Result;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare const Error: {
|
|
25
|
+
readonly schemaValidationHttpFailure: (value: CandidApi.customSchemas.v1.SchemaValidationFailure) => CandidApi.customSchemas.v1.create.Error.SchemaValidationHttpFailure;
|
|
26
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.customSchemas.v1.create.Error._Unknown;
|
|
27
|
+
readonly _visit: <_Result>(value: CandidApi.customSchemas.v1.create.Error, visitor: CandidApi.customSchemas.v1.create.Error._Visitor<_Result>) => _Result;
|
|
28
|
+
};
|