@sudoplatform/sudo-privacy-interaction 0.0.0-placeholder → 1.1.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/LICENSE +13 -0
- package/README.md +30 -0
- package/cjs/gen/graphqlTypes.js +1800 -0
- package/cjs/index.js +10 -0
- package/cjs/private/data/analysis-result/analysisResultSubscriptionManager.js +25 -0
- package/cjs/private/data/analysis-result/defaultAnalysisResultService.js +83 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultDataTransformer.js +59 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultStatusTransformer.js +43 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultTransformer.js +47 -0
- package/cjs/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +37 -0
- package/cjs/private/data/analysis-result/transformer/categorySignalsTransformer.js +51 -0
- package/cjs/private/data/analysis-result/transformer/dataCategoryTransformer.js +91 -0
- package/cjs/private/data/analysis-result/transformer/organizationCategoryTransformer.js +139 -0
- package/cjs/private/data/analysis-result/transformer/organizationIdentityTransformer.js +29 -0
- package/cjs/private/data/analysis-result/transformer/privacyScoreTransformer.js +29 -0
- package/cjs/private/data/analysis-result/transformer/privacySummaryTransformer.js +25 -0
- package/cjs/private/data/analysis-result/transformer/retentionInfoTransformer.js +27 -0
- package/cjs/private/data/analysis-result/transformer/retentionStyleTransformer.js +39 -0
- package/cjs/private/data/analysis-result/transformer/riskIndicatorsTransformer.js +35 -0
- package/cjs/private/data/analysis-result/transformer/shareStyleTransformer.js +41 -0
- package/cjs/private/data/analysis-result/transformer/signalValueTransformer.js +35 -0
- package/cjs/private/data/common/apiClient.js +209 -0
- package/cjs/private/data/common/baseSubscriptionManager.js +73 -0
- package/cjs/private/data/common/config.js +23 -0
- package/cjs/private/data/common/privateSudoPrivacyInteractionClientOptions.js +7 -0
- package/cjs/private/data/common/transformer/errorTransformer.js +30 -0
- package/cjs/private/data/data-holder/dataHolderSubscriptionManager.js +25 -0
- package/cjs/private/data/data-holder/defaultDataHolderService.js +72 -0
- package/cjs/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.js +37 -0
- package/cjs/private/data/data-holder/transformer/dataHolderTransformer.js +44 -0
- package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +74 -0
- package/cjs/private/data/virtual-presence/transformer/providerTypeTransformer.js +29 -0
- package/cjs/private/data/virtual-presence/transformer/virtualPresenceStateTransformer.js +45 -0
- package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +43 -0
- package/cjs/private/data/virtual-presence/virtualPresenceSubscriptionManager.js +25 -0
- package/cjs/private/domain/entities/analysis-result/analysisResultEntity.js +135 -0
- package/cjs/private/domain/entities/analysis-result/analysisResultService.js +7 -0
- package/cjs/private/domain/entities/data-holder/dataHolderEntity.js +24 -0
- package/cjs/private/domain/entities/data-holder/dataHolderService.js +7 -0
- package/cjs/private/domain/entities/inputs/scanOptionsEntity.js +7 -0
- package/cjs/private/domain/entities/virtual-presence/virtualPresenceEntity.js +38 -0
- package/cjs/private/domain/entities/virtual-presence/virtualPresenceService.js +7 -0
- package/cjs/private/domain/use-cases/analysis-result/getAnalysisResultUseCase.js +25 -0
- package/cjs/private/domain/use-cases/analysis-result/listAnalysisResultsUseCase.js +29 -0
- package/cjs/private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase.js +37 -0
- package/cjs/private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase.js +27 -0
- package/cjs/private/domain/use-cases/data-holder/getDataHolderUseCase.js +25 -0
- package/cjs/private/domain/use-cases/data-holder/listDataHoldersUseCase.js +29 -0
- package/cjs/private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase.js +37 -0
- package/cjs/private/domain/use-cases/data-holder/unsubscribeFromDataHoldersUseCase.js +27 -0
- package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +27 -0
- package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +27 -0
- package/cjs/private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase.js +25 -0
- package/cjs/private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase.js +30 -0
- package/cjs/private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase.js +25 -0
- package/cjs/private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase.js +37 -0
- package/cjs/private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase.js +27 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +173 -0
- package/cjs/public/errors.js +29 -0
- package/cjs/public/index.js +13 -0
- package/cjs/public/inputs/analysisResult.js +7 -0
- package/cjs/public/inputs/common.js +7 -0
- package/cjs/public/inputs/dataHolder.js +7 -0
- package/cjs/public/inputs/index.js +12 -0
- package/cjs/public/inputs/virtualPresence.js +7 -0
- package/cjs/public/sudoPrivacyInteractionClient.js +7 -0
- package/cjs/public/typings/analysisResult.js +135 -0
- package/cjs/public/typings/dataHolder.js +24 -0
- package/cjs/public/typings/index.js +12 -0
- package/cjs/public/typings/subscription.js +21 -0
- package/cjs/public/typings/virtualPresence.js +38 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +78 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1648 -0
- package/docs/classes/DefaultSudoPrivacyInteractionClient.html +383 -0
- package/docs/classes/InvalidArgumentError.html +181 -0
- package/docs/classes/PrivacyInteractionServiceConfigNotFoundError.html +181 -0
- package/docs/enums/AnalysisResultStatus.html +81 -0
- package/docs/enums/ConnectionState.html +67 -0
- package/docs/enums/DataCategory.html +153 -0
- package/docs/enums/DataHolderProtectionState.html +75 -0
- package/docs/enums/OrganizationCategory.html +225 -0
- package/docs/enums/ProviderType.html +63 -0
- package/docs/enums/RetentionStyle.html +75 -0
- package/docs/enums/ShareStyle.html +81 -0
- package/docs/enums/SignalValue.html +69 -0
- package/docs/enums/VirtualPresenceState.html +87 -0
- package/docs/hierarchy.html +39 -0
- package/docs/index.html +79 -0
- package/docs/interfaces/AnalysisResult.html +133 -0
- package/docs/interfaces/AnalysisResultData.html +110 -0
- package/docs/interfaces/AnalysisResultSubscriber.html +92 -0
- package/docs/interfaces/AnalysisResultUpdate.html +125 -0
- package/docs/interfaces/CapabilitySignals.html +117 -0
- package/docs/interfaces/CategorySignals.html +133 -0
- package/docs/interfaces/ConnectVirtualPresenceWithRefreshTokenInput.html +85 -0
- package/docs/interfaces/DataHolder.html +142 -0
- package/docs/interfaces/DataHolderSubscriber.html +92 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +85 -0
- package/docs/interfaces/ListDataHoldersInput.html +85 -0
- package/docs/interfaces/ListVirtualPresencesInput.html +77 -0
- package/docs/interfaces/OrganizationIdentity.html +85 -0
- package/docs/interfaces/Pagination.html +77 -0
- package/docs/interfaces/PrivacyScore.html +69 -0
- package/docs/interfaces/PrivacySummary.html +77 -0
- package/docs/interfaces/RescanVirtualPresenceInput.html +69 -0
- package/docs/interfaces/RetentionInfo.html +77 -0
- package/docs/interfaces/RiskIndicators.html +110 -0
- package/docs/interfaces/ScanOptions.html +93 -0
- package/docs/interfaces/ScoreContribution.html +69 -0
- package/docs/interfaces/SudoPrivacyInteractionClient.html +347 -0
- package/docs/interfaces/VirtualPresence.html +126 -0
- package/docs/interfaces/VirtualPresenceSubscriber.html +92 -0
- package/docs/modules.html +48 -0
- package/docs/types/SudoPrivacyInteractionClientOptions.html +57 -0
- package/lib/gen/graphqlTypes.js +1797 -0
- package/lib/index.js +7 -0
- package/lib/private/data/analysis-result/analysisResultSubscriptionManager.js +21 -0
- package/lib/private/data/analysis-result/defaultAnalysisResultService.js +79 -0
- package/lib/private/data/analysis-result/transformer/analysisResultDataTransformer.js +55 -0
- package/lib/private/data/analysis-result/transformer/analysisResultStatusTransformer.js +39 -0
- package/lib/private/data/analysis-result/transformer/analysisResultTransformer.js +43 -0
- package/lib/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +33 -0
- package/lib/private/data/analysis-result/transformer/categorySignalsTransformer.js +47 -0
- package/lib/private/data/analysis-result/transformer/dataCategoryTransformer.js +87 -0
- package/lib/private/data/analysis-result/transformer/organizationCategoryTransformer.js +135 -0
- package/lib/private/data/analysis-result/transformer/organizationIdentityTransformer.js +25 -0
- package/lib/private/data/analysis-result/transformer/privacyScoreTransformer.js +25 -0
- package/lib/private/data/analysis-result/transformer/privacySummaryTransformer.js +21 -0
- package/lib/private/data/analysis-result/transformer/retentionInfoTransformer.js +23 -0
- package/lib/private/data/analysis-result/transformer/retentionStyleTransformer.js +35 -0
- package/lib/private/data/analysis-result/transformer/riskIndicatorsTransformer.js +31 -0
- package/lib/private/data/analysis-result/transformer/shareStyleTransformer.js +37 -0
- package/lib/private/data/analysis-result/transformer/signalValueTransformer.js +31 -0
- package/lib/private/data/common/apiClient.js +205 -0
- package/lib/private/data/common/baseSubscriptionManager.js +69 -0
- package/lib/private/data/common/config.js +18 -0
- package/lib/private/data/common/privateSudoPrivacyInteractionClientOptions.js +6 -0
- package/lib/private/data/common/transformer/errorTransformer.js +26 -0
- package/lib/private/data/data-holder/dataHolderSubscriptionManager.js +21 -0
- package/lib/private/data/data-holder/defaultDataHolderService.js +68 -0
- package/lib/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.js +33 -0
- package/lib/private/data/data-holder/transformer/dataHolderTransformer.js +40 -0
- package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +70 -0
- package/lib/private/data/virtual-presence/transformer/providerTypeTransformer.js +25 -0
- package/lib/private/data/virtual-presence/transformer/virtualPresenceStateTransformer.js +41 -0
- package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +39 -0
- package/lib/private/data/virtual-presence/virtualPresenceSubscriptionManager.js +21 -0
- package/lib/private/domain/entities/analysis-result/analysisResultEntity.js +132 -0
- package/lib/private/domain/entities/analysis-result/analysisResultService.js +6 -0
- package/lib/private/domain/entities/data-holder/dataHolderEntity.js +21 -0
- package/lib/private/domain/entities/data-holder/dataHolderService.js +6 -0
- package/lib/private/domain/entities/inputs/scanOptionsEntity.js +6 -0
- package/lib/private/domain/entities/virtual-presence/virtualPresenceEntity.js +35 -0
- package/lib/private/domain/entities/virtual-presence/virtualPresenceService.js +6 -0
- package/lib/private/domain/use-cases/analysis-result/getAnalysisResultUseCase.js +21 -0
- package/lib/private/domain/use-cases/analysis-result/listAnalysisResultsUseCase.js +25 -0
- package/lib/private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase.js +33 -0
- package/lib/private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase.js +23 -0
- package/lib/private/domain/use-cases/data-holder/getDataHolderUseCase.js +21 -0
- package/lib/private/domain/use-cases/data-holder/listDataHoldersUseCase.js +25 -0
- package/lib/private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase.js +33 -0
- package/lib/private/domain/use-cases/data-holder/unsubscribeFromDataHoldersUseCase.js +23 -0
- package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +23 -0
- package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +23 -0
- package/lib/private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase.js +21 -0
- package/lib/private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase.js +26 -0
- package/lib/private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase.js +21 -0
- package/lib/private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase.js +33 -0
- package/lib/private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase.js +23 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +169 -0
- package/lib/public/errors.js +24 -0
- package/lib/public/index.js +10 -0
- package/lib/public/inputs/analysisResult.js +6 -0
- package/lib/public/inputs/common.js +6 -0
- package/lib/public/inputs/dataHolder.js +6 -0
- package/lib/public/inputs/index.js +9 -0
- package/lib/public/inputs/virtualPresence.js +6 -0
- package/lib/public/sudoPrivacyInteractionClient.js +6 -0
- package/lib/public/typings/analysisResult.js +132 -0
- package/lib/public/typings/dataHolder.js +21 -0
- package/lib/public/typings/index.js +9 -0
- package/lib/public/typings/subscription.js +18 -0
- package/lib/public/typings/virtualPresence.js +35 -0
- package/package.json +117 -8
- package/types/gen/graphqlTypes.d.ts +750 -0
- package/types/index.d.ts +6 -0
- package/types/private/data/analysis-result/analysisResultSubscriptionManager.d.ts +19 -0
- package/types/private/data/analysis-result/defaultAnalysisResultService.d.ts +20 -0
- package/types/private/data/analysis-result/transformer/analysisResultDataTransformer.d.ts +18 -0
- package/types/private/data/analysis-result/transformer/analysisResultStatusTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/analysisResultTransformer.d.ts +14 -0
- package/types/private/data/analysis-result/transformer/capabilitySignalsTransformer.d.ts +13 -0
- package/types/private/data/analysis-result/transformer/categorySignalsTransformer.d.ts +16 -0
- package/types/private/data/analysis-result/transformer/dataCategoryTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/organizationCategoryTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/organizationIdentityTransformer.d.ts +13 -0
- package/types/private/data/analysis-result/transformer/privacyScoreTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/privacySummaryTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/retentionInfoTransformer.d.ts +13 -0
- package/types/private/data/analysis-result/transformer/retentionStyleTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/riskIndicatorsTransformer.d.ts +13 -0
- package/types/private/data/analysis-result/transformer/shareStyleTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/signalValueTransformer.d.ts +12 -0
- package/types/private/data/common/apiClient.d.ts +38 -0
- package/types/private/data/common/baseSubscriptionManager.d.ts +46 -0
- package/types/private/data/common/config.d.ts +13 -0
- package/types/private/data/common/privateSudoPrivacyInteractionClientOptions.d.ts +18 -0
- package/types/private/data/common/transformer/errorTransformer.d.ts +15 -0
- package/types/private/data/data-holder/dataHolderSubscriptionManager.d.ts +19 -0
- package/types/private/data/data-holder/defaultDataHolderService.d.ts +19 -0
- package/types/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.d.ts +12 -0
- package/types/private/data/data-holder/transformer/dataHolderTransformer.d.ts +12 -0
- package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +21 -0
- package/types/private/data/virtual-presence/transformer/providerTypeTransformer.d.ts +12 -0
- package/types/private/data/virtual-presence/transformer/virtualPresenceStateTransformer.d.ts +12 -0
- package/types/private/data/virtual-presence/transformer/virtualPresenceTransformer.d.ts +12 -0
- package/types/private/data/virtual-presence/virtualPresenceSubscriptionManager.d.ts +18 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +310 -0
- package/types/private/domain/entities/analysis-result/analysisResultService.d.ts +81 -0
- package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +51 -0
- package/types/private/domain/entities/data-holder/dataHolderService.d.ts +81 -0
- package/types/private/domain/entities/inputs/scanOptionsEntity.d.ts +22 -0
- package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +60 -0
- package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +131 -0
- package/types/private/domain/use-cases/analysis-result/getAnalysisResultUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/analysis-result/listAnalysisResultsUseCase.d.ts +36 -0
- package/types/private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase.d.ts +15 -0
- package/types/private/domain/use-cases/data-holder/getDataHolderUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/data-holder/listDataHoldersUseCase.d.ts +36 -0
- package/types/private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/data-holder/unsubscribeFromDataHoldersUseCase.d.ts +15 -0
- package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.d.ts +28 -0
- package/types/private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase.d.ts +35 -0
- package/types/private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase.d.ts +15 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +36 -0
- package/types/public/errors.d.ts +15 -0
- package/types/public/index.d.ts +10 -0
- package/types/public/inputs/analysisResult.d.ts +17 -0
- package/types/public/inputs/common.d.ts +16 -0
- package/types/public/inputs/dataHolder.d.ts +17 -0
- package/types/public/inputs/index.d.ts +9 -0
- package/types/public/inputs/virtualPresence.d.ts +58 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +123 -0
- package/types/public/typings/analysisResult.d.ts +335 -0
- package/types/public/typings/dataHolder.d.ts +51 -0
- package/types/public/typings/index.d.ts +9 -0
- package/types/public/typings/subscription.d.ts +86 -0
- package/types/public/typings/virtualPresence.d.ts +60 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.DataHolderProtectionStateTransformer = void 0;
|
|
9
|
+
const public_1 = require("../../../../public");
|
|
10
|
+
const dataHolderEntity_1 = require("../../../domain/entities/data-holder/dataHolderEntity");
|
|
11
|
+
class DataHolderProtectionStateTransformer {
|
|
12
|
+
fromEntityToAPI(entity) {
|
|
13
|
+
switch (entity) {
|
|
14
|
+
case dataHolderEntity_1.DataHolderProtectionStateEntity.Monitored:
|
|
15
|
+
return public_1.DataHolderProtectionState.Monitored;
|
|
16
|
+
case dataHolderEntity_1.DataHolderProtectionStateEntity.ActionRequested:
|
|
17
|
+
return public_1.DataHolderProtectionState.ActionRequested;
|
|
18
|
+
case dataHolderEntity_1.DataHolderProtectionStateEntity.Resolved:
|
|
19
|
+
return public_1.DataHolderProtectionState.Resolved;
|
|
20
|
+
case dataHolderEntity_1.DataHolderProtectionStateEntity.Unknown:
|
|
21
|
+
return public_1.DataHolderProtectionState.Unknown;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
fromGraphQLToEntity(data) {
|
|
25
|
+
switch (data) {
|
|
26
|
+
case 'MONITORED':
|
|
27
|
+
return dataHolderEntity_1.DataHolderProtectionStateEntity.Monitored;
|
|
28
|
+
case 'ACTION_REQUESTED':
|
|
29
|
+
return dataHolderEntity_1.DataHolderProtectionStateEntity.ActionRequested;
|
|
30
|
+
case 'RESOLVED':
|
|
31
|
+
return dataHolderEntity_1.DataHolderProtectionStateEntity.Resolved;
|
|
32
|
+
default:
|
|
33
|
+
return dataHolderEntity_1.DataHolderProtectionStateEntity.Unknown;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.DataHolderProtectionStateTransformer = DataHolderProtectionStateTransformer;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.DataHolderTransformer = void 0;
|
|
9
|
+
const dataHolderProtectionStateTransformer_1 = require("./dataHolderProtectionStateTransformer");
|
|
10
|
+
class DataHolderTransformer {
|
|
11
|
+
fromGraphQLToEntity(data) {
|
|
12
|
+
const dataHolderProtectionStateTransformer = new dataHolderProtectionStateTransformer_1.DataHolderProtectionStateTransformer();
|
|
13
|
+
return {
|
|
14
|
+
id: data.id,
|
|
15
|
+
virtualPresenceId: data.virtualPresenceId,
|
|
16
|
+
domainName: data.domainName,
|
|
17
|
+
name: data.name,
|
|
18
|
+
protectionState: dataHolderProtectionStateTransformer.fromGraphQLToEntity(data.protectionState),
|
|
19
|
+
complianceConcern: data.complianceConcern,
|
|
20
|
+
mostRecentInteractionAt: new Date(data.mostRecentInteractionEpochMs),
|
|
21
|
+
owner: data.owner,
|
|
22
|
+
version: data.version,
|
|
23
|
+
createdAt: new Date(data.createdAtEpochMs),
|
|
24
|
+
updatedAt: new Date(data.updatedAtEpochMs),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
fromEntityToAPI(entity) {
|
|
28
|
+
const dataHolderProtectionStateTransformer = new dataHolderProtectionStateTransformer_1.DataHolderProtectionStateTransformer();
|
|
29
|
+
return {
|
|
30
|
+
id: entity.id,
|
|
31
|
+
virtualPresenceId: entity.virtualPresenceId,
|
|
32
|
+
domainName: entity.domainName,
|
|
33
|
+
name: entity.name,
|
|
34
|
+
protectionState: dataHolderProtectionStateTransformer.fromEntityToAPI(entity.protectionState),
|
|
35
|
+
complianceConcern: entity.complianceConcern,
|
|
36
|
+
mostRecentInteractionAt: entity.mostRecentInteractionAt,
|
|
37
|
+
owner: entity.owner,
|
|
38
|
+
version: entity.version,
|
|
39
|
+
createdAt: entity.createdAt,
|
|
40
|
+
updatedAt: entity.updatedAt,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.DataHolderTransformer = DataHolderTransformer;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.DefaultVirtualPresenceService = void 0;
|
|
9
|
+
const subscription_1 = require("../../../public/typings/subscription");
|
|
10
|
+
const virtualPresenceTransformer_1 = require("./transformer/virtualPresenceTransformer");
|
|
11
|
+
const virtualPresenceSubscriptionManager_1 = require("./virtualPresenceSubscriptionManager");
|
|
12
|
+
class DefaultVirtualPresenceService {
|
|
13
|
+
appSync;
|
|
14
|
+
virtualPresenceTransformer;
|
|
15
|
+
subscriptionManager;
|
|
16
|
+
constructor(appSync) {
|
|
17
|
+
this.appSync = appSync;
|
|
18
|
+
this.virtualPresenceTransformer = new virtualPresenceTransformer_1.VirtualPresenceTransformer();
|
|
19
|
+
this.subscriptionManager = new virtualPresenceSubscriptionManager_1.VirtualPresenceSubscriptionManager();
|
|
20
|
+
}
|
|
21
|
+
async connect(input) {
|
|
22
|
+
const result = await this.appSync.connectVirtualPresence(input);
|
|
23
|
+
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
24
|
+
}
|
|
25
|
+
async list(input) {
|
|
26
|
+
const result = await this.appSync.listVirtualPresences(input);
|
|
27
|
+
const virtualPresences = [];
|
|
28
|
+
if (result.items) {
|
|
29
|
+
result.items.map((item) => virtualPresences.push(this.virtualPresenceTransformer.fromGraphQLToEntity(item)));
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
virtualPresences,
|
|
33
|
+
nextToken: result.nextToken ?? undefined,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
async rescan(input) {
|
|
37
|
+
const result = await this.appSync.rescanVirtualPresence(input.id, input.options);
|
|
38
|
+
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
39
|
+
}
|
|
40
|
+
async disconnect(id) {
|
|
41
|
+
const result = await this.appSync.disconnectVirtualPresence(id);
|
|
42
|
+
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
43
|
+
}
|
|
44
|
+
async subscribe(input) {
|
|
45
|
+
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
46
|
+
if (!this.subscriptionManager.getWatcher()) {
|
|
47
|
+
this.subscriptionManager.setWatcher(await this.appSync.onVirtualPresenceUpdated(input.owner));
|
|
48
|
+
this.subscriptionManager.setSubscription(this.setupUpdateSubscription());
|
|
49
|
+
this.subscriptionManager.connectionStatusChanged(subscription_1.ConnectionState.Connected);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
unsubscribe(subscriptionId) {
|
|
53
|
+
this.subscriptionManager.unsubscribe(subscriptionId);
|
|
54
|
+
}
|
|
55
|
+
setupUpdateSubscription() {
|
|
56
|
+
const subscription = this.subscriptionManager.getWatcher()?.subscribe({
|
|
57
|
+
complete: () => {
|
|
58
|
+
this.subscriptionManager.connectionStatusChanged(subscription_1.ConnectionState.Disconnected);
|
|
59
|
+
},
|
|
60
|
+
error: () => {
|
|
61
|
+
this.subscriptionManager.connectionStatusChanged(subscription_1.ConnectionState.Disconnected);
|
|
62
|
+
},
|
|
63
|
+
next: (result) => {
|
|
64
|
+
if (result.data?.onVirtualPresenceUpdate) {
|
|
65
|
+
const entity = this.virtualPresenceTransformer.fromGraphQLToEntity(result.data.onVirtualPresenceUpdate);
|
|
66
|
+
const virtualPresence = this.virtualPresenceTransformer.fromEntityToAPI(entity);
|
|
67
|
+
this.subscriptionManager.virtualPresenceUpdated(virtualPresence);
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
});
|
|
71
|
+
return subscription;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.DefaultVirtualPresenceService = DefaultVirtualPresenceService;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ProviderTypeTransformer = void 0;
|
|
9
|
+
const virtualPresence_1 = require("../../../../public/typings/virtualPresence");
|
|
10
|
+
const virtualPresenceEntity_1 = require("../../../domain/entities/virtual-presence/virtualPresenceEntity");
|
|
11
|
+
class ProviderTypeTransformer {
|
|
12
|
+
fromEntityToAPI(entity) {
|
|
13
|
+
switch (entity) {
|
|
14
|
+
case virtualPresenceEntity_1.ProviderTypeEntity.Email:
|
|
15
|
+
return virtualPresence_1.ProviderType.Email;
|
|
16
|
+
case virtualPresenceEntity_1.ProviderTypeEntity.Unknown:
|
|
17
|
+
return virtualPresence_1.ProviderType.Unknown;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
fromGraphQLToEntity(data) {
|
|
21
|
+
switch (data) {
|
|
22
|
+
case 'EMAIL':
|
|
23
|
+
return virtualPresenceEntity_1.ProviderTypeEntity.Email;
|
|
24
|
+
default:
|
|
25
|
+
return virtualPresenceEntity_1.ProviderTypeEntity.Unknown;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ProviderTypeTransformer = ProviderTypeTransformer;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VirtualPresenceStateTransformer = void 0;
|
|
9
|
+
const virtualPresence_1 = require("../../../../public/typings/virtualPresence");
|
|
10
|
+
const virtualPresenceEntity_1 = require("../../../domain/entities/virtual-presence/virtualPresenceEntity");
|
|
11
|
+
class VirtualPresenceStateTransformer {
|
|
12
|
+
fromEntityToAPI(entity) {
|
|
13
|
+
switch (entity) {
|
|
14
|
+
case virtualPresenceEntity_1.VirtualPresenceStateEntity.Connected:
|
|
15
|
+
return virtualPresence_1.VirtualPresenceState.Connected;
|
|
16
|
+
case virtualPresenceEntity_1.VirtualPresenceStateEntity.Scanning:
|
|
17
|
+
return virtualPresence_1.VirtualPresenceState.Scanning;
|
|
18
|
+
case virtualPresenceEntity_1.VirtualPresenceStateEntity.NeedsReauth:
|
|
19
|
+
return virtualPresence_1.VirtualPresenceState.NeedsReauth;
|
|
20
|
+
case virtualPresenceEntity_1.VirtualPresenceStateEntity.Inactive:
|
|
21
|
+
return virtualPresence_1.VirtualPresenceState.Inactive;
|
|
22
|
+
case virtualPresenceEntity_1.VirtualPresenceStateEntity.Error:
|
|
23
|
+
return virtualPresence_1.VirtualPresenceState.Error;
|
|
24
|
+
case virtualPresenceEntity_1.VirtualPresenceStateEntity.Unknown:
|
|
25
|
+
return virtualPresence_1.VirtualPresenceState.Unknown;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
fromGraphQLToEntity(data) {
|
|
29
|
+
switch (data) {
|
|
30
|
+
case 'CONNECTED':
|
|
31
|
+
return virtualPresenceEntity_1.VirtualPresenceStateEntity.Connected;
|
|
32
|
+
case 'SCANNING':
|
|
33
|
+
return virtualPresenceEntity_1.VirtualPresenceStateEntity.Scanning;
|
|
34
|
+
case 'NEEDS_REAUTH':
|
|
35
|
+
return virtualPresenceEntity_1.VirtualPresenceStateEntity.NeedsReauth;
|
|
36
|
+
case 'INACTIVE':
|
|
37
|
+
return virtualPresenceEntity_1.VirtualPresenceStateEntity.Inactive;
|
|
38
|
+
case 'ERROR':
|
|
39
|
+
return virtualPresenceEntity_1.VirtualPresenceStateEntity.Error;
|
|
40
|
+
default:
|
|
41
|
+
return virtualPresenceEntity_1.VirtualPresenceStateEntity.Unknown;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.VirtualPresenceStateTransformer = VirtualPresenceStateTransformer;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VirtualPresenceTransformer = void 0;
|
|
9
|
+
const providerTypeTransformer_1 = require("./providerTypeTransformer");
|
|
10
|
+
const virtualPresenceStateTransformer_1 = require("./virtualPresenceStateTransformer");
|
|
11
|
+
class VirtualPresenceTransformer {
|
|
12
|
+
fromEntityToAPI(entity) {
|
|
13
|
+
const providerTypeTransformer = new providerTypeTransformer_1.ProviderTypeTransformer();
|
|
14
|
+
const virtualPresenceStateTransformer = new virtualPresenceStateTransformer_1.VirtualPresenceStateTransformer();
|
|
15
|
+
return {
|
|
16
|
+
id: entity.id,
|
|
17
|
+
owner: entity.owner,
|
|
18
|
+
version: entity.version,
|
|
19
|
+
providerType: providerTypeTransformer.fromEntityToAPI(entity.providerType),
|
|
20
|
+
identifier: entity.identifier,
|
|
21
|
+
state: virtualPresenceStateTransformer.fromEntityToAPI(entity.state),
|
|
22
|
+
lastScannedAt: entity.lastScannedAt,
|
|
23
|
+
createdAt: entity.createdAt,
|
|
24
|
+
updatedAt: entity.updatedAt,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
fromGraphQLToEntity(data) {
|
|
28
|
+
const providerTypeTransformer = new providerTypeTransformer_1.ProviderTypeTransformer();
|
|
29
|
+
const virtualPresenceStateTransformer = new virtualPresenceStateTransformer_1.VirtualPresenceStateTransformer();
|
|
30
|
+
return {
|
|
31
|
+
id: data.id,
|
|
32
|
+
owner: data.owner,
|
|
33
|
+
version: data.version,
|
|
34
|
+
providerType: providerTypeTransformer.fromGraphQLToEntity(data.providerType),
|
|
35
|
+
identifier: data.identifier,
|
|
36
|
+
state: virtualPresenceStateTransformer.fromGraphQLToEntity(data.state),
|
|
37
|
+
lastScannedAt: new Date(data.lastScannedAtEpochMs),
|
|
38
|
+
createdAt: new Date(data.createdAtEpochMs),
|
|
39
|
+
updatedAt: new Date(data.updatedAtEpochMs),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.VirtualPresenceTransformer = VirtualPresenceTransformer;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VirtualPresenceSubscriptionManager = void 0;
|
|
9
|
+
const baseSubscriptionManager_1 = require("../common/baseSubscriptionManager");
|
|
10
|
+
class VirtualPresenceSubscriptionManager extends baseSubscriptionManager_1.BaseSubscriptionManager {
|
|
11
|
+
/**
|
|
12
|
+
* Notifies subscribers of a virtual presence update.
|
|
13
|
+
*
|
|
14
|
+
* @param virtualPresence An updated virtual presence.
|
|
15
|
+
*/
|
|
16
|
+
virtualPresenceUpdated(virtualPresence) {
|
|
17
|
+
for (const subscriber of this.getSubscribers()) {
|
|
18
|
+
subscriber.virtualPresenceUpdated(virtualPresence);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
connectionStatusChanged(state) {
|
|
22
|
+
super.connectionStatusChanged(state);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.VirtualPresenceSubscriptionManager = VirtualPresenceSubscriptionManager;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.OrganizationCategoryEntity = exports.RetentionStyleEntity = exports.DataCategoryEntity = exports.ShareStyleEntity = exports.SignalValueEntity = exports.AnalysisResultStatusEntity = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* The status of an analysis result.
|
|
11
|
+
*
|
|
12
|
+
* @property PENDING The analysis is queued but has not yet started.
|
|
13
|
+
* @property COMPLETE The analysis has completed successfully with full data.
|
|
14
|
+
* @property PARTIAL The analysis has completed with partial data available.
|
|
15
|
+
* @property FAILED The analysis encountered an error and could not complete.
|
|
16
|
+
* @property UNAVAILABLE The analysis data is not available for this data holder.
|
|
17
|
+
*
|
|
18
|
+
* @enum
|
|
19
|
+
*/
|
|
20
|
+
var AnalysisResultStatusEntity;
|
|
21
|
+
(function (AnalysisResultStatusEntity) {
|
|
22
|
+
AnalysisResultStatusEntity["Pending"] = "PENDING";
|
|
23
|
+
AnalysisResultStatusEntity["Complete"] = "COMPLETE";
|
|
24
|
+
AnalysisResultStatusEntity["Partial"] = "PARTIAL";
|
|
25
|
+
AnalysisResultStatusEntity["Failed"] = "FAILED";
|
|
26
|
+
AnalysisResultStatusEntity["Unavailable"] = "UNAVAILABLE";
|
|
27
|
+
})(AnalysisResultStatusEntity || (exports.AnalysisResultStatusEntity = AnalysisResultStatusEntity = {}));
|
|
28
|
+
/**
|
|
29
|
+
* Tri-state signal value representing confidence in a determination.
|
|
30
|
+
*
|
|
31
|
+
* @enum
|
|
32
|
+
*/
|
|
33
|
+
var SignalValueEntity;
|
|
34
|
+
(function (SignalValueEntity) {
|
|
35
|
+
SignalValueEntity["Yes"] = "YES";
|
|
36
|
+
SignalValueEntity["No"] = "NO";
|
|
37
|
+
SignalValueEntity["Unknown"] = "UNKNOWN";
|
|
38
|
+
})(SignalValueEntity || (exports.SignalValueEntity = SignalValueEntity = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Describes how data in a category is shared with third parties.
|
|
41
|
+
*
|
|
42
|
+
* @property Shared Data is shared with third parties.
|
|
43
|
+
* @property SharedWithConsent Data is shared with third parties only with user consent.
|
|
44
|
+
* @property InferenceShared Inferred data is shared with third parties.
|
|
45
|
+
* @property None Data is not shared with third parties.
|
|
46
|
+
*
|
|
47
|
+
* @enum
|
|
48
|
+
*/
|
|
49
|
+
var ShareStyleEntity;
|
|
50
|
+
(function (ShareStyleEntity) {
|
|
51
|
+
ShareStyleEntity["Shared"] = "SHARED";
|
|
52
|
+
ShareStyleEntity["SharedWithConsent"] = "SHARED_WITH_CONSENT";
|
|
53
|
+
ShareStyleEntity["InferenceShared"] = "INFERENCE_SHARED";
|
|
54
|
+
ShareStyleEntity["None"] = "NONE";
|
|
55
|
+
ShareStyleEntity["Unknown"] = "UNKNOWN";
|
|
56
|
+
})(ShareStyleEntity || (exports.ShareStyleEntity = ShareStyleEntity = {}));
|
|
57
|
+
/**
|
|
58
|
+
* Categories of personal data as identified in a privacy policy.
|
|
59
|
+
*
|
|
60
|
+
* @enum
|
|
61
|
+
*/
|
|
62
|
+
var DataCategoryEntity;
|
|
63
|
+
(function (DataCategoryEntity) {
|
|
64
|
+
DataCategoryEntity["AccountProfile"] = "ACCOUNT_PROFILE";
|
|
65
|
+
DataCategoryEntity["Authentication"] = "AUTHENTICATION";
|
|
66
|
+
DataCategoryEntity["Background"] = "BACKGROUND";
|
|
67
|
+
DataCategoryEntity["Biometric"] = "BIOMETRIC";
|
|
68
|
+
DataCategoryEntity["Communication"] = "COMMUNICATION";
|
|
69
|
+
DataCategoryEntity["Contacts"] = "CONTACTS";
|
|
70
|
+
DataCategoryEntity["Demographic"] = "DEMOGRAPHIC";
|
|
71
|
+
DataCategoryEntity["DeviceIdentifier"] = "DEVICE_IDENTIFIER";
|
|
72
|
+
DataCategoryEntity["Financial"] = "FINANCIAL";
|
|
73
|
+
DataCategoryEntity["GovernmentIssued"] = "GOVERNMENT_ISSUED";
|
|
74
|
+
DataCategoryEntity["Health"] = "HEALTH";
|
|
75
|
+
DataCategoryEntity["Inferences"] = "INFERENCES";
|
|
76
|
+
DataCategoryEntity["Location"] = "LOCATION";
|
|
77
|
+
DataCategoryEntity["Other"] = "OTHER";
|
|
78
|
+
DataCategoryEntity["Pii"] = "PII";
|
|
79
|
+
DataCategoryEntity["ThirdPartyData"] = "THIRD_PARTY_DATA";
|
|
80
|
+
DataCategoryEntity["Usage"] = "USAGE";
|
|
81
|
+
})(DataCategoryEntity || (exports.DataCategoryEntity = DataCategoryEntity = {}));
|
|
82
|
+
/**
|
|
83
|
+
* Enumeration depicting how the data retention period is measured.
|
|
84
|
+
*
|
|
85
|
+
* @property INDEFINITE Data is retained indefinitely with no defined end date.
|
|
86
|
+
* @property RELATIVE_TO_ACCOUNT_CLOSURE_TIME Retention period starts when the account is closed.
|
|
87
|
+
* @property RELATIVE_TO_DATA_STORAGE_TIME Retention period starts when the data is stored.
|
|
88
|
+
* @property OTHER Retention policy does not fit standard categories.
|
|
89
|
+
*
|
|
90
|
+
* @enum
|
|
91
|
+
*/
|
|
92
|
+
var RetentionStyleEntity;
|
|
93
|
+
(function (RetentionStyleEntity) {
|
|
94
|
+
RetentionStyleEntity["Indefinite"] = "INDEFINITE";
|
|
95
|
+
RetentionStyleEntity["RelativeToAccountClosureTime"] = "RELATIVE_TO_ACCOUNT_CLOSURE_TIME";
|
|
96
|
+
RetentionStyleEntity["RelativeToDataStorageTime"] = "RELATIVE_TO_DATA_STORAGE_TIME";
|
|
97
|
+
RetentionStyleEntity["Other"] = "OTHER";
|
|
98
|
+
})(RetentionStyleEntity || (exports.RetentionStyleEntity = RetentionStyleEntity = {}));
|
|
99
|
+
/**
|
|
100
|
+
* The business category of an organization as classified by the analysis.
|
|
101
|
+
*
|
|
102
|
+
* @enum
|
|
103
|
+
*/
|
|
104
|
+
var OrganizationCategoryEntity;
|
|
105
|
+
(function (OrganizationCategoryEntity) {
|
|
106
|
+
OrganizationCategoryEntity["Automotive"] = "Automotive";
|
|
107
|
+
OrganizationCategoryEntity["Communications"] = "Communications";
|
|
108
|
+
OrganizationCategoryEntity["CommunityAndCharity"] = "CommunityAndCharity";
|
|
109
|
+
OrganizationCategoryEntity["Cryptocurrency"] = "Cryptocurrency";
|
|
110
|
+
OrganizationCategoryEntity["Dating"] = "Dating";
|
|
111
|
+
OrganizationCategoryEntity["Education"] = "Education";
|
|
112
|
+
OrganizationCategoryEntity["Employment"] = "Employment";
|
|
113
|
+
OrganizationCategoryEntity["EnergyAndUtilities"] = "EnergyAndUtilities";
|
|
114
|
+
OrganizationCategoryEntity["Entertainment"] = "Entertainment";
|
|
115
|
+
OrganizationCategoryEntity["Finance"] = "Finance";
|
|
116
|
+
OrganizationCategoryEntity["FoodAndDining"] = "FoodAndDining";
|
|
117
|
+
OrganizationCategoryEntity["Gambling"] = "Gambling";
|
|
118
|
+
OrganizationCategoryEntity["Government"] = "Government";
|
|
119
|
+
OrganizationCategoryEntity["Health"] = "Health";
|
|
120
|
+
OrganizationCategoryEntity["Insurance"] = "Insurance";
|
|
121
|
+
OrganizationCategoryEntity["Military"] = "Military";
|
|
122
|
+
OrganizationCategoryEntity["News"] = "News";
|
|
123
|
+
OrganizationCategoryEntity["Other"] = "Other";
|
|
124
|
+
OrganizationCategoryEntity["PersonalEmail"] = "PersonalEmail";
|
|
125
|
+
OrganizationCategoryEntity["PrivacyAndSecurity"] = "PrivacyAndSecurity";
|
|
126
|
+
OrganizationCategoryEntity["RealEstate"] = "RealEstate";
|
|
127
|
+
OrganizationCategoryEntity["ShippingAndDelivery"] = "ShippingAndDelivery";
|
|
128
|
+
OrganizationCategoryEntity["Shopping"] = "Shopping";
|
|
129
|
+
OrganizationCategoryEntity["SocialMedia"] = "SocialMedia";
|
|
130
|
+
OrganizationCategoryEntity["SportsAndFitness"] = "SportsAndFitness";
|
|
131
|
+
OrganizationCategoryEntity["Technology"] = "Technology";
|
|
132
|
+
OrganizationCategoryEntity["Transportation"] = "Transportation";
|
|
133
|
+
OrganizationCategoryEntity["Travel"] = "Travel";
|
|
134
|
+
OrganizationCategoryEntity["VideoGames"] = "VideoGames";
|
|
135
|
+
})(OrganizationCategoryEntity || (exports.OrganizationCategoryEntity = OrganizationCategoryEntity = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.DataHolderProtectionStateEntity = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Enumeration that defines the protection state of a data holder.
|
|
11
|
+
*
|
|
12
|
+
* @property MONITORED The data holder is being monitored.
|
|
13
|
+
* @property ACTION_REQUESTED An action has been requested against this data holder.
|
|
14
|
+
* @property RESOLVED The data holder has been resolved.
|
|
15
|
+
*
|
|
16
|
+
* @enum
|
|
17
|
+
*/
|
|
18
|
+
var DataHolderProtectionStateEntity;
|
|
19
|
+
(function (DataHolderProtectionStateEntity) {
|
|
20
|
+
DataHolderProtectionStateEntity["Monitored"] = "MONITORED";
|
|
21
|
+
DataHolderProtectionStateEntity["ActionRequested"] = "ACTION_REQUESTED";
|
|
22
|
+
DataHolderProtectionStateEntity["Resolved"] = "RESOLVED";
|
|
23
|
+
DataHolderProtectionStateEntity["Unknown"] = "UNKNOWN";
|
|
24
|
+
})(DataHolderProtectionStateEntity || (exports.DataHolderProtectionStateEntity = DataHolderProtectionStateEntity = {}));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.VirtualPresenceStateEntity = exports.ProviderTypeEntity = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Enumeration that defines the provider type of the virtual presence.
|
|
11
|
+
*
|
|
12
|
+
* @enum
|
|
13
|
+
*/
|
|
14
|
+
var ProviderTypeEntity;
|
|
15
|
+
(function (ProviderTypeEntity) {
|
|
16
|
+
ProviderTypeEntity["Email"] = "EMAIL";
|
|
17
|
+
ProviderTypeEntity["Unknown"] = "UNKNOWN";
|
|
18
|
+
})(ProviderTypeEntity || (exports.ProviderTypeEntity = ProviderTypeEntity = {}));
|
|
19
|
+
/**
|
|
20
|
+
* Enumeration that defines the possible states of a virtual presence.
|
|
21
|
+
*
|
|
22
|
+
* @property CONNECTED: The virtual presence is active and connected to the provider.
|
|
23
|
+
* @property SCANNING: The virtual presence is currently being scanned.
|
|
24
|
+
* @property NEEDS_REAUTH: The virtual presence requires re-authentication with the provider.
|
|
25
|
+
* @property ERROR: The virtual presence encountered an error and is in a failed state.
|
|
26
|
+
* @property INACTIVE: The virtual presence is no longer active.
|
|
27
|
+
*
|
|
28
|
+
* @enum
|
|
29
|
+
*/
|
|
30
|
+
var VirtualPresenceStateEntity;
|
|
31
|
+
(function (VirtualPresenceStateEntity) {
|
|
32
|
+
VirtualPresenceStateEntity["Connected"] = "CONNECTED";
|
|
33
|
+
VirtualPresenceStateEntity["Scanning"] = "SCANNING";
|
|
34
|
+
VirtualPresenceStateEntity["NeedsReauth"] = "NEEDS_REAUTH";
|
|
35
|
+
VirtualPresenceStateEntity["Error"] = "ERROR";
|
|
36
|
+
VirtualPresenceStateEntity["Inactive"] = "INACTIVE";
|
|
37
|
+
VirtualPresenceStateEntity["Unknown"] = "UNKNOWN";
|
|
38
|
+
})(VirtualPresenceStateEntity || (exports.VirtualPresenceStateEntity = VirtualPresenceStateEntity = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.GetAnalysisResultUseCase = void 0;
|
|
9
|
+
const sudo_common_1 = require("@sudoplatform/sudo-common");
|
|
10
|
+
/**
|
|
11
|
+
* Application business logic for retrieving an analysis result.
|
|
12
|
+
*/
|
|
13
|
+
class GetAnalysisResultUseCase {
|
|
14
|
+
analysisResultService;
|
|
15
|
+
log;
|
|
16
|
+
constructor(analysisResultService) {
|
|
17
|
+
this.analysisResultService = analysisResultService;
|
|
18
|
+
this.log = new sudo_common_1.DefaultLogger(this.constructor.name);
|
|
19
|
+
}
|
|
20
|
+
async execute(id) {
|
|
21
|
+
this.log.debug(this.constructor.name, { id });
|
|
22
|
+
return await this.analysisResultService.get(id);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.GetAnalysisResultUseCase = GetAnalysisResultUseCase;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ListAnalysisResultsUseCase = void 0;
|
|
9
|
+
const sudo_common_1 = require("@sudoplatform/sudo-common");
|
|
10
|
+
/**
|
|
11
|
+
* Application business logic for listing analysis results.
|
|
12
|
+
*/
|
|
13
|
+
class ListAnalysisResultsUseCase {
|
|
14
|
+
analysisResultService;
|
|
15
|
+
log;
|
|
16
|
+
constructor(analysisResultService) {
|
|
17
|
+
this.analysisResultService = analysisResultService;
|
|
18
|
+
this.log = new sudo_common_1.DefaultLogger(this.constructor.name);
|
|
19
|
+
}
|
|
20
|
+
async execute(input) {
|
|
21
|
+
this.log.debug(this.constructor.name, { input });
|
|
22
|
+
return await this.analysisResultService.list({
|
|
23
|
+
virtualPresenceId: input.virtualPresenceId,
|
|
24
|
+
limit: input.limit,
|
|
25
|
+
nextToken: input.nextToken,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ListAnalysisResultsUseCase = ListAnalysisResultsUseCase;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SubscribeToAnalysisResultUseCase = void 0;
|
|
9
|
+
const sudo_common_1 = require("@sudoplatform/sudo-common");
|
|
10
|
+
/**
|
|
11
|
+
* Application business logic for subscribing to analysis result events.
|
|
12
|
+
*/
|
|
13
|
+
class SubscribeToAnalysisResultUseCase {
|
|
14
|
+
analysisResultService;
|
|
15
|
+
sudoUserClient;
|
|
16
|
+
log;
|
|
17
|
+
constructor(analysisResultService, sudoUserClient) {
|
|
18
|
+
this.analysisResultService = analysisResultService;
|
|
19
|
+
this.sudoUserClient = sudoUserClient;
|
|
20
|
+
this.log = new sudo_common_1.DefaultLogger(this.constructor.name);
|
|
21
|
+
}
|
|
22
|
+
async execute(input) {
|
|
23
|
+
this.log.debug(this.constructor.name, {
|
|
24
|
+
subscriptionId: input.subscriptionId,
|
|
25
|
+
});
|
|
26
|
+
const owner = await this.sudoUserClient.getSubject();
|
|
27
|
+
if (!owner) {
|
|
28
|
+
throw new sudo_common_1.NotSignedInError();
|
|
29
|
+
}
|
|
30
|
+
await this.analysisResultService.subscribe({
|
|
31
|
+
subscriptionId: input.subscriptionId,
|
|
32
|
+
owner,
|
|
33
|
+
subscriber: input.subscriber,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SubscribeToAnalysisResultUseCase = SubscribeToAnalysisResultUseCase;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.UnsubscribeFromAnalysisResultUseCase = void 0;
|
|
9
|
+
const sudo_common_1 = require("@sudoplatform/sudo-common");
|
|
10
|
+
/**
|
|
11
|
+
* Application business logic for unsubscribing from analysis result events.
|
|
12
|
+
*/
|
|
13
|
+
class UnsubscribeFromAnalysisResultUseCase {
|
|
14
|
+
analysisResultService;
|
|
15
|
+
log;
|
|
16
|
+
constructor(analysisResultService) {
|
|
17
|
+
this.analysisResultService = analysisResultService;
|
|
18
|
+
this.log = new sudo_common_1.DefaultLogger(this.constructor.name);
|
|
19
|
+
}
|
|
20
|
+
execute(subscriptionId) {
|
|
21
|
+
this.log.debug(this.constructor.name, {
|
|
22
|
+
subscriptionId,
|
|
23
|
+
});
|
|
24
|
+
this.analysisResultService.unsubscribe(subscriptionId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.UnsubscribeFromAnalysisResultUseCase = UnsubscribeFromAnalysisResultUseCase;
|