@icure/cardinal-sdk 2.1.2 → 2.3.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.
@@ -7,11 +7,11 @@ export var CryptoActor;
7
7
  (function (CryptoActor) {
8
8
  function fromJSON(json, ignoreUnknownKeys = false, path = ['CryptoActor']) {
9
9
  switch (json.$ktClass) {
10
- case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
11
- case 'com.icure.cardinal.sdk.model.DecryptedPatient': return DecryptedPatient.fromJSON(json, ignoreUnknownKeys);
10
+ case 'com.icure.cardinal.sdk.model.Device': return Device.fromJSON(json, ignoreUnknownKeys);
12
11
  case 'com.icure.cardinal.sdk.model.EncryptedPatient': return EncryptedPatient.fromJSON(json, ignoreUnknownKeys);
12
+ case 'com.icure.cardinal.sdk.model.DecryptedPatient': return DecryptedPatient.fromJSON(json, ignoreUnknownKeys);
13
+ case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
13
14
  case 'com.icure.cardinal.sdk.model.CryptoActorStub': return CryptoActorStub.fromJSON(json, ignoreUnknownKeys);
14
- case 'com.icure.cardinal.sdk.model.Device': return Device.fromJSON(json, ignoreUnknownKeys);
15
15
  default: throw new Error('Unexpected discriminator for CryptoActor: ' + json.$ktClass);
16
16
  }
17
17
  }
@@ -1,8 +1,3 @@
1
- /**
2
- *
3
- *
4
- * Created by aduchate on 21/01/13, 14:53
5
- */
6
1
  export declare enum AddressType {
7
2
  Home = "Home",
8
3
  Work = "Work",
@@ -1,9 +1,4 @@
1
1
  // auto-generated file
2
- /**
3
- *
4
- *
5
- * Created by aduchate on 21/01/13, 14:53
6
- */
7
2
  export var AddressType;
8
3
  (function (AddressType) {
9
4
  AddressType["Home"] = "Home";
@@ -4,11 +4,6 @@ import { Encryptable } from './Encryptable.mjs';
4
4
  import { PatientHealthCarePartyType } from './PatientHealthCarePartyType.mjs';
5
5
  import { ReferralPeriod } from './ReferralPeriod.mjs';
6
6
  import { TelecomType } from './TelecomType.mjs';
7
- /**
8
- *
9
- *
10
- * Created by aduchate on 02/07/13, 11:59
11
- */
12
7
  export interface PatientHealthCareParty extends Encryptable {
13
8
  type: PatientHealthCarePartyType | undefined;
14
9
  healthcarePartyId: string | undefined;
@@ -20,11 +15,6 @@ export interface PatientHealthCareParty extends Encryptable {
20
15
  readonly isEncrypted: boolean;
21
16
  toJSON(): object;
22
17
  }
23
- /**
24
- *
25
- *
26
- * Created by aduchate on 02/07/13, 11:59
27
- */
28
18
  export declare class DecryptedPatientHealthCareParty {
29
19
  type: PatientHealthCarePartyType | undefined;
30
20
  healthcarePartyId: string | undefined;
@@ -39,11 +29,6 @@ export declare class DecryptedPatientHealthCareParty {
39
29
  toJSON(): object;
40
30
  static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedPatientHealthCareParty;
41
31
  }
42
- /**
43
- *
44
- *
45
- * Created by aduchate on 02/07/13, 11:59
46
- */
47
32
  export declare class EncryptedPatientHealthCareParty {
48
33
  type: PatientHealthCarePartyType | undefined;
49
34
  healthcarePartyId: string | undefined;
@@ -4,11 +4,6 @@ import { DecryptedPropertyStub, EncryptedPropertyStub } from '../PropertyStub.mj
4
4
  import { PatientHealthCarePartyType } from './PatientHealthCarePartyType.mjs';
5
5
  import { ReferralPeriod } from './ReferralPeriod.mjs';
6
6
  import { TelecomType } from './TelecomType.mjs';
7
- /**
8
- *
9
- *
10
- * Created by aduchate on 02/07/13, 11:59
11
- */
12
7
  export class DecryptedPatientHealthCareParty {
13
8
  constructor(partial) {
14
9
  this.type = undefined;
@@ -70,11 +65,6 @@ export class DecryptedPatientHealthCareParty {
70
65
  return res;
71
66
  }
72
67
  }
73
- /**
74
- *
75
- *
76
- * Created by aduchate on 02/07/13, 11:59
77
- */
78
68
  export class EncryptedPatientHealthCareParty {
79
69
  constructor(partial) {
80
70
  this.type = undefined;
@@ -12,6 +12,7 @@ import { SecurityMetadata } from './SecurityMetadata.mjs';
12
12
  export interface Service extends Encryptable, ICureDocument<string>, HasEndOfLife {
13
13
  transactionId: string | undefined;
14
14
  identifier: Array<Identifier>;
15
+ contactId: string | undefined;
15
16
  subContactIds: Array<string> | undefined;
16
17
  plansOfActionIds: Array<string> | undefined;
17
18
  healthElementsIds: Array<string> | undefined;
@@ -53,6 +54,7 @@ export declare class DecryptedService {
53
54
  id: string;
54
55
  transactionId: string | undefined;
55
56
  identifier: Array<Identifier>;
57
+ contactId: string | undefined;
56
58
  subContactIds: Array<string> | undefined;
57
59
  plansOfActionIds: Array<string> | undefined;
58
60
  healthElementsIds: Array<string> | undefined;
@@ -104,6 +106,7 @@ export declare class EncryptedService {
104
106
  id: string;
105
107
  transactionId: string | undefined;
106
108
  identifier: Array<Identifier>;
109
+ contactId: string | undefined;
107
110
  subContactIds: Array<string> | undefined;
108
111
  plansOfActionIds: Array<string> | undefined;
109
112
  healthElementsIds: Array<string> | undefined;
@@ -13,6 +13,7 @@ export class DecryptedService {
13
13
  var _a;
14
14
  this.transactionId = undefined;
15
15
  this.identifier = [];
16
+ this.contactId = undefined;
16
17
  this.subContactIds = undefined;
17
18
  this.plansOfActionIds = undefined;
18
19
  this.healthElementsIds = undefined;
@@ -49,6 +50,8 @@ export class DecryptedService {
49
50
  this.transactionId = partial.transactionId;
50
51
  if ('identifier' in partial && partial.identifier !== undefined)
51
52
  this.identifier = partial.identifier;
53
+ if ('contactId' in partial)
54
+ this.contactId = partial.contactId;
52
55
  if ('subContactIds' in partial)
53
56
  this.subContactIds = partial.subContactIds;
54
57
  if ('plansOfActionIds' in partial)
@@ -112,6 +115,8 @@ export class DecryptedService {
112
115
  if (this.transactionId != undefined)
113
116
  res['transactionId'] = this.transactionId;
114
117
  res['identifier'] = this.identifier.map((x0) => x0.toJSON());
118
+ if (this.contactId != undefined)
119
+ res['contactId'] = this.contactId;
115
120
  if (this.subContactIds != undefined)
116
121
  res['subContactIds'] = this.subContactIds.map((x0) => x0);
117
122
  if (this.plansOfActionIds != undefined)
@@ -171,6 +176,7 @@ export class DecryptedService {
171
176
  id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
172
177
  transactionId: expectString(extractEntry(jCpy, 'transactionId', false, path), true, [...path, ".transactionId"]),
173
178
  identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
179
+ contactId: expectString(extractEntry(jCpy, 'contactId', false, path), true, [...path, ".contactId"]),
174
180
  subContactIds: expectArray(extractEntry(jCpy, 'subContactIds', false, path), true, [...path, ".subContactIds"], (x0, p0) => expectString(x0, false, p0)),
175
181
  plansOfActionIds: expectArray(extractEntry(jCpy, 'plansOfActionIds', false, path), true, [...path, ".plansOfActionIds"], (x0, p0) => expectString(x0, false, p0)),
176
182
  healthElementsIds: expectArray(extractEntry(jCpy, 'healthElementsIds', false, path), true, [...path, ".healthElementsIds"], (x0, p0) => expectString(x0, false, p0)),
@@ -213,6 +219,7 @@ export class EncryptedService {
213
219
  var _a;
214
220
  this.transactionId = undefined;
215
221
  this.identifier = [];
222
+ this.contactId = undefined;
216
223
  this.subContactIds = undefined;
217
224
  this.plansOfActionIds = undefined;
218
225
  this.healthElementsIds = undefined;
@@ -249,6 +256,8 @@ export class EncryptedService {
249
256
  this.transactionId = partial.transactionId;
250
257
  if ('identifier' in partial && partial.identifier !== undefined)
251
258
  this.identifier = partial.identifier;
259
+ if ('contactId' in partial)
260
+ this.contactId = partial.contactId;
252
261
  if ('subContactIds' in partial)
253
262
  this.subContactIds = partial.subContactIds;
254
263
  if ('plansOfActionIds' in partial)
@@ -312,6 +321,8 @@ export class EncryptedService {
312
321
  if (this.transactionId != undefined)
313
322
  res['transactionId'] = this.transactionId;
314
323
  res['identifier'] = this.identifier.map((x0) => x0.toJSON());
324
+ if (this.contactId != undefined)
325
+ res['contactId'] = this.contactId;
315
326
  if (this.subContactIds != undefined)
316
327
  res['subContactIds'] = this.subContactIds.map((x0) => x0);
317
328
  if (this.plansOfActionIds != undefined)
@@ -371,6 +382,7 @@ export class EncryptedService {
371
382
  id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
372
383
  transactionId: expectString(extractEntry(jCpy, 'transactionId', false, path), true, [...path, ".transactionId"]),
373
384
  identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
385
+ contactId: expectString(extractEntry(jCpy, 'contactId', false, path), true, [...path, ".contactId"]),
374
386
  subContactIds: expectArray(extractEntry(jCpy, 'subContactIds', false, path), true, [...path, ".subContactIds"], (x0, p0) => expectString(x0, false, p0)),
375
387
  plansOfActionIds: expectArray(extractEntry(jCpy, 'plansOfActionIds', false, path), true, [...path, ".plansOfActionIds"], (x0, p0) => expectString(x0, false, p0)),
376
388
  healthElementsIds: expectArray(extractEntry(jCpy, 'healthElementsIds', false, path), true, [...path, ".healthElementsIds"], (x0, p0) => expectString(x0, false, p0)),
@@ -17,4 +17,4 @@ import { TimePicker } from './TimePicker.mjs';
17
17
  * validation rules, and optional codification and tagging.
18
18
  * /
19
19
  */
20
- export type Field = RadioButton | MeasureField | TimePicker | NumberField | TextField | DateTimePicker | CheckBox | DatePicker | DropdownField | MultipleChoice;
20
+ export type Field = TimePicker | MeasureField | RadioButton | NumberField | TextField | CheckBox | DropdownField | DatePicker | MultipleChoice | DateTimePicker;
@@ -15,16 +15,16 @@ export var StructureElement;
15
15
  function fromJSON(json, ignoreUnknownKeys = false, path = ['StructureElement']) {
16
16
  switch (json.$ktClass) {
17
17
  case 'com.icure.cardinal.sdk.model.embed.form.template.FieldsGroup': return FieldsGroup.fromJSON(json, ignoreUnknownKeys);
18
- case 'com.icure.cardinal.sdk.model.embed.form.template.RadioButton': return RadioButton.fromJSON(json, ignoreUnknownKeys);
19
- case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
20
18
  case 'com.icure.cardinal.sdk.model.embed.form.template.TimePicker': return TimePicker.fromJSON(json, ignoreUnknownKeys);
19
+ case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
20
+ case 'com.icure.cardinal.sdk.model.embed.form.template.RadioButton': return RadioButton.fromJSON(json, ignoreUnknownKeys);
21
21
  case 'com.icure.cardinal.sdk.model.embed.form.template.NumberField': return NumberField.fromJSON(json, ignoreUnknownKeys);
22
22
  case 'com.icure.cardinal.sdk.model.embed.form.template.TextField': return TextField.fromJSON(json, ignoreUnknownKeys);
23
- case 'com.icure.cardinal.sdk.model.embed.form.template.DateTimePicker': return DateTimePicker.fromJSON(json, ignoreUnknownKeys);
24
23
  case 'com.icure.cardinal.sdk.model.embed.form.template.CheckBox': return CheckBox.fromJSON(json, ignoreUnknownKeys);
25
- case 'com.icure.cardinal.sdk.model.embed.form.template.DatePicker': return DatePicker.fromJSON(json, ignoreUnknownKeys);
26
24
  case 'com.icure.cardinal.sdk.model.embed.form.template.DropdownField': return DropdownField.fromJSON(json, ignoreUnknownKeys);
25
+ case 'com.icure.cardinal.sdk.model.embed.form.template.DatePicker': return DatePicker.fromJSON(json, ignoreUnknownKeys);
27
26
  case 'com.icure.cardinal.sdk.model.embed.form.template.MultipleChoice': return MultipleChoice.fromJSON(json, ignoreUnknownKeys);
27
+ case 'com.icure.cardinal.sdk.model.embed.form.template.DateTimePicker': return DateTimePicker.fromJSON(json, ignoreUnknownKeys);
28
28
  default: throw new Error('Unexpected discriminator for StructureElement: ' + json.$ktClass);
29
29
  }
30
30
  }
@@ -9,7 +9,7 @@ import { OrPredicate } from './OrPredicate.mjs';
9
9
  * chain.
10
10
  * /
11
11
  */
12
- export type Predicate = AndPredicate | NotPredicate | OrPredicate | AlwaysPredicate | KeyValuePredicate;
12
+ export type Predicate = OrPredicate | AndPredicate | AlwaysPredicate | NotPredicate | KeyValuePredicate;
13
13
  export declare namespace Predicate {
14
14
  function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Predicate;
15
15
  }
@@ -8,10 +8,10 @@ export var Predicate;
8
8
  (function (Predicate) {
9
9
  function fromJSON(json, ignoreUnknownKeys = false, path = ['Predicate']) {
10
10
  switch (json.$ktClass) {
11
- case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.fromJSON(json, ignoreUnknownKeys);
12
- case 'com.icure.cardinal.sdk.model.filter.predicate.NotPredicate': return NotPredicate.fromJSON(json, ignoreUnknownKeys);
13
11
  case 'com.icure.cardinal.sdk.model.filter.predicate.OrPredicate': return OrPredicate.fromJSON(json, ignoreUnknownKeys);
12
+ case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.fromJSON(json, ignoreUnknownKeys);
14
13
  case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
14
+ case 'com.icure.cardinal.sdk.model.filter.predicate.NotPredicate': return NotPredicate.fromJSON(json, ignoreUnknownKeys);
15
15
  case 'com.icure.cardinal.sdk.model.filter.predicate.KeyValuePredicate': return KeyValuePredicate.fromJSON(json, ignoreUnknownKeys);
16
16
  default: throw new Error('Unexpected discriminator for Predicate: ' + json.$ktClass);
17
17
  }
@@ -84,7 +84,12 @@ export declare namespace AuthenticationMethod {
84
84
  /**
85
85
  * During login consider only configurations that can provide at least this authentication class
86
86
  */
87
- readonly minimumAuthenticationClass?: AuthenticationClass | undefined;
87
+ readonly minimumAuthenticationClass: AuthenticationClass | undefined;
88
+ /**
89
+ * (INTERNAL USE ONLY) only use the project id specified in the initialize method to choose the configuration of
90
+ * the external token, but not the group where to log in. This is probably not the option you are looking for.
91
+ */
92
+ readonly doNotUseProjectIdForGroupSelection: boolean | undefined;
88
93
  constructor(
89
94
  /**
90
95
  * The id of the configuration that specifies how the token should be validated and how it should be used to find
@@ -96,11 +101,10 @@ export declare namespace AuthenticationMethod {
96
101
  /**
97
102
  * A token used to perform the external authentication
98
103
  */
99
- token: string,
100
- /**
101
- * During login consider only configurations that can provide at least this authentication class
102
- */
103
- minimumAuthenticationClass?: AuthenticationClass | undefined);
104
+ token: string, props?: {
105
+ minimumAuthenticationClass?: AuthenticationClass;
106
+ doNotUseProjectIdForGroupSelection?: boolean;
107
+ });
104
108
  }
105
109
  class JwtCredentials {
106
110
  /**
@@ -193,7 +197,10 @@ export declare namespace SecretProviderAuthenticationOptions {
193
197
  class ExternalAuthenticationToken {
194
198
  readonly token: string;
195
199
  readonly configId: string;
196
- constructor(token: string, configId: string);
200
+ readonly doNotUseProjectIdForGroupSelection: boolean | undefined;
201
+ constructor(token: string, configId: string, props?: {
202
+ doNotUseProjectIdForGroupSelection?: boolean;
203
+ });
197
204
  }
198
205
  }
199
206
  type InitialSecret = InitialSecret.Password | InitialSecret.LongLivedToken | InitialSecret.ExternalAuthenticationToken;
@@ -272,7 +279,8 @@ export declare namespace AuthSecretDetails {
272
279
  class ConfiguredExternalAuthenticationDetails {
273
280
  readonly configId: string;
274
281
  readonly secret: string;
275
- readonly minimumAuthenticationClass?: AuthenticationClass | undefined;
282
+ readonly minimumAuthenticationClass: AuthenticationClass | undefined;
283
+ readonly doNotUseProjectIdForGroupSelection: boolean | undefined;
276
284
  /**
277
285
  * Login using a token or other secret provided by another authentication service configured for your project.
278
286
  *
@@ -282,10 +290,16 @@ export declare namespace AuthSecretDetails {
282
290
  *
283
291
  * @param configId id of the configuration to use for authentication.
284
292
  * @param secret the token or another secret that will be used for authentication.
285
- * @param minimumAuthenticationClass only consider configurations that can provide at least this authentication class. The actual
293
+ * @param props
294
+ * - minimumAuthenticationClass only consider configurations that can provide at least this authentication class. The actual
286
295
  * authentication class obtained for the token may be higher.
296
+ * - doNotUseProjectIdForGroupSelection (INTERNAL USE ONLY) only use the project id specified in the initialize method to choose the configuration of
297
+ * the external token, but not the group where to log in. This is probably not the option you are looking for.
287
298
  */
288
- constructor(configId: string, secret: string, minimumAuthenticationClass?: AuthenticationClass | undefined);
299
+ constructor(configId: string, secret: string, props?: {
300
+ minimumAuthenticationClass?: AuthenticationClass;
301
+ doNotUseProjectIdForGroupSelection?: boolean;
302
+ });
289
303
  }
290
304
  }
291
305
  export type AuthSecretDetails = AuthSecretDetails.PasswordDetails | AuthSecretDetails.TwoFactorAuthTokenDetails | AuthSecretDetails.ShortLivedTokenDetails | AuthSecretDetails.LongLivedTokenDetails | AuthSecretDetails.ConfiguredExternalAuthenticationDetails;
@@ -65,14 +65,11 @@ export var AuthenticationMethod;
65
65
  /**
66
66
  * A token used to perform the external authentication
67
67
  */
68
- token,
69
- /**
70
- * During login consider only configurations that can provide at least this authentication class
71
- */
72
- minimumAuthenticationClass) {
68
+ token, props = {}) {
73
69
  this.configId = configId;
74
70
  this.token = token;
75
- this.minimumAuthenticationClass = minimumAuthenticationClass;
71
+ this.minimumAuthenticationClass = props.minimumAuthenticationClass;
72
+ this.doNotUseProjectIdForGroupSelection = props.doNotUseProjectIdForGroupSelection;
76
73
  }
77
74
  }
78
75
  UsingCredentials.ExternalAuthenticationToken = ExternalAuthenticationToken;
@@ -135,9 +132,10 @@ export var SecretProviderAuthenticationOptions;
135
132
  }
136
133
  InitialSecret.LongLivedToken = LongLivedToken;
137
134
  class ExternalAuthenticationToken {
138
- constructor(token, configId) {
135
+ constructor(token, configId, props = {}) {
139
136
  this.token = token;
140
137
  this.configId = configId;
138
+ this.doNotUseProjectIdForGroupSelection = props.doNotUseProjectIdForGroupSelection;
141
139
  }
142
140
  }
143
141
  InitialSecret.ExternalAuthenticationToken = ExternalAuthenticationToken;
@@ -193,13 +191,17 @@ export var AuthSecretDetails;
193
191
  *
194
192
  * @param configId id of the configuration to use for authentication.
195
193
  * @param secret the token or another secret that will be used for authentication.
196
- * @param minimumAuthenticationClass only consider configurations that can provide at least this authentication class. The actual
194
+ * @param props
195
+ * - minimumAuthenticationClass only consider configurations that can provide at least this authentication class. The actual
197
196
  * authentication class obtained for the token may be higher.
197
+ * - doNotUseProjectIdForGroupSelection (INTERNAL USE ONLY) only use the project id specified in the initialize method to choose the configuration of
198
+ * the external token, but not the group where to log in. This is probably not the option you are looking for.
198
199
  */
199
- constructor(configId, secret, minimumAuthenticationClass) {
200
+ constructor(configId, secret, props = {}) {
200
201
  this.configId = configId;
201
202
  this.secret = secret;
202
- this.minimumAuthenticationClass = minimumAuthenticationClass;
203
+ this.minimumAuthenticationClass = props.minimumAuthenticationClass;
204
+ this.doNotUseProjectIdForGroupSelection = props.doNotUseProjectIdForGroupSelection;
203
205
  }
204
206
  }
205
207
  AuthSecretDetails.ConfiguredExternalAuthenticationDetails = ConfiguredExternalAuthenticationDetails;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/cardinal-sdk",
3
- "version": "2.1.2",
3
+ "version": "2.3.0",
4
4
  "main": "cardinal-sdk-ts.mjs",
5
5
  "types": "cardinal-sdk-ts.d.mts",
6
6
  "devDependencies": {