@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
|
@@ -4,6 +4,8 @@ export declare class ExternalJwtConfig {
|
|
|
4
4
|
fieldSelector: ExternalJwtConfig.FieldSelector;
|
|
5
5
|
authenticationClass: AuthenticationClass;
|
|
6
6
|
constructor(partial: Partial<ExternalJwtConfig> & Pick<ExternalJwtConfig, "validationMethod" | "fieldSelector">);
|
|
7
|
+
toJSON(): object;
|
|
8
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ExternalJwtConfig;
|
|
7
9
|
}
|
|
8
10
|
export declare namespace ExternalJwtConfig {
|
|
9
11
|
namespace ValidationMethod {
|
|
@@ -11,12 +13,17 @@ export declare namespace ExternalJwtConfig {
|
|
|
11
13
|
key: string;
|
|
12
14
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey';
|
|
13
15
|
constructor(partial: Partial<PublicKey> & Pick<PublicKey, "key">);
|
|
16
|
+
toJSON(): object;
|
|
17
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): PublicKey;
|
|
14
18
|
}
|
|
15
19
|
class Oidc {
|
|
16
20
|
issureLocation: string;
|
|
17
21
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc';
|
|
18
22
|
constructor(partial: Partial<Oidc> & Pick<Oidc, "issureLocation">);
|
|
23
|
+
toJSON(): object;
|
|
24
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Oidc;
|
|
19
25
|
}
|
|
26
|
+
function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ValidationMethod;
|
|
20
27
|
}
|
|
21
28
|
type ValidationMethod = ValidationMethod.PublicKey | ValidationMethod.Oidc;
|
|
22
29
|
namespace FieldSelector {
|
|
@@ -24,28 +31,39 @@ export declare namespace ExternalJwtConfig {
|
|
|
24
31
|
fieldName: string;
|
|
25
32
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId';
|
|
26
33
|
constructor(partial: Partial<LocalId> & Pick<LocalId, "fieldName">);
|
|
34
|
+
toJSON(): object;
|
|
35
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): LocalId;
|
|
27
36
|
}
|
|
28
37
|
class Email {
|
|
29
38
|
fieldName: string;
|
|
30
39
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email';
|
|
31
40
|
constructor(partial: Partial<Email> & Pick<Email, "fieldName">);
|
|
41
|
+
toJSON(): object;
|
|
42
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Email;
|
|
32
43
|
}
|
|
33
44
|
class MobilePhone {
|
|
34
45
|
fieldName: string;
|
|
35
46
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone';
|
|
36
47
|
constructor(partial: Partial<MobilePhone> & Pick<MobilePhone, "fieldName">);
|
|
48
|
+
toJSON(): object;
|
|
49
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): MobilePhone;
|
|
37
50
|
}
|
|
38
51
|
class Username {
|
|
39
52
|
fieldName: string;
|
|
40
53
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username';
|
|
41
54
|
constructor(partial: Partial<Username> & Pick<Username, "fieldName">);
|
|
55
|
+
toJSON(): object;
|
|
56
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Username;
|
|
42
57
|
}
|
|
43
58
|
class Identifier {
|
|
44
59
|
identifierAssigner: string;
|
|
45
60
|
fieldName: string;
|
|
46
61
|
readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Identifier';
|
|
47
62
|
constructor(partial: Partial<Identifier> & Pick<Identifier, "identifierAssigner" | "fieldName">);
|
|
63
|
+
toJSON(): object;
|
|
64
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Identifier;
|
|
48
65
|
}
|
|
66
|
+
function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): FieldSelector;
|
|
49
67
|
}
|
|
50
68
|
type FieldSelector = FieldSelector.LocalId | FieldSelector.Email | FieldSelector.MobilePhone | FieldSelector.Username | FieldSelector.Identifier;
|
|
51
69
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectObject, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
import { AuthenticationClass } from '../embed/AuthenticationClass.mjs';
|
|
3
4
|
export class ExternalJwtConfig {
|
|
4
5
|
constructor(partial) {
|
|
@@ -8,6 +9,29 @@ export class ExternalJwtConfig {
|
|
|
8
9
|
if ('authenticationClass' in partial && partial.authenticationClass !== undefined)
|
|
9
10
|
this.authenticationClass = partial.authenticationClass;
|
|
10
11
|
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
const res = {};
|
|
14
|
+
res['validationMethod'] = this.validationMethod.toJSON();
|
|
15
|
+
res['fieldSelector'] = this.fieldSelector.toJSON();
|
|
16
|
+
res['authenticationClass'] = this.authenticationClass;
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['ExternalJwtConfig']) {
|
|
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 ExternalJwtConfig({
|
|
24
|
+
validationMethod: expectObject(extractEntry(jCpy, 'validationMethod', true, path), false, ignoreUnknownKeys, [...path, ".validationMethod"], ExternalJwtConfig.ValidationMethod.fromJSON),
|
|
25
|
+
fieldSelector: expectObject(extractEntry(jCpy, 'fieldSelector', true, path), false, ignoreUnknownKeys, [...path, ".fieldSelector"], ExternalJwtConfig.FieldSelector.fromJSON),
|
|
26
|
+
authenticationClass: expectStringEnum(extractEntry(jCpy, 'authenticationClass', false, path), false, [...path, ".authenticationClass"], AuthenticationClass, 'AuthenticationClass'),
|
|
27
|
+
});
|
|
28
|
+
if (!ignoreUnknownKeys) {
|
|
29
|
+
const unused = Object.keys(jCpy);
|
|
30
|
+
if (unused.length > 0)
|
|
31
|
+
throw new Error(`Unexpected key(s) for json object ExternalJwtConfig at path ${path.join("")}: ${unused}`);
|
|
32
|
+
}
|
|
33
|
+
return res;
|
|
34
|
+
}
|
|
11
35
|
}
|
|
12
36
|
(function (ExternalJwtConfig) {
|
|
13
37
|
let ValidationMethod;
|
|
@@ -17,6 +41,28 @@ export class ExternalJwtConfig {
|
|
|
17
41
|
this.$ktClass = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey';
|
|
18
42
|
this.key = partial.key;
|
|
19
43
|
}
|
|
44
|
+
toJSON() {
|
|
45
|
+
const res = {};
|
|
46
|
+
res['key'] = this.key;
|
|
47
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey';
|
|
48
|
+
return res;
|
|
49
|
+
}
|
|
50
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['PublicKey']) {
|
|
51
|
+
if (typeof json != 'object')
|
|
52
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
53
|
+
const jCpy = Object.assign({}, json);
|
|
54
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey')
|
|
55
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey". The provided json doesn't represent a PublicKey`);
|
|
56
|
+
const res = new PublicKey({
|
|
57
|
+
key: expectString(extractEntry(jCpy, 'key', true, path), false, [...path, ".key"]),
|
|
58
|
+
});
|
|
59
|
+
if (!ignoreUnknownKeys) {
|
|
60
|
+
const unused = Object.keys(jCpy);
|
|
61
|
+
if (unused.length > 0)
|
|
62
|
+
throw new Error(`Unexpected key(s) for json object PublicKey at path ${path.join("")}: ${unused}`);
|
|
63
|
+
}
|
|
64
|
+
return res;
|
|
65
|
+
}
|
|
20
66
|
}
|
|
21
67
|
ValidationMethod.PublicKey = PublicKey;
|
|
22
68
|
class Oidc {
|
|
@@ -24,8 +70,38 @@ export class ExternalJwtConfig {
|
|
|
24
70
|
this.$ktClass = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc';
|
|
25
71
|
this.issureLocation = partial.issureLocation;
|
|
26
72
|
}
|
|
73
|
+
toJSON() {
|
|
74
|
+
const res = {};
|
|
75
|
+
res['issureLocation'] = this.issureLocation;
|
|
76
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc';
|
|
77
|
+
return res;
|
|
78
|
+
}
|
|
79
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Oidc']) {
|
|
80
|
+
if (typeof json != 'object')
|
|
81
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
82
|
+
const jCpy = Object.assign({}, json);
|
|
83
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc')
|
|
84
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc". The provided json doesn't represent a Oidc`);
|
|
85
|
+
const res = new Oidc({
|
|
86
|
+
issureLocation: expectString(extractEntry(jCpy, 'issureLocation', true, path), false, [...path, ".issureLocation"]),
|
|
87
|
+
});
|
|
88
|
+
if (!ignoreUnknownKeys) {
|
|
89
|
+
const unused = Object.keys(jCpy);
|
|
90
|
+
if (unused.length > 0)
|
|
91
|
+
throw new Error(`Unexpected key(s) for json object Oidc at path ${path.join("")}: ${unused}`);
|
|
92
|
+
}
|
|
93
|
+
return res;
|
|
94
|
+
}
|
|
27
95
|
}
|
|
28
96
|
ValidationMethod.Oidc = Oidc;
|
|
97
|
+
function fromJSON(json, ignoreUnknownKeys = false, path = ['ValidationMethod']) {
|
|
98
|
+
switch (json.$ktClass) {
|
|
99
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey': return PublicKey.fromJSON(json, ignoreUnknownKeys);
|
|
100
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc': return Oidc.fromJSON(json, ignoreUnknownKeys);
|
|
101
|
+
default: throw new Error('Unexpected discriminator for ValidationMethod: ' + json.$ktClass);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
ValidationMethod.fromJSON = fromJSON;
|
|
29
105
|
})(ValidationMethod = ExternalJwtConfig.ValidationMethod || (ExternalJwtConfig.ValidationMethod = {}));
|
|
30
106
|
let FieldSelector;
|
|
31
107
|
(function (FieldSelector) {
|
|
@@ -34,6 +110,28 @@ export class ExternalJwtConfig {
|
|
|
34
110
|
this.$ktClass = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId';
|
|
35
111
|
this.fieldName = partial.fieldName;
|
|
36
112
|
}
|
|
113
|
+
toJSON() {
|
|
114
|
+
const res = {};
|
|
115
|
+
res['fieldName'] = this.fieldName;
|
|
116
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId';
|
|
117
|
+
return res;
|
|
118
|
+
}
|
|
119
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['LocalId']) {
|
|
120
|
+
if (typeof json != 'object')
|
|
121
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
122
|
+
const jCpy = Object.assign({}, json);
|
|
123
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId')
|
|
124
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId". The provided json doesn't represent a LocalId`);
|
|
125
|
+
const res = new LocalId({
|
|
126
|
+
fieldName: expectString(extractEntry(jCpy, 'fieldName', true, path), false, [...path, ".fieldName"]),
|
|
127
|
+
});
|
|
128
|
+
if (!ignoreUnknownKeys) {
|
|
129
|
+
const unused = Object.keys(jCpy);
|
|
130
|
+
if (unused.length > 0)
|
|
131
|
+
throw new Error(`Unexpected key(s) for json object LocalId at path ${path.join("")}: ${unused}`);
|
|
132
|
+
}
|
|
133
|
+
return res;
|
|
134
|
+
}
|
|
37
135
|
}
|
|
38
136
|
FieldSelector.LocalId = LocalId;
|
|
39
137
|
class Email {
|
|
@@ -41,6 +139,28 @@ export class ExternalJwtConfig {
|
|
|
41
139
|
this.$ktClass = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email';
|
|
42
140
|
this.fieldName = partial.fieldName;
|
|
43
141
|
}
|
|
142
|
+
toJSON() {
|
|
143
|
+
const res = {};
|
|
144
|
+
res['fieldName'] = this.fieldName;
|
|
145
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email';
|
|
146
|
+
return res;
|
|
147
|
+
}
|
|
148
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Email']) {
|
|
149
|
+
if (typeof json != 'object')
|
|
150
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
151
|
+
const jCpy = Object.assign({}, json);
|
|
152
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email')
|
|
153
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email". The provided json doesn't represent a Email`);
|
|
154
|
+
const res = new Email({
|
|
155
|
+
fieldName: expectString(extractEntry(jCpy, 'fieldName', true, path), false, [...path, ".fieldName"]),
|
|
156
|
+
});
|
|
157
|
+
if (!ignoreUnknownKeys) {
|
|
158
|
+
const unused = Object.keys(jCpy);
|
|
159
|
+
if (unused.length > 0)
|
|
160
|
+
throw new Error(`Unexpected key(s) for json object Email at path ${path.join("")}: ${unused}`);
|
|
161
|
+
}
|
|
162
|
+
return res;
|
|
163
|
+
}
|
|
44
164
|
}
|
|
45
165
|
FieldSelector.Email = Email;
|
|
46
166
|
class MobilePhone {
|
|
@@ -48,6 +168,28 @@ export class ExternalJwtConfig {
|
|
|
48
168
|
this.$ktClass = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone';
|
|
49
169
|
this.fieldName = partial.fieldName;
|
|
50
170
|
}
|
|
171
|
+
toJSON() {
|
|
172
|
+
const res = {};
|
|
173
|
+
res['fieldName'] = this.fieldName;
|
|
174
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone';
|
|
175
|
+
return res;
|
|
176
|
+
}
|
|
177
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['MobilePhone']) {
|
|
178
|
+
if (typeof json != 'object')
|
|
179
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
180
|
+
const jCpy = Object.assign({}, json);
|
|
181
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone')
|
|
182
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone". The provided json doesn't represent a MobilePhone`);
|
|
183
|
+
const res = new MobilePhone({
|
|
184
|
+
fieldName: expectString(extractEntry(jCpy, 'fieldName', true, path), false, [...path, ".fieldName"]),
|
|
185
|
+
});
|
|
186
|
+
if (!ignoreUnknownKeys) {
|
|
187
|
+
const unused = Object.keys(jCpy);
|
|
188
|
+
if (unused.length > 0)
|
|
189
|
+
throw new Error(`Unexpected key(s) for json object MobilePhone at path ${path.join("")}: ${unused}`);
|
|
190
|
+
}
|
|
191
|
+
return res;
|
|
192
|
+
}
|
|
51
193
|
}
|
|
52
194
|
FieldSelector.MobilePhone = MobilePhone;
|
|
53
195
|
class Username {
|
|
@@ -55,6 +197,28 @@ export class ExternalJwtConfig {
|
|
|
55
197
|
this.$ktClass = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username';
|
|
56
198
|
this.fieldName = partial.fieldName;
|
|
57
199
|
}
|
|
200
|
+
toJSON() {
|
|
201
|
+
const res = {};
|
|
202
|
+
res['fieldName'] = this.fieldName;
|
|
203
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username';
|
|
204
|
+
return res;
|
|
205
|
+
}
|
|
206
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Username']) {
|
|
207
|
+
if (typeof json != 'object')
|
|
208
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
209
|
+
const jCpy = Object.assign({}, json);
|
|
210
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username')
|
|
211
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username". The provided json doesn't represent a Username`);
|
|
212
|
+
const res = new Username({
|
|
213
|
+
fieldName: expectString(extractEntry(jCpy, 'fieldName', true, path), false, [...path, ".fieldName"]),
|
|
214
|
+
});
|
|
215
|
+
if (!ignoreUnknownKeys) {
|
|
216
|
+
const unused = Object.keys(jCpy);
|
|
217
|
+
if (unused.length > 0)
|
|
218
|
+
throw new Error(`Unexpected key(s) for json object Username at path ${path.join("")}: ${unused}`);
|
|
219
|
+
}
|
|
220
|
+
return res;
|
|
221
|
+
}
|
|
58
222
|
}
|
|
59
223
|
FieldSelector.Username = Username;
|
|
60
224
|
class Identifier {
|
|
@@ -63,7 +227,42 @@ export class ExternalJwtConfig {
|
|
|
63
227
|
this.identifierAssigner = partial.identifierAssigner;
|
|
64
228
|
this.fieldName = partial.fieldName;
|
|
65
229
|
}
|
|
230
|
+
toJSON() {
|
|
231
|
+
const res = {};
|
|
232
|
+
res['identifierAssigner'] = this.identifierAssigner;
|
|
233
|
+
res['fieldName'] = this.fieldName;
|
|
234
|
+
res['$ktClass'] = 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Identifier';
|
|
235
|
+
return res;
|
|
236
|
+
}
|
|
237
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Identifier']) {
|
|
238
|
+
if (typeof json != 'object')
|
|
239
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
240
|
+
const jCpy = Object.assign({}, json);
|
|
241
|
+
if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Identifier')
|
|
242
|
+
throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Identifier". The provided json doesn't represent a Identifier`);
|
|
243
|
+
const res = new Identifier({
|
|
244
|
+
identifierAssigner: expectString(extractEntry(jCpy, 'identifierAssigner', true, path), false, [...path, ".identifierAssigner"]),
|
|
245
|
+
fieldName: expectString(extractEntry(jCpy, 'fieldName', true, path), false, [...path, ".fieldName"]),
|
|
246
|
+
});
|
|
247
|
+
if (!ignoreUnknownKeys) {
|
|
248
|
+
const unused = Object.keys(jCpy);
|
|
249
|
+
if (unused.length > 0)
|
|
250
|
+
throw new Error(`Unexpected key(s) for json object Identifier at path ${path.join("")}: ${unused}`);
|
|
251
|
+
}
|
|
252
|
+
return res;
|
|
253
|
+
}
|
|
66
254
|
}
|
|
67
255
|
FieldSelector.Identifier = Identifier;
|
|
256
|
+
function fromJSON(json, ignoreUnknownKeys = false, path = ['FieldSelector']) {
|
|
257
|
+
switch (json.$ktClass) {
|
|
258
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId': return LocalId.fromJSON(json, ignoreUnknownKeys);
|
|
259
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email': return Email.fromJSON(json, ignoreUnknownKeys);
|
|
260
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone': return MobilePhone.fromJSON(json, ignoreUnknownKeys);
|
|
261
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username': return Username.fromJSON(json, ignoreUnknownKeys);
|
|
262
|
+
case 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Identifier': return Identifier.fromJSON(json, ignoreUnknownKeys);
|
|
263
|
+
default: throw new Error('Unexpected discriminator for FieldSelector: ' + json.$ktClass);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
FieldSelector.fromJSON = fromJSON;
|
|
68
267
|
})(FieldSelector = ExternalJwtConfig.FieldSelector || (ExternalJwtConfig.FieldSelector = {}));
|
|
69
268
|
})(ExternalJwtConfig || (ExternalJwtConfig = {}));
|
|
@@ -2,4 +2,6 @@ export declare class LoginIdentifier {
|
|
|
2
2
|
assigner: string;
|
|
3
3
|
value: string;
|
|
4
4
|
constructor(partial: Partial<LoginIdentifier> & Pick<LoginIdentifier, "assigner" | "value">);
|
|
5
|
+
toJSON(): object;
|
|
6
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): LoginIdentifier;
|
|
5
7
|
}
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class LoginIdentifier {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.assigner = partial.assigner;
|
|
5
6
|
this.value = partial.value;
|
|
6
7
|
}
|
|
8
|
+
toJSON() {
|
|
9
|
+
const res = {};
|
|
10
|
+
res['assigner'] = this.assigner;
|
|
11
|
+
res['value'] = this.value;
|
|
12
|
+
return res;
|
|
13
|
+
}
|
|
14
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['LoginIdentifier']) {
|
|
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 LoginIdentifier({
|
|
19
|
+
assigner: expectString(extractEntry(jCpy, 'assigner', true, path), false, [...path, ".assigner"]),
|
|
20
|
+
value: expectString(extractEntry(jCpy, 'value', true, path), false, [...path, ".value"]),
|
|
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 LoginIdentifier at path ${path.join("")}: ${unused}`);
|
|
26
|
+
}
|
|
27
|
+
return res;
|
|
28
|
+
}
|
|
7
29
|
}
|
|
@@ -6,4 +6,6 @@ export declare class OperationToken {
|
|
|
6
6
|
operation: Operation;
|
|
7
7
|
description: string | undefined;
|
|
8
8
|
constructor(partial: Partial<OperationToken> & Pick<OperationToken, "tokenHash" | "creationTime" | "validity" | "operation">);
|
|
9
|
+
toJSON(): object;
|
|
10
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): OperationToken;
|
|
9
11
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectNumber, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { Operation } from './Operation.mjs';
|
|
1
4
|
export class OperationToken {
|
|
2
5
|
constructor(partial) {
|
|
3
6
|
this.description = undefined;
|
|
@@ -8,4 +11,32 @@ export class OperationToken {
|
|
|
8
11
|
if ('description' in partial)
|
|
9
12
|
this.description = partial.description;
|
|
10
13
|
}
|
|
14
|
+
toJSON() {
|
|
15
|
+
const res = {};
|
|
16
|
+
res['tokenHash'] = this.tokenHash;
|
|
17
|
+
res['creationTime'] = this.creationTime;
|
|
18
|
+
res['validity'] = this.validity;
|
|
19
|
+
res['operation'] = this.operation;
|
|
20
|
+
if (this.description != undefined)
|
|
21
|
+
res['description'] = this.description;
|
|
22
|
+
return res;
|
|
23
|
+
}
|
|
24
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['OperationToken']) {
|
|
25
|
+
if (typeof json != 'object')
|
|
26
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
27
|
+
const jCpy = Object.assign({}, json);
|
|
28
|
+
const res = new OperationToken({
|
|
29
|
+
tokenHash: expectString(extractEntry(jCpy, 'tokenHash', true, path), false, [...path, ".tokenHash"]),
|
|
30
|
+
creationTime: expectNumber(extractEntry(jCpy, 'creationTime', true, path), false, true, [...path, ".creationTime"]),
|
|
31
|
+
validity: expectNumber(extractEntry(jCpy, 'validity', true, path), false, true, [...path, ".validity"]),
|
|
32
|
+
operation: expectStringEnum(extractEntry(jCpy, 'operation', true, path), false, [...path, ".operation"], Operation, 'Operation'),
|
|
33
|
+
description: expectString(extractEntry(jCpy, 'description', false, path), true, [...path, ".description"]),
|
|
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 OperationToken at path ${path.join("")}: ${unused}`);
|
|
39
|
+
}
|
|
40
|
+
return res;
|
|
41
|
+
}
|
|
11
42
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectArray, expectObject, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { PermissionItem } from './PermissionItem.mjs';
|
|
1
4
|
export class Permission {
|
|
2
5
|
constructor(partial) {
|
|
3
6
|
this.grants = [];
|
|
@@ -7,4 +10,25 @@ export class Permission {
|
|
|
7
10
|
if ('revokes' in partial && partial.revokes !== undefined)
|
|
8
11
|
this.revokes = partial.revokes;
|
|
9
12
|
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
const res = {};
|
|
15
|
+
res['grants'] = this.grants.map((x0) => x0.toJSON());
|
|
16
|
+
res['revokes'] = this.revokes.map((x0) => x0.toJSON());
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['Permission']) {
|
|
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 Permission({
|
|
24
|
+
grants: expectArray(extractEntry(jCpy, 'grants', false, path), false, [...path, ".grants"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, PermissionItem.fromJSON)),
|
|
25
|
+
revokes: expectArray(extractEntry(jCpy, 'revokes', false, path), false, [...path, ".revokes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, PermissionItem.fromJSON)),
|
|
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 Permission at path ${path.join("")}: ${unused}`);
|
|
31
|
+
}
|
|
32
|
+
return res;
|
|
33
|
+
}
|
|
10
34
|
}
|
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { AlwaysPermissionItem } from './AlwaysPermissionItem.mjs';
|
|
3
|
+
export var PermissionItem;
|
|
4
|
+
(function (PermissionItem) {
|
|
5
|
+
function fromJSON(json, ignoreUnknownKeys = false, path = ['PermissionItem']) {
|
|
6
|
+
switch (json.$ktClass) {
|
|
7
|
+
case 'com.icure.cardinal.sdk.model.security.AlwaysPermissionItem': return AlwaysPermissionItem.fromJSON(json, ignoreUnknownKeys);
|
|
8
|
+
default: throw new Error('Unexpected discriminator for PermissionItem: ' + json.$ktClass);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
PermissionItem.fromJSON = fromJSON;
|
|
12
|
+
})(PermissionItem || (PermissionItem = {}));
|
|
@@ -3,4 +3,6 @@ export declare class TokenWithGroup {
|
|
|
3
3
|
groupId: string;
|
|
4
4
|
groupName: string | undefined;
|
|
5
5
|
constructor(partial: Partial<TokenWithGroup> & Pick<TokenWithGroup, "token" | "groupId">);
|
|
6
|
+
toJSON(): object;
|
|
7
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): TokenWithGroup;
|
|
6
8
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
+
import { expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
3
|
export class TokenWithGroup {
|
|
3
4
|
constructor(partial) {
|
|
4
5
|
this.groupName = undefined;
|
|
@@ -7,4 +8,28 @@ export class TokenWithGroup {
|
|
|
7
8
|
if ('groupName' in partial)
|
|
8
9
|
this.groupName = partial.groupName;
|
|
9
10
|
}
|
|
11
|
+
toJSON() {
|
|
12
|
+
const res = {};
|
|
13
|
+
res['token'] = this.token;
|
|
14
|
+
res['groupId'] = this.groupId;
|
|
15
|
+
if (this.groupName != undefined)
|
|
16
|
+
res['groupName'] = this.groupName;
|
|
17
|
+
return res;
|
|
18
|
+
}
|
|
19
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['TokenWithGroup']) {
|
|
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 TokenWithGroup({
|
|
24
|
+
token: expectString(extractEntry(jCpy, 'token', true, path), false, [...path, ".token"]),
|
|
25
|
+
groupId: expectString(extractEntry(jCpy, 'groupId', true, path), false, [...path, ".groupId"]),
|
|
26
|
+
groupName: expectString(extractEntry(jCpy, 'groupName', false, path), true, [...path, ".groupName"]),
|
|
27
|
+
});
|
|
28
|
+
if (!ignoreUnknownKeys) {
|
|
29
|
+
const unused = Object.keys(jCpy);
|
|
30
|
+
if (unused.length > 0)
|
|
31
|
+
throw new Error(`Unexpected key(s) for json object TokenWithGroup at path ${path.join("")}: ${unused}`);
|
|
32
|
+
}
|
|
33
|
+
return res;
|
|
34
|
+
}
|
|
10
35
|
}
|
package/options/SdkOptions.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PartialXCryptoService } from "../crypto/CryptoService.mjs";
|
|
2
2
|
import { UserGroup } from "../model/UserGroup.mjs";
|
|
3
3
|
import { KeyStorageFacade } from "../storage/StorageFacade.mjs";
|
|
4
4
|
import { CryptoStrategies } from "../crypto/CryptoStrategies.mjs";
|
|
@@ -29,17 +29,7 @@ export interface SdkOptions {
|
|
|
29
29
|
/**
|
|
30
30
|
* Service for encryption primitives.
|
|
31
31
|
*/
|
|
32
|
-
readonly cryptoService?:
|
|
33
|
-
/**
|
|
34
|
-
* If true (default) the password of the user will be salted together with the application id before sending it to
|
|
35
|
-
* the iCure backend for login or when changing the user password.
|
|
36
|
-
* This is done in addition to the server-side salting of the password before storing them.
|
|
37
|
-
*
|
|
38
|
-
* By enabling this option iCure never gets access to the plain text password of users.
|
|
39
|
-
* Note that changing this value in a second moment requires also modifying the password of the user on the iCure
|
|
40
|
-
* databases to reflect the change.
|
|
41
|
-
*/
|
|
42
|
-
readonly saltPasswordWithApplicationId?: boolean;
|
|
32
|
+
readonly cryptoService?: PartialXCryptoService;
|
|
43
33
|
/**
|
|
44
34
|
* An instance of iCure SDK is initialized for working as a specific user in a single group.
|
|
45
35
|
* However, the user credentials may match multiple users in different groups (but at most one per group).
|
|
@@ -92,17 +82,7 @@ export interface BasicSdkOptions {
|
|
|
92
82
|
/**
|
|
93
83
|
* Service for encryption primitives.
|
|
94
84
|
*/
|
|
95
|
-
readonly cryptoService?:
|
|
96
|
-
/**
|
|
97
|
-
* If true (default) the password of the user will be salted together with the application id before sending it to
|
|
98
|
-
* the iCure backend for login or when changing the user password.
|
|
99
|
-
* This is done in addition to the server-side salting of the password before storing them.
|
|
100
|
-
*
|
|
101
|
-
* By enabling this option iCure never gets access to the plain text password of users.
|
|
102
|
-
* Note that changing this value in a second moment requires also modifying the password of the user on the iCure
|
|
103
|
-
* databases to reflect the change.
|
|
104
|
-
*/
|
|
105
|
-
readonly saltPasswordWithApplicationId?: boolean;
|
|
85
|
+
readonly cryptoService?: PartialXCryptoService;
|
|
106
86
|
/**
|
|
107
87
|
* An instance of iCure SDK is initialized for working as a specific user in a single group.
|
|
108
88
|
* However, the user credentials may match multiple users in different groups (but at most one per group).
|
package/package.json
CHANGED
package/utils/Id.d.mts
CHANGED
package/utils/Id.mjs
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
let
|
|
1
|
+
let doRandomUuid;
|
|
2
2
|
export function randomUuid() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
var _a, _b, _c;
|
|
4
|
+
if (doRandomUuid == undefined) {
|
|
5
|
+
if (typeof crypto !== 'undefined' && crypto.randomUUID != undefined) {
|
|
6
|
+
doRandomUuid = () => { return crypto.randomUUID(); };
|
|
6
7
|
}
|
|
7
|
-
else if (typeof window !== 'undefined' && window.crypto
|
|
8
|
-
|
|
8
|
+
else if (typeof window !== 'undefined' && ((_a = window.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) != undefined) {
|
|
9
|
+
doRandomUuid = () => { return window.crypto.randomUUID(); };
|
|
9
10
|
}
|
|
10
|
-
else if (typeof self !== 'undefined' && self.crypto
|
|
11
|
-
|
|
11
|
+
else if (typeof self !== 'undefined' && ((_b = self.crypto) === null || _b === void 0 ? void 0 : _b.randomUUID) != undefined) {
|
|
12
|
+
doRandomUuid = () => { return self.crypto.randomUUID(); };
|
|
13
|
+
}
|
|
14
|
+
else if (typeof globalThis !== 'undefined' && ((_c = globalThis.cardinalInternalGlobals) === null || _c === void 0 ? void 0 : _c.randomUuid) != undefined) {
|
|
15
|
+
doRandomUuid = () => { return globalThis.cardinalInternalGlobals.randomUuid(); };
|
|
12
16
|
}
|
|
13
17
|
else
|
|
14
|
-
throw new Error("Can't generate uuid as crypto is not available
|
|
18
|
+
throw new Error("Can't generate uuid as js crypto is not available.\n"
|
|
19
|
+
+ "This error may happen if you're creating an instance of a CardinalSdk model class on js environments that are not supported out-of-the-box, such as node<19, or react-native\n"
|
|
20
|
+
+ "Potential solutions:\n" +
|
|
21
|
+
+"- Initialize an instance of CardinalSdk with a `cryptoService` option appropriate for the environment (see @icure/nitro-kryptom for react native); this will add a polyfill this method can use, or\n"
|
|
22
|
+
+ "- If you're creating an instance of a CardinalSdk model class specify its `id` property explicitly, or\n"
|
|
23
|
+
+ "- Add a polyfill for crypto.randomUuid");
|
|
15
24
|
}
|
|
16
|
-
return
|
|
25
|
+
return doRandomUuid();
|
|
17
26
|
}
|