@icure/cardinal-sdk 2.4.2 → 2.4.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/api/HealthcarePartyApi.d.mts +1 -1
- package/cardinal-sdk-ts.d.mts +36 -0
- package/cardinal-sdk-ts.mjs +40294 -39173
- package/cardinal-sdk.mjs +63714 -63441
- package/filters/ServiceFilters.d.mts +180 -0
- package/filters/ServiceFilters.mjs +37 -1
- package/kotlinx-coroutines-core.mjs +1 -1
- package/model/CalendarItem.d.mts +18 -0
- package/model/CalendarItem.mjs +22 -0
- package/model/Document.d.mts +29 -0
- package/model/Document.mjs +76 -0
- package/model/Receipt.d.mts +36 -0
- package/model/Receipt.mjs +42 -1
- package/model/embed/DataAttachment.d.mts +34 -0
- package/model/embed/DataAttachment.mjs +55 -1
- package/model/embed/ReceiptBlobType.d.mts +15 -0
- package/model/embed/ReceiptBlobType.mjs +17 -0
- package/model.d.mts +1 -0
- package/model.mjs +1 -0
- package/package.json +1 -1
package/model/Receipt.mjs
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
-
import { expectArray, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
2
|
+
import { expectArray, expectMap, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
|
|
3
3
|
import { randomUuid } from '../utils/Id.mjs';
|
|
4
4
|
import { CodeStub } from './base/CodeStub.mjs';
|
|
5
|
+
import { DataAttachment } from './embed/DataAttachment.mjs';
|
|
5
6
|
import { Delegation } from './embed/Delegation.mjs';
|
|
7
|
+
import { DeletedAttachment } from './embed/DeletedAttachment.mjs';
|
|
8
|
+
import { ReceiptBlobType } from './embed/ReceiptBlobType.mjs';
|
|
6
9
|
import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
|
|
7
10
|
/**
|
|
8
11
|
*
|
|
@@ -56,6 +59,13 @@ export class DecryptedReceipt {
|
|
|
56
59
|
* Hard delete (unix epoch in ms) timestamp of the object.
|
|
57
60
|
*/
|
|
58
61
|
this.deletionDate = undefined;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* Map of blob type to attachment id for the receipt.
|
|
65
|
+
*/
|
|
66
|
+
this.attachmentIds = {};
|
|
67
|
+
this.attachmentInfos = {};
|
|
68
|
+
this.deletedAttachments = [];
|
|
59
69
|
/**
|
|
60
70
|
*
|
|
61
71
|
* List of references (e.g., nipReference, errorCode, errorPath, tarification, invoice UUID).
|
|
@@ -126,6 +136,12 @@ export class DecryptedReceipt {
|
|
|
126
136
|
this.codes = partial.codes;
|
|
127
137
|
if ('deletionDate' in partial)
|
|
128
138
|
this.deletionDate = partial.deletionDate;
|
|
139
|
+
if ('attachmentIds' in partial && partial.attachmentIds !== undefined)
|
|
140
|
+
this.attachmentIds = partial.attachmentIds;
|
|
141
|
+
if ('attachmentInfos' in partial && partial.attachmentInfos !== undefined)
|
|
142
|
+
this.attachmentInfos = partial.attachmentInfos;
|
|
143
|
+
if ('deletedAttachments' in partial && partial.deletedAttachments !== undefined)
|
|
144
|
+
this.deletedAttachments = partial.deletedAttachments;
|
|
129
145
|
if ('references' in partial && partial.references !== undefined)
|
|
130
146
|
this.references = partial.references;
|
|
131
147
|
if ('documentId' in partial)
|
|
@@ -164,6 +180,9 @@ export class DecryptedReceipt {
|
|
|
164
180
|
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
165
181
|
if (this.deletionDate != undefined)
|
|
166
182
|
res['deletionDate'] = this.deletionDate;
|
|
183
|
+
res['attachmentIds'] = Object.fromEntries(Object.entries(this.attachmentIds).map(([k0, v0]) => [k0, v0]));
|
|
184
|
+
res['attachmentInfos'] = Object.fromEntries(Object.entries(this.attachmentInfos).map(([k0, v0]) => [k0, v0.toJSON()]));
|
|
185
|
+
res['deletedAttachments'] = this.deletedAttachments.map((x0) => x0.toJSON());
|
|
167
186
|
res['references'] = this.references.map((x0) => x0);
|
|
168
187
|
if (this.documentId != undefined)
|
|
169
188
|
res['documentId'] = this.documentId;
|
|
@@ -198,6 +217,9 @@ export class DecryptedReceipt {
|
|
|
198
217
|
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
199
218
|
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
200
219
|
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
220
|
+
attachmentIds: expectMap(extractEntry(jCpy, 'attachmentIds', false, path), false, [...path, ".attachmentIds"], (k0, p0) => expectStringEnum(k0, false, p0, ReceiptBlobType, 'ReceiptBlobType'), (v0, p0) => expectString(v0, false, p0)),
|
|
221
|
+
attachmentInfos: expectMap(extractEntry(jCpy, 'attachmentInfos', false, path), false, [...path, ".attachmentInfos"], (k0, p0) => expectStringEnum(k0, false, p0, ReceiptBlobType, 'ReceiptBlobType'), (v0, p0) => expectObject(v0, false, ignoreUnknownKeys, p0, DataAttachment.fromJSON)),
|
|
222
|
+
deletedAttachments: expectArray(extractEntry(jCpy, 'deletedAttachments', false, path), false, [...path, ".deletedAttachments"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DeletedAttachment.fromJSON)),
|
|
201
223
|
references: expectArray(extractEntry(jCpy, 'references', false, path), false, [...path, ".references"], (x0, p0) => expectString(x0, false, p0)),
|
|
202
224
|
documentId: expectString(extractEntry(jCpy, 'documentId', false, path), true, [...path, ".documentId"]),
|
|
203
225
|
category: expectString(extractEntry(jCpy, 'category', false, path), true, [...path, ".category"]),
|
|
@@ -269,6 +291,13 @@ export class EncryptedReceipt {
|
|
|
269
291
|
* Hard delete (unix epoch in ms) timestamp of the object.
|
|
270
292
|
*/
|
|
271
293
|
this.deletionDate = undefined;
|
|
294
|
+
/**
|
|
295
|
+
*
|
|
296
|
+
* Map of blob type to attachment id for the receipt.
|
|
297
|
+
*/
|
|
298
|
+
this.attachmentIds = {};
|
|
299
|
+
this.attachmentInfos = {};
|
|
300
|
+
this.deletedAttachments = [];
|
|
272
301
|
/**
|
|
273
302
|
*
|
|
274
303
|
* List of references (e.g., nipReference, errorCode, errorPath, tarification, invoice UUID).
|
|
@@ -339,6 +368,12 @@ export class EncryptedReceipt {
|
|
|
339
368
|
this.codes = partial.codes;
|
|
340
369
|
if ('deletionDate' in partial)
|
|
341
370
|
this.deletionDate = partial.deletionDate;
|
|
371
|
+
if ('attachmentIds' in partial && partial.attachmentIds !== undefined)
|
|
372
|
+
this.attachmentIds = partial.attachmentIds;
|
|
373
|
+
if ('attachmentInfos' in partial && partial.attachmentInfos !== undefined)
|
|
374
|
+
this.attachmentInfos = partial.attachmentInfos;
|
|
375
|
+
if ('deletedAttachments' in partial && partial.deletedAttachments !== undefined)
|
|
376
|
+
this.deletedAttachments = partial.deletedAttachments;
|
|
342
377
|
if ('references' in partial && partial.references !== undefined)
|
|
343
378
|
this.references = partial.references;
|
|
344
379
|
if ('documentId' in partial)
|
|
@@ -377,6 +412,9 @@ export class EncryptedReceipt {
|
|
|
377
412
|
res['codes'] = this.codes.map((x0) => x0.toJSON());
|
|
378
413
|
if (this.deletionDate != undefined)
|
|
379
414
|
res['deletionDate'] = this.deletionDate;
|
|
415
|
+
res['attachmentIds'] = Object.fromEntries(Object.entries(this.attachmentIds).map(([k0, v0]) => [k0, v0]));
|
|
416
|
+
res['attachmentInfos'] = Object.fromEntries(Object.entries(this.attachmentInfos).map(([k0, v0]) => [k0, v0.toJSON()]));
|
|
417
|
+
res['deletedAttachments'] = this.deletedAttachments.map((x0) => x0.toJSON());
|
|
380
418
|
res['references'] = this.references.map((x0) => x0);
|
|
381
419
|
if (this.documentId != undefined)
|
|
382
420
|
res['documentId'] = this.documentId;
|
|
@@ -411,6 +449,9 @@ export class EncryptedReceipt {
|
|
|
411
449
|
tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
412
450
|
codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
|
|
413
451
|
deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
|
|
452
|
+
attachmentIds: expectMap(extractEntry(jCpy, 'attachmentIds', false, path), false, [...path, ".attachmentIds"], (k0, p0) => expectStringEnum(k0, false, p0, ReceiptBlobType, 'ReceiptBlobType'), (v0, p0) => expectString(v0, false, p0)),
|
|
453
|
+
attachmentInfos: expectMap(extractEntry(jCpy, 'attachmentInfos', false, path), false, [...path, ".attachmentInfos"], (k0, p0) => expectStringEnum(k0, false, p0, ReceiptBlobType, 'ReceiptBlobType'), (v0, p0) => expectObject(v0, false, ignoreUnknownKeys, p0, DataAttachment.fromJSON)),
|
|
454
|
+
deletedAttachments: expectArray(extractEntry(jCpy, 'deletedAttachments', false, path), false, [...path, ".deletedAttachments"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DeletedAttachment.fromJSON)),
|
|
414
455
|
references: expectArray(extractEntry(jCpy, 'references', false, path), false, [...path, ".references"], (x0, p0) => expectString(x0, false, p0)),
|
|
415
456
|
documentId: expectString(extractEntry(jCpy, 'documentId', false, path), true, [...path, ".documentId"]),
|
|
416
457
|
category: expectString(extractEntry(jCpy, 'category', false, path), true, [...path, ".category"]),
|
|
@@ -20,6 +20,40 @@ export declare class DataAttachment {
|
|
|
20
20
|
* The Uniform Type Identifiers of the attachment, ordered by priority.
|
|
21
21
|
*/
|
|
22
22
|
utis: Array<string>;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* Algorithm used on the CLIENT SIDE to compress the data attachment.
|
|
27
|
+
* Null means that the document was not compressed because the tried algorithms could not actually
|
|
28
|
+
* compress the data
|
|
29
|
+
* (because for example it was an already compressed format) or no algorithms were tried.
|
|
30
|
+
*/
|
|
31
|
+
compressionAlgorithm: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
* A string used by the SDK to mark which compression algorithms were tried.
|
|
36
|
+
* Null means that no compression algorithms were tried.
|
|
37
|
+
* If an SDK reads some data that is not compressed, if this value indicates that the data was
|
|
38
|
+
* created with an older
|
|
39
|
+
* version of the SDK then the SDK may try to use any newly available algorithms to compress the
|
|
40
|
+
* data.
|
|
41
|
+
*/
|
|
42
|
+
triedCompressionAlgorithmsVersion: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* Value computed by the backend, the actual size of the data stored for the attachment, in bytes.
|
|
47
|
+
*/
|
|
48
|
+
storedDataSize: number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
*
|
|
52
|
+
* Value provided by the client, the real size of the data after it has been decrypted and
|
|
53
|
+
* decompressed, in bytes.
|
|
54
|
+
* This value is not used or verified by the backend.
|
|
55
|
+
*/
|
|
56
|
+
realDataSize: number | undefined;
|
|
23
57
|
constructor(partial: Partial<DataAttachment>);
|
|
24
58
|
toJSON(): object;
|
|
25
59
|
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DataAttachment;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
-
import { expectArray, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
|
+
import { expectArray, expectNumber, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
* Represents a data attachment that can be stored either as a CouchDB attachment or via object
|
|
@@ -23,12 +23,54 @@ export class DataAttachment {
|
|
|
23
23
|
* The Uniform Type Identifiers of the attachment, ordered by priority.
|
|
24
24
|
*/
|
|
25
25
|
this.utis = [];
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* Algorithm used on the CLIENT SIDE to compress the data attachment.
|
|
30
|
+
* Null means that the document was not compressed because the tried algorithms could not actually
|
|
31
|
+
* compress the data
|
|
32
|
+
* (because for example it was an already compressed format) or no algorithms were tried.
|
|
33
|
+
*/
|
|
34
|
+
this.compressionAlgorithm = undefined;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
* A string used by the SDK to mark which compression algorithms were tried.
|
|
39
|
+
* Null means that no compression algorithms were tried.
|
|
40
|
+
* If an SDK reads some data that is not compressed, if this value indicates that the data was
|
|
41
|
+
* created with an older
|
|
42
|
+
* version of the SDK then the SDK may try to use any newly available algorithms to compress the
|
|
43
|
+
* data.
|
|
44
|
+
*/
|
|
45
|
+
this.triedCompressionAlgorithmsVersion = undefined;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*
|
|
49
|
+
* Value computed by the backend, the actual size of the data stored for the attachment, in bytes.
|
|
50
|
+
*/
|
|
51
|
+
this.storedDataSize = undefined;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*
|
|
55
|
+
* Value provided by the client, the real size of the data after it has been decrypted and
|
|
56
|
+
* decompressed, in bytes.
|
|
57
|
+
* This value is not used or verified by the backend.
|
|
58
|
+
*/
|
|
59
|
+
this.realDataSize = undefined;
|
|
26
60
|
if ('couchDbAttachmentId' in partial)
|
|
27
61
|
this.couchDbAttachmentId = partial.couchDbAttachmentId;
|
|
28
62
|
if ('objectStoreAttachmentId' in partial)
|
|
29
63
|
this.objectStoreAttachmentId = partial.objectStoreAttachmentId;
|
|
30
64
|
if ('utis' in partial && partial.utis !== undefined)
|
|
31
65
|
this.utis = partial.utis;
|
|
66
|
+
if ('compressionAlgorithm' in partial)
|
|
67
|
+
this.compressionAlgorithm = partial.compressionAlgorithm;
|
|
68
|
+
if ('triedCompressionAlgorithmsVersion' in partial)
|
|
69
|
+
this.triedCompressionAlgorithmsVersion = partial.triedCompressionAlgorithmsVersion;
|
|
70
|
+
if ('storedDataSize' in partial)
|
|
71
|
+
this.storedDataSize = partial.storedDataSize;
|
|
72
|
+
if ('realDataSize' in partial)
|
|
73
|
+
this.realDataSize = partial.realDataSize;
|
|
32
74
|
}
|
|
33
75
|
toJSON() {
|
|
34
76
|
const res = {};
|
|
@@ -37,6 +79,14 @@ export class DataAttachment {
|
|
|
37
79
|
if (this.objectStoreAttachmentId != undefined)
|
|
38
80
|
res['objectStoreAttachmentId'] = this.objectStoreAttachmentId;
|
|
39
81
|
res['utis'] = this.utis.map((x0) => x0);
|
|
82
|
+
if (this.compressionAlgorithm != undefined)
|
|
83
|
+
res['compressionAlgorithm'] = this.compressionAlgorithm;
|
|
84
|
+
if (this.triedCompressionAlgorithmsVersion != undefined)
|
|
85
|
+
res['triedCompressionAlgorithmsVersion'] = this.triedCompressionAlgorithmsVersion;
|
|
86
|
+
if (this.storedDataSize != undefined)
|
|
87
|
+
res['storedDataSize'] = this.storedDataSize;
|
|
88
|
+
if (this.realDataSize != undefined)
|
|
89
|
+
res['realDataSize'] = this.realDataSize;
|
|
40
90
|
return res;
|
|
41
91
|
}
|
|
42
92
|
static fromJSON(json, ignoreUnknownKeys = false, path = ['DataAttachment']) {
|
|
@@ -47,6 +97,10 @@ export class DataAttachment {
|
|
|
47
97
|
couchDbAttachmentId: expectString(extractEntry(jCpy, 'couchDbAttachmentId', false, path), true, [...path, ".couchDbAttachmentId"]),
|
|
48
98
|
objectStoreAttachmentId: expectString(extractEntry(jCpy, 'objectStoreAttachmentId', false, path), true, [...path, ".objectStoreAttachmentId"]),
|
|
49
99
|
utis: expectArray(extractEntry(jCpy, 'utis', false, path), false, [...path, ".utis"], (x0, p0) => expectString(x0, false, p0)),
|
|
100
|
+
compressionAlgorithm: expectString(extractEntry(jCpy, 'compressionAlgorithm', false, path), true, [...path, ".compressionAlgorithm"]),
|
|
101
|
+
triedCompressionAlgorithmsVersion: expectString(extractEntry(jCpy, 'triedCompressionAlgorithmsVersion', false, path), true, [...path, ".triedCompressionAlgorithmsVersion"]),
|
|
102
|
+
storedDataSize: expectNumber(extractEntry(jCpy, 'storedDataSize', false, path), true, true, [...path, ".storedDataSize"]),
|
|
103
|
+
realDataSize: expectNumber(extractEntry(jCpy, 'realDataSize', false, path), true, true, [...path, ".realDataSize"]),
|
|
50
104
|
});
|
|
51
105
|
if (!ignoreUnknownKeys) {
|
|
52
106
|
const unused = Object.keys(jCpy);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*
|
|
4
|
+
* Enumerates the types of blobs that can be stored in a receipt, such as XML signatures, KMEHR
|
|
5
|
+
* messages, and SOAP exchanges.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ReceiptBlobType {
|
|
8
|
+
Xades = "Xades",
|
|
9
|
+
KmehrRequest = "KmehrRequest",
|
|
10
|
+
KmehrResponse = "KmehrResponse",
|
|
11
|
+
SoapRequest = "SoapRequest",
|
|
12
|
+
SoapResponse = "SoapResponse",
|
|
13
|
+
SoapConversation = "SoapConversation",
|
|
14
|
+
Tack = "Tack"
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// auto-generated file
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Enumerates the types of blobs that can be stored in a receipt, such as XML signatures, KMEHR
|
|
6
|
+
* messages, and SOAP exchanges.
|
|
7
|
+
*/
|
|
8
|
+
export var ReceiptBlobType;
|
|
9
|
+
(function (ReceiptBlobType) {
|
|
10
|
+
ReceiptBlobType["Xades"] = "Xades";
|
|
11
|
+
ReceiptBlobType["KmehrRequest"] = "KmehrRequest";
|
|
12
|
+
ReceiptBlobType["KmehrResponse"] = "KmehrResponse";
|
|
13
|
+
ReceiptBlobType["SoapRequest"] = "SoapRequest";
|
|
14
|
+
ReceiptBlobType["SoapResponse"] = "SoapResponse";
|
|
15
|
+
ReceiptBlobType["SoapConversation"] = "SoapConversation";
|
|
16
|
+
ReceiptBlobType["Tack"] = "Tack";
|
|
17
|
+
})(ReceiptBlobType || (ReceiptBlobType = {}));
|
package/model.d.mts
CHANGED
|
@@ -58,6 +58,7 @@ export * from './model/embed/ContractChangeType.mjs';
|
|
|
58
58
|
export * from './model/embed/ReferenceRange.mjs';
|
|
59
59
|
export * from './model/embed/InvoicingCode.mjs';
|
|
60
60
|
export * from './model/embed/EmbeddedTimeTableHour.mjs';
|
|
61
|
+
export * from './model/embed/ReceiptBlobType.mjs';
|
|
61
62
|
export * from './model/embed/Address.mjs';
|
|
62
63
|
export * from './model/embed/Service.mjs';
|
|
63
64
|
export * from './model/embed/MembershipType.mjs';
|
package/model.mjs
CHANGED
|
@@ -58,6 +58,7 @@ export * from './model/embed/ContractChangeType.mjs';
|
|
|
58
58
|
export * from './model/embed/ReferenceRange.mjs';
|
|
59
59
|
export * from './model/embed/InvoicingCode.mjs';
|
|
60
60
|
export * from './model/embed/EmbeddedTimeTableHour.mjs';
|
|
61
|
+
export * from './model/embed/ReceiptBlobType.mjs';
|
|
61
62
|
export * from './model/embed/Address.mjs';
|
|
62
63
|
export * from './model/embed/Service.mjs';
|
|
63
64
|
export * from './model/embed/MembershipType.mjs';
|