@icure/cardinal-sdk 2.13.3 → 2.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
- package/cardinal-sdk-ts.mjs +43138 -43072
- package/cardinal-sdk.mjs +79532 -78159
- package/kotlin-kotlin-stdlib.mjs +6 -6
- package/kotlinx-coroutines-core.mjs +8 -8
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +12 -0
- package/options/SdkOptions.d.mts +64 -0
- package/package.json +1 -1
package/kotlin-kotlin-stdlib.mjs
CHANGED
|
@@ -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;
|
|
@@ -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
|
-
|
|
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, [
|
|
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]);
|
|
@@ -294,7 +294,7 @@ initMetadataForClass(ContextScope, 'ContextScope', VOID, VOID, [CoroutineScope])
|
|
|
294
294
|
initMetadataForClass(Symbol, 'Symbol');
|
|
295
295
|
initMetadataForInterface(SelectInstance, 'SelectInstance');
|
|
296
296
|
initMetadataForClass(ClauseData, 'ClauseData', VOID, VOID, VOID, [1]);
|
|
297
|
-
initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler,
|
|
297
|
+
initMetadataForClass(SelectImplementation, 'SelectImplementation', VOID, VOID, [CancelHandler, Waiter, SelectInstance], [0, 2]);
|
|
298
298
|
initMetadataForClass(TrySelectDetailedResult, 'TrySelectDetailedResult', VOID, Enum);
|
|
299
299
|
initMetadataForClass(CancellableContinuationWithOwner, 'CancellableContinuationWithOwner', VOID, VOID, [CancellableContinuation, Waiter]);
|
|
300
300
|
initMetadataForClass(SemaphoreAndMutexImpl, 'SemaphoreAndMutexImpl', VOID, VOID, VOID, [0]);
|
|
@@ -834,6 +834,17 @@ function get_jsonObject(_this__u8e3s4) {
|
|
|
834
834
|
}
|
|
835
835
|
return tmp;
|
|
836
836
|
}
|
|
837
|
+
function get_jsonArray(_this__u8e3s4) {
|
|
838
|
+
_init_properties_JsonElement_kt__7cbdc2();
|
|
839
|
+
var tmp0_elvis_lhs = _this__u8e3s4 instanceof JsonArray ? _this__u8e3s4 : null;
|
|
840
|
+
var tmp;
|
|
841
|
+
if (tmp0_elvis_lhs == null) {
|
|
842
|
+
error(_this__u8e3s4, 'JsonArray');
|
|
843
|
+
} else {
|
|
844
|
+
tmp = tmp0_elvis_lhs;
|
|
845
|
+
}
|
|
846
|
+
return tmp;
|
|
847
|
+
}
|
|
837
848
|
var properties_initialized_JsonElement_kt_abxy8s;
|
|
838
849
|
function _init_properties_JsonElement_kt__7cbdc2() {
|
|
839
850
|
if (!properties_initialized_JsonElement_kt_abxy8s) {
|
|
@@ -6737,6 +6748,7 @@ export {
|
|
|
6737
6748
|
decodeFromDynamic as decodeFromDynamic3axi482yesc93,
|
|
6738
6749
|
get_doubleOrNull as get_doubleOrNull2fo14gjg922um,
|
|
6739
6750
|
encodeToDynamic as encodeToDynamicsae9c2u7066d,
|
|
6751
|
+
get_jsonArray as get_jsonArray18sglwhl4pclz,
|
|
6740
6752
|
get_jsonObject as get_jsonObject2u4z2ch1uuca9,
|
|
6741
6753
|
get_jsonPrimitive as get_jsonPrimitivez17tyd5rw1ql,
|
|
6742
6754
|
get_longOrNull as get_longOrNull1kg1ha9scz5pa,
|
package/options/SdkOptions.d.mts
CHANGED
|
@@ -81,6 +81,19 @@ export interface SdkOptions {
|
|
|
81
81
|
* If not null the SDK will immediately set the data owner scope to the provided value after login.
|
|
82
82
|
*/
|
|
83
83
|
readonly dataOwnerScope?: string;
|
|
84
|
+
/**
|
|
85
|
+
* If provided, when the backend returns a list of stored entities (get by ids, filter, find, list, ...) the entities
|
|
86
|
+
* that can't be deserialized are dropped from the result instead of failing the whole request, and this function is
|
|
87
|
+
* called once for each dropped entity. Methods returning lists may then return fewer entities than requested.
|
|
88
|
+
*
|
|
89
|
+
* Single entity reads, write operations and the entities used internally by the crypto layer are never affected.
|
|
90
|
+
* If the function throws, the request fails with that error.
|
|
91
|
+
*
|
|
92
|
+
* The `json` of the entity contains all its non-encrypted data, including personal data: avoid logging it as is.
|
|
93
|
+
*
|
|
94
|
+
* If not provided (default) a malformed entity fails the whole request.
|
|
95
|
+
*/
|
|
96
|
+
readonly onMalformedEntity?: (entity: MalformedEntity) => void;
|
|
84
97
|
}
|
|
85
98
|
export interface BasicSdkOptions {
|
|
86
99
|
/**
|
|
@@ -114,6 +127,19 @@ export interface BasicSdkOptions {
|
|
|
114
127
|
* If not null the SDK will immediately set the data owner scope to the provided value after login.
|
|
115
128
|
*/
|
|
116
129
|
readonly dataOwnerScope?: string;
|
|
130
|
+
/**
|
|
131
|
+
* If provided, when the backend returns a list of stored entities (get by ids, filter, find, list, ...) the entities
|
|
132
|
+
* that can't be deserialized are dropped from the result instead of failing the whole request, and this function is
|
|
133
|
+
* called once for each dropped entity. Methods returning lists may then return fewer entities than requested.
|
|
134
|
+
*
|
|
135
|
+
* Single entity reads, write operations and the entities used internally by the crypto layer are never affected.
|
|
136
|
+
* If the function throws, the request fails with that error.
|
|
137
|
+
*
|
|
138
|
+
* The `json` of the entity contains all its non-encrypted data, including personal data: avoid logging it as is.
|
|
139
|
+
*
|
|
140
|
+
* If not provided (default) a malformed entity fails the whole request.
|
|
141
|
+
*/
|
|
142
|
+
readonly onMalformedEntity?: (entity: MalformedEntity) => void;
|
|
117
143
|
}
|
|
118
144
|
/**
|
|
119
145
|
* Optional parameters used in the conversion from a basic sdk to a full sdk.
|
|
@@ -154,6 +180,44 @@ export interface AnonymousSdkOptions {
|
|
|
154
180
|
* This behaviour is disabled by default (strict by default).
|
|
155
181
|
*/
|
|
156
182
|
readonly ignoreUnknownFields?: boolean;
|
|
183
|
+
/**
|
|
184
|
+
* If provided, when the backend returns a list of stored entities (get by ids, filter, find, list, ...) the entities
|
|
185
|
+
* that can't be deserialized are dropped from the result instead of failing the whole request, and this function is
|
|
186
|
+
* called once for each dropped entity. Methods returning lists may then return fewer entities than requested.
|
|
187
|
+
*
|
|
188
|
+
* Single entity reads, write operations and the entities used internally by the crypto layer are never affected.
|
|
189
|
+
* If the function throws, the request fails with that error.
|
|
190
|
+
*
|
|
191
|
+
* The `json` of the entity contains all its non-encrypted data, including personal data: avoid logging it as is.
|
|
192
|
+
*
|
|
193
|
+
* If not provided (default) a malformed entity fails the whole request.
|
|
194
|
+
*/
|
|
195
|
+
readonly onMalformedEntity?: (entity: MalformedEntity) => void;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* An entity returned by the backend in a list that could not be deserialized and was discarded.
|
|
199
|
+
*/
|
|
200
|
+
export interface MalformedEntity {
|
|
201
|
+
/**
|
|
202
|
+
* Serial name of the expected type of the entity, e.g. "com.icure.cardinal.sdk.model.EncryptedPatient".
|
|
203
|
+
*/
|
|
204
|
+
readonly entityType: string;
|
|
205
|
+
/**
|
|
206
|
+
* Id of the entity, if it could be read from its raw json.
|
|
207
|
+
*/
|
|
208
|
+
readonly entityId: string | undefined;
|
|
209
|
+
/**
|
|
210
|
+
* The raw json of the entity, as returned by the backend.
|
|
211
|
+
*/
|
|
212
|
+
readonly json: any;
|
|
213
|
+
/**
|
|
214
|
+
* Message of the deserialization error.
|
|
215
|
+
*/
|
|
216
|
+
readonly error: string;
|
|
217
|
+
/**
|
|
218
|
+
* Url of the request that returned the entity.
|
|
219
|
+
*/
|
|
220
|
+
readonly requestUrl: string;
|
|
157
221
|
}
|
|
158
222
|
export interface EncryptedFieldsConfiguration {
|
|
159
223
|
readonly accessLog?: Array<string>;
|