@pushwoosh/rpc-v2-http-api-data 0.2.300 → 0.2.302
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/data.js +218 -0
- package/data_erasure.d.ts +88 -0
- package/data_erasure.js +3 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
package/data.js
CHANGED
|
@@ -10316,6 +10316,224 @@ export const data = {
|
|
|
10316
10316
|
}
|
|
10317
10317
|
}
|
|
10318
10318
|
},
|
|
10319
|
+
"pushwoosh.rpc_v2.data_erasure.DataErasureService": {
|
|
10320
|
+
"type": "S",
|
|
10321
|
+
"key": "dataErasure",
|
|
10322
|
+
"methods": {
|
|
10323
|
+
"CreateTask": {
|
|
10324
|
+
"request": "pushwoosh.rpc_v2.data_erasure.CreateDataErasureTaskRequest",
|
|
10325
|
+
"response": "pushwoosh.rpc_v2.data_erasure.CreateDataErasureTaskResponse",
|
|
10326
|
+
"method": "post",
|
|
10327
|
+
"path": "/api/data_erasure/tasks"
|
|
10328
|
+
},
|
|
10329
|
+
"GetTask": {
|
|
10330
|
+
"request": "pushwoosh.rpc_v2.data_erasure.GetDataErasureTaskRequest",
|
|
10331
|
+
"response": "pushwoosh.rpc_v2.data_erasure.GetDataErasureTaskResponse",
|
|
10332
|
+
"method": "get",
|
|
10333
|
+
"path": "/api/data_erasure/tasks/{task_id}"
|
|
10334
|
+
},
|
|
10335
|
+
"ListTasks": {
|
|
10336
|
+
"request": "pushwoosh.rpc_v2.data_erasure.ListDataErasureTasksRequest",
|
|
10337
|
+
"response": "pushwoosh.rpc_v2.data_erasure.ListDataErasureTasksResponse",
|
|
10338
|
+
"method": "get",
|
|
10339
|
+
"path": "/api/data_erasure/tasks"
|
|
10340
|
+
},
|
|
10341
|
+
"ListTaskRows": {
|
|
10342
|
+
"request": "pushwoosh.rpc_v2.data_erasure.ListDataErasureTaskRowsRequest",
|
|
10343
|
+
"response": "pushwoosh.rpc_v2.data_erasure.ListDataErasureTaskRowsResponse",
|
|
10344
|
+
"method": "get",
|
|
10345
|
+
"path": "/api/data_erasure/tasks/{task_id}/rows"
|
|
10346
|
+
}
|
|
10347
|
+
}
|
|
10348
|
+
},
|
|
10349
|
+
"pushwoosh.rpc_v2.data_erasure.SubjectIdentifierType": {
|
|
10350
|
+
"type": "E",
|
|
10351
|
+
"values": [
|
|
10352
|
+
"SUBJECT_IDENTIFIER_UNKNOWN",
|
|
10353
|
+
"SUBJECT_IDENTIFIER_USER_ID",
|
|
10354
|
+
"SUBJECT_IDENTIFIER_HWID",
|
|
10355
|
+
"SUBJECT_IDENTIFIER_EMAIL"
|
|
10356
|
+
]
|
|
10357
|
+
},
|
|
10358
|
+
"pushwoosh.rpc_v2.data_erasure.ErasureTaskStatus": {
|
|
10359
|
+
"type": "E",
|
|
10360
|
+
"values": [
|
|
10361
|
+
"ERASURE_TASK_STATUS_PENDING",
|
|
10362
|
+
"ERASURE_TASK_STATUS_IN_PROGRESS",
|
|
10363
|
+
"ERASURE_TASK_STATUS_DONE",
|
|
10364
|
+
"ERASURE_TASK_STATUS_FAILED"
|
|
10365
|
+
]
|
|
10366
|
+
},
|
|
10367
|
+
"pushwoosh.rpc_v2.data_erasure.ErasureRowResult": {
|
|
10368
|
+
"type": "E",
|
|
10369
|
+
"values": [
|
|
10370
|
+
"ERASURE_ROW_RESULT_UNKNOWN",
|
|
10371
|
+
"ERASURE_ROW_RESULT_DELETED",
|
|
10372
|
+
"ERASURE_ROW_RESULT_NOT_FOUND",
|
|
10373
|
+
"ERASURE_ROW_RESULT_SKIPPED",
|
|
10374
|
+
"ERASURE_ROW_RESULT_FAILED"
|
|
10375
|
+
]
|
|
10376
|
+
},
|
|
10377
|
+
"pushwoosh.rpc_v2.data_erasure.CreateDataErasureTaskRequest": {
|
|
10378
|
+
"type": "I",
|
|
10379
|
+
"fields": {
|
|
10380
|
+
"identifierType": {
|
|
10381
|
+
"type": "pushwoosh.rpc_v2.data_erasure.SubjectIdentifierType"
|
|
10382
|
+
},
|
|
10383
|
+
"identifiers": {
|
|
10384
|
+
"type": "string",
|
|
10385
|
+
"array": true
|
|
10386
|
+
},
|
|
10387
|
+
"applicationCodes": {
|
|
10388
|
+
"type": "string",
|
|
10389
|
+
"array": true
|
|
10390
|
+
},
|
|
10391
|
+
"dryRun": {
|
|
10392
|
+
"type": "boolean"
|
|
10393
|
+
},
|
|
10394
|
+
"confirmationDryRunTaskId": {
|
|
10395
|
+
"type": "number"
|
|
10396
|
+
}
|
|
10397
|
+
}
|
|
10398
|
+
},
|
|
10399
|
+
"pushwoosh.rpc_v2.data_erasure.CreateDataErasureTaskResponse": {
|
|
10400
|
+
"type": "I",
|
|
10401
|
+
"fields": {
|
|
10402
|
+
"taskId": {
|
|
10403
|
+
"type": "number"
|
|
10404
|
+
}
|
|
10405
|
+
}
|
|
10406
|
+
},
|
|
10407
|
+
"pushwoosh.rpc_v2.data_erasure.GetDataErasureTaskRequest": {
|
|
10408
|
+
"type": "I",
|
|
10409
|
+
"fields": {
|
|
10410
|
+
"taskId": {
|
|
10411
|
+
"type": "number"
|
|
10412
|
+
}
|
|
10413
|
+
}
|
|
10414
|
+
},
|
|
10415
|
+
"pushwoosh.rpc_v2.data_erasure.GetDataErasureTaskResponse": {
|
|
10416
|
+
"type": "I",
|
|
10417
|
+
"fields": {
|
|
10418
|
+
"task": {
|
|
10419
|
+
"type": "pushwoosh.rpc_v2.data_erasure.DataErasureTask"
|
|
10420
|
+
}
|
|
10421
|
+
}
|
|
10422
|
+
},
|
|
10423
|
+
"pushwoosh.rpc_v2.data_erasure.ListDataErasureTasksRequest": {
|
|
10424
|
+
"type": "I",
|
|
10425
|
+
"fields": {
|
|
10426
|
+
"limit": {
|
|
10427
|
+
"type": "number"
|
|
10428
|
+
},
|
|
10429
|
+
"offset": {
|
|
10430
|
+
"type": "number"
|
|
10431
|
+
}
|
|
10432
|
+
}
|
|
10433
|
+
},
|
|
10434
|
+
"pushwoosh.rpc_v2.data_erasure.ListDataErasureTasksResponse": {
|
|
10435
|
+
"type": "I",
|
|
10436
|
+
"fields": {
|
|
10437
|
+
"tasks": {
|
|
10438
|
+
"type": "pushwoosh.rpc_v2.data_erasure.DataErasureTask",
|
|
10439
|
+
"array": true
|
|
10440
|
+
}
|
|
10441
|
+
}
|
|
10442
|
+
},
|
|
10443
|
+
"pushwoosh.rpc_v2.data_erasure.ListDataErasureTaskRowsRequest": {
|
|
10444
|
+
"type": "I",
|
|
10445
|
+
"fields": {
|
|
10446
|
+
"taskId": {
|
|
10447
|
+
"type": "number"
|
|
10448
|
+
},
|
|
10449
|
+
"limit": {
|
|
10450
|
+
"type": "number"
|
|
10451
|
+
},
|
|
10452
|
+
"offset": {
|
|
10453
|
+
"type": "number"
|
|
10454
|
+
}
|
|
10455
|
+
}
|
|
10456
|
+
},
|
|
10457
|
+
"pushwoosh.rpc_v2.data_erasure.ListDataErasureTaskRowsResponse": {
|
|
10458
|
+
"type": "I",
|
|
10459
|
+
"fields": {
|
|
10460
|
+
"rows": {
|
|
10461
|
+
"type": "pushwoosh.rpc_v2.data_erasure.DataErasureTaskRow",
|
|
10462
|
+
"array": true
|
|
10463
|
+
}
|
|
10464
|
+
}
|
|
10465
|
+
},
|
|
10466
|
+
"pushwoosh.rpc_v2.data_erasure.DataErasureTask": {
|
|
10467
|
+
"type": "I",
|
|
10468
|
+
"fields": {
|
|
10469
|
+
"taskId": {
|
|
10470
|
+
"type": "number"
|
|
10471
|
+
},
|
|
10472
|
+
"identifierType": {
|
|
10473
|
+
"type": "pushwoosh.rpc_v2.data_erasure.SubjectIdentifierType"
|
|
10474
|
+
},
|
|
10475
|
+
"applicationCodes": {
|
|
10476
|
+
"type": "string",
|
|
10477
|
+
"array": true
|
|
10478
|
+
},
|
|
10479
|
+
"dryRun": {
|
|
10480
|
+
"type": "boolean"
|
|
10481
|
+
},
|
|
10482
|
+
"status": {
|
|
10483
|
+
"type": "pushwoosh.rpc_v2.data_erasure.ErasureTaskStatus"
|
|
10484
|
+
},
|
|
10485
|
+
"totalCount": {
|
|
10486
|
+
"type": "number"
|
|
10487
|
+
},
|
|
10488
|
+
"deletedCount": {
|
|
10489
|
+
"type": "number"
|
|
10490
|
+
},
|
|
10491
|
+
"notFoundCount": {
|
|
10492
|
+
"type": "number"
|
|
10493
|
+
},
|
|
10494
|
+
"failedCount": {
|
|
10495
|
+
"type": "number"
|
|
10496
|
+
},
|
|
10497
|
+
"failReason": {
|
|
10498
|
+
"type": "string"
|
|
10499
|
+
},
|
|
10500
|
+
"initiatorUserId": {
|
|
10501
|
+
"type": "number"
|
|
10502
|
+
},
|
|
10503
|
+
"initiatorTokenId": {
|
|
10504
|
+
"type": "number"
|
|
10505
|
+
},
|
|
10506
|
+
"created": {
|
|
10507
|
+
"type": "Date"
|
|
10508
|
+
},
|
|
10509
|
+
"startedAt": {
|
|
10510
|
+
"type": "Date"
|
|
10511
|
+
},
|
|
10512
|
+
"finishedAt": {
|
|
10513
|
+
"type": "Date"
|
|
10514
|
+
}
|
|
10515
|
+
}
|
|
10516
|
+
},
|
|
10517
|
+
"pushwoosh.rpc_v2.data_erasure.DataErasureTaskRow": {
|
|
10518
|
+
"type": "I",
|
|
10519
|
+
"fields": {
|
|
10520
|
+
"identifierHash": {
|
|
10521
|
+
"type": "string"
|
|
10522
|
+
},
|
|
10523
|
+
"applicationCode": {
|
|
10524
|
+
"type": "string"
|
|
10525
|
+
},
|
|
10526
|
+
"result": {
|
|
10527
|
+
"type": "pushwoosh.rpc_v2.data_erasure.ErasureRowResult"
|
|
10528
|
+
},
|
|
10529
|
+
"detail": {
|
|
10530
|
+
"type": "string"
|
|
10531
|
+
},
|
|
10532
|
+
"created": {
|
|
10533
|
+
"type": "Date"
|
|
10534
|
+
}
|
|
10535
|
+
}
|
|
10536
|
+
},
|
|
10319
10537
|
"pushwoosh.rpc_v2.deeplinks.DeeplinksService": {
|
|
10320
10538
|
"type": "S",
|
|
10321
10539
|
"key": "deeplinks",
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
|
+
export type DataErasureService_CreateTask = RpcMethod<CreateDataErasureTaskRequest, CreateDataErasureTaskResponse>;
|
|
3
|
+
export type DataErasureService_GetTask = RpcMethod<GetDataErasureTaskRequest, GetDataErasureTaskResponse>;
|
|
4
|
+
export type DataErasureService_ListTasks = RpcMethod<ListDataErasureTasksRequest, ListDataErasureTasksResponse>;
|
|
5
|
+
export type DataErasureService_ListTaskRows = RpcMethod<ListDataErasureTaskRowsRequest, ListDataErasureTaskRowsResponse>;
|
|
6
|
+
/**
|
|
7
|
+
* DataErasureService is the self-serve door to erasing the personal data of an end
|
|
8
|
+
* user (GDPR). The erase itself runs as a background task; these methods start it,
|
|
9
|
+
* follow it and show what it did.
|
|
10
|
+
*/
|
|
11
|
+
export interface DataErasureService {
|
|
12
|
+
/** Starts erasing the personal data of the listed subjects in the listed applications. Identifiers are user ids, device hwids or email addresses. With dry_run the task only counts what would be erased. Erasure is irreversible: run it with dry_run first to see the volume, then repeat the call quoting that dry run in confirmation_dry_run_task_id. */
|
|
13
|
+
CreateTask: DataErasureService_CreateTask;
|
|
14
|
+
/** Returns one data erasure task with its status and counters: how many subjects were erased, not found or failed. Use to follow a task started by create_data_erasure_task. */
|
|
15
|
+
GetTask: DataErasureService_GetTask;
|
|
16
|
+
/** Lists data erasure tasks of the account, newest first — the audit journal of who erased what and when. Use to show the operations log or to export it. */
|
|
17
|
+
ListTasks: DataErasureService_ListTasks;
|
|
18
|
+
/** Returns the per-identifier outcome of one task: what was deleted, not found, skipped or failed. Identifiers are reported as hashes, the task never stores them in the clear. */
|
|
19
|
+
ListTaskRows: DataErasureService_ListTaskRows;
|
|
20
|
+
}
|
|
21
|
+
/** How the subjects of an erasure request are addressed. */
|
|
22
|
+
export type SubjectIdentifierType = 'SUBJECT_IDENTIFIER_UNKNOWN' | 'SUBJECT_IDENTIFIER_USER_ID' | 'SUBJECT_IDENTIFIER_HWID' | 'SUBJECT_IDENTIFIER_EMAIL';
|
|
23
|
+
export type ErasureTaskStatus = 'ERASURE_TASK_STATUS_PENDING' | 'ERASURE_TASK_STATUS_IN_PROGRESS' | 'ERASURE_TASK_STATUS_DONE' | 'ERASURE_TASK_STATUS_FAILED';
|
|
24
|
+
export type ErasureRowResult = 'ERASURE_ROW_RESULT_UNKNOWN' | 'ERASURE_ROW_RESULT_DELETED' | 'ERASURE_ROW_RESULT_NOT_FOUND' | 'ERASURE_ROW_RESULT_SKIPPED' | 'ERASURE_ROW_RESULT_FAILED';
|
|
25
|
+
export type CreateDataErasureTaskRequest = {
|
|
26
|
+
identifierType?: SubjectIdentifierType;
|
|
27
|
+
identifiers?: string[];
|
|
28
|
+
/** Application codes (format XXXXX-XXXXX) the subjects are erased from. */
|
|
29
|
+
applicationCodes?: string[];
|
|
30
|
+
/** Counts what would be erased and writes nothing. */
|
|
31
|
+
dryRun?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Optional id of the finished dry run that measured this erase. When set, the
|
|
34
|
+
* erase is refused unless it matches that measurement subject for subject.
|
|
35
|
+
*/
|
|
36
|
+
confirmationDryRunTaskId?: number;
|
|
37
|
+
};
|
|
38
|
+
export type CreateDataErasureTaskResponse = {
|
|
39
|
+
taskId: number;
|
|
40
|
+
};
|
|
41
|
+
export type GetDataErasureTaskRequest = {
|
|
42
|
+
taskId?: number;
|
|
43
|
+
};
|
|
44
|
+
export type GetDataErasureTaskResponse = {
|
|
45
|
+
task: DataErasureTask;
|
|
46
|
+
};
|
|
47
|
+
export type ListDataErasureTasksRequest = {
|
|
48
|
+
limit?: number;
|
|
49
|
+
offset?: number;
|
|
50
|
+
};
|
|
51
|
+
export type ListDataErasureTasksResponse = {
|
|
52
|
+
tasks: DataErasureTask[];
|
|
53
|
+
};
|
|
54
|
+
export type ListDataErasureTaskRowsRequest = {
|
|
55
|
+
taskId?: number;
|
|
56
|
+
limit?: number;
|
|
57
|
+
offset?: number;
|
|
58
|
+
};
|
|
59
|
+
export type ListDataErasureTaskRowsResponse = {
|
|
60
|
+
rows: DataErasureTaskRow[];
|
|
61
|
+
};
|
|
62
|
+
export type DataErasureTask = {
|
|
63
|
+
taskId: number;
|
|
64
|
+
identifierType: SubjectIdentifierType;
|
|
65
|
+
applicationCodes: string[];
|
|
66
|
+
dryRun: boolean;
|
|
67
|
+
status: ErasureTaskStatus;
|
|
68
|
+
totalCount: number;
|
|
69
|
+
deletedCount: number;
|
|
70
|
+
notFoundCount: number;
|
|
71
|
+
failedCount: number;
|
|
72
|
+
failReason: string;
|
|
73
|
+
/** Control panel user who started the task, 0 when it came from an API token. */
|
|
74
|
+
initiatorUserId: number;
|
|
75
|
+
/** API token that started the task, 0 when a control panel user did. */
|
|
76
|
+
initiatorTokenId: number;
|
|
77
|
+
created: Date;
|
|
78
|
+
startedAt: Date;
|
|
79
|
+
finishedAt: Date;
|
|
80
|
+
};
|
|
81
|
+
export type DataErasureTaskRow = {
|
|
82
|
+
/** sha256 of the identifier: the journal of an erasure must not hold personal data. */
|
|
83
|
+
identifierHash: string;
|
|
84
|
+
applicationCode: string;
|
|
85
|
+
result: ErasureRowResult;
|
|
86
|
+
detail: string;
|
|
87
|
+
created: Date;
|
|
88
|
+
};
|
package/data_erasure.js
ADDED
package/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { CategoriesService as pushwoosh_rpc_v2_categories_CategoriesService } fr
|
|
|
23
23
|
import { MessagingService as pushwoosh_channels_messagingApi_v2_MessagingService } from './pushwoosh_channels_messagingApi_v2';
|
|
24
24
|
import { CloudPagesService as pushwoosh_rpc_v2_cloud_pages_CloudPagesService } from './cloud_pages';
|
|
25
25
|
import { CustomerJourneyService as pushwoosh_rpc_v2_customer_journey_CustomerJourneyService } from './customer_journey';
|
|
26
|
+
import { DataErasureService as pushwoosh_rpc_v2_data_erasure_DataErasureService } from './data_erasure';
|
|
26
27
|
import { DeeplinksService as pushwoosh_rpc_v2_deeplinks_DeeplinksService } from './deeplinks';
|
|
27
28
|
import { DeliverabilityCheckerService as pushwoosh_rpc_v2_deliverability_checker_DeliverabilityCheckerService } from './deliverability_checker';
|
|
28
29
|
import { DevicesService as pushwoosh_rpc_v2_devices_DevicesService } from './devices';
|
|
@@ -99,6 +100,7 @@ export type API = {
|
|
|
99
100
|
messaging: pushwoosh_channels_messagingApi_v2_MessagingService;
|
|
100
101
|
cloudPages: pushwoosh_rpc_v2_cloud_pages_CloudPagesService;
|
|
101
102
|
customerJourney: pushwoosh_rpc_v2_customer_journey_CustomerJourneyService;
|
|
103
|
+
dataErasure: pushwoosh_rpc_v2_data_erasure_DataErasureService;
|
|
102
104
|
deeplinks: pushwoosh_rpc_v2_deeplinks_DeeplinksService;
|
|
103
105
|
deliverabilityChecker: pushwoosh_rpc_v2_deliverability_checker_DeliverabilityCheckerService;
|
|
104
106
|
devices: pushwoosh_rpc_v2_devices_DevicesService;
|