@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.
- package/cjs/gen/graphqlTypes.js +2291 -780
- package/cjs/private/data/action/actionSubscriptionManager.js +25 -0
- package/cjs/private/data/action/defaultActionService.js +80 -0
- package/cjs/private/data/action/transformer/actionFulfilmentMethodTransformer.js +47 -0
- package/cjs/private/data/action/transformer/actionIntentTransformer.js +69 -0
- package/cjs/private/data/action/transformer/actionOriginTransformer.js +37 -0
- package/cjs/private/data/action/transformer/actionStatusTransformer.js +53 -0
- package/cjs/private/data/action/transformer/actionTransformer.js +85 -0
- package/cjs/private/data/action/transformer/availableActionTransformer.js +37 -0
- package/cjs/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
- package/cjs/private/data/common/apiClient.js +58 -0
- package/cjs/private/data/data-holder/defaultDataHolderService.js +12 -0
- package/cjs/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +56 -0
- package/cjs/private/data/organization-analysis/defaultOrganizationAnalysisService.js +31 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +29 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +45 -0
- package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
- package/cjs/private/domain/entities/action/actionEntity.js +86 -0
- package/cjs/private/domain/entities/action/actionService.js +7 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +24 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisService.js +7 -0
- package/cjs/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +25 -0
- package/cjs/private/domain/use-cases/action/initiateActionUseCase.js +26 -0
- package/cjs/private/domain/use-cases/action/listAvailableActionsUseCase.js +26 -0
- package/cjs/private/domain/use-cases/action/subscribeToActionUseCase.js +37 -0
- package/cjs/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +27 -0
- package/cjs/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +29 -0
- package/cjs/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +25 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +133 -6
- package/cjs/public/inputs/action.js +7 -0
- package/cjs/public/inputs/index.js +2 -0
- package/cjs/public/inputs/organizationAnalysis.js +7 -0
- package/cjs/public/typings/action.js +85 -0
- package/cjs/public/typings/index.js +2 -0
- package/cjs/public/typings/organizationAnalysis.js +24 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/DefaultSudoPrivacyInteractionClient.html +176 -21
- package/docs/enums/ActionFulfilmentMethod.html +63 -0
- package/docs/enums/ActionIntent.html +84 -0
- package/docs/enums/ActionOrigin.html +75 -0
- package/docs/enums/ActionStatus.html +99 -0
- package/docs/enums/ConnectionState.html +3 -3
- package/docs/enums/DataCategory.html +18 -18
- package/docs/enums/DataHolderProtectionState.html +5 -5
- package/docs/enums/OrganizationAnalysisMode.html +70 -0
- package/docs/enums/OrganizationCategory.html +30 -30
- package/docs/enums/ProviderType.html +3 -3
- package/docs/enums/RetentionStyle.html +5 -5
- package/docs/enums/ShareStyle.html +6 -6
- package/docs/enums/SignalValue.html +4 -4
- package/docs/enums/VirtualPresenceState.html +7 -7
- package/docs/hierarchy.html +6 -5
- package/docs/interfaces/Action.html +167 -0
- package/docs/interfaces/ActionContact.html +77 -0
- package/docs/interfaces/ActionSubscriber.html +92 -0
- package/docs/interfaces/AnalysisResultSubscriber.html +3 -3
- package/docs/interfaces/AssistedEmailTemplate.html +70 -0
- package/docs/interfaces/AssistedPayload.html +113 -0
- package/docs/interfaces/AvailableAction.html +102 -0
- package/docs/interfaces/CapabilitySignals.html +9 -9
- package/docs/interfaces/CategorySignals.html +11 -11
- package/docs/interfaces/DataHolder.html +24 -14
- package/docs/interfaces/DataHolderScanSummary.html +158 -0
- package/docs/interfaces/DataHolderSubscriber.html +3 -3
- package/docs/interfaces/GetDataHolderOptions.html +63 -0
- package/docs/interfaces/GetOrganizationAnalysisInput.html +70 -0
- package/docs/interfaces/InitiateActionInput.html +79 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListAvailableActionsInput.html +61 -0
- package/docs/interfaces/ListDataHolderScanSummariesInput.html +85 -0
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +1 -1
- package/docs/interfaces/OrganizationAnalysis.html +131 -0
- package/docs/interfaces/OrganizationIdentity.html +5 -5
- package/docs/interfaces/Pagination.html +2 -1
- package/docs/interfaces/PrivacyScore.html +13 -5
- package/docs/interfaces/PrivacySummary.html +4 -4
- package/docs/interfaces/RetentionInfo.html +4 -4
- package/docs/interfaces/RiskIndicators.html +8 -8
- package/docs/interfaces/ScoreContribution.html +3 -3
- package/docs/interfaces/ScoreCoverage.html +70 -0
- package/docs/interfaces/SudoPrivacyInteractionClient.html +169 -21
- package/docs/interfaces/VirtualPresence.html +21 -12
- package/docs/interfaces/VirtualPresenceSubscriber.html +3 -3
- package/docs/modules.html +4 -4
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +2290 -779
- package/lib/private/data/action/actionSubscriptionManager.js +21 -0
- package/lib/private/data/action/defaultActionService.js +76 -0
- package/lib/private/data/action/transformer/actionFulfilmentMethodTransformer.js +43 -0
- package/lib/private/data/action/transformer/actionIntentTransformer.js +65 -0
- package/lib/private/data/action/transformer/actionOriginTransformer.js +33 -0
- package/lib/private/data/action/transformer/actionStatusTransformer.js +49 -0
- package/lib/private/data/action/transformer/actionTransformer.js +81 -0
- package/lib/private/data/action/transformer/availableActionTransformer.js +33 -0
- package/lib/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
- package/lib/private/data/common/apiClient.js +59 -1
- package/lib/private/data/data-holder/defaultDataHolderService.js +12 -0
- package/lib/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +52 -0
- package/lib/private/data/organization-analysis/defaultOrganizationAnalysisService.js +27 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +25 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +41 -0
- package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
- package/lib/private/domain/entities/action/actionEntity.js +83 -0
- package/lib/private/domain/entities/action/actionService.js +6 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +21 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisService.js +6 -0
- package/lib/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +21 -0
- package/lib/private/domain/use-cases/action/initiateActionUseCase.js +22 -0
- package/lib/private/domain/use-cases/action/listAvailableActionsUseCase.js +22 -0
- package/lib/private/domain/use-cases/action/subscribeToActionUseCase.js +33 -0
- package/lib/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +23 -0
- package/lib/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +25 -0
- package/lib/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +21 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +133 -6
- package/lib/public/inputs/action.js +6 -0
- package/lib/public/inputs/index.js +2 -0
- package/lib/public/inputs/organizationAnalysis.js +6 -0
- package/lib/public/typings/action.js +82 -0
- package/lib/public/typings/index.js +2 -0
- package/lib/public/typings/organizationAnalysis.js +21 -0
- package/package.json +5 -3
- package/types/gen/graphqlTypes.d.ts +569 -1
- package/types/private/data/action/actionSubscriptionManager.d.ts +19 -0
- package/types/private/data/action/defaultActionService.d.ts +23 -0
- package/types/private/data/action/transformer/actionFulfilmentMethodTransformer.d.ts +14 -0
- package/types/private/data/action/transformer/actionIntentTransformer.d.ts +14 -0
- package/types/private/data/action/transformer/actionOriginTransformer.d.ts +12 -0
- package/types/private/data/action/transformer/actionStatusTransformer.d.ts +12 -0
- package/types/private/data/action/transformer/actionTransformer.d.ts +39 -0
- package/types/private/data/action/transformer/availableActionTransformer.d.ts +15 -0
- package/types/private/data/common/apiClient.d.ts +16 -1
- package/types/private/data/common/baseSubscriptionManager.d.ts +5 -0
- package/types/private/data/data-holder/defaultDataHolderService.d.ts +3 -1
- package/types/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.d.ts +18 -0
- package/types/private/data/organization-analysis/defaultOrganizationAnalysisService.d.ts +15 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.d.ts +12 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisTransformer.d.ts +14 -0
- package/types/private/domain/entities/action/actionEntity.d.ts +187 -0
- package/types/private/domain/entities/action/actionService.d.ts +99 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +14 -0
- package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +34 -0
- package/types/private/domain/entities/data-holder/dataHolderService.d.ts +35 -1
- package/types/private/domain/entities/organization-analysis/organizationAnalysisEntity.d.ts +53 -0
- package/types/private/domain/entities/organization-analysis/organizationAnalysisService.d.ts +35 -0
- package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +3 -0
- package/types/private/domain/use-cases/action/confirmActionOutcomeUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/action/initiateActionUseCase.d.ts +17 -0
- package/types/private/domain/use-cases/action/listAvailableActionsUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/action/subscribeToActionUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/action/unsubscribeFromActionUseCase.d.ts +15 -0
- package/types/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.d.ts +36 -0
- package/types/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.d.ts +16 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +19 -3
- package/types/public/inputs/action.d.ts +30 -0
- package/types/public/inputs/dataHolder.d.ts +22 -0
- package/types/public/inputs/index.d.ts +2 -0
- package/types/public/inputs/organizationAnalysis.d.ts +18 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +64 -3
- package/types/public/typings/action.d.ts +185 -0
- package/types/public/typings/analysisResult.d.ts +14 -0
- package/types/public/typings/dataHolder.d.ts +38 -0
- package/types/public/typings/index.d.ts +2 -0
- package/types/public/typings/organizationAnalysis.d.ts +53 -0
- package/types/public/typings/subscription.d.ts +23 -0
- package/types/public/typings/virtualPresence.d.ts +3 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { DataHolderSubscriber } from '../../../../public/typings/subscription';
|
|
7
|
-
import { DataHolderEntity } from './dataHolderEntity';
|
|
7
|
+
import { DataHolderEntity, DataHolderScanSummaryEntity } from './dataHolderEntity';
|
|
8
8
|
/**
|
|
9
9
|
* Input for `DataHolderService.list` method.
|
|
10
10
|
*
|
|
@@ -30,6 +30,32 @@ export interface ListDataHoldersOutput {
|
|
|
30
30
|
dataHolders: DataHolderEntity[];
|
|
31
31
|
nextToken?: string;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Input for `DataHolderService.listScanSummaries` method.
|
|
35
|
+
*
|
|
36
|
+
* @interface ListDataHolderScanSummariesInput
|
|
37
|
+
* @property {string} dataHolderId The data holder to list scan summaries for.
|
|
38
|
+
* @property {number} limit Number of records to return.
|
|
39
|
+
* @property {string} nextToken A token generated by a previous call to
|
|
40
|
+
* `DataHolderService.listScanSummaries`. This allows for pagination.
|
|
41
|
+
*/
|
|
42
|
+
export interface ListDataHolderScanSummariesInput {
|
|
43
|
+
dataHolderId: string;
|
|
44
|
+
limit?: number;
|
|
45
|
+
nextToken?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Output for `DataHolderService.listScanSummaries` method.
|
|
49
|
+
*
|
|
50
|
+
* @interface ListDataHolderScanSummariesOutput
|
|
51
|
+
* @property {DataHolderScanSummaryEntity[]} scanSummaries The list of scan summaries
|
|
52
|
+
* retrieved in this query.
|
|
53
|
+
* @property {string} nextToken A token generated by a previous call. This allows for pagination.
|
|
54
|
+
*/
|
|
55
|
+
export interface ListDataHolderScanSummariesOutput {
|
|
56
|
+
scanSummaries: DataHolderScanSummaryEntity[];
|
|
57
|
+
nextToken?: string;
|
|
58
|
+
}
|
|
33
59
|
/**
|
|
34
60
|
* Input for `DataHolderService.subscribe` method.
|
|
35
61
|
*
|
|
@@ -65,6 +91,14 @@ export interface DataHolderService {
|
|
|
65
91
|
* Can be empty if no data holders found.
|
|
66
92
|
*/
|
|
67
93
|
list(input: ListDataHoldersInput): Promise<ListDataHoldersOutput>;
|
|
94
|
+
/**
|
|
95
|
+
* Retrieve a list of scan summaries for a data holder (most recent first).
|
|
96
|
+
*
|
|
97
|
+
* @param {ListDataHolderScanSummariesInput} input Parameters used to list scan summaries.
|
|
98
|
+
* @returns {ListDataHolderScanSummariesOutput} A list of scan summaries matching the
|
|
99
|
+
* search criteria. Can be empty if no scan summaries found.
|
|
100
|
+
*/
|
|
101
|
+
listScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListDataHolderScanSummariesOutput>;
|
|
68
102
|
/**
|
|
69
103
|
* Subscribe to data holder state events.
|
|
70
104
|
*
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { AnalysisResultDataEntity, AnalysisResultStatusEntity } from '../analysis-result/analysisResultEntity';
|
|
7
|
+
/**
|
|
8
|
+
* Core entity representation of a shared, domain-keyed privacy analysis of an
|
|
9
|
+
* organization.
|
|
10
|
+
*
|
|
11
|
+
* The same underlying analysis is returned to every caller asking about the same
|
|
12
|
+
* domain; it carries only organization-generic signals. `id` equals the analyzed
|
|
13
|
+
* domain and `owner` is the requesting caller.
|
|
14
|
+
*
|
|
15
|
+
* @interface OrganizationAnalysisEntity
|
|
16
|
+
* @property {string} id Identifies the shared analysis. Equal to the analyzed domain.
|
|
17
|
+
* @property {string} domain The analyzed domain (equal to id).
|
|
18
|
+
* @property {AnalysisResultStatusEntity} status Aggregate status. PENDING while an asynchronous
|
|
19
|
+
* source is still resolving; re-query for the terminal result.
|
|
20
|
+
* @property {Date} lastAnalyzedAt When the aggregate was last derived.
|
|
21
|
+
* @property {AnalysisResultDataEntity} data Structured analysis payload. Populated when status
|
|
22
|
+
* is COMPLETE or PARTIAL.
|
|
23
|
+
* @property {string} owner The caller who requested this view. The underlying analysis is shared.
|
|
24
|
+
* @property {number} version Version of this entity. Increments on update.
|
|
25
|
+
* @property {Date} createdAt Date for when the analysis was created.
|
|
26
|
+
* @property {Date} updatedAt Date for when the analysis was last updated.
|
|
27
|
+
*/
|
|
28
|
+
export interface OrganizationAnalysisEntity {
|
|
29
|
+
id: string;
|
|
30
|
+
domain: string;
|
|
31
|
+
status: AnalysisResultStatusEntity;
|
|
32
|
+
lastAnalyzedAt: Date;
|
|
33
|
+
data?: AnalysisResultDataEntity;
|
|
34
|
+
owner: string;
|
|
35
|
+
version: number;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Controls how `getOrganizationAnalysis` obtains source results when the stored
|
|
41
|
+
* analysis is stale or absent.
|
|
42
|
+
*
|
|
43
|
+
* @property ANALYZE Read-through: request analysis from the sources, which may compute and
|
|
44
|
+
* leave the result PENDING until asynchronous work completes.
|
|
45
|
+
* @property FETCH Pull only the sources' existing values; never request new work. A stale
|
|
46
|
+
* domain with no existing source value is not moved to PENDING.
|
|
47
|
+
*
|
|
48
|
+
* @enum
|
|
49
|
+
*/
|
|
50
|
+
export declare enum OrganizationAnalysisModeEntity {
|
|
51
|
+
Analyze = "ANALYZE",
|
|
52
|
+
Fetch = "FETCH"
|
|
53
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OrganizationAnalysisEntity, OrganizationAnalysisModeEntity } from './organizationAnalysisEntity';
|
|
7
|
+
/**
|
|
8
|
+
* Input for `OrganizationAnalysisService.getOrganizationAnalysis` method.
|
|
9
|
+
*
|
|
10
|
+
* @interface GetOrganizationAnalysisInput
|
|
11
|
+
* @property {string} domain The domain to analyze.
|
|
12
|
+
* @property {OrganizationAnalysisModeEntity} mode How to obtain source results. When omitted,
|
|
13
|
+
* the backend behaves as ANALYZE.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetOrganizationAnalysisInput {
|
|
16
|
+
domain: string;
|
|
17
|
+
mode?: OrganizationAnalysisModeEntity;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Core entity representation of an organization analysis service used in business logic.
|
|
21
|
+
*
|
|
22
|
+
* @interface OrganizationAnalysisService
|
|
23
|
+
*/
|
|
24
|
+
export interface OrganizationAnalysisService {
|
|
25
|
+
/**
|
|
26
|
+
* Analyze (read-through) and return the shared, organization-generic analysis for a domain.
|
|
27
|
+
* Returns a result with PENDING status when an asynchronous source is still resolving;
|
|
28
|
+
* re-query for the terminal result.
|
|
29
|
+
*
|
|
30
|
+
* @param {GetOrganizationAnalysisInput} input Parameters used to obtain the analysis.
|
|
31
|
+
* @returns {OrganizationAnalysisEntity | undefined} The organization analysis, or undefined
|
|
32
|
+
* if not found.
|
|
33
|
+
*/
|
|
34
|
+
getOrganizationAnalysis(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysisEntity | undefined>;
|
|
35
|
+
}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* @property {string} identifier The presence identifier (e.g. email address).
|
|
17
17
|
* @property {VirtualPresenceStateEntity} state The current state of the virtual presence.
|
|
18
18
|
* @property {Date} lastScannedAt Date for when the virtual presence was last scanned.
|
|
19
|
+
* @property {string} lastScanFailureReason Reason the most recent completed scan failed (an error/exception name).
|
|
20
|
+
* Undefined when the most recent completed scan succeeded (or none has completed).
|
|
19
21
|
* @property {Date} createdAt Date for when the virtual presence was created.
|
|
20
22
|
* @property {Date} updatedAt Date for when the virtual presence was last updated.
|
|
21
23
|
*/
|
|
@@ -27,6 +29,7 @@ export interface VirtualPresenceEntity {
|
|
|
27
29
|
identifier: string;
|
|
28
30
|
state: VirtualPresenceStateEntity;
|
|
29
31
|
lastScannedAt: Date;
|
|
32
|
+
lastScanFailureReason?: string;
|
|
30
33
|
createdAt: Date;
|
|
31
34
|
updatedAt: Date;
|
|
32
35
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionEntity } from '../../entities/action/actionEntity';
|
|
7
|
+
import { ActionService } from '../../entities/action/actionService';
|
|
8
|
+
/**
|
|
9
|
+
* Application business logic for confirming that an action was completed.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ConfirmActionOutcomeUseCase {
|
|
12
|
+
private readonly actionService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(actionService: ActionService);
|
|
15
|
+
execute(id: string): Promise<ActionEntity>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionEntity } from '../../entities/action/actionEntity';
|
|
7
|
+
import { ActionService, InitiateActionInput } from '../../entities/action/actionService';
|
|
8
|
+
/**
|
|
9
|
+
* Application business logic for initiating an action against a data holder
|
|
10
|
+
* relationship.
|
|
11
|
+
*/
|
|
12
|
+
export declare class InitiateActionUseCase {
|
|
13
|
+
private readonly actionService;
|
|
14
|
+
private readonly log;
|
|
15
|
+
constructor(actionService: ActionService);
|
|
16
|
+
execute(input: InitiateActionInput): Promise<ActionEntity>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionService, ListAvailableActionsInput, ListAvailableActionsOutput } from '../../entities/action/actionService';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for listing the actions available for a data holder
|
|
9
|
+
* relationship.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ListAvailableActionsUseCase {
|
|
12
|
+
private readonly actionService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(actionService: ActionService);
|
|
15
|
+
execute(input: ListAvailableActionsInput): Promise<ListAvailableActionsOutput>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { SudoUserClient } from '@sudoplatform/sudo-user';
|
|
7
|
+
import { ActionSubscriber } from '../../../../public/typings/subscription';
|
|
8
|
+
import { ActionService } from '../../entities/action/actionService';
|
|
9
|
+
/**
|
|
10
|
+
* Input for `SubscribeToActionUseCase`.
|
|
11
|
+
*
|
|
12
|
+
* @interface SubscribeToActionUseCaseInput
|
|
13
|
+
*/
|
|
14
|
+
export interface SubscribeToActionUseCaseInput {
|
|
15
|
+
subscriptionId: string;
|
|
16
|
+
subscriber: ActionSubscriber;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Application business logic for subscribing to action status events.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SubscribeToActionUseCase {
|
|
22
|
+
private readonly actionService;
|
|
23
|
+
private readonly sudoUserClient;
|
|
24
|
+
private readonly log;
|
|
25
|
+
constructor(actionService: ActionService, sudoUserClient: SudoUserClient);
|
|
26
|
+
execute(input: SubscribeToActionUseCaseInput): Promise<void>;
|
|
27
|
+
}
|
|
@@ -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 { ActionService } from '../../entities/action/actionService';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for unsubscribing from action status events.
|
|
9
|
+
*/
|
|
10
|
+
export declare class UnsubscribeFromActionUseCase {
|
|
11
|
+
private readonly actionService;
|
|
12
|
+
private readonly log;
|
|
13
|
+
constructor(actionService: ActionService);
|
|
14
|
+
execute(subscriptionId: string): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DataHolderScanSummaryEntity } from '../../entities/data-holder/dataHolderEntity';
|
|
7
|
+
import { DataHolderService } from '../../entities/data-holder/dataHolderService';
|
|
8
|
+
/**
|
|
9
|
+
* Input for `ListDataHolderScanSummariesUseCase`.
|
|
10
|
+
*
|
|
11
|
+
* @interface ListDataHolderScanSummariesUseCaseInput
|
|
12
|
+
*/
|
|
13
|
+
interface ListDataHolderScanSummariesUseCaseInput {
|
|
14
|
+
dataHolderId: string;
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
nextToken?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Output for `ListDataHolderScanSummariesUseCase`.
|
|
20
|
+
*
|
|
21
|
+
* @interface ListDataHolderScanSummariesUseCaseOutput
|
|
22
|
+
*/
|
|
23
|
+
interface ListDataHolderScanSummariesUseCaseOutput {
|
|
24
|
+
scanSummaries: DataHolderScanSummaryEntity[];
|
|
25
|
+
nextToken?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Application business logic for listing scan summaries for a data holder.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ListDataHolderScanSummariesUseCase {
|
|
31
|
+
private readonly dataHolderService;
|
|
32
|
+
private readonly log;
|
|
33
|
+
constructor(dataHolderService: DataHolderService);
|
|
34
|
+
execute(input: ListDataHolderScanSummariesUseCaseInput): Promise<ListDataHolderScanSummariesUseCaseOutput>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
package/types/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OrganizationAnalysisEntity } from '../../entities/organization-analysis/organizationAnalysisEntity';
|
|
7
|
+
import { GetOrganizationAnalysisInput, OrganizationAnalysisService } from '../../entities/organization-analysis/organizationAnalysisService';
|
|
8
|
+
/**
|
|
9
|
+
* Application business logic for obtaining an organization analysis.
|
|
10
|
+
*/
|
|
11
|
+
export declare class GetOrganizationAnalysisUseCase {
|
|
12
|
+
private readonly organizationAnalysisService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(organizationAnalysisService: OrganizationAnalysisService);
|
|
15
|
+
execute(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysisEntity | undefined>;
|
|
16
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { ListOutput } from '@sudoplatform/sudo-common';
|
|
7
|
-
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, ListAnalysisResultsInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
7
|
+
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, InitiateActionInput, ListAnalysisResultsInput, ListAvailableActionsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
8
8
|
import { SudoPrivacyInteractionClient, SudoPrivacyInteractionClientOptions } from './sudoPrivacyInteractionClient';
|
|
9
|
-
import { AnalysisResult, AnalysisResultSubscriber, DataHolder, DataHolderSubscriber, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
9
|
+
import { Action, AnalysisResult, AnalysisResultSubscriber, ActionSubscriber, AvailableAction, DataHolder, DataHolderScanSummary, DataHolderSubscriber, OrganizationAnalysis, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
10
10
|
export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyInteractionClient {
|
|
11
11
|
private readonly apiClient;
|
|
12
12
|
private readonly userClient;
|
|
@@ -14,11 +14,20 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
14
14
|
private readonly virtualPresenceService;
|
|
15
15
|
private readonly dataHolderService;
|
|
16
16
|
private readonly analysisResultService;
|
|
17
|
+
private readonly organizationAnalysisService;
|
|
18
|
+
private readonly actionService;
|
|
17
19
|
private readonly providerConfigurationTransformer;
|
|
18
20
|
private readonly virtualPresenceTransformer;
|
|
19
21
|
private readonly relationshipProviderTransformer;
|
|
20
22
|
private readonly dataHolderTransformer;
|
|
23
|
+
private readonly dataHolderScanSummaryTransformer;
|
|
21
24
|
private readonly analysisResultTransformer;
|
|
25
|
+
private readonly organizationAnalysisTransformer;
|
|
26
|
+
private readonly organizationAnalysisModeTransformer;
|
|
27
|
+
private readonly actionTransformer;
|
|
28
|
+
private readonly availableActionTransformer;
|
|
29
|
+
private readonly actionIntentTransformer;
|
|
30
|
+
private readonly actionFulfilmentMethodTransformer;
|
|
22
31
|
private readonly log;
|
|
23
32
|
constructor(opts: SudoPrivacyInteractionClientOptions);
|
|
24
33
|
getProviderConfiguration(): Promise<ProviderConfiguration[]>;
|
|
@@ -29,12 +38,19 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
29
38
|
listVirtualPresences(input: ListVirtualPresencesInput): Promise<ListOutput<VirtualPresence>>;
|
|
30
39
|
subscribeToVirtualPresence(subscriptionId: string, subscriber: VirtualPresenceSubscriber): Promise<void>;
|
|
31
40
|
unsubscribeFromVirtualPresence(subscriptionId: string): void;
|
|
32
|
-
getDataHolder(id: string): Promise<DataHolder | undefined>;
|
|
41
|
+
getDataHolder(id: string, options?: GetDataHolderOptions): Promise<DataHolder | undefined>;
|
|
33
42
|
listDataHolders(input: ListDataHoldersInput): Promise<ListOutput<DataHolder>>;
|
|
43
|
+
listDataHolderScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListOutput<DataHolderScanSummary>>;
|
|
34
44
|
subscribeToDataHolders(subscriptionId: string, subscriber: DataHolderSubscriber): Promise<void>;
|
|
35
45
|
unsubscribeFromDataHolders(subscriptionId: string): void;
|
|
36
46
|
getAnalysisResult(id: string): Promise<AnalysisResult | undefined>;
|
|
37
47
|
listAnalysisResults(input: ListAnalysisResultsInput): Promise<ListOutput<AnalysisResult>>;
|
|
38
48
|
subscribeToAnalysisResult(subscriptionId: string, subscriber: AnalysisResultSubscriber): Promise<void>;
|
|
39
49
|
unsubscribeFromAnalysisResult(subscriptionId: string): void;
|
|
50
|
+
getOrganizationAnalysis(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysis | undefined>;
|
|
51
|
+
initiateAction(input: InitiateActionInput): Promise<Action>;
|
|
52
|
+
confirmActionOutcome(id: string): Promise<Action>;
|
|
53
|
+
listAvailableActions(input: ListAvailableActionsInput): Promise<ListOutput<AvailableAction>>;
|
|
54
|
+
subscribeToActions(subscriptionId: string, subscriber: ActionSubscriber): Promise<void>;
|
|
55
|
+
unsubscribeFromActions(subscriptionId: string): void;
|
|
40
56
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionFulfilmentMethod, ActionIntent } from '../typings/action';
|
|
7
|
+
/**
|
|
8
|
+
* Properties required to initiate an action against a data holder relationship.
|
|
9
|
+
*
|
|
10
|
+
* @interface InitiateActionInput
|
|
11
|
+
* @property {string} dataHolderId The data holder relationship to scope the action to.
|
|
12
|
+
* @property {ActionIntent} intent The intent of the action to initiate.
|
|
13
|
+
* @property {ActionFulfilmentMethod} fulfilmentMethod The fulfilment method the client
|
|
14
|
+
* was offered for this intent. Initiation fails if the server re-resolves a different
|
|
15
|
+
* method.
|
|
16
|
+
*/
|
|
17
|
+
export interface InitiateActionInput {
|
|
18
|
+
dataHolderId: string;
|
|
19
|
+
intent: ActionIntent;
|
|
20
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Properties required to list the actions available for a data holder relationship.
|
|
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
|
+
}
|
|
@@ -15,3 +15,25 @@ import { Pagination } from './common';
|
|
|
15
15
|
export interface ListDataHoldersInput extends Pagination {
|
|
16
16
|
virtualPresenceId: string;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Properties required to list scan summaries for a data holder.
|
|
20
|
+
*
|
|
21
|
+
* @interface ListDataHolderScanSummariesInput
|
|
22
|
+
* @property {string} dataHolderId The identifier of the data holder to list scan summaries for.
|
|
23
|
+
* @property {number} limit Number of items to return.
|
|
24
|
+
* @property {string} nextToken A token generated by a previous call.
|
|
25
|
+
*/
|
|
26
|
+
export interface ListDataHolderScanSummariesInput extends Pagination {
|
|
27
|
+
dataHolderId: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Options to control what `getDataHolder` returns.
|
|
31
|
+
*
|
|
32
|
+
* @interface GetDataHolderOptions
|
|
33
|
+
* @property {boolean} includeScanSummary Whether to also fetch and attach the most recent
|
|
34
|
+
* scan summary to the returned data holder. Defaults to `true`. When `true`, the data holder
|
|
35
|
+
* and its latest scan summary are fetched concurrently.
|
|
36
|
+
*/
|
|
37
|
+
export interface GetDataHolderOptions {
|
|
38
|
+
includeScanSummary?: boolean;
|
|
39
|
+
}
|
|
@@ -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 { OrganizationAnalysisMode } from '../typings/organizationAnalysis';
|
|
7
|
+
/**
|
|
8
|
+
* Properties required to obtain an organization analysis.
|
|
9
|
+
*
|
|
10
|
+
* @interface GetOrganizationAnalysisInput
|
|
11
|
+
* @property {string} domain The domain to analyze.
|
|
12
|
+
* @property {OrganizationAnalysisMode} mode How to obtain source results. When omitted, the
|
|
13
|
+
* backend behaves as `Analyze` (read-through).
|
|
14
|
+
*/
|
|
15
|
+
export interface GetOrganizationAnalysisInput {
|
|
16
|
+
domain: string;
|
|
17
|
+
mode?: OrganizationAnalysisMode;
|
|
18
|
+
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ListOutput } from '@sudoplatform/sudo-common';
|
|
7
7
|
import { SudoUserClient } from '@sudoplatform/sudo-user';
|
|
8
|
-
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, ListAnalysisResultsInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
9
|
-
import { AnalysisResult, AnalysisResultSubscriber, DataHolder, DataHolderSubscriber, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
8
|
+
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, InitiateActionInput, ListAnalysisResultsInput, ListAvailableActionsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
9
|
+
import { Action, AnalysisResult, AnalysisResultSubscriber, ActionSubscriber, AvailableAction, DataHolder, DataHolderScanSummary, DataHolderSubscriber, OrganizationAnalysis, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
10
10
|
export interface SudoPrivacyInteractionClient {
|
|
11
11
|
/**
|
|
12
12
|
* Retrieve the provider configurations required by consumers to support
|
|
@@ -69,9 +69,12 @@ export interface SudoPrivacyInteractionClient {
|
|
|
69
69
|
* Retrieve a single data holder by ID.
|
|
70
70
|
*
|
|
71
71
|
* @param {string} id The unique identifier of the data holder.
|
|
72
|
+
* @param {GetDataHolderOptions} options Optional settings controlling what is returned.
|
|
73
|
+
* By default the most recent scan summary is fetched concurrently and attached as
|
|
74
|
+
* `latestScanSummary`.
|
|
72
75
|
* @returns {DataHolder | undefined} The data holder, or undefined if not found.
|
|
73
76
|
*/
|
|
74
|
-
getDataHolder(id: string): Promise<DataHolder | undefined>;
|
|
77
|
+
getDataHolder(id: string, options?: GetDataHolderOptions): Promise<DataHolder | undefined>;
|
|
75
78
|
/**
|
|
76
79
|
* List data holders associated with a virtual presence.
|
|
77
80
|
*
|
|
@@ -79,6 +82,15 @@ export interface SudoPrivacyInteractionClient {
|
|
|
79
82
|
* @returns {ListOutput<DataHolder>} A list of data holders matching the search criteria.
|
|
80
83
|
*/
|
|
81
84
|
listDataHolders(input: ListDataHoldersInput): Promise<ListOutput<DataHolder>>;
|
|
85
|
+
/**
|
|
86
|
+
* List scan summaries associated with a data holder, most recent first.
|
|
87
|
+
*
|
|
88
|
+
* @param {ListDataHolderScanSummariesInput} input Parameters used to retrieve a list
|
|
89
|
+
* of scan summaries.
|
|
90
|
+
* @returns {ListOutput<DataHolderScanSummary>} A list of scan summaries matching the
|
|
91
|
+
* search criteria.
|
|
92
|
+
*/
|
|
93
|
+
listDataHolderScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListOutput<DataHolderScanSummary>>;
|
|
82
94
|
/**
|
|
83
95
|
* Subscribe to data holder state events. Emitted when data holders are discovered
|
|
84
96
|
* or updated during scanning.
|
|
@@ -123,6 +135,55 @@ export interface SudoPrivacyInteractionClient {
|
|
|
123
135
|
* @param {string} subscriptionId The subscription identifier to unsubscribe.
|
|
124
136
|
*/
|
|
125
137
|
unsubscribeFromAnalysisResult(subscriptionId: string): void;
|
|
138
|
+
/**
|
|
139
|
+
* Analyze (read-through) and return the shared, organization-generic analysis for a domain.
|
|
140
|
+
*
|
|
141
|
+
* Returns a result with a `Pending` status when an asynchronous source is still resolving;
|
|
142
|
+
* re-query for the terminal result. When `mode` is omitted, the backend behaves as `Analyze`.
|
|
143
|
+
*
|
|
144
|
+
* @param {GetOrganizationAnalysisInput} input Parameters used to obtain the analysis.
|
|
145
|
+
* @returns {OrganizationAnalysis | undefined} The organization analysis, or undefined if not found.
|
|
146
|
+
*/
|
|
147
|
+
getOrganizationAnalysis(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysis | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* Initiate an action against a data holder relationship. Delegated actions are
|
|
150
|
+
* performed on the user's behalf; assisted actions return structured materials
|
|
151
|
+
* for the client to complete.
|
|
152
|
+
*
|
|
153
|
+
* @param {InitiateActionInput} input Parameters used to initiate the action.
|
|
154
|
+
* @returns {Action} The initiated action.
|
|
155
|
+
*/
|
|
156
|
+
initiateAction(input: InitiateActionInput): Promise<Action>;
|
|
157
|
+
/**
|
|
158
|
+
* Confirm that an assisted or delegated action was completed, transitioning it
|
|
159
|
+
* from `CompletedUnverified` to `CompletedVerified`.
|
|
160
|
+
*
|
|
161
|
+
* @param {string} id The unique identifier of the action to confirm.
|
|
162
|
+
* @returns {Action} The confirmed action.
|
|
163
|
+
*/
|
|
164
|
+
confirmActionOutcome(id: string): Promise<Action>;
|
|
165
|
+
/**
|
|
166
|
+
* List the actions currently available for a data holder relationship.
|
|
167
|
+
*
|
|
168
|
+
* @param {ListAvailableActionsInput} input Parameters used to list available actions.
|
|
169
|
+
* @returns {ListOutput<AvailableAction>} A list of available actions matching the
|
|
170
|
+
* search criteria.
|
|
171
|
+
*/
|
|
172
|
+
listAvailableActions(input: ListAvailableActionsInput): Promise<ListOutput<AvailableAction>>;
|
|
173
|
+
/**
|
|
174
|
+
* Subscribe to action status events. Emitted each time an action's status changes.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} subscriptionId A unique identifier for this subscription.
|
|
177
|
+
* @param {ActionSubscriber} subscriber Callback implementation to be invoked when
|
|
178
|
+
* an action event occurs.
|
|
179
|
+
*/
|
|
180
|
+
subscribeToActions(subscriptionId: string, subscriber: ActionSubscriber): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Unsubscribe from action status events.
|
|
183
|
+
*
|
|
184
|
+
* @param {string} subscriptionId The subscription identifier to unsubscribe.
|
|
185
|
+
*/
|
|
186
|
+
unsubscribeFromActions(subscriptionId: string): void;
|
|
126
187
|
}
|
|
127
188
|
export type SudoPrivacyInteractionClientOptions = {
|
|
128
189
|
/** Sudo User client to use. No default */
|