@sudoplatform/sudo-privacy-interaction 2.0.0 → 2.2.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 (168) hide show
  1. package/cjs/gen/graphqlTypes.js +2291 -780
  2. package/cjs/private/data/action/actionSubscriptionManager.js +25 -0
  3. package/cjs/private/data/action/defaultActionService.js +80 -0
  4. package/cjs/private/data/action/transformer/actionFulfilmentMethodTransformer.js +47 -0
  5. package/cjs/private/data/action/transformer/actionIntentTransformer.js +69 -0
  6. package/cjs/private/data/action/transformer/actionOriginTransformer.js +37 -0
  7. package/cjs/private/data/action/transformer/actionStatusTransformer.js +53 -0
  8. package/cjs/private/data/action/transformer/actionTransformer.js +85 -0
  9. package/cjs/private/data/action/transformer/availableActionTransformer.js +37 -0
  10. package/cjs/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
  11. package/cjs/private/data/common/apiClient.js +58 -0
  12. package/cjs/private/data/data-holder/defaultDataHolderService.js +12 -0
  13. package/cjs/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +56 -0
  14. package/cjs/private/data/organization-analysis/defaultOrganizationAnalysisService.js +31 -0
  15. package/cjs/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +29 -0
  16. package/cjs/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +45 -0
  17. package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
  18. package/cjs/private/domain/entities/action/actionEntity.js +86 -0
  19. package/cjs/private/domain/entities/action/actionService.js +7 -0
  20. package/cjs/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +24 -0
  21. package/cjs/private/domain/entities/organization-analysis/organizationAnalysisService.js +7 -0
  22. package/cjs/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +25 -0
  23. package/cjs/private/domain/use-cases/action/initiateActionUseCase.js +26 -0
  24. package/cjs/private/domain/use-cases/action/listAvailableActionsUseCase.js +26 -0
  25. package/cjs/private/domain/use-cases/action/subscribeToActionUseCase.js +37 -0
  26. package/cjs/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +27 -0
  27. package/cjs/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +29 -0
  28. package/cjs/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +25 -0
  29. package/cjs/public/defaultSudoPrivacyInteractionClient.js +133 -6
  30. package/cjs/public/inputs/action.js +7 -0
  31. package/cjs/public/inputs/index.js +2 -0
  32. package/cjs/public/inputs/organizationAnalysis.js +7 -0
  33. package/cjs/public/typings/action.js +85 -0
  34. package/cjs/public/typings/index.js +2 -0
  35. package/cjs/public/typings/organizationAnalysis.js +24 -0
  36. package/docs/assets/hierarchy.js +1 -1
  37. package/docs/assets/navigation.js +1 -1
  38. package/docs/assets/search.js +1 -1
  39. package/docs/classes/DefaultSudoPrivacyInteractionClient.html +176 -21
  40. package/docs/enums/ActionFulfilmentMethod.html +63 -0
  41. package/docs/enums/ActionIntent.html +84 -0
  42. package/docs/enums/ActionOrigin.html +75 -0
  43. package/docs/enums/ActionStatus.html +99 -0
  44. package/docs/enums/ConnectionState.html +3 -3
  45. package/docs/enums/DataCategory.html +18 -18
  46. package/docs/enums/DataHolderProtectionState.html +5 -5
  47. package/docs/enums/OrganizationAnalysisMode.html +70 -0
  48. package/docs/enums/OrganizationCategory.html +30 -30
  49. package/docs/enums/ProviderType.html +3 -3
  50. package/docs/enums/RetentionStyle.html +5 -5
  51. package/docs/enums/ShareStyle.html +6 -6
  52. package/docs/enums/SignalValue.html +4 -4
  53. package/docs/enums/VirtualPresenceState.html +7 -7
  54. package/docs/hierarchy.html +6 -5
  55. package/docs/interfaces/Action.html +167 -0
  56. package/docs/interfaces/ActionContact.html +77 -0
  57. package/docs/interfaces/ActionSubscriber.html +92 -0
  58. package/docs/interfaces/AnalysisResultSubscriber.html +3 -3
  59. package/docs/interfaces/AssistedEmailTemplate.html +70 -0
  60. package/docs/interfaces/AssistedPayload.html +113 -0
  61. package/docs/interfaces/AvailableAction.html +102 -0
  62. package/docs/interfaces/CapabilitySignals.html +9 -9
  63. package/docs/interfaces/CategorySignals.html +11 -11
  64. package/docs/interfaces/DataHolder.html +24 -14
  65. package/docs/interfaces/DataHolderScanSummary.html +158 -0
  66. package/docs/interfaces/DataHolderSubscriber.html +3 -3
  67. package/docs/interfaces/GetDataHolderOptions.html +63 -0
  68. package/docs/interfaces/GetOrganizationAnalysisInput.html +70 -0
  69. package/docs/interfaces/InitiateActionInput.html +79 -0
  70. package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
  71. package/docs/interfaces/ListAvailableActionsInput.html +61 -0
  72. package/docs/interfaces/ListDataHolderScanSummariesInput.html +85 -0
  73. package/docs/interfaces/ListDataHoldersInput.html +1 -1
  74. package/docs/interfaces/ListVirtualPresencesInput.html +1 -1
  75. package/docs/interfaces/OrganizationAnalysis.html +131 -0
  76. package/docs/interfaces/OrganizationIdentity.html +5 -5
  77. package/docs/interfaces/Pagination.html +2 -1
  78. package/docs/interfaces/PrivacyScore.html +13 -5
  79. package/docs/interfaces/PrivacySummary.html +4 -4
  80. package/docs/interfaces/RetentionInfo.html +4 -4
  81. package/docs/interfaces/RiskIndicators.html +8 -8
  82. package/docs/interfaces/ScoreContribution.html +3 -3
  83. package/docs/interfaces/ScoreCoverage.html +70 -0
  84. package/docs/interfaces/SudoPrivacyInteractionClient.html +169 -21
  85. package/docs/interfaces/VirtualPresence.html +21 -12
  86. package/docs/interfaces/VirtualPresenceSubscriber.html +3 -3
  87. package/docs/modules.html +4 -4
  88. package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
  89. package/lib/gen/graphqlTypes.js +2290 -779
  90. package/lib/private/data/action/actionSubscriptionManager.js +21 -0
  91. package/lib/private/data/action/defaultActionService.js +76 -0
  92. package/lib/private/data/action/transformer/actionFulfilmentMethodTransformer.js +43 -0
  93. package/lib/private/data/action/transformer/actionIntentTransformer.js +65 -0
  94. package/lib/private/data/action/transformer/actionOriginTransformer.js +33 -0
  95. package/lib/private/data/action/transformer/actionStatusTransformer.js +49 -0
  96. package/lib/private/data/action/transformer/actionTransformer.js +81 -0
  97. package/lib/private/data/action/transformer/availableActionTransformer.js +33 -0
  98. package/lib/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
  99. package/lib/private/data/common/apiClient.js +59 -1
  100. package/lib/private/data/data-holder/defaultDataHolderService.js +12 -0
  101. package/lib/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +52 -0
  102. package/lib/private/data/organization-analysis/defaultOrganizationAnalysisService.js +27 -0
  103. package/lib/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +25 -0
  104. package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +41 -0
  105. package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
  106. package/lib/private/domain/entities/action/actionEntity.js +83 -0
  107. package/lib/private/domain/entities/action/actionService.js +6 -0
  108. package/lib/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +21 -0
  109. package/lib/private/domain/entities/organization-analysis/organizationAnalysisService.js +6 -0
  110. package/lib/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +21 -0
  111. package/lib/private/domain/use-cases/action/initiateActionUseCase.js +22 -0
  112. package/lib/private/domain/use-cases/action/listAvailableActionsUseCase.js +22 -0
  113. package/lib/private/domain/use-cases/action/subscribeToActionUseCase.js +33 -0
  114. package/lib/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +23 -0
  115. package/lib/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +25 -0
  116. package/lib/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +21 -0
  117. package/lib/public/defaultSudoPrivacyInteractionClient.js +133 -6
  118. package/lib/public/inputs/action.js +6 -0
  119. package/lib/public/inputs/index.js +2 -0
  120. package/lib/public/inputs/organizationAnalysis.js +6 -0
  121. package/lib/public/typings/action.js +82 -0
  122. package/lib/public/typings/index.js +2 -0
  123. package/lib/public/typings/organizationAnalysis.js +21 -0
  124. package/package.json +5 -3
  125. package/types/gen/graphqlTypes.d.ts +569 -1
  126. package/types/private/data/action/actionSubscriptionManager.d.ts +19 -0
  127. package/types/private/data/action/defaultActionService.d.ts +23 -0
  128. package/types/private/data/action/transformer/actionFulfilmentMethodTransformer.d.ts +14 -0
  129. package/types/private/data/action/transformer/actionIntentTransformer.d.ts +14 -0
  130. package/types/private/data/action/transformer/actionOriginTransformer.d.ts +12 -0
  131. package/types/private/data/action/transformer/actionStatusTransformer.d.ts +12 -0
  132. package/types/private/data/action/transformer/actionTransformer.d.ts +39 -0
  133. package/types/private/data/action/transformer/availableActionTransformer.d.ts +15 -0
  134. package/types/private/data/common/apiClient.d.ts +16 -1
  135. package/types/private/data/common/baseSubscriptionManager.d.ts +5 -0
  136. package/types/private/data/data-holder/defaultDataHolderService.d.ts +3 -1
  137. package/types/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.d.ts +18 -0
  138. package/types/private/data/organization-analysis/defaultOrganizationAnalysisService.d.ts +15 -0
  139. package/types/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.d.ts +12 -0
  140. package/types/private/data/organization-analysis/transformer/organizationAnalysisTransformer.d.ts +14 -0
  141. package/types/private/domain/entities/action/actionEntity.d.ts +187 -0
  142. package/types/private/domain/entities/action/actionService.d.ts +99 -0
  143. package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +14 -0
  144. package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +34 -0
  145. package/types/private/domain/entities/data-holder/dataHolderService.d.ts +35 -1
  146. package/types/private/domain/entities/organization-analysis/organizationAnalysisEntity.d.ts +53 -0
  147. package/types/private/domain/entities/organization-analysis/organizationAnalysisService.d.ts +35 -0
  148. package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +3 -0
  149. package/types/private/domain/use-cases/action/confirmActionOutcomeUseCase.d.ts +16 -0
  150. package/types/private/domain/use-cases/action/initiateActionUseCase.d.ts +17 -0
  151. package/types/private/domain/use-cases/action/listAvailableActionsUseCase.d.ts +16 -0
  152. package/types/private/domain/use-cases/action/subscribeToActionUseCase.d.ts +27 -0
  153. package/types/private/domain/use-cases/action/unsubscribeFromActionUseCase.d.ts +15 -0
  154. package/types/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.d.ts +36 -0
  155. package/types/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.d.ts +16 -0
  156. package/types/public/defaultSudoPrivacyInteractionClient.d.ts +19 -3
  157. package/types/public/inputs/action.d.ts +30 -0
  158. package/types/public/inputs/dataHolder.d.ts +22 -0
  159. package/types/public/inputs/index.d.ts +2 -0
  160. package/types/public/inputs/organizationAnalysis.d.ts +18 -0
  161. package/types/public/sudoPrivacyInteractionClient.d.ts +64 -3
  162. package/types/public/typings/action.d.ts +185 -0
  163. package/types/public/typings/analysisResult.d.ts +14 -0
  164. package/types/public/typings/dataHolder.d.ts +38 -0
  165. package/types/public/typings/index.d.ts +2 -0
  166. package/types/public/typings/organizationAnalysis.d.ts +53 -0
  167. package/types/public/typings/subscription.d.ts +23 -0
  168. package/types/public/typings/virtualPresence.d.ts +3 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { OnActionStatusUpdateSubscription } from '../../../gen/graphqlTypes';
7
+ import { Action } from '../../../public/typings/action';
8
+ import { ActionSubscriber, ConnectionState } from '../../../public/typings/subscription';
9
+ import { BaseSubscriptionManager } from '../common/baseSubscriptionManager';
10
+ export type ActionSubscribable = OnActionStatusUpdateSubscription;
11
+ export declare class ActionSubscriptionManager<T extends ActionSubscribable, S extends ActionSubscriber> extends BaseSubscriptionManager<T, S> implements ActionSubscriber {
12
+ /**
13
+ * Notifies subscribers of an action status update.
14
+ *
15
+ * @param action The updated action.
16
+ */
17
+ actionUpdated(action: Action): void;
18
+ connectionStatusChanged(state: ConnectionState): void;
19
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionEntity } from '../../domain/entities/action/actionEntity';
7
+ import { ActionService, InitiateActionInput, ListAvailableActionsInput, ListAvailableActionsOutput, SubscribeToActionsInput } from '../../domain/entities/action/actionService';
8
+ import { ApiClient } from '../common/apiClient';
9
+ export declare class DefaultActionService implements ActionService {
10
+ private readonly appSync;
11
+ private readonly actionTransformer;
12
+ private readonly availableActionTransformer;
13
+ private readonly intentTransformer;
14
+ private readonly fulfilmentMethodTransformer;
15
+ private readonly subscriptionManager;
16
+ constructor(appSync: ApiClient);
17
+ initiate(input: InitiateActionInput): Promise<ActionEntity>;
18
+ confirmOutcome(id: string): Promise<ActionEntity>;
19
+ listAvailable(input: ListAvailableActionsInput): Promise<ListAvailableActionsOutput>;
20
+ subscribe(input: SubscribeToActionsInput): Promise<void>;
21
+ unsubscribe(subscriptionId: string): void;
22
+ private setupUpdateSubscription;
23
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionFulfilmentMethod as ActionFulfilmentMethodGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { ActionFulfilmentMethod } from '../../../../public';
8
+ import { ActionFulfilmentMethodEntity } from '../../../domain/entities/action/actionEntity';
9
+ export declare class ActionFulfilmentMethodTransformer {
10
+ fromEntityToAPI(entity: ActionFulfilmentMethodEntity): ActionFulfilmentMethod;
11
+ fromAPIToEntity(data: ActionFulfilmentMethod): ActionFulfilmentMethodEntity;
12
+ fromGraphQLToEntity(data: ActionFulfilmentMethodGraphQL): ActionFulfilmentMethodEntity;
13
+ fromEntityToGraphQL(entity: ActionFulfilmentMethodEntity): ActionFulfilmentMethodGraphQL;
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionIntent as ActionIntentGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { ActionIntent } from '../../../../public';
8
+ import { ActionIntentEntity } from '../../../domain/entities/action/actionEntity';
9
+ export declare class ActionIntentTransformer {
10
+ fromEntityToAPI(entity: ActionIntentEntity): ActionIntent;
11
+ fromAPIToEntity(data: ActionIntent): ActionIntentEntity;
12
+ fromGraphQLToEntity(data: ActionIntentGraphQL): ActionIntentEntity;
13
+ fromEntityToGraphQL(entity: ActionIntentEntity): ActionIntentGraphQL;
14
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionOrigin as ActionOriginGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { ActionOrigin } from '../../../../public';
8
+ import { ActionOriginEntity } from '../../../domain/entities/action/actionEntity';
9
+ export declare class ActionOriginTransformer {
10
+ fromEntityToAPI(entity: ActionOriginEntity): ActionOrigin;
11
+ fromGraphQLToEntity(data: ActionOriginGraphQL): ActionOriginEntity;
12
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionStatus as ActionStatusGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { ActionStatus } from '../../../../public';
8
+ import { ActionStatusEntity } from '../../../domain/entities/action/actionEntity';
9
+ export declare class ActionStatusTransformer {
10
+ fromEntityToAPI(entity: ActionStatusEntity): ActionStatus;
11
+ fromGraphQLToEntity(data: ActionStatusGraphQL): ActionStatusEntity;
12
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionFulfilmentMethod as ActionFulfilmentMethodGraphQL, ActionIntent as ActionIntentGraphQL, ActionStatus as ActionStatusGraphQL, AssistedPayload as AssistedPayloadGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { Action } from '../../../../public/typings/action';
8
+ import { ActionEntity } from '../../../domain/entities/action/actionEntity';
9
+ /**
10
+ * Structural shape of the GraphQL `Action` fields consumed by this transformer.
11
+ * Kept intentionally narrow so it accepts both the full mutation/query result
12
+ * and the scalar-only subscription result (which omits `assistedPayload`).
13
+ */
14
+ export interface ActionGraphQLLike {
15
+ id: string;
16
+ virtualPresenceId: string;
17
+ dataHolderId?: string | null;
18
+ intent: ActionIntentGraphQL;
19
+ additionalInfo?: string | null;
20
+ fulfilmentMethod: ActionFulfilmentMethodGraphQL;
21
+ status: ActionStatusGraphQL;
22
+ assistedPayload?: AssistedPayloadGraphQL | null;
23
+ initiatedAtEpochMs?: number | null;
24
+ completedAtEpochMs?: number | null;
25
+ owner: string;
26
+ version: number;
27
+ createdAtEpochMs: number;
28
+ updatedAtEpochMs: number;
29
+ }
30
+ export declare class ActionTransformer {
31
+ private readonly intentTransformer;
32
+ private readonly fulfilmentMethodTransformer;
33
+ private readonly statusTransformer;
34
+ fromGraphQLToEntity(data: ActionGraphQLLike): ActionEntity;
35
+ fromEntityToAPI(entity: ActionEntity): Action;
36
+ private assistedPayloadFromGraphQL;
37
+ private contactFromGraphQL;
38
+ private emailTemplateFromGraphQL;
39
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { AvailableAction as AvailableActionGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { AvailableAction } from '../../../../public/typings/action';
8
+ import { AvailableActionEntity } from '../../../domain/entities/action/actionEntity';
9
+ export declare class AvailableActionTransformer {
10
+ private readonly intentTransformer;
11
+ private readonly fulfilmentMethodTransformer;
12
+ private readonly originTransformer;
13
+ fromGraphQLToEntity(data: AvailableActionGraphQL): AvailableActionEntity;
14
+ fromEntityToAPI(entity: AvailableActionEntity): AvailableAction;
15
+ }
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { ApiClientManager } from '@sudoplatform/sudo-api-client';
7
7
  import Observable from 'zen-observable';
8
- import { AnalysisResult, AnalysisResultConnection, ConnectVirtualPresenceInput, DataHolder, DataHolderConnection, ProviderConfiguration, ListVirtualPresencesInput, OnAnalysisResultUpdateSubscription, OnDataHoldersUpdateSubscription, OnVirtualPresenceUpdateSubscription, ScanOptionsInput, VirtualPresence, VirtualPresenceConnection } from '../../../gen/graphqlTypes';
8
+ import { AnalysisResult, AnalysisResultConnection, Action, AvailableActionConnection, ConnectVirtualPresenceInput, DataHolder, DataHolderConnection, DataHolderScanSummaryConnection, InitiateActionInput, OrganizationAnalysis, OrganizationAnalysisMode, ProviderConfiguration, ListVirtualPresencesInput, OnActionStatusUpdateSubscription, OnAnalysisResultUpdateSubscription, OnDataHoldersUpdateSubscription, OnVirtualPresenceUpdateSubscription, ScanOptionsInput, VirtualPresence, VirtualPresenceConnection } from '../../../gen/graphqlTypes';
9
9
  import { SubscriptionResult } from './baseSubscriptionManager';
10
10
  export declare class ApiClient {
11
11
  private readonly log;
@@ -23,15 +23,30 @@ export declare class ApiClient {
23
23
  limit?: number;
24
24
  nextToken?: string;
25
25
  }): Promise<DataHolderConnection>;
26
+ listDataHolderScanSummaries(input: {
27
+ dataHolderId: string;
28
+ limit?: number;
29
+ nextToken?: string;
30
+ }): Promise<DataHolderScanSummaryConnection>;
26
31
  getAnalysisResult(id: string): Promise<AnalysisResult | undefined>;
32
+ getOrganizationAnalysis(input: {
33
+ domain: string;
34
+ mode?: OrganizationAnalysisMode;
35
+ }): Promise<OrganizationAnalysis | undefined>;
27
36
  listAnalysisResults(input: {
28
37
  virtualPresenceId: string;
29
38
  limit?: number;
30
39
  nextToken?: string;
31
40
  }): Promise<AnalysisResultConnection>;
41
+ initiateAction(input: InitiateActionInput): Promise<Action>;
42
+ confirmActionOutcome(id: string): Promise<Action>;
43
+ listAvailableActions(input: {
44
+ dataHolderId: string;
45
+ }): Promise<AvailableActionConnection>;
32
46
  onVirtualPresenceUpdated(owner: string): Promise<Observable<SubscriptionResult<OnVirtualPresenceUpdateSubscription>>>;
33
47
  onDataHoldersUpdated(owner: string): Promise<Observable<SubscriptionResult<OnDataHoldersUpdateSubscription>>>;
34
48
  onAnalysisResultUpdated(owner: string): Promise<Observable<SubscriptionResult<OnAnalysisResultUpdateSubscription>>>;
49
+ onActionStatusUpdated(owner: string): Promise<Observable<SubscriptionResult<OnActionStatusUpdateSubscription>>>;
35
50
  private performQuery;
36
51
  private performMutation;
37
52
  private performSubscription;
@@ -6,6 +6,11 @@
6
6
  import { Logger } from '@sudoplatform/sudo-common';
7
7
  import Observable from 'zen-observable';
8
8
  import { ConnectionState } from '../../../public/typings/subscription';
9
+ /**
10
+ * The shape of a subscription message delivered to a subscription observer's
11
+ * `next` handler. Mirrors Amplify v6's `GraphqlSubscriptionMessage<T>`, whose
12
+ * payload is carried under `data`.
13
+ */
9
14
  export type SubscriptionResult<T> = {
10
15
  data: T;
11
16
  };
@@ -4,15 +4,17 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { DataHolderEntity } from '../../domain/entities/data-holder/dataHolderEntity';
7
- import { DataHolderService, ListDataHoldersInput, ListDataHoldersOutput, SubscribeToDataHoldersInput } from '../../domain/entities/data-holder/dataHolderService';
7
+ import { DataHolderService, ListDataHoldersInput, ListDataHoldersOutput, ListDataHolderScanSummariesInput, ListDataHolderScanSummariesOutput, SubscribeToDataHoldersInput } from '../../domain/entities/data-holder/dataHolderService';
8
8
  import { ApiClient } from '../common/apiClient';
9
9
  export declare class DefaultDataHolderService implements DataHolderService {
10
10
  private readonly appSync;
11
11
  private readonly dataHolderTransformer;
12
+ private readonly dataHolderScanSummaryTransformer;
12
13
  private readonly subscriptionManager;
13
14
  constructor(appSync: ApiClient);
14
15
  get(id: string): Promise<DataHolderEntity | undefined>;
15
16
  list(input: ListDataHoldersInput): Promise<ListDataHoldersOutput>;
17
+ listScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListDataHolderScanSummariesOutput>;
16
18
  subscribe(input: SubscribeToDataHoldersInput): Promise<void>;
17
19
  unsubscribe(subscriptionId: string): void;
18
20
  private setupUpdateSubscription;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { DataHolderScanSummary as DataHolderScanSummaryGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { DataHolderScanSummary } from '../../../../public/typings/dataHolder';
8
+ import { DataHolderScanSummaryEntity } from '../../../domain/entities/data-holder/dataHolderEntity';
9
+ export declare class DataHolderScanSummaryTransformer {
10
+ fromGraphQLToEntity(data: DataHolderScanSummaryGraphQL): DataHolderScanSummaryEntity;
11
+ fromEntityToAPI(entity: DataHolderScanSummaryEntity): DataHolderScanSummary;
12
+ /**
13
+ * The `categoryBreakdown` field is an AWSJSON scalar, which is delivered as a
14
+ * JSON-encoded string. Parse it into a category-to-count map. Accepts an
15
+ * already-parsed object for resilience.
16
+ */
17
+ private parseCategoryBreakdown;
18
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { OrganizationAnalysisEntity } from '../../domain/entities/organization-analysis/organizationAnalysisEntity';
7
+ import { GetOrganizationAnalysisInput, OrganizationAnalysisService } from '../../domain/entities/organization-analysis/organizationAnalysisService';
8
+ import { ApiClient } from '../common/apiClient';
9
+ export declare class DefaultOrganizationAnalysisService implements OrganizationAnalysisService {
10
+ private readonly appSync;
11
+ private readonly organizationAnalysisTransformer;
12
+ private readonly modeTransformer;
13
+ constructor(appSync: ApiClient);
14
+ getOrganizationAnalysis(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysisEntity | undefined>;
15
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { OrganizationAnalysisMode as OrganizationAnalysisModeGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { OrganizationAnalysisMode } from '../../../../public/typings/organizationAnalysis';
8
+ import { OrganizationAnalysisModeEntity } from '../../../domain/entities/organization-analysis/organizationAnalysisEntity';
9
+ export declare class OrganizationAnalysisModeTransformer {
10
+ fromAPIToEntity(mode: OrganizationAnalysisMode): OrganizationAnalysisModeEntity;
11
+ fromEntityToGraphQL(mode: OrganizationAnalysisModeEntity): OrganizationAnalysisModeGraphQL;
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { OrganizationAnalysis as OrganizationAnalysisGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { OrganizationAnalysis } from '../../../../public/typings/organizationAnalysis';
8
+ import { OrganizationAnalysisEntity } from '../../../domain/entities/organization-analysis/organizationAnalysisEntity';
9
+ export declare class OrganizationAnalysisTransformer {
10
+ private readonly statusTransformer;
11
+ private readonly dataTransformer;
12
+ fromGraphQLToEntity(data: OrganizationAnalysisGraphQL): OrganizationAnalysisEntity;
13
+ fromEntityToAPI(entity: OrganizationAnalysisEntity): OrganizationAnalysis;
14
+ }
@@ -0,0 +1,187 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * The user-facing intent of an action. This is a service-owned taxonomy,
8
+ * decoupled from any upstream provider's action vocabulary.
9
+ *
10
+ * Clients must tolerate unknown values: an unrecognised intent is represented
11
+ * as `Other` rather than failing, so newly added intents do not break existing
12
+ * clients.
13
+ *
14
+ * @property StopContact Unsubscribe / opt out of marketing communications.
15
+ * @property AccessMyData Data subject access / portability request.
16
+ * @property DeleteMyData Account deletion / data erasure.
17
+ * @property LimitDataUse Opt out of sale / tracking, manage consent.
18
+ * @property Other Anything unmapped; carries additionalInfo.
19
+ *
20
+ * @enum
21
+ */
22
+ export declare enum ActionIntentEntity {
23
+ StopContact = "STOP_CONTACT",
24
+ AccessMyData = "ACCESS_MY_DATA",
25
+ DeleteMyData = "DELETE_MY_DATA",
26
+ LimitDataUse = "LIMIT_DATA_USE",
27
+ Other = "OTHER"
28
+ }
29
+ /**
30
+ * How an action is fulfilled from the user's perspective.
31
+ *
32
+ * @property Assisted The service returns structured materials for the client to
33
+ * complete the action.
34
+ * @property Delegated The service performs the action on the user's behalf.
35
+ *
36
+ * @enum
37
+ */
38
+ export declare enum ActionFulfilmentMethodEntity {
39
+ Assisted = "ASSISTED",
40
+ Delegated = "DELEGATED"
41
+ }
42
+ /**
43
+ * Which source contributed an available action.
44
+ *
45
+ * @property Static Always-possible action for the virtual presence type.
46
+ * @property Analysis Derived from an analysis source's reported actions.
47
+ * @property Discovery Derived from a discovery scan (e.g. List-Unsubscribe).
48
+ *
49
+ * @enum
50
+ */
51
+ export declare enum ActionOriginEntity {
52
+ Static = "STATIC",
53
+ Analysis = "ANALYSIS",
54
+ Discovery = "DISCOVERY",
55
+ Unknown = "UNKNOWN"
56
+ }
57
+ /**
58
+ * Lifecycle status of a persisted action instance.
59
+ *
60
+ * @property Pending The action has been created but not yet started.
61
+ * @property InProgress The action is being performed.
62
+ * @property CompletedUnverified The action completed but has not been verified.
63
+ * @property CompletedVerified The action completed and has been verified.
64
+ * @property Failed The action failed to complete.
65
+ * @property RequiresUserInput The action requires further input from the user.
66
+ * @property Contradicted Subsequent evidence contradicts the action's completion.
67
+ *
68
+ * @enum
69
+ */
70
+ export declare enum ActionStatusEntity {
71
+ Pending = "PENDING",
72
+ InProgress = "IN_PROGRESS",
73
+ CompletedUnverified = "COMPLETED_UNVERIFIED",
74
+ CompletedVerified = "COMPLETED_VERIFIED",
75
+ Failed = "FAILED",
76
+ RequiresUserInput = "REQUIRES_USER_INPUT",
77
+ Contradicted = "CONTRADICTED",
78
+ Unknown = "UNKNOWN"
79
+ }
80
+ /**
81
+ * Contact materials for an assisted action.
82
+ *
83
+ * @interface ActionContactEntity
84
+ * @property {string} email Contact email address, when available.
85
+ * @property {string} phone Contact phone number, when available.
86
+ * @property {string} address Contact postal address, when available.
87
+ */
88
+ export interface ActionContactEntity {
89
+ email?: string;
90
+ phone?: string;
91
+ address?: string;
92
+ }
93
+ /**
94
+ * An email template returned for an assisted action. The body may contain
95
+ * placeholders (e.g. "{{fullName}}") for fields the user supplies client-side.
96
+ *
97
+ * @interface AssistedEmailTemplateEntity
98
+ * @property {string} subject Subject line for the email, when available.
99
+ * @property {string} body Body of the email; may contain placeholders.
100
+ */
101
+ export interface AssistedEmailTemplateEntity {
102
+ subject?: string;
103
+ body: string;
104
+ }
105
+ /**
106
+ * Materials for an assisted action. The service supplies the organisation
107
+ * contact points and any source-provided instructions, but never the user's own
108
+ * data.
109
+ *
110
+ * @interface AssistedPayloadEntity
111
+ * @property {string} toAddress Recipient address for an assisted email action.
112
+ * @property {string} unsubscribeUrl Unsubscribe URL, when available.
113
+ * @property {string} unsubscribeMailto Unsubscribe mailto link, when available.
114
+ * @property {ActionContactEntity} contact Organisation contact points, when available.
115
+ * @property {string} jurisdiction Jurisdiction relevant to the action, when available.
116
+ * @property {string} instructions Free-text instructions, potentially provided
117
+ * verbatim by an analysis source.
118
+ * @property {AssistedEmailTemplateEntity} emailTemplate An email template for the
119
+ * action, resolved from a deployment-time template store.
120
+ */
121
+ export interface AssistedPayloadEntity {
122
+ toAddress?: string;
123
+ unsubscribeUrl?: string;
124
+ unsubscribeMailto?: string;
125
+ contact?: ActionContactEntity;
126
+ jurisdiction?: string;
127
+ instructions?: string;
128
+ emailTemplate?: AssistedEmailTemplateEntity;
129
+ }
130
+ /**
131
+ * Core entity representation of a persisted, initiated action instance scoped to
132
+ * a data holder relationship.
133
+ *
134
+ * @interface ActionEntity
135
+ * @property {string} id Unique identifier associated with the action.
136
+ * @property {string} virtualPresenceId The virtual presence this action belongs to.
137
+ * @property {string} dataHolderId The data holder relationship this action is scoped to.
138
+ * @property {ActionIntentEntity} intent The user-facing intent of the action.
139
+ * @property {string} additionalInfo Additional info, populated when intent is `Other`.
140
+ * @property {ActionFulfilmentMethodEntity} fulfilmentMethod How the action is fulfilled.
141
+ * @property {ActionStatusEntity} status Current lifecycle status of the action.
142
+ * @property {AssistedPayloadEntity} assistedPayload Materials for an assisted action.
143
+ * Undefined for a delegated action.
144
+ * @property {Date} initiatedAt Date for when the action was initiated.
145
+ * @property {Date} completedAt Date for when the action completed.
146
+ * @property {string} owner Unique identifier of the user.
147
+ * @property {number} version Version of this entity. Increments on update.
148
+ * @property {Date} createdAt Date for when the action was created.
149
+ * @property {Date} updatedAt Date for when the action was last updated.
150
+ */
151
+ export interface ActionEntity {
152
+ id: string;
153
+ virtualPresenceId: string;
154
+ dataHolderId?: string;
155
+ intent: ActionIntentEntity;
156
+ additionalInfo?: string;
157
+ fulfilmentMethod: ActionFulfilmentMethodEntity;
158
+ status: ActionStatusEntity;
159
+ assistedPayload?: AssistedPayloadEntity;
160
+ initiatedAt?: Date;
161
+ completedAt?: Date;
162
+ owner: string;
163
+ version: number;
164
+ createdAt: Date;
165
+ updatedAt: Date;
166
+ }
167
+ /**
168
+ * Core entity representation of a derived, non-persisted action the user could
169
+ * take against a data holder. Produced at query time by merging static,
170
+ * analysis, and discovery sources.
171
+ *
172
+ * @interface AvailableActionEntity
173
+ * @property {ActionIntentEntity} intent The user-facing intent of the action.
174
+ * @property {string} additionalInfo Additional info, populated when intent is `Other`.
175
+ * @property {ActionFulfilmentMethodEntity} fulfilmentMethod How the action is fulfilled.
176
+ * @property {ActionOriginEntity} origin Which source contributed this action.
177
+ * @property {string} title Short presentation hint for the action's title.
178
+ * @property {string} description Short presentation hint describing the action.
179
+ */
180
+ export interface AvailableActionEntity {
181
+ intent: ActionIntentEntity;
182
+ additionalInfo?: string;
183
+ fulfilmentMethod: ActionFulfilmentMethodEntity;
184
+ origin: ActionOriginEntity;
185
+ title?: string;
186
+ description?: string;
187
+ }
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ActionSubscriber } from '../../../../public/typings/subscription';
7
+ import { ActionEntity, ActionFulfilmentMethodEntity, ActionIntentEntity, AvailableActionEntity } from './actionEntity';
8
+ /**
9
+ * Input for `ActionService.initiate` method.
10
+ *
11
+ * @interface InitiateActionInput
12
+ * @property {string} dataHolderId The data holder relationship to scope the action to.
13
+ * @property {ActionIntentEntity} intent The intent of the action to initiate.
14
+ * @property {ActionFulfilmentMethodEntity} fulfilmentMethod The fulfilment method the
15
+ * client was offered for this intent.
16
+ */
17
+ export interface InitiateActionInput {
18
+ dataHolderId: string;
19
+ intent: ActionIntentEntity;
20
+ fulfilmentMethod: ActionFulfilmentMethodEntity;
21
+ }
22
+ /**
23
+ * Input for `ActionService.listAvailable` method.
24
+ *
25
+ * @interface ListAvailableActionsInput
26
+ * @property {string} dataHolderId The data holder relationship to list available actions for.
27
+ */
28
+ export interface ListAvailableActionsInput {
29
+ dataHolderId: string;
30
+ }
31
+ /**
32
+ * Output for `ActionService.listAvailable` method.
33
+ *
34
+ * @interface ListAvailableActionsOutput
35
+ * @property {AvailableActionEntity[]} availableActions The list of available actions
36
+ * retrieved in this query.
37
+ * @property {string} nextToken A token generated by a previous call. This allows for pagination.
38
+ */
39
+ export interface ListAvailableActionsOutput {
40
+ availableActions: AvailableActionEntity[];
41
+ nextToken?: string;
42
+ }
43
+ /**
44
+ * Input for `ActionService.subscribe` method.
45
+ *
46
+ * @interface SubscribeToActionsInput
47
+ * @property {string} subscriptionId A unique identifier for this subscription.
48
+ * @property {string} owner The identifier of the owner to subscribe for.
49
+ * @property {ActionSubscriber} subscriber The subscriber to receive events.
50
+ */
51
+ export interface SubscribeToActionsInput {
52
+ subscriptionId: string;
53
+ owner: string;
54
+ subscriber: ActionSubscriber;
55
+ }
56
+ /**
57
+ * Core entity representation of an action service used in business logic.
58
+ * Used to initiate, confirm, and list actions against data holder relationships.
59
+ *
60
+ * @interface ActionService
61
+ */
62
+ export interface ActionService {
63
+ /**
64
+ * Initiate an action against a data holder relationship.
65
+ *
66
+ * @param {InitiateActionInput} input Parameters used to initiate the action.
67
+ * @returns {ActionEntity} The initiated action.
68
+ */
69
+ initiate(input: InitiateActionInput): Promise<ActionEntity>;
70
+ /**
71
+ * Confirm that an assisted or delegated action was completed, transitioning it
72
+ * from `CompletedUnverified` to `CompletedVerified`.
73
+ *
74
+ * @param {string} id The unique identifier of the action to confirm.
75
+ * @returns {ActionEntity} The confirmed action.
76
+ */
77
+ confirmOutcome(id: string): Promise<ActionEntity>;
78
+ /**
79
+ * Retrieve the list of actions currently available for a data holder relationship.
80
+ *
81
+ * @param {ListAvailableActionsInput} input Parameters used to list available actions.
82
+ * @returns {ListAvailableActionsOutput} A list of available actions. Can be empty if
83
+ * no actions are available.
84
+ */
85
+ listAvailable(input: ListAvailableActionsInput): Promise<ListAvailableActionsOutput>;
86
+ /**
87
+ * Subscribe to action status events.
88
+ *
89
+ * @param {SubscribeToActionsInput} input Parameters used to subscribe to action
90
+ * status events.
91
+ */
92
+ subscribe(input: SubscribeToActionsInput): Promise<void>;
93
+ /**
94
+ * Unsubscribe from action status events.
95
+ *
96
+ * @param {string} subscriptionId The unique identifier of the subscription to unsubscribe from.
97
+ */
98
+ unsubscribe(subscriptionId: string): void;
99
+ }
@@ -76,10 +76,24 @@ export interface AnalysisResultDataEntity {
76
76
  * @interface PrivacyScoreEntity
77
77
  * @property {number} score Numeric score (0-100). Higher is better.
78
78
  * @property {ScoreContributionEntity[]} breakdown Breakdown of how each aspect contributed to the score.
79
+ * @property {ScoreCoverageEntity} coverage How much of the scoring-relevant input had a known value.
79
80
  */
80
81
  export interface PrivacyScoreEntity {
81
82
  score: number;
82
83
  breakdown: ScoreContributionEntity[];
84
+ coverage: ScoreCoverageEntity;
85
+ }
86
+ /**
87
+ * How much of the scoring-relevant input had a known value. A low ratio means the
88
+ * score rests on few known signals and should be treated as lower-confidence.
89
+ *
90
+ * @interface ScoreCoverageEntity
91
+ * @property {number} evaluated Scoring aspects with a known value.
92
+ * @property {number} total Total scoring aspects the calculator considers.
93
+ */
94
+ export interface ScoreCoverageEntity {
95
+ evaluated: number;
96
+ total: number;
83
97
  }
84
98
  /**
85
99
  * A single scoring aspect and its contribution to the overall score.
@@ -49,3 +49,37 @@ export declare enum DataHolderProtectionStateEntity {
49
49
  Resolved = "RESOLVED",
50
50
  Unknown = "UNKNOWN"
51
51
  }
52
+ /**
53
+ * Core entity representation of email interaction metrics captured during a
54
+ * single scan for a specific data holder.
55
+ *
56
+ * @interface DataHolderScanSummaryEntity
57
+ * @property {string} dataHolderId The data holder these metrics apply to.
58
+ * @property {string} owner Unique identifier of the user.
59
+ * @property {Date} scannedAt Date for when the scan was performed.
60
+ * @property {Date} scanRangeFrom Start of the scanned time range.
61
+ * @property {Date} scanRangeTo End of the scanned time range.
62
+ * @property {number} emailCount Total number of emails observed in the scan range.
63
+ * @property {number} readCount Number of emails that were read.
64
+ * @property {number} readRate Ratio of read emails to total emails.
65
+ * @property {number} marketingEmailCount Number of marketing emails observed.
66
+ * @property {number} marketingEmailOpened Number of marketing emails that were opened.
67
+ * @property {number} marketingOpenRate Ratio of opened marketing emails to marketing emails.
68
+ * @property {Record<string, number>} categoryBreakdown Count of emails per category.
69
+ * @property {number} uncategorizedCount Number of emails that could not be categorized.
70
+ */
71
+ export interface DataHolderScanSummaryEntity {
72
+ dataHolderId: string;
73
+ owner: string;
74
+ scannedAt: Date;
75
+ scanRangeFrom: Date;
76
+ scanRangeTo: Date;
77
+ emailCount: number;
78
+ readCount: number;
79
+ readRate: number;
80
+ marketingEmailCount: number;
81
+ marketingEmailOpened: number;
82
+ marketingOpenRate: number;
83
+ categoryBreakdown: Record<string, number>;
84
+ uncategorizedCount: number;
85
+ }