@sudoplatform/sudo-privacy-interaction 2.1.0 → 2.2.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 +557 -1
- package/cjs/private/data/action/actionSubscriptionManager.js +25 -0
- package/cjs/private/data/action/defaultActionService.js +80 -0
- package/cjs/private/data/action/transformer/actionFulfilmentMethodTransformer.js +47 -0
- package/cjs/private/data/action/transformer/actionIntentTransformer.js +69 -0
- package/cjs/private/data/action/transformer/actionOriginTransformer.js +37 -0
- package/cjs/private/data/action/transformer/actionStatusTransformer.js +53 -0
- package/cjs/private/data/action/transformer/actionTransformer.js +85 -0
- package/cjs/private/data/action/transformer/availableActionTransformer.js +37 -0
- package/cjs/private/data/common/apiClient.js +35 -0
- package/cjs/private/domain/entities/action/actionEntity.js +86 -0
- package/cjs/private/domain/entities/action/actionService.js +7 -0
- package/cjs/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +25 -0
- package/cjs/private/domain/use-cases/action/initiateActionUseCase.js +26 -0
- package/cjs/private/domain/use-cases/action/listAvailableActionsUseCase.js +26 -0
- package/cjs/private/domain/use-cases/action/subscribeToActionUseCase.js +37 -0
- package/cjs/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +27 -0
- package/cjs/public/defaultSudoPrivacyInteractionClient.js +58 -0
- package/cjs/public/inputs/action.js +7 -0
- package/cjs/public/inputs/index.js +1 -0
- package/cjs/public/typings/action.js +85 -0
- package/cjs/public/typings/index.js +1 -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 +128 -22
- package/docs/enums/ActionFulfilmentMethod.html +63 -0
- package/docs/enums/ActionIntent.html +84 -0
- package/docs/enums/ActionOrigin.html +75 -0
- package/docs/enums/ActionStatus.html +99 -0
- package/docs/enums/ConnectionState.html +3 -3
- package/docs/hierarchy.html +6 -6
- package/docs/interfaces/Action.html +167 -0
- package/docs/interfaces/ActionContact.html +77 -0
- package/docs/interfaces/ActionSubscriber.html +92 -0
- package/docs/interfaces/AnalysisResultSubscriber.html +3 -3
- package/docs/interfaces/AssistedEmailTemplate.html +70 -0
- package/docs/interfaces/AssistedPayload.html +113 -0
- package/docs/interfaces/AvailableAction.html +102 -0
- package/docs/interfaces/DataHolderSubscriber.html +3 -3
- package/docs/interfaces/InitiateActionInput.html +79 -0
- package/docs/interfaces/ListAnalysisResultsInput.html +1 -1
- package/docs/interfaces/ListAvailableActionsInput.html +61 -0
- 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 +1 -1
- package/docs/interfaces/SudoPrivacyInteractionClient.html +123 -22
- package/docs/interfaces/VirtualPresenceSubscriber.html +3 -3
- package/docs/modules.html +4 -4
- package/docs/types/SudoPrivacyInteractionClientOptions.html +2 -2
- package/lib/gen/graphqlTypes.js +556 -0
- package/lib/private/data/action/actionSubscriptionManager.js +21 -0
- package/lib/private/data/action/defaultActionService.js +76 -0
- package/lib/private/data/action/transformer/actionFulfilmentMethodTransformer.js +43 -0
- package/lib/private/data/action/transformer/actionIntentTransformer.js +65 -0
- package/lib/private/data/action/transformer/actionOriginTransformer.js +33 -0
- package/lib/private/data/action/transformer/actionStatusTransformer.js +49 -0
- package/lib/private/data/action/transformer/actionTransformer.js +81 -0
- package/lib/private/data/action/transformer/availableActionTransformer.js +33 -0
- package/lib/private/data/common/apiClient.js +36 -1
- package/lib/private/domain/entities/action/actionEntity.js +83 -0
- package/lib/private/domain/entities/action/actionService.js +6 -0
- package/lib/private/domain/use-cases/action/confirmActionOutcomeUseCase.js +21 -0
- package/lib/private/domain/use-cases/action/initiateActionUseCase.js +22 -0
- package/lib/private/domain/use-cases/action/listAvailableActionsUseCase.js +22 -0
- package/lib/private/domain/use-cases/action/subscribeToActionUseCase.js +33 -0
- package/lib/private/domain/use-cases/action/unsubscribeFromActionUseCase.js +23 -0
- package/lib/public/defaultSudoPrivacyInteractionClient.js +58 -0
- package/lib/public/inputs/action.js +6 -0
- package/lib/public/inputs/index.js +1 -0
- package/lib/public/typings/action.js +82 -0
- package/lib/public/typings/index.js +1 -0
- package/package.json +2 -2
- package/types/gen/graphqlTypes.d.ts +245 -1
- package/types/private/data/action/actionSubscriptionManager.d.ts +19 -0
- package/types/private/data/action/defaultActionService.d.ts +23 -0
- package/types/private/data/action/transformer/actionFulfilmentMethodTransformer.d.ts +14 -0
- package/types/private/data/action/transformer/actionIntentTransformer.d.ts +14 -0
- package/types/private/data/action/transformer/actionOriginTransformer.d.ts +12 -0
- package/types/private/data/action/transformer/actionStatusTransformer.d.ts +12 -0
- package/types/private/data/action/transformer/actionTransformer.d.ts +39 -0
- package/types/private/data/action/transformer/availableActionTransformer.d.ts +15 -0
- package/types/private/data/common/apiClient.d.ts +7 -1
- package/types/private/domain/entities/action/actionEntity.d.ts +187 -0
- package/types/private/domain/entities/action/actionService.d.ts +99 -0
- package/types/private/domain/use-cases/action/confirmActionOutcomeUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/action/initiateActionUseCase.d.ts +17 -0
- package/types/private/domain/use-cases/action/listAvailableActionsUseCase.d.ts +16 -0
- package/types/private/domain/use-cases/action/subscribeToActionUseCase.d.ts +27 -0
- package/types/private/domain/use-cases/action/unsubscribeFromActionUseCase.d.ts +15 -0
- package/types/public/defaultSudoPrivacyInteractionClient.d.ts +12 -2
- package/types/public/inputs/action.d.ts +30 -0
- package/types/public/inputs/index.d.ts +1 -0
- package/types/public/sudoPrivacyInteractionClient.d.ts +41 -2
- package/types/public/typings/action.d.ts +185 -0
- package/types/public/typings/index.d.ts +1 -0
- package/types/public/typings/subscription.d.ts +23 -0
package/lib/gen/graphqlTypes.js
CHANGED
|
@@ -1,3 +1,119 @@
|
|
|
1
|
+
export const ActionFieldsFragmentDoc = {
|
|
2
|
+
kind: 'Document',
|
|
3
|
+
definitions: [
|
|
4
|
+
{
|
|
5
|
+
kind: 'FragmentDefinition',
|
|
6
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
7
|
+
typeCondition: {
|
|
8
|
+
kind: 'NamedType',
|
|
9
|
+
name: { kind: 'Name', value: 'Action' },
|
|
10
|
+
},
|
|
11
|
+
selectionSet: {
|
|
12
|
+
kind: 'SelectionSet',
|
|
13
|
+
selections: [
|
|
14
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
15
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'virtualPresenceId' } },
|
|
16
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'dataHolderId' } },
|
|
17
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
18
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
19
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
20
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
21
|
+
{
|
|
22
|
+
kind: 'Field',
|
|
23
|
+
name: { kind: 'Name', value: 'assistedPayload' },
|
|
24
|
+
selectionSet: {
|
|
25
|
+
kind: 'SelectionSet',
|
|
26
|
+
selections: [
|
|
27
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'toAddress' } },
|
|
28
|
+
{
|
|
29
|
+
kind: 'Field',
|
|
30
|
+
name: { kind: 'Name', value: 'unsubscribeUrl' },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
kind: 'Field',
|
|
34
|
+
name: { kind: 'Name', value: 'unsubscribeMailto' },
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
kind: 'Field',
|
|
38
|
+
name: { kind: 'Name', value: 'contact' },
|
|
39
|
+
selectionSet: {
|
|
40
|
+
kind: 'SelectionSet',
|
|
41
|
+
selections: [
|
|
42
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'email' } },
|
|
43
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'phone' } },
|
|
44
|
+
{
|
|
45
|
+
kind: 'Field',
|
|
46
|
+
name: { kind: 'Name', value: 'address' },
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
kind: 'Field',
|
|
53
|
+
name: { kind: 'Name', value: 'jurisdiction' },
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
kind: 'Field',
|
|
57
|
+
name: { kind: 'Name', value: 'instructions' },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
kind: 'Field',
|
|
61
|
+
name: { kind: 'Name', value: 'emailTemplate' },
|
|
62
|
+
selectionSet: {
|
|
63
|
+
kind: 'SelectionSet',
|
|
64
|
+
selections: [
|
|
65
|
+
{
|
|
66
|
+
kind: 'Field',
|
|
67
|
+
name: { kind: 'Name', value: 'subject' },
|
|
68
|
+
},
|
|
69
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'body' } },
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
kind: 'Field',
|
|
78
|
+
name: { kind: 'Name', value: 'initiatedAtEpochMs' },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
kind: 'Field',
|
|
82
|
+
name: { kind: 'Name', value: 'completedAtEpochMs' },
|
|
83
|
+
},
|
|
84
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
85
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
86
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
87
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
};
|
|
93
|
+
export const AvailableActionFieldsFragmentDoc = {
|
|
94
|
+
kind: 'Document',
|
|
95
|
+
definitions: [
|
|
96
|
+
{
|
|
97
|
+
kind: 'FragmentDefinition',
|
|
98
|
+
name: { kind: 'Name', value: 'AvailableActionFields' },
|
|
99
|
+
typeCondition: {
|
|
100
|
+
kind: 'NamedType',
|
|
101
|
+
name: { kind: 'Name', value: 'AvailableAction' },
|
|
102
|
+
},
|
|
103
|
+
selectionSet: {
|
|
104
|
+
kind: 'SelectionSet',
|
|
105
|
+
selections: [
|
|
106
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
107
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
108
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
109
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'origin' } },
|
|
110
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
111
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
};
|
|
1
117
|
export const AnalysisResultDataFieldsFragmentDoc = {
|
|
2
118
|
kind: 'Document',
|
|
3
119
|
definitions: [
|
|
@@ -1107,6 +1223,282 @@ export const RescanVirtualPresenceDocument = {
|
|
|
1107
1223
|
},
|
|
1108
1224
|
],
|
|
1109
1225
|
};
|
|
1226
|
+
export const InitiateActionDocument = {
|
|
1227
|
+
kind: 'Document',
|
|
1228
|
+
definitions: [
|
|
1229
|
+
{
|
|
1230
|
+
kind: 'OperationDefinition',
|
|
1231
|
+
operation: 'mutation',
|
|
1232
|
+
name: { kind: 'Name', value: 'InitiateAction' },
|
|
1233
|
+
variableDefinitions: [
|
|
1234
|
+
{
|
|
1235
|
+
kind: 'VariableDefinition',
|
|
1236
|
+
variable: {
|
|
1237
|
+
kind: 'Variable',
|
|
1238
|
+
name: { kind: 'Name', value: 'input' },
|
|
1239
|
+
},
|
|
1240
|
+
type: {
|
|
1241
|
+
kind: 'NonNullType',
|
|
1242
|
+
type: {
|
|
1243
|
+
kind: 'NamedType',
|
|
1244
|
+
name: { kind: 'Name', value: 'InitiateActionInput' },
|
|
1245
|
+
},
|
|
1246
|
+
},
|
|
1247
|
+
},
|
|
1248
|
+
],
|
|
1249
|
+
selectionSet: {
|
|
1250
|
+
kind: 'SelectionSet',
|
|
1251
|
+
selections: [
|
|
1252
|
+
{
|
|
1253
|
+
kind: 'Field',
|
|
1254
|
+
name: { kind: 'Name', value: 'initiateAction' },
|
|
1255
|
+
arguments: [
|
|
1256
|
+
{
|
|
1257
|
+
kind: 'Argument',
|
|
1258
|
+
name: { kind: 'Name', value: 'input' },
|
|
1259
|
+
value: {
|
|
1260
|
+
kind: 'Variable',
|
|
1261
|
+
name: { kind: 'Name', value: 'input' },
|
|
1262
|
+
},
|
|
1263
|
+
},
|
|
1264
|
+
],
|
|
1265
|
+
selectionSet: {
|
|
1266
|
+
kind: 'SelectionSet',
|
|
1267
|
+
selections: [
|
|
1268
|
+
{
|
|
1269
|
+
kind: 'FragmentSpread',
|
|
1270
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
1271
|
+
},
|
|
1272
|
+
],
|
|
1273
|
+
},
|
|
1274
|
+
},
|
|
1275
|
+
],
|
|
1276
|
+
},
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
kind: 'FragmentDefinition',
|
|
1280
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
1281
|
+
typeCondition: {
|
|
1282
|
+
kind: 'NamedType',
|
|
1283
|
+
name: { kind: 'Name', value: 'Action' },
|
|
1284
|
+
},
|
|
1285
|
+
selectionSet: {
|
|
1286
|
+
kind: 'SelectionSet',
|
|
1287
|
+
selections: [
|
|
1288
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
1289
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'virtualPresenceId' } },
|
|
1290
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'dataHolderId' } },
|
|
1291
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
1292
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
1293
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
1294
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
1295
|
+
{
|
|
1296
|
+
kind: 'Field',
|
|
1297
|
+
name: { kind: 'Name', value: 'assistedPayload' },
|
|
1298
|
+
selectionSet: {
|
|
1299
|
+
kind: 'SelectionSet',
|
|
1300
|
+
selections: [
|
|
1301
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'toAddress' } },
|
|
1302
|
+
{
|
|
1303
|
+
kind: 'Field',
|
|
1304
|
+
name: { kind: 'Name', value: 'unsubscribeUrl' },
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
kind: 'Field',
|
|
1308
|
+
name: { kind: 'Name', value: 'unsubscribeMailto' },
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
kind: 'Field',
|
|
1312
|
+
name: { kind: 'Name', value: 'contact' },
|
|
1313
|
+
selectionSet: {
|
|
1314
|
+
kind: 'SelectionSet',
|
|
1315
|
+
selections: [
|
|
1316
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'email' } },
|
|
1317
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'phone' } },
|
|
1318
|
+
{
|
|
1319
|
+
kind: 'Field',
|
|
1320
|
+
name: { kind: 'Name', value: 'address' },
|
|
1321
|
+
},
|
|
1322
|
+
],
|
|
1323
|
+
},
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
kind: 'Field',
|
|
1327
|
+
name: { kind: 'Name', value: 'jurisdiction' },
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
kind: 'Field',
|
|
1331
|
+
name: { kind: 'Name', value: 'instructions' },
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
kind: 'Field',
|
|
1335
|
+
name: { kind: 'Name', value: 'emailTemplate' },
|
|
1336
|
+
selectionSet: {
|
|
1337
|
+
kind: 'SelectionSet',
|
|
1338
|
+
selections: [
|
|
1339
|
+
{
|
|
1340
|
+
kind: 'Field',
|
|
1341
|
+
name: { kind: 'Name', value: 'subject' },
|
|
1342
|
+
},
|
|
1343
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'body' } },
|
|
1344
|
+
],
|
|
1345
|
+
},
|
|
1346
|
+
},
|
|
1347
|
+
],
|
|
1348
|
+
},
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
kind: 'Field',
|
|
1352
|
+
name: { kind: 'Name', value: 'initiatedAtEpochMs' },
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
kind: 'Field',
|
|
1356
|
+
name: { kind: 'Name', value: 'completedAtEpochMs' },
|
|
1357
|
+
},
|
|
1358
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
1359
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
1360
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
1361
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
1362
|
+
],
|
|
1363
|
+
},
|
|
1364
|
+
},
|
|
1365
|
+
],
|
|
1366
|
+
};
|
|
1367
|
+
export const ConfirmActionOutcomeDocument = {
|
|
1368
|
+
kind: 'Document',
|
|
1369
|
+
definitions: [
|
|
1370
|
+
{
|
|
1371
|
+
kind: 'OperationDefinition',
|
|
1372
|
+
operation: 'mutation',
|
|
1373
|
+
name: { kind: 'Name', value: 'ConfirmActionOutcome' },
|
|
1374
|
+
variableDefinitions: [
|
|
1375
|
+
{
|
|
1376
|
+
kind: 'VariableDefinition',
|
|
1377
|
+
variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
|
|
1378
|
+
type: {
|
|
1379
|
+
kind: 'NonNullType',
|
|
1380
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
1381
|
+
},
|
|
1382
|
+
},
|
|
1383
|
+
],
|
|
1384
|
+
selectionSet: {
|
|
1385
|
+
kind: 'SelectionSet',
|
|
1386
|
+
selections: [
|
|
1387
|
+
{
|
|
1388
|
+
kind: 'Field',
|
|
1389
|
+
name: { kind: 'Name', value: 'confirmActionOutcome' },
|
|
1390
|
+
arguments: [
|
|
1391
|
+
{
|
|
1392
|
+
kind: 'Argument',
|
|
1393
|
+
name: { kind: 'Name', value: 'id' },
|
|
1394
|
+
value: {
|
|
1395
|
+
kind: 'Variable',
|
|
1396
|
+
name: { kind: 'Name', value: 'id' },
|
|
1397
|
+
},
|
|
1398
|
+
},
|
|
1399
|
+
],
|
|
1400
|
+
selectionSet: {
|
|
1401
|
+
kind: 'SelectionSet',
|
|
1402
|
+
selections: [
|
|
1403
|
+
{
|
|
1404
|
+
kind: 'FragmentSpread',
|
|
1405
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
1406
|
+
},
|
|
1407
|
+
],
|
|
1408
|
+
},
|
|
1409
|
+
},
|
|
1410
|
+
],
|
|
1411
|
+
},
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
kind: 'FragmentDefinition',
|
|
1415
|
+
name: { kind: 'Name', value: 'ActionFields' },
|
|
1416
|
+
typeCondition: {
|
|
1417
|
+
kind: 'NamedType',
|
|
1418
|
+
name: { kind: 'Name', value: 'Action' },
|
|
1419
|
+
},
|
|
1420
|
+
selectionSet: {
|
|
1421
|
+
kind: 'SelectionSet',
|
|
1422
|
+
selections: [
|
|
1423
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
1424
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'virtualPresenceId' } },
|
|
1425
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'dataHolderId' } },
|
|
1426
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
1427
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
1428
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
1429
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
1430
|
+
{
|
|
1431
|
+
kind: 'Field',
|
|
1432
|
+
name: { kind: 'Name', value: 'assistedPayload' },
|
|
1433
|
+
selectionSet: {
|
|
1434
|
+
kind: 'SelectionSet',
|
|
1435
|
+
selections: [
|
|
1436
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'toAddress' } },
|
|
1437
|
+
{
|
|
1438
|
+
kind: 'Field',
|
|
1439
|
+
name: { kind: 'Name', value: 'unsubscribeUrl' },
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
kind: 'Field',
|
|
1443
|
+
name: { kind: 'Name', value: 'unsubscribeMailto' },
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
kind: 'Field',
|
|
1447
|
+
name: { kind: 'Name', value: 'contact' },
|
|
1448
|
+
selectionSet: {
|
|
1449
|
+
kind: 'SelectionSet',
|
|
1450
|
+
selections: [
|
|
1451
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'email' } },
|
|
1452
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'phone' } },
|
|
1453
|
+
{
|
|
1454
|
+
kind: 'Field',
|
|
1455
|
+
name: { kind: 'Name', value: 'address' },
|
|
1456
|
+
},
|
|
1457
|
+
],
|
|
1458
|
+
},
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
kind: 'Field',
|
|
1462
|
+
name: { kind: 'Name', value: 'jurisdiction' },
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
kind: 'Field',
|
|
1466
|
+
name: { kind: 'Name', value: 'instructions' },
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
kind: 'Field',
|
|
1470
|
+
name: { kind: 'Name', value: 'emailTemplate' },
|
|
1471
|
+
selectionSet: {
|
|
1472
|
+
kind: 'SelectionSet',
|
|
1473
|
+
selections: [
|
|
1474
|
+
{
|
|
1475
|
+
kind: 'Field',
|
|
1476
|
+
name: { kind: 'Name', value: 'subject' },
|
|
1477
|
+
},
|
|
1478
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'body' } },
|
|
1479
|
+
],
|
|
1480
|
+
},
|
|
1481
|
+
},
|
|
1482
|
+
],
|
|
1483
|
+
},
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
kind: 'Field',
|
|
1487
|
+
name: { kind: 'Name', value: 'initiatedAtEpochMs' },
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
kind: 'Field',
|
|
1491
|
+
name: { kind: 'Name', value: 'completedAtEpochMs' },
|
|
1492
|
+
},
|
|
1493
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
1494
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
1495
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'createdAtEpochMs' } },
|
|
1496
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'updatedAtEpochMs' } },
|
|
1497
|
+
],
|
|
1498
|
+
},
|
|
1499
|
+
},
|
|
1500
|
+
],
|
|
1501
|
+
};
|
|
1110
1502
|
export const GetProviderConfigurationDocument = {
|
|
1111
1503
|
kind: 'Document',
|
|
1112
1504
|
definitions: [
|
|
@@ -2529,6 +2921,86 @@ export const ListDataHolderScanSummariesDocument = {
|
|
|
2529
2921
|
},
|
|
2530
2922
|
],
|
|
2531
2923
|
};
|
|
2924
|
+
export const ListAvailableActionsDocument = {
|
|
2925
|
+
kind: 'Document',
|
|
2926
|
+
definitions: [
|
|
2927
|
+
{
|
|
2928
|
+
kind: 'OperationDefinition',
|
|
2929
|
+
operation: 'query',
|
|
2930
|
+
name: { kind: 'Name', value: 'ListAvailableActions' },
|
|
2931
|
+
variableDefinitions: [
|
|
2932
|
+
{
|
|
2933
|
+
kind: 'VariableDefinition',
|
|
2934
|
+
variable: {
|
|
2935
|
+
kind: 'Variable',
|
|
2936
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
2937
|
+
},
|
|
2938
|
+
type: {
|
|
2939
|
+
kind: 'NonNullType',
|
|
2940
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
2941
|
+
},
|
|
2942
|
+
},
|
|
2943
|
+
],
|
|
2944
|
+
selectionSet: {
|
|
2945
|
+
kind: 'SelectionSet',
|
|
2946
|
+
selections: [
|
|
2947
|
+
{
|
|
2948
|
+
kind: 'Field',
|
|
2949
|
+
name: { kind: 'Name', value: 'listAvailableActions' },
|
|
2950
|
+
arguments: [
|
|
2951
|
+
{
|
|
2952
|
+
kind: 'Argument',
|
|
2953
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
2954
|
+
value: {
|
|
2955
|
+
kind: 'Variable',
|
|
2956
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
2957
|
+
},
|
|
2958
|
+
},
|
|
2959
|
+
],
|
|
2960
|
+
selectionSet: {
|
|
2961
|
+
kind: 'SelectionSet',
|
|
2962
|
+
selections: [
|
|
2963
|
+
{
|
|
2964
|
+
kind: 'Field',
|
|
2965
|
+
name: { kind: 'Name', value: 'items' },
|
|
2966
|
+
selectionSet: {
|
|
2967
|
+
kind: 'SelectionSet',
|
|
2968
|
+
selections: [
|
|
2969
|
+
{
|
|
2970
|
+
kind: 'FragmentSpread',
|
|
2971
|
+
name: { kind: 'Name', value: 'AvailableActionFields' },
|
|
2972
|
+
},
|
|
2973
|
+
],
|
|
2974
|
+
},
|
|
2975
|
+
},
|
|
2976
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'nextToken' } },
|
|
2977
|
+
],
|
|
2978
|
+
},
|
|
2979
|
+
},
|
|
2980
|
+
],
|
|
2981
|
+
},
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
kind: 'FragmentDefinition',
|
|
2985
|
+
name: { kind: 'Name', value: 'AvailableActionFields' },
|
|
2986
|
+
typeCondition: {
|
|
2987
|
+
kind: 'NamedType',
|
|
2988
|
+
name: { kind: 'Name', value: 'AvailableAction' },
|
|
2989
|
+
},
|
|
2990
|
+
selectionSet: {
|
|
2991
|
+
kind: 'SelectionSet',
|
|
2992
|
+
selections: [
|
|
2993
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
2994
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'additionalInfo' } },
|
|
2995
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'fulfilmentMethod' } },
|
|
2996
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'origin' } },
|
|
2997
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'title' } },
|
|
2998
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'description' } },
|
|
2999
|
+
],
|
|
3000
|
+
},
|
|
3001
|
+
},
|
|
3002
|
+
],
|
|
3003
|
+
};
|
|
2532
3004
|
export const OnVirtualPresenceUpdateDocument = {
|
|
2533
3005
|
kind: 'Document',
|
|
2534
3006
|
definitions: [
|
|
@@ -2775,3 +3247,87 @@ export const OnAnalysisResultUpdateDocument = {
|
|
|
2775
3247
|
},
|
|
2776
3248
|
],
|
|
2777
3249
|
};
|
|
3250
|
+
export const OnActionStatusUpdateDocument = {
|
|
3251
|
+
kind: 'Document',
|
|
3252
|
+
definitions: [
|
|
3253
|
+
{
|
|
3254
|
+
kind: 'OperationDefinition',
|
|
3255
|
+
operation: 'subscription',
|
|
3256
|
+
name: { kind: 'Name', value: 'OnActionStatusUpdate' },
|
|
3257
|
+
variableDefinitions: [
|
|
3258
|
+
{
|
|
3259
|
+
kind: 'VariableDefinition',
|
|
3260
|
+
variable: {
|
|
3261
|
+
kind: 'Variable',
|
|
3262
|
+
name: { kind: 'Name', value: 'owner' },
|
|
3263
|
+
},
|
|
3264
|
+
type: {
|
|
3265
|
+
kind: 'NonNullType',
|
|
3266
|
+
type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
|
|
3267
|
+
},
|
|
3268
|
+
},
|
|
3269
|
+
],
|
|
3270
|
+
selectionSet: {
|
|
3271
|
+
kind: 'SelectionSet',
|
|
3272
|
+
selections: [
|
|
3273
|
+
{
|
|
3274
|
+
kind: 'Field',
|
|
3275
|
+
name: { kind: 'Name', value: 'onActionStatusUpdate' },
|
|
3276
|
+
arguments: [
|
|
3277
|
+
{
|
|
3278
|
+
kind: 'Argument',
|
|
3279
|
+
name: { kind: 'Name', value: 'owner' },
|
|
3280
|
+
value: {
|
|
3281
|
+
kind: 'Variable',
|
|
3282
|
+
name: { kind: 'Name', value: 'owner' },
|
|
3283
|
+
},
|
|
3284
|
+
},
|
|
3285
|
+
],
|
|
3286
|
+
selectionSet: {
|
|
3287
|
+
kind: 'SelectionSet',
|
|
3288
|
+
selections: [
|
|
3289
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'id' } },
|
|
3290
|
+
{
|
|
3291
|
+
kind: 'Field',
|
|
3292
|
+
name: { kind: 'Name', value: 'virtualPresenceId' },
|
|
3293
|
+
},
|
|
3294
|
+
{
|
|
3295
|
+
kind: 'Field',
|
|
3296
|
+
name: { kind: 'Name', value: 'dataHolderId' },
|
|
3297
|
+
},
|
|
3298
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'intent' } },
|
|
3299
|
+
{
|
|
3300
|
+
kind: 'Field',
|
|
3301
|
+
name: { kind: 'Name', value: 'additionalInfo' },
|
|
3302
|
+
},
|
|
3303
|
+
{
|
|
3304
|
+
kind: 'Field',
|
|
3305
|
+
name: { kind: 'Name', value: 'fulfilmentMethod' },
|
|
3306
|
+
},
|
|
3307
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'status' } },
|
|
3308
|
+
{
|
|
3309
|
+
kind: 'Field',
|
|
3310
|
+
name: { kind: 'Name', value: 'initiatedAtEpochMs' },
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
kind: 'Field',
|
|
3314
|
+
name: { kind: 'Name', value: 'completedAtEpochMs' },
|
|
3315
|
+
},
|
|
3316
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'owner' } },
|
|
3317
|
+
{ kind: 'Field', name: { kind: 'Name', value: 'version' } },
|
|
3318
|
+
{
|
|
3319
|
+
kind: 'Field',
|
|
3320
|
+
name: { kind: 'Name', value: 'createdAtEpochMs' },
|
|
3321
|
+
},
|
|
3322
|
+
{
|
|
3323
|
+
kind: 'Field',
|
|
3324
|
+
name: { kind: 'Name', value: 'updatedAtEpochMs' },
|
|
3325
|
+
},
|
|
3326
|
+
],
|
|
3327
|
+
},
|
|
3328
|
+
},
|
|
3329
|
+
],
|
|
3330
|
+
},
|
|
3331
|
+
},
|
|
3332
|
+
],
|
|
3333
|
+
};
|
|
@@ -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 ActionSubscriptionManager extends BaseSubscriptionManager {
|
|
8
|
+
/**
|
|
9
|
+
* Notifies subscribers of an action status update.
|
|
10
|
+
*
|
|
11
|
+
* @param action The updated action.
|
|
12
|
+
*/
|
|
13
|
+
actionUpdated(action) {
|
|
14
|
+
for (const subscriber of this.getSubscribers()) {
|
|
15
|
+
subscriber.actionUpdated(action);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
connectionStatusChanged(state) {
|
|
19
|
+
super.connectionStatusChanged(state);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { ActionSubscriptionManager } from './actionSubscriptionManager';
|
|
8
|
+
import { ActionFulfilmentMethodTransformer } from './transformer/actionFulfilmentMethodTransformer';
|
|
9
|
+
import { ActionIntentTransformer } from './transformer/actionIntentTransformer';
|
|
10
|
+
import { ActionTransformer } from './transformer/actionTransformer';
|
|
11
|
+
import { AvailableActionTransformer } from './transformer/availableActionTransformer';
|
|
12
|
+
export class DefaultActionService {
|
|
13
|
+
appSync;
|
|
14
|
+
actionTransformer;
|
|
15
|
+
availableActionTransformer;
|
|
16
|
+
intentTransformer;
|
|
17
|
+
fulfilmentMethodTransformer;
|
|
18
|
+
subscriptionManager;
|
|
19
|
+
constructor(appSync) {
|
|
20
|
+
this.appSync = appSync;
|
|
21
|
+
this.actionTransformer = new ActionTransformer();
|
|
22
|
+
this.availableActionTransformer = new AvailableActionTransformer();
|
|
23
|
+
this.intentTransformer = new ActionIntentTransformer();
|
|
24
|
+
this.fulfilmentMethodTransformer = new ActionFulfilmentMethodTransformer();
|
|
25
|
+
this.subscriptionManager = new ActionSubscriptionManager();
|
|
26
|
+
}
|
|
27
|
+
async initiate(input) {
|
|
28
|
+
const result = await this.appSync.initiateAction({
|
|
29
|
+
dataHolderId: input.dataHolderId,
|
|
30
|
+
intent: this.intentTransformer.fromEntityToGraphQL(input.intent),
|
|
31
|
+
fulfilmentMethod: this.fulfilmentMethodTransformer.fromEntityToGraphQL(input.fulfilmentMethod),
|
|
32
|
+
});
|
|
33
|
+
return this.actionTransformer.fromGraphQLToEntity(result);
|
|
34
|
+
}
|
|
35
|
+
async confirmOutcome(id) {
|
|
36
|
+
const result = await this.appSync.confirmActionOutcome(id);
|
|
37
|
+
return this.actionTransformer.fromGraphQLToEntity(result);
|
|
38
|
+
}
|
|
39
|
+
async listAvailable(input) {
|
|
40
|
+
const result = await this.appSync.listAvailableActions(input);
|
|
41
|
+
const availableActions = (result.items ?? []).map((item) => this.availableActionTransformer.fromGraphQLToEntity(item));
|
|
42
|
+
return {
|
|
43
|
+
availableActions,
|
|
44
|
+
nextToken: result.nextToken ?? undefined,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async subscribe(input) {
|
|
48
|
+
this.subscriptionManager.subscribe(input.subscriptionId, input.subscriber);
|
|
49
|
+
if (!this.subscriptionManager.getWatcher()) {
|
|
50
|
+
this.subscriptionManager.setWatcher(await this.appSync.onActionStatusUpdated(input.owner));
|
|
51
|
+
this.subscriptionManager.setSubscription(this.setupUpdateSubscription());
|
|
52
|
+
this.subscriptionManager.connectionStatusChanged(ConnectionState.Connected);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
unsubscribe(subscriptionId) {
|
|
56
|
+
this.subscriptionManager.unsubscribe(subscriptionId);
|
|
57
|
+
}
|
|
58
|
+
setupUpdateSubscription() {
|
|
59
|
+
const subscription = this.subscriptionManager.getWatcher()?.subscribe({
|
|
60
|
+
complete: () => {
|
|
61
|
+
this.subscriptionManager.connectionStatusChanged(ConnectionState.Disconnected);
|
|
62
|
+
},
|
|
63
|
+
error: () => {
|
|
64
|
+
this.subscriptionManager.connectionStatusChanged(ConnectionState.Disconnected);
|
|
65
|
+
},
|
|
66
|
+
next: (result) => {
|
|
67
|
+
const action = result.data?.onActionStatusUpdate;
|
|
68
|
+
if (action) {
|
|
69
|
+
const entity = this.actionTransformer.fromGraphQLToEntity(action);
|
|
70
|
+
this.subscriptionManager.actionUpdated(this.actionTransformer.fromEntityToAPI(entity));
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
return subscription;
|
|
75
|
+
}
|
|
76
|
+
}
|