@icure/cardinal-sdk 3.0.0-PREVIEW-3 → 3.0.0-PREVIEW-4

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 (84) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
  2. package/api/ApplicationSettingsApi.d.mts +6 -0
  3. package/api/ApplicationSettingsApi.mjs +1 -0
  4. package/api/DocumentTemplateApi.d.mts +22 -0
  5. package/api/DocumentTemplateApi.mjs +1 -0
  6. package/api/EntityReferenceApi.d.mts +5 -0
  7. package/api/EntityReferenceApi.mjs +1 -0
  8. package/api/EntityTemplateApi.d.mts +24 -0
  9. package/api/EntityTemplateApi.mjs +1 -0
  10. package/api/KeywordApi.d.mts +14 -0
  11. package/api/KeywordApi.mjs +1 -0
  12. package/api/MedicalLocationApi.d.mts +17 -0
  13. package/api/MedicalLocationApi.mjs +1 -0
  14. package/api/TarificationApi.d.mts +27 -0
  15. package/api/TarificationApi.mjs +1 -0
  16. package/api/TimeTableApi.d.mts +26 -0
  17. package/api/TimeTableApi.mjs +1 -0
  18. package/cardinal-sdk-ts.mjs +42798 -42801
  19. package/cardinal-sdk.mjs +102573 -101951
  20. package/crypto/entities/BulkShareByIdsResult.d.mts +31 -17
  21. package/crypto/entities/BulkShareByIdsResult.mjs +5 -5
  22. package/crypto/entities/FailedRequestDetails.d.mts +13 -9
  23. package/crypto/entities/FailedRequestDetails.mjs +10 -7
  24. package/crypto/entities/SecretIdShareOptions.d.mts +4 -0
  25. package/crypto/entities/SecretIdShareOptions.mjs +4 -0
  26. package/crypto/entities/SecretIdUseOption.d.mts +5 -0
  27. package/crypto/entities/ShareAllPatientDataOptions.d.mts +49 -0
  28. package/crypto/entities/ShareAllPatientDataOptions.mjs +58 -0
  29. package/crypto/entities/ShareRequestPurpose.d.mts +12 -0
  30. package/crypto/entities/ShareRequestPurpose.mjs +14 -0
  31. package/crypto/entities/ShareRequestSummary.d.mts +51 -0
  32. package/crypto/entities/ShareRequestSummary.mjs +21 -0
  33. package/crypto/entities/SharedSecretIdsSource.d.mts +8 -0
  34. package/crypto/entities/SharedSecretIdsSource.mjs +10 -0
  35. package/crypto/entities/SuccessfulRequestDetails.d.mts +22 -0
  36. package/crypto/entities/SuccessfulRequestDetails.mjs +11 -0
  37. package/crypto.d.mts +4 -1
  38. package/crypto.mjs +4 -1
  39. package/filters/ClassificationFilters.d.mts +27 -0
  40. package/filters/ClassificationFilters.mjs +8 -0
  41. package/filters/MedicalLocationFilters.d.mts +8 -0
  42. package/filters/MedicalLocationFilters.mjs +6 -0
  43. package/filters/TimeTableFilters.d.mts +12 -0
  44. package/filters/TimeTableFilters.mjs +6 -0
  45. package/kotlinx-coroutines-core.mjs +1 -1
  46. package/model/ApplicationSettings.d.mts +87 -0
  47. package/model/ApplicationSettings.mjs +256 -0
  48. package/model/DocumentTemplate.d.mts +35 -0
  49. package/model/DocumentTemplate.mjs +162 -0
  50. package/model/EntityReference.d.mts +10 -0
  51. package/model/EntityReference.mjs +46 -0
  52. package/model/EntityTemplate.d.mts +16 -0
  53. package/model/EntityTemplate.mjs +81 -0
  54. package/model/GroupScoped.d.mts +18 -0
  55. package/model/Keyword.d.mts +23 -0
  56. package/model/Keyword.mjs +99 -0
  57. package/model/ListOfIds.d.mts +6 -0
  58. package/model/ListOfIds.mjs +28 -0
  59. package/model/MedicalLocation.d.mts +28 -0
  60. package/model/MedicalLocation.mjs +116 -0
  61. package/model/Tarification.d.mts +50 -0
  62. package/model/Tarification.mjs +178 -0
  63. package/model/TimeTable.d.mts +25 -0
  64. package/model/TimeTable.mjs +111 -0
  65. package/model/base/AppendixType.d.mts +5 -0
  66. package/model/base/AppendixType.mjs +7 -0
  67. package/model/base/CodeFlag.d.mts +80 -0
  68. package/model/base/CodeFlag.mjs +82 -0
  69. package/model/base/ReportVersion.d.mts +3 -0
  70. package/model/base/ReportVersion.mjs +5 -0
  71. package/model/embed/KeywordSubword.d.mts +8 -0
  72. package/model/embed/KeywordSubword.mjs +35 -0
  73. package/model/embed/LetterValue.d.mts +9 -0
  74. package/model/embed/LetterValue.mjs +47 -0
  75. package/model/embed/Periodicity.d.mts +8 -0
  76. package/model/embed/Periodicity.mjs +36 -0
  77. package/model/embed/TimeTableHour.d.mts +7 -0
  78. package/model/embed/TimeTableHour.mjs +35 -0
  79. package/model/embed/TimeTableItem.d.mts +19 -0
  80. package/model/embed/TimeTableItem.mjs +96 -0
  81. package/model/embed/Valorisation.d.mts +56 -0
  82. package/model/embed/Valorisation.mjs +188 -0
  83. package/package.json +1 -1
  84. package/subscription/EntitySubscriptionEvent.d.mts +3 -0
@@ -1,13 +1,15 @@
1
+ import { EntityReferenceInGroup } from '../../model/EntityReferenceInGroup.mjs';
1
2
  import { FailedRequestDetails } from './FailedRequestDetails.mjs';
3
+ import { SuccessfulRequestDetails } from './SuccessfulRequestDetails.mjs';
2
4
  /**
3
5
  *
4
6
  * Outcome of a "share by ids" bulk operation: sharing many already-existing entities (retrieved server-side by id)
5
7
  * with one or more delegates, using the same share options for the whole batch.
6
8
  *
7
9
  * For every entity id that was found (i.e. not in [notFoundIds]) and every delegate the operation was called with,
8
- * that (entity id, delegate id) pair is accounted for in exactly one place: as a delegate id under that entity id in
9
- * [successfulDelegateIdsByEntityId], as a delegate id under that entity id in [unmodifiedDelegateIdsByEntityId], or
10
- * as an entry in [shareErrors] - never in more than one of these, and never in none of them.
10
+ * that (entity id, delegate) pair is accounted for in exactly one place: as a successful request under that entity id
11
+ * in [successfulRequestsByEntityId], as a delegate under that entity id in [unmodifiedDelegatesByEntityId], or as an
12
+ * entry in [shareErrors] - never in more than one of these, and never in none of them.
11
13
  */
12
14
  export declare class BulkShareByIdsResult {
13
15
  /**
@@ -19,24 +21,27 @@ export declare class BulkShareByIdsResult {
19
21
  notFoundIds: Array<string>;
20
22
  /**
21
23
  *
22
- * For each entity id, the ids of the delegates for which a share request was actually sent and succeeded. An
23
- * entity id with no successful delegate to report is simply absent from this map - it never appears with an
24
- * empty set.
24
+ * For each entity id, the requests that were actually sent for that entity and succeeded, one per delegate. An
25
+ * entity id with no successful request to report is simply absent from this map - it never appears with an empty
26
+ * set.
27
+ *
28
+ * In addition to the requested delegates this may contain requests for delegates the operation was not called
29
+ * with, recognisable by a [ShareRequestPurpose.Migration] purpose: see [shareErrors] for what those are.
25
30
  */
26
- successfulDelegateIdsByEntityId: {
27
- [key: string]: Array<string>;
31
+ successfulRequestsByEntityId: {
32
+ [key: string]: Array<SuccessfulRequestDetails>;
28
33
  };
29
34
  /**
30
35
  *
31
- * For each entity id, the ids of the delegates for which no update request had to be sent at all, because that
32
- * delegate already had access to everything requested with a sufficient access level. This is tracked per
33
- * delegate, not per entity: if an entity was shared with two delegates and only one of them already had
34
- * everything, only that delegate's id ends up here - the other one ends up under
35
- * [successfulDelegateIdsByEntityId] or in [shareErrors] instead. An entity id with no unmodified delegate to
36
- * report is simply absent from this map - it never appears with an empty set.
36
+ * For each entity id, the delegates for which no update request had to be sent at all, because that delegate
37
+ * already had access to everything requested with a sufficient access level. This is tracked per delegate, not
38
+ * per entity: if an entity was shared with two delegates and only one of them already had everything, only that
39
+ * delegate ends up here - the other one ends up under [successfulRequestsByEntityId] or in [shareErrors]
40
+ * instead. An entity id with no unmodified delegate to report is simply absent from this map - it never appears
41
+ * with an empty set.
37
42
  */
38
- unmodifiedDelegateIdsByEntityId: {
39
- [key: string]: Array<string>;
43
+ unmodifiedDelegatesByEntityId: {
44
+ [key: string]: Array<EntityReferenceInGroup>;
40
45
  };
41
46
  /**
42
47
  *
@@ -44,7 +49,16 @@ export declare class BulkShareByIdsResult {
44
49
  * the distinction between a [FailedRequestDetails.ResolutionFailed] (the requested share options couldn't be
45
50
  * satisfied locally, e.g. [ShareMetadataBehaviour.Required] was asked for something unavailable) and a
46
51
  * [FailedRequestDetails.RequestRejected] (a well-formed request was sent and the server rejected it).
52
+ *
53
+ * In addition to the requested delegates this may contain entries for delegates the operation was not called
54
+ * with: those are the internal requests the sdk piggybacks on a share to migrate the legacy delegations of the
55
+ * current data owner hierarchy, and they carry a [ShareRequestPurpose.Migration] purpose. A failure of such a
56
+ * request means the migration didn't happen, not that the requested sharing didn't (the requested sharing of a
57
+ * delegate that was not requested was, by definition, not requested). When a requested delegate is also a data
58
+ * owner whose legacy delegations need to be migrated the two are done by a single request, whose purpose is
59
+ * [ShareRequestPurpose.RequestedShareAndMigration]: a failure of that one does mean the requested sharing
60
+ * failed.
47
61
  */
48
62
  shareErrors: Array<FailedRequestDetails>;
49
- constructor(partial: Partial<BulkShareByIdsResult> & Pick<BulkShareByIdsResult, "notFoundIds" | "successfulDelegateIdsByEntityId" | "unmodifiedDelegateIdsByEntityId" | "shareErrors">);
63
+ constructor(partial: Partial<BulkShareByIdsResult> & Pick<BulkShareByIdsResult, "notFoundIds" | "successfulRequestsByEntityId" | "unmodifiedDelegatesByEntityId" | "shareErrors">);
50
64
  }
@@ -4,15 +4,15 @@
4
4
  * with one or more delegates, using the same share options for the whole batch.
5
5
  *
6
6
  * For every entity id that was found (i.e. not in [notFoundIds]) and every delegate the operation was called with,
7
- * that (entity id, delegate id) pair is accounted for in exactly one place: as a delegate id under that entity id in
8
- * [successfulDelegateIdsByEntityId], as a delegate id under that entity id in [unmodifiedDelegateIdsByEntityId], or
9
- * as an entry in [shareErrors] - never in more than one of these, and never in none of them.
7
+ * that (entity id, delegate) pair is accounted for in exactly one place: as a successful request under that entity id
8
+ * in [successfulRequestsByEntityId], as a delegate under that entity id in [unmodifiedDelegatesByEntityId], or as an
9
+ * entry in [shareErrors] - never in more than one of these, and never in none of them.
10
10
  */
11
11
  export class BulkShareByIdsResult {
12
12
  constructor(partial) {
13
13
  this.notFoundIds = partial.notFoundIds;
14
- this.successfulDelegateIdsByEntityId = partial.successfulDelegateIdsByEntityId;
15
- this.unmodifiedDelegateIdsByEntityId = partial.unmodifiedDelegateIdsByEntityId;
14
+ this.successfulRequestsByEntityId = partial.successfulRequestsByEntityId;
15
+ this.unmodifiedDelegatesByEntityId = partial.unmodifiedDelegatesByEntityId;
16
16
  this.shareErrors = partial.shareErrors;
17
17
  }
18
18
  }
@@ -1,5 +1,6 @@
1
1
  import { EntityReferenceInGroup } from '../../model/EntityReferenceInGroup.mjs';
2
- import { DelegateShareOptions } from './DelegateShareOptions.mjs';
2
+ import { ShareRequestPurpose } from './ShareRequestPurpose.mjs';
3
+ import { ShareRequestSummary } from './ShareRequestSummary.mjs';
3
4
  /**
4
5
  *
5
6
  * Details about a single (entity, delegate) share-or-metadata-update request that did not succeed, returned as part
@@ -46,11 +47,14 @@ export declare namespace FailedRequestDetails {
46
47
  * @param shouldRetry whether the SDK considers this specific failure worth retrying (e.g. with a freshly
47
48
  * fetched revision of the entity). Bulk operations that support `autoRetry` already do this automatically once
48
49
  * before giving up, so by the time you observe this you can assume that retry (if applicable) already happened.
49
- * @param updatedForMigration `true` if this request wasn't actually about sharing or updating access for
50
- * [delegateReference], but rather an internal step to migrate that delegate's pre-existing legacy delegation to
51
- * the current secure-delegation format. Most callers can ignore this field.
52
- * @param request the low-level share options that were sent to the server for this (entity, delegate) pair, or
53
- * `null` if this was an [updatedForMigration] request (which doesn't carry share options of its own).
50
+ * @param purpose what the rejected request was for. Most callers can ignore this field: it is
51
+ * [ShareRequestPurpose.RequestedShare] for a plain share, and the two other values only tell you that the sdk also
52
+ * had (or only had) to migrate the legacy delegations of [delegateReference] along the way.
53
+ * @param requestSummary a non-sensitive summary of what the rejected request was asking for, to help understand
54
+ * why it was rejected. `null` when the sdk didn't resolve any share options for this pair on the caller's behalf,
55
+ * i.e. when [purpose] is [ShareRequestPurpose.Migration], or when the caller used one of the lower-level share
56
+ * methods that take an already resolved [DelegateShareOptions] (in which case the caller already holds the exact
57
+ * options that were sent).
54
58
  */
55
59
  class RequestRejected {
56
60
  entityId: string;
@@ -58,9 +62,9 @@ export declare namespace FailedRequestDetails {
58
62
  reason: string | undefined;
59
63
  code: number;
60
64
  shouldRetry: boolean;
61
- updatedForMigration: boolean;
62
- request: DelegateShareOptions | undefined;
65
+ purpose: ShareRequestPurpose;
66
+ requestSummary: ShareRequestSummary | undefined;
63
67
  readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.FailedRequestDetails.RequestRejected';
64
- constructor(partial: Partial<RequestRejected> & Pick<RequestRejected, "entityId" | "delegateReference" | "reason" | "code" | "shouldRetry" | "updatedForMigration" | "request">);
68
+ constructor(partial: Partial<RequestRejected> & Pick<RequestRejected, "entityId" | "delegateReference" | "reason" | "code" | "shouldRetry" | "purpose" | "requestSummary">);
65
69
  }
66
70
  }
@@ -38,11 +38,14 @@ export var FailedRequestDetails;
38
38
  * @param shouldRetry whether the SDK considers this specific failure worth retrying (e.g. with a freshly
39
39
  * fetched revision of the entity). Bulk operations that support `autoRetry` already do this automatically once
40
40
  * before giving up, so by the time you observe this you can assume that retry (if applicable) already happened.
41
- * @param updatedForMigration `true` if this request wasn't actually about sharing or updating access for
42
- * [delegateReference], but rather an internal step to migrate that delegate's pre-existing legacy delegation to
43
- * the current secure-delegation format. Most callers can ignore this field.
44
- * @param request the low-level share options that were sent to the server for this (entity, delegate) pair, or
45
- * `null` if this was an [updatedForMigration] request (which doesn't carry share options of its own).
41
+ * @param purpose what the rejected request was for. Most callers can ignore this field: it is
42
+ * [ShareRequestPurpose.RequestedShare] for a plain share, and the two other values only tell you that the sdk also
43
+ * had (or only had) to migrate the legacy delegations of [delegateReference] along the way.
44
+ * @param requestSummary a non-sensitive summary of what the rejected request was asking for, to help understand
45
+ * why it was rejected. `null` when the sdk didn't resolve any share options for this pair on the caller's behalf,
46
+ * i.e. when [purpose] is [ShareRequestPurpose.Migration], or when the caller used one of the lower-level share
47
+ * methods that take an already resolved [DelegateShareOptions] (in which case the caller already holds the exact
48
+ * options that were sent).
46
49
  */
47
50
  class RequestRejected {
48
51
  constructor(partial) {
@@ -52,8 +55,8 @@ export var FailedRequestDetails;
52
55
  this.reason = partial.reason;
53
56
  this.code = partial.code;
54
57
  this.shouldRetry = partial.shouldRetry;
55
- this.updatedForMigration = partial.updatedForMigration;
56
- this.request = partial.request;
58
+ this.purpose = partial.purpose;
59
+ this.requestSummary = partial.requestSummary;
57
60
  }
58
61
  }
59
62
  FailedRequestDetails.RequestRejected = RequestRejected;
@@ -10,6 +10,10 @@ export declare namespace SecretIdShareOptions {
10
10
  * @param requireAtLeastOne if true the sharing will fail if the current user can't access any secret id of the entity
11
11
  */
12
12
  class AllAvailable {
13
+ /**
14
+ * Share all available secret ids
15
+ * @param requireAtLeastOne if true the sharing will fail if the current user can't access any secret id of the entity
16
+ * / */
13
17
  requireAtLeastOne: boolean;
14
18
  readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.SecretIdShareOptions.AllAvailable';
15
19
  constructor(partial: Partial<AllAvailable>);
@@ -8,6 +8,10 @@ export var SecretIdShareOptions;
8
8
  */
9
9
  class AllAvailable {
10
10
  constructor(partial) {
11
+ /**
12
+ * Share all available secret ids
13
+ * @param requireAtLeastOne if true the sharing will fail if the current user can't access any secret id of the entity
14
+ * / */
11
15
  this.requireAtLeastOne = false;
12
16
  this.$ktClass = 'com.icure.cardinal.sdk.crypto.entities.SecretIdShareOptions.AllAvailable';
13
17
  if ('requireAtLeastOne' in partial && partial.requireAtLeastOne !== undefined)
@@ -18,6 +18,11 @@ export declare namespace SecretIdUseOption {
18
18
  * Note that the SDK will not check that the secret id you used is actually a secret id of the owning entity.
19
19
  */
20
20
  class Use {
21
+ /**
22
+ * Specify explicitly which secret ids to use. The secretIds can also be empty, in which case the value is
23
+ * equivalent to [UseNone].
24
+ * Note that the SDK will not check that the secret id you used is actually a secret id of the owning entity.
25
+ * / */
21
26
  secretIds: Array<string>;
22
27
  readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.SecretIdUseOption.Use';
23
28
  constructor(partial: Partial<Use> & Pick<Use, "secretIds">);
@@ -0,0 +1,49 @@
1
+ import { EncryptedPatient } from '../../model/Patient.mjs';
2
+ import { FailedRequestDetails } from './FailedRequestDetails.mjs';
3
+ import { ShareAllPatientDataOptions as ShareAllPatientDataOptions_ } from './ShareAllPatientDataOptions.mjs';
4
+ export declare namespace ShareAllPatientDataOptions {
5
+ /**
6
+ *
7
+ * Specifies which entities related to a Patient will be shared by [PatientApi.shareAllDataOfPatient].
8
+ */
9
+ enum Tag {
10
+ All = "All",
11
+ MedicalInformation = "MedicalInformation",
12
+ FinancialInformation = "FinancialInformation"
13
+ }
14
+ enum ShareableEntity {
15
+ CalendarItem = "CalendarItem",
16
+ Contact = "Contact",
17
+ Classification = "Classification",
18
+ Document = "Document",
19
+ Form = "Form",
20
+ HealthElement = "HealthElement",
21
+ Invoice = "Invoice",
22
+ Patient = "Patient"
23
+ }
24
+ class EntityResult {
25
+ success: boolean | undefined;
26
+ error: ShareAllPatientDataOptions_.SharePatientDataError | undefined;
27
+ modified: number;
28
+ constructor(partial: Partial<EntityResult> & Pick<EntityResult, "modified">);
29
+ }
30
+ class Result {
31
+ patient: EncryptedPatient;
32
+ statuses: {
33
+ [key in ShareAllPatientDataOptions_.ShareableEntity]?: ShareAllPatientDataOptions_.EntityResult;
34
+ };
35
+ constructor(partial: Partial<Result> & Pick<Result, "patient" | "statuses">);
36
+ }
37
+ type SharePatientDataError = BulkShareFailure | FailedRequest;
38
+ class BulkShareFailure {
39
+ errors: Array<FailedRequestDetails>;
40
+ message: string;
41
+ readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.BulkShareFailure';
42
+ constructor(partial: Partial<BulkShareFailure> & Pick<BulkShareFailure, "errors" | "message">);
43
+ }
44
+ class FailedRequest {
45
+ description: string;
46
+ readonly $ktClass: 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.FailedRequest';
47
+ constructor(partial: Partial<FailedRequest> & Pick<FailedRequest, "description">);
48
+ }
49
+ }
@@ -0,0 +1,58 @@
1
+ export var ShareAllPatientDataOptions;
2
+ (function (ShareAllPatientDataOptions) {
3
+ /**
4
+ *
5
+ * Specifies which entities related to a Patient will be shared by [PatientApi.shareAllDataOfPatient].
6
+ */
7
+ let Tag;
8
+ (function (Tag) {
9
+ Tag["All"] = "All";
10
+ Tag["MedicalInformation"] = "MedicalInformation";
11
+ Tag["FinancialInformation"] = "FinancialInformation";
12
+ })(Tag = ShareAllPatientDataOptions.Tag || (ShareAllPatientDataOptions.Tag = {}));
13
+ let ShareableEntity;
14
+ (function (ShareableEntity) {
15
+ ShareableEntity["CalendarItem"] = "CalendarItem";
16
+ ShareableEntity["Contact"] = "Contact";
17
+ ShareableEntity["Classification"] = "Classification";
18
+ ShareableEntity["Document"] = "Document";
19
+ ShareableEntity["Form"] = "Form";
20
+ ShareableEntity["HealthElement"] = "HealthElement";
21
+ ShareableEntity["Invoice"] = "Invoice";
22
+ ShareableEntity["Patient"] = "Patient";
23
+ })(ShareableEntity = ShareAllPatientDataOptions.ShareableEntity || (ShareAllPatientDataOptions.ShareableEntity = {}));
24
+ class EntityResult {
25
+ constructor(partial) {
26
+ this.success = undefined;
27
+ this.error = undefined;
28
+ if ('success' in partial)
29
+ this.success = partial.success;
30
+ if ('error' in partial)
31
+ this.error = partial.error;
32
+ this.modified = partial.modified;
33
+ }
34
+ }
35
+ ShareAllPatientDataOptions.EntityResult = EntityResult;
36
+ class Result {
37
+ constructor(partial) {
38
+ this.patient = partial.patient;
39
+ this.statuses = partial.statuses;
40
+ }
41
+ }
42
+ ShareAllPatientDataOptions.Result = Result;
43
+ class BulkShareFailure {
44
+ constructor(partial) {
45
+ this.$ktClass = 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.BulkShareFailure';
46
+ this.errors = partial.errors;
47
+ this.message = partial.message;
48
+ }
49
+ }
50
+ ShareAllPatientDataOptions.BulkShareFailure = BulkShareFailure;
51
+ class FailedRequest {
52
+ constructor(partial) {
53
+ this.$ktClass = 'com.icure.cardinal.sdk.crypto.entities.ShareAllPatientDataOptions.FailedRequest';
54
+ this.description = partial.description;
55
+ }
56
+ }
57
+ ShareAllPatientDataOptions.FailedRequest = FailedRequest;
58
+ })(ShareAllPatientDataOptions || (ShareAllPatientDataOptions = {}));
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * What a single share-or-metadata-update request the sdk sent was actually for. Sharing an entity may require the sdk
4
+ * to also migrate the pre-existing legacy delegations of the data owners of the current hierarchy to the current
5
+ * secure-delegation format, and those migrations travel as requests of their own - sometimes merged with a request
6
+ * the caller asked for.
7
+ */
8
+ export declare enum ShareRequestPurpose {
9
+ RequestedShare = "RequestedShare",
10
+ Migration = "Migration",
11
+ RequestedShareAndMigration = "RequestedShareAndMigration"
12
+ }
@@ -0,0 +1,14 @@
1
+ // auto-generated file
2
+ /**
3
+ *
4
+ * What a single share-or-metadata-update request the sdk sent was actually for. Sharing an entity may require the sdk
5
+ * to also migrate the pre-existing legacy delegations of the data owners of the current hierarchy to the current
6
+ * secure-delegation format, and those migrations travel as requests of their own - sometimes merged with a request
7
+ * the caller asked for.
8
+ */
9
+ export var ShareRequestPurpose;
10
+ (function (ShareRequestPurpose) {
11
+ ShareRequestPurpose["RequestedShare"] = "RequestedShare";
12
+ ShareRequestPurpose["Migration"] = "Migration";
13
+ ShareRequestPurpose["RequestedShareAndMigration"] = "RequestedShareAndMigration";
14
+ })(ShareRequestPurpose || (ShareRequestPurpose = {}));
@@ -0,0 +1,51 @@
1
+ import { RequestedPermission } from '../../model/requests/RequestedPermission.mjs';
2
+ import { ShareMetadataBehaviour } from './ShareMetadataBehaviour.mjs';
3
+ import { SharedSecretIdsSource } from './SharedSecretIdsSource.mjs';
4
+ /**
5
+ *
6
+ * A non-sensitive summary of a share request the sdk built out of the share options provided by the caller: what was
7
+ * asked for each kind of metadata and how much of it the request was carrying, but never the metadata itself -
8
+ * sharing a secret id or an encryption key means putting the actual value in the request, and those values must not
9
+ * end up in an error object that callers routinely log.
10
+ *
11
+ * The counts are those of the resolved request, before the sdk dropped from it whatever the delegate can already
12
+ * access anyway (see [FailedRequestDetails.RequestRejected.requestSummary] for when you get one of these).
13
+ */
14
+ export declare class ShareRequestSummary {
15
+ /**
16
+ *
17
+ * The permissions that were requested for the delegate.
18
+ */
19
+ requestedPermissions: RequestedPermission;
20
+ /**
21
+ *
22
+ * Where the secret ids of the request came from.
23
+ */
24
+ secretIdsSource: SharedSecretIdsSource;
25
+ /**
26
+ *
27
+ * How many secret ids the request was carrying.
28
+ */
29
+ sharedSecretIdsCount: number;
30
+ /**
31
+ *
32
+ * The behaviour that was requested for the encryption key.
33
+ */
34
+ encryptionKeysBehaviour: ShareMetadataBehaviour;
35
+ /**
36
+ *
37
+ * How many encryption keys the request was carrying.
38
+ */
39
+ sharedEncryptionKeysCount: number;
40
+ /**
41
+ *
42
+ * The behaviour that was requested for the owning entity ids.
43
+ */
44
+ owningEntityIdsBehaviour: ShareMetadataBehaviour;
45
+ /**
46
+ *
47
+ * How many owning entity ids the request was carrying.
48
+ */
49
+ sharedOwningEntityIdsCount: number;
50
+ constructor(partial: Partial<ShareRequestSummary> & Pick<ShareRequestSummary, "requestedPermissions" | "secretIdsSource" | "sharedSecretIdsCount" | "encryptionKeysBehaviour" | "sharedEncryptionKeysCount" | "owningEntityIdsBehaviour" | "sharedOwningEntityIdsCount">);
51
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ *
3
+ * A non-sensitive summary of a share request the sdk built out of the share options provided by the caller: what was
4
+ * asked for each kind of metadata and how much of it the request was carrying, but never the metadata itself -
5
+ * sharing a secret id or an encryption key means putting the actual value in the request, and those values must not
6
+ * end up in an error object that callers routinely log.
7
+ *
8
+ * The counts are those of the resolved request, before the sdk dropped from it whatever the delegate can already
9
+ * access anyway (see [FailedRequestDetails.RequestRejected.requestSummary] for when you get one of these).
10
+ */
11
+ export class ShareRequestSummary {
12
+ constructor(partial) {
13
+ this.requestedPermissions = partial.requestedPermissions;
14
+ this.secretIdsSource = partial.secretIdsSource;
15
+ this.sharedSecretIdsCount = partial.sharedSecretIdsCount;
16
+ this.encryptionKeysBehaviour = partial.encryptionKeysBehaviour;
17
+ this.sharedEncryptionKeysCount = partial.sharedEncryptionKeysCount;
18
+ this.owningEntityIdsBehaviour = partial.owningEntityIdsBehaviour;
19
+ this.sharedOwningEntityIdsCount = partial.sharedOwningEntityIdsCount;
20
+ }
21
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * Whether the secret ids carried by a share request were chosen by the caller or by the sdk.
4
+ */
5
+ export declare enum SharedSecretIdsSource {
6
+ AllAvailable = "AllAvailable",
7
+ ExplicitValues = "ExplicitValues"
8
+ }
@@ -0,0 +1,10 @@
1
+ // auto-generated file
2
+ /**
3
+ *
4
+ * Whether the secret ids carried by a share request were chosen by the caller or by the sdk.
5
+ */
6
+ export var SharedSecretIdsSource;
7
+ (function (SharedSecretIdsSource) {
8
+ SharedSecretIdsSource["AllAvailable"] = "AllAvailable";
9
+ SharedSecretIdsSource["ExplicitValues"] = "ExplicitValues";
10
+ })(SharedSecretIdsSource || (SharedSecretIdsSource = {}));
@@ -0,0 +1,22 @@
1
+ import { EntityReferenceInGroup } from '../../model/EntityReferenceInGroup.mjs';
2
+ import { ShareRequestPurpose } from './ShareRequestPurpose.mjs';
3
+ /**
4
+ *
5
+ * Details about a single (entity, delegate) share-or-metadata-update request that was sent and succeeded, returned as
6
+ * part of the success map of a bulk-share operation (e.g. [BulkShareByIdsResult.successfulRequestsByEntityId]).
7
+ */
8
+ export declare class SuccessfulRequestDetails {
9
+ /**
10
+ *
11
+ * The delegate this request shared with, or updated the delegation of.
12
+ */
13
+ delegateReference: EntityReferenceInGroup;
14
+ /**
15
+ *
16
+ * What this request was for. Most callers can ignore this field: it is [ShareRequestPurpose.RequestedShare] for a
17
+ * plain share, and the two other values only tell you that the sdk also had (or only had) to migrate the legacy
18
+ * delegations of that data owner along the way.
19
+ */
20
+ purpose: ShareRequestPurpose;
21
+ constructor(partial: Partial<SuccessfulRequestDetails> & Pick<SuccessfulRequestDetails, "delegateReference" | "purpose">);
22
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ *
3
+ * Details about a single (entity, delegate) share-or-metadata-update request that was sent and succeeded, returned as
4
+ * part of the success map of a bulk-share operation (e.g. [BulkShareByIdsResult.successfulRequestsByEntityId]).
5
+ */
6
+ export class SuccessfulRequestDetails {
7
+ constructor(partial) {
8
+ this.delegateReference = partial.delegateReference;
9
+ this.purpose = partial.purpose;
10
+ }
11
+ }
package/crypto.d.mts CHANGED
@@ -2,6 +2,7 @@ export * from './crypto/CryptoStrategies.mjs';
2
2
  export * from './crypto/CryptoService.mjs';
3
3
  export * from './crypto/entities/TopicDelegateOptions.mjs';
4
4
  export * from './crypto/entities/ContactShareOptions.mjs';
5
+ export * from './crypto/entities/ShareRequestPurpose.mjs';
5
6
  export * from './crypto/entities/InvoiceDelegateOptions.mjs';
6
7
  export * from './crypto/entities/HealthElementShareOptions.mjs';
7
8
  export * from './crypto/entities/MessageDelegateOptions.mjs';
@@ -22,9 +23,9 @@ export * from './crypto/entities/RawDecryptedExchangeData.mjs';
22
23
  export * from './crypto/entities/SecretIdUseOption.mjs';
23
24
  export * from './crypto/entities/RecoveryDataUseFailureReason.mjs';
24
25
  export * from './crypto/entities/ExchangeDataInjectionDetails.mjs';
26
+ export * from './crypto/entities/ShareRequestSummary.mjs';
25
27
  export * from './crypto/entities/HealthElementDelegateOptions.mjs';
26
28
  export * from './crypto/entities/CalendarItemDelegateOptions.mjs';
27
- export * from './crypto/entities/DelegateShareOptions.mjs';
28
29
  export * from './crypto/entities/InvoiceShareOptions.mjs';
29
30
  export * from './crypto/entities/RecoveryKeySize.mjs';
30
31
  export * from './crypto/entities/CalendarItemShareOptions.mjs';
@@ -33,9 +34,11 @@ export * from './crypto/entities/PatientDelegateOptions.mjs';
33
34
  export * from './crypto/entities/FormDelegateOptions.mjs';
34
35
  export * from './crypto/entities/SecretIdShareOptions.mjs';
35
36
  export * from './crypto/entities/EntityAccessInformation.mjs';
37
+ export * from './crypto/entities/SharedSecretIdsSource.mjs';
36
38
  export * from './crypto/entities/RecoveryResult.mjs';
37
39
  export * from './crypto/entities/RecoveryKeyOptions.mjs';
38
40
  export * from './crypto/entities/DocumentDelegateOptions.mjs';
41
+ export * from './crypto/entities/SuccessfulRequestDetails.mjs';
39
42
  export * from './crypto/entities/RecoveryDataKey.mjs';
40
43
  export * from './crypto/entities/BulkShareByIdsResult.mjs';
41
44
  export * from './crypto/entities/MaintenanceTaskShareOptions.mjs';
package/crypto.mjs CHANGED
@@ -2,6 +2,7 @@ export * from './crypto/CryptoStrategies.mjs';
2
2
  export * from './crypto/CryptoService.mjs';
3
3
  export * from './crypto/entities/TopicDelegateOptions.mjs';
4
4
  export * from './crypto/entities/ContactShareOptions.mjs';
5
+ export * from './crypto/entities/ShareRequestPurpose.mjs';
5
6
  export * from './crypto/entities/InvoiceDelegateOptions.mjs';
6
7
  export * from './crypto/entities/HealthElementShareOptions.mjs';
7
8
  export * from './crypto/entities/MessageDelegateOptions.mjs';
@@ -22,9 +23,9 @@ export * from './crypto/entities/RawDecryptedExchangeData.mjs';
22
23
  export * from './crypto/entities/SecretIdUseOption.mjs';
23
24
  export * from './crypto/entities/RecoveryDataUseFailureReason.mjs';
24
25
  export * from './crypto/entities/ExchangeDataInjectionDetails.mjs';
26
+ export * from './crypto/entities/ShareRequestSummary.mjs';
25
27
  export * from './crypto/entities/HealthElementDelegateOptions.mjs';
26
28
  export * from './crypto/entities/CalendarItemDelegateOptions.mjs';
27
- export * from './crypto/entities/DelegateShareOptions.mjs';
28
29
  export * from './crypto/entities/InvoiceShareOptions.mjs';
29
30
  export * from './crypto/entities/RecoveryKeySize.mjs';
30
31
  export * from './crypto/entities/CalendarItemShareOptions.mjs';
@@ -33,9 +34,11 @@ export * from './crypto/entities/PatientDelegateOptions.mjs';
33
34
  export * from './crypto/entities/FormDelegateOptions.mjs';
34
35
  export * from './crypto/entities/SecretIdShareOptions.mjs';
35
36
  export * from './crypto/entities/EntityAccessInformation.mjs';
37
+ export * from './crypto/entities/SharedSecretIdsSource.mjs';
36
38
  export * from './crypto/entities/RecoveryResult.mjs';
37
39
  export * from './crypto/entities/RecoveryKeyOptions.mjs';
38
40
  export * from './crypto/entities/DocumentDelegateOptions.mjs';
41
+ export * from './crypto/entities/SuccessfulRequestDetails.mjs';
39
42
  export * from './crypto/entities/RecoveryDataKey.mjs';
40
43
  export * from './crypto/entities/BulkShareByIdsResult.mjs';
41
44
  export * from './crypto/entities/MaintenanceTaskShareOptions.mjs';
@@ -0,0 +1,27 @@
1
+ import { BaseSortableFilterOptions, SortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { Classification } from '../model/Classification.mjs';
3
+ import { Patient } from '../model/Patient.mjs';
4
+ interface ClassificationFiltersFactory {
5
+ byPatientsCreatedForDataOwner(dataOwnerId: string, patients: Array<Patient>, options?: {
6
+ from?: number | undefined;
7
+ to?: number | undefined;
8
+ descending?: boolean;
9
+ }): SortableFilterOptions<Classification>;
10
+ byPatientsCreatedForSelf(patients: Array<Patient>, options?: {
11
+ from?: number | undefined;
12
+ to?: number | undefined;
13
+ descending?: boolean;
14
+ }): SortableFilterOptions<Classification>;
15
+ byPatientSecretIdsCreatedForDataOwner(dataOwnerId: string, secretIds: Array<string>, options?: {
16
+ from?: number | undefined;
17
+ to?: number | undefined;
18
+ descending?: boolean;
19
+ }): BaseSortableFilterOptions<Classification>;
20
+ byPatientSecretIdsCreatedForSelf(secretIds: Array<string>, options?: {
21
+ from?: number | undefined;
22
+ to?: number | undefined;
23
+ descending?: boolean;
24
+ }): SortableFilterOptions<Classification>;
25
+ }
26
+ export declare const ClassificationFilters: ClassificationFiltersFactory;
27
+ export {};
@@ -0,0 +1,8 @@
1
+ // auto-generated file
2
+ import { InternalClassificationFiltersObj } from '../cardinal-sdk-ts.mjs';
3
+ export const ClassificationFilters = {
4
+ byPatientsCreatedForDataOwner: (dataOwnerId, patients, options) => InternalClassificationFiltersObj.getInstance().byPatientsCreatedForDataOwner(dataOwnerId, patients, options),
5
+ byPatientsCreatedForSelf: (patients, options) => InternalClassificationFiltersObj.getInstance().byPatientsCreatedForSelf(patients, options),
6
+ byPatientSecretIdsCreatedForDataOwner: (dataOwnerId, secretIds, options) => InternalClassificationFiltersObj.getInstance().byPatientSecretIdsCreatedForDataOwner(dataOwnerId, secretIds, options),
7
+ byPatientSecretIdsCreatedForSelf: (secretIds, options) => InternalClassificationFiltersObj.getInstance().byPatientSecretIdsCreatedForSelf(secretIds, options)
8
+ };
@@ -0,0 +1,8 @@
1
+ import { BaseFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { MedicalLocation } from '../model/MedicalLocation.mjs';
3
+ interface MedicalLocationFiltersFactory {
4
+ all(): BaseFilterOptions<MedicalLocation>;
5
+ byPostCode(postCode: string): BaseFilterOptions<MedicalLocation>;
6
+ }
7
+ export declare const MedicalLocationFilters: MedicalLocationFiltersFactory;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ // auto-generated file
2
+ import { InternalMedicalLocationFiltersObj } from '../cardinal-sdk-ts.mjs';
3
+ export const MedicalLocationFilters = {
4
+ all: () => InternalMedicalLocationFiltersObj.getInstance().all(),
5
+ byPostCode: (postCode) => InternalMedicalLocationFiltersObj.getInstance().byPostCode(postCode)
6
+ };
@@ -0,0 +1,12 @@
1
+ import { BaseFilterOptions, BaseSortableFilterOptions } from '../cardinal-sdk-ts.mjs';
2
+ import { TimeTable } from '../model/TimeTable.mjs';
3
+ interface TimeTableFiltersFactory {
4
+ byAgendaId(agendaId: string): BaseFilterOptions<TimeTable>;
5
+ byPeriodAndAgendaId(agendaId: string, options?: {
6
+ from?: number | undefined;
7
+ to?: number | undefined;
8
+ descending?: boolean;
9
+ }): BaseSortableFilterOptions<TimeTable>;
10
+ }
11
+ export declare const TimeTableFilters: TimeTableFiltersFactory;
12
+ export {};
@@ -0,0 +1,6 @@
1
+ // auto-generated file
2
+ import { InternalTimeTableFiltersObj } from '../cardinal-sdk-ts.mjs';
3
+ export const TimeTableFilters = {
4
+ byAgendaId: (agendaId) => InternalTimeTableFiltersObj.getInstance().byAgendaId(agendaId),
5
+ byPeriodAndAgendaId: (agendaId, options) => InternalTimeTableFiltersObj.getInstance().byPeriodAndAgendaId(agendaId, options)
6
+ };