@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
|
@@ -2,4 +2,6 @@ import { Basic } from './Basic.mjs';
|
|
|
2
2
|
export declare class RemoteAuthentication {
|
|
3
3
|
basic: Basic | undefined;
|
|
4
4
|
constructor(partial: Partial<RemoteAuthentication>);
|
|
5
|
+
toJSON(): object;
|
|
6
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): RemoteAuthentication;
|
|
5
7
|
}
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectObject, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { Basic } from './Basic.mjs';
|
|
1
4
|
export class RemoteAuthentication {
|
|
2
5
|
constructor(partial) {
|
|
3
6
|
this.basic = undefined;
|
|
4
7
|
if ('basic' in partial)
|
|
5
8
|
this.basic = partial.basic;
|
|
6
9
|
}
|
|
10
|
+
toJSON() {
|
|
11
|
+
const res = {};
|
|
12
|
+
if (this.basic != undefined)
|
|
13
|
+
res['basic'] = this.basic.toJSON();
|
|
14
|
+
return res;
|
|
15
|
+
}
|
|
16
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['RemoteAuthentication']) {
|
|
17
|
+
if (typeof json != 'object')
|
|
18
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
19
|
+
const jCpy = Object.assign({}, json);
|
|
20
|
+
const res = new RemoteAuthentication({
|
|
21
|
+
basic: expectObject(extractEntry(jCpy, 'basic', false, path), true, ignoreUnknownKeys, [...path, ".basic"], Basic.fromJSON),
|
|
22
|
+
});
|
|
23
|
+
if (!ignoreUnknownKeys) {
|
|
24
|
+
const unused = Object.keys(jCpy);
|
|
25
|
+
if (unused.length > 0)
|
|
26
|
+
throw new Error(`Unexpected key(s) for json object RemoteAuthentication at path ${path.join("")}: ${unused}`);
|
|
27
|
+
}
|
|
28
|
+
return res;
|
|
29
|
+
}
|
|
7
30
|
}
|
|
@@ -9,4 +9,6 @@ export declare class ReplicationStats {
|
|
|
9
9
|
startTime: string | undefined;
|
|
10
10
|
error: string | undefined;
|
|
11
11
|
constructor(partial: Partial<ReplicationStats>);
|
|
12
|
+
toJSON(): object;
|
|
13
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ReplicationStats;
|
|
12
14
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectNumber, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class ReplicationStats {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.revisionsChecked = undefined;
|
|
@@ -29,4 +30,48 @@ export class ReplicationStats {
|
|
|
29
30
|
if ('error' in partial)
|
|
30
31
|
this.error = partial.error;
|
|
31
32
|
}
|
|
33
|
+
toJSON() {
|
|
34
|
+
const res = {};
|
|
35
|
+
if (this.revisionsChecked != undefined)
|
|
36
|
+
res['revisionsChecked'] = this.revisionsChecked;
|
|
37
|
+
if (this.missingRevisionsFound != undefined)
|
|
38
|
+
res['missingRevisionsFound'] = this.missingRevisionsFound;
|
|
39
|
+
if (this.docsRead != undefined)
|
|
40
|
+
res['docsRead'] = this.docsRead;
|
|
41
|
+
if (this.docsWritten != undefined)
|
|
42
|
+
res['docsWritten'] = this.docsWritten;
|
|
43
|
+
if (this.changesPending != undefined)
|
|
44
|
+
res['changesPending'] = this.changesPending;
|
|
45
|
+
if (this.docWriteFailures != undefined)
|
|
46
|
+
res['docWriteFailures'] = this.docWriteFailures;
|
|
47
|
+
if (this.checkpointedSourceSeq != undefined)
|
|
48
|
+
res['checkpointedSourceSeq'] = this.checkpointedSourceSeq;
|
|
49
|
+
if (this.startTime != undefined)
|
|
50
|
+
res['startTime'] = this.startTime;
|
|
51
|
+
if (this.error != undefined)
|
|
52
|
+
res['error'] = this.error;
|
|
53
|
+
return res;
|
|
54
|
+
}
|
|
55
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['ReplicationStats']) {
|
|
56
|
+
if (typeof json != 'object')
|
|
57
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
58
|
+
const jCpy = Object.assign({}, json);
|
|
59
|
+
const res = new ReplicationStats({
|
|
60
|
+
revisionsChecked: expectNumber(extractEntry(jCpy, 'revisionsChecked', false, path), true, true, [...path, ".revisionsChecked"]),
|
|
61
|
+
missingRevisionsFound: expectNumber(extractEntry(jCpy, 'missingRevisionsFound', false, path), true, true, [...path, ".missingRevisionsFound"]),
|
|
62
|
+
docsRead: expectNumber(extractEntry(jCpy, 'docsRead', false, path), true, true, [...path, ".docsRead"]),
|
|
63
|
+
docsWritten: expectNumber(extractEntry(jCpy, 'docsWritten', false, path), true, true, [...path, ".docsWritten"]),
|
|
64
|
+
changesPending: expectNumber(extractEntry(jCpy, 'changesPending', false, path), true, true, [...path, ".changesPending"]),
|
|
65
|
+
docWriteFailures: expectNumber(extractEntry(jCpy, 'docWriteFailures', false, path), true, true, [...path, ".docWriteFailures"]),
|
|
66
|
+
checkpointedSourceSeq: expectString(extractEntry(jCpy, 'checkpointedSourceSeq', false, path), true, [...path, ".checkpointedSourceSeq"]),
|
|
67
|
+
startTime: expectString(extractEntry(jCpy, 'startTime', false, path), true, [...path, ".startTime"]),
|
|
68
|
+
error: expectString(extractEntry(jCpy, 'error', false, path), true, [...path, ".error"]),
|
|
69
|
+
});
|
|
70
|
+
if (!ignoreUnknownKeys) {
|
|
71
|
+
const unused = Object.keys(jCpy);
|
|
72
|
+
if (unused.length > 0)
|
|
73
|
+
throw new Error(`Unexpected key(s) for json object ReplicationStats at path ${path.join("")}: ${unused}`);
|
|
74
|
+
}
|
|
75
|
+
return res;
|
|
76
|
+
}
|
|
32
77
|
}
|
|
@@ -21,4 +21,6 @@ export declare class ReplicatorDocument implements Versionable<string> {
|
|
|
21
21
|
[key: string]: string;
|
|
22
22
|
} | undefined;
|
|
23
23
|
constructor(partial: Partial<ReplicatorDocument>);
|
|
24
|
+
toJSON(): object;
|
|
25
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ReplicatorDocument;
|
|
24
26
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { randomUuid } from '../../utils/Id.mjs';
|
|
4
|
+
import { Remote } from './Remote.mjs';
|
|
5
|
+
import { ReplicationStats } from './ReplicationStats.mjs';
|
|
3
6
|
export class ReplicatorDocument {
|
|
4
7
|
constructor(partial) {
|
|
5
8
|
var _a;
|
|
@@ -44,4 +47,62 @@ export class ReplicatorDocument {
|
|
|
44
47
|
if ('revHistory' in partial)
|
|
45
48
|
this.revHistory = partial.revHistory;
|
|
46
49
|
}
|
|
50
|
+
toJSON() {
|
|
51
|
+
const res = {};
|
|
52
|
+
res['id'] = this.id;
|
|
53
|
+
if (this.rev != undefined)
|
|
54
|
+
res['rev'] = this.rev;
|
|
55
|
+
if (this.source != undefined)
|
|
56
|
+
res['source'] = this.source.toJSON();
|
|
57
|
+
if (this.target != undefined)
|
|
58
|
+
res['target'] = this.target.toJSON();
|
|
59
|
+
if (this.owner != undefined)
|
|
60
|
+
res['owner'] = this.owner;
|
|
61
|
+
if (this.create_target != undefined)
|
|
62
|
+
res['create_target'] = this.create_target;
|
|
63
|
+
if (this.continuous != undefined)
|
|
64
|
+
res['continuous'] = this.continuous;
|
|
65
|
+
if (this.doc_ids != undefined)
|
|
66
|
+
res['doc_ids'] = this.doc_ids.map((x0) => x0);
|
|
67
|
+
if (this.replicationState != undefined)
|
|
68
|
+
res['replicationState'] = this.replicationState;
|
|
69
|
+
if (this.replicationStateTime != undefined)
|
|
70
|
+
res['replicationStateTime'] = this.replicationStateTime;
|
|
71
|
+
if (this.replicationStats != undefined)
|
|
72
|
+
res['replicationStats'] = this.replicationStats.toJSON();
|
|
73
|
+
if (this.errorCount != undefined)
|
|
74
|
+
res['errorCount'] = this.errorCount;
|
|
75
|
+
if (this.revsInfo != undefined)
|
|
76
|
+
res['revsInfo'] = this.revsInfo.map((x0) => Object.fromEntries(Object.entries(x0).map(([k1, v1]) => [k1, v1])));
|
|
77
|
+
if (this.revHistory != undefined)
|
|
78
|
+
res['revHistory'] = Object.fromEntries(Object.entries(this.revHistory).map(([k0, v0]) => [k0, v0]));
|
|
79
|
+
return res;
|
|
80
|
+
}
|
|
81
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['ReplicatorDocument']) {
|
|
82
|
+
if (typeof json != 'object')
|
|
83
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
84
|
+
const jCpy = Object.assign({}, json);
|
|
85
|
+
const res = new ReplicatorDocument({
|
|
86
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
87
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
88
|
+
source: expectObject(extractEntry(jCpy, 'source', false, path), true, ignoreUnknownKeys, [...path, ".source"], Remote.fromJSON),
|
|
89
|
+
target: expectObject(extractEntry(jCpy, 'target', false, path), true, ignoreUnknownKeys, [...path, ".target"], Remote.fromJSON),
|
|
90
|
+
owner: expectString(extractEntry(jCpy, 'owner', false, path), true, [...path, ".owner"]),
|
|
91
|
+
create_target: expectBoolean(extractEntry(jCpy, 'create_target', false, path), true, [...path, ".create_target"]),
|
|
92
|
+
continuous: expectBoolean(extractEntry(jCpy, 'continuous', false, path), true, [...path, ".continuous"]),
|
|
93
|
+
doc_ids: expectArray(extractEntry(jCpy, 'doc_ids', false, path), true, [...path, ".doc_ids"], (x0, p0) => expectString(x0, false, p0)),
|
|
94
|
+
replicationState: expectString(extractEntry(jCpy, 'replicationState', false, path), true, [...path, ".replicationState"]),
|
|
95
|
+
replicationStateTime: expectString(extractEntry(jCpy, 'replicationStateTime', false, path), true, [...path, ".replicationStateTime"]),
|
|
96
|
+
replicationStats: expectObject(extractEntry(jCpy, 'replicationStats', false, path), true, ignoreUnknownKeys, [...path, ".replicationStats"], ReplicationStats.fromJSON),
|
|
97
|
+
errorCount: expectNumber(extractEntry(jCpy, 'errorCount', false, path), true, true, [...path, ".errorCount"]),
|
|
98
|
+
revsInfo: expectArray(extractEntry(jCpy, 'revsInfo', false, path), true, [...path, ".revsInfo"], (x0, p0) => expectMap(x0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectString(v1, false, p1))),
|
|
99
|
+
revHistory: expectMap(extractEntry(jCpy, 'revHistory', false, path), true, [...path, ".revHistory"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
100
|
+
});
|
|
101
|
+
if (!ignoreUnknownKeys) {
|
|
102
|
+
const unused = Object.keys(jCpy);
|
|
103
|
+
if (unused.length > 0)
|
|
104
|
+
throw new Error(`Unexpected key(s) for json object ReplicatorDocument at path ${path.join("")}: ${unused}`);
|
|
105
|
+
}
|
|
106
|
+
return res;
|
|
107
|
+
}
|
|
47
108
|
}
|
package/model/couchdb/View.d.mts
CHANGED
package/model/couchdb/View.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class View {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.reduce = undefined;
|
|
@@ -6,4 +7,26 @@ export class View {
|
|
|
6
7
|
if ('reduce' in partial)
|
|
7
8
|
this.reduce = partial.reduce;
|
|
8
9
|
}
|
|
10
|
+
toJSON() {
|
|
11
|
+
const res = {};
|
|
12
|
+
res['map'] = this.map;
|
|
13
|
+
if (this.reduce != undefined)
|
|
14
|
+
res['reduce'] = this.reduce;
|
|
15
|
+
return res;
|
|
16
|
+
}
|
|
17
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['View']) {
|
|
18
|
+
if (typeof json != 'object')
|
|
19
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
20
|
+
const jCpy = Object.assign({}, json);
|
|
21
|
+
const res = new View({
|
|
22
|
+
map: expectString(extractEntry(jCpy, 'map', true, path), false, [...path, ".map"]),
|
|
23
|
+
reduce: expectString(extractEntry(jCpy, 'reduce', false, path), true, [...path, ".reduce"]),
|
|
24
|
+
});
|
|
25
|
+
if (!ignoreUnknownKeys) {
|
|
26
|
+
const unused = Object.keys(jCpy);
|
|
27
|
+
if (unused.length > 0)
|
|
28
|
+
throw new Error(`Unexpected key(s) for json object View at path ${path.join("")}: ${unused}`);
|
|
29
|
+
}
|
|
30
|
+
return res;
|
|
31
|
+
}
|
|
9
32
|
}
|
|
@@ -2,4 +2,6 @@ export declare class LabelledOccurence {
|
|
|
2
2
|
label: string;
|
|
3
3
|
occurence: number;
|
|
4
4
|
constructor(partial: Partial<LabelledOccurence> & Pick<LabelledOccurence, "label" | "occurence">);
|
|
5
|
+
toJSON(): object;
|
|
6
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): LabelledOccurence;
|
|
5
7
|
}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectNumber, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class LabelledOccurence {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.label = partial.label;
|
|
5
6
|
this.occurence = partial.occurence;
|
|
6
7
|
}
|
|
8
|
+
toJSON() {
|
|
9
|
+
const res = {};
|
|
10
|
+
res['label'] = this.label;
|
|
11
|
+
res['occurence'] = this.occurence;
|
|
12
|
+
return res;
|
|
13
|
+
}
|
|
14
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['LabelledOccurence']) {
|
|
15
|
+
if (typeof json != 'object')
|
|
16
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
17
|
+
const jCpy = Object.assign({}, json);
|
|
18
|
+
const res = new LabelledOccurence({
|
|
19
|
+
label: expectString(extractEntry(jCpy, 'label', true, path), false, [...path, ".label"]),
|
|
20
|
+
occurence: expectNumber(extractEntry(jCpy, 'occurence', true, path), false, true, [...path, ".occurence"]),
|
|
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 LabelledOccurence at path ${path.join("")}: ${unused}`);
|
|
26
|
+
}
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
7
29
|
}
|
|
@@ -22,6 +22,7 @@ export interface Address extends Encryptable, HasTags, HasCodes {
|
|
|
22
22
|
notes: Array<Annotation>;
|
|
23
23
|
telecoms: Array<Telecom>;
|
|
24
24
|
readonly isEncrypted: boolean;
|
|
25
|
+
toJSON(): object;
|
|
25
26
|
}
|
|
26
27
|
export declare class DecryptedAddress {
|
|
27
28
|
tags: Array<CodeStub>;
|
|
@@ -42,6 +43,8 @@ export declare class DecryptedAddress {
|
|
|
42
43
|
encryptedSelf: Base64String | undefined;
|
|
43
44
|
readonly isEncrypted: false;
|
|
44
45
|
constructor(partial: Partial<DecryptedAddress>);
|
|
46
|
+
toJSON(): object;
|
|
47
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedAddress;
|
|
45
48
|
}
|
|
46
49
|
export declare class EncryptedAddress {
|
|
47
50
|
tags: Array<CodeStub>;
|
|
@@ -62,4 +65,6 @@ export declare class EncryptedAddress {
|
|
|
62
65
|
encryptedSelf: Base64String | undefined;
|
|
63
66
|
readonly isEncrypted: true;
|
|
64
67
|
constructor(partial: Partial<EncryptedAddress>);
|
|
68
|
+
toJSON(): object;
|
|
69
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedAddress;
|
|
65
70
|
}
|
package/model/embed/Address.mjs
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectArray, expectObject, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { CodeStub } from '../base/CodeStub.mjs';
|
|
4
|
+
import { Identifier } from '../base/Identifier.mjs';
|
|
5
|
+
import { AddressType } from './AddressType.mjs';
|
|
6
|
+
import { Annotation } from './Annotation.mjs';
|
|
7
|
+
import { DecryptedTelecom, EncryptedTelecom } from './Telecom.mjs';
|
|
1
8
|
export class DecryptedAddress {
|
|
2
9
|
constructor(partial) {
|
|
3
10
|
this.tags = [];
|
|
@@ -52,6 +59,69 @@ export class DecryptedAddress {
|
|
|
52
59
|
if ('encryptedSelf' in partial)
|
|
53
60
|
this.encryptedSelf = partial.encryptedSelf;
|
|
54
61
|
}
|
|
62
|
+
toJSON() {
|
|
63
|
+
const res = {};
|
|
64
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
65
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
66
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
67
|
+
if (this.addressType != undefined)
|
|
68
|
+
res['addressType'] = this.addressType;
|
|
69
|
+
if (this.descr != undefined)
|
|
70
|
+
res['descr'] = this.descr;
|
|
71
|
+
if (this.street != undefined)
|
|
72
|
+
res['street'] = this.street;
|
|
73
|
+
if (this.houseNumber != undefined)
|
|
74
|
+
res['houseNumber'] = this.houseNumber;
|
|
75
|
+
if (this.postboxNumber != undefined)
|
|
76
|
+
res['postboxNumber'] = this.postboxNumber;
|
|
77
|
+
if (this.postalCode != undefined)
|
|
78
|
+
res['postalCode'] = this.postalCode;
|
|
79
|
+
if (this.city != undefined)
|
|
80
|
+
res['city'] = this.city;
|
|
81
|
+
if (this.state != undefined)
|
|
82
|
+
res['state'] = this.state;
|
|
83
|
+
if (this.country != undefined)
|
|
84
|
+
res['country'] = this.country;
|
|
85
|
+
if (this.note != undefined)
|
|
86
|
+
res['note'] = this.note;
|
|
87
|
+
res['notes'] = this.notes.map((x0) => x0.toJSON());
|
|
88
|
+
res['telecoms'] = this.telecoms.map((x0) => x0.toJSON());
|
|
89
|
+
if (this.encryptedSelf != undefined)
|
|
90
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
91
|
+
res['isEncrypted'] = false;
|
|
92
|
+
return res;
|
|
93
|
+
}
|
|
94
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedAddress']) {
|
|
95
|
+
if (typeof json != 'object')
|
|
96
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
97
|
+
const jCpy = Object.assign({}, json);
|
|
98
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
|
|
99
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedAddress`);
|
|
100
|
+
const res = new DecryptedAddress({
|
|
101
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
102
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
103
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
104
|
+
addressType: expectStringEnum(extractEntry(jCpy, 'addressType', false, path), true, [...path, ".addressType"], AddressType, 'AddressType'),
|
|
105
|
+
descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
|
|
106
|
+
street: expectString(extractEntry(jCpy, 'street', false, path), true, [...path, ".street"]),
|
|
107
|
+
houseNumber: expectString(extractEntry(jCpy, 'houseNumber', false, path), true, [...path, ".houseNumber"]),
|
|
108
|
+
postboxNumber: expectString(extractEntry(jCpy, 'postboxNumber', false, path), true, [...path, ".postboxNumber"]),
|
|
109
|
+
postalCode: expectString(extractEntry(jCpy, 'postalCode', false, path), true, [...path, ".postalCode"]),
|
|
110
|
+
city: expectString(extractEntry(jCpy, 'city', false, path), true, [...path, ".city"]),
|
|
111
|
+
state: expectString(extractEntry(jCpy, 'state', false, path), true, [...path, ".state"]),
|
|
112
|
+
country: expectString(extractEntry(jCpy, 'country', false, path), true, [...path, ".country"]),
|
|
113
|
+
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
114
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
|
|
115
|
+
telecoms: expectArray(extractEntry(jCpy, 'telecoms', false, path), false, [...path, ".telecoms"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedTelecom.fromJSON)),
|
|
116
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
117
|
+
});
|
|
118
|
+
if (!ignoreUnknownKeys) {
|
|
119
|
+
const unused = Object.keys(jCpy);
|
|
120
|
+
if (unused.length > 0)
|
|
121
|
+
throw new Error(`Unexpected key(s) for json object DecryptedAddress at path ${path.join("")}: ${unused}`);
|
|
122
|
+
}
|
|
123
|
+
return res;
|
|
124
|
+
}
|
|
55
125
|
}
|
|
56
126
|
export class EncryptedAddress {
|
|
57
127
|
constructor(partial) {
|
|
@@ -107,4 +177,67 @@ export class EncryptedAddress {
|
|
|
107
177
|
if ('encryptedSelf' in partial)
|
|
108
178
|
this.encryptedSelf = partial.encryptedSelf;
|
|
109
179
|
}
|
|
180
|
+
toJSON() {
|
|
181
|
+
const res = {};
|
|
182
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
183
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
184
|
+
res['identifier'] = this.identifier.map((x0) => x0.toJSON());
|
|
185
|
+
if (this.addressType != undefined)
|
|
186
|
+
res['addressType'] = this.addressType;
|
|
187
|
+
if (this.descr != undefined)
|
|
188
|
+
res['descr'] = this.descr;
|
|
189
|
+
if (this.street != undefined)
|
|
190
|
+
res['street'] = this.street;
|
|
191
|
+
if (this.houseNumber != undefined)
|
|
192
|
+
res['houseNumber'] = this.houseNumber;
|
|
193
|
+
if (this.postboxNumber != undefined)
|
|
194
|
+
res['postboxNumber'] = this.postboxNumber;
|
|
195
|
+
if (this.postalCode != undefined)
|
|
196
|
+
res['postalCode'] = this.postalCode;
|
|
197
|
+
if (this.city != undefined)
|
|
198
|
+
res['city'] = this.city;
|
|
199
|
+
if (this.state != undefined)
|
|
200
|
+
res['state'] = this.state;
|
|
201
|
+
if (this.country != undefined)
|
|
202
|
+
res['country'] = this.country;
|
|
203
|
+
if (this.note != undefined)
|
|
204
|
+
res['note'] = this.note;
|
|
205
|
+
res['notes'] = this.notes.map((x0) => x0.toJSON());
|
|
206
|
+
res['telecoms'] = this.telecoms.map((x0) => x0.toJSON());
|
|
207
|
+
if (this.encryptedSelf != undefined)
|
|
208
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
209
|
+
res['isEncrypted'] = true;
|
|
210
|
+
return res;
|
|
211
|
+
}
|
|
212
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedAddress']) {
|
|
213
|
+
if (typeof json != 'object')
|
|
214
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
215
|
+
const jCpy = Object.assign({}, json);
|
|
216
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
|
|
217
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedAddress`);
|
|
218
|
+
const res = new EncryptedAddress({
|
|
219
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
220
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
221
|
+
identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
|
|
222
|
+
addressType: expectStringEnum(extractEntry(jCpy, 'addressType', false, path), true, [...path, ".addressType"], AddressType, 'AddressType'),
|
|
223
|
+
descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
|
|
224
|
+
street: expectString(extractEntry(jCpy, 'street', false, path), true, [...path, ".street"]),
|
|
225
|
+
houseNumber: expectString(extractEntry(jCpy, 'houseNumber', false, path), true, [...path, ".houseNumber"]),
|
|
226
|
+
postboxNumber: expectString(extractEntry(jCpy, 'postboxNumber', false, path), true, [...path, ".postboxNumber"]),
|
|
227
|
+
postalCode: expectString(extractEntry(jCpy, 'postalCode', false, path), true, [...path, ".postalCode"]),
|
|
228
|
+
city: expectString(extractEntry(jCpy, 'city', false, path), true, [...path, ".city"]),
|
|
229
|
+
state: expectString(extractEntry(jCpy, 'state', false, path), true, [...path, ".state"]),
|
|
230
|
+
country: expectString(extractEntry(jCpy, 'country', false, path), true, [...path, ".country"]),
|
|
231
|
+
note: expectString(extractEntry(jCpy, 'note', false, path), true, [...path, ".note"]),
|
|
232
|
+
notes: expectArray(extractEntry(jCpy, 'notes', false, path), false, [...path, ".notes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Annotation.fromJSON)),
|
|
233
|
+
telecoms: expectArray(extractEntry(jCpy, 'telecoms', false, path), false, [...path, ".telecoms"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedTelecom.fromJSON)),
|
|
234
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
235
|
+
});
|
|
236
|
+
if (!ignoreUnknownKeys) {
|
|
237
|
+
const unused = Object.keys(jCpy);
|
|
238
|
+
if (unused.length > 0)
|
|
239
|
+
throw new Error(`Unexpected key(s) for json object EncryptedAddress at path ${path.join("")}: ${unused}`);
|
|
240
|
+
}
|
|
241
|
+
return res;
|
|
242
|
+
}
|
|
110
243
|
}
|
|
@@ -4,4 +4,6 @@ export declare class AdministrationQuantity {
|
|
|
4
4
|
administrationUnit: CodeStub | undefined;
|
|
5
5
|
unit: string | undefined;
|
|
6
6
|
constructor(partial: Partial<AdministrationQuantity>);
|
|
7
|
+
toJSON(): object;
|
|
8
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): AdministrationQuantity;
|
|
7
9
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { CodeStub } from '../base/CodeStub.mjs';
|
|
1
4
|
export class AdministrationQuantity {
|
|
2
5
|
constructor(partial) {
|
|
3
6
|
this.quantity = undefined;
|
|
@@ -10,4 +13,30 @@ export class AdministrationQuantity {
|
|
|
10
13
|
if ('unit' in partial)
|
|
11
14
|
this.unit = partial.unit;
|
|
12
15
|
}
|
|
16
|
+
toJSON() {
|
|
17
|
+
const res = {};
|
|
18
|
+
if (this.quantity != undefined)
|
|
19
|
+
res['quantity'] = this.quantity;
|
|
20
|
+
if (this.administrationUnit != undefined)
|
|
21
|
+
res['administrationUnit'] = this.administrationUnit.toJSON();
|
|
22
|
+
if (this.unit != undefined)
|
|
23
|
+
res['unit'] = this.unit;
|
|
24
|
+
return res;
|
|
25
|
+
}
|
|
26
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['AdministrationQuantity']) {
|
|
27
|
+
if (typeof json != 'object')
|
|
28
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
29
|
+
const jCpy = Object.assign({}, json);
|
|
30
|
+
const res = new AdministrationQuantity({
|
|
31
|
+
quantity: expectNumber(extractEntry(jCpy, 'quantity', false, path), true, false, [...path, ".quantity"]),
|
|
32
|
+
administrationUnit: expectObject(extractEntry(jCpy, 'administrationUnit', false, path), true, ignoreUnknownKeys, [...path, ".administrationUnit"], CodeStub.fromJSON),
|
|
33
|
+
unit: expectString(extractEntry(jCpy, 'unit', false, path), true, [...path, ".unit"]),
|
|
34
|
+
});
|
|
35
|
+
if (!ignoreUnknownKeys) {
|
|
36
|
+
const unused = Object.keys(jCpy);
|
|
37
|
+
if (unused.length > 0)
|
|
38
|
+
throw new Error(`Unexpected key(s) for json object AdministrationQuantity at path ${path.join("")}: ${unused}`);
|
|
39
|
+
}
|
|
40
|
+
return res;
|
|
41
|
+
}
|
|
13
42
|
}
|
|
@@ -4,5 +4,8 @@ export declare namespace AgendaSlottingAlgorithm {
|
|
|
4
4
|
intervalMinutes: number;
|
|
5
5
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.embed.AgendaSlottingAlgorithm.FixedIntervals';
|
|
6
6
|
constructor(partial: Partial<FixedIntervals> & Pick<FixedIntervals, "intervalMinutes">);
|
|
7
|
+
toJSON(): object;
|
|
8
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): FixedIntervals;
|
|
7
9
|
}
|
|
10
|
+
function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): AgendaSlottingAlgorithm;
|
|
8
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectNumber, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export var AgendaSlottingAlgorithm;
|
|
3
4
|
(function (AgendaSlottingAlgorithm) {
|
|
4
5
|
class FixedIntervals {
|
|
@@ -6,6 +7,35 @@ export var AgendaSlottingAlgorithm;
|
|
|
6
7
|
this.$ktClass = 'com.icure.cardinal.sdk.model.embed.AgendaSlottingAlgorithm.FixedIntervals';
|
|
7
8
|
this.intervalMinutes = partial.intervalMinutes;
|
|
8
9
|
}
|
|
10
|
+
toJSON() {
|
|
11
|
+
const res = {};
|
|
12
|
+
res['intervalMinutes'] = this.intervalMinutes;
|
|
13
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.embed.AgendaSlottingAlgorithm.FixedIntervals';
|
|
14
|
+
return res;
|
|
15
|
+
}
|
|
16
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['FixedIntervals']) {
|
|
17
|
+
if (typeof json != 'object')
|
|
18
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
19
|
+
const jCpy = Object.assign({}, json);
|
|
20
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.embed.AgendaSlottingAlgorithm.FixedIntervals')
|
|
21
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.embed.AgendaSlottingAlgorithm.FixedIntervals". The provided json doesn't represent a FixedIntervals`);
|
|
22
|
+
const res = new FixedIntervals({
|
|
23
|
+
intervalMinutes: expectNumber(extractEntry(jCpy, 'intervalMinutes', true, path), false, true, [...path, ".intervalMinutes"]),
|
|
24
|
+
});
|
|
25
|
+
if (!ignoreUnknownKeys) {
|
|
26
|
+
const unused = Object.keys(jCpy);
|
|
27
|
+
if (unused.length > 0)
|
|
28
|
+
throw new Error(`Unexpected key(s) for json object FixedIntervals at path ${path.join("")}: ${unused}`);
|
|
29
|
+
}
|
|
30
|
+
return res;
|
|
31
|
+
}
|
|
9
32
|
}
|
|
10
33
|
AgendaSlottingAlgorithm.FixedIntervals = FixedIntervals;
|
|
34
|
+
function fromJSON(json, ignoreUnknownKeys = false, path = ['AgendaSlottingAlgorithm']) {
|
|
35
|
+
switch (json.$ktClass) {
|
|
36
|
+
case 'com.icure.cardinal.sdk.model.embed.AgendaSlottingAlgorithm.FixedIntervals': return FixedIntervals.fromJSON(json, ignoreUnknownKeys);
|
|
37
|
+
default: throw new Error('Unexpected discriminator for AgendaSlottingAlgorithm: ' + json.$ktClass);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
AgendaSlottingAlgorithm.fromJSON = fromJSON;
|
|
11
41
|
})(AgendaSlottingAlgorithm || (AgendaSlottingAlgorithm = {}));
|
|
@@ -4,4 +4,6 @@ export declare class AgreementAppendix {
|
|
|
4
4
|
documentId: string | undefined;
|
|
5
5
|
path: string | undefined;
|
|
6
6
|
constructor(partial: Partial<AgreementAppendix>);
|
|
7
|
+
toJSON(): object;
|
|
8
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): AgreementAppendix;
|
|
7
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectNumber, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class AgreementAppendix {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.docSeq = undefined;
|
|
@@ -14,4 +15,33 @@ export class AgreementAppendix {
|
|
|
14
15
|
if ('path' in partial)
|
|
15
16
|
this.path = partial.path;
|
|
16
17
|
}
|
|
18
|
+
toJSON() {
|
|
19
|
+
const res = {};
|
|
20
|
+
if (this.docSeq != undefined)
|
|
21
|
+
res['docSeq'] = this.docSeq;
|
|
22
|
+
if (this.verseSeq != undefined)
|
|
23
|
+
res['verseSeq'] = this.verseSeq;
|
|
24
|
+
if (this.documentId != undefined)
|
|
25
|
+
res['documentId'] = this.documentId;
|
|
26
|
+
if (this.path != undefined)
|
|
27
|
+
res['path'] = this.path;
|
|
28
|
+
return res;
|
|
29
|
+
}
|
|
30
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['AgreementAppendix']) {
|
|
31
|
+
if (typeof json != 'object')
|
|
32
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
33
|
+
const jCpy = Object.assign({}, json);
|
|
34
|
+
const res = new AgreementAppendix({
|
|
35
|
+
docSeq: expectNumber(extractEntry(jCpy, 'docSeq', false, path), true, true, [...path, ".docSeq"]),
|
|
36
|
+
verseSeq: expectNumber(extractEntry(jCpy, 'verseSeq', false, path), true, true, [...path, ".verseSeq"]),
|
|
37
|
+
documentId: expectString(extractEntry(jCpy, 'documentId', false, path), true, [...path, ".documentId"]),
|
|
38
|
+
path: expectString(extractEntry(jCpy, 'path', false, path), true, [...path, ".path"]),
|
|
39
|
+
});
|
|
40
|
+
if (!ignoreUnknownKeys) {
|
|
41
|
+
const unused = Object.keys(jCpy);
|
|
42
|
+
if (unused.length > 0)
|
|
43
|
+
throw new Error(`Unexpected key(s) for json object AgreementAppendix at path ${path.join("")}: ${unused}`);
|
|
44
|
+
}
|
|
45
|
+
return res;
|
|
46
|
+
}
|
|
17
47
|
}
|
|
@@ -14,4 +14,6 @@ export declare class Annotation implements Identifiable<string> {
|
|
|
14
14
|
tags: Array<CodeStub>;
|
|
15
15
|
encryptedSelf: string | undefined;
|
|
16
16
|
constructor(partial: Partial<Annotation>);
|
|
17
|
+
toJSON(): object;
|
|
18
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Annotation;
|
|
17
19
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { randomUuid } from '../../utils/Id.mjs';
|
|
4
|
+
import { CodeStub } from '../base/CodeStub.mjs';
|
|
3
5
|
export class Annotation {
|
|
4
6
|
constructor(partial) {
|
|
5
7
|
var _a;
|
|
@@ -32,4 +34,48 @@ export class Annotation {
|
|
|
32
34
|
if ('encryptedSelf' in partial)
|
|
33
35
|
this.encryptedSelf = partial.encryptedSelf;
|
|
34
36
|
}
|
|
37
|
+
toJSON() {
|
|
38
|
+
const res = {};
|
|
39
|
+
res['id'] = this.id;
|
|
40
|
+
if (this.author != undefined)
|
|
41
|
+
res['author'] = this.author;
|
|
42
|
+
if (this.created != undefined)
|
|
43
|
+
res['created'] = this.created;
|
|
44
|
+
if (this.modified != undefined)
|
|
45
|
+
res['modified'] = this.modified;
|
|
46
|
+
if (this.text != undefined)
|
|
47
|
+
res['text'] = this.text;
|
|
48
|
+
res['markdown'] = Object.fromEntries(Object.entries(this.markdown).map(([k0, v0]) => [k0, v0]));
|
|
49
|
+
if (this.location != undefined)
|
|
50
|
+
res['location'] = this.location;
|
|
51
|
+
if (this.confidential != undefined)
|
|
52
|
+
res['confidential'] = this.confidential;
|
|
53
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
54
|
+
if (this.encryptedSelf != undefined)
|
|
55
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
56
|
+
return res;
|
|
57
|
+
}
|
|
58
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Annotation']) {
|
|
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 Annotation({
|
|
63
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
64
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
65
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
66
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
67
|
+
text: expectString(extractEntry(jCpy, 'text', false, path), true, [...path, ".text"]),
|
|
68
|
+
markdown: expectMap(extractEntry(jCpy, 'markdown', false, path), false, [...path, ".markdown"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
69
|
+
location: expectString(extractEntry(jCpy, 'location', false, path), true, [...path, ".location"]),
|
|
70
|
+
confidential: expectBoolean(extractEntry(jCpy, 'confidential', false, path), true, [...path, ".confidential"]),
|
|
71
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
72
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
73
|
+
});
|
|
74
|
+
if (!ignoreUnknownKeys) {
|
|
75
|
+
const unused = Object.keys(jCpy);
|
|
76
|
+
if (unused.length > 0)
|
|
77
|
+
throw new Error(`Unexpected key(s) for json object Annotation at path ${path.join("")}: ${unused}`);
|
|
78
|
+
}
|
|
79
|
+
return res;
|
|
80
|
+
}
|
|
35
81
|
}
|