@icure/cardinal-sdk 3.0.0-PREVIEW.7 → 3.0.0-PREVIEW.8

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.
Files changed (112) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
  2. package/api/AccessLogApi.d.mts +11 -0
  3. package/api/AccessLogBasicApi.d.mts +11 -0
  4. package/api/AccessLogBasicInGroupApi.d.mts +6 -0
  5. package/api/AccessLogInGroupApi.d.mts +33 -1
  6. package/api/ApplicationSettingsApi.d.mts +6 -0
  7. package/api/ApplicationSettingsApi.mjs +1 -0
  8. package/api/CalendarItemApi.d.mts +11 -0
  9. package/api/CalendarItemBasicApi.d.mts +11 -0
  10. package/api/CalendarItemBasicInGroupApi.d.mts +6 -0
  11. package/api/CalendarItemInGroupApi.d.mts +6 -0
  12. package/api/ContactApi.d.mts +22 -0
  13. package/api/ContactBasicApi.d.mts +22 -0
  14. package/api/ContactBasicInGroupApi.d.mts +11 -0
  15. package/api/ContactInGroupApi.d.mts +11 -0
  16. package/api/DocumentApi.d.mts +11 -0
  17. package/api/DocumentBasicApi.d.mts +11 -0
  18. package/api/DocumentBasicInGroupApi.d.mts +6 -0
  19. package/api/DocumentInGroupApi.d.mts +6 -0
  20. package/api/DocumentTemplateApi.d.mts +22 -0
  21. package/api/DocumentTemplateApi.mjs +1 -0
  22. package/api/EntityReferenceApi.d.mts +5 -0
  23. package/api/EntityReferenceApi.mjs +1 -0
  24. package/api/EntityTemplateApi.d.mts +24 -0
  25. package/api/EntityTemplateApi.mjs +1 -0
  26. package/api/FormApi.d.mts +11 -0
  27. package/api/FormBasicApi.d.mts +11 -0
  28. package/api/FormBasicInGroupApi.d.mts +6 -0
  29. package/api/FormInGroupApi.d.mts +6 -0
  30. package/api/HealthElementApi.d.mts +11 -0
  31. package/api/HealthElementBasicApi.d.mts +11 -0
  32. package/api/HealthElementBasicInGroupApi.d.mts +6 -0
  33. package/api/HealthElementInGroupApi.d.mts +6 -0
  34. package/api/InvoiceApi.d.mts +11 -0
  35. package/api/InvoiceBasicApi.d.mts +11 -0
  36. package/api/InvoiceBasicInGroupApi.d.mts +6 -0
  37. package/api/InvoiceInGroupApi.d.mts +6 -0
  38. package/api/KeywordApi.d.mts +14 -0
  39. package/api/KeywordApi.mjs +1 -0
  40. package/api/MedicalLocationApi.d.mts +17 -0
  41. package/api/MedicalLocationApi.mjs +1 -0
  42. package/api/MessageApi.d.mts +11 -0
  43. package/api/MessageBasicApi.d.mts +11 -0
  44. package/api/MessageBasicInGroupApi.d.mts +6 -0
  45. package/api/MessageInGroupApi.d.mts +6 -0
  46. package/api/ReceiptApi.d.mts +11 -0
  47. package/api/ReceiptBasicApi.d.mts +11 -0
  48. package/api/ReceiptBasicInGroupApi.d.mts +6 -0
  49. package/api/ReceiptInGroupApi.d.mts +6 -0
  50. package/api/RelatedPersonApi.d.mts +11 -0
  51. package/api/RelatedPersonBasicApi.d.mts +11 -0
  52. package/api/RelatedPersonBasicInGroupApi.d.mts +6 -0
  53. package/api/RelatedPersonInGroupApi.d.mts +6 -0
  54. package/api/TarificationApi.d.mts +27 -0
  55. package/api/TarificationApi.mjs +1 -0
  56. package/api/TimeTableApi.d.mts +26 -0
  57. package/api/TimeTableApi.mjs +1 -0
  58. package/api/TopicApi.d.mts +11 -0
  59. package/api/TopicBasicApi.d.mts +11 -0
  60. package/api/TopicBasicInGroupApi.d.mts +6 -0
  61. package/api/TopicInGroupApi.d.mts +6 -0
  62. package/cardinal-sdk-ts.mjs +47824 -44170
  63. package/cardinal-sdk.mjs +77922 -77616
  64. package/crypto/entities/DelegateShareOptions.d.mts +9 -0
  65. package/crypto/entities/DelegateShareOptions.mjs +8 -0
  66. package/crypto/entities/ShareAllPatientDataOptions.d.mts +49 -0
  67. package/crypto/entities/ShareAllPatientDataOptions.mjs +58 -0
  68. package/filters/ClassificationFilters.d.mts +114 -0
  69. package/filters/ClassificationFilters.mjs +8 -0
  70. package/filters/MedicalLocationFilters.d.mts +8 -0
  71. package/filters/MedicalLocationFilters.mjs +6 -0
  72. package/filters/TimeTableFilters.d.mts +12 -0
  73. package/filters/TimeTableFilters.mjs +6 -0
  74. package/kotlin-kotlin-stdlib.mjs +4 -4
  75. package/kotlinx-coroutines-core.mjs +1 -1
  76. package/model/ApplicationSettings.d.mts +87 -0
  77. package/model/ApplicationSettings.mjs +256 -0
  78. package/model/DocumentTemplate.d.mts +35 -0
  79. package/model/DocumentTemplate.mjs +162 -0
  80. package/model/EntityReference.d.mts +10 -0
  81. package/model/EntityReference.mjs +46 -0
  82. package/model/EntityTemplate.d.mts +16 -0
  83. package/model/EntityTemplate.mjs +81 -0
  84. package/model/Keyword.d.mts +23 -0
  85. package/model/Keyword.mjs +99 -0
  86. package/model/ListOfIds.d.mts +6 -0
  87. package/model/ListOfIds.mjs +28 -0
  88. package/model/MedicalLocation.d.mts +28 -0
  89. package/model/MedicalLocation.mjs +116 -0
  90. package/model/Tarification.d.mts +50 -0
  91. package/model/Tarification.mjs +178 -0
  92. package/model/TimeTable.d.mts +25 -0
  93. package/model/TimeTable.mjs +111 -0
  94. package/model/base/AppendixType.d.mts +5 -0
  95. package/model/base/AppendixType.mjs +7 -0
  96. package/model/base/CodeFlag.d.mts +80 -0
  97. package/model/base/CodeFlag.mjs +82 -0
  98. package/model/base/ReportVersion.d.mts +3 -0
  99. package/model/base/ReportVersion.mjs +5 -0
  100. package/model/embed/KeywordSubword.d.mts +8 -0
  101. package/model/embed/KeywordSubword.mjs +35 -0
  102. package/model/embed/LetterValue.d.mts +9 -0
  103. package/model/embed/LetterValue.mjs +47 -0
  104. package/model/embed/Periodicity.d.mts +8 -0
  105. package/model/embed/Periodicity.mjs +36 -0
  106. package/model/embed/TimeTableHour.d.mts +7 -0
  107. package/model/embed/TimeTableHour.mjs +35 -0
  108. package/model/embed/TimeTableItem.d.mts +19 -0
  109. package/model/embed/TimeTableItem.mjs +96 -0
  110. package/model/embed/Valorisation.d.mts +56 -0
  111. package/model/embed/Valorisation.mjs +188 -0
  112. package/package.json +1 -1
@@ -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
+ }
@@ -0,0 +1,35 @@
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
+ }
@@ -0,0 +1,162 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,46 @@
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
+ }
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,81 @@
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
+ }
@@ -0,0 +1,23 @@
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
+ }