@sudoplatform/sudo-privacy-interaction 2.4.0 → 2.5.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 +299 -1
- 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/common/apiClient.js +21 -0
- 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/refreshVirtualPresenceStateUseCase.js +25 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +23 -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/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/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 +1 -1
- package/docs/interfaces/Pagination.html +2 -1
- 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 +298 -0
- 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/common/apiClient.js +22 -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/refreshVirtualPresenceStateUseCase.js +21 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +23 -1
- package/lib/public/typings/action.js +14 -0
- package/package.json +6 -1
- package/types/gen/graphqlTypes.d.ts +71 -1
- package/types/gen/schema-types.d.ts +35 -2
- 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/virtual-presence/virtualPresenceService.d.ts +11 -1
- package/types/private/domain/use-cases/action/listActionsForDataHolderUseCase.d.ts +16 -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/sudoPrivacyInteractionClient.d.ts +23 -1
- package/types/public/typings/action.d.ts +19 -0
|
@@ -16,6 +16,14 @@ export class ActionIntentTransformer {
|
|
|
16
16
|
return ActionIntent.DeleteMyData;
|
|
17
17
|
case ActionIntentEntity.LimitDataUse:
|
|
18
18
|
return ActionIntent.LimitDataUse;
|
|
19
|
+
case ActionIntentEntity.SwapEmail:
|
|
20
|
+
return ActionIntent.SwapEmail;
|
|
21
|
+
case ActionIntentEntity.SwapPhone:
|
|
22
|
+
return ActionIntent.SwapPhone;
|
|
23
|
+
case ActionIntentEntity.SwapVirtualCard:
|
|
24
|
+
return ActionIntent.SwapVirtualCard;
|
|
25
|
+
case ActionIntentEntity.SaveInPassword:
|
|
26
|
+
return ActionIntent.SaveInPassword;
|
|
19
27
|
case ActionIntentEntity.Other:
|
|
20
28
|
return ActionIntent.Other;
|
|
21
29
|
}
|
|
@@ -30,6 +38,14 @@ export class ActionIntentTransformer {
|
|
|
30
38
|
return ActionIntentEntity.DeleteMyData;
|
|
31
39
|
case ActionIntent.LimitDataUse:
|
|
32
40
|
return ActionIntentEntity.LimitDataUse;
|
|
41
|
+
case ActionIntent.SwapEmail:
|
|
42
|
+
return ActionIntentEntity.SwapEmail;
|
|
43
|
+
case ActionIntent.SwapPhone:
|
|
44
|
+
return ActionIntentEntity.SwapPhone;
|
|
45
|
+
case ActionIntent.SwapVirtualCard:
|
|
46
|
+
return ActionIntentEntity.SwapVirtualCard;
|
|
47
|
+
case ActionIntent.SaveInPassword:
|
|
48
|
+
return ActionIntentEntity.SaveInPassword;
|
|
33
49
|
case ActionIntent.Other:
|
|
34
50
|
return ActionIntentEntity.Other;
|
|
35
51
|
}
|
|
@@ -44,6 +60,14 @@ export class ActionIntentTransformer {
|
|
|
44
60
|
return ActionIntentEntity.DeleteMyData;
|
|
45
61
|
case 'LIMIT_DATA_USE':
|
|
46
62
|
return ActionIntentEntity.LimitDataUse;
|
|
63
|
+
case 'SWAP_EMAIL':
|
|
64
|
+
return ActionIntentEntity.SwapEmail;
|
|
65
|
+
case 'SWAP_PHONE':
|
|
66
|
+
return ActionIntentEntity.SwapPhone;
|
|
67
|
+
case 'SWAP_VIRTUAL_CARD':
|
|
68
|
+
return ActionIntentEntity.SwapVirtualCard;
|
|
69
|
+
case 'SAVE_IN_PASSWORD':
|
|
70
|
+
return ActionIntentEntity.SaveInPassword;
|
|
47
71
|
default:
|
|
48
72
|
return ActionIntentEntity.Other;
|
|
49
73
|
}
|
|
@@ -58,6 +82,14 @@ export class ActionIntentTransformer {
|
|
|
58
82
|
return 'DELETE_MY_DATA';
|
|
59
83
|
case ActionIntentEntity.LimitDataUse:
|
|
60
84
|
return 'LIMIT_DATA_USE';
|
|
85
|
+
case ActionIntentEntity.SwapEmail:
|
|
86
|
+
return 'SWAP_EMAIL';
|
|
87
|
+
case ActionIntentEntity.SwapPhone:
|
|
88
|
+
return 'SWAP_PHONE';
|
|
89
|
+
case ActionIntentEntity.SwapVirtualCard:
|
|
90
|
+
return 'SWAP_VIRTUAL_CARD';
|
|
91
|
+
case ActionIntentEntity.SaveInPassword:
|
|
92
|
+
return 'SAVE_IN_PASSWORD';
|
|
61
93
|
case ActionIntentEntity.Other:
|
|
62
94
|
return 'OTHER';
|
|
63
95
|
}
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
import { ActionFulfilmentMethodTransformer } from './actionFulfilmentMethodTransformer';
|
|
7
7
|
import { ActionIntentTransformer } from './actionIntentTransformer';
|
|
8
8
|
import { ActionOriginTransformer } from './actionOriginTransformer';
|
|
9
|
+
import { ActionStatusTransformer } from './actionStatusTransformer';
|
|
9
10
|
export class AvailableActionTransformer {
|
|
10
11
|
intentTransformer = new ActionIntentTransformer();
|
|
11
12
|
fulfilmentMethodTransformer = new ActionFulfilmentMethodTransformer();
|
|
12
13
|
originTransformer = new ActionOriginTransformer();
|
|
14
|
+
statusTransformer = new ActionStatusTransformer();
|
|
13
15
|
fromGraphQLToEntity(data) {
|
|
14
16
|
return {
|
|
15
17
|
intent: this.intentTransformer.fromGraphQLToEntity(data.intent),
|
|
@@ -18,6 +20,9 @@ export class AvailableActionTransformer {
|
|
|
18
20
|
origin: this.originTransformer.fromGraphQLToEntity(data.origin),
|
|
19
21
|
title: data.title ?? undefined,
|
|
20
22
|
description: data.description ?? undefined,
|
|
23
|
+
status: data.status != null
|
|
24
|
+
? this.statusTransformer.fromGraphQLToEntity(data.status)
|
|
25
|
+
: undefined,
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
28
|
fromEntityToAPI(entity) {
|
|
@@ -28,6 +33,9 @@ export class AvailableActionTransformer {
|
|
|
28
33
|
origin: this.originTransformer.fromEntityToAPI(entity.origin),
|
|
29
34
|
title: entity.title,
|
|
30
35
|
description: entity.description,
|
|
36
|
+
status: entity.status !== undefined
|
|
37
|
+
? this.statusTransformer.fromEntityToAPI(entity.status)
|
|
38
|
+
: undefined,
|
|
31
39
|
};
|
|
32
40
|
}
|
|
33
41
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { DefaultApiClientManager, } from '@sudoplatform/sudo-api-client';
|
|
7
7
|
import { DefaultLogger, FatalError, UnknownGraphQLError, isGraphQLNetworkError, mapNetworkErrorToClientError, } from '@sudoplatform/sudo-common';
|
|
8
|
-
import { ArchiveDataHolderDocument, ConfirmActionOutcomeDocument, ConnectVirtualPresenceDocument, DisconnectVirtualPresenceDocument, GetActionDocument, GetAnalysisResultDocument, GetDataHolderDocument, GetProviderConfigurationDocument, GetOrganizationAnalysisDocument, InitiateActionDocument, ListAnalysisResultsDocument, ListAvailableActionsDocument, ListDataHolderScanSummariesDocument, ListDataHoldersDocument, ListVirtualPresencesDocument, OnActionStatusUpdateDocument, OnAnalysisResultUpdateDocument, OnDataHoldersUpdateDocument, OnVirtualPresenceUpdateDocument, RescanVirtualPresenceDocument, UnarchiveDataHolderDocument, } from '../../../gen/graphqlTypes';
|
|
8
|
+
import { ArchiveDataHolderDocument, ConfirmActionOutcomeDocument, ConnectVirtualPresenceDocument, DisconnectVirtualPresenceDocument, GetActionDocument, GetAnalysisResultDocument, GetDataHolderDocument, GetProviderConfigurationDocument, GetOrganizationAnalysisDocument, InitiateActionDocument, ListAnalysisResultsDocument, ListActionsForDataHolderDocument, ListAvailableActionsDocument, ListDataHolderScanSummariesDocument, ListDataHoldersDocument, ListVirtualPresencesDocument, OnActionStatusUpdateDocument, OnAnalysisResultUpdateDocument, OnDataHoldersUpdateDocument, OnVirtualPresenceUpdateDocument, RefreshVirtualPresenceStateDocument, RescanVirtualPresenceDocument, UnarchiveDataHolderDocument, } from '../../../gen/graphqlTypes';
|
|
9
9
|
import { ErrorTransformer } from './transformer/errorTransformer';
|
|
10
10
|
export class ApiClient {
|
|
11
11
|
log;
|
|
@@ -43,6 +43,14 @@ export class ApiClient {
|
|
|
43
43
|
});
|
|
44
44
|
return data.rescanVirtualPresence;
|
|
45
45
|
}
|
|
46
|
+
async refreshVirtualPresenceState(id) {
|
|
47
|
+
const data = await this.performMutation({
|
|
48
|
+
mutation: RefreshVirtualPresenceStateDocument,
|
|
49
|
+
variables: { id },
|
|
50
|
+
calleeName: this.refreshVirtualPresenceState.name,
|
|
51
|
+
});
|
|
52
|
+
return data.refreshVirtualPresenceState;
|
|
53
|
+
}
|
|
46
54
|
async listVirtualPresences(input) {
|
|
47
55
|
const data = await this.performQuery({
|
|
48
56
|
query: ListVirtualPresencesDocument,
|
|
@@ -171,11 +179,24 @@ export class ApiClient {
|
|
|
171
179
|
query: ListAvailableActionsDocument,
|
|
172
180
|
variables: {
|
|
173
181
|
dataHolderId: input.dataHolderId,
|
|
182
|
+
includeCompleted: input.includeCompleted,
|
|
174
183
|
},
|
|
175
184
|
calleeName: this.listAvailableActions.name,
|
|
176
185
|
});
|
|
177
186
|
return data.listAvailableActions;
|
|
178
187
|
}
|
|
188
|
+
async listActionsForDataHolder(input) {
|
|
189
|
+
const data = await this.performQuery({
|
|
190
|
+
query: ListActionsForDataHolderDocument,
|
|
191
|
+
variables: {
|
|
192
|
+
dataHolderId: input.dataHolderId,
|
|
193
|
+
limit: input.limit,
|
|
194
|
+
nextToken: input.nextToken,
|
|
195
|
+
},
|
|
196
|
+
calleeName: this.listActionsForDataHolder.name,
|
|
197
|
+
});
|
|
198
|
+
return data.listActionsForDataHolder;
|
|
199
|
+
}
|
|
179
200
|
onVirtualPresenceUpdated(owner) {
|
|
180
201
|
return this.performSubscription({
|
|
181
202
|
subscription: OnVirtualPresenceUpdateDocument,
|
|
@@ -48,6 +48,10 @@ export class DefaultVirtualPresenceService {
|
|
|
48
48
|
const result = await this.appSync.disconnectVirtualPresence(id);
|
|
49
49
|
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
50
50
|
}
|
|
51
|
+
async refreshState(id) {
|
|
52
|
+
const result = await this.appSync.refreshVirtualPresenceState(id);
|
|
53
|
+
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
54
|
+
}
|
|
51
55
|
async subscribe(input) {
|
|
52
56
|
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
53
57
|
if (!this.subscriptionManager.getWatcher()) {
|
|
@@ -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
|
|
@@ -25,6 +35,10 @@ export var ActionIntentEntity;
|
|
|
25
35
|
ActionIntentEntity["AccessMyData"] = "ACCESS_MY_DATA";
|
|
26
36
|
ActionIntentEntity["DeleteMyData"] = "DELETE_MY_DATA";
|
|
27
37
|
ActionIntentEntity["LimitDataUse"] = "LIMIT_DATA_USE";
|
|
38
|
+
ActionIntentEntity["SwapEmail"] = "SWAP_EMAIL";
|
|
39
|
+
ActionIntentEntity["SwapPhone"] = "SWAP_PHONE";
|
|
40
|
+
ActionIntentEntity["SwapVirtualCard"] = "SWAP_VIRTUAL_CARD";
|
|
41
|
+
ActionIntentEntity["SaveInPassword"] = "SAVE_IN_PASSWORD";
|
|
28
42
|
ActionIntentEntity["Other"] = "OTHER";
|
|
29
43
|
})(ActionIntentEntity || (ActionIntentEntity = {}));
|
|
30
44
|
/**
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DefaultLogger } from '@sudoplatform/sudo-common';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for listing the persisted action history for a data
|
|
9
|
+
* holder.
|
|
10
|
+
*/
|
|
11
|
+
export class ListActionsForDataHolderUseCase {
|
|
12
|
+
actionService;
|
|
13
|
+
log;
|
|
14
|
+
constructor(actionService) {
|
|
15
|
+
this.actionService = actionService;
|
|
16
|
+
this.log = new DefaultLogger(this.constructor.name);
|
|
17
|
+
}
|
|
18
|
+
async execute(input) {
|
|
19
|
+
this.log.debug(this.constructor.name, { input });
|
|
20
|
+
return await this.actionService.listForDataHolder(input);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { DefaultLogger } from '@sudoplatform/sudo-common';
|
|
7
|
+
/**
|
|
8
|
+
* Application business logic for refreshing a virtual presence's state.
|
|
9
|
+
*/
|
|
10
|
+
export class RefreshVirtualPresenceStateUseCase {
|
|
11
|
+
virtualPresenceService;
|
|
12
|
+
log;
|
|
13
|
+
constructor(virtualPresenceService) {
|
|
14
|
+
this.virtualPresenceService = virtualPresenceService;
|
|
15
|
+
this.log = new DefaultLogger(this.constructor.name);
|
|
16
|
+
}
|
|
17
|
+
async execute(id) {
|
|
18
|
+
this.log.debug(this.constructor.name, { id });
|
|
19
|
+
return await this.virtualPresenceService.refreshState(id);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -28,6 +28,7 @@ import { GetAnalysisResultUseCase } from '../private/domain/use-cases/analysis-r
|
|
|
28
28
|
import { ConfirmActionOutcomeUseCase } from '../private/domain/use-cases/action/confirmActionOutcomeUseCase';
|
|
29
29
|
import { GetActionUseCase } from '../private/domain/use-cases/action/getActionUseCase';
|
|
30
30
|
import { InitiateActionUseCase } from '../private/domain/use-cases/action/initiateActionUseCase';
|
|
31
|
+
import { ListActionsForDataHolderUseCase } from '../private/domain/use-cases/action/listActionsForDataHolderUseCase';
|
|
31
32
|
import { ListAvailableActionsUseCase } from '../private/domain/use-cases/action/listAvailableActionsUseCase';
|
|
32
33
|
import { SubscribeToActionUseCase } from '../private/domain/use-cases/action/subscribeToActionUseCase';
|
|
33
34
|
import { UnsubscribeFromActionUseCase } from '../private/domain/use-cases/action/unsubscribeFromActionUseCase';
|
|
@@ -47,6 +48,7 @@ import { ConnectVirtualPresenceWithAuthCodeUseCase } from '../private/domain/use
|
|
|
47
48
|
import { ConnectVirtualPresenceWithRefreshTokenUseCase } from '../private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase';
|
|
48
49
|
import { DisconnectVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase';
|
|
49
50
|
import { ListVirtualPresencesUseCase } from '../private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase';
|
|
51
|
+
import { RefreshVirtualPresenceStateUseCase } from '../private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase';
|
|
50
52
|
import { RescanVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase';
|
|
51
53
|
import { SubscribeToVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase';
|
|
52
54
|
import { UnsubscribeFromVirtualPresenceUseCase } from '../private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase';
|
|
@@ -148,6 +150,12 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
148
150
|
const result = await useCase.execute(input);
|
|
149
151
|
return this.virtualPresenceTransformer.fromEntityToAPI(result);
|
|
150
152
|
}
|
|
153
|
+
async refreshVirtualPresenceState(id) {
|
|
154
|
+
this.log.debug(this.refreshVirtualPresenceState.name, { id });
|
|
155
|
+
const useCase = new RefreshVirtualPresenceStateUseCase(this.virtualPresenceService);
|
|
156
|
+
const result = await useCase.execute(id);
|
|
157
|
+
return this.virtualPresenceTransformer.fromEntityToAPI(result);
|
|
158
|
+
}
|
|
151
159
|
async listVirtualPresences(input) {
|
|
152
160
|
this.log.debug(this.listVirtualPresences.name, {
|
|
153
161
|
input,
|
|
@@ -337,10 +345,24 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
337
345
|
async listAvailableActions(input) {
|
|
338
346
|
this.log.debug(this.listAvailableActions.name, { input });
|
|
339
347
|
const useCase = new ListAvailableActionsUseCase(this.actionService);
|
|
340
|
-
const { availableActions, nextToken: resultNextToken } = await useCase.execute({
|
|
348
|
+
const { availableActions, nextToken: resultNextToken } = await useCase.execute({
|
|
349
|
+
dataHolderId: input.dataHolderId,
|
|
350
|
+
includeCompleted: input.includeCompleted,
|
|
351
|
+
});
|
|
341
352
|
const transformedAvailableActions = availableActions.map((availableAction) => this.availableActionTransformer.fromEntityToAPI(availableAction));
|
|
342
353
|
return { items: transformedAvailableActions, nextToken: resultNextToken };
|
|
343
354
|
}
|
|
355
|
+
async listActionsForDataHolder(input) {
|
|
356
|
+
this.log.debug(this.listActionsForDataHolder.name, { input });
|
|
357
|
+
const useCase = new ListActionsForDataHolderUseCase(this.actionService);
|
|
358
|
+
const { actions, nextToken: resultNextToken } = await useCase.execute({
|
|
359
|
+
dataHolderId: input.dataHolderId,
|
|
360
|
+
limit: input.limit,
|
|
361
|
+
nextToken: input.nextToken,
|
|
362
|
+
});
|
|
363
|
+
const transformedActions = actions.map((action) => this.actionTransformer.fromEntityToAPI(action));
|
|
364
|
+
return { items: transformedActions, nextToken: resultNextToken };
|
|
365
|
+
}
|
|
344
366
|
async subscribeToActions(subscriptionId, subscriber) {
|
|
345
367
|
this.log.debug(this.subscribeToActions.name, {
|
|
346
368
|
subscriptionId,
|
|
@@ -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
|
|
@@ -24,6 +34,10 @@ export var ActionIntent;
|
|
|
24
34
|
ActionIntent["AccessMyData"] = "ACCESS_MY_DATA";
|
|
25
35
|
ActionIntent["DeleteMyData"] = "DELETE_MY_DATA";
|
|
26
36
|
ActionIntent["LimitDataUse"] = "LIMIT_DATA_USE";
|
|
37
|
+
ActionIntent["SwapEmail"] = "SWAP_EMAIL";
|
|
38
|
+
ActionIntent["SwapPhone"] = "SWAP_PHONE";
|
|
39
|
+
ActionIntent["SwapVirtualCard"] = "SWAP_VIRTUAL_CARD";
|
|
40
|
+
ActionIntent["SaveInPassword"] = "SAVE_IN_PASSWORD";
|
|
27
41
|
ActionIntent["Other"] = "OTHER";
|
|
28
42
|
})(ActionIntent || (ActionIntent = {}));
|
|
29
43
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudoplatform/sudo-privacy-interaction",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"author": "Anonyome Labs, Inc.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -115,6 +115,11 @@
|
|
|
115
115
|
"until": 1795224255,
|
|
116
116
|
"untilISO": "2026-11-21T01:24:15Z",
|
|
117
117
|
"reason": "markdown-it fix too new"
|
|
118
|
+
},
|
|
119
|
+
"1244623": {
|
|
120
|
+
"until": 1796479200,
|
|
121
|
+
"untilISO": "2026-12-06T00:00:00Z",
|
|
122
|
+
"reason": "minimatch 10.2.6 pulled in by typedoc (latest stable 0.28.20); typedoc requires minimatch 10.x and is incompatible with 11.x. Dev/build-time docs tool only, not shipped at runtime"
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
125
|
}
|
|
@@ -11,7 +11,7 @@ export type Incremental<T> = T | {
|
|
|
11
11
|
import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
|
|
12
12
|
export * from './schema-types';
|
|
13
13
|
export type ActionFulfilmentMethod = 'ASSISTED' | 'DELEGATED' | '%future added value';
|
|
14
|
-
export type ActionIntent = 'ACCESS_MY_DATA' | 'DELETE_MY_DATA' | 'LIMIT_DATA_USE' | 'OTHER' | 'STOP_CONTACT' | '%future added value';
|
|
14
|
+
export type ActionIntent = 'ACCESS_MY_DATA' | 'DELETE_MY_DATA' | 'LIMIT_DATA_USE' | 'OTHER' | 'SAVE_IN_PASSWORD' | 'STOP_CONTACT' | 'SWAP_EMAIL' | 'SWAP_PHONE' | 'SWAP_VIRTUAL_CARD' | '%future added value';
|
|
15
15
|
export type ActionOrigin = 'ANALYSIS' | 'DISCOVERY' | 'STATIC' | '%future added value';
|
|
16
16
|
export type ActionStatus = 'COMPLETED_UNVERIFIED' | 'COMPLETED_VERIFIED' | 'CONTRADICTED' | 'FAILED' | 'IN_PROGRESS' | 'PENDING' | 'REQUIRES_USER_INPUT' | '%future added value';
|
|
17
17
|
export type AnalysisResultStatus = 'COMPLETE' | 'FAILED' | 'PARTIAL' | 'PENDING' | 'UNAVAILABLE' | '%future added value';
|
|
@@ -100,6 +100,7 @@ export type AvailableActionFieldsFragment = {
|
|
|
100
100
|
origin: ActionOrigin;
|
|
101
101
|
title: string | null;
|
|
102
102
|
description: string | null;
|
|
103
|
+
status: ActionStatus | null;
|
|
103
104
|
};
|
|
104
105
|
export type AnalysisResultDataFieldsFragment = {
|
|
105
106
|
attribution: Array<string>;
|
|
@@ -424,6 +425,30 @@ export type RescanVirtualPresenceMutation = {
|
|
|
424
425
|
};
|
|
425
426
|
};
|
|
426
427
|
};
|
|
428
|
+
export type RefreshVirtualPresenceStateMutationVariables = Exact<{
|
|
429
|
+
id: string;
|
|
430
|
+
}>;
|
|
431
|
+
export type RefreshVirtualPresenceStateMutation = {
|
|
432
|
+
refreshVirtualPresenceState: {
|
|
433
|
+
id: string;
|
|
434
|
+
providerType: ProviderType;
|
|
435
|
+
identifier: string;
|
|
436
|
+
state: VirtualPresenceState;
|
|
437
|
+
lastScannedAtEpochMs: number;
|
|
438
|
+
lastScanFailureReason: string | null;
|
|
439
|
+
owner: string;
|
|
440
|
+
version: number;
|
|
441
|
+
createdAtEpochMs: number;
|
|
442
|
+
updatedAtEpochMs: number;
|
|
443
|
+
dataHolderCount: {
|
|
444
|
+
count: number;
|
|
445
|
+
monitored: number;
|
|
446
|
+
initiatedActions: number;
|
|
447
|
+
completedActions: number;
|
|
448
|
+
archived: number;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
};
|
|
427
452
|
export type InitiateActionMutationVariables = Exact<{
|
|
428
453
|
input: InitiateActionInput;
|
|
429
454
|
}>;
|
|
@@ -872,6 +897,7 @@ export type ListDataHolderScanSummariesQuery = {
|
|
|
872
897
|
};
|
|
873
898
|
export type ListAvailableActionsQueryVariables = Exact<{
|
|
874
899
|
dataHolderId: string | number;
|
|
900
|
+
includeCompleted?: boolean | null | undefined;
|
|
875
901
|
}>;
|
|
876
902
|
export type ListAvailableActionsQuery = {
|
|
877
903
|
listAvailableActions: {
|
|
@@ -883,6 +909,48 @@ export type ListAvailableActionsQuery = {
|
|
|
883
909
|
origin: ActionOrigin;
|
|
884
910
|
title: string | null;
|
|
885
911
|
description: string | null;
|
|
912
|
+
status: ActionStatus | null;
|
|
913
|
+
}>;
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
export type ListActionsForDataHolderQueryVariables = Exact<{
|
|
917
|
+
dataHolderId: string | number;
|
|
918
|
+
limit?: number | null | undefined;
|
|
919
|
+
nextToken?: string | null | undefined;
|
|
920
|
+
}>;
|
|
921
|
+
export type ListActionsForDataHolderQuery = {
|
|
922
|
+
listActionsForDataHolder: {
|
|
923
|
+
nextToken: string | null;
|
|
924
|
+
items: Array<{
|
|
925
|
+
id: string;
|
|
926
|
+
virtualPresenceId: string;
|
|
927
|
+
dataHolderId: string | null;
|
|
928
|
+
intent: ActionIntent;
|
|
929
|
+
additionalInfo: string | null;
|
|
930
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
931
|
+
status: ActionStatus;
|
|
932
|
+
initiatedAtEpochMs: number | null;
|
|
933
|
+
completedAtEpochMs: number | null;
|
|
934
|
+
owner: string;
|
|
935
|
+
version: number;
|
|
936
|
+
createdAtEpochMs: number;
|
|
937
|
+
updatedAtEpochMs: number;
|
|
938
|
+
assistedPayload: {
|
|
939
|
+
toAddress: string | null;
|
|
940
|
+
unsubscribeUrl: string | null;
|
|
941
|
+
unsubscribeMailto: string | null;
|
|
942
|
+
jurisdiction: string | null;
|
|
943
|
+
instructions: string | null;
|
|
944
|
+
contact: {
|
|
945
|
+
email: string | null;
|
|
946
|
+
phone: string | null;
|
|
947
|
+
address: string | null;
|
|
948
|
+
} | null;
|
|
949
|
+
emailTemplate: {
|
|
950
|
+
subject: string | null;
|
|
951
|
+
body: string;
|
|
952
|
+
} | null;
|
|
953
|
+
} | null;
|
|
886
954
|
}>;
|
|
887
955
|
};
|
|
888
956
|
};
|
|
@@ -1015,6 +1083,7 @@ export declare const VirtualPresenceFieldsFragmentDoc: DocumentNode<VirtualPrese
|
|
|
1015
1083
|
export declare const ConnectVirtualPresenceDocument: DocumentNode<ConnectVirtualPresenceMutation, ConnectVirtualPresenceMutationVariables>;
|
|
1016
1084
|
export declare const DisconnectVirtualPresenceDocument: DocumentNode<DisconnectVirtualPresenceMutation, DisconnectVirtualPresenceMutationVariables>;
|
|
1017
1085
|
export declare const RescanVirtualPresenceDocument: DocumentNode<RescanVirtualPresenceMutation, RescanVirtualPresenceMutationVariables>;
|
|
1086
|
+
export declare const RefreshVirtualPresenceStateDocument: DocumentNode<RefreshVirtualPresenceStateMutation, RefreshVirtualPresenceStateMutationVariables>;
|
|
1018
1087
|
export declare const InitiateActionDocument: DocumentNode<InitiateActionMutation, InitiateActionMutationVariables>;
|
|
1019
1088
|
export declare const ConfirmActionOutcomeDocument: DocumentNode<ConfirmActionOutcomeMutation, ConfirmActionOutcomeMutationVariables>;
|
|
1020
1089
|
export declare const ArchiveDataHolderDocument: DocumentNode<ArchiveDataHolderMutation, ArchiveDataHolderMutationVariables>;
|
|
@@ -1028,6 +1097,7 @@ export declare const GetOrganizationAnalysisDocument: DocumentNode<GetOrganizati
|
|
|
1028
1097
|
export declare const ListAnalysisResultsDocument: DocumentNode<ListAnalysisResultsQuery, ListAnalysisResultsQueryVariables>;
|
|
1029
1098
|
export declare const ListDataHolderScanSummariesDocument: DocumentNode<ListDataHolderScanSummariesQuery, ListDataHolderScanSummariesQueryVariables>;
|
|
1030
1099
|
export declare const ListAvailableActionsDocument: DocumentNode<ListAvailableActionsQuery, ListAvailableActionsQueryVariables>;
|
|
1100
|
+
export declare const ListActionsForDataHolderDocument: DocumentNode<ListActionsForDataHolderQuery, ListActionsForDataHolderQueryVariables>;
|
|
1031
1101
|
export declare const GetActionDocument: DocumentNode<GetActionQuery, GetActionQueryVariables>;
|
|
1032
1102
|
export declare const OnVirtualPresenceUpdateDocument: DocumentNode<OnVirtualPresenceUpdateSubscription, OnVirtualPresenceUpdateSubscriptionVariables>;
|
|
1033
1103
|
export declare const OnDataHoldersUpdateDocument: DocumentNode<OnDataHoldersUpdateSubscription, OnDataHoldersUpdateSubscriptionVariables>;
|
|
@@ -75,13 +75,17 @@ export type Action = {
|
|
|
75
75
|
version: Scalars['Int']['output'];
|
|
76
76
|
virtualPresenceId: Scalars['ID']['output'];
|
|
77
77
|
};
|
|
78
|
+
export type ActionConnection = {
|
|
79
|
+
items: Array<Action>;
|
|
80
|
+
nextToken?: Maybe<Scalars['String']['output']>;
|
|
81
|
+
};
|
|
78
82
|
export type ActionContact = {
|
|
79
83
|
address?: Maybe<Scalars['String']['output']>;
|
|
80
84
|
email?: Maybe<Scalars['String']['output']>;
|
|
81
85
|
phone?: Maybe<Scalars['String']['output']>;
|
|
82
86
|
};
|
|
83
87
|
export type ActionFulfilmentMethod = 'ASSISTED' | 'DELEGATED' | '%future added value';
|
|
84
|
-
export type ActionIntent = 'ACCESS_MY_DATA' | 'DELETE_MY_DATA' | 'LIMIT_DATA_USE' | 'OTHER' | 'STOP_CONTACT' | '%future added value';
|
|
88
|
+
export type ActionIntent = 'ACCESS_MY_DATA' | 'DELETE_MY_DATA' | 'LIMIT_DATA_USE' | 'OTHER' | 'SAVE_IN_PASSWORD' | 'STOP_CONTACT' | 'SWAP_EMAIL' | 'SWAP_PHONE' | 'SWAP_VIRTUAL_CARD' | '%future added value';
|
|
85
89
|
export type ActionOrigin = 'ANALYSIS' | 'DISCOVERY' | 'STATIC' | '%future added value';
|
|
86
90
|
export type ActionStatus = 'COMPLETED_UNVERIFIED' | 'COMPLETED_VERIFIED' | 'CONTRADICTED' | 'FAILED' | 'IN_PROGRESS' | 'PENDING' | 'REQUIRES_USER_INPUT' | '%future added value';
|
|
87
91
|
export type AnalysisResult = {
|
|
@@ -147,6 +151,7 @@ export type AvailableAction = {
|
|
|
147
151
|
fulfilmentMethod: ActionFulfilmentMethod;
|
|
148
152
|
intent: ActionIntent;
|
|
149
153
|
origin: ActionOrigin;
|
|
154
|
+
status?: Maybe<ActionStatus>;
|
|
150
155
|
title?: Maybe<Scalars['String']['output']>;
|
|
151
156
|
};
|
|
152
157
|
export type AvailableActionConnection = {
|
|
@@ -194,7 +199,6 @@ export type DataHolder = {
|
|
|
194
199
|
version: Scalars['Int']['output'];
|
|
195
200
|
virtualPresenceId: Scalars['ID']['output'];
|
|
196
201
|
};
|
|
197
|
-
export type DataHolderChangeType = 'METADATA_UPDATE' | 'NEW' | 'SIGNIFICANT_UPDATE' | '%future added value';
|
|
198
202
|
export type DataHolderConnection = {
|
|
199
203
|
items: Array<DataHolder>;
|
|
200
204
|
nextToken?: Maybe<Scalars['String']['output']>;
|
|
@@ -274,6 +278,14 @@ export type Mutation = {
|
|
|
274
278
|
* for the client to complete.
|
|
275
279
|
*/
|
|
276
280
|
initiateAction: Action;
|
|
281
|
+
/**
|
|
282
|
+
* Validate a virtual presence's provider grant on demand and return its
|
|
283
|
+
* reconciled state. If the provider confirms the grant has been revoked (e.g.
|
|
284
|
+
* the user removed access in their provider account), the presence transitions
|
|
285
|
+
* to NEEDS_REAUTH; otherwise its state is returned unchanged. Use before gating
|
|
286
|
+
* access on a current CONNECTED state.
|
|
287
|
+
*/
|
|
288
|
+
refreshVirtualPresenceState: VirtualPresence;
|
|
277
289
|
/**
|
|
278
290
|
* Rescan an existing virtual presence for new data holders.
|
|
279
291
|
* Scans from the last scan date forward.
|
|
@@ -301,6 +313,9 @@ export type MutationDisconnectVirtualPresenceArgs = {
|
|
|
301
313
|
export type MutationInitiateActionArgs = {
|
|
302
314
|
input: InitiateActionInput;
|
|
303
315
|
};
|
|
316
|
+
export type MutationRefreshVirtualPresenceStateArgs = {
|
|
317
|
+
id: Scalars['String']['input'];
|
|
318
|
+
};
|
|
304
319
|
export type MutationRescanVirtualPresenceArgs = {
|
|
305
320
|
id: Scalars['String']['input'];
|
|
306
321
|
options?: InputMaybe<ScanOptionsInput>;
|
|
@@ -379,12 +394,24 @@ export type Query = {
|
|
|
379
394
|
* the provider OAuth flow.
|
|
380
395
|
*/
|
|
381
396
|
getProviderConfiguration: ProviderConfiguration;
|
|
397
|
+
/**
|
|
398
|
+
* List the persisted action history for a data holder. Returns every action
|
|
399
|
+
* that has been initiated against the data holder (all intents, all statuses,
|
|
400
|
+
* every attempt), ordered newest-first. This is the executed-action history,
|
|
401
|
+
* distinct from listAvailableActions, which returns the derived set of actions
|
|
402
|
+
* a user could take.
|
|
403
|
+
*/
|
|
404
|
+
listActionsForDataHolder: ActionConnection;
|
|
382
405
|
/** List analysis results for a virtual presence. */
|
|
383
406
|
listAnalysisResults: AnalysisResultConnection;
|
|
384
407
|
/**
|
|
385
408
|
* List the actions currently available for a data holder relationship. Derived
|
|
386
409
|
* at query time by merging static, analysis, and discovery sources; not
|
|
387
410
|
* persisted. The owning virtual presence is derived from the data holder.
|
|
411
|
+
*
|
|
412
|
+
* Each returned action carries its latest status for the data holder (null when
|
|
413
|
+
* never initiated). By default actions the user has already completed are
|
|
414
|
+
* omitted; pass includeCompleted: true to return them as well.
|
|
388
415
|
*/
|
|
389
416
|
listAvailableActions: AvailableActionConnection;
|
|
390
417
|
/** List scan summaries for a data holder (most recent first) */
|
|
@@ -408,6 +435,11 @@ export type QueryGetOrganizationAnalysisArgs = {
|
|
|
408
435
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
409
436
|
options?: InputMaybe<OrganizationAnalysisOptions>;
|
|
410
437
|
};
|
|
438
|
+
export type QueryListActionsForDataHolderArgs = {
|
|
439
|
+
dataHolderId: Scalars['ID']['input'];
|
|
440
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
441
|
+
nextToken?: InputMaybe<Scalars['String']['input']>;
|
|
442
|
+
};
|
|
411
443
|
export type QueryListAnalysisResultsArgs = {
|
|
412
444
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
413
445
|
nextToken?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -415,6 +447,7 @@ export type QueryListAnalysisResultsArgs = {
|
|
|
415
447
|
};
|
|
416
448
|
export type QueryListAvailableActionsArgs = {
|
|
417
449
|
dataHolderId: Scalars['ID']['input'];
|
|
450
|
+
includeCompleted?: InputMaybe<Scalars['Boolean']['input']>;
|
|
418
451
|
};
|
|
419
452
|
export type QueryListDataHolderScanSummariesArgs = {
|
|
420
453
|
dataHolderId: Scalars['ID']['input'];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { ActionEntity } from '../../domain/entities/action/actionEntity';
|
|
7
|
-
import { ActionService, InitiateActionInput, ListAvailableActionsInput, ListAvailableActionsOutput, SubscribeToActionsInput } from '../../domain/entities/action/actionService';
|
|
7
|
+
import { ActionService, InitiateActionInput, ListActionsForDataHolderInput, ListActionsForDataHolderOutput, ListAvailableActionsInput, ListAvailableActionsOutput, SubscribeToActionsInput } from '../../domain/entities/action/actionService';
|
|
8
8
|
import { ApiClient } from '../common/apiClient';
|
|
9
9
|
export declare class DefaultActionService implements ActionService {
|
|
10
10
|
private readonly appSync;
|
|
@@ -18,6 +18,7 @@ export declare class DefaultActionService implements ActionService {
|
|
|
18
18
|
get(id: string): Promise<ActionEntity | undefined>;
|
|
19
19
|
confirmOutcome(id: string): Promise<ActionEntity>;
|
|
20
20
|
listAvailable(input: ListAvailableActionsInput): Promise<ListAvailableActionsOutput>;
|
|
21
|
+
listForDataHolder(input: ListActionsForDataHolderInput): Promise<ListActionsForDataHolderOutput>;
|
|
21
22
|
subscribe(input: SubscribeToActionsInput): Promise<void>;
|
|
22
23
|
unsubscribe(subscriptionId: string): void;
|
|
23
24
|
private setupUpdateSubscription;
|
|
@@ -10,6 +10,7 @@ export declare class AvailableActionTransformer {
|
|
|
10
10
|
private readonly intentTransformer;
|
|
11
11
|
private readonly fulfilmentMethodTransformer;
|
|
12
12
|
private readonly originTransformer;
|
|
13
|
+
private readonly statusTransformer;
|
|
13
14
|
fromGraphQLToEntity(data: AvailableActionGraphQL): AvailableActionEntity;
|
|
14
15
|
fromEntityToAPI(entity: AvailableActionEntity): AvailableAction;
|
|
15
16
|
}
|
|
@@ -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;
|