@icure/cardinal-sdk 2.0.0-PREVIEW-18.1 → 2.0.0-PREVIEW-21

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 (384) hide show
  1. package/Kermit-kermit-core.mjs +45 -40
  2. package/Kermit-kermit.mjs +6 -6
  3. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1577 -1577
  4. package/api/HealthcarePartyApi.d.mts +2 -0
  5. package/api/HealthcarePartyApiInGroup.d.mts +5 -0
  6. package/api/HealthcarePartyApiInGroup.mjs +1 -0
  7. package/api/RecoveryApi.d.mts +5 -1
  8. package/api.d.mts +1 -0
  9. package/api.mjs +1 -0
  10. package/bitops-library-bits.mjs +197 -0
  11. package/bitops-library-endian.mjs +117 -0
  12. package/cardinal-sdk-ts.d.mts +2 -2
  13. package/cardinal-sdk-ts.mjs +57007 -56794
  14. package/cardinal-sdk.mjs +120895 -120501
  15. package/core-library-digest.mjs +186 -0
  16. package/crypto/CryptoService.d.mts +17 -7
  17. package/error-library-error.mjs +42 -0
  18. package/hash-library-sha2.mjs +183 -0
  19. package/internal/BytesEncoding.d.mts +3 -0
  20. package/internal/BytesEncoding.mjs +99 -0
  21. package/internal/JsonDecodeUtils.d.mts +20 -0
  22. package/internal/JsonDecodeUtils.mjs +99 -0
  23. package/kerberus.mjs +557 -389
  24. package/kotlin-kotlin-stdlib.mjs +2445 -2713
  25. package/kotlinx-atomicfu.mjs +13 -13
  26. package/kotlinx-coroutines-core.mjs +2455 -2450
  27. package/kotlinx-io-kotlinx-io-bytestring.mjs +36 -36
  28. package/kotlinx-io-kotlinx-io-core.mjs +459 -459
  29. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2029 -2029
  30. package/kotlinx-serialization-kotlinx-serialization-json.mjs +1952 -1952
  31. package/kryptom-lib.mjs +3263 -1967
  32. package/ktor-ktor-client-content-negotiation.mjs +184 -184
  33. package/ktor-ktor-client-core.mjs +2713 -2713
  34. package/ktor-ktor-events.mjs +6 -6
  35. package/ktor-ktor-http-cio.mjs +481 -481
  36. package/ktor-ktor-http.mjs +693 -693
  37. package/ktor-ktor-io.mjs +963 -963
  38. package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
  39. package/ktor-ktor-serialization-kotlinx.mjs +238 -238
  40. package/ktor-ktor-serialization.mjs +109 -109
  41. package/ktor-ktor-utils.mjs +557 -557
  42. package/ktor-ktor-websockets.mjs +673 -673
  43. package/model/AccessLog.d.mts +5 -0
  44. package/model/AccessLog.mjs +168 -0
  45. package/model/Agenda.d.mts +2 -0
  46. package/model/Agenda.mjs +82 -0
  47. package/model/ApplicationSettings.d.mts +5 -0
  48. package/model/ApplicationSettings.mjs +140 -0
  49. package/model/BooleanResponse.d.mts +2 -0
  50. package/model/BooleanResponse.mjs +20 -0
  51. package/model/CalendarItem.d.mts +5 -0
  52. package/model/CalendarItem.mjs +290 -0
  53. package/model/CalendarItemType.d.mts +7 -0
  54. package/model/CalendarItemType.mjs +117 -0
  55. package/model/Classification.d.mts +5 -0
  56. package/model/Classification.mjs +148 -0
  57. package/model/Code.d.mts +2 -0
  58. package/model/Code.mjs +69 -0
  59. package/model/Contact.d.mts +5 -0
  60. package/model/Contact.mjs +218 -0
  61. package/model/CryptoActorStub.d.mts +2 -0
  62. package/model/CryptoActorStub.mjs +45 -0
  63. package/model/CryptoActorStubWithType.d.mts +2 -0
  64. package/model/CryptoActorStubWithType.mjs +25 -0
  65. package/model/DataOwnerRegistrationSuccess.d.mts +2 -0
  66. package/model/DataOwnerRegistrationSuccess.mjs +24 -0
  67. package/model/DataOwnerWithType.d.mts +7 -0
  68. package/model/DataOwnerWithType.mjs +80 -0
  69. package/model/DatabaseInitialisation.d.mts +2 -0
  70. package/model/DatabaseInitialisation.mjs +34 -0
  71. package/model/Device.d.mts +2 -0
  72. package/model/Device.mjs +99 -0
  73. package/model/Document.d.mts +5 -0
  74. package/model/Document.mjs +246 -0
  75. package/model/DocumentTemplate.d.mts +2 -0
  76. package/model/DocumentTemplate.mjs +91 -0
  77. package/model/EntityReference.d.mts +2 -0
  78. package/model/EntityReference.mjs +29 -0
  79. package/model/EntityReferenceInGroup.d.mts +2 -0
  80. package/model/EntityReferenceInGroup.mjs +23 -0
  81. package/model/EntityTemplate.d.mts +2 -0
  82. package/model/EntityTemplate.mjs +46 -0
  83. package/model/Form.d.mts +5 -0
  84. package/model/Form.mjs +204 -0
  85. package/model/FormTemplate.d.mts +2 -0
  86. package/model/FormTemplate.mjs +82 -0
  87. package/model/FrontEndMigration.d.mts +2 -0
  88. package/model/FrontEndMigration.mjs +57 -0
  89. package/model/Group.d.mts +2 -0
  90. package/model/Group.mjs +68 -0
  91. package/model/GroupDeletionReport.d.mts +2 -0
  92. package/model/GroupDeletionReport.mjs +24 -0
  93. package/model/HealthElement.d.mts +5 -0
  94. package/model/HealthElement.mjs +226 -0
  95. package/model/HealthcareParty.d.mts +2 -0
  96. package/model/HealthcareParty.mjs +182 -0
  97. package/model/IdWithRev.d.mts +2 -0
  98. package/model/IdWithRev.mjs +23 -0
  99. package/model/IndexingInfo.d.mts +2 -0
  100. package/model/IndexingInfo.mjs +21 -0
  101. package/model/Insurance.d.mts +2 -0
  102. package/model/Insurance.mjs +46 -0
  103. package/model/Invoice.d.mts +5 -0
  104. package/model/Invoice.mjs +468 -0
  105. package/model/Keyword.d.mts +2 -0
  106. package/model/Keyword.mjs +58 -0
  107. package/model/ListOfIds.d.mts +2 -0
  108. package/model/ListOfIds.mjs +20 -0
  109. package/model/ListOfProperties.d.mts +2 -0
  110. package/model/ListOfProperties.mjs +22 -0
  111. package/model/MaintenanceTask.d.mts +5 -0
  112. package/model/MaintenanceTask.mjs +152 -0
  113. package/model/MedicalLocation.d.mts +2 -0
  114. package/model/MedicalLocation.mjs +63 -0
  115. package/model/Message.d.mts +5 -0
  116. package/model/Message.mjs +248 -0
  117. package/model/PaginatedDocumentKeyIdPair.d.mts +2 -0
  118. package/model/PaginatedDocumentKeyIdPair.mjs +24 -0
  119. package/model/Patient.d.mts +5 -0
  120. package/model/Patient.mjs +491 -0
  121. package/model/Place.d.mts +2 -0
  122. package/model/Place.mjs +33 -0
  123. package/model/PropertyStub.d.mts +5 -0
  124. package/model/PropertyStub.mjs +74 -0
  125. package/model/PropertyTypeStub.d.mts +2 -0
  126. package/model/PropertyTypeStub.mjs +26 -0
  127. package/model/PublicAgendasAndCalendarItemTypes.d.mts +2 -0
  128. package/model/PublicAgendasAndCalendarItemTypes.mjs +25 -0
  129. package/model/PublicKey.d.mts +2 -0
  130. package/model/PublicKey.mjs +24 -0
  131. package/model/Receipt.d.mts +5 -0
  132. package/model/Receipt.mjs +159 -0
  133. package/model/RegistrationInformation.d.mts +2 -0
  134. package/model/RegistrationInformation.mjs +43 -0
  135. package/model/RegistrationSuccess.d.mts +2 -0
  136. package/model/RegistrationSuccess.mjs +24 -0
  137. package/model/Replication.d.mts +2 -0
  138. package/model/Replication.mjs +35 -0
  139. package/model/ReplicationInfo.d.mts +2 -0
  140. package/model/ReplicationInfo.mjs +28 -0
  141. package/model/Role.d.mts +2 -0
  142. package/model/Role.mjs +34 -0
  143. package/model/StoredDocumentIdentifier.d.mts +2 -0
  144. package/model/StoredDocumentIdentifier.mjs +22 -0
  145. package/model/Tarification.d.mts +2 -0
  146. package/model/Tarification.mjs +92 -0
  147. package/model/TimeTable.d.mts +2 -0
  148. package/model/TimeTable.mjs +64 -0
  149. package/model/Topic.d.mts +5 -0
  150. package/model/Topic.mjs +163 -0
  151. package/model/User.d.mts +4 -0
  152. package/model/User.mjs +118 -0
  153. package/model/UserGroup.d.mts +2 -0
  154. package/model/UserGroup.mjs +55 -0
  155. package/model/base/CodeStub.d.mts +2 -0
  156. package/model/base/CodeStub.mjs +40 -0
  157. package/model/base/CryptoActor.d.mts +3 -0
  158. package/model/base/CryptoActor.mjs +19 -1
  159. package/model/base/Identifier.d.mts +2 -0
  160. package/model/base/Identifier.mjs +44 -0
  161. package/model/couchdb/Basic.d.mts +2 -0
  162. package/model/couchdb/Basic.mjs +22 -0
  163. package/model/couchdb/DatabaseInfo.d.mts +2 -0
  164. package/model/couchdb/DatabaseInfo.mjs +47 -0
  165. package/model/couchdb/DesignDocument.d.mts +2 -0
  166. package/model/couchdb/DesignDocument.mjs +40 -0
  167. package/model/couchdb/DocIdentifier.d.mts +2 -0
  168. package/model/couchdb/DocIdentifier.mjs +24 -0
  169. package/model/couchdb/GroupDatabasesInfo.d.mts +2 -0
  170. package/model/couchdb/GroupDatabasesInfo.mjs +26 -0
  171. package/model/couchdb/Remote.d.mts +2 -0
  172. package/model/couchdb/Remote.mjs +25 -0
  173. package/model/couchdb/RemoteAuthentication.d.mts +2 -0
  174. package/model/couchdb/RemoteAuthentication.mjs +23 -0
  175. package/model/couchdb/ReplicationStats.d.mts +2 -0
  176. package/model/couchdb/ReplicationStats.mjs +45 -0
  177. package/model/couchdb/ReplicatorDocument.d.mts +2 -0
  178. package/model/couchdb/ReplicatorDocument.mjs +61 -0
  179. package/model/couchdb/View.d.mts +2 -0
  180. package/model/couchdb/View.mjs +23 -0
  181. package/model/data/LabelledOccurence.d.mts +2 -0
  182. package/model/data/LabelledOccurence.mjs +22 -0
  183. package/model/embed/Address.d.mts +5 -0
  184. package/model/embed/Address.mjs +133 -0
  185. package/model/embed/AdministrationQuantity.d.mts +2 -0
  186. package/model/embed/AdministrationQuantity.mjs +29 -0
  187. package/model/embed/AgendaSlottingAlgorithm.d.mts +3 -0
  188. package/model/embed/AgendaSlottingAlgorithm.mjs +30 -0
  189. package/model/embed/AgreementAppendix.d.mts +2 -0
  190. package/model/embed/AgreementAppendix.mjs +30 -0
  191. package/model/embed/Annotation.d.mts +2 -0
  192. package/model/embed/Annotation.mjs +46 -0
  193. package/model/embed/CalendarItemTag.d.mts +5 -0
  194. package/model/embed/CalendarItemTag.mjs +72 -0
  195. package/model/embed/CareTeamMember.d.mts +5 -0
  196. package/model/embed/CareTeamMember.mjs +71 -0
  197. package/model/embed/CareTeamMembership.d.mts +5 -0
  198. package/model/embed/CareTeamMembership.mjs +73 -0
  199. package/model/embed/Content.d.mts +5 -0
  200. package/model/embed/Content.mjs +125 -0
  201. package/model/embed/DataAttachment.d.mts +2 -0
  202. package/model/embed/DataAttachment.mjs +26 -0
  203. package/model/embed/DatabaseSynchronization.d.mts +2 -0
  204. package/model/embed/DatabaseSynchronization.mjs +30 -0
  205. package/model/embed/Delegation.d.mts +2 -0
  206. package/model/embed/Delegation.mjs +30 -0
  207. package/model/embed/DeletedAttachment.d.mts +2 -0
  208. package/model/embed/DeletedAttachment.mjs +30 -0
  209. package/model/embed/DocumentGroup.d.mts +2 -0
  210. package/model/embed/DocumentGroup.mjs +24 -0
  211. package/model/embed/Duration.d.mts +2 -0
  212. package/model/embed/Duration.mjs +26 -0
  213. package/model/embed/EmbeddedTimeTableHour.d.mts +2 -0
  214. package/model/embed/EmbeddedTimeTableHour.mjs +22 -0
  215. package/model/embed/EmbeddedTimeTableItem.d.mts +2 -0
  216. package/model/embed/EmbeddedTimeTableItem.mjs +41 -0
  217. package/model/embed/Employer.d.mts +2 -0
  218. package/model/embed/Employer.mjs +26 -0
  219. package/model/embed/EmploymentInfo.d.mts +5 -0
  220. package/model/embed/EmploymentInfo.mjs +74 -0
  221. package/model/embed/Episode.d.mts +5 -0
  222. package/model/embed/Episode.mjs +75 -0
  223. package/model/embed/FinancialInstitutionInformation.d.mts +5 -0
  224. package/model/embed/FinancialInstitutionInformation.mjs +88 -0
  225. package/model/embed/FlatRateTarification.d.mts +5 -0
  226. package/model/embed/FlatRateTarification.mjs +72 -0
  227. package/model/embed/FlowItem.d.mts +2 -0
  228. package/model/embed/FlowItem.mjs +117 -0
  229. package/model/embed/HealthcarePartyHistoryStatus.d.mts +2 -0
  230. package/model/embed/HealthcarePartyHistoryStatus.mjs +28 -0
  231. package/model/embed/IdentityDocumentReader.d.mts +2 -0
  232. package/model/embed/IdentityDocumentReader.mjs +33 -0
  233. package/model/embed/Insurability.d.mts +5 -0
  234. package/model/embed/Insurability.mjs +100 -0
  235. package/model/embed/InvoicingCode.d.mts +5 -0
  236. package/model/embed/InvoicingCode.mjs +377 -0
  237. package/model/embed/KeywordSubword.d.mts +2 -0
  238. package/model/embed/KeywordSubword.mjs +25 -0
  239. package/model/embed/LetterValue.d.mts +2 -0
  240. package/model/embed/LetterValue.mjs +30 -0
  241. package/model/embed/Measure.d.mts +2 -0
  242. package/model/embed/Measure.mjs +57 -0
  243. package/model/embed/MedicalHouseContract.d.mts +5 -0
  244. package/model/embed/MedicalHouseContract.mjs +223 -0
  245. package/model/embed/Medication.d.mts +2 -0
  246. package/model/embed/Medication.mjs +157 -0
  247. package/model/embed/Medicinalproduct.d.mts +2 -0
  248. package/model/embed/Medicinalproduct.mjs +33 -0
  249. package/model/embed/MessageAttachment.d.mts +2 -0
  250. package/model/embed/MessageAttachment.mjs +25 -0
  251. package/model/embed/MessageReadStatus.d.mts +2 -0
  252. package/model/embed/MessageReadStatus.mjs +23 -0
  253. package/model/embed/ParagraphAgreement.d.mts +2 -0
  254. package/model/embed/ParagraphAgreement.mjs +86 -0
  255. package/model/embed/Partnership.d.mts +2 -0
  256. package/model/embed/Partnership.mjs +36 -0
  257. package/model/embed/PatientHealthCareParty.d.mts +9 -0
  258. package/model/embed/PatientHealthCareParty.mjs +88 -0
  259. package/model/embed/Payment.d.mts +2 -0
  260. package/model/embed/Payment.mjs +28 -0
  261. package/model/embed/Periodicity.d.mts +2 -0
  262. package/model/embed/Periodicity.mjs +26 -0
  263. package/model/embed/PersonName.d.mts +2 -0
  264. package/model/embed/PersonName.mjs +41 -0
  265. package/model/embed/PlanOfAction.d.mts +8 -3
  266. package/model/embed/PlanOfAction.mjs +179 -0
  267. package/model/embed/Range.d.mts +2 -0
  268. package/model/embed/Range.mjs +24 -0
  269. package/model/embed/ReferenceRange.d.mts +2 -0
  270. package/model/embed/ReferenceRange.mjs +40 -0
  271. package/model/embed/ReferralPeriod.d.mts +2 -0
  272. package/model/embed/ReferralPeriod.mjs +27 -0
  273. package/model/embed/RegimenItem.d.mts +2 -0
  274. package/model/embed/RegimenItem.mjs +40 -0
  275. package/model/embed/Renewal.d.mts +2 -0
  276. package/model/embed/Renewal.mjs +26 -0
  277. package/model/embed/ResourceGroupAllocationSchedule.d.mts +2 -0
  278. package/model/embed/ResourceGroupAllocationSchedule.mjs +39 -0
  279. package/model/embed/Right.d.mts +2 -0
  280. package/model/embed/Right.mjs +27 -0
  281. package/model/embed/RoleConfiguration.d.mts +2 -0
  282. package/model/embed/RoleConfiguration.mjs +22 -0
  283. package/model/embed/SchoolingInfo.d.mts +5 -0
  284. package/model/embed/SchoolingInfo.mjs +73 -0
  285. package/model/embed/SecureDelegation.d.mts +2 -0
  286. package/model/embed/SecureDelegation.mjs +39 -0
  287. package/model/embed/SecurityMetadata.d.mts +2 -0
  288. package/model/embed/SecurityMetadata.mjs +22 -0
  289. package/model/embed/Service.d.mts +5 -0
  290. package/model/embed/Service.mjs +240 -0
  291. package/model/embed/ServiceLink.d.mts +2 -0
  292. package/model/embed/ServiceLink.mjs +21 -0
  293. package/model/embed/SubContact.d.mts +5 -0
  294. package/model/embed/SubContact.mjs +146 -0
  295. package/model/embed/Substanceproduct.d.mts +2 -0
  296. package/model/embed/Substanceproduct.mjs +33 -0
  297. package/model/embed/Suspension.d.mts +2 -0
  298. package/model/embed/Suspension.mjs +30 -0
  299. package/model/embed/Telecom.d.mts +5 -0
  300. package/model/embed/Telecom.mjs +67 -0
  301. package/model/embed/TimeSeries.d.mts +2 -0
  302. package/model/embed/TimeSeries.mjs +32 -0
  303. package/model/embed/TimeTableHour.d.mts +2 -0
  304. package/model/embed/TimeTableHour.mjs +24 -0
  305. package/model/embed/TimeTableItem.d.mts +2 -0
  306. package/model/embed/TimeTableItem.mjs +57 -0
  307. package/model/embed/TypedValue.d.mts +5 -0
  308. package/model/embed/TypedValue.mjs +85 -0
  309. package/model/embed/Valorisation.d.mts +5 -0
  310. package/model/embed/Valorisation.mjs +108 -0
  311. package/model/embed/ValueWithPrecision.d.mts +2 -0
  312. package/model/embed/ValueWithPrecision.mjs +22 -0
  313. package/model/embed/Weekday.d.mts +2 -0
  314. package/model/embed/Weekday.mjs +26 -0
  315. package/model/embed/form/template/Action.d.mts +2 -0
  316. package/model/embed/form/template/Action.mjs +30 -0
  317. package/model/embed/form/template/CheckBox.d.mts +2 -0
  318. package/model/embed/form/template/CheckBox.mjs +71 -0
  319. package/model/embed/form/template/DatePicker.d.mts +2 -0
  320. package/model/embed/form/template/DatePicker.mjs +71 -0
  321. package/model/embed/form/template/DateTimePicker.d.mts +2 -0
  322. package/model/embed/form/template/DateTimePicker.mjs +71 -0
  323. package/model/embed/form/template/DropdownField.d.mts +2 -0
  324. package/model/embed/form/template/DropdownField.mjs +71 -0
  325. package/model/embed/form/template/FieldsGroup.d.mts +2 -0
  326. package/model/embed/form/template/FieldsGroup.mjs +28 -0
  327. package/model/embed/form/template/FormTemplateLayout.d.mts +2 -0
  328. package/model/embed/form/template/FormTemplateLayout.mjs +33 -0
  329. package/model/embed/form/template/Launcher.d.mts +2 -0
  330. package/model/embed/form/template/Launcher.mjs +26 -0
  331. package/model/embed/form/template/MeasureField.d.mts +2 -0
  332. package/model/embed/form/template/MeasureField.mjs +71 -0
  333. package/model/embed/form/template/MultipleChoice.d.mts +2 -0
  334. package/model/embed/form/template/MultipleChoice.mjs +71 -0
  335. package/model/embed/form/template/NumberField.d.mts +2 -0
  336. package/model/embed/form/template/NumberField.mjs +71 -0
  337. package/model/embed/form/template/RadioButton.d.mts +2 -0
  338. package/model/embed/form/template/RadioButton.mjs +71 -0
  339. package/model/embed/form/template/Section.d.mts +2 -0
  340. package/model/embed/form/template/Section.mjs +30 -0
  341. package/model/embed/form/template/State.d.mts +2 -0
  342. package/model/embed/form/template/State.mjs +26 -0
  343. package/model/embed/form/template/StructureElement.d.mts +3 -0
  344. package/model/embed/form/template/StructureElement.mjs +32 -1
  345. package/model/embed/form/template/TextField.d.mts +2 -0
  346. package/model/embed/form/template/TextField.mjs +71 -0
  347. package/model/embed/form/template/TimePicker.d.mts +2 -0
  348. package/model/embed/form/template/TimePicker.mjs +71 -0
  349. package/model/filter/predicate/AlwaysPredicate.d.mts +2 -0
  350. package/model/filter/predicate/AlwaysPredicate.mjs +20 -0
  351. package/model/filter/predicate/AndPredicate.d.mts +2 -0
  352. package/model/filter/predicate/AndPredicate.mjs +25 -0
  353. package/model/filter/predicate/KeyValuePredicate.d.mts +2 -0
  354. package/model/filter/predicate/KeyValuePredicate.mjs +32 -0
  355. package/model/filter/predicate/NotPredicate.d.mts +2 -0
  356. package/model/filter/predicate/NotPredicate.mjs +25 -0
  357. package/model/filter/predicate/OrPredicate.d.mts +2 -0
  358. package/model/filter/predicate/OrPredicate.mjs +25 -0
  359. package/model/filter/predicate/Predicate.d.mts +3 -0
  360. package/model/filter/predicate/Predicate.mjs +20 -1
  361. package/model/security/AlwaysPermissionItem.d.mts +2 -0
  362. package/model/security/AlwaysPermissionItem.mjs +25 -0
  363. package/model/security/AuthenticationToken.d.mts +2 -0
  364. package/model/security/AuthenticationToken.mjs +28 -0
  365. package/model/security/Enable2faRequest.d.mts +2 -0
  366. package/model/security/Enable2faRequest.mjs +22 -0
  367. package/model/security/ExternalJwtConfig.d.mts +18 -0
  368. package/model/security/ExternalJwtConfig.mjs +199 -0
  369. package/model/security/LoginIdentifier.d.mts +2 -0
  370. package/model/security/LoginIdentifier.mjs +22 -0
  371. package/model/security/OperationToken.d.mts +2 -0
  372. package/model/security/OperationToken.mjs +31 -0
  373. package/model/security/Permission.d.mts +2 -0
  374. package/model/security/Permission.mjs +24 -0
  375. package/model/security/PermissionItem.d.mts +3 -0
  376. package/model/security/PermissionItem.mjs +12 -1
  377. package/model/security/TokenWithGroup.d.mts +2 -0
  378. package/model/security/TokenWithGroup.mjs +25 -0
  379. package/options/SdkOptions.d.mts +3 -23
  380. package/package.json +1 -1
  381. package/utils/Id.d.mts +5 -0
  382. package/utils/Id.mjs +19 -10
  383. package/KotlinBigInteger-bignum.mjs +0 -5902
  384. /package/{KotlinBigInteger-bignum-serialization-kotlinx.mjs → core-library-core.mjs} +0 -0
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { AgreementAppendix } from './AgreementAppendix.mjs';
1
4
  export class ParagraphAgreement {
2
5
  constructor(partial) {
3
6
  this.timestamp = undefined;
@@ -67,4 +70,87 @@ export class ParagraphAgreement {
67
70
  if ('documentId' in partial)
68
71
  this.documentId = partial.documentId;
69
72
  }
73
+ toJSON() {
74
+ const res = {};
75
+ if (this.timestamp != undefined)
76
+ res['timestamp'] = this.timestamp;
77
+ if (this.paragraph != undefined)
78
+ res['paragraph'] = this.paragraph;
79
+ if (this.accepted != undefined)
80
+ res['accepted'] = this.accepted;
81
+ if (this.inTreatment != undefined)
82
+ res['inTreatment'] = this.inTreatment;
83
+ if (this.canceled != undefined)
84
+ res['canceled'] = this.canceled;
85
+ if (this.careProviderReference != undefined)
86
+ res['careProviderReference'] = this.careProviderReference;
87
+ if (this.decisionReference != undefined)
88
+ res['decisionReference'] = this.decisionReference;
89
+ if (this.start != undefined)
90
+ res['start'] = this.start;
91
+ if (this.end != undefined)
92
+ res['end'] = this.end;
93
+ if (this.cancelationDate != undefined)
94
+ res['cancelationDate'] = this.cancelationDate;
95
+ if (this.quantityValue != undefined)
96
+ res['quantityValue'] = this.quantityValue;
97
+ if (this.quantityUnit != undefined)
98
+ res['quantityUnit'] = this.quantityUnit;
99
+ if (this.ioRequestReference != undefined)
100
+ res['ioRequestReference'] = this.ioRequestReference;
101
+ if (this.responseType != undefined)
102
+ res['responseType'] = this.responseType;
103
+ if (this.refusalJustification != undefined)
104
+ res['refusalJustification'] = Object.fromEntries(Object.entries(this.refusalJustification).map(([k0, v0]) => [k0, v0]));
105
+ if (this.verses != undefined)
106
+ res['verses'] = this.verses.map((x0) => x0);
107
+ if (this.coverageType != undefined)
108
+ res['coverageType'] = this.coverageType;
109
+ if (this.unitNumber != undefined)
110
+ res['unitNumber'] = this.unitNumber;
111
+ if (this.strength != undefined)
112
+ res['strength'] = this.strength;
113
+ if (this.strengthUnit != undefined)
114
+ res['strengthUnit'] = this.strengthUnit;
115
+ if (this.agreementAppendices != undefined)
116
+ res['agreementAppendices'] = this.agreementAppendices.map((x0) => x0.toJSON());
117
+ if (this.documentId != undefined)
118
+ res['documentId'] = this.documentId;
119
+ return res;
120
+ }
121
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['ParagraphAgreement']) {
122
+ if (typeof json != 'object')
123
+ throw new Error(`Expected json object at path ${path.join("")}`);
124
+ const jCpy = Object.assign({}, json);
125
+ const res = new ParagraphAgreement({
126
+ timestamp: expectNumber(extractEntry(jCpy, 'timestamp', false, path), true, true, [...path, ".timestamp"]),
127
+ paragraph: expectString(extractEntry(jCpy, 'paragraph', false, path), true, [...path, ".paragraph"]),
128
+ accepted: expectBoolean(extractEntry(jCpy, 'accepted', false, path), true, [...path, ".accepted"]),
129
+ inTreatment: expectBoolean(extractEntry(jCpy, 'inTreatment', false, path), true, [...path, ".inTreatment"]),
130
+ canceled: expectBoolean(extractEntry(jCpy, 'canceled', false, path), true, [...path, ".canceled"]),
131
+ careProviderReference: expectString(extractEntry(jCpy, 'careProviderReference', false, path), true, [...path, ".careProviderReference"]),
132
+ decisionReference: expectString(extractEntry(jCpy, 'decisionReference', false, path), true, [...path, ".decisionReference"]),
133
+ start: expectNumber(extractEntry(jCpy, 'start', false, path), true, true, [...path, ".start"]),
134
+ end: expectNumber(extractEntry(jCpy, 'end', false, path), true, true, [...path, ".end"]),
135
+ cancelationDate: expectNumber(extractEntry(jCpy, 'cancelationDate', false, path), true, true, [...path, ".cancelationDate"]),
136
+ quantityValue: expectNumber(extractEntry(jCpy, 'quantityValue', false, path), true, false, [...path, ".quantityValue"]),
137
+ quantityUnit: expectString(extractEntry(jCpy, 'quantityUnit', false, path), true, [...path, ".quantityUnit"]),
138
+ ioRequestReference: expectString(extractEntry(jCpy, 'ioRequestReference', false, path), true, [...path, ".ioRequestReference"]),
139
+ responseType: expectString(extractEntry(jCpy, 'responseType', false, path), true, [...path, ".responseType"]),
140
+ refusalJustification: expectMap(extractEntry(jCpy, 'refusalJustification', false, path), true, [...path, ".refusalJustification"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
141
+ verses: expectArray(extractEntry(jCpy, 'verses', false, path), true, [...path, ".verses"], (x0, p0) => expectNumber(x0, false, true, p0)),
142
+ coverageType: expectString(extractEntry(jCpy, 'coverageType', false, path), true, [...path, ".coverageType"]),
143
+ unitNumber: expectNumber(extractEntry(jCpy, 'unitNumber', false, path), true, false, [...path, ".unitNumber"]),
144
+ strength: expectNumber(extractEntry(jCpy, 'strength', false, path), true, false, [...path, ".strength"]),
145
+ strengthUnit: expectString(extractEntry(jCpy, 'strengthUnit', false, path), true, [...path, ".strengthUnit"]),
146
+ agreementAppendices: expectArray(extractEntry(jCpy, 'agreementAppendices', false, path), true, [...path, ".agreementAppendices"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, AgreementAppendix.fromJSON)),
147
+ documentId: expectString(extractEntry(jCpy, 'documentId', false, path), true, [...path, ".documentId"]),
148
+ });
149
+ if (!ignoreUnknownKeys) {
150
+ const unused = Object.keys(jCpy);
151
+ if (unused.length > 0)
152
+ throw new Error(`Unexpected key(s) for json object ParagraphAgreement at path ${path.join("")}: ${unused}`);
153
+ }
154
+ return res;
155
+ }
70
156
  }
@@ -7,4 +7,6 @@ export declare class Partnership {
7
7
  meToOtherRelationshipDescription: string | undefined;
8
8
  otherToMeRelationshipDescription: string | undefined;
9
9
  constructor(partial: Partial<Partnership>);
10
+ toJSON(): object;
11
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Partnership;
10
12
  }
@@ -1,3 +1,7 @@
1
+ // auto-generated file
2
+ import { expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { PartnershipStatus } from './PartnershipStatus.mjs';
4
+ import { PartnershipType } from './PartnershipType.mjs';
1
5
  export class Partnership {
2
6
  constructor(partial) {
3
7
  this.type = undefined;
@@ -16,4 +20,36 @@ export class Partnership {
16
20
  if ('otherToMeRelationshipDescription' in partial)
17
21
  this.otherToMeRelationshipDescription = partial.otherToMeRelationshipDescription;
18
22
  }
23
+ toJSON() {
24
+ const res = {};
25
+ if (this.type != undefined)
26
+ res['type'] = this.type;
27
+ if (this.status != undefined)
28
+ res['status'] = this.status;
29
+ if (this.partnerId != undefined)
30
+ res['partnerId'] = this.partnerId;
31
+ if (this.meToOtherRelationshipDescription != undefined)
32
+ res['meToOtherRelationshipDescription'] = this.meToOtherRelationshipDescription;
33
+ if (this.otherToMeRelationshipDescription != undefined)
34
+ res['otherToMeRelationshipDescription'] = this.otherToMeRelationshipDescription;
35
+ return res;
36
+ }
37
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Partnership']) {
38
+ if (typeof json != 'object')
39
+ throw new Error(`Expected json object at path ${path.join("")}`);
40
+ const jCpy = Object.assign({}, json);
41
+ const res = new Partnership({
42
+ type: expectStringEnum(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"], PartnershipType, 'PartnershipType'),
43
+ status: expectStringEnum(extractEntry(jCpy, 'status', false, path), true, [...path, ".status"], PartnershipStatus, 'PartnershipStatus'),
44
+ partnerId: expectString(extractEntry(jCpy, 'partnerId', false, path), true, [...path, ".partnerId"]),
45
+ meToOtherRelationshipDescription: expectString(extractEntry(jCpy, 'meToOtherRelationshipDescription', false, path), true, [...path, ".meToOtherRelationshipDescription"]),
46
+ otherToMeRelationshipDescription: expectString(extractEntry(jCpy, 'otherToMeRelationshipDescription', false, path), true, [...path, ".otherToMeRelationshipDescription"]),
47
+ });
48
+ if (!ignoreUnknownKeys) {
49
+ const unused = Object.keys(jCpy);
50
+ if (unused.length > 0)
51
+ throw new Error(`Unexpected key(s) for json object Partnership at path ${path.join("")}: ${unused}`);
52
+ }
53
+ return res;
54
+ }
19
55
  }
@@ -1,3 +1,4 @@
1
+ import { DecryptedPropertyStub, EncryptedPropertyStub, PropertyStub } from '../PropertyStub.mjs';
1
2
  import { Base64String } from '../specializations/Base64String.mjs';
2
3
  import { Encryptable } from './Encryptable.mjs';
3
4
  import { PatientHealthCarePartyType } from './PatientHealthCarePartyType.mjs';
@@ -11,7 +12,9 @@ export interface PatientHealthCareParty extends Encryptable {
11
12
  };
12
13
  referralPeriods: Array<ReferralPeriod>;
13
14
  referral: boolean;
15
+ properties: Array<PropertyStub> | undefined;
14
16
  readonly isEncrypted: boolean;
17
+ toJSON(): object;
15
18
  }
16
19
  export declare class DecryptedPatientHealthCareParty {
17
20
  type: PatientHealthCarePartyType | undefined;
@@ -21,9 +24,12 @@ export declare class DecryptedPatientHealthCareParty {
21
24
  };
22
25
  referralPeriods: Array<ReferralPeriod>;
23
26
  referral: boolean;
27
+ properties: Array<DecryptedPropertyStub> | undefined;
24
28
  encryptedSelf: Base64String | undefined;
25
29
  readonly isEncrypted: false;
26
30
  constructor(partial: Partial<DecryptedPatientHealthCareParty>);
31
+ toJSON(): object;
32
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedPatientHealthCareParty;
27
33
  }
28
34
  export declare class EncryptedPatientHealthCareParty {
29
35
  type: PatientHealthCarePartyType | undefined;
@@ -33,7 +39,10 @@ export declare class EncryptedPatientHealthCareParty {
33
39
  };
34
40
  referralPeriods: Array<ReferralPeriod>;
35
41
  referral: boolean;
42
+ properties: Array<EncryptedPropertyStub> | undefined;
36
43
  encryptedSelf: Base64String | undefined;
37
44
  readonly isEncrypted: true;
38
45
  constructor(partial: Partial<EncryptedPatientHealthCareParty>);
46
+ toJSON(): object;
47
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedPatientHealthCareParty;
39
48
  }
@@ -1,3 +1,9 @@
1
+ // auto-generated file
2
+ import { expectArray, expectBoolean, expectMap, expectObject, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { DecryptedPropertyStub, EncryptedPropertyStub } from '../PropertyStub.mjs';
4
+ import { PatientHealthCarePartyType } from './PatientHealthCarePartyType.mjs';
5
+ import { ReferralPeriod } from './ReferralPeriod.mjs';
6
+ import { TelecomType } from './TelecomType.mjs';
1
7
  export class DecryptedPatientHealthCareParty {
2
8
  constructor(partial) {
3
9
  this.type = undefined;
@@ -5,6 +11,7 @@ export class DecryptedPatientHealthCareParty {
5
11
  this.sendFormats = {};
6
12
  this.referralPeriods = [];
7
13
  this.referral = false;
14
+ this.properties = undefined;
8
15
  this.encryptedSelf = undefined;
9
16
  this.isEncrypted = false;
10
17
  if (partial.isEncrypted !== undefined && partial.isEncrypted !== false)
@@ -19,9 +26,49 @@ export class DecryptedPatientHealthCareParty {
19
26
  this.referralPeriods = partial.referralPeriods;
20
27
  if ('referral' in partial && partial.referral !== undefined)
21
28
  this.referral = partial.referral;
29
+ if ('properties' in partial)
30
+ this.properties = partial.properties;
22
31
  if ('encryptedSelf' in partial)
23
32
  this.encryptedSelf = partial.encryptedSelf;
24
33
  }
34
+ toJSON() {
35
+ const res = {};
36
+ if (this.type != undefined)
37
+ res['type'] = this.type;
38
+ if (this.healthcarePartyId != undefined)
39
+ res['healthcarePartyId'] = this.healthcarePartyId;
40
+ res['sendFormats'] = Object.fromEntries(Object.entries(this.sendFormats).map(([k0, v0]) => [k0, v0]));
41
+ res['referralPeriods'] = this.referralPeriods.map((x0) => x0.toJSON());
42
+ res['referral'] = this.referral;
43
+ if (this.properties != undefined)
44
+ res['properties'] = this.properties.map((x0) => x0.toJSON());
45
+ if (this.encryptedSelf != undefined)
46
+ res['encryptedSelf'] = this.encryptedSelf;
47
+ res['isEncrypted'] = false;
48
+ return res;
49
+ }
50
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedPatientHealthCareParty']) {
51
+ if (typeof json != 'object')
52
+ throw new Error(`Expected json object at path ${path.join("")}`);
53
+ const jCpy = Object.assign({}, json);
54
+ if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
55
+ throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedPatientHealthCareParty`);
56
+ const res = new DecryptedPatientHealthCareParty({
57
+ type: expectStringEnum(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"], PatientHealthCarePartyType, 'PatientHealthCarePartyType'),
58
+ healthcarePartyId: expectString(extractEntry(jCpy, 'healthcarePartyId', false, path), true, [...path, ".healthcarePartyId"]),
59
+ sendFormats: expectMap(extractEntry(jCpy, 'sendFormats', false, path), false, [...path, ".sendFormats"], (k0, p0) => expectStringEnum(k0, false, p0, TelecomType, 'TelecomType'), (v0, p0) => expectString(v0, false, p0)),
60
+ referralPeriods: expectArray(extractEntry(jCpy, 'referralPeriods', false, path), false, [...path, ".referralPeriods"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, ReferralPeriod.fromJSON)),
61
+ referral: expectBoolean(extractEntry(jCpy, 'referral', false, path), false, [...path, ".referral"]),
62
+ properties: expectArray(extractEntry(jCpy, 'properties', false, path), true, [...path, ".properties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
63
+ encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
64
+ });
65
+ if (!ignoreUnknownKeys) {
66
+ const unused = Object.keys(jCpy);
67
+ if (unused.length > 0)
68
+ throw new Error(`Unexpected key(s) for json object DecryptedPatientHealthCareParty at path ${path.join("")}: ${unused}`);
69
+ }
70
+ return res;
71
+ }
25
72
  }
26
73
  export class EncryptedPatientHealthCareParty {
27
74
  constructor(partial) {
@@ -30,6 +77,7 @@ export class EncryptedPatientHealthCareParty {
30
77
  this.sendFormats = {};
31
78
  this.referralPeriods = [];
32
79
  this.referral = false;
80
+ this.properties = undefined;
33
81
  this.encryptedSelf = undefined;
34
82
  this.isEncrypted = true;
35
83
  if (partial.isEncrypted !== undefined && partial.isEncrypted !== true)
@@ -44,7 +92,47 @@ export class EncryptedPatientHealthCareParty {
44
92
  this.referralPeriods = partial.referralPeriods;
45
93
  if ('referral' in partial && partial.referral !== undefined)
46
94
  this.referral = partial.referral;
95
+ if ('properties' in partial)
96
+ this.properties = partial.properties;
47
97
  if ('encryptedSelf' in partial)
48
98
  this.encryptedSelf = partial.encryptedSelf;
49
99
  }
100
+ toJSON() {
101
+ const res = {};
102
+ if (this.type != undefined)
103
+ res['type'] = this.type;
104
+ if (this.healthcarePartyId != undefined)
105
+ res['healthcarePartyId'] = this.healthcarePartyId;
106
+ res['sendFormats'] = Object.fromEntries(Object.entries(this.sendFormats).map(([k0, v0]) => [k0, v0]));
107
+ res['referralPeriods'] = this.referralPeriods.map((x0) => x0.toJSON());
108
+ res['referral'] = this.referral;
109
+ if (this.properties != undefined)
110
+ res['properties'] = this.properties.map((x0) => x0.toJSON());
111
+ if (this.encryptedSelf != undefined)
112
+ res['encryptedSelf'] = this.encryptedSelf;
113
+ res['isEncrypted'] = true;
114
+ return res;
115
+ }
116
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedPatientHealthCareParty']) {
117
+ if (typeof json != 'object')
118
+ throw new Error(`Expected json object at path ${path.join("")}`);
119
+ const jCpy = Object.assign({}, json);
120
+ if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
121
+ throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedPatientHealthCareParty`);
122
+ const res = new EncryptedPatientHealthCareParty({
123
+ type: expectStringEnum(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"], PatientHealthCarePartyType, 'PatientHealthCarePartyType'),
124
+ healthcarePartyId: expectString(extractEntry(jCpy, 'healthcarePartyId', false, path), true, [...path, ".healthcarePartyId"]),
125
+ sendFormats: expectMap(extractEntry(jCpy, 'sendFormats', false, path), false, [...path, ".sendFormats"], (k0, p0) => expectStringEnum(k0, false, p0, TelecomType, 'TelecomType'), (v0, p0) => expectString(v0, false, p0)),
126
+ referralPeriods: expectArray(extractEntry(jCpy, 'referralPeriods', false, path), false, [...path, ".referralPeriods"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, ReferralPeriod.fromJSON)),
127
+ referral: expectBoolean(extractEntry(jCpy, 'referral', false, path), false, [...path, ".referral"]),
128
+ properties: expectArray(extractEntry(jCpy, 'properties', false, path), true, [...path, ".properties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedPropertyStub.fromJSON)),
129
+ encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
130
+ });
131
+ if (!ignoreUnknownKeys) {
132
+ const unused = Object.keys(jCpy);
133
+ if (unused.length > 0)
134
+ throw new Error(`Unexpected key(s) for json object EncryptedPatientHealthCareParty at path ${path.join("")}: ${unused}`);
135
+ }
136
+ return res;
137
+ }
50
138
  }
@@ -4,4 +4,6 @@ export declare class Payment {
4
4
  paymentType: PaymentType | undefined;
5
5
  paid: number | undefined;
6
6
  constructor(partial: Partial<Payment>);
7
+ toJSON(): object;
8
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Payment;
7
9
  }
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectNumber, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { PaymentType } from './PaymentType.mjs';
1
4
  export class Payment {
2
5
  constructor(partial) {
3
6
  this.paymentDate = 0;
@@ -10,4 +13,29 @@ export class Payment {
10
13
  if ('paid' in partial)
11
14
  this.paid = partial.paid;
12
15
  }
16
+ toJSON() {
17
+ const res = {};
18
+ res['paymentDate'] = this.paymentDate;
19
+ if (this.paymentType != undefined)
20
+ res['paymentType'] = this.paymentType;
21
+ if (this.paid != undefined)
22
+ res['paid'] = this.paid;
23
+ return res;
24
+ }
25
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Payment']) {
26
+ if (typeof json != 'object')
27
+ throw new Error(`Expected json object at path ${path.join("")}`);
28
+ const jCpy = Object.assign({}, json);
29
+ const res = new Payment({
30
+ paymentDate: expectNumber(extractEntry(jCpy, 'paymentDate', false, path), false, true, [...path, ".paymentDate"]),
31
+ paymentType: expectStringEnum(extractEntry(jCpy, 'paymentType', false, path), true, [...path, ".paymentType"], PaymentType, 'PaymentType'),
32
+ paid: expectNumber(extractEntry(jCpy, 'paid', false, path), true, false, [...path, ".paid"]),
33
+ });
34
+ if (!ignoreUnknownKeys) {
35
+ const unused = Object.keys(jCpy);
36
+ if (unused.length > 0)
37
+ throw new Error(`Unexpected key(s) for json object Payment at path ${path.join("")}: ${unused}`);
38
+ }
39
+ return res;
40
+ }
13
41
  }
@@ -3,4 +3,6 @@ export declare class Periodicity {
3
3
  relatedCode: CodeStub | undefined;
4
4
  relatedPeriodicity: CodeStub | undefined;
5
5
  constructor(partial: Partial<Periodicity>);
6
+ toJSON(): object;
7
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Periodicity;
6
8
  }
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectObject, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { CodeStub } from '../base/CodeStub.mjs';
1
4
  export class Periodicity {
2
5
  constructor(partial) {
3
6
  this.relatedCode = undefined;
@@ -7,4 +10,27 @@ export class Periodicity {
7
10
  if ('relatedPeriodicity' in partial)
8
11
  this.relatedPeriodicity = partial.relatedPeriodicity;
9
12
  }
13
+ toJSON() {
14
+ const res = {};
15
+ if (this.relatedCode != undefined)
16
+ res['relatedCode'] = this.relatedCode.toJSON();
17
+ if (this.relatedPeriodicity != undefined)
18
+ res['relatedPeriodicity'] = this.relatedPeriodicity.toJSON();
19
+ return res;
20
+ }
21
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Periodicity']) {
22
+ if (typeof json != 'object')
23
+ throw new Error(`Expected json object at path ${path.join("")}`);
24
+ const jCpy = Object.assign({}, json);
25
+ const res = new Periodicity({
26
+ relatedCode: expectObject(extractEntry(jCpy, 'relatedCode', false, path), true, ignoreUnknownKeys, [...path, ".relatedCode"], CodeStub.fromJSON),
27
+ relatedPeriodicity: expectObject(extractEntry(jCpy, 'relatedPeriodicity', false, path), true, ignoreUnknownKeys, [...path, ".relatedPeriodicity"], CodeStub.fromJSON),
28
+ });
29
+ if (!ignoreUnknownKeys) {
30
+ const unused = Object.keys(jCpy);
31
+ if (unused.length > 0)
32
+ throw new Error(`Unexpected key(s) for json object Periodicity at path ${path.join("")}: ${unused}`);
33
+ }
34
+ return res;
35
+ }
10
36
  }
@@ -9,4 +9,6 @@ export declare class PersonName {
9
9
  text: string | undefined;
10
10
  use: PersonNameUse | undefined;
11
11
  constructor(partial: Partial<PersonName>);
12
+ toJSON(): object;
13
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): PersonName;
12
14
  }
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectArray, expectNumber, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { PersonNameUse } from './PersonNameUse.mjs';
1
4
  export class PersonName {
2
5
  constructor(partial) {
3
6
  this.lastName = undefined;
@@ -25,4 +28,42 @@ export class PersonName {
25
28
  if ('use' in partial)
26
29
  this.use = partial.use;
27
30
  }
31
+ toJSON() {
32
+ const res = {};
33
+ if (this.lastName != undefined)
34
+ res['lastName'] = this.lastName;
35
+ res['firstNames'] = this.firstNames.map((x0) => x0);
36
+ if (this.start != undefined)
37
+ res['start'] = this.start;
38
+ if (this.end != undefined)
39
+ res['end'] = this.end;
40
+ res['prefix'] = this.prefix.map((x0) => x0);
41
+ res['suffix'] = this.suffix.map((x0) => x0);
42
+ if (this.text != undefined)
43
+ res['text'] = this.text;
44
+ if (this.use != undefined)
45
+ res['use'] = this.use;
46
+ return res;
47
+ }
48
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['PersonName']) {
49
+ if (typeof json != 'object')
50
+ throw new Error(`Expected json object at path ${path.join("")}`);
51
+ const jCpy = Object.assign({}, json);
52
+ const res = new PersonName({
53
+ lastName: expectString(extractEntry(jCpy, 'lastName', false, path), true, [...path, ".lastName"]),
54
+ firstNames: expectArray(extractEntry(jCpy, 'firstNames', false, path), false, [...path, ".firstNames"], (x0, p0) => expectString(x0, false, p0)),
55
+ start: expectNumber(extractEntry(jCpy, 'start', false, path), true, true, [...path, ".start"]),
56
+ end: expectNumber(extractEntry(jCpy, 'end', false, path), true, true, [...path, ".end"]),
57
+ prefix: expectArray(extractEntry(jCpy, 'prefix', false, path), false, [...path, ".prefix"], (x0, p0) => expectString(x0, false, p0)),
58
+ suffix: expectArray(extractEntry(jCpy, 'suffix', false, path), false, [...path, ".suffix"], (x0, p0) => expectString(x0, false, p0)),
59
+ text: expectString(extractEntry(jCpy, 'text', false, path), true, [...path, ".text"]),
60
+ use: expectStringEnum(extractEntry(jCpy, 'use', false, path), true, [...path, ".use"], PersonNameUse, 'PersonNameUse'),
61
+ });
62
+ if (!ignoreUnknownKeys) {
63
+ const unused = Object.keys(jCpy);
64
+ if (unused.length > 0)
65
+ throw new Error(`Unexpected key(s) for json object PersonName at path ${path.join("")}: ${unused}`);
66
+ }
67
+ return res;
68
+ }
28
69
  }
@@ -17,9 +17,10 @@ export interface PlanOfAction extends Encryptable, ICureDocument<string>, Named
17
17
  status: number;
18
18
  documentIds: Array<string>;
19
19
  numberOfCares: number | undefined;
20
- careTeamMemberships: Array<CareTeamMembership | undefined>;
20
+ careTeamMemberships: Array<CareTeamMembership>;
21
21
  relevant: boolean;
22
22
  readonly isEncrypted: boolean;
23
+ toJSON(): object;
23
24
  }
24
25
  export declare class DecryptedPlanOfAction {
25
26
  id: string;
@@ -44,11 +45,13 @@ export declare class DecryptedPlanOfAction {
44
45
  status: number;
45
46
  documentIds: Array<string>;
46
47
  numberOfCares: number | undefined;
47
- careTeamMemberships: Array<DecryptedCareTeamMembership | undefined>;
48
+ careTeamMemberships: Array<DecryptedCareTeamMembership>;
48
49
  relevant: boolean;
49
50
  encryptedSelf: Base64String | undefined;
50
51
  readonly isEncrypted: false;
51
52
  constructor(partial: Partial<DecryptedPlanOfAction>);
53
+ toJSON(): object;
54
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedPlanOfAction;
52
55
  }
53
56
  export declare class EncryptedPlanOfAction {
54
57
  id: string;
@@ -73,9 +76,11 @@ export declare class EncryptedPlanOfAction {
73
76
  status: number;
74
77
  documentIds: Array<string>;
75
78
  numberOfCares: number | undefined;
76
- careTeamMemberships: Array<EncryptedCareTeamMembership | undefined>;
79
+ careTeamMemberships: Array<EncryptedCareTeamMembership>;
77
80
  relevant: boolean;
78
81
  encryptedSelf: Base64String | undefined;
79
82
  readonly isEncrypted: true;
80
83
  constructor(partial: Partial<EncryptedPlanOfAction>);
84
+ toJSON(): object;
85
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedPlanOfAction;
81
86
  }