@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
package/model/User.mjs CHANGED
@@ -1,5 +1,14 @@
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 { DecryptedPropertyStub } from './PropertyStub.mjs';
5
+ import { Identifier } from './base/Identifier.mjs';
6
+ import { DelegationTag } from './embed/DelegationTag.mjs';
7
+ import { UsersStatus } from './enums/UsersStatus.mjs';
8
+ import { UsersType } from './enums/UsersType.mjs';
9
+ import { AuthenticationToken } from './security/AuthenticationToken.mjs';
10
+ import { LoginIdentifier } from './security/LoginIdentifier.mjs';
11
+ import { Permission } from './security/Permission.mjs';
3
12
  export class User {
4
13
  constructor(partial) {
5
14
  var _a;
@@ -77,6 +86,90 @@ export class User {
77
86
  if ('systemMetadata' in partial)
78
87
  this.systemMetadata = partial.systemMetadata;
79
88
  }
89
+ toJSON() {
90
+ const res = {};
91
+ res['id'] = this.id;
92
+ if (this.rev != undefined)
93
+ res['rev'] = this.rev;
94
+ if (this.deletionDate != undefined)
95
+ res['deletionDate'] = this.deletionDate;
96
+ if (this.created != undefined)
97
+ res['created'] = this.created;
98
+ res['identifier'] = this.identifier.map((x0) => x0.toJSON());
99
+ if (this.name != undefined)
100
+ res['name'] = this.name;
101
+ res['properties'] = this.properties.map((x0) => x0.toJSON());
102
+ res['permissions'] = this.permissions.map((x0) => x0.toJSON());
103
+ res['roles'] = this.roles.map((x0) => x0);
104
+ if (this.type != undefined)
105
+ res['type'] = this.type;
106
+ if (this.status != undefined)
107
+ res['status'] = this.status;
108
+ if (this.login != undefined)
109
+ res['login'] = this.login;
110
+ if (this.passwordHash != undefined)
111
+ res['passwordHash'] = this.passwordHash;
112
+ if (this.groupId != undefined)
113
+ res['groupId'] = this.groupId;
114
+ if (this.healthcarePartyId != undefined)
115
+ res['healthcarePartyId'] = this.healthcarePartyId;
116
+ if (this.patientId != undefined)
117
+ res['patientId'] = this.patientId;
118
+ if (this.deviceId != undefined)
119
+ res['deviceId'] = this.deviceId;
120
+ res['autoDelegations'] = Object.fromEntries(Object.entries(this.autoDelegations).map(([k0, v0]) => [k0, v0.map((x1) => x1)]));
121
+ if (this.createdDate != undefined)
122
+ res['createdDate'] = this.createdDate;
123
+ if (this.termsOfUseDate != undefined)
124
+ res['termsOfUseDate'] = this.termsOfUseDate;
125
+ if (this.email != undefined)
126
+ res['email'] = this.email;
127
+ if (this.mobilePhone != undefined)
128
+ res['mobilePhone'] = this.mobilePhone;
129
+ res['applicationTokens'] = Object.fromEntries(Object.entries(this.applicationTokens).map(([k0, v0]) => [k0, v0]));
130
+ res['authenticationTokens'] = Object.fromEntries(Object.entries(this.authenticationTokens).map(([k0, v0]) => [k0, v0.toJSON()]));
131
+ if (this.systemMetadata != undefined)
132
+ res['systemMetadata'] = this.systemMetadata.toJSON();
133
+ return res;
134
+ }
135
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['User']) {
136
+ if (typeof json != 'object')
137
+ throw new Error(`Expected json object at path ${path.join("")}`);
138
+ const jCpy = Object.assign({}, json);
139
+ const res = new User({
140
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
141
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
142
+ deletionDate: expectNumber(extractEntry(jCpy, 'deletionDate', false, path), true, true, [...path, ".deletionDate"]),
143
+ created: expectNumber(extractEntry(jCpy, 'created', false, path), true, true, [...path, ".created"]),
144
+ identifier: expectArray(extractEntry(jCpy, 'identifier', false, path), false, [...path, ".identifier"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Identifier.fromJSON)),
145
+ name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
146
+ properties: expectArray(extractEntry(jCpy, 'properties', false, path), false, [...path, ".properties"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DecryptedPropertyStub.fromJSON)),
147
+ permissions: expectArray(extractEntry(jCpy, 'permissions', false, path), false, [...path, ".permissions"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Permission.fromJSON)),
148
+ roles: expectArray(extractEntry(jCpy, 'roles', false, path), false, [...path, ".roles"], (x0, p0) => expectString(x0, false, p0)),
149
+ type: expectStringEnum(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"], UsersType, 'UsersType'),
150
+ status: expectStringEnum(extractEntry(jCpy, 'status', false, path), true, [...path, ".status"], UsersStatus, 'UsersStatus'),
151
+ login: expectString(extractEntry(jCpy, 'login', false, path), true, [...path, ".login"]),
152
+ passwordHash: expectString(extractEntry(jCpy, 'passwordHash', false, path), true, [...path, ".passwordHash"]),
153
+ groupId: expectString(extractEntry(jCpy, 'groupId', false, path), true, [...path, ".groupId"]),
154
+ healthcarePartyId: expectString(extractEntry(jCpy, 'healthcarePartyId', false, path), true, [...path, ".healthcarePartyId"]),
155
+ patientId: expectString(extractEntry(jCpy, 'patientId', false, path), true, [...path, ".patientId"]),
156
+ deviceId: expectString(extractEntry(jCpy, 'deviceId', false, path), true, [...path, ".deviceId"]),
157
+ autoDelegations: expectMap(extractEntry(jCpy, 'autoDelegations', false, path), false, [...path, ".autoDelegations"], (k0, p0) => expectStringEnum(k0, false, p0, DelegationTag, 'DelegationTag'), (v0, p0) => expectArray(v0, false, p0, (x1, p1) => expectString(x1, false, p1))),
158
+ createdDate: expectNumber(extractEntry(jCpy, 'createdDate', false, path), true, true, [...path, ".createdDate"]),
159
+ termsOfUseDate: expectNumber(extractEntry(jCpy, 'termsOfUseDate', false, path), true, true, [...path, ".termsOfUseDate"]),
160
+ email: expectString(extractEntry(jCpy, 'email', false, path), true, [...path, ".email"]),
161
+ mobilePhone: expectString(extractEntry(jCpy, 'mobilePhone', false, path), true, [...path, ".mobilePhone"]),
162
+ applicationTokens: expectMap(extractEntry(jCpy, 'applicationTokens', false, path), false, [...path, ".applicationTokens"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
163
+ authenticationTokens: expectMap(extractEntry(jCpy, 'authenticationTokens', false, path), false, [...path, ".authenticationTokens"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectObject(v0, false, ignoreUnknownKeys, p0, AuthenticationToken.fromJSON)),
164
+ systemMetadata: expectObject(extractEntry(jCpy, 'systemMetadata', false, path), true, ignoreUnknownKeys, [...path, ".systemMetadata"], User.SystemMetadata.fromJSON),
165
+ });
166
+ if (!ignoreUnknownKeys) {
167
+ const unused = Object.keys(jCpy);
168
+ if (unused.length > 0)
169
+ throw new Error(`Unexpected key(s) for json object User at path ${path.join("")}: ${unused}`);
170
+ }
171
+ return res;
172
+ }
80
173
  }
81
174
  (function (User) {
82
175
  class SystemMetadata {
@@ -88,6 +181,31 @@ export class User {
88
181
  if ('loginIdentifiers' in partial && partial.loginIdentifiers !== undefined)
89
182
  this.loginIdentifiers = partial.loginIdentifiers;
90
183
  }
184
+ toJSON() {
185
+ const res = {};
186
+ res['roles'] = this.roles.map((x0) => x0);
187
+ res['isAdmin'] = this.isAdmin;
188
+ res['inheritsRoles'] = this.inheritsRoles;
189
+ res['loginIdentifiers'] = this.loginIdentifiers.map((x0) => x0.toJSON());
190
+ return res;
191
+ }
192
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['SystemMetadata']) {
193
+ if (typeof json != 'object')
194
+ throw new Error(`Expected json object at path ${path.join("")}`);
195
+ const jCpy = Object.assign({}, json);
196
+ const res = new SystemMetadata({
197
+ roles: expectArray(extractEntry(jCpy, 'roles', true, path), false, [...path, ".roles"], (x0, p0) => expectString(x0, false, p0)),
198
+ isAdmin: expectBoolean(extractEntry(jCpy, 'isAdmin', true, path), false, [...path, ".isAdmin"]),
199
+ inheritsRoles: expectBoolean(extractEntry(jCpy, 'inheritsRoles', true, path), false, [...path, ".inheritsRoles"]),
200
+ loginIdentifiers: expectArray(extractEntry(jCpy, 'loginIdentifiers', false, path), false, [...path, ".loginIdentifiers"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, LoginIdentifier.fromJSON)),
201
+ });
202
+ if (!ignoreUnknownKeys) {
203
+ const unused = Object.keys(jCpy);
204
+ if (unused.length > 0)
205
+ throw new Error(`Unexpected key(s) for json object SystemMetadata at path ${path.join("")}: ${unused}`);
206
+ }
207
+ return res;
208
+ }
91
209
  }
92
210
  User.SystemMetadata = SystemMetadata;
93
211
  })(User || (User = {}));
@@ -13,4 +13,6 @@ export declare class UserGroup {
13
13
  deviceId: string | undefined;
14
14
  nameOfParentOfTopmostGroupInHierarchy: string | undefined;
15
15
  constructor(partial: Partial<UserGroup>);
16
+ toJSON(): object;
17
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): UserGroup;
16
18
  }
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectArray, expectObject, expectString, extractEntry } from '../internal/JsonDecodeUtils.mjs';
3
+ import { Group } from './Group.mjs';
1
4
  export class UserGroup {
2
5
  constructor(partial) {
3
6
  this.groupId = undefined;
@@ -37,4 +40,56 @@ export class UserGroup {
37
40
  if ('nameOfParentOfTopmostGroupInHierarchy' in partial)
38
41
  this.nameOfParentOfTopmostGroupInHierarchy = partial.nameOfParentOfTopmostGroupInHierarchy;
39
42
  }
43
+ toJSON() {
44
+ const res = {};
45
+ if (this.groupId != undefined)
46
+ res['groupId'] = this.groupId;
47
+ if (this.groupName != undefined)
48
+ res['groupName'] = this.groupName;
49
+ res['groupsHierarchy'] = this.groupsHierarchy.map((x0) => x0.toJSON());
50
+ if (this.userId != undefined)
51
+ res['userId'] = this.userId;
52
+ if (this.login != undefined)
53
+ res['login'] = this.login;
54
+ if (this.name != undefined)
55
+ res['name'] = this.name;
56
+ if (this.email != undefined)
57
+ res['email'] = this.email;
58
+ if (this.phone != undefined)
59
+ res['phone'] = this.phone;
60
+ if (this.patientId != undefined)
61
+ res['patientId'] = this.patientId;
62
+ if (this.healthcarePartyId != undefined)
63
+ res['healthcarePartyId'] = this.healthcarePartyId;
64
+ if (this.deviceId != undefined)
65
+ res['deviceId'] = this.deviceId;
66
+ if (this.nameOfParentOfTopmostGroupInHierarchy != undefined)
67
+ res['nameOfParentOfTopmostGroupInHierarchy'] = this.nameOfParentOfTopmostGroupInHierarchy;
68
+ return res;
69
+ }
70
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['UserGroup']) {
71
+ if (typeof json != 'object')
72
+ throw new Error(`Expected json object at path ${path.join("")}`);
73
+ const jCpy = Object.assign({}, json);
74
+ const res = new UserGroup({
75
+ groupId: expectString(extractEntry(jCpy, 'groupId', false, path), true, [...path, ".groupId"]),
76
+ groupName: expectString(extractEntry(jCpy, 'groupName', false, path), true, [...path, ".groupName"]),
77
+ groupsHierarchy: expectArray(extractEntry(jCpy, 'groupsHierarchy', false, path), false, [...path, ".groupsHierarchy"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, Group.fromJSON)),
78
+ userId: expectString(extractEntry(jCpy, 'userId', false, path), true, [...path, ".userId"]),
79
+ login: expectString(extractEntry(jCpy, 'login', false, path), true, [...path, ".login"]),
80
+ name: expectString(extractEntry(jCpy, 'name', false, path), true, [...path, ".name"]),
81
+ email: expectString(extractEntry(jCpy, 'email', false, path), true, [...path, ".email"]),
82
+ phone: expectString(extractEntry(jCpy, 'phone', false, path), true, [...path, ".phone"]),
83
+ patientId: expectString(extractEntry(jCpy, 'patientId', false, path), true, [...path, ".patientId"]),
84
+ healthcarePartyId: expectString(extractEntry(jCpy, 'healthcarePartyId', false, path), true, [...path, ".healthcarePartyId"]),
85
+ deviceId: expectString(extractEntry(jCpy, 'deviceId', false, path), true, [...path, ".deviceId"]),
86
+ nameOfParentOfTopmostGroupInHierarchy: expectString(extractEntry(jCpy, 'nameOfParentOfTopmostGroupInHierarchy', false, path), true, [...path, ".nameOfParentOfTopmostGroupInHierarchy"]),
87
+ });
88
+ if (!ignoreUnknownKeys) {
89
+ const unused = Object.keys(jCpy);
90
+ if (unused.length > 0)
91
+ throw new Error(`Unexpected key(s) for json object UserGroup at path ${path.join("")}: ${unused}`);
92
+ }
93
+ return res;
94
+ }
40
95
  }
@@ -10,4 +10,6 @@ export declare class CodeStub implements CodeIdentification<string | undefined>
10
10
  [key: string]: string;
11
11
  } | undefined;
12
12
  constructor(partial: Partial<CodeStub>);
13
+ toJSON(): object;
14
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): CodeStub;
13
15
  }
@@ -1,3 +1,5 @@
1
+ // auto-generated file
2
+ import { expectMap, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
1
3
  export class CodeStub {
2
4
  constructor(partial) {
3
5
  this.id = undefined;
@@ -22,4 +24,42 @@ export class CodeStub {
22
24
  if ('label' in partial)
23
25
  this.label = partial.label;
24
26
  }
27
+ toJSON() {
28
+ const res = {};
29
+ if (this.id != undefined)
30
+ res['id'] = this.id;
31
+ if (this.context != undefined)
32
+ res['context'] = this.context;
33
+ if (this.type != undefined)
34
+ res['type'] = this.type;
35
+ if (this.code != undefined)
36
+ res['code'] = this.code;
37
+ if (this.version != undefined)
38
+ res['version'] = this.version;
39
+ if (this.contextLabel != undefined)
40
+ res['contextLabel'] = this.contextLabel;
41
+ if (this.label != undefined)
42
+ res['label'] = Object.fromEntries(Object.entries(this.label).map(([k0, v0]) => [k0, v0]));
43
+ return res;
44
+ }
45
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['CodeStub']) {
46
+ if (typeof json != 'object')
47
+ throw new Error(`Expected json object at path ${path.join("")}`);
48
+ const jCpy = Object.assign({}, json);
49
+ const res = new CodeStub({
50
+ id: expectString(extractEntry(jCpy, 'id', false, path), true, [...path, ".id"]),
51
+ context: expectString(extractEntry(jCpy, 'context', false, path), true, [...path, ".context"]),
52
+ type: expectString(extractEntry(jCpy, 'type', false, path), true, [...path, ".type"]),
53
+ code: expectString(extractEntry(jCpy, 'code', false, path), true, [...path, ".code"]),
54
+ version: expectString(extractEntry(jCpy, 'version', false, path), true, [...path, ".version"]),
55
+ contextLabel: expectString(extractEntry(jCpy, 'contextLabel', false, path), true, [...path, ".contextLabel"]),
56
+ label: expectMap(extractEntry(jCpy, 'label', false, path), true, [...path, ".label"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
57
+ });
58
+ if (!ignoreUnknownKeys) {
59
+ const unused = Object.keys(jCpy);
60
+ if (unused.length > 0)
61
+ throw new Error(`Unexpected key(s) for json object CodeStub at path ${path.join("")}: ${unused}`);
62
+ }
63
+ return res;
64
+ }
25
65
  }
@@ -27,3 +27,6 @@ export interface CryptoActor extends Versionable<string> {
27
27
  cryptoActorProperties: Array<DecryptedPropertyStub> | undefined;
28
28
  readonly $ktClass: string;
29
29
  }
30
+ export declare namespace CryptoActor {
31
+ function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): CryptoActor;
32
+ }
@@ -1 +1,19 @@
1
- export {};
1
+ // auto-generated file
2
+ import { CryptoActorStub } from '../CryptoActorStub.mjs';
3
+ import { Device } from '../Device.mjs';
4
+ import { HealthcareParty } from '../HealthcareParty.mjs';
5
+ import { DecryptedPatient, EncryptedPatient } from '../Patient.mjs';
6
+ export var CryptoActor;
7
+ (function (CryptoActor) {
8
+ function fromJSON(json, ignoreUnknownKeys = false, path = ['CryptoActor']) {
9
+ switch (json.$ktClass) {
10
+ case 'com.icure.cardinal.sdk.model.CryptoActorStub': return CryptoActorStub.fromJSON(json, ignoreUnknownKeys);
11
+ case 'com.icure.cardinal.sdk.model.EncryptedPatient': return EncryptedPatient.fromJSON(json, ignoreUnknownKeys);
12
+ case 'com.icure.cardinal.sdk.model.DecryptedPatient': return DecryptedPatient.fromJSON(json, ignoreUnknownKeys);
13
+ case 'com.icure.cardinal.sdk.model.Device': return Device.fromJSON(json, ignoreUnknownKeys);
14
+ case 'com.icure.cardinal.sdk.model.HealthcareParty': return HealthcareParty.fromJSON(json, ignoreUnknownKeys);
15
+ default: throw new Error('Unexpected discriminator for CryptoActor: ' + json.$ktClass);
16
+ }
17
+ }
18
+ CryptoActor.fromJSON = fromJSON;
19
+ })(CryptoActor || (CryptoActor = {}));
@@ -9,4 +9,6 @@ export declare class Identifier {
9
9
  use: string | undefined;
10
10
  value: string | undefined;
11
11
  constructor(partial: Partial<Identifier>);
12
+ toJSON(): object;
13
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Identifier;
12
14
  }
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { CodeStub } from './CodeStub.mjs';
1
4
  export class Identifier {
2
5
  constructor(partial) {
3
6
  this.id = undefined;
@@ -25,4 +28,45 @@ export class Identifier {
25
28
  if ('value' in partial)
26
29
  this.value = partial.value;
27
30
  }
31
+ toJSON() {
32
+ const res = {};
33
+ if (this.id != undefined)
34
+ res['id'] = this.id;
35
+ if (this.assigner != undefined)
36
+ res['assigner'] = this.assigner;
37
+ if (this.start != undefined)
38
+ res['start'] = this.start;
39
+ if (this.end != undefined)
40
+ res['end'] = this.end;
41
+ if (this.system != undefined)
42
+ res['system'] = this.system;
43
+ if (this.type != undefined)
44
+ res['type'] = this.type.toJSON();
45
+ if (this.use != undefined)
46
+ res['use'] = this.use;
47
+ if (this.value != undefined)
48
+ res['value'] = this.value;
49
+ return res;
50
+ }
51
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Identifier']) {
52
+ if (typeof json != 'object')
53
+ throw new Error(`Expected json object at path ${path.join("")}`);
54
+ const jCpy = Object.assign({}, json);
55
+ const res = new Identifier({
56
+ id: expectString(extractEntry(jCpy, 'id', false, path), true, [...path, ".id"]),
57
+ assigner: expectString(extractEntry(jCpy, 'assigner', false, path), true, [...path, ".assigner"]),
58
+ start: expectString(extractEntry(jCpy, 'start', false, path), true, [...path, ".start"]),
59
+ end: expectString(extractEntry(jCpy, 'end', false, path), true, [...path, ".end"]),
60
+ system: expectString(extractEntry(jCpy, 'system', false, path), true, [...path, ".system"]),
61
+ type: expectObject(extractEntry(jCpy, 'type', false, path), true, ignoreUnknownKeys, [...path, ".type"], CodeStub.fromJSON),
62
+ use: expectString(extractEntry(jCpy, 'use', false, path), true, [...path, ".use"]),
63
+ value: expectString(extractEntry(jCpy, 'value', false, path), true, [...path, ".value"]),
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 Identifier at path ${path.join("")}: ${unused}`);
69
+ }
70
+ return res;
71
+ }
28
72
  }
@@ -2,4 +2,6 @@ export declare class Basic {
2
2
  username: string;
3
3
  password: string;
4
4
  constructor(partial: Partial<Basic> & Pick<Basic, "username" | "password">);
5
+ toJSON(): object;
6
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Basic;
5
7
  }
@@ -1,7 +1,29 @@
1
1
  // auto-generated file
2
+ import { expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
2
3
  export class Basic {
3
4
  constructor(partial) {
4
5
  this.username = partial.username;
5
6
  this.password = partial.password;
6
7
  }
8
+ toJSON() {
9
+ const res = {};
10
+ res['username'] = this.username;
11
+ res['password'] = this.password;
12
+ return res;
13
+ }
14
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Basic']) {
15
+ if (typeof json != 'object')
16
+ throw new Error(`Expected json object at path ${path.join("")}`);
17
+ const jCpy = Object.assign({}, json);
18
+ const res = new Basic({
19
+ username: expectString(extractEntry(jCpy, 'username', true, path), false, [...path, ".username"]),
20
+ password: expectString(extractEntry(jCpy, 'password', true, path), false, [...path, ".password"]),
21
+ });
22
+ if (!ignoreUnknownKeys) {
23
+ const unused = Object.keys(jCpy);
24
+ if (unused.length > 0)
25
+ throw new Error(`Unexpected key(s) for json object Basic at path ${path.join("")}: ${unused}`);
26
+ }
27
+ return res;
28
+ }
7
29
  }
@@ -10,4 +10,6 @@ export declare class DatabaseInfo {
10
10
  w: number | undefined;
11
11
  r: number | undefined;
12
12
  constructor(partial: Partial<DatabaseInfo>);
13
+ toJSON(): object;
14
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DatabaseInfo;
13
15
  }
@@ -1,4 +1,5 @@
1
1
  // auto-generated file
2
+ import { expectNumber, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
2
3
  import { randomUuid } from '../../utils/Id.mjs';
3
4
  export class DatabaseInfo {
4
5
  constructor(partial) {
@@ -32,4 +33,50 @@ export class DatabaseInfo {
32
33
  if ('r' in partial)
33
34
  this.r = partial.r;
34
35
  }
36
+ toJSON() {
37
+ const res = {};
38
+ res['id'] = this.id;
39
+ if (this.updateSeq != undefined)
40
+ res['updateSeq'] = this.updateSeq;
41
+ if (this.fileSize != undefined)
42
+ res['fileSize'] = this.fileSize;
43
+ if (this.externalSize != undefined)
44
+ res['externalSize'] = this.externalSize;
45
+ if (this.activeSize != undefined)
46
+ res['activeSize'] = this.activeSize;
47
+ if (this.docs != undefined)
48
+ res['docs'] = this.docs;
49
+ if (this.q != undefined)
50
+ res['q'] = this.q;
51
+ if (this.n != undefined)
52
+ res['n'] = this.n;
53
+ if (this.w != undefined)
54
+ res['w'] = this.w;
55
+ if (this.r != undefined)
56
+ res['r'] = this.r;
57
+ return res;
58
+ }
59
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DatabaseInfo']) {
60
+ if (typeof json != 'object')
61
+ throw new Error(`Expected json object at path ${path.join("")}`);
62
+ const jCpy = Object.assign({}, json);
63
+ const res = new DatabaseInfo({
64
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
65
+ updateSeq: expectString(extractEntry(jCpy, 'updateSeq', false, path), true, [...path, ".updateSeq"]),
66
+ fileSize: expectNumber(extractEntry(jCpy, 'fileSize', false, path), true, true, [...path, ".fileSize"]),
67
+ externalSize: expectNumber(extractEntry(jCpy, 'externalSize', false, path), true, true, [...path, ".externalSize"]),
68
+ activeSize: expectNumber(extractEntry(jCpy, 'activeSize', false, path), true, true, [...path, ".activeSize"]),
69
+ docs: expectNumber(extractEntry(jCpy, 'docs', false, path), true, true, [...path, ".docs"]),
70
+ q: expectNumber(extractEntry(jCpy, 'q', false, path), true, true, [...path, ".q"]),
71
+ n: expectNumber(extractEntry(jCpy, 'n', false, path), true, true, [...path, ".n"]),
72
+ w: expectNumber(extractEntry(jCpy, 'w', false, path), true, true, [...path, ".w"]),
73
+ r: expectNumber(extractEntry(jCpy, 'r', false, path), true, true, [...path, ".r"]),
74
+ });
75
+ if (!ignoreUnknownKeys) {
76
+ const unused = Object.keys(jCpy);
77
+ if (unused.length > 0)
78
+ throw new Error(`Unexpected key(s) for json object DatabaseInfo at path ${path.join("")}: ${unused}`);
79
+ }
80
+ return res;
81
+ }
35
82
  }
@@ -22,4 +22,6 @@ export declare class DesignDocument {
22
22
  [key: string]: string;
23
23
  };
24
24
  constructor(partial: Partial<DesignDocument>);
25
+ toJSON(): object;
26
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DesignDocument;
25
27
  }
@@ -1,5 +1,7 @@
1
1
  // auto-generated file
2
+ import { expectMap, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
2
3
  import { randomUuid } from '../../utils/Id.mjs';
4
+ import { View } from './View.mjs';
3
5
  export class DesignDocument {
4
6
  constructor(partial) {
5
7
  var _a;
@@ -29,4 +31,42 @@ export class DesignDocument {
29
31
  if ('filters' in partial && partial.filters !== undefined)
30
32
  this.filters = partial.filters;
31
33
  }
34
+ toJSON() {
35
+ const res = {};
36
+ res['id'] = this.id;
37
+ if (this.rev != undefined)
38
+ res['rev'] = this.rev;
39
+ res['revHistory'] = Object.fromEntries(Object.entries(this.revHistory).map(([k0, v0]) => [k0, v0]));
40
+ if (this.language != undefined)
41
+ res['language'] = this.language;
42
+ res['views'] = Object.fromEntries(Object.entries(this.views).map(([k0, v0]) => [k0, v0.toJSON()]));
43
+ res['lists'] = Object.fromEntries(Object.entries(this.lists).map(([k0, v0]) => [k0, v0]));
44
+ res['shows'] = Object.fromEntries(Object.entries(this.shows).map(([k0, v0]) => [k0, v0]));
45
+ if (this.updateHandlers != undefined)
46
+ res['updateHandlers'] = Object.fromEntries(Object.entries(this.updateHandlers).map(([k0, v0]) => [k0, v0]));
47
+ res['filters'] = Object.fromEntries(Object.entries(this.filters).map(([k0, v0]) => [k0, v0]));
48
+ return res;
49
+ }
50
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DesignDocument']) {
51
+ if (typeof json != 'object')
52
+ throw new Error(`Expected json object at path ${path.join("")}`);
53
+ const jCpy = Object.assign({}, json);
54
+ const res = new DesignDocument({
55
+ id: expectString(extractEntry(jCpy, 'id', true, path), false, [...path, ".id"]),
56
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
57
+ revHistory: expectMap(extractEntry(jCpy, 'revHistory', false, path), false, [...path, ".revHistory"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
58
+ language: expectString(extractEntry(jCpy, 'language', false, path), true, [...path, ".language"]),
59
+ views: expectMap(extractEntry(jCpy, 'views', false, path), false, [...path, ".views"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectObject(v0, false, ignoreUnknownKeys, p0, View.fromJSON)),
60
+ lists: expectMap(extractEntry(jCpy, 'lists', false, path), false, [...path, ".lists"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
61
+ shows: expectMap(extractEntry(jCpy, 'shows', false, path), false, [...path, ".shows"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
62
+ updateHandlers: expectMap(extractEntry(jCpy, 'updateHandlers', false, path), true, [...path, ".updateHandlers"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
63
+ filters: expectMap(extractEntry(jCpy, 'filters', false, path), false, [...path, ".filters"], (k0, p0) => expectString(k0, false, p0), (v0, p0) => expectString(v0, false, p0)),
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 DesignDocument at path ${path.join("")}: ${unused}`);
69
+ }
70
+ return res;
71
+ }
32
72
  }
@@ -2,4 +2,6 @@ export declare class DocIdentifier {
2
2
  id: string | undefined;
3
3
  rev: string | undefined;
4
4
  constructor(partial: Partial<DocIdentifier>);
5
+ toJSON(): object;
6
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): DocIdentifier;
5
7
  }
@@ -1,4 +1,5 @@
1
1
  // auto-generated file
2
+ import { expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
2
3
  export class DocIdentifier {
3
4
  constructor(partial) {
4
5
  this.id = undefined;
@@ -8,4 +9,27 @@ export class DocIdentifier {
8
9
  if ('rev' in partial)
9
10
  this.rev = partial.rev;
10
11
  }
12
+ toJSON() {
13
+ const res = {};
14
+ if (this.id != undefined)
15
+ res['id'] = this.id;
16
+ if (this.rev != undefined)
17
+ res['rev'] = this.rev;
18
+ return res;
19
+ }
20
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['DocIdentifier']) {
21
+ if (typeof json != 'object')
22
+ throw new Error(`Expected json object at path ${path.join("")}`);
23
+ const jCpy = Object.assign({}, json);
24
+ const res = new DocIdentifier({
25
+ id: expectString(extractEntry(jCpy, 'id', false, path), true, [...path, ".id"]),
26
+ rev: expectString(extractEntry(jCpy, 'rev', false, path), true, [...path, ".rev"]),
27
+ });
28
+ if (!ignoreUnknownKeys) {
29
+ const unused = Object.keys(jCpy);
30
+ if (unused.length > 0)
31
+ throw new Error(`Unexpected key(s) for json object DocIdentifier at path ${path.join("")}: ${unused}`);
32
+ }
33
+ return res;
34
+ }
11
35
  }
@@ -4,4 +4,6 @@ export declare class GroupDatabasesInfo {
4
4
  databasesInfo: Array<DatabaseInfo>;
5
5
  gcpStorageSize: number;
6
6
  constructor(partial: Partial<GroupDatabasesInfo> & Pick<GroupDatabasesInfo, "groupId" | "databasesInfo" | "gcpStorageSize">);
7
+ toJSON(): object;
8
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): GroupDatabasesInfo;
7
9
  }
@@ -1,7 +1,33 @@
1
+ // auto-generated file
2
+ import { expectArray, expectNumber, expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { DatabaseInfo } from './DatabaseInfo.mjs';
1
4
  export class GroupDatabasesInfo {
2
5
  constructor(partial) {
3
6
  this.groupId = partial.groupId;
4
7
  this.databasesInfo = partial.databasesInfo;
5
8
  this.gcpStorageSize = partial.gcpStorageSize;
6
9
  }
10
+ toJSON() {
11
+ const res = {};
12
+ res['groupId'] = this.groupId;
13
+ res['databasesInfo'] = this.databasesInfo.map((x0) => x0.toJSON());
14
+ res['gcpStorageSize'] = this.gcpStorageSize;
15
+ return res;
16
+ }
17
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['GroupDatabasesInfo']) {
18
+ if (typeof json != 'object')
19
+ throw new Error(`Expected json object at path ${path.join("")}`);
20
+ const jCpy = Object.assign({}, json);
21
+ const res = new GroupDatabasesInfo({
22
+ groupId: expectString(extractEntry(jCpy, 'groupId', true, path), false, [...path, ".groupId"]),
23
+ databasesInfo: expectArray(extractEntry(jCpy, 'databasesInfo', true, path), false, [...path, ".databasesInfo"], (x0, p0) => expectObject(x0, false, ignoreUnknownKeys, p0, DatabaseInfo.fromJSON)),
24
+ gcpStorageSize: expectNumber(extractEntry(jCpy, 'gcpStorageSize', true, path), false, true, [...path, ".gcpStorageSize"]),
25
+ });
26
+ if (!ignoreUnknownKeys) {
27
+ const unused = Object.keys(jCpy);
28
+ if (unused.length > 0)
29
+ throw new Error(`Unexpected key(s) for json object GroupDatabasesInfo at path ${path.join("")}: ${unused}`);
30
+ }
31
+ return res;
32
+ }
7
33
  }
@@ -3,4 +3,6 @@ export declare class Remote {
3
3
  url: string;
4
4
  auth: RemoteAuthentication | undefined;
5
5
  constructor(partial: Partial<Remote> & Pick<Remote, "url">);
6
+ toJSON(): object;
7
+ static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Remote;
6
8
  }
@@ -1,3 +1,6 @@
1
+ // auto-generated file
2
+ import { expectObject, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
3
+ import { RemoteAuthentication } from './RemoteAuthentication.mjs';
1
4
  export class Remote {
2
5
  constructor(partial) {
3
6
  this.auth = undefined;
@@ -5,4 +8,26 @@ export class Remote {
5
8
  if ('auth' in partial)
6
9
  this.auth = partial.auth;
7
10
  }
11
+ toJSON() {
12
+ const res = {};
13
+ res['url'] = this.url;
14
+ if (this.auth != undefined)
15
+ res['auth'] = this.auth.toJSON();
16
+ return res;
17
+ }
18
+ static fromJSON(json, ignoreUnknownKeys = false, path = ['Remote']) {
19
+ if (typeof json != 'object')
20
+ throw new Error(`Expected json object at path ${path.join("")}`);
21
+ const jCpy = Object.assign({}, json);
22
+ const res = new Remote({
23
+ url: expectString(extractEntry(jCpy, 'url', true, path), false, [...path, ".url"]),
24
+ auth: expectObject(extractEntry(jCpy, 'auth', false, path), true, ignoreUnknownKeys, [...path, ".auth"], RemoteAuthentication.fromJSON),
25
+ });
26
+ if (!ignoreUnknownKeys) {
27
+ const unused = Object.keys(jCpy);
28
+ if (unused.length > 0)
29
+ throw new Error(`Unexpected key(s) for json object Remote at path ${path.join("")}: ${unused}`);
30
+ }
31
+ return res;
32
+ }
8
33
  }