@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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { AnalysisResultStatusReason } from '../../../../public/typings/analysisResult';
|
|
7
|
+
import { AnalysisResultStatusReasonEntity } from '../../../domain/entities/analysis-result/analysisResultEntity';
|
|
8
|
+
export class AnalysisResultStatusReasonTransformer {
|
|
9
|
+
fromGraphQLToEntity(data) {
|
|
10
|
+
switch (data) {
|
|
11
|
+
case 'INVALID_DOMAIN':
|
|
12
|
+
return AnalysisResultStatusReasonEntity.InvalidDomain;
|
|
13
|
+
case 'POLICY_UNAVAILABLE':
|
|
14
|
+
return AnalysisResultStatusReasonEntity.PolicyUnavailable;
|
|
15
|
+
case 'MALICIOUS':
|
|
16
|
+
return AnalysisResultStatusReasonEntity.Malicious;
|
|
17
|
+
case 'NOT_ATTEMPTED':
|
|
18
|
+
return AnalysisResultStatusReasonEntity.NotAttempted;
|
|
19
|
+
case 'OTHER':
|
|
20
|
+
return AnalysisResultStatusReasonEntity.Other;
|
|
21
|
+
default:
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
fromEntityToAPI(entity) {
|
|
26
|
+
switch (entity) {
|
|
27
|
+
case AnalysisResultStatusReasonEntity.InvalidDomain:
|
|
28
|
+
return AnalysisResultStatusReason.InvalidDomain;
|
|
29
|
+
case AnalysisResultStatusReasonEntity.PolicyUnavailable:
|
|
30
|
+
return AnalysisResultStatusReason.PolicyUnavailable;
|
|
31
|
+
case AnalysisResultStatusReasonEntity.Malicious:
|
|
32
|
+
return AnalysisResultStatusReason.Malicious;
|
|
33
|
+
case AnalysisResultStatusReasonEntity.NotAttempted:
|
|
34
|
+
return AnalysisResultStatusReason.NotAttempted;
|
|
35
|
+
case AnalysisResultStatusReasonEntity.Other:
|
|
36
|
+
return AnalysisResultStatusReason.Other;
|
|
37
|
+
default:
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -4,16 +4,20 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AnalysisResultDataTransformer } from './analysisResultDataTransformer';
|
|
7
|
+
import { AnalysisResultStatusReasonTransformer } from './analysisResultStatusReasonTransformer';
|
|
7
8
|
import { AnalysisResultStatusTransformer } from './analysisResultStatusTransformer';
|
|
8
9
|
export class AnalysisResultTransformer {
|
|
9
10
|
statusTransformer = new AnalysisResultStatusTransformer();
|
|
11
|
+
statusReasonTransformer = new AnalysisResultStatusReasonTransformer();
|
|
10
12
|
dataTransformer = new AnalysisResultDataTransformer();
|
|
11
13
|
fromGraphQLToEntity(data) {
|
|
14
|
+
const statusReason = this.statusReasonTransformer.fromGraphQLToEntity(data.statusReason);
|
|
12
15
|
return {
|
|
13
16
|
id: data.id,
|
|
14
17
|
virtualPresenceId: data.virtualPresenceId,
|
|
15
18
|
dataHolderIdentifier: data.dataHolderIdentifier,
|
|
16
19
|
status: this.statusTransformer.fromGraphQLToEntity(data.status),
|
|
20
|
+
...(statusReason !== undefined && { statusReason }),
|
|
17
21
|
lastAnalyzedAt: new Date(data.lastAnalyzedAtEpochMs),
|
|
18
22
|
data: data.data
|
|
19
23
|
? this.dataTransformer.fromGraphQLToEntity(data.data)
|
|
@@ -25,11 +29,13 @@ export class AnalysisResultTransformer {
|
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
fromEntityToAPI(entity) {
|
|
32
|
+
const statusReason = this.statusReasonTransformer.fromEntityToAPI(entity.statusReason);
|
|
28
33
|
return {
|
|
29
34
|
id: entity.id,
|
|
30
35
|
virtualPresenceId: entity.virtualPresenceId,
|
|
31
36
|
dataHolderIdentifier: entity.dataHolderIdentifier,
|
|
32
37
|
status: this.statusTransformer.fromEntityToAPI(entity.status),
|
|
38
|
+
...(statusReason !== undefined && { statusReason }),
|
|
33
39
|
lastAnalyzedAt: entity.lastAnalyzedAt,
|
|
34
40
|
data: entity.data
|
|
35
41
|
? this.dataTransformer.fromEntityToAPI(entity.data)
|
|
@@ -13,7 +13,7 @@ export class CapabilitySignalsTransformer {
|
|
|
13
13
|
supportsDataDeletionRequests: this.signalValueTransformer.fromGraphQLToEntity(data.supportsDataDeletionRequests),
|
|
14
14
|
supportsDataExport: this.signalValueTransformer.fromGraphQLToEntity(data.supportsDataExport),
|
|
15
15
|
supportsSubscriptions: this.signalValueTransformer.fromGraphQLToEntity(data.supportsSubscriptions),
|
|
16
|
-
|
|
16
|
+
supportsOptOutOfSale: this.signalValueTransformer.fromGraphQLToEntity(data.supportsOptOutOfSale),
|
|
17
17
|
usesCookiesOrTracking: this.signalValueTransformer.fromGraphQLToEntity(data.usesCookiesOrTracking),
|
|
18
18
|
supportsTwoFactorAuth: this.signalValueTransformer.fromGraphQLToEntity(data.supportsTwoFactorAuth),
|
|
19
19
|
};
|
|
@@ -25,7 +25,10 @@ export class CapabilitySignalsTransformer {
|
|
|
25
25
|
supportsDataDeletionRequests: this.signalValueTransformer.fromEntityToAPI(entity.supportsDataDeletionRequests),
|
|
26
26
|
supportsDataExport: this.signalValueTransformer.fromEntityToAPI(entity.supportsDataExport),
|
|
27
27
|
supportsSubscriptions: this.signalValueTransformer.fromEntityToAPI(entity.supportsSubscriptions),
|
|
28
|
-
|
|
28
|
+
supportsOptOutOfSale: this.signalValueTransformer.fromEntityToAPI(entity.supportsOptOutOfSale),
|
|
29
|
+
// Deprecated: surfaced for backward compatibility, populated from
|
|
30
|
+
// `supportsOptOutOfSale`.
|
|
31
|
+
sellsPersonalInformation: this.signalValueTransformer.fromEntityToAPI(entity.supportsOptOutOfSale),
|
|
29
32
|
usesCookiesOrTracking: this.signalValueTransformer.fromEntityToAPI(entity.usesCookiesOrTracking),
|
|
30
33
|
supportsTwoFactorAuth: this.signalValueTransformer.fromEntityToAPI(entity.supportsTwoFactorAuth),
|
|
31
34
|
};
|
|
@@ -8,6 +8,8 @@ import { OrganizationCategoryEntity } from '../../../domain/entities/analysis-re
|
|
|
8
8
|
export class OrganizationCategoryTransformer {
|
|
9
9
|
fromGraphQLToEntity(data) {
|
|
10
10
|
switch (data) {
|
|
11
|
+
case 'AdultEntertainment':
|
|
12
|
+
return OrganizationCategoryEntity.AdultEntertainment;
|
|
11
13
|
case 'Automotive':
|
|
12
14
|
return OrganizationCategoryEntity.Automotive;
|
|
13
15
|
case 'Communications':
|
|
@@ -72,6 +74,8 @@ export class OrganizationCategoryTransformer {
|
|
|
72
74
|
}
|
|
73
75
|
fromEntityToAPI(entity) {
|
|
74
76
|
switch (entity) {
|
|
77
|
+
case OrganizationCategoryEntity.AdultEntertainment:
|
|
78
|
+
return OrganizationCategory.AdultEntertainment;
|
|
75
79
|
case OrganizationCategoryEntity.Automotive:
|
|
76
80
|
return OrganizationCategory.Automotive;
|
|
77
81
|
case OrganizationCategoryEntity.Communications:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { DefaultApiClientManager, } from '@sudoplatform/sudo-api-client';
|
|
7
7
|
import { DefaultLogger, FatalError, UnknownGraphQLError, isGraphQLNetworkError, mapNetworkErrorToClientError, } from '@sudoplatform/sudo-common';
|
|
8
|
-
import { ConfirmActionOutcomeDocument, ConnectVirtualPresenceDocument, DisconnectVirtualPresenceDocument, GetAnalysisResultDocument, GetDataHolderDocument, GetProviderConfigurationDocument, GetOrganizationAnalysisDocument, InitiateActionDocument, ListAnalysisResultsDocument, ListAvailableActionsDocument, ListDataHolderScanSummariesDocument, ListDataHoldersDocument, ListVirtualPresencesDocument, OnActionStatusUpdateDocument, OnAnalysisResultUpdateDocument, OnDataHoldersUpdateDocument, OnVirtualPresenceUpdateDocument, RescanVirtualPresenceDocument, } from '../../../gen/graphqlTypes';
|
|
8
|
+
import { ArchiveDataHolderDocument, ConfirmActionOutcomeDocument, ConnectVirtualPresenceDocument, DisconnectVirtualPresenceDocument, GetActionDocument, GetAnalysisResultDocument, GetDataHolderDocument, GetProviderConfigurationDocument, GetOrganizationAnalysisDocument, InitiateActionDocument, ListAnalysisResultsDocument, ListAvailableActionsDocument, ListDataHolderScanSummariesDocument, ListDataHoldersDocument, ListVirtualPresencesDocument, OnActionStatusUpdateDocument, OnAnalysisResultUpdateDocument, OnDataHoldersUpdateDocument, OnVirtualPresenceUpdateDocument, RescanVirtualPresenceDocument, UnarchiveDataHolderDocument, } from '../../../gen/graphqlTypes';
|
|
9
9
|
import { ErrorTransformer } from './transformer/errorTransformer';
|
|
10
10
|
export class ApiClient {
|
|
11
11
|
log;
|
|
@@ -91,6 +91,22 @@ export class ApiClient {
|
|
|
91
91
|
});
|
|
92
92
|
return data.listDataHolderScanSummaries;
|
|
93
93
|
}
|
|
94
|
+
async archiveDataHolder(id) {
|
|
95
|
+
const data = await this.performMutation({
|
|
96
|
+
mutation: ArchiveDataHolderDocument,
|
|
97
|
+
variables: { id },
|
|
98
|
+
calleeName: this.archiveDataHolder.name,
|
|
99
|
+
});
|
|
100
|
+
return data.archiveDataHolder;
|
|
101
|
+
}
|
|
102
|
+
async unarchiveDataHolder(id) {
|
|
103
|
+
const data = await this.performMutation({
|
|
104
|
+
mutation: UnarchiveDataHolderDocument,
|
|
105
|
+
variables: { id },
|
|
106
|
+
calleeName: this.unarchiveDataHolder.name,
|
|
107
|
+
});
|
|
108
|
+
return data.unarchiveDataHolder;
|
|
109
|
+
}
|
|
94
110
|
async getAnalysisResult(id) {
|
|
95
111
|
const data = await this.performQuery({
|
|
96
112
|
query: GetAnalysisResultDocument,
|
|
@@ -100,11 +116,15 @@ export class ApiClient {
|
|
|
100
116
|
return data.getAnalysisResult ?? undefined;
|
|
101
117
|
}
|
|
102
118
|
async getOrganizationAnalysis(input) {
|
|
119
|
+
const options = input.mode || input.resolution
|
|
120
|
+
? { mode: input.mode, resolution: input.resolution }
|
|
121
|
+
: undefined;
|
|
103
122
|
const data = await this.performQuery({
|
|
104
123
|
query: GetOrganizationAnalysisDocument,
|
|
105
124
|
variables: {
|
|
106
125
|
domain: input.domain,
|
|
107
|
-
|
|
126
|
+
name: input.name,
|
|
127
|
+
options,
|
|
108
128
|
},
|
|
109
129
|
calleeName: this.getOrganizationAnalysis.name,
|
|
110
130
|
});
|
|
@@ -138,6 +158,14 @@ export class ApiClient {
|
|
|
138
158
|
});
|
|
139
159
|
return data.confirmActionOutcome;
|
|
140
160
|
}
|
|
161
|
+
async getAction(id) {
|
|
162
|
+
const data = await this.performQuery({
|
|
163
|
+
query: GetActionDocument,
|
|
164
|
+
variables: { id },
|
|
165
|
+
calleeName: this.getAction.name,
|
|
166
|
+
});
|
|
167
|
+
return data.getAction ?? undefined;
|
|
168
|
+
}
|
|
141
169
|
async listAvailableActions(input) {
|
|
142
170
|
const data = await this.performQuery({
|
|
143
171
|
query: ListAvailableActionsDocument,
|
|
@@ -45,6 +45,14 @@ export class DefaultDataHolderService {
|
|
|
45
45
|
nextToken: result.nextToken ?? undefined,
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
+
async archive(id) {
|
|
49
|
+
const result = await this.appSync.archiveDataHolder(id);
|
|
50
|
+
return this.dataHolderTransformer.fromGraphQLToEntity(result);
|
|
51
|
+
}
|
|
52
|
+
async unarchive(id) {
|
|
53
|
+
const result = await this.appSync.unarchiveDataHolder(id);
|
|
54
|
+
return this.dataHolderTransformer.fromGraphQLToEntity(result);
|
|
55
|
+
}
|
|
48
56
|
async subscribe(input) {
|
|
49
57
|
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
50
58
|
if (!this.subscriptionManager.getWatcher()) {
|
|
@@ -14,6 +14,8 @@ export class DataHolderProtectionStateTransformer {
|
|
|
14
14
|
return DataHolderProtectionState.ActionRequested;
|
|
15
15
|
case DataHolderProtectionStateEntity.Resolved:
|
|
16
16
|
return DataHolderProtectionState.Resolved;
|
|
17
|
+
case DataHolderProtectionStateEntity.Archived:
|
|
18
|
+
return DataHolderProtectionState.Archived;
|
|
17
19
|
case DataHolderProtectionStateEntity.Unknown:
|
|
18
20
|
return DataHolderProtectionState.Unknown;
|
|
19
21
|
}
|
|
@@ -26,6 +28,8 @@ export class DataHolderProtectionStateTransformer {
|
|
|
26
28
|
return DataHolderProtectionStateEntity.ActionRequested;
|
|
27
29
|
case 'RESOLVED':
|
|
28
30
|
return DataHolderProtectionStateEntity.Resolved;
|
|
31
|
+
case 'ARCHIVED':
|
|
32
|
+
return DataHolderProtectionStateEntity.Archived;
|
|
29
33
|
default:
|
|
30
34
|
return DataHolderProtectionStateEntity.Unknown;
|
|
31
35
|
}
|
|
@@ -3,21 +3,27 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { OrganizationAnalysisDomainResolutionTransformer } from './transformer/organizationAnalysisDomainResolutionTransformer';
|
|
6
7
|
import { OrganizationAnalysisModeTransformer } from './transformer/organizationAnalysisModeTransformer';
|
|
7
8
|
import { OrganizationAnalysisTransformer } from './transformer/organizationAnalysisTransformer';
|
|
8
9
|
export class DefaultOrganizationAnalysisService {
|
|
9
10
|
appSync;
|
|
10
11
|
organizationAnalysisTransformer = new OrganizationAnalysisTransformer();
|
|
11
12
|
modeTransformer = new OrganizationAnalysisModeTransformer();
|
|
13
|
+
resolutionTransformer = new OrganizationAnalysisDomainResolutionTransformer();
|
|
12
14
|
constructor(appSync) {
|
|
13
15
|
this.appSync = appSync;
|
|
14
16
|
}
|
|
15
17
|
async getOrganizationAnalysis(input) {
|
|
16
18
|
const result = await this.appSync.getOrganizationAnalysis({
|
|
17
19
|
domain: input.domain,
|
|
20
|
+
name: input.name,
|
|
18
21
|
mode: input.mode
|
|
19
22
|
? this.modeTransformer.fromEntityToGraphQL(input.mode)
|
|
20
23
|
: undefined,
|
|
24
|
+
resolution: input.resolution
|
|
25
|
+
? this.resolutionTransformer.fromEntityToGraphQL(input.resolution)
|
|
26
|
+
: undefined,
|
|
21
27
|
});
|
|
22
28
|
if (!result) {
|
|
23
29
|
return undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OrganizationAnalysisDomainResolution } from '../../../../public/typings/organizationAnalysis';
|
|
7
|
+
import { OrganizationAnalysisDomainResolutionEntity } from '../../../domain/entities/organization-analysis/organizationAnalysisEntity';
|
|
8
|
+
export class OrganizationAnalysisDomainResolutionTransformer {
|
|
9
|
+
fromAPIToEntity(resolution) {
|
|
10
|
+
switch (resolution) {
|
|
11
|
+
case OrganizationAnalysisDomainResolution.Registrable:
|
|
12
|
+
return OrganizationAnalysisDomainResolutionEntity.Registrable;
|
|
13
|
+
case OrganizationAnalysisDomainResolution.Exact:
|
|
14
|
+
return OrganizationAnalysisDomainResolutionEntity.Exact;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
fromEntityToGraphQL(resolution) {
|
|
18
|
+
switch (resolution) {
|
|
19
|
+
case OrganizationAnalysisDomainResolutionEntity.Registrable:
|
|
20
|
+
return 'REGISTRABLE';
|
|
21
|
+
case OrganizationAnalysisDomainResolutionEntity.Exact:
|
|
22
|
+
return 'EXACT';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js
CHANGED
|
@@ -4,15 +4,19 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AnalysisResultDataTransformer } from '../../analysis-result/transformer/analysisResultDataTransformer';
|
|
7
|
+
import { AnalysisResultStatusReasonTransformer } from '../../analysis-result/transformer/analysisResultStatusReasonTransformer';
|
|
7
8
|
import { AnalysisResultStatusTransformer } from '../../analysis-result/transformer/analysisResultStatusTransformer';
|
|
8
9
|
export class OrganizationAnalysisTransformer {
|
|
9
10
|
statusTransformer = new AnalysisResultStatusTransformer();
|
|
11
|
+
statusReasonTransformer = new AnalysisResultStatusReasonTransformer();
|
|
10
12
|
dataTransformer = new AnalysisResultDataTransformer();
|
|
11
13
|
fromGraphQLToEntity(data) {
|
|
14
|
+
const statusReason = this.statusReasonTransformer.fromGraphQLToEntity(data.statusReason);
|
|
12
15
|
return {
|
|
13
16
|
id: data.id,
|
|
14
17
|
domain: data.domain,
|
|
15
18
|
status: this.statusTransformer.fromGraphQLToEntity(data.status),
|
|
19
|
+
...(statusReason !== undefined && { statusReason }),
|
|
16
20
|
lastAnalyzedAt: new Date(data.lastAnalyzedAtEpochMs),
|
|
17
21
|
data: data.data
|
|
18
22
|
? this.dataTransformer.fromGraphQLToEntity(data.data)
|
|
@@ -24,10 +28,12 @@ export class OrganizationAnalysisTransformer {
|
|
|
24
28
|
};
|
|
25
29
|
}
|
|
26
30
|
fromEntityToAPI(entity) {
|
|
31
|
+
const statusReason = this.statusReasonTransformer.fromEntityToAPI(entity.statusReason);
|
|
27
32
|
return {
|
|
28
33
|
id: entity.id,
|
|
29
34
|
domain: entity.domain,
|
|
30
35
|
status: this.statusTransformer.fromEntityToAPI(entity.status),
|
|
36
|
+
...(statusReason !== undefined && { statusReason }),
|
|
31
37
|
lastAnalyzedAt: entity.lastAnalyzedAt,
|
|
32
38
|
data: entity.data
|
|
33
39
|
? this.dataTransformer.fromEntityToAPI(entity.data)
|
|
@@ -18,6 +18,7 @@ export class VirtualPresenceTransformer {
|
|
|
18
18
|
state: virtualPresenceStateTransformer.fromEntityToAPI(entity.state),
|
|
19
19
|
lastScannedAt: entity.lastScannedAt,
|
|
20
20
|
lastScanFailureReason: entity.lastScanFailureReason,
|
|
21
|
+
dataHolderCount: { ...entity.dataHolderCount },
|
|
21
22
|
createdAt: entity.createdAt,
|
|
22
23
|
updatedAt: entity.updatedAt,
|
|
23
24
|
};
|
|
@@ -34,6 +35,13 @@ export class VirtualPresenceTransformer {
|
|
|
34
35
|
state: virtualPresenceStateTransformer.fromGraphQLToEntity(data.state),
|
|
35
36
|
lastScannedAt: new Date(data.lastScannedAtEpochMs),
|
|
36
37
|
lastScanFailureReason: data.lastScanFailureReason ?? undefined,
|
|
38
|
+
dataHolderCount: {
|
|
39
|
+
count: data.dataHolderCount.count,
|
|
40
|
+
monitored: data.dataHolderCount.monitored,
|
|
41
|
+
initiatedActions: data.dataHolderCount.initiatedActions,
|
|
42
|
+
completedActions: data.dataHolderCount.completedActions,
|
|
43
|
+
archived: data.dataHolderCount.archived,
|
|
44
|
+
},
|
|
37
45
|
createdAt: new Date(data.createdAtEpochMs),
|
|
38
46
|
updatedAt: new Date(data.updatedAtEpochMs),
|
|
39
47
|
};
|
|
@@ -22,6 +22,25 @@ export var AnalysisResultStatusEntity;
|
|
|
22
22
|
AnalysisResultStatusEntity["Failed"] = "FAILED";
|
|
23
23
|
AnalysisResultStatusEntity["Unavailable"] = "UNAVAILABLE";
|
|
24
24
|
})(AnalysisResultStatusEntity || (AnalysisResultStatusEntity = {}));
|
|
25
|
+
/**
|
|
26
|
+
* The reason explaining an analysis result's status.
|
|
27
|
+
*
|
|
28
|
+
* @property INVALID_DOMAIN The requested domain was not a valid analyzable domain.
|
|
29
|
+
* @property POLICY_UNAVAILABLE No privacy policy could be located for the organization.
|
|
30
|
+
* @property MALICIOUS The domain was identified as malicious.
|
|
31
|
+
* @property NOT_ATTEMPTED Analysis was not attempted for the domain.
|
|
32
|
+
* @property OTHER A reason that does not fit the other categories.
|
|
33
|
+
*
|
|
34
|
+
* @enum
|
|
35
|
+
*/
|
|
36
|
+
export var AnalysisResultStatusReasonEntity;
|
|
37
|
+
(function (AnalysisResultStatusReasonEntity) {
|
|
38
|
+
AnalysisResultStatusReasonEntity["InvalidDomain"] = "INVALID_DOMAIN";
|
|
39
|
+
AnalysisResultStatusReasonEntity["PolicyUnavailable"] = "POLICY_UNAVAILABLE";
|
|
40
|
+
AnalysisResultStatusReasonEntity["Malicious"] = "MALICIOUS";
|
|
41
|
+
AnalysisResultStatusReasonEntity["NotAttempted"] = "NOT_ATTEMPTED";
|
|
42
|
+
AnalysisResultStatusReasonEntity["Other"] = "OTHER";
|
|
43
|
+
})(AnalysisResultStatusReasonEntity || (AnalysisResultStatusReasonEntity = {}));
|
|
25
44
|
/**
|
|
26
45
|
* Tri-state signal value representing confidence in a determination.
|
|
27
46
|
*
|
|
@@ -100,6 +119,7 @@ export var RetentionStyleEntity;
|
|
|
100
119
|
*/
|
|
101
120
|
export var OrganizationCategoryEntity;
|
|
102
121
|
(function (OrganizationCategoryEntity) {
|
|
122
|
+
OrganizationCategoryEntity["AdultEntertainment"] = "AdultEntertainment";
|
|
103
123
|
OrganizationCategoryEntity["Automotive"] = "Automotive";
|
|
104
124
|
OrganizationCategoryEntity["Communications"] = "Communications";
|
|
105
125
|
OrganizationCategoryEntity["CommunityAndCharity"] = "CommunityAndCharity";
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @property MONITORED The data holder is being monitored.
|
|
10
10
|
* @property ACTION_REQUESTED An action has been requested against this data holder.
|
|
11
11
|
* @property RESOLVED The data holder has been resolved.
|
|
12
|
+
* @property ARCHIVED The data holder has been archived by the user.
|
|
12
13
|
*
|
|
13
14
|
* @enum
|
|
14
15
|
*/
|
|
@@ -17,5 +18,6 @@ export var DataHolderProtectionStateEntity;
|
|
|
17
18
|
DataHolderProtectionStateEntity["Monitored"] = "MONITORED";
|
|
18
19
|
DataHolderProtectionStateEntity["ActionRequested"] = "ACTION_REQUESTED";
|
|
19
20
|
DataHolderProtectionStateEntity["Resolved"] = "RESOLVED";
|
|
21
|
+
DataHolderProtectionStateEntity["Archived"] = "ARCHIVED";
|
|
20
22
|
DataHolderProtectionStateEntity["Unknown"] = "UNKNOWN";
|
|
21
23
|
})(DataHolderProtectionStateEntity || (DataHolderProtectionStateEntity = {}));
|
|
@@ -19,3 +19,19 @@ export var OrganizationAnalysisModeEntity;
|
|
|
19
19
|
OrganizationAnalysisModeEntity["Analyze"] = "ANALYZE";
|
|
20
20
|
OrganizationAnalysisModeEntity["Fetch"] = "FETCH";
|
|
21
21
|
})(OrganizationAnalysisModeEntity || (OrganizationAnalysisModeEntity = {}));
|
|
22
|
+
/**
|
|
23
|
+
* Controls how `getOrganizationAnalysis` treats the requested domain before
|
|
24
|
+
* sources query their backing services.
|
|
25
|
+
*
|
|
26
|
+
* @property REGISTRABLE Reduce the domain to its registrable (eTLD+1) form before analysis,
|
|
27
|
+
* e.g. `mail.sub.example.co.uk` becomes `example.co.uk`.
|
|
28
|
+
* @property EXACT Analyze the domain verbatim, without reducing it to a registrable domain.
|
|
29
|
+
* Used to analyze a specific host/subdomain rather than the organization.
|
|
30
|
+
*
|
|
31
|
+
* @enum
|
|
32
|
+
*/
|
|
33
|
+
export var OrganizationAnalysisDomainResolutionEntity;
|
|
34
|
+
(function (OrganizationAnalysisDomainResolutionEntity) {
|
|
35
|
+
OrganizationAnalysisDomainResolutionEntity["Registrable"] = "REGISTRABLE";
|
|
36
|
+
OrganizationAnalysisDomainResolutionEntity["Exact"] = "EXACT";
|
|
37
|
+
})(OrganizationAnalysisDomainResolutionEntity || (OrganizationAnalysisDomainResolutionEntity = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DefaultLogger } from '@sudoplatform/sudo-common';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for retrieving a single action.
|
|
9
|
+
*/
|
|
10
|
+
export class GetActionUseCase {
|
|
11
|
+
actionService;
|
|
12
|
+
log;
|
|
13
|
+
constructor(actionService) {
|
|
14
|
+
this.actionService = actionService;
|
|
15
|
+
this.log = new DefaultLogger(this.constructor.name);
|
|
16
|
+
}
|
|
17
|
+
async execute(id) {
|
|
18
|
+
this.log.debug(this.constructor.name, { id });
|
|
19
|
+
return await this.actionService.get(id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DefaultLogger } from '@sudoplatform/sudo-common';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for archiving a data holder.
|
|
9
|
+
*/
|
|
10
|
+
export class ArchiveDataHolderUseCase {
|
|
11
|
+
dataHolderService;
|
|
12
|
+
log;
|
|
13
|
+
constructor(dataHolderService) {
|
|
14
|
+
this.dataHolderService = dataHolderService;
|
|
15
|
+
this.log = new DefaultLogger(this.constructor.name);
|
|
16
|
+
}
|
|
17
|
+
async execute(id) {
|
|
18
|
+
this.log.debug(this.constructor.name, { id });
|
|
19
|
+
return await this.dataHolderService.archive(id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DefaultLogger } from '@sudoplatform/sudo-common';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for unarchiving a data holder.
|
|
9
|
+
*/
|
|
10
|
+
export class UnarchiveDataHolderUseCase {
|
|
11
|
+
dataHolderService;
|
|
12
|
+
log;
|
|
13
|
+
constructor(dataHolderService) {
|
|
14
|
+
this.dataHolderService = dataHolderService;
|
|
15
|
+
this.log = new DefaultLogger(this.constructor.name);
|
|
16
|
+
}
|
|
17
|
+
async execute(id) {
|
|
18
|
+
this.log.debug(this.constructor.name, { id });
|
|
19
|
+
return await this.dataHolderService.unarchive(id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -19,12 +19,14 @@ import { DefaultProviderConfigurationService } from '../private/data/provider-co
|
|
|
19
19
|
import { ProviderConfigurationTransformer } from '../private/data/provider-configuration/transformer/providerConfigurationTransformer';
|
|
20
20
|
import { DefaultOrganizationAnalysisService } from '../private/data/organization-analysis/defaultOrganizationAnalysisService';
|
|
21
21
|
import { OrganizationAnalysisModeTransformer } from '../private/data/organization-analysis/transformer/organizationAnalysisModeTransformer';
|
|
22
|
+
import { OrganizationAnalysisDomainResolutionTransformer } from '../private/data/organization-analysis/transformer/organizationAnalysisDomainResolutionTransformer';
|
|
22
23
|
import { OrganizationAnalysisTransformer } from '../private/data/organization-analysis/transformer/organizationAnalysisTransformer';
|
|
23
24
|
import { DefaultVirtualPresenceService } from '../private/data/virtual-presence/defaultVirtualPresenceService';
|
|
24
25
|
import { RelationshipProviderTransformer } from '../private/data/virtual-presence/transformer/relationshipProviderTransformer';
|
|
25
26
|
import { VirtualPresenceTransformer } from '../private/data/virtual-presence/transformer/virtualPresenceTransformer';
|
|
26
27
|
import { GetAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/getAnalysisResultUseCase';
|
|
27
28
|
import { ConfirmActionOutcomeUseCase } from '../private/domain/use-cases/action/confirmActionOutcomeUseCase';
|
|
29
|
+
import { GetActionUseCase } from '../private/domain/use-cases/action/getActionUseCase';
|
|
28
30
|
import { InitiateActionUseCase } from '../private/domain/use-cases/action/initiateActionUseCase';
|
|
29
31
|
import { ListAvailableActionsUseCase } from '../private/domain/use-cases/action/listAvailableActionsUseCase';
|
|
30
32
|
import { SubscribeToActionUseCase } from '../private/domain/use-cases/action/subscribeToActionUseCase';
|
|
@@ -35,6 +37,8 @@ import { UnsubscribeFromAnalysisResultUseCase } from '../private/domain/use-case
|
|
|
35
37
|
import { GetProviderConfigurationUseCase } from '../private/domain/use-cases/configuration/getProviderConfigurationUseCase';
|
|
36
38
|
import { GetOrganizationAnalysisUseCase } from '../private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase';
|
|
37
39
|
import { GetDataHolderUseCase } from '../private/domain/use-cases/data-holder/getDataHolderUseCase';
|
|
40
|
+
import { ArchiveDataHolderUseCase } from '../private/domain/use-cases/data-holder/archiveDataHolderUseCase';
|
|
41
|
+
import { UnarchiveDataHolderUseCase } from '../private/domain/use-cases/data-holder/unarchiveDataHolderUseCase';
|
|
38
42
|
import { ListDataHolderScanSummariesUseCase } from '../private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase';
|
|
39
43
|
import { ListDataHoldersUseCase } from '../private/domain/use-cases/data-holder/listDataHoldersUseCase';
|
|
40
44
|
import { SubscribeToDataHoldersUseCase } from '../private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase';
|
|
@@ -46,6 +50,7 @@ import { ListVirtualPresencesUseCase } from '../private/domain/use-cases/virtual
|
|
|
46
50
|
import { RescanVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase';
|
|
47
51
|
import { SubscribeToVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase';
|
|
48
52
|
import { UnsubscribeFromVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase';
|
|
53
|
+
import { OrganizationAnalysisDomainResolution, } from './typings';
|
|
49
54
|
export class DefaultSudoPrivacyInteractionClient {
|
|
50
55
|
apiClient;
|
|
51
56
|
userClient;
|
|
@@ -63,6 +68,7 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
63
68
|
analysisResultTransformer;
|
|
64
69
|
organizationAnalysisTransformer;
|
|
65
70
|
organizationAnalysisModeTransformer;
|
|
71
|
+
organizationAnalysisDomainResolutionTransformer;
|
|
66
72
|
actionTransformer;
|
|
67
73
|
availableActionTransformer;
|
|
68
74
|
actionIntentTransformer;
|
|
@@ -90,6 +96,8 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
90
96
|
this.organizationAnalysisTransformer = new OrganizationAnalysisTransformer();
|
|
91
97
|
this.organizationAnalysisModeTransformer =
|
|
92
98
|
new OrganizationAnalysisModeTransformer();
|
|
99
|
+
this.organizationAnalysisDomainResolutionTransformer =
|
|
100
|
+
new OrganizationAnalysisDomainResolutionTransformer();
|
|
93
101
|
this.actionTransformer = new ActionTransformer();
|
|
94
102
|
this.availableActionTransformer = new AvailableActionTransformer();
|
|
95
103
|
this.actionIntentTransformer = new ActionIntentTransformer();
|
|
@@ -225,6 +233,18 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
225
233
|
const transformedScanSummaries = scanSummaries.map((scanSummary) => this.dataHolderScanSummaryTransformer.fromEntityToAPI(scanSummary));
|
|
226
234
|
return { items: transformedScanSummaries, nextToken: resultNextToken };
|
|
227
235
|
}
|
|
236
|
+
async archiveDataHolder(id) {
|
|
237
|
+
this.log.debug(this.archiveDataHolder.name, { id });
|
|
238
|
+
const useCase = new ArchiveDataHolderUseCase(this.dataHolderService);
|
|
239
|
+
const result = await useCase.execute(id);
|
|
240
|
+
return this.dataHolderTransformer.fromEntityToAPI(result);
|
|
241
|
+
}
|
|
242
|
+
async unarchiveDataHolder(id) {
|
|
243
|
+
this.log.debug(this.unarchiveDataHolder.name, { id });
|
|
244
|
+
const useCase = new UnarchiveDataHolderUseCase(this.dataHolderService);
|
|
245
|
+
const result = await useCase.execute(id);
|
|
246
|
+
return this.dataHolderTransformer.fromEntityToAPI(result);
|
|
247
|
+
}
|
|
228
248
|
async subscribeToDataHolders(subscriptionId, subscriber) {
|
|
229
249
|
this.log.debug(this.subscribeToDataHolders.name, {
|
|
230
250
|
subscriptionId,
|
|
@@ -278,9 +298,11 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
278
298
|
const useCase = new GetOrganizationAnalysisUseCase(this.organizationAnalysisService);
|
|
279
299
|
const result = await useCase.execute({
|
|
280
300
|
domain: input.domain,
|
|
301
|
+
name: input.name,
|
|
281
302
|
mode: input.mode
|
|
282
303
|
? this.organizationAnalysisModeTransformer.fromAPIToEntity(input.mode)
|
|
283
304
|
: undefined,
|
|
305
|
+
resolution: this.organizationAnalysisDomainResolutionTransformer.fromAPIToEntity(input.resolution ?? OrganizationAnalysisDomainResolution.Exact),
|
|
284
306
|
});
|
|
285
307
|
if (!result) {
|
|
286
308
|
return undefined;
|
|
@@ -297,6 +319,15 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
297
319
|
});
|
|
298
320
|
return this.actionTransformer.fromEntityToAPI(result);
|
|
299
321
|
}
|
|
322
|
+
async getAction(id) {
|
|
323
|
+
this.log.debug(this.getAction.name, { id });
|
|
324
|
+
const useCase = new GetActionUseCase(this.actionService);
|
|
325
|
+
const result = await useCase.execute(id);
|
|
326
|
+
if (!result) {
|
|
327
|
+
return undefined;
|
|
328
|
+
}
|
|
329
|
+
return this.actionTransformer.fromEntityToAPI(result);
|
|
330
|
+
}
|
|
300
331
|
async confirmActionOutcome(id) {
|
|
301
332
|
this.log.debug(this.confirmActionOutcome.name, { id });
|
|
302
333
|
const useCase = new ConfirmActionOutcomeUseCase(this.actionService);
|
|
@@ -22,6 +22,25 @@ export var AnalysisResultStatus;
|
|
|
22
22
|
AnalysisResultStatus["Failed"] = "FAILED";
|
|
23
23
|
AnalysisResultStatus["Unavailable"] = "UNAVAILABLE";
|
|
24
24
|
})(AnalysisResultStatus || (AnalysisResultStatus = {}));
|
|
25
|
+
/**
|
|
26
|
+
* The reason explaining an analysis result's status.
|
|
27
|
+
*
|
|
28
|
+
* @property INVALID_DOMAIN The requested domain was not a valid analyzable domain.
|
|
29
|
+
* @property POLICY_UNAVAILABLE No privacy policy could be located for the organization.
|
|
30
|
+
* @property MALICIOUS The domain was identified as malicious.
|
|
31
|
+
* @property NOT_ATTEMPTED Analysis was not attempted for the domain.
|
|
32
|
+
* @property OTHER A reason that does not fit the other categories.
|
|
33
|
+
*
|
|
34
|
+
* @enum
|
|
35
|
+
*/
|
|
36
|
+
export var AnalysisResultStatusReason;
|
|
37
|
+
(function (AnalysisResultStatusReason) {
|
|
38
|
+
AnalysisResultStatusReason["InvalidDomain"] = "INVALID_DOMAIN";
|
|
39
|
+
AnalysisResultStatusReason["PolicyUnavailable"] = "POLICY_UNAVAILABLE";
|
|
40
|
+
AnalysisResultStatusReason["Malicious"] = "MALICIOUS";
|
|
41
|
+
AnalysisResultStatusReason["NotAttempted"] = "NOT_ATTEMPTED";
|
|
42
|
+
AnalysisResultStatusReason["Other"] = "OTHER";
|
|
43
|
+
})(AnalysisResultStatusReason || (AnalysisResultStatusReason = {}));
|
|
25
44
|
/**
|
|
26
45
|
* Tri-state signal value representing confidence in a determination.
|
|
27
46
|
*
|
|
@@ -100,6 +119,7 @@ export var RetentionStyle;
|
|
|
100
119
|
*/
|
|
101
120
|
export var OrganizationCategory;
|
|
102
121
|
(function (OrganizationCategory) {
|
|
122
|
+
OrganizationCategory["AdultEntertainment"] = "AdultEntertainment";
|
|
103
123
|
OrganizationCategory["Automotive"] = "Automotive";
|
|
104
124
|
OrganizationCategory["Communications"] = "Communications";
|
|
105
125
|
OrganizationCategory["CommunityAndCharity"] = "CommunityAndCharity";
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @property MONITORED The data holder is being monitored.
|
|
10
10
|
* @property ACTION_REQUESTED An action has been requested against this data holder.
|
|
11
11
|
* @property RESOLVED The data holder has been resolved.
|
|
12
|
+
* @property ARCHIVED The data holder has been archived by the user.
|
|
12
13
|
*
|
|
13
14
|
* @enum
|
|
14
15
|
*/
|
|
@@ -17,5 +18,6 @@ export var DataHolderProtectionState;
|
|
|
17
18
|
DataHolderProtectionState["Monitored"] = "MONITORED";
|
|
18
19
|
DataHolderProtectionState["ActionRequested"] = "ACTION_REQUESTED";
|
|
19
20
|
DataHolderProtectionState["Resolved"] = "RESOLVED";
|
|
21
|
+
DataHolderProtectionState["Archived"] = "ARCHIVED";
|
|
20
22
|
DataHolderProtectionState["Unknown"] = "UNKNOWN";
|
|
21
23
|
})(DataHolderProtectionState || (DataHolderProtectionState = {}));
|
|
@@ -19,3 +19,19 @@ export var OrganizationAnalysisMode;
|
|
|
19
19
|
OrganizationAnalysisMode["Analyze"] = "ANALYZE";
|
|
20
20
|
OrganizationAnalysisMode["Fetch"] = "FETCH";
|
|
21
21
|
})(OrganizationAnalysisMode || (OrganizationAnalysisMode = {}));
|
|
22
|
+
/**
|
|
23
|
+
* Controls how `getOrganizationAnalysis` treats the requested domain before
|
|
24
|
+
* sources query their backing services.
|
|
25
|
+
*
|
|
26
|
+
* @property Registrable Reduce the domain to its registrable (eTLD+1) form before analysis,
|
|
27
|
+
* e.g. `mail.sub.example.co.uk` becomes `example.co.uk`.
|
|
28
|
+
* @property Exact Analyze the domain verbatim, without reducing it to a registrable domain.
|
|
29
|
+
* Used to analyze a specific host/subdomain rather than the organization.
|
|
30
|
+
*
|
|
31
|
+
* @enum
|
|
32
|
+
*/
|
|
33
|
+
export var OrganizationAnalysisDomainResolution;
|
|
34
|
+
(function (OrganizationAnalysisDomainResolution) {
|
|
35
|
+
OrganizationAnalysisDomainResolution["Registrable"] = "REGISTRABLE";
|
|
36
|
+
OrganizationAnalysisDomainResolution["Exact"] = "EXACT";
|
|
37
|
+
})(OrganizationAnalysisDomainResolution || (OrganizationAnalysisDomainResolution = {}));
|