@sudoplatform/sudo-privacy-interaction 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/gen/graphqlTypes.js +2291 -780
- package/cjs/private/data/action/actionSubscriptionManager.js +25 -0
- package/cjs/private/data/action/defaultActionService.js +80 -0
- package/cjs/private/data/action/transformer/actionFulfilmentMethodTransformer.js +47 -0
- package/cjs/private/data/action/transformer/actionIntentTransformer.js +69 -0
- package/cjs/private/data/action/transformer/actionOriginTransformer.js +37 -0
- package/cjs/private/data/action/transformer/actionStatusTransformer.js +53 -0
- package/cjs/private/data/action/transformer/actionTransformer.js +85 -0
- package/cjs/private/data/action/transformer/availableActionTransformer.js +37 -0
- package/cjs/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
- package/cjs/private/data/common/apiClient.js +58 -0
- package/cjs/private/data/data-holder/defaultDataHolderService.js +12 -0
- package/cjs/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +56 -0
- package/cjs/private/data/organization-analysis/defaultOrganizationAnalysisService.js +31 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +29 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +45 -0
- package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
- package/cjs/private/domain/entities/action/actionEntity.js +86 -0
- package/cjs/private/domain/entities/action/actionService.js +7 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +24 -0
- package/cjs/private/domain/entities/organization-analysis/organizationAnalysisService.js +7 -0
- package/cjs/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +25 -0
- package/cjs/private/domain/use-cases/action/initiateActionUseCase.js +26 -0
- package/cjs/private/domain/use-cases/action/listAvailableActionsUseCase.js +26 -0
- package/cjs/private/domain/use-cases/action/subscribeToActionUseCase.js +37 -0
- package/cjs/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +27 -0
- package/cjs/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +29 -0
- package/cjs/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +25 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +133 -6
- package/cjs/public/inputs/action.js +7 -0
- package/cjs/public/inputs/index.js +2 -0
- package/cjs/public/inputs/organizationAnalysis.js +7 -0
- package/cjs/public/typings/action.js +85 -0
- package/cjs/public/typings/index.js +2 -0
- package/cjs/public/typings/organizationAnalysis.js +24 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/DefaultSudoPrivacyInteractionClient.html +176 -21
- package/docs/enums/ActionFulfilmentMethod.html +63 -0
- package/docs/enums/ActionIntent.html +84 -0
- package/docs/enums/ActionOrigin.html +75 -0
- package/docs/enums/ActionStatus.html +99 -0
- package/docs/enums/ConnectionState.html +3 -3
- package/docs/enums/DataCategory.html +18 -18
- package/docs/enums/DataHolderProtectionState.html +5 -5
- package/docs/enums/OrganizationAnalysisMode.html +70 -0
- package/docs/enums/OrganizationCategory.html +30 -30
- package/docs/enums/ProviderType.html +3 -3
- package/docs/enums/RetentionStyle.html +5 -5
- package/docs/enums/ShareStyle.html +6 -6
- package/docs/enums/SignalValue.html +4 -4
- package/docs/enums/VirtualPresenceState.html +7 -7
- package/docs/hierarchy.html +6 -5
- package/docs/interfaces/Action.html +167 -0
- package/docs/interfaces/ActionContact.html +77 -0
- package/docs/interfaces/ActionSubscriber.html +92 -0
- package/docs/interfaces/AnalysisResultSubscriber.html +3 -3
- package/docs/interfaces/AssistedEmailTemplate.html +70 -0
- package/docs/interfaces/AssistedPayload.html +113 -0
- package/docs/interfaces/AvailableAction.html +102 -0
- package/docs/interfaces/CapabilitySignals.html +9 -9
- package/docs/interfaces/CategorySignals.html +11 -11
- package/docs/interfaces/DataHolder.html +24 -14
- package/docs/interfaces/DataHolderScanSummary.html +158 -0
- package/docs/interfaces/DataHolderSubscriber.html +3 -3
- package/docs/interfaces/GetDataHolderOptions.html +63 -0
- package/docs/interfaces/GetOrganizationAnalysisInput.html +70 -0
- package/docs/interfaces/InitiateActionInput.html +79 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListAvailableActionsInput.html +61 -0
- package/docs/interfaces/ListDataHolderScanSummariesInput.html +85 -0
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +1 -1
- package/docs/interfaces/OrganizationAnalysis.html +131 -0
- package/docs/interfaces/OrganizationIdentity.html +5 -5
- package/docs/interfaces/Pagination.html +2 -1
- package/docs/interfaces/PrivacyScore.html +13 -5
- package/docs/interfaces/PrivacySummary.html +4 -4
- package/docs/interfaces/RetentionInfo.html +4 -4
- package/docs/interfaces/RiskIndicators.html +8 -8
- package/docs/interfaces/ScoreContribution.html +3 -3
- package/docs/interfaces/ScoreCoverage.html +70 -0
- package/docs/interfaces/SudoPrivacyInteractionClient.html +169 -21
- package/docs/interfaces/VirtualPresence.html +21 -12
- package/docs/interfaces/VirtualPresenceSubscriber.html +3 -3
- package/docs/modules.html +4 -4
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +2290 -779
- package/lib/private/data/action/actionSubscriptionManager.js +21 -0
- package/lib/private/data/action/defaultActionService.js +76 -0
- package/lib/private/data/action/transformer/actionFulfilmentMethodTransformer.js +43 -0
- package/lib/private/data/action/transformer/actionIntentTransformer.js +65 -0
- package/lib/private/data/action/transformer/actionOriginTransformer.js +33 -0
- package/lib/private/data/action/transformer/actionStatusTransformer.js +49 -0
- package/lib/private/data/action/transformer/actionTransformer.js +81 -0
- package/lib/private/data/action/transformer/availableActionTransformer.js +33 -0
- package/lib/private/data/analysis-result/transformer/privacyScoreTransformer.js +8 -0
- package/lib/private/data/common/apiClient.js +59 -1
- package/lib/private/data/data-holder/defaultDataHolderService.js +12 -0
- package/lib/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.js +52 -0
- package/lib/private/data/organization-analysis/defaultOrganizationAnalysisService.js +27 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.js +25 -0
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +41 -0
- package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +2 -0
- package/lib/private/domain/entities/action/actionEntity.js +83 -0
- package/lib/private/domain/entities/action/actionService.js +6 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisEntity.js +21 -0
- package/lib/private/domain/entities/organization-analysis/organizationAnalysisService.js +6 -0
- package/lib/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +21 -0
- package/lib/private/domain/use-cases/action/initiateActionUseCase.js +22 -0
- package/lib/private/domain/use-cases/action/listAvailableActionsUseCase.js +22 -0
- package/lib/private/domain/use-cases/action/subscribeToActionUseCase.js +33 -0
- package/lib/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +23 -0
- package/lib/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.js +25 -0
- package/lib/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.js +21 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +133 -6
- package/lib/public/inputs/action.js +6 -0
- package/lib/public/inputs/index.js +2 -0
- package/lib/public/inputs/organizationAnalysis.js +6 -0
- package/lib/public/typings/action.js +82 -0
- package/lib/public/typings/index.js +2 -0
- package/lib/public/typings/organizationAnalysis.js +21 -0
- package/package.json +5 -3
- package/types/gen/graphqlTypes.d.ts +569 -1
- package/types/private/data/action/actionSubscriptionManager.d.ts +19 -0
- package/types/private/data/action/defaultActionService.d.ts +23 -0
- package/types/private/data/action/transformer/actionFulfilmentMethodTransformer.d.ts +14 -0
- package/types/private/data/action/transformer/actionIntentTransformer.d.ts +14 -0
- package/types/private/data/action/transformer/actionOriginTransformer.d.ts +12 -0
- package/types/private/data/action/transformer/actionStatusTransformer.d.ts +12 -0
- package/types/private/data/action/transformer/actionTransformer.d.ts +39 -0
- package/types/private/data/action/transformer/availableActionTransformer.d.ts +15 -0
- package/types/private/data/common/apiClient.d.ts +16 -1
- package/types/private/data/common/baseSubscriptionManager.d.ts +5 -0
- package/types/private/data/data-holder/defaultDataHolderService.d.ts +3 -1
- package/types/private/data/data-holder/transformer/dataHolderScanSummaryTransformer.d.ts +18 -0
- package/types/private/data/organization-analysis/defaultOrganizationAnalysisService.d.ts +15 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisModeTransformer.d.ts +12 -0
- package/types/private/data/organization-analysis/transformer/organizationAnalysisTransformer.d.ts +14 -0
- package/types/private/domain/entities/action/actionEntity.d.ts +187 -0
- package/types/private/domain/entities/action/actionService.d.ts +99 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +14 -0
- package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +34 -0
- package/types/private/domain/entities/data-holder/dataHolderService.d.ts +35 -1
- package/types/private/domain/entities/organization-analysis/organizationAnalysisEntity.d.ts +53 -0
- package/types/private/domain/entities/organization-analysis/organizationAnalysisService.d.ts +35 -0
- package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +3 -0
- package/types/private/domain/use-cases/action/confirmActionOutcomeUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/action/initiateActionUseCase.d.ts +17 -0
- package/types/private/domain/use-cases/action/listAvailableActionsUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/action/subscribeToActionUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/action/unsubscribeFromActionUseCase.d.ts +15 -0
- package/types/private/domain/use-cases/data-holder/listDataHolderScanSummariesUseCase.d.ts +36 -0
- package/types/private/domain/use-cases/organization-analysis/getOrganizationAnalysisUseCase.d.ts +16 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +19 -3
- package/types/public/inputs/action.d.ts +30 -0
- package/types/public/inputs/dataHolder.d.ts +22 -0
- package/types/public/inputs/index.d.ts +2 -0
- package/types/public/inputs/organizationAnalysis.d.ts +18 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +64 -3
- package/types/public/typings/action.d.ts +185 -0
- package/types/public/typings/analysisResult.d.ts +14 -0
- package/types/public/typings/dataHolder.d.ts +38 -0
- package/types/public/typings/index.d.ts +2 -0
- package/types/public/typings/organizationAnalysis.d.ts +53 -0
- package/types/public/typings/subscription.d.ts +23 -0
- package/types/public/typings/virtualPresence.d.ts +3 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The user-facing intent of an action.
|
|
8
|
+
*
|
|
9
|
+
* Clients must tolerate unknown values: an unrecognised intent is represented
|
|
10
|
+
* as `Other` rather than failing, so newly added intents do not break existing
|
|
11
|
+
* clients.
|
|
12
|
+
*
|
|
13
|
+
* @property STOP_CONTACT Unsubscribe / opt out of marketing communications.
|
|
14
|
+
* @property ACCESS_MY_DATA Data subject access / portability request.
|
|
15
|
+
* @property DELETE_MY_DATA Account deletion / data erasure.
|
|
16
|
+
* @property LIMIT_DATA_USE Opt out of sale / tracking, manage consent.
|
|
17
|
+
* @property OTHER Anything unmapped; carries additionalInfo.
|
|
18
|
+
*
|
|
19
|
+
* @enum
|
|
20
|
+
*/
|
|
21
|
+
export declare enum ActionIntent {
|
|
22
|
+
StopContact = "STOP_CONTACT",
|
|
23
|
+
AccessMyData = "ACCESS_MY_DATA",
|
|
24
|
+
DeleteMyData = "DELETE_MY_DATA",
|
|
25
|
+
LimitDataUse = "LIMIT_DATA_USE",
|
|
26
|
+
Other = "OTHER"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* How an action is fulfilled from the user's perspective.
|
|
30
|
+
*
|
|
31
|
+
* @property ASSISTED The service returns structured materials for the client to
|
|
32
|
+
* complete the action.
|
|
33
|
+
* @property DELEGATED The service performs the action on the user's behalf.
|
|
34
|
+
*
|
|
35
|
+
* @enum
|
|
36
|
+
*/
|
|
37
|
+
export declare enum ActionFulfilmentMethod {
|
|
38
|
+
Assisted = "ASSISTED",
|
|
39
|
+
Delegated = "DELEGATED"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Which source contributed an available action.
|
|
43
|
+
*
|
|
44
|
+
* @property STATIC Always-possible action for the virtual presence type.
|
|
45
|
+
* @property ANALYSIS Derived from an analysis source's reported actions.
|
|
46
|
+
* @property DISCOVERY Derived from a discovery scan (e.g. List-Unsubscribe).
|
|
47
|
+
*
|
|
48
|
+
* @enum
|
|
49
|
+
*/
|
|
50
|
+
export declare enum ActionOrigin {
|
|
51
|
+
Static = "STATIC",
|
|
52
|
+
Analysis = "ANALYSIS",
|
|
53
|
+
Discovery = "DISCOVERY",
|
|
54
|
+
Unknown = "UNKNOWN"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Lifecycle status of a persisted action instance.
|
|
58
|
+
*
|
|
59
|
+
* @property PENDING The action has been created but not yet started.
|
|
60
|
+
* @property IN_PROGRESS The action is being performed.
|
|
61
|
+
* @property COMPLETED_UNVERIFIED The action completed but has not been verified.
|
|
62
|
+
* @property COMPLETED_VERIFIED The action completed and has been verified.
|
|
63
|
+
* @property FAILED The action failed to complete.
|
|
64
|
+
* @property REQUIRES_USER_INPUT The action requires further input from the user.
|
|
65
|
+
* @property CONTRADICTED Subsequent evidence contradicts the action's completion.
|
|
66
|
+
*
|
|
67
|
+
* @enum
|
|
68
|
+
*/
|
|
69
|
+
export declare enum ActionStatus {
|
|
70
|
+
Pending = "PENDING",
|
|
71
|
+
InProgress = "IN_PROGRESS",
|
|
72
|
+
CompletedUnverified = "COMPLETED_UNVERIFIED",
|
|
73
|
+
CompletedVerified = "COMPLETED_VERIFIED",
|
|
74
|
+
Failed = "FAILED",
|
|
75
|
+
RequiresUserInput = "REQUIRES_USER_INPUT",
|
|
76
|
+
Contradicted = "CONTRADICTED",
|
|
77
|
+
Unknown = "UNKNOWN"
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Contact materials for an assisted action.
|
|
81
|
+
*
|
|
82
|
+
* @interface ActionContact
|
|
83
|
+
* @property {string} email Contact email address, when available.
|
|
84
|
+
* @property {string} phone Contact phone number, when available.
|
|
85
|
+
* @property {string} address Contact postal address, when available.
|
|
86
|
+
*/
|
|
87
|
+
export interface ActionContact {
|
|
88
|
+
email?: string;
|
|
89
|
+
phone?: string;
|
|
90
|
+
address?: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* An email template returned for an assisted action. The body may contain
|
|
94
|
+
* placeholders (e.g. "{{fullName}}") for fields the user supplies client-side.
|
|
95
|
+
*
|
|
96
|
+
* @interface AssistedEmailTemplate
|
|
97
|
+
* @property {string} subject Subject line for the email, when available.
|
|
98
|
+
* @property {string} body Body of the email; may contain placeholders.
|
|
99
|
+
*/
|
|
100
|
+
export interface AssistedEmailTemplate {
|
|
101
|
+
subject?: string;
|
|
102
|
+
body: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Materials for an assisted action. The service supplies the organisation
|
|
106
|
+
* contact points and any source-provided instructions, but never the user's own
|
|
107
|
+
* data.
|
|
108
|
+
*
|
|
109
|
+
* @interface AssistedPayload
|
|
110
|
+
* @property {string} toAddress Recipient address for an assisted email action.
|
|
111
|
+
* @property {string} unsubscribeUrl Unsubscribe URL, when available.
|
|
112
|
+
* @property {string} unsubscribeMailto Unsubscribe mailto link, when available.
|
|
113
|
+
* @property {ActionContact} contact Organisation contact points, when available.
|
|
114
|
+
* @property {string} jurisdiction Jurisdiction relevant to the action, when available.
|
|
115
|
+
* @property {string} instructions Free-text instructions, potentially provided
|
|
116
|
+
* verbatim by an analysis source.
|
|
117
|
+
* @property {AssistedEmailTemplate} emailTemplate An email template for the action,
|
|
118
|
+
* resolved from a deployment-time template store.
|
|
119
|
+
*/
|
|
120
|
+
export interface AssistedPayload {
|
|
121
|
+
toAddress?: string;
|
|
122
|
+
unsubscribeUrl?: string;
|
|
123
|
+
unsubscribeMailto?: string;
|
|
124
|
+
contact?: ActionContact;
|
|
125
|
+
jurisdiction?: string;
|
|
126
|
+
instructions?: string;
|
|
127
|
+
emailTemplate?: AssistedEmailTemplate;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The Sudo Platform SDK representation of a persisted, initiated action instance
|
|
131
|
+
* scoped to a data holder relationship.
|
|
132
|
+
*
|
|
133
|
+
* @interface Action
|
|
134
|
+
* @property {string} id Unique identifier associated with the action.
|
|
135
|
+
* @property {string} virtualPresenceId The virtual presence this action belongs to.
|
|
136
|
+
* @property {string} dataHolderId The data holder relationship this action is scoped to.
|
|
137
|
+
* @property {ActionIntent} intent The user-facing intent of the action.
|
|
138
|
+
* @property {string} additionalInfo Additional info, populated when intent is `Other`.
|
|
139
|
+
* @property {ActionFulfilmentMethod} fulfilmentMethod How the action is fulfilled.
|
|
140
|
+
* @property {ActionStatus} status Current lifecycle status of the action.
|
|
141
|
+
* @property {AssistedPayload} assistedPayload Materials for an assisted action.
|
|
142
|
+
* Undefined for a delegated action.
|
|
143
|
+
* @property {Date} initiatedAt Date for when the action was initiated.
|
|
144
|
+
* @property {Date} completedAt Date for when the action completed.
|
|
145
|
+
* @property {string} owner Unique identifier of the user.
|
|
146
|
+
* @property {number} version Version of this entity. Increments on update.
|
|
147
|
+
* @property {Date} createdAt Date for when the action was created.
|
|
148
|
+
* @property {Date} updatedAt Date for when the action was last updated.
|
|
149
|
+
*/
|
|
150
|
+
export interface Action {
|
|
151
|
+
id: string;
|
|
152
|
+
virtualPresenceId: string;
|
|
153
|
+
dataHolderId?: string;
|
|
154
|
+
intent: ActionIntent;
|
|
155
|
+
additionalInfo?: string;
|
|
156
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
157
|
+
status: ActionStatus;
|
|
158
|
+
assistedPayload?: AssistedPayload;
|
|
159
|
+
initiatedAt?: Date;
|
|
160
|
+
completedAt?: Date;
|
|
161
|
+
owner: string;
|
|
162
|
+
version: number;
|
|
163
|
+
createdAt: Date;
|
|
164
|
+
updatedAt: Date;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* The Sudo Platform SDK representation of a derived, non-persisted action the
|
|
168
|
+
* user could take against a data holder.
|
|
169
|
+
*
|
|
170
|
+
* @interface AvailableAction
|
|
171
|
+
* @property {ActionIntent} intent The user-facing intent of the action.
|
|
172
|
+
* @property {string} additionalInfo Additional info, populated when intent is `Other`.
|
|
173
|
+
* @property {ActionFulfilmentMethod} fulfilmentMethod How the action is fulfilled.
|
|
174
|
+
* @property {ActionOrigin} origin Which source contributed this action.
|
|
175
|
+
* @property {string} title Short presentation hint for the action's title.
|
|
176
|
+
* @property {string} description Short presentation hint describing the action.
|
|
177
|
+
*/
|
|
178
|
+
export interface AvailableAction {
|
|
179
|
+
intent: ActionIntent;
|
|
180
|
+
additionalInfo?: string;
|
|
181
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
182
|
+
origin: ActionOrigin;
|
|
183
|
+
title?: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
export * from './action';
|
|
6
7
|
export * from './analysisResult';
|
|
7
8
|
export * from './dataHolder';
|
|
9
|
+
export * from './organizationAnalysis';
|
|
8
10
|
export * from './providerConfiguration';
|
|
9
11
|
export * from './subscription';
|
|
10
12
|
export * from './virtualPresence';
|
|
@@ -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
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { Action } from './action';
|
|
6
7
|
import { AnalysisResultUpdate } from './analysisResult';
|
|
7
8
|
import { DataHolder } from './dataHolder';
|
|
8
9
|
import { VirtualPresence } from './virtualPresence';
|
|
@@ -84,3 +85,25 @@ export interface AnalysisResultSubscriber {
|
|
|
84
85
|
*/
|
|
85
86
|
connectionStatusChanged(state: ConnectionState): void;
|
|
86
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Subscriber interface for receiving action status update events.
|
|
90
|
+
*
|
|
91
|
+
* @interface ActionSubscriber
|
|
92
|
+
*/
|
|
93
|
+
export interface ActionSubscriber {
|
|
94
|
+
/**
|
|
95
|
+
* Notifies the subscriber of an action status update.
|
|
96
|
+
*
|
|
97
|
+
* @param {Action} action The updated action.
|
|
98
|
+
*/
|
|
99
|
+
actionUpdated(action: Action): void;
|
|
100
|
+
/**
|
|
101
|
+
* Notifies the subscriber that the subscription connection state has changed.
|
|
102
|
+
* The subscriber won't be notified of action changes until the connection
|
|
103
|
+
* status changes to `ConnectionState.CONNECTED`. The subscriber will stop receiving
|
|
104
|
+
* action change notifications when the connection state changes to `ConnectionState.DISCONNECTED`.
|
|
105
|
+
*
|
|
106
|
+
* @param state The connection state.
|
|
107
|
+
*/
|
|
108
|
+
connectionStatusChanged(state: ConnectionState): void;
|
|
109
|
+
}
|
|
@@ -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
|
}
|