@icure/cardinal-sdk 2.0.0 → 2.1.0
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/api/FormApi.d.mts +2 -1
- package/api/FormBasicApi.d.mts +1 -0
- package/api/FormBasicInGroupApi.d.mts +1 -0
- package/api/FormInGroupApi.d.mts +2 -1
- package/api/FormTemplateApi.d.mts +2 -0
- package/api.d.mts +0 -8
- package/api.mjs +0 -8
- package/cardinal-sdk-ts.d.mts +26 -30
- package/cardinal-sdk-ts.mjs +39547 -39094
- package/cardinal-sdk.mjs +99857 -97723
- package/filters/DocumentFilters.d.mts +18 -0
- package/filters/DocumentFilters.mjs +7 -1
- package/filters/FormTemplateFilters.d.mts +7 -0
- package/filters/FormTemplateFilters.mjs +5 -0
- package/filters/MessageFilters.d.mts +18 -0
- package/filters/MessageFilters.mjs +7 -1
- package/filters.d.mts +1 -2
- package/filters.mjs +1 -2
- package/kotlinx-coroutines-core.mjs +8 -8
- package/model/CalendarItem.d.mts +22 -0
- package/model/CalendarItem.mjs +83 -0
- package/model/Code.d.mts +1 -1
- package/model/Code.mjs +4 -5
- package/model/Device.d.mts +1 -1
- package/model/Device.mjs +4 -5
- package/model/HealthcareParty.d.mts +2 -2
- package/model/HealthcareParty.mjs +7 -9
- package/model/Message.d.mts +4 -0
- package/model/Message.mjs +11 -0
- package/model/Patient.d.mts +3 -2
- package/model/Patient.mjs +8 -10
- package/model/base/CryptoActor.mjs +4 -4
- package/model/embed/form/template/Field.d.mts +1 -1
- package/model/embed/form/template/StructureElement.mjs +5 -5
- package/model/filter/predicate/Predicate.d.mts +1 -1
- package/model/filter/predicate/Predicate.mjs +1 -1
- package/model.d.mts +0 -18
- package/model.mjs +0 -18
- package/package.json +1 -1
- package/sdk/CardinalSdk.d.mts +0 -24
- 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/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,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
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
// auto-generated file
|
|
2
|
-
import { decodeBase64, encodeBase64 } from '../internal/BytesEncoding.mjs';
|
|
3
|
-
import { expectArray, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
4
|
-
import { randomUuid } from '../utils/Id.mjs';
|
|
5
|
-
import { CodeStub } from './base/CodeStub.mjs';
|
|
6
|
-
import { ReportVersion } from './base/ReportVersion.mjs';
|
|
7
|
-
import { DocumentGroup } from './embed/DocumentGroup.mjs';
|
|
8
|
-
import { DocumentType } from './embed/DocumentType.mjs';
|
|
9
|
-
export class DocumentTemplate {
|
|
10
|
-
constructor(partial) {
|
|
11
|
-
var _a;
|
|
12
|
-
this.rev = undefined;
|
|
13
|
-
this.created = undefined;
|
|
14
|
-
this.modified = undefined;
|
|
15
|
-
this.author = undefined;
|
|
16
|
-
this.responsible = undefined;
|
|
17
|
-
this.tags = [];
|
|
18
|
-
this.codes = [];
|
|
19
|
-
this.endOfLife = undefined;
|
|
20
|
-
this.deletionDate = undefined;
|
|
21
|
-
this.attachment = undefined;
|
|
22
|
-
this.documentType = undefined;
|
|
23
|
-
this.mainUti = undefined;
|
|
24
|
-
this.name = undefined;
|
|
25
|
-
this.otherUtis = [];
|
|
26
|
-
this.attachmentId = undefined;
|
|
27
|
-
this.version = undefined;
|
|
28
|
-
this.owner = undefined;
|
|
29
|
-
this.guid = undefined;
|
|
30
|
-
this.group = undefined;
|
|
31
|
-
this.descr = undefined;
|
|
32
|
-
this.disabled = undefined;
|
|
33
|
-
this.specialty = undefined;
|
|
34
|
-
this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
|
|
35
|
-
if ('rev' in partial)
|
|
36
|
-
this.rev = partial.rev;
|
|
37
|
-
if ('created' in partial)
|
|
38
|
-
this.created = partial.created;
|
|
39
|
-
if ('modified' in partial)
|
|
40
|
-
this.modified = partial.modified;
|
|
41
|
-
if ('author' in partial)
|
|
42
|
-
this.author = partial.author;
|
|
43
|
-
if ('responsible' in partial)
|
|
44
|
-
this.responsible = partial.responsible;
|
|
45
|
-
if ('tags' in partial && partial.tags !== undefined)
|
|
46
|
-
this.tags = partial.tags;
|
|
47
|
-
if ('codes' in partial && partial.codes !== undefined)
|
|
48
|
-
this.codes = partial.codes;
|
|
49
|
-
if ('endOfLife' in partial)
|
|
50
|
-
this.endOfLife = partial.endOfLife;
|
|
51
|
-
if ('deletionDate' in partial)
|
|
52
|
-
this.deletionDate = partial.deletionDate;
|
|
53
|
-
if ('attachment' in partial)
|
|
54
|
-
this.attachment = partial.attachment;
|
|
55
|
-
if ('documentType' in partial)
|
|
56
|
-
this.documentType = partial.documentType;
|
|
57
|
-
if ('mainUti' in partial)
|
|
58
|
-
this.mainUti = partial.mainUti;
|
|
59
|
-
if ('name' in partial)
|
|
60
|
-
this.name = partial.name;
|
|
61
|
-
if ('otherUtis' in partial && partial.otherUtis !== undefined)
|
|
62
|
-
this.otherUtis = partial.otherUtis;
|
|
63
|
-
if ('attachmentId' in partial)
|
|
64
|
-
this.attachmentId = partial.attachmentId;
|
|
65
|
-
if ('version' in partial)
|
|
66
|
-
this.version = partial.version;
|
|
67
|
-
if ('owner' in partial)
|
|
68
|
-
this.owner = partial.owner;
|
|
69
|
-
if ('guid' in partial)
|
|
70
|
-
this.guid = partial.guid;
|
|
71
|
-
if ('group' in partial)
|
|
72
|
-
this.group = partial.group;
|
|
73
|
-
if ('descr' in partial)
|
|
74
|
-
this.descr = partial.descr;
|
|
75
|
-
if ('disabled' in partial)
|
|
76
|
-
this.disabled = partial.disabled;
|
|
77
|
-
if ('specialty' in partial)
|
|
78
|
-
this.specialty = partial.specialty;
|
|
79
|
-
}
|
|
80
|
-
toJSON() {
|
|
81
|
-
const res = {};
|
|
82
|
-
res['id'] = this.id;
|
|
83
|
-
if (this.rev != undefined)
|
|
84
|
-
res['rev'] = this.rev;
|
|
85
|
-
if (this.created != undefined)
|
|
86
|
-
res['created'] = this.created;
|
|
87
|
-
if (this.modified != undefined)
|
|
88
|
-
res['modified'] = this.modified;
|
|
89
|
-
if (this.author != undefined)
|
|
90
|
-
res['author'] = this.author;
|
|
91
|
-
if (this.responsible != undefined)
|
|
92
|
-
res['responsible'] = this.responsible;
|
|
93
|
-
res['tags'] = this.tags.map((x0) => x0.toJSON());
|
|
94
|
-
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
95
|
-
if (this.endOfLife != undefined)
|
|
96
|
-
res['endOfLife'] = this.endOfLife;
|
|
97
|
-
if (this.deletionDate != undefined)
|
|
98
|
-
res['deletionDate'] = this.deletionDate;
|
|
99
|
-
if (this.attachment != undefined)
|
|
100
|
-
res['attachment'] = encodeBase64(this.attachment);
|
|
101
|
-
if (this.documentType != undefined)
|
|
102
|
-
res['documentType'] = this.documentType;
|
|
103
|
-
if (this.mainUti != undefined)
|
|
104
|
-
res['mainUti'] = this.mainUti;
|
|
105
|
-
if (this.name != undefined)
|
|
106
|
-
res['name'] = this.name;
|
|
107
|
-
res['otherUtis'] = this.otherUtis.map((x0) => x0);
|
|
108
|
-
if (this.attachmentId != undefined)
|
|
109
|
-
res['attachmentId'] = this.attachmentId;
|
|
110
|
-
if (this.version != undefined)
|
|
111
|
-
res['version'] = this.version;
|
|
112
|
-
if (this.owner != undefined)
|
|
113
|
-
res['owner'] = this.owner;
|
|
114
|
-
if (this.guid != undefined)
|
|
115
|
-
res['guid'] = this.guid;
|
|
116
|
-
if (this.group != undefined)
|
|
117
|
-
res['group'] = this.group.toJSON();
|
|
118
|
-
if (this.descr != undefined)
|
|
119
|
-
res['descr'] = this.descr;
|
|
120
|
-
if (this.disabled != undefined)
|
|
121
|
-
res['disabled'] = this.disabled;
|
|
122
|
-
if (this.specialty != undefined)
|
|
123
|
-
res['specialty'] = this.specialty.toJSON();
|
|
124
|
-
return res;
|
|
125
|
-
}
|
|
126
|
-
static fromJSON(json, ignoreUnknownKeys = false, path = ['DocumentTemplate']) {
|
|
127
|
-
if (typeof json != 'object')
|
|
128
|
-
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
129
|
-
const jCpy = Object.assign({}, json);
|
|
130
|
-
const res = new DocumentTemplate({
|
|
131
|
-
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
132
|
-
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
133
|
-
created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
|
|
134
|
-
modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
|
|
135
|
-
author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
|
|
136
|
-
responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
|
|
137
|
-
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
138
|
-
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
139
|
-
endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
|
|
140
|
-
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
141
|
-
attachment: decodeBase64(expectString(extractEntry(jCpy, 'attachment', false, path), true, [...path, ".attachment"]), [...path, ".attachment"]),
|
|
142
|
-
documentType: expectStringEnum(extractEntry(jCpy, 'documentType', false, path), true, [...path, ".documentType"], DocumentType, 'DocumentType'),
|
|
143
|
-
mainUti: expectString(extractEntry(jCpy, 'mainUti', false, path), true, [...path, ".mainUti"]),
|
|
144
|
-
name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
|
|
145
|
-
otherUtis: expectArray(extractEntry(jCpy, 'otherUtis', false, path), false, [...path, ".otherUtis"], (x0, p0) => expectString(x0, false, p0)),
|
|
146
|
-
attachmentId: expectString(extractEntry(jCpy, 'attachmentId', false, path), true, [...path, ".attachmentId"]),
|
|
147
|
-
version: expectStringEnum(extractEntry(jCpy, 'version', false, path), true, [...path, ".version"], ReportVersion, 'ReportVersion'),
|
|
148
|
-
owner: expectString(extractEntry(jCpy, 'owner', false, path), true, [...path, ".owner"]),
|
|
149
|
-
guid: expectString(extractEntry(jCpy, 'guid', false, path), true, [...path, ".guid"]),
|
|
150
|
-
group: expectObject(extractEntry(jCpy, 'group', false, path), true, ignoreUnknownKeys, [...path, ".group"], DocumentGroup.fromJSON),
|
|
151
|
-
descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
|
|
152
|
-
disabled: expectString(extractEntry(jCpy, 'disabled', false, path), true, [...path, ".disabled"]),
|
|
153
|
-
specialty: expectObject(extractEntry(jCpy, 'specialty', false, path), true, ignoreUnknownKeys, [...path, ".specialty"], CodeStub.fromJSON),
|
|
154
|
-
});
|
|
155
|
-
if (!ignoreUnknownKeys) {
|
|
156
|
-
const unused = Object.keys(jCpy);
|
|
157
|
-
if (unused.length > 0)
|
|
158
|
-
throw new Error(`Unexpected key(s) for json object DocumentTemplate at path ${path.join("")}: ${unused}`);
|
|
159
|
-
}
|
|
160
|
-
return res;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
2
|
-
export declare class EntityReference implements StoredDocument {
|
|
3
|
-
id: string;
|
|
4
|
-
rev: string | undefined;
|
|
5
|
-
deletionDate: number | undefined;
|
|
6
|
-
docId: string | undefined;
|
|
7
|
-
constructor(partial: Partial<EntityReference>);
|
|
8
|
-
toJSON(): object;
|
|
9
|
-
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EntityReference;
|
|
10
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// auto-generated file
|
|
2
|
-
import { expectNumber, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
3
|
-
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
-
export class EntityReference {
|
|
5
|
-
constructor(partial) {
|
|
6
|
-
var _a;
|
|
7
|
-
this.rev = undefined;
|
|
8
|
-
this.deletionDate = undefined;
|
|
9
|
-
this.docId = undefined;
|
|
10
|
-
this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
|
|
11
|
-
if ('rev' in partial)
|
|
12
|
-
this.rev = partial.rev;
|
|
13
|
-
if ('deletionDate' in partial)
|
|
14
|
-
this.deletionDate = partial.deletionDate;
|
|
15
|
-
if ('docId' in partial)
|
|
16
|
-
this.docId = partial.docId;
|
|
17
|
-
}
|
|
18
|
-
toJSON() {
|
|
19
|
-
const res = {};
|
|
20
|
-
res['id'] = this.id;
|
|
21
|
-
if (this.rev != undefined)
|
|
22
|
-
res['rev'] = this.rev;
|
|
23
|
-
if (this.deletionDate != undefined)
|
|
24
|
-
res['deletionDate'] = this.deletionDate;
|
|
25
|
-
if (this.docId != undefined)
|
|
26
|
-
res['docId'] = this.docId;
|
|
27
|
-
return res;
|
|
28
|
-
}
|
|
29
|
-
static fromJSON(json, ignoreUnknownKeys = false, path = ['EntityReference']) {
|
|
30
|
-
if (typeof json != 'object')
|
|
31
|
-
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
32
|
-
const jCpy = Object.assign({}, json);
|
|
33
|
-
const res = new EntityReference({
|
|
34
|
-
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
35
|
-
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
36
|
-
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
37
|
-
docId: expectString(extractEntry(jCpy, 'docId', false, path), true, [...path, ".docId"]),
|
|
38
|
-
});
|
|
39
|
-
if (!ignoreUnknownKeys) {
|
|
40
|
-
const unused = Object.keys(jCpy);
|
|
41
|
-
if (unused.length > 0)
|
|
42
|
-
throw new Error(`Unexpected key(s) for json object EntityReference at path ${path.join("")}: ${unused}`);
|
|
43
|
-
}
|
|
44
|
-
return res;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { StoredDocument } from './base/StoredDocument.mjs';
|
|
2
|
-
export declare class EntityTemplate implements StoredDocument {
|
|
3
|
-
id: string;
|
|
4
|
-
rev: string | undefined;
|
|
5
|
-
deletionDate: number | undefined;
|
|
6
|
-
userId: string | undefined;
|
|
7
|
-
descr: string | undefined;
|
|
8
|
-
keywords: Array<string> | undefined;
|
|
9
|
-
entityType: string | undefined;
|
|
10
|
-
subType: string | undefined;
|
|
11
|
-
defaultTemplate: boolean | undefined;
|
|
12
|
-
entity: Array<any>;
|
|
13
|
-
constructor(partial: Partial<EntityTemplate>);
|
|
14
|
-
toJSON(): object;
|
|
15
|
-
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EntityTemplate;
|
|
16
|
-
}
|
package/model/EntityTemplate.mjs
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
// auto-generated file
|
|
2
|
-
import { expectArray, expectBoolean, expectNumber, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
3
|
-
import { randomUuid } from '../utils/Id.mjs';
|
|
4
|
-
export class EntityTemplate {
|
|
5
|
-
constructor(partial) {
|
|
6
|
-
var _a;
|
|
7
|
-
this.rev = undefined;
|
|
8
|
-
this.deletionDate = undefined;
|
|
9
|
-
this.userId = undefined;
|
|
10
|
-
this.descr = undefined;
|
|
11
|
-
this.keywords = undefined;
|
|
12
|
-
this.entityType = undefined;
|
|
13
|
-
this.subType = undefined;
|
|
14
|
-
this.defaultTemplate = undefined;
|
|
15
|
-
this.entity = [];
|
|
16
|
-
this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
|
|
17
|
-
if ('rev' in partial)
|
|
18
|
-
this.rev = partial.rev;
|
|
19
|
-
if ('deletionDate' in partial)
|
|
20
|
-
this.deletionDate = partial.deletionDate;
|
|
21
|
-
if ('userId' in partial)
|
|
22
|
-
this.userId = partial.userId;
|
|
23
|
-
if ('descr' in partial)
|
|
24
|
-
this.descr = partial.descr;
|
|
25
|
-
if ('keywords' in partial)
|
|
26
|
-
this.keywords = partial.keywords;
|
|
27
|
-
if ('entityType' in partial)
|
|
28
|
-
this.entityType = partial.entityType;
|
|
29
|
-
if ('subType' in partial)
|
|
30
|
-
this.subType = partial.subType;
|
|
31
|
-
if ('defaultTemplate' in partial)
|
|
32
|
-
this.defaultTemplate = partial.defaultTemplate;
|
|
33
|
-
if ('entity' in partial && partial.entity !== undefined)
|
|
34
|
-
this.entity = partial.entity;
|
|
35
|
-
}
|
|
36
|
-
toJSON() {
|
|
37
|
-
const res = {};
|
|
38
|
-
res['id'] = this.id;
|
|
39
|
-
if (this.rev != undefined)
|
|
40
|
-
res['rev'] = this.rev;
|
|
41
|
-
if (this.deletionDate != undefined)
|
|
42
|
-
res['deletionDate'] = this.deletionDate;
|
|
43
|
-
if (this.userId != undefined)
|
|
44
|
-
res['userId'] = this.userId;
|
|
45
|
-
if (this.descr != undefined)
|
|
46
|
-
res['descr'] = this.descr;
|
|
47
|
-
if (this.keywords != undefined)
|
|
48
|
-
res['keywords'] = this.keywords.map((x0) => x0);
|
|
49
|
-
if (this.entityType != undefined)
|
|
50
|
-
res['entityType'] = this.entityType;
|
|
51
|
-
if (this.subType != undefined)
|
|
52
|
-
res['subType'] = this.subType;
|
|
53
|
-
if (this.defaultTemplate != undefined)
|
|
54
|
-
res['defaultTemplate'] = this.defaultTemplate;
|
|
55
|
-
res['entity'] = this.entity.map((x0) => x0);
|
|
56
|
-
return res;
|
|
57
|
-
}
|
|
58
|
-
static fromJSON(json, ignoreUnknownKeys = false, path = ['EntityTemplate']) {
|
|
59
|
-
if (typeof json != 'object')
|
|
60
|
-
throw new Error(`Expected json object at path ${path.join("")}`);
|
|
61
|
-
const jCpy = Object.assign({}, json);
|
|
62
|
-
const res = new EntityTemplate({
|
|
63
|
-
id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
|
|
64
|
-
rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
|
|
65
|
-
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
66
|
-
userId: expectString(extractEntry(jCpy, 'userId', false, path), true, [...path, ".userId"]),
|
|
67
|
-
descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
|
|
68
|
-
keywords: expectArray(extractEntry(jCpy, 'keywords', false, path), true, [...path, ".keywords"], (x0, p0) => expectString(x0, false, p0)),
|
|
69
|
-
entityType: expectString(extractEntry(jCpy, 'entityType', false, path), true, [...path, ".entityType"]),
|
|
70
|
-
subType: expectString(extractEntry(jCpy, 'subType', false, path), true, [...path, ".subType"]),
|
|
71
|
-
defaultTemplate: expectBoolean(extractEntry(jCpy, 'defaultTemplate', false, path), true, [...path, ".defaultTemplate"]),
|
|
72
|
-
entity: expectArray(extractEntry(jCpy, 'entity', false, path), false, [...path, ".entity"], (x0, p0) => x0),
|
|
73
|
-
});
|
|
74
|
-
if (!ignoreUnknownKeys) {
|
|
75
|
-
const unused = Object.keys(jCpy);
|
|
76
|
-
if (unused.length > 0)
|
|
77
|
-
throw new Error(`Unexpected key(s) for json object EntityTemplate at path ${path.join("")}: ${unused}`);
|
|
78
|
-
}
|
|
79
|
-
return res;
|
|
80
|
-
}
|
|
81
|
-
}
|
package/model/Keyword.d.mts
DELETED
|
@@ -1,23 +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 { StoredDocument } from './base/StoredDocument.mjs';
|
|
5
|
-
import { KeywordSubword } from './embed/KeywordSubword.mjs';
|
|
6
|
-
export declare class Keyword implements StoredDocument, ICureDocument<string>, HasEndOfLife {
|
|
7
|
-
id: string;
|
|
8
|
-
rev: string | undefined;
|
|
9
|
-
created: number | undefined;
|
|
10
|
-
modified: number | undefined;
|
|
11
|
-
author: string | undefined;
|
|
12
|
-
responsible: string | undefined;
|
|
13
|
-
tags: Array<CodeStub>;
|
|
14
|
-
codes: Array<CodeStub>;
|
|
15
|
-
endOfLife: number | undefined;
|
|
16
|
-
deletionDate: number | undefined;
|
|
17
|
-
value: string | undefined;
|
|
18
|
-
subWords: Array<KeywordSubword>;
|
|
19
|
-
userId: string | undefined;
|
|
20
|
-
constructor(partial: Partial<Keyword>);
|
|
21
|
-
toJSON(): object;
|
|
22
|
-
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Keyword;
|
|
23
|
-
}
|