@sudoplatform/sudo-privacy-interaction 1.0.0 → 2.0.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 (91) hide show
  1. package/cjs/gen/graphqlTypes.js +44 -4
  2. package/cjs/private/data/analysis-result/transformer/analysisResultDataTransformer.js +2 -0
  3. package/cjs/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +2 -0
  4. package/cjs/private/data/analysis-result/transformer/categorySignalsTransformer.js +2 -2
  5. package/cjs/private/data/common/apiClient.js +8 -0
  6. package/cjs/private/data/provider-configuration/defaultProviderConfigurationService.js +23 -0
  7. package/cjs/private/data/provider-configuration/transformer/providerConfigurationTransformer.js +52 -0
  8. package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +11 -1
  9. package/cjs/private/data/virtual-presence/transformer/relationshipProviderTransformer.js +29 -0
  10. package/cjs/private/domain/entities/configuration/providerConfigurationEntity.js +7 -0
  11. package/cjs/private/domain/entities/configuration/providerConfigurationService.js +7 -0
  12. package/cjs/private/domain/entities/inputs/relationshipProviderEntity.js +21 -0
  13. package/cjs/private/domain/use-cases/configuration/getProviderConfigurationUseCase.js +25 -0
  14. package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +6 -2
  15. package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +7 -1
  16. package/cjs/public/defaultSudoPrivacyInteractionClient.js +34 -3
  17. package/cjs/public/inputs/virtualPresence.js +14 -0
  18. package/cjs/public/typings/index.js +1 -0
  19. package/cjs/public/typings/providerConfiguration.js +7 -0
  20. package/docs/assets/hierarchy.js +1 -1
  21. package/docs/assets/navigation.js +1 -1
  22. package/docs/assets/search.js +1 -1
  23. package/docs/classes/DefaultSudoPrivacyInteractionClient.html +36 -21
  24. package/docs/enums/DataCategory.html +18 -18
  25. package/docs/enums/OrganizationCategory.html +30 -30
  26. package/docs/enums/RelationshipProvider.html +63 -0
  27. package/docs/enums/RetentionStyle.html +5 -5
  28. package/docs/enums/ShareStyle.html +6 -6
  29. package/docs/enums/SignalValue.html +4 -4
  30. package/docs/hierarchy.html +5 -5
  31. package/docs/interfaces/AnalysisResultData.html +18 -10
  32. package/docs/interfaces/CapabilitySignals.html +18 -10
  33. package/docs/interfaces/CategorySignals.html +20 -20
  34. package/docs/interfaces/ConnectVirtualPresenceWithAuthCodeInput.html +79 -0
  35. package/docs/interfaces/ConnectVirtualPresenceWithRefreshTokenInput.html +16 -7
  36. package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
  37. package/docs/interfaces/ListDataHoldersInput.html +1 -1
  38. package/docs/interfaces/ListVirtualPresencesInput.html +2 -2
  39. package/docs/interfaces/OrganizationIdentity.html +5 -5
  40. package/docs/interfaces/Pagination.html +1 -1
  41. package/docs/interfaces/PrivacyScore.html +3 -3
  42. package/docs/interfaces/PrivacySummary.html +4 -4
  43. package/docs/interfaces/ProviderConfiguration.html +80 -0
  44. package/docs/interfaces/RescanVirtualPresenceInput.html +3 -3
  45. package/docs/interfaces/RetentionInfo.html +4 -4
  46. package/docs/interfaces/RiskIndicators.html +8 -8
  47. package/docs/interfaces/ScanOptions.html +6 -6
  48. package/docs/interfaces/ScoreContribution.html +3 -3
  49. package/docs/interfaces/SudoPrivacyInteractionClient.html +35 -21
  50. package/docs/modules.html +4 -4
  51. package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
  52. package/lib/gen/graphqlTypes.js +43 -3
  53. package/lib/private/data/analysis-result/transformer/analysisResultDataTransformer.js +2 -0
  54. package/lib/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +2 -0
  55. package/lib/private/data/analysis-result/transformer/categorySignalsTransformer.js +2 -2
  56. package/lib/private/data/common/apiClient.js +9 -1
  57. package/lib/private/data/provider-configuration/defaultProviderConfigurationService.js +19 -0
  58. package/lib/private/data/provider-configuration/transformer/providerConfigurationTransformer.js +48 -0
  59. package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +11 -1
  60. package/lib/private/data/virtual-presence/transformer/relationshipProviderTransformer.js +25 -0
  61. package/lib/private/domain/entities/configuration/providerConfigurationEntity.js +6 -0
  62. package/lib/private/domain/entities/configuration/providerConfigurationService.js +6 -0
  63. package/lib/private/domain/entities/inputs/relationshipProviderEntity.js +18 -0
  64. package/lib/private/domain/use-cases/configuration/getProviderConfigurationUseCase.js +21 -0
  65. package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +6 -2
  66. package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +7 -1
  67. package/lib/public/defaultSudoPrivacyInteractionClient.js +34 -3
  68. package/lib/public/inputs/virtualPresence.js +13 -1
  69. package/lib/public/typings/index.js +1 -0
  70. package/lib/public/typings/providerConfiguration.js +6 -0
  71. package/package.json +6 -4
  72. package/types/gen/graphqlTypes.d.ts +37 -5
  73. package/types/private/data/common/apiClient.d.ts +2 -1
  74. package/types/private/data/provider-configuration/defaultProviderConfigurationService.d.ts +14 -0
  75. package/types/private/data/provider-configuration/transformer/providerConfigurationTransformer.d.ts +19 -0
  76. package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +1 -0
  77. package/types/private/data/virtual-presence/transformer/relationshipProviderTransformer.d.ts +12 -0
  78. package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +6 -2
  79. package/types/private/domain/entities/configuration/providerConfigurationEntity.d.ts +23 -0
  80. package/types/private/domain/entities/configuration/providerConfigurationService.d.ts +21 -0
  81. package/types/private/domain/entities/inputs/relationshipProviderEntity.d.ts +17 -0
  82. package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +17 -2
  83. package/types/private/domain/use-cases/configuration/getProviderConfigurationUseCase.d.ts +16 -0
  84. package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.d.ts +13 -1
  85. package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.d.ts +2 -0
  86. package/types/public/defaultSudoPrivacyInteractionClient.d.ts +7 -3
  87. package/types/public/inputs/virtualPresence.d.ts +30 -0
  88. package/types/public/sudoPrivacyInteractionClient.d.ts +11 -4
  89. package/types/public/typings/analysisResult.d.ts +6 -2
  90. package/types/public/typings/index.d.ts +1 -0
  91. package/types/public/typings/providerConfiguration.d.ts +23 -0
@@ -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 retrieving the provider configuration.
9
+ */
10
+ export class GetProviderConfigurationUseCase {
11
+ providerConfigurationService;
12
+ log;
13
+ constructor(providerConfigurationService) {
14
+ this.providerConfigurationService = providerConfigurationService;
15
+ this.log = new DefaultLogger(this.constructor.name);
16
+ }
17
+ async execute() {
18
+ this.log.debug(this.constructor.name);
19
+ return await this.providerConfigurationService.get();
20
+ }
21
+ }
@@ -14,10 +14,14 @@ export class ConnectVirtualPresenceWithAuthCodeUseCase {
14
14
  this.virtualPresenceService = virtualPresenceService;
15
15
  this.log = new DefaultLogger(this.constructor.name);
16
16
  }
17
- async execute(authCode) {
17
+ async execute(input) {
18
18
  this.log.debug(this.constructor.name);
19
19
  return await this.virtualPresenceService.connect({
20
- authCode,
20
+ authCode: {
21
+ authCode: input.authCode,
22
+ redirectUri: input.redirectUri,
23
+ },
24
+ relationshipProvider: input.relationshipProvider,
21
25
  });
22
26
  }
23
27
  }
@@ -17,7 +17,13 @@ export class ConnectVirtualPresenceWithRefreshTokenUseCase {
17
17
  async execute(input) {
18
18
  this.log.debug(this.constructor.name);
19
19
  return await this.virtualPresenceService.connect({
20
- refreshToken: input,
20
+ refreshToken: {
21
+ refreshToken: input.refreshToken,
22
+ providerIdentity: input.providerIdentity,
23
+ scopes: input.scopes,
24
+ expiresInEpochMs: input.expiresInEpochMs,
25
+ },
26
+ relationshipProvider: input.relationshipProvider,
21
27
  });
22
28
  }
23
29
  }
@@ -9,12 +9,16 @@ import { AnalysisResultTransformer } from '../private/data/analysis-result/trans
9
9
  import { ApiClient } from '../private/data/common/apiClient';
10
10
  import { DefaultDataHolderService } from '../private/data/data-holder/defaultDataHolderService';
11
11
  import { DataHolderTransformer } from '../private/data/data-holder/transformer/dataHolderTransformer';
12
+ import { DefaultProviderConfigurationService } from '../private/data/provider-configuration/defaultProviderConfigurationService';
13
+ import { ProviderConfigurationTransformer } from '../private/data/provider-configuration/transformer/providerConfigurationTransformer';
12
14
  import { DefaultVirtualPresenceService } from '../private/data/virtual-presence/defaultVirtualPresenceService';
15
+ import { RelationshipProviderTransformer } from '../private/data/virtual-presence/transformer/relationshipProviderTransformer';
13
16
  import { VirtualPresenceTransformer } from '../private/data/virtual-presence/transformer/virtualPresenceTransformer';
14
17
  import { GetAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/getAnalysisResultUseCase';
15
18
  import { ListAnalysisResultsUseCase } from '../private/domain/use-cases/analysis-result/listAnalysisResultsUseCase';
16
19
  import { SubscribeToAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase';
17
20
  import { UnsubscribeFromAnalysisResultUseCase } from '../private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase';
21
+ import { GetProviderConfigurationUseCase } from '../private/domain/use-cases/configuration/getProviderConfigurationUseCase';
18
22
  import { GetDataHolderUseCase } from '../private/domain/use-cases/data-holder/getDataHolderUseCase';
19
23
  import { ListDataHoldersUseCase } from '../private/domain/use-cases/data-holder/listDataHoldersUseCase';
20
24
  import { SubscribeToDataHoldersUseCase } from '../private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase';
@@ -29,10 +33,13 @@ import { UnsubscribeFromVirtualPresenceUseCase } from '../private/domain/use-cas
29
33
  export class DefaultSudoPrivacyInteractionClient {
30
34
  apiClient;
31
35
  userClient;
36
+ providerConfigurationService;
32
37
  virtualPresenceService;
33
38
  dataHolderService;
34
39
  analysisResultService;
40
+ providerConfigurationTransformer;
35
41
  virtualPresenceTransformer;
42
+ relationshipProviderTransformer;
36
43
  dataHolderTransformer;
37
44
  analysisResultTransformer;
38
45
  log;
@@ -41,23 +48,47 @@ export class DefaultSudoPrivacyInteractionClient {
41
48
  const privateOptions = opts;
42
49
  this.apiClient = privateOptions.apiClient ?? new ApiClient();
43
50
  this.userClient = opts.sudoUserClient;
51
+ this.providerConfigurationService = new DefaultProviderConfigurationService(this.apiClient);
44
52
  this.virtualPresenceService = new DefaultVirtualPresenceService(this.apiClient);
45
53
  this.dataHolderService = new DefaultDataHolderService(this.apiClient);
46
54
  this.analysisResultService = new DefaultAnalysisResultService(this.apiClient);
55
+ this.providerConfigurationTransformer =
56
+ new ProviderConfigurationTransformer();
47
57
  this.virtualPresenceTransformer = new VirtualPresenceTransformer();
58
+ this.relationshipProviderTransformer = new RelationshipProviderTransformer();
48
59
  this.dataHolderTransformer = new DataHolderTransformer();
49
60
  this.analysisResultTransformer = new AnalysisResultTransformer();
50
61
  }
51
- async connectVirtualPresenceWithAuthCode(authCode) {
62
+ async getProviderConfiguration() {
63
+ this.log.debug(this.getProviderConfiguration.name);
64
+ const useCase = new GetProviderConfigurationUseCase(this.providerConfigurationService);
65
+ const result = await useCase.execute();
66
+ return result.map((entity) => this.providerConfigurationTransformer.fromEntityToAPI(entity));
67
+ }
68
+ async connectVirtualPresenceWithAuthCode(input) {
52
69
  this.log.debug(this.connectVirtualPresenceWithAuthCode.name);
53
70
  const useCase = new ConnectVirtualPresenceWithAuthCodeUseCase(this.virtualPresenceService);
54
- const result = await useCase.execute(authCode);
71
+ const result = await useCase.execute({
72
+ authCode: input.authCode,
73
+ redirectUri: input.redirectUri,
74
+ relationshipProvider: input.relationshipProvider
75
+ ? this.relationshipProviderTransformer.fromAPIToEntity(input.relationshipProvider)
76
+ : undefined,
77
+ });
55
78
  return this.virtualPresenceTransformer.fromEntityToAPI(result);
56
79
  }
57
80
  async connectVirtualPresenceWithRefreshToken(input) {
58
81
  this.log.debug(this.connectVirtualPresenceWithRefreshToken.name);
59
82
  const useCase = new ConnectVirtualPresenceWithRefreshTokenUseCase(this.virtualPresenceService);
60
- const result = await useCase.execute(input);
83
+ const result = await useCase.execute({
84
+ refreshToken: input.refreshToken,
85
+ providerIdentity: input.providerIdentity,
86
+ scopes: input.scopes,
87
+ expiresInEpochMs: input.expiresInEpochMs,
88
+ relationshipProvider: input.relationshipProvider
89
+ ? this.relationshipProviderTransformer.fromAPIToEntity(input.relationshipProvider)
90
+ : undefined,
91
+ });
61
92
  return this.virtualPresenceTransformer.fromEntityToAPI(result);
62
93
  }
63
94
  async disconnectVirtualPresence(id) {
@@ -3,4 +3,16 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- export {};
6
+ /**
7
+ * Enumeration of the relationship providers that back a virtual presence connection.
8
+ *
9
+ * @property GMAIL_PROVIDER The Gmail relationship provider.
10
+ * @property TEST_PROVIDER The test relationship provider.
11
+ *
12
+ * @enum
13
+ */
14
+ export var RelationshipProvider;
15
+ (function (RelationshipProvider) {
16
+ RelationshipProvider["GmailProvider"] = "GMAIL_PROVIDER";
17
+ RelationshipProvider["TestProvider"] = "TEST_PROVIDER";
18
+ })(RelationshipProvider || (RelationshipProvider = {}));
@@ -5,5 +5,6 @@
5
5
  */
6
6
  export * from './analysisResult';
7
7
  export * from './dataHolder';
8
+ export * from './providerConfiguration';
8
9
  export * from './subscription';
9
10
  export * from './virtualPresence';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudoplatform/sudo-privacy-interaction",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "author": "Anonyome Labs, Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -67,7 +67,9 @@
67
67
  "tar": "^7.5.21",
68
68
  "postcss": "^8.5.23",
69
69
  "uuid": "^11.1.1",
70
- "js-yaml": "^4.3.1"
70
+ "js-yaml": "^4.3.2",
71
+ "vitest": "^4.1.11",
72
+ "@vitest/mocker": "^4.1.11"
71
73
  },
72
74
  "devDependencies": {
73
75
  "@graphql-codegen/add": "^6.0.0",
@@ -84,7 +86,7 @@
84
86
  "@types/uuid": "^10.0.0",
85
87
  "@typescript-eslint/eslint-plugin": "^8.26.1",
86
88
  "@typescript-eslint/parser": "^8.26.1",
87
- "@vitest/coverage-v8": "^4.1.1",
89
+ "@vitest/coverage-v8": "^4.1.11",
88
90
  "concurrently": "^9.2.1",
89
91
  "dotenv": "^17.4.2",
90
92
  "eslint": "^8.57.1",
@@ -101,7 +103,7 @@
101
103
  "typedoc": "^0.28.11",
102
104
  "typescript": "^5.9.2",
103
105
  "uuid": "^11.1.0",
104
- "vitest": "^4.1.1",
106
+ "vitest": "^4.1.11",
105
107
  "wait-for-expect": "^4.0.0"
106
108
  },
107
109
  "packageManager": "yarn@4.9.2+sha256.ca4310f8ba997b4643a000ce512d9772e01c1485df35511114b325315960acb7",
@@ -96,6 +96,7 @@ export type AnalysisResultConnection = {
96
96
  nextToken?: Maybe<Scalars['String']['output']>;
97
97
  };
98
98
  export type AnalysisResultData = {
99
+ attribution: Array<Scalars['String']['output']>;
99
100
  capabilities: CapabilitySignals;
100
101
  categories: Array<CategorySignals>;
101
102
  organizationIdentity?: Maybe<OrganizationIdentity>;
@@ -115,6 +116,10 @@ export type AnalysisResultUpdate = {
115
116
  version: Scalars['Int']['output'];
116
117
  virtualPresenceId: Scalars['ID']['output'];
117
118
  };
119
+ export type AuthCodeInput = {
120
+ authCode: Scalars['String']['input'];
121
+ redirectUri?: InputMaybe<Scalars['String']['input']>;
122
+ };
118
123
  export type CapabilitySignals = {
119
124
  sellsPersonalInformation: SignalValue;
120
125
  supportsAccountCreation: SignalValue;
@@ -122,23 +127,25 @@ export type CapabilitySignals = {
122
127
  supportsDataDeletionRequests: SignalValue;
123
128
  supportsDataExport: SignalValue;
124
129
  supportsSubscriptions: SignalValue;
130
+ supportsTwoFactorAuth: SignalValue;
125
131
  usesCookiesOrTracking: SignalValue;
126
132
  };
127
133
  export type CategorySignals = {
128
134
  category: DataCategory;
129
135
  collected: SignalValue;
130
136
  dataLabels: Array<Scalars['String']['output']>;
137
+ monetized: SignalValue;
131
138
  requiredForLaw?: Maybe<SignalValue>;
132
139
  requiredForService?: Maybe<SignalValue>;
133
140
  retained: SignalValue;
134
141
  retention?: Maybe<RetentionInfo>;
135
142
  sharedWithThirdParties: ShareStyle;
136
- usedForAdvertising: SignalValue;
137
143
  userCanOptOut: SignalValue;
138
144
  };
139
145
  export type ConnectVirtualPresenceInput = {
140
- authCode?: InputMaybe<Scalars['String']['input']>;
146
+ authCode?: InputMaybe<AuthCodeInput>;
141
147
  refreshToken?: InputMaybe<RefreshTokenInput>;
148
+ relationshipProvider?: InputMaybe<RelationshipProvider>;
142
149
  };
143
150
  export type DataCategory = 'ACCOUNT_PROFILE' | 'AUTHENTICATION' | 'BACKGROUND' | 'BIOMETRIC' | 'COMMUNICATION' | 'CONTACTS' | 'DEMOGRAPHIC' | 'DEVICE_IDENTIFIER' | 'FINANCIAL' | 'GOVERNMENT_ISSUED' | 'HEALTH' | 'INFERENCES' | 'LOCATION' | 'OTHER' | 'PII' | 'THIRD_PARTY_DATA' | 'USAGE' | '%future added value';
144
151
  export type DataHolder = {
@@ -221,12 +228,20 @@ export type PrivacySummary = {
221
228
  sourceLastUpdated?: Maybe<Scalars['String']['output']>;
222
229
  sourceUrl: Scalars['String']['output'];
223
230
  };
231
+ export type ProviderConfiguration = {
232
+ data: Scalars['ID']['output'];
233
+ };
224
234
  export type ProviderType = 'EMAIL' | '%future added value';
225
235
  export type Query = {
226
236
  /** Get a full analysis result by ID, including typed data. */
227
237
  getAnalysisResult?: Maybe<AnalysisResult>;
228
238
  /** Get a single data holder by ID */
229
239
  getDataHolder?: Maybe<DataHolder>;
240
+ /**
241
+ * Get the opaque provider configuration required by consumers to support
242
+ * the provider OAuth flow.
243
+ */
244
+ getProviderConfiguration: ProviderConfiguration;
230
245
  /** List analysis results for a virtual presence. */
231
246
  listAnalysisResults: AnalysisResultConnection;
232
247
  /** List data holders by virtual presence */
@@ -259,6 +274,7 @@ export type RefreshTokenInput = {
259
274
  refreshToken: Scalars['String']['input'];
260
275
  scopes?: InputMaybe<Array<Scalars['String']['input']>>;
261
276
  };
277
+ export type RelationshipProvider = 'GMAIL_PROVIDER' | 'TEST_PROVIDER' | '%future added value';
262
278
  export type RetentionInfo = {
263
279
  additionalInfo?: Maybe<Scalars['String']['output']>;
264
280
  style: RetentionStyle;
@@ -321,6 +337,7 @@ export type VirtualPresence = {
321
337
  lastScannedAtEpochMs: Scalars['Float']['output'];
322
338
  owner: Scalars['ID']['output'];
323
339
  providerType: ProviderType;
340
+ relationshipProvider?: Maybe<RelationshipProvider>;
324
341
  state: VirtualPresenceState;
325
342
  updatedAtEpochMs: Scalars['Float']['output'];
326
343
  version: Scalars['Int']['output'];
@@ -341,6 +358,7 @@ export type AnalysisResultFieldsFragment = {
341
358
  createdAtEpochMs: number;
342
359
  updatedAtEpochMs: number;
343
360
  data?: {
361
+ attribution: Array<string>;
344
362
  privacyScore?: {
345
363
  score: number;
346
364
  breakdown: Array<{
@@ -358,7 +376,7 @@ export type AnalysisResultFieldsFragment = {
358
376
  collected: SignalValue;
359
377
  dataLabels: Array<string>;
360
378
  sharedWithThirdParties: ShareStyle;
361
- usedForAdvertising: SignalValue;
379
+ monetized: SignalValue;
362
380
  retained: SignalValue;
363
381
  userCanOptOut: SignalValue;
364
382
  requiredForService?: SignalValue | null;
@@ -377,6 +395,7 @@ export type AnalysisResultFieldsFragment = {
377
395
  supportsSubscriptions: SignalValue;
378
396
  sellsPersonalInformation: SignalValue;
379
397
  usesCookiesOrTracking: SignalValue;
398
+ supportsTwoFactorAuth: SignalValue;
380
399
  };
381
400
  riskIndicators: {
382
401
  dataCollectionBreadth: number;
@@ -468,6 +487,14 @@ export type RescanVirtualPresenceMutation = {
468
487
  updatedAtEpochMs: number;
469
488
  };
470
489
  };
490
+ export type GetProviderConfigurationQueryVariables = Exact<{
491
+ [key: string]: never;
492
+ }>;
493
+ export type GetProviderConfigurationQuery = {
494
+ getProviderConfiguration: {
495
+ data: string;
496
+ };
497
+ };
471
498
  export type ListVirtualPresencesQueryVariables = Exact<{
472
499
  input?: InputMaybe<ListVirtualPresencesInput>;
473
500
  }>;
@@ -543,6 +570,7 @@ export type GetAnalysisResultQuery = {
543
570
  createdAtEpochMs: number;
544
571
  updatedAtEpochMs: number;
545
572
  data?: {
573
+ attribution: Array<string>;
546
574
  privacyScore?: {
547
575
  score: number;
548
576
  breakdown: Array<{
@@ -560,7 +588,7 @@ export type GetAnalysisResultQuery = {
560
588
  collected: SignalValue;
561
589
  dataLabels: Array<string>;
562
590
  sharedWithThirdParties: ShareStyle;
563
- usedForAdvertising: SignalValue;
591
+ monetized: SignalValue;
564
592
  retained: SignalValue;
565
593
  userCanOptOut: SignalValue;
566
594
  requiredForService?: SignalValue | null;
@@ -579,6 +607,7 @@ export type GetAnalysisResultQuery = {
579
607
  supportsSubscriptions: SignalValue;
580
608
  sellsPersonalInformation: SignalValue;
581
609
  usesCookiesOrTracking: SignalValue;
610
+ supportsTwoFactorAuth: SignalValue;
582
611
  };
583
612
  riskIndicators: {
584
613
  dataCollectionBreadth: number;
@@ -617,6 +646,7 @@ export type ListAnalysisResultsQuery = {
617
646
  createdAtEpochMs: number;
618
647
  updatedAtEpochMs: number;
619
648
  data?: {
649
+ attribution: Array<string>;
620
650
  privacyScore?: {
621
651
  score: number;
622
652
  breakdown: Array<{
@@ -634,7 +664,7 @@ export type ListAnalysisResultsQuery = {
634
664
  collected: SignalValue;
635
665
  dataLabels: Array<string>;
636
666
  sharedWithThirdParties: ShareStyle;
637
- usedForAdvertising: SignalValue;
667
+ monetized: SignalValue;
638
668
  retained: SignalValue;
639
669
  userCanOptOut: SignalValue;
640
670
  requiredForService?: SignalValue | null;
@@ -653,6 +683,7 @@ export type ListAnalysisResultsQuery = {
653
683
  supportsSubscriptions: SignalValue;
654
684
  sellsPersonalInformation: SignalValue;
655
685
  usesCookiesOrTracking: SignalValue;
686
+ supportsTwoFactorAuth: SignalValue;
656
687
  };
657
688
  riskIndicators: {
658
689
  dataCollectionBreadth: number;
@@ -732,6 +763,7 @@ export declare const VirtualPresenceFieldsFragmentDoc: DocumentNode<VirtualPrese
732
763
  export declare const ConnectVirtualPresenceDocument: DocumentNode<ConnectVirtualPresenceMutation, ConnectVirtualPresenceMutationVariables>;
733
764
  export declare const DisconnectVirtualPresenceDocument: DocumentNode<DisconnectVirtualPresenceMutation, DisconnectVirtualPresenceMutationVariables>;
734
765
  export declare const RescanVirtualPresenceDocument: DocumentNode<RescanVirtualPresenceMutation, RescanVirtualPresenceMutationVariables>;
766
+ export declare const GetProviderConfigurationDocument: DocumentNode<GetProviderConfigurationQuery, GetProviderConfigurationQueryVariables>;
735
767
  export declare const ListVirtualPresencesDocument: DocumentNode<ListVirtualPresencesQuery, ListVirtualPresencesQueryVariables>;
736
768
  export declare const GetDataHolderDocument: DocumentNode<GetDataHolderQuery, GetDataHolderQueryVariables>;
737
769
  export declare const ListDataHoldersDocument: DocumentNode<ListDataHoldersQuery, ListDataHoldersQueryVariables>;
@@ -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, ConnectVirtualPresenceInput, DataHolder, DataHolderConnection, ListVirtualPresencesInput, OnAnalysisResultUpdateSubscription, OnDataHoldersUpdateSubscription, OnVirtualPresenceUpdateSubscription, ScanOptionsInput, VirtualPresence, VirtualPresenceConnection } from '../../../gen/graphqlTypes';
8
+ import { AnalysisResult, AnalysisResultConnection, ConnectVirtualPresenceInput, DataHolder, DataHolderConnection, ProviderConfiguration, ListVirtualPresencesInput, 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;
@@ -16,6 +16,7 @@ export declare class ApiClient {
16
16
  disconnectVirtualPresence(id: string): Promise<VirtualPresence>;
17
17
  rescanVirtualPresence(id: string, options?: ScanOptionsInput): Promise<VirtualPresence>;
18
18
  listVirtualPresences(input: ListVirtualPresencesInput): Promise<VirtualPresenceConnection>;
19
+ getProviderConfiguration(): Promise<ProviderConfiguration>;
19
20
  getDataHolder(id: string): Promise<DataHolder | undefined>;
20
21
  listDataHolders(input: {
21
22
  virtualPresenceId: string;
@@ -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 { ProviderConfigurationEntity } from '../../domain/entities/configuration/providerConfigurationEntity';
7
+ import { ProviderConfigurationService } from '../../domain/entities/configuration/providerConfigurationService';
8
+ import { ApiClient } from '../common/apiClient';
9
+ export declare class DefaultProviderConfigurationService implements ProviderConfigurationService {
10
+ private readonly appSync;
11
+ private readonly providerConfigurationTransformer;
12
+ constructor(appSync: ApiClient);
13
+ get(): Promise<ProviderConfigurationEntity[]>;
14
+ }
@@ -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 { ProviderConfiguration } from '../../../../public/typings/providerConfiguration';
7
+ import { ProviderConfigurationEntity } from '../../../domain/entities/configuration/providerConfigurationEntity';
8
+ export declare class ProviderConfigurationTransformer {
9
+ private readonly providerTypeTransformer;
10
+ /**
11
+ * Decodes the opaque, base-64 encoded provider configuration data into a
12
+ * list of domain entities.
13
+ *
14
+ * @param {string} data The base-64 encoded provider configuration data.
15
+ * @returns {ProviderConfigurationEntity[]} The decoded provider configurations.
16
+ */
17
+ fromGraphQLToEntity(data: string): ProviderConfigurationEntity[];
18
+ fromEntityToAPI(entity: ProviderConfigurationEntity): ProviderConfiguration;
19
+ }
@@ -9,6 +9,7 @@ import { ApiClient } from '../common/apiClient';
9
9
  export declare class DefaultVirtualPresenceService implements VirtualPresenceService {
10
10
  private readonly appSync;
11
11
  private readonly virtualPresenceTransformer;
12
+ private readonly relationshipProviderTransformer;
12
13
  private readonly subscriptionManager;
13
14
  constructor(appSync: ApiClient);
14
15
  connect(input: ConnectVirtualPresenceInput): Promise<VirtualPresenceEntity>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { RelationshipProvider as RelationshipProviderGraphQL } from '../../../../gen/graphqlTypes';
7
+ import { RelationshipProvider } from '../../../../public/inputs/virtualPresence';
8
+ import { RelationshipProviderEntity } from '../../../domain/entities/inputs/relationshipProviderEntity';
9
+ export declare class RelationshipProviderTransformer {
10
+ fromEntityToGraphQL(entity: RelationshipProviderEntity): RelationshipProviderGraphQL;
11
+ fromAPIToEntity(data: RelationshipProvider): RelationshipProviderEntity;
12
+ }
@@ -59,6 +59,7 @@ export declare enum AnalysisResultStatusEntity {
59
59
  * @property {CapabilitySignalsEntity} capabilities Action-derived capability signals.
60
60
  * @property {RiskIndicatorsEntity} riskIndicators Aggregated risk indicators.
61
61
  * @property {OrganizationIdentityEntity} organizationIdentity Organization identity (brand, company, business categories).
62
+ * @property {string[]} attribution Information describing where the analysis result is derived from.
62
63
  */
63
64
  export interface AnalysisResultDataEntity {
64
65
  privacyScore?: PrivacyScoreEntity;
@@ -67,6 +68,7 @@ export interface AnalysisResultDataEntity {
67
68
  capabilities: CapabilitySignalsEntity;
68
69
  riskIndicators: RiskIndicatorsEntity;
69
70
  organizationIdentity?: OrganizationIdentityEntity;
71
+ attribution: string[];
70
72
  }
71
73
  /**
72
74
  * Overall privacy score for an organization.
@@ -191,7 +193,7 @@ export interface RetentionInfoEntity {
191
193
  * @property {SignalValueEntity} collected Whether this category of data is collected.
192
194
  * @property {string[]} dataLabels Descriptive labels for the collected data within this category.
193
195
  * @property {ShareStyleEntity} sharedWithThirdParties How this category is shared with third parties.
194
- * @property {SignalValueEntity} usedForAdvertising Whether this category is used for advertising or monetization.
196
+ * @property {SignalValueEntity} monetized Whether this category is used for monetization.
195
197
  * @property {SignalValueEntity} retained Whether this category is retained.
196
198
  * @property {RetentionInfoEntity} retention Retention details when data is retained.
197
199
  * @property {SignalValueEntity} userCanOptOut Whether the user can opt out of this category's collection.
@@ -203,7 +205,7 @@ export interface CategorySignalsEntity {
203
205
  collected: SignalValueEntity;
204
206
  dataLabels: string[];
205
207
  sharedWithThirdParties: ShareStyleEntity;
206
- usedForAdvertising: SignalValueEntity;
208
+ monetized: SignalValueEntity;
207
209
  retained: SignalValueEntity;
208
210
  retention?: RetentionInfoEntity;
209
211
  userCanOptOut: SignalValueEntity;
@@ -221,6 +223,7 @@ export interface CategorySignalsEntity {
221
223
  * @property {SignalValueEntity} supportsSubscriptions Whether the organization supports subscription management.
222
224
  * @property {SignalValueEntity} sellsPersonalInformation Whether the organization sells personal information.
223
225
  * @property {SignalValueEntity} usesCookiesOrTracking Whether the organization uses cookies or tracking.
226
+ * @property {SignalValueEntity} supportsTwoFactorAuth Whether the organization supports two-factor auth for logins.
224
227
  */
225
228
  export interface CapabilitySignalsEntity {
226
229
  supportsAccountCreation: SignalValueEntity;
@@ -230,6 +233,7 @@ export interface CapabilitySignalsEntity {
230
233
  supportsSubscriptions: SignalValueEntity;
231
234
  sellsPersonalInformation: SignalValueEntity;
232
235
  usesCookiesOrTracking: SignalValueEntity;
236
+ supportsTwoFactorAuth: SignalValueEntity;
233
237
  }
234
238
  /**
235
239
  * Aggregated risk indicators derived from categories and capabilities.
@@ -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 { ProviderTypeEntity } from '../virtual-presence/virtualPresenceEntity';
7
+ /**
8
+ * Core entity representation of a provider configuration.
9
+ *
10
+ * Contains the configuration required by consumers to support the provider
11
+ * OAuth flow. This is the decoded form of the opaque configuration data
12
+ * returned by the service.
13
+ *
14
+ * @interface ProviderConfigurationEntity
15
+ * @property {string} name Human-readable provider name (e.g. 'google').
16
+ * @property {ProviderTypeEntity} providerType The kind of virtual presence this provider backs (e.g. EMAIL).
17
+ * @property {string} clientId OAuth client id.
18
+ */
19
+ export interface ProviderConfigurationEntity {
20
+ name: string;
21
+ providerType: ProviderTypeEntity;
22
+ clientId: string;
23
+ }
@@ -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 { ProviderConfigurationEntity } from './providerConfigurationEntity';
7
+ /**
8
+ * Core entity representation of a configuration service used in business logic.
9
+ * Used to retrieve service configuration.
10
+ *
11
+ * @interface ProviderConfigurationService
12
+ */
13
+ export interface ProviderConfigurationService {
14
+ /**
15
+ * Retrieve the provider configurations required by consumers to support
16
+ * the provider OAuth flow.
17
+ *
18
+ * @returns {ProviderConfigurationEntity[]} The decoded provider configurations.
19
+ */
20
+ get(): Promise<ProviderConfigurationEntity[]>;
21
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Enumeration of the relationship providers that back a virtual presence connection.
8
+ *
9
+ * @property GMAIL_PROVIDER The Gmail relationship provider.
10
+ * @property TEST_PROVIDER The test relationship provider.
11
+ *
12
+ * @enum
13
+ */
14
+ export declare enum RelationshipProviderEntity {
15
+ GmailProvider = "GMAIL_PROVIDER",
16
+ TestProvider = "TEST_PROVIDER"
17
+ }
@@ -4,8 +4,20 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { VirtualPresenceSubscriber } from '../../../../public/typings/subscription';
7
+ import { RelationshipProviderEntity } from '../inputs/relationshipProviderEntity';
7
8
  import { ScanOptionsEntity } from '../inputs/scanOptionsEntity';
8
9
  import { VirtualPresenceEntity } from './virtualPresenceEntity';
10
+ /**
11
+ * Auth code input for connecting a virtual presence.
12
+ *
13
+ * @interface AuthCodeInput
14
+ * @property {string} authCode The auth code value.
15
+ * @property {string} redirectUri The optional redirect URI value.
16
+ */
17
+ export interface AuthCodeInput {
18
+ authCode: string;
19
+ redirectUri?: string;
20
+ }
9
21
  /**
10
22
  * Refresh token credential input for connecting a virtual presence.
11
23
  *
@@ -25,12 +37,15 @@ export interface RefreshTokenInput {
25
37
  * Input for `VirtualPresenceService.connect` method.
26
38
  *
27
39
  * @interface ConnectVirtualPresenceInput
28
- * @property {string} authCode An authorization code obtained from the OAuth flow.
40
+ * @property {AuthCodeInput} authCode An authorization code obtained from the OAuth flow.
29
41
  * @property {RefreshTokenInput} refreshToken A pre-obtained refresh token credential.
42
+ * @property {RelationshipProviderEntity} relationshipProvider The relationship provider
43
+ * to associate with the connection.
30
44
  */
31
45
  export interface ConnectVirtualPresenceInput {
32
- authCode?: string;
46
+ authCode?: AuthCodeInput;
33
47
  refreshToken?: RefreshTokenInput;
48
+ relationshipProvider?: RelationshipProviderEntity;
34
49
  }
35
50
  /**
36
51
  * Input for `VirtualPresenceService.list` method.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ProviderConfigurationEntity } from '../../entities/configuration/providerConfigurationEntity';
7
+ import { ProviderConfigurationService } from '../../entities/configuration/providerConfigurationService';
8
+ /**
9
+ * Application business logic for retrieving the provider configuration.
10
+ */
11
+ export declare class GetProviderConfigurationUseCase {
12
+ private readonly providerConfigurationService;
13
+ private readonly log;
14
+ constructor(providerConfigurationService: ProviderConfigurationService);
15
+ execute(): Promise<ProviderConfigurationEntity[]>;
16
+ }