@icure/cardinal-sdk 2.6.0 → 2.7.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.
@@ -300,7 +300,7 @@ interface MessageFiltersFactory {
300
300
  * In-group version of [lifecycleBetweenForDataOwner].
301
301
  * The data owner can be from a different group than the group of the user executing the query.
302
302
  */
303
- lifecycleBetweenForDataOwnerInGroupInGroup(dataOwner: EntityReferenceInGroup, startTimestamp: number | undefined, endTimestamp: number | undefined, descending: boolean): BaseFilterOptions<Message>;
303
+ lifecycleBetweenForDataOwnerInGroup(dataOwner: EntityReferenceInGroup, startTimestamp: number | undefined, endTimestamp: number | undefined, descending: boolean): BaseFilterOptions<Message>;
304
304
  /**
305
305
  *
306
306
  * Options for message filtering which match all messages shared directly (i.e. ignoring hierarchies) with the current data owner
@@ -27,7 +27,7 @@ export const MessageFilters = {
27
27
  byInvoiceIds: (invoiceIds) => InternalMessageFiltersObj.getInstance().byInvoiceIds(invoiceIds),
28
28
  byParentIds: (parentIds) => InternalMessageFiltersObj.getInstance().byParentIds(parentIds),
29
29
  lifecycleBetweenForDataOwner: (dataOwnerId, startTimestamp, endTimestamp, descending) => InternalMessageFiltersObj.getInstance().lifecycleBetweenForDataOwner(dataOwnerId, startTimestamp, endTimestamp, descending),
30
- lifecycleBetweenForDataOwnerInGroupInGroup: (dataOwner, startTimestamp, endTimestamp, descending) => InternalMessageFiltersObj.getInstance().lifecycleBetweenForDataOwnerInGroupInGroup(dataOwner, startTimestamp, endTimestamp, descending),
30
+ lifecycleBetweenForDataOwnerInGroup: (dataOwner, startTimestamp, endTimestamp, descending) => InternalMessageFiltersObj.getInstance().lifecycleBetweenForDataOwnerInGroup(dataOwner, startTimestamp, endTimestamp, descending),
31
31
  lifecycleBetweenForSelf: (startTimestamp, endTimestamp, descending) => InternalMessageFiltersObj.getInstance().lifecycleBetweenForSelf(startTimestamp, endTimestamp, descending),
32
32
  byCodeForDataOwner: (dataOwnerId, codeType, options) => InternalMessageFiltersObj.getInstance().byCodeForDataOwner(dataOwnerId, codeType, options),
33
33
  byCodeForDataOwnerInGroup: (dataOwner, codeType, options) => InternalMessageFiltersObj.getInstance().byCodeForDataOwnerInGroup(dataOwner, codeType, options),
@@ -48,6 +48,12 @@ if (typeof Math.clz32 === 'undefined') {
48
48
  };
49
49
  }(Math.log, Math.LN2);
50
50
  }
51
+ if (typeof String.prototype.startsWith === 'undefined') {
52
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
53
+ position = position || 0;
54
+ return this.lastIndexOf(searchString, position) === position;
55
+ }});
56
+ }
51
57
  if (typeof String.prototype.endsWith === 'undefined') {
52
58
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
53
59
  var subjectString = this.toString();
@@ -59,12 +65,6 @@ if (typeof String.prototype.endsWith === 'undefined') {
59
65
  return lastIndex !== -1 && lastIndex === position;
60
66
  }});
61
67
  }
62
- if (typeof String.prototype.startsWith === 'undefined') {
63
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
64
- position = position || 0;
65
- return this.lastIndexOf(searchString, position) === position;
66
- }});
67
- }
68
68
  //endregion
69
69
  //region block: imports
70
70
  var imul_0 = Math.imul;
@@ -93,8 +93,8 @@ initMetadataForInterface(Entry, 'Entry');
93
93
  initMetadataForInterface(KtMap, 'Map');
94
94
  initMetadataForInterface(KtSet, 'Set', VOID, VOID, [Collection]);
95
95
  initMetadataForInterface(MutableIterable, 'MutableIterable');
96
- initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, MutableIterable, Collection]);
97
- initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, MutableIterable, Collection]);
96
+ initMetadataForInterface(KtMutableList, 'MutableList', VOID, VOID, [KtList, Collection, MutableIterable]);
97
+ initMetadataForInterface(KtMutableSet, 'MutableSet', VOID, VOID, [KtSet, Collection, MutableIterable]);
98
98
  initMetadataForInterface(KtMutableMap, 'MutableMap', VOID, VOID, [KtMap]);
99
99
  initMetadataForCompanion(Companion_0);
100
100
  initMetadataForClass(Enum, 'Enum', VOID, VOID, [Comparable]);
@@ -115,7 +115,7 @@ initMetadataForInterface(AutoCloseable, 'AutoCloseable');
115
115
  initMetadataForInterface(Comparator, 'Comparator');
116
116
  initMetadataForObject(Unit, 'Unit');
117
117
  initMetadataForClass(AbstractCollection, 'AbstractCollection', VOID, VOID, [Collection]);
118
- initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [MutableIterable, Collection]);
118
+ initMetadataForClass(AbstractMutableCollection, 'AbstractMutableCollection', VOID, AbstractCollection, [Collection, MutableIterable]);
119
119
  initMetadataForClass(IteratorImpl, 'IteratorImpl');
120
120
  initMetadataForClass(ListIteratorImpl, 'ListIteratorImpl', VOID, IteratorImpl);
121
121
  initMetadataForClass(AbstractMutableList, 'AbstractMutableList', VOID, AbstractMutableCollection, [KtMutableList]);
@@ -128,7 +128,7 @@ initMetadataForCompanion(Companion_2);
128
128
  initMetadataForClass(ArrayList, 'ArrayList', ArrayList_init_$Create$, AbstractMutableList, [KtMutableList, RandomAccess]);
129
129
  initMetadataForClass(HashMap, 'HashMap', HashMap_init_$Create$, AbstractMutableMap, [KtMutableMap]);
130
130
  initMetadataForClass(HashMapKeys, 'HashMapKeys', VOID, AbstractMutableSet, [KtMutableSet]);
131
- initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [MutableIterable, Collection]);
131
+ initMetadataForClass(HashMapValues, 'HashMapValues', VOID, AbstractMutableCollection, [Collection, MutableIterable]);
132
132
  initMetadataForClass(HashMapEntrySetBase, 'HashMapEntrySetBase', VOID, AbstractMutableSet, [KtMutableSet]);
133
133
  initMetadataForClass(HashMapEntrySet, 'HashMapEntrySet', VOID, HashMapEntrySetBase);
134
134
  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.s1d(cause) : $super.s1d.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.s1d(cause) : $super.s1d.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, [SendChannel, ReceiveChannel], [1, 0]);
265
+ initMetadataForClass(ChannelCoroutine, 'ChannelCoroutine', VOID, 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, [ProducerScope], [1, 0]);
package/model/Group.d.mts CHANGED
@@ -113,6 +113,18 @@ export declare class Group implements StoredDocument, HasTags {
113
113
  */
114
114
  projectId: string | undefined;
115
115
  templates: Group.TemplatesConfiguration | undefined;
116
+ /**
117
+ *
118
+ *
119
+ * The versions of the custom design doc schema applied to the group.
120
+ */
121
+ designDocSchemaVersions: Array<number>;
122
+ /**
123
+ *
124
+ *
125
+ * The version of the custom design doc schema to apply by default children groups on creation.
126
+ */
127
+ defaultChildrenSchemaVersion: number | undefined;
116
128
  constructor(partial: Partial<Group> & Pick<Group, "minimumAuthenticationClassForElevatedPrivileges">);
117
129
  toJSON(): object;
118
130
  static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Group;
package/model/Group.mjs CHANGED
@@ -98,6 +98,18 @@ export class Group {
98
98
  */
99
99
  this.projectId = undefined;
100
100
  this.templates = undefined;
101
+ /**
102
+ *
103
+ *
104
+ * The versions of the custom design doc schema applied to the group.
105
+ */
106
+ this.designDocSchemaVersions = [];
107
+ /**
108
+ *
109
+ *
110
+ * The version of the custom design doc schema to apply by default children groups on creation.
111
+ */
112
+ this.defaultChildrenSchemaVersion = undefined;
101
113
  this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
102
114
  if ('rev' in partial)
103
115
  this.rev = partial.rev;
@@ -134,6 +146,10 @@ export class Group {
134
146
  this.projectId = partial.projectId;
135
147
  if ('templates' in partial)
136
148
  this.templates = partial.templates;
149
+ if ('designDocSchemaVersions' in partial && partial.designDocSchemaVersions !== undefined)
150
+ this.designDocSchemaVersions = partial.designDocSchemaVersions;
151
+ if ('defaultChildrenSchemaVersion' in partial)
152
+ this.defaultChildrenSchemaVersion = partial.defaultChildrenSchemaVersion;
137
153
  }
138
154
  toJSON() {
139
155
  const res = {};
@@ -165,6 +181,9 @@ export class Group {
165
181
  res['projectId'] = this.projectId;
166
182
  if (this.templates != undefined)
167
183
  res['templates'] = this.templates.toJSON();
184
+ res['designDocSchemaVersions'] = this.designDocSchemaVersions.map((x0) => x0);
185
+ if (this.defaultChildrenSchemaVersion != undefined)
186
+ res['defaultChildrenSchemaVersion'] = this.defaultChildrenSchemaVersion;
168
187
  return res;
169
188
  }
170
189
  static fromJSON(json, ignoreUnknownKeys = false, path = ['Group']) {
@@ -191,6 +210,8 @@ export class Group {
191
210
  superGroup: expectString(extractEntry(jCpy, 'superGroup', false, path), true, [...path, ".superGroup"]),
192
211
  projectId: expectString(extractEntry(jCpy, 'projectId', false, path), true, [...path, ".projectId"]),
193
212
  templates: expectObject(extractEntry(jCpy, 'templates', false, path), true, ignoreUnknownKeys, [...path, ".templates"], Group.TemplatesConfiguration.fromJSON),
213
+ designDocSchemaVersions: expectArray(extractEntry(jCpy, 'designDocSchemaVersions', false, path), false, [...path, ".designDocSchemaVersions"], (x0, p0) => expectNumber(x0, false, true, p0)),
214
+ defaultChildrenSchemaVersion: expectNumber(extractEntry(jCpy, 'defaultChildrenSchemaVersion', false, path), true, true, [...path, ".defaultChildrenSchemaVersion"]),
194
215
  });
195
216
  if (!ignoreUnknownKeys) {
196
217
  const unused = Object.keys(jCpy);
@@ -8,10 +8,10 @@ export var CryptoActor;
8
8
  function fromJSON(json, ignoreUnknownKeys = false, path = ['CryptoActor']) {
9
9
  switch (json.$ktClass) {
10
10
  case 'com.icure.cardinal.sdk.model.Device': return Device.fromJSON(json, ignoreUnknownKeys);
11
- case 'com.icure.cardinal.sdk.model.CryptoActorStub': return CryptoActorStub.fromJSON(json, ignoreUnknownKeys);
12
- case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
13
11
  case 'com.icure.cardinal.sdk.model.EncryptedPatient': return EncryptedPatient.fromJSON(json, ignoreUnknownKeys);
14
12
  case 'com.icure.cardinal.sdk.model.DecryptedPatient': return DecryptedPatient.fromJSON(json, ignoreUnknownKeys);
13
+ case 'com.icure.cardinal.sdk.model.CryptoActorStub': return CryptoActorStub.fromJSON(json, ignoreUnknownKeys);
14
+ case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
15
15
  default: throw new Error('Unexpected discriminator for CryptoActor: ' + json.$ktClass);
16
16
  }
17
17
  }
@@ -17,13 +17,6 @@ export declare class DesignDocument {
17
17
  * The current revision of the design document.
18
18
  */
19
19
  rev: string | undefined;
20
- /**
21
- *
22
- * A map of revision history entries.
23
- */
24
- revHistory: {
25
- [key: string]: string;
26
- };
27
20
  /**
28
21
  *
29
22
  * The programming language used for the design document functions.
@@ -17,11 +17,6 @@ export class DesignDocument {
17
17
  * The current revision of the design document.
18
18
  */
19
19
  this.rev = undefined;
20
- /**
21
- *
22
- * A map of revision history entries.
23
- */
24
- this.revHistory = {};
25
20
  /**
26
21
  *
27
22
  * The programming language used for the design document functions.
@@ -55,8 +50,6 @@ export class DesignDocument {
55
50
  this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
56
51
  if ('rev' in partial)
57
52
  this.rev = partial.rev;
58
- if ('revHistory' in partial && partial.revHistory !== undefined)
59
- this.revHistory = partial.revHistory;
60
53
  if ('language' in partial)
61
54
  this.language = partial.language;
62
55
  if ('views' in partial && partial.views !== undefined)
@@ -75,7 +68,6 @@ export class DesignDocument {
75
68
  res['id'] = this.id;
76
69
  if (this.rev != undefined)
77
70
  res['rev'] = this.rev;
78
- res['revHistory'] = Object.fromEntries(Object.entries(this.revHistory).map(([k0, v0]) => [k0, v0]));
79
71
  if (this.language != undefined)
80
72
  res['language'] = this.language;
81
73
  res['views'] = Object.fromEntries(Object.entries(this.views).map(([k0, v0]) => [k0, v0.toJSON()]));
@@ -93,7 +85,6 @@ export class DesignDocument {
93
85
  const res = new DesignDocument({
94
86
  id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
95
87
  rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
96
- revHistory: expectMap(extractEntry(jCpy, 'revHistory', false, path), false, [...path, ".revHistory"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
97
88
  language: expectString(extractEntry(jCpy, 'language', false, path), true, [...path, ".language"]),
98
89
  views: expectMap(extractEntry(jCpy, 'views', false, path), false, [...path, ".views"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectObject(v0, false, ignoreUnknownKeys, p0, View.fromJSON)),
99
90
  lists: expectMap(extractEntry(jCpy, 'lists', false, path), false, [...path, ".lists"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
@@ -75,13 +75,6 @@ export declare class ReplicatorDocument implements Versionable<string> {
75
75
  revsInfo: Array<{
76
76
  [key: string]: string;
77
77
  }> | undefined;
78
- /**
79
- *
80
- * A map of the document revision history.
81
- */
82
- revHistory: {
83
- [key: string]: string;
84
- } | undefined;
85
78
  constructor(partial: Partial<ReplicatorDocument>);
86
79
  toJSON(): object;
87
80
  static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ReplicatorDocument;
@@ -72,11 +72,6 @@ export class ReplicatorDocument {
72
72
  * Information about the document revisions.
73
73
  */
74
74
  this.revsInfo = undefined;
75
- /**
76
- *
77
- * A map of the document revision history.
78
- */
79
- this.revHistory = undefined;
80
75
  this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
81
76
  if ('rev' in partial)
82
77
  this.rev = partial.rev;
@@ -102,8 +97,6 @@ export class ReplicatorDocument {
102
97
  this.errorCount = partial.errorCount;
103
98
  if ('revsInfo' in partial)
104
99
  this.revsInfo = partial.revsInfo;
105
- if ('revHistory' in partial)
106
- this.revHistory = partial.revHistory;
107
100
  }
108
101
  toJSON() {
109
102
  const res = {};
@@ -132,8 +125,6 @@ export class ReplicatorDocument {
132
125
  res['errorCount'] = this.errorCount;
133
126
  if (this.revsInfo != undefined)
134
127
  res['revsInfo'] = this.revsInfo.map((x0) => Object.fromEntries(Object.entries(x0).map(([k1, v1]) => [k1, v1])));
135
- if (this.revHistory != undefined)
136
- res['revHistory'] = Object.fromEntries(Object.entries(this.revHistory).map(([k0, v0]) => [k0, v0]));
137
128
  return res;
138
129
  }
139
130
  static fromJSON(json, ignoreUnknownKeys = false, path = ['ReplicatorDocument']) {
@@ -154,7 +145,6 @@ export class ReplicatorDocument {
154
145
  replicationStats: expectObject(extractEntry(jCpy, 'replicationStats', false, path), true, ignoreUnknownKeys, [...path, ".replicationStats"], ReplicationStats.fromJSON),
155
146
  errorCount: expectNumber(extractEntry(jCpy, 'errorCount', false, path), true, true, [...path, ".errorCount"]),
156
147
  revsInfo: expectArray(extractEntry(jCpy, 'revsInfo', false, path), true, [...path, ".revsInfo"], (x0, p0) => expectMap(x0, false, p0, (k1, p1) => expectString(k1, false, p1), (v1, p1) => expectString(v1, false, p1))),
157
- revHistory: expectMap(extractEntry(jCpy, 'revHistory', false, path), true, [...path, ".revHistory"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
158
148
  });
159
149
  if (!ignoreUnknownKeys) {
160
150
  const unused = Object.keys(jCpy);
@@ -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 = DropdownField | DateTimePicker | RadioButton | MultipleChoice | MeasureField | CheckBox | TextField | TimePicker | DatePicker | NumberField;
20
+ export type Field = TextField | MultipleChoice | TimePicker | DatePicker | RadioButton | MeasureField | DropdownField | NumberField | CheckBox | DateTimePicker;
@@ -6,7 +6,7 @@ import { FieldsGroup } from './FieldsGroup.mjs';
6
6
  * groups.
7
7
  * /
8
8
  */
9
- export type StructureElement = Field | FieldsGroup;
9
+ export type StructureElement = FieldsGroup | Field;
10
10
  export declare namespace StructureElement {
11
11
  function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): StructureElement;
12
12
  }
@@ -14,17 +14,17 @@ export var StructureElement;
14
14
  (function (StructureElement) {
15
15
  function fromJSON(json, ignoreUnknownKeys = false, path = ['StructureElement']) {
16
16
  switch (json.$ktClass) {
17
- case 'com.icure.cardinal.sdk.model.embed.form.template.DropdownField': return DropdownField.fromJSON(json, ignoreUnknownKeys);
18
- case 'com.icure.cardinal.sdk.model.embed.form.template.DateTimePicker': return DateTimePicker.fromJSON(json, ignoreUnknownKeys);
19
- case 'com.icure.cardinal.sdk.model.embed.form.template.RadioButton': return RadioButton.fromJSON(json, ignoreUnknownKeys);
20
- case 'com.icure.cardinal.sdk.model.embed.form.template.MultipleChoice': return MultipleChoice.fromJSON(json, ignoreUnknownKeys);
21
- case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
22
- case 'com.icure.cardinal.sdk.model.embed.form.template.CheckBox': return CheckBox.fromJSON(json, ignoreUnknownKeys);
17
+ case 'com.icure.cardinal.sdk.model.embed.form.template.FieldsGroup': return FieldsGroup.fromJSON(json, ignoreUnknownKeys);
23
18
  case 'com.icure.cardinal.sdk.model.embed.form.template.TextField': return TextField.fromJSON(json, ignoreUnknownKeys);
19
+ case 'com.icure.cardinal.sdk.model.embed.form.template.MultipleChoice': return MultipleChoice.fromJSON(json, ignoreUnknownKeys);
24
20
  case 'com.icure.cardinal.sdk.model.embed.form.template.TimePicker': return TimePicker.fromJSON(json, ignoreUnknownKeys);
25
21
  case 'com.icure.cardinal.sdk.model.embed.form.template.DatePicker': return DatePicker.fromJSON(json, ignoreUnknownKeys);
22
+ case 'com.icure.cardinal.sdk.model.embed.form.template.RadioButton': return RadioButton.fromJSON(json, ignoreUnknownKeys);
23
+ case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
24
+ case 'com.icure.cardinal.sdk.model.embed.form.template.DropdownField': return DropdownField.fromJSON(json, ignoreUnknownKeys);
26
25
  case 'com.icure.cardinal.sdk.model.embed.form.template.NumberField': return NumberField.fromJSON(json, ignoreUnknownKeys);
27
- case 'com.icure.cardinal.sdk.model.embed.form.template.FieldsGroup': return FieldsGroup.fromJSON(json, ignoreUnknownKeys);
26
+ case 'com.icure.cardinal.sdk.model.embed.form.template.CheckBox': return CheckBox.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
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ *
3
+ * A set of factory methods that produce the same kind of filter, differing only in how parameters are
4
+ * passed (for-self vs. for-data-owner, in-group variants, full entities vs. secret ids).
5
+ *
6
+ * @property name a short semantic name for the group (the operation, without the parameter-passing suffixes).
7
+ * @property factoryMethods the names of the factory methods of the corresponding `XFilters` object that
8
+ * belong to this group, in source order.
9
+ * @property targetFilter the simple name of the `AbstractFilter` actually sent to the backend (or the
10
+ * possible filters, separated by " or ", for the rare groups that branch on their input).
11
+ * @property views the views that are used on the backend to provide the results for the options in this group.
12
+ */
13
+ export declare class FilterOptionGroupWithViews {
14
+ name: string;
15
+ factoryMethods: Array<string>;
16
+ targetFilter: string;
17
+ views: Array<string>;
18
+ constructor(partial: Partial<FilterOptionGroupWithViews> & Pick<FilterOptionGroupWithViews, "name" | "factoryMethods" | "targetFilter" | "views">);
19
+ toJSON(): object;
20
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): FilterOptionGroupWithViews;
21
+ }
@@ -0,0 +1,47 @@
1
+ // auto-generated file
2
+ import { expectArray, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ /**
4
+ *
5
+ * A set of factory methods that produce the same kind of filter, differing only in how parameters are
6
+ * passed (for-self vs. for-data-owner, in-group variants, full entities vs. secret ids).
7
+ *
8
+ * @property name a short semantic name for the group (the operation, without the parameter-passing suffixes).
9
+ * @property factoryMethods the names of the factory methods of the corresponding `XFilters` object that
10
+ * belong to this group, in source order.
11
+ * @property targetFilter the simple name of the `AbstractFilter` actually sent to the backend (or the
12
+ * possible filters, separated by " or ", for the rare groups that branch on their input).
13
+ * @property views the views that are used on the backend to provide the results for the options in this group.
14
+ */
15
+ export class FilterOptionGroupWithViews {
16
+ constructor(partial) {
17
+ this.name = partial.name;
18
+ this.factoryMethods = partial.factoryMethods;
19
+ this.targetFilter = partial.targetFilter;
20
+ this.views = partial.views;
21
+ }
22
+ toJSON() {
23
+ const res = {};
24
+ res['name'] = this.name;
25
+ res['factoryMethods'] = this.factoryMethods.map((x0) => x0);
26
+ res['targetFilter'] = this.targetFilter;
27
+ res['views'] = this.views.map((x0) => x0);
28
+ return res;
29
+ }
30
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['FilterOptionGroupWithViews']) {
31
+ if (typeof json != 'object')
32
+ throw new Error(`Expected json object at path ${path.join("")}`);
33
+ const jCpy = Object.assign({}, json);
34
+ const res = new FilterOptionGroupWithViews({
35
+ name: expectString(extractEntry(jCpy, 'name', true, path), false, [...path, ".name"]),
36
+ factoryMethods: expectArray(extractEntry(jCpy, 'factoryMethods', true, path), false, [...path, ".factoryMethods"], (x0, p0) => expectString(x0, false, p0)),
37
+ targetFilter: expectString(extractEntry(jCpy, 'targetFilter', true, path), false, [...path, ".targetFilter"]),
38
+ views: expectArray(extractEntry(jCpy, 'views', true, path), false, [...path, ".views"], (x0, p0) => expectString(x0, false, p0)),
39
+ });
40
+ if (!ignoreUnknownKeys) {
41
+ const unused = Object.keys(jCpy);
42
+ if (unused.length > 0)
43
+ throw new Error(`Unexpected key(s) for json object FilterOptionGroupWithViews at path ${path.join("")}: ${unused}`);
44
+ }
45
+ return res;
46
+ }
47
+ }
@@ -9,7 +9,7 @@ import { OrPredicate } from './OrPredicate.mjs';
9
9
  * chain.
10
10
  * /
11
11
  */
12
- export type Predicate = AlwaysPredicate | OrPredicate | NotPredicate | AndPredicate | KeyValuePredicate;
12
+ export type Predicate = AndPredicate | OrPredicate | 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.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
11
+ case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.fromJSON(json, ignoreUnknownKeys);
12
12
  case 'com.icure.cardinal.sdk.model.filter.predicate.OrPredicate': return OrPredicate.fromJSON(json, ignoreUnknownKeys);
13
+ case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
13
14
  case 'com.icure.cardinal.sdk.model.filter.predicate.NotPredicate': return NotPredicate.fromJSON(json, ignoreUnknownKeys);
14
- case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.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
  }
package/model.d.mts CHANGED
@@ -181,6 +181,7 @@ export * from './model/filter/predicate/Operator.mjs';
181
181
  export * from './model/filter/predicate/OrPredicate.mjs';
182
182
  export * from './model/filter/predicate/AlwaysPredicate.mjs';
183
183
  export * from './model/filter/predicate/AndPredicate.mjs';
184
+ export * from './model/filter/FilterOptionGroupWithViews.mjs';
184
185
  export * from './model/GroupDeletionReport.mjs';
185
186
  export * from './model/Message.mjs';
186
187
  export * from './model/Agenda.mjs';
package/model.mjs CHANGED
@@ -181,6 +181,7 @@ export * from './model/filter/predicate/Operator.mjs';
181
181
  export * from './model/filter/predicate/OrPredicate.mjs';
182
182
  export * from './model/filter/predicate/AlwaysPredicate.mjs';
183
183
  export * from './model/filter/predicate/AndPredicate.mjs';
184
+ export * from './model/filter/FilterOptionGroupWithViews.mjs';
184
185
  export * from './model/GroupDeletionReport.mjs';
185
186
  export * from './model/Message.mjs';
186
187
  export * from './model/Agenda.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/cardinal-sdk",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "main": "cardinal-sdk-ts.mjs",
5
5
  "types": "cardinal-sdk-ts.d.mts",
6
6
  "devDependencies": {