@icure/cardinal-sdk 2.1.0 → 2.1.1

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.
@@ -88,8 +88,8 @@ initMetadataForInterface(Entry, 'Entry');
88
88
  initMetadataForInterface(KtMap, 'Map');
89
89
  initMetadataForInterface(KtSet, 'Set', VOID, VOID, [Collection]);
90
90
  initMetadataForInterface(MutableIterable, 'MutableIterable');
91
- initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, MutableIterable, Collection]);
92
- initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, MutableIterable, Collection]);
91
+ initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, Collection, MutableIterable]);
92
+ initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, Collection, MutableIterable]);
93
93
  initMetadataForInterface(KtMutableMap, 'MutableMap', VOID, VOID, [KtMap]);
94
94
  initMetadataForCompanion(Companion_0);
95
95
  initMetadataForClass(Enum, 'Enum', VOID, VOID, [Comparable]);
@@ -110,7 +110,7 @@ initMetadataForInterface(AutoCloseable, 'AutoCloseable');
110
110
  initMetadataForInterface(Comparator, 'Comparator');
111
111
  initMetadataForObject(Unit, 'Unit');
112
112
  initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]);
113
- initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection, MutableIterable, Collection]);
113
+ initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [AbstractCollection, Collection, MutableIterable]);
114
114
  initMetadataForClass(IteratorImpl, 'IteratorImpl');
115
115
  initMetadataForClass(ListIteratorImpl, 'ListIteratorImpl', VOID, IteratorImpl);
116
116
  initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [AbstractMutableCollection, KtMutableList]);
@@ -123,7 +123,7 @@ initMetadataForCompanion(Companion_2);
123
123
  initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [AbstractMutableList, KtMutableList, RandomAccess]);
124
124
  initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [AbstractMutableMap, KtMutableMap]);
125
125
  initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]);
126
- initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [MutableIterable, Collection, AbstractMutableCollection]);
126
+ initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [Collection, MutableIterable, AbstractMutableCollection]);
127
127
  initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtMutableSet, AbstractMutableSet]);
128
128
  initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase);
129
129
  initMetadataForClass(HashMapKeysDefault$iterator$1);
@@ -235,11 +235,6 @@ initMetadataForClass(BufferedChannelIterator, 'BufferedChannelIterator', VOID, V
235
235
  initMetadataForCoroutine($sendCOROUTINE$, CoroutineImpl);
236
236
  initMetadataForCoroutine($receiveCOROUTINE$, CoroutineImpl);
237
237
  initMetadataForCoroutine($receiveCatchingCOROUTINE$, CoroutineImpl);
238
- function close$default(cause, $super) {
239
- cause = cause === VOID ? null : cause;
240
- return $super === VOID ? this.l1d(cause) : $super.l1d.call(this, cause);
241
- }
242
- initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
243
238
  function cancel$default_0(cause, $super) {
244
239
  cause = cause === VOID ? null : cause;
245
240
  var tmp;
@@ -252,7 +247,12 @@ function cancel$default_0(cause, $super) {
252
247
  return tmp;
253
248
  }
254
249
  initMetadataForInterface(ReceiveChannel, 'ReceiveChannel', VOID, VOID, VOID, [0]);
255
- initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [SendChannel, ReceiveChannel], [1, 4, 0, 3]);
250
+ function close$default(cause, $super) {
251
+ cause = cause === VOID ? null : cause;
252
+ return $super === VOID ? this.l1d(cause) : $super.l1d.call(this, cause);
253
+ }
254
+ initMetadataForInterface(SendChannel, 'SendChannel', VOID, VOID, VOID, [1]);
255
+ initMetadataForClass(BufferedChannel, 'BufferedChannel', VOID, VOID, [ReceiveChannel, SendChannel], [1, 4, 0, 3]);
256
256
  initMetadataForClass(WaiterEB, 'WaiterEB');
257
257
  initMetadataForClass(ReceiveCatching, 'ReceiveCatching', VOID, VOID, [Waiter]);
258
258
  initMetadataForObject(Factory, 'Factory');
@@ -262,7 +262,7 @@ initMetadataForCompanion(Companion);
262
262
  initMetadataForClass(ChannelResult, 'ChannelResult');
263
263
  initMetadataForClass(ClosedReceiveChannelException, 'ClosedReceiveChannelException', VOID, NoSuchElementException);
264
264
  initMetadataForClass(ClosedSendChannelException, 'ClosedSendChannelException', VOID, IllegalStateException);
265
- initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, SendChannel, ReceiveChannel], [1, 0]);
265
+ initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, AbstractCoroutine, [AbstractCoroutine, ReceiveChannel, SendChannel], [1, 0]);
266
266
  initMetadataForClass(ConflatedBufferedChannel, 'ConflatedBufferedChannel', VOID, BufferedChannel, VOID, [1, 0]);
267
267
  initMetadataForInterface(ProducerScope, 'ProducerScope', VOID, VOID, [CoroutineScope, SendChannel], [1]);
268
268
  initMetadataForClass(ProducerCoroutine, 'ProducerCoroutine', VOID, ChannelCoroutine, [ChannelCoroutine, ProducerScope], [1, 0]);
package/model/Group.d.mts CHANGED
@@ -33,7 +33,22 @@ export declare class Group implements StoredDocument, HasTags {
33
33
  minimumAuthenticationClassForElevatedPrivileges: AuthenticationClass;
34
34
  superGroup: string | undefined;
35
35
  projectId: string | undefined;
36
+ templates: Group.TemplatesConfiguration | undefined;
36
37
  constructor(partial: Partial<Group> & Pick<Group, "minimumAuthenticationClassForElevatedPrivileges">);
37
38
  toJSON(): object;
38
39
  static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Group;
39
40
  }
41
+ export declare namespace Group {
42
+ class TemplatesConfiguration {
43
+ specId: string;
44
+ emailSender: string | undefined;
45
+ smsSender: string | undefined;
46
+ emailVerificationTemplateId: string | undefined;
47
+ mobilePhoneVerificationTemplateId: string | undefined;
48
+ existingEmailNotificationTemplateId: string | undefined;
49
+ existingMobilePhoneNotificationTemplateId: string | undefined;
50
+ constructor(partial: Partial<TemplatesConfiguration> & Pick<TemplatesConfiguration, "specId">);
51
+ toJSON(): object;
52
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): TemplatesConfiguration;
53
+ }
54
+ }
package/model/Group.mjs CHANGED
@@ -26,6 +26,7 @@ export class Group {
26
26
  this.externalJwtConfig = {};
27
27
  this.superGroup = undefined;
28
28
  this.projectId = undefined;
29
+ this.templates = undefined;
29
30
  this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
30
31
  if ('rev' in partial)
31
32
  this.rev = partial.rev;
@@ -60,6 +61,8 @@ export class Group {
60
61
  this.superGroup = partial.superGroup;
61
62
  if ('projectId' in partial)
62
63
  this.projectId = partial.projectId;
64
+ if ('templates' in partial)
65
+ this.templates = partial.templates;
63
66
  }
64
67
  toJSON() {
65
68
  const res = {};
@@ -89,6 +92,8 @@ export class Group {
89
92
  res['superGroup'] = this.superGroup;
90
93
  if (this.projectId != undefined)
91
94
  res['projectId'] = this.projectId;
95
+ if (this.templates != undefined)
96
+ res['templates'] = this.templates.toJSON();
92
97
  return res;
93
98
  }
94
99
  static fromJSON(json, ignoreUnknownKeys = false, path = ['Group']) {
@@ -114,6 +119,7 @@ export class Group {
114
119
  minimumAuthenticationClassForElevatedPrivileges: expectStringEnum(extractEntry(jCpy, 'minimumAuthenticationClassForElevatedPrivileges', true, path), false, [...path, ".minimumAuthenticationClassForElevatedPrivileges"], AuthenticationClass, 'AuthenticationClass'),
115
120
  superGroup: expectString(extractEntry(jCpy, 'superGroup', false, path), true, [...path, ".superGroup"]),
116
121
  projectId: expectString(extractEntry(jCpy, 'projectId', false, path), true, [...path, ".projectId"]),
122
+ templates: expectObject(extractEntry(jCpy, 'templates', false, path), true, ignoreUnknownKeys, [...path, ".templates"], Group.TemplatesConfiguration.fromJSON),
117
123
  });
118
124
  if (!ignoreUnknownKeys) {
119
125
  const unused = Object.keys(jCpy);
@@ -123,3 +129,66 @@ export class Group {
123
129
  return res;
124
130
  }
125
131
  }
132
+ (function (Group) {
133
+ class TemplatesConfiguration {
134
+ constructor(partial) {
135
+ this.emailSender = undefined;
136
+ this.smsSender = undefined;
137
+ this.emailVerificationTemplateId = undefined;
138
+ this.mobilePhoneVerificationTemplateId = undefined;
139
+ this.existingEmailNotificationTemplateId = undefined;
140
+ this.existingMobilePhoneNotificationTemplateId = undefined;
141
+ this.specId = partial.specId;
142
+ if ('emailSender' in partial)
143
+ this.emailSender = partial.emailSender;
144
+ if ('smsSender' in partial)
145
+ this.smsSender = partial.smsSender;
146
+ if ('emailVerificationTemplateId' in partial)
147
+ this.emailVerificationTemplateId = partial.emailVerificationTemplateId;
148
+ if ('mobilePhoneVerificationTemplateId' in partial)
149
+ this.mobilePhoneVerificationTemplateId = partial.mobilePhoneVerificationTemplateId;
150
+ if ('existingEmailNotificationTemplateId' in partial)
151
+ this.existingEmailNotificationTemplateId = partial.existingEmailNotificationTemplateId;
152
+ if ('existingMobilePhoneNotificationTemplateId' in partial)
153
+ this.existingMobilePhoneNotificationTemplateId = partial.existingMobilePhoneNotificationTemplateId;
154
+ }
155
+ toJSON() {
156
+ const res = {};
157
+ res['specId'] = this.specId;
158
+ if (this.emailSender != undefined)
159
+ res['emailSender'] = this.emailSender;
160
+ if (this.smsSender != undefined)
161
+ res['smsSender'] = this.smsSender;
162
+ if (this.emailVerificationTemplateId != undefined)
163
+ res['emailVerificationTemplateId'] = this.emailVerificationTemplateId;
164
+ if (this.mobilePhoneVerificationTemplateId != undefined)
165
+ res['mobilePhoneVerificationTemplateId'] = this.mobilePhoneVerificationTemplateId;
166
+ if (this.existingEmailNotificationTemplateId != undefined)
167
+ res['existingEmailNotificationTemplateId'] = this.existingEmailNotificationTemplateId;
168
+ if (this.existingMobilePhoneNotificationTemplateId != undefined)
169
+ res['existingMobilePhoneNotificationTemplateId'] = this.existingMobilePhoneNotificationTemplateId;
170
+ return res;
171
+ }
172
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['TemplatesConfiguration']) {
173
+ if (typeof json != 'object')
174
+ throw new Error(`Expected json object at path ${path.join("")}`);
175
+ const jCpy = Object.assign({}, json);
176
+ const res = new TemplatesConfiguration({
177
+ specId: expectString(extractEntry(jCpy, 'specId', true, path), false, [...path, ".specId"]),
178
+ emailSender: expectString(extractEntry(jCpy, 'emailSender', false, path), true, [...path, ".emailSender"]),
179
+ smsSender: expectString(extractEntry(jCpy, 'smsSender', false, path), true, [...path, ".smsSender"]),
180
+ emailVerificationTemplateId: expectString(extractEntry(jCpy, 'emailVerificationTemplateId', false, path), true, [...path, ".emailVerificationTemplateId"]),
181
+ mobilePhoneVerificationTemplateId: expectString(extractEntry(jCpy, 'mobilePhoneVerificationTemplateId', false, path), true, [...path, ".mobilePhoneVerificationTemplateId"]),
182
+ existingEmailNotificationTemplateId: expectString(extractEntry(jCpy, 'existingEmailNotificationTemplateId', false, path), true, [...path, ".existingEmailNotificationTemplateId"]),
183
+ existingMobilePhoneNotificationTemplateId: expectString(extractEntry(jCpy, 'existingMobilePhoneNotificationTemplateId', false, path), true, [...path, ".existingMobilePhoneNotificationTemplateId"]),
184
+ });
185
+ if (!ignoreUnknownKeys) {
186
+ const unused = Object.keys(jCpy);
187
+ if (unused.length > 0)
188
+ throw new Error(`Unexpected key(s) for json object TemplatesConfiguration at path ${path.join("")}: ${unused}`);
189
+ }
190
+ return res;
191
+ }
192
+ }
193
+ Group.TemplatesConfiguration = TemplatesConfiguration;
194
+ })(Group || (Group = {}));
@@ -15,6 +15,7 @@ import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
15
15
  import { Base64String } from './specializations/Base64String.mjs';
16
16
  export interface HealthElement extends StoredDocument, ICureDocument<string>, HasEncryptionMetadata, Encryptable, HasEndOfLife {
17
17
  identifiers: Array<Identifier>;
18
+ healthElementId: string | undefined;
18
19
  valueDate: number | undefined;
19
20
  openingDate: number | undefined;
20
21
  closingDate: number | undefined;
@@ -44,6 +45,7 @@ export declare class DecryptedHealthElement {
44
45
  codes: Array<CodeStub>;
45
46
  endOfLife: number | undefined;
46
47
  deletionDate: number | undefined;
48
+ healthElementId: string | undefined;
47
49
  valueDate: number | undefined;
48
50
  openingDate: number | undefined;
49
51
  closingDate: number | undefined;
@@ -87,6 +89,7 @@ export declare class EncryptedHealthElement {
87
89
  codes: Array<CodeStub>;
88
90
  endOfLife: number | undefined;
89
91
  deletionDate: number | undefined;
92
+ healthElementId: string | undefined;
90
93
  valueDate: number | undefined;
91
94
  openingDate: number | undefined;
92
95
  closingDate: number | undefined;
@@ -23,6 +23,7 @@ export class DecryptedHealthElement {
23
23
  this.codes = [];
24
24
  this.endOfLife = undefined;
25
25
  this.deletionDate = undefined;
26
+ this.healthElementId = undefined;
26
27
  this.valueDate = undefined;
27
28
  this.openingDate = undefined;
28
29
  this.closingDate = undefined;
@@ -67,6 +68,8 @@ export class DecryptedHealthElement {
67
68
  this.endOfLife = partial.endOfLife;
68
69
  if ('deletionDate' in partial)
69
70
  this.deletionDate = partial.deletionDate;
71
+ if ('healthElementId' in partial)
72
+ this.healthElementId = partial.healthElementId;
70
73
  if ('valueDate' in partial)
71
74
  this.valueDate = partial.valueDate;
72
75
  if ('openingDate' in partial)
@@ -128,6 +131,8 @@ export class DecryptedHealthElement {
128
131
  res['endOfLife'] = this.endOfLife;
129
132
  if (this.deletionDate != undefined)
130
133
  res['deletionDate'] = this.deletionDate;
134
+ if (this.healthElementId != undefined)
135
+ res['healthElementId'] = this.healthElementId;
131
136
  if (this.valueDate != undefined)
132
137
  res['valueDate'] = this.valueDate;
133
138
  if (this.openingDate != undefined)
@@ -180,6 +185,7 @@ export class DecryptedHealthElement {
180
185
  codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
181
186
  endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
182
187
  deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
188
+ healthElementId: expectString(extractEntry(jCpy, 'healthElementId', false, path), true, [...path, ".healthElementId"]),
183
189
  valueDate: expectNumber(extractEntry(jCpy, 'valueDate', false, path), true, true, [...path, ".valueDate"]),
184
190
  openingDate: expectNumber(extractEntry(jCpy, 'openingDate', false, path), true, true, [...path, ".openingDate"]),
185
191
  closingDate: expectNumber(extractEntry(jCpy, 'closingDate', false, path), true, true, [...path, ".closingDate"]),
@@ -222,6 +228,7 @@ export class EncryptedHealthElement {
222
228
  this.codes = [];
223
229
  this.endOfLife = undefined;
224
230
  this.deletionDate = undefined;
231
+ this.healthElementId = undefined;
225
232
  this.valueDate = undefined;
226
233
  this.openingDate = undefined;
227
234
  this.closingDate = undefined;
@@ -266,6 +273,8 @@ export class EncryptedHealthElement {
266
273
  this.endOfLife = partial.endOfLife;
267
274
  if ('deletionDate' in partial)
268
275
  this.deletionDate = partial.deletionDate;
276
+ if ('healthElementId' in partial)
277
+ this.healthElementId = partial.healthElementId;
269
278
  if ('valueDate' in partial)
270
279
  this.valueDate = partial.valueDate;
271
280
  if ('openingDate' in partial)
@@ -327,6 +336,8 @@ export class EncryptedHealthElement {
327
336
  res['endOfLife'] = this.endOfLife;
328
337
  if (this.deletionDate != undefined)
329
338
  res['deletionDate'] = this.deletionDate;
339
+ if (this.healthElementId != undefined)
340
+ res['healthElementId'] = this.healthElementId;
330
341
  if (this.valueDate != undefined)
331
342
  res['valueDate'] = this.valueDate;
332
343
  if (this.openingDate != undefined)
@@ -379,6 +390,7 @@ export class EncryptedHealthElement {
379
390
  codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
380
391
  endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
381
392
  deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
393
+ healthElementId: expectString(extractEntry(jCpy, 'healthElementId', false, path), true, [...path, ".healthElementId"]),
382
394
  valueDate: expectNumber(extractEntry(jCpy, 'valueDate', false, path), true, true, [...path, ".valueDate"]),
383
395
  openingDate: expectNumber(extractEntry(jCpy, 'openingDate', false, path), true, true, [...path, ".openingDate"]),
384
396
  closingDate: expectNumber(extractEntry(jCpy, 'closingDate', false, path), true, true, [...path, ".closingDate"]),
package/model/User.d.mts CHANGED
@@ -43,6 +43,8 @@ export declare namespace User {
43
43
  isAdmin: boolean;
44
44
  inheritsRoles: boolean;
45
45
  loginIdentifiers: Array<LoginIdentifier>;
46
+ verifiedEmail: boolean | undefined;
47
+ verifiedMobilePhone: boolean | undefined;
46
48
  constructor(partial: Partial<SystemMetadata> & Pick<SystemMetadata, "roles" | "isAdmin" | "inheritsRoles">);
47
49
  toJSON(): object;
48
50
  static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): SystemMetadata;
package/model/User.mjs CHANGED
@@ -157,11 +157,17 @@ export class User {
157
157
  class SystemMetadata {
158
158
  constructor(partial) {
159
159
  this.loginIdentifiers = [];
160
+ this.verifiedEmail = undefined;
161
+ this.verifiedMobilePhone = undefined;
160
162
  this.roles = partial.roles;
161
163
  this.isAdmin = partial.isAdmin;
162
164
  this.inheritsRoles = partial.inheritsRoles;
163
165
  if ('loginIdentifiers' in partial && partial.loginIdentifiers !== undefined)
164
166
  this.loginIdentifiers = partial.loginIdentifiers;
167
+ if ('verifiedEmail' in partial)
168
+ this.verifiedEmail = partial.verifiedEmail;
169
+ if ('verifiedMobilePhone' in partial)
170
+ this.verifiedMobilePhone = partial.verifiedMobilePhone;
165
171
  }
166
172
  toJSON() {
167
173
  const res = {};
@@ -169,6 +175,10 @@ export class User {
169
175
  res['isAdmin'] = this.isAdmin;
170
176
  res['inheritsRoles'] = this.inheritsRoles;
171
177
  res['loginIdentifiers'] = this.loginIdentifiers.map((x0) => x0.toJSON());
178
+ if (this.verifiedEmail != undefined)
179
+ res['verifiedEmail'] = this.verifiedEmail;
180
+ if (this.verifiedMobilePhone != undefined)
181
+ res['verifiedMobilePhone'] = this.verifiedMobilePhone;
172
182
  return res;
173
183
  }
174
184
  static fromJSON(json, ignoreUnknownKeys = false, path = ['SystemMetadata']) {
@@ -180,6 +190,8 @@ export class User {
180
190
  isAdmin: expectBoolean(extractEntry(jCpy, 'isAdmin', true, path), false, [...path, ".isAdmin"]),
181
191
  inheritsRoles: expectBoolean(extractEntry(jCpy, 'inheritsRoles', true, path), false, [...path, ".inheritsRoles"]),
182
192
  loginIdentifiers: expectArray(extractEntry(jCpy, 'loginIdentifiers', false, path), false, [...path, ".loginIdentifiers"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, LoginIdentifier.fromJSON)),
193
+ verifiedEmail: expectBoolean(extractEntry(jCpy, 'verifiedEmail', false, path), true, [...path, ".verifiedEmail"]),
194
+ verifiedMobilePhone: expectBoolean(extractEntry(jCpy, 'verifiedMobilePhone', false, path), true, [...path, ".verifiedMobilePhone"]),
183
195
  });
184
196
  if (!ignoreUnknownKeys) {
185
197
  const unused = Object.keys(jCpy);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/cardinal-sdk",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "main": "cardinal-sdk-ts.mjs",
5
5
  "types": "cardinal-sdk-ts.d.mts",
6
6
  "devDependencies": {