@sudoplatform/sudo-privacy-interaction 0.0.0-placeholder → 1.1.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 (260) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +30 -0
  3. package/cjs/gen/graphqlTypes.js +1800 -0
  4. package/cjs/index.js +10 -0
  5. package/cjs/private/data/analysis-result/analysisResultSubscriptionManager.js +25 -0
  6. package/cjs/private/data/analysis-result/defaultAnalysisResultService.js +83 -0
  7. package/cjs/private/data/analysis-result/transformer/analysisResultDataTransformer.js +59 -0
  8. package/cjs/private/data/analysis-result/transformer/analysisResultStatusTransformer.js +43 -0
  9. package/cjs/private/data/analysis-result/transformer/analysisResultTransformer.js +47 -0
  10. package/cjs/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +37 -0
  11. package/cjs/private/data/analysis-result/transformer/categorySignalsTransformer.js +51 -0
  12. package/cjs/private/data/analysis-result/transformer/dataCategoryTransformer.js +91 -0
  13. package/cjs/private/data/analysis-result/transformer/organizationCategoryTransformer.js +139 -0
  14. package/cjs/private/data/analysis-result/transformer/organizationIdentityTransformer.js +29 -0
  15. package/cjs/private/data/analysis-result/transformer/privacyScoreTransformer.js +29 -0
  16. package/cjs/private/data/analysis-result/transformer/privacySummaryTransformer.js +25 -0
  17. package/cjs/private/data/analysis-result/transformer/retentionInfoTransformer.js +27 -0
  18. package/cjs/private/data/analysis-result/transformer/retentionStyleTransformer.js +39 -0
  19. package/cjs/private/data/analysis-result/transformer/riskIndicatorsTransformer.js +35 -0
  20. package/cjs/private/data/analysis-result/transformer/shareStyleTransformer.js +41 -0
  21. package/cjs/private/data/analysis-result/transformer/signalValueTransformer.js +35 -0
  22. package/cjs/private/data/common/apiClient.js +209 -0
  23. package/cjs/private/data/common/baseSubscriptionManager.js +73 -0
  24. package/cjs/private/data/common/config.js +23 -0
  25. package/cjs/private/data/common/privateSudoPrivacyInteractionClientOptions.js +7 -0
  26. package/cjs/private/data/common/transformer/errorTransformer.js +30 -0
  27. package/cjs/private/data/data-holder/dataHolderSubscriptionManager.js +25 -0
  28. package/cjs/private/data/data-holder/defaultDataHolderService.js +72 -0
  29. package/cjs/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.js +37 -0
  30. package/cjs/private/data/data-holder/transformer/dataHolderTransformer.js +44 -0
  31. package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +74 -0
  32. package/cjs/private/data/virtual-presence/transformer/providerTypeTransformer.js +29 -0
  33. package/cjs/private/data/virtual-presence/transformer/virtualPresenceStateTransformer.js +45 -0
  34. package/cjs/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +43 -0
  35. package/cjs/private/data/virtual-presence/virtualPresenceSubscriptionManager.js +25 -0
  36. package/cjs/private/domain/entities/analysis-result/analysisResultEntity.js +135 -0
  37. package/cjs/private/domain/entities/analysis-result/analysisResultService.js +7 -0
  38. package/cjs/private/domain/entities/data-holder/dataHolderEntity.js +24 -0
  39. package/cjs/private/domain/entities/data-holder/dataHolderService.js +7 -0
  40. package/cjs/private/domain/entities/inputs/scanOptionsEntity.js +7 -0
  41. package/cjs/private/domain/entities/virtual-presence/virtualPresenceEntity.js +38 -0
  42. package/cjs/private/domain/entities/virtual-presence/virtualPresenceService.js +7 -0
  43. package/cjs/private/domain/use-cases/analysis-result/getAnalysisResultUseCase.js +25 -0
  44. package/cjs/private/domain/use-cases/analysis-result/listAnalysisResultsUseCase.js +29 -0
  45. package/cjs/private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase.js +37 -0
  46. package/cjs/private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase.js +27 -0
  47. package/cjs/private/domain/use-cases/data-holder/getDataHolderUseCase.js +25 -0
  48. package/cjs/private/domain/use-cases/data-holder/listDataHoldersUseCase.js +29 -0
  49. package/cjs/private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase.js +37 -0
  50. package/cjs/private/domain/use-cases/data-holder/unsubscribeFromDataHoldersUseCase.js +27 -0
  51. package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +27 -0
  52. package/cjs/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +27 -0
  53. package/cjs/private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase.js +25 -0
  54. package/cjs/private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase.js +30 -0
  55. package/cjs/private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase.js +25 -0
  56. package/cjs/private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase.js +37 -0
  57. package/cjs/private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase.js +27 -0
  58. package/cjs/public/defaultSudoPrivacyInteractionClient.js +173 -0
  59. package/cjs/public/errors.js +29 -0
  60. package/cjs/public/index.js +13 -0
  61. package/cjs/public/inputs/analysisResult.js +7 -0
  62. package/cjs/public/inputs/common.js +7 -0
  63. package/cjs/public/inputs/dataHolder.js +7 -0
  64. package/cjs/public/inputs/index.js +12 -0
  65. package/cjs/public/inputs/virtualPresence.js +7 -0
  66. package/cjs/public/sudoPrivacyInteractionClient.js +7 -0
  67. package/cjs/public/typings/analysisResult.js +135 -0
  68. package/cjs/public/typings/dataHolder.js +24 -0
  69. package/cjs/public/typings/index.js +12 -0
  70. package/cjs/public/typings/subscription.js +21 -0
  71. package/cjs/public/typings/virtualPresence.js +38 -0
  72. package/docs/.nojekyll +1 -0
  73. package/docs/assets/hierarchy.js +1 -0
  74. package/docs/assets/highlight.css +78 -0
  75. package/docs/assets/icons.js +18 -0
  76. package/docs/assets/icons.svg +1 -0
  77. package/docs/assets/main.js +60 -0
  78. package/docs/assets/navigation.js +1 -0
  79. package/docs/assets/search.js +1 -0
  80. package/docs/assets/style.css +1648 -0
  81. package/docs/classes/DefaultSudoPrivacyInteractionClient.html +383 -0
  82. package/docs/classes/InvalidArgumentError.html +181 -0
  83. package/docs/classes/PrivacyInteractionServiceConfigNotFoundError.html +181 -0
  84. package/docs/enums/AnalysisResultStatus.html +81 -0
  85. package/docs/enums/ConnectionState.html +67 -0
  86. package/docs/enums/DataCategory.html +153 -0
  87. package/docs/enums/DataHolderProtectionState.html +75 -0
  88. package/docs/enums/OrganizationCategory.html +225 -0
  89. package/docs/enums/ProviderType.html +63 -0
  90. package/docs/enums/RetentionStyle.html +75 -0
  91. package/docs/enums/ShareStyle.html +81 -0
  92. package/docs/enums/SignalValue.html +69 -0
  93. package/docs/enums/VirtualPresenceState.html +87 -0
  94. package/docs/hierarchy.html +39 -0
  95. package/docs/index.html +79 -0
  96. package/docs/interfaces/AnalysisResult.html +133 -0
  97. package/docs/interfaces/AnalysisResultData.html +110 -0
  98. package/docs/interfaces/AnalysisResultSubscriber.html +92 -0
  99. package/docs/interfaces/AnalysisResultUpdate.html +125 -0
  100. package/docs/interfaces/CapabilitySignals.html +117 -0
  101. package/docs/interfaces/CategorySignals.html +133 -0
  102. package/docs/interfaces/ConnectVirtualPresenceWithRefreshTokenInput.html +85 -0
  103. package/docs/interfaces/DataHolder.html +142 -0
  104. package/docs/interfaces/DataHolderSubscriber.html +92 -0
  105. package/docs/interfaces/ListAnalysisResultsInput.html +85 -0
  106. package/docs/interfaces/ListDataHoldersInput.html +85 -0
  107. package/docs/interfaces/ListVirtualPresencesInput.html +77 -0
  108. package/docs/interfaces/OrganizationIdentity.html +85 -0
  109. package/docs/interfaces/Pagination.html +77 -0
  110. package/docs/interfaces/PrivacyScore.html +69 -0
  111. package/docs/interfaces/PrivacySummary.html +77 -0
  112. package/docs/interfaces/RescanVirtualPresenceInput.html +69 -0
  113. package/docs/interfaces/RetentionInfo.html +77 -0
  114. package/docs/interfaces/RiskIndicators.html +110 -0
  115. package/docs/interfaces/ScanOptions.html +93 -0
  116. package/docs/interfaces/ScoreContribution.html +69 -0
  117. package/docs/interfaces/SudoPrivacyInteractionClient.html +347 -0
  118. package/docs/interfaces/VirtualPresence.html +126 -0
  119. package/docs/interfaces/VirtualPresenceSubscriber.html +92 -0
  120. package/docs/modules.html +48 -0
  121. package/docs/types/SudoPrivacyInteractionClientOptions.html +57 -0
  122. package/lib/gen/graphqlTypes.js +1797 -0
  123. package/lib/index.js +7 -0
  124. package/lib/private/data/analysis-result/analysisResultSubscriptionManager.js +21 -0
  125. package/lib/private/data/analysis-result/defaultAnalysisResultService.js +79 -0
  126. package/lib/private/data/analysis-result/transformer/analysisResultDataTransformer.js +55 -0
  127. package/lib/private/data/analysis-result/transformer/analysisResultStatusTransformer.js +39 -0
  128. package/lib/private/data/analysis-result/transformer/analysisResultTransformer.js +43 -0
  129. package/lib/private/data/analysis-result/transformer/capabilitySignalsTransformer.js +33 -0
  130. package/lib/private/data/analysis-result/transformer/categorySignalsTransformer.js +47 -0
  131. package/lib/private/data/analysis-result/transformer/dataCategoryTransformer.js +87 -0
  132. package/lib/private/data/analysis-result/transformer/organizationCategoryTransformer.js +135 -0
  133. package/lib/private/data/analysis-result/transformer/organizationIdentityTransformer.js +25 -0
  134. package/lib/private/data/analysis-result/transformer/privacyScoreTransformer.js +25 -0
  135. package/lib/private/data/analysis-result/transformer/privacySummaryTransformer.js +21 -0
  136. package/lib/private/data/analysis-result/transformer/retentionInfoTransformer.js +23 -0
  137. package/lib/private/data/analysis-result/transformer/retentionStyleTransformer.js +35 -0
  138. package/lib/private/data/analysis-result/transformer/riskIndicatorsTransformer.js +31 -0
  139. package/lib/private/data/analysis-result/transformer/shareStyleTransformer.js +37 -0
  140. package/lib/private/data/analysis-result/transformer/signalValueTransformer.js +31 -0
  141. package/lib/private/data/common/apiClient.js +205 -0
  142. package/lib/private/data/common/baseSubscriptionManager.js +69 -0
  143. package/lib/private/data/common/config.js +18 -0
  144. package/lib/private/data/common/privateSudoPrivacyInteractionClientOptions.js +6 -0
  145. package/lib/private/data/common/transformer/errorTransformer.js +26 -0
  146. package/lib/private/data/data-holder/dataHolderSubscriptionManager.js +21 -0
  147. package/lib/private/data/data-holder/defaultDataHolderService.js +68 -0
  148. package/lib/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.js +33 -0
  149. package/lib/private/data/data-holder/transformer/dataHolderTransformer.js +40 -0
  150. package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +70 -0
  151. package/lib/private/data/virtual-presence/transformer/providerTypeTransformer.js +25 -0
  152. package/lib/private/data/virtual-presence/transformer/virtualPresenceStateTransformer.js +41 -0
  153. package/lib/private/data/virtual-presence/transformer/virtualPresenceTransformer.js +39 -0
  154. package/lib/private/data/virtual-presence/virtualPresenceSubscriptionManager.js +21 -0
  155. package/lib/private/domain/entities/analysis-result/analysisResultEntity.js +132 -0
  156. package/lib/private/domain/entities/analysis-result/analysisResultService.js +6 -0
  157. package/lib/private/domain/entities/data-holder/dataHolderEntity.js +21 -0
  158. package/lib/private/domain/entities/data-holder/dataHolderService.js +6 -0
  159. package/lib/private/domain/entities/inputs/scanOptionsEntity.js +6 -0
  160. package/lib/private/domain/entities/virtual-presence/virtualPresenceEntity.js +35 -0
  161. package/lib/private/domain/entities/virtual-presence/virtualPresenceService.js +6 -0
  162. package/lib/private/domain/use-cases/analysis-result/getAnalysisResultUseCase.js +21 -0
  163. package/lib/private/domain/use-cases/analysis-result/listAnalysisResultsUseCase.js +25 -0
  164. package/lib/private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase.js +33 -0
  165. package/lib/private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase.js +23 -0
  166. package/lib/private/domain/use-cases/data-holder/getDataHolderUseCase.js +21 -0
  167. package/lib/private/domain/use-cases/data-holder/listDataHoldersUseCase.js +25 -0
  168. package/lib/private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase.js +33 -0
  169. package/lib/private/domain/use-cases/data-holder/unsubscribeFromDataHoldersUseCase.js +23 -0
  170. package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.js +23 -0
  171. package/lib/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.js +23 -0
  172. package/lib/private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase.js +21 -0
  173. package/lib/private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase.js +26 -0
  174. package/lib/private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase.js +21 -0
  175. package/lib/private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase.js +33 -0
  176. package/lib/private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase.js +23 -0
  177. package/lib/public/defaultSudoPrivacyInteractionClient.js +169 -0
  178. package/lib/public/errors.js +24 -0
  179. package/lib/public/index.js +10 -0
  180. package/lib/public/inputs/analysisResult.js +6 -0
  181. package/lib/public/inputs/common.js +6 -0
  182. package/lib/public/inputs/dataHolder.js +6 -0
  183. package/lib/public/inputs/index.js +9 -0
  184. package/lib/public/inputs/virtualPresence.js +6 -0
  185. package/lib/public/sudoPrivacyInteractionClient.js +6 -0
  186. package/lib/public/typings/analysisResult.js +132 -0
  187. package/lib/public/typings/dataHolder.js +21 -0
  188. package/lib/public/typings/index.js +9 -0
  189. package/lib/public/typings/subscription.js +18 -0
  190. package/lib/public/typings/virtualPresence.js +35 -0
  191. package/package.json +117 -8
  192. package/types/gen/graphqlTypes.d.ts +750 -0
  193. package/types/index.d.ts +6 -0
  194. package/types/private/data/analysis-result/analysisResultSubscriptionManager.d.ts +19 -0
  195. package/types/private/data/analysis-result/defaultAnalysisResultService.d.ts +20 -0
  196. package/types/private/data/analysis-result/transformer/analysisResultDataTransformer.d.ts +18 -0
  197. package/types/private/data/analysis-result/transformer/analysisResultStatusTransformer.d.ts +12 -0
  198. package/types/private/data/analysis-result/transformer/analysisResultTransformer.d.ts +14 -0
  199. package/types/private/data/analysis-result/transformer/capabilitySignalsTransformer.d.ts +13 -0
  200. package/types/private/data/analysis-result/transformer/categorySignalsTransformer.d.ts +16 -0
  201. package/types/private/data/analysis-result/transformer/dataCategoryTransformer.d.ts +12 -0
  202. package/types/private/data/analysis-result/transformer/organizationCategoryTransformer.d.ts +12 -0
  203. package/types/private/data/analysis-result/transformer/organizationIdentityTransformer.d.ts +13 -0
  204. package/types/private/data/analysis-result/transformer/privacyScoreTransformer.d.ts +12 -0
  205. package/types/private/data/analysis-result/transformer/privacySummaryTransformer.d.ts +12 -0
  206. package/types/private/data/analysis-result/transformer/retentionInfoTransformer.d.ts +13 -0
  207. package/types/private/data/analysis-result/transformer/retentionStyleTransformer.d.ts +12 -0
  208. package/types/private/data/analysis-result/transformer/riskIndicatorsTransformer.d.ts +13 -0
  209. package/types/private/data/analysis-result/transformer/shareStyleTransformer.d.ts +12 -0
  210. package/types/private/data/analysis-result/transformer/signalValueTransformer.d.ts +12 -0
  211. package/types/private/data/common/apiClient.d.ts +38 -0
  212. package/types/private/data/common/baseSubscriptionManager.d.ts +46 -0
  213. package/types/private/data/common/config.d.ts +13 -0
  214. package/types/private/data/common/privateSudoPrivacyInteractionClientOptions.d.ts +18 -0
  215. package/types/private/data/common/transformer/errorTransformer.d.ts +15 -0
  216. package/types/private/data/data-holder/dataHolderSubscriptionManager.d.ts +19 -0
  217. package/types/private/data/data-holder/defaultDataHolderService.d.ts +19 -0
  218. package/types/private/data/data-holder/transformer/dataHolderProtectionStateTransformer.d.ts +12 -0
  219. package/types/private/data/data-holder/transformer/dataHolderTransformer.d.ts +12 -0
  220. package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +21 -0
  221. package/types/private/data/virtual-presence/transformer/providerTypeTransformer.d.ts +12 -0
  222. package/types/private/data/virtual-presence/transformer/virtualPresenceStateTransformer.d.ts +12 -0
  223. package/types/private/data/virtual-presence/transformer/virtualPresenceTransformer.d.ts +12 -0
  224. package/types/private/data/virtual-presence/virtualPresenceSubscriptionManager.d.ts +18 -0
  225. package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +310 -0
  226. package/types/private/domain/entities/analysis-result/analysisResultService.d.ts +81 -0
  227. package/types/private/domain/entities/data-holder/dataHolderEntity.d.ts +51 -0
  228. package/types/private/domain/entities/data-holder/dataHolderService.d.ts +81 -0
  229. package/types/private/domain/entities/inputs/scanOptionsEntity.d.ts +22 -0
  230. package/types/private/domain/entities/virtual-presence/virtualPresenceEntity.d.ts +60 -0
  231. package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +131 -0
  232. package/types/private/domain/use-cases/analysis-result/getAnalysisResultUseCase.d.ts +16 -0
  233. package/types/private/domain/use-cases/analysis-result/listAnalysisResultsUseCase.d.ts +36 -0
  234. package/types/private/domain/use-cases/analysis-result/subscribeToAnalysisResultUseCase.d.ts +27 -0
  235. package/types/private/domain/use-cases/analysis-result/unsubscribeFromAnalysisResultUseCase.d.ts +15 -0
  236. package/types/private/domain/use-cases/data-holder/getDataHolderUseCase.d.ts +16 -0
  237. package/types/private/domain/use-cases/data-holder/listDataHoldersUseCase.d.ts +36 -0
  238. package/types/private/domain/use-cases/data-holder/subscribeToDataHoldersUseCase.d.ts +27 -0
  239. package/types/private/domain/use-cases/data-holder/unsubscribeFromDataHoldersUseCase.d.ts +15 -0
  240. package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithAuthCodeUseCase.d.ts +16 -0
  241. package/types/private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase.d.ts +28 -0
  242. package/types/private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase.d.ts +16 -0
  243. package/types/private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase.d.ts +35 -0
  244. package/types/private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase.d.ts +27 -0
  245. package/types/private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase.d.ts +27 -0
  246. package/types/private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase.d.ts +15 -0
  247. package/types/public/defaultSudoPrivacyInteractionClient.d.ts +36 -0
  248. package/types/public/errors.d.ts +15 -0
  249. package/types/public/index.d.ts +10 -0
  250. package/types/public/inputs/analysisResult.d.ts +17 -0
  251. package/types/public/inputs/common.d.ts +16 -0
  252. package/types/public/inputs/dataHolder.d.ts +17 -0
  253. package/types/public/inputs/index.d.ts +9 -0
  254. package/types/public/inputs/virtualPresence.d.ts +58 -0
  255. package/types/public/sudoPrivacyInteractionClient.d.ts +123 -0
  256. package/types/public/typings/analysisResult.d.ts +335 -0
  257. package/types/public/typings/dataHolder.d.ts +51 -0
  258. package/types/public/typings/index.d.ts +9 -0
  259. package/types/public/typings/subscription.d.ts +86 -0
  260. package/types/public/typings/virtualPresence.d.ts +60 -0
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ConnectionState, } from '../../../public/typings/subscription';
7
+ import { VirtualPresenceTransformer } from './transformer/virtualPresenceTransformer';
8
+ import { VirtualPresenceSubscriptionManager } from './virtualPresenceSubscriptionManager';
9
+ export class DefaultVirtualPresenceService {
10
+ appSync;
11
+ virtualPresenceTransformer;
12
+ subscriptionManager;
13
+ constructor(appSync) {
14
+ this.appSync = appSync;
15
+ this.virtualPresenceTransformer = new VirtualPresenceTransformer();
16
+ this.subscriptionManager = new VirtualPresenceSubscriptionManager();
17
+ }
18
+ async connect(input) {
19
+ const result = await this.appSync.connectVirtualPresence(input);
20
+ return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
21
+ }
22
+ async list(input) {
23
+ const result = await this.appSync.listVirtualPresences(input);
24
+ const virtualPresences = [];
25
+ if (result.items) {
26
+ result.items.map((item) => virtualPresences.push(this.virtualPresenceTransformer.fromGraphQLToEntity(item)));
27
+ }
28
+ return {
29
+ virtualPresences,
30
+ nextToken: result.nextToken ?? undefined,
31
+ };
32
+ }
33
+ async rescan(input) {
34
+ const result = await this.appSync.rescanVirtualPresence(input.id, input.options);
35
+ return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
36
+ }
37
+ async disconnect(id) {
38
+ const result = await this.appSync.disconnectVirtualPresence(id);
39
+ return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
40
+ }
41
+ async subscribe(input) {
42
+ this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
43
+ if (!this.subscriptionManager.getWatcher()) {
44
+ this.subscriptionManager.setWatcher(await this.appSync.onVirtualPresenceUpdated(input.owner));
45
+ this.subscriptionManager.setSubscription(this.setupUpdateSubscription());
46
+ this.subscriptionManager.connectionStatusChanged(ConnectionState.Connected);
47
+ }
48
+ }
49
+ unsubscribe(subscriptionId) {
50
+ this.subscriptionManager.unsubscribe(subscriptionId);
51
+ }
52
+ setupUpdateSubscription() {
53
+ const subscription = this.subscriptionManager.getWatcher()?.subscribe({
54
+ complete: () => {
55
+ this.subscriptionManager.connectionStatusChanged(ConnectionState.Disconnected);
56
+ },
57
+ error: () => {
58
+ this.subscriptionManager.connectionStatusChanged(ConnectionState.Disconnected);
59
+ },
60
+ next: (result) => {
61
+ if (result.data?.onVirtualPresenceUpdate) {
62
+ const entity = this.virtualPresenceTransformer.fromGraphQLToEntity(result.data.onVirtualPresenceUpdate);
63
+ const virtualPresence = this.virtualPresenceTransformer.fromEntityToAPI(entity);
64
+ this.subscriptionManager.virtualPresenceUpdated(virtualPresence);
65
+ }
66
+ },
67
+ });
68
+ return subscription;
69
+ }
70
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ProviderType } from '../../../../public/typings/virtualPresence';
7
+ import { ProviderTypeEntity } from '../../../domain/entities/virtual-presence/virtualPresenceEntity';
8
+ export class ProviderTypeTransformer {
9
+ fromEntityToAPI(entity) {
10
+ switch (entity) {
11
+ case ProviderTypeEntity.Email:
12
+ return ProviderType.Email;
13
+ case ProviderTypeEntity.Unknown:
14
+ return ProviderType.Unknown;
15
+ }
16
+ }
17
+ fromGraphQLToEntity(data) {
18
+ switch (data) {
19
+ case 'EMAIL':
20
+ return ProviderTypeEntity.Email;
21
+ default:
22
+ return ProviderTypeEntity.Unknown;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { VirtualPresenceState } from '../../../../public/typings/virtualPresence';
7
+ import { VirtualPresenceStateEntity } from '../../../domain/entities/virtual-presence/virtualPresenceEntity';
8
+ export class VirtualPresenceStateTransformer {
9
+ fromEntityToAPI(entity) {
10
+ switch (entity) {
11
+ case VirtualPresenceStateEntity.Connected:
12
+ return VirtualPresenceState.Connected;
13
+ case VirtualPresenceStateEntity.Scanning:
14
+ return VirtualPresenceState.Scanning;
15
+ case VirtualPresenceStateEntity.NeedsReauth:
16
+ return VirtualPresenceState.NeedsReauth;
17
+ case VirtualPresenceStateEntity.Inactive:
18
+ return VirtualPresenceState.Inactive;
19
+ case VirtualPresenceStateEntity.Error:
20
+ return VirtualPresenceState.Error;
21
+ case VirtualPresenceStateEntity.Unknown:
22
+ return VirtualPresenceState.Unknown;
23
+ }
24
+ }
25
+ fromGraphQLToEntity(data) {
26
+ switch (data) {
27
+ case 'CONNECTED':
28
+ return VirtualPresenceStateEntity.Connected;
29
+ case 'SCANNING':
30
+ return VirtualPresenceStateEntity.Scanning;
31
+ case 'NEEDS_REAUTH':
32
+ return VirtualPresenceStateEntity.NeedsReauth;
33
+ case 'INACTIVE':
34
+ return VirtualPresenceStateEntity.Inactive;
35
+ case 'ERROR':
36
+ return VirtualPresenceStateEntity.Error;
37
+ default:
38
+ return VirtualPresenceStateEntity.Unknown;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ProviderTypeTransformer } from './providerTypeTransformer';
7
+ import { VirtualPresenceStateTransformer } from './virtualPresenceStateTransformer';
8
+ export class VirtualPresenceTransformer {
9
+ fromEntityToAPI(entity) {
10
+ const providerTypeTransformer = new ProviderTypeTransformer();
11
+ const virtualPresenceStateTransformer = new VirtualPresenceStateTransformer();
12
+ return {
13
+ id: entity.id,
14
+ owner: entity.owner,
15
+ version: entity.version,
16
+ providerType: providerTypeTransformer.fromEntityToAPI(entity.providerType),
17
+ identifier: entity.identifier,
18
+ state: virtualPresenceStateTransformer.fromEntityToAPI(entity.state),
19
+ lastScannedAt: entity.lastScannedAt,
20
+ createdAt: entity.createdAt,
21
+ updatedAt: entity.updatedAt,
22
+ };
23
+ }
24
+ fromGraphQLToEntity(data) {
25
+ const providerTypeTransformer = new ProviderTypeTransformer();
26
+ const virtualPresenceStateTransformer = new VirtualPresenceStateTransformer();
27
+ return {
28
+ id: data.id,
29
+ owner: data.owner,
30
+ version: data.version,
31
+ providerType: providerTypeTransformer.fromGraphQLToEntity(data.providerType),
32
+ identifier: data.identifier,
33
+ state: virtualPresenceStateTransformer.fromGraphQLToEntity(data.state),
34
+ lastScannedAt: new Date(data.lastScannedAtEpochMs),
35
+ createdAt: new Date(data.createdAtEpochMs),
36
+ updatedAt: new Date(data.updatedAtEpochMs),
37
+ };
38
+ }
39
+ }
@@ -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 { BaseSubscriptionManager } from '../common/baseSubscriptionManager';
7
+ export class VirtualPresenceSubscriptionManager extends BaseSubscriptionManager {
8
+ /**
9
+ * Notifies subscribers of a virtual presence update.
10
+ *
11
+ * @param virtualPresence An updated virtual presence.
12
+ */
13
+ virtualPresenceUpdated(virtualPresence) {
14
+ for (const subscriber of this.getSubscribers()) {
15
+ subscriber.virtualPresenceUpdated(virtualPresence);
16
+ }
17
+ }
18
+ connectionStatusChanged(state) {
19
+ super.connectionStatusChanged(state);
20
+ }
21
+ }
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * The status of an analysis result.
8
+ *
9
+ * @property PENDING The analysis is queued but has not yet started.
10
+ * @property COMPLETE The analysis has completed successfully with full data.
11
+ * @property PARTIAL The analysis has completed with partial data available.
12
+ * @property FAILED The analysis encountered an error and could not complete.
13
+ * @property UNAVAILABLE The analysis data is not available for this data holder.
14
+ *
15
+ * @enum
16
+ */
17
+ export var AnalysisResultStatusEntity;
18
+ (function (AnalysisResultStatusEntity) {
19
+ AnalysisResultStatusEntity["Pending"] = "PENDING";
20
+ AnalysisResultStatusEntity["Complete"] = "COMPLETE";
21
+ AnalysisResultStatusEntity["Partial"] = "PARTIAL";
22
+ AnalysisResultStatusEntity["Failed"] = "FAILED";
23
+ AnalysisResultStatusEntity["Unavailable"] = "UNAVAILABLE";
24
+ })(AnalysisResultStatusEntity || (AnalysisResultStatusEntity = {}));
25
+ /**
26
+ * Tri-state signal value representing confidence in a determination.
27
+ *
28
+ * @enum
29
+ */
30
+ export var SignalValueEntity;
31
+ (function (SignalValueEntity) {
32
+ SignalValueEntity["Yes"] = "YES";
33
+ SignalValueEntity["No"] = "NO";
34
+ SignalValueEntity["Unknown"] = "UNKNOWN";
35
+ })(SignalValueEntity || (SignalValueEntity = {}));
36
+ /**
37
+ * Describes how data in a category is shared with third parties.
38
+ *
39
+ * @property Shared Data is shared with third parties.
40
+ * @property SharedWithConsent Data is shared with third parties only with user consent.
41
+ * @property InferenceShared Inferred data is shared with third parties.
42
+ * @property None Data is not shared with third parties.
43
+ *
44
+ * @enum
45
+ */
46
+ export var ShareStyleEntity;
47
+ (function (ShareStyleEntity) {
48
+ ShareStyleEntity["Shared"] = "SHARED";
49
+ ShareStyleEntity["SharedWithConsent"] = "SHARED_WITH_CONSENT";
50
+ ShareStyleEntity["InferenceShared"] = "INFERENCE_SHARED";
51
+ ShareStyleEntity["None"] = "NONE";
52
+ ShareStyleEntity["Unknown"] = "UNKNOWN";
53
+ })(ShareStyleEntity || (ShareStyleEntity = {}));
54
+ /**
55
+ * Categories of personal data as identified in a privacy policy.
56
+ *
57
+ * @enum
58
+ */
59
+ export var DataCategoryEntity;
60
+ (function (DataCategoryEntity) {
61
+ DataCategoryEntity["AccountProfile"] = "ACCOUNT_PROFILE";
62
+ DataCategoryEntity["Authentication"] = "AUTHENTICATION";
63
+ DataCategoryEntity["Background"] = "BACKGROUND";
64
+ DataCategoryEntity["Biometric"] = "BIOMETRIC";
65
+ DataCategoryEntity["Communication"] = "COMMUNICATION";
66
+ DataCategoryEntity["Contacts"] = "CONTACTS";
67
+ DataCategoryEntity["Demographic"] = "DEMOGRAPHIC";
68
+ DataCategoryEntity["DeviceIdentifier"] = "DEVICE_IDENTIFIER";
69
+ DataCategoryEntity["Financial"] = "FINANCIAL";
70
+ DataCategoryEntity["GovernmentIssued"] = "GOVERNMENT_ISSUED";
71
+ DataCategoryEntity["Health"] = "HEALTH";
72
+ DataCategoryEntity["Inferences"] = "INFERENCES";
73
+ DataCategoryEntity["Location"] = "LOCATION";
74
+ DataCategoryEntity["Other"] = "OTHER";
75
+ DataCategoryEntity["Pii"] = "PII";
76
+ DataCategoryEntity["ThirdPartyData"] = "THIRD_PARTY_DATA";
77
+ DataCategoryEntity["Usage"] = "USAGE";
78
+ })(DataCategoryEntity || (DataCategoryEntity = {}));
79
+ /**
80
+ * Enumeration depicting how the data retention period is measured.
81
+ *
82
+ * @property INDEFINITE Data is retained indefinitely with no defined end date.
83
+ * @property RELATIVE_TO_ACCOUNT_CLOSURE_TIME Retention period starts when the account is closed.
84
+ * @property RELATIVE_TO_DATA_STORAGE_TIME Retention period starts when the data is stored.
85
+ * @property OTHER Retention policy does not fit standard categories.
86
+ *
87
+ * @enum
88
+ */
89
+ export var RetentionStyleEntity;
90
+ (function (RetentionStyleEntity) {
91
+ RetentionStyleEntity["Indefinite"] = "INDEFINITE";
92
+ RetentionStyleEntity["RelativeToAccountClosureTime"] = "RELATIVE_TO_ACCOUNT_CLOSURE_TIME";
93
+ RetentionStyleEntity["RelativeToDataStorageTime"] = "RELATIVE_TO_DATA_STORAGE_TIME";
94
+ RetentionStyleEntity["Other"] = "OTHER";
95
+ })(RetentionStyleEntity || (RetentionStyleEntity = {}));
96
+ /**
97
+ * The business category of an organization as classified by the analysis.
98
+ *
99
+ * @enum
100
+ */
101
+ export var OrganizationCategoryEntity;
102
+ (function (OrganizationCategoryEntity) {
103
+ OrganizationCategoryEntity["Automotive"] = "Automotive";
104
+ OrganizationCategoryEntity["Communications"] = "Communications";
105
+ OrganizationCategoryEntity["CommunityAndCharity"] = "CommunityAndCharity";
106
+ OrganizationCategoryEntity["Cryptocurrency"] = "Cryptocurrency";
107
+ OrganizationCategoryEntity["Dating"] = "Dating";
108
+ OrganizationCategoryEntity["Education"] = "Education";
109
+ OrganizationCategoryEntity["Employment"] = "Employment";
110
+ OrganizationCategoryEntity["EnergyAndUtilities"] = "EnergyAndUtilities";
111
+ OrganizationCategoryEntity["Entertainment"] = "Entertainment";
112
+ OrganizationCategoryEntity["Finance"] = "Finance";
113
+ OrganizationCategoryEntity["FoodAndDining"] = "FoodAndDining";
114
+ OrganizationCategoryEntity["Gambling"] = "Gambling";
115
+ OrganizationCategoryEntity["Government"] = "Government";
116
+ OrganizationCategoryEntity["Health"] = "Health";
117
+ OrganizationCategoryEntity["Insurance"] = "Insurance";
118
+ OrganizationCategoryEntity["Military"] = "Military";
119
+ OrganizationCategoryEntity["News"] = "News";
120
+ OrganizationCategoryEntity["Other"] = "Other";
121
+ OrganizationCategoryEntity["PersonalEmail"] = "PersonalEmail";
122
+ OrganizationCategoryEntity["PrivacyAndSecurity"] = "PrivacyAndSecurity";
123
+ OrganizationCategoryEntity["RealEstate"] = "RealEstate";
124
+ OrganizationCategoryEntity["ShippingAndDelivery"] = "ShippingAndDelivery";
125
+ OrganizationCategoryEntity["Shopping"] = "Shopping";
126
+ OrganizationCategoryEntity["SocialMedia"] = "SocialMedia";
127
+ OrganizationCategoryEntity["SportsAndFitness"] = "SportsAndFitness";
128
+ OrganizationCategoryEntity["Technology"] = "Technology";
129
+ OrganizationCategoryEntity["Transportation"] = "Transportation";
130
+ OrganizationCategoryEntity["Travel"] = "Travel";
131
+ OrganizationCategoryEntity["VideoGames"] = "VideoGames";
132
+ })(OrganizationCategoryEntity || (OrganizationCategoryEntity = {}));
@@ -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 {};
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Enumeration that defines the protection state of a data holder.
8
+ *
9
+ * @property MONITORED The data holder is being monitored.
10
+ * @property ACTION_REQUESTED An action has been requested against this data holder.
11
+ * @property RESOLVED The data holder has been resolved.
12
+ *
13
+ * @enum
14
+ */
15
+ export var DataHolderProtectionStateEntity;
16
+ (function (DataHolderProtectionStateEntity) {
17
+ DataHolderProtectionStateEntity["Monitored"] = "MONITORED";
18
+ DataHolderProtectionStateEntity["ActionRequested"] = "ACTION_REQUESTED";
19
+ DataHolderProtectionStateEntity["Resolved"] = "RESOLVED";
20
+ DataHolderProtectionStateEntity["Unknown"] = "UNKNOWN";
21
+ })(DataHolderProtectionStateEntity || (DataHolderProtectionStateEntity = {}));
@@ -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 {};
@@ -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 {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Enumeration that defines the provider type of the virtual presence.
8
+ *
9
+ * @enum
10
+ */
11
+ export var ProviderTypeEntity;
12
+ (function (ProviderTypeEntity) {
13
+ ProviderTypeEntity["Email"] = "EMAIL";
14
+ ProviderTypeEntity["Unknown"] = "UNKNOWN";
15
+ })(ProviderTypeEntity || (ProviderTypeEntity = {}));
16
+ /**
17
+ * Enumeration that defines the possible states of a virtual presence.
18
+ *
19
+ * @property CONNECTED: The virtual presence is active and connected to the provider.
20
+ * @property SCANNING: The virtual presence is currently being scanned.
21
+ * @property NEEDS_REAUTH: The virtual presence requires re-authentication with the provider.
22
+ * @property ERROR: The virtual presence encountered an error and is in a failed state.
23
+ * @property INACTIVE: The virtual presence is no longer active.
24
+ *
25
+ * @enum
26
+ */
27
+ export var VirtualPresenceStateEntity;
28
+ (function (VirtualPresenceStateEntity) {
29
+ VirtualPresenceStateEntity["Connected"] = "CONNECTED";
30
+ VirtualPresenceStateEntity["Scanning"] = "SCANNING";
31
+ VirtualPresenceStateEntity["NeedsReauth"] = "NEEDS_REAUTH";
32
+ VirtualPresenceStateEntity["Error"] = "ERROR";
33
+ VirtualPresenceStateEntity["Inactive"] = "INACTIVE";
34
+ VirtualPresenceStateEntity["Unknown"] = "UNKNOWN";
35
+ })(VirtualPresenceStateEntity || (VirtualPresenceStateEntity = {}));
@@ -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 {};
@@ -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 an analysis result.
9
+ */
10
+ export class GetAnalysisResultUseCase {
11
+ analysisResultService;
12
+ log;
13
+ constructor(analysisResultService) {
14
+ this.analysisResultService = analysisResultService;
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.analysisResultService.get(id);
20
+ }
21
+ }
@@ -0,0 +1,25 @@
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 analysis results.
9
+ */
10
+ export class ListAnalysisResultsUseCase {
11
+ analysisResultService;
12
+ log;
13
+ constructor(analysisResultService) {
14
+ this.analysisResultService = analysisResultService;
15
+ this.log = new DefaultLogger(this.constructor.name);
16
+ }
17
+ async execute(input) {
18
+ this.log.debug(this.constructor.name, { input });
19
+ return await this.analysisResultService.list({
20
+ virtualPresenceId: input.virtualPresenceId,
21
+ limit: input.limit,
22
+ nextToken: input.nextToken,
23
+ });
24
+ }
25
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { DefaultLogger, NotSignedInError, } from '@sudoplatform/sudo-common';
7
+ /**
8
+ * Application business logic for subscribing to analysis result events.
9
+ */
10
+ export class SubscribeToAnalysisResultUseCase {
11
+ analysisResultService;
12
+ sudoUserClient;
13
+ log;
14
+ constructor(analysisResultService, sudoUserClient) {
15
+ this.analysisResultService = analysisResultService;
16
+ this.sudoUserClient = sudoUserClient;
17
+ this.log = new DefaultLogger(this.constructor.name);
18
+ }
19
+ async execute(input) {
20
+ this.log.debug(this.constructor.name, {
21
+ subscriptionId: input.subscriptionId,
22
+ });
23
+ const owner = await this.sudoUserClient.getSubject();
24
+ if (!owner) {
25
+ throw new NotSignedInError();
26
+ }
27
+ await this.analysisResultService.subscribe({
28
+ subscriptionId: input.subscriptionId,
29
+ owner,
30
+ subscriber: input.subscriber,
31
+ });
32
+ }
33
+ }
@@ -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 { DefaultLogger } from '@sudoplatform/sudo-common';
7
+ /**
8
+ * Application business logic for unsubscribing from analysis result events.
9
+ */
10
+ export class UnsubscribeFromAnalysisResultUseCase {
11
+ analysisResultService;
12
+ log;
13
+ constructor(analysisResultService) {
14
+ this.analysisResultService = analysisResultService;
15
+ this.log = new DefaultLogger(this.constructor.name);
16
+ }
17
+ execute(subscriptionId) {
18
+ this.log.debug(this.constructor.name, {
19
+ subscriptionId,
20
+ });
21
+ this.analysisResultService.unsubscribe(subscriptionId);
22
+ }
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 { DefaultLogger } from '@sudoplatform/sudo-common';
7
+ /**
8
+ * Application business logic for retrieving a data holder.
9
+ */
10
+ export class GetDataHolderUseCase {
11
+ dataHolderService;
12
+ log;
13
+ constructor(dataHolderService) {
14
+ this.dataHolderService = dataHolderService;
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.dataHolderService.get(id);
20
+ }
21
+ }
@@ -0,0 +1,25 @@
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 data holders.
9
+ */
10
+ export class ListDataHoldersUseCase {
11
+ dataHolderService;
12
+ log;
13
+ constructor(dataHolderService) {
14
+ this.dataHolderService = dataHolderService;
15
+ this.log = new DefaultLogger(this.constructor.name);
16
+ }
17
+ async execute(input) {
18
+ this.log.debug(this.constructor.name, { input });
19
+ return await this.dataHolderService.list({
20
+ virtualPresenceId: input.virtualPresenceId,
21
+ limit: input.limit,
22
+ nextToken: input.nextToken,
23
+ });
24
+ }
25
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { DefaultLogger, NotSignedInError, } from '@sudoplatform/sudo-common';
7
+ /**
8
+ * Application business logic for subscribing to data holder events.
9
+ */
10
+ export class SubscribeToDataHoldersUseCase {
11
+ dataHolderService;
12
+ sudoUserClient;
13
+ log;
14
+ constructor(dataHolderService, sudoUserClient) {
15
+ this.dataHolderService = dataHolderService;
16
+ this.sudoUserClient = sudoUserClient;
17
+ this.log = new DefaultLogger(this.constructor.name);
18
+ }
19
+ async execute(input) {
20
+ this.log.debug(this.constructor.name, {
21
+ subscriptionId: input.subscriptionId,
22
+ });
23
+ const owner = await this.sudoUserClient.getSubject();
24
+ if (!owner) {
25
+ throw new NotSignedInError();
26
+ }
27
+ await this.dataHolderService.subscribe({
28
+ subscriptionId: input.subscriptionId,
29
+ owner,
30
+ subscriber: input.subscriber,
31
+ });
32
+ }
33
+ }
@@ -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 { DefaultLogger } from '@sudoplatform/sudo-common';
7
+ /**
8
+ * Application business logic for unsubscribing from data holder events.
9
+ */
10
+ export class UnsubscribeFromDataHoldersUseCase {
11
+ dataHolderService;
12
+ log;
13
+ constructor(dataHolderService) {
14
+ this.dataHolderService = dataHolderService;
15
+ this.log = new DefaultLogger(this.constructor.name);
16
+ }
17
+ execute(subscriptionId) {
18
+ this.log.debug(this.constructor.name, {
19
+ subscriptionId,
20
+ });
21
+ this.dataHolderService.unsubscribe(subscriptionId);
22
+ }
23
+ }
@@ -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 { DefaultLogger } from '@sudoplatform/sudo-common';
7
+ /**
8
+ * Application business logic for connecting a virtual presence using an authorization code.
9
+ */
10
+ export class ConnectVirtualPresenceWithAuthCodeUseCase {
11
+ virtualPresenceService;
12
+ log;
13
+ constructor(virtualPresenceService) {
14
+ this.virtualPresenceService = virtualPresenceService;
15
+ this.log = new DefaultLogger(this.constructor.name);
16
+ }
17
+ async execute(authCode) {
18
+ this.log.debug(this.constructor.name);
19
+ return await this.virtualPresenceService.connect({
20
+ authCode,
21
+ });
22
+ }
23
+ }