@sudoplatform/sudo-privacy-interaction 2.2.0 → 2.4.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 +443 -11
- package/cjs/gen/schema-types.js +2 -0
- package/cjs/private/data/action/defaultActionService.js +7 -0
- package/cjs/private/data/analysis-result/defaultAnalysisResultService.js +6 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultStatusReasonTransformer.js +45 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultTransformer.js +6 -0
- package/cjs/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +5 -2
- package/cjs/private/data/analysis-result/transformer/organizationCategoryTransformer.js +4 -0
- package/cjs/private/data/common/apiClient.js +29 -1
- package/cjs/private/data/data-holder/defaultDataHolderService.js +8 -0
- package/cjs/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.js +4 -0
- package/cjs/private/data/organization-analysis/defaultOrganizationAnalysisService.js +6 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisDomainResolutionTransformer.js +29 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +6 -0
- package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +8 -0
- package/cjs/private/domain/entities/analysis-result/analysisResultEntity.js +21 -1
- package/cjs/private/domain/entities/data-holder/dataHolderEntity.js +2 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +17 -1
- package/cjs/private/domain/use-cases/action/getActionUseCase.js +25 -0
- package/cjs/private/domain/use-cases/data-holder/archiveDataHolderUseCase.js +25 -0
- package/cjs/private/domain/use-cases/data-holder/unarchiveDataHolderUseCase.js +25 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +31 -0
- package/cjs/public/typings/analysisResult.js +21 -1
- package/cjs/public/typings/dataHolder.js +2 -0
- package/cjs/public/typings/organizationAnalysis.js +17 -1
- 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 +93 -27
- package/docs/enums/AnalysisResultStatus.html +6 -6
- package/docs/enums/AnalysisResultStatusReason.html +81 -0
- package/docs/enums/DataCategory.html +18 -18
- package/docs/enums/DataHolderProtectionState.html +12 -6
- package/docs/enums/OrganizationAnalysisDomainResolution.html +70 -0
- package/docs/enums/OrganizationAnalysisMode.html +3 -3
- package/docs/enums/OrganizationCategory.html +38 -32
- 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 -6
- package/docs/interfaces/AnalysisResult.html +21 -13
- package/docs/interfaces/AnalysisResultData.html +8 -8
- package/docs/interfaces/AnalysisResultUpdate.html +20 -12
- package/docs/interfaces/CapabilitySignals.html +41 -29
- package/docs/interfaces/CategorySignals.html +11 -11
- package/docs/interfaces/DataHolderCount.html +98 -0
- package/docs/interfaces/DataHolderScanSummary.html +14 -14
- package/docs/interfaces/GetOrganizationAnalysisInput.html +24 -5
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListDataHolderScanSummariesInput.html +1 -1
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +1 -1
- package/docs/interfaces/OrganizationAnalysis.html +20 -12
- package/docs/interfaces/OrganizationIdentity.html +5 -5
- package/docs/interfaces/Pagination.html +1 -1
- package/docs/interfaces/PrivacyScore.html +4 -4
- 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 +3 -3
- package/docs/interfaces/SudoPrivacyInteractionClient.html +78 -15
- package/docs/interfaces/VirtualPresence.html +22 -13
- package/docs/modules.html +4 -4
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +441 -10
- package/lib/gen/schema-types.js +1 -0
- package/lib/private/data/action/defaultActionService.js +7 -0
- package/lib/private/data/analysis-result/defaultAnalysisResultService.js +6 -0
- package/lib/private/data/analysis-result/transformer/analysisResultStatusReasonTransformer.js +41 -0
- package/lib/private/data/analysis-result/transformer/analysisResultTransformer.js +6 -0
- package/lib/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +5 -2
- package/lib/private/data/analysis-result/transformer/organizationCategoryTransformer.js +4 -0
- package/lib/private/data/common/apiClient.js +30 -2
- package/lib/private/data/data-holder/defaultDataHolderService.js +8 -0
- package/lib/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.js +4 -0
- package/lib/private/data/organization-analysis/defaultOrganizationAnalysisService.js +6 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisDomainResolutionTransformer.js +25 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +6 -0
- package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +8 -0
- package/lib/private/domain/entities/analysis-result/analysisResultEntity.js +20 -0
- package/lib/private/domain/entities/data-holder/dataHolderEntity.js +2 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +16 -0
- package/lib/private/domain/use-cases/action/getActionUseCase.js +21 -0
- package/lib/private/domain/use-cases/data-holder/archiveDataHolderUseCase.js +21 -0
- package/lib/private/domain/use-cases/data-holder/unarchiveDataHolderUseCase.js +21 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +31 -0
- package/lib/public/typings/analysisResult.js +20 -0
- package/lib/public/typings/dataHolder.js +2 -0
- package/lib/public/typings/organizationAnalysis.js +16 -0
- package/package.json +19 -23
- package/types/gen/graphqlTypes.d.ts +338 -645
- package/types/gen/schema-types.d.ts +525 -0
- package/types/private/data/action/defaultActionService.d.ts +1 -0
- package/types/private/data/analysis-result/defaultAnalysisResultService.d.ts +1 -0
- package/types/private/data/analysis-result/transformer/analysisResultStatusReasonTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/analysisResultTransformer.d.ts +1 -0
- package/types/private/data/common/apiClient.d.ts +6 -1
- package/types/private/data/data-holder/defaultDataHolderService.d.ts +2 -0
- package/types/private/data/organization-analysis/defaultOrganizationAnalysisService.d.ts +1 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisDomainResolutionTransformer.d.ts +12 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisTransformer.d.ts +1 -0
- package/types/private/domain/entities/action/actionService.d.ts +11 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +23 -2
- package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +2 -0
- package/types/private/domain/entities/data-holder/dataHolderService.d.ts +16 -0
- package/types/private/domain/entities/organization-analysis/organizationAnalysisEntity.d.ts +18 -1
- package/types/private/domain/entities/organization-analysis/organizationAnalysisService.d.ts +8 -1
- package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +24 -0
- package/types/private/domain/use-cases/action/getActionUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/data-holder/archiveDataHolderUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/data-holder/unarchiveDataHolderUseCase.d.ts +16 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +4 -0
- package/types/public/inputs/organizationAnalysis.d.ts +8 -1
- package/types/public/sudoPrivacyInteractionClient.d.ts +27 -0
- package/types/public/typings/analysisResult.d.ts +30 -0
- package/types/public/typings/dataHolder.d.ts +2 -0
- package/types/public/typings/organizationAnalysis.d.ts +18 -1
- package/types/public/typings/virtualPresence.d.ts +25 -0
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @property {string} virtualPresenceId The virtual presence this analysis is associated with.
|
|
13
13
|
* @property {string} dataHolderIdentifier The data holder domain that this analysis is about.
|
|
14
14
|
* @property {AnalysisResultStatusEntity} status Current status of the analysis.
|
|
15
|
+
* @property {AnalysisResultStatusReasonEntity} statusReason Reason explaining the current status, when one applies.
|
|
15
16
|
* @property {Date} lastAnalyzedAt Date for when the analysis was last performed.
|
|
16
17
|
* @property {AnalysisResultDataEntity} data Structured analysis data. Populated when status is COMPLETE or PARTIAL.
|
|
17
18
|
* @property {number} version Version of this entity. Increments on update.
|
|
@@ -23,6 +24,7 @@ export interface AnalysisResultEntity {
|
|
|
23
24
|
virtualPresenceId: string;
|
|
24
25
|
dataHolderIdentifier: string;
|
|
25
26
|
status: AnalysisResultStatusEntity;
|
|
27
|
+
statusReason?: AnalysisResultStatusReasonEntity;
|
|
26
28
|
lastAnalyzedAt: Date;
|
|
27
29
|
data?: AnalysisResultDataEntity;
|
|
28
30
|
owner: string;
|
|
@@ -48,6 +50,24 @@ export declare enum AnalysisResultStatusEntity {
|
|
|
48
50
|
Failed = "FAILED",
|
|
49
51
|
Unavailable = "UNAVAILABLE"
|
|
50
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* The reason explaining an analysis result's status.
|
|
55
|
+
*
|
|
56
|
+
* @property INVALID_DOMAIN The requested domain was not a valid analyzable domain.
|
|
57
|
+
* @property POLICY_UNAVAILABLE No privacy policy could be located for the organization.
|
|
58
|
+
* @property MALICIOUS The domain was identified as malicious.
|
|
59
|
+
* @property NOT_ATTEMPTED Analysis was not attempted for the domain.
|
|
60
|
+
* @property OTHER A reason that does not fit the other categories.
|
|
61
|
+
*
|
|
62
|
+
* @enum
|
|
63
|
+
*/
|
|
64
|
+
export declare enum AnalysisResultStatusReasonEntity {
|
|
65
|
+
InvalidDomain = "INVALID_DOMAIN",
|
|
66
|
+
PolicyUnavailable = "POLICY_UNAVAILABLE",
|
|
67
|
+
Malicious = "MALICIOUS",
|
|
68
|
+
NotAttempted = "NOT_ATTEMPTED",
|
|
69
|
+
Other = "OTHER"
|
|
70
|
+
}
|
|
51
71
|
/**
|
|
52
72
|
* The structured data payload for an analysis result.
|
|
53
73
|
*
|
|
@@ -235,7 +255,7 @@ export interface CategorySignalsEntity {
|
|
|
235
255
|
* @property {SignalValueEntity} supportsDataDeletionRequests Whether the organization supports data deletion requests.
|
|
236
256
|
* @property {SignalValueEntity} supportsDataExport Whether the organization supports data export.
|
|
237
257
|
* @property {SignalValueEntity} supportsSubscriptions Whether the organization supports subscription management.
|
|
238
|
-
* @property {SignalValueEntity}
|
|
258
|
+
* @property {SignalValueEntity} supportsOptOutOfSale Whether the organization exposes an opt-out-of-sale control to users.
|
|
239
259
|
* @property {SignalValueEntity} usesCookiesOrTracking Whether the organization uses cookies or tracking.
|
|
240
260
|
* @property {SignalValueEntity} supportsTwoFactorAuth Whether the organization supports two-factor auth for logins.
|
|
241
261
|
*/
|
|
@@ -245,7 +265,7 @@ export interface CapabilitySignalsEntity {
|
|
|
245
265
|
supportsDataDeletionRequests: SignalValueEntity;
|
|
246
266
|
supportsDataExport: SignalValueEntity;
|
|
247
267
|
supportsSubscriptions: SignalValueEntity;
|
|
248
|
-
|
|
268
|
+
supportsOptOutOfSale: SignalValueEntity;
|
|
249
269
|
usesCookiesOrTracking: SignalValueEntity;
|
|
250
270
|
supportsTwoFactorAuth: SignalValueEntity;
|
|
251
271
|
}
|
|
@@ -277,6 +297,7 @@ export interface RiskIndicatorsEntity {
|
|
|
277
297
|
* @enum
|
|
278
298
|
*/
|
|
279
299
|
export declare enum OrganizationCategoryEntity {
|
|
300
|
+
AdultEntertainment = "AdultEntertainment",
|
|
280
301
|
Automotive = "Automotive",
|
|
281
302
|
Communications = "Communications",
|
|
282
303
|
CommunityAndCharity = "CommunityAndCharity",
|
|
@@ -40,6 +40,7 @@ export interface DataHolderEntity {
|
|
|
40
40
|
* @property MONITORED The data holder is being monitored.
|
|
41
41
|
* @property ACTION_REQUESTED An action has been requested against this data holder.
|
|
42
42
|
* @property RESOLVED The data holder has been resolved.
|
|
43
|
+
* @property ARCHIVED The data holder has been archived by the user.
|
|
43
44
|
*
|
|
44
45
|
* @enum
|
|
45
46
|
*/
|
|
@@ -47,6 +48,7 @@ export declare enum DataHolderProtectionStateEntity {
|
|
|
47
48
|
Monitored = "MONITORED",
|
|
48
49
|
ActionRequested = "ACTION_REQUESTED",
|
|
49
50
|
Resolved = "RESOLVED",
|
|
51
|
+
Archived = "ARCHIVED",
|
|
50
52
|
Unknown = "UNKNOWN"
|
|
51
53
|
}
|
|
52
54
|
/**
|
|
@@ -99,6 +99,22 @@ export interface DataHolderService {
|
|
|
99
99
|
* search criteria. Can be empty if no scan summaries found.
|
|
100
100
|
*/
|
|
101
101
|
listScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListDataHolderScanSummariesOutput>;
|
|
102
|
+
/**
|
|
103
|
+
* Archive a data holder, removing it from the user's active list.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} id The unique identifier of the data holder to archive.
|
|
106
|
+
* @returns {DataHolderEntity} The archived data holder.
|
|
107
|
+
*/
|
|
108
|
+
archive(id: string): Promise<DataHolderEntity>;
|
|
109
|
+
/**
|
|
110
|
+
* Unarchive a previously archived data holder, returning it to the
|
|
111
|
+
* `Monitored` state. Only a data holder in the `Archived` state may be
|
|
112
|
+
* unarchived.
|
|
113
|
+
*
|
|
114
|
+
* @param {string} id The unique identifier of the data holder to unarchive.
|
|
115
|
+
* @returns {DataHolderEntity} The unarchived data holder.
|
|
116
|
+
*/
|
|
117
|
+
unarchive(id: string): Promise<DataHolderEntity>;
|
|
102
118
|
/**
|
|
103
119
|
* Subscribe to data holder state events.
|
|
104
120
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AnalysisResultDataEntity, AnalysisResultStatusEntity } from '../analysis-result/analysisResultEntity';
|
|
6
|
+
import { AnalysisResultDataEntity, AnalysisResultStatusEntity, AnalysisResultStatusReasonEntity } from '../analysis-result/analysisResultEntity';
|
|
7
7
|
/**
|
|
8
8
|
* Core entity representation of a shared, domain-keyed privacy analysis of an
|
|
9
9
|
* organization.
|
|
@@ -17,6 +17,7 @@ import { AnalysisResultDataEntity, AnalysisResultStatusEntity } from '../analysi
|
|
|
17
17
|
* @property {string} domain The analyzed domain (equal to id).
|
|
18
18
|
* @property {AnalysisResultStatusEntity} status Aggregate status. PENDING while an asynchronous
|
|
19
19
|
* source is still resolving; re-query for the terminal result.
|
|
20
|
+
* @property {AnalysisResultStatusReasonEntity} statusReason Reason explaining the aggregate status, when one applies.
|
|
20
21
|
* @property {Date} lastAnalyzedAt When the aggregate was last derived.
|
|
21
22
|
* @property {AnalysisResultDataEntity} data Structured analysis payload. Populated when status
|
|
22
23
|
* is COMPLETE or PARTIAL.
|
|
@@ -29,6 +30,7 @@ export interface OrganizationAnalysisEntity {
|
|
|
29
30
|
id: string;
|
|
30
31
|
domain: string;
|
|
31
32
|
status: AnalysisResultStatusEntity;
|
|
33
|
+
statusReason?: AnalysisResultStatusReasonEntity;
|
|
32
34
|
lastAnalyzedAt: Date;
|
|
33
35
|
data?: AnalysisResultDataEntity;
|
|
34
36
|
owner: string;
|
|
@@ -51,3 +53,18 @@ export declare enum OrganizationAnalysisModeEntity {
|
|
|
51
53
|
Analyze = "ANALYZE",
|
|
52
54
|
Fetch = "FETCH"
|
|
53
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Controls how `getOrganizationAnalysis` treats the requested domain before
|
|
58
|
+
* sources query their backing services.
|
|
59
|
+
*
|
|
60
|
+
* @property REGISTRABLE Reduce the domain to its registrable (eTLD+1) form before analysis,
|
|
61
|
+
* e.g. `mail.sub.example.co.uk` becomes `example.co.uk`.
|
|
62
|
+
* @property EXACT Analyze the domain verbatim, without reducing it to a registrable domain.
|
|
63
|
+
* Used to analyze a specific host/subdomain rather than the organization.
|
|
64
|
+
*
|
|
65
|
+
* @enum
|
|
66
|
+
*/
|
|
67
|
+
export declare enum OrganizationAnalysisDomainResolutionEntity {
|
|
68
|
+
Registrable = "REGISTRABLE",
|
|
69
|
+
Exact = "EXACT"
|
|
70
|
+
}
|
package/types/private/domain/entities/organization-analysis/organizationAnalysisService.d.ts
CHANGED
|
@@ -3,18 +3,25 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { OrganizationAnalysisEntity, OrganizationAnalysisModeEntity } from './organizationAnalysisEntity';
|
|
6
|
+
import { OrganizationAnalysisDomainResolutionEntity, OrganizationAnalysisEntity, OrganizationAnalysisModeEntity } from './organizationAnalysisEntity';
|
|
7
7
|
/**
|
|
8
8
|
* Input for `OrganizationAnalysisService.getOrganizationAnalysis` method.
|
|
9
9
|
*
|
|
10
10
|
* @interface GetOrganizationAnalysisInput
|
|
11
11
|
* @property {string} domain The domain to analyze.
|
|
12
|
+
* @property {string} name Organization name to analyze (e.g. "amazon", "stripe"). When it resolves
|
|
13
|
+
* to a domain it takes precedence over `domain`; `domain` remains required and is used as the
|
|
14
|
+
* fallback when the name cannot be resolved.
|
|
12
15
|
* @property {OrganizationAnalysisModeEntity} mode How to obtain source results. When omitted,
|
|
13
16
|
* the backend behaves as ANALYZE.
|
|
17
|
+
* @property {OrganizationAnalysisDomainResolutionEntity} resolution How the requested domain is
|
|
18
|
+
* treated before analysis.
|
|
14
19
|
*/
|
|
15
20
|
export interface GetOrganizationAnalysisInput {
|
|
16
21
|
domain: string;
|
|
22
|
+
name?: string;
|
|
17
23
|
mode?: OrganizationAnalysisModeEntity;
|
|
24
|
+
resolution?: OrganizationAnalysisDomainResolutionEntity;
|
|
18
25
|
}
|
|
19
26
|
/**
|
|
20
27
|
* Core entity representation of an organization analysis service used in business logic.
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
* @property {Date} lastScannedAt Date for when the virtual presence was last scanned.
|
|
19
19
|
* @property {string} lastScanFailureReason Reason the most recent completed scan failed (an error/exception name).
|
|
20
20
|
* Undefined when the most recent completed scan succeeded (or none has completed).
|
|
21
|
+
* @property {DataHolderCountEntity} dataHolderCount Counts of this virtual presence's data holders,
|
|
22
|
+
* broken down by protection state.
|
|
21
23
|
* @property {Date} createdAt Date for when the virtual presence was created.
|
|
22
24
|
* @property {Date} updatedAt Date for when the virtual presence was last updated.
|
|
23
25
|
*/
|
|
@@ -30,9 +32,31 @@ export interface VirtualPresenceEntity {
|
|
|
30
32
|
state: VirtualPresenceStateEntity;
|
|
31
33
|
lastScannedAt: Date;
|
|
32
34
|
lastScanFailureReason?: string;
|
|
35
|
+
dataHolderCount: DataHolderCountEntity;
|
|
33
36
|
createdAt: Date;
|
|
34
37
|
updatedAt: Date;
|
|
35
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Core entity representation of a virtual presence's data holder counts,
|
|
41
|
+
* broken down by protection state.
|
|
42
|
+
*
|
|
43
|
+
* @interface DataHolderCountEntity
|
|
44
|
+
* @property {number} count Active (non-archived) data holders: the sum of monitored,
|
|
45
|
+
* initiatedActions, and completedActions. Excludes archived.
|
|
46
|
+
* @property {number} monitored Data holders the system has identified (protection state Monitored).
|
|
47
|
+
* @property {number} initiatedActions Data holders with an action in progress
|
|
48
|
+
* (protection state ActionRequested).
|
|
49
|
+
* @property {number} completedActions Data holders whose action has completed
|
|
50
|
+
* (protection state Resolved).
|
|
51
|
+
* @property {number} archived Data holders the user has archived (protection state Archived).
|
|
52
|
+
*/
|
|
53
|
+
export interface DataHolderCountEntity {
|
|
54
|
+
count: number;
|
|
55
|
+
monitored: number;
|
|
56
|
+
initiatedActions: number;
|
|
57
|
+
completedActions: number;
|
|
58
|
+
archived: number;
|
|
59
|
+
}
|
|
36
60
|
/**
|
|
37
61
|
* Enumeration that defines the provider type of the virtual presence.
|
|
38
62
|
*
|
|
@@ -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 retrieving a single action.
|
|
10
|
+
*/
|
|
11
|
+
export declare class GetActionUseCase {
|
|
12
|
+
private readonly actionService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(actionService: ActionService);
|
|
15
|
+
execute(id: string): Promise<ActionEntity | undefined>;
|
|
16
|
+
}
|
|
@@ -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 { DataHolderEntity } from '../../entities/data-holder/dataHolderEntity';
|
|
7
|
+
import { DataHolderService } from '../../entities/data-holder/dataHolderService';
|
|
8
|
+
/**
|
|
9
|
+
* Application business logic for archiving a data holder.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ArchiveDataHolderUseCase {
|
|
12
|
+
private readonly dataHolderService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(dataHolderService: DataHolderService);
|
|
15
|
+
execute(id: string): Promise<DataHolderEntity>;
|
|
16
|
+
}
|
|
@@ -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 { DataHolderEntity } from '../../entities/data-holder/dataHolderEntity';
|
|
7
|
+
import { DataHolderService } from '../../entities/data-holder/dataHolderService';
|
|
8
|
+
/**
|
|
9
|
+
* Application business logic for unarchiving a data holder.
|
|
10
|
+
*/
|
|
11
|
+
export declare class UnarchiveDataHolderUseCase {
|
|
12
|
+
private readonly dataHolderService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(dataHolderService: DataHolderService);
|
|
15
|
+
execute(id: string): Promise<DataHolderEntity>;
|
|
16
|
+
}
|
|
@@ -24,6 +24,7 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
24
24
|
private readonly analysisResultTransformer;
|
|
25
25
|
private readonly organizationAnalysisTransformer;
|
|
26
26
|
private readonly organizationAnalysisModeTransformer;
|
|
27
|
+
private readonly organizationAnalysisDomainResolutionTransformer;
|
|
27
28
|
private readonly actionTransformer;
|
|
28
29
|
private readonly availableActionTransformer;
|
|
29
30
|
private readonly actionIntentTransformer;
|
|
@@ -41,6 +42,8 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
41
42
|
getDataHolder(id: string, options?: GetDataHolderOptions): Promise<DataHolder | undefined>;
|
|
42
43
|
listDataHolders(input: ListDataHoldersInput): Promise<ListOutput<DataHolder>>;
|
|
43
44
|
listDataHolderScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListOutput<DataHolderScanSummary>>;
|
|
45
|
+
archiveDataHolder(id: string): Promise<DataHolder>;
|
|
46
|
+
unarchiveDataHolder(id: string): Promise<DataHolder>;
|
|
44
47
|
subscribeToDataHolders(subscriptionId: string, subscriber: DataHolderSubscriber): Promise<void>;
|
|
45
48
|
unsubscribeFromDataHolders(subscriptionId: string): void;
|
|
46
49
|
getAnalysisResult(id: string): Promise<AnalysisResult | undefined>;
|
|
@@ -49,6 +52,7 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
49
52
|
unsubscribeFromAnalysisResult(subscriptionId: string): void;
|
|
50
53
|
getOrganizationAnalysis(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysis | undefined>;
|
|
51
54
|
initiateAction(input: InitiateActionInput): Promise<Action>;
|
|
55
|
+
getAction(id: string): Promise<Action | undefined>;
|
|
52
56
|
confirmActionOutcome(id: string): Promise<Action>;
|
|
53
57
|
listAvailableActions(input: ListAvailableActionsInput): Promise<ListOutput<AvailableAction>>;
|
|
54
58
|
subscribeToActions(subscriptionId: string, subscriber: ActionSubscriber): Promise<void>;
|
|
@@ -3,16 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { OrganizationAnalysisMode } from '../typings/organizationAnalysis';
|
|
6
|
+
import { OrganizationAnalysisDomainResolution, OrganizationAnalysisMode } from '../typings/organizationAnalysis';
|
|
7
7
|
/**
|
|
8
8
|
* Properties required to obtain an organization analysis.
|
|
9
9
|
*
|
|
10
10
|
* @interface GetOrganizationAnalysisInput
|
|
11
11
|
* @property {string} domain The domain to analyze.
|
|
12
|
+
* @property {string} name Organization name to analyze (e.g. "amazon", "stripe"). When it resolves
|
|
13
|
+
* to a domain it takes precedence over `domain`; `domain` remains required and is used as the
|
|
14
|
+
* fallback when the name cannot be resolved.
|
|
12
15
|
* @property {OrganizationAnalysisMode} mode How to obtain source results. When omitted, the
|
|
13
16
|
* backend behaves as `Analyze` (read-through).
|
|
17
|
+
* @property {OrganizationAnalysisDomainResolution} resolution How the requested domain is treated
|
|
18
|
+
* before analysis. When omitted, defaults to `Exact` (the domain is analyzed verbatim).
|
|
14
19
|
*/
|
|
15
20
|
export interface GetOrganizationAnalysisInput {
|
|
16
21
|
domain: string;
|
|
22
|
+
name?: string;
|
|
17
23
|
mode?: OrganizationAnalysisMode;
|
|
24
|
+
resolution?: OrganizationAnalysisDomainResolution;
|
|
18
25
|
}
|
|
@@ -91,6 +91,22 @@ export interface SudoPrivacyInteractionClient {
|
|
|
91
91
|
* search criteria.
|
|
92
92
|
*/
|
|
93
93
|
listDataHolderScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListOutput<DataHolderScanSummary>>;
|
|
94
|
+
/**
|
|
95
|
+
* Archive a data holder, removing it from the user's active list.
|
|
96
|
+
*
|
|
97
|
+
* @param {string} id The unique identifier of the data holder to archive.
|
|
98
|
+
* @returns {DataHolder} The archived data holder.
|
|
99
|
+
*/
|
|
100
|
+
archiveDataHolder(id: string): Promise<DataHolder>;
|
|
101
|
+
/**
|
|
102
|
+
* Unarchive a previously archived data holder, returning it to the
|
|
103
|
+
* `Monitored` state. Only a data holder in the `Archived` state may be
|
|
104
|
+
* unarchived.
|
|
105
|
+
*
|
|
106
|
+
* @param {string} id The unique identifier of the data holder to unarchive.
|
|
107
|
+
* @returns {DataHolder} The unarchived data holder.
|
|
108
|
+
*/
|
|
109
|
+
unarchiveDataHolder(id: string): Promise<DataHolder>;
|
|
94
110
|
/**
|
|
95
111
|
* Subscribe to data holder state events. Emitted when data holders are discovered
|
|
96
112
|
* or updated during scanning.
|
|
@@ -154,6 +170,17 @@ export interface SudoPrivacyInteractionClient {
|
|
|
154
170
|
* @returns {Action} The initiated action.
|
|
155
171
|
*/
|
|
156
172
|
initiateAction(input: InitiateActionInput): Promise<Action>;
|
|
173
|
+
/**
|
|
174
|
+
* Read a single initiated action by id. Resolves an in-flight delegated
|
|
175
|
+
* action on read: if the action is still in progress, its outcome is polled
|
|
176
|
+
* and, once terminal, the action is updated to its verified result before
|
|
177
|
+
* being returned.
|
|
178
|
+
*
|
|
179
|
+
* @param {string} id The unique identifier of the action.
|
|
180
|
+
* @returns {Action | undefined} The action, or undefined if no action with the
|
|
181
|
+
* given id exists for the user.
|
|
182
|
+
*/
|
|
183
|
+
getAction(id: string): Promise<Action | undefined>;
|
|
157
184
|
/**
|
|
158
185
|
* Confirm that an assisted or delegated action was completed, transitioning it
|
|
159
186
|
* from `CompletedUnverified` to `CompletedVerified`.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @property {string} virtualPresenceId The virtual presence this analysis is associated with.
|
|
13
13
|
* @property {string} dataHolderIdentifier The data holder domain that this analysis is about.
|
|
14
14
|
* @property {AnalysisResultStatus} status Current status of the analysis.
|
|
15
|
+
* @property {AnalysisResultStatusReason} statusReason Reason explaining the current status, when one applies.
|
|
15
16
|
* @property {Date} lastAnalyzedAt Date for when the analysis was last performed.
|
|
16
17
|
* @property {AnalysisResultData} data Structured analysis data. Populated when status is COMPLETE or PARTIAL.
|
|
17
18
|
* @property {number} version Version of this entity. Increments on update.
|
|
@@ -23,6 +24,7 @@ export interface AnalysisResult {
|
|
|
23
24
|
virtualPresenceId: string;
|
|
24
25
|
dataHolderIdentifier: string;
|
|
25
26
|
status: AnalysisResultStatus;
|
|
27
|
+
statusReason?: AnalysisResultStatusReason;
|
|
26
28
|
lastAnalyzedAt: Date;
|
|
27
29
|
data?: AnalysisResultData;
|
|
28
30
|
owner: string;
|
|
@@ -39,6 +41,7 @@ export interface AnalysisResult {
|
|
|
39
41
|
* @property {string} virtualPresenceId The virtual presence this analysis is associated with.
|
|
40
42
|
* @property {string} dataHolderIdentifier The data holder domain that this analysis is about.
|
|
41
43
|
* @property {AnalysisResultStatus} status Current status of the analysis.
|
|
44
|
+
* @property {AnalysisResultStatusReason} statusReason Reason explaining the current status, when one applies.
|
|
42
45
|
* @property {Date} lastAnalyzedAt Date for when the analysis was last performed.
|
|
43
46
|
* @property {number} version Version of this entity. Increments on update.
|
|
44
47
|
* @property {Date} createdAt Date for when the analysis result was created.
|
|
@@ -49,6 +52,7 @@ export interface AnalysisResultUpdate {
|
|
|
49
52
|
virtualPresenceId: string;
|
|
50
53
|
dataHolderIdentifier: string;
|
|
51
54
|
status: AnalysisResultStatus;
|
|
55
|
+
statusReason?: AnalysisResultStatusReason;
|
|
52
56
|
lastAnalyzedAt: Date;
|
|
53
57
|
owner: string;
|
|
54
58
|
version: number;
|
|
@@ -73,6 +77,24 @@ export declare enum AnalysisResultStatus {
|
|
|
73
77
|
Failed = "FAILED",
|
|
74
78
|
Unavailable = "UNAVAILABLE"
|
|
75
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* The reason explaining an analysis result's status.
|
|
82
|
+
*
|
|
83
|
+
* @property INVALID_DOMAIN The requested domain was not a valid analyzable domain.
|
|
84
|
+
* @property POLICY_UNAVAILABLE No privacy policy could be located for the organization.
|
|
85
|
+
* @property MALICIOUS The domain was identified as malicious.
|
|
86
|
+
* @property NOT_ATTEMPTED Analysis was not attempted for the domain.
|
|
87
|
+
* @property OTHER A reason that does not fit the other categories.
|
|
88
|
+
*
|
|
89
|
+
* @enum
|
|
90
|
+
*/
|
|
91
|
+
export declare enum AnalysisResultStatusReason {
|
|
92
|
+
InvalidDomain = "INVALID_DOMAIN",
|
|
93
|
+
PolicyUnavailable = "POLICY_UNAVAILABLE",
|
|
94
|
+
Malicious = "MALICIOUS",
|
|
95
|
+
NotAttempted = "NOT_ATTEMPTED",
|
|
96
|
+
Other = "OTHER"
|
|
97
|
+
}
|
|
76
98
|
/**
|
|
77
99
|
* The structured data payload for an analysis result.
|
|
78
100
|
*
|
|
@@ -260,7 +282,9 @@ export interface CategorySignals {
|
|
|
260
282
|
* @property {SignalValue} supportsDataDeletionRequests Whether the organization supports data deletion requests.
|
|
261
283
|
* @property {SignalValue} supportsDataExport Whether the organization supports data export.
|
|
262
284
|
* @property {SignalValue} supportsSubscriptions Whether the organization supports subscription management.
|
|
285
|
+
* @property {SignalValue} supportsOptOutOfSale Whether the organization exposes an opt-out-of-sale control to users.
|
|
263
286
|
* @property {SignalValue} sellsPersonalInformation Whether the organization sells personal information.
|
|
287
|
+
* @deprecated Use {@link CapabilitySignals.supportsOptOutOfSale} instead. Populated from `supportsOptOutOfSale`.
|
|
264
288
|
* @property {SignalValue} usesCookiesOrTracking Whether the organization uses cookies or tracking.
|
|
265
289
|
* @property {SignalValue} supportsTwoFactorAuth Whether the organization supports two-factor auth for logins.
|
|
266
290
|
*/
|
|
@@ -270,6 +294,11 @@ export interface CapabilitySignals {
|
|
|
270
294
|
supportsDataDeletionRequests: SignalValue;
|
|
271
295
|
supportsDataExport: SignalValue;
|
|
272
296
|
supportsSubscriptions: SignalValue;
|
|
297
|
+
supportsOptOutOfSale: SignalValue;
|
|
298
|
+
/**
|
|
299
|
+
* @deprecated Use {@link CapabilitySignals.supportsOptOutOfSale} instead.
|
|
300
|
+
* Populated from the `supportsOptOutOfSale` value.
|
|
301
|
+
*/
|
|
273
302
|
sellsPersonalInformation: SignalValue;
|
|
274
303
|
usesCookiesOrTracking: SignalValue;
|
|
275
304
|
supportsTwoFactorAuth: SignalValue;
|
|
@@ -302,6 +331,7 @@ export interface RiskIndicators {
|
|
|
302
331
|
* @enum
|
|
303
332
|
*/
|
|
304
333
|
export declare enum OrganizationCategory {
|
|
334
|
+
AdultEntertainment = "AdultEntertainment",
|
|
305
335
|
Automotive = "Automotive",
|
|
306
336
|
Communications = "Communications",
|
|
307
337
|
CommunityAndCharity = "CommunityAndCharity",
|
|
@@ -44,6 +44,7 @@ export interface DataHolder {
|
|
|
44
44
|
* @property MONITORED The data holder is being monitored.
|
|
45
45
|
* @property ACTION_REQUESTED An action has been requested against this data holder.
|
|
46
46
|
* @property RESOLVED The data holder has been resolved.
|
|
47
|
+
* @property ARCHIVED The data holder has been archived by the user.
|
|
47
48
|
*
|
|
48
49
|
* @enum
|
|
49
50
|
*/
|
|
@@ -51,6 +52,7 @@ export declare enum DataHolderProtectionState {
|
|
|
51
52
|
Monitored = "MONITORED",
|
|
52
53
|
ActionRequested = "ACTION_REQUESTED",
|
|
53
54
|
Resolved = "RESOLVED",
|
|
55
|
+
Archived = "ARCHIVED",
|
|
54
56
|
Unknown = "UNKNOWN"
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { AnalysisResultData, AnalysisResultStatus } from './analysisResult';
|
|
6
|
+
import { AnalysisResultData, AnalysisResultStatus, AnalysisResultStatusReason } from './analysisResult';
|
|
7
7
|
/**
|
|
8
8
|
* The Sudo Platform SDK representation of a shared, domain-keyed privacy analysis
|
|
9
9
|
* of an organization.
|
|
@@ -17,6 +17,7 @@ import { AnalysisResultData, AnalysisResultStatus } from './analysisResult';
|
|
|
17
17
|
* @property {string} domain The analyzed domain (equal to id).
|
|
18
18
|
* @property {AnalysisResultStatus} status Aggregate status. Pending while an asynchronous
|
|
19
19
|
* source is still resolving; re-query for the terminal result.
|
|
20
|
+
* @property {AnalysisResultStatusReason} statusReason Reason explaining the aggregate status, when one applies.
|
|
20
21
|
* @property {Date} lastAnalyzedAt When the aggregate was last derived.
|
|
21
22
|
* @property {AnalysisResultData} data Structured analysis payload. Populated when status is
|
|
22
23
|
* Complete or Partial.
|
|
@@ -29,6 +30,7 @@ export interface OrganizationAnalysis {
|
|
|
29
30
|
id: string;
|
|
30
31
|
domain: string;
|
|
31
32
|
status: AnalysisResultStatus;
|
|
33
|
+
statusReason?: AnalysisResultStatusReason;
|
|
32
34
|
lastAnalyzedAt: Date;
|
|
33
35
|
data?: AnalysisResultData;
|
|
34
36
|
owner: string;
|
|
@@ -51,3 +53,18 @@ export declare enum OrganizationAnalysisMode {
|
|
|
51
53
|
Analyze = "ANALYZE",
|
|
52
54
|
Fetch = "FETCH"
|
|
53
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Controls how `getOrganizationAnalysis` treats the requested domain before
|
|
58
|
+
* sources query their backing services.
|
|
59
|
+
*
|
|
60
|
+
* @property Registrable Reduce the domain to its registrable (eTLD+1) form before analysis,
|
|
61
|
+
* e.g. `mail.sub.example.co.uk` becomes `example.co.uk`.
|
|
62
|
+
* @property Exact Analyze the domain verbatim, without reducing it to a registrable domain.
|
|
63
|
+
* Used to analyze a specific host/subdomain rather than the organization.
|
|
64
|
+
*
|
|
65
|
+
* @enum
|
|
66
|
+
*/
|
|
67
|
+
export declare enum OrganizationAnalysisDomainResolution {
|
|
68
|
+
Registrable = "REGISTRABLE",
|
|
69
|
+
Exact = "EXACT"
|
|
70
|
+
}
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
* @property {Date} lastScannedAt Date for when the virtual presence was last scanned.
|
|
19
19
|
* @property {string} lastScanFailureReason Reason the most recent completed scan failed (an error/exception name).
|
|
20
20
|
* Undefined when the most recent completed scan succeeded (or none has completed).
|
|
21
|
+
* @property {DataHolderCount} dataHolderCount Counts of this virtual presence's data holders,
|
|
22
|
+
* broken down by protection state.
|
|
21
23
|
* @property {Date} createdAt Date for when the virtual presence was created.
|
|
22
24
|
* @property {Date} updatedAt Date for when the virtual presence was last updated.
|
|
23
25
|
*/
|
|
@@ -30,9 +32,32 @@ export interface VirtualPresence {
|
|
|
30
32
|
state: VirtualPresenceState;
|
|
31
33
|
lastScannedAt: Date;
|
|
32
34
|
lastScanFailureReason?: string;
|
|
35
|
+
dataHolderCount: DataHolderCount;
|
|
33
36
|
createdAt: Date;
|
|
34
37
|
updatedAt: Date;
|
|
35
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Counts of a virtual presence's data holders, broken down by protection state.
|
|
41
|
+
*
|
|
42
|
+
* @interface DataHolderCount
|
|
43
|
+
* @property {number} count Active (non-archived) data holders: the sum of monitored,
|
|
44
|
+
* initiatedActions, and completedActions. Excludes archived.
|
|
45
|
+
* @property {number} monitored Data holders the system has identified
|
|
46
|
+
* (protection state Monitored).
|
|
47
|
+
* @property {number} initiatedActions Data holders with an action in progress
|
|
48
|
+
* (protection state ActionRequested).
|
|
49
|
+
* @property {number} completedActions Data holders whose action has completed
|
|
50
|
+
* (protection state Resolved).
|
|
51
|
+
* @property {number} archived Data holders the user has archived
|
|
52
|
+
* (protection state Archived).
|
|
53
|
+
*/
|
|
54
|
+
export interface DataHolderCount {
|
|
55
|
+
count: number;
|
|
56
|
+
monitored: number;
|
|
57
|
+
initiatedActions: number;
|
|
58
|
+
completedActions: number;
|
|
59
|
+
archived: number;
|
|
60
|
+
}
|
|
36
61
|
/**
|
|
37
62
|
* Enumeration that defines the provider type of the virtual presence.
|
|
38
63
|
*
|