@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,5 +1,13 @@
1
1
  // auto-generated file
2
+ import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, expectStringEnum, extractEntry } from '../internal/JsonDecodeUtils.mjs';
2
3
  import { randomUuid } from '../utils/Id.mjs';
4
+ import { CalendarItem as CalendarItem_ } from './CalendarItem.mjs';
5
+ import { CodeStub } from './base/CodeStub.mjs';
6
+ import { DecryptedAddress, EncryptedAddress } from './embed/Address.mjs';
7
+ import { DecryptedCalendarItemTag, EncryptedCalendarItemTag } from './embed/CalendarItemTag.mjs';
8
+ import { Delegation } from './embed/Delegation.mjs';
9
+ import { FlowItem } from './embed/FlowItem.mjs';
10
+ import { SecurityMetadata } from './embed/SecurityMetadata.mjs';
3
11
  export class DecryptedCalendarItem {
4
12
  constructor(partial) {
5
13
  var _a;
@@ -134,6 +142,147 @@ export class DecryptedCalendarItem {
134
142
  if ('securityMetadata' in partial)
135
143
  this.securityMetadata = partial.securityMetadata;
136
144
  }
145
+ toJSON() {
146
+ const res = {};
147
+ res['id'] = this.id;
148
+ if (this.rev != undefined)
149
+ res['rev'] = this.rev;
150
+ if (this.created != undefined)
151
+ res['created'] = this.created;
152
+ if (this.modified != undefined)
153
+ res['modified'] = this.modified;
154
+ if (this.author != undefined)
155
+ res['author'] = this.author;
156
+ if (this.responsible != undefined)
157
+ res['responsible'] = this.responsible;
158
+ if (this.medicalLocationId != undefined)
159
+ res['medicalLocationId'] = this.medicalLocationId;
160
+ res['tags'] = this.tags.map((x0) => x0.toJSON());
161
+ res['codes'] = this.codes.map((x0) => x0.toJSON());
162
+ if (this.endOfLife != undefined)
163
+ res['endOfLife'] = this.endOfLife;
164
+ if (this.deletionDate != undefined)
165
+ res['deletionDate'] = this.deletionDate;
166
+ if (this.title != undefined)
167
+ res['title'] = this.title;
168
+ if (this.calendarItemTypeId != undefined)
169
+ res['calendarItemTypeId'] = this.calendarItemTypeId;
170
+ if (this.masterCalendarItemId != undefined)
171
+ res['masterCalendarItemId'] = this.masterCalendarItemId;
172
+ if (this.patientId != undefined)
173
+ res['patientId'] = this.patientId;
174
+ if (this.important != undefined)
175
+ res['important'] = this.important;
176
+ if (this.homeVisit != undefined)
177
+ res['homeVisit'] = this.homeVisit;
178
+ if (this.phoneNumber != undefined)
179
+ res['phoneNumber'] = this.phoneNumber;
180
+ if (this.placeId != undefined)
181
+ res['placeId'] = this.placeId;
182
+ if (this.address != undefined)
183
+ res['address'] = this.address.toJSON();
184
+ if (this.addressText != undefined)
185
+ res['addressText'] = this.addressText;
186
+ if (this.startTime != undefined)
187
+ res['startTime'] = this.startTime;
188
+ if (this.endTime != undefined)
189
+ res['endTime'] = this.endTime;
190
+ if (this.confirmationTime != undefined)
191
+ res['confirmationTime'] = this.confirmationTime;
192
+ if (this.cancellationTimestamp != undefined)
193
+ res['cancellationTimestamp'] = this.cancellationTimestamp;
194
+ if (this.confirmationId != undefined)
195
+ res['confirmationId'] = this.confirmationId;
196
+ if (this.duration != undefined)
197
+ res['duration'] = this.duration;
198
+ if (this.allDay != undefined)
199
+ res['allDay'] = this.allDay;
200
+ if (this.details != undefined)
201
+ res['details'] = this.details;
202
+ if (this.wasMigrated != undefined)
203
+ res['wasMigrated'] = this.wasMigrated;
204
+ if (this.agendaId != undefined)
205
+ res['agendaId'] = this.agendaId;
206
+ if (this.resourceGroup != undefined)
207
+ res['resourceGroup'] = this.resourceGroup.toJSON();
208
+ if (this.availabilitiesAssignmentStrategy != undefined)
209
+ res['availabilitiesAssignmentStrategy'] = this.availabilitiesAssignmentStrategy;
210
+ if (this.hcpId != undefined)
211
+ res['hcpId'] = this.hcpId;
212
+ if (this.recurrenceId != undefined)
213
+ res['recurrenceId'] = this.recurrenceId;
214
+ res['meetingTags'] = this.meetingTags.map((x0) => x0.toJSON());
215
+ if (this.flowItem != undefined)
216
+ res['flowItem'] = this.flowItem.toJSON();
217
+ res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
218
+ res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
219
+ res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
220
+ res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
221
+ if (this.encryptedSelf != undefined)
222
+ res['encryptedSelf'] = this.encryptedSelf;
223
+ if (this.securityMetadata != undefined)
224
+ res['securityMetadata'] = this.securityMetadata.toJSON();
225
+ res['isEncrypted'] = false;
226
+ return res;
227
+ }
228
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DecryptedCalendarItem']) {
229
+ if (typeof json != 'object')
230
+ throw new Error(`Expected json object at path ${path.join("")}`);
231
+ const jCpy = Object.assign({}, json);
232
+ if (extractEntry(jCpy, "isEncrypted", true, path) !== false)
233
+ throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be false. The provided json doesn't represent a DecryptedCalendarItem`);
234
+ const res = new DecryptedCalendarItem({
235
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
236
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
237
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
238
+ modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
239
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
240
+ responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
241
+ medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
242
+ tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
243
+ codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
244
+ endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
245
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
246
+ title: expectString(extractEntry(jCpy, 'title', false, path), true, [...path, ".title"]),
247
+ calendarItemTypeId: expectString(extractEntry(jCpy, 'calendarItemTypeId', false, path), true, [...path, ".calendarItemTypeId"]),
248
+ masterCalendarItemId: expectString(extractEntry(jCpy, 'masterCalendarItemId', false, path), true, [...path, ".masterCalendarItemId"]),
249
+ patientId: expectString(extractEntry(jCpy, 'patientId', false, path), true, [...path, ".patientId"]),
250
+ important: expectBoolean(extractEntry(jCpy, 'important', false, path), true, [...path, ".important"]),
251
+ homeVisit: expectBoolean(extractEntry(jCpy, 'homeVisit', false, path), true, [...path, ".homeVisit"]),
252
+ phoneNumber: expectString(extractEntry(jCpy, 'phoneNumber', false, path), true, [...path, ".phoneNumber"]),
253
+ placeId: expectString(extractEntry(jCpy, 'placeId', false, path), true, [...path, ".placeId"]),
254
+ address: expectObject(extractEntry(jCpy, 'address', false, path), true, ignoreUnknownKeys, [...path, ".address"], DecryptedAddress.fromJSON),
255
+ addressText: expectString(extractEntry(jCpy, 'addressText', false, path), true, [...path, ".addressText"]),
256
+ startTime: expectNumber(extractEntry(jCpy, 'startTime', false, path), true, true, [...path, ".startTime"]),
257
+ endTime: expectNumber(extractEntry(jCpy, 'endTime', false, path), true, true, [...path, ".endTime"]),
258
+ confirmationTime: expectNumber(extractEntry(jCpy, 'confirmationTime', false, path), true, true, [...path, ".confirmationTime"]),
259
+ cancellationTimestamp: expectNumber(extractEntry(jCpy, 'cancellationTimestamp', false, path), true, true, [...path, ".cancellationTimestamp"]),
260
+ confirmationId: expectString(extractEntry(jCpy, 'confirmationId', false, path), true, [...path, ".confirmationId"]),
261
+ duration: expectNumber(extractEntry(jCpy, 'duration', false, path), true, true, [...path, ".duration"]),
262
+ allDay: expectBoolean(extractEntry(jCpy, 'allDay', false, path), true, [...path, ".allDay"]),
263
+ details: expectString(extractEntry(jCpy, 'details', false, path), true, [...path, ".details"]),
264
+ wasMigrated: expectBoolean(extractEntry(jCpy, 'wasMigrated', false, path), true, [...path, ".wasMigrated"]),
265
+ agendaId: expectString(extractEntry(jCpy, 'agendaId', false, path), true, [...path, ".agendaId"]),
266
+ resourceGroup: expectObject(extractEntry(jCpy, 'resourceGroup', false, path), true, ignoreUnknownKeys, [...path, ".resourceGroup"], CodeStub.fromJSON),
267
+ availabilitiesAssignmentStrategy: expectStringEnum(extractEntry(jCpy, 'availabilitiesAssignmentStrategy', false, path), true, [...path, ".availabilitiesAssignmentStrategy"], CalendarItem_.AvailabilitiesAssignmentStrategy, 'CalendarItem.AvailabilitiesAssignmentStrategy'),
268
+ hcpId: expectString(extractEntry(jCpy, 'hcpId', false, path), true, [...path, ".hcpId"]),
269
+ recurrenceId: expectString(extractEntry(jCpy, 'recurrenceId', false, path), true, [...path, ".recurrenceId"]),
270
+ meetingTags: expectArray(extractEntry(jCpy, 'meetingTags', false, path), false, [...path, ".meetingTags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedCalendarItemTag.fromJSON)),
271
+ flowItem: expectObject(extractEntry(jCpy, 'flowItem', false, path), true, ignoreUnknownKeys, [...path, ".flowItem"], FlowItem.fromJSON),
272
+ secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
273
+ cryptedForeignKeys: expectMap(extractEntry(jCpy, 'cryptedForeignKeys', false, path), false, [...path, ".cryptedForeignKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
274
+ delegations: expectMap(extractEntry(jCpy, 'delegations', false, path), false, [...path, ".delegations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
275
+ encryptionKeys: expectMap(extractEntry(jCpy, 'encryptionKeys', false, path), false, [...path, ".encryptionKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
276
+ encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
277
+ securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
278
+ });
279
+ if (!ignoreUnknownKeys) {
280
+ const unused = Object.keys(jCpy);
281
+ if (unused.length > 0)
282
+ throw new Error(`Unexpected key(s) for json object DecryptedCalendarItem at path ${path.join("")}: ${unused}`);
283
+ }
284
+ return res;
285
+ }
137
286
  }
138
287
  export class EncryptedCalendarItem {
139
288
  constructor(partial) {
@@ -269,6 +418,147 @@ export class EncryptedCalendarItem {
269
418
  if ('securityMetadata' in partial)
270
419
  this.securityMetadata = partial.securityMetadata;
271
420
  }
421
+ toJSON() {
422
+ const res = {};
423
+ res['id'] = this.id;
424
+ if (this.rev != undefined)
425
+ res['rev'] = this.rev;
426
+ if (this.created != undefined)
427
+ res['created'] = this.created;
428
+ if (this.modified != undefined)
429
+ res['modified'] = this.modified;
430
+ if (this.author != undefined)
431
+ res['author'] = this.author;
432
+ if (this.responsible != undefined)
433
+ res['responsible'] = this.responsible;
434
+ if (this.medicalLocationId != undefined)
435
+ res['medicalLocationId'] = this.medicalLocationId;
436
+ res['tags'] = this.tags.map((x0) => x0.toJSON());
437
+ res['codes'] = this.codes.map((x0) => x0.toJSON());
438
+ if (this.endOfLife != undefined)
439
+ res['endOfLife'] = this.endOfLife;
440
+ if (this.deletionDate != undefined)
441
+ res['deletionDate'] = this.deletionDate;
442
+ if (this.title != undefined)
443
+ res['title'] = this.title;
444
+ if (this.calendarItemTypeId != undefined)
445
+ res['calendarItemTypeId'] = this.calendarItemTypeId;
446
+ if (this.masterCalendarItemId != undefined)
447
+ res['masterCalendarItemId'] = this.masterCalendarItemId;
448
+ if (this.patientId != undefined)
449
+ res['patientId'] = this.patientId;
450
+ if (this.important != undefined)
451
+ res['important'] = this.important;
452
+ if (this.homeVisit != undefined)
453
+ res['homeVisit'] = this.homeVisit;
454
+ if (this.phoneNumber != undefined)
455
+ res['phoneNumber'] = this.phoneNumber;
456
+ if (this.placeId != undefined)
457
+ res['placeId'] = this.placeId;
458
+ if (this.address != undefined)
459
+ res['address'] = this.address.toJSON();
460
+ if (this.addressText != undefined)
461
+ res['addressText'] = this.addressText;
462
+ if (this.startTime != undefined)
463
+ res['startTime'] = this.startTime;
464
+ if (this.endTime != undefined)
465
+ res['endTime'] = this.endTime;
466
+ if (this.confirmationTime != undefined)
467
+ res['confirmationTime'] = this.confirmationTime;
468
+ if (this.cancellationTimestamp != undefined)
469
+ res['cancellationTimestamp'] = this.cancellationTimestamp;
470
+ if (this.confirmationId != undefined)
471
+ res['confirmationId'] = this.confirmationId;
472
+ if (this.duration != undefined)
473
+ res['duration'] = this.duration;
474
+ if (this.allDay != undefined)
475
+ res['allDay'] = this.allDay;
476
+ if (this.details != undefined)
477
+ res['details'] = this.details;
478
+ if (this.wasMigrated != undefined)
479
+ res['wasMigrated'] = this.wasMigrated;
480
+ if (this.agendaId != undefined)
481
+ res['agendaId'] = this.agendaId;
482
+ if (this.resourceGroup != undefined)
483
+ res['resourceGroup'] = this.resourceGroup.toJSON();
484
+ if (this.availabilitiesAssignmentStrategy != undefined)
485
+ res['availabilitiesAssignmentStrategy'] = this.availabilitiesAssignmentStrategy;
486
+ if (this.hcpId != undefined)
487
+ res['hcpId'] = this.hcpId;
488
+ if (this.recurrenceId != undefined)
489
+ res['recurrenceId'] = this.recurrenceId;
490
+ res['meetingTags'] = this.meetingTags.map((x0) => x0.toJSON());
491
+ if (this.flowItem != undefined)
492
+ res['flowItem'] = this.flowItem.toJSON();
493
+ res['secretForeignKeys'] = this.secretForeignKeys.map((x0) => x0);
494
+ res['cryptedForeignKeys'] = Object.fromEntries(Object.entries(this.cryptedForeignKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
495
+ res['delegations'] = Object.fromEntries(Object.entries(this.delegations).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
496
+ res['encryptionKeys'] = Object.fromEntries(Object.entries(this.encryptionKeys).map(([k0, v0]) => [k0, v0.map((x1) => x1.toJSON())]));
497
+ if (this.encryptedSelf != undefined)
498
+ res['encryptedSelf'] = this.encryptedSelf;
499
+ if (this.securityMetadata != undefined)
500
+ res['securityMetadata'] = this.securityMetadata.toJSON();
501
+ res['isEncrypted'] = true;
502
+ return res;
503
+ }
504
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['EncryptedCalendarItem']) {
505
+ if (typeof json != 'object')
506
+ throw new Error(`Expected json object at path ${path.join("")}`);
507
+ const jCpy = Object.assign({}, json);
508
+ if (extractEntry(jCpy, "isEncrypted", true, path) !== true)
509
+ throw new Error(`Unexpected value for ${path.join("")} isEncrypted marker, should be true. The provided json doesn't represent a EncryptedCalendarItem`);
510
+ const res = new EncryptedCalendarItem({
511
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
512
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
513
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
514
+ modified: expectNumber(extractEntry(jCpy, 'modified', false, path), true, true, [...path, ".modified"]),
515
+ author: expectString(extractEntry(jCpy, 'author', false, path), true, [...path, ".author"]),
516
+ responsible: expectString(extractEntry(jCpy, 'responsible', false, path), true, [...path, ".responsible"]),
517
+ medicalLocationId: expectString(extractEntry(jCpy, 'medicalLocationId', false, path), true, [...path, ".medicalLocationId"]),
518
+ tags: expectArray(extractEntry(jCpy, 'tags', false, path), false, [...path, ".tags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
519
+ codes: expectArray(extractEntry(jCpy, 'codes', false, path), false, [...path, ".codes"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, CodeStub.fromJSON)),
520
+ endOfLife: expectNumber(extractEntry(jCpy, 'endOfLife', false, path), true, true, [...path, ".endOfLife"]),
521
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
522
+ title: expectString(extractEntry(jCpy, 'title', false, path), true, [...path, ".title"]),
523
+ calendarItemTypeId: expectString(extractEntry(jCpy, 'calendarItemTypeId', false, path), true, [...path, ".calendarItemTypeId"]),
524
+ masterCalendarItemId: expectString(extractEntry(jCpy, 'masterCalendarItemId', false, path), true, [...path, ".masterCalendarItemId"]),
525
+ patientId: expectString(extractEntry(jCpy, 'patientId', false, path), true, [...path, ".patientId"]),
526
+ important: expectBoolean(extractEntry(jCpy, 'important', false, path), true, [...path, ".important"]),
527
+ homeVisit: expectBoolean(extractEntry(jCpy, 'homeVisit', false, path), true, [...path, ".homeVisit"]),
528
+ phoneNumber: expectString(extractEntry(jCpy, 'phoneNumber', false, path), true, [...path, ".phoneNumber"]),
529
+ placeId: expectString(extractEntry(jCpy, 'placeId', false, path), true, [...path, ".placeId"]),
530
+ address: expectObject(extractEntry(jCpy, 'address', false, path), true, ignoreUnknownKeys, [...path, ".address"], EncryptedAddress.fromJSON),
531
+ addressText: expectString(extractEntry(jCpy, 'addressText', false, path), true, [...path, ".addressText"]),
532
+ startTime: expectNumber(extractEntry(jCpy, 'startTime', false, path), true, true, [...path, ".startTime"]),
533
+ endTime: expectNumber(extractEntry(jCpy, 'endTime', false, path), true, true, [...path, ".endTime"]),
534
+ confirmationTime: expectNumber(extractEntry(jCpy, 'confirmationTime', false, path), true, true, [...path, ".confirmationTime"]),
535
+ cancellationTimestamp: expectNumber(extractEntry(jCpy, 'cancellationTimestamp', false, path), true, true, [...path, ".cancellationTimestamp"]),
536
+ confirmationId: expectString(extractEntry(jCpy, 'confirmationId', false, path), true, [...path, ".confirmationId"]),
537
+ duration: expectNumber(extractEntry(jCpy, 'duration', false, path), true, true, [...path, ".duration"]),
538
+ allDay: expectBoolean(extractEntry(jCpy, 'allDay', false, path), true, [...path, ".allDay"]),
539
+ details: expectString(extractEntry(jCpy, 'details', false, path), true, [...path, ".details"]),
540
+ wasMigrated: expectBoolean(extractEntry(jCpy, 'wasMigrated', false, path), true, [...path, ".wasMigrated"]),
541
+ agendaId: expectString(extractEntry(jCpy, 'agendaId', false, path), true, [...path, ".agendaId"]),
542
+ resourceGroup: expectObject(extractEntry(jCpy, 'resourceGroup', false, path), true, ignoreUnknownKeys, [...path, ".resourceGroup"], CodeStub.fromJSON),
543
+ availabilitiesAssignmentStrategy: expectStringEnum(extractEntry(jCpy, 'availabilitiesAssignmentStrategy', false, path), true, [...path, ".availabilitiesAssignmentStrategy"], CalendarItem_.AvailabilitiesAssignmentStrategy, 'CalendarItem.AvailabilitiesAssignmentStrategy'),
544
+ hcpId: expectString(extractEntry(jCpy, 'hcpId', false, path), true, [...path, ".hcpId"]),
545
+ recurrenceId: expectString(extractEntry(jCpy, 'recurrenceId', false, path), true, [...path, ".recurrenceId"]),
546
+ meetingTags: expectArray(extractEntry(jCpy, 'meetingTags', false, path), false, [...path, ".meetingTags"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, EncryptedCalendarItemTag.fromJSON)),
547
+ flowItem: expectObject(extractEntry(jCpy, 'flowItem', false, path), true, ignoreUnknownKeys, [...path, ".flowItem"], FlowItem.fromJSON),
548
+ secretForeignKeys: expectArray(extractEntry(jCpy, 'secretForeignKeys', false, path), false, [...path, ".secretForeignKeys"], (x0, p0) => expectString(x0, false, p0)),
549
+ cryptedForeignKeys: expectMap(extractEntry(jCpy, 'cryptedForeignKeys', false, path), false, [...path, ".cryptedForeignKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
550
+ delegations: expectMap(extractEntry(jCpy, 'delegations', false, path), false, [...path, ".delegations"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
551
+ encryptionKeys: expectMap(extractEntry(jCpy, 'encryptionKeys', false, path), false, [...path, ".encryptionKeys"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectObject(x1, false, ignoreUnknownKeys, p1, Delegation.fromJSON))),
552
+ encryptedSelf: expectString(extractEntry(jCpy, 'encryptedSelf', false, path), true, [...path, ".encryptedSelf"]),
553
+ securityMetadata: expectObject(extractEntry(jCpy, 'securityMetadata', false, path), true, ignoreUnknownKeys, [...path, ".securityMetadata"], SecurityMetadata.fromJSON),
554
+ });
555
+ if (!ignoreUnknownKeys) {
556
+ const unused = Object.keys(jCpy);
557
+ if (unused.length > 0)
558
+ throw new Error(`Unexpected key(s) for json object EncryptedCalendarItem at path ${path.join("")}: ${unused}`);
559
+ }
560
+ return res;
561
+ }
272
562
  }
273
563
  export var CalendarItem;
274
564
  (function (CalendarItem) {
@@ -22,6 +22,8 @@ export declare class CalendarItemType implements StoredDocument {
22
22
  };
23
23
  publicProperties: Array<DecryptedPropertyStub> | undefined;
24
24
  constructor(partial: Partial<CalendarItemType>);
25
+ toJSON(): object;
26
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): CalendarItemType;
25
27
  }
26
28
  export declare namespace CalendarItemType {
27
29
  namespace DurationConfig {
@@ -29,6 +31,8 @@ export declare namespace CalendarItemType {
29
31
  durations: Array<number>;
30
32
  readonly $ktClass: 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Set';
31
33
  constructor(partial: Partial<Set>);
34
+ toJSON(): object;
35
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Set;
32
36
  }
33
37
  class Formula {
34
38
  min: number;
@@ -36,7 +40,10 @@ export declare namespace CalendarItemType {
36
40
  step: number;
37
41
  readonly $ktClass: 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Formula';
38
42
  constructor(partial: Partial<Formula> & Pick<Formula, "min" | "max" | "step">);
43
+ toJSON(): object;
44
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Formula;
39
45
  }
46
+ function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DurationConfig;
40
47
  }
41
48
  type DurationConfig = DurationConfig.Set | DurationConfig.Formula;
42
49
  }
@@ -1,5 +1,7 @@
1
1
  // auto-generated file
2
+ import { expectArray, expectBoolean, expectMap, expectNumber, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
2
3
  import { randomUuid } from '../utils/Id.mjs';
4
+ import { DecryptedPropertyStub } from './PropertyStub.mjs';
3
5
  export class CalendarItemType {
4
6
  constructor(partial) {
5
7
  var _a;
@@ -50,6 +52,65 @@ export class CalendarItemType {
50
52
  if ('publicProperties' in partial)
51
53
  this.publicProperties = partial.publicProperties;
52
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.healthcarePartyId != undefined)
63
+ res['healthcarePartyId'] = this.healthcarePartyId;
64
+ if (this.agendaId != undefined)
65
+ res['agendaId'] = this.agendaId;
66
+ res['defaultCalendarItemType'] = this.defaultCalendarItemType;
67
+ if (this.name != undefined)
68
+ res['name'] = this.name;
69
+ if (this.color != undefined)
70
+ res['color'] = this.color;
71
+ res['duration'] = this.duration;
72
+ if (this.extraDurationsConfig != undefined)
73
+ res['extraDurationsConfig'] = this.extraDurationsConfig.toJSON();
74
+ if (this.externalRef != undefined)
75
+ res['externalRef'] = this.externalRef;
76
+ if (this.mikronoId != undefined)
77
+ res['mikronoId'] = this.mikronoId;
78
+ res['docIds'] = this.docIds.map((x0) => x0);
79
+ res['otherInfos'] = Object.fromEntries(Object.entries(this.otherInfos).map(([k0, v0]) => [k0, v0]));
80
+ res['subjectByLanguage'] = Object.fromEntries(Object.entries(this.subjectByLanguage).map(([k0, v0]) => [k0, v0]));
81
+ if (this.publicProperties != undefined)
82
+ res['publicProperties'] = this.publicProperties.map((x0) => x0.toJSON());
83
+ return res;
84
+ }
85
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['CalendarItemType']) {
86
+ if (typeof json != 'object')
87
+ throw new Error(`Expected json object at path ${path.join("")}`);
88
+ const jCpy = Object.assign({}, json);
89
+ const res = new CalendarItemType({
90
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
91
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
92
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
93
+ healthcarePartyId: expectString(extractEntry(jCpy, 'healthcarePartyId', false, path), true, [...path, ".healthcarePartyId"]),
94
+ agendaId: expectString(extractEntry(jCpy, 'agendaId', false, path), true, [...path, ".agendaId"]),
95
+ defaultCalendarItemType: expectBoolean(extractEntry(jCpy, 'defaultCalendarItemType', false, path), false, [...path, ".defaultCalendarItemType"]),
96
+ name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
97
+ color: expectString(extractEntry(jCpy, 'color', false, path), true, [...path, ".color"]),
98
+ duration: expectNumber(extractEntry(jCpy, 'duration', false, path), false, true, [...path, ".duration"]),
99
+ extraDurationsConfig: expectObject(extractEntry(jCpy, 'extraDurationsConfig', false, path), true, ignoreUnknownKeys, [...path, ".extraDurationsConfig"], CalendarItemType.DurationConfig.fromJSON),
100
+ externalRef: expectString(extractEntry(jCpy, 'externalRef', false, path), true, [...path, ".externalRef"]),
101
+ mikronoId: expectString(extractEntry(jCpy, 'mikronoId', false, path), true, [...path, ".mikronoId"]),
102
+ docIds: expectArray(extractEntry(jCpy, 'docIds', false, path), false, [...path, ".docIds"], (x0, p0) => expectString(x0, false, p0)),
103
+ otherInfos: expectMap(extractEntry(jCpy, 'otherInfos', false, path), false, [...path, ".otherInfos"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
104
+ subjectByLanguage: expectMap(extractEntry(jCpy, 'subjectByLanguage', false, path), false, [...path, ".subjectByLanguage"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
105
+ publicProperties: expectArray(extractEntry(jCpy, 'publicProperties', false, path), true, [...path, ".publicProperties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
106
+ });
107
+ if (!ignoreUnknownKeys) {
108
+ const unused = Object.keys(jCpy);
109
+ if (unused.length > 0)
110
+ throw new Error(`Unexpected key(s) for json object CalendarItemType at path ${path.join("")}: ${unused}`);
111
+ }
112
+ return res;
113
+ }
53
114
  }
54
115
  (function (CalendarItemType) {
55
116
  let DurationConfig;
@@ -61,6 +122,28 @@ export class CalendarItemType {
61
122
  if ('durations' in partial && partial.durations !== undefined)
62
123
  this.durations = partial.durations;
63
124
  }
125
+ toJSON() {
126
+ const res = {};
127
+ res['durations'] = this.durations.map((x0) => x0);
128
+ res['$ktClass'] = 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Set';
129
+ return res;
130
+ }
131
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Set']) {
132
+ if (typeof json != 'object')
133
+ throw new Error(`Expected json object at path ${path.join("")}`);
134
+ const jCpy = Object.assign({}, json);
135
+ if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Set')
136
+ throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Set". The provided json doesn't represent a Set`);
137
+ const res = new Set({
138
+ durations: expectArray(extractEntry(jCpy, 'durations', false, path), false, [...path, ".durations"], (x0, p0) => expectNumber(x0, false, true, p0)),
139
+ });
140
+ if (!ignoreUnknownKeys) {
141
+ const unused = Object.keys(jCpy);
142
+ if (unused.length > 0)
143
+ throw new Error(`Unexpected key(s) for json object Set at path ${path.join("")}: ${unused}`);
144
+ }
145
+ return res;
146
+ }
64
147
  }
65
148
  DurationConfig.Set = Set;
66
149
  class Formula {
@@ -70,7 +153,41 @@ export class CalendarItemType {
70
153
  this.max = partial.max;
71
154
  this.step = partial.step;
72
155
  }
156
+ toJSON() {
157
+ const res = {};
158
+ res['min'] = this.min;
159
+ res['max'] = this.max;
160
+ res['step'] = this.step;
161
+ res['$ktClass'] = 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Formula';
162
+ return res;
163
+ }
164
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Formula']) {
165
+ if (typeof json != 'object')
166
+ throw new Error(`Expected json object at path ${path.join("")}`);
167
+ const jCpy = Object.assign({}, json);
168
+ if (extractEntry(jCpy, '\$ktClass', true, path) !== 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Formula')
169
+ throw new Error(`Unexpected value for ${path.join("")} class marker, should be "com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Formula". The provided json doesn't represent a Formula`);
170
+ const res = new Formula({
171
+ min: expectNumber(extractEntry(jCpy, 'min', true, path), false, true, [...path, ".min"]),
172
+ max: expectNumber(extractEntry(jCpy, 'max', true, path), false, true, [...path, ".max"]),
173
+ step: expectNumber(extractEntry(jCpy, 'step', true, path), false, true, [...path, ".step"]),
174
+ });
175
+ if (!ignoreUnknownKeys) {
176
+ const unused = Object.keys(jCpy);
177
+ if (unused.length > 0)
178
+ throw new Error(`Unexpected key(s) for json object Formula at path ${path.join("")}: ${unused}`);
179
+ }
180
+ return res;
181
+ }
73
182
  }
74
183
  DurationConfig.Formula = Formula;
184
+ function fromJSON(json, ignoreUnknownKeys = false, path = ['DurationConfig']) {
185
+ switch (json.$ktClass) {
186
+ case 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Set': return Set.fromJSON(json, ignoreUnknownKeys);
187
+ case 'com.icure.cardinal.sdk.model.CalendarItemType.DurationConfig.Formula': return Formula.fromJSON(json, ignoreUnknownKeys);
188
+ default: throw new Error('Unexpected discriminator for DurationConfig: ' + json.$ktClass);
189
+ }
190
+ }
191
+ DurationConfig.fromJSON = fromJSON;
75
192
  })(DurationConfig = CalendarItemType.DurationConfig || (CalendarItemType.DurationConfig = {}));
76
193
  })(CalendarItemType || (CalendarItemType = {}));
@@ -11,6 +11,7 @@ export interface Classification extends StoredDocument, ICureDocument<string>, H
11
11
  label: string;
12
12
  templateId: string | undefined;
13
13
  readonly isEncrypted: boolean;
14
+ toJSON(): object;
14
15
  }
15
16
  export declare class DecryptedClassification {
16
17
  id: string;
@@ -41,6 +42,8 @@ export declare class DecryptedClassification {
41
42
  securityMetadata: SecurityMetadata | undefined;
42
43
  readonly isEncrypted: false;
43
44
  constructor(partial: Partial<DecryptedClassification>);
45
+ toJSON(): object;
46
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DecryptedClassification;
44
47
  }
45
48
  export declare class EncryptedClassification {
46
49
  id: string;
@@ -71,4 +74,6 @@ export declare class EncryptedClassification {
71
74
  securityMetadata: SecurityMetadata | undefined;
72
75
  readonly isEncrypted: true;
73
76
  constructor(partial: Partial<EncryptedClassification>);
77
+ toJSON(): object;
78
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): EncryptedClassification;
74
79
  }