@pushwoosh/rpc-v2-http-api-data 0.2.300 → 0.2.301

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 CHANGED
@@ -10316,6 +10316,230 @@ 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
+ "confirmationRequired": {
10406
+ "type": "boolean"
10407
+ },
10408
+ "confirmationThreshold": {
10409
+ "type": "number"
10410
+ }
10411
+ }
10412
+ },
10413
+ "pushwoosh.rpc_v2.data_erasure.GetDataErasureTaskRequest": {
10414
+ "type": "I",
10415
+ "fields": {
10416
+ "taskId": {
10417
+ "type": "number"
10418
+ }
10419
+ }
10420
+ },
10421
+ "pushwoosh.rpc_v2.data_erasure.GetDataErasureTaskResponse": {
10422
+ "type": "I",
10423
+ "fields": {
10424
+ "task": {
10425
+ "type": "pushwoosh.rpc_v2.data_erasure.DataErasureTask"
10426
+ }
10427
+ }
10428
+ },
10429
+ "pushwoosh.rpc_v2.data_erasure.ListDataErasureTasksRequest": {
10430
+ "type": "I",
10431
+ "fields": {
10432
+ "limit": {
10433
+ "type": "number"
10434
+ },
10435
+ "offset": {
10436
+ "type": "number"
10437
+ }
10438
+ }
10439
+ },
10440
+ "pushwoosh.rpc_v2.data_erasure.ListDataErasureTasksResponse": {
10441
+ "type": "I",
10442
+ "fields": {
10443
+ "tasks": {
10444
+ "type": "pushwoosh.rpc_v2.data_erasure.DataErasureTask",
10445
+ "array": true
10446
+ }
10447
+ }
10448
+ },
10449
+ "pushwoosh.rpc_v2.data_erasure.ListDataErasureTaskRowsRequest": {
10450
+ "type": "I",
10451
+ "fields": {
10452
+ "taskId": {
10453
+ "type": "number"
10454
+ },
10455
+ "limit": {
10456
+ "type": "number"
10457
+ },
10458
+ "offset": {
10459
+ "type": "number"
10460
+ }
10461
+ }
10462
+ },
10463
+ "pushwoosh.rpc_v2.data_erasure.ListDataErasureTaskRowsResponse": {
10464
+ "type": "I",
10465
+ "fields": {
10466
+ "rows": {
10467
+ "type": "pushwoosh.rpc_v2.data_erasure.DataErasureTaskRow",
10468
+ "array": true
10469
+ }
10470
+ }
10471
+ },
10472
+ "pushwoosh.rpc_v2.data_erasure.DataErasureTask": {
10473
+ "type": "I",
10474
+ "fields": {
10475
+ "taskId": {
10476
+ "type": "number"
10477
+ },
10478
+ "identifierType": {
10479
+ "type": "pushwoosh.rpc_v2.data_erasure.SubjectIdentifierType"
10480
+ },
10481
+ "applicationCodes": {
10482
+ "type": "string",
10483
+ "array": true
10484
+ },
10485
+ "dryRun": {
10486
+ "type": "boolean"
10487
+ },
10488
+ "status": {
10489
+ "type": "pushwoosh.rpc_v2.data_erasure.ErasureTaskStatus"
10490
+ },
10491
+ "totalCount": {
10492
+ "type": "number"
10493
+ },
10494
+ "deletedCount": {
10495
+ "type": "number"
10496
+ },
10497
+ "notFoundCount": {
10498
+ "type": "number"
10499
+ },
10500
+ "failedCount": {
10501
+ "type": "number"
10502
+ },
10503
+ "failReason": {
10504
+ "type": "string"
10505
+ },
10506
+ "initiatorUserId": {
10507
+ "type": "number"
10508
+ },
10509
+ "initiatorTokenId": {
10510
+ "type": "number"
10511
+ },
10512
+ "created": {
10513
+ "type": "Date"
10514
+ },
10515
+ "startedAt": {
10516
+ "type": "Date"
10517
+ },
10518
+ "finishedAt": {
10519
+ "type": "Date"
10520
+ }
10521
+ }
10522
+ },
10523
+ "pushwoosh.rpc_v2.data_erasure.DataErasureTaskRow": {
10524
+ "type": "I",
10525
+ "fields": {
10526
+ "identifierHash": {
10527
+ "type": "string"
10528
+ },
10529
+ "applicationCode": {
10530
+ "type": "string"
10531
+ },
10532
+ "result": {
10533
+ "type": "pushwoosh.rpc_v2.data_erasure.ErasureRowResult"
10534
+ },
10535
+ "detail": {
10536
+ "type": "string"
10537
+ },
10538
+ "created": {
10539
+ "type": "Date"
10540
+ }
10541
+ }
10542
+ },
10319
10543
  "pushwoosh.rpc_v2.deeplinks.DeeplinksService": {
10320
10544
  "type": "S",
10321
10545
  "key": "deeplinks",
@@ -0,0 +1,94 @@
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: above the threshold the call is refused until it carries the id of a finished dry run of the same scope. */
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
+ * Id of the finished dry run that measured this erase. Required above
34
+ * confirmation_threshold subjects: nobody erases a volume they have not seen.
35
+ */
36
+ confirmationDryRunTaskId?: number;
37
+ };
38
+ export type CreateDataErasureTaskResponse = {
39
+ taskId: number;
40
+ /**
41
+ * Set when the request was refused because it erases more subjects than the
42
+ * threshold and carried no matching dry run.
43
+ */
44
+ confirmationRequired: boolean;
45
+ confirmationThreshold: number;
46
+ };
47
+ export type GetDataErasureTaskRequest = {
48
+ taskId?: number;
49
+ };
50
+ export type GetDataErasureTaskResponse = {
51
+ task: DataErasureTask;
52
+ };
53
+ export type ListDataErasureTasksRequest = {
54
+ limit?: number;
55
+ offset?: number;
56
+ };
57
+ export type ListDataErasureTasksResponse = {
58
+ tasks: DataErasureTask[];
59
+ };
60
+ export type ListDataErasureTaskRowsRequest = {
61
+ taskId?: number;
62
+ limit?: number;
63
+ offset?: number;
64
+ };
65
+ export type ListDataErasureTaskRowsResponse = {
66
+ rows: DataErasureTaskRow[];
67
+ };
68
+ export type DataErasureTask = {
69
+ taskId: number;
70
+ identifierType: SubjectIdentifierType;
71
+ applicationCodes: string[];
72
+ dryRun: boolean;
73
+ status: ErasureTaskStatus;
74
+ totalCount: number;
75
+ deletedCount: number;
76
+ notFoundCount: number;
77
+ failedCount: number;
78
+ failReason: string;
79
+ /** Control panel user who started the task, 0 when it came from an API token. */
80
+ initiatorUserId: number;
81
+ /** API token that started the task, 0 when a control panel user did. */
82
+ initiatorTokenId: number;
83
+ created: Date;
84
+ startedAt: Date;
85
+ finishedAt: Date;
86
+ };
87
+ export type DataErasureTaskRow = {
88
+ /** sha256 of the identifier: the journal of an erasure must not hold personal data. */
89
+ identifierHash: string;
90
+ applicationCode: string;
91
+ result: ErasureRowResult;
92
+ detail: string;
93
+ created: Date;
94
+ };
@@ -0,0 +1,3 @@
1
+ /* eslint-disable */
2
+ /* Autogenerated code */
3
+ export {};
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.300",
3
+ "version": "0.2.301",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",