@icure/cardinal-sdk 3.0.0-PREVIEW.7 → 3.0.0-PREVIEW.8

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 (112) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
  2. package/api/AccessLogApi.d.mts +11 -0
  3. package/api/AccessLogBasicApi.d.mts +11 -0
  4. package/api/AccessLogBasicInGroupApi.d.mts +6 -0
  5. package/api/AccessLogInGroupApi.d.mts +33 -1
  6. package/api/ApplicationSettingsApi.d.mts +6 -0
  7. package/api/ApplicationSettingsApi.mjs +1 -0
  8. package/api/CalendarItemApi.d.mts +11 -0
  9. package/api/CalendarItemBasicApi.d.mts +11 -0
  10. package/api/CalendarItemBasicInGroupApi.d.mts +6 -0
  11. package/api/CalendarItemInGroupApi.d.mts +6 -0
  12. package/api/ContactApi.d.mts +22 -0
  13. package/api/ContactBasicApi.d.mts +22 -0
  14. package/api/ContactBasicInGroupApi.d.mts +11 -0
  15. package/api/ContactInGroupApi.d.mts +11 -0
  16. package/api/DocumentApi.d.mts +11 -0
  17. package/api/DocumentBasicApi.d.mts +11 -0
  18. package/api/DocumentBasicInGroupApi.d.mts +6 -0
  19. package/api/DocumentInGroupApi.d.mts +6 -0
  20. package/api/DocumentTemplateApi.d.mts +22 -0
  21. package/api/DocumentTemplateApi.mjs +1 -0
  22. package/api/EntityReferenceApi.d.mts +5 -0
  23. package/api/EntityReferenceApi.mjs +1 -0
  24. package/api/EntityTemplateApi.d.mts +24 -0
  25. package/api/EntityTemplateApi.mjs +1 -0
  26. package/api/FormApi.d.mts +11 -0
  27. package/api/FormBasicApi.d.mts +11 -0
  28. package/api/FormBasicInGroupApi.d.mts +6 -0
  29. package/api/FormInGroupApi.d.mts +6 -0
  30. package/api/HealthElementApi.d.mts +11 -0
  31. package/api/HealthElementBasicApi.d.mts +11 -0
  32. package/api/HealthElementBasicInGroupApi.d.mts +6 -0
  33. package/api/HealthElementInGroupApi.d.mts +6 -0
  34. package/api/InvoiceApi.d.mts +11 -0
  35. package/api/InvoiceBasicApi.d.mts +11 -0
  36. package/api/InvoiceBasicInGroupApi.d.mts +6 -0
  37. package/api/InvoiceInGroupApi.d.mts +6 -0
  38. package/api/KeywordApi.d.mts +14 -0
  39. package/api/KeywordApi.mjs +1 -0
  40. package/api/MedicalLocationApi.d.mts +17 -0
  41. package/api/MedicalLocationApi.mjs +1 -0
  42. package/api/MessageApi.d.mts +11 -0
  43. package/api/MessageBasicApi.d.mts +11 -0
  44. package/api/MessageBasicInGroupApi.d.mts +6 -0
  45. package/api/MessageInGroupApi.d.mts +6 -0
  46. package/api/ReceiptApi.d.mts +11 -0
  47. package/api/ReceiptBasicApi.d.mts +11 -0
  48. package/api/ReceiptBasicInGroupApi.d.mts +6 -0
  49. package/api/ReceiptInGroupApi.d.mts +6 -0
  50. package/api/RelatedPersonApi.d.mts +11 -0
  51. package/api/RelatedPersonBasicApi.d.mts +11 -0
  52. package/api/RelatedPersonBasicInGroupApi.d.mts +6 -0
  53. package/api/RelatedPersonInGroupApi.d.mts +6 -0
  54. package/api/TarificationApi.d.mts +27 -0
  55. package/api/TarificationApi.mjs +1 -0
  56. package/api/TimeTableApi.d.mts +26 -0
  57. package/api/TimeTableApi.mjs +1 -0
  58. package/api/TopicApi.d.mts +11 -0
  59. package/api/TopicBasicApi.d.mts +11 -0
  60. package/api/TopicBasicInGroupApi.d.mts +6 -0
  61. package/api/TopicInGroupApi.d.mts +6 -0
  62. package/cardinal-sdk-ts.mjs +47824 -44170
  63. package/cardinal-sdk.mjs +77922 -77616
  64. package/crypto/entities/DelegateShareOptions.d.mts +9 -0
  65. package/crypto/entities/DelegateShareOptions.mjs +8 -0
  66. package/crypto/entities/ShareAllPatientDataOptions.d.mts +49 -0
  67. package/crypto/entities/ShareAllPatientDataOptions.mjs +58 -0
  68. package/filters/ClassificationFilters.d.mts +114 -0
  69. package/filters/ClassificationFilters.mjs +8 -0
  70. package/filters/MedicalLocationFilters.d.mts +8 -0
  71. package/filters/MedicalLocationFilters.mjs +6 -0
  72. package/filters/TimeTableFilters.d.mts +12 -0
  73. package/filters/TimeTableFilters.mjs +6 -0
  74. package/kotlin-kotlin-stdlib.mjs +4 -4
  75. package/kotlinx-coroutines-core.mjs +1 -1
  76. package/model/ApplicationSettings.d.mts +87 -0
  77. package/model/ApplicationSettings.mjs +256 -0
  78. package/model/DocumentTemplate.d.mts +35 -0
  79. package/model/DocumentTemplate.mjs +162 -0
  80. package/model/EntityReference.d.mts +10 -0
  81. package/model/EntityReference.mjs +46 -0
  82. package/model/EntityTemplate.d.mts +16 -0
  83. package/model/EntityTemplate.mjs +81 -0
  84. package/model/Keyword.d.mts +23 -0
  85. package/model/Keyword.mjs +99 -0
  86. package/model/ListOfIds.d.mts +6 -0
  87. package/model/ListOfIds.mjs +28 -0
  88. package/model/MedicalLocation.d.mts +28 -0
  89. package/model/MedicalLocation.mjs +116 -0
  90. package/model/Tarification.d.mts +50 -0
  91. package/model/Tarification.mjs +178 -0
  92. package/model/TimeTable.d.mts +25 -0
  93. package/model/TimeTable.mjs +111 -0
  94. package/model/base/AppendixType.d.mts +5 -0
  95. package/model/base/AppendixType.mjs +7 -0
  96. package/model/base/CodeFlag.d.mts +80 -0
  97. package/model/base/CodeFlag.mjs +82 -0
  98. package/model/base/ReportVersion.d.mts +3 -0
  99. package/model/base/ReportVersion.mjs +5 -0
  100. package/model/embed/KeywordSubword.d.mts +8 -0
  101. package/model/embed/KeywordSubword.mjs +35 -0
  102. package/model/embed/LetterValue.d.mts +9 -0
  103. package/model/embed/LetterValue.mjs +47 -0
  104. package/model/embed/Periodicity.d.mts +8 -0
  105. package/model/embed/Periodicity.mjs +36 -0
  106. package/model/embed/TimeTableHour.d.mts +7 -0
  107. package/model/embed/TimeTableHour.mjs +35 -0
  108. package/model/embed/TimeTableItem.d.mts +19 -0
  109. package/model/embed/TimeTableItem.mjs +96 -0
  110. package/model/embed/Valorisation.d.mts +56 -0
  111. package/model/embed/Valorisation.mjs +188 -0
  112. package/package.json +1 -1
@@ -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
+ }
@@ -0,0 +1,116 @@
1
+ // auto-generated file
2
+ import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ import { randomUuid } from '../utils/Id.mjs';
4
+ import { DecryptedAddress } from './embed/Address.mjs';
5
+ export class MedicalLocation {
6
+ constructor(partial) {
7
+ var _a;
8
+ this.rev = undefined;
9
+ this.deletionDate = undefined;
10
+ this.name = undefined;
11
+ this.description = undefined;
12
+ this.responsible = undefined;
13
+ this.guardPost = undefined;
14
+ this.cbe = undefined;
15
+ this.bic = undefined;
16
+ this.bankAccount = undefined;
17
+ this.nihii = undefined;
18
+ this.ssin = undefined;
19
+ this.address = undefined;
20
+ this.agendaIds = [];
21
+ this.options = {};
22
+ this.publicInformations = {};
23
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
24
+ if ('rev' in partial)
25
+ this.rev = partial.rev;
26
+ if ('deletionDate' in partial)
27
+ this.deletionDate = partial.deletionDate;
28
+ if ('name' in partial)
29
+ this.name = partial.name;
30
+ if ('description' in partial)
31
+ this.description = partial.description;
32
+ if ('responsible' in partial)
33
+ this.responsible = partial.responsible;
34
+ if ('guardPost' in partial)
35
+ this.guardPost = partial.guardPost;
36
+ if ('cbe' in partial)
37
+ this.cbe = partial.cbe;
38
+ if ('bic' in partial)
39
+ this.bic = partial.bic;
40
+ if ('bankAccount' in partial)
41
+ this.bankAccount = partial.bankAccount;
42
+ if ('nihii' in partial)
43
+ this.nihii = partial.nihii;
44
+ if ('ssin' in partial)
45
+ this.ssin = partial.ssin;
46
+ if ('address' in partial)
47
+ this.address = partial.address;
48
+ if ('agendaIds' in partial && partial.agendaIds !== undefined)
49
+ this.agendaIds = partial.agendaIds;
50
+ if ('options' in partial && partial.options !== undefined)
51
+ this.options = partial.options;
52
+ if ('publicInformations' in partial && partial.publicInformations !== undefined)
53
+ this.publicInformations = partial.publicInformations;
54
+ }
55
+ toJSON() {
56
+ const res = {};
57
+ res['id'] = this.id;
58
+ if (this.rev != undefined)
59
+ res['rev'] = this.rev;
60
+ if (this.deletionDate != undefined)
61
+ res['deletionDate'] = this.deletionDate;
62
+ if (this.name != undefined)
63
+ res['name'] = this.name;
64
+ if (this.description != undefined)
65
+ res['description'] = this.description;
66
+ if (this.responsible != undefined)
67
+ res['responsible'] = this.responsible;
68
+ if (this.guardPost != undefined)
69
+ res['guardPost'] = this.guardPost;
70
+ if (this.cbe != undefined)
71
+ res['cbe'] = this.cbe;
72
+ if (this.bic != undefined)
73
+ res['bic'] = this.bic;
74
+ if (this.bankAccount != undefined)
75
+ res['bankAccount'] = this.bankAccount;
76
+ if (this.nihii != undefined)
77
+ res['nihii'] = this.nihii;
78
+ if (this.ssin != undefined)
79
+ res['ssin'] = this.ssin;
80
+ if (this.address != undefined)
81
+ res['address'] = this.address.toJSON();
82
+ res['agendaIds'] = this.agendaIds.map((x0) => x0);
83
+ res['options'] = Object.fromEntries(Object.entries(this.options).map(([k0, v0]) => [k0, v0]));
84
+ res['publicInformations'] = Object.fromEntries(Object.entries(this.publicInformations).map(([k0, v0]) => [k0, v0]));
85
+ return res;
86
+ }
87
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['MedicalLocation']) {
88
+ if (typeof json != 'object')
89
+ throw new Error(`Expected json object at path ${path.join("")}`);
90
+ const jCpy = Object.assign({}, json);
91
+ const res = new MedicalLocation({
92
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
93
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
94
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
95
+ name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
96
+ description: expectString(extractEntry(jCpy, 'description', false, path), true, [...path, ".description"]),
97
+ responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
98
+ guardPost: expectBoolean(extractEntry(jCpy, 'guardPost', false, path), true, [...path, ".guardPost"]),
99
+ cbe: expectString(extractEntry(jCpy, 'cbe', false, path), true, [...path, ".cbe"]),
100
+ bic: expectString(extractEntry(jCpy, 'bic', false, path), true, [...path, ".bic"]),
101
+ bankAccount: expectString(extractEntry(jCpy, 'bankAccount', false, path), true, [...path, ".bankAccount"]),
102
+ nihii: expectString(extractEntry(jCpy, 'nihii', false, path), true, [...path, ".nihii"]),
103
+ ssin: expectString(extractEntry(jCpy, 'ssin', false, path), true, [...path, ".ssin"]),
104
+ address: expectObject(extractEntry(jCpy, 'address', false, path), true, ignoreUnknownKeys, [...path, ".address"], DecryptedAddress.fromJSON),
105
+ agendaIds: expectArray(extractEntry(jCpy, 'agendaIds', false, path), false, [...path, ".agendaIds"], (x0, p0) => expectString(x0, false, p0)),
106
+ options: expectMap(extractEntry(jCpy, 'options', false, path), false, [...path, ".options"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
107
+ publicInformations: expectMap(extractEntry(jCpy, 'publicInformations', false, path), false, [...path, ".publicInformations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
108
+ });
109
+ if (!ignoreUnknownKeys) {
110
+ const unused = Object.keys(jCpy);
111
+ if (unused.length > 0)
112
+ throw new Error(`Unexpected key(s) for json object MedicalLocation at path ${path.join("")}: ${unused}`);
113
+ }
114
+ return res;
115
+ }
116
+ }
@@ -0,0 +1,50 @@
1
+ import { AppendixType } from './base/AppendixType.mjs';
2
+ import { CodeFlag } from './base/CodeFlag.mjs';
3
+ import { CodeIdentification } from './base/CodeIdentification.mjs';
4
+ import { LinkQualification } from './base/LinkQualification.mjs';
5
+ import { StoredDocument } from './base/StoredDocument.mjs';
6
+ import { LetterValue } from './embed/LetterValue.mjs';
7
+ import { Periodicity } from './embed/Periodicity.mjs';
8
+ import { DecryptedValorisation } from './embed/Valorisation.mjs';
9
+ export declare class Tarification implements StoredDocument, CodeIdentification<string> {
10
+ id: string;
11
+ rev: string | undefined;
12
+ deletionDate: number | undefined;
13
+ label: {
14
+ [key: string]: string;
15
+ } | undefined;
16
+ context: string | undefined;
17
+ type: string | undefined;
18
+ code: string | undefined;
19
+ version: string | undefined;
20
+ author: string | undefined;
21
+ regions: Array<string>;
22
+ periodicity: Array<Periodicity>;
23
+ level: number | undefined;
24
+ links: Array<string>;
25
+ qualifiedLinks: {
26
+ [key in LinkQualification]?: Array<string>;
27
+ };
28
+ flags: Array<CodeFlag>;
29
+ searchTerms: {
30
+ [key: string]: Array<string>;
31
+ };
32
+ data: string | undefined;
33
+ appendices: {
34
+ [key in AppendixType]?: string;
35
+ };
36
+ disabled: boolean;
37
+ valorisations: Array<DecryptedValorisation>;
38
+ category: {
39
+ [key: string]: string;
40
+ };
41
+ consultationCode: boolean | undefined;
42
+ hasRelatedCode: boolean | undefined;
43
+ needsPrescriber: boolean | undefined;
44
+ relatedCodes: Array<string>;
45
+ ngroup: string | undefined;
46
+ letterValues: Array<LetterValue>;
47
+ constructor(partial: Partial<Tarification>);
48
+ toJSON(): object;
49
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Tarification;
50
+ }
@@ -0,0 +1,178 @@
1
+ // auto-generated file
2
+ import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ import { randomUuid } from '../utils/Id.mjs';
4
+ import { AppendixType } from './base/AppendixType.mjs';
5
+ import { CodeFlag } from './base/CodeFlag.mjs';
6
+ import { LinkQualification } from './base/LinkQualification.mjs';
7
+ import { LetterValue } from './embed/LetterValue.mjs';
8
+ import { Periodicity } from './embed/Periodicity.mjs';
9
+ import { DecryptedValorisation } from './embed/Valorisation.mjs';
10
+ export class Tarification {
11
+ constructor(partial) {
12
+ var _a;
13
+ this.rev = undefined;
14
+ this.deletionDate = undefined;
15
+ this.label = undefined;
16
+ this.context = undefined;
17
+ this.type = undefined;
18
+ this.code = undefined;
19
+ this.version = undefined;
20
+ this.author = undefined;
21
+ this.regions = [];
22
+ this.periodicity = [];
23
+ this.level = undefined;
24
+ this.links = [];
25
+ this.qualifiedLinks = {};
26
+ this.flags = [];
27
+ this.searchTerms = {};
28
+ this.data = undefined;
29
+ this.appendices = {};
30
+ this.disabled = false;
31
+ this.valorisations = [];
32
+ this.category = {};
33
+ this.consultationCode = undefined;
34
+ this.hasRelatedCode = undefined;
35
+ this.needsPrescriber = undefined;
36
+ this.relatedCodes = [];
37
+ this.ngroup = undefined;
38
+ this.letterValues = [];
39
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
40
+ if ('rev' in partial)
41
+ this.rev = partial.rev;
42
+ if ('deletionDate' in partial)
43
+ this.deletionDate = partial.deletionDate;
44
+ if ('label' in partial)
45
+ this.label = partial.label;
46
+ if ('context' in partial)
47
+ this.context = partial.context;
48
+ if ('type' in partial)
49
+ this.type = partial.type;
50
+ if ('code' in partial)
51
+ this.code = partial.code;
52
+ if ('version' in partial)
53
+ this.version = partial.version;
54
+ if ('author' in partial)
55
+ this.author = partial.author;
56
+ if ('regions' in partial && partial.regions !== undefined)
57
+ this.regions = partial.regions;
58
+ if ('periodicity' in partial && partial.periodicity !== undefined)
59
+ this.periodicity = partial.periodicity;
60
+ if ('level' in partial)
61
+ this.level = partial.level;
62
+ if ('links' in partial && partial.links !== undefined)
63
+ this.links = partial.links;
64
+ if ('qualifiedLinks' in partial && partial.qualifiedLinks !== undefined)
65
+ this.qualifiedLinks = partial.qualifiedLinks;
66
+ if ('flags' in partial && partial.flags !== undefined)
67
+ this.flags = partial.flags;
68
+ if ('searchTerms' in partial && partial.searchTerms !== undefined)
69
+ this.searchTerms = partial.searchTerms;
70
+ if ('data' in partial)
71
+ this.data = partial.data;
72
+ if ('appendices' in partial && partial.appendices !== undefined)
73
+ this.appendices = partial.appendices;
74
+ if ('disabled' in partial && partial.disabled !== undefined)
75
+ this.disabled = partial.disabled;
76
+ if ('valorisations' in partial && partial.valorisations !== undefined)
77
+ this.valorisations = partial.valorisations;
78
+ if ('category' in partial && partial.category !== undefined)
79
+ this.category = partial.category;
80
+ if ('consultationCode' in partial)
81
+ this.consultationCode = partial.consultationCode;
82
+ if ('hasRelatedCode' in partial)
83
+ this.hasRelatedCode = partial.hasRelatedCode;
84
+ if ('needsPrescriber' in partial)
85
+ this.needsPrescriber = partial.needsPrescriber;
86
+ if ('relatedCodes' in partial && partial.relatedCodes !== undefined)
87
+ this.relatedCodes = partial.relatedCodes;
88
+ if ('ngroup' in partial)
89
+ this.ngroup = partial.ngroup;
90
+ if ('letterValues' in partial && partial.letterValues !== undefined)
91
+ this.letterValues = partial.letterValues;
92
+ }
93
+ toJSON() {
94
+ const res = {};
95
+ res['id'] = this.id;
96
+ if (this.rev != undefined)
97
+ res['rev'] = this.rev;
98
+ if (this.deletionDate != undefined)
99
+ res['deletionDate'] = this.deletionDate;
100
+ if (this.label != undefined)
101
+ res['label'] = Object.fromEntries(Object.entries(this.label).map(([k0, v0]) => [k0, v0]));
102
+ if (this.context != undefined)
103
+ res['context'] = this.context;
104
+ if (this.type != undefined)
105
+ res['type'] = this.type;
106
+ if (this.code != undefined)
107
+ res['code'] = this.code;
108
+ if (this.version != undefined)
109
+ res['version'] = this.version;
110
+ if (this.author != undefined)
111
+ res['author'] = this.author;
112
+ res['regions'] = this.regions.map((x0) => x0);
113
+ res['periodicity'] = this.periodicity.map((x0) => x0.toJSON());
114
+ if (this.level != undefined)
115
+ res['level'] = this.level;
116
+ res['links'] = this.links.map((x0) => x0);
117
+ res['qualifiedLinks'] = Object.fromEntries(Object.entries(this.qualifiedLinks).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
118
+ res['flags'] = this.flags.map((x0) => x0);
119
+ res['searchTerms'] = Object.fromEntries(Object.entries(this.searchTerms).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
120
+ if (this.data != undefined)
121
+ res['data'] = this.data;
122
+ res['appendices'] = Object.fromEntries(Object.entries(this.appendices).map(([k0, v0]) => [k0, v0]));
123
+ res['disabled'] = this.disabled;
124
+ res['valorisations'] = this.valorisations.map((x0) => x0.toJSON());
125
+ res['category'] = Object.fromEntries(Object.entries(this.category).map(([k0, v0]) => [k0, v0]));
126
+ if (this.consultationCode != undefined)
127
+ res['consultationCode'] = this.consultationCode;
128
+ if (this.hasRelatedCode != undefined)
129
+ res['hasRelatedCode'] = this.hasRelatedCode;
130
+ if (this.needsPrescriber != undefined)
131
+ res['needsPrescriber'] = this.needsPrescriber;
132
+ res['relatedCodes'] = this.relatedCodes.map((x0) => x0);
133
+ if (this.ngroup != undefined)
134
+ res['ngroup'] = this.ngroup;
135
+ res['letterValues'] = this.letterValues.map((x0) => x0.toJSON());
136
+ return res;
137
+ }
138
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Tarification']) {
139
+ if (typeof json != 'object')
140
+ throw new Error(`Expected json object at path ${path.join("")}`);
141
+ const jCpy = Object.assign({}, json);
142
+ const res = new Tarification({
143
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
144
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
145
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
146
+ label: expectMap(extractEntry(jCpy, 'label', false, path), true, [...path, ".label"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
147
+ context: expectString(extractEntry(jCpy, 'context', false, path), true, [...path, ".context"]),
148
+ type: expectString(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"]),
149
+ code: expectString(extractEntry(jCpy, 'code', false, path), true, [...path, ".code"]),
150
+ version: expectString(extractEntry(jCpy, 'version', false, path), true, [...path, ".version"]),
151
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
152
+ regions: expectArray(extractEntry(jCpy, 'regions', false, path), false, [...path, ".regions"], (x0, p0) => expectString(x0, false, p0)),
153
+ periodicity: expectArray(extractEntry(jCpy, 'periodicity', false, path), false, [...path, ".periodicity"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Periodicity.fromJSON)),
154
+ level: expectNumber(extractEntry(jCpy, 'level', false, path), true, true, [...path, ".level"]),
155
+ links: expectArray(extractEntry(jCpy, 'links', false, path), false, [...path, ".links"], (x0, p0) => expectString(x0, false, p0)),
156
+ qualifiedLinks: expectMap(extractEntry(jCpy, 'qualifiedLinks', false, path), false, [...path, ".qualifiedLinks"], (k0, p0) => expectStringEnum(k0, false, p0, LinkQualification, 'LinkQualification'), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
157
+ flags: expectArray(extractEntry(jCpy, 'flags', false, path), false, [...path, ".flags"], (x0, p0) => expectStringEnum(x0, false, p0, CodeFlag, 'CodeFlag')),
158
+ searchTerms: expectMap(extractEntry(jCpy, 'searchTerms', false, path), false, [...path, ".searchTerms"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
159
+ data: expectString(extractEntry(jCpy, 'data', false, path), true, [...path, ".data"]),
160
+ appendices: expectMap(extractEntry(jCpy, 'appendices', false, path), false, [...path, ".appendices"], (k0, p0) => expectStringEnum(k0, false, p0, AppendixType, 'AppendixType'), (v0, p0) => expectString(v0, false, p0)),
161
+ disabled: expectBoolean(extractEntry(jCpy, 'disabled', false, path), false, [...path, ".disabled"]),
162
+ valorisations: expectArray(extractEntry(jCpy, 'valorisations', false, path), false, [...path, ".valorisations"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedValorisation.fromJSON)),
163
+ category: expectMap(extractEntry(jCpy, 'category', false, path), false, [...path, ".category"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
164
+ consultationCode: expectBoolean(extractEntry(jCpy, 'consultationCode', false, path), true, [...path, ".consultationCode"]),
165
+ hasRelatedCode: expectBoolean(extractEntry(jCpy, 'hasRelatedCode', false, path), true, [...path, ".hasRelatedCode"]),
166
+ needsPrescriber: expectBoolean(extractEntry(jCpy, 'needsPrescriber', false, path), true, [...path, ".needsPrescriber"]),
167
+ relatedCodes: expectArray(extractEntry(jCpy, 'relatedCodes', false, path), false, [...path, ".relatedCodes"], (x0, p0) => expectString(x0, false, p0)),
168
+ ngroup: expectString(extractEntry(jCpy, 'ngroup', false, path), true, [...path, ".ngroup"]),
169
+ letterValues: expectArray(extractEntry(jCpy, 'letterValues', false, path), false, [...path, ".letterValues"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, LetterValue.fromJSON)),
170
+ });
171
+ if (!ignoreUnknownKeys) {
172
+ const unused = Object.keys(jCpy);
173
+ if (unused.length > 0)
174
+ throw new Error(`Unexpected key(s) for json object Tarification at path ${path.join("")}: ${unused}`);
175
+ }
176
+ return res;
177
+ }
178
+ }
@@ -0,0 +1,25 @@
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 { TimeTableItem } from './embed/TimeTableItem.mjs';
6
+ export declare class TimeTable 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
+ name: string | undefined;
18
+ agendaId: string | undefined;
19
+ startTime: number | undefined;
20
+ endTime: number | undefined;
21
+ items: Array<TimeTableItem>;
22
+ constructor(partial: Partial<TimeTable>);
23
+ toJSON(): object;
24
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): TimeTable;
25
+ }
@@ -0,0 +1,111 @@
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 { TimeTableItem } from './embed/TimeTableItem.mjs';
6
+ export class TimeTable {
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.name = undefined;
19
+ this.agendaId = undefined;
20
+ this.startTime = undefined;
21
+ this.endTime = undefined;
22
+ this.items = [];
23
+ this.id = (_a = partial.id) !== null && _a !== void 0 ? _a : randomUuid();
24
+ if ('rev' in partial)
25
+ this.rev = partial.rev;
26
+ if ('created' in partial)
27
+ this.created = partial.created;
28
+ if ('modified' in partial)
29
+ this.modified = partial.modified;
30
+ if ('author' in partial)
31
+ this.author = partial.author;
32
+ if ('responsible' in partial)
33
+ this.responsible = partial.responsible;
34
+ if ('tags' in partial && partial.tags !== undefined)
35
+ this.tags = partial.tags;
36
+ if ('codes' in partial && partial.codes !== undefined)
37
+ this.codes = partial.codes;
38
+ if ('endOfLife' in partial)
39
+ this.endOfLife = partial.endOfLife;
40
+ if ('deletionDate' in partial)
41
+ this.deletionDate = partial.deletionDate;
42
+ if ('name' in partial)
43
+ this.name = partial.name;
44
+ if ('agendaId' in partial)
45
+ this.agendaId = partial.agendaId;
46
+ if ('startTime' in partial)
47
+ this.startTime = partial.startTime;
48
+ if ('endTime' in partial)
49
+ this.endTime = partial.endTime;
50
+ if ('items' in partial && partial.items !== undefined)
51
+ this.items = partial.items;
52
+ }
53
+ toJSON() {
54
+ const res = {};
55
+ res['id'] = this.id;
56
+ if (this.rev != undefined)
57
+ res['rev'] = this.rev;
58
+ if (this.created != undefined)
59
+ res['created'] = this.created;
60
+ if (this.modified != undefined)
61
+ res['modified'] = this.modified;
62
+ if (this.author != undefined)
63
+ res['author'] = this.author;
64
+ if (this.responsible != undefined)
65
+ res['responsible'] = this.responsible;
66
+ res['tags'] = this.tags.map((x0) => x0.toJSON());
67
+ res['codes'] = this.codes.map((x0) => x0.toJSON());
68
+ if (this.endOfLife != undefined)
69
+ res['endOfLife'] = this.endOfLife;
70
+ if (this.deletionDate != undefined)
71
+ res['deletionDate'] = this.deletionDate;
72
+ if (this.name != undefined)
73
+ res['name'] = this.name;
74
+ if (this.agendaId != undefined)
75
+ res['agendaId'] = this.agendaId;
76
+ if (this.startTime != undefined)
77
+ res['startTime'] = this.startTime;
78
+ if (this.endTime != undefined)
79
+ res['endTime'] = this.endTime;
80
+ res['items'] = this.items.map((x0) => x0.toJSON());
81
+ return res;
82
+ }
83
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['TimeTable']) {
84
+ if (typeof json != 'object')
85
+ throw new Error(`Expected json object at path ${path.join("")}`);
86
+ const jCpy = Object.assign({}, json);
87
+ const res = new TimeTable({
88
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
89
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
90
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
91
+ modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
92
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
93
+ responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
94
+ tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
95
+ codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
96
+ endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
97
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
98
+ name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
99
+ agendaId: expectString(extractEntry(jCpy, 'agendaId', false, path), true, [...path, ".agendaId"]),
100
+ startTime: expectNumber(extractEntry(jCpy, 'startTime', false, path), true, true, [...path, ".startTime"]),
101
+ endTime: expectNumber(extractEntry(jCpy, 'endTime', false, path), true, true, [...path, ".endTime"]),
102
+ items: expectArray(extractEntry(jCpy, 'items', false, path), false, [...path, ".items"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, TimeTableItem.fromJSON)),
103
+ });
104
+ if (!ignoreUnknownKeys) {
105
+ const unused = Object.keys(jCpy);
106
+ if (unused.length > 0)
107
+ throw new Error(`Unexpected key(s) for json object TimeTable at path ${path.join("")}: ${unused}`);
108
+ }
109
+ return res;
110
+ }
111
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum AppendixType {
2
+ ExternalLink = "ExternalLink",
3
+ Video = "Video",
4
+ Description = "Description"
5
+ }