@sudoplatform/sudo-privacy-interaction 1.1.0 → 2.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/cjs/gen/graphqlTypes.js +1750 -770
- package/cjs/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
- package/cjs/private/data/common/apiClient.js +31 -0
- package/cjs/private/data/data-holder/defaultDataHolderService.js +12 -0
- package/cjs/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +56 -0
- package/cjs/private/data/organization-analysis/defaultOrganizationAnalysisService.js +31 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +29 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +45 -0
- package/cjs/private/data/provider-configuration/defaultProviderConfigurationService.js +23 -0
- package/cjs/private/data/provider-configuration/transformer/providerConfigurationTransformer.js +52 -0
- package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +11 -1
- package/cjs/private/data/virtual-presence/transformer/relationshipProviderTransformer.js +29 -0
- package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
- package/cjs/private/domain/entities/configuration/providerConfigurationEntity.js +7 -0
- package/cjs/private/domain/entities/configuration/providerConfigurationService.js +7 -0
- package/cjs/private/domain/entities/inputs/relationshipProviderEntity.js +21 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +24 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisService.js +7 -0
- package/cjs/private/domain/use-cases/configuration/getProviderConfigurationUseCase.js +25 -0
- package/cjs/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +29 -0
- package/cjs/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +25 -0
- package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +6 -2
- package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +7 -1
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +109 -9
- package/cjs/public/inputs/index.js +1 -0
- package/cjs/public/inputs/organizationAnalysis.js +7 -0
- package/cjs/public/inputs/virtualPresence.js +14 -0
- package/cjs/public/typings/index.js +2 -0
- package/cjs/public/typings/organizationAnalysis.js +24 -0
- package/cjs/public/typings/providerConfiguration.js +7 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/DefaultSudoPrivacyInteractionClient.html +86 -22
- package/docs/enums/DataCategory.html +18 -18
- package/docs/enums/DataHolderProtectionState.html +5 -5
- package/docs/enums/OrganizationAnalysisMode.html +70 -0
- package/docs/enums/OrganizationCategory.html +30 -30
- package/docs/enums/ProviderType.html +3 -3
- package/docs/enums/RelationshipProvider.html +63 -0
- package/docs/enums/RetentionStyle.html +5 -5
- package/docs/enums/ShareStyle.html +6 -6
- package/docs/enums/SignalValue.html +4 -4
- package/docs/enums/VirtualPresenceState.html +7 -7
- package/docs/hierarchy.html +6 -5
- package/docs/interfaces/CapabilitySignals.html +9 -9
- package/docs/interfaces/CategorySignals.html +11 -11
- package/docs/interfaces/ConnectVirtualPresenceWithAuthCodeInput.html +79 -0
- package/docs/interfaces/ConnectVirtualPresenceWithRefreshTokenInput.html +16 -7
- package/docs/interfaces/DataHolder.html +24 -14
- package/docs/interfaces/DataHolderScanSummary.html +158 -0
- package/docs/interfaces/GetDataHolderOptions.html +63 -0
- package/docs/interfaces/GetOrganizationAnalysisInput.html +70 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListDataHolderScanSummariesInput.html +85 -0
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +2 -2
- package/docs/interfaces/OrganizationAnalysis.html +131 -0
- package/docs/interfaces/OrganizationIdentity.html +5 -5
- package/docs/interfaces/Pagination.html +2 -1
- package/docs/interfaces/PrivacyScore.html +13 -5
- package/docs/interfaces/PrivacySummary.html +4 -4
- package/docs/interfaces/ProviderConfiguration.html +80 -0
- package/docs/interfaces/RescanVirtualPresenceInput.html +3 -3
- package/docs/interfaces/RetentionInfo.html +4 -4
- package/docs/interfaces/RiskIndicators.html +8 -8
- package/docs/interfaces/ScanOptions.html +6 -6
- package/docs/interfaces/ScoreContribution.html +3 -3
- package/docs/interfaces/ScoreCoverage.html +70 -0
- package/docs/interfaces/SudoPrivacyInteractionClient.html +83 -22
- package/docs/interfaces/VirtualPresence.html +21 -12
- package/docs/modules.html +4 -4
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +1749 -769
- package/lib/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
- package/lib/private/data/common/apiClient.js +32 -1
- package/lib/private/data/data-holder/defaultDataHolderService.js +12 -0
- package/lib/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +52 -0
- package/lib/private/data/organization-analysis/defaultOrganizationAnalysisService.js +27 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +25 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +41 -0
- package/lib/private/data/provider-configuration/defaultProviderConfigurationService.js +19 -0
- package/lib/private/data/provider-configuration/transformer/providerConfigurationTransformer.js +48 -0
- package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +11 -1
- package/lib/private/data/virtual-presence/transformer/relationshipProviderTransformer.js +25 -0
- package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
- package/lib/private/domain/entities/configuration/providerConfigurationEntity.js +6 -0
- package/lib/private/domain/entities/configuration/providerConfigurationService.js +6 -0
- package/lib/private/domain/entities/inputs/relationshipProviderEntity.js +18 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +21 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisService.js +6 -0
- package/lib/private/domain/use-cases/configuration/getProviderConfigurationUseCase.js +21 -0
- package/lib/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +25 -0
- package/lib/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +21 -0
- package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +6 -2
- package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +7 -1
- package/lib/public/defaultSudoPrivacyInteractionClient.js +109 -9
- package/lib/public/inputs/index.js +1 -0
- package/lib/public/inputs/organizationAnalysis.js +6 -0
- package/lib/public/inputs/virtualPresence.js +13 -1
- package/lib/public/typings/index.js +2 -0
- package/lib/public/typings/organizationAnalysis.js +21 -0
- package/lib/public/typings/providerConfiguration.js +6 -0
- package/package.json +9 -5
- package/types/gen/graphqlTypes.d.ts +349 -1
- package/types/private/data/common/apiClient.d.ts +11 -1
- package/types/private/data/common/baseSubscriptionManager.d.ts +5 -0
- package/types/private/data/data-holder/defaultDataHolderService.d.ts +3 -1
- package/types/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.d.ts +18 -0
- package/types/private/data/organization-analysis/defaultOrganizationAnalysisService.d.ts +15 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.d.ts +12 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisTransformer.d.ts +14 -0
- package/types/private/data/provider-configuration/defaultProviderConfigurationService.d.ts +14 -0
- package/types/private/data/provider-configuration/transformer/providerConfigurationTransformer.d.ts +19 -0
- package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +1 -0
- package/types/private/data/virtual-presence/transformer/relationshipProviderTransformer.d.ts +12 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +14 -0
- package/types/private/domain/entities/configuration/providerConfigurationEntity.d.ts +23 -0
- package/types/private/domain/entities/configuration/providerConfigurationService.d.ts +21 -0
- package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +34 -0
- package/types/private/domain/entities/data-holder/dataHolderService.d.ts +35 -1
- package/types/private/domain/entities/inputs/relationshipProviderEntity.d.ts +17 -0
- package/types/private/domain/entities/organization-analysis/organizationAnalysisEntity.d.ts +53 -0
- package/types/private/domain/entities/organization-analysis/organizationAnalysisService.d.ts +35 -0
- package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +3 -0
- package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +17 -2
- package/types/private/domain/use-cases/configuration/getProviderConfigurationUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.d.ts +36 -0
- package/types/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.d.ts +13 -1
- package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.d.ts +2 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +14 -4
- package/types/public/inputs/dataHolder.d.ts +22 -0
- package/types/public/inputs/index.d.ts +1 -0
- package/types/public/inputs/organizationAnalysis.d.ts +18 -0
- package/types/public/inputs/virtualPresence.d.ts +30 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +34 -5
- package/types/public/typings/analysisResult.d.ts +14 -0
- package/types/public/typings/dataHolder.d.ts +38 -0
- package/types/public/typings/index.d.ts +2 -0
- package/types/public/typings/organizationAnalysis.d.ts +53 -0
- package/types/public/typings/providerConfiguration.d.ts +23 -0
- package/types/public/typings/virtualPresence.d.ts +3 -0
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { Pagination } from './common';
|
|
7
|
+
/**
|
|
8
|
+
* Properties required to connect a virtual presence with an auth code.
|
|
9
|
+
*
|
|
10
|
+
* @interface ConnectVirtualPresenceWithAuthCodeInput
|
|
11
|
+
* @property {string} authCode An authorization code obtained from the OAuth flow.
|
|
12
|
+
* @property {string} redirectUri The redirect URI that was used to obtain the
|
|
13
|
+
* authorization code.
|
|
14
|
+
* @property {RelationshipProvider} relationshipProvider The relationship provider
|
|
15
|
+
* to associate with the connection.
|
|
16
|
+
*/
|
|
17
|
+
export interface ConnectVirtualPresenceWithAuthCodeInput {
|
|
18
|
+
authCode: string;
|
|
19
|
+
redirectUri?: string;
|
|
20
|
+
relationshipProvider?: RelationshipProvider;
|
|
21
|
+
}
|
|
7
22
|
/**
|
|
8
23
|
* Properties required to connect a virtual presence with a refresh token.
|
|
9
24
|
*
|
|
@@ -12,12 +27,27 @@ import { Pagination } from './common';
|
|
|
12
27
|
* @property {string} providerIdentity The identity associated with the provider.
|
|
13
28
|
* @property {string[]} scopes Optional OAuth scopes associated with the token.
|
|
14
29
|
* @property {number} expiresInEpochMs Optional expiration time in milliseconds since epoch.
|
|
30
|
+
* @property {RelationshipProvider} relationshipProvider The relationship provider
|
|
31
|
+
* to associate with the connection.
|
|
15
32
|
*/
|
|
16
33
|
export interface ConnectVirtualPresenceWithRefreshTokenInput {
|
|
17
34
|
refreshToken: string;
|
|
18
35
|
providerIdentity: string;
|
|
19
36
|
scopes?: string[];
|
|
20
37
|
expiresInEpochMs?: number;
|
|
38
|
+
relationshipProvider?: RelationshipProvider;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Enumeration of the relationship providers that back a virtual presence connection.
|
|
42
|
+
*
|
|
43
|
+
* @property GMAIL_PROVIDER The Gmail relationship provider.
|
|
44
|
+
* @property TEST_PROVIDER The test relationship provider.
|
|
45
|
+
*
|
|
46
|
+
* @enum
|
|
47
|
+
*/
|
|
48
|
+
export declare enum RelationshipProvider {
|
|
49
|
+
GmailProvider = "GMAIL_PROVIDER",
|
|
50
|
+
TestProvider = "TEST_PROVIDER"
|
|
21
51
|
}
|
|
22
52
|
/**
|
|
23
53
|
* Properties required to list virtual presences for this client.
|
|
@@ -5,16 +5,23 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ListOutput } from '@sudoplatform/sudo-common';
|
|
7
7
|
import { SudoUserClient } from '@sudoplatform/sudo-user';
|
|
8
|
-
import { ConnectVirtualPresenceWithRefreshTokenInput, ListAnalysisResultsInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
9
|
-
import { AnalysisResult, AnalysisResultSubscriber, DataHolder, DataHolderSubscriber, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
8
|
+
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, ListAnalysisResultsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
9
|
+
import { AnalysisResult, AnalysisResultSubscriber, DataHolder, DataHolderScanSummary, DataHolderSubscriber, OrganizationAnalysis, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
10
10
|
export interface SudoPrivacyInteractionClient {
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve the provider configurations required by consumers to support
|
|
13
|
+
* the provider OAuth flow.
|
|
14
|
+
*
|
|
15
|
+
* @returns {ProviderConfiguration[]} The provider configurations.
|
|
16
|
+
*/
|
|
17
|
+
getProviderConfiguration(): Promise<ProviderConfiguration[]>;
|
|
11
18
|
/**
|
|
12
19
|
* Connect a virtual presence using an authorization code obtained from an OAuth flow.
|
|
13
20
|
*
|
|
14
|
-
* @param {
|
|
21
|
+
* @param {ConnectVirtualPresenceWithAuthCodeInput} input The authorization code input.
|
|
15
22
|
* @returns {VirtualPresence} The connected virtual presence.
|
|
16
23
|
*/
|
|
17
|
-
connectVirtualPresenceWithAuthCode(
|
|
24
|
+
connectVirtualPresenceWithAuthCode(input: ConnectVirtualPresenceWithAuthCodeInput): Promise<VirtualPresence>;
|
|
18
25
|
/**
|
|
19
26
|
* Connect a virtual presence using a pre-obtained refresh token credential.
|
|
20
27
|
*
|
|
@@ -62,9 +69,12 @@ export interface SudoPrivacyInteractionClient {
|
|
|
62
69
|
* Retrieve a single data holder by ID.
|
|
63
70
|
*
|
|
64
71
|
* @param {string} id The unique identifier of the data holder.
|
|
72
|
+
* @param {GetDataHolderOptions} options Optional settings controlling what is returned.
|
|
73
|
+
* By default the most recent scan summary is fetched concurrently and attached as
|
|
74
|
+
* `latestScanSummary`.
|
|
65
75
|
* @returns {DataHolder | undefined} The data holder, or undefined if not found.
|
|
66
76
|
*/
|
|
67
|
-
getDataHolder(id: string): Promise<DataHolder | undefined>;
|
|
77
|
+
getDataHolder(id: string, options?: GetDataHolderOptions): Promise<DataHolder | undefined>;
|
|
68
78
|
/**
|
|
69
79
|
* List data holders associated with a virtual presence.
|
|
70
80
|
*
|
|
@@ -72,6 +82,15 @@ export interface SudoPrivacyInteractionClient {
|
|
|
72
82
|
* @returns {ListOutput<DataHolder>} A list of data holders matching the search criteria.
|
|
73
83
|
*/
|
|
74
84
|
listDataHolders(input: ListDataHoldersInput): Promise<ListOutput<DataHolder>>;
|
|
85
|
+
/**
|
|
86
|
+
* List scan summaries associated with a data holder, most recent first.
|
|
87
|
+
*
|
|
88
|
+
* @param {ListDataHolderScanSummariesInput} input Parameters used to retrieve a list
|
|
89
|
+
* of scan summaries.
|
|
90
|
+
* @returns {ListOutput<DataHolderScanSummary>} A list of scan summaries matching the
|
|
91
|
+
* search criteria.
|
|
92
|
+
*/
|
|
93
|
+
listDataHolderScanSummaries(input: ListDataHolderScanSummariesInput): Promise<ListOutput<DataHolderScanSummary>>;
|
|
75
94
|
/**
|
|
76
95
|
* Subscribe to data holder state events. Emitted when data holders are discovered
|
|
77
96
|
* or updated during scanning.
|
|
@@ -116,6 +135,16 @@ export interface SudoPrivacyInteractionClient {
|
|
|
116
135
|
* @param {string} subscriptionId The subscription identifier to unsubscribe.
|
|
117
136
|
*/
|
|
118
137
|
unsubscribeFromAnalysisResult(subscriptionId: string): void;
|
|
138
|
+
/**
|
|
139
|
+
* Analyze (read-through) and return the shared, organization-generic analysis for a domain.
|
|
140
|
+
*
|
|
141
|
+
* Returns a result with a `Pending` status when an asynchronous source is still resolving;
|
|
142
|
+
* re-query for the terminal result. When `mode` is omitted, the backend behaves as `Analyze`.
|
|
143
|
+
*
|
|
144
|
+
* @param {GetOrganizationAnalysisInput} input Parameters used to obtain the analysis.
|
|
145
|
+
* @returns {OrganizationAnalysis | undefined} The organization analysis, or undefined if not found.
|
|
146
|
+
*/
|
|
147
|
+
getOrganizationAnalysis(input: GetOrganizationAnalysisInput): Promise<OrganizationAnalysis | undefined>;
|
|
119
148
|
}
|
|
120
149
|
export type SudoPrivacyInteractionClientOptions = {
|
|
121
150
|
/** Sudo User client to use. No default */
|
|
@@ -101,10 +101,24 @@ export interface AnalysisResultData {
|
|
|
101
101
|
* @interface PrivacyScore
|
|
102
102
|
* @property {number} score Numeric score (0-100). Higher is better.
|
|
103
103
|
* @property {ScoreContribution[]} breakdown Breakdown of how each aspect contributed to the score.
|
|
104
|
+
* @property {ScoreCoverage} coverage How much of the scoring-relevant input had a known value.
|
|
104
105
|
*/
|
|
105
106
|
export interface PrivacyScore {
|
|
106
107
|
score: number;
|
|
107
108
|
breakdown: ScoreContribution[];
|
|
109
|
+
coverage: ScoreCoverage;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* How much of the scoring-relevant input had a known value. A low ratio means the
|
|
113
|
+
* score rests on few known signals and should be treated as lower-confidence.
|
|
114
|
+
*
|
|
115
|
+
* @interface ScoreCoverage
|
|
116
|
+
* @property {number} evaluated Scoring aspects with a known value.
|
|
117
|
+
* @property {number} total Total scoring aspects the calculator considers.
|
|
118
|
+
*/
|
|
119
|
+
export interface ScoreCoverage {
|
|
120
|
+
evaluated: number;
|
|
121
|
+
total: number;
|
|
108
122
|
}
|
|
109
123
|
/**
|
|
110
124
|
* A single scoring aspect and its contribution to the overall score.
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
* @property {number} version Version of this entity. Increments on update.
|
|
21
21
|
* @property {Date} createdAt Date for when the data holder was created.
|
|
22
22
|
* @property {Date} updatedAt Date for when the data holder was last updated.
|
|
23
|
+
* @property {DataHolderScanSummary} latestScanSummary The most recent scan summary for this
|
|
24
|
+
* data holder, when requested via `getDataHolder`. Undefined when not requested or when the
|
|
25
|
+
* data holder has no scan summaries.
|
|
23
26
|
*/
|
|
24
27
|
export interface DataHolder {
|
|
25
28
|
id: string;
|
|
@@ -33,6 +36,7 @@ export interface DataHolder {
|
|
|
33
36
|
version: number;
|
|
34
37
|
createdAt: Date;
|
|
35
38
|
updatedAt: Date;
|
|
39
|
+
latestScanSummary?: DataHolderScanSummary;
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
42
|
* The protection state of a data holder.
|
|
@@ -49,3 +53,37 @@ export declare enum DataHolderProtectionState {
|
|
|
49
53
|
Resolved = "RESOLVED",
|
|
50
54
|
Unknown = "UNKNOWN"
|
|
51
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* The Sudo Platform SDK representation of email interaction metrics captured
|
|
58
|
+
* during a single scan for a specific data holder.
|
|
59
|
+
*
|
|
60
|
+
* @interface DataHolderScanSummary
|
|
61
|
+
* @property {string} dataHolderId The data holder these metrics apply to.
|
|
62
|
+
* @property {string} owner Unique identifier of the user.
|
|
63
|
+
* @property {Date} scannedAt Date for when the scan was performed.
|
|
64
|
+
* @property {Date} scanRangeFrom Start of the scanned time range.
|
|
65
|
+
* @property {Date} scanRangeTo End of the scanned time range.
|
|
66
|
+
* @property {number} emailCount Total number of emails observed in the scan range.
|
|
67
|
+
* @property {number} readCount Number of emails that were read.
|
|
68
|
+
* @property {number} readRate Ratio of read emails to total emails.
|
|
69
|
+
* @property {number} marketingEmailCount Number of marketing emails observed.
|
|
70
|
+
* @property {number} marketingEmailOpened Number of marketing emails that were opened.
|
|
71
|
+
* @property {number} marketingOpenRate Ratio of opened marketing emails to marketing emails.
|
|
72
|
+
* @property {Record<string, number>} categoryBreakdown Count of emails per category.
|
|
73
|
+
* @property {number} uncategorizedCount Number of emails that could not be categorized.
|
|
74
|
+
*/
|
|
75
|
+
export interface DataHolderScanSummary {
|
|
76
|
+
dataHolderId: string;
|
|
77
|
+
owner: string;
|
|
78
|
+
scannedAt: Date;
|
|
79
|
+
scanRangeFrom: Date;
|
|
80
|
+
scanRangeTo: Date;
|
|
81
|
+
emailCount: number;
|
|
82
|
+
readCount: number;
|
|
83
|
+
readRate: number;
|
|
84
|
+
marketingEmailCount: number;
|
|
85
|
+
marketingEmailOpened: number;
|
|
86
|
+
marketingOpenRate: number;
|
|
87
|
+
categoryBreakdown: Record<string, number>;
|
|
88
|
+
uncategorizedCount: number;
|
|
89
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { AnalysisResultData, AnalysisResultStatus } from './analysisResult';
|
|
7
|
+
/**
|
|
8
|
+
* The Sudo Platform SDK representation of a shared, domain-keyed privacy analysis
|
|
9
|
+
* of an organization.
|
|
10
|
+
*
|
|
11
|
+
* The same underlying analysis is returned to every caller asking about the same
|
|
12
|
+
* domain; it carries only organization-generic signals. `id` equals the analyzed
|
|
13
|
+
* domain and `owner` is the requesting caller.
|
|
14
|
+
*
|
|
15
|
+
* @interface OrganizationAnalysis
|
|
16
|
+
* @property {string} id Identifies the shared analysis. Equal to the analyzed domain.
|
|
17
|
+
* @property {string} domain The analyzed domain (equal to id).
|
|
18
|
+
* @property {AnalysisResultStatus} status Aggregate status. Pending while an asynchronous
|
|
19
|
+
* source is still resolving; re-query for the terminal result.
|
|
20
|
+
* @property {Date} lastAnalyzedAt When the aggregate was last derived.
|
|
21
|
+
* @property {AnalysisResultData} data Structured analysis payload. Populated when status is
|
|
22
|
+
* Complete or Partial.
|
|
23
|
+
* @property {string} owner The caller who requested this view. The underlying analysis is shared.
|
|
24
|
+
* @property {number} version Version of this entity. Increments on update.
|
|
25
|
+
* @property {Date} createdAt Date for when the analysis was created.
|
|
26
|
+
* @property {Date} updatedAt Date for when the analysis was last updated.
|
|
27
|
+
*/
|
|
28
|
+
export interface OrganizationAnalysis {
|
|
29
|
+
id: string;
|
|
30
|
+
domain: string;
|
|
31
|
+
status: AnalysisResultStatus;
|
|
32
|
+
lastAnalyzedAt: Date;
|
|
33
|
+
data?: AnalysisResultData;
|
|
34
|
+
owner: string;
|
|
35
|
+
version: number;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
updatedAt: Date;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Controls how `getOrganizationAnalysis` obtains source results when the stored
|
|
41
|
+
* analysis is stale or absent.
|
|
42
|
+
*
|
|
43
|
+
* @property Analyze Read-through: request analysis from the sources, which may compute and
|
|
44
|
+
* leave the result pending until asynchronous work completes.
|
|
45
|
+
* @property Fetch Pull only the sources' existing values; never request new work. A stale
|
|
46
|
+
* domain with no existing source value is not moved to pending.
|
|
47
|
+
*
|
|
48
|
+
* @enum
|
|
49
|
+
*/
|
|
50
|
+
export declare enum OrganizationAnalysisMode {
|
|
51
|
+
Analyze = "ANALYZE",
|
|
52
|
+
Fetch = "FETCH"
|
|
53
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ProviderType } from './virtualPresence';
|
|
7
|
+
/**
|
|
8
|
+
* The Sudo Platform SDK representation of a provider client configuration.
|
|
9
|
+
*
|
|
10
|
+
* Contains the configuration required by consumers to support the provider
|
|
11
|
+
* OAuth flow. This is the decoded form of the opaque configuration data
|
|
12
|
+
* returned by the service.
|
|
13
|
+
*
|
|
14
|
+
* @interface ProviderConfiguration
|
|
15
|
+
* @property {string} name Human-readable provider name (e.g. 'google').
|
|
16
|
+
* @property {ProviderType} providerType The kind of virtual presence this provider backs (e.g. EMAIL).
|
|
17
|
+
* @property {string} clientId OAuth client id.
|
|
18
|
+
*/
|
|
19
|
+
export interface ProviderConfiguration {
|
|
20
|
+
name: string;
|
|
21
|
+
providerType: ProviderType;
|
|
22
|
+
clientId: string;
|
|
23
|
+
}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* @property {string} identifier The presence identifier (e.g. email address).
|
|
17
17
|
* @property {VirtualPresenceState} state The current state of the virtual presence.
|
|
18
18
|
* @property {Date} lastScannedAt Date for when the virtual presence was last scanned.
|
|
19
|
+
* @property {string} lastScanFailureReason Reason the most recent completed scan failed (an error/exception name).
|
|
20
|
+
* Undefined when the most recent completed scan succeeded (or none has completed).
|
|
19
21
|
* @property {Date} createdAt Date for when the virtual presence was created.
|
|
20
22
|
* @property {Date} updatedAt Date for when the virtual presence was last updated.
|
|
21
23
|
*/
|
|
@@ -27,6 +29,7 @@ export interface VirtualPresence {
|
|
|
27
29
|
identifier: string;
|
|
28
30
|
state: VirtualPresenceState;
|
|
29
31
|
lastScannedAt: Date;
|
|
32
|
+
lastScanFailureReason?: string;
|
|
30
33
|
createdAt: Date;
|
|
31
34
|
updatedAt: Date;
|
|
32
35
|
}
|