@icure/cardinal-sdk 2.0.0-PREVIEW-18.1 → 2.0.0-PREVIEW-21
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/Kermit-kermit-core.mjs +45 -40
- package/Kermit-kermit.mjs +6 -6
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1577 -1577
- package/api/HealthcarePartyApi.d.mts +2 -0
- package/api/HealthcarePartyApiInGroup.d.mts +5 -0
- package/api/HealthcarePartyApiInGroup.mjs +1 -0
- package/api/RecoveryApi.d.mts +5 -1
- package/api.d.mts +1 -0
- package/api.mjs +1 -0
- package/bitops-library-bits.mjs +197 -0
- package/bitops-library-endian.mjs +117 -0
- package/cardinal-sdk-ts.d.mts +2 -2
- package/cardinal-sdk-ts.mjs +57007 -56794
- package/cardinal-sdk.mjs +120895 -120501
- package/core-library-digest.mjs +186 -0
- package/crypto/CryptoService.d.mts +17 -7
- package/error-library-error.mjs +42 -0
- package/hash-library-sha2.mjs +183 -0
- package/internal/BytesEncoding.d.mts +3 -0
- package/internal/BytesEncoding.mjs +99 -0
- package/internal/JsonDecodeUtils.d.mts +20 -0
- package/internal/JsonDecodeUtils.mjs +99 -0
- package/kerberus.mjs +557 -389
- package/kotlin-kotlin-stdlib.mjs +2445 -2713
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2455 -2450
- package/kotlinx-io-kotlinx-io-bytestring.mjs +36 -36
- package/kotlinx-io-kotlinx-io-core.mjs +459 -459
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2029 -2029
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1952 -1952
- package/kryptom-lib.mjs +3263 -1967
- package/ktor-ktor-client-content-negotiation.mjs +184 -184
- package/ktor-ktor-client-core.mjs +2713 -2713
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +481 -481
- package/ktor-ktor-http.mjs +693 -693
- package/ktor-ktor-io.mjs +963 -963
- package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
- package/ktor-ktor-serialization-kotlinx.mjs +238 -238
- package/ktor-ktor-serialization.mjs +109 -109
- package/ktor-ktor-utils.mjs +557 -557
- package/ktor-ktor-websockets.mjs +673 -673
- package/model/AccessLog.d.mts +5 -0
- package/model/AccessLog.mjs +168 -0
- package/model/Agenda.d.mts +2 -0
- package/model/Agenda.mjs +82 -0
- package/model/ApplicationSettings.d.mts +5 -0
- package/model/ApplicationSettings.mjs +140 -0
- package/model/BooleanResponse.d.mts +2 -0
- package/model/BooleanResponse.mjs +20 -0
- package/model/CalendarItem.d.mts +5 -0
- package/model/CalendarItem.mjs +290 -0
- package/model/CalendarItemType.d.mts +7 -0
- package/model/CalendarItemType.mjs +117 -0
- package/model/Classification.d.mts +5 -0
- package/model/Classification.mjs +148 -0
- package/model/Code.d.mts +2 -0
- package/model/Code.mjs +69 -0
- package/model/Contact.d.mts +5 -0
- package/model/Contact.mjs +218 -0
- package/model/CryptoActorStub.d.mts +2 -0
- package/model/CryptoActorStub.mjs +45 -0
- package/model/CryptoActorStubWithType.d.mts +2 -0
- package/model/CryptoActorStubWithType.mjs +25 -0
- package/model/DataOwnerRegistrationSuccess.d.mts +2 -0
- package/model/DataOwnerRegistrationSuccess.mjs +24 -0
- package/model/DataOwnerWithType.d.mts +7 -0
- package/model/DataOwnerWithType.mjs +80 -0
- package/model/DatabaseInitialisation.d.mts +2 -0
- package/model/DatabaseInitialisation.mjs +34 -0
- package/model/Device.d.mts +2 -0
- package/model/Device.mjs +99 -0
- package/model/Document.d.mts +5 -0
- package/model/Document.mjs +246 -0
- package/model/DocumentTemplate.d.mts +2 -0
- package/model/DocumentTemplate.mjs +91 -0
- package/model/EntityReference.d.mts +2 -0
- package/model/EntityReference.mjs +29 -0
- package/model/EntityReferenceInGroup.d.mts +2 -0
- package/model/EntityReferenceInGroup.mjs +23 -0
- package/model/EntityTemplate.d.mts +2 -0
- package/model/EntityTemplate.mjs +46 -0
- package/model/Form.d.mts +5 -0
- package/model/Form.mjs +204 -0
- package/model/FormTemplate.d.mts +2 -0
- package/model/FormTemplate.mjs +82 -0
- package/model/FrontEndMigration.d.mts +2 -0
- package/model/FrontEndMigration.mjs +57 -0
- package/model/Group.d.mts +2 -0
- package/model/Group.mjs +68 -0
- package/model/GroupDeletionReport.d.mts +2 -0
- package/model/GroupDeletionReport.mjs +24 -0
- package/model/HealthElement.d.mts +5 -0
- package/model/HealthElement.mjs +226 -0
- package/model/HealthcareParty.d.mts +2 -0
- package/model/HealthcareParty.mjs +182 -0
- package/model/IdWithRev.d.mts +2 -0
- package/model/IdWithRev.mjs +23 -0
- package/model/IndexingInfo.d.mts +2 -0
- package/model/IndexingInfo.mjs +21 -0
- package/model/Insurance.d.mts +2 -0
- package/model/Insurance.mjs +46 -0
- package/model/Invoice.d.mts +5 -0
- package/model/Invoice.mjs +468 -0
- package/model/Keyword.d.mts +2 -0
- package/model/Keyword.mjs +58 -0
- package/model/ListOfIds.d.mts +2 -0
- package/model/ListOfIds.mjs +20 -0
- package/model/ListOfProperties.d.mts +2 -0
- package/model/ListOfProperties.mjs +22 -0
- package/model/MaintenanceTask.d.mts +5 -0
- package/model/MaintenanceTask.mjs +152 -0
- package/model/MedicalLocation.d.mts +2 -0
- package/model/MedicalLocation.mjs +63 -0
- package/model/Message.d.mts +5 -0
- package/model/Message.mjs +248 -0
- package/model/PaginatedDocumentKeyIdPair.d.mts +2 -0
- package/model/PaginatedDocumentKeyIdPair.mjs +24 -0
- package/model/Patient.d.mts +5 -0
- package/model/Patient.mjs +491 -0
- package/model/Place.d.mts +2 -0
- package/model/Place.mjs +33 -0
- package/model/PropertyStub.d.mts +5 -0
- package/model/PropertyStub.mjs +74 -0
- package/model/PropertyTypeStub.d.mts +2 -0
- package/model/PropertyTypeStub.mjs +26 -0
- package/model/PublicAgendasAndCalendarItemTypes.d.mts +2 -0
- package/model/PublicAgendasAndCalendarItemTypes.mjs +25 -0
- package/model/PublicKey.d.mts +2 -0
- package/model/PublicKey.mjs +24 -0
- package/model/Receipt.d.mts +5 -0
- package/model/Receipt.mjs +159 -0
- package/model/RegistrationInformation.d.mts +2 -0
- package/model/RegistrationInformation.mjs +43 -0
- package/model/RegistrationSuccess.d.mts +2 -0
- package/model/RegistrationSuccess.mjs +24 -0
- package/model/Replication.d.mts +2 -0
- package/model/Replication.mjs +35 -0
- package/model/ReplicationInfo.d.mts +2 -0
- package/model/ReplicationInfo.mjs +28 -0
- package/model/Role.d.mts +2 -0
- package/model/Role.mjs +34 -0
- package/model/StoredDocumentIdentifier.d.mts +2 -0
- package/model/StoredDocumentIdentifier.mjs +22 -0
- package/model/Tarification.d.mts +2 -0
- package/model/Tarification.mjs +92 -0
- package/model/TimeTable.d.mts +2 -0
- package/model/TimeTable.mjs +64 -0
- package/model/Topic.d.mts +5 -0
- package/model/Topic.mjs +163 -0
- package/model/User.d.mts +4 -0
- package/model/User.mjs +118 -0
- package/model/UserGroup.d.mts +2 -0
- package/model/UserGroup.mjs +55 -0
- package/model/base/CodeStub.d.mts +2 -0
- package/model/base/CodeStub.mjs +40 -0
- package/model/base/CryptoActor.d.mts +3 -0
- package/model/base/CryptoActor.mjs +19 -1
- package/model/base/Identifier.d.mts +2 -0
- package/model/base/Identifier.mjs +44 -0
- package/model/couchdb/Basic.d.mts +2 -0
- package/model/couchdb/Basic.mjs +22 -0
- package/model/couchdb/DatabaseInfo.d.mts +2 -0
- package/model/couchdb/DatabaseInfo.mjs +47 -0
- package/model/couchdb/DesignDocument.d.mts +2 -0
- package/model/couchdb/DesignDocument.mjs +40 -0
- package/model/couchdb/DocIdentifier.d.mts +2 -0
- package/model/couchdb/DocIdentifier.mjs +24 -0
- package/model/couchdb/GroupDatabasesInfo.d.mts +2 -0
- package/model/couchdb/GroupDatabasesInfo.mjs +26 -0
- package/model/couchdb/Remote.d.mts +2 -0
- package/model/couchdb/Remote.mjs +25 -0
- package/model/couchdb/RemoteAuthentication.d.mts +2 -0
- package/model/couchdb/RemoteAuthentication.mjs +23 -0
- package/model/couchdb/ReplicationStats.d.mts +2 -0
- package/model/couchdb/ReplicationStats.mjs +45 -0
- package/model/couchdb/ReplicatorDocument.d.mts +2 -0
- package/model/couchdb/ReplicatorDocument.mjs +61 -0
- package/model/couchdb/View.d.mts +2 -0
- package/model/couchdb/View.mjs +23 -0
- package/model/data/LabelledOccurence.d.mts +2 -0
- package/model/data/LabelledOccurence.mjs +22 -0
- package/model/embed/Address.d.mts +5 -0
- package/model/embed/Address.mjs +133 -0
- package/model/embed/AdministrationQuantity.d.mts +2 -0
- package/model/embed/AdministrationQuantity.mjs +29 -0
- package/model/embed/AgendaSlottingAlgorithm.d.mts +3 -0
- package/model/embed/AgendaSlottingAlgorithm.mjs +30 -0
- package/model/embed/AgreementAppendix.d.mts +2 -0
- package/model/embed/AgreementAppendix.mjs +30 -0
- package/model/embed/Annotation.d.mts +2 -0
- package/model/embed/Annotation.mjs +46 -0
- package/model/embed/CalendarItemTag.d.mts +5 -0
- package/model/embed/CalendarItemTag.mjs +72 -0
- package/model/embed/CareTeamMember.d.mts +5 -0
- package/model/embed/CareTeamMember.mjs +71 -0
- package/model/embed/CareTeamMembership.d.mts +5 -0
- package/model/embed/CareTeamMembership.mjs +73 -0
- package/model/embed/Content.d.mts +5 -0
- package/model/embed/Content.mjs +125 -0
- package/model/embed/DataAttachment.d.mts +2 -0
- package/model/embed/DataAttachment.mjs +26 -0
- package/model/embed/DatabaseSynchronization.d.mts +2 -0
- package/model/embed/DatabaseSynchronization.mjs +30 -0
- package/model/embed/Delegation.d.mts +2 -0
- package/model/embed/Delegation.mjs +30 -0
- package/model/embed/DeletedAttachment.d.mts +2 -0
- package/model/embed/DeletedAttachment.mjs +30 -0
- package/model/embed/DocumentGroup.d.mts +2 -0
- package/model/embed/DocumentGroup.mjs +24 -0
- package/model/embed/Duration.d.mts +2 -0
- package/model/embed/Duration.mjs +26 -0
- package/model/embed/EmbeddedTimeTableHour.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableHour.mjs +22 -0
- package/model/embed/EmbeddedTimeTableItem.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableItem.mjs +41 -0
- package/model/embed/Employer.d.mts +2 -0
- package/model/embed/Employer.mjs +26 -0
- package/model/embed/EmploymentInfo.d.mts +5 -0
- package/model/embed/EmploymentInfo.mjs +74 -0
- package/model/embed/Episode.d.mts +5 -0
- package/model/embed/Episode.mjs +75 -0
- package/model/embed/FinancialInstitutionInformation.d.mts +5 -0
- package/model/embed/FinancialInstitutionInformation.mjs +88 -0
- package/model/embed/FlatRateTarification.d.mts +5 -0
- package/model/embed/FlatRateTarification.mjs +72 -0
- package/model/embed/FlowItem.d.mts +2 -0
- package/model/embed/FlowItem.mjs +117 -0
- package/model/embed/HealthcarePartyHistoryStatus.d.mts +2 -0
- package/model/embed/HealthcarePartyHistoryStatus.mjs +28 -0
- package/model/embed/IdentityDocumentReader.d.mts +2 -0
- package/model/embed/IdentityDocumentReader.mjs +33 -0
- package/model/embed/Insurability.d.mts +5 -0
- package/model/embed/Insurability.mjs +100 -0
- package/model/embed/InvoicingCode.d.mts +5 -0
- package/model/embed/InvoicingCode.mjs +377 -0
- package/model/embed/KeywordSubword.d.mts +2 -0
- package/model/embed/KeywordSubword.mjs +25 -0
- package/model/embed/LetterValue.d.mts +2 -0
- package/model/embed/LetterValue.mjs +30 -0
- package/model/embed/Measure.d.mts +2 -0
- package/model/embed/Measure.mjs +57 -0
- package/model/embed/MedicalHouseContract.d.mts +5 -0
- package/model/embed/MedicalHouseContract.mjs +223 -0
- package/model/embed/Medication.d.mts +2 -0
- package/model/embed/Medication.mjs +157 -0
- package/model/embed/Medicinalproduct.d.mts +2 -0
- package/model/embed/Medicinalproduct.mjs +33 -0
- package/model/embed/MessageAttachment.d.mts +2 -0
- package/model/embed/MessageAttachment.mjs +25 -0
- package/model/embed/MessageReadStatus.d.mts +2 -0
- package/model/embed/MessageReadStatus.mjs +23 -0
- package/model/embed/ParagraphAgreement.d.mts +2 -0
- package/model/embed/ParagraphAgreement.mjs +86 -0
- package/model/embed/Partnership.d.mts +2 -0
- package/model/embed/Partnership.mjs +36 -0
- package/model/embed/PatientHealthCareParty.d.mts +9 -0
- package/model/embed/PatientHealthCareParty.mjs +88 -0
- package/model/embed/Payment.d.mts +2 -0
- package/model/embed/Payment.mjs +28 -0
- package/model/embed/Periodicity.d.mts +2 -0
- package/model/embed/Periodicity.mjs +26 -0
- package/model/embed/PersonName.d.mts +2 -0
- package/model/embed/PersonName.mjs +41 -0
- package/model/embed/PlanOfAction.d.mts +8 -3
- package/model/embed/PlanOfAction.mjs +179 -0
- package/model/embed/Range.d.mts +2 -0
- package/model/embed/Range.mjs +24 -0
- package/model/embed/ReferenceRange.d.mts +2 -0
- package/model/embed/ReferenceRange.mjs +40 -0
- package/model/embed/ReferralPeriod.d.mts +2 -0
- package/model/embed/ReferralPeriod.mjs +27 -0
- package/model/embed/RegimenItem.d.mts +2 -0
- package/model/embed/RegimenItem.mjs +40 -0
- package/model/embed/Renewal.d.mts +2 -0
- package/model/embed/Renewal.mjs +26 -0
- package/model/embed/ResourceGroupAllocationSchedule.d.mts +2 -0
- package/model/embed/ResourceGroupAllocationSchedule.mjs +39 -0
- package/model/embed/Right.d.mts +2 -0
- package/model/embed/Right.mjs +27 -0
- package/model/embed/RoleConfiguration.d.mts +2 -0
- package/model/embed/RoleConfiguration.mjs +22 -0
- package/model/embed/SchoolingInfo.d.mts +5 -0
- package/model/embed/SchoolingInfo.mjs +73 -0
- package/model/embed/SecureDelegation.d.mts +2 -0
- package/model/embed/SecureDelegation.mjs +39 -0
- package/model/embed/SecurityMetadata.d.mts +2 -0
- package/model/embed/SecurityMetadata.mjs +22 -0
- package/model/embed/Service.d.mts +5 -0
- package/model/embed/Service.mjs +240 -0
- package/model/embed/ServiceLink.d.mts +2 -0
- package/model/embed/ServiceLink.mjs +21 -0
- package/model/embed/SubContact.d.mts +5 -0
- package/model/embed/SubContact.mjs +146 -0
- package/model/embed/Substanceproduct.d.mts +2 -0
- package/model/embed/Substanceproduct.mjs +33 -0
- package/model/embed/Suspension.d.mts +2 -0
- package/model/embed/Suspension.mjs +30 -0
- package/model/embed/Telecom.d.mts +5 -0
- package/model/embed/Telecom.mjs +67 -0
- package/model/embed/TimeSeries.d.mts +2 -0
- package/model/embed/TimeSeries.mjs +32 -0
- package/model/embed/TimeTableHour.d.mts +2 -0
- package/model/embed/TimeTableHour.mjs +24 -0
- package/model/embed/TimeTableItem.d.mts +2 -0
- package/model/embed/TimeTableItem.mjs +57 -0
- package/model/embed/TypedValue.d.mts +5 -0
- package/model/embed/TypedValue.mjs +85 -0
- package/model/embed/Valorisation.d.mts +5 -0
- package/model/embed/Valorisation.mjs +108 -0
- package/model/embed/ValueWithPrecision.d.mts +2 -0
- package/model/embed/ValueWithPrecision.mjs +22 -0
- package/model/embed/Weekday.d.mts +2 -0
- package/model/embed/Weekday.mjs +26 -0
- package/model/embed/form/template/Action.d.mts +2 -0
- package/model/embed/form/template/Action.mjs +30 -0
- package/model/embed/form/template/CheckBox.d.mts +2 -0
- package/model/embed/form/template/CheckBox.mjs +71 -0
- package/model/embed/form/template/DatePicker.d.mts +2 -0
- package/model/embed/form/template/DatePicker.mjs +71 -0
- package/model/embed/form/template/DateTimePicker.d.mts +2 -0
- package/model/embed/form/template/DateTimePicker.mjs +71 -0
- package/model/embed/form/template/DropdownField.d.mts +2 -0
- package/model/embed/form/template/DropdownField.mjs +71 -0
- package/model/embed/form/template/FieldsGroup.d.mts +2 -0
- package/model/embed/form/template/FieldsGroup.mjs +28 -0
- package/model/embed/form/template/FormTemplateLayout.d.mts +2 -0
- package/model/embed/form/template/FormTemplateLayout.mjs +33 -0
- package/model/embed/form/template/Launcher.d.mts +2 -0
- package/model/embed/form/template/Launcher.mjs +26 -0
- package/model/embed/form/template/MeasureField.d.mts +2 -0
- package/model/embed/form/template/MeasureField.mjs +71 -0
- package/model/embed/form/template/MultipleChoice.d.mts +2 -0
- package/model/embed/form/template/MultipleChoice.mjs +71 -0
- package/model/embed/form/template/NumberField.d.mts +2 -0
- package/model/embed/form/template/NumberField.mjs +71 -0
- package/model/embed/form/template/RadioButton.d.mts +2 -0
- package/model/embed/form/template/RadioButton.mjs +71 -0
- package/model/embed/form/template/Section.d.mts +2 -0
- package/model/embed/form/template/Section.mjs +30 -0
- package/model/embed/form/template/State.d.mts +2 -0
- package/model/embed/form/template/State.mjs +26 -0
- package/model/embed/form/template/StructureElement.d.mts +3 -0
- package/model/embed/form/template/StructureElement.mjs +32 -1
- package/model/embed/form/template/TextField.d.mts +2 -0
- package/model/embed/form/template/TextField.mjs +71 -0
- package/model/embed/form/template/TimePicker.d.mts +2 -0
- package/model/embed/form/template/TimePicker.mjs +71 -0
- package/model/filter/predicate/AlwaysPredicate.d.mts +2 -0
- package/model/filter/predicate/AlwaysPredicate.mjs +20 -0
- package/model/filter/predicate/AndPredicate.d.mts +2 -0
- package/model/filter/predicate/AndPredicate.mjs +25 -0
- package/model/filter/predicate/KeyValuePredicate.d.mts +2 -0
- package/model/filter/predicate/KeyValuePredicate.mjs +32 -0
- package/model/filter/predicate/NotPredicate.d.mts +2 -0
- package/model/filter/predicate/NotPredicate.mjs +25 -0
- package/model/filter/predicate/OrPredicate.d.mts +2 -0
- package/model/filter/predicate/OrPredicate.mjs +25 -0
- package/model/filter/predicate/Predicate.d.mts +3 -0
- package/model/filter/predicate/Predicate.mjs +20 -1
- package/model/security/AlwaysPermissionItem.d.mts +2 -0
- package/model/security/AlwaysPermissionItem.mjs +25 -0
- package/model/security/AuthenticationToken.d.mts +2 -0
- package/model/security/AuthenticationToken.mjs +28 -0
- package/model/security/Enable2faRequest.d.mts +2 -0
- package/model/security/Enable2faRequest.mjs +22 -0
- package/model/security/ExternalJwtConfig.d.mts +18 -0
- package/model/security/ExternalJwtConfig.mjs +199 -0
- package/model/security/LoginIdentifier.d.mts +2 -0
- package/model/security/LoginIdentifier.mjs +22 -0
- package/model/security/OperationToken.d.mts +2 -0
- package/model/security/OperationToken.mjs +31 -0
- package/model/security/Permission.d.mts +2 -0
- package/model/security/Permission.mjs +24 -0
- package/model/security/PermissionItem.d.mts +3 -0
- package/model/security/PermissionItem.mjs +12 -1
- package/model/security/TokenWithGroup.d.mts +2 -0
- package/model/security/TokenWithGroup.mjs +25 -0
- package/options/SdkOptions.d.mts +3 -23
- package/package.json +1 -1
- package/utils/Id.d.mts +5 -0
- package/utils/Id.mjs +19 -10
- package/KotlinBigInteger-bignum.mjs +0 -5902
- /package/{KotlinBigInteger-bignum-serialization-kotlinx.mjs → core-library-core.mjs} +0 -0
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { decodeBase64, encodeBase64 } from '../internal/BytesEncoding.mjs';
|
|
3
|
+
import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
4
|
import { randomUuid } from '../utils/Id.mjs';
|
|
5
|
+
import { DecryptedPropertyStub } from './PropertyStub.mjs';
|
|
6
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
7
|
+
import { Identifier } from './base/Identifier.mjs';
|
|
8
|
+
import { DecryptedAddress } from './embed/Address.mjs';
|
|
9
|
+
import { DecryptedFinancialInstitutionInformation } from './embed/FinancialInstitutionInformation.mjs';
|
|
10
|
+
import { DecryptedFlatRateTarification } from './embed/FlatRateTarification.mjs';
|
|
11
|
+
import { Gender } from './embed/Gender.mjs';
|
|
12
|
+
import { HealthcarePartyHistoryStatus } from './embed/HealthcarePartyHistoryStatus.mjs';
|
|
13
|
+
import { HealthcarePartyStatus } from './embed/HealthcarePartyStatus.mjs';
|
|
14
|
+
import { PersonName } from './embed/PersonName.mjs';
|
|
15
|
+
import { TelecomType } from './embed/TelecomType.mjs';
|
|
3
16
|
export class HealthcareParty {
|
|
4
17
|
constructor(partial) {
|
|
5
18
|
var _a;
|
|
@@ -174,4 +187,173 @@ export class HealthcareParty {
|
|
|
174
187
|
if ('publicKeysForOaepWithSha256' in partial && partial.publicKeysForOaepWithSha256 !== undefined)
|
|
175
188
|
this.publicKeysForOaepWithSha256 = partial.publicKeysForOaepWithSha256;
|
|
176
189
|
}
|
|
190
|
+
toJSON() {
|
|
191
|
+
const res = {};
|
|
192
|
+
res['id'] = this.id;
|
|
193
|
+
if (this.rev != undefined)
|
|
194
|
+
res['rev'] = this.rev;
|
|
195
|
+
if (this.created != undefined)
|
|
196
|
+
res['created'] = this.created;
|
|
197
|
+
if (this.modified != undefined)
|
|
198
|
+
res['modified'] = this.modified;
|
|
199
|
+
if (this.deletionDate != undefined)
|
|
200
|
+
res['deletionDate'] = this.deletionDate;
|
|
201
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
202
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
203
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
204
|
+
if (this.name != undefined)
|
|
205
|
+
res['name'] = this.name;
|
|
206
|
+
if (this.lastName != undefined)
|
|
207
|
+
res['lastName'] = this.lastName;
|
|
208
|
+
if (this.firstName != undefined)
|
|
209
|
+
res['firstName'] = this.firstName;
|
|
210
|
+
res['names'] = this.names.map((x0) => x0.toJSON());
|
|
211
|
+
if (this.gender != undefined)
|
|
212
|
+
res['gender'] = this.gender;
|
|
213
|
+
if (this.civility != undefined)
|
|
214
|
+
res['civility'] = this.civility;
|
|
215
|
+
if (this.companyName != undefined)
|
|
216
|
+
res['companyName'] = this.companyName;
|
|
217
|
+
if (this.speciality != undefined)
|
|
218
|
+
res['speciality'] = this.speciality;
|
|
219
|
+
if (this.bankAccount != undefined)
|
|
220
|
+
res['bankAccount'] = this.bankAccount;
|
|
221
|
+
if (this.bic != undefined)
|
|
222
|
+
res['bic'] = this.bic;
|
|
223
|
+
if (this.proxyBankAccount != undefined)
|
|
224
|
+
res['proxyBankAccount'] = this.proxyBankAccount;
|
|
225
|
+
if (this.proxyBic != undefined)
|
|
226
|
+
res['proxyBic'] = this.proxyBic;
|
|
227
|
+
if (this.invoiceHeader != undefined)
|
|
228
|
+
res['invoiceHeader'] = this.invoiceHeader;
|
|
229
|
+
if (this.cbe != undefined)
|
|
230
|
+
res['cbe'] = this.cbe;
|
|
231
|
+
if (this.ehp != undefined)
|
|
232
|
+
res['ehp'] = this.ehp;
|
|
233
|
+
if (this.userId != undefined)
|
|
234
|
+
res['userId'] = this.userId;
|
|
235
|
+
if (this.parentId != undefined)
|
|
236
|
+
res['parentId'] = this.parentId;
|
|
237
|
+
if (this.convention != undefined)
|
|
238
|
+
res['convention'] = this.convention;
|
|
239
|
+
if (this.nihii != undefined)
|
|
240
|
+
res['nihii'] = this.nihii;
|
|
241
|
+
if (this.nihiiSpecCode != undefined)
|
|
242
|
+
res['nihiiSpecCode'] = this.nihiiSpecCode;
|
|
243
|
+
if (this.ssin != undefined)
|
|
244
|
+
res['ssin'] = this.ssin;
|
|
245
|
+
res['addresses'] = this.addresses.map((x0) => x0.toJSON());
|
|
246
|
+
res['languages'] = this.languages.map((x0) => x0);
|
|
247
|
+
if (this.picture != undefined)
|
|
248
|
+
res['picture'] = encodeBase64(this.picture);
|
|
249
|
+
res['statuses'] = this.statuses.map((x0) => x0);
|
|
250
|
+
res['statusHistory'] = this.statusHistory.map((x0) => x0.toJSON());
|
|
251
|
+
res['specialityCodes'] = this.specialityCodes.map((x0) => x0.toJSON());
|
|
252
|
+
res['sendFormats'] = Object.fromEntries(Object.entries(this.sendFormats).map(([k0, v0]) => [k0, v0]));
|
|
253
|
+
if (this.notes != undefined)
|
|
254
|
+
res['notes'] = this.notes;
|
|
255
|
+
res['financialInstitutionInformation'] = this.financialInstitutionInformation.map((x0) => x0.toJSON());
|
|
256
|
+
if (this.descr != undefined)
|
|
257
|
+
res['descr'] = Object.fromEntries(Object.entries(this.descr).map(([k0, v0]) => [k0, v0]));
|
|
258
|
+
if (this.billingType != undefined)
|
|
259
|
+
res['billingType'] = this.billingType;
|
|
260
|
+
if (this.type != undefined)
|
|
261
|
+
res['type'] = this.type;
|
|
262
|
+
if (this.contactPerson != undefined)
|
|
263
|
+
res['contactPerson'] = this.contactPerson;
|
|
264
|
+
if (this.contactPersonHcpId != undefined)
|
|
265
|
+
res['contactPersonHcpId'] = this.contactPersonHcpId;
|
|
266
|
+
if (this.supervisorId != undefined)
|
|
267
|
+
res['supervisorId'] = this.supervisorId;
|
|
268
|
+
res['flatRateTarifications'] = this.flatRateTarifications.map((x0) => x0.toJSON());
|
|
269
|
+
res['importedData'] = Object.fromEntries(Object.entries(this.importedData).map(([k0, v0]) => [k0, v0]));
|
|
270
|
+
res['options'] = Object.fromEntries(Object.entries(this.options).map(([k0, v0]) => [k0, v0]));
|
|
271
|
+
res['properties'] = this.properties.map((x0) => x0.toJSON());
|
|
272
|
+
res['public'] = this.public;
|
|
273
|
+
if (this.publicProperties != undefined)
|
|
274
|
+
res['publicProperties'] = this.publicProperties.map((x0) => x0.toJSON());
|
|
275
|
+
if (this.cryptoActorProperties != undefined)
|
|
276
|
+
res['cryptoActorProperties'] = this.cryptoActorProperties.map((x0) => x0.toJSON());
|
|
277
|
+
res['hcPartyKeys'] = Object.fromEntries(Object.entries(this.hcPartyKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
|
|
278
|
+
res['aesExchangeKeys'] = Object.fromEntries(Object.entries(this.aesExchangeKeys).map(([k0, v0]) => [k0, Object.fromEntries(Object.entries(v0).map(([k1, v1]) => [k1, Object.fromEntries(Object.entries(v1).map(([k2, v2]) => [k2, v2]))]))]));
|
|
279
|
+
res['transferKeys'] = Object.fromEntries(Object.entries(this.transferKeys).map(([k0, v0]) => [k0, Object.fromEntries(Object.entries(v0).map(([k1, v1]) => [k1, v1]))]));
|
|
280
|
+
res['privateKeyShamirPartitions'] = Object.fromEntries(Object.entries(this.privateKeyShamirPartitions).map(([k0, v0]) => [k0, v0]));
|
|
281
|
+
if (this.publicKey != undefined)
|
|
282
|
+
res['publicKey'] = this.publicKey;
|
|
283
|
+
res['publicKeysForOaepWithSha256'] = this.publicKeysForOaepWithSha256.map((x0) => x0);
|
|
284
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.HealthcareParty';
|
|
285
|
+
return res;
|
|
286
|
+
}
|
|
287
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['HealthcareParty']) {
|
|
288
|
+
if (typeof json != 'object')
|
|
289
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
290
|
+
const jCpy = Object.assign({}, json);
|
|
291
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.HealthcareParty')
|
|
292
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.HealthcareParty". The provided json doesn't represent a HealthcareParty`);
|
|
293
|
+
const res = new HealthcareParty({
|
|
294
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
295
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
296
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
297
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
298
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
299
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
300
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
301
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
302
|
+
name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
|
|
303
|
+
lastName: expectString(extractEntry(jCpy, 'lastName', false, path), true, [...path, ".lastName"]),
|
|
304
|
+
firstName: expectString(extractEntry(jCpy, 'firstName', false, path), true, [...path, ".firstName"]),
|
|
305
|
+
names: expectArray(extractEntry(jCpy, 'names', false, path), false, [...path, ".names"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, PersonName.fromJSON)),
|
|
306
|
+
gender: expectStringEnum(extractEntry(jCpy, 'gender', false, path), true, [...path, ".gender"], Gender, 'Gender'),
|
|
307
|
+
civility: expectString(extractEntry(jCpy, 'civility', false, path), true, [...path, ".civility"]),
|
|
308
|
+
companyName: expectString(extractEntry(jCpy, 'companyName', false, path), true, [...path, ".companyName"]),
|
|
309
|
+
speciality: expectString(extractEntry(jCpy, 'speciality', false, path), true, [...path, ".speciality"]),
|
|
310
|
+
bankAccount: expectString(extractEntry(jCpy, 'bankAccount', false, path), true, [...path, ".bankAccount"]),
|
|
311
|
+
bic: expectString(extractEntry(jCpy, 'bic', false, path), true, [...path, ".bic"]),
|
|
312
|
+
proxyBankAccount: expectString(extractEntry(jCpy, 'proxyBankAccount', false, path), true, [...path, ".proxyBankAccount"]),
|
|
313
|
+
proxyBic: expectString(extractEntry(jCpy, 'proxyBic', false, path), true, [...path, ".proxyBic"]),
|
|
314
|
+
invoiceHeader: expectString(extractEntry(jCpy, 'invoiceHeader', false, path), true, [...path, ".invoiceHeader"]),
|
|
315
|
+
cbe: expectString(extractEntry(jCpy, 'cbe', false, path), true, [...path, ".cbe"]),
|
|
316
|
+
ehp: expectString(extractEntry(jCpy, 'ehp', false, path), true, [...path, ".ehp"]),
|
|
317
|
+
userId: expectString(extractEntry(jCpy, 'userId', false, path), true, [...path, ".userId"]),
|
|
318
|
+
parentId: expectString(extractEntry(jCpy, 'parentId', false, path), true, [...path, ".parentId"]),
|
|
319
|
+
convention: expectNumber(extractEntry(jCpy, 'convention', false, path), true, true, [...path, ".convention"]),
|
|
320
|
+
nihii: expectString(extractEntry(jCpy, 'nihii', false, path), true, [...path, ".nihii"]),
|
|
321
|
+
nihiiSpecCode: expectString(extractEntry(jCpy, 'nihiiSpecCode', false, path), true, [...path, ".nihiiSpecCode"]),
|
|
322
|
+
ssin: expectString(extractEntry(jCpy, 'ssin', false, path), true, [...path, ".ssin"]),
|
|
323
|
+
addresses: expectArray(extractEntry(jCpy, 'addresses', false, path), false, [...path, ".addresses"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedAddress.fromJSON)),
|
|
324
|
+
languages: expectArray(extractEntry(jCpy, 'languages', false, path), false, [...path, ".languages"], (x0, p0) => expectString(x0, false, p0)),
|
|
325
|
+
picture: decodeBase64(expectString(extractEntry(jCpy, 'picture', false, path), true, [...path, ".picture"]), [...path, ".picture"]),
|
|
326
|
+
statuses: expectArray(extractEntry(jCpy, 'statuses', false, path), false, [...path, ".statuses"], (x0, p0) => expectStringEnum(x0, false, p0, HealthcarePartyStatus, 'HealthcarePartyStatus')),
|
|
327
|
+
statusHistory: expectArray(extractEntry(jCpy, 'statusHistory', false, path), false, [...path, ".statusHistory"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, HealthcarePartyHistoryStatus.fromJSON)),
|
|
328
|
+
specialityCodes: expectArray(extractEntry(jCpy, 'specialityCodes', false, path), false, [...path, ".specialityCodes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
329
|
+
sendFormats: expectMap(extractEntry(jCpy, 'sendFormats', false, path), false, [...path, ".sendFormats"], (k0, p0) => expectStringEnum(k0, false, p0, TelecomType, 'TelecomType'), (v0, p0) => expectString(v0, false, p0)),
|
|
330
|
+
notes: expectString(extractEntry(jCpy, 'notes', false, path), true, [...path, ".notes"]),
|
|
331
|
+
financialInstitutionInformation: expectArray(extractEntry(jCpy, 'financialInstitutionInformation', false, path), false, [...path, ".financialInstitutionInformation"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedFinancialInstitutionInformation.fromJSON)),
|
|
332
|
+
descr: expectMap(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
333
|
+
billingType: expectString(extractEntry(jCpy, 'billingType', false, path), true, [...path, ".billingType"]),
|
|
334
|
+
type: expectString(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"]),
|
|
335
|
+
contactPerson: expectString(extractEntry(jCpy, 'contactPerson', false, path), true, [...path, ".contactPerson"]),
|
|
336
|
+
contactPersonHcpId: expectString(extractEntry(jCpy, 'contactPersonHcpId', false, path), true, [...path, ".contactPersonHcpId"]),
|
|
337
|
+
supervisorId: expectString(extractEntry(jCpy, 'supervisorId', false, path), true, [...path, ".supervisorId"]),
|
|
338
|
+
flatRateTarifications: expectArray(extractEntry(jCpy, 'flatRateTarifications', false, path), false, [...path, ".flatRateTarifications"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedFlatRateTarification.fromJSON)),
|
|
339
|
+
importedData: expectMap(extractEntry(jCpy, 'importedData', false, path), false, [...path, ".importedData"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
340
|
+
options: expectMap(extractEntry(jCpy, 'options', false, path), false, [...path, ".options"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
341
|
+
properties: expectArray(extractEntry(jCpy, 'properties', false, path), false, [...path, ".properties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
|
|
342
|
+
public: expectBoolean(extractEntry(jCpy, 'public', false, path), false, [...path, ".public"]),
|
|
343
|
+
publicProperties: expectArray(extractEntry(jCpy, 'publicProperties', false, path), true, [...path, ".publicProperties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
|
|
344
|
+
cryptoActorProperties: expectArray(extractEntry(jCpy, 'cryptoActorProperties', false, path), true, [...path, ".cryptoActorProperties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
|
|
345
|
+
hcPartyKeys: expectMap(extractEntry(jCpy, 'hcPartyKeys', false, path), false, [...path, ".hcPartyKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
|
|
346
|
+
aesExchangeKeys: expectMap(extractEntry(jCpy, 'aesExchangeKeys', false, path), false, [...path, ".aesExchangeKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectMap(v1, false, p1, (k2, p2) => expectString(k2, false, p2), (v2, p2) => expectString(v2, false, p2)))),
|
|
347
|
+
transferKeys: expectMap(extractEntry(jCpy, 'transferKeys', false, path), false, [...path, ".transferKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectMap(v0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectString(v1, false, p1))),
|
|
348
|
+
privateKeyShamirPartitions: expectMap(extractEntry(jCpy, 'privateKeyShamirPartitions', false, path), false, [...path, ".privateKeyShamirPartitions"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
349
|
+
publicKey: expectString(extractEntry(jCpy, 'publicKey', false, path), true, [...path, ".publicKey"]),
|
|
350
|
+
publicKeysForOaepWithSha256: expectArray(extractEntry(jCpy, 'publicKeysForOaepWithSha256', false, path), false, [...path, ".publicKeysForOaepWithSha256"], (x0, p0) => expectString(x0, false, p0)),
|
|
351
|
+
});
|
|
352
|
+
if (!ignoreUnknownKeys) {
|
|
353
|
+
const unused = Object.keys(jCpy);
|
|
354
|
+
if (unused.length > 0)
|
|
355
|
+
throw new Error(`Unexpected key(s) for json object HealthcareParty at path ${path.join("")}: ${unused}`);
|
|
356
|
+
}
|
|
357
|
+
return res;
|
|
358
|
+
}
|
|
177
359
|
}
|
package/model/IdWithRev.d.mts
CHANGED
package/model/IdWithRev.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
3
4
|
export class IdWithRev {
|
|
4
5
|
constructor(partial) {
|
|
@@ -8,4 +9,26 @@ export class IdWithRev {
|
|
|
8
9
|
if ('rev' in partial)
|
|
9
10
|
this.rev = partial.rev;
|
|
10
11
|
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
const res = {};
|
|
14
|
+
res['id'] = this.id;
|
|
15
|
+
if (this.rev != undefined)
|
|
16
|
+
res['rev'] = this.rev;
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['IdWithRev']) {
|
|
20
|
+
if (typeof json != 'object')
|
|
21
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
22
|
+
const jCpy = Object.assign({}, json);
|
|
23
|
+
const res = new IdWithRev({
|
|
24
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
25
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
26
|
+
});
|
|
27
|
+
if (!ignoreUnknownKeys) {
|
|
28
|
+
const unused = Object.keys(jCpy);
|
|
29
|
+
if (unused.length > 0)
|
|
30
|
+
throw new Error(`Unexpected key(s) for json object IdWithRev at path ${path.join("")}: ${unused}`);
|
|
31
|
+
}
|
|
32
|
+
return res;
|
|
33
|
+
}
|
|
11
34
|
}
|
package/model/IndexingInfo.d.mts
CHANGED
package/model/IndexingInfo.mjs
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectMap, expectNumber, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class IndexingInfo {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.statuses = undefined;
|
|
5
6
|
if ('statuses' in partial)
|
|
6
7
|
this.statuses = partial.statuses;
|
|
7
8
|
}
|
|
9
|
+
toJSON() {
|
|
10
|
+
const res = {};
|
|
11
|
+
if (this.statuses != undefined)
|
|
12
|
+
res['statuses'] = Object.fromEntries(Object.entries(this.statuses).map(([k0, v0]) => [k0, v0]));
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['IndexingInfo']) {
|
|
16
|
+
if (typeof json != 'object')
|
|
17
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
18
|
+
const jCpy = Object.assign({}, json);
|
|
19
|
+
const res = new IndexingInfo({
|
|
20
|
+
statuses: expectMap(extractEntry(jCpy, 'statuses', false, path), true, [...path, ".statuses"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectNumber(v0, false, true, p0)),
|
|
21
|
+
});
|
|
22
|
+
if (!ignoreUnknownKeys) {
|
|
23
|
+
const unused = Object.keys(jCpy);
|
|
24
|
+
if (unused.length > 0)
|
|
25
|
+
throw new Error(`Unexpected key(s) for json object IndexingInfo at path ${path.join("")}: ${unused}`);
|
|
26
|
+
}
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
8
29
|
}
|
package/model/Insurance.d.mts
CHANGED
|
@@ -15,4 +15,6 @@ export declare class Insurance implements StoredDocument {
|
|
|
15
15
|
parent: string | undefined;
|
|
16
16
|
address: DecryptedAddress;
|
|
17
17
|
constructor(partial: Partial<Insurance> & Pick<Insurance, "address">);
|
|
18
|
+
toJSON(): object;
|
|
19
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Insurance;
|
|
18
20
|
}
|
package/model/Insurance.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
+
import { DecryptedAddress } from './embed/Address.mjs';
|
|
3
5
|
export class Insurance {
|
|
4
6
|
constructor(partial) {
|
|
5
7
|
var _a;
|
|
@@ -33,4 +35,48 @@ export class Insurance {
|
|
|
33
35
|
this.parent = partial.parent;
|
|
34
36
|
this.address = partial.address;
|
|
35
37
|
}
|
|
38
|
+
toJSON() {
|
|
39
|
+
const res = {};
|
|
40
|
+
res['id'] = this.id;
|
|
41
|
+
if (this.rev != undefined)
|
|
42
|
+
res['rev'] = this.rev;
|
|
43
|
+
if (this.deletionDate != undefined)
|
|
44
|
+
res['deletionDate'] = this.deletionDate;
|
|
45
|
+
res['name'] = Object.fromEntries(Object.entries(this.name).map(([k0, v0]) => [k0, v0]));
|
|
46
|
+
res['privateInsurance'] = this.privateInsurance;
|
|
47
|
+
res['hospitalisationInsurance'] = this.hospitalisationInsurance;
|
|
48
|
+
res['ambulatoryInsurance'] = this.ambulatoryInsurance;
|
|
49
|
+
if (this.code != undefined)
|
|
50
|
+
res['code'] = this.code;
|
|
51
|
+
if (this.agreementNumber != undefined)
|
|
52
|
+
res['agreementNumber'] = this.agreementNumber;
|
|
53
|
+
if (this.parent != undefined)
|
|
54
|
+
res['parent'] = this.parent;
|
|
55
|
+
res['address'] = this.address.toJSON();
|
|
56
|
+
return res;
|
|
57
|
+
}
|
|
58
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Insurance']) {
|
|
59
|
+
if (typeof json != 'object')
|
|
60
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
61
|
+
const jCpy = Object.assign({}, json);
|
|
62
|
+
const res = new Insurance({
|
|
63
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
64
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
65
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
66
|
+
name: expectMap(extractEntry(jCpy, 'name', false, path), false, [...path, ".name"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
67
|
+
privateInsurance: expectBoolean(extractEntry(jCpy, 'privateInsurance', false, path), false, [...path, ".privateInsurance"]),
|
|
68
|
+
hospitalisationInsurance: expectBoolean(extractEntry(jCpy, 'hospitalisationInsurance', false, path), false, [...path, ".hospitalisationInsurance"]),
|
|
69
|
+
ambulatoryInsurance: expectBoolean(extractEntry(jCpy, 'ambulatoryInsurance', false, path), false, [...path, ".ambulatoryInsurance"]),
|
|
70
|
+
code: expectString(extractEntry(jCpy, 'code', false, path), true, [...path, ".code"]),
|
|
71
|
+
agreementNumber: expectString(extractEntry(jCpy, 'agreementNumber', false, path), true, [...path, ".agreementNumber"]),
|
|
72
|
+
parent: expectString(extractEntry(jCpy, 'parent', false, path), true, [...path, ".parent"]),
|
|
73
|
+
address: expectObject(extractEntry(jCpy, 'address', true, path), false, ignoreUnknownKeys, [...path, ".address"], DecryptedAddress.fromJSON),
|
|
74
|
+
});
|
|
75
|
+
if (!ignoreUnknownKeys) {
|
|
76
|
+
const unused = Object.keys(jCpy);
|
|
77
|
+
if (unused.length > 0)
|
|
78
|
+
throw new Error(`Unexpected key(s) for json object Insurance at path ${path.join("")}: ${unused}`);
|
|
79
|
+
}
|
|
80
|
+
return res;
|
|
81
|
+
}
|
|
36
82
|
}
|
package/model/Invoice.d.mts
CHANGED
|
@@ -76,6 +76,7 @@ export interface Invoice extends StoredDocument, ICureDocument<string>, HasEncry
|
|
|
76
76
|
[key: string]: string;
|
|
77
77
|
};
|
|
78
78
|
readonly isEncrypted: boolean;
|
|
79
|
+
toJSON(): object;
|
|
79
80
|
}
|
|
80
81
|
export declare class DecryptedInvoice {
|
|
81
82
|
id: string;
|
|
@@ -163,6 +164,8 @@ export declare class DecryptedInvoice {
|
|
|
163
164
|
securityMetadata: SecurityMetadata | undefined;
|
|
164
165
|
readonly isEncrypted: false;
|
|
165
166
|
constructor(partial: Partial<DecryptedInvoice>);
|
|
167
|
+
toJSON(): object;
|
|
168
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedInvoice;
|
|
166
169
|
}
|
|
167
170
|
export declare class EncryptedInvoice {
|
|
168
171
|
id: string;
|
|
@@ -250,4 +253,6 @@ export declare class EncryptedInvoice {
|
|
|
250
253
|
securityMetadata: SecurityMetadata | undefined;
|
|
251
254
|
readonly isEncrypted: true;
|
|
252
255
|
constructor(partial: Partial<EncryptedInvoice>);
|
|
256
|
+
toJSON(): object;
|
|
257
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedInvoice;
|
|
253
258
|
}
|