@sudoplatform/sudo-privacy-interaction 2.1.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 +557 -1
- 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/common/apiClient.js +35 -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/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/public/defaultSudoPrivacyInteractionClient.js +58 -0
- package/cjs/public/inputs/action.js +7 -0
- package/cjs/public/inputs/index.js +1 -0
- package/cjs/public/typings/action.js +85 -0
- package/cjs/public/typings/index.js +1 -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 +128 -22
- 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/hierarchy.html +6 -6
- 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/DataHolderSubscriber.html +3 -3
- 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 +1 -1
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +1 -1
- package/docs/interfaces/Pagination.html +1 -1
- package/docs/interfaces/SudoPrivacyInteractionClient.html +123 -22
- 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 +556 -0
- 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/common/apiClient.js +36 -1
- package/lib/private/domain/entities/action/actionEntity.js +83 -0
- package/lib/private/domain/entities/action/actionService.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/public/defaultSudoPrivacyInteractionClient.js +58 -0
- package/lib/public/inputs/action.js +6 -0
- package/lib/public/inputs/index.js +1 -0
- package/lib/public/typings/action.js +82 -0
- package/lib/public/typings/index.js +1 -0
- package/package.json +2 -2
- package/types/gen/graphqlTypes.d.ts +245 -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 +7 -1
- 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/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/public/defaultSudoPrivacyInteractionClient.d.ts +12 -2
- package/types/public/inputs/action.d.ts +30 -0
- package/types/public/inputs/index.d.ts +1 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +41 -2
- package/types/public/typings/action.d.ts +185 -0
- package/types/public/typings/index.d.ts +1 -0
- package/types/public/typings/subscription.d.ts +23 -0
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { DefaultLogger } from '@sudoplatform/sudo-common';
|
|
7
|
+
import { DefaultActionService } from '../private/data/action/defaultActionService';
|
|
8
|
+
import { ActionTransformer } from '../private/data/action/transformer/actionTransformer';
|
|
9
|
+
import { ActionFulfilmentMethodTransformer } from '../private/data/action/transformer/actionFulfilmentMethodTransformer';
|
|
10
|
+
import { ActionIntentTransformer } from '../private/data/action/transformer/actionIntentTransformer';
|
|
11
|
+
import { AvailableActionTransformer } from '../private/data/action/transformer/availableActionTransformer';
|
|
7
12
|
import { DefaultAnalysisResultService } from '../private/data/analysis-result/defaultAnalysisResultService';
|
|
8
13
|
import { AnalysisResultTransformer } from '../private/data/analysis-result/transformer/analysisResultTransformer';
|
|
9
14
|
import { ApiClient } from '../private/data/common/apiClient';
|
|
@@ -19,6 +24,11 @@ import { DefaultVirtualPresenceService } from '../private/data/virtual-presence/
|
|
|
19
24
|
import { RelationshipProviderTransformer } from '../private/data/virtual-presence/transformer/relationshipProviderTransformer';
|
|
20
25
|
import { VirtualPresenceTransformer } from '../private/data/virtual-presence/transformer/virtualPresenceTransformer';
|
|
21
26
|
import { GetAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/getAnalysisResultUseCase';
|
|
27
|
+
import { ConfirmActionOutcomeUseCase } from '../private/domain/use-cases/action/confirmActionOutcomeUseCase';
|
|
28
|
+
import { InitiateActionUseCase } from '../private/domain/use-cases/action/initiateActionUseCase';
|
|
29
|
+
import { ListAvailableActionsUseCase } from '../private/domain/use-cases/action/listAvailableActionsUseCase';
|
|
30
|
+
import { SubscribeToActionUseCase } from '../private/domain/use-cases/action/subscribeToActionUseCase';
|
|
31
|
+
import { UnsubscribeFromActionUseCase } from '../private/domain/use-cases/action/unsubscribeFromActionUseCase';
|
|
22
32
|
import { ListAnalysisResultsUseCase } from '../private/domain/use-cases/analysis-result/listAnalysisResultsUseCase';
|
|
23
33
|
import { SubscribeToAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase';
|
|
24
34
|
import { UnsubscribeFromAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase';
|
|
@@ -44,6 +54,7 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
44
54
|
dataHolderService;
|
|
45
55
|
analysisResultService;
|
|
46
56
|
organizationAnalysisService;
|
|
57
|
+
actionService;
|
|
47
58
|
providerConfigurationTransformer;
|
|
48
59
|
virtualPresenceTransformer;
|
|
49
60
|
relationshipProviderTransformer;
|
|
@@ -52,6 +63,10 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
52
63
|
analysisResultTransformer;
|
|
53
64
|
organizationAnalysisTransformer;
|
|
54
65
|
organizationAnalysisModeTransformer;
|
|
66
|
+
actionTransformer;
|
|
67
|
+
availableActionTransformer;
|
|
68
|
+
actionIntentTransformer;
|
|
69
|
+
actionFulfilmentMethodTransformer;
|
|
55
70
|
log;
|
|
56
71
|
constructor(opts) {
|
|
57
72
|
this.log = new DefaultLogger(this.constructor.name);
|
|
@@ -63,6 +78,7 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
63
78
|
this.dataHolderService = new DefaultDataHolderService(this.apiClient);
|
|
64
79
|
this.analysisResultService = new DefaultAnalysisResultService(this.apiClient);
|
|
65
80
|
this.organizationAnalysisService = new DefaultOrganizationAnalysisService(this.apiClient);
|
|
81
|
+
this.actionService = new DefaultActionService(this.apiClient);
|
|
66
82
|
this.providerConfigurationTransformer =
|
|
67
83
|
new ProviderConfigurationTransformer();
|
|
68
84
|
this.virtualPresenceTransformer = new VirtualPresenceTransformer();
|
|
@@ -74,6 +90,11 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
74
90
|
this.organizationAnalysisTransformer = new OrganizationAnalysisTransformer();
|
|
75
91
|
this.organizationAnalysisModeTransformer =
|
|
76
92
|
new OrganizationAnalysisModeTransformer();
|
|
93
|
+
this.actionTransformer = new ActionTransformer();
|
|
94
|
+
this.availableActionTransformer = new AvailableActionTransformer();
|
|
95
|
+
this.actionIntentTransformer = new ActionIntentTransformer();
|
|
96
|
+
this.actionFulfilmentMethodTransformer =
|
|
97
|
+
new ActionFulfilmentMethodTransformer();
|
|
77
98
|
}
|
|
78
99
|
async getProviderConfiguration() {
|
|
79
100
|
this.log.debug(this.getProviderConfiguration.name);
|
|
@@ -266,4 +287,41 @@ export class DefaultSudoPrivacyInteractionClient {
|
|
|
266
287
|
}
|
|
267
288
|
return this.organizationAnalysisTransformer.fromEntityToAPI(result);
|
|
268
289
|
}
|
|
290
|
+
async initiateAction(input) {
|
|
291
|
+
this.log.debug(this.initiateAction.name, { input });
|
|
292
|
+
const useCase = new InitiateActionUseCase(this.actionService);
|
|
293
|
+
const result = await useCase.execute({
|
|
294
|
+
dataHolderId: input.dataHolderId,
|
|
295
|
+
intent: this.actionIntentTransformer.fromAPIToEntity(input.intent),
|
|
296
|
+
fulfilmentMethod: this.actionFulfilmentMethodTransformer.fromAPIToEntity(input.fulfilmentMethod),
|
|
297
|
+
});
|
|
298
|
+
return this.actionTransformer.fromEntityToAPI(result);
|
|
299
|
+
}
|
|
300
|
+
async confirmActionOutcome(id) {
|
|
301
|
+
this.log.debug(this.confirmActionOutcome.name, { id });
|
|
302
|
+
const useCase = new ConfirmActionOutcomeUseCase(this.actionService);
|
|
303
|
+
const result = await useCase.execute(id);
|
|
304
|
+
return this.actionTransformer.fromEntityToAPI(result);
|
|
305
|
+
}
|
|
306
|
+
async listAvailableActions(input) {
|
|
307
|
+
this.log.debug(this.listAvailableActions.name, { input });
|
|
308
|
+
const useCase = new ListAvailableActionsUseCase(this.actionService);
|
|
309
|
+
const { availableActions, nextToken: resultNextToken } = await useCase.execute({ dataHolderId: input.dataHolderId });
|
|
310
|
+
const transformedAvailableActions = availableActions.map((availableAction) => this.availableActionTransformer.fromEntityToAPI(availableAction));
|
|
311
|
+
return { items: transformedAvailableActions, nextToken: resultNextToken };
|
|
312
|
+
}
|
|
313
|
+
async subscribeToActions(subscriptionId, subscriber) {
|
|
314
|
+
this.log.debug(this.subscribeToActions.name, {
|
|
315
|
+
subscriptionId,
|
|
316
|
+
});
|
|
317
|
+
const useCase = new SubscribeToActionUseCase(this.actionService, this.userClient);
|
|
318
|
+
await useCase.execute({ subscriptionId, subscriber });
|
|
319
|
+
}
|
|
320
|
+
unsubscribeFromActions(subscriptionId) {
|
|
321
|
+
this.log.debug(this.unsubscribeFromActions.name, {
|
|
322
|
+
subscriptionId,
|
|
323
|
+
});
|
|
324
|
+
const useCase = new UnsubscribeFromActionUseCase(this.actionService);
|
|
325
|
+
useCase.execute(subscriptionId);
|
|
326
|
+
}
|
|
269
327
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 var ActionIntent;
|
|
22
|
+
(function (ActionIntent) {
|
|
23
|
+
ActionIntent["StopContact"] = "STOP_CONTACT";
|
|
24
|
+
ActionIntent["AccessMyData"] = "ACCESS_MY_DATA";
|
|
25
|
+
ActionIntent["DeleteMyData"] = "DELETE_MY_DATA";
|
|
26
|
+
ActionIntent["LimitDataUse"] = "LIMIT_DATA_USE";
|
|
27
|
+
ActionIntent["Other"] = "OTHER";
|
|
28
|
+
})(ActionIntent || (ActionIntent = {}));
|
|
29
|
+
/**
|
|
30
|
+
* How an action is fulfilled from the user's perspective.
|
|
31
|
+
*
|
|
32
|
+
* @property ASSISTED The service returns structured materials for the client to
|
|
33
|
+
* complete the action.
|
|
34
|
+
* @property DELEGATED The service performs the action on the user's behalf.
|
|
35
|
+
*
|
|
36
|
+
* @enum
|
|
37
|
+
*/
|
|
38
|
+
export var ActionFulfilmentMethod;
|
|
39
|
+
(function (ActionFulfilmentMethod) {
|
|
40
|
+
ActionFulfilmentMethod["Assisted"] = "ASSISTED";
|
|
41
|
+
ActionFulfilmentMethod["Delegated"] = "DELEGATED";
|
|
42
|
+
})(ActionFulfilmentMethod || (ActionFulfilmentMethod = {}));
|
|
43
|
+
/**
|
|
44
|
+
* Which source contributed an available action.
|
|
45
|
+
*
|
|
46
|
+
* @property STATIC Always-possible action for the virtual presence type.
|
|
47
|
+
* @property ANALYSIS Derived from an analysis source's reported actions.
|
|
48
|
+
* @property DISCOVERY Derived from a discovery scan (e.g. List-Unsubscribe).
|
|
49
|
+
*
|
|
50
|
+
* @enum
|
|
51
|
+
*/
|
|
52
|
+
export var ActionOrigin;
|
|
53
|
+
(function (ActionOrigin) {
|
|
54
|
+
ActionOrigin["Static"] = "STATIC";
|
|
55
|
+
ActionOrigin["Analysis"] = "ANALYSIS";
|
|
56
|
+
ActionOrigin["Discovery"] = "DISCOVERY";
|
|
57
|
+
ActionOrigin["Unknown"] = "UNKNOWN";
|
|
58
|
+
})(ActionOrigin || (ActionOrigin = {}));
|
|
59
|
+
/**
|
|
60
|
+
* Lifecycle status of a persisted action instance.
|
|
61
|
+
*
|
|
62
|
+
* @property PENDING The action has been created but not yet started.
|
|
63
|
+
* @property IN_PROGRESS The action is being performed.
|
|
64
|
+
* @property COMPLETED_UNVERIFIED The action completed but has not been verified.
|
|
65
|
+
* @property COMPLETED_VERIFIED The action completed and has been verified.
|
|
66
|
+
* @property FAILED The action failed to complete.
|
|
67
|
+
* @property REQUIRES_USER_INPUT The action requires further input from the user.
|
|
68
|
+
* @property CONTRADICTED Subsequent evidence contradicts the action's completion.
|
|
69
|
+
*
|
|
70
|
+
* @enum
|
|
71
|
+
*/
|
|
72
|
+
export var ActionStatus;
|
|
73
|
+
(function (ActionStatus) {
|
|
74
|
+
ActionStatus["Pending"] = "PENDING";
|
|
75
|
+
ActionStatus["InProgress"] = "IN_PROGRESS";
|
|
76
|
+
ActionStatus["CompletedUnverified"] = "COMPLETED_UNVERIFIED";
|
|
77
|
+
ActionStatus["CompletedVerified"] = "COMPLETED_VERIFIED";
|
|
78
|
+
ActionStatus["Failed"] = "FAILED";
|
|
79
|
+
ActionStatus["RequiresUserInput"] = "REQUIRES_USER_INPUT";
|
|
80
|
+
ActionStatus["Contradicted"] = "CONTRADICTED";
|
|
81
|
+
ActionStatus["Unknown"] = "UNKNOWN";
|
|
82
|
+
})(ActionStatus || (ActionStatus = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudoplatform/sudo-privacy-interaction",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"author": "Anonyome Labs, Inc.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"wait-for-expect": "^4.0.0",
|
|
109
109
|
"ws": "^8.21.3"
|
|
110
110
|
},
|
|
111
|
-
"packageManager": "yarn@4.
|
|
111
|
+
"packageManager": "yarn@4.18.1+sha512.b2e1e7524f654f2749d32b4ebcb4622473cb5bcbc485df2007e12a154e50162a4d795526768bc5f5b8f81717bfd79deb2472813d86fb5ae2eb551fa9c872b08f",
|
|
112
112
|
"auditSuppressions": {
|
|
113
113
|
"1120607": {
|
|
114
114
|
"until": 1797004800,
|
|
@@ -79,6 +79,31 @@ export type Scalars = {
|
|
|
79
79
|
output: any;
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
+
export type Action = {
|
|
83
|
+
additionalInfo?: Maybe<Scalars['String']['output']>;
|
|
84
|
+
assistedPayload?: Maybe<AssistedPayload>;
|
|
85
|
+
completedAtEpochMs?: Maybe<Scalars['Float']['output']>;
|
|
86
|
+
createdAtEpochMs: Scalars['Float']['output'];
|
|
87
|
+
dataHolderId?: Maybe<Scalars['ID']['output']>;
|
|
88
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
89
|
+
id: Scalars['ID']['output'];
|
|
90
|
+
initiatedAtEpochMs?: Maybe<Scalars['Float']['output']>;
|
|
91
|
+
intent: ActionIntent;
|
|
92
|
+
owner: Scalars['ID']['output'];
|
|
93
|
+
status: ActionStatus;
|
|
94
|
+
updatedAtEpochMs: Scalars['Float']['output'];
|
|
95
|
+
version: Scalars['Int']['output'];
|
|
96
|
+
virtualPresenceId: Scalars['ID']['output'];
|
|
97
|
+
};
|
|
98
|
+
export type ActionContact = {
|
|
99
|
+
address?: Maybe<Scalars['String']['output']>;
|
|
100
|
+
email?: Maybe<Scalars['String']['output']>;
|
|
101
|
+
phone?: Maybe<Scalars['String']['output']>;
|
|
102
|
+
};
|
|
103
|
+
export type ActionFulfilmentMethod = 'ASSISTED' | 'DELEGATED' | '%future added value';
|
|
104
|
+
export type ActionIntent = 'ACCESS_MY_DATA' | 'DELETE_MY_DATA' | 'LIMIT_DATA_USE' | 'OTHER' | 'STOP_CONTACT' | '%future added value';
|
|
105
|
+
export type ActionOrigin = 'ANALYSIS' | 'DISCOVERY' | 'STATIC' | '%future added value';
|
|
106
|
+
export type ActionStatus = 'COMPLETED_UNVERIFIED' | 'COMPLETED_VERIFIED' | 'CONTRADICTED' | 'FAILED' | 'IN_PROGRESS' | 'PENDING' | 'REQUIRES_USER_INPUT' | '%future added value';
|
|
82
107
|
export type AnalysisResult = {
|
|
83
108
|
createdAtEpochMs: Scalars['Float']['output'];
|
|
84
109
|
data?: Maybe<AnalysisResultData>;
|
|
@@ -116,10 +141,35 @@ export type AnalysisResultUpdate = {
|
|
|
116
141
|
version: Scalars['Int']['output'];
|
|
117
142
|
virtualPresenceId: Scalars['ID']['output'];
|
|
118
143
|
};
|
|
144
|
+
export type AssistedEmailTemplate = {
|
|
145
|
+
body: Scalars['String']['output'];
|
|
146
|
+
subject?: Maybe<Scalars['String']['output']>;
|
|
147
|
+
};
|
|
148
|
+
export type AssistedPayload = {
|
|
149
|
+
contact?: Maybe<ActionContact>;
|
|
150
|
+
emailTemplate?: Maybe<AssistedEmailTemplate>;
|
|
151
|
+
instructions?: Maybe<Scalars['String']['output']>;
|
|
152
|
+
jurisdiction?: Maybe<Scalars['String']['output']>;
|
|
153
|
+
toAddress?: Maybe<Scalars['String']['output']>;
|
|
154
|
+
unsubscribeMailto?: Maybe<Scalars['String']['output']>;
|
|
155
|
+
unsubscribeUrl?: Maybe<Scalars['String']['output']>;
|
|
156
|
+
};
|
|
119
157
|
export type AuthCodeInput = {
|
|
120
158
|
authCode: Scalars['String']['input'];
|
|
121
159
|
redirectUri?: InputMaybe<Scalars['String']['input']>;
|
|
122
160
|
};
|
|
161
|
+
export type AvailableAction = {
|
|
162
|
+
additionalInfo?: Maybe<Scalars['String']['output']>;
|
|
163
|
+
description?: Maybe<Scalars['String']['output']>;
|
|
164
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
165
|
+
intent: ActionIntent;
|
|
166
|
+
origin: ActionOrigin;
|
|
167
|
+
title?: Maybe<Scalars['String']['output']>;
|
|
168
|
+
};
|
|
169
|
+
export type AvailableActionConnection = {
|
|
170
|
+
items: Array<AvailableAction>;
|
|
171
|
+
nextToken?: Maybe<Scalars['String']['output']>;
|
|
172
|
+
};
|
|
123
173
|
export type CapabilitySignals = {
|
|
124
174
|
sellsPersonalInformation: SignalValue;
|
|
125
175
|
supportsAccountCreation: SignalValue;
|
|
@@ -161,6 +211,7 @@ export type DataHolder = {
|
|
|
161
211
|
version: Scalars['Int']['output'];
|
|
162
212
|
virtualPresenceId: Scalars['ID']['output'];
|
|
163
213
|
};
|
|
214
|
+
export type DataHolderChangeType = 'METADATA_UPDATE' | 'NEW' | 'SIGNIFICANT_UPDATE' | '%future added value';
|
|
164
215
|
export type DataHolderConnection = {
|
|
165
216
|
items: Array<DataHolder>;
|
|
166
217
|
nextToken?: Maybe<Scalars['String']['output']>;
|
|
@@ -206,27 +257,49 @@ export type DataHoldersUpdate = {
|
|
|
206
257
|
items: Array<DataHolderUpdateItem>;
|
|
207
258
|
owner: Scalars['ID']['output'];
|
|
208
259
|
};
|
|
260
|
+
export type InitiateActionInput = {
|
|
261
|
+
dataHolderId: Scalars['ID']['input'];
|
|
262
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
263
|
+
intent: ActionIntent;
|
|
264
|
+
};
|
|
209
265
|
export type ListVirtualPresencesInput = {
|
|
210
266
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
211
267
|
nextToken?: InputMaybe<Scalars['String']['input']>;
|
|
212
268
|
};
|
|
213
269
|
export type Mutation = {
|
|
270
|
+
/**
|
|
271
|
+
* Confirm that an assisted or delegated action was completed, transitioning it
|
|
272
|
+
* from COMPLETED_UNVERIFIED to COMPLETED_VERIFIED.
|
|
273
|
+
*/
|
|
274
|
+
confirmActionOutcome: Action;
|
|
214
275
|
/** Connect a virtual presence. */
|
|
215
276
|
connectVirtualPresence: VirtualPresence;
|
|
216
277
|
/** Disconnect a virtual presence. */
|
|
217
278
|
disconnectVirtualPresence: VirtualPresence;
|
|
279
|
+
/**
|
|
280
|
+
* Initiate an action against a data holder relationship. Delegated actions are
|
|
281
|
+
* performed on the user's behalf; assisted actions return structured materials
|
|
282
|
+
* for the client to complete.
|
|
283
|
+
*/
|
|
284
|
+
initiateAction: Action;
|
|
218
285
|
/**
|
|
219
286
|
* Rescan an existing virtual presence for new data holders.
|
|
220
287
|
* Scans from the last scan date forward.
|
|
221
288
|
*/
|
|
222
289
|
rescanVirtualPresence: VirtualPresence;
|
|
223
290
|
};
|
|
291
|
+
export type MutationConfirmActionOutcomeArgs = {
|
|
292
|
+
id: Scalars['ID']['input'];
|
|
293
|
+
};
|
|
224
294
|
export type MutationConnectVirtualPresenceArgs = {
|
|
225
295
|
input?: InputMaybe<ConnectVirtualPresenceInput>;
|
|
226
296
|
};
|
|
227
297
|
export type MutationDisconnectVirtualPresenceArgs = {
|
|
228
298
|
id: Scalars['String']['input'];
|
|
229
299
|
};
|
|
300
|
+
export type MutationInitiateActionArgs = {
|
|
301
|
+
input: InitiateActionInput;
|
|
302
|
+
};
|
|
230
303
|
export type MutationRescanVirtualPresenceArgs = {
|
|
231
304
|
id: Scalars['String']['input'];
|
|
232
305
|
options?: InputMaybe<ScanOptionsInput>;
|
|
@@ -243,7 +316,7 @@ export type OrganizationAnalysis = {
|
|
|
243
316
|
version: Scalars['Int']['output'];
|
|
244
317
|
};
|
|
245
318
|
export type OrganizationAnalysisMode = 'ANALYZE' | 'FETCH' | '%future added value';
|
|
246
|
-
export type OrganizationCategory = 'Automotive' | 'Communications' | 'CommunityAndCharity' | 'Cryptocurrency' | 'Dating' | 'Education' | 'Employment' | 'EnergyAndUtilities' | 'Entertainment' | 'Finance' | 'FoodAndDining' | 'Gambling' | 'Government' | 'Health' | 'Insurance' | 'Military' | 'News' | 'Other' | 'PersonalEmail' | 'PrivacyAndSecurity' | 'RealEstate' | 'ShippingAndDelivery' | 'Shopping' | 'SocialMedia' | 'SportsAndFitness' | 'Technology' | 'Transportation' | 'Travel' | 'VideoGames' | '%future added value';
|
|
319
|
+
export type OrganizationCategory = 'AdTechAndMarketing' | 'Automotive' | 'Communications' | 'CommunityAndCharity' | 'Cryptocurrency' | 'DataBroker' | 'Dating' | 'Education' | 'Employment' | 'EnergyAndUtilities' | 'Entertainment' | 'Finance' | 'FoodAndDining' | 'Gambling' | 'Government' | 'Health' | 'Insurance' | 'Military' | 'News' | 'Other' | 'PersonalEmail' | 'PrivacyAndSecurity' | 'RealEstate' | 'ShippingAndDelivery' | 'Shopping' | 'SocialMedia' | 'SportsAndFitness' | 'Technology' | 'Transportation' | 'Travel' | 'VideoGames' | '%future added value';
|
|
247
320
|
export type OrganizationIdentity = {
|
|
248
321
|
brandName?: Maybe<Scalars['String']['output']>;
|
|
249
322
|
categories: Array<OrganizationCategory>;
|
|
@@ -283,6 +356,12 @@ export type Query = {
|
|
|
283
356
|
getProviderConfiguration: ProviderConfiguration;
|
|
284
357
|
/** List analysis results for a virtual presence. */
|
|
285
358
|
listAnalysisResults: AnalysisResultConnection;
|
|
359
|
+
/**
|
|
360
|
+
* List the actions currently available for a data holder relationship. Derived
|
|
361
|
+
* at query time by merging static, analysis, and discovery sources; not
|
|
362
|
+
* persisted. The owning virtual presence is derived from the data holder.
|
|
363
|
+
*/
|
|
364
|
+
listAvailableActions: AvailableActionConnection;
|
|
286
365
|
/** List scan summaries for a data holder (most recent first) */
|
|
287
366
|
listDataHolderScanSummaries: DataHolderScanSummaryConnection;
|
|
288
367
|
/** List data holders by virtual presence */
|
|
@@ -305,6 +384,9 @@ export type QueryListAnalysisResultsArgs = {
|
|
|
305
384
|
nextToken?: InputMaybe<Scalars['String']['input']>;
|
|
306
385
|
virtualPresenceId: Scalars['ID']['input'];
|
|
307
386
|
};
|
|
387
|
+
export type QueryListAvailableActionsArgs = {
|
|
388
|
+
dataHolderId: Scalars['ID']['input'];
|
|
389
|
+
};
|
|
308
390
|
export type QueryListDataHolderScanSummariesArgs = {
|
|
309
391
|
dataHolderId: Scalars['ID']['input'];
|
|
310
392
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -358,6 +440,12 @@ export type ScoreCoverage = {
|
|
|
358
440
|
export type ShareStyle = 'INFERENCE_SHARED' | 'NONE' | 'SHARED' | 'SHARED_WITH_CONSENT' | '%future added value';
|
|
359
441
|
export type SignalValue = 'NO' | 'UNKNOWN' | 'YES' | '%future added value';
|
|
360
442
|
export type Subscription = {
|
|
443
|
+
/**
|
|
444
|
+
* Subscribe to action status updates for the authenticated user.
|
|
445
|
+
* Emitted each time an action's status changes. Carries the scalar fields of the
|
|
446
|
+
* action; re-query the action to fetch the full assistedPayload.
|
|
447
|
+
*/
|
|
448
|
+
onActionStatusUpdate?: Maybe<Action>;
|
|
361
449
|
/**
|
|
362
450
|
* Subscribe to analysis result updates for the authenticated user.
|
|
363
451
|
* Emitted each time an analysis result is created or updated.
|
|
@@ -375,6 +463,9 @@ export type Subscription = {
|
|
|
375
463
|
*/
|
|
376
464
|
onVirtualPresenceUpdate?: Maybe<VirtualPresence>;
|
|
377
465
|
};
|
|
466
|
+
export type SubscriptionOnActionStatusUpdateArgs = {
|
|
467
|
+
owner: Scalars['ID']['input'];
|
|
468
|
+
};
|
|
378
469
|
export type SubscriptionOnAnalysisResultUpdateArgs = {
|
|
379
470
|
owner: Scalars['ID']['input'];
|
|
380
471
|
};
|
|
@@ -402,6 +493,45 @@ export type VirtualPresenceConnection = {
|
|
|
402
493
|
nextToken?: Maybe<Scalars['String']['output']>;
|
|
403
494
|
};
|
|
404
495
|
export type VirtualPresenceState = 'CONNECTED' | 'ERROR' | 'INACTIVE' | 'NEEDS_REAUTH' | 'SCANNING' | '%future added value';
|
|
496
|
+
export type ActionFieldsFragment = {
|
|
497
|
+
id: string;
|
|
498
|
+
virtualPresenceId: string;
|
|
499
|
+
dataHolderId?: string | null;
|
|
500
|
+
intent: ActionIntent;
|
|
501
|
+
additionalInfo?: string | null;
|
|
502
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
503
|
+
status: ActionStatus;
|
|
504
|
+
initiatedAtEpochMs?: number | null;
|
|
505
|
+
completedAtEpochMs?: number | null;
|
|
506
|
+
owner: string;
|
|
507
|
+
version: number;
|
|
508
|
+
createdAtEpochMs: number;
|
|
509
|
+
updatedAtEpochMs: number;
|
|
510
|
+
assistedPayload?: {
|
|
511
|
+
toAddress?: string | null;
|
|
512
|
+
unsubscribeUrl?: string | null;
|
|
513
|
+
unsubscribeMailto?: string | null;
|
|
514
|
+
jurisdiction?: string | null;
|
|
515
|
+
instructions?: string | null;
|
|
516
|
+
contact?: {
|
|
517
|
+
email?: string | null;
|
|
518
|
+
phone?: string | null;
|
|
519
|
+
address?: string | null;
|
|
520
|
+
} | null;
|
|
521
|
+
emailTemplate?: {
|
|
522
|
+
subject?: string | null;
|
|
523
|
+
body: string;
|
|
524
|
+
} | null;
|
|
525
|
+
} | null;
|
|
526
|
+
};
|
|
527
|
+
export type AvailableActionFieldsFragment = {
|
|
528
|
+
intent: ActionIntent;
|
|
529
|
+
additionalInfo?: string | null;
|
|
530
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
531
|
+
origin: ActionOrigin;
|
|
532
|
+
title?: string | null;
|
|
533
|
+
description?: string | null;
|
|
534
|
+
};
|
|
405
535
|
export type AnalysisResultDataFieldsFragment = {
|
|
406
536
|
attribution: Array<string>;
|
|
407
537
|
privacyScore?: {
|
|
@@ -695,6 +825,78 @@ export type RescanVirtualPresenceMutation = {
|
|
|
695
825
|
updatedAtEpochMs: number;
|
|
696
826
|
};
|
|
697
827
|
};
|
|
828
|
+
export type InitiateActionMutationVariables = Exact<{
|
|
829
|
+
input: InitiateActionInput;
|
|
830
|
+
}>;
|
|
831
|
+
export type InitiateActionMutation = {
|
|
832
|
+
initiateAction: {
|
|
833
|
+
id: string;
|
|
834
|
+
virtualPresenceId: string;
|
|
835
|
+
dataHolderId?: string | null;
|
|
836
|
+
intent: ActionIntent;
|
|
837
|
+
additionalInfo?: string | null;
|
|
838
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
839
|
+
status: ActionStatus;
|
|
840
|
+
initiatedAtEpochMs?: number | null;
|
|
841
|
+
completedAtEpochMs?: number | null;
|
|
842
|
+
owner: string;
|
|
843
|
+
version: number;
|
|
844
|
+
createdAtEpochMs: number;
|
|
845
|
+
updatedAtEpochMs: number;
|
|
846
|
+
assistedPayload?: {
|
|
847
|
+
toAddress?: string | null;
|
|
848
|
+
unsubscribeUrl?: string | null;
|
|
849
|
+
unsubscribeMailto?: string | null;
|
|
850
|
+
jurisdiction?: string | null;
|
|
851
|
+
instructions?: string | null;
|
|
852
|
+
contact?: {
|
|
853
|
+
email?: string | null;
|
|
854
|
+
phone?: string | null;
|
|
855
|
+
address?: string | null;
|
|
856
|
+
} | null;
|
|
857
|
+
emailTemplate?: {
|
|
858
|
+
subject?: string | null;
|
|
859
|
+
body: string;
|
|
860
|
+
} | null;
|
|
861
|
+
} | null;
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
export type ConfirmActionOutcomeMutationVariables = Exact<{
|
|
865
|
+
id: Scalars['ID']['input'];
|
|
866
|
+
}>;
|
|
867
|
+
export type ConfirmActionOutcomeMutation = {
|
|
868
|
+
confirmActionOutcome: {
|
|
869
|
+
id: string;
|
|
870
|
+
virtualPresenceId: string;
|
|
871
|
+
dataHolderId?: string | null;
|
|
872
|
+
intent: ActionIntent;
|
|
873
|
+
additionalInfo?: string | null;
|
|
874
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
875
|
+
status: ActionStatus;
|
|
876
|
+
initiatedAtEpochMs?: number | null;
|
|
877
|
+
completedAtEpochMs?: number | null;
|
|
878
|
+
owner: string;
|
|
879
|
+
version: number;
|
|
880
|
+
createdAtEpochMs: number;
|
|
881
|
+
updatedAtEpochMs: number;
|
|
882
|
+
assistedPayload?: {
|
|
883
|
+
toAddress?: string | null;
|
|
884
|
+
unsubscribeUrl?: string | null;
|
|
885
|
+
unsubscribeMailto?: string | null;
|
|
886
|
+
jurisdiction?: string | null;
|
|
887
|
+
instructions?: string | null;
|
|
888
|
+
contact?: {
|
|
889
|
+
email?: string | null;
|
|
890
|
+
phone?: string | null;
|
|
891
|
+
address?: string | null;
|
|
892
|
+
} | null;
|
|
893
|
+
emailTemplate?: {
|
|
894
|
+
subject?: string | null;
|
|
895
|
+
body: string;
|
|
896
|
+
} | null;
|
|
897
|
+
} | null;
|
|
898
|
+
};
|
|
899
|
+
};
|
|
698
900
|
export type GetProviderConfigurationQueryVariables = Exact<{
|
|
699
901
|
[key: string]: never;
|
|
700
902
|
}>;
|
|
@@ -1022,6 +1224,22 @@ export type ListDataHolderScanSummariesQuery = {
|
|
|
1022
1224
|
}>;
|
|
1023
1225
|
};
|
|
1024
1226
|
};
|
|
1227
|
+
export type ListAvailableActionsQueryVariables = Exact<{
|
|
1228
|
+
dataHolderId: Scalars['ID']['input'];
|
|
1229
|
+
}>;
|
|
1230
|
+
export type ListAvailableActionsQuery = {
|
|
1231
|
+
listAvailableActions: {
|
|
1232
|
+
nextToken?: string | null;
|
|
1233
|
+
items: Array<{
|
|
1234
|
+
intent: ActionIntent;
|
|
1235
|
+
additionalInfo?: string | null;
|
|
1236
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
1237
|
+
origin: ActionOrigin;
|
|
1238
|
+
title?: string | null;
|
|
1239
|
+
description?: string | null;
|
|
1240
|
+
}>;
|
|
1241
|
+
};
|
|
1242
|
+
};
|
|
1025
1243
|
export type OnVirtualPresenceUpdateSubscriptionVariables = Exact<{
|
|
1026
1244
|
owner: Scalars['ID']['input'];
|
|
1027
1245
|
}>;
|
|
@@ -1076,6 +1294,28 @@ export type OnAnalysisResultUpdateSubscription = {
|
|
|
1076
1294
|
updatedAtEpochMs: number;
|
|
1077
1295
|
} | null;
|
|
1078
1296
|
};
|
|
1297
|
+
export type OnActionStatusUpdateSubscriptionVariables = Exact<{
|
|
1298
|
+
owner: Scalars['ID']['input'];
|
|
1299
|
+
}>;
|
|
1300
|
+
export type OnActionStatusUpdateSubscription = {
|
|
1301
|
+
onActionStatusUpdate?: {
|
|
1302
|
+
id: string;
|
|
1303
|
+
virtualPresenceId: string;
|
|
1304
|
+
dataHolderId?: string | null;
|
|
1305
|
+
intent: ActionIntent;
|
|
1306
|
+
additionalInfo?: string | null;
|
|
1307
|
+
fulfilmentMethod: ActionFulfilmentMethod;
|
|
1308
|
+
status: ActionStatus;
|
|
1309
|
+
initiatedAtEpochMs?: number | null;
|
|
1310
|
+
completedAtEpochMs?: number | null;
|
|
1311
|
+
owner: string;
|
|
1312
|
+
version: number;
|
|
1313
|
+
createdAtEpochMs: number;
|
|
1314
|
+
updatedAtEpochMs: number;
|
|
1315
|
+
} | null;
|
|
1316
|
+
};
|
|
1317
|
+
export declare const ActionFieldsFragmentDoc: DocumentNode<ActionFieldsFragment, unknown>;
|
|
1318
|
+
export declare const AvailableActionFieldsFragmentDoc: DocumentNode<AvailableActionFieldsFragment, unknown>;
|
|
1079
1319
|
export declare const AnalysisResultDataFieldsFragmentDoc: DocumentNode<AnalysisResultDataFieldsFragment, unknown>;
|
|
1080
1320
|
export declare const AnalysisResultFieldsFragmentDoc: DocumentNode<AnalysisResultFieldsFragment, unknown>;
|
|
1081
1321
|
export declare const DataHolderFieldsFragmentDoc: DocumentNode<DataHolderFieldsFragment, unknown>;
|
|
@@ -1085,6 +1325,8 @@ export declare const VirtualPresenceFieldsFragmentDoc: DocumentNode<VirtualPrese
|
|
|
1085
1325
|
export declare const ConnectVirtualPresenceDocument: DocumentNode<ConnectVirtualPresenceMutation, ConnectVirtualPresenceMutationVariables>;
|
|
1086
1326
|
export declare const DisconnectVirtualPresenceDocument: DocumentNode<DisconnectVirtualPresenceMutation, DisconnectVirtualPresenceMutationVariables>;
|
|
1087
1327
|
export declare const RescanVirtualPresenceDocument: DocumentNode<RescanVirtualPresenceMutation, RescanVirtualPresenceMutationVariables>;
|
|
1328
|
+
export declare const InitiateActionDocument: DocumentNode<InitiateActionMutation, InitiateActionMutationVariables>;
|
|
1329
|
+
export declare const ConfirmActionOutcomeDocument: DocumentNode<ConfirmActionOutcomeMutation, ConfirmActionOutcomeMutationVariables>;
|
|
1088
1330
|
export declare const GetProviderConfigurationDocument: DocumentNode<GetProviderConfigurationQuery, GetProviderConfigurationQueryVariables>;
|
|
1089
1331
|
export declare const ListVirtualPresencesDocument: DocumentNode<ListVirtualPresencesQuery, ListVirtualPresencesQueryVariables>;
|
|
1090
1332
|
export declare const GetDataHolderDocument: DocumentNode<GetDataHolderQuery, GetDataHolderQueryVariables>;
|
|
@@ -1093,6 +1335,8 @@ export declare const GetAnalysisResultDocument: DocumentNode<GetAnalysisResultQu
|
|
|
1093
1335
|
export declare const GetOrganizationAnalysisDocument: DocumentNode<GetOrganizationAnalysisQuery, GetOrganizationAnalysisQueryVariables>;
|
|
1094
1336
|
export declare const ListAnalysisResultsDocument: DocumentNode<ListAnalysisResultsQuery, ListAnalysisResultsQueryVariables>;
|
|
1095
1337
|
export declare const ListDataHolderScanSummariesDocument: DocumentNode<ListDataHolderScanSummariesQuery, ListDataHolderScanSummariesQueryVariables>;
|
|
1338
|
+
export declare const ListAvailableActionsDocument: DocumentNode<ListAvailableActionsQuery, ListAvailableActionsQueryVariables>;
|
|
1096
1339
|
export declare const OnVirtualPresenceUpdateDocument: DocumentNode<OnVirtualPresenceUpdateSubscription, OnVirtualPresenceUpdateSubscriptionVariables>;
|
|
1097
1340
|
export declare const OnDataHoldersUpdateDocument: DocumentNode<OnDataHoldersUpdateSubscription, OnDataHoldersUpdateSubscriptionVariables>;
|
|
1098
1341
|
export declare const OnAnalysisResultUpdateDocument: DocumentNode<OnAnalysisResultUpdateSubscription, OnAnalysisResultUpdateSubscriptionVariables>;
|
|
1342
|
+
export declare const OnActionStatusUpdateDocument: DocumentNode<OnActionStatusUpdateSubscription, OnActionStatusUpdateSubscriptionVariables>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { OnActionStatusUpdateSubscription } from '../../../gen/graphqlTypes';
|
|
7
|
+
import { Action } from '../../../public/typings/action';
|
|
8
|
+
import { ActionSubscriber, ConnectionState } from '../../../public/typings/subscription';
|
|
9
|
+
import { BaseSubscriptionManager } from '../common/baseSubscriptionManager';
|
|
10
|
+
export type ActionSubscribable = OnActionStatusUpdateSubscription;
|
|
11
|
+
export declare class ActionSubscriptionManager<T extends ActionSubscribable, S extends ActionSubscriber> extends BaseSubscriptionManager<T, S> implements ActionSubscriber {
|
|
12
|
+
/**
|
|
13
|
+
* Notifies subscribers of an action status update.
|
|
14
|
+
*
|
|
15
|
+
* @param action The updated action.
|
|
16
|
+
*/
|
|
17
|
+
actionUpdated(action: Action): void;
|
|
18
|
+
connectionStatusChanged(state: ConnectionState): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionEntity } from '../../domain/entities/action/actionEntity';
|
|
7
|
+
import { ActionService, InitiateActionInput, ListAvailableActionsInput, ListAvailableActionsOutput, SubscribeToActionsInput } from '../../domain/entities/action/actionService';
|
|
8
|
+
import { ApiClient } from '../common/apiClient';
|
|
9
|
+
export declare class DefaultActionService implements ActionService {
|
|
10
|
+
private readonly appSync;
|
|
11
|
+
private readonly actionTransformer;
|
|
12
|
+
private readonly availableActionTransformer;
|
|
13
|
+
private readonly intentTransformer;
|
|
14
|
+
private readonly fulfilmentMethodTransformer;
|
|
15
|
+
private readonly subscriptionManager;
|
|
16
|
+
constructor(appSync: ApiClient);
|
|
17
|
+
initiate(input: InitiateActionInput): Promise<ActionEntity>;
|
|
18
|
+
confirmOutcome(id: string): Promise<ActionEntity>;
|
|
19
|
+
listAvailable(input: ListAvailableActionsInput): Promise<ListAvailableActionsOutput>;
|
|
20
|
+
subscribe(input: SubscribeToActionsInput): Promise<void>;
|
|
21
|
+
unsubscribe(subscriptionId: string): void;
|
|
22
|
+
private setupUpdateSubscription;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { ActionFulfilmentMethod as ActionFulfilmentMethodGraphQL } from '../../../../gen/graphqlTypes';
|
|
7
|
+
import { ActionFulfilmentMethod } from '../../../../public';
|
|
8
|
+
import { ActionFulfilmentMethodEntity } from '../../../domain/entities/action/actionEntity';
|
|
9
|
+
export declare class ActionFulfilmentMethodTransformer {
|
|
10
|
+
fromEntityToAPI(entity: ActionFulfilmentMethodEntity): ActionFulfilmentMethod;
|
|
11
|
+
fromAPIToEntity(data: ActionFulfilmentMethod): ActionFulfilmentMethodEntity;
|
|
12
|
+
fromGraphQLToEntity(data: ActionFulfilmentMethodGraphQL): ActionFulfilmentMethodEntity;
|
|
13
|
+
fromEntityToGraphQL(entity: ActionFulfilmentMethodEntity): ActionFulfilmentMethodGraphQL;
|
|
14
|
+
}
|