@sudoplatform/sudo-privacy-interaction 2.3.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/gen/graphqlTypes.js +308 -1
- package/cjs/private/data/action/defaultActionService.js +8 -0
- package/cjs/private/data/action/transformer/actionIntentTransformer.js +32 -0
- package/cjs/private/data/action/transformer/availableActionTransformer.js +8 -0
- package/cjs/private/data/analysis-result/defaultAnalysisResultService.js +6 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultStatusReasonTransformer.js +45 -0
- package/cjs/private/data/analysis-result/transformer/analysisResultTransformer.js +6 -0
- package/cjs/private/data/common/apiClient.js +21 -0
- package/cjs/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +6 -0
- package/cjs/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
- package/cjs/private/domain/entities/action/actionEntity.js +14 -0
- package/cjs/private/domain/entities/analysis-result/analysisResultEntity.js +20 -1
- package/cjs/private/domain/use-cases/action/listActionsForDataHolderUseCase.js +26 -0
- package/cjs/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.js +25 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +23 -1
- package/cjs/public/typings/action.js +14 -0
- package/cjs/public/typings/analysisResult.js +20 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/DefaultSudoPrivacyInteractionClient.html +77 -29
- package/docs/enums/ActionFulfilmentMethod.html +3 -3
- package/docs/enums/ActionIntent.html +31 -7
- package/docs/enums/ActionOrigin.html +5 -5
- package/docs/enums/ActionStatus.html +9 -9
- package/docs/enums/AnalysisResultStatus.html +6 -6
- package/docs/enums/AnalysisResultStatusReason.html +81 -0
- package/docs/enums/DataCategory.html +18 -18
- package/docs/enums/OrganizationAnalysisDomainResolution.html +3 -3
- package/docs/enums/OrganizationAnalysisMode.html +3 -3
- package/docs/enums/OrganizationCategory.html +31 -31
- package/docs/enums/RetentionStyle.html +5 -5
- package/docs/enums/ShareStyle.html +6 -6
- package/docs/enums/SignalValue.html +4 -4
- package/docs/hierarchy.html +7 -6
- package/docs/interfaces/Action.html +15 -15
- package/docs/interfaces/ActionContact.html +4 -4
- package/docs/interfaces/AnalysisResult.html +21 -13
- package/docs/interfaces/AnalysisResultData.html +8 -8
- package/docs/interfaces/AnalysisResultUpdate.html +20 -12
- package/docs/interfaces/AssistedEmailTemplate.html +3 -3
- package/docs/interfaces/AssistedPayload.html +8 -8
- package/docs/interfaces/AvailableAction.html +20 -9
- package/docs/interfaces/CapabilitySignals.html +10 -10
- package/docs/interfaces/CategorySignals.html +11 -11
- package/docs/interfaces/InitiateActionInput.html +4 -4
- package/docs/interfaces/ListActionsForDataHolderInput.html +85 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListAvailableActionsInput.html +14 -4
- package/docs/interfaces/ListDataHolderScanSummariesInput.html +1 -1
- package/docs/interfaces/ListDataHoldersInput.html +1 -1
- package/docs/interfaces/ListVirtualPresencesInput.html +1 -1
- package/docs/interfaces/OrganizationAnalysis.html +20 -12
- package/docs/interfaces/OrganizationIdentity.html +5 -5
- package/docs/interfaces/Pagination.html +2 -1
- package/docs/interfaces/PrivacyScore.html +4 -4
- package/docs/interfaces/PrivacySummary.html +4 -4
- package/docs/interfaces/RetentionInfo.html +4 -4
- package/docs/interfaces/RiskIndicators.html +8 -8
- package/docs/interfaces/ScoreContribution.html +3 -3
- package/docs/interfaces/ScoreCoverage.html +3 -3
- package/docs/interfaces/SudoPrivacyInteractionClient.html +75 -29
- package/docs/modules.html +4 -4
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +307 -0
- package/lib/private/data/action/defaultActionService.js +8 -0
- package/lib/private/data/action/transformer/actionIntentTransformer.js +32 -0
- package/lib/private/data/action/transformer/availableActionTransformer.js +8 -0
- package/lib/private/data/analysis-result/defaultAnalysisResultService.js +6 -0
- package/lib/private/data/analysis-result/transformer/analysisResultStatusReasonTransformer.js +41 -0
- package/lib/private/data/analysis-result/transformer/analysisResultTransformer.js +6 -0
- package/lib/private/data/common/apiClient.js +22 -1
- package/lib/private/data/organization-analysis/transformer/organizationAnalysisTransformer.js +6 -0
- package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
- package/lib/private/domain/entities/action/actionEntity.js +14 -0
- package/lib/private/domain/entities/analysis-result/analysisResultEntity.js +19 -0
- package/lib/private/domain/use-cases/action/listActionsForDataHolderUseCase.js +22 -0
- package/lib/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.js +21 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +23 -1
- package/lib/public/typings/action.js +14 -0
- package/lib/public/typings/analysisResult.js +19 -0
- package/package.json +6 -1
- package/types/gen/graphqlTypes.d.ts +78 -1
- package/types/gen/schema-types.d.ts +39 -2
- package/types/private/data/action/defaultActionService.d.ts +2 -1
- package/types/private/data/action/transformer/availableActionTransformer.d.ts +1 -0
- package/types/private/data/analysis-result/defaultAnalysisResultService.d.ts +1 -0
- package/types/private/data/analysis-result/transformer/analysisResultStatusReasonTransformer.d.ts +12 -0
- package/types/private/data/analysis-result/transformer/analysisResultTransformer.d.ts +1 -0
- package/types/private/data/common/apiClient.d.ts +8 -1
- package/types/private/data/organization-analysis/transformer/organizationAnalysisTransformer.d.ts +1 -0
- package/types/private/data/virtual-presence/defaultVirtualPresenceService.d.ts +1 -0
- package/types/private/domain/entities/action/actionEntity.d.ts +18 -0
- package/types/private/domain/entities/action/actionService.d.ts +36 -0
- package/types/private/domain/entities/analysis-result/analysisResultEntity.d.ts +20 -0
- package/types/private/domain/entities/organization-analysis/organizationAnalysisEntity.d.ts +3 -1
- package/types/private/domain/entities/virtual-presence/virtualPresenceService.d.ts +11 -1
- package/types/private/domain/use-cases/action/listActionsForDataHolderUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase.d.ts +16 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +3 -1
- package/types/public/inputs/action.d.ts +16 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +23 -1
- package/types/public/typings/action.d.ts +19 -0
- package/types/public/typings/analysisResult.d.ts +22 -0
- package/types/public/typings/organizationAnalysis.d.ts +3 -1
package/lib/gen/graphqlTypes.js
CHANGED
|
@@ -110,6 +110,7 @@ export const AvailableActionFieldsFragmentDoc = {
|
|
|
110
110
|
{ kind: 'Field', name: { kind: 'Name', value: 'origin' } },
|
|
111
111
|
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
112
112
|
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
113
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
113
114
|
],
|
|
114
115
|
},
|
|
115
116
|
},
|
|
@@ -355,6 +356,7 @@ export const AnalysisResultFieldsFragmentDoc = {
|
|
|
355
356
|
name: { kind: 'Name', value: 'dataHolderIdentifier' },
|
|
356
357
|
},
|
|
357
358
|
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
359
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'statusReason' } },
|
|
358
360
|
{
|
|
359
361
|
kind: 'Field',
|
|
360
362
|
name: { kind: 'Name', value: 'lastAnalyzedAtEpochMs' },
|
|
@@ -690,6 +692,7 @@ export const OrganizationAnalysisFieldsFragmentDoc = {
|
|
|
690
692
|
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
691
693
|
{ kind: 'Field', name: { kind: 'Name', value: 'domain' } },
|
|
692
694
|
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
695
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'statusReason' } },
|
|
693
696
|
{
|
|
694
697
|
kind: 'Field',
|
|
695
698
|
name: { kind: 'Name', value: 'lastAnalyzedAtEpochMs' },
|
|
@@ -1304,6 +1307,106 @@ export const RescanVirtualPresenceDocument = {
|
|
|
1304
1307
|
},
|
|
1305
1308
|
],
|
|
1306
1309
|
};
|
|
1310
|
+
export const RefreshVirtualPresenceStateDocument = {
|
|
1311
|
+
kind: 'Document',
|
|
1312
|
+
definitions: [
|
|
1313
|
+
{
|
|
1314
|
+
kind: 'OperationDefinition',
|
|
1315
|
+
operation: 'mutation',
|
|
1316
|
+
name: { kind: 'Name', value: 'RefreshVirtualPresenceState' },
|
|
1317
|
+
variableDefinitions: [
|
|
1318
|
+
{
|
|
1319
|
+
kind: 'VariableDefinition',
|
|
1320
|
+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
1321
|
+
type: {
|
|
1322
|
+
kind: 'NonNullType',
|
|
1323
|
+
type: {
|
|
1324
|
+
kind: 'NamedType',
|
|
1325
|
+
name: { kind: 'Name', value: 'String' },
|
|
1326
|
+
},
|
|
1327
|
+
},
|
|
1328
|
+
},
|
|
1329
|
+
],
|
|
1330
|
+
selectionSet: {
|
|
1331
|
+
kind: 'SelectionSet',
|
|
1332
|
+
selections: [
|
|
1333
|
+
{
|
|
1334
|
+
kind: 'Field',
|
|
1335
|
+
name: { kind: 'Name', value: 'refreshVirtualPresenceState' },
|
|
1336
|
+
arguments: [
|
|
1337
|
+
{
|
|
1338
|
+
kind: 'Argument',
|
|
1339
|
+
name: { kind: 'Name', value: 'id' },
|
|
1340
|
+
value: {
|
|
1341
|
+
kind: 'Variable',
|
|
1342
|
+
name: { kind: 'Name', value: 'id' },
|
|
1343
|
+
},
|
|
1344
|
+
},
|
|
1345
|
+
],
|
|
1346
|
+
selectionSet: {
|
|
1347
|
+
kind: 'SelectionSet',
|
|
1348
|
+
selections: [
|
|
1349
|
+
{
|
|
1350
|
+
kind: 'FragmentSpread',
|
|
1351
|
+
name: { kind: 'Name', value: 'VirtualPresenceFields' },
|
|
1352
|
+
},
|
|
1353
|
+
],
|
|
1354
|
+
},
|
|
1355
|
+
},
|
|
1356
|
+
],
|
|
1357
|
+
},
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
kind: 'FragmentDefinition',
|
|
1361
|
+
name: { kind: 'Name', value: 'VirtualPresenceFields' },
|
|
1362
|
+
typeCondition: {
|
|
1363
|
+
kind: 'NamedType',
|
|
1364
|
+
name: { kind: 'Name', value: 'VirtualPresence' },
|
|
1365
|
+
},
|
|
1366
|
+
selectionSet: {
|
|
1367
|
+
kind: 'SelectionSet',
|
|
1368
|
+
selections: [
|
|
1369
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
1370
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'providerType' } },
|
|
1371
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'identifier' } },
|
|
1372
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'state' } },
|
|
1373
|
+
{
|
|
1374
|
+
kind: 'Field',
|
|
1375
|
+
name: { kind: 'Name', value: 'lastScannedAtEpochMs' },
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
kind: 'Field',
|
|
1379
|
+
name: { kind: 'Name', value: 'lastScanFailureReason' },
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
kind: 'Field',
|
|
1383
|
+
name: { kind: 'Name', value: 'dataHolderCount' },
|
|
1384
|
+
selectionSet: {
|
|
1385
|
+
kind: 'SelectionSet',
|
|
1386
|
+
selections: [
|
|
1387
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'count' } },
|
|
1388
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'monitored' } },
|
|
1389
|
+
{
|
|
1390
|
+
kind: 'Field',
|
|
1391
|
+
name: { kind: 'Name', value: 'initiatedActions' },
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
kind: 'Field',
|
|
1395
|
+
name: { kind: 'Name', value: 'completedActions' },
|
|
1396
|
+
},
|
|
1397
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'archived' } },
|
|
1398
|
+
],
|
|
1399
|
+
},
|
|
1400
|
+
},
|
|
1401
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
1402
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
1403
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
1404
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
1405
|
+
],
|
|
1406
|
+
},
|
|
1407
|
+
},
|
|
1408
|
+
],
|
|
1409
|
+
};
|
|
1307
1410
|
export const InitiateActionDocument = {
|
|
1308
1411
|
kind: 'Document',
|
|
1309
1412
|
definitions: [
|
|
@@ -2338,6 +2441,7 @@ export const GetAnalysisResultDocument = {
|
|
|
2338
2441
|
name: { kind: 'Name', value: 'dataHolderIdentifier' },
|
|
2339
2442
|
},
|
|
2340
2443
|
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
2444
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'statusReason' } },
|
|
2341
2445
|
{
|
|
2342
2446
|
kind: 'Field',
|
|
2343
2447
|
name: { kind: 'Name', value: 'lastAnalyzedAtEpochMs' },
|
|
@@ -2676,6 +2780,7 @@ export const GetOrganizationAnalysisDocument = {
|
|
|
2676
2780
|
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
2677
2781
|
{ kind: 'Field', name: { kind: 'Name', value: 'domain' } },
|
|
2678
2782
|
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
2783
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'statusReason' } },
|
|
2679
2784
|
{
|
|
2680
2785
|
kind: 'Field',
|
|
2681
2786
|
name: { kind: 'Name', value: 'lastAnalyzedAtEpochMs' },
|
|
@@ -3025,6 +3130,7 @@ export const ListAnalysisResultsDocument = {
|
|
|
3025
3130
|
name: { kind: 'Name', value: 'dataHolderIdentifier' },
|
|
3026
3131
|
},
|
|
3027
3132
|
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3133
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'statusReason' } },
|
|
3028
3134
|
{
|
|
3029
3135
|
kind: 'Field',
|
|
3030
3136
|
name: { kind: 'Name', value: 'lastAnalyzedAtEpochMs' },
|
|
@@ -3207,6 +3313,14 @@ export const ListAvailableActionsDocument = {
|
|
|
3207
3313
|
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
3208
3314
|
},
|
|
3209
3315
|
},
|
|
3316
|
+
{
|
|
3317
|
+
kind: 'VariableDefinition',
|
|
3318
|
+
variable: {
|
|
3319
|
+
kind: 'Variable',
|
|
3320
|
+
name: { kind: 'Name', value: 'includeCompleted' },
|
|
3321
|
+
},
|
|
3322
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Boolean' } },
|
|
3323
|
+
},
|
|
3210
3324
|
],
|
|
3211
3325
|
selectionSet: {
|
|
3212
3326
|
kind: 'SelectionSet',
|
|
@@ -3223,6 +3337,14 @@ export const ListAvailableActionsDocument = {
|
|
|
3223
3337
|
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3224
3338
|
},
|
|
3225
3339
|
},
|
|
3340
|
+
{
|
|
3341
|
+
kind: 'Argument',
|
|
3342
|
+
name: { kind: 'Name', value: 'includeCompleted' },
|
|
3343
|
+
value: {
|
|
3344
|
+
kind: 'Variable',
|
|
3345
|
+
name: { kind: 'Name', value: 'includeCompleted' },
|
|
3346
|
+
},
|
|
3347
|
+
},
|
|
3226
3348
|
],
|
|
3227
3349
|
selectionSet: {
|
|
3228
3350
|
kind: 'SelectionSet',
|
|
@@ -3263,6 +3385,187 @@ export const ListAvailableActionsDocument = {
|
|
|
3263
3385
|
{ kind: 'Field', name: { kind: 'Name', value: 'origin' } },
|
|
3264
3386
|
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
3265
3387
|
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
3388
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3389
|
+
],
|
|
3390
|
+
},
|
|
3391
|
+
},
|
|
3392
|
+
],
|
|
3393
|
+
};
|
|
3394
|
+
export const ListActionsForDataHolderDocument = {
|
|
3395
|
+
kind: 'Document',
|
|
3396
|
+
definitions: [
|
|
3397
|
+
{
|
|
3398
|
+
kind: 'OperationDefinition',
|
|
3399
|
+
operation: 'query',
|
|
3400
|
+
name: { kind: 'Name', value: 'ListActionsForDataHolder' },
|
|
3401
|
+
variableDefinitions: [
|
|
3402
|
+
{
|
|
3403
|
+
kind: 'VariableDefinition',
|
|
3404
|
+
variable: {
|
|
3405
|
+
kind: 'Variable',
|
|
3406
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3407
|
+
},
|
|
3408
|
+
type: {
|
|
3409
|
+
kind: 'NonNullType',
|
|
3410
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
3411
|
+
},
|
|
3412
|
+
},
|
|
3413
|
+
{
|
|
3414
|
+
kind: 'VariableDefinition',
|
|
3415
|
+
variable: {
|
|
3416
|
+
kind: 'Variable',
|
|
3417
|
+
name: { kind: 'Name', value: 'limit' },
|
|
3418
|
+
},
|
|
3419
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },
|
|
3420
|
+
},
|
|
3421
|
+
{
|
|
3422
|
+
kind: 'VariableDefinition',
|
|
3423
|
+
variable: {
|
|
3424
|
+
kind: 'Variable',
|
|
3425
|
+
name: { kind: 'Name', value: 'nextToken' },
|
|
3426
|
+
},
|
|
3427
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
|
|
3428
|
+
},
|
|
3429
|
+
],
|
|
3430
|
+
selectionSet: {
|
|
3431
|
+
kind: 'SelectionSet',
|
|
3432
|
+
selections: [
|
|
3433
|
+
{
|
|
3434
|
+
kind: 'Field',
|
|
3435
|
+
name: { kind: 'Name', value: 'listActionsForDataHolder' },
|
|
3436
|
+
arguments: [
|
|
3437
|
+
{
|
|
3438
|
+
kind: 'Argument',
|
|
3439
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3440
|
+
value: {
|
|
3441
|
+
kind: 'Variable',
|
|
3442
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3443
|
+
},
|
|
3444
|
+
},
|
|
3445
|
+
{
|
|
3446
|
+
kind: 'Argument',
|
|
3447
|
+
name: { kind: 'Name', value: 'limit' },
|
|
3448
|
+
value: {
|
|
3449
|
+
kind: 'Variable',
|
|
3450
|
+
name: { kind: 'Name', value: 'limit' },
|
|
3451
|
+
},
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
kind: 'Argument',
|
|
3455
|
+
name: { kind: 'Name', value: 'nextToken' },
|
|
3456
|
+
value: {
|
|
3457
|
+
kind: 'Variable',
|
|
3458
|
+
name: { kind: 'Name', value: 'nextToken' },
|
|
3459
|
+
},
|
|
3460
|
+
},
|
|
3461
|
+
],
|
|
3462
|
+
selectionSet: {
|
|
3463
|
+
kind: 'SelectionSet',
|
|
3464
|
+
selections: [
|
|
3465
|
+
{
|
|
3466
|
+
kind: 'Field',
|
|
3467
|
+
name: { kind: 'Name', value: 'items' },
|
|
3468
|
+
selectionSet: {
|
|
3469
|
+
kind: 'SelectionSet',
|
|
3470
|
+
selections: [
|
|
3471
|
+
{
|
|
3472
|
+
kind: 'FragmentSpread',
|
|
3473
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
3474
|
+
},
|
|
3475
|
+
],
|
|
3476
|
+
},
|
|
3477
|
+
},
|
|
3478
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'nextToken' } },
|
|
3479
|
+
],
|
|
3480
|
+
},
|
|
3481
|
+
},
|
|
3482
|
+
],
|
|
3483
|
+
},
|
|
3484
|
+
},
|
|
3485
|
+
{
|
|
3486
|
+
kind: 'FragmentDefinition',
|
|
3487
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
3488
|
+
typeCondition: {
|
|
3489
|
+
kind: 'NamedType',
|
|
3490
|
+
name: { kind: 'Name', value: 'Action' },
|
|
3491
|
+
},
|
|
3492
|
+
selectionSet: {
|
|
3493
|
+
kind: 'SelectionSet',
|
|
3494
|
+
selections: [
|
|
3495
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
3496
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'virtualPresenceId' } },
|
|
3497
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'dataHolderId' } },
|
|
3498
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
3499
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
3500
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
3501
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3502
|
+
{
|
|
3503
|
+
kind: 'Field',
|
|
3504
|
+
name: { kind: 'Name', value: 'assistedPayload' },
|
|
3505
|
+
selectionSet: {
|
|
3506
|
+
kind: 'SelectionSet',
|
|
3507
|
+
selections: [
|
|
3508
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'toAddress' } },
|
|
3509
|
+
{
|
|
3510
|
+
kind: 'Field',
|
|
3511
|
+
name: { kind: 'Name', value: 'unsubscribeUrl' },
|
|
3512
|
+
},
|
|
3513
|
+
{
|
|
3514
|
+
kind: 'Field',
|
|
3515
|
+
name: { kind: 'Name', value: 'unsubscribeMailto' },
|
|
3516
|
+
},
|
|
3517
|
+
{
|
|
3518
|
+
kind: 'Field',
|
|
3519
|
+
name: { kind: 'Name', value: 'contact' },
|
|
3520
|
+
selectionSet: {
|
|
3521
|
+
kind: 'SelectionSet',
|
|
3522
|
+
selections: [
|
|
3523
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'email' } },
|
|
3524
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'phone' } },
|
|
3525
|
+
{
|
|
3526
|
+
kind: 'Field',
|
|
3527
|
+
name: { kind: 'Name', value: 'address' },
|
|
3528
|
+
},
|
|
3529
|
+
],
|
|
3530
|
+
},
|
|
3531
|
+
},
|
|
3532
|
+
{
|
|
3533
|
+
kind: 'Field',
|
|
3534
|
+
name: { kind: 'Name', value: 'jurisdiction' },
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
kind: 'Field',
|
|
3538
|
+
name: { kind: 'Name', value: 'instructions' },
|
|
3539
|
+
},
|
|
3540
|
+
{
|
|
3541
|
+
kind: 'Field',
|
|
3542
|
+
name: { kind: 'Name', value: 'emailTemplate' },
|
|
3543
|
+
selectionSet: {
|
|
3544
|
+
kind: 'SelectionSet',
|
|
3545
|
+
selections: [
|
|
3546
|
+
{
|
|
3547
|
+
kind: 'Field',
|
|
3548
|
+
name: { kind: 'Name', value: 'subject' },
|
|
3549
|
+
},
|
|
3550
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'body' } },
|
|
3551
|
+
],
|
|
3552
|
+
},
|
|
3553
|
+
},
|
|
3554
|
+
],
|
|
3555
|
+
},
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
kind: 'Field',
|
|
3559
|
+
name: { kind: 'Name', value: 'initiatedAtEpochMs' },
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
kind: 'Field',
|
|
3563
|
+
name: { kind: 'Name', value: 'completedAtEpochMs' },
|
|
3564
|
+
},
|
|
3565
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
3566
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
3567
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
3568
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
3266
3569
|
],
|
|
3267
3570
|
},
|
|
3268
3571
|
},
|
|
@@ -3647,6 +3950,10 @@ export const OnAnalysisResultUpdateDocument = {
|
|
|
3647
3950
|
name: { kind: 'Name', value: 'dataHolderIdentifier' },
|
|
3648
3951
|
},
|
|
3649
3952
|
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3953
|
+
{
|
|
3954
|
+
kind: 'Field',
|
|
3955
|
+
name: { kind: 'Name', value: 'statusReason' },
|
|
3956
|
+
},
|
|
3650
3957
|
{
|
|
3651
3958
|
kind: 'Field',
|
|
3652
3959
|
name: { kind: 'Name', value: 'lastAnalyzedAtEpochMs' },
|
|
@@ -51,6 +51,14 @@ export class DefaultActionService {
|
|
|
51
51
|
nextToken: result.nextToken ?? undefined,
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
+
async listForDataHolder(input) {
|
|
55
|
+
const result = await this.appSync.listActionsForDataHolder(input);
|
|
56
|
+
const actions = (result.items ?? []).map((item) => this.actionTransformer.fromGraphQLToEntity(item));
|
|
57
|
+
return {
|
|
58
|
+
actions,
|
|
59
|
+
nextToken: result.nextToken ?? undefined,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
54
62
|
async subscribe(input) {
|
|
55
63
|
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
56
64
|
if (!this.subscriptionManager.getWatcher()) {
|
|
@@ -16,6 +16,14 @@ export class ActionIntentTransformer {
|
|
|
16
16
|
return ActionIntent.DeleteMyData;
|
|
17
17
|
case ActionIntentEntity.LimitDataUse:
|
|
18
18
|
return ActionIntent.LimitDataUse;
|
|
19
|
+
case ActionIntentEntity.SwapEmail:
|
|
20
|
+
return ActionIntent.SwapEmail;
|
|
21
|
+
case ActionIntentEntity.SwapPhone:
|
|
22
|
+
return ActionIntent.SwapPhone;
|
|
23
|
+
case ActionIntentEntity.SwapVirtualCard:
|
|
24
|
+
return ActionIntent.SwapVirtualCard;
|
|
25
|
+
case ActionIntentEntity.SaveInPassword:
|
|
26
|
+
return ActionIntent.SaveInPassword;
|
|
19
27
|
case ActionIntentEntity.Other:
|
|
20
28
|
return ActionIntent.Other;
|
|
21
29
|
}
|
|
@@ -30,6 +38,14 @@ export class ActionIntentTransformer {
|
|
|
30
38
|
return ActionIntentEntity.DeleteMyData;
|
|
31
39
|
case ActionIntent.LimitDataUse:
|
|
32
40
|
return ActionIntentEntity.LimitDataUse;
|
|
41
|
+
case ActionIntent.SwapEmail:
|
|
42
|
+
return ActionIntentEntity.SwapEmail;
|
|
43
|
+
case ActionIntent.SwapPhone:
|
|
44
|
+
return ActionIntentEntity.SwapPhone;
|
|
45
|
+
case ActionIntent.SwapVirtualCard:
|
|
46
|
+
return ActionIntentEntity.SwapVirtualCard;
|
|
47
|
+
case ActionIntent.SaveInPassword:
|
|
48
|
+
return ActionIntentEntity.SaveInPassword;
|
|
33
49
|
case ActionIntent.Other:
|
|
34
50
|
return ActionIntentEntity.Other;
|
|
35
51
|
}
|
|
@@ -44,6 +60,14 @@ export class ActionIntentTransformer {
|
|
|
44
60
|
return ActionIntentEntity.DeleteMyData;
|
|
45
61
|
case 'LIMIT_DATA_USE':
|
|
46
62
|
return ActionIntentEntity.LimitDataUse;
|
|
63
|
+
case 'SWAP_EMAIL':
|
|
64
|
+
return ActionIntentEntity.SwapEmail;
|
|
65
|
+
case 'SWAP_PHONE':
|
|
66
|
+
return ActionIntentEntity.SwapPhone;
|
|
67
|
+
case 'SWAP_VIRTUAL_CARD':
|
|
68
|
+
return ActionIntentEntity.SwapVirtualCard;
|
|
69
|
+
case 'SAVE_IN_PASSWORD':
|
|
70
|
+
return ActionIntentEntity.SaveInPassword;
|
|
47
71
|
default:
|
|
48
72
|
return ActionIntentEntity.Other;
|
|
49
73
|
}
|
|
@@ -58,6 +82,14 @@ export class ActionIntentTransformer {
|
|
|
58
82
|
return 'DELETE_MY_DATA';
|
|
59
83
|
case ActionIntentEntity.LimitDataUse:
|
|
60
84
|
return 'LIMIT_DATA_USE';
|
|
85
|
+
case ActionIntentEntity.SwapEmail:
|
|
86
|
+
return 'SWAP_EMAIL';
|
|
87
|
+
case ActionIntentEntity.SwapPhone:
|
|
88
|
+
return 'SWAP_PHONE';
|
|
89
|
+
case ActionIntentEntity.SwapVirtualCard:
|
|
90
|
+
return 'SWAP_VIRTUAL_CARD';
|
|
91
|
+
case ActionIntentEntity.SaveInPassword:
|
|
92
|
+
return 'SAVE_IN_PASSWORD';
|
|
61
93
|
case ActionIntentEntity.Other:
|
|
62
94
|
return 'OTHER';
|
|
63
95
|
}
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
import { ActionFulfilmentMethodTransformer } from './actionFulfilmentMethodTransformer';
|
|
7
7
|
import { ActionIntentTransformer } from './actionIntentTransformer';
|
|
8
8
|
import { ActionOriginTransformer } from './actionOriginTransformer';
|
|
9
|
+
import { ActionStatusTransformer } from './actionStatusTransformer';
|
|
9
10
|
export class AvailableActionTransformer {
|
|
10
11
|
intentTransformer = new ActionIntentTransformer();
|
|
11
12
|
fulfilmentMethodTransformer = new ActionFulfilmentMethodTransformer();
|
|
12
13
|
originTransformer = new ActionOriginTransformer();
|
|
14
|
+
statusTransformer = new ActionStatusTransformer();
|
|
13
15
|
fromGraphQLToEntity(data) {
|
|
14
16
|
return {
|
|
15
17
|
intent: this.intentTransformer.fromGraphQLToEntity(data.intent),
|
|
@@ -18,6 +20,9 @@ export class AvailableActionTransformer {
|
|
|
18
20
|
origin: this.originTransformer.fromGraphQLToEntity(data.origin),
|
|
19
21
|
title: data.title ?? undefined,
|
|
20
22
|
description: data.description ?? undefined,
|
|
23
|
+
status: data.status != null
|
|
24
|
+
? this.statusTransformer.fromGraphQLToEntity(data.status)
|
|
25
|
+
: undefined,
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
28
|
fromEntityToAPI(entity) {
|
|
@@ -28,6 +33,9 @@ export class AvailableActionTransformer {
|
|
|
28
33
|
origin: this.originTransformer.fromEntityToAPI(entity.origin),
|
|
29
34
|
title: entity.title,
|
|
30
35
|
description: entity.description,
|
|
36
|
+
status: entity.status !== undefined
|
|
37
|
+
? this.statusTransformer.fromEntityToAPI(entity.status)
|
|
38
|
+
: undefined,
|
|
31
39
|
};
|
|
32
40
|
}
|
|
33
41
|
}
|
|
@@ -5,17 +5,21 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { ConnectionState, } from '../../../public/typings/subscription';
|
|
7
7
|
import { AnalysisResultSubscriptionManager } from './analysisResultSubscriptionManager';
|
|
8
|
+
import { AnalysisResultStatusReasonTransformer } from './transformer/analysisResultStatusReasonTransformer';
|
|
8
9
|
import { AnalysisResultStatusTransformer } from './transformer/analysisResultStatusTransformer';
|
|
9
10
|
import { AnalysisResultTransformer } from './transformer/analysisResultTransformer';
|
|
10
11
|
export class DefaultAnalysisResultService {
|
|
11
12
|
appSync;
|
|
12
13
|
analysisResultTransformer;
|
|
13
14
|
analysisResultStatusTransformer;
|
|
15
|
+
analysisResultStatusReasonTransformer;
|
|
14
16
|
subscriptionManager;
|
|
15
17
|
constructor(appSync) {
|
|
16
18
|
this.appSync = appSync;
|
|
17
19
|
this.analysisResultTransformer = new AnalysisResultTransformer();
|
|
18
20
|
this.analysisResultStatusTransformer = new AnalysisResultStatusTransformer();
|
|
21
|
+
this.analysisResultStatusReasonTransformer =
|
|
22
|
+
new AnalysisResultStatusReasonTransformer();
|
|
19
23
|
this.subscriptionManager = new AnalysisResultSubscriptionManager();
|
|
20
24
|
}
|
|
21
25
|
async get(id) {
|
|
@@ -59,11 +63,13 @@ export class DefaultAnalysisResultService {
|
|
|
59
63
|
const item = result.data?.onAnalysisResultUpdate;
|
|
60
64
|
if (item) {
|
|
61
65
|
const statusEntity = this.analysisResultStatusTransformer.fromGraphQLToEntity(item.status);
|
|
66
|
+
const statusReason = this.analysisResultStatusReasonTransformer.fromEntityToAPI(this.analysisResultStatusReasonTransformer.fromGraphQLToEntity(item.statusReason));
|
|
62
67
|
const update = {
|
|
63
68
|
id: item.id,
|
|
64
69
|
virtualPresenceId: item.virtualPresenceId,
|
|
65
70
|
dataHolderIdentifier: item.dataHolderIdentifier,
|
|
66
71
|
status: this.analysisResultStatusTransformer.fromEntityToAPI(statusEntity),
|
|
72
|
+
...(statusReason !== undefined && { statusReason }),
|
|
67
73
|
lastAnalyzedAt: new Date(item.lastAnalyzedAtEpochMs),
|
|
68
74
|
owner: item.owner,
|
|
69
75
|
version: item.version,
|
|
@@ -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 { AnalysisResultStatusReason } from '../../../../public/typings/analysisResult';
|
|
7
|
+
import { AnalysisResultStatusReasonEntity } from '../../../domain/entities/analysis-result/analysisResultEntity';
|
|
8
|
+
export class AnalysisResultStatusReasonTransformer {
|
|
9
|
+
fromGraphQLToEntity(data) {
|
|
10
|
+
switch (data) {
|
|
11
|
+
case 'INVALID_DOMAIN':
|
|
12
|
+
return AnalysisResultStatusReasonEntity.InvalidDomain;
|
|
13
|
+
case 'POLICY_UNAVAILABLE':
|
|
14
|
+
return AnalysisResultStatusReasonEntity.PolicyUnavailable;
|
|
15
|
+
case 'MALICIOUS':
|
|
16
|
+
return AnalysisResultStatusReasonEntity.Malicious;
|
|
17
|
+
case 'NOT_ATTEMPTED':
|
|
18
|
+
return AnalysisResultStatusReasonEntity.NotAttempted;
|
|
19
|
+
case 'OTHER':
|
|
20
|
+
return AnalysisResultStatusReasonEntity.Other;
|
|
21
|
+
default:
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
fromEntityToAPI(entity) {
|
|
26
|
+
switch (entity) {
|
|
27
|
+
case AnalysisResultStatusReasonEntity.InvalidDomain:
|
|
28
|
+
return AnalysisResultStatusReason.InvalidDomain;
|
|
29
|
+
case AnalysisResultStatusReasonEntity.PolicyUnavailable:
|
|
30
|
+
return AnalysisResultStatusReason.PolicyUnavailable;
|
|
31
|
+
case AnalysisResultStatusReasonEntity.Malicious:
|
|
32
|
+
return AnalysisResultStatusReason.Malicious;
|
|
33
|
+
case AnalysisResultStatusReasonEntity.NotAttempted:
|
|
34
|
+
return AnalysisResultStatusReason.NotAttempted;
|
|
35
|
+
case AnalysisResultStatusReasonEntity.Other:
|
|
36
|
+
return AnalysisResultStatusReason.Other;
|
|
37
|
+
default:
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -4,16 +4,20 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { AnalysisResultDataTransformer } from './analysisResultDataTransformer';
|
|
7
|
+
import { AnalysisResultStatusReasonTransformer } from './analysisResultStatusReasonTransformer';
|
|
7
8
|
import { AnalysisResultStatusTransformer } from './analysisResultStatusTransformer';
|
|
8
9
|
export class AnalysisResultTransformer {
|
|
9
10
|
statusTransformer = new AnalysisResultStatusTransformer();
|
|
11
|
+
statusReasonTransformer = new AnalysisResultStatusReasonTransformer();
|
|
10
12
|
dataTransformer = new AnalysisResultDataTransformer();
|
|
11
13
|
fromGraphQLToEntity(data) {
|
|
14
|
+
const statusReason = this.statusReasonTransformer.fromGraphQLToEntity(data.statusReason);
|
|
12
15
|
return {
|
|
13
16
|
id: data.id,
|
|
14
17
|
virtualPresenceId: data.virtualPresenceId,
|
|
15
18
|
dataHolderIdentifier: data.dataHolderIdentifier,
|
|
16
19
|
status: this.statusTransformer.fromGraphQLToEntity(data.status),
|
|
20
|
+
...(statusReason !== undefined && { statusReason }),
|
|
17
21
|
lastAnalyzedAt: new Date(data.lastAnalyzedAtEpochMs),
|
|
18
22
|
data: data.data
|
|
19
23
|
? this.dataTransformer.fromGraphQLToEntity(data.data)
|
|
@@ -25,11 +29,13 @@ export class AnalysisResultTransformer {
|
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
fromEntityToAPI(entity) {
|
|
32
|
+
const statusReason = this.statusReasonTransformer.fromEntityToAPI(entity.statusReason);
|
|
28
33
|
return {
|
|
29
34
|
id: entity.id,
|
|
30
35
|
virtualPresenceId: entity.virtualPresenceId,
|
|
31
36
|
dataHolderIdentifier: entity.dataHolderIdentifier,
|
|
32
37
|
status: this.statusTransformer.fromEntityToAPI(entity.status),
|
|
38
|
+
...(statusReason !== undefined && { statusReason }),
|
|
33
39
|
lastAnalyzedAt: entity.lastAnalyzedAt,
|
|
34
40
|
data: entity.data
|
|
35
41
|
? this.dataTransformer.fromEntityToAPI(entity.data)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { DefaultApiClientManager, } from '@sudoplatform/sudo-api-client';
|
|
7
7
|
import { DefaultLogger, FatalError, UnknownGraphQLError, isGraphQLNetworkError, mapNetworkErrorToClientError, } from '@sudoplatform/sudo-common';
|
|
8
|
-
import { ArchiveDataHolderDocument, ConfirmActionOutcomeDocument, ConnectVirtualPresenceDocument, DisconnectVirtualPresenceDocument, GetActionDocument, GetAnalysisResultDocument, GetDataHolderDocument, GetProviderConfigurationDocument, GetOrganizationAnalysisDocument, InitiateActionDocument, ListAnalysisResultsDocument, ListAvailableActionsDocument, ListDataHolderScanSummariesDocument, ListDataHoldersDocument, ListVirtualPresencesDocument, OnActionStatusUpdateDocument, OnAnalysisResultUpdateDocument, OnDataHoldersUpdateDocument, OnVirtualPresenceUpdateDocument, RescanVirtualPresenceDocument, UnarchiveDataHolderDocument, } from '../../../gen/graphqlTypes';
|
|
8
|
+
import { ArchiveDataHolderDocument, ConfirmActionOutcomeDocument, ConnectVirtualPresenceDocument, DisconnectVirtualPresenceDocument, GetActionDocument, GetAnalysisResultDocument, GetDataHolderDocument, GetProviderConfigurationDocument, GetOrganizationAnalysisDocument, InitiateActionDocument, ListAnalysisResultsDocument, ListActionsForDataHolderDocument, ListAvailableActionsDocument, ListDataHolderScanSummariesDocument, ListDataHoldersDocument, ListVirtualPresencesDocument, OnActionStatusUpdateDocument, OnAnalysisResultUpdateDocument, OnDataHoldersUpdateDocument, OnVirtualPresenceUpdateDocument, RefreshVirtualPresenceStateDocument, RescanVirtualPresenceDocument, UnarchiveDataHolderDocument, } from '../../../gen/graphqlTypes';
|
|
9
9
|
import { ErrorTransformer } from './transformer/errorTransformer';
|
|
10
10
|
export class ApiClient {
|
|
11
11
|
log;
|
|
@@ -43,6 +43,14 @@ export class ApiClient {
|
|
|
43
43
|
});
|
|
44
44
|
return data.rescanVirtualPresence;
|
|
45
45
|
}
|
|
46
|
+
async refreshVirtualPresenceState(id) {
|
|
47
|
+
const data = await this.performMutation({
|
|
48
|
+
mutation: RefreshVirtualPresenceStateDocument,
|
|
49
|
+
variables: { id },
|
|
50
|
+
calleeName: this.refreshVirtualPresenceState.name,
|
|
51
|
+
});
|
|
52
|
+
return data.refreshVirtualPresenceState;
|
|
53
|
+
}
|
|
46
54
|
async listVirtualPresences(input) {
|
|
47
55
|
const data = await this.performQuery({
|
|
48
56
|
query: ListVirtualPresencesDocument,
|
|
@@ -171,11 +179,24 @@ export class ApiClient {
|
|
|
171
179
|
query: ListAvailableActionsDocument,
|
|
172
180
|
variables: {
|
|
173
181
|
dataHolderId: input.dataHolderId,
|
|
182
|
+
includeCompleted: input.includeCompleted,
|
|
174
183
|
},
|
|
175
184
|
calleeName: this.listAvailableActions.name,
|
|
176
185
|
});
|
|
177
186
|
return data.listAvailableActions;
|
|
178
187
|
}
|
|
188
|
+
async listActionsForDataHolder(input) {
|
|
189
|
+
const data = await this.performQuery({
|
|
190
|
+
query: ListActionsForDataHolderDocument,
|
|
191
|
+
variables: {
|
|
192
|
+
dataHolderId: input.dataHolderId,
|
|
193
|
+
limit: input.limit,
|
|
194
|
+
nextToken: input.nextToken,
|
|
195
|
+
},
|
|
196
|
+
calleeName: this.listActionsForDataHolder.name,
|
|
197
|
+
});
|
|
198
|
+
return data.listActionsForDataHolder;
|
|
199
|
+
}
|
|
179
200
|
onVirtualPresenceUpdated(owner) {
|
|
180
201
|
return this.performSubscription({
|
|
181
202
|
subscription: OnVirtualPresenceUpdateDocument,
|