@icure/cardinal-sdk 2.0.0-PREVIEW-23 → 2.0.0-PREVIEW-24

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 (38) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
  2. package/api/AccessLogApi.d.mts +8 -5
  3. package/api/AccessLogBasicApi.d.mts +6 -4
  4. package/api/AccessLogBasicInGroupApi.d.mts +18 -0
  5. package/api/AccessLogBasicInGroupApi.mjs +1 -0
  6. package/api/AccessLogFlavouredInGroupApi.d.mts +21 -0
  7. package/api/AccessLogFlavouredInGroupApi.mjs +1 -0
  8. package/api/AccessLogInGroupApi.d.mts +41 -0
  9. package/api/AccessLogInGroupApi.mjs +1 -0
  10. package/api.d.mts +3 -0
  11. package/api.mjs +3 -0
  12. package/cardinal-sdk-ts.mjs +34539 -30673
  13. package/cardinal-sdk.mjs +68783 -65167
  14. package/crypto/CryptoStrategies.d.mts +9 -0
  15. package/internal/TaggedType.d.mts +34 -0
  16. package/internal/TaggedType.mjs +1 -0
  17. package/kotlinx-coroutines-core.mjs +7 -1
  18. package/model/specializations/AesExchangeKeyEncryptionKeypairIdentifier.d.mts +2 -1
  19. package/model/specializations/AesExchangeKeyEncryptionKeypairIdentifier.mjs +0 -1
  20. package/model/specializations/AesExchangeKeyEntryKeyString.d.mts +2 -1
  21. package/model/specializations/AesExchangeKeyEntryKeyString.mjs +0 -1
  22. package/model/specializations/AnyPrimitive.d.mts +2 -1
  23. package/model/specializations/AnyPrimitive.mjs +0 -1
  24. package/model/specializations/Base64String.d.mts +2 -1
  25. package/model/specializations/Base64String.mjs +0 -1
  26. package/model/specializations/HexString.d.mts +2 -1
  27. package/model/specializations/HexString.mjs +0 -1
  28. package/model/specializations/KeypairFingerprintV1String.d.mts +2 -1
  29. package/model/specializations/KeypairFingerprintV1String.mjs +0 -1
  30. package/model/specializations/Pkcs8Bytes.d.mts +2 -1
  31. package/model/specializations/Pkcs8Bytes.mjs +0 -1
  32. package/model/specializations/SecureDelegationKeyString.d.mts +2 -1
  33. package/model/specializations/SecureDelegationKeyString.mjs +0 -1
  34. package/model/specializations/SpkiHexString.d.mts +2 -1
  35. package/model/specializations/SpkiHexString.mjs +0 -1
  36. package/options/SdkOptions.d.mts +8 -0
  37. package/package.json +1 -1
  38. package/sdk/CardinalSdk.d.mts +27 -1
@@ -367,7 +367,7 @@ function addFormatStructureForDate(structure) {
367
367
  function addFormatStructureForTime(structure) {
368
368
  this.o3z(structure);
369
369
  }
370
- initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithTime, WithDate]);
370
+ initMetadataForInterface(AbstractWithDateTimeBuilder, 'AbstractWithDateTimeBuilder', VOID, VOID, [AbstractWithDateBuilder, AbstractWithTimeBuilder, WithDate, WithTime]);
371
371
  initMetadataForClass(Builder_0, 'Builder', VOID, VOID, [AbstractDateTimeFormatBuilder, AbstractWithDateTimeBuilder]);
372
372
  initMetadataForClass(LocalDateTimeFormat, 'LocalDateTimeFormat', VOID, AbstractDateTimeFormat);
373
373
  function set_fractionOfSecond(value) {
@@ -2,6 +2,7 @@ import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../
2
2
  import { AccessLogShareOptions } from '../crypto/entities/AccessLogShareOptions.mjs';
3
3
  import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
4
4
  import { AccessLog, DecryptedAccessLog, EncryptedAccessLog } from '../model/AccessLog.mjs';
5
+ import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs';
5
6
  import { PaginatedList } from '../model/PaginatedList.mjs';
6
7
  import { Patient } from '../model/Patient.mjs';
7
8
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
@@ -10,9 +11,11 @@ import { DocIdentifier } from '../model/couchdb/DocIdentifier.mjs';
10
11
  import { AccessLevel } from '../model/embed/AccessLevel.mjs';
11
12
  import { HexString } from '../model/specializations/HexString.mjs';
12
13
  import { AccessLogFlavouredApi } from './AccessLogFlavouredApi.mjs';
14
+ import { AccessLogInGroupApi } from './AccessLogInGroupApi.mjs';
13
15
  export interface AccessLogApi {
14
16
  encrypted: AccessLogFlavouredApi<EncryptedAccessLog>;
15
17
  tryAndRecover: AccessLogFlavouredApi<AccessLog>;
18
+ inGroup: AccessLogInGroupApi;
16
19
  withEncryptionMetadata(base: DecryptedAccessLog | undefined, patient: Patient, options?: {
17
20
  user?: User | undefined;
18
21
  delegates?: {
@@ -23,7 +26,7 @@ export interface AccessLogApi {
23
26
  }): Promise<DecryptedAccessLog>;
24
27
  getEncryptionKeysOf(accessLog: AccessLog): Promise<Array<HexString>>;
25
28
  hasWriteAccess(accessLog: AccessLog): Promise<boolean>;
26
- decryptPatientIdOf(accessLog: AccessLog): Promise<Array<string>>;
29
+ decryptPatientIdOf(accessLog: AccessLog): Promise<Array<EntityReferenceInGroup>>;
27
30
  createDelegationDeAnonymizationMetadata(entity: AccessLog, delegates: Array<string>): Promise<void>;
28
31
  decrypt(accessLog: EncryptedAccessLog): Promise<DecryptedAccessLog>;
29
32
  tryDecrypt(accessLog: EncryptedAccessLog): Promise<AccessLog>;
@@ -31,11 +34,11 @@ export interface AccessLogApi {
31
34
  matchAccessLogsBySorted(filter: SortableFilterOptions<AccessLog>): Promise<Array<string>>;
32
35
  deleteAccessLogUnsafe(entityId: string): Promise<DocIdentifier>;
33
36
  deleteAccessLogsUnsafe(entityIds: Array<string>): Promise<Array<DocIdentifier>>;
34
- deleteAccessLogById(entityId: string, rev: string): Promise<DocIdentifier>;
35
- deleteAccessLogsByIds(entityIds: Array<StoredDocumentIdentifier>): Promise<Array<DocIdentifier>>;
37
+ deleteAccessLogById(entityId: string, rev: string): Promise<StoredDocumentIdentifier>;
38
+ deleteAccessLogsByIds(entityIds: Array<StoredDocumentIdentifier>): Promise<Array<StoredDocumentIdentifier>>;
36
39
  purgeAccessLogById(id: string, rev: string): Promise<void>;
37
- deleteAccessLog(accessLog: AccessLog): Promise<DocIdentifier>;
38
- deleteAccessLogs(accessLogs: Array<AccessLog>): Promise<Array<DocIdentifier>>;
40
+ deleteAccessLog(accessLog: AccessLog): Promise<StoredDocumentIdentifier>;
41
+ deleteAccessLogs(accessLogs: Array<AccessLog>): Promise<Array<StoredDocumentIdentifier>>;
39
42
  purgeAccessLog(accessLog: AccessLog): Promise<void>;
40
43
  shareWith(delegateId: string, accessLog: DecryptedAccessLog, options?: {
41
44
  options?: AccessLogShareOptions | undefined;
@@ -3,18 +3,20 @@ import { AccessLog, EncryptedAccessLog } from '../model/AccessLog.mjs';
3
3
  import { PaginatedList } from '../model/PaginatedList.mjs';
4
4
  import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
5
5
  import { DocIdentifier } from '../model/couchdb/DocIdentifier.mjs';
6
+ import { AccessLogBasicInGroupApi } from './AccessLogBasicInGroupApi.mjs';
6
7
  export interface AccessLogBasicApi {
8
+ inGroup: AccessLogBasicInGroupApi;
7
9
  matchAccessLogsBy(filter: BaseFilterOptions<AccessLog>): Promise<Array<string>>;
8
10
  matchAccessLogsBySorted(filter: BaseSortableFilterOptions<AccessLog>): Promise<Array<string>>;
9
11
  filterAccessLogsBy(filter: BaseFilterOptions<AccessLog>): Promise<PaginatedListIterator<EncryptedAccessLog>>;
10
12
  filterAccessLogsBySorted(filter: BaseSortableFilterOptions<AccessLog>): Promise<PaginatedListIterator<EncryptedAccessLog>>;
11
13
  deleteAccessLogUnsafe(entityId: string): Promise<DocIdentifier>;
12
14
  deleteAccessLogsUnsafe(entityIds: Array<string>): Promise<Array<DocIdentifier>>;
13
- deleteAccessLogById(entityId: string, rev: string): Promise<DocIdentifier>;
14
- deleteAccessLogsByIds(entityIds: Array<StoredDocumentIdentifier>): Promise<Array<DocIdentifier>>;
15
+ deleteAccessLogById(entityId: string, rev: string): Promise<StoredDocumentIdentifier>;
16
+ deleteAccessLogsByIds(entityIds: Array<StoredDocumentIdentifier>): Promise<Array<StoredDocumentIdentifier>>;
15
17
  purgeAccessLogById(id: string, rev: string): Promise<void>;
16
- deleteAccessLog(accessLog: AccessLog): Promise<DocIdentifier>;
17
- deleteAccessLogs(accessLogs: Array<AccessLog>): Promise<Array<DocIdentifier>>;
18
+ deleteAccessLog(accessLog: AccessLog): Promise<StoredDocumentIdentifier>;
19
+ deleteAccessLogs(accessLogs: Array<AccessLog>): Promise<Array<StoredDocumentIdentifier>>;
18
20
  purgeAccessLog(accessLog: AccessLog): Promise<void>;
19
21
  createAccessLog(entity: EncryptedAccessLog): Promise<EncryptedAccessLog>;
20
22
  undeleteAccessLogById(id: string, rev: string): Promise<EncryptedAccessLog>;
@@ -0,0 +1,18 @@
1
+ import { BaseFilterOptions, BaseSortableFilterOptions, PaginatedListIterator } from '../cardinal-sdk-ts.mjs';
2
+ import { AccessLog, EncryptedAccessLog } from '../model/AccessLog.mjs';
3
+ import { GroupScoped } from '../model/GroupScoped.mjs';
4
+ import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
5
+ export interface AccessLogBasicInGroupApi {
6
+ matchAccessLogsBy(groupId: string, filter: BaseFilterOptions<AccessLog>): Promise<Array<string>>;
7
+ matchAccessLogsBySorted(groupId: string, filter: BaseSortableFilterOptions<AccessLog>): Promise<Array<string>>;
8
+ filterAccessLogsBy(groupId: string, filter: BaseFilterOptions<AccessLog>): Promise<PaginatedListIterator<GroupScoped<EncryptedAccessLog>>>;
9
+ filterAccessLogsBySorted(groupId: string, filter: BaseSortableFilterOptions<AccessLog>): Promise<PaginatedListIterator<GroupScoped<EncryptedAccessLog>>>;
10
+ deleteAccessLogById(entityId: GroupScoped<StoredDocumentIdentifier>): Promise<GroupScoped<StoredDocumentIdentifier>>;
11
+ deleteAccessLogsByIds(entityIds: Array<GroupScoped<StoredDocumentIdentifier>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
12
+ deleteAccessLog(accessLog: GroupScoped<AccessLog>): Promise<GroupScoped<StoredDocumentIdentifier>>;
13
+ deleteAccessLogs(accessLogs: Array<GroupScoped<AccessLog>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
14
+ createAccessLog(entity: GroupScoped<EncryptedAccessLog>): Promise<GroupScoped<EncryptedAccessLog>>;
15
+ modifyAccessLog(entity: GroupScoped<EncryptedAccessLog>): Promise<GroupScoped<EncryptedAccessLog>>;
16
+ getAccessLog(groupId: string, entityId: string): Promise<GroupScoped<EncryptedAccessLog> | undefined>;
17
+ getAccessLogs(groupId: string, entityIds: Array<string>): Promise<Array<GroupScoped<EncryptedAccessLog>>>;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import { FilterOptions, PaginatedListIterator, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { AccessLogShareOptions } from '../crypto/entities/AccessLogShareOptions.mjs';
3
+ import { AccessLog } from '../model/AccessLog.mjs';
4
+ import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs';
5
+ import { GroupScoped } from '../model/GroupScoped.mjs';
6
+ import { ArrayWithUniqueKeys } from '../utils/ArrayWithUniqueKeys.mjs';
7
+ export interface AccessLogFlavouredInGroupApi<E extends AccessLog> {
8
+ shareWith(delegate: EntityReferenceInGroup, accessLog: GroupScoped<E>, options?: {
9
+ options?: AccessLogShareOptions | undefined;
10
+ }): Promise<GroupScoped<E>>;
11
+ shareWithMany(accessLog: GroupScoped<E>, delegates: ArrayWithUniqueKeys<{
12
+ delegate: EntityReferenceInGroup;
13
+ shareOptions: AccessLogShareOptions;
14
+ }, 'delegate'>): Promise<GroupScoped<E>>;
15
+ filterAccessLogsBy(groupId: string, filter: FilterOptions<AccessLog>): Promise<PaginatedListIterator<GroupScoped<E>>>;
16
+ filterAccessLogsBySorted(groupId: string, filter: SortableFilterOptions<AccessLog>): Promise<PaginatedListIterator<GroupScoped<E>>>;
17
+ createAccessLog(entity: GroupScoped<E>): Promise<GroupScoped<E>>;
18
+ modifyAccessLog(entity: GroupScoped<E>): Promise<GroupScoped<E>>;
19
+ getAccessLog(groupId: string, entityId: string): Promise<GroupScoped<E> | undefined>;
20
+ getAccessLogs(groupId: string, entityIds: Array<string>): Promise<Array<GroupScoped<E>>>;
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ import { FilterOptions, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { SecretIdUseOption } from '../crypto/entities/SecretIdUseOption.mjs';
3
+ import { AccessLog, DecryptedAccessLog, EncryptedAccessLog } from '../model/AccessLog.mjs';
4
+ import { EntityReferenceInGroup } from '../model/EntityReferenceInGroup.mjs';
5
+ import { GroupScoped } from '../model/GroupScoped.mjs';
6
+ import { Patient } from '../model/Patient.mjs';
7
+ import { StoredDocumentIdentifier } from '../model/StoredDocumentIdentifier.mjs';
8
+ import { User } from '../model/User.mjs';
9
+ import { AccessLevel } from '../model/embed/AccessLevel.mjs';
10
+ import { HexString } from '../model/specializations/HexString.mjs';
11
+ import { ArrayWithUniqueKeys } from '../utils/ArrayWithUniqueKeys.mjs';
12
+ import { AccessLogFlavouredInGroupApi } from './AccessLogFlavouredInGroupApi.mjs';
13
+ export interface AccessLogInGroupApi {
14
+ encrypted: AccessLogFlavouredInGroupApi<EncryptedAccessLog>;
15
+ tryAndRecover: AccessLogFlavouredInGroupApi<AccessLog>;
16
+ withEncryptionMetadata(entityGroupId: string, base: DecryptedAccessLog | undefined, patient: GroupScoped<Patient>, options?: {
17
+ user?: User | undefined;
18
+ delegates?: ArrayWithUniqueKeys<{
19
+ delegate: EntityReferenceInGroup;
20
+ accessLevel: AccessLevel;
21
+ }, 'delegate'>;
22
+ secretId?: SecretIdUseOption;
23
+ alternateRootDelegateReference?: EntityReferenceInGroup | undefined;
24
+ }): Promise<GroupScoped<DecryptedAccessLog>>;
25
+ getEncryptionKeysOf(accessLog: GroupScoped<AccessLog>): Promise<Array<HexString>>;
26
+ hasWriteAccess(accessLog: GroupScoped<AccessLog>): Promise<boolean>;
27
+ decryptPatientIdOf(accessLog: GroupScoped<AccessLog>): Promise<Array<EntityReferenceInGroup>>;
28
+ createDelegationDeAnonymizationMetadata(entity: GroupScoped<AccessLog>, delegates: Array<EntityReferenceInGroup>): Promise<void>;
29
+ decrypt(accessLogs: Array<GroupScoped<EncryptedAccessLog>>): Promise<Array<GroupScoped<DecryptedAccessLog>>>;
30
+ tryDecrypt(accessLogs: Array<GroupScoped<EncryptedAccessLog>>): Promise<Array<GroupScoped<AccessLog>>>;
31
+ matchAccessLogsBy(groupId: string, filter: FilterOptions<AccessLog>): Promise<Array<string>>;
32
+ matchAccessLogsBySorted(groupId: string, filter: SortableFilterOptions<AccessLog>): Promise<Array<string>>;
33
+ deleteAccessLogById(entityId: GroupScoped<StoredDocumentIdentifier>): Promise<GroupScoped<StoredDocumentIdentifier>>;
34
+ deleteAccessLogsByIds(entityIds: Array<GroupScoped<StoredDocumentIdentifier>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
35
+ deleteAccessLog(accessLog: GroupScoped<AccessLog>): Promise<GroupScoped<StoredDocumentIdentifier>>;
36
+ deleteAccessLogs(accessLogs: Array<GroupScoped<AccessLog>>): Promise<Array<GroupScoped<StoredDocumentIdentifier>>>;
37
+ createAccessLog(entity: GroupScoped<DecryptedAccessLog>): Promise<GroupScoped<DecryptedAccessLog>>;
38
+ modifyAccessLog(entity: GroupScoped<DecryptedAccessLog>): Promise<GroupScoped<DecryptedAccessLog>>;
39
+ getAccessLog(groupId: string, entityId: string): Promise<GroupScoped<DecryptedAccessLog> | undefined>;
40
+ getAccessLogs(groupId: string, entityIds: Array<string>): Promise<Array<GroupScoped<DecryptedAccessLog>>>;
41
+ }
@@ -0,0 +1 @@
1
+ export {};
package/api.d.mts CHANGED
@@ -8,11 +8,13 @@ export * from './api/HealthElementFlavouredInGroupApi.mjs';
8
8
  export * from './api/PatientApi.mjs';
9
9
  export * from './api/MessageFlavouredApi.mjs';
10
10
  export * from './api/PatientFlavouredApi.mjs';
11
+ export * from './api/AccessLogInGroupApi.mjs';
11
12
  export * from './api/MessageBasicApi.mjs';
12
13
  export * from './api/DocumentTemplateApi.mjs';
13
14
  export * from './api/HealthElementFlavouredApi.mjs';
14
15
  export * from './api/HealthElementBasicApi.mjs';
15
16
  export * from './api/ContactFlavouredApi.mjs';
17
+ export * from './api/AccessLogBasicInGroupApi.mjs';
16
18
  export * from './api/EntityReferenceApi.mjs';
17
19
  export * from './api/CalendarItemInGroupApi.mjs';
18
20
  export * from './api/TopicApi.mjs';
@@ -39,6 +41,7 @@ export * from './api/MaintenanceTaskApi.mjs';
39
41
  export * from './api/AuthApi.mjs';
40
42
  export * from './api/CodeApi.mjs';
41
43
  export * from './api/PatientInGroupApi.mjs';
44
+ export * from './api/AccessLogFlavouredInGroupApi.mjs';
42
45
  export * from './api/PatientBasicInGroupApi.mjs';
43
46
  export * from './api/ReceiptBasicApi.mjs';
44
47
  export * from './api/ClassificationBasicApi.mjs';
package/api.mjs CHANGED
@@ -8,11 +8,13 @@ export * from './api/HealthElementFlavouredInGroupApi.mjs';
8
8
  export * from './api/PatientApi.mjs';
9
9
  export * from './api/MessageFlavouredApi.mjs';
10
10
  export * from './api/PatientFlavouredApi.mjs';
11
+ export * from './api/AccessLogInGroupApi.mjs';
11
12
  export * from './api/MessageBasicApi.mjs';
12
13
  export * from './api/DocumentTemplateApi.mjs';
13
14
  export * from './api/HealthElementFlavouredApi.mjs';
14
15
  export * from './api/HealthElementBasicApi.mjs';
15
16
  export * from './api/ContactFlavouredApi.mjs';
17
+ export * from './api/AccessLogBasicInGroupApi.mjs';
16
18
  export * from './api/EntityReferenceApi.mjs';
17
19
  export * from './api/CalendarItemInGroupApi.mjs';
18
20
  export * from './api/TopicApi.mjs';
@@ -39,6 +41,7 @@ export * from './api/MaintenanceTaskApi.mjs';
39
41
  export * from './api/AuthApi.mjs';
40
42
  export * from './api/CodeApi.mjs';
41
43
  export * from './api/PatientInGroupApi.mjs';
44
+ export * from './api/AccessLogFlavouredInGroupApi.mjs';
42
45
  export * from './api/PatientBasicInGroupApi.mjs';
43
46
  export * from './api/ReceiptBasicApi.mjs';
44
47
  export * from './api/ClassificationBasicApi.mjs';