@icure/cardinal-sdk 3.0.0-PREVIEW-2 → 3.0.0-PREVIEW-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.
Files changed (94) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
  2. package/api/ApplicationSettingsApi.d.mts +6 -0
  3. package/api/ApplicationSettingsApi.mjs +1 -0
  4. package/api/CryptoApi.d.mts +23 -0
  5. package/api/DataOwnerApi.d.mts +107 -0
  6. package/api/DocumentTemplateApi.d.mts +22 -0
  7. package/api/DocumentTemplateApi.mjs +1 -0
  8. package/api/EntityReferenceApi.d.mts +5 -0
  9. package/api/EntityReferenceApi.mjs +1 -0
  10. package/api/EntityTemplateApi.d.mts +24 -0
  11. package/api/EntityTemplateApi.mjs +1 -0
  12. package/api/HealthcarePartyApi.d.mts +10 -0
  13. package/api/KeywordApi.d.mts +14 -0
  14. package/api/KeywordApi.mjs +1 -0
  15. package/api/MedicalLocationApi.d.mts +17 -0
  16. package/api/MedicalLocationApi.mjs +1 -0
  17. package/api/TarificationApi.d.mts +27 -0
  18. package/api/TarificationApi.mjs +1 -0
  19. package/api/TimeTableApi.d.mts +26 -0
  20. package/api/TimeTableApi.mjs +1 -0
  21. package/cardinal-sdk-ts.mjs +43382 -42838
  22. package/cardinal-sdk.mjs +111008 -107369
  23. package/crypto/CryptoStrategies.d.mts +44 -8
  24. package/crypto/CryptoStrategies.mjs +41 -7
  25. package/crypto/entities/BulkShareByIdsResult.d.mts +31 -17
  26. package/crypto/entities/BulkShareByIdsResult.mjs +5 -5
  27. package/crypto/entities/FailedRequestDetails.d.mts +13 -9
  28. package/crypto/entities/FailedRequestDetails.mjs +10 -7
  29. package/crypto/entities/SecretIdShareOptions.d.mts +4 -0
  30. package/crypto/entities/SecretIdShareOptions.mjs +4 -0
  31. package/crypto/entities/SecretIdUseOption.d.mts +5 -0
  32. package/crypto/entities/ShareAllPatientDataOptions.d.mts +49 -0
  33. package/crypto/entities/ShareAllPatientDataOptions.mjs +58 -0
  34. package/crypto/entities/ShareRequestPurpose.d.mts +12 -0
  35. package/crypto/entities/ShareRequestPurpose.mjs +14 -0
  36. package/crypto/entities/ShareRequestSummary.d.mts +51 -0
  37. package/crypto/entities/ShareRequestSummary.mjs +21 -0
  38. package/crypto/entities/SharedSecretIdsSource.d.mts +8 -0
  39. package/crypto/entities/SharedSecretIdsSource.mjs +10 -0
  40. package/crypto/entities/SuccessfulRequestDetails.d.mts +22 -0
  41. package/crypto/entities/SuccessfulRequestDetails.mjs +11 -0
  42. package/crypto.d.mts +4 -1
  43. package/crypto.mjs +4 -1
  44. package/filters/ClassificationFilters.d.mts +27 -0
  45. package/filters/ClassificationFilters.mjs +8 -0
  46. package/filters/MedicalLocationFilters.d.mts +8 -0
  47. package/filters/MedicalLocationFilters.mjs +6 -0
  48. package/filters/TimeTableFilters.d.mts +12 -0
  49. package/filters/TimeTableFilters.mjs +6 -0
  50. package/kotlin-kotlin-stdlib.mjs +33 -16
  51. package/kotlinx-coroutines-core.mjs +8 -8
  52. package/model/ApplicationSettings.d.mts +87 -0
  53. package/model/ApplicationSettings.mjs +256 -0
  54. package/model/DocumentTemplate.d.mts +35 -0
  55. package/model/DocumentTemplate.mjs +162 -0
  56. package/model/EntityReference.d.mts +10 -0
  57. package/model/EntityReference.mjs +46 -0
  58. package/model/EntityTemplate.d.mts +16 -0
  59. package/model/EntityTemplate.mjs +81 -0
  60. package/model/GroupScoped.d.mts +18 -0
  61. package/model/Keyword.d.mts +23 -0
  62. package/model/Keyword.mjs +99 -0
  63. package/model/ListOfIds.d.mts +6 -0
  64. package/model/ListOfIds.mjs +28 -0
  65. package/model/MedicalLocation.d.mts +28 -0
  66. package/model/MedicalLocation.mjs +116 -0
  67. package/model/PaginatedDocumentKeyIdPair.d.mts +0 -1
  68. package/model/PaginatedDocumentKeyIdPair.mjs +0 -1
  69. package/model/Tarification.d.mts +50 -0
  70. package/model/Tarification.mjs +178 -0
  71. package/model/TimeTable.d.mts +25 -0
  72. package/model/TimeTable.mjs +111 -0
  73. package/model/base/AppendixType.d.mts +5 -0
  74. package/model/base/AppendixType.mjs +7 -0
  75. package/model/base/CodeFlag.d.mts +80 -0
  76. package/model/base/CodeFlag.mjs +82 -0
  77. package/model/base/ReportVersion.d.mts +3 -0
  78. package/model/base/ReportVersion.mjs +5 -0
  79. package/model/embed/HealthElementAsserter.d.mts +30 -1
  80. package/model/embed/HealthElementAsserter.mjs +41 -1
  81. package/model/embed/KeywordSubword.d.mts +8 -0
  82. package/model/embed/KeywordSubword.mjs +35 -0
  83. package/model/embed/LetterValue.d.mts +9 -0
  84. package/model/embed/LetterValue.mjs +47 -0
  85. package/model/embed/Periodicity.d.mts +8 -0
  86. package/model/embed/Periodicity.mjs +36 -0
  87. package/model/embed/TimeTableHour.d.mts +7 -0
  88. package/model/embed/TimeTableHour.mjs +35 -0
  89. package/model/embed/TimeTableItem.d.mts +19 -0
  90. package/model/embed/TimeTableItem.mjs +96 -0
  91. package/model/embed/Valorisation.d.mts +56 -0
  92. package/model/embed/Valorisation.mjs +188 -0
  93. package/package.json +1 -1
  94. package/subscription/EntitySubscriptionEvent.d.mts +3 -0
@@ -0,0 +1,35 @@
1
+ import { CodeStub } from './base/CodeStub.mjs';
2
+ import { HasEndOfLife } from './base/HasEndOfLife.mjs';
3
+ import { ICureDocument } from './base/ICureDocument.mjs';
4
+ import { ReportVersion } from './base/ReportVersion.mjs';
5
+ import { StoredDocument } from './base/StoredDocument.mjs';
6
+ import { DocumentGroup } from './embed/DocumentGroup.mjs';
7
+ import { DocumentType } from './embed/DocumentType.mjs';
8
+ export declare class DocumentTemplate implements StoredDocument, ICureDocument<string>, HasEndOfLife {
9
+ id: string;
10
+ rev: string | undefined;
11
+ created: number | undefined;
12
+ modified: number | undefined;
13
+ author: string | undefined;
14
+ responsible: string | undefined;
15
+ tags: Array<CodeStub>;
16
+ codes: Array<CodeStub>;
17
+ endOfLife: number | undefined;
18
+ deletionDate: number | undefined;
19
+ attachment: Int8Array | undefined;
20
+ documentType: DocumentType | undefined;
21
+ mainUti: string | undefined;
22
+ name: string | undefined;
23
+ otherUtis: Array<string>;
24
+ attachmentId: string | undefined;
25
+ version: ReportVersion | undefined;
26
+ owner: string | undefined;
27
+ guid: string | undefined;
28
+ group: DocumentGroup | undefined;
29
+ descr: string | undefined;
30
+ disabled: string | undefined;
31
+ specialty: CodeStub | undefined;
32
+ constructor(partial: Partial<DocumentTemplate>);
33
+ toJSON(): object;
34
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DocumentTemplate;
35
+ }
@@ -0,0 +1,162 @@
1
+ // auto-generated file
2
+ import { decodeBase64, encodeBase64 } from '../internal/BytesEncoding.mjs';
3
+ import { expectArray, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
4
+ import { randomUuid } from '../utils/Id.mjs';
5
+ import { CodeStub } from './base/CodeStub.mjs';
6
+ import { ReportVersion } from './base/ReportVersion.mjs';
7
+ import { DocumentGroup } from './embed/DocumentGroup.mjs';
8
+ import { DocumentType } from './embed/DocumentType.mjs';
9
+ export class DocumentTemplate {
10
+ constructor(partial) {
11
+ var _a;
12
+ this.rev = undefined;
13
+ this.created = undefined;
14
+ this.modified = undefined;
15
+ this.author = undefined;
16
+ this.responsible = undefined;
17
+ this.tags = [];
18
+ this.codes = [];
19
+ this.endOfLife = undefined;
20
+ this.deletionDate = undefined;
21
+ this.attachment = undefined;
22
+ this.documentType = undefined;
23
+ this.mainUti = undefined;
24
+ this.name = undefined;
25
+ this.otherUtis = [];
26
+ this.attachmentId = undefined;
27
+ this.version = undefined;
28
+ this.owner = undefined;
29
+ this.guid = undefined;
30
+ this.group = undefined;
31
+ this.descr = undefined;
32
+ this.disabled = undefined;
33
+ this.specialty = undefined;
34
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
35
+ if ('rev' in partial)
36
+ this.rev = partial.rev;
37
+ if ('created' in partial)
38
+ this.created = partial.created;
39
+ if ('modified' in partial)
40
+ this.modified = partial.modified;
41
+ if ('author' in partial)
42
+ this.author = partial.author;
43
+ if ('responsible' in partial)
44
+ this.responsible = partial.responsible;
45
+ if ('tags' in partial && partial.tags !== undefined)
46
+ this.tags = partial.tags;
47
+ if ('codes' in partial && partial.codes !== undefined)
48
+ this.codes = partial.codes;
49
+ if ('endOfLife' in partial)
50
+ this.endOfLife = partial.endOfLife;
51
+ if ('deletionDate' in partial)
52
+ this.deletionDate = partial.deletionDate;
53
+ if ('attachment' in partial)
54
+ this.attachment = partial.attachment;
55
+ if ('documentType' in partial)
56
+ this.documentType = partial.documentType;
57
+ if ('mainUti' in partial)
58
+ this.mainUti = partial.mainUti;
59
+ if ('name' in partial)
60
+ this.name = partial.name;
61
+ if ('otherUtis' in partial && partial.otherUtis !== undefined)
62
+ this.otherUtis = partial.otherUtis;
63
+ if ('attachmentId' in partial)
64
+ this.attachmentId = partial.attachmentId;
65
+ if ('version' in partial)
66
+ this.version = partial.version;
67
+ if ('owner' in partial)
68
+ this.owner = partial.owner;
69
+ if ('guid' in partial)
70
+ this.guid = partial.guid;
71
+ if ('group' in partial)
72
+ this.group = partial.group;
73
+ if ('descr' in partial)
74
+ this.descr = partial.descr;
75
+ if ('disabled' in partial)
76
+ this.disabled = partial.disabled;
77
+ if ('specialty' in partial)
78
+ this.specialty = partial.specialty;
79
+ }
80
+ toJSON() {
81
+ const res = {};
82
+ res['id'] = this.id;
83
+ if (this.rev != undefined)
84
+ res['rev'] = this.rev;
85
+ if (this.created != undefined)
86
+ res['created'] = this.created;
87
+ if (this.modified != undefined)
88
+ res['modified'] = this.modified;
89
+ if (this.author != undefined)
90
+ res['author'] = this.author;
91
+ if (this.responsible != undefined)
92
+ res['responsible'] = this.responsible;
93
+ res['tags'] = this.tags.map((x0) => x0.toJSON());
94
+ res['codes'] = this.codes.map((x0) => x0.toJSON());
95
+ if (this.endOfLife != undefined)
96
+ res['endOfLife'] = this.endOfLife;
97
+ if (this.deletionDate != undefined)
98
+ res['deletionDate'] = this.deletionDate;
99
+ if (this.attachment != undefined)
100
+ res['attachment'] = encodeBase64(this.attachment);
101
+ if (this.documentType != undefined)
102
+ res['documentType'] = this.documentType;
103
+ if (this.mainUti != undefined)
104
+ res['mainUti'] = this.mainUti;
105
+ if (this.name != undefined)
106
+ res['name'] = this.name;
107
+ res['otherUtis'] = this.otherUtis.map((x0) => x0);
108
+ if (this.attachmentId != undefined)
109
+ res['attachmentId'] = this.attachmentId;
110
+ if (this.version != undefined)
111
+ res['version'] = this.version;
112
+ if (this.owner != undefined)
113
+ res['owner'] = this.owner;
114
+ if (this.guid != undefined)
115
+ res['guid'] = this.guid;
116
+ if (this.group != undefined)
117
+ res['group'] = this.group.toJSON();
118
+ if (this.descr != undefined)
119
+ res['descr'] = this.descr;
120
+ if (this.disabled != undefined)
121
+ res['disabled'] = this.disabled;
122
+ if (this.specialty != undefined)
123
+ res['specialty'] = this.specialty.toJSON();
124
+ return res;
125
+ }
126
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DocumentTemplate']) {
127
+ if (typeof json != 'object')
128
+ throw new Error(`Expected json object at path ${path.join("")}`);
129
+ const jCpy = Object.assign({}, json);
130
+ const res = new DocumentTemplate({
131
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
132
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
133
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
134
+ modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
135
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
136
+ responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
137
+ tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
138
+ codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
139
+ endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
140
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
141
+ attachment: decodeBase64(expectString(extractEntry(jCpy, 'attachment', false, path), true, [...path, ".attachment"]), [...path, ".attachment"]),
142
+ documentType: expectStringEnum(extractEntry(jCpy, 'documentType', false, path), true, [...path, ".documentType"], DocumentType, 'DocumentType'),
143
+ mainUti: expectString(extractEntry(jCpy, 'mainUti', false, path), true, [...path, ".mainUti"]),
144
+ name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
145
+ otherUtis: expectArray(extractEntry(jCpy, 'otherUtis', false, path), false, [...path, ".otherUtis"], (x0, p0) => expectString(x0, false, p0)),
146
+ attachmentId: expectString(extractEntry(jCpy, 'attachmentId', false, path), true, [...path, ".attachmentId"]),
147
+ version: expectStringEnum(extractEntry(jCpy, 'version', false, path), true, [...path, ".version"], ReportVersion, 'ReportVersion'),
148
+ owner: expectString(extractEntry(jCpy, 'owner', false, path), true, [...path, ".owner"]),
149
+ guid: expectString(extractEntry(jCpy, 'guid', false, path), true, [...path, ".guid"]),
150
+ group: expectObject(extractEntry(jCpy, 'group', false, path), true, ignoreUnknownKeys, [...path, ".group"], DocumentGroup.fromJSON),
151
+ descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
152
+ disabled: expectString(extractEntry(jCpy, 'disabled', false, path), true, [...path, ".disabled"]),
153
+ specialty: expectObject(extractEntry(jCpy, 'specialty', false, path), true, ignoreUnknownKeys, [...path, ".specialty"], CodeStub.fromJSON),
154
+ });
155
+ if (!ignoreUnknownKeys) {
156
+ const unused = Object.keys(jCpy);
157
+ if (unused.length > 0)
158
+ throw new Error(`Unexpected key(s) for json object DocumentTemplate at path ${path.join("")}: ${unused}`);
159
+ }
160
+ return res;
161
+ }
162
+ }
@@ -0,0 +1,10 @@
1
+ import { StoredDocument } from './base/StoredDocument.mjs';
2
+ export declare class EntityReference implements StoredDocument {
3
+ id: string;
4
+ rev: string | undefined;
5
+ deletionDate: number | undefined;
6
+ docId: string | undefined;
7
+ constructor(partial: Partial<EntityReference>);
8
+ toJSON(): object;
9
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EntityReference;
10
+ }
@@ -0,0 +1,46 @@
1
+ // auto-generated file
2
+ import { expectNumber, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ import { randomUuid } from '../utils/Id.mjs';
4
+ export class EntityReference {
5
+ constructor(partial) {
6
+ var _a;
7
+ this.rev = undefined;
8
+ this.deletionDate = undefined;
9
+ this.docId = undefined;
10
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
11
+ if ('rev' in partial)
12
+ this.rev = partial.rev;
13
+ if ('deletionDate' in partial)
14
+ this.deletionDate = partial.deletionDate;
15
+ if ('docId' in partial)
16
+ this.docId = partial.docId;
17
+ }
18
+ toJSON() {
19
+ const res = {};
20
+ res['id'] = this.id;
21
+ if (this.rev != undefined)
22
+ res['rev'] = this.rev;
23
+ if (this.deletionDate != undefined)
24
+ res['deletionDate'] = this.deletionDate;
25
+ if (this.docId != undefined)
26
+ res['docId'] = this.docId;
27
+ return res;
28
+ }
29
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['EntityReference']) {
30
+ if (typeof json != 'object')
31
+ throw new Error(`Expected json object at path ${path.join("")}`);
32
+ const jCpy = Object.assign({}, json);
33
+ const res = new EntityReference({
34
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
35
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
36
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
37
+ docId: expectString(extractEntry(jCpy, 'docId', false, path), true, [...path, ".docId"]),
38
+ });
39
+ if (!ignoreUnknownKeys) {
40
+ const unused = Object.keys(jCpy);
41
+ if (unused.length > 0)
42
+ throw new Error(`Unexpected key(s) for json object EntityReference at path ${path.join("")}: ${unused}`);
43
+ }
44
+ return res;
45
+ }
46
+ }
@@ -0,0 +1,16 @@
1
+ import { StoredDocument } from './base/StoredDocument.mjs';
2
+ export declare class EntityTemplate implements StoredDocument {
3
+ id: string;
4
+ rev: string | undefined;
5
+ deletionDate: number | undefined;
6
+ userId: string | undefined;
7
+ descr: string | undefined;
8
+ keywords: Array<string> | undefined;
9
+ entityType: string | undefined;
10
+ subType: string | undefined;
11
+ defaultTemplate: boolean | undefined;
12
+ entity: Array<any>;
13
+ constructor(partial: Partial<EntityTemplate>);
14
+ toJSON(): object;
15
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EntityTemplate;
16
+ }
@@ -0,0 +1,81 @@
1
+ // auto-generated file
2
+ import { expectArray, expectBoolean, expectNumber, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ import { randomUuid } from '../utils/Id.mjs';
4
+ export class EntityTemplate {
5
+ constructor(partial) {
6
+ var _a;
7
+ this.rev = undefined;
8
+ this.deletionDate = undefined;
9
+ this.userId = undefined;
10
+ this.descr = undefined;
11
+ this.keywords = undefined;
12
+ this.entityType = undefined;
13
+ this.subType = undefined;
14
+ this.defaultTemplate = undefined;
15
+ this.entity = [];
16
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
17
+ if ('rev' in partial)
18
+ this.rev = partial.rev;
19
+ if ('deletionDate' in partial)
20
+ this.deletionDate = partial.deletionDate;
21
+ if ('userId' in partial)
22
+ this.userId = partial.userId;
23
+ if ('descr' in partial)
24
+ this.descr = partial.descr;
25
+ if ('keywords' in partial)
26
+ this.keywords = partial.keywords;
27
+ if ('entityType' in partial)
28
+ this.entityType = partial.entityType;
29
+ if ('subType' in partial)
30
+ this.subType = partial.subType;
31
+ if ('defaultTemplate' in partial)
32
+ this.defaultTemplate = partial.defaultTemplate;
33
+ if ('entity' in partial && partial.entity !== undefined)
34
+ this.entity = partial.entity;
35
+ }
36
+ toJSON() {
37
+ const res = {};
38
+ res['id'] = this.id;
39
+ if (this.rev != undefined)
40
+ res['rev'] = this.rev;
41
+ if (this.deletionDate != undefined)
42
+ res['deletionDate'] = this.deletionDate;
43
+ if (this.userId != undefined)
44
+ res['userId'] = this.userId;
45
+ if (this.descr != undefined)
46
+ res['descr'] = this.descr;
47
+ if (this.keywords != undefined)
48
+ res['keywords'] = this.keywords.map((x0) => x0);
49
+ if (this.entityType != undefined)
50
+ res['entityType'] = this.entityType;
51
+ if (this.subType != undefined)
52
+ res['subType'] = this.subType;
53
+ if (this.defaultTemplate != undefined)
54
+ res['defaultTemplate'] = this.defaultTemplate;
55
+ res['entity'] = this.entity.map((x0) => x0);
56
+ return res;
57
+ }
58
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['EntityTemplate']) {
59
+ if (typeof json != 'object')
60
+ throw new Error(`Expected json object at path ${path.join("")}`);
61
+ const jCpy = Object.assign({}, json);
62
+ const res = new EntityTemplate({
63
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
64
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
65
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
66
+ userId: expectString(extractEntry(jCpy, 'userId', false, path), true, [...path, ".userId"]),
67
+ descr: expectString(extractEntry(jCpy, 'descr', false, path), true, [...path, ".descr"]),
68
+ keywords: expectArray(extractEntry(jCpy, 'keywords', false, path), true, [...path, ".keywords"], (x0, p0) => expectString(x0, false, p0)),
69
+ entityType: expectString(extractEntry(jCpy, 'entityType', false, path), true, [...path, ".entityType"]),
70
+ subType: expectString(extractEntry(jCpy, 'subType', false, path), true, [...path, ".subType"]),
71
+ defaultTemplate: expectBoolean(extractEntry(jCpy, 'defaultTemplate', false, path), true, [...path, ".defaultTemplate"]),
72
+ entity: expectArray(extractEntry(jCpy, 'entity', false, path), false, [...path, ".entity"], (x0, p0) => x0),
73
+ });
74
+ if (!ignoreUnknownKeys) {
75
+ const unused = Object.keys(jCpy);
76
+ if (unused.length > 0)
77
+ throw new Error(`Unexpected key(s) for json object EntityTemplate at path ${path.join("")}: ${unused}`);
78
+ }
79
+ return res;
80
+ }
81
+ }
@@ -9,7 +9,25 @@
9
9
  * instances of the SDK working on a different base group, can cause errors and other unexpected behavior.
10
10
  */
11
11
  export declare class GroupScoped<E> {
12
+ /**
13
+ * Wraps an entity and associates it with the group it exists in.
14
+ *
15
+ * In-group api methods take in input and return group scoped entities.
16
+ *
17
+ * To prevent mistakes, you shouldn't instantiate this class yourself, instead you should always get the GroupScoped
18
+ * entity from the `inGroup` methods of the apis. Using GroupScoped entities with the wrong groupId, or created by
19
+ * instances of the SDK working on a different base group, can cause errors and other unexpected behavior.
20
+ * / */
12
21
  entity: E;
22
+ /**
23
+ * Wraps an entity and associates it with the group it exists in.
24
+ *
25
+ * In-group api methods take in input and return group scoped entities.
26
+ *
27
+ * To prevent mistakes, you shouldn't instantiate this class yourself, instead you should always get the GroupScoped
28
+ * entity from the `inGroup` methods of the apis. Using GroupScoped entities with the wrong groupId, or created by
29
+ * instances of the SDK working on a different base group, can cause errors and other unexpected behavior.
30
+ * / */
13
31
  groupId: string;
14
32
  constructor(partial: Partial<GroupScoped<E>> & Pick<GroupScoped<E>, "entity" | "groupId">);
15
33
  }
@@ -0,0 +1,23 @@
1
+ import { CodeStub } from './base/CodeStub.mjs';
2
+ import { HasEndOfLife } from './base/HasEndOfLife.mjs';
3
+ import { ICureDocument } from './base/ICureDocument.mjs';
4
+ import { StoredDocument } from './base/StoredDocument.mjs';
5
+ import { KeywordSubword } from './embed/KeywordSubword.mjs';
6
+ export declare class Keyword implements StoredDocument, ICureDocument<string>, HasEndOfLife {
7
+ id: string;
8
+ rev: string | undefined;
9
+ created: number | undefined;
10
+ modified: number | undefined;
11
+ author: string | undefined;
12
+ responsible: string | undefined;
13
+ tags: Array<CodeStub>;
14
+ codes: Array<CodeStub>;
15
+ endOfLife: number | undefined;
16
+ deletionDate: number | undefined;
17
+ value: string | undefined;
18
+ subWords: Array<KeywordSubword>;
19
+ userId: string | undefined;
20
+ constructor(partial: Partial<Keyword>);
21
+ toJSON(): object;
22
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Keyword;
23
+ }
@@ -0,0 +1,99 @@
1
+ // auto-generated file
2
+ import { expectArray, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ import { randomUuid } from '../utils/Id.mjs';
4
+ import { CodeStub } from './base/CodeStub.mjs';
5
+ import { KeywordSubword } from './embed/KeywordSubword.mjs';
6
+ export class Keyword {
7
+ constructor(partial) {
8
+ var _a;
9
+ this.rev = undefined;
10
+ this.created = undefined;
11
+ this.modified = undefined;
12
+ this.author = undefined;
13
+ this.responsible = undefined;
14
+ this.tags = [];
15
+ this.codes = [];
16
+ this.endOfLife = undefined;
17
+ this.deletionDate = undefined;
18
+ this.value = undefined;
19
+ this.subWords = [];
20
+ this.userId = undefined;
21
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
22
+ if ('rev' in partial)
23
+ this.rev = partial.rev;
24
+ if ('created' in partial)
25
+ this.created = partial.created;
26
+ if ('modified' in partial)
27
+ this.modified = partial.modified;
28
+ if ('author' in partial)
29
+ this.author = partial.author;
30
+ if ('responsible' in partial)
31
+ this.responsible = partial.responsible;
32
+ if ('tags' in partial && partial.tags !== undefined)
33
+ this.tags = partial.tags;
34
+ if ('codes' in partial && partial.codes !== undefined)
35
+ this.codes = partial.codes;
36
+ if ('endOfLife' in partial)
37
+ this.endOfLife = partial.endOfLife;
38
+ if ('deletionDate' in partial)
39
+ this.deletionDate = partial.deletionDate;
40
+ if ('value' in partial)
41
+ this.value = partial.value;
42
+ if ('subWords' in partial && partial.subWords !== undefined)
43
+ this.subWords = partial.subWords;
44
+ if ('userId' in partial)
45
+ this.userId = partial.userId;
46
+ }
47
+ toJSON() {
48
+ const res = {};
49
+ res['id'] = this.id;
50
+ if (this.rev != undefined)
51
+ res['rev'] = this.rev;
52
+ if (this.created != undefined)
53
+ res['created'] = this.created;
54
+ if (this.modified != undefined)
55
+ res['modified'] = this.modified;
56
+ if (this.author != undefined)
57
+ res['author'] = this.author;
58
+ if (this.responsible != undefined)
59
+ res['responsible'] = this.responsible;
60
+ res['tags'] = this.tags.map((x0) => x0.toJSON());
61
+ res['codes'] = this.codes.map((x0) => x0.toJSON());
62
+ if (this.endOfLife != undefined)
63
+ res['endOfLife'] = this.endOfLife;
64
+ if (this.deletionDate != undefined)
65
+ res['deletionDate'] = this.deletionDate;
66
+ if (this.value != undefined)
67
+ res['value'] = this.value;
68
+ res['subWords'] = this.subWords.map((x0) => x0.toJSON());
69
+ if (this.userId != undefined)
70
+ res['userId'] = this.userId;
71
+ return res;
72
+ }
73
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Keyword']) {
74
+ if (typeof json != 'object')
75
+ throw new Error(`Expected json object at path ${path.join("")}`);
76
+ const jCpy = Object.assign({}, json);
77
+ const res = new Keyword({
78
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
79
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
80
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
81
+ modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
82
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
83
+ responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
84
+ tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
85
+ codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
86
+ endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
87
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
88
+ value: expectString(extractEntry(jCpy, 'value', false, path), true, [...path, ".value"]),
89
+ subWords: expectArray(extractEntry(jCpy, 'subWords', false, path), false, [...path, ".subWords"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, KeywordSubword.fromJSON)),
90
+ userId: expectString(extractEntry(jCpy, 'userId', false, path), true, [...path, ".userId"]),
91
+ });
92
+ if (!ignoreUnknownKeys) {
93
+ const unused = Object.keys(jCpy);
94
+ if (unused.length > 0)
95
+ throw new Error(`Unexpected key(s) for json object Keyword at path ${path.join("")}: ${unused}`);
96
+ }
97
+ return res;
98
+ }
99
+ }
@@ -0,0 +1,6 @@
1
+ export declare class ListOfIds {
2
+ ids: Array<string>;
3
+ constructor(partial: Partial<ListOfIds>);
4
+ toJSON(): object;
5
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): ListOfIds;
6
+ }
@@ -0,0 +1,28 @@
1
+ // auto-generated file
2
+ import { expectArray, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ export class ListOfIds {
4
+ constructor(partial) {
5
+ this.ids = [];
6
+ if ('ids' in partial && partial.ids !== undefined)
7
+ this.ids = partial.ids;
8
+ }
9
+ toJSON() {
10
+ const res = {};
11
+ res['ids'] = this.ids.map((x0) => x0);
12
+ return res;
13
+ }
14
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['ListOfIds']) {
15
+ if (typeof json != 'object')
16
+ throw new Error(`Expected json object at path ${path.join("")}`);
17
+ const jCpy = Object.assign({}, json);
18
+ const res = new ListOfIds({
19
+ ids: expectArray(extractEntry(jCpy, 'ids', false, path), false, [...path, ".ids"], (x0, p0) => expectString(x0, false, p0)),
20
+ });
21
+ if (!ignoreUnknownKeys) {
22
+ const unused = Object.keys(jCpy);
23
+ if (unused.length > 0)
24
+ throw new Error(`Unexpected key(s) for json object ListOfIds at path ${path.join("")}: ${unused}`);
25
+ }
26
+ return res;
27
+ }
28
+ }
@@ -0,0 +1,28 @@
1
+ import { Named } from './base/Named.mjs';
2
+ import { StoredDocument } from './base/StoredDocument.mjs';
3
+ import { DecryptedAddress } from './embed/Address.mjs';
4
+ export declare class MedicalLocation implements StoredDocument, Named {
5
+ id: string;
6
+ rev: string | undefined;
7
+ deletionDate: number | undefined;
8
+ name: string | undefined;
9
+ description: string | undefined;
10
+ responsible: string | undefined;
11
+ guardPost: boolean | undefined;
12
+ cbe: string | undefined;
13
+ bic: string | undefined;
14
+ bankAccount: string | undefined;
15
+ nihii: string | undefined;
16
+ ssin: string | undefined;
17
+ address: DecryptedAddress | undefined;
18
+ agendaIds: Array<string>;
19
+ options: {
20
+ [key: string]: string;
21
+ };
22
+ publicInformations: {
23
+ [key: string]: string;
24
+ };
25
+ constructor(partial: Partial<MedicalLocation>);
26
+ toJSON(): object;
27
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): MedicalLocation;
28
+ }