@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.
Files changed (86) hide show
  1. package/cjs/gen/graphqlTypes.js +356 -7
  2. package/cjs/private/data/action/defaultActionService.js +8 -0
  3. package/cjs/private/data/action/transformer/actionIntentTransformer.js +32 -0
  4. package/cjs/private/data/action/transformer/availableActionTransformer.js +8 -0
  5. package/cjs/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +2 -0
  6. package/cjs/private/data/common/apiClient.js +21 -0
  7. package/cjs/private/data/data-holder/transformer/dataHolderTransformer.js +8 -1
  8. package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
  9. package/cjs/private/domain/entities/action/actionEntity.js +14 -0
  10. package/cjs/private/domain/use-cases/action/listActionsForDataHolderUseCase.js +26 -0
  11. package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +4 -1
  12. package/cjs/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.js +25 -0
  13. package/cjs/public/defaultSudoPrivacyInteractionClient.js +24 -1
  14. package/cjs/public/typings/action.js +14 -0
  15. package/docs/assets/hierarchy.js +1 -1
  16. package/docs/assets/navigation.js +1 -1
  17. package/docs/assets/search.js +1 -1
  18. package/docs/classes/DefaultSudoPrivacyInteractionClient.html +77 -29
  19. package/docs/enums/ActionFulfilmentMethod.html +3 -3
  20. package/docs/enums/ActionIntent.html +31 -7
  21. package/docs/enums/ActionOrigin.html +5 -5
  22. package/docs/enums/ActionStatus.html +9 -9
  23. package/docs/enums/DataHolderProtectionState.html +6 -6
  24. package/docs/enums/OrganizationCategory.html +31 -31
  25. package/docs/enums/RelationshipProvider.html +3 -3
  26. package/docs/hierarchy.html +7 -6
  27. package/docs/interfaces/Action.html +15 -15
  28. package/docs/interfaces/ActionContact.html +4 -4
  29. package/docs/interfaces/AssistedEmailTemplate.html +3 -3
  30. package/docs/interfaces/AssistedPayload.html +8 -8
  31. package/docs/interfaces/AvailableAction.html +20 -9
  32. package/docs/interfaces/CapabilitySignals.html +20 -12
  33. package/docs/interfaces/ConnectVirtualPresenceWithRefreshTokenInput.html +36 -21
  34. package/docs/interfaces/DataHolder.html +62 -42
  35. package/docs/interfaces/DataHolderScanSummary.html +14 -14
  36. package/docs/interfaces/InitiateActionInput.html +4 -4
  37. package/docs/interfaces/ListActionsForDataHolderInput.html +85 -0
  38. package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
  39. package/docs/interfaces/ListAvailableActionsInput.html +14 -4
  40. package/docs/interfaces/ListDataHolderScanSummariesInput.html +1 -1
  41. package/docs/interfaces/ListDataHoldersInput.html +1 -1
  42. package/docs/interfaces/ListVirtualPresencesInput.html +2 -2
  43. package/docs/interfaces/OrganizationIdentity.html +5 -5
  44. package/docs/interfaces/Pagination.html +2 -1
  45. package/docs/interfaces/RescanVirtualPresenceInput.html +3 -3
  46. package/docs/interfaces/RiskIndicators.html +8 -8
  47. package/docs/interfaces/ScanOptions.html +6 -6
  48. package/docs/interfaces/SudoPrivacyInteractionClient.html +75 -29
  49. package/docs/modules.html +2 -2
  50. package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
  51. package/lib/gen/graphqlTypes.js +355 -6
  52. package/lib/private/data/action/defaultActionService.js +8 -0
  53. package/lib/private/data/action/transformer/actionIntentTransformer.js +32 -0
  54. package/lib/private/data/action/transformer/availableActionTransformer.js +8 -0
  55. package/lib/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +2 -0
  56. package/lib/private/data/common/apiClient.js +22 -1
  57. package/lib/private/data/data-holder/transformer/dataHolderTransformer.js +8 -1
  58. package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
  59. package/lib/private/domain/entities/action/actionEntity.js +14 -0
  60. package/lib/private/domain/use-cases/action/listActionsForDataHolderUseCase.js +22 -0
  61. package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +4 -1
  62. package/lib/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.js +21 -0
  63. package/lib/public/defaultSudoPrivacyInteractionClient.js +24 -1
  64. package/lib/public/typings/action.js +14 -0
  65. package/package.json +6 -1
  66. package/types/gen/graphqlTypes.d.ts +90 -8
  67. package/types/gen/schema-types.d.ts +41 -5
  68. package/types/private/data/action/defaultActionService.d.ts +2 -1
  69. package/types/private/data/action/transformer/availableActionTransformer.d.ts +1 -0
  70. package/types/private/data/common/apiClient.d.ts +8 -1
  71. package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +1 -0
  72. package/types/private/domain/entities/action/actionEntity.d.ts +18 -0
  73. package/types/private/domain/entities/action/actionService.d.ts +36 -0
  74. package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +2 -0
  75. package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +5 -1
  76. package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +13 -3
  77. package/types/private/domain/use-cases/action/listActionsForDataHolderUseCase.d.ts +16 -0
  78. package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.d.ts +2 -0
  79. package/types/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.d.ts +16 -0
  80. package/types/public/defaultSudoPrivacyInteractionClient.d.ts +3 -1
  81. package/types/public/inputs/action.d.ts +16 -0
  82. package/types/public/inputs/virtualPresence.d.ts +10 -1
  83. package/types/public/sudoPrivacyInteractionClient.d.ts +23 -1
  84. package/types/public/typings/action.d.ts +19 -0
  85. package/types/public/typings/analysisResult.d.ts +2 -0
  86. package/types/public/typings/dataHolder.d.ts +9 -1
@@ -7,6 +7,9 @@ import { DataHolderProtectionStateTransformer } from './dataHolderProtectionStat
7
7
  export class DataHolderTransformer {
8
8
  fromGraphQLToEntity(data) {
9
9
  const dataHolderProtectionStateTransformer = new DataHolderProtectionStateTransformer();
10
+ const mostRecentInboundContactAt = new Date(data.mostRecentInboundContactEpochMs ??
11
+ data.firstInboundContactEpochMs ??
12
+ data.createdAtEpochMs);
10
13
  return {
11
14
  id: data.id,
12
15
  virtualPresenceId: data.virtualPresenceId,
@@ -14,7 +17,9 @@ export class DataHolderTransformer {
14
17
  name: data.name,
15
18
  protectionState: dataHolderProtectionStateTransformer.fromGraphQLToEntity(data.protectionState),
16
19
  complianceConcern: data.complianceConcern,
17
- mostRecentInteractionAt: new Date(data.mostRecentInteractionEpochMs),
20
+ mostRecentInteractionAt: mostRecentInboundContactAt,
21
+ mostRecentInboundContactAt,
22
+ firstInboundContactAt: new Date(data.firstInboundContactEpochMs ?? data.createdAtEpochMs),
18
23
  owner: data.owner,
19
24
  version: data.version,
20
25
  createdAt: new Date(data.createdAtEpochMs),
@@ -31,6 +36,8 @@ export class DataHolderTransformer {
31
36
  protectionState: dataHolderProtectionStateTransformer.fromEntityToAPI(entity.protectionState),
32
37
  complianceConcern: entity.complianceConcern,
33
38
  mostRecentInteractionAt: entity.mostRecentInteractionAt,
39
+ mostRecentInboundContactAt: entity.mostRecentInboundContactAt,
40
+ firstInboundContactAt: entity.firstInboundContactAt,
34
41
  owner: entity.owner,
35
42
  version: entity.version,
36
43
  createdAt: entity.createdAt,
@@ -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
+ }
@@ -21,7 +21,10 @@ export class ConnectVirtualPresenceWithRefreshTokenUseCase {
21
21
  refreshToken: input.refreshToken,
22
22
  providerIdentity: input.providerIdentity,
23
23
  scopes: input.scopes,
24
- expiresInEpochMs: input.expiresInEpochMs,
24
+ expiresAtEpochMs: input.expiresAtEpochMs ??
25
+ (input.expiresInEpochMs !== undefined
26
+ ? Date.now() + input.expiresInEpochMs
27
+ : undefined),
25
28
  },
26
29
  relationshipProvider: input.relationshipProvider,
27
30
  });
@@ -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';
@@ -129,6 +131,7 @@ export class DefaultSudoPrivacyInteractionClient {
129
131
  refreshToken: input.refreshToken,
130
132
  providerIdentity: input.providerIdentity,
131
133
  scopes: input.scopes,
134
+ expiresAtEpochMs: input.expiresAtEpochMs,
132
135
  expiresInEpochMs: input.expiresInEpochMs,
133
136
  relationshipProvider: input.relationshipProvider
134
137
  ? this.relationshipProviderTransformer.fromAPIToEntity(input.relationshipProvider)
@@ -148,6 +151,12 @@ export class DefaultSudoPrivacyInteractionClient {
148
151
  const result = await useCase.execute(input);
149
152
  return this.virtualPresenceTransformer.fromEntityToAPI(result);
150
153
  }
154
+ async refreshVirtualPresenceState(id) {
155
+ this.log.debug(this.refreshVirtualPresenceState.name, { id });
156
+ const useCase = new RefreshVirtualPresenceStateUseCase(this.virtualPresenceService);
157
+ const result = await useCase.execute(id);
158
+ return this.virtualPresenceTransformer.fromEntityToAPI(result);
159
+ }
151
160
  async listVirtualPresences(input) {
152
161
  this.log.debug(this.listVirtualPresences.name, {
153
162
  input,
@@ -337,10 +346,24 @@ export class DefaultSudoPrivacyInteractionClient {
337
346
  async listAvailableActions(input) {
338
347
  this.log.debug(this.listAvailableActions.name, { input });
339
348
  const useCase = new ListAvailableActionsUseCase(this.actionService);
340
- const { availableActions, nextToken: resultNextToken } = await useCase.execute({ dataHolderId: input.dataHolderId });
349
+ const { availableActions, nextToken: resultNextToken } = await useCase.execute({
350
+ dataHolderId: input.dataHolderId,
351
+ includeCompleted: input.includeCompleted,
352
+ });
341
353
  const transformedAvailableActions = availableActions.map((availableAction) => this.availableActionTransformer.fromEntityToAPI(availableAction));
342
354
  return { items: transformedAvailableActions, nextToken: resultNextToken };
343
355
  }
356
+ async listActionsForDataHolder(input) {
357
+ this.log.debug(this.listActionsForDataHolder.name, { input });
358
+ const useCase = new ListActionsForDataHolderUseCase(this.actionService);
359
+ const { actions, nextToken: resultNextToken } = await useCase.execute({
360
+ dataHolderId: input.dataHolderId,
361
+ limit: input.limit,
362
+ nextToken: input.nextToken,
363
+ });
364
+ const transformedActions = actions.map((action) => this.actionTransformer.fromEntityToAPI(action));
365
+ return { items: transformedActions, nextToken: resultNextToken };
366
+ }
344
367
  async subscribeToActions(subscriptionId, subscriber) {
345
368
  this.log.debug(this.subscribeToActions.name, {
346
369
  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.4.0",
3
+ "version": "2.6.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' | 'USE_PASSKEY' | 'USE_STRONG_PASSWORD' | 'USE_TWO_FACTOR_AUTH' | '%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';
@@ -45,7 +45,7 @@ export type OrganizationAnalysisOptions = {
45
45
  export type OrganizationCategory = 'AdTechAndMarketing' | 'AdultEntertainment' | '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';
46
46
  export type ProviderType = 'EMAIL' | '%future added value';
47
47
  export type RefreshTokenInput = {
48
- expiresInEpochMs?: number | null | undefined;
48
+ expiresAtEpochMs?: number | null | undefined;
49
49
  providerIdentity: string;
50
50
  refreshToken: string;
51
51
  scopes?: Array<string> | null | undefined;
@@ -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>;
@@ -144,6 +145,7 @@ export type AnalysisResultDataFieldsFragment = {
144
145
  supportsOptOutOfSale: SignalValue;
145
146
  usesCookiesOrTracking: SignalValue;
146
147
  supportsTwoFactorAuth: SignalValue;
148
+ supportsPasskeys: SignalValue;
147
149
  };
148
150
  riskIndicators: {
149
151
  dataCollectionBreadth: number;
@@ -215,6 +217,7 @@ export type AnalysisResultFieldsFragment = {
215
217
  supportsOptOutOfSale: SignalValue;
216
218
  usesCookiesOrTracking: SignalValue;
217
219
  supportsTwoFactorAuth: SignalValue;
220
+ supportsPasskeys: SignalValue;
218
221
  };
219
222
  riskIndicators: {
220
223
  dataCollectionBreadth: number;
@@ -240,7 +243,8 @@ export type DataHolderFieldsFragment = {
240
243
  name: string;
241
244
  protectionState: DataHolderProtectionState;
242
245
  complianceConcern: boolean;
243
- mostRecentInteractionEpochMs: number;
246
+ mostRecentInboundContactEpochMs: number | null;
247
+ firstInboundContactEpochMs: number | null;
244
248
  owner: string;
245
249
  version: number;
246
250
  createdAtEpochMs: number;
@@ -314,6 +318,7 @@ export type OrganizationAnalysisFieldsFragment = {
314
318
  supportsOptOutOfSale: SignalValue;
315
319
  usesCookiesOrTracking: SignalValue;
316
320
  supportsTwoFactorAuth: SignalValue;
321
+ supportsPasskeys: SignalValue;
317
322
  };
318
323
  riskIndicators: {
319
324
  dataCollectionBreadth: number;
@@ -424,6 +429,30 @@ export type RescanVirtualPresenceMutation = {
424
429
  };
425
430
  };
426
431
  };
432
+ export type RefreshVirtualPresenceStateMutationVariables = Exact<{
433
+ id: string;
434
+ }>;
435
+ export type RefreshVirtualPresenceStateMutation = {
436
+ refreshVirtualPresenceState: {
437
+ id: string;
438
+ providerType: ProviderType;
439
+ identifier: string;
440
+ state: VirtualPresenceState;
441
+ lastScannedAtEpochMs: number;
442
+ lastScanFailureReason: string | null;
443
+ owner: string;
444
+ version: number;
445
+ createdAtEpochMs: number;
446
+ updatedAtEpochMs: number;
447
+ dataHolderCount: {
448
+ count: number;
449
+ monitored: number;
450
+ initiatedActions: number;
451
+ completedActions: number;
452
+ archived: number;
453
+ };
454
+ };
455
+ };
427
456
  export type InitiateActionMutationVariables = Exact<{
428
457
  input: InitiateActionInput;
429
458
  }>;
@@ -507,7 +536,8 @@ export type ArchiveDataHolderMutation = {
507
536
  name: string;
508
537
  protectionState: DataHolderProtectionState;
509
538
  complianceConcern: boolean;
510
- mostRecentInteractionEpochMs: number;
539
+ mostRecentInboundContactEpochMs: number | null;
540
+ firstInboundContactEpochMs: number | null;
511
541
  owner: string;
512
542
  version: number;
513
543
  createdAtEpochMs: number;
@@ -525,7 +555,8 @@ export type UnarchiveDataHolderMutation = {
525
555
  name: string;
526
556
  protectionState: DataHolderProtectionState;
527
557
  complianceConcern: boolean;
528
- mostRecentInteractionEpochMs: number;
558
+ mostRecentInboundContactEpochMs: number | null;
559
+ firstInboundContactEpochMs: number | null;
529
560
  owner: string;
530
561
  version: number;
531
562
  createdAtEpochMs: number;
@@ -578,7 +609,8 @@ export type GetDataHolderQuery = {
578
609
  name: string;
579
610
  protectionState: DataHolderProtectionState;
580
611
  complianceConcern: boolean;
581
- mostRecentInteractionEpochMs: number;
612
+ mostRecentInboundContactEpochMs: number | null;
613
+ firstInboundContactEpochMs: number | null;
582
614
  owner: string;
583
615
  version: number;
584
616
  createdAtEpochMs: number;
@@ -600,7 +632,8 @@ export type ListDataHoldersQuery = {
600
632
  name: string;
601
633
  protectionState: DataHolderProtectionState;
602
634
  complianceConcern: boolean;
603
- mostRecentInteractionEpochMs: number;
635
+ mostRecentInboundContactEpochMs: number | null;
636
+ firstInboundContactEpochMs: number | null;
604
637
  owner: string;
605
638
  version: number;
606
639
  createdAtEpochMs: number;
@@ -666,6 +699,7 @@ export type GetAnalysisResultQuery = {
666
699
  supportsOptOutOfSale: SignalValue;
667
700
  usesCookiesOrTracking: SignalValue;
668
701
  supportsTwoFactorAuth: SignalValue;
702
+ supportsPasskeys: SignalValue;
669
703
  };
670
704
  riskIndicators: {
671
705
  dataCollectionBreadth: number;
@@ -744,6 +778,7 @@ export type GetOrganizationAnalysisQuery = {
744
778
  supportsOptOutOfSale: SignalValue;
745
779
  usesCookiesOrTracking: SignalValue;
746
780
  supportsTwoFactorAuth: SignalValue;
781
+ supportsPasskeys: SignalValue;
747
782
  };
748
783
  riskIndicators: {
749
784
  dataCollectionBreadth: number;
@@ -825,6 +860,7 @@ export type ListAnalysisResultsQuery = {
825
860
  supportsOptOutOfSale: SignalValue;
826
861
  usesCookiesOrTracking: SignalValue;
827
862
  supportsTwoFactorAuth: SignalValue;
863
+ supportsPasskeys: SignalValue;
828
864
  };
829
865
  riskIndicators: {
830
866
  dataCollectionBreadth: number;
@@ -872,6 +908,7 @@ export type ListDataHolderScanSummariesQuery = {
872
908
  };
873
909
  export type ListAvailableActionsQueryVariables = Exact<{
874
910
  dataHolderId: string | number;
911
+ includeCompleted?: boolean | null | undefined;
875
912
  }>;
876
913
  export type ListAvailableActionsQuery = {
877
914
  listAvailableActions: {
@@ -883,6 +920,48 @@ export type ListAvailableActionsQuery = {
883
920
  origin: ActionOrigin;
884
921
  title: string | null;
885
922
  description: string | null;
923
+ status: ActionStatus | null;
924
+ }>;
925
+ };
926
+ };
927
+ export type ListActionsForDataHolderQueryVariables = Exact<{
928
+ dataHolderId: string | number;
929
+ limit?: number | null | undefined;
930
+ nextToken?: string | null | undefined;
931
+ }>;
932
+ export type ListActionsForDataHolderQuery = {
933
+ listActionsForDataHolder: {
934
+ nextToken: string | null;
935
+ items: Array<{
936
+ id: string;
937
+ virtualPresenceId: string;
938
+ dataHolderId: string | null;
939
+ intent: ActionIntent;
940
+ additionalInfo: string | null;
941
+ fulfilmentMethod: ActionFulfilmentMethod;
942
+ status: ActionStatus;
943
+ initiatedAtEpochMs: number | null;
944
+ completedAtEpochMs: number | null;
945
+ owner: string;
946
+ version: number;
947
+ createdAtEpochMs: number;
948
+ updatedAtEpochMs: number;
949
+ assistedPayload: {
950
+ toAddress: string | null;
951
+ unsubscribeUrl: string | null;
952
+ unsubscribeMailto: string | null;
953
+ jurisdiction: string | null;
954
+ instructions: string | null;
955
+ contact: {
956
+ email: string | null;
957
+ phone: string | null;
958
+ address: string | null;
959
+ } | null;
960
+ emailTemplate: {
961
+ subject: string | null;
962
+ body: string;
963
+ } | null;
964
+ } | null;
886
965
  }>;
887
966
  };
888
967
  };
@@ -959,7 +1038,8 @@ export type OnDataHoldersUpdateSubscription = {
959
1038
  name: string;
960
1039
  protectionState: DataHolderProtectionState;
961
1040
  complianceConcern: boolean;
962
- mostRecentInteractionEpochMs: number;
1041
+ mostRecentInboundContactEpochMs: number | null;
1042
+ firstInboundContactEpochMs: number | null;
963
1043
  owner: string;
964
1044
  version: number;
965
1045
  createdAtEpochMs: number;
@@ -1015,6 +1095,7 @@ export declare const VirtualPresenceFieldsFragmentDoc: DocumentNode<VirtualPrese
1015
1095
  export declare const ConnectVirtualPresenceDocument: DocumentNode<ConnectVirtualPresenceMutation, ConnectVirtualPresenceMutationVariables>;
1016
1096
  export declare const DisconnectVirtualPresenceDocument: DocumentNode<DisconnectVirtualPresenceMutation, DisconnectVirtualPresenceMutationVariables>;
1017
1097
  export declare const RescanVirtualPresenceDocument: DocumentNode<RescanVirtualPresenceMutation, RescanVirtualPresenceMutationVariables>;
1098
+ export declare const RefreshVirtualPresenceStateDocument: DocumentNode<RefreshVirtualPresenceStateMutation, RefreshVirtualPresenceStateMutationVariables>;
1018
1099
  export declare const InitiateActionDocument: DocumentNode<InitiateActionMutation, InitiateActionMutationVariables>;
1019
1100
  export declare const ConfirmActionOutcomeDocument: DocumentNode<ConfirmActionOutcomeMutation, ConfirmActionOutcomeMutationVariables>;
1020
1101
  export declare const ArchiveDataHolderDocument: DocumentNode<ArchiveDataHolderMutation, ArchiveDataHolderMutationVariables>;
@@ -1028,6 +1109,7 @@ export declare const GetOrganizationAnalysisDocument: DocumentNode<GetOrganizati
1028
1109
  export declare const ListAnalysisResultsDocument: DocumentNode<ListAnalysisResultsQuery, ListAnalysisResultsQueryVariables>;
1029
1110
  export declare const ListDataHolderScanSummariesDocument: DocumentNode<ListDataHolderScanSummariesQuery, ListDataHolderScanSummariesQueryVariables>;
1030
1111
  export declare const ListAvailableActionsDocument: DocumentNode<ListAvailableActionsQuery, ListAvailableActionsQueryVariables>;
1112
+ export declare const ListActionsForDataHolderDocument: DocumentNode<ListActionsForDataHolderQuery, ListActionsForDataHolderQueryVariables>;
1031
1113
  export declare const GetActionDocument: DocumentNode<GetActionQuery, GetActionQueryVariables>;
1032
1114
  export declare const OnVirtualPresenceUpdateDocument: DocumentNode<OnVirtualPresenceUpdateSubscription, OnVirtualPresenceUpdateSubscriptionVariables>;
1033
1115
  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' | 'USE_PASSKEY' | 'USE_STRONG_PASSWORD' | 'USE_TWO_FACTOR_AUTH' | '%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 = {
@@ -159,6 +164,7 @@ export type CapabilitySignals = {
159
164
  supportsDataDeletionRequests: SignalValue;
160
165
  supportsDataExport: SignalValue;
161
166
  supportsOptOutOfSale: SignalValue;
167
+ supportsPasskeys: SignalValue;
162
168
  supportsSubscriptions: SignalValue;
163
169
  supportsTwoFactorAuth: SignalValue;
164
170
  usesCookiesOrTracking: SignalValue;
@@ -185,8 +191,9 @@ export type DataHolder = {
185
191
  complianceConcern: Scalars['Boolean']['output'];
186
192
  createdAtEpochMs: Scalars['Float']['output'];
187
193
  domainName: Scalars['String']['output'];
194
+ firstInboundContactEpochMs?: Maybe<Scalars['Float']['output']>;
188
195
  id: Scalars['ID']['output'];
189
- mostRecentInteractionEpochMs: Scalars['Float']['output'];
196
+ mostRecentInboundContactEpochMs?: Maybe<Scalars['Float']['output']>;
190
197
  name: Scalars['String']['output'];
191
198
  owner: Scalars['ID']['output'];
192
199
  protectionState: DataHolderProtectionState;
@@ -194,7 +201,6 @@ export type DataHolder = {
194
201
  version: Scalars['Int']['output'];
195
202
  virtualPresenceId: Scalars['ID']['output'];
196
203
  };
197
- export type DataHolderChangeType = 'METADATA_UPDATE' | 'NEW' | 'SIGNIFICANT_UPDATE' | '%future added value';
198
204
  export type DataHolderConnection = {
199
205
  items: Array<DataHolder>;
200
206
  nextToken?: Maybe<Scalars['String']['output']>;
@@ -230,8 +236,9 @@ export type DataHolderUpdateItem = {
230
236
  complianceConcern: Scalars['Boolean']['output'];
231
237
  createdAtEpochMs: Scalars['Float']['output'];
232
238
  domainName: Scalars['String']['output'];
239
+ firstInboundContactEpochMs?: Maybe<Scalars['Float']['output']>;
233
240
  id: Scalars['ID']['output'];
234
- mostRecentInteractionEpochMs: Scalars['Float']['output'];
241
+ mostRecentInboundContactEpochMs?: Maybe<Scalars['Float']['output']>;
235
242
  name: Scalars['String']['output'];
236
243
  owner: Scalars['ID']['output'];
237
244
  protectionState: DataHolderProtectionState;
@@ -274,6 +281,14 @@ export type Mutation = {
274
281
  * for the client to complete.
275
282
  */
276
283
  initiateAction: Action;
284
+ /**
285
+ * Validate a virtual presence's provider grant on demand and return its
286
+ * reconciled state. If the provider confirms the grant has been revoked (e.g.
287
+ * the user removed access in their provider account), the presence transitions
288
+ * to NEEDS_REAUTH; otherwise its state is returned unchanged. Use before gating
289
+ * access on a current CONNECTED state.
290
+ */
291
+ refreshVirtualPresenceState: VirtualPresence;
277
292
  /**
278
293
  * Rescan an existing virtual presence for new data holders.
279
294
  * Scans from the last scan date forward.
@@ -301,6 +316,9 @@ export type MutationDisconnectVirtualPresenceArgs = {
301
316
  export type MutationInitiateActionArgs = {
302
317
  input: InitiateActionInput;
303
318
  };
319
+ export type MutationRefreshVirtualPresenceStateArgs = {
320
+ id: Scalars['String']['input'];
321
+ };
304
322
  export type MutationRescanVirtualPresenceArgs = {
305
323
  id: Scalars['String']['input'];
306
324
  options?: InputMaybe<ScanOptionsInput>;
@@ -379,12 +397,24 @@ export type Query = {
379
397
  * the provider OAuth flow.
380
398
  */
381
399
  getProviderConfiguration: ProviderConfiguration;
400
+ /**
401
+ * List the persisted action history for a data holder. Returns every action
402
+ * that has been initiated against the data holder (all intents, all statuses,
403
+ * every attempt), ordered newest-first. This is the executed-action history,
404
+ * distinct from listAvailableActions, which returns the derived set of actions
405
+ * a user could take.
406
+ */
407
+ listActionsForDataHolder: ActionConnection;
382
408
  /** List analysis results for a virtual presence. */
383
409
  listAnalysisResults: AnalysisResultConnection;
384
410
  /**
385
411
  * List the actions currently available for a data holder relationship. Derived
386
412
  * at query time by merging static, analysis, and discovery sources; not
387
413
  * persisted. The owning virtual presence is derived from the data holder.
414
+ *
415
+ * Each returned action carries its latest status for the data holder (null when
416
+ * never initiated). By default actions the user has already completed are
417
+ * omitted; pass includeCompleted: true to return them as well.
388
418
  */
389
419
  listAvailableActions: AvailableActionConnection;
390
420
  /** List scan summaries for a data holder (most recent first) */
@@ -408,6 +438,11 @@ export type QueryGetOrganizationAnalysisArgs = {
408
438
  name?: InputMaybe<Scalars['String']['input']>;
409
439
  options?: InputMaybe<OrganizationAnalysisOptions>;
410
440
  };
441
+ export type QueryListActionsForDataHolderArgs = {
442
+ dataHolderId: Scalars['ID']['input'];
443
+ limit?: InputMaybe<Scalars['Int']['input']>;
444
+ nextToken?: InputMaybe<Scalars['String']['input']>;
445
+ };
411
446
  export type QueryListAnalysisResultsArgs = {
412
447
  limit?: InputMaybe<Scalars['Int']['input']>;
413
448
  nextToken?: InputMaybe<Scalars['String']['input']>;
@@ -415,6 +450,7 @@ export type QueryListAnalysisResultsArgs = {
415
450
  };
416
451
  export type QueryListAvailableActionsArgs = {
417
452
  dataHolderId: Scalars['ID']['input'];
453
+ includeCompleted?: InputMaybe<Scalars['Boolean']['input']>;
418
454
  };
419
455
  export type QueryListDataHolderScanSummariesArgs = {
420
456
  dataHolderId: Scalars['ID']['input'];
@@ -430,7 +466,7 @@ export type QueryListVirtualPresencesArgs = {
430
466
  input?: InputMaybe<ListVirtualPresencesInput>;
431
467
  };
432
468
  export type RefreshTokenInput = {
433
- expiresInEpochMs?: InputMaybe<Scalars['Float']['input']>;
469
+ expiresAtEpochMs?: InputMaybe<Scalars['Float']['input']>;
434
470
  providerIdentity: Scalars['String']['input'];
435
471
  refreshToken: Scalars['String']['input'];
436
472
  scopes?: InputMaybe<Array<Scalars['String']['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
  }