@icure/cardinal-sdk 2.1.1 → 2.1.2

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 (518) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
  2. package/api/AccessLogApi.d.mts +279 -0
  3. package/api/AccessLogBasicApi.d.mts +176 -0
  4. package/api/AccessLogBasicInGroupApi.d.mts +84 -0
  5. package/api/AccessLogFlavouredApi.d.mts +114 -0
  6. package/api/AccessLogFlavouredInGroupApi.d.mts +56 -0
  7. package/api/AccessLogInGroupApi.d.mts +104 -0
  8. package/api/AgendaApi.d.mts +86 -0
  9. package/api/AnonymousRoleApi.d.mts +7 -0
  10. package/api/AnonymousRoleApi.mjs +2 -0
  11. package/api/CalendarItemApi.d.mts +333 -0
  12. package/api/CalendarItemBasicApi.d.mts +201 -0
  13. package/api/CalendarItemBasicInGroupApi.d.mts +88 -0
  14. package/api/CalendarItemFlavouredApi.d.mts +148 -0
  15. package/api/CalendarItemFlavouredInGroupApi.d.mts +56 -0
  16. package/api/CalendarItemInGroupApi.d.mts +128 -0
  17. package/api/CardinalMaintenanceTaskApi.d.mts +26 -0
  18. package/api/ClassificationApi.d.mts +202 -0
  19. package/api/ClassificationBasicApi.d.mts +91 -0
  20. package/api/ClassificationFlavouredApi.d.mts +80 -0
  21. package/api/ContactApi.d.mts +385 -0
  22. package/api/ContactBasicApi.d.mts +268 -0
  23. package/api/ContactBasicInGroupApi.d.mts +112 -0
  24. package/api/ContactFlavouredApi.d.mts +165 -0
  25. package/api/ContactFlavouredInGroupApi.d.mts +64 -0
  26. package/api/ContactInGroupApi.d.mts +148 -0
  27. package/api/CryptoApi.d.mts +37 -0
  28. package/api/CryptoInGroupApi.d.mts +7 -0
  29. package/api/DataOwnerApi.d.mts +84 -0
  30. package/api/DeviceApi.d.mts +40 -0
  31. package/api/DocumentApi.d.mts +465 -0
  32. package/api/DocumentBasicApi.d.mts +245 -0
  33. package/api/DocumentBasicInGroupApi.d.mts +88 -0
  34. package/api/DocumentFlavouredApi.d.mts +126 -0
  35. package/api/DocumentFlavouredInGroupApi.d.mts +56 -0
  36. package/api/DocumentInGroupApi.d.mts +132 -0
  37. package/api/FormApi.d.mts +303 -0
  38. package/api/FormBasicApi.d.mts +192 -0
  39. package/api/FormBasicInGroupApi.d.mts +88 -0
  40. package/api/FormFlavouredApi.d.mts +134 -0
  41. package/api/FormFlavouredInGroupApi.d.mts +56 -0
  42. package/api/FormInGroupApi.d.mts +124 -0
  43. package/api/FormTemplateApi.d.mts +4 -0
  44. package/api/GroupApi.d.mts +7 -0
  45. package/api/HealthElementApi.d.mts +307 -0
  46. package/api/HealthElementBasicApi.d.mts +187 -0
  47. package/api/HealthElementBasicInGroupApi.d.mts +88 -0
  48. package/api/HealthElementFlavouredApi.d.mts +124 -0
  49. package/api/HealthElementFlavouredInGroupApi.d.mts +56 -0
  50. package/api/HealthElementInGroupApi.d.mts +128 -0
  51. package/api/HealthcarePartyApi.d.mts +95 -0
  52. package/api/InvoiceApi.d.mts +253 -0
  53. package/api/InvoiceBasicApi.d.mts +142 -0
  54. package/api/InvoiceBasicInGroupApi.d.mts +72 -0
  55. package/api/InvoiceFlavouredApi.d.mts +100 -0
  56. package/api/InvoiceFlavouredInGroupApi.d.mts +48 -0
  57. package/api/InvoiceInGroupApi.d.mts +108 -0
  58. package/api/MaintenanceTaskApi.d.mts +252 -0
  59. package/api/MaintenanceTaskBasicApi.d.mts +144 -0
  60. package/api/MaintenanceTaskFlavouredApi.d.mts +95 -0
  61. package/api/MessageApi.d.mts +355 -0
  62. package/api/MessageBasicApi.d.mts +229 -0
  63. package/api/MessageBasicInGroupApi.d.mts +88 -0
  64. package/api/MessageFlavouredApi.d.mts +165 -0
  65. package/api/MessageFlavouredInGroupApi.d.mts +56 -0
  66. package/api/MessageInGroupApi.d.mts +124 -0
  67. package/api/PatientApi.d.mts +445 -0
  68. package/api/PatientBasicApi.d.mts +246 -0
  69. package/api/PatientBasicInGroupApi.d.mts +92 -0
  70. package/api/PatientFlavouredApi.d.mts +195 -0
  71. package/api/PatientFlavouredInGroupApi.d.mts +64 -0
  72. package/api/PatientInGroupApi.d.mts +136 -0
  73. package/api/ReceiptApi.d.mts +147 -0
  74. package/api/ReceiptBasicApi.d.mts +132 -0
  75. package/api/ReceiptBasicInGroupApi.d.mts +72 -0
  76. package/api/ReceiptFlavouredApi.d.mts +90 -0
  77. package/api/ReceiptFlavouredInGroupApi.d.mts +48 -0
  78. package/api/ReceiptInGroupApi.d.mts +108 -0
  79. package/api/RecoveryApi.d.mts +140 -0
  80. package/api/RoleApi.d.mts +61 -0
  81. package/api/ShamirKeysManagerApi.d.mts +21 -0
  82. package/api/TopicApi.d.mts +317 -0
  83. package/api/TopicBasicApi.d.mts +206 -0
  84. package/api/TopicBasicInGroupApi.d.mts +88 -0
  85. package/api/TopicFlavouredApi.d.mts +143 -0
  86. package/api/TopicFlavouredInGroupApi.d.mts +56 -0
  87. package/api/TopicInGroupApi.d.mts +124 -0
  88. package/api/UserApi.d.mts +52 -0
  89. package/api/UserInGroupApi.d.mts +6 -0
  90. package/api.d.mts +1 -0
  91. package/api.mjs +1 -0
  92. package/cardinal-sdk-ts.mjs +39268 -39198
  93. package/cardinal-sdk.mjs +71238 -70553
  94. package/crypto/entities/AccessLogShareOptions.d.mts +4 -0
  95. package/crypto/entities/AccessLogShareOptions.mjs +4 -0
  96. package/crypto/entities/CalendarItemShareOptions.d.mts +4 -0
  97. package/crypto/entities/CalendarItemShareOptions.mjs +4 -0
  98. package/crypto/entities/ClassificationShareOptions.d.mts +4 -0
  99. package/crypto/entities/ClassificationShareOptions.mjs +4 -0
  100. package/crypto/entities/ContactShareOptions.d.mts +4 -0
  101. package/crypto/entities/ContactShareOptions.mjs +4 -0
  102. package/crypto/entities/DocumentShareOptions.d.mts +4 -0
  103. package/crypto/entities/DocumentShareOptions.mjs +4 -0
  104. package/crypto/entities/EntityAccessInformation.d.mts +21 -0
  105. package/crypto/entities/EntityAccessInformation.mjs +4 -0
  106. package/crypto/entities/EntityWithEncryptionMetadataTypeName.d.mts +6 -0
  107. package/crypto/entities/EntityWithEncryptionMetadataTypeName.mjs +6 -0
  108. package/crypto/entities/ExchangeDataInjectionDetails.d.mts +4 -0
  109. package/crypto/entities/ExchangeDataInjectionDetails.mjs +4 -0
  110. package/crypto/entities/FormShareOptions.d.mts +4 -0
  111. package/crypto/entities/FormShareOptions.mjs +4 -0
  112. package/crypto/entities/HealthElementShareOptions.d.mts +4 -0
  113. package/crypto/entities/HealthElementShareOptions.mjs +4 -0
  114. package/crypto/entities/InvoiceShareOptions.d.mts +4 -0
  115. package/crypto/entities/InvoiceShareOptions.mjs +4 -0
  116. package/crypto/entities/MessageShareOptions.d.mts +4 -0
  117. package/crypto/entities/MessageShareOptions.mjs +4 -0
  118. package/crypto/entities/RawDecryptedExchangeData.d.mts +8 -0
  119. package/crypto/entities/RawDecryptedExchangeData.mjs +8 -0
  120. package/crypto/entities/RecoveryKeyOptions.d.mts +13 -0
  121. package/crypto/entities/RecoveryKeyOptions.mjs +9 -0
  122. package/crypto/entities/RecoveryKeySize.d.mts +4 -0
  123. package/crypto/entities/RecoveryKeySize.mjs +4 -0
  124. package/crypto/entities/SecretIdShareOptions.d.mts +19 -0
  125. package/crypto/entities/SecretIdShareOptions.mjs +15 -0
  126. package/crypto/entities/SecretIdUseOption.d.mts +11 -0
  127. package/crypto/entities/SecretIdUseOption.mjs +6 -0
  128. package/crypto/entities/ShamirUpdateRequest.d.mts +12 -0
  129. package/crypto/entities/ShamirUpdateRequest.mjs +4 -0
  130. package/crypto/entities/ShareAllPatientDataOptions.d.mts +4 -0
  131. package/crypto/entities/ShareAllPatientDataOptions.mjs +4 -0
  132. package/crypto/entities/ShareMetadataBehaviour.d.mts +4 -0
  133. package/crypto/entities/ShareMetadataBehaviour.mjs +4 -0
  134. package/crypto/entities/TopicShareOptions.d.mts +4 -0
  135. package/crypto/entities/TopicShareOptions.mjs +4 -0
  136. package/filters/AccessLogFilters.d.mts +120 -0
  137. package/filters/AgendaFilters.d.mts +79 -0
  138. package/filters/CalendarItemFilters.d.mts +166 -0
  139. package/filters/ClassificationFilters.d.mts +87 -0
  140. package/filters/CodeFilters.d.mts +96 -0
  141. package/filters/ContactFilters.d.mts +403 -0
  142. package/filters/DeviceFilters.d.mts +19 -0
  143. package/filters/DocumentFilters.d.mts +296 -0
  144. package/filters/FormFilters.d.mts +120 -0
  145. package/filters/FormTemplateFilters.d.mts +6 -0
  146. package/filters/GroupFilters.d.mts +27 -0
  147. package/filters/HealthElementFilters.d.mts +266 -0
  148. package/filters/HealthcarePartyFilters.d.mts +75 -0
  149. package/filters/MaintenanceTaskFilters.d.mts +68 -0
  150. package/filters/MessageFilters.d.mts +314 -0
  151. package/filters/PatientFilters.d.mts +298 -0
  152. package/filters/ServiceFilters.d.mts +342 -0
  153. package/filters/TopicFilters.d.mts +25 -0
  154. package/filters/UserFilters.d.mts +33 -0
  155. package/kotlinx-coroutines-core.mjs +1 -1
  156. package/model/AccessLog.d.mts +202 -0
  157. package/model/AccessLog.mjs +168 -0
  158. package/model/Agenda.d.mts +89 -0
  159. package/model/Agenda.mjs +85 -0
  160. package/model/BooleanResponse.d.mts +9 -0
  161. package/model/BooleanResponse.mjs +5 -0
  162. package/model/CalendarItem.d.mts +431 -0
  163. package/model/CalendarItem.mjs +320 -0
  164. package/model/CalendarItemType.d.mts +72 -0
  165. package/model/CalendarItemType.mjs +68 -0
  166. package/model/Classification.d.mts +187 -0
  167. package/model/Classification.mjs +160 -0
  168. package/model/Code.d.mts +63 -0
  169. package/model/Code.mjs +59 -0
  170. package/model/Contact.d.mts +354 -0
  171. package/model/Contact.mjs +274 -0
  172. package/model/CryptoActorStub.d.mts +6 -0
  173. package/model/CryptoActorStub.mjs +6 -0
  174. package/model/CryptoActorStubWithType.d.mts +14 -0
  175. package/model/CryptoActorStubWithType.mjs +6 -0
  176. package/model/DataOwnerRegistrationSuccess.d.mts +18 -0
  177. package/model/DataOwnerRegistrationSuccess.mjs +6 -0
  178. package/model/DataOwnerType.d.mts +6 -0
  179. package/model/DataOwnerType.mjs +6 -0
  180. package/model/DataOwnerWithType.d.mts +6 -0
  181. package/model/DatabaseInitialisation.d.mts +22 -0
  182. package/model/DatabaseInitialisation.mjs +22 -0
  183. package/model/Device.d.mts +103 -0
  184. package/model/Device.mjs +99 -0
  185. package/model/Document.d.mts +309 -0
  186. package/model/Document.mjs +238 -0
  187. package/model/EntityReferenceInGroup.d.mts +23 -0
  188. package/model/EntityReferenceInGroup.mjs +23 -0
  189. package/model/FrontEndMigration.d.mts +60 -0
  190. package/model/FrontEndMigration.mjs +56 -0
  191. package/model/Group.d.mts +79 -0
  192. package/model/Group.mjs +71 -0
  193. package/model/GroupDeletionReport.d.mts +17 -0
  194. package/model/GroupDeletionReport.mjs +5 -0
  195. package/model/GroupScoped.d.mts +10 -0
  196. package/model/GroupScoped.mjs +10 -0
  197. package/model/HealthElement.d.mts +355 -0
  198. package/model/HealthElement.mjs +272 -0
  199. package/model/HealthcareParty.d.mts +168 -0
  200. package/model/HealthcareParty.mjs +164 -0
  201. package/model/IdWithRev.d.mts +14 -0
  202. package/model/IdWithRev.mjs +10 -0
  203. package/model/IndexingInfo.d.mts +10 -0
  204. package/model/IndexingInfo.mjs +10 -0
  205. package/model/Insurance.d.mts +51 -0
  206. package/model/Insurance.mjs +43 -0
  207. package/model/Invoice.d.mts +705 -0
  208. package/model/Invoice.mjs +502 -0
  209. package/model/ListOfProperties.d.mts +9 -0
  210. package/model/ListOfProperties.mjs +9 -0
  211. package/model/MaintenanceTask.d.mts +202 -0
  212. package/model/MaintenanceTask.mjs +170 -0
  213. package/model/Message.d.mts +321 -0
  214. package/model/Message.mjs +246 -0
  215. package/model/PaginatedDocumentKeyIdPair.d.mts +14 -0
  216. package/model/PaginatedDocumentKeyIdPair.mjs +14 -0
  217. package/model/PaginatedList.d.mts +17 -0
  218. package/model/PaginatedList.mjs +17 -0
  219. package/model/Patient.d.mts +715 -0
  220. package/model/Patient.mjs +546 -0
  221. package/model/Place.d.mts +25 -0
  222. package/model/Place.mjs +21 -0
  223. package/model/PropertyStub.d.mts +59 -0
  224. package/model/PropertyStub.mjs +42 -0
  225. package/model/PropertyTypeStub.d.mts +14 -0
  226. package/model/PropertyTypeStub.mjs +14 -0
  227. package/model/PublicAgendasAndCalendarItemTypes.d.mts +15 -1
  228. package/model/PublicAgendasAndCalendarItemTypes.mjs +22 -4
  229. package/model/PublicKey.d.mts +13 -0
  230. package/model/PublicKey.mjs +13 -0
  231. package/model/Receipt.d.mts +195 -0
  232. package/model/Receipt.mjs +162 -0
  233. package/model/RegistrationInformation.d.mts +41 -0
  234. package/model/RegistrationInformation.mjs +37 -0
  235. package/model/RegistrationSuccess.d.mts +18 -0
  236. package/model/RegistrationSuccess.mjs +6 -0
  237. package/model/Replication.d.mts +30 -0
  238. package/model/Replication.mjs +26 -0
  239. package/model/ReplicationInfo.d.mts +21 -0
  240. package/model/ReplicationInfo.mjs +21 -0
  241. package/model/Role.d.mts +33 -0
  242. package/model/Role.mjs +29 -0
  243. package/model/StoredDocumentIdentifier.d.mts +4 -0
  244. package/model/StoredDocumentIdentifier.mjs +4 -0
  245. package/model/Topic.d.mts +213 -0
  246. package/model/Topic.mjs +174 -0
  247. package/model/TopicRole.d.mts +5 -0
  248. package/model/TopicRole.mjs +5 -0
  249. package/model/User.d.mts +96 -0
  250. package/model/User.mjs +92 -0
  251. package/model/UserGroup.d.mts +54 -0
  252. package/model/UserGroup.mjs +54 -0
  253. package/model/base/CodeIdentification.d.mts +6 -0
  254. package/model/base/CodeStub.d.mts +31 -0
  255. package/model/base/CodeStub.mjs +31 -0
  256. package/model/base/CryptoActor.d.mts +7 -0
  257. package/model/base/DataOwner.d.mts +7 -0
  258. package/model/base/HasCodes.d.mts +6 -0
  259. package/model/base/HasEncryptionMetadata.d.mts +7 -0
  260. package/model/base/HasEndOfLife.d.mts +5 -0
  261. package/model/base/HasTags.d.mts +7 -0
  262. package/model/base/ICureDocument.d.mts +7 -0
  263. package/model/base/Identifiable.d.mts +5 -0
  264. package/model/base/Identifier.d.mts +43 -0
  265. package/model/base/Identifier.mjs +43 -0
  266. package/model/base/LinkQualification.d.mts +31 -0
  267. package/model/base/LinkQualification.mjs +31 -0
  268. package/model/base/Named.d.mts +5 -0
  269. package/model/base/ParticipantType.d.mts +7 -0
  270. package/model/base/ParticipantType.mjs +7 -0
  271. package/model/base/Person.d.mts +5 -0
  272. package/model/base/StoredDocument.d.mts +6 -0
  273. package/model/base/Versionable.d.mts +6 -0
  274. package/model/couchdb/Basic.d.mts +14 -0
  275. package/model/couchdb/Basic.mjs +6 -0
  276. package/model/couchdb/DatabaseInfo.d.mts +46 -0
  277. package/model/couchdb/DatabaseInfo.mjs +42 -0
  278. package/model/couchdb/DesignDocument.d.mts +43 -0
  279. package/model/couchdb/DesignDocument.mjs +39 -0
  280. package/model/couchdb/DocIdentifier.d.mts +13 -0
  281. package/model/couchdb/DocIdentifier.mjs +13 -0
  282. package/model/couchdb/GroupDatabasesInfo.d.mts +19 -0
  283. package/model/couchdb/GroupDatabasesInfo.mjs +7 -0
  284. package/model/couchdb/Remote.d.mts +14 -0
  285. package/model/couchdb/Remote.mjs +10 -0
  286. package/model/couchdb/RemoteAuthentication.d.mts +9 -0
  287. package/model/couchdb/RemoteAuthentication.mjs +9 -0
  288. package/model/couchdb/ReplicationStats.d.mts +41 -0
  289. package/model/couchdb/ReplicationStats.mjs +41 -0
  290. package/model/couchdb/ReplicatorDocument.d.mts +62 -0
  291. package/model/couchdb/ReplicatorDocument.mjs +58 -0
  292. package/model/couchdb/View.d.mts +13 -0
  293. package/model/couchdb/View.mjs +9 -0
  294. package/model/data/LabelledOccurence.d.mts +14 -0
  295. package/model/data/LabelledOccurence.mjs +6 -0
  296. package/model/embed/AccessLevel.d.mts +6 -0
  297. package/model/embed/AccessLevel.mjs +6 -0
  298. package/model/embed/AddressType.d.mts +5 -0
  299. package/model/embed/AddressType.mjs +5 -0
  300. package/model/embed/AdministrationQuantity.d.mts +18 -0
  301. package/model/embed/AdministrationQuantity.mjs +18 -0
  302. package/model/embed/AgendaSlottingAlgorithm.d.mts +13 -0
  303. package/model/embed/AgendaSlottingAlgorithm.mjs +13 -0
  304. package/model/embed/Annotation.d.mts +48 -0
  305. package/model/embed/Annotation.mjs +44 -0
  306. package/model/embed/AuthenticationClass.d.mts +6 -0
  307. package/model/embed/AuthenticationClass.mjs +6 -0
  308. package/model/embed/CalendarItemTag.d.mts +71 -0
  309. package/model/embed/CalendarItemTag.mjs +50 -0
  310. package/model/embed/CareTeamMember.d.mts +70 -0
  311. package/model/embed/CareTeamMember.mjs +44 -0
  312. package/model/embed/CareTeamMemberType.d.mts +5 -0
  313. package/model/embed/CareTeamMemberType.mjs +5 -0
  314. package/model/embed/CareTeamMembership.d.mts +74 -0
  315. package/model/embed/CareTeamMembership.mjs +52 -0
  316. package/model/embed/ContactParticipant.d.mts +13 -0
  317. package/model/embed/ContactParticipant.mjs +5 -0
  318. package/model/embed/Content.d.mts +177 -0
  319. package/model/embed/Content.mjs +118 -0
  320. package/model/embed/ContractChangeType.d.mts +5 -0
  321. package/model/embed/ContractChangeType.mjs +5 -0
  322. package/model/embed/DataAttachment.d.mts +18 -0
  323. package/model/embed/DataAttachment.mjs +18 -0
  324. package/model/embed/DatabaseSynchronization.d.mts +22 -0
  325. package/model/embed/DatabaseSynchronization.mjs +22 -0
  326. package/model/embed/DelegationTag.d.mts +6 -0
  327. package/model/embed/DelegationTag.mjs +6 -0
  328. package/model/embed/DeletedAttachment.d.mts +23 -0
  329. package/model/embed/DeletedAttachment.mjs +23 -0
  330. package/model/embed/DocumentGroup.d.mts +13 -0
  331. package/model/embed/DocumentGroup.mjs +13 -0
  332. package/model/embed/DocumentStatus.d.mts +6 -0
  333. package/model/embed/DocumentStatus.mjs +6 -0
  334. package/model/embed/DocumentType.d.mts +5 -0
  335. package/model/embed/DocumentType.mjs +5 -0
  336. package/model/embed/Duration.d.mts +13 -0
  337. package/model/embed/Duration.mjs +13 -0
  338. package/model/embed/EmbeddedTimeTableHour.d.mts +13 -0
  339. package/model/embed/EmbeddedTimeTableHour.mjs +5 -0
  340. package/model/embed/EmbeddedTimeTableItem.d.mts +42 -0
  341. package/model/embed/EmbeddedTimeTableItem.mjs +30 -0
  342. package/model/embed/Encryptable.d.mts +7 -0
  343. package/model/embed/Episode.d.mts +78 -0
  344. package/model/embed/Episode.mjs +52 -0
  345. package/model/embed/FinancialInstitutionInformation.d.mts +110 -0
  346. package/model/embed/FinancialInstitutionInformation.mjs +76 -0
  347. package/model/embed/FrontEndMigrationStatus.d.mts +5 -0
  348. package/model/embed/FrontEndMigrationStatus.mjs +5 -0
  349. package/model/embed/Gender.d.mts +6 -0
  350. package/model/embed/Gender.mjs +6 -0
  351. package/model/embed/GroupType.d.mts +5 -0
  352. package/model/embed/GroupType.mjs +5 -0
  353. package/model/embed/IdentityDocumentReader.d.mts +30 -0
  354. package/model/embed/IdentityDocumentReader.mjs +30 -0
  355. package/model/embed/InvoiceType.d.mts +5 -0
  356. package/model/embed/InvoiceType.mjs +5 -0
  357. package/model/embed/InvoicingCode.d.mts +689 -0
  358. package/model/embed/InvoicingCode.mjs +454 -0
  359. package/model/embed/Laterality.d.mts +5 -0
  360. package/model/embed/Laterality.mjs +5 -0
  361. package/model/embed/Measure.d.mts +54 -0
  362. package/model/embed/Measure.mjs +54 -0
  363. package/model/embed/MedicalHouseContract.d.mts +413 -0
  364. package/model/embed/MedicalHouseContract.mjs +278 -0
  365. package/model/embed/Medication.d.mts +5 -0
  366. package/model/embed/Medication.mjs +5 -0
  367. package/model/embed/Medicinalproduct.d.mts +25 -0
  368. package/model/embed/Medicinalproduct.mjs +25 -0
  369. package/model/embed/MediumType.d.mts +5 -0
  370. package/model/embed/MediumType.mjs +5 -0
  371. package/model/embed/MembershipType.d.mts +5 -0
  372. package/model/embed/MembershipType.mjs +5 -0
  373. package/model/embed/MessageReadStatus.d.mts +14 -0
  374. package/model/embed/MessageReadStatus.mjs +14 -0
  375. package/model/embed/MhcSignatureType.d.mts +6 -0
  376. package/model/embed/MhcSignatureType.mjs +6 -0
  377. package/model/embed/Partnership.d.mts +18 -0
  378. package/model/embed/Partnership.mjs +18 -0
  379. package/model/embed/PartnershipStatus.d.mts +5 -0
  380. package/model/embed/PartnershipStatus.mjs +5 -0
  381. package/model/embed/PartnershipType.d.mts +6 -0
  382. package/model/embed/PartnershipType.mjs +6 -0
  383. package/model/embed/PatientHealthCareParty.d.mts +15 -0
  384. package/model/embed/PatientHealthCareParty.mjs +10 -0
  385. package/model/embed/PatientHealthCarePartyType.d.mts +5 -0
  386. package/model/embed/PatientHealthCarePartyType.mjs +5 -0
  387. package/model/embed/Payment.d.mts +17 -0
  388. package/model/embed/Payment.mjs +17 -0
  389. package/model/embed/PaymentType.d.mts +5 -0
  390. package/model/embed/PaymentType.mjs +5 -0
  391. package/model/embed/PersonName.d.mts +39 -0
  392. package/model/embed/PersonName.mjs +39 -0
  393. package/model/embed/PersonNameUse.d.mts +5 -0
  394. package/model/embed/PersonNameUse.mjs +5 -0
  395. package/model/embed/PersonalStatus.d.mts +5 -0
  396. package/model/embed/PersonalStatus.mjs +5 -0
  397. package/model/embed/Range.d.mts +13 -0
  398. package/model/embed/Range.mjs +13 -0
  399. package/model/embed/ReferenceRange.d.mts +34 -0
  400. package/model/embed/ReferenceRange.mjs +34 -0
  401. package/model/embed/ReferralPeriod.d.mts +17 -0
  402. package/model/embed/ReferralPeriod.mjs +17 -0
  403. package/model/embed/RegimenItem.d.mts +32 -0
  404. package/model/embed/RegimenItem.mjs +32 -0
  405. package/model/embed/Renewal.d.mts +14 -0
  406. package/model/embed/Renewal.mjs +14 -0
  407. package/model/embed/ResourceGroupAllocationSchedule.d.mts +34 -0
  408. package/model/embed/ResourceGroupAllocationSchedule.mjs +34 -0
  409. package/model/embed/RoleConfiguration.d.mts +14 -0
  410. package/model/embed/RoleConfiguration.mjs +10 -0
  411. package/model/embed/SecureDelegation.d.mts +41 -0
  412. package/model/embed/SecureDelegation.mjs +37 -0
  413. package/model/embed/SecurityMetadata.d.mts +11 -0
  414. package/model/embed/SecurityMetadata.mjs +6 -0
  415. package/model/embed/Substanceproduct.d.mts +25 -0
  416. package/model/embed/Substanceproduct.mjs +25 -0
  417. package/model/embed/SuspensionReason.d.mts +5 -0
  418. package/model/embed/SuspensionReason.mjs +5 -0
  419. package/model/embed/TaskStatus.d.mts +5 -0
  420. package/model/embed/TaskStatus.mjs +5 -0
  421. package/model/embed/TelecomType.d.mts +6 -0
  422. package/model/embed/TelecomType.mjs +6 -0
  423. package/model/embed/TimeSeries.d.mts +34 -0
  424. package/model/embed/TimeSeries.mjs +34 -0
  425. package/model/embed/TypedValue.d.mts +101 -0
  426. package/model/embed/TypedValue.mjs +70 -0
  427. package/model/embed/TypedValuesType.d.mts +5 -0
  428. package/model/embed/TypedValuesType.mjs +5 -0
  429. package/model/embed/UserAccessLevel.d.mts +11 -0
  430. package/model/embed/UserAccessLevel.mjs +11 -0
  431. package/model/embed/UserType.d.mts +5 -0
  432. package/model/embed/UserType.mjs +5 -0
  433. package/model/embed/ValueWithPrecision.d.mts +13 -0
  434. package/model/embed/ValueWithPrecision.mjs +5 -0
  435. package/model/embed/Weekday.d.mts +13 -0
  436. package/model/embed/Weekday.mjs +13 -0
  437. package/model/embed/form/template/Action.d.mts +18 -0
  438. package/model/embed/form/template/Action.mjs +18 -0
  439. package/model/embed/form/template/CheckBox.d.mts +5 -0
  440. package/model/embed/form/template/CheckBox.mjs +5 -0
  441. package/model/embed/form/template/DatePicker.d.mts +5 -0
  442. package/model/embed/form/template/DatePicker.mjs +5 -0
  443. package/model/embed/form/template/DateTimePicker.d.mts +5 -0
  444. package/model/embed/form/template/DateTimePicker.mjs +5 -0
  445. package/model/embed/form/template/DropdownField.d.mts +5 -0
  446. package/model/embed/form/template/DropdownField.mjs +5 -0
  447. package/model/embed/form/template/Field.d.mts +9 -0
  448. package/model/embed/form/template/FieldsGroup.d.mts +14 -0
  449. package/model/embed/form/template/FieldsGroup.mjs +10 -0
  450. package/model/embed/form/template/FormTemplateLayout.d.mts +26 -0
  451. package/model/embed/form/template/FormTemplateLayout.mjs +22 -0
  452. package/model/embed/form/template/Launcher.d.mts +18 -0
  453. package/model/embed/form/template/Launcher.mjs +10 -0
  454. package/model/embed/form/template/MeasureField.d.mts +5 -0
  455. package/model/embed/form/template/MeasureField.mjs +5 -0
  456. package/model/embed/form/template/MultipleChoice.d.mts +5 -0
  457. package/model/embed/form/template/MultipleChoice.mjs +5 -0
  458. package/model/embed/form/template/NumberField.d.mts +5 -0
  459. package/model/embed/form/template/NumberField.mjs +5 -0
  460. package/model/embed/form/template/RadioButton.d.mts +5 -0
  461. package/model/embed/form/template/RadioButton.mjs +5 -0
  462. package/model/embed/form/template/Section.d.mts +22 -0
  463. package/model/embed/form/template/Section.mjs +14 -0
  464. package/model/embed/form/template/State.d.mts +17 -0
  465. package/model/embed/form/template/State.mjs +9 -0
  466. package/model/embed/form/template/StateToUpdate.d.mts +5 -0
  467. package/model/embed/form/template/StateToUpdate.mjs +5 -0
  468. package/model/embed/form/template/StructureElement.d.mts +6 -0
  469. package/model/embed/form/template/TextField.d.mts +73 -0
  470. package/model/embed/form/template/TextField.mjs +69 -0
  471. package/model/embed/form/template/TimePicker.d.mts +5 -0
  472. package/model/embed/form/template/TimePicker.mjs +5 -0
  473. package/model/embed/form/template/Trigger.d.mts +5 -0
  474. package/model/embed/form/template/Trigger.mjs +5 -0
  475. package/model/enums/UsersStatus.d.mts +5 -0
  476. package/model/enums/UsersStatus.mjs +5 -0
  477. package/model/filter/predicate/AlwaysPredicate.d.mts +5 -0
  478. package/model/filter/predicate/AlwaysPredicate.mjs +5 -0
  479. package/model/filter/predicate/AndPredicate.d.mts +9 -0
  480. package/model/filter/predicate/AndPredicate.mjs +9 -0
  481. package/model/filter/predicate/KeyValuePredicate.d.mts +17 -0
  482. package/model/filter/predicate/KeyValuePredicate.mjs +17 -0
  483. package/model/filter/predicate/NotPredicate.d.mts +9 -0
  484. package/model/filter/predicate/NotPredicate.mjs +5 -0
  485. package/model/filter/predicate/Operator.d.mts +5 -0
  486. package/model/filter/predicate/Operator.mjs +5 -0
  487. package/model/filter/predicate/OrPredicate.d.mts +9 -0
  488. package/model/filter/predicate/OrPredicate.mjs +9 -0
  489. package/model/filter/predicate/Predicate.d.mts +6 -0
  490. package/model/requests/RequestedPermission.d.mts +5 -0
  491. package/model/requests/RequestedPermission.mjs +5 -0
  492. package/model/security/AlwaysPermissionItem.d.mts +10 -0
  493. package/model/security/AlwaysPermissionItem.mjs +6 -0
  494. package/model/security/AuthenticationToken.d.mts +23 -0
  495. package/model/security/AuthenticationToken.mjs +15 -0
  496. package/model/security/Enable2faRequest.d.mts +13 -0
  497. package/model/security/Enable2faRequest.mjs +5 -0
  498. package/model/security/ExternalJwtConfig.d.mts +110 -0
  499. package/model/security/ExternalJwtConfig.mjs +59 -0
  500. package/model/security/LoginIdentifier.d.mts +14 -0
  501. package/model/security/LoginIdentifier.mjs +6 -0
  502. package/model/security/Operation.d.mts +5 -0
  503. package/model/security/Operation.mjs +5 -0
  504. package/model/security/OperationToken.d.mts +27 -0
  505. package/model/security/OperationToken.mjs +11 -0
  506. package/model/security/Permission.d.mts +14 -0
  507. package/model/security/Permission.mjs +14 -0
  508. package/model/security/PermissionItem.d.mts +7 -0
  509. package/model/security/PermissionType.d.mts +6 -0
  510. package/model/security/PermissionType.mjs +6 -0
  511. package/model/security/TokenWithGroup.d.mts +17 -0
  512. package/model/security/TokenWithGroup.mjs +9 -0
  513. package/model/specializations/AesExchangeKeyEncryptionKeypairIdentifier.d.mts +7 -0
  514. package/package.json +1 -1
  515. package/subscription/EntitySubscriptionConfiguration.d.mts +24 -0
  516. package/subscription/EntitySubscriptionConfiguration.mjs +24 -0
  517. package/subscription/EntitySubscriptionEvent.d.mts +21 -0
  518. package/subscription/EntitySubscriptionEvent.mjs +9 -0
@@ -8,31 +8,277 @@ import { SubscriptionEventType } from '../subscription/SubscriptionEventType.mjs
8
8
  import { PatientBasicInGroupApi } from './PatientBasicInGroupApi.mjs';
9
9
  export interface PatientBasicApi {
10
10
  inGroup: PatientBasicInGroupApi;
11
+ /**
12
+ *
13
+ * Get the ids of all patients matching the provided filter.
14
+ *
15
+ * This method does not guarantee that the returned data will be ordered when using sortable filter options.
16
+ * Even if the data obtained from an invocation of the method appears to be ordered, any changes to the stored data,
17
+ * or to the internal iCure implementations, may cause future invocations to return unordered data.
18
+ * If you need ordered data use [matchPatientsBySorted] instead.
19
+ *
20
+ * @param filter a patient filter
21
+ * @return a list of patient ids
22
+ */
11
23
  matchPatientsBy(filter: BaseFilterOptions<Patient>): Promise<Array<string>>;
24
+ /**
25
+ *
26
+ * Get the ids of all patients matching the provided filter.
27
+ *
28
+ * This method guarantees that the returned data will be ordered using the rules specified by the provided filter,
29
+ * but the operation may take longer than [matchPatientsBy].
30
+ *
31
+ * @param filter a patient filter
32
+ * @return a list of patient ids
33
+ */
12
34
  matchPatientsBySorted(filter: BaseSortableFilterOptions<Patient>): Promise<Array<string>>;
35
+ /**
36
+ *
37
+ * Get an iterator that iterates through all patients matching the provided filter, executing multiple requests to
38
+ * the api if needed.
39
+ *
40
+ * This method does not guarantee that the returned data will be ordered when using sortable filter options.
41
+ * Even if the data obtained from an invocation of the method appears to be ordered, any changes to the stored data,
42
+ * or to the internal iCure implementations, may cause future invocations to return unordered data.
43
+ * If you need ordered data use [filterPatientsBySorted] instead.
44
+ *
45
+ * @param filter a patient filter
46
+ * @return an iterator that iterates over all patients matching the provided filter.
47
+ */
13
48
  filterPatientsBy(filter: BaseFilterOptions<Patient>): Promise<PaginatedListIterator<EncryptedPatient>>;
49
+ /**
50
+ *
51
+ * Get an iterator that iterates through all patients matching the provided filter, executing multiple requests to
52
+ * the api if needed.
53
+ *
54
+ * This method guarantees that the returned data will be ordered using the rules specified by the provided filter,
55
+ * but the operation may take longer than [filterPatientsBy].
56
+ *
57
+ * @param filter a patient filter
58
+ * @return an iterator that iterates over all patients matching the provided filter.
59
+ */
14
60
  filterPatientsBySorted(filter: BaseSortableFilterOptions<Patient>): Promise<PaginatedListIterator<EncryptedPatient>>;
61
+ /**
62
+ *
63
+ * Deletes a patient. If you don't have write access to the patient the method will fail.
64
+ * @param entityId id of the patient.
65
+ * @param rev the latest known rev of the patient to delete
66
+ * @return the id and revision of the deleted patient.
67
+ * @throws RevisionConflictException if the provided revision doesn't match the latest known revision
68
+ */
15
69
  deletePatientById(entityId: string, rev: string): Promise<StoredDocumentIdentifier>;
70
+ /**
71
+ *
72
+ * Deletes many patients. Ids that do not correspond to an entity, or that correspond to an entity for which
73
+ * you don't have write access will be ignored.
74
+ * @param entityIds ids and revisions of the patients to delete.
75
+ * @return the id and revision of the deleted patients. If some entities could not be deleted (for example
76
+ * because you had no write access to them) they will not be included in this list.
77
+ */
16
78
  deletePatientsByIds(entityIds: Array<StoredDocumentIdentifier>): Promise<Array<StoredDocumentIdentifier>>;
79
+ /**
80
+ *
81
+ * Permanently deletes a patient.
82
+ * @param id id of the patient to purge
83
+ * @param rev latest revision of the patient
84
+ * @throws RevisionConflictException if the provided revision doesn't match the latest known revision
85
+ */
17
86
  purgePatientById(id: string, rev: string): Promise<void>;
87
+ /**
88
+ *
89
+ * Permanently deletes many patients.
90
+ * @param entityIds ids and revisions of the patients to delete
91
+ * @return the id and revision of the deleted patients. If some entities couldn't be deleted (for example
92
+ * because you had no write access to them) they will not be included in this list.
93
+ */
18
94
  purgePatientsByIds(entityIds: Array<StoredDocumentIdentifier>): Promise<Array<StoredDocumentIdentifier>>;
95
+ /**
96
+ *
97
+ * Deletes a patient. If you don't have write access to the patient the method will fail.
98
+ * @param patient the patient to delete
99
+ * @return the id and revision of the deleted patient.
100
+ * @throws RevisionConflictException if the provided patient doesn't match the latest known revision
101
+ */
19
102
  deletePatient(patient: Patient): Promise<StoredDocumentIdentifier>;
103
+ /**
104
+ *
105
+ * Deletes many patients. Ignores patient for which you don't have write access or that don't match the latest revision.
106
+ * @param patients the patients to delete
107
+ * @return the id and revision of the deleted patients. If some entities couldn't be deleted they will not be
108
+ * included in this list.
109
+ */
20
110
  deletePatients(patients: Array<Patient>): Promise<Array<StoredDocumentIdentifier>>;
111
+ /**
112
+ *
113
+ * Permanently deletes a patient.
114
+ * @param patient the patient to purge.
115
+ * @throws RevisionConflictException if the provided patient doesn't match the latest known revision
116
+ */
21
117
  purgePatient(patient: Patient): Promise<void>;
118
+ /**
119
+ *
120
+ * Permanently deletes many patients.
121
+ * @param patients the patients to purge.
122
+ * @return the id and revision of the deleted patients. If some entities couldn't be deleted (for example
123
+ * because you had no write access to them) they will not be included in this list.
124
+ */
22
125
  purgePatients(patients: Array<Patient>): Promise<Array<StoredDocumentIdentifier>>;
126
+ /**
127
+ *
128
+ * Get all data owners with access to the provided patient, attempting to identify any unknown anonymous data owners
129
+ * using delegations de-anonymization metadata.
130
+ * @param patient a patient
131
+ * @return information on users with access to the provided patient
132
+ */
23
133
  getDataOwnersWithAccessTo(patient: Patient): Promise<EntityAccessInformation>;
134
+ /**
135
+ *
136
+ * Create a new patient. The provided patient must have the encryption metadata initialized.
137
+ * @param patient a patient with initialized encryption metadata
138
+ * @return the created patient with updated revision.
139
+ * @throws IllegalArgumentException if the encryption metadata of the input wasn't initialized.
140
+ */
24
141
  createPatient(patient: EncryptedPatient): Promise<EncryptedPatient>;
142
+ /**
143
+ *
144
+ * Bulk version of [createPatient], returns all the successfully created patients.
145
+ * If a patient couldn't be created (for example because there is already a patient with the same id) it will be
146
+ * excluded from the result.
147
+ */
25
148
  createPatients(patients: Array<EncryptedPatient>): Promise<Array<EncryptedPatient>>;
149
+ /**
150
+ *
151
+ * Restores a patient that was marked as deleted.
152
+ * @param patient the patient to undelete
153
+ * @return the restored patient.
154
+ * @throws RevisionConflictException if the provided patient doesn't match the latest known revision
155
+ */
26
156
  undeletePatient(patient: Patient): Promise<Patient>;
157
+ /**
158
+ *
159
+ * Restores a batch of patients that were marked as deleted.
160
+ * @param patients the patients to restore.
161
+ * @return the restored patients. If some entities couldn't be restored (because the user does not have access or the revision is not
162
+ * up-to-date), then those entities will not be restored and will not appear in this list.
163
+ */
27
164
  undeletePatients(patients: Array<Patient>): Promise<Array<EncryptedPatient>>;
165
+ /**
166
+ *
167
+ * Modifies a patient. You need to have write access to the entity.
168
+ * Flavoured method.
169
+ * @param entity a patient with update content
170
+ * @return the patient updated with the provided content and a new revision.
171
+ */
28
172
  modifyPatient(entity: EncryptedPatient): Promise<EncryptedPatient>;
173
+ /**
174
+ *
175
+ * Restores a patient that was marked as deleted.
176
+ * @param id the id of the entity
177
+ * @param rev the latest revision of the entity.
178
+ * @return the restored entity.
179
+ * @throws RevisionConflictException if the provided revision doesn't match the latest known revision
180
+ */
29
181
  undeletePatientById(id: string, rev: string): Promise<EncryptedPatient>;
182
+ /**
183
+ *
184
+ * Restores one or more patients that were marked as deleted.
185
+ * Ignores any entities that the current user is not allowed to restore or that have a revision different from the
186
+ * provided revision.
187
+ * @param ids the ids and revisions of the patients to restore
188
+ * @return the restored entities.
189
+ */
30
190
  undeletePatientsByIds(ids: Array<StoredDocumentIdentifier>): Promise<Array<EncryptedPatient>>;
191
+ /**
192
+ *
193
+ * Get a patient by its id. You must have read access to the entity. Fails if the id does not correspond to any
194
+ * entity, corresponds to an entity that is not a patient, or corresponds to an entity for which you don't have
195
+ * read access.
196
+ * Flavoured method.
197
+ * @param entityId a patient id.
198
+ * @return the patient with id [entityId].
199
+ */
31
200
  getPatient(entityId: string): Promise<EncryptedPatient | undefined>;
201
+ /**
202
+ *
203
+ * Get the patient with the provided id and follows the chain of patient merges indicated by the
204
+ * [Patient.mergeToPatientId] field until a patient that was not merged into another patient is reached, then that
205
+ * patient is returned.
206
+ * You can optionally limit the maximum depth of merges this method will go through by providing a [maxMergeDepth]
207
+ * parameter. This parameter limits the amount of links that will be resolved: if by the time the [maxMergeDepth] is
208
+ * reached the end of the merge chain is not yet reached this method will throw an exception.
209
+ * @param patientId the id of a patient
210
+ * @param maxMergeDepth a number greater than 0 or null if you don't want to limit the merge depth
211
+ * @return the patient at the end of the merge chain
212
+ * @throws IllegalArgumentException if maxMergeLevel is less than 1, or if the max merge level has been reached but
213
+ * the end of the merge chain was not yet reached.
214
+ */
32
215
  getPatientResolvingMerges(patientId: string, maxMergeDepth: number | undefined): Promise<EncryptedPatient>;
216
+ /**
217
+ *
218
+ * Get multiple patients by their ids. Ignores all ids that do not correspond to an entity, correspond to
219
+ * an entity that is not a patient, or correspond to an entity for which you don't have read access.
220
+ * Flavoured method.
221
+ * @param patientIds a list of patients ids
222
+ * @return all patients that you can access with one of the provided ids.
223
+ */
33
224
  getPatients(patientIds: Array<string>): Promise<Array<EncryptedPatient>>;
225
+ /**
226
+ *
227
+ * Bulk version of [modifyPatient], returns all the successfully updated patients.
228
+ * If a patient couldn't be updated (for example because of a revision mismatch) it will be excluded from the
229
+ * result.
230
+ */
34
231
  modifyPatients(patients: Array<EncryptedPatient>): Promise<Array<EncryptedPatient>>;
232
+ /**
233
+ *
234
+ * Merge two patients into one. This method performs the following operations:
235
+ * - The `from` patient will be soft-deleted, and it will point to the `into` patient. Only the `deletionDate` and `mergeToPatientId` fields of the
236
+ * patient will be changed (automatically by this method). Note that the value of [from] is only used to verify that the client is aware of
237
+ * the last version of the `from` patient: any changes to its content and/or metadata compared to what is actually stored in the database will be
238
+ * ignored.
239
+ * - The metadata of the `into` patient will be automatically updated to contain also the metadata of the `from` patient and to keep track of the
240
+ * merge:
241
+ * - the `mergedIds` will be updated to contain the `from` patient id
242
+ * - all secret ids of the `from` patient will be added to the `into` patient
243
+ * - all data owners (including anonymous data owners) with access to the `from` patient will have the same access to the merged `into` patient
244
+ * (unless they already had greater access to the `into` patient, in which case they keep the greater access)
245
+ * - The content of the `into` patient will be updated to match the content (name, address, note, ...) of the provided [mergedInto] parameter.
246
+ * Note that since the metadata is automatically updated by this method you must not change the metadata of the `mergedInto` patient
247
+ * (`delegations`, mergedInto`, ...): if there is any change between the metadata of the provided `mergedInto` patient and the stored patient this
248
+ * method will fail.
249
+ *
250
+ * In case the revisions of [from] and/or [mergedInto] does not match the latest revisions for these patients in the database this
251
+ * method will fail without soft-deleting the `from` patient and without updating the `into` patient with the merged content and metadata. You will
252
+ * have to retrieve the updated versions of both patients before retrying the merge.
253
+ *
254
+ * Finally, note that this method only merges existing data, and does not perform any automatic sharing of the data. The secret ids and encryption
255
+ * keys will not be shared with users that had access only to one of the entity, you will have to use a share method after the merge
256
+ * if you want to do so.
257
+ * For example consider hcps A, B with access to P' and hcps A, C with access to P'', and we merge P'' into P'. After the merge:
258
+ * - A has access to all secret ids of the merged patient and to the encryption key of the merged patient
259
+ * - B has access to the encryption key of the merged patient (since it is the same as in P'), but only to the secret id which was originally from
260
+ * the unmerged P'
261
+ * - C has no access to the encryption key of the merged patient, and has access only to the secret id which was originally from the unmerged P''
262
+ *
263
+ * Note that the user performing this operation must have write access to both patients.
264
+ *
265
+ * @param from the original, unmodified `from` patient. Its content will be unchanged and its metadata will be automatically updated by this method
266
+ * to reflect the merge.
267
+ * @param mergedInto the `into` patient with updated content result of the merge with the `from` patient, as specified by your application logic.
268
+ * The metadata of the `mergedInto` patient must not differ from the metadata of the stored version of the patient, since it will be automatically
269
+ * updated by the method.
270
+ * @return the updated `into` patient.
271
+ */
35
272
  mergePatients(from: Patient, mergedInto: EncryptedPatient): Promise<EncryptedPatient>;
273
+ /**
274
+ *
275
+ * Subscribe to receive real-time notifications when an entity is updated.
276
+ * @param events the type of events that will be notified to the subscription
277
+ * @param filter the subscription will receive notifications only for entities matching this filter, you should
278
+ * make the filter as restrictive as possible.
279
+ * @param subscriptionConfig customize the configuration for the subscription
280
+ * @return a subscription that receives notifications for the configured events.
281
+ */
36
282
  subscribeToEvents(events: Array<SubscriptionEventType>, filter: BaseFilterOptions<Patient>, options?: {
37
283
  subscriptionConfig?: EntitySubscriptionConfiguration | undefined;
38
284
  }): Promise<EntitySubscription<EncryptedPatient>>;
@@ -4,27 +4,119 @@ import { GroupScoped } from '../model/GroupScoped.mjs';
4
4
  import { EncryptedPatient, Patient } from '../model/Patient.mjs';
5
5
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
6
6
  export interface PatientBasicInGroupApi {
7
+ /**
8
+ *
9
+ * In-group version of [PatientBasicApi.matchPatientsBy]
10
+ */
7
11
  matchPatientsBy(groupId: string, filter: BaseFilterOptions<Patient>): Promise<Array<string>>;
12
+ /**
13
+ *
14
+ * In-group version of [PatientBasicApi.matchPatientsBySorted]
15
+ */
8
16
  matchPatientsBySorted(groupId: string, filter: BaseSortableFilterOptions<Patient>): Promise<Array<string>>;
17
+ /**
18
+ *
19
+ * In-group version of [PatientBasicApi.filterPatientsBy]
20
+ */
9
21
  filterPatientsBy(groupId: string, filter: BaseFilterOptions<Patient>): Promise<PaginatedListIterator<GroupScoped<EncryptedPatient>>>;
22
+ /**
23
+ *
24
+ * In-group version of [PatientBasicApi.filterPatientsBySorted]
25
+ */
10
26
  filterPatientsBySorted(groupId: string, filter: BaseSortableFilterOptions<Patient>): Promise<PaginatedListIterator<GroupScoped<EncryptedPatient>>>;
27
+ /**
28
+ *
29
+ * In-group version of [PatientBasicFlavourlessApi.deletePatientById]
30
+ */
11
31
  deletePatientById(entityId: GroupScoped<StoredDocumentIdentifier>): Promise<GroupScoped<StoredDocumentIdentifier>>;
32
+ /**
33
+ *
34
+ * In-group version of [PatientBasicFlavourlessApi.deletePatientsByIds]
35
+ */
12
36
  deletePatientsByIds(entityIds: Array<GroupScoped<StoredDocumentIdentifier>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
37
+ /**
38
+ *
39
+ * In-group version of [PatientBasicFlavourlessApi.purgePatientById]
40
+ */
13
41
  purgePatientById(entityId: GroupScoped<StoredDocumentIdentifier>): Promise<void>;
42
+ /**
43
+ *
44
+ * In-group version of [PatientBasicFlavourlessApi.purgePatientsByIds]
45
+ */
14
46
  purgePatientsByIds(entityIds: Array<GroupScoped<StoredDocumentIdentifier>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
47
+ /**
48
+ *
49
+ * In-group version of [PatientBasicFlavourlessApi.deletePatient]
50
+ */
15
51
  deletePatient(patient: GroupScoped<Patient>): Promise<GroupScoped<StoredDocumentIdentifier>>;
52
+ /**
53
+ *
54
+ * In-group version of [PatientBasicFlavourlessApi.deletePatients]
55
+ */
16
56
  deletePatients(patients: Array<GroupScoped<Patient>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
57
+ /**
58
+ *
59
+ * In-group version of [PatientBasicFlavourlessApi.purgePatient]
60
+ */
17
61
  purgePatient(patient: GroupScoped<Patient>): Promise<void>;
62
+ /**
63
+ *
64
+ * In-group version of [PatientBasicFlavourlessApi.getDataOwnersWithAccessTo].
65
+ */
18
66
  getDataOwnersWithAccessTo(patient: GroupScoped<Patient>): Promise<EntityAccessInformation>;
67
+ /**
68
+ *
69
+ * In-group version of [PatientBasicFlavouredApi.createPatient]
70
+ */
19
71
  createPatient(patient: GroupScoped<EncryptedPatient>): Promise<GroupScoped<EncryptedPatient>>;
72
+ /**
73
+ *
74
+ * In-group version of [PatientBasicFlavouredApi.createPatients]
75
+ */
20
76
  createPatients(patients: Array<GroupScoped<EncryptedPatient>>): Promise<Array<GroupScoped<EncryptedPatient>>>;
77
+ /**
78
+ *
79
+ * In-group version of [PatientBasicFlavouredApi.undeletePatient]
80
+ */
21
81
  undeletePatient(patient: GroupScoped<Patient>): Promise<GroupScoped<EncryptedPatient>>;
82
+ /**
83
+ *
84
+ * In-group version of [PatientBasicFlavouredApi.undeletePatients]
85
+ */
22
86
  undeletePatients(patients: Array<GroupScoped<Patient>>): Promise<Array<GroupScoped<EncryptedPatient>>>;
87
+ /**
88
+ *
89
+ * In-group version of [PatientBasicFlavouredApi.modifyPatient]
90
+ */
23
91
  modifyPatient(entity: GroupScoped<EncryptedPatient>): Promise<GroupScoped<EncryptedPatient>>;
92
+ /**
93
+ *
94
+ * In-group version of [PatientBasicFlavouredApi.undeletePatientById]
95
+ */
24
96
  undeletePatientById(patientId: GroupScoped<StoredDocumentIdentifier>): Promise<GroupScoped<EncryptedPatient>>;
97
+ /**
98
+ *
99
+ * In-group version of [PatientBasicFlavouredApi.undeletePatientsByIds]
100
+ */
25
101
  undeletePatientsByIds(patientIds: Array<GroupScoped<StoredDocumentIdentifier>>): Promise<Array<GroupScoped<EncryptedPatient>>>;
102
+ /**
103
+ *
104
+ * In-group version of [PatientBasicFlavouredApi.getPatient]
105
+ */
26
106
  getPatient(groupId: string, entityId: string): Promise<GroupScoped<EncryptedPatient> | undefined>;
107
+ /**
108
+ *
109
+ * In-group version of [PatientBasicFlavouredApi.getPatientResolvingMerges]
110
+ */
27
111
  getPatientResolvingMerges(groupId: string, patientId: string, maxMergeDepth: number | undefined): Promise<GroupScoped<EncryptedPatient>>;
112
+ /**
113
+ *
114
+ * In-group version of [PatientBasicFlavouredApi.getPatients]
115
+ */
28
116
  getPatients(groupId: string, patientIds: Array<string>): Promise<Array<GroupScoped<EncryptedPatient>>>;
117
+ /**
118
+ *
119
+ * In-group version of [PatientBasicFlavouredApi.modifyPatients]
120
+ */
29
121
  modifyPatients(patients: Array<GroupScoped<EncryptedPatient>>): Promise<Array<GroupScoped<EncryptedPatient>>>;
30
122
  }
@@ -3,25 +3,220 @@ import { PatientShareOptions } from '../crypto/entities/PatientShareOptions.mjs'
3
3
  import { Patient } from '../model/Patient.mjs';
4
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
5
5
  export interface PatientFlavouredApi<E extends Patient> {
6
+ /**
7
+ *
8
+ * Share a patient with another data owner. The patient must already exist in the database for this method to
9
+ * succeed. If you want to share the patient before creation you should instead pass provide the delegates in
10
+ * the initialize encryption metadata method.
11
+ * Note: this method only updates the security metadata. If the input entity has unsaved changes they may be lost.
12
+ * @param delegateId the owner that will gain access to the patient
13
+ * @param patient the patient to share with [delegateId]
14
+ * @param options specifies how the patient will be shared. Refer to the documentation of [PatientShareOptions] for more information.
15
+ * @return the updated patient if the sharing was successful, or details on the errors if the sharing failed.
16
+ */
6
17
  shareWith(delegateId: string, patient: E, options?: {
7
18
  options?: PatientShareOptions | undefined;
8
19
  }): Promise<E>;
20
+ /**
21
+ *
22
+ * Share a patient with multiple data owners. The patient must already exist in the database for this method to
23
+ * succeed. If you want to share the patient before creation you should instead pass provide the delegates in
24
+ * the initialize encryption metadata method.
25
+ * Note: this method only updates the security metadata. If the input entity has unsaved changes they may be lost.
26
+ * Throws an exception if the operation fails.
27
+ * @param patient the patient to share
28
+ * @param delegates specify the data owners which will gain access to the entity and the options for sharing with
29
+ * each of them.
30
+ * @return the updated patient.
31
+ */
9
32
  shareWithMany(patient: E, delegates: {
10
33
  [key: string]: PatientShareOptions;
11
34
  }): Promise<E>;
35
+ /**
36
+ *
37
+ * Initializes a new "confidential" secret id for the provided patient if there is none, and saves it. Returns the
38
+ * updated patient if a new secret id was initialized, or the input if there was already a confidential secret id
39
+ * available.
40
+ *
41
+ * A "confidential" secret id is a secret id that was not shared with any of the current data owner parents, at
42
+ * least to the extent of the knowledge of the current data owner. If the current data owner is missing access to
43
+ * some of the keys of his parents a secret id that is not confidential may be mistakenly identified as confidential.
44
+ * The confidential secret id may be shared in a second moment with a parent data owner, making it not confidential
45
+ * anymore. It may also be possible to share the secret id with another non-parent data owner, in which case the
46
+ * secret id will still be considered as confidential.
47
+ *
48
+ * Confidential secret ids only make sense in environments where a hierarchical data owner structure is used. In
49
+ * other environments all secret ids are confidential by nature.
50
+ *
51
+ * Note: this method only updates the security metadata. If the input entity has unsaved changes they may be lost.
52
+ *
53
+ * @param patient a patient
54
+ * @return the input if there is already a secret id available for the patient, or the updated patient otherwise.
55
+ */
12
56
  initializeConfidentialSecretId(patient: E): Promise<E>;
57
+ /**
58
+ *
59
+ * Get an iterator that iterates through all patients matching the provided filter, executing multiple requests to
60
+ * the api if needed.
61
+ *
62
+ * This method does not guarantee that the returned data will be ordered when using sortable filter options.
63
+ * Even if the data obtained from an invocation of the method appears to be ordered, any changes to the stored data,
64
+ * or to the internal iCure implementations, may cause future invocations to return unordered data.
65
+ * If you need ordered data use [filterPatientsBySorted] instead.
66
+ *
67
+ * @param filter a patient filter
68
+ * @return an iterator that iterates over all patients matching the provided filter.
69
+ */
13
70
  filterPatientsBy(filter: FilterOptions<Patient>): Promise<PaginatedListIterator<E>>;
71
+ /**
72
+ *
73
+ * Get an iterator that iterates through all patients matching the provided filter, executing multiple requests to
74
+ * the api if needed.
75
+ *
76
+ * This method guarantees that the returned data will be ordered using the rules specified by the provided filter,
77
+ * but the operation may take longer than [filterPatientsBy].
78
+ *
79
+ * @param filter a patient filter
80
+ * @return an iterator that iterates over all patients matching the provided filter.
81
+ */
14
82
  filterPatientsBySorted(filter: SortableFilterOptions<Patient>): Promise<PaginatedListIterator<E>>;
83
+ /**
84
+ *
85
+ * Create a new patient. The provided patient must have the encryption metadata initialized.
86
+ * @param patient a patient with initialized encryption metadata
87
+ * @return the created patient with updated revision.
88
+ * @throws IllegalArgumentException if the encryption metadata of the input wasn't initialized.
89
+ */
15
90
  createPatient(patient: E): Promise<E>;
91
+ /**
92
+ *
93
+ * Bulk version of [createPatient], returns all the successfully created patients.
94
+ * If a patient couldn't be created (for example because there is already a patient with the same id) it will be
95
+ * excluded from the result.
96
+ */
16
97
  createPatients(patients: Array<E>): Promise<Array<E>>;
98
+ /**
99
+ *
100
+ * Restores a patient that was marked as deleted.
101
+ * @param patient the patient to undelete
102
+ * @return the restored patient.
103
+ * @throws RevisionConflictException if the provided patient doesn't match the latest known revision
104
+ */
17
105
  undeletePatient(patient: Patient): Promise<Patient>;
106
+ /**
107
+ *
108
+ * Restores a batch of patients that were marked as deleted.
109
+ * @param patients the patients to restore.
110
+ * @return the restored patients. If some entities couldn't be restored (because the user does not have access or the revision is not
111
+ * up-to-date), then those entities will not be restored and will not appear in this list.
112
+ */
18
113
  undeletePatients(patients: Array<Patient>): Promise<Array<E>>;
114
+ /**
115
+ *
116
+ * Modifies a patient. You need to have write access to the entity.
117
+ * Flavoured method.
118
+ * @param entity a patient with update content
119
+ * @return the patient updated with the provided content and a new revision.
120
+ */
19
121
  modifyPatient(entity: E): Promise<E>;
122
+ /**
123
+ *
124
+ * Restores a patient that was marked as deleted.
125
+ * @param id the id of the entity
126
+ * @param rev the latest revision of the entity.
127
+ * @return the restored entity.
128
+ * @throws RevisionConflictException if the provided revision doesn't match the latest known revision
129
+ */
20
130
  undeletePatientById(id: string, rev: string): Promise<E>;
131
+ /**
132
+ *
133
+ * Restores one or more patients that were marked as deleted.
134
+ * Ignores any entities that the current user is not allowed to restore or that have a revision different from the
135
+ * provided revision.
136
+ * @param ids the ids and revisions of the patients to restore
137
+ * @return the restored entities.
138
+ */
21
139
  undeletePatientsByIds(ids: Array<StoredDocumentIdentifier>): Promise<Array<E>>;
140
+ /**
141
+ *
142
+ * Get a patient by its id. You must have read access to the entity. Fails if the id does not correspond to any
143
+ * entity, corresponds to an entity that is not a patient, or corresponds to an entity for which you don't have
144
+ * read access.
145
+ * Flavoured method.
146
+ * @param entityId a patient id.
147
+ * @return the patient with id [entityId].
148
+ */
22
149
  getPatient(entityId: string): Promise<E | undefined>;
150
+ /**
151
+ *
152
+ * Get the patient with the provided id and follows the chain of patient merges indicated by the
153
+ * [Patient.mergeToPatientId] field until a patient that was not merged into another patient is reached, then that
154
+ * patient is returned.
155
+ * You can optionally limit the maximum depth of merges this method will go through by providing a [maxMergeDepth]
156
+ * parameter. This parameter limits the amount of links that will be resolved: if by the time the [maxMergeDepth] is
157
+ * reached the end of the merge chain is not yet reached this method will throw an exception.
158
+ * @param patientId the id of a patient
159
+ * @param maxMergeDepth a number greater than 0 or null if you don't want to limit the merge depth
160
+ * @return the patient at the end of the merge chain
161
+ * @throws IllegalArgumentException if maxMergeLevel is less than 1, or if the max merge level has been reached but
162
+ * the end of the merge chain was not yet reached.
163
+ */
23
164
  getPatientResolvingMerges(patientId: string, maxMergeDepth: number | undefined): Promise<E>;
165
+ /**
166
+ *
167
+ * Get multiple patients by their ids. Ignores all ids that do not correspond to an entity, correspond to
168
+ * an entity that is not a patient, or correspond to an entity for which you don't have read access.
169
+ * Flavoured method.
170
+ * @param patientIds a list of patients ids
171
+ * @return all patients that you can access with one of the provided ids.
172
+ */
24
173
  getPatients(patientIds: Array<string>): Promise<Array<E>>;
174
+ /**
175
+ *
176
+ * Bulk version of [modifyPatient], returns all the successfully updated patients.
177
+ * If a patient couldn't be updated (for example because of a revision mismatch) it will be excluded from the
178
+ * result.
179
+ */
25
180
  modifyPatients(patients: Array<E>): Promise<Array<E>>;
181
+ /**
182
+ *
183
+ * Merge two patients into one. This method performs the following operations:
184
+ * - The `from` patient will be soft-deleted, and it will point to the `into` patient. Only the `deletionDate` and `mergeToPatientId` fields of the
185
+ * patient will be changed (automatically by this method). Note that the value of [from] is only used to verify that the client is aware of
186
+ * the last version of the `from` patient: any changes to its content and/or metadata compared to what is actually stored in the database will be
187
+ * ignored.
188
+ * - The metadata of the `into` patient will be automatically updated to contain also the metadata of the `from` patient and to keep track of the
189
+ * merge:
190
+ * - the `mergedIds` will be updated to contain the `from` patient id
191
+ * - all secret ids of the `from` patient will be added to the `into` patient
192
+ * - all data owners (including anonymous data owners) with access to the `from` patient will have the same access to the merged `into` patient
193
+ * (unless they already had greater access to the `into` patient, in which case they keep the greater access)
194
+ * - The content of the `into` patient will be updated to match the content (name, address, note, ...) of the provided [mergedInto] parameter.
195
+ * Note that since the metadata is automatically updated by this method you must not change the metadata of the `mergedInto` patient
196
+ * (`delegations`, mergedInto`, ...): if there is any change between the metadata of the provided `mergedInto` patient and the stored patient this
197
+ * method will fail.
198
+ *
199
+ * In case the revisions of [from] and/or [mergedInto] does not match the latest revisions for these patients in the database this
200
+ * method will fail without soft-deleting the `from` patient and without updating the `into` patient with the merged content and metadata. You will
201
+ * have to retrieve the updated versions of both patients before retrying the merge.
202
+ *
203
+ * Finally, note that this method only merges existing data, and does not perform any automatic sharing of the data. The secret ids and encryption
204
+ * keys will not be shared with users that had access only to one of the entity, you will have to use a share method after the merge
205
+ * if you want to do so.
206
+ * For example consider hcps A, B with access to P' and hcps A, C with access to P'', and we merge P'' into P'. After the merge:
207
+ * - A has access to all secret ids of the merged patient and to the encryption key of the merged patient
208
+ * - B has access to the encryption key of the merged patient (since it is the same as in P'), but only to the secret id which was originally from
209
+ * the unmerged P'
210
+ * - C has no access to the encryption key of the merged patient, and has access only to the secret id which was originally from the unmerged P''
211
+ *
212
+ * Note that the user performing this operation must have write access to both patients.
213
+ *
214
+ * @param from the original, unmodified `from` patient. Its content will be unchanged and its metadata will be automatically updated by this method
215
+ * to reflect the merge.
216
+ * @param mergedInto the `into` patient with updated content result of the merge with the `from` patient, as specified by your application logic.
217
+ * The metadata of the `mergedInto` patient must not differ from the metadata of the stored version of the patient, since it will be automatically
218
+ * updated by the method.
219
+ * @return the updated `into` patient.
220
+ */
26
221
  mergePatients(from: Patient, mergedInto: E): Promise<E>;
27
222
  }