@icure/cardinal-sdk 3.0.0-PREVIEW-2 → 3.0.0-PREVIEW-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
- package/api/ApplicationSettingsApi.d.mts +6 -0
- package/api/ApplicationSettingsApi.mjs +1 -0
- package/api/CryptoApi.d.mts +23 -0
- package/api/DataOwnerApi.d.mts +107 -0
- package/api/DocumentTemplateApi.d.mts +22 -0
- package/api/DocumentTemplateApi.mjs +1 -0
- package/api/EntityReferenceApi.d.mts +5 -0
- package/api/EntityReferenceApi.mjs +1 -0
- package/api/EntityTemplateApi.d.mts +24 -0
- package/api/EntityTemplateApi.mjs +1 -0
- package/api/HealthcarePartyApi.d.mts +10 -0
- package/api/KeywordApi.d.mts +14 -0
- package/api/KeywordApi.mjs +1 -0
- package/api/MedicalLocationApi.d.mts +17 -0
- package/api/MedicalLocationApi.mjs +1 -0
- package/api/TarificationApi.d.mts +27 -0
- package/api/TarificationApi.mjs +1 -0
- package/api/TimeTableApi.d.mts +26 -0
- package/api/TimeTableApi.mjs +1 -0
- package/cardinal-sdk-ts.mjs +43382 -42838
- package/cardinal-sdk.mjs +111008 -107369
- package/crypto/CryptoStrategies.d.mts +44 -8
- package/crypto/CryptoStrategies.mjs +41 -7
- package/crypto/entities/BulkShareByIdsResult.d.mts +31 -17
- package/crypto/entities/BulkShareByIdsResult.mjs +5 -5
- package/crypto/entities/FailedRequestDetails.d.mts +13 -9
- package/crypto/entities/FailedRequestDetails.mjs +10 -7
- package/crypto/entities/SecretIdShareOptions.d.mts +4 -0
- package/crypto/entities/SecretIdShareOptions.mjs +4 -0
- package/crypto/entities/SecretIdUseOption.d.mts +5 -0
- package/crypto/entities/ShareAllPatientDataOptions.d.mts +49 -0
- package/crypto/entities/ShareAllPatientDataOptions.mjs +58 -0
- package/crypto/entities/ShareRequestPurpose.d.mts +12 -0
- package/crypto/entities/ShareRequestPurpose.mjs +14 -0
- package/crypto/entities/ShareRequestSummary.d.mts +51 -0
- package/crypto/entities/ShareRequestSummary.mjs +21 -0
- package/crypto/entities/SharedSecretIdsSource.d.mts +8 -0
- package/crypto/entities/SharedSecretIdsSource.mjs +10 -0
- package/crypto/entities/SuccessfulRequestDetails.d.mts +22 -0
- package/crypto/entities/SuccessfulRequestDetails.mjs +11 -0
- package/crypto.d.mts +4 -1
- package/crypto.mjs +4 -1
- package/filters/ClassificationFilters.d.mts +27 -0
- package/filters/ClassificationFilters.mjs +8 -0
- package/filters/MedicalLocationFilters.d.mts +8 -0
- package/filters/MedicalLocationFilters.mjs +6 -0
- package/filters/TimeTableFilters.d.mts +12 -0
- package/filters/TimeTableFilters.mjs +6 -0
- package/kotlin-kotlin-stdlib.mjs +33 -16
- package/kotlinx-coroutines-core.mjs +8 -8
- package/model/ApplicationSettings.d.mts +87 -0
- package/model/ApplicationSettings.mjs +256 -0
- package/model/DocumentTemplate.d.mts +35 -0
- package/model/DocumentTemplate.mjs +162 -0
- package/model/EntityReference.d.mts +10 -0
- package/model/EntityReference.mjs +46 -0
- package/model/EntityTemplate.d.mts +16 -0
- package/model/EntityTemplate.mjs +81 -0
- package/model/GroupScoped.d.mts +18 -0
- package/model/Keyword.d.mts +23 -0
- package/model/Keyword.mjs +99 -0
- package/model/ListOfIds.d.mts +6 -0
- package/model/ListOfIds.mjs +28 -0
- package/model/MedicalLocation.d.mts +28 -0
- package/model/MedicalLocation.mjs +116 -0
- package/model/PaginatedDocumentKeyIdPair.d.mts +0 -1
- package/model/PaginatedDocumentKeyIdPair.mjs +0 -1
- package/model/Tarification.d.mts +50 -0
- package/model/Tarification.mjs +178 -0
- package/model/TimeTable.d.mts +25 -0
- package/model/TimeTable.mjs +111 -0
- package/model/base/AppendixType.d.mts +5 -0
- package/model/base/AppendixType.mjs +7 -0
- package/model/base/CodeFlag.d.mts +80 -0
- package/model/base/CodeFlag.mjs +82 -0
- package/model/base/ReportVersion.d.mts +3 -0
- package/model/base/ReportVersion.mjs +5 -0
- package/model/embed/HealthElementAsserter.d.mts +30 -1
- package/model/embed/HealthElementAsserter.mjs +41 -1
- package/model/embed/KeywordSubword.d.mts +8 -0
- package/model/embed/KeywordSubword.mjs +35 -0
- package/model/embed/LetterValue.d.mts +9 -0
- package/model/embed/LetterValue.mjs +47 -0
- package/model/embed/Periodicity.d.mts +8 -0
- package/model/embed/Periodicity.mjs +36 -0
- package/model/embed/TimeTableHour.d.mts +7 -0
- package/model/embed/TimeTableHour.mjs +35 -0
- package/model/embed/TimeTableItem.d.mts +19 -0
- package/model/embed/TimeTableItem.mjs +96 -0
- package/model/embed/Valorisation.d.mts +56 -0
- package/model/embed/Valorisation.mjs +188 -0
- package/package.json +1 -1
- package/subscription/EntitySubscriptionEvent.d.mts +3 -0
package/crypto.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './crypto/CryptoStrategies.mjs';
|
|
|
2
2
|
export * from './crypto/CryptoService.mjs';
|
|
3
3
|
export * from './crypto/entities/TopicDelegateOptions.mjs';
|
|
4
4
|
export * from './crypto/entities/ContactShareOptions.mjs';
|
|
5
|
+
export * from './crypto/entities/ShareRequestPurpose.mjs';
|
|
5
6
|
export * from './crypto/entities/InvoiceDelegateOptions.mjs';
|
|
6
7
|
export * from './crypto/entities/HealthElementShareOptions.mjs';
|
|
7
8
|
export * from './crypto/entities/MessageDelegateOptions.mjs';
|
|
@@ -22,9 +23,9 @@ export * from './crypto/entities/RawDecryptedExchangeData.mjs';
|
|
|
22
23
|
export * from './crypto/entities/SecretIdUseOption.mjs';
|
|
23
24
|
export * from './crypto/entities/RecoveryDataUseFailureReason.mjs';
|
|
24
25
|
export * from './crypto/entities/ExchangeDataInjectionDetails.mjs';
|
|
26
|
+
export * from './crypto/entities/ShareRequestSummary.mjs';
|
|
25
27
|
export * from './crypto/entities/HealthElementDelegateOptions.mjs';
|
|
26
28
|
export * from './crypto/entities/CalendarItemDelegateOptions.mjs';
|
|
27
|
-
export * from './crypto/entities/DelegateShareOptions.mjs';
|
|
28
29
|
export * from './crypto/entities/InvoiceShareOptions.mjs';
|
|
29
30
|
export * from './crypto/entities/RecoveryKeySize.mjs';
|
|
30
31
|
export * from './crypto/entities/CalendarItemShareOptions.mjs';
|
|
@@ -33,9 +34,11 @@ export * from './crypto/entities/PatientDelegateOptions.mjs';
|
|
|
33
34
|
export * from './crypto/entities/FormDelegateOptions.mjs';
|
|
34
35
|
export * from './crypto/entities/SecretIdShareOptions.mjs';
|
|
35
36
|
export * from './crypto/entities/EntityAccessInformation.mjs';
|
|
37
|
+
export * from './crypto/entities/SharedSecretIdsSource.mjs';
|
|
36
38
|
export * from './crypto/entities/RecoveryResult.mjs';
|
|
37
39
|
export * from './crypto/entities/RecoveryKeyOptions.mjs';
|
|
38
40
|
export * from './crypto/entities/DocumentDelegateOptions.mjs';
|
|
41
|
+
export * from './crypto/entities/SuccessfulRequestDetails.mjs';
|
|
39
42
|
export * from './crypto/entities/RecoveryDataKey.mjs';
|
|
40
43
|
export * from './crypto/entities/BulkShareByIdsResult.mjs';
|
|
41
44
|
export * from './crypto/entities/MaintenanceTaskShareOptions.mjs';
|
package/crypto.mjs
CHANGED
|
@@ -2,6 +2,7 @@ export * from './crypto/CryptoStrategies.mjs';
|
|
|
2
2
|
export * from './crypto/CryptoService.mjs';
|
|
3
3
|
export * from './crypto/entities/TopicDelegateOptions.mjs';
|
|
4
4
|
export * from './crypto/entities/ContactShareOptions.mjs';
|
|
5
|
+
export * from './crypto/entities/ShareRequestPurpose.mjs';
|
|
5
6
|
export * from './crypto/entities/InvoiceDelegateOptions.mjs';
|
|
6
7
|
export * from './crypto/entities/HealthElementShareOptions.mjs';
|
|
7
8
|
export * from './crypto/entities/MessageDelegateOptions.mjs';
|
|
@@ -22,9 +23,9 @@ export * from './crypto/entities/RawDecryptedExchangeData.mjs';
|
|
|
22
23
|
export * from './crypto/entities/SecretIdUseOption.mjs';
|
|
23
24
|
export * from './crypto/entities/RecoveryDataUseFailureReason.mjs';
|
|
24
25
|
export * from './crypto/entities/ExchangeDataInjectionDetails.mjs';
|
|
26
|
+
export * from './crypto/entities/ShareRequestSummary.mjs';
|
|
25
27
|
export * from './crypto/entities/HealthElementDelegateOptions.mjs';
|
|
26
28
|
export * from './crypto/entities/CalendarItemDelegateOptions.mjs';
|
|
27
|
-
export * from './crypto/entities/DelegateShareOptions.mjs';
|
|
28
29
|
export * from './crypto/entities/InvoiceShareOptions.mjs';
|
|
29
30
|
export * from './crypto/entities/RecoveryKeySize.mjs';
|
|
30
31
|
export * from './crypto/entities/CalendarItemShareOptions.mjs';
|
|
@@ -33,9 +34,11 @@ export * from './crypto/entities/PatientDelegateOptions.mjs';
|
|
|
33
34
|
export * from './crypto/entities/FormDelegateOptions.mjs';
|
|
34
35
|
export * from './crypto/entities/SecretIdShareOptions.mjs';
|
|
35
36
|
export * from './crypto/entities/EntityAccessInformation.mjs';
|
|
37
|
+
export * from './crypto/entities/SharedSecretIdsSource.mjs';
|
|
36
38
|
export * from './crypto/entities/RecoveryResult.mjs';
|
|
37
39
|
export * from './crypto/entities/RecoveryKeyOptions.mjs';
|
|
38
40
|
export * from './crypto/entities/DocumentDelegateOptions.mjs';
|
|
41
|
+
export * from './crypto/entities/SuccessfulRequestDetails.mjs';
|
|
39
42
|
export * from './crypto/entities/RecoveryDataKey.mjs';
|
|
40
43
|
export * from './crypto/entities/BulkShareByIdsResult.mjs';
|
|
41
44
|
export * from './crypto/entities/MaintenanceTaskShareOptions.mjs';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseSortableFilterOptions, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
|
|
2
|
+
import { Classification } from '../model/Classification.mjs';
|
|
3
|
+
import { Patient } from '../model/Patient.mjs';
|
|
4
|
+
interface ClassificationFiltersFactory {
|
|
5
|
+
byPatientsCreatedForDataOwner(dataOwnerId: string, patients: Array<Patient>, options?: {
|
|
6
|
+
from?: number | undefined;
|
|
7
|
+
to?: number | undefined;
|
|
8
|
+
descending?: boolean;
|
|
9
|
+
}): SortableFilterOptions<Classification>;
|
|
10
|
+
byPatientsCreatedForSelf(patients: Array<Patient>, options?: {
|
|
11
|
+
from?: number | undefined;
|
|
12
|
+
to?: number | undefined;
|
|
13
|
+
descending?: boolean;
|
|
14
|
+
}): SortableFilterOptions<Classification>;
|
|
15
|
+
byPatientSecretIdsCreatedForDataOwner(dataOwnerId: string, secretIds: Array<string>, options?: {
|
|
16
|
+
from?: number | undefined;
|
|
17
|
+
to?: number | undefined;
|
|
18
|
+
descending?: boolean;
|
|
19
|
+
}): BaseSortableFilterOptions<Classification>;
|
|
20
|
+
byPatientSecretIdsCreatedForSelf(secretIds: Array<string>, options?: {
|
|
21
|
+
from?: number | undefined;
|
|
22
|
+
to?: number | undefined;
|
|
23
|
+
descending?: boolean;
|
|
24
|
+
}): SortableFilterOptions<Classification>;
|
|
25
|
+
}
|
|
26
|
+
export declare const ClassificationFilters: ClassificationFiltersFactory;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { InternalClassificationFiltersObj } from '../cardinal-sdk-ts.mjs';
|
|
3
|
+
export const ClassificationFilters = {
|
|
4
|
+
byPatientsCreatedForDataOwner: (dataOwnerId, patients, options) => InternalClassificationFiltersObj.getInstance().byPatientsCreatedForDataOwner(dataOwnerId, patients, options),
|
|
5
|
+
byPatientsCreatedForSelf: (patients, options) => InternalClassificationFiltersObj.getInstance().byPatientsCreatedForSelf(patients, options),
|
|
6
|
+
byPatientSecretIdsCreatedForDataOwner: (dataOwnerId, secretIds, options) => InternalClassificationFiltersObj.getInstance().byPatientSecretIdsCreatedForDataOwner(dataOwnerId, secretIds, options),
|
|
7
|
+
byPatientSecretIdsCreatedForSelf: (secretIds, options) => InternalClassificationFiltersObj.getInstance().byPatientSecretIdsCreatedForSelf(secretIds, options)
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseFilterOptions } from '../cardinal-sdk-ts.mjs';
|
|
2
|
+
import { MedicalLocation } from '../model/MedicalLocation.mjs';
|
|
3
|
+
interface MedicalLocationFiltersFactory {
|
|
4
|
+
all(): BaseFilterOptions<MedicalLocation>;
|
|
5
|
+
byPostCode(postCode: string): BaseFilterOptions<MedicalLocation>;
|
|
6
|
+
}
|
|
7
|
+
export declare const MedicalLocationFilters: MedicalLocationFiltersFactory;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { InternalMedicalLocationFiltersObj } from '../cardinal-sdk-ts.mjs';
|
|
3
|
+
export const MedicalLocationFilters = {
|
|
4
|
+
all: () => InternalMedicalLocationFiltersObj.getInstance().all(),
|
|
5
|
+
byPostCode: (postCode) => InternalMedicalLocationFiltersObj.getInstance().byPostCode(postCode)
|
|
6
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseFilterOptions, BaseSortableFilterOptions } from '../cardinal-sdk-ts.mjs';
|
|
2
|
+
import { TimeTable } from '../model/TimeTable.mjs';
|
|
3
|
+
interface TimeTableFiltersFactory {
|
|
4
|
+
byAgendaId(agendaId: string): BaseFilterOptions<TimeTable>;
|
|
5
|
+
byPeriodAndAgendaId(agendaId: string, options?: {
|
|
6
|
+
from?: number | undefined;
|
|
7
|
+
to?: number | undefined;
|
|
8
|
+
descending?: boolean;
|
|
9
|
+
}): BaseSortableFilterOptions<TimeTable>;
|
|
10
|
+
}
|
|
11
|
+
export declare const TimeTableFilters: TimeTableFiltersFactory;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { InternalTimeTableFiltersObj } from '../cardinal-sdk-ts.mjs';
|
|
3
|
+
export const TimeTableFilters = {
|
|
4
|
+
byAgendaId: (agendaId) => InternalTimeTableFiltersObj.getInstance().byAgendaId(agendaId),
|
|
5
|
+
byPeriodAndAgendaId: (agendaId, options) => InternalTimeTableFiltersObj.getInstance().byPeriodAndAgendaId(agendaId, options)
|
|
6
|
+
};
|
package/kotlin-kotlin-stdlib.mjs
CHANGED
|
@@ -48,6 +48,12 @@ if (typeof Math.clz32 === 'undefined') {
|
|
|
48
48
|
};
|
|
49
49
|
}(Math.log, Math.LN2);
|
|
50
50
|
}
|
|
51
|
+
if (typeof String.prototype.startsWith === 'undefined') {
|
|
52
|
+
Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
|
|
53
|
+
position = position || 0;
|
|
54
|
+
return this.lastIndexOf(searchString, position) === position;
|
|
55
|
+
}});
|
|
56
|
+
}
|
|
51
57
|
if (typeof String.prototype.endsWith === 'undefined') {
|
|
52
58
|
Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
|
|
53
59
|
var subjectString = this.toString();
|
|
@@ -59,12 +65,6 @@ if (typeof String.prototype.endsWith === 'undefined') {
|
|
|
59
65
|
return lastIndex !== -1 && lastIndex === position;
|
|
60
66
|
}});
|
|
61
67
|
}
|
|
62
|
-
if (typeof String.prototype.startsWith === 'undefined') {
|
|
63
|
-
Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
|
|
64
|
-
position = position || 0;
|
|
65
|
-
return this.lastIndexOf(searchString, position) === position;
|
|
66
|
-
}});
|
|
67
|
-
}
|
|
68
68
|
//endregion
|
|
69
69
|
//region block: imports
|
|
70
70
|
var imul_0 = Math.imul;
|
|
@@ -93,8 +93,8 @@ initMetadataForInterface(Entry, 'Entry');
|
|
|
93
93
|
initMetadataForInterface(KtMap, 'Map');
|
|
94
94
|
initMetadataForInterface(KtSet, 'Set', VOID, VOID, [Collection]);
|
|
95
95
|
initMetadataForInterface(MutableIterable, 'MutableIterable');
|
|
96
|
-
initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet,
|
|
97
|
-
initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList,
|
|
96
|
+
initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, Collection, MutableIterable]);
|
|
97
|
+
initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, Collection, MutableIterable]);
|
|
98
98
|
initMetadataForInterface(KtMutableMap, 'MutableMap', VOID, VOID, [KtMap]);
|
|
99
99
|
initMetadataForCompanion(Companion_0);
|
|
100
100
|
initMetadataForClass(Enum, 'Enum', VOID, VOID, [Comparable]);
|
|
@@ -115,7 +115,7 @@ initMetadataForInterface(AutoCloseable, 'AutoCloseable');
|
|
|
115
115
|
initMetadataForInterface(Comparator, 'Comparator');
|
|
116
116
|
initMetadataForObject(Unit, 'Unit');
|
|
117
117
|
initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]);
|
|
118
|
-
initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [
|
|
118
|
+
initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [Collection, MutableIterable]);
|
|
119
119
|
initMetadataForClass(IteratorImpl, 'IteratorImpl');
|
|
120
120
|
initMetadataForClass(ListIteratorImpl, 'ListIteratorImpl', VOID, IteratorImpl);
|
|
121
121
|
initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [KtMutableList]);
|
|
@@ -128,7 +128,7 @@ initMetadataForCompanion(Companion_2);
|
|
|
128
128
|
initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [KtMutableList, RandomAccess]);
|
|
129
129
|
initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [KtMutableMap]);
|
|
130
130
|
initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtMutableSet]);
|
|
131
|
-
initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [
|
|
131
|
+
initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [Collection, MutableIterable]);
|
|
132
132
|
initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtMutableSet]);
|
|
133
133
|
initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase);
|
|
134
134
|
initMetadataForClass(HashMapKeysDefault$iterator$1);
|
|
@@ -1325,6 +1325,22 @@ function contains_4(_this__u8e3s4, element) {
|
|
|
1325
1325
|
return _this__u8e3s4.q1(element);
|
|
1326
1326
|
return indexOf_4(_this__u8e3s4, element) >= 0;
|
|
1327
1327
|
}
|
|
1328
|
+
function minus(_this__u8e3s4, elements) {
|
|
1329
|
+
var other = convertToListIfNotCollection(elements);
|
|
1330
|
+
if (other.r())
|
|
1331
|
+
return toList_1(_this__u8e3s4);
|
|
1332
|
+
// Inline function 'kotlin.collections.filterNot' call
|
|
1333
|
+
// Inline function 'kotlin.collections.filterNotTo' call
|
|
1334
|
+
var destination = ArrayList_init_$Create$();
|
|
1335
|
+
var _iterator__ex2g4s = _this__u8e3s4.t();
|
|
1336
|
+
while (_iterator__ex2g4s.u()) {
|
|
1337
|
+
var element = _iterator__ex2g4s.v();
|
|
1338
|
+
if (!other.q1(element)) {
|
|
1339
|
+
destination.j1(element);
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
return destination;
|
|
1343
|
+
}
|
|
1328
1344
|
function intersect(_this__u8e3s4, other) {
|
|
1329
1345
|
var otherCollection = convertToListIfNotCollection(other);
|
|
1330
1346
|
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
@@ -1620,7 +1636,7 @@ function plus_5(_this__u8e3s4, elements) {
|
|
|
1620
1636
|
addAll(result, elements);
|
|
1621
1637
|
return result;
|
|
1622
1638
|
}
|
|
1623
|
-
function
|
|
1639
|
+
function minus_0(_this__u8e3s4, element) {
|
|
1624
1640
|
var result = LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.m1()));
|
|
1625
1641
|
var removed = false;
|
|
1626
1642
|
// Inline function 'kotlin.collections.filterTo' call
|
|
@@ -1640,7 +1656,7 @@ function minus(_this__u8e3s4, element) {
|
|
|
1640
1656
|
}
|
|
1641
1657
|
return result;
|
|
1642
1658
|
}
|
|
1643
|
-
function
|
|
1659
|
+
function minus_1(_this__u8e3s4, elements) {
|
|
1644
1660
|
var other = convertToListIfNotCollection(elements);
|
|
1645
1661
|
if (other.r())
|
|
1646
1662
|
return toSet_0(_this__u8e3s4);
|
|
@@ -9823,7 +9839,7 @@ function plus_10(_this__u8e3s4, pair) {
|
|
|
9823
9839
|
function toMutableMap(_this__u8e3s4) {
|
|
9824
9840
|
return LinkedHashMap_init_$Create$_1(_this__u8e3s4);
|
|
9825
9841
|
}
|
|
9826
|
-
function
|
|
9842
|
+
function minus_2(_this__u8e3s4, key) {
|
|
9827
9843
|
// Inline function 'kotlin.apply' call
|
|
9828
9844
|
var this_0 = toMutableMap(_this__u8e3s4);
|
|
9829
9845
|
// Inline function 'kotlin.collections.minusAssign' call
|
|
@@ -17470,9 +17486,10 @@ export {
|
|
|
17470
17486
|
mapCapacity as mapCapacity1h45rc3eh9p2l,
|
|
17471
17487
|
mapOf as mapOf2zpbbmyqk8xpf,
|
|
17472
17488
|
mapOf_0 as mapOf1xd03cq9cnmy8,
|
|
17473
|
-
|
|
17474
|
-
|
|
17475
|
-
minus as
|
|
17489
|
+
minus_2 as minus1f3bieyodk5vw,
|
|
17490
|
+
minus_1 as minus165a8u1e0x1lu,
|
|
17491
|
+
minus as minus2znw4oicpx34e,
|
|
17492
|
+
minus_0 as minus27abgkurcn6u0,
|
|
17476
17493
|
mutableListOf as mutableListOf6oorvk2mtdmp,
|
|
17477
17494
|
mutableSetOf as mutableSetOf3lxrr4fe5z3v8,
|
|
17478
17495
|
plus_9 as plus2m1vv33moko5t,
|
|
@@ -235,11 +235,6 @@ initMetadataForClass(BufferedChannelIterator, 'BufferedChannelIterator', VOID, V
|
|
|
235
235
|
initMetadataForCoroutine($sendCOROUTINE$, CoroutineImpl);
|
|
236
236
|
initMetadataForCoroutine($receiveCOROUTINE$, CoroutineImpl);
|
|
237
237
|
initMetadataForCoroutine($receiveCatchingCOROUTINE$, CoroutineImpl);
|
|
238
|
-
function close$default(cause, $super) {
|
|
239
|
-
cause = cause === VOID ? null : cause;
|
|
240
|
-
return $super === VOID ? this.e1e(cause) : $super.e1e.call(this, cause);
|
|
241
|
-
}
|
|
242
|
-
initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
|
|
243
238
|
function cancel$default_0(cause, $super) {
|
|
244
239
|
cause = cause === VOID ? null : cause;
|
|
245
240
|
var tmp;
|
|
@@ -252,7 +247,12 @@ function cancel$default_0(cause, $super) {
|
|
|
252
247
|
return tmp;
|
|
253
248
|
}
|
|
254
249
|
initMetadataForInterface(ReceiveChannel, 'ReceiveChannel', VOID, VOID, VOID, [0]);
|
|
255
|
-
|
|
250
|
+
function close$default(cause, $super) {
|
|
251
|
+
cause = cause === VOID ? null : cause;
|
|
252
|
+
return $super === VOID ? this.e1e(cause) : $super.e1e.call(this, cause);
|
|
253
|
+
}
|
|
254
|
+
initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
|
|
255
|
+
initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [ReceiveChannel, SendChannel], [1, 4, 0, 3]);
|
|
256
256
|
initMetadataForClass(WaiterEB, 'WaiterEB');
|
|
257
257
|
initMetadataForClass(ReceiveCatching, 'ReceiveCatching', VOID, VOID, [Waiter]);
|
|
258
258
|
initMetadataForObject(Factory, 'Factory');
|
|
@@ -262,7 +262,7 @@ initMetadataForCompanion(Companion);
|
|
|
262
262
|
initMetadataForClass(ChannelResult, 'ChannelResult');
|
|
263
263
|
initMetadataForClass(ClosedReceiveChannelException, 'ClosedReceiveChannelException', VOID, NoSuchElementException);
|
|
264
264
|
initMetadataForClass(ClosedSendChannelException, 'ClosedSendChannelException', VOID, IllegalStateException);
|
|
265
|
-
initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [
|
|
265
|
+
initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [ReceiveChannel, SendChannel], [1, 0]);
|
|
266
266
|
initMetadataForClass(ConflatedBufferedChannel, 'ConflatedBufferedChannel', VOID, BufferedChannel, VOID, [1, 0]);
|
|
267
267
|
initMetadataForInterface(ProducerScope, 'ProducerScope', VOID, VOID, [CoroutineScope, SendChannel], [1]);
|
|
268
268
|
initMetadataForClass(ProducerCoroutine, 'ProducerCoroutine', VOID, ChannelCoroutine, [ProducerScope], [1, 0]);
|
|
@@ -294,7 +294,7 @@ initMetadataForClass(ContextScope, 'ContextScope', VOID, VOID, [CoroutineScope])
|
|
|
294
294
|
initMetadataForClass(Symbol, 'Symbol');
|
|
295
295
|
initMetadataForInterface(SelectInstance, 'SelectInstance');
|
|
296
296
|
initMetadataForClass(ClauseData, 'ClauseData', VOID, VOID, VOID, [1]);
|
|
297
|
-
initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler,
|
|
297
|
+
initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler, Waiter, SelectInstance], [0, 2]);
|
|
298
298
|
initMetadataForClass(TrySelectDetailedResult, 'TrySelectDetailedResult', VOID, Enum);
|
|
299
299
|
initMetadataForClass(CancellableContinuationWithOwner, 'CancellableContinuationWithOwner', VOID, VOID, [CancellableContinuation, Waiter]);
|
|
300
300
|
initMetadataForClass(SemaphoreAndMutexImpl, 'SemaphoreAndMutexImpl', VOID, VOID, VOID, [0]);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
2
|
+
import { HasEncryptionMetadata } from './base/HasEncryptionMetadata.mjs';
|
|
3
|
+
import { HasEndOfLife } from './base/HasEndOfLife.mjs';
|
|
4
|
+
import { ICureDocument } from './base/ICureDocument.mjs';
|
|
5
|
+
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
6
|
+
import { Delegation } from './embed/Delegation.mjs';
|
|
7
|
+
import { Encryptable } from './embed/Encryptable.mjs';
|
|
8
|
+
import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
|
|
9
|
+
import { Base64String } from './specializations/Base64String.mjs';
|
|
10
|
+
export interface ApplicationSettings extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasEndOfLife {
|
|
11
|
+
settings: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
encryptedSettings: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
readonly isEncrypted: boolean;
|
|
18
|
+
toJSON(): object;
|
|
19
|
+
}
|
|
20
|
+
export declare class DecryptedApplicationSettings {
|
|
21
|
+
id: string;
|
|
22
|
+
rev: string | undefined;
|
|
23
|
+
created: number | undefined;
|
|
24
|
+
modified: number | undefined;
|
|
25
|
+
author: string | undefined;
|
|
26
|
+
responsible: string | undefined;
|
|
27
|
+
tags: Array<CodeStub>;
|
|
28
|
+
codes: Array<CodeStub>;
|
|
29
|
+
endOfLife: number | undefined;
|
|
30
|
+
deletionDate: number | undefined;
|
|
31
|
+
settings: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
34
|
+
encryptedSettings: {
|
|
35
|
+
[key: string]: string;
|
|
36
|
+
};
|
|
37
|
+
secretForeignKeys: Array<string>;
|
|
38
|
+
cryptedForeignKeys: {
|
|
39
|
+
[key: string]: Array<Delegation>;
|
|
40
|
+
};
|
|
41
|
+
delegations: {
|
|
42
|
+
[key: string]: Array<Delegation>;
|
|
43
|
+
};
|
|
44
|
+
encryptionKeys: {
|
|
45
|
+
[key: string]: Array<Delegation>;
|
|
46
|
+
};
|
|
47
|
+
securityMetadata: SecurityMetadata | undefined;
|
|
48
|
+
encryptedSelf: Base64String | undefined;
|
|
49
|
+
readonly isEncrypted: false;
|
|
50
|
+
constructor(partial: Partial<DecryptedApplicationSettings>);
|
|
51
|
+
toJSON(): object;
|
|
52
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedApplicationSettings;
|
|
53
|
+
}
|
|
54
|
+
export declare class EncryptedApplicationSettings {
|
|
55
|
+
id: string;
|
|
56
|
+
rev: string | undefined;
|
|
57
|
+
created: number | undefined;
|
|
58
|
+
modified: number | undefined;
|
|
59
|
+
author: string | undefined;
|
|
60
|
+
responsible: string | undefined;
|
|
61
|
+
tags: Array<CodeStub>;
|
|
62
|
+
codes: Array<CodeStub>;
|
|
63
|
+
endOfLife: number | undefined;
|
|
64
|
+
deletionDate: number | undefined;
|
|
65
|
+
settings: {
|
|
66
|
+
[key: string]: string;
|
|
67
|
+
};
|
|
68
|
+
encryptedSettings: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
secretForeignKeys: Array<string>;
|
|
72
|
+
cryptedForeignKeys: {
|
|
73
|
+
[key: string]: Array<Delegation>;
|
|
74
|
+
};
|
|
75
|
+
delegations: {
|
|
76
|
+
[key: string]: Array<Delegation>;
|
|
77
|
+
};
|
|
78
|
+
encryptionKeys: {
|
|
79
|
+
[key: string]: Array<Delegation>;
|
|
80
|
+
};
|
|
81
|
+
securityMetadata: SecurityMetadata | undefined;
|
|
82
|
+
encryptedSelf: Base64String | undefined;
|
|
83
|
+
readonly isEncrypted: true;
|
|
84
|
+
constructor(partial: Partial<EncryptedApplicationSettings>);
|
|
85
|
+
toJSON(): object;
|
|
86
|
+
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedApplicationSettings;
|
|
87
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
import { expectArray, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
3
|
+
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
+
import { CodeStub } from './base/CodeStub.mjs';
|
|
5
|
+
import { Delegation } from './embed/Delegation.mjs';
|
|
6
|
+
import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
|
|
7
|
+
export class DecryptedApplicationSettings {
|
|
8
|
+
constructor(partial) {
|
|
9
|
+
var _a;
|
|
10
|
+
this.rev = undefined;
|
|
11
|
+
this.created = undefined;
|
|
12
|
+
this.modified = undefined;
|
|
13
|
+
this.author = undefined;
|
|
14
|
+
this.responsible = undefined;
|
|
15
|
+
this.tags = [];
|
|
16
|
+
this.codes = [];
|
|
17
|
+
this.endOfLife = undefined;
|
|
18
|
+
this.deletionDate = undefined;
|
|
19
|
+
this.settings = {};
|
|
20
|
+
this.encryptedSettings = {};
|
|
21
|
+
this.secretForeignKeys = [];
|
|
22
|
+
this.cryptedForeignKeys = {};
|
|
23
|
+
this.delegations = {};
|
|
24
|
+
this.encryptionKeys = {};
|
|
25
|
+
this.securityMetadata = undefined;
|
|
26
|
+
this.encryptedSelf = undefined;
|
|
27
|
+
this.isEncrypted = false;
|
|
28
|
+
if (partial.isEncrypted !== undefined && partial.isEncrypted !== false)
|
|
29
|
+
throw new Error('partial.isEncrypted must be undefined or false');
|
|
30
|
+
this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
|
|
31
|
+
if ('rev' in partial)
|
|
32
|
+
this.rev = partial.rev;
|
|
33
|
+
if ('created' in partial)
|
|
34
|
+
this.created = partial.created;
|
|
35
|
+
if ('modified' in partial)
|
|
36
|
+
this.modified = partial.modified;
|
|
37
|
+
if ('author' in partial)
|
|
38
|
+
this.author = partial.author;
|
|
39
|
+
if ('responsible' in partial)
|
|
40
|
+
this.responsible = partial.responsible;
|
|
41
|
+
if ('tags' in partial && partial.tags !== undefined)
|
|
42
|
+
this.tags = partial.tags;
|
|
43
|
+
if ('codes' in partial && partial.codes !== undefined)
|
|
44
|
+
this.codes = partial.codes;
|
|
45
|
+
if ('endOfLife' in partial)
|
|
46
|
+
this.endOfLife = partial.endOfLife;
|
|
47
|
+
if ('deletionDate' in partial)
|
|
48
|
+
this.deletionDate = partial.deletionDate;
|
|
49
|
+
if ('settings' in partial && partial.settings !== undefined)
|
|
50
|
+
this.settings = partial.settings;
|
|
51
|
+
if ('encryptedSettings' in partial && partial.encryptedSettings !== undefined)
|
|
52
|
+
this.encryptedSettings = partial.encryptedSettings;
|
|
53
|
+
if ('secretForeignKeys' in partial && partial.secretForeignKeys !== undefined)
|
|
54
|
+
this.secretForeignKeys = partial.secretForeignKeys;
|
|
55
|
+
if ('cryptedForeignKeys' in partial && partial.cryptedForeignKeys !== undefined)
|
|
56
|
+
this.cryptedForeignKeys = partial.cryptedForeignKeys;
|
|
57
|
+
if ('delegations' in partial && partial.delegations !== undefined)
|
|
58
|
+
this.delegations = partial.delegations;
|
|
59
|
+
if ('encryptionKeys' in partial && partial.encryptionKeys !== undefined)
|
|
60
|
+
this.encryptionKeys = partial.encryptionKeys;
|
|
61
|
+
if ('securityMetadata' in partial)
|
|
62
|
+
this.securityMetadata = partial.securityMetadata;
|
|
63
|
+
if ('encryptedSelf' in partial)
|
|
64
|
+
this.encryptedSelf = partial.encryptedSelf;
|
|
65
|
+
}
|
|
66
|
+
toJSON() {
|
|
67
|
+
const res = {};
|
|
68
|
+
res['id'] = this.id;
|
|
69
|
+
if (this.rev != undefined)
|
|
70
|
+
res['rev'] = this.rev;
|
|
71
|
+
if (this.created != undefined)
|
|
72
|
+
res['created'] = this.created;
|
|
73
|
+
if (this.modified != undefined)
|
|
74
|
+
res['modified'] = this.modified;
|
|
75
|
+
if (this.author != undefined)
|
|
76
|
+
res['author'] = this.author;
|
|
77
|
+
if (this.responsible != undefined)
|
|
78
|
+
res['responsible'] = this.responsible;
|
|
79
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
80
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
81
|
+
if (this.endOfLife != undefined)
|
|
82
|
+
res['endOfLife'] = this.endOfLife;
|
|
83
|
+
if (this.deletionDate != undefined)
|
|
84
|
+
res['deletionDate'] = this.deletionDate;
|
|
85
|
+
res['settings'] = Object.fromEntries(Object.entries(this.settings).map(([k0, v0]) => [k0, v0]));
|
|
86
|
+
res['encryptedSettings'] = Object.fromEntries(Object.entries(this.encryptedSettings).map(([k0, v0]) => [k0, v0]));
|
|
87
|
+
res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
|
|
88
|
+
res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
89
|
+
res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
90
|
+
res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
91
|
+
if (this.securityMetadata != undefined)
|
|
92
|
+
res['securityMetadata'] = this.securityMetadata.toJSON();
|
|
93
|
+
if (this.encryptedSelf != undefined)
|
|
94
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
95
|
+
res['isEncrypted'] = false;
|
|
96
|
+
return res;
|
|
97
|
+
}
|
|
98
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedApplicationSettings']) {
|
|
99
|
+
if (typeof json != 'object')
|
|
100
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
101
|
+
const jCpy = Object.assign({}, json);
|
|
102
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
|
|
103
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedApplicationSettings`);
|
|
104
|
+
const res = new DecryptedApplicationSettings({
|
|
105
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
106
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
107
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
108
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
109
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
110
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
111
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
112
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
113
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
114
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
115
|
+
settings: expectMap(extractEntry(jCpy, 'settings', false, path), false, [...path, ".settings"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
116
|
+
encryptedSettings: expectMap(extractEntry(jCpy, 'encryptedSettings', false, path), false, [...path, ".encryptedSettings"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
117
|
+
secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
|
|
118
|
+
cryptedForeignKeys: expectMap(extractEntry(jCpy, 'cryptedForeignKeys', false, path), false, [...path, ".cryptedForeignKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
119
|
+
delegations: expectMap(extractEntry(jCpy, 'delegations', false, path), false, [...path, ".delegations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
120
|
+
encryptionKeys: expectMap(extractEntry(jCpy, 'encryptionKeys', false, path), false, [...path, ".encryptionKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
121
|
+
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
122
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
123
|
+
});
|
|
124
|
+
if (!ignoreUnknownKeys) {
|
|
125
|
+
const unused = Object.keys(jCpy);
|
|
126
|
+
if (unused.length > 0)
|
|
127
|
+
throw new Error(`Unexpected key(s) for json object DecryptedApplicationSettings at path ${path.join("")}: ${unused}`);
|
|
128
|
+
}
|
|
129
|
+
return res;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
export class EncryptedApplicationSettings {
|
|
133
|
+
constructor(partial) {
|
|
134
|
+
var _a;
|
|
135
|
+
this.rev = undefined;
|
|
136
|
+
this.created = undefined;
|
|
137
|
+
this.modified = undefined;
|
|
138
|
+
this.author = undefined;
|
|
139
|
+
this.responsible = undefined;
|
|
140
|
+
this.tags = [];
|
|
141
|
+
this.codes = [];
|
|
142
|
+
this.endOfLife = undefined;
|
|
143
|
+
this.deletionDate = undefined;
|
|
144
|
+
this.settings = {};
|
|
145
|
+
this.encryptedSettings = {};
|
|
146
|
+
this.secretForeignKeys = [];
|
|
147
|
+
this.cryptedForeignKeys = {};
|
|
148
|
+
this.delegations = {};
|
|
149
|
+
this.encryptionKeys = {};
|
|
150
|
+
this.securityMetadata = undefined;
|
|
151
|
+
this.encryptedSelf = undefined;
|
|
152
|
+
this.isEncrypted = true;
|
|
153
|
+
if (partial.isEncrypted !== undefined && partial.isEncrypted !== true)
|
|
154
|
+
throw new Error('partial.isEncrypted must be undefined or true');
|
|
155
|
+
this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
|
|
156
|
+
if ('rev' in partial)
|
|
157
|
+
this.rev = partial.rev;
|
|
158
|
+
if ('created' in partial)
|
|
159
|
+
this.created = partial.created;
|
|
160
|
+
if ('modified' in partial)
|
|
161
|
+
this.modified = partial.modified;
|
|
162
|
+
if ('author' in partial)
|
|
163
|
+
this.author = partial.author;
|
|
164
|
+
if ('responsible' in partial)
|
|
165
|
+
this.responsible = partial.responsible;
|
|
166
|
+
if ('tags' in partial && partial.tags !== undefined)
|
|
167
|
+
this.tags = partial.tags;
|
|
168
|
+
if ('codes' in partial && partial.codes !== undefined)
|
|
169
|
+
this.codes = partial.codes;
|
|
170
|
+
if ('endOfLife' in partial)
|
|
171
|
+
this.endOfLife = partial.endOfLife;
|
|
172
|
+
if ('deletionDate' in partial)
|
|
173
|
+
this.deletionDate = partial.deletionDate;
|
|
174
|
+
if ('settings' in partial && partial.settings !== undefined)
|
|
175
|
+
this.settings = partial.settings;
|
|
176
|
+
if ('encryptedSettings' in partial && partial.encryptedSettings !== undefined)
|
|
177
|
+
this.encryptedSettings = partial.encryptedSettings;
|
|
178
|
+
if ('secretForeignKeys' in partial && partial.secretForeignKeys !== undefined)
|
|
179
|
+
this.secretForeignKeys = partial.secretForeignKeys;
|
|
180
|
+
if ('cryptedForeignKeys' in partial && partial.cryptedForeignKeys !== undefined)
|
|
181
|
+
this.cryptedForeignKeys = partial.cryptedForeignKeys;
|
|
182
|
+
if ('delegations' in partial && partial.delegations !== undefined)
|
|
183
|
+
this.delegations = partial.delegations;
|
|
184
|
+
if ('encryptionKeys' in partial && partial.encryptionKeys !== undefined)
|
|
185
|
+
this.encryptionKeys = partial.encryptionKeys;
|
|
186
|
+
if ('securityMetadata' in partial)
|
|
187
|
+
this.securityMetadata = partial.securityMetadata;
|
|
188
|
+
if ('encryptedSelf' in partial)
|
|
189
|
+
this.encryptedSelf = partial.encryptedSelf;
|
|
190
|
+
}
|
|
191
|
+
toJSON() {
|
|
192
|
+
const res = {};
|
|
193
|
+
res['id'] = this.id;
|
|
194
|
+
if (this.rev != undefined)
|
|
195
|
+
res['rev'] = this.rev;
|
|
196
|
+
if (this.created != undefined)
|
|
197
|
+
res['created'] = this.created;
|
|
198
|
+
if (this.modified != undefined)
|
|
199
|
+
res['modified'] = this.modified;
|
|
200
|
+
if (this.author != undefined)
|
|
201
|
+
res['author'] = this.author;
|
|
202
|
+
if (this.responsible != undefined)
|
|
203
|
+
res['responsible'] = this.responsible;
|
|
204
|
+
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
205
|
+
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
206
|
+
if (this.endOfLife != undefined)
|
|
207
|
+
res['endOfLife'] = this.endOfLife;
|
|
208
|
+
if (this.deletionDate != undefined)
|
|
209
|
+
res['deletionDate'] = this.deletionDate;
|
|
210
|
+
res['settings'] = Object.fromEntries(Object.entries(this.settings).map(([k0, v0]) => [k0, v0]));
|
|
211
|
+
res['encryptedSettings'] = Object.fromEntries(Object.entries(this.encryptedSettings).map(([k0, v0]) => [k0, v0]));
|
|
212
|
+
res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
|
|
213
|
+
res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
214
|
+
res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
215
|
+
res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
|
|
216
|
+
if (this.securityMetadata != undefined)
|
|
217
|
+
res['securityMetadata'] = this.securityMetadata.toJSON();
|
|
218
|
+
if (this.encryptedSelf != undefined)
|
|
219
|
+
res['encryptedSelf'] = this.encryptedSelf;
|
|
220
|
+
res['isEncrypted'] = true;
|
|
221
|
+
return res;
|
|
222
|
+
}
|
|
223
|
+
static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedApplicationSettings']) {
|
|
224
|
+
if (typeof json != 'object')
|
|
225
|
+
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
226
|
+
const jCpy = Object.assign({}, json);
|
|
227
|
+
if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
|
|
228
|
+
throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedApplicationSettings`);
|
|
229
|
+
const res = new EncryptedApplicationSettings({
|
|
230
|
+
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
231
|
+
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
232
|
+
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
233
|
+
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
234
|
+
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
235
|
+
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
236
|
+
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
237
|
+
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
238
|
+
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
239
|
+
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
240
|
+
settings: expectMap(extractEntry(jCpy, 'settings', false, path), false, [...path, ".settings"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
241
|
+
encryptedSettings: expectMap(extractEntry(jCpy, 'encryptedSettings', false, path), false, [...path, ".encryptedSettings"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
|
|
242
|
+
secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
|
|
243
|
+
cryptedForeignKeys: expectMap(extractEntry(jCpy, 'cryptedForeignKeys', false, path), false, [...path, ".cryptedForeignKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
244
|
+
delegations: expectMap(extractEntry(jCpy, 'delegations', false, path), false, [...path, ".delegations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
245
|
+
encryptionKeys: expectMap(extractEntry(jCpy, 'encryptionKeys', false, path), false, [...path, ".encryptionKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
|
|
246
|
+
securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
|
|
247
|
+
encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
|
|
248
|
+
});
|
|
249
|
+
if (!ignoreUnknownKeys) {
|
|
250
|
+
const unused = Object.keys(jCpy);
|
|
251
|
+
if (unused.length > 0)
|
|
252
|
+
throw new Error(`Unexpected key(s) for json object EncryptedApplicationSettings at path ${path.join("")}: ${unused}`);
|
|
253
|
+
}
|
|
254
|
+
return res;
|
|
255
|
+
}
|
|
256
|
+
}
|