@icure/cardinal-sdk 3.0.0-PREVIEW-4 → 3.0.0-PREVIEW-5
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/cardinal-sdk.mjs +46 -48
- package/kotlin-kotlin-stdlib.mjs +4 -4
- package/kotlinx-coroutines-core.mjs +8 -8
- package/package.json +1 -1
- package/api/ApplicationSettingsApi.d.mts +0 -6
- package/api/ApplicationSettingsApi.mjs +0 -1
- package/api/DocumentTemplateApi.d.mts +0 -22
- package/api/DocumentTemplateApi.mjs +0 -1
- package/api/EntityReferenceApi.d.mts +0 -5
- package/api/EntityReferenceApi.mjs +0 -1
- package/api/EntityTemplateApi.d.mts +0 -24
- package/api/EntityTemplateApi.mjs +0 -1
- package/api/KeywordApi.d.mts +0 -14
- package/api/KeywordApi.mjs +0 -1
- package/api/MedicalLocationApi.d.mts +0 -17
- package/api/MedicalLocationApi.mjs +0 -1
- package/api/TarificationApi.d.mts +0 -27
- package/api/TarificationApi.mjs +0 -1
- package/api/TimeTableApi.d.mts +0 -26
- package/api/TimeTableApi.mjs +0 -1
- package/crypto/entities/DelegateShareOptions.d.mts +0 -9
- package/crypto/entities/DelegateShareOptions.mjs +0 -8
- package/crypto/entities/ShareAllPatientDataOptions.d.mts +0 -49
- package/crypto/entities/ShareAllPatientDataOptions.mjs +0 -58
- package/filters/ClassificationFilters.d.mts +0 -27
- package/filters/ClassificationFilters.mjs +0 -8
- package/filters/MedicalLocationFilters.d.mts +0 -8
- package/filters/MedicalLocationFilters.mjs +0 -6
- package/filters/TimeTableFilters.d.mts +0 -12
- package/filters/TimeTableFilters.mjs +0 -6
- package/model/ApplicationSettings.d.mts +0 -87
- package/model/ApplicationSettings.mjs +0 -256
- package/model/DocumentTemplate.d.mts +0 -35
- package/model/DocumentTemplate.mjs +0 -162
- package/model/EntityReference.d.mts +0 -10
- package/model/EntityReference.mjs +0 -46
- package/model/EntityTemplate.d.mts +0 -16
- package/model/EntityTemplate.mjs +0 -81
- package/model/Keyword.d.mts +0 -23
- package/model/Keyword.mjs +0 -99
- package/model/ListOfIds.d.mts +0 -6
- package/model/ListOfIds.mjs +0 -28
- package/model/MedicalLocation.d.mts +0 -28
- package/model/MedicalLocation.mjs +0 -116
- package/model/Tarification.d.mts +0 -50
- package/model/Tarification.mjs +0 -178
- package/model/TimeTable.d.mts +0 -25
- package/model/TimeTable.mjs +0 -111
- package/model/base/AppendixType.d.mts +0 -5
- package/model/base/AppendixType.mjs +0 -7
- package/model/base/CodeFlag.d.mts +0 -80
- package/model/base/CodeFlag.mjs +0 -82
- package/model/base/ReportVersion.d.mts +0 -3
- package/model/base/ReportVersion.mjs +0 -5
- package/model/embed/KeywordSubword.d.mts +0 -8
- package/model/embed/KeywordSubword.mjs +0 -35
- package/model/embed/LetterValue.d.mts +0 -9
- package/model/embed/LetterValue.mjs +0 -47
- package/model/embed/Periodicity.d.mts +0 -8
- package/model/embed/Periodicity.mjs +0 -36
- package/model/embed/TimeTableHour.d.mts +0 -7
- package/model/embed/TimeTableHour.mjs +0 -35
- package/model/embed/TimeTableItem.d.mts +0 -19
- package/model/embed/TimeTableItem.mjs +0 -96
- package/model/embed/Valorisation.d.mts +0 -56
- package/model/embed/Valorisation.mjs +0 -188
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { EncryptedPatient } from '../../model/Patient.mjs';
|
|
2
|
-
import { FailedRequestDetails } from './FailedRequestDetails.mjs';
|
|
3
|
-
import { ShareAllPatientDataOptions as ShareAllPatientDataOptions_ } from './ShareAllPatientDataOptions.mjs';
|
|
4
|
-
export declare namespace ShareAllPatientDataOptions {
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* Specifies which entities related to a Patient will be shared by [PatientApi.shareAllDataOfPatient].
|
|
8
|
-
*/
|
|
9
|
-
enum Tag {
|
|
10
|
-
All = "All",
|
|
11
|
-
MedicalInformation = "MedicalInformation",
|
|
12
|
-
FinancialInformation = "FinancialInformation"
|
|
13
|
-
}
|
|
14
|
-
enum ShareableEntity {
|
|
15
|
-
CalendarItem = "CalendarItem",
|
|
16
|
-
Contact = "Contact",
|
|
17
|
-
Classification = "Classification",
|
|
18
|
-
Document = "Document",
|
|
19
|
-
Form = "Form",
|
|
20
|
-
HealthElement = "HealthElement",
|
|
21
|
-
Invoice = "Invoice",
|
|
22
|
-
Patient = "Patient"
|
|
23
|
-
}
|
|
24
|
-
class EntityResult {
|
|
25
|
-
success: boolean | undefined;
|
|
26
|
-
error: ShareAllPatientDataOptions_.SharePatientDataError | undefined;
|
|
27
|
-
modified: number;
|
|
28
|
-
constructor(partial: Partial<EntityResult> & Pick<EntityResult, "modified">);
|
|
29
|
-
}
|
|
30
|
-
class Result {
|
|
31
|
-
patient: EncryptedPatient;
|
|
32
|
-
statuses: {
|
|
33
|
-
[key in ShareAllPatientDataOptions_.ShareableEntity]?: ShareAllPatientDataOptions_.EntityResult;
|
|
34
|
-
};
|
|
35
|
-
constructor(partial: Partial<Result> & Pick<Result, "patient" | "statuses">);
|
|
36
|
-
}
|
|
37
|
-
type SharePatientDataError = BulkShareFailure | FailedRequest;
|
|
38
|
-
class BulkShareFailure {
|
|
39
|
-
errors: Array<FailedRequestDetails>;
|
|
40
|
-
message: string;
|
|
41
|
-
readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.BulkShareFailure';
|
|
42
|
-
constructor(partial: Partial<BulkShareFailure> & Pick<BulkShareFailure, "errors" | "message">);
|
|
43
|
-
}
|
|
44
|
-
class FailedRequest {
|
|
45
|
-
description: string;
|
|
46
|
-
readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.FailedRequest';
|
|
47
|
-
constructor(partial: Partial<FailedRequest> & Pick<FailedRequest, "description">);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export var ShareAllPatientDataOptions;
|
|
2
|
-
(function (ShareAllPatientDataOptions) {
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* Specifies which entities related to a Patient will be shared by [PatientApi.shareAllDataOfPatient].
|
|
6
|
-
*/
|
|
7
|
-
let Tag;
|
|
8
|
-
(function (Tag) {
|
|
9
|
-
Tag["All"] = "All";
|
|
10
|
-
Tag["MedicalInformation"] = "MedicalInformation";
|
|
11
|
-
Tag["FinancialInformation"] = "FinancialInformation";
|
|
12
|
-
})(Tag = ShareAllPatientDataOptions.Tag || (ShareAllPatientDataOptions.Tag = {}));
|
|
13
|
-
let ShareableEntity;
|
|
14
|
-
(function (ShareableEntity) {
|
|
15
|
-
ShareableEntity["CalendarItem"] = "CalendarItem";
|
|
16
|
-
ShareableEntity["Contact"] = "Contact";
|
|
17
|
-
ShareableEntity["Classification"] = "Classification";
|
|
18
|
-
ShareableEntity["Document"] = "Document";
|
|
19
|
-
ShareableEntity["Form"] = "Form";
|
|
20
|
-
ShareableEntity["HealthElement"] = "HealthElement";
|
|
21
|
-
ShareableEntity["Invoice"] = "Invoice";
|
|
22
|
-
ShareableEntity["Patient"] = "Patient";
|
|
23
|
-
})(ShareableEntity = ShareAllPatientDataOptions.ShareableEntity || (ShareAllPatientDataOptions.ShareableEntity = {}));
|
|
24
|
-
class EntityResult {
|
|
25
|
-
constructor(partial) {
|
|
26
|
-
this.success = undefined;
|
|
27
|
-
this.error = undefined;
|
|
28
|
-
if ('success' in partial)
|
|
29
|
-
this.success = partial.success;
|
|
30
|
-
if ('error' in partial)
|
|
31
|
-
this.error = partial.error;
|
|
32
|
-
this.modified = partial.modified;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
ShareAllPatientDataOptions.EntityResult = EntityResult;
|
|
36
|
-
class Result {
|
|
37
|
-
constructor(partial) {
|
|
38
|
-
this.patient = partial.patient;
|
|
39
|
-
this.statuses = partial.statuses;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
ShareAllPatientDataOptions.Result = Result;
|
|
43
|
-
class BulkShareFailure {
|
|
44
|
-
constructor(partial) {
|
|
45
|
-
this.$ktClass = 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.BulkShareFailure';
|
|
46
|
-
this.errors = partial.errors;
|
|
47
|
-
this.message = partial.message;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
ShareAllPatientDataOptions.BulkShareFailure = BulkShareFailure;
|
|
51
|
-
class FailedRequest {
|
|
52
|
-
constructor(partial) {
|
|
53
|
-
this.$ktClass = 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.FailedRequest';
|
|
54
|
-
this.description = partial.description;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
ShareAllPatientDataOptions.FailedRequest = FailedRequest;
|
|
58
|
-
})(ShareAllPatientDataOptions || (ShareAllPatientDataOptions = {}));
|
|
@@ -1,27 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,8 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,6 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,6 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,256 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { CodeStub } from './base/CodeStub.mjs';
|
|
2
|
-
import { HasEndOfLife } from './base/HasEndOfLife.mjs';
|
|
3
|
-
import { ICureDocument } from './base/ICureDocument.mjs';
|
|
4
|
-
import { ReportVersion } from './base/ReportVersion.mjs';
|
|
5
|
-
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
6
|
-
import { DocumentGroup } from './embed/DocumentGroup.mjs';
|
|
7
|
-
import { DocumentType } from './embed/DocumentType.mjs';
|
|
8
|
-
export declare class DocumentTemplate implements StoredDocument, ICureDocument<string>, HasEndOfLife {
|
|
9
|
-
id: string;
|
|
10
|
-
rev: string | undefined;
|
|
11
|
-
created: number | undefined;
|
|
12
|
-
modified: number | undefined;
|
|
13
|
-
author: string | undefined;
|
|
14
|
-
responsible: string | undefined;
|
|
15
|
-
tags: Array<CodeStub>;
|
|
16
|
-
codes: Array<CodeStub>;
|
|
17
|
-
endOfLife: number | undefined;
|
|
18
|
-
deletionDate: number | undefined;
|
|
19
|
-
attachment: Int8Array | undefined;
|
|
20
|
-
documentType: DocumentType | undefined;
|
|
21
|
-
mainUti: string | undefined;
|
|
22
|
-
name: string | undefined;
|
|
23
|
-
otherUtis: Array<string>;
|
|
24
|
-
attachmentId: string | undefined;
|
|
25
|
-
version: ReportVersion | undefined;
|
|
26
|
-
owner: string | undefined;
|
|
27
|
-
guid: string | undefined;
|
|
28
|
-
group: DocumentGroup | undefined;
|
|
29
|
-
descr: string | undefined;
|
|
30
|
-
disabled: string | undefined;
|
|
31
|
-
specialty: CodeStub | undefined;
|
|
32
|
-
constructor(partial: Partial<DocumentTemplate>);
|
|
33
|
-
toJSON(): object;
|
|
34
|
-
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DocumentTemplate;
|
|
35
|
-
}
|