@sudoplatform/sudo-privacy-interaction 2.4.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 +299 -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/common/apiClient.js +21 -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/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/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/hierarchy.html +7 -6
- package/docs/interfaces/Action.html +15 -15
- package/docs/interfaces/ActionContact.html +4 -4
- package/docs/interfaces/AssistedEmailTemplate.html +3 -3
- package/docs/interfaces/AssistedPayload.html +8 -8
- package/docs/interfaces/AvailableAction.html +20 -9
- 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/Pagination.html +2 -1
- package/docs/interfaces/SudoPrivacyInteractionClient.html +75 -29
- package/docs/modules.html +2 -2
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +298 -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/common/apiClient.js +22 -1
- package/lib/private/data/virtual-presence/defaultVirtualPresenceService.js +4 -0
- package/lib/private/domain/entities/action/actionEntity.js +14 -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/package.json +6 -1
- package/types/gen/graphqlTypes.d.ts +71 -1
- package/types/gen/schema-types.d.ts +35 -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/common/apiClient.d.ts +8 -1
- 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/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/cjs/gen/graphqlTypes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OnActionStatusUpdateDocument = exports.OnAnalysisResultUpdateDocument = exports.OnDataHoldersUpdateDocument = exports.OnVirtualPresenceUpdateDocument = exports.GetActionDocument = exports.ListAvailableActionsDocument = exports.ListDataHolderScanSummariesDocument = exports.ListAnalysisResultsDocument = exports.GetOrganizationAnalysisDocument = exports.GetAnalysisResultDocument = exports.ListDataHoldersDocument = exports.GetDataHolderDocument = exports.ListVirtualPresencesDocument = exports.GetProviderConfigurationDocument = exports.UnarchiveDataHolderDocument = exports.ArchiveDataHolderDocument = exports.ConfirmActionOutcomeDocument = exports.InitiateActionDocument = exports.RescanVirtualPresenceDocument = exports.DisconnectVirtualPresenceDocument = exports.ConnectVirtualPresenceDocument = exports.VirtualPresenceFieldsFragmentDoc = exports.OrganizationAnalysisFieldsFragmentDoc = exports.DataHolderScanSummaryFieldsFragmentDoc = exports.DataHolderFieldsFragmentDoc = exports.AnalysisResultFieldsFragmentDoc = exports.AnalysisResultDataFieldsFragmentDoc = exports.AvailableActionFieldsFragmentDoc = exports.ActionFieldsFragmentDoc = void 0;
|
|
3
|
+
exports.OnActionStatusUpdateDocument = exports.OnAnalysisResultUpdateDocument = exports.OnDataHoldersUpdateDocument = exports.OnVirtualPresenceUpdateDocument = exports.GetActionDocument = exports.ListActionsForDataHolderDocument = exports.ListAvailableActionsDocument = exports.ListDataHolderScanSummariesDocument = exports.ListAnalysisResultsDocument = exports.GetOrganizationAnalysisDocument = exports.GetAnalysisResultDocument = exports.ListDataHoldersDocument = exports.GetDataHolderDocument = exports.ListVirtualPresencesDocument = exports.GetProviderConfigurationDocument = exports.UnarchiveDataHolderDocument = exports.ArchiveDataHolderDocument = exports.ConfirmActionOutcomeDocument = exports.InitiateActionDocument = exports.RefreshVirtualPresenceStateDocument = exports.RescanVirtualPresenceDocument = exports.DisconnectVirtualPresenceDocument = exports.ConnectVirtualPresenceDocument = exports.VirtualPresenceFieldsFragmentDoc = exports.OrganizationAnalysisFieldsFragmentDoc = exports.DataHolderScanSummaryFieldsFragmentDoc = exports.DataHolderFieldsFragmentDoc = exports.AnalysisResultFieldsFragmentDoc = exports.AnalysisResultDataFieldsFragmentDoc = exports.AvailableActionFieldsFragmentDoc = exports.ActionFieldsFragmentDoc = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./schema-types"), exports);
|
|
6
6
|
exports.ActionFieldsFragmentDoc = {
|
|
@@ -114,6 +114,7 @@ exports.AvailableActionFieldsFragmentDoc = {
|
|
|
114
114
|
{ kind: 'Field', name: { kind: 'Name', value: 'origin' } },
|
|
115
115
|
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
116
116
|
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
117
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
117
118
|
],
|
|
118
119
|
},
|
|
119
120
|
},
|
|
@@ -1310,6 +1311,106 @@ exports.RescanVirtualPresenceDocument = {
|
|
|
1310
1311
|
},
|
|
1311
1312
|
],
|
|
1312
1313
|
};
|
|
1314
|
+
exports.RefreshVirtualPresenceStateDocument = {
|
|
1315
|
+
kind: 'Document',
|
|
1316
|
+
definitions: [
|
|
1317
|
+
{
|
|
1318
|
+
kind: 'OperationDefinition',
|
|
1319
|
+
operation: 'mutation',
|
|
1320
|
+
name: { kind: 'Name', value: 'RefreshVirtualPresenceState' },
|
|
1321
|
+
variableDefinitions: [
|
|
1322
|
+
{
|
|
1323
|
+
kind: 'VariableDefinition',
|
|
1324
|
+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
1325
|
+
type: {
|
|
1326
|
+
kind: 'NonNullType',
|
|
1327
|
+
type: {
|
|
1328
|
+
kind: 'NamedType',
|
|
1329
|
+
name: { kind: 'Name', value: 'String' },
|
|
1330
|
+
},
|
|
1331
|
+
},
|
|
1332
|
+
},
|
|
1333
|
+
],
|
|
1334
|
+
selectionSet: {
|
|
1335
|
+
kind: 'SelectionSet',
|
|
1336
|
+
selections: [
|
|
1337
|
+
{
|
|
1338
|
+
kind: 'Field',
|
|
1339
|
+
name: { kind: 'Name', value: 'refreshVirtualPresenceState' },
|
|
1340
|
+
arguments: [
|
|
1341
|
+
{
|
|
1342
|
+
kind: 'Argument',
|
|
1343
|
+
name: { kind: 'Name', value: 'id' },
|
|
1344
|
+
value: {
|
|
1345
|
+
kind: 'Variable',
|
|
1346
|
+
name: { kind: 'Name', value: 'id' },
|
|
1347
|
+
},
|
|
1348
|
+
},
|
|
1349
|
+
],
|
|
1350
|
+
selectionSet: {
|
|
1351
|
+
kind: 'SelectionSet',
|
|
1352
|
+
selections: [
|
|
1353
|
+
{
|
|
1354
|
+
kind: 'FragmentSpread',
|
|
1355
|
+
name: { kind: 'Name', value: 'VirtualPresenceFields' },
|
|
1356
|
+
},
|
|
1357
|
+
],
|
|
1358
|
+
},
|
|
1359
|
+
},
|
|
1360
|
+
],
|
|
1361
|
+
},
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
kind: 'FragmentDefinition',
|
|
1365
|
+
name: { kind: 'Name', value: 'VirtualPresenceFields' },
|
|
1366
|
+
typeCondition: {
|
|
1367
|
+
kind: 'NamedType',
|
|
1368
|
+
name: { kind: 'Name', value: 'VirtualPresence' },
|
|
1369
|
+
},
|
|
1370
|
+
selectionSet: {
|
|
1371
|
+
kind: 'SelectionSet',
|
|
1372
|
+
selections: [
|
|
1373
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
1374
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'providerType' } },
|
|
1375
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'identifier' } },
|
|
1376
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'state' } },
|
|
1377
|
+
{
|
|
1378
|
+
kind: 'Field',
|
|
1379
|
+
name: { kind: 'Name', value: 'lastScannedAtEpochMs' },
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
kind: 'Field',
|
|
1383
|
+
name: { kind: 'Name', value: 'lastScanFailureReason' },
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
kind: 'Field',
|
|
1387
|
+
name: { kind: 'Name', value: 'dataHolderCount' },
|
|
1388
|
+
selectionSet: {
|
|
1389
|
+
kind: 'SelectionSet',
|
|
1390
|
+
selections: [
|
|
1391
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'count' } },
|
|
1392
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'monitored' } },
|
|
1393
|
+
{
|
|
1394
|
+
kind: 'Field',
|
|
1395
|
+
name: { kind: 'Name', value: 'initiatedActions' },
|
|
1396
|
+
},
|
|
1397
|
+
{
|
|
1398
|
+
kind: 'Field',
|
|
1399
|
+
name: { kind: 'Name', value: 'completedActions' },
|
|
1400
|
+
},
|
|
1401
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'archived' } },
|
|
1402
|
+
],
|
|
1403
|
+
},
|
|
1404
|
+
},
|
|
1405
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
1406
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
1407
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
1408
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
1409
|
+
],
|
|
1410
|
+
},
|
|
1411
|
+
},
|
|
1412
|
+
],
|
|
1413
|
+
};
|
|
1313
1414
|
exports.InitiateActionDocument = {
|
|
1314
1415
|
kind: 'Document',
|
|
1315
1416
|
definitions: [
|
|
@@ -3216,6 +3317,14 @@ exports.ListAvailableActionsDocument = {
|
|
|
3216
3317
|
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
3217
3318
|
},
|
|
3218
3319
|
},
|
|
3320
|
+
{
|
|
3321
|
+
kind: 'VariableDefinition',
|
|
3322
|
+
variable: {
|
|
3323
|
+
kind: 'Variable',
|
|
3324
|
+
name: { kind: 'Name', value: 'includeCompleted' },
|
|
3325
|
+
},
|
|
3326
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Boolean' } },
|
|
3327
|
+
},
|
|
3219
3328
|
],
|
|
3220
3329
|
selectionSet: {
|
|
3221
3330
|
kind: 'SelectionSet',
|
|
@@ -3232,6 +3341,14 @@ exports.ListAvailableActionsDocument = {
|
|
|
3232
3341
|
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3233
3342
|
},
|
|
3234
3343
|
},
|
|
3344
|
+
{
|
|
3345
|
+
kind: 'Argument',
|
|
3346
|
+
name: { kind: 'Name', value: 'includeCompleted' },
|
|
3347
|
+
value: {
|
|
3348
|
+
kind: 'Variable',
|
|
3349
|
+
name: { kind: 'Name', value: 'includeCompleted' },
|
|
3350
|
+
},
|
|
3351
|
+
},
|
|
3235
3352
|
],
|
|
3236
3353
|
selectionSet: {
|
|
3237
3354
|
kind: 'SelectionSet',
|
|
@@ -3272,6 +3389,187 @@ exports.ListAvailableActionsDocument = {
|
|
|
3272
3389
|
{ kind: 'Field', name: { kind: 'Name', value: 'origin' } },
|
|
3273
3390
|
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
3274
3391
|
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
3392
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3393
|
+
],
|
|
3394
|
+
},
|
|
3395
|
+
},
|
|
3396
|
+
],
|
|
3397
|
+
};
|
|
3398
|
+
exports.ListActionsForDataHolderDocument = {
|
|
3399
|
+
kind: 'Document',
|
|
3400
|
+
definitions: [
|
|
3401
|
+
{
|
|
3402
|
+
kind: 'OperationDefinition',
|
|
3403
|
+
operation: 'query',
|
|
3404
|
+
name: { kind: 'Name', value: 'ListActionsForDataHolder' },
|
|
3405
|
+
variableDefinitions: [
|
|
3406
|
+
{
|
|
3407
|
+
kind: 'VariableDefinition',
|
|
3408
|
+
variable: {
|
|
3409
|
+
kind: 'Variable',
|
|
3410
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3411
|
+
},
|
|
3412
|
+
type: {
|
|
3413
|
+
kind: 'NonNullType',
|
|
3414
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
3415
|
+
},
|
|
3416
|
+
},
|
|
3417
|
+
{
|
|
3418
|
+
kind: 'VariableDefinition',
|
|
3419
|
+
variable: {
|
|
3420
|
+
kind: 'Variable',
|
|
3421
|
+
name: { kind: 'Name', value: 'limit' },
|
|
3422
|
+
},
|
|
3423
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } },
|
|
3424
|
+
},
|
|
3425
|
+
{
|
|
3426
|
+
kind: 'VariableDefinition',
|
|
3427
|
+
variable: {
|
|
3428
|
+
kind: 'Variable',
|
|
3429
|
+
name: { kind: 'Name', value: 'nextToken' },
|
|
3430
|
+
},
|
|
3431
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
|
|
3432
|
+
},
|
|
3433
|
+
],
|
|
3434
|
+
selectionSet: {
|
|
3435
|
+
kind: 'SelectionSet',
|
|
3436
|
+
selections: [
|
|
3437
|
+
{
|
|
3438
|
+
kind: 'Field',
|
|
3439
|
+
name: { kind: 'Name', value: 'listActionsForDataHolder' },
|
|
3440
|
+
arguments: [
|
|
3441
|
+
{
|
|
3442
|
+
kind: 'Argument',
|
|
3443
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3444
|
+
value: {
|
|
3445
|
+
kind: 'Variable',
|
|
3446
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3447
|
+
},
|
|
3448
|
+
},
|
|
3449
|
+
{
|
|
3450
|
+
kind: 'Argument',
|
|
3451
|
+
name: { kind: 'Name', value: 'limit' },
|
|
3452
|
+
value: {
|
|
3453
|
+
kind: 'Variable',
|
|
3454
|
+
name: { kind: 'Name', value: 'limit' },
|
|
3455
|
+
},
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
kind: 'Argument',
|
|
3459
|
+
name: { kind: 'Name', value: 'nextToken' },
|
|
3460
|
+
value: {
|
|
3461
|
+
kind: 'Variable',
|
|
3462
|
+
name: { kind: 'Name', value: 'nextToken' },
|
|
3463
|
+
},
|
|
3464
|
+
},
|
|
3465
|
+
],
|
|
3466
|
+
selectionSet: {
|
|
3467
|
+
kind: 'SelectionSet',
|
|
3468
|
+
selections: [
|
|
3469
|
+
{
|
|
3470
|
+
kind: 'Field',
|
|
3471
|
+
name: { kind: 'Name', value: 'items' },
|
|
3472
|
+
selectionSet: {
|
|
3473
|
+
kind: 'SelectionSet',
|
|
3474
|
+
selections: [
|
|
3475
|
+
{
|
|
3476
|
+
kind: 'FragmentSpread',
|
|
3477
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
3478
|
+
},
|
|
3479
|
+
],
|
|
3480
|
+
},
|
|
3481
|
+
},
|
|
3482
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'nextToken' } },
|
|
3483
|
+
],
|
|
3484
|
+
},
|
|
3485
|
+
},
|
|
3486
|
+
],
|
|
3487
|
+
},
|
|
3488
|
+
},
|
|
3489
|
+
{
|
|
3490
|
+
kind: 'FragmentDefinition',
|
|
3491
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
3492
|
+
typeCondition: {
|
|
3493
|
+
kind: 'NamedType',
|
|
3494
|
+
name: { kind: 'Name', value: 'Action' },
|
|
3495
|
+
},
|
|
3496
|
+
selectionSet: {
|
|
3497
|
+
kind: 'SelectionSet',
|
|
3498
|
+
selections: [
|
|
3499
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
3500
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'virtualPresenceId' } },
|
|
3501
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'dataHolderId' } },
|
|
3502
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
3503
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
3504
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
3505
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3506
|
+
{
|
|
3507
|
+
kind: 'Field',
|
|
3508
|
+
name: { kind: 'Name', value: 'assistedPayload' },
|
|
3509
|
+
selectionSet: {
|
|
3510
|
+
kind: 'SelectionSet',
|
|
3511
|
+
selections: [
|
|
3512
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'toAddress' } },
|
|
3513
|
+
{
|
|
3514
|
+
kind: 'Field',
|
|
3515
|
+
name: { kind: 'Name', value: 'unsubscribeUrl' },
|
|
3516
|
+
},
|
|
3517
|
+
{
|
|
3518
|
+
kind: 'Field',
|
|
3519
|
+
name: { kind: 'Name', value: 'unsubscribeMailto' },
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
kind: 'Field',
|
|
3523
|
+
name: { kind: 'Name', value: 'contact' },
|
|
3524
|
+
selectionSet: {
|
|
3525
|
+
kind: 'SelectionSet',
|
|
3526
|
+
selections: [
|
|
3527
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'email' } },
|
|
3528
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'phone' } },
|
|
3529
|
+
{
|
|
3530
|
+
kind: 'Field',
|
|
3531
|
+
name: { kind: 'Name', value: 'address' },
|
|
3532
|
+
},
|
|
3533
|
+
],
|
|
3534
|
+
},
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
kind: 'Field',
|
|
3538
|
+
name: { kind: 'Name', value: 'jurisdiction' },
|
|
3539
|
+
},
|
|
3540
|
+
{
|
|
3541
|
+
kind: 'Field',
|
|
3542
|
+
name: { kind: 'Name', value: 'instructions' },
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
kind: 'Field',
|
|
3546
|
+
name: { kind: 'Name', value: 'emailTemplate' },
|
|
3547
|
+
selectionSet: {
|
|
3548
|
+
kind: 'SelectionSet',
|
|
3549
|
+
selections: [
|
|
3550
|
+
{
|
|
3551
|
+
kind: 'Field',
|
|
3552
|
+
name: { kind: 'Name', value: 'subject' },
|
|
3553
|
+
},
|
|
3554
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'body' } },
|
|
3555
|
+
],
|
|
3556
|
+
},
|
|
3557
|
+
},
|
|
3558
|
+
],
|
|
3559
|
+
},
|
|
3560
|
+
},
|
|
3561
|
+
{
|
|
3562
|
+
kind: 'Field',
|
|
3563
|
+
name: { kind: 'Name', value: 'initiatedAtEpochMs' },
|
|
3564
|
+
},
|
|
3565
|
+
{
|
|
3566
|
+
kind: 'Field',
|
|
3567
|
+
name: { kind: 'Name', value: 'completedAtEpochMs' },
|
|
3568
|
+
},
|
|
3569
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
3570
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
3571
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
3572
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
3275
3573
|
],
|
|
3276
3574
|
},
|
|
3277
3575
|
},
|
|
@@ -54,6 +54,14 @@ class DefaultActionService {
|
|
|
54
54
|
nextToken: result.nextToken ?? undefined,
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
+
async listForDataHolder(input) {
|
|
58
|
+
const result = await this.appSync.listActionsForDataHolder(input);
|
|
59
|
+
const actions = (result.items ?? []).map((item) => this.actionTransformer.fromGraphQLToEntity(item));
|
|
60
|
+
return {
|
|
61
|
+
actions,
|
|
62
|
+
nextToken: result.nextToken ?? undefined,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
57
65
|
async subscribe(input) {
|
|
58
66
|
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
59
67
|
if (!this.subscriptionManager.getWatcher()) {
|
|
@@ -19,6 +19,14 @@ class ActionIntentTransformer {
|
|
|
19
19
|
return public_1.ActionIntent.DeleteMyData;
|
|
20
20
|
case actionEntity_1.ActionIntentEntity.LimitDataUse:
|
|
21
21
|
return public_1.ActionIntent.LimitDataUse;
|
|
22
|
+
case actionEntity_1.ActionIntentEntity.SwapEmail:
|
|
23
|
+
return public_1.ActionIntent.SwapEmail;
|
|
24
|
+
case actionEntity_1.ActionIntentEntity.SwapPhone:
|
|
25
|
+
return public_1.ActionIntent.SwapPhone;
|
|
26
|
+
case actionEntity_1.ActionIntentEntity.SwapVirtualCard:
|
|
27
|
+
return public_1.ActionIntent.SwapVirtualCard;
|
|
28
|
+
case actionEntity_1.ActionIntentEntity.SaveInPassword:
|
|
29
|
+
return public_1.ActionIntent.SaveInPassword;
|
|
22
30
|
case actionEntity_1.ActionIntentEntity.Other:
|
|
23
31
|
return public_1.ActionIntent.Other;
|
|
24
32
|
}
|
|
@@ -33,6 +41,14 @@ class ActionIntentTransformer {
|
|
|
33
41
|
return actionEntity_1.ActionIntentEntity.DeleteMyData;
|
|
34
42
|
case public_1.ActionIntent.LimitDataUse:
|
|
35
43
|
return actionEntity_1.ActionIntentEntity.LimitDataUse;
|
|
44
|
+
case public_1.ActionIntent.SwapEmail:
|
|
45
|
+
return actionEntity_1.ActionIntentEntity.SwapEmail;
|
|
46
|
+
case public_1.ActionIntent.SwapPhone:
|
|
47
|
+
return actionEntity_1.ActionIntentEntity.SwapPhone;
|
|
48
|
+
case public_1.ActionIntent.SwapVirtualCard:
|
|
49
|
+
return actionEntity_1.ActionIntentEntity.SwapVirtualCard;
|
|
50
|
+
case public_1.ActionIntent.SaveInPassword:
|
|
51
|
+
return actionEntity_1.ActionIntentEntity.SaveInPassword;
|
|
36
52
|
case public_1.ActionIntent.Other:
|
|
37
53
|
return actionEntity_1.ActionIntentEntity.Other;
|
|
38
54
|
}
|
|
@@ -47,6 +63,14 @@ class ActionIntentTransformer {
|
|
|
47
63
|
return actionEntity_1.ActionIntentEntity.DeleteMyData;
|
|
48
64
|
case 'LIMIT_DATA_USE':
|
|
49
65
|
return actionEntity_1.ActionIntentEntity.LimitDataUse;
|
|
66
|
+
case 'SWAP_EMAIL':
|
|
67
|
+
return actionEntity_1.ActionIntentEntity.SwapEmail;
|
|
68
|
+
case 'SWAP_PHONE':
|
|
69
|
+
return actionEntity_1.ActionIntentEntity.SwapPhone;
|
|
70
|
+
case 'SWAP_VIRTUAL_CARD':
|
|
71
|
+
return actionEntity_1.ActionIntentEntity.SwapVirtualCard;
|
|
72
|
+
case 'SAVE_IN_PASSWORD':
|
|
73
|
+
return actionEntity_1.ActionIntentEntity.SaveInPassword;
|
|
50
74
|
default:
|
|
51
75
|
return actionEntity_1.ActionIntentEntity.Other;
|
|
52
76
|
}
|
|
@@ -61,6 +85,14 @@ class ActionIntentTransformer {
|
|
|
61
85
|
return 'DELETE_MY_DATA';
|
|
62
86
|
case actionEntity_1.ActionIntentEntity.LimitDataUse:
|
|
63
87
|
return 'LIMIT_DATA_USE';
|
|
88
|
+
case actionEntity_1.ActionIntentEntity.SwapEmail:
|
|
89
|
+
return 'SWAP_EMAIL';
|
|
90
|
+
case actionEntity_1.ActionIntentEntity.SwapPhone:
|
|
91
|
+
return 'SWAP_PHONE';
|
|
92
|
+
case actionEntity_1.ActionIntentEntity.SwapVirtualCard:
|
|
93
|
+
return 'SWAP_VIRTUAL_CARD';
|
|
94
|
+
case actionEntity_1.ActionIntentEntity.SaveInPassword:
|
|
95
|
+
return 'SAVE_IN_PASSWORD';
|
|
64
96
|
case actionEntity_1.ActionIntentEntity.Other:
|
|
65
97
|
return 'OTHER';
|
|
66
98
|
}
|
|
@@ -9,10 +9,12 @@ exports.AvailableActionTransformer = void 0;
|
|
|
9
9
|
const actionFulfilmentMethodTransformer_1 = require("./actionFulfilmentMethodTransformer");
|
|
10
10
|
const actionIntentTransformer_1 = require("./actionIntentTransformer");
|
|
11
11
|
const actionOriginTransformer_1 = require("./actionOriginTransformer");
|
|
12
|
+
const actionStatusTransformer_1 = require("./actionStatusTransformer");
|
|
12
13
|
class AvailableActionTransformer {
|
|
13
14
|
intentTransformer = new actionIntentTransformer_1.ActionIntentTransformer();
|
|
14
15
|
fulfilmentMethodTransformer = new actionFulfilmentMethodTransformer_1.ActionFulfilmentMethodTransformer();
|
|
15
16
|
originTransformer = new actionOriginTransformer_1.ActionOriginTransformer();
|
|
17
|
+
statusTransformer = new actionStatusTransformer_1.ActionStatusTransformer();
|
|
16
18
|
fromGraphQLToEntity(data) {
|
|
17
19
|
return {
|
|
18
20
|
intent: this.intentTransformer.fromGraphQLToEntity(data.intent),
|
|
@@ -21,6 +23,9 @@ class AvailableActionTransformer {
|
|
|
21
23
|
origin: this.originTransformer.fromGraphQLToEntity(data.origin),
|
|
22
24
|
title: data.title ?? undefined,
|
|
23
25
|
description: data.description ?? undefined,
|
|
26
|
+
status: data.status != null
|
|
27
|
+
? this.statusTransformer.fromGraphQLToEntity(data.status)
|
|
28
|
+
: undefined,
|
|
24
29
|
};
|
|
25
30
|
}
|
|
26
31
|
fromEntityToAPI(entity) {
|
|
@@ -31,6 +36,9 @@ class AvailableActionTransformer {
|
|
|
31
36
|
origin: this.originTransformer.fromEntityToAPI(entity.origin),
|
|
32
37
|
title: entity.title,
|
|
33
38
|
description: entity.description,
|
|
39
|
+
status: entity.status !== undefined
|
|
40
|
+
? this.statusTransformer.fromEntityToAPI(entity.status)
|
|
41
|
+
: undefined,
|
|
34
42
|
};
|
|
35
43
|
}
|
|
36
44
|
}
|
|
@@ -46,6 +46,14 @@ class ApiClient {
|
|
|
46
46
|
});
|
|
47
47
|
return data.rescanVirtualPresence;
|
|
48
48
|
}
|
|
49
|
+
async refreshVirtualPresenceState(id) {
|
|
50
|
+
const data = await this.performMutation({
|
|
51
|
+
mutation: graphqlTypes_1.RefreshVirtualPresenceStateDocument,
|
|
52
|
+
variables: { id },
|
|
53
|
+
calleeName: this.refreshVirtualPresenceState.name,
|
|
54
|
+
});
|
|
55
|
+
return data.refreshVirtualPresenceState;
|
|
56
|
+
}
|
|
49
57
|
async listVirtualPresences(input) {
|
|
50
58
|
const data = await this.performQuery({
|
|
51
59
|
query: graphqlTypes_1.ListVirtualPresencesDocument,
|
|
@@ -174,11 +182,24 @@ class ApiClient {
|
|
|
174
182
|
query: graphqlTypes_1.ListAvailableActionsDocument,
|
|
175
183
|
variables: {
|
|
176
184
|
dataHolderId: input.dataHolderId,
|
|
185
|
+
includeCompleted: input.includeCompleted,
|
|
177
186
|
},
|
|
178
187
|
calleeName: this.listAvailableActions.name,
|
|
179
188
|
});
|
|
180
189
|
return data.listAvailableActions;
|
|
181
190
|
}
|
|
191
|
+
async listActionsForDataHolder(input) {
|
|
192
|
+
const data = await this.performQuery({
|
|
193
|
+
query: graphqlTypes_1.ListActionsForDataHolderDocument,
|
|
194
|
+
variables: {
|
|
195
|
+
dataHolderId: input.dataHolderId,
|
|
196
|
+
limit: input.limit,
|
|
197
|
+
nextToken: input.nextToken,
|
|
198
|
+
},
|
|
199
|
+
calleeName: this.listActionsForDataHolder.name,
|
|
200
|
+
});
|
|
201
|
+
return data.listActionsForDataHolder;
|
|
202
|
+
}
|
|
182
203
|
onVirtualPresenceUpdated(owner) {
|
|
183
204
|
return this.performSubscription({
|
|
184
205
|
subscription: graphqlTypes_1.OnVirtualPresenceUpdateDocument,
|
|
@@ -51,6 +51,10 @@ class DefaultVirtualPresenceService {
|
|
|
51
51
|
const result = await this.appSync.disconnectVirtualPresence(id);
|
|
52
52
|
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
53
53
|
}
|
|
54
|
+
async refreshState(id) {
|
|
55
|
+
const result = await this.appSync.refreshVirtualPresenceState(id);
|
|
56
|
+
return this.virtualPresenceTransformer.fromGraphQLToEntity(result);
|
|
57
|
+
}
|
|
54
58
|
async subscribe(input) {
|
|
55
59
|
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
56
60
|
if (!this.subscriptionManager.getWatcher()) {
|
|
@@ -18,6 +18,16 @@ exports.ActionStatusEntity = exports.ActionOriginEntity = exports.ActionFulfilme
|
|
|
18
18
|
* @property AccessMyData Data subject access / portability request.
|
|
19
19
|
* @property DeleteMyData Account deletion / data erasure.
|
|
20
20
|
* @property LimitDataUse Opt out of sale / tracking, manage consent.
|
|
21
|
+
* @property SwapEmail The user has replaced the account's email with a private
|
|
22
|
+
* email. Always available for an email presence; self-reported.
|
|
23
|
+
* @property SwapPhone The user has replaced the account's phone number with a
|
|
24
|
+
* private number. Offered only when a signal indicates the data holder holds
|
|
25
|
+
* the user's phone number.
|
|
26
|
+
* @property SwapVirtualCard The user has replaced the account's payment card
|
|
27
|
+
* with a virtual card. Offered only when the data holder is identified as
|
|
28
|
+
* collecting credit card data.
|
|
29
|
+
* @property SaveInPassword The user has saved this account in a password
|
|
30
|
+
* manager. Offered only when the data holder supports account creation.
|
|
21
31
|
* @property Other Anything unmapped; carries additionalInfo.
|
|
22
32
|
*
|
|
23
33
|
* @enum
|
|
@@ -28,6 +38,10 @@ var ActionIntentEntity;
|
|
|
28
38
|
ActionIntentEntity["AccessMyData"] = "ACCESS_MY_DATA";
|
|
29
39
|
ActionIntentEntity["DeleteMyData"] = "DELETE_MY_DATA";
|
|
30
40
|
ActionIntentEntity["LimitDataUse"] = "LIMIT_DATA_USE";
|
|
41
|
+
ActionIntentEntity["SwapEmail"] = "SWAP_EMAIL";
|
|
42
|
+
ActionIntentEntity["SwapPhone"] = "SWAP_PHONE";
|
|
43
|
+
ActionIntentEntity["SwapVirtualCard"] = "SWAP_VIRTUAL_CARD";
|
|
44
|
+
ActionIntentEntity["SaveInPassword"] = "SAVE_IN_PASSWORD";
|
|
31
45
|
ActionIntentEntity["Other"] = "OTHER";
|
|
32
46
|
})(ActionIntentEntity || (exports.ActionIntentEntity = ActionIntentEntity = {}));
|
|
33
47
|
/**
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ListActionsForDataHolderUseCase = void 0;
|
|
9
|
+
const sudo_common_1 = require("@sudoplatform/sudo-common");
|
|
10
|
+
/**
|
|
11
|
+
* Application business logic for listing the persisted action history for a data
|
|
12
|
+
* holder.
|
|
13
|
+
*/
|
|
14
|
+
class ListActionsForDataHolderUseCase {
|
|
15
|
+
actionService;
|
|
16
|
+
log;
|
|
17
|
+
constructor(actionService) {
|
|
18
|
+
this.actionService = actionService;
|
|
19
|
+
this.log = new sudo_common_1.DefaultLogger(this.constructor.name);
|
|
20
|
+
}
|
|
21
|
+
async execute(input) {
|
|
22
|
+
this.log.debug(this.constructor.name, { input });
|
|
23
|
+
return await this.actionService.listForDataHolder(input);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.ListActionsForDataHolderUseCase = ListActionsForDataHolderUseCase;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2026 Anonyome Labs, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.RefreshVirtualPresenceStateUseCase = void 0;
|
|
9
|
+
const sudo_common_1 = require("@sudoplatform/sudo-common");
|
|
10
|
+
/**
|
|
11
|
+
* Application business logic for refreshing a virtual presence's state.
|
|
12
|
+
*/
|
|
13
|
+
class RefreshVirtualPresenceStateUseCase {
|
|
14
|
+
virtualPresenceService;
|
|
15
|
+
log;
|
|
16
|
+
constructor(virtualPresenceService) {
|
|
17
|
+
this.virtualPresenceService = virtualPresenceService;
|
|
18
|
+
this.log = new sudo_common_1.DefaultLogger(this.constructor.name);
|
|
19
|
+
}
|
|
20
|
+
async execute(id) {
|
|
21
|
+
this.log.debug(this.constructor.name, { id });
|
|
22
|
+
return await this.virtualPresenceService.refreshState(id);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.RefreshVirtualPresenceStateUseCase = RefreshVirtualPresenceStateUseCase;
|
|
@@ -31,6 +31,7 @@ const getAnalysisResultUseCase_1 = require("../private/domain/use-cases/analysis
|
|
|
31
31
|
const confirmActionOutcomeUseCase_1 = require("../private/domain/use-cases/action/confirmActionOutcomeUseCase");
|
|
32
32
|
const getActionUseCase_1 = require("../private/domain/use-cases/action/getActionUseCase");
|
|
33
33
|
const initiateActionUseCase_1 = require("../private/domain/use-cases/action/initiateActionUseCase");
|
|
34
|
+
const listActionsForDataHolderUseCase_1 = require("../private/domain/use-cases/action/listActionsForDataHolderUseCase");
|
|
34
35
|
const listAvailableActionsUseCase_1 = require("../private/domain/use-cases/action/listAvailableActionsUseCase");
|
|
35
36
|
const subscribeToActionUseCase_1 = require("../private/domain/use-cases/action/subscribeToActionUseCase");
|
|
36
37
|
const unsubscribeFromActionUseCase_1 = require("../private/domain/use-cases/action/unsubscribeFromActionUseCase");
|
|
@@ -50,6 +51,7 @@ const connectVirtualPresenceWithAuthCodeUseCase_1 = require("../private/domain/u
|
|
|
50
51
|
const connectVirtualPresenceWithRefreshTokenUseCase_1 = require("../private/domain/use-cases/virtual-presence/connectVirtualPresenceWithRefreshTokenUseCase");
|
|
51
52
|
const disconnectVirtualPresenceUseCase_1 = require("../private/domain/use-cases/virtual-presence/disconnectVirtualPresenceUseCase");
|
|
52
53
|
const listVirtualPresencesUseCase_1 = require("../private/domain/use-cases/virtual-presence/listVirtualPresencesUseCase");
|
|
54
|
+
const refreshVirtualPresenceStateUseCase_1 = require("../private/domain/use-cases/virtual-presence/refreshVirtualPresenceStateUseCase");
|
|
53
55
|
const rescanVirtualPresenceUseCase_1 = require("../private/domain/use-cases/virtual-presence/rescanVirtualPresenceUseCase");
|
|
54
56
|
const subscribeToVirtualPresenceUseCase_1 = require("../private/domain/use-cases/virtual-presence/subscribeToVirtualPresenceUseCase");
|
|
55
57
|
const unsubscribeFromVirtualPresenceUseCase_1 = require("../private/domain/use-cases/virtual-presence/unsubscribeFromVirtualPresenceUseCase");
|
|
@@ -151,6 +153,12 @@ class DefaultSudoPrivacyInteractionClient {
|
|
|
151
153
|
const result = await useCase.execute(input);
|
|
152
154
|
return this.virtualPresenceTransformer.fromEntityToAPI(result);
|
|
153
155
|
}
|
|
156
|
+
async refreshVirtualPresenceState(id) {
|
|
157
|
+
this.log.debug(this.refreshVirtualPresenceState.name, { id });
|
|
158
|
+
const useCase = new refreshVirtualPresenceStateUseCase_1.RefreshVirtualPresenceStateUseCase(this.virtualPresenceService);
|
|
159
|
+
const result = await useCase.execute(id);
|
|
160
|
+
return this.virtualPresenceTransformer.fromEntityToAPI(result);
|
|
161
|
+
}
|
|
154
162
|
async listVirtualPresences(input) {
|
|
155
163
|
this.log.debug(this.listVirtualPresences.name, {
|
|
156
164
|
input,
|
|
@@ -340,10 +348,24 @@ class DefaultSudoPrivacyInteractionClient {
|
|
|
340
348
|
async listAvailableActions(input) {
|
|
341
349
|
this.log.debug(this.listAvailableActions.name, { input });
|
|
342
350
|
const useCase = new listAvailableActionsUseCase_1.ListAvailableActionsUseCase(this.actionService);
|
|
343
|
-
const { availableActions, nextToken: resultNextToken } = await useCase.execute({
|
|
351
|
+
const { availableActions, nextToken: resultNextToken } = await useCase.execute({
|
|
352
|
+
dataHolderId: input.dataHolderId,
|
|
353
|
+
includeCompleted: input.includeCompleted,
|
|
354
|
+
});
|
|
344
355
|
const transformedAvailableActions = availableActions.map((availableAction) => this.availableActionTransformer.fromEntityToAPI(availableAction));
|
|
345
356
|
return { items: transformedAvailableActions, nextToken: resultNextToken };
|
|
346
357
|
}
|
|
358
|
+
async listActionsForDataHolder(input) {
|
|
359
|
+
this.log.debug(this.listActionsForDataHolder.name, { input });
|
|
360
|
+
const useCase = new listActionsForDataHolderUseCase_1.ListActionsForDataHolderUseCase(this.actionService);
|
|
361
|
+
const { actions, nextToken: resultNextToken } = await useCase.execute({
|
|
362
|
+
dataHolderId: input.dataHolderId,
|
|
363
|
+
limit: input.limit,
|
|
364
|
+
nextToken: input.nextToken,
|
|
365
|
+
});
|
|
366
|
+
const transformedActions = actions.map((action) => this.actionTransformer.fromEntityToAPI(action));
|
|
367
|
+
return { items: transformedActions, nextToken: resultNextToken };
|
|
368
|
+
}
|
|
347
369
|
async subscribeToActions(subscriptionId, subscriber) {
|
|
348
370
|
this.log.debug(this.subscribeToActions.name, {
|
|
349
371
|
subscriptionId,
|