@sudoplatform/sudo-privacy-interaction 2.4.0 → 2.6.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 +356 -7
- package/cjs/private/data/action/defaultActionService.js +8 -0
- package/cjs/private/data/action/transformer/actionIntentTransformer.js +32 -0
- package/cjs/private/data/action/transformer/availableActionTransformer.js +8 -0
- package/cjs/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +2 -0
- package/cjs/private/data/common/apiClient.js +21 -0
- package/cjs/private/data/data-holder/transformer/dataHolderTransformer.js +8 -1
- package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
- package/cjs/private/domain/entities/action/actionEntity.js +14 -0
- package/cjs/private/domain/use-cases/action/listActionsForDataHolderUseCase.js +26 -0
- package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +4 -1
- package/cjs/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.js +25 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +24 -1
- package/cjs/public/typings/action.js +14 -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 +77 -29
- package/docs/enums/ActionFulfilmentMethod.html +3 -3
- package/docs/enums/ActionIntent.html +31 -7
- package/docs/enums/ActionOrigin.html +5 -5
- package/docs/enums/ActionStatus.html +9 -9
- package/docs/enums/DataHolderProtectionState.html +6 -6
- package/docs/enums/OrganizationCategory.html +31 -31
- package/docs/enums/RelationshipProvider.html +3 -3
- package/docs/hierarchy.html +7 -6
- package/docs/interfaces/Action.html +15 -15
- package/docs/interfaces/ActionContact.html +4 -4
- package/docs/interfaces/AssistedEmailTemplate.html +3 -3
- package/docs/interfaces/AssistedPayload.html +8 -8
- package/docs/interfaces/AvailableAction.html +20 -9
- package/docs/interfaces/CapabilitySignals.html +20 -12
- package/docs/interfaces/ConnectVirtualPresenceWithRefreshTokenInput.html +36 -21
- package/docs/interfaces/DataHolder.html +62 -42
- package/docs/interfaces/DataHolderScanSummary.html +14 -14
- package/docs/interfaces/InitiateActionInput.html +4 -4
- package/docs/interfaces/ListActionsForDataHolderInput.html +85 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListAvailableActionsInput.html +14 -4
- package/docs/interfaces/ListDataHolderScanSummariesInput.html +1 -1
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +2 -2
- package/docs/interfaces/OrganizationIdentity.html +5 -5
- package/docs/interfaces/Pagination.html +2 -1
- package/docs/interfaces/RescanVirtualPresenceInput.html +3 -3
- package/docs/interfaces/RiskIndicators.html +8 -8
- package/docs/interfaces/ScanOptions.html +6 -6
- package/docs/interfaces/SudoPrivacyInteractionClient.html +75 -29
- package/docs/modules.html +2 -2
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +355 -6
- package/lib/private/data/action/defaultActionService.js +8 -0
- package/lib/private/data/action/transformer/actionIntentTransformer.js +32 -0
- package/lib/private/data/action/transformer/availableActionTransformer.js +8 -0
- package/lib/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +2 -0
- package/lib/private/data/common/apiClient.js +22 -1
- package/lib/private/data/data-holder/transformer/dataHolderTransformer.js +8 -1
- package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
- package/lib/private/domain/entities/action/actionEntity.js +14 -0
- package/lib/private/domain/use-cases/action/listActionsForDataHolderUseCase.js +22 -0
- package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +4 -1
- package/lib/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.js +21 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +24 -1
- package/lib/public/typings/action.js +14 -0
- package/package.json +6 -1
- package/types/gen/graphqlTypes.d.ts +90 -8
- package/types/gen/schema-types.d.ts +41 -5
- package/types/private/data/action/defaultActionService.d.ts +2 -1
- package/types/private/data/action/transformer/availableActionTransformer.d.ts +1 -0
- package/types/private/data/common/apiClient.d.ts +8 -1
- package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +1 -0
- package/types/private/domain/entities/action/actionEntity.d.ts +18 -0
- package/types/private/domain/entities/action/actionService.d.ts +36 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +2 -0
- package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +5 -1
- package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +13 -3
- package/types/private/domain/use-cases/action/listActionsForDataHolderUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.d.ts +2 -0
- package/types/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.d.ts +16 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +3 -1
- package/types/public/inputs/action.d.ts +16 -0
- package/types/public/inputs/virtualPresence.d.ts +10 -1
- package/types/public/sudoPrivacyInteractionClient.d.ts +23 -1
- package/types/public/typings/action.d.ts +19 -0
- package/types/public/typings/analysisResult.d.ts +2 -0
- package/types/public/typings/dataHolder.d.ts +9 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ApiClientManager } from '@sudoplatform/sudo-api-client';
|
|
7
7
|
import Observable from 'zen-observable';
|
|
8
|
-
import { AnalysisResult, AnalysisResultConnection, Action, AvailableActionConnection, ConnectVirtualPresenceInput, DataHolder, DataHolderConnection, DataHolderScanSummaryConnection, InitiateActionInput, OrganizationAnalysis, OrganizationAnalysisDomainResolution, OrganizationAnalysisMode, ProviderConfiguration, ListVirtualPresencesInput, OnActionStatusUpdateSubscription, OnAnalysisResultUpdateSubscription, OnDataHoldersUpdateSubscription, OnVirtualPresenceUpdateSubscription, ScanOptionsInput, VirtualPresence, VirtualPresenceConnection } from '../../../gen/graphqlTypes';
|
|
8
|
+
import { AnalysisResult, AnalysisResultConnection, Action, ActionConnection, AvailableActionConnection, ConnectVirtualPresenceInput, DataHolder, DataHolderConnection, DataHolderScanSummaryConnection, InitiateActionInput, OrganizationAnalysis, OrganizationAnalysisDomainResolution, OrganizationAnalysisMode, ProviderConfiguration, ListVirtualPresencesInput, OnActionStatusUpdateSubscription, OnAnalysisResultUpdateSubscription, OnDataHoldersUpdateSubscription, OnVirtualPresenceUpdateSubscription, ScanOptionsInput, VirtualPresence, VirtualPresenceConnection } from '../../../gen/graphqlTypes';
|
|
9
9
|
import { SubscriptionResult } from './baseSubscriptionManager';
|
|
10
10
|
export declare class ApiClient {
|
|
11
11
|
private readonly log;
|
|
@@ -15,6 +15,7 @@ export declare class ApiClient {
|
|
|
15
15
|
connectVirtualPresence(input: ConnectVirtualPresenceInput): Promise<VirtualPresence>;
|
|
16
16
|
disconnectVirtualPresence(id: string): Promise<VirtualPresence>;
|
|
17
17
|
rescanVirtualPresence(id: string, options?: ScanOptionsInput): Promise<VirtualPresence>;
|
|
18
|
+
refreshVirtualPresenceState(id: string): Promise<VirtualPresence>;
|
|
18
19
|
listVirtualPresences(input: ListVirtualPresencesInput): Promise<VirtualPresenceConnection>;
|
|
19
20
|
getProviderConfiguration(): Promise<ProviderConfiguration>;
|
|
20
21
|
getDataHolder(id: string): Promise<DataHolder | undefined>;
|
|
@@ -47,7 +48,13 @@ export declare class ApiClient {
|
|
|
47
48
|
getAction(id: string): Promise<Action | undefined>;
|
|
48
49
|
listAvailableActions(input: {
|
|
49
50
|
dataHolderId: string;
|
|
51
|
+
includeCompleted?: boolean;
|
|
50
52
|
}): Promise<AvailableActionConnection>;
|
|
53
|
+
listActionsForDataHolder(input: {
|
|
54
|
+
dataHolderId: string;
|
|
55
|
+
limit?: number;
|
|
56
|
+
nextToken?: string;
|
|
57
|
+
}): Promise<ActionConnection>;
|
|
51
58
|
onVirtualPresenceUpdated(owner: string): Promise<Observable<SubscriptionResult<OnVirtualPresenceUpdateSubscription>>>;
|
|
52
59
|
onDataHoldersUpdated(owner: string): Promise<Observable<SubscriptionResult<OnDataHoldersUpdateSubscription>>>;
|
|
53
60
|
onAnalysisResultUpdated(owner: string): Promise<Observable<SubscriptionResult<OnAnalysisResultUpdateSubscription>>>;
|
|
@@ -16,6 +16,7 @@ export declare class DefaultVirtualPresenceService implements VirtualPresenceSer
|
|
|
16
16
|
list(input: ListVirtualPresencesInput): Promise<ListVirtualPresencesOutput>;
|
|
17
17
|
rescan(input: RescanVirtualPresenceInput): Promise<VirtualPresenceEntity>;
|
|
18
18
|
disconnect(id: string): Promise<VirtualPresenceEntity>;
|
|
19
|
+
refreshState(id: string): Promise<VirtualPresenceEntity>;
|
|
19
20
|
subscribe(input: SubscribeToVirtualPresenceInput): Promise<void>;
|
|
20
21
|
unsubscribe(subscriptionId: string): void;
|
|
21
22
|
private setupUpdateSubscription;
|
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
* @property AccessMyData Data subject access / portability request.
|
|
16
16
|
* @property DeleteMyData Account deletion / data erasure.
|
|
17
17
|
* @property LimitDataUse Opt out of sale / tracking, manage consent.
|
|
18
|
+
* @property SwapEmail The user has replaced the account's email with a private
|
|
19
|
+
* email. Always available for an email presence; self-reported.
|
|
20
|
+
* @property SwapPhone The user has replaced the account's phone number with a
|
|
21
|
+
* private number. Offered only when a signal indicates the data holder holds
|
|
22
|
+
* the user's phone number.
|
|
23
|
+
* @property SwapVirtualCard The user has replaced the account's payment card
|
|
24
|
+
* with a virtual card. Offered only when the data holder is identified as
|
|
25
|
+
* collecting credit card data.
|
|
26
|
+
* @property SaveInPassword The user has saved this account in a password
|
|
27
|
+
* manager. Offered only when the data holder supports account creation.
|
|
18
28
|
* @property Other Anything unmapped; carries additionalInfo.
|
|
19
29
|
*
|
|
20
30
|
* @enum
|
|
@@ -24,6 +34,10 @@ export declare enum ActionIntentEntity {
|
|
|
24
34
|
AccessMyData = "ACCESS_MY_DATA",
|
|
25
35
|
DeleteMyData = "DELETE_MY_DATA",
|
|
26
36
|
LimitDataUse = "LIMIT_DATA_USE",
|
|
37
|
+
SwapEmail = "SWAP_EMAIL",
|
|
38
|
+
SwapPhone = "SWAP_PHONE",
|
|
39
|
+
SwapVirtualCard = "SWAP_VIRTUAL_CARD",
|
|
40
|
+
SaveInPassword = "SAVE_IN_PASSWORD",
|
|
27
41
|
Other = "OTHER"
|
|
28
42
|
}
|
|
29
43
|
/**
|
|
@@ -176,6 +190,9 @@ export interface ActionEntity {
|
|
|
176
190
|
* @property {ActionOriginEntity} origin Which source contributed this action.
|
|
177
191
|
* @property {string} title Short presentation hint for the action's title.
|
|
178
192
|
* @property {string} description Short presentation hint describing the action.
|
|
193
|
+
* @property {ActionStatusEntity} status Lifecycle status of the most recent,
|
|
194
|
+
* non-superseded persisted action for this intent on the data holder.
|
|
195
|
+
* Undefined when the user has never initiated this action.
|
|
179
196
|
*/
|
|
180
197
|
export interface AvailableActionEntity {
|
|
181
198
|
intent: ActionIntentEntity;
|
|
@@ -184,4 +201,5 @@ export interface AvailableActionEntity {
|
|
|
184
201
|
origin: ActionOriginEntity;
|
|
185
202
|
title?: string;
|
|
186
203
|
description?: string;
|
|
204
|
+
status?: ActionStatusEntity;
|
|
187
205
|
}
|
|
@@ -24,9 +24,12 @@ export interface InitiateActionInput {
|
|
|
24
24
|
*
|
|
25
25
|
* @interface ListAvailableActionsInput
|
|
26
26
|
* @property {string} dataHolderId The data holder relationship to list available actions for.
|
|
27
|
+
* @property {boolean} includeCompleted When true, actions the user has already
|
|
28
|
+
* completed are included. Defaults to false (completed actions omitted).
|
|
27
29
|
*/
|
|
28
30
|
export interface ListAvailableActionsInput {
|
|
29
31
|
dataHolderId: string;
|
|
32
|
+
includeCompleted?: boolean;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
35
|
* Output for `ActionService.listAvailable` method.
|
|
@@ -40,6 +43,31 @@ export interface ListAvailableActionsOutput {
|
|
|
40
43
|
availableActions: AvailableActionEntity[];
|
|
41
44
|
nextToken?: string;
|
|
42
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Input for `ActionService.listForDataHolder` method.
|
|
48
|
+
*
|
|
49
|
+
* @interface ListActionsForDataHolderInput
|
|
50
|
+
* @property {string} dataHolderId The data holder to list the action history for.
|
|
51
|
+
* @property {number} limit Number of records to return.
|
|
52
|
+
* @property {string} nextToken A token generated by a previous call to
|
|
53
|
+
* `ActionService.listForDataHolder`. This allows for pagination.
|
|
54
|
+
*/
|
|
55
|
+
export interface ListActionsForDataHolderInput {
|
|
56
|
+
dataHolderId: string;
|
|
57
|
+
limit?: number;
|
|
58
|
+
nextToken?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Output for `ActionService.listForDataHolder` method.
|
|
62
|
+
*
|
|
63
|
+
* @interface ListActionsForDataHolderOutput
|
|
64
|
+
* @property {ActionEntity[]} actions The list of actions retrieved in this query.
|
|
65
|
+
* @property {string} nextToken A token generated by a previous call. This allows for pagination.
|
|
66
|
+
*/
|
|
67
|
+
export interface ListActionsForDataHolderOutput {
|
|
68
|
+
actions: ActionEntity[];
|
|
69
|
+
nextToken?: string;
|
|
70
|
+
}
|
|
43
71
|
/**
|
|
44
72
|
* Input for `ActionService.subscribe` method.
|
|
45
73
|
*
|
|
@@ -94,6 +122,14 @@ export interface ActionService {
|
|
|
94
122
|
* no actions are available.
|
|
95
123
|
*/
|
|
96
124
|
listAvailable(input: ListAvailableActionsInput): Promise<ListAvailableActionsOutput>;
|
|
125
|
+
/**
|
|
126
|
+
* Retrieve the persisted action history for a data holder, ordered newest-first.
|
|
127
|
+
*
|
|
128
|
+
* @param {ListActionsForDataHolderInput} input Parameters used to list the action history.
|
|
129
|
+
* @returns {ListActionsForDataHolderOutput} A list of actions. Can be empty if the
|
|
130
|
+
* data holder has no action history.
|
|
131
|
+
*/
|
|
132
|
+
listForDataHolder(input: ListActionsForDataHolderInput): Promise<ListActionsForDataHolderOutput>;
|
|
97
133
|
/**
|
|
98
134
|
* Subscribe to action status events.
|
|
99
135
|
*
|
|
@@ -258,6 +258,7 @@ export interface CategorySignalsEntity {
|
|
|
258
258
|
* @property {SignalValueEntity} supportsOptOutOfSale Whether the organization exposes an opt-out-of-sale control to users.
|
|
259
259
|
* @property {SignalValueEntity} usesCookiesOrTracking Whether the organization uses cookies or tracking.
|
|
260
260
|
* @property {SignalValueEntity} supportsTwoFactorAuth Whether the organization supports two-factor auth for logins.
|
|
261
|
+
* @property {SignalValueEntity} supportsPasskeys Whether the organization supports passkeys for logins.
|
|
261
262
|
*/
|
|
262
263
|
export interface CapabilitySignalsEntity {
|
|
263
264
|
supportsAccountCreation: SignalValueEntity;
|
|
@@ -268,6 +269,7 @@ export interface CapabilitySignalsEntity {
|
|
|
268
269
|
supportsOptOutOfSale: SignalValueEntity;
|
|
269
270
|
usesCookiesOrTracking: SignalValueEntity;
|
|
270
271
|
supportsTwoFactorAuth: SignalValueEntity;
|
|
272
|
+
supportsPasskeys: SignalValueEntity;
|
|
271
273
|
}
|
|
272
274
|
/**
|
|
273
275
|
* Aggregated risk indicators derived from categories and capabilities.
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
* @property {string} name Display name of the data holder.
|
|
16
16
|
* @property {DataHolderProtectionStateEntity} protectionState Current protection state.
|
|
17
17
|
* @property {boolean} complianceConcern Whether there is a compliance concern.
|
|
18
|
-
* @property {Date} mostRecentInteractionAt Date of the most recent
|
|
18
|
+
* @property {Date} mostRecentInteractionAt Date of the most recent inbound contact from the data holder.
|
|
19
|
+
* @property {Date} mostRecentInboundContactAt Date of the most recent inbound contact from the data holder.
|
|
20
|
+
* @property {Date} firstInboundContactAt Date of the earliest observed contact from the data holder.
|
|
19
21
|
* @property {string} owner Unique identifier of the user.
|
|
20
22
|
* @property {number} version Version of this entity. Increments on update.
|
|
21
23
|
* @property {Date} createdAt Date for when the data holder was created.
|
|
@@ -29,6 +31,8 @@ export interface DataHolderEntity {
|
|
|
29
31
|
protectionState: DataHolderProtectionStateEntity;
|
|
30
32
|
complianceConcern: boolean;
|
|
31
33
|
mostRecentInteractionAt: Date;
|
|
34
|
+
mostRecentInboundContactAt: Date;
|
|
35
|
+
firstInboundContactAt: Date;
|
|
32
36
|
owner: string;
|
|
33
37
|
version: number;
|
|
34
38
|
createdAt: Date;
|
|
@@ -25,13 +25,13 @@ export interface AuthCodeInput {
|
|
|
25
25
|
* @property {string} refreshToken The refresh token value.
|
|
26
26
|
* @property {string} providerIdentity The identity associated with the provider.
|
|
27
27
|
* @property {string[]} scopes Optional OAuth scopes associated with the token.
|
|
28
|
-
* @property {number}
|
|
28
|
+
* @property {number} expiresAtEpochMs Optional absolute expiry in milliseconds since epoch. Defaults to one year after the request.
|
|
29
29
|
*/
|
|
30
30
|
export interface RefreshTokenInput {
|
|
31
31
|
refreshToken: string;
|
|
32
32
|
providerIdentity: string;
|
|
33
33
|
scopes?: string[];
|
|
34
|
-
|
|
34
|
+
expiresAtEpochMs?: number;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Input for `VirtualPresenceService.connect` method.
|
|
@@ -130,10 +130,20 @@ export interface VirtualPresenceService {
|
|
|
130
130
|
* @returns {VirtualPresenceEntity} The rescanned virtual presence.
|
|
131
131
|
*/
|
|
132
132
|
rescan(input: RescanVirtualPresenceInput): Promise<VirtualPresenceEntity>;
|
|
133
|
+
/**
|
|
134
|
+
* Validate a virtual presence's provider grant on demand and return its
|
|
135
|
+
* reconciled state. If the provider confirms the grant has been revoked, the
|
|
136
|
+
* presence transitions to `NeedsReauth`; otherwise its state is returned
|
|
137
|
+
* unchanged.
|
|
138
|
+
*
|
|
139
|
+
* @param {string} id The unique identifier of the virtual presence to refresh.
|
|
140
|
+
* @returns {VirtualPresenceEntity} The virtual presence with its reconciled state.
|
|
141
|
+
*/
|
|
142
|
+
refreshState(id: string): Promise<VirtualPresenceEntity>;
|
|
133
143
|
/**
|
|
134
144
|
* Subscribe to virtual presence state events.
|
|
135
145
|
*
|
|
136
|
-
* @param {
|
|
146
|
+
* @param {SubscribeToVirtualPresenceInput} input Parameters used to subscribe to virtual
|
|
137
147
|
* presence state events.
|
|
138
148
|
*/
|
|
139
149
|
subscribe(input: SubscribeToVirtualPresenceInput): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionService, ListActionsForDataHolderInput, ListActionsForDataHolderOutput } from '../../entities/action/actionService';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for listing the persisted action history for a data
|
|
9
|
+
* holder.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ListActionsForDataHolderUseCase {
|
|
12
|
+
private readonly actionService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(actionService: ActionService);
|
|
15
|
+
execute(input: ListActionsForDataHolderInput): Promise<ListActionsForDataHolderOutput>;
|
|
16
|
+
}
|
|
@@ -15,6 +15,8 @@ interface ConnectVirtualPresenceWithRefreshTokenUseCaseInput {
|
|
|
15
15
|
refreshToken: string;
|
|
16
16
|
providerIdentity: string;
|
|
17
17
|
scopes?: string[];
|
|
18
|
+
expiresAtEpochMs?: number;
|
|
19
|
+
/** Relative expiry in milliseconds after the request. Converted to an absolute expiry. */
|
|
18
20
|
expiresInEpochMs?: number;
|
|
19
21
|
relationshipProvider?: RelationshipProviderEntity;
|
|
20
22
|
}
|
package/types/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { VirtualPresenceEntity } from '../../entities/virtual-presence/virtualPresenceEntity';
|
|
7
|
+
import { VirtualPresenceService } from '../../entities/virtual-presence/virtualPresenceService';
|
|
8
|
+
/**
|
|
9
|
+
* Application business logic for refreshing a virtual presence's state.
|
|
10
|
+
*/
|
|
11
|
+
export declare class RefreshVirtualPresenceStateUseCase {
|
|
12
|
+
private readonly virtualPresenceService;
|
|
13
|
+
private readonly log;
|
|
14
|
+
constructor(virtualPresenceService: VirtualPresenceService);
|
|
15
|
+
execute(id: string): Promise<VirtualPresenceEntity>;
|
|
16
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { ListOutput } from '@sudoplatform/sudo-common';
|
|
7
|
-
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, InitiateActionInput, ListAnalysisResultsInput, ListAvailableActionsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
7
|
+
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, InitiateActionInput, ListAnalysisResultsInput, ListActionsForDataHolderInput, ListAvailableActionsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
8
8
|
import { SudoPrivacyInteractionClient, SudoPrivacyInteractionClientOptions } from './sudoPrivacyInteractionClient';
|
|
9
9
|
import { Action, AnalysisResult, AnalysisResultSubscriber, ActionSubscriber, AvailableAction, DataHolder, DataHolderScanSummary, DataHolderSubscriber, OrganizationAnalysis, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
10
10
|
export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyInteractionClient {
|
|
@@ -36,6 +36,7 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
36
36
|
connectVirtualPresenceWithRefreshToken(input: ConnectVirtualPresenceWithRefreshTokenInput): Promise<VirtualPresence>;
|
|
37
37
|
disconnectVirtualPresence(id: string): Promise<VirtualPresence>;
|
|
38
38
|
rescanVirtualPresence(input: RescanVirtualPresenceInput): Promise<VirtualPresence>;
|
|
39
|
+
refreshVirtualPresenceState(id: string): Promise<VirtualPresence>;
|
|
39
40
|
listVirtualPresences(input: ListVirtualPresencesInput): Promise<ListOutput<VirtualPresence>>;
|
|
40
41
|
subscribeToVirtualPresence(subscriptionId: string, subscriber: VirtualPresenceSubscriber): Promise<void>;
|
|
41
42
|
unsubscribeFromVirtualPresence(subscriptionId: string): void;
|
|
@@ -55,6 +56,7 @@ export declare class DefaultSudoPrivacyInteractionClient implements SudoPrivacyI
|
|
|
55
56
|
getAction(id: string): Promise<Action | undefined>;
|
|
56
57
|
confirmActionOutcome(id: string): Promise<Action>;
|
|
57
58
|
listAvailableActions(input: ListAvailableActionsInput): Promise<ListOutput<AvailableAction>>;
|
|
59
|
+
listActionsForDataHolder(input: ListActionsForDataHolderInput): Promise<ListOutput<Action>>;
|
|
58
60
|
subscribeToActions(subscriptionId: string, subscriber: ActionSubscriber): Promise<void>;
|
|
59
61
|
unsubscribeFromActions(subscriptionId: string): void;
|
|
60
62
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { ActionFulfilmentMethod, ActionIntent } from '../typings/action';
|
|
7
|
+
import { Pagination } from './common';
|
|
7
8
|
/**
|
|
8
9
|
* Properties required to initiate an action against a data holder relationship.
|
|
9
10
|
*
|
|
@@ -24,7 +25,22 @@ export interface InitiateActionInput {
|
|
|
24
25
|
*
|
|
25
26
|
* @interface ListAvailableActionsInput
|
|
26
27
|
* @property {string} dataHolderId The data holder relationship to list available actions for.
|
|
28
|
+
* @property {boolean} includeCompleted When true, actions the user has already
|
|
29
|
+
* completed are included in the results. Defaults to false, omitting completed
|
|
30
|
+
* actions.
|
|
27
31
|
*/
|
|
28
32
|
export interface ListAvailableActionsInput {
|
|
29
33
|
dataHolderId: string;
|
|
34
|
+
includeCompleted?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Properties required to list the persisted action history for a data holder.
|
|
38
|
+
*
|
|
39
|
+
* @interface ListActionsForDataHolderInput
|
|
40
|
+
* @property {string} dataHolderId The data holder relationship to list the action history for.
|
|
41
|
+
* @property {number} limit Number of items to return.
|
|
42
|
+
* @property {string} nextToken A token generated by a previous call.
|
|
43
|
+
*/
|
|
44
|
+
export interface ListActionsForDataHolderInput extends Pagination {
|
|
45
|
+
dataHolderId: string;
|
|
30
46
|
}
|
|
@@ -26,7 +26,12 @@ export interface ConnectVirtualPresenceWithAuthCodeInput {
|
|
|
26
26
|
* @property {string} refreshToken The refresh token value.
|
|
27
27
|
* @property {string} providerIdentity The identity associated with the provider.
|
|
28
28
|
* @property {string[]} scopes Optional OAuth scopes associated with the token.
|
|
29
|
-
* @property {number}
|
|
29
|
+
* @property {number} expiresAtEpochMs Optional absolute expiry of the credential in milliseconds
|
|
30
|
+
* since epoch. Takes precedence over `expiresInEpochMs` when both are provided. Defaults to one
|
|
31
|
+
* year after the request when neither is provided.
|
|
32
|
+
* @property {number} expiresInEpochMs Optional relative expiry: the number of milliseconds after
|
|
33
|
+
* the request at which the credential expires.
|
|
34
|
+
* @deprecated Use {@link ConnectVirtualPresenceWithRefreshTokenInput.expiresAtEpochMs} instead.
|
|
30
35
|
* @property {RelationshipProvider} relationshipProvider The relationship provider
|
|
31
36
|
* to associate with the connection.
|
|
32
37
|
*/
|
|
@@ -34,6 +39,10 @@ export interface ConnectVirtualPresenceWithRefreshTokenInput {
|
|
|
34
39
|
refreshToken: string;
|
|
35
40
|
providerIdentity: string;
|
|
36
41
|
scopes?: string[];
|
|
42
|
+
expiresAtEpochMs?: number;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use {@link ConnectVirtualPresenceWithRefreshTokenInput.expiresAtEpochMs} instead.
|
|
45
|
+
*/
|
|
37
46
|
expiresInEpochMs?: number;
|
|
38
47
|
relationshipProvider?: RelationshipProvider;
|
|
39
48
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ListOutput } from '@sudoplatform/sudo-common';
|
|
7
7
|
import { SudoUserClient } from '@sudoplatform/sudo-user';
|
|
8
|
-
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, InitiateActionInput, ListAnalysisResultsInput, ListAvailableActionsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
8
|
+
import { ConnectVirtualPresenceWithAuthCodeInput, ConnectVirtualPresenceWithRefreshTokenInput, GetDataHolderOptions, GetOrganizationAnalysisInput, InitiateActionInput, ListAnalysisResultsInput, ListActionsForDataHolderInput, ListAvailableActionsInput, ListDataHolderScanSummariesInput, ListDataHoldersInput, ListVirtualPresencesInput, RescanVirtualPresenceInput } from './inputs';
|
|
9
9
|
import { Action, AnalysisResult, AnalysisResultSubscriber, ActionSubscriber, AvailableAction, DataHolder, DataHolderScanSummary, DataHolderSubscriber, OrganizationAnalysis, ProviderConfiguration, VirtualPresence, VirtualPresenceSubscriber } from './typings';
|
|
10
10
|
export interface SudoPrivacyInteractionClient {
|
|
11
11
|
/**
|
|
@@ -43,6 +43,17 @@ export interface SudoPrivacyInteractionClient {
|
|
|
43
43
|
* @returns {VirtualPresence} The rescanned virtual presence.
|
|
44
44
|
*/
|
|
45
45
|
rescanVirtualPresence(input: RescanVirtualPresenceInput): Promise<VirtualPresence>;
|
|
46
|
+
/**
|
|
47
|
+
* Validate a virtual presence's provider grant on demand and return its
|
|
48
|
+
* reconciled state. If the provider confirms the grant has been revoked (e.g.
|
|
49
|
+
* the user removed access in their provider account), the presence transitions
|
|
50
|
+
* to `NeedsReauth`; otherwise its state is returned unchanged. Use before
|
|
51
|
+
* gating access on a current `Connected` state.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} id The unique identifier of the virtual presence to refresh.
|
|
54
|
+
* @returns {VirtualPresence} The virtual presence with its reconciled state.
|
|
55
|
+
*/
|
|
56
|
+
refreshVirtualPresenceState(id: string): Promise<VirtualPresence>;
|
|
46
57
|
/**
|
|
47
58
|
* List all virtual presences for the signed in user.
|
|
48
59
|
*
|
|
@@ -197,6 +208,17 @@ export interface SudoPrivacyInteractionClient {
|
|
|
197
208
|
* search criteria.
|
|
198
209
|
*/
|
|
199
210
|
listAvailableActions(input: ListAvailableActionsInput): Promise<ListOutput<AvailableAction>>;
|
|
211
|
+
/**
|
|
212
|
+
* List the persisted action history for a data holder. Returns every action
|
|
213
|
+
* that has been initiated against the data holder (all intents, all statuses,
|
|
214
|
+
* every attempt), ordered newest-first. This is the executed-action history,
|
|
215
|
+
* distinct from `listAvailableActions`, which returns the derived set of
|
|
216
|
+
* actions a user could take.
|
|
217
|
+
*
|
|
218
|
+
* @param {ListActionsForDataHolderInput} input Parameters used to list the action history.
|
|
219
|
+
* @returns {ListOutput<Action>} A list of actions matching the search criteria.
|
|
220
|
+
*/
|
|
221
|
+
listActionsForDataHolder(input: ListActionsForDataHolderInput): Promise<ListOutput<Action>>;
|
|
200
222
|
/**
|
|
201
223
|
* Subscribe to action status events. Emitted each time an action's status changes.
|
|
202
224
|
*
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
* @property ACCESS_MY_DATA Data subject access / portability request.
|
|
15
15
|
* @property DELETE_MY_DATA Account deletion / data erasure.
|
|
16
16
|
* @property LIMIT_DATA_USE Opt out of sale / tracking, manage consent.
|
|
17
|
+
* @property SWAP_EMAIL The user has replaced the account's email with a private
|
|
18
|
+
* email. Always available for an email presence; self-reported.
|
|
19
|
+
* @property SWAP_PHONE The user has replaced the account's phone number with a
|
|
20
|
+
* private number. Offered only when a signal indicates the data holder holds
|
|
21
|
+
* the user's phone number.
|
|
22
|
+
* @property SWAP_VIRTUAL_CARD The user has replaced the account's payment card
|
|
23
|
+
* with a virtual card. Offered only when the data holder is identified as
|
|
24
|
+
* collecting credit card data.
|
|
25
|
+
* @property SAVE_IN_PASSWORD The user has saved this account in a password
|
|
26
|
+
* manager. Offered only when the data holder supports account creation.
|
|
17
27
|
* @property OTHER Anything unmapped; carries additionalInfo.
|
|
18
28
|
*
|
|
19
29
|
* @enum
|
|
@@ -23,6 +33,10 @@ export declare enum ActionIntent {
|
|
|
23
33
|
AccessMyData = "ACCESS_MY_DATA",
|
|
24
34
|
DeleteMyData = "DELETE_MY_DATA",
|
|
25
35
|
LimitDataUse = "LIMIT_DATA_USE",
|
|
36
|
+
SwapEmail = "SWAP_EMAIL",
|
|
37
|
+
SwapPhone = "SWAP_PHONE",
|
|
38
|
+
SwapVirtualCard = "SWAP_VIRTUAL_CARD",
|
|
39
|
+
SaveInPassword = "SAVE_IN_PASSWORD",
|
|
26
40
|
Other = "OTHER"
|
|
27
41
|
}
|
|
28
42
|
/**
|
|
@@ -174,6 +188,10 @@ export interface Action {
|
|
|
174
188
|
* @property {ActionOrigin} origin Which source contributed this action.
|
|
175
189
|
* @property {string} title Short presentation hint for the action's title.
|
|
176
190
|
* @property {string} description Short presentation hint describing the action.
|
|
191
|
+
* @property {ActionStatus} status Lifecycle status of the most recent,
|
|
192
|
+
* non-superseded persisted action for this intent on the data holder.
|
|
193
|
+
* Undefined when the user has never initiated this action, distinguishing
|
|
194
|
+
* "not yet started" from "in progress" or "completed".
|
|
177
195
|
*/
|
|
178
196
|
export interface AvailableAction {
|
|
179
197
|
intent: ActionIntent;
|
|
@@ -182,4 +200,5 @@ export interface AvailableAction {
|
|
|
182
200
|
origin: ActionOrigin;
|
|
183
201
|
title?: string;
|
|
184
202
|
description?: string;
|
|
203
|
+
status?: ActionStatus;
|
|
185
204
|
}
|
|
@@ -287,6 +287,7 @@ export interface CategorySignals {
|
|
|
287
287
|
* @deprecated Use {@link CapabilitySignals.supportsOptOutOfSale} instead. Populated from `supportsOptOutOfSale`.
|
|
288
288
|
* @property {SignalValue} usesCookiesOrTracking Whether the organization uses cookies or tracking.
|
|
289
289
|
* @property {SignalValue} supportsTwoFactorAuth Whether the organization supports two-factor auth for logins.
|
|
290
|
+
* @property {SignalValue} supportsPasskeys Whether the organization supports passkeys for logins.
|
|
290
291
|
*/
|
|
291
292
|
export interface CapabilitySignals {
|
|
292
293
|
supportsAccountCreation: SignalValue;
|
|
@@ -302,6 +303,7 @@ export interface CapabilitySignals {
|
|
|
302
303
|
sellsPersonalInformation: SignalValue;
|
|
303
304
|
usesCookiesOrTracking: SignalValue;
|
|
304
305
|
supportsTwoFactorAuth: SignalValue;
|
|
306
|
+
supportsPasskeys: SignalValue;
|
|
305
307
|
}
|
|
306
308
|
/**
|
|
307
309
|
* Aggregated risk indicators derived from categories and capabilities.
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
* @property {string} name Display name of the data holder.
|
|
17
17
|
* @property {DataHolderProtectionState} protectionState Current protection state.
|
|
18
18
|
* @property {boolean} complianceConcern Whether there is a compliance concern.
|
|
19
|
-
* @property {Date} mostRecentInteractionAt Date of the most recent
|
|
19
|
+
* @property {Date} mostRecentInteractionAt Date of the most recent inbound contact from the data holder.
|
|
20
|
+
* @deprecated Use {@link DataHolder.mostRecentInboundContactAt} instead.
|
|
21
|
+
* @property {Date} mostRecentInboundContactAt Date of the most recent inbound contact from the data holder.
|
|
22
|
+
* @property {Date} firstInboundContactAt Date of the earliest observed contact from the data holder.
|
|
20
23
|
* @property {number} version Version of this entity. Increments on update.
|
|
21
24
|
* @property {Date} createdAt Date for when the data holder was created.
|
|
22
25
|
* @property {Date} updatedAt Date for when the data holder was last updated.
|
|
@@ -32,7 +35,12 @@ export interface DataHolder {
|
|
|
32
35
|
name: string;
|
|
33
36
|
protectionState: DataHolderProtectionState;
|
|
34
37
|
complianceConcern: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use {@link DataHolder.mostRecentInboundContactAt} instead.
|
|
40
|
+
*/
|
|
35
41
|
mostRecentInteractionAt: Date;
|
|
42
|
+
mostRecentInboundContactAt: Date;
|
|
43
|
+
firstInboundContactAt: Date;
|
|
36
44
|
version: number;
|
|
37
45
|
createdAt: Date;
|
|
38
46
|
updatedAt: Date;
|