@icure/cardinal-sdk 2.14.0 → 2.15.0

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 (60) hide show
  1. package/api/AccessLogApi.d.mts +11 -0
  2. package/api/AccessLogBasicApi.d.mts +11 -0
  3. package/api/AccessLogBasicInGroupApi.d.mts +6 -0
  4. package/api/AccessLogInGroupApi.d.mts +33 -1
  5. package/api/AuthApi.d.mts +11 -0
  6. package/api/CalendarItemApi.d.mts +11 -0
  7. package/api/CalendarItemBasicApi.d.mts +11 -0
  8. package/api/CalendarItemBasicInGroupApi.d.mts +6 -0
  9. package/api/CalendarItemInGroupApi.d.mts +6 -0
  10. package/api/ContactApi.d.mts +22 -0
  11. package/api/ContactBasicApi.d.mts +22 -0
  12. package/api/ContactBasicInGroupApi.d.mts +11 -0
  13. package/api/ContactInGroupApi.d.mts +11 -0
  14. package/api/DocumentApi.d.mts +11 -0
  15. package/api/DocumentBasicApi.d.mts +11 -0
  16. package/api/DocumentBasicInGroupApi.d.mts +6 -0
  17. package/api/DocumentInGroupApi.d.mts +6 -0
  18. package/api/FormApi.d.mts +11 -0
  19. package/api/FormBasicApi.d.mts +11 -0
  20. package/api/FormBasicInGroupApi.d.mts +6 -0
  21. package/api/FormInGroupApi.d.mts +6 -0
  22. package/api/HealthElementApi.d.mts +11 -0
  23. package/api/HealthElementBasicApi.d.mts +11 -0
  24. package/api/HealthElementBasicInGroupApi.d.mts +6 -0
  25. package/api/HealthElementInGroupApi.d.mts +6 -0
  26. package/api/InvoiceApi.d.mts +11 -0
  27. package/api/InvoiceBasicApi.d.mts +11 -0
  28. package/api/InvoiceBasicInGroupApi.d.mts +6 -0
  29. package/api/InvoiceInGroupApi.d.mts +6 -0
  30. package/api/MessageApi.d.mts +11 -0
  31. package/api/MessageBasicApi.d.mts +11 -0
  32. package/api/MessageBasicInGroupApi.d.mts +6 -0
  33. package/api/MessageInGroupApi.d.mts +6 -0
  34. package/api/ReceiptApi.d.mts +11 -0
  35. package/api/ReceiptBasicApi.d.mts +11 -0
  36. package/api/ReceiptBasicInGroupApi.d.mts +6 -0
  37. package/api/ReceiptInGroupApi.d.mts +6 -0
  38. package/api/RelatedPersonApi.d.mts +11 -0
  39. package/api/RelatedPersonBasicApi.d.mts +11 -0
  40. package/api/RelatedPersonBasicInGroupApi.d.mts +6 -0
  41. package/api/RelatedPersonInGroupApi.d.mts +6 -0
  42. package/api/TopicApi.d.mts +11 -0
  43. package/api/TopicBasicApi.d.mts +11 -0
  44. package/api/TopicBasicInGroupApi.d.mts +6 -0
  45. package/api/TopicInGroupApi.d.mts +6 -0
  46. package/api/UserApi.d.mts +32 -0
  47. package/cardinal-sdk-ts.mjs +47773 -43898
  48. package/cardinal-sdk.mjs +78037 -76803
  49. package/kotlin-kotlin-stdlib.mjs +30 -30
  50. package/kotlinx-coroutines-core.mjs +3 -3
  51. package/ktor-ktor-utils.mjs +2 -2
  52. package/model/base/CryptoActor.mjs +4 -4
  53. package/model/embed/form/template/Field.d.mts +1 -1
  54. package/model/embed/form/template/StructureElement.d.mts +1 -1
  55. package/model/embed/form/template/StructureElement.mjs +8 -8
  56. package/model/filter/predicate/Predicate.d.mts +1 -1
  57. package/model/filter/predicate/Predicate.mjs +2 -2
  58. package/options/AuthenticationMethod.d.mts +17 -1
  59. package/options/AuthenticationMethod.mjs +15 -0
  60. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { EncryptedInvoice, Invoice } from '../model/Invoice.mjs';
2
3
  import { PaginatedList } from '../model/PaginatedList.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -84,6 +85,16 @@ export interface InvoiceBasicApi {
84
85
  * @return the occurrences for each invoicing code that is used at least [minOccurrence] times.
85
86
  */
86
87
  getTarificationsCodesOccurrences(minOccurrence: number): Promise<Array<LabelledOccurence>>;
88
+ /**
89
+ *
90
+ * Get all data owners with access to the provided invoice, attempting to identify any unknown anonymous data owners
91
+ * using delegations de-anonymization metadata.
92
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
93
+ * anonymous data owners and the behaviour of basic apis.
94
+ * @param invoice an invoice
95
+ * @return information on users with access to the provided invoice
96
+ */
97
+ getDataOwnersWithAccessTo(invoice: Invoice): Promise<EntityAccessInformation>;
87
98
  /**
88
99
  *
89
100
  * Create a new invoice. The provided invoice must have the encryption metadata initialized.
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { GroupScoped } from '../model/GroupScoped.mjs';
2
3
  import { EncryptedInvoice, Invoice } from '../model/Invoice.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -42,6 +43,11 @@ export interface InvoiceBasicInGroupApi {
42
43
  * In-group version of [InvoiceBasicFlavourlessApi.purgeInvoices]
43
44
  */
44
45
  purgeInvoices(invoices: Array<GroupScoped<Invoice>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
46
+ /**
47
+ *
48
+ * In-group version of [InvoiceBasicFlavourlessApi.getDataOwnersWithAccessTo].
49
+ */
50
+ getDataOwnersWithAccessTo(invoice: GroupScoped<Invoice>): Promise<EntityAccessInformation>;
45
51
  /**
46
52
  *
47
53
  * In-group version of [InvoiceApi.createInvoice]
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { InvoiceDelegateOptions } from '../crypto/entities/InvoiceDelegateOptions.mjs';
2
3
  import { InvoiceShareOptions } from '../crypto/entities/InvoiceShareOptions.mjs';
3
4
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
@@ -109,6 +110,11 @@ export interface InvoiceInGroupApi {
109
110
  * In-group version of [InvoiceBasicFlavourlessApi.purgeInvoices]
110
111
  */
111
112
  purgeInvoices(invoices: Array<GroupScoped<Invoice>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
113
+ /**
114
+ *
115
+ * In-group version of [InvoiceBasicFlavourlessApi.getDataOwnersWithAccessTo].
116
+ */
117
+ getDataOwnersWithAccessTo(invoice: GroupScoped<Invoice>): Promise<EntityAccessInformation>;
112
118
  /**
113
119
  *
114
120
  * In-group version of [InvoiceFlavouredApi.shareWith]
@@ -1,4 +1,5 @@
1
1
  import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { MessageDelegateOptions } from '../crypto/entities/MessageDelegateOptions.mjs';
3
4
  import { MessageShareOptions } from '../crypto/entities/MessageShareOptions.mjs';
4
5
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
@@ -249,6 +250,16 @@ export interface MessageApi {
249
250
  * because you had no write access to them) they will not be included in this list.
250
251
  */
251
252
  purgeMessages(messages: Array<Message>): Promise<Array<StoredDocumentIdentifier>>;
253
+ /**
254
+ *
255
+ * Get all data owners with access to the provided message, attempting to identify any unknown anonymous data owners
256
+ * using delegations de-anonymization metadata.
257
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
258
+ * anonymous data owners and the behaviour of basic apis.
259
+ * @param message a message
260
+ * @return information on users with access to the provided message
261
+ */
262
+ getDataOwnersWithAccessTo(message: Message): Promise<EntityAccessInformation>;
252
263
  /**
253
264
  *
254
265
  * Share a message with another data owner. The Message must already exist in the database for this method to
@@ -1,4 +1,5 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { EncryptedMessage, Message } from '../model/Message.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
4
5
  import { EntitySubscription } from '../subscription/EntitySubscription.mjs';
@@ -122,6 +123,16 @@ export interface MessageBasicApi {
122
123
  * because you had no write access to them) they will not be included in this list.
123
124
  */
124
125
  purgeMessages(messages: Array<Message>): Promise<Array<StoredDocumentIdentifier>>;
126
+ /**
127
+ *
128
+ * Get all data owners with access to the provided message, attempting to identify any unknown anonymous data owners
129
+ * using delegations de-anonymization metadata.
130
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
131
+ * anonymous data owners and the behaviour of basic apis.
132
+ * @param message a message
133
+ * @return information on users with access to the provided message
134
+ */
135
+ getDataOwnersWithAccessTo(message: Message): Promise<EntityAccessInformation>;
125
136
  /**
126
137
  *
127
138
  * Create a new Message. The provided Message must have the encryption metadata initialized. This method requires
@@ -1,4 +1,5 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { GroupScoped } from '../model/GroupScoped.mjs';
3
4
  import { EncryptedMessage, Message } from '../model/Message.mjs';
4
5
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -63,6 +64,11 @@ export interface MessageBasicInGroupApi {
63
64
  * In-group version of [MessageBasicFlavourlessApi.purgeMessages]
64
65
  */
65
66
  purgeMessages(messages: Array<GroupScoped<Message>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
67
+ /**
68
+ *
69
+ * In-group version of [MessageBasicFlavourlessApi.getDataOwnersWithAccessTo].
70
+ */
71
+ getDataOwnersWithAccessTo(message: GroupScoped<Message>): Promise<EntityAccessInformation>;
66
72
  /**
67
73
  *
68
74
  * In-group version of [MessageApi.createMessage]
@@ -1,4 +1,5 @@
1
1
  import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { MessageDelegateOptions } from '../crypto/entities/MessageDelegateOptions.mjs';
3
4
  import { MessageShareOptions } from '../crypto/entities/MessageShareOptions.mjs';
4
5
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
@@ -120,6 +121,11 @@ export interface MessageInGroupApi {
120
121
  * In-group version of [MessageBasicFlavourlessApi.purgeMessages]
121
122
  */
122
123
  purgeMessages(messages: Array<GroupScoped<Message>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
124
+ /**
125
+ *
126
+ * In-group version of [MessageBasicFlavourlessApi.getDataOwnersWithAccessTo].
127
+ */
128
+ getDataOwnersWithAccessTo(message: GroupScoped<Message>): Promise<EntityAccessInformation>;
123
129
  /**
124
130
  *
125
131
  * In-group version of [MessageFlavouredApi.shareWith]
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { ReceiptDelegateOptions } from '../crypto/entities/ReceiptDelegateOptions.mjs';
2
3
  import { ReceiptShareOptions } from '../crypto/entities/ReceiptShareOptions.mjs';
3
4
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
@@ -105,6 +106,16 @@ export interface ReceiptApi {
105
106
  purgeReceipts(receipts: Array<Receipt>): Promise<Array<StoredDocumentIdentifier>>;
106
107
  getRawReceiptAttachment(receiptId: string, attachmentId: string): Promise<Int8Array>;
107
108
  setRawReceiptAttachment(receiptId: string, rev: string, blobType: string, attachment: Int8Array): Promise<EncryptedReceipt>;
109
+ /**
110
+ *
111
+ * Get all data owners with access to the provided receipt, attempting to identify any unknown anonymous data owners
112
+ * using delegations de-anonymization metadata.
113
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
114
+ * anonymous data owners and the behaviour of basic apis.
115
+ * @param receipt a receipt
116
+ * @return information on users with access to the provided receipt
117
+ */
118
+ getDataOwnersWithAccessTo(receipt: Receipt): Promise<EntityAccessInformation>;
108
119
  shareWith(delegateId: string, receipt: DecryptedReceipt, options?: {
109
120
  options?: ReceiptShareOptions | undefined;
110
121
  }): Promise<DecryptedReceipt>;
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { EncryptedReceipt, Receipt } from '../model/Receipt.mjs';
2
3
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
3
4
  import { ReceiptBasicInGroupApi } from './ReceiptBasicInGroupApi.mjs';
@@ -70,6 +71,16 @@ export interface ReceiptBasicApi {
70
71
  purgeReceipts(receipts: Array<Receipt>): Promise<Array<StoredDocumentIdentifier>>;
71
72
  getRawReceiptAttachment(receiptId: string, attachmentId: string): Promise<Int8Array>;
72
73
  setRawReceiptAttachment(receiptId: string, rev: string, blobType: string, attachment: Int8Array): Promise<EncryptedReceipt>;
74
+ /**
75
+ *
76
+ * Get all data owners with access to the provided receipt, attempting to identify any unknown anonymous data owners
77
+ * using delegations de-anonymization metadata.
78
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
79
+ * anonymous data owners and the behaviour of basic apis.
80
+ * @param receipt a receipt
81
+ * @return information on users with access to the provided receipt
82
+ */
83
+ getDataOwnersWithAccessTo(receipt: Receipt): Promise<EntityAccessInformation>;
73
84
  /**
74
85
  *
75
86
  * Create a new receipt. The provided receipt must have the encryption metadata initialized.
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { GroupScoped } from '../model/GroupScoped.mjs';
2
3
  import { EncryptedReceipt, Receipt } from '../model/Receipt.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -47,6 +48,11 @@ export interface ReceiptBasicInGroupApi {
47
48
  * In-group version of [ReceiptBasicFlavourlessApi.getRawReceiptAttachment]
48
49
  */
49
50
  getRawReceiptAttachment(groupId: string, receiptId: string, attachmentId: string): Promise<Int8Array>;
51
+ /**
52
+ *
53
+ * In-group version of [ReceiptBasicFlavourlessApi.getDataOwnersWithAccessTo].
54
+ */
55
+ getDataOwnersWithAccessTo(receipt: GroupScoped<Receipt>): Promise<EntityAccessInformation>;
50
56
  /**
51
57
  *
52
58
  * In-group version of [ReceiptApi.createReceipt]
@@ -1,3 +1,4 @@
1
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
1
2
  import { ReceiptDelegateOptions } from '../crypto/entities/ReceiptDelegateOptions.mjs';
2
3
  import { ReceiptShareOptions } from '../crypto/entities/ReceiptShareOptions.mjs';
3
4
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
@@ -112,6 +113,11 @@ export interface ReceiptInGroupApi {
112
113
  * In-group version of [ReceiptBasicFlavourlessApi.getRawReceiptAttachment]
113
114
  */
114
115
  getRawReceiptAttachment(groupId: string, receiptId: string, attachmentId: string): Promise<Int8Array>;
116
+ /**
117
+ *
118
+ * In-group version of [ReceiptBasicFlavourlessApi.getDataOwnersWithAccessTo].
119
+ */
120
+ getDataOwnersWithAccessTo(receipt: GroupScoped<Receipt>): Promise<EntityAccessInformation>;
115
121
  /**
116
122
  *
117
123
  * In-group version of [ReceiptFlavouredApi.shareWith]
@@ -1,4 +1,5 @@
1
1
  import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { RelatedPersonDelegateOptions } from '../crypto/entities/RelatedPersonDelegateOptions.mjs';
3
4
  import { RelatedPersonShareOptions } from '../crypto/entities/RelatedPersonShareOptions.mjs';
4
5
  import { DecryptedRelatedPerson, EncryptedRelatedPerson, RelatedPerson } from '../model/RelatedPerson.mjs';
@@ -220,6 +221,16 @@ export interface RelatedPersonApi {
220
221
  * because you had no write access to them) they will not be included in this list.
221
222
  */
222
223
  purgeRelatedPersons(relatedPersons: Array<RelatedPerson>): Promise<Array<StoredDocumentIdentifier>>;
224
+ /**
225
+ *
226
+ * Get all data owners with access to the provided related person, attempting to identify any unknown anonymous data owners
227
+ * using delegations de-anonymization metadata.
228
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
229
+ * anonymous data owners and the behaviour of basic apis.
230
+ * @param relatedPerson a related person
231
+ * @return information on users with access to the provided related person
232
+ */
233
+ getDataOwnersWithAccessTo(relatedPerson: RelatedPerson): Promise<EntityAccessInformation>;
223
234
  /**
224
235
  *
225
236
  * Share a related person with another data owner. The related person must already exist in the database for this method to
@@ -1,4 +1,5 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { EncryptedRelatedPerson, RelatedPerson } from '../model/RelatedPerson.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
4
5
  import { RelatedPersonBasicInGroupApi } from './RelatedPersonBasicInGroupApi.mjs';
@@ -119,6 +120,16 @@ export interface RelatedPersonBasicApi {
119
120
  * because you had no write access to them) they will not be included in this list.
120
121
  */
121
122
  purgeRelatedPersons(relatedPersons: Array<RelatedPerson>): Promise<Array<StoredDocumentIdentifier>>;
123
+ /**
124
+ *
125
+ * Get all data owners with access to the provided related person, attempting to identify any unknown anonymous data owners
126
+ * using delegations de-anonymization metadata.
127
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
128
+ * anonymous data owners and the behaviour of basic apis.
129
+ * @param relatedPerson a related person
130
+ * @return information on users with access to the provided related person
131
+ */
132
+ getDataOwnersWithAccessTo(relatedPerson: RelatedPerson): Promise<EntityAccessInformation>;
122
133
  /**
123
134
  *
124
135
  * Create a new related person. The provided related person must have the encryption metadata initialized.
@@ -1,4 +1,5 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { GroupScoped } from '../model/GroupScoped.mjs';
3
4
  import { EncryptedRelatedPerson, RelatedPerson } from '../model/RelatedPerson.mjs';
4
5
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -63,6 +64,11 @@ export interface RelatedPersonBasicInGroupApi {
63
64
  * In-group version of [RelatedPersonBasicFlavourlessApi.purgeRelatedPersons]
64
65
  */
65
66
  purgeRelatedPersons(relatedPersons: Array<GroupScoped<RelatedPerson>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
67
+ /**
68
+ *
69
+ * In-group version of [RelatedPersonBasicFlavourlessApi.getDataOwnersWithAccessTo].
70
+ */
71
+ getDataOwnersWithAccessTo(relatedPerson: GroupScoped<RelatedPerson>): Promise<EntityAccessInformation>;
66
72
  /**
67
73
  *
68
74
  * In-group version of [RelatedPersonBasicFlavouredApi.createRelatedPerson]
@@ -1,4 +1,5 @@
1
1
  import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { RelatedPersonDelegateOptions } from '../crypto/entities/RelatedPersonDelegateOptions.mjs';
3
4
  import { RelatedPersonShareOptions } from '../crypto/entities/RelatedPersonShareOptions.mjs';
4
5
  import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs';
@@ -121,6 +122,11 @@ export interface RelatedPersonInGroupApi {
121
122
  * In-group version of [RelatedPersonBasicFlavourlessApi.purgeRelatedPersons]
122
123
  */
123
124
  purgeRelatedPersons(relatedPersons: Array<GroupScoped<RelatedPerson>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
125
+ /**
126
+ *
127
+ * In-group version of [RelatedPersonBasicFlavourlessApi.getDataOwnersWithAccessTo].
128
+ */
129
+ getDataOwnersWithAccessTo(relatedPerson: GroupScoped<RelatedPerson>): Promise<EntityAccessInformation>;
124
130
  /**
125
131
  *
126
132
  * In-group version of [RelatedPersonFlavouredApi.shareWith]
@@ -1,4 +1,5 @@
1
1
  import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
3
4
  import { TopicDelegateOptions } from '../crypto/entities/TopicDelegateOptions.mjs';
4
5
  import { TopicShareOptions } from '../crypto/entities/TopicShareOptions.mjs';
@@ -230,6 +231,16 @@ export interface TopicApi {
230
231
  * because you had no write access to them) they will not be included in this list.
231
232
  */
232
233
  purgeTopics(topics: Array<Topic>): Promise<Array<StoredDocumentIdentifier>>;
234
+ /**
235
+ *
236
+ * Get all data owners with access to the provided topic, attempting to identify any unknown anonymous data owners
237
+ * using delegations de-anonymization metadata.
238
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
239
+ * anonymous data owners and the behaviour of basic apis.
240
+ * @param topic a topic
241
+ * @return information on users with access to the provided topic
242
+ */
243
+ getDataOwnersWithAccessTo(topic: Topic): Promise<EntityAccessInformation>;
233
244
  /**
234
245
  *
235
246
  * Share a topic with another data owner. The topic must already exist in the database for this method to
@@ -1,4 +1,5 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
3
4
  import { EncryptedTopic, Topic } from '../model/Topic.mjs';
4
5
  import { TopicRole } from '../model/TopicRole.mjs';
@@ -123,6 +124,16 @@ export interface TopicBasicApi {
123
124
  * because you had no write access to them) they will not be included in this list.
124
125
  */
125
126
  purgeTopics(topics: Array<Topic>): Promise<Array<StoredDocumentIdentifier>>;
127
+ /**
128
+ *
129
+ * Get all data owners with access to the provided topic, attempting to identify any unknown anonymous data owners
130
+ * using delegations de-anonymization metadata.
131
+ * See [com.icure.cardinal.sdk.crypto.EntityAccessInformationProvider.getDataOwnersWithAccessTo] for the semantics of
132
+ * anonymous data owners and the behaviour of basic apis.
133
+ * @param topic a topic
134
+ * @return information on users with access to the provided topic
135
+ */
136
+ getDataOwnersWithAccessTo(topic: Topic): Promise<EntityAccessInformation>;
126
137
  /**
127
138
  *
128
139
  * Create a new topic. The provided topic must have the encryption metadata initialized.
@@ -1,4 +1,5 @@
1
1
  import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { GroupScoped } from '../model/GroupScoped.mjs';
3
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
4
5
  import { EncryptedTopic, Topic } from '../model/Topic.mjs';
@@ -63,6 +64,11 @@ export interface TopicBasicInGroupApi {
63
64
  * In-group version of [TopicBasicFlavourlessApi.purgeTopics]
64
65
  */
65
66
  purgeTopics(topics: Array<GroupScoped<Topic>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
67
+ /**
68
+ *
69
+ * In-group version of [TopicBasicFlavourlessApi.getDataOwnersWithAccessTo].
70
+ */
71
+ getDataOwnersWithAccessTo(topic: GroupScoped<Topic>): Promise<EntityAccessInformation>;
66
72
  /**
67
73
  *
68
74
  * In-group version of [TopicBasicFlavouredApi.createTopic]
@@ -1,4 +1,5 @@
1
1
  import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { EntityAccessInformation } from '../crypto/entities/EntityAccessInformation.mjs';
2
3
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
3
4
  import { TopicDelegateOptions } from '../crypto/entities/TopicDelegateOptions.mjs';
4
5
  import { TopicShareOptions } from '../crypto/entities/TopicShareOptions.mjs';
@@ -119,6 +120,11 @@ export interface TopicInGroupApi {
119
120
  * In-group version of [TopicBasicFlavourlessApi.purgeTopics]
120
121
  */
121
122
  purgeTopics(topics: Array<GroupScoped<Topic>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
123
+ /**
124
+ *
125
+ * In-group version of [TopicBasicFlavourlessApi.getDataOwnersWithAccessTo].
126
+ */
127
+ getDataOwnersWithAccessTo(topic: GroupScoped<Topic>): Promise<EntityAccessInformation>;
122
128
  /**
123
129
  *
124
130
  * In-group version of [TopicFlavouredApi.shareWith]
package/api/UserApi.d.mts CHANGED
@@ -27,6 +27,38 @@ export interface UserApi {
27
27
  tokenValidity?: number | undefined;
28
28
  token?: string | undefined;
29
29
  }): Promise<string>;
30
+ /**
31
+ *
32
+ * Revokes an authentication token of a user, by removing the token with the provided [key] from the user.
33
+ * If the user has no token with the provided key, the user is returned unchanged.
34
+ *
35
+ * This method requires the same permissions as other modifications of the user secrets, but since revoking tokens
36
+ * can only reduce access it does not require an elevated security context. This means that a user can revoke
37
+ * their own tokens regardless of how they authenticated, including through a long-lived token (e.g. to log out
38
+ * from a session restored through a "remember me" token).
39
+ *
40
+ * @param userId id of the user owning the token.
41
+ * @param key the key of the token to revoke.
42
+ * @return the updated user.
43
+ */
44
+ deleteToken(userId: string, key: string): Promise<User>;
45
+ /**
46
+ *
47
+ * Revokes all the authentication tokens of a user, by removing them from the user, except for the tokens with a key
48
+ * in [skip].
49
+ *
50
+ * This method requires the same permissions as other modifications of the user secrets, but since revoking tokens
51
+ * can only reduce access it does not require an elevated security context. This means that a user can revoke
52
+ * their own tokens regardless of how they authenticated, including through a long-lived token.
53
+ * This can be used for example to implement a "sign out everywhere" functionality.
54
+ *
55
+ * @param userId id of the user owning the tokens.
56
+ * @param skip keys of the tokens that should not be revoked. If null all tokens will be revoked.
57
+ * @return the updated user.
58
+ */
59
+ deleteAllTokens(userId: string, options?: {
60
+ skip?: Array<string> | undefined;
61
+ }): Promise<User>;
30
62
  filterUsersBy(filter: BaseFilterOptions<User>): Promise<PaginatedListIterator<User>>;
31
63
  matchUsersBy(filter: BaseFilterOptions<User>): Promise<Array<string>>;
32
64
  filterUsersBySorted(filter: BaseSortableFilterOptions<User>): Promise<PaginatedListIterator<User>>;