@transcend-io/cli 4.56.0 → 4.58.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.
Files changed (33) hide show
  1. package/README.md +151 -28
  2. package/build/cli-request-approve.d.ts +3 -0
  3. package/build/cli-request-approve.d.ts.map +1 -0
  4. package/build/cli-request-approve.js +56 -0
  5. package/build/cli-request-approve.js.map +1 -0
  6. package/build/cli-request-cancel.d.ts +3 -0
  7. package/build/cli-request-cancel.d.ts.map +1 -0
  8. package/build/cli-request-cancel.js +66 -0
  9. package/build/cli-request-cancel.js.map +1 -0
  10. package/build/graphql/gqls/request.d.ts +3 -0
  11. package/build/graphql/gqls/request.d.ts.map +1 -1
  12. package/build/graphql/gqls/request.js +28 -1
  13. package/build/graphql/gqls/request.js.map +1 -1
  14. package/build/graphql/gqls/template.d.ts.map +1 -1
  15. package/build/graphql/gqls/template.js +6 -0
  16. package/build/graphql/gqls/template.js.map +1 -1
  17. package/build/graphql/syncTemplates.d.ts +10 -0
  18. package/build/graphql/syncTemplates.d.ts.map +1 -1
  19. package/build/graphql/syncTemplates.js.map +1 -1
  20. package/build/requests/approvePrivacyRequests.d.ts +20 -0
  21. package/build/requests/approvePrivacyRequests.d.ts.map +1 -0
  22. package/build/requests/approvePrivacyRequests.js +61 -0
  23. package/build/requests/approvePrivacyRequests.js.map +1 -0
  24. package/build/requests/cancelPrivacyRequests.d.ts +24 -0
  25. package/build/requests/cancelPrivacyRequests.d.ts.map +1 -0
  26. package/build/requests/cancelPrivacyRequests.js +90 -0
  27. package/build/requests/cancelPrivacyRequests.js.map +1 -0
  28. package/build/requests/index.d.ts +2 -0
  29. package/build/requests/index.d.ts.map +1 -1
  30. package/build/requests/index.js +2 -0
  31. package/build/requests/index.js.map +1 -1
  32. package/build/tsbuildinfo +1 -1
  33. package/package.json +3 -1
package/README.md CHANGED
@@ -21,54 +21,62 @@
21
21
  - [Authentication](#authentication-2)
22
22
  - [Usage](#usage-3)
23
23
  - [Arguments](#arguments-2)
24
- - [tr-request-upload](#tr-request-upload)
24
+ - [tr-request-approve](#tr-request-approve)
25
25
  - [Authentication](#authentication-3)
26
26
  - [Arguments](#arguments-3)
27
27
  - [Usage](#usage-4)
28
- - [tr-request-restart](#tr-request-restart)
28
+ - [tr-request-cancel](#tr-request-cancel)
29
29
  - [Authentication](#authentication-4)
30
30
  - [Arguments](#arguments-4)
31
31
  - [Usage](#usage-5)
32
- - [tr-request-export](#tr-request-export)
32
+ - [tr-request-upload](#tr-request-upload)
33
33
  - [Authentication](#authentication-5)
34
34
  - [Arguments](#arguments-5)
35
35
  - [Usage](#usage-6)
36
- - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
36
+ - [tr-request-restart](#tr-request-restart)
37
37
  - [Authentication](#authentication-6)
38
38
  - [Arguments](#arguments-6)
39
39
  - [Usage](#usage-7)
40
- - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
40
+ - [tr-request-export](#tr-request-export)
41
41
  - [Authentication](#authentication-7)
42
42
  - [Arguments](#arguments-7)
43
43
  - [Usage](#usage-8)
44
- - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
44
+ - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
45
45
  - [Authentication](#authentication-8)
46
46
  - [Arguments](#arguments-8)
47
47
  - [Usage](#usage-9)
48
- - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
48
+ - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
49
49
  - [Authentication](#authentication-9)
50
50
  - [Arguments](#arguments-9)
51
51
  - [Usage](#usage-10)
52
- - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
52
+ - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
53
53
  - [Authentication](#authentication-10)
54
54
  - [Arguments](#arguments-10)
55
55
  - [Usage](#usage-11)
56
- - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
56
+ - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
57
57
  - [Authentication](#authentication-11)
58
58
  - [Arguments](#arguments-11)
59
59
  - [Usage](#usage-12)
60
- - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
60
+ - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
61
61
  - [Authentication](#authentication-12)
62
62
  - [Arguments](#arguments-12)
63
63
  - [Usage](#usage-13)
64
- - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv-1)
64
+ - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
65
65
  - [Authentication](#authentication-13)
66
66
  - [Arguments](#arguments-13)
67
67
  - [Usage](#usage-14)
68
- - [tr-generate-api-keys](#tr-generate-api-keys)
68
+ - [tr-update-consent-manager](#tr-update-consent-manager)
69
69
  - [Authentication](#authentication-14)
70
70
  - [Arguments](#arguments-14)
71
71
  - [Usage](#usage-15)
72
+ - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
73
+ - [Authentication](#authentication-15)
74
+ - [Arguments](#arguments-15)
75
+ - [Usage](#usage-16)
76
+ - [tr-generate-api-keys](#tr-generate-api-keys)
77
+ - [Authentication](#authentication-16)
78
+ - [Arguments](#arguments-16)
79
+ - [Usage](#usage-17)
72
80
 
73
81
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
74
82
 
@@ -90,6 +98,8 @@ yarn add -D @transcend-io/cli
90
98
  yarn tr-pull --auth=$TRANSCEND_API_KEY
91
99
  yarn tr-push --auth=$TRANSCEND_API_KEY
92
100
  yarn tr-discover-silos --auth=$TRANSCEND_API_KEY
101
+ yarn tr-request-approve --auth=$TRANSCEND_API_KEY
102
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY
93
103
  yarn tr-request-upload --auth=$TRANSCEND_API_KEY
94
104
  yarn tr-request-export --auth=$TRANSCEND_API_KEY
95
105
  yarn tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -98,6 +108,7 @@ yarn tr-cron-mark-identifiers-completed --auth=$TRANSCEND_API_KEY
98
108
  yarn tr-manual-enrichment-pull-identifiers --auth=$TRANSCEND_API_KEY
99
109
  yarn tr-mark-request-data-silos-completed --auth=$TRANSCEND_API_KEY
100
110
  yarn tr-retry-request-data-silos --auth=$TRANSCEND_API_KEY
111
+ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY
101
112
  yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY
102
113
  yarn tr-generate-api-keys --auth=$TRANSCEND_API_KEY
103
114
  ```
@@ -112,6 +123,8 @@ npm i -D @transcend-io/cli
112
123
  tr-pull --auth=$TRANSCEND_API_KEY
113
124
  tr-push --auth=$TRANSCEND_API_KEY
114
125
  tr-discover-silos --auth=$TRANSCEND_API_KEY
126
+ tr-request-approve --auth=$TRANSCEND_API_KEY
127
+ tr-request-cancel --auth=$TRANSCEND_API_KEY
115
128
  tr-request-upload --auth=$TRANSCEND_API_KEY
116
129
  tr-request-export --auth=$TRANSCEND_API_KEY
117
130
  tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -120,6 +133,7 @@ tr-cron-mark-identifiers-completed --auth=$TRANSCEND_API_KEY
120
133
  tr-manual-enrichment-pull-identifiers --auth=$TRANSCEND_API_KEY
121
134
  tr-mark-request-data-silos-completed --auth=$TRANSCEND_API_KEY
122
135
  tr-retry-request-data-silos --auth=$TRANSCEND_API_KEY
136
+ tr-update-consent-manager --auth=$TRANSCEND_API_KEY
123
137
  tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY
124
138
  tr-generate-api-keys --auth=$TRANSCEND_API_KEY
125
139
  ```
@@ -132,12 +146,7 @@ npm i -g @transcend-io/cli
132
146
 
133
147
  # cli commands available everywhere on machine
134
148
  tr-pull --auth=$TRANSCEND_API_KEY
135
- tr-push --auth=$TRANSCEND_API_KEY
136
- tr-discover-silos --auth=$TRANSCEND_API_KEY
137
- tr-request-upload --auth=$TRANSCEND_API_KEY
138
- tr-request-restart --auth=$TRANSCEND_API_KEY
139
- tr-cron-pull-identifiers --auth=$TRANSCEND_API_KEY
140
- tr-cron-mark-identifiers-completed --auth=$TRANSCEND_API_KEY
149
+ ...
141
150
  ```
142
151
 
143
152
  Note:
@@ -598,6 +607,119 @@ You can include additional arguments as well:
598
607
  | auth | Transcend API key. | string | N/A | true |
599
608
  | fileGlobs | You can pass a [glob syntax pattern(s)](https://github.com/mrmlnc/fast-glob) to specify additional file paths to scan in addition to the default (ex: package.json). | string | N/A | false |
600
609
 
610
+ ### tr-request-approve
611
+
612
+ Bulk approve a set of privacy requests from the [Privacy Requests -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
613
+
614
+ #### Authentication
615
+
616
+ In order to use this cli, you will first need to generate an API key on the Transcend Admin Dashboard (https://app.transcend.io/infrastructure/api-keys).
617
+
618
+ The API key needs the following scopes:
619
+
620
+ - Request Approval and Communication
621
+ - View Incoming Requests
622
+ - Manage Request Compilation
623
+
624
+ #### Arguments
625
+
626
+ | Argument | Description | Type | Default | Required |
627
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- | ------------------------ | -------- |
628
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
629
+ | actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to approve. | RequestAction[] | N/A | true |
630
+ | silentModeBefore | Any requests made before this date should be marked as silent mode | Date | N/A | false |
631
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
632
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
633
+
634
+ #### Usage
635
+
636
+ Bulk approve all SALE_OPT_OUT and ERASURE requests
637
+
638
+ ```sh
639
+ yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT,ERASURE
640
+ ```
641
+
642
+ Specifying the backend URL, needed for US hosted backend infrastructure.
643
+
644
+ ```sh
645
+ yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --transcendUrl=https://api.us.transcend.io
646
+ ```
647
+
648
+ Approve all requests, but mark any request made before 05/03/2023 as silent mode to prevent emailing those requests. When not provided, the existing silent mode state of that request will be used to determine if emails are sent.
649
+
650
+ ```sh
651
+ yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
652
+ ```
653
+
654
+ Increase the concurrency (defaults to 100)
655
+
656
+ ```sh
657
+ yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
658
+ ```
659
+
660
+ ### tr-request-cancel
661
+
662
+ Bulk cancel a set of privacy requests from the [Privacy Requests -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
663
+
664
+ #### Authentication
665
+
666
+ In order to use this cli, you will first need to generate an API key on the Transcend Admin Dashboard (https://app.transcend.io/infrastructure/api-keys).
667
+
668
+ The API key needs the following scopes:
669
+
670
+ - Request Approval and Communication
671
+ - View Incoming Requests
672
+
673
+ #### Arguments
674
+
675
+ | Argument | Description | Type | Default | Required |
676
+ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
677
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
678
+ | actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to cancel. | RequestAction[] | N/A | true |
679
+ | statuses | The [request statuses](https://docs.transcend.io/docs/privacy-requests/overview#request-statuses) to cancel. | RequestStatus[] | REQUEST_MADE,WAITING.ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING | false |
680
+ | silentModeBefore | Any requests made before this date should be marked as silent mode for canceling to skip email sending | Date | N/A | false |
681
+ | cancellationTitle | The title of the [email template](https://app.transcend.io/privacy-requests/email-templates) that should be sent to the requests upon cancelation. Any request in silent mode will not be emailed. | string | Request Canceled | false |
682
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
683
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
684
+
685
+ #### Usage
686
+
687
+ Bulk cancel all open SALE_OPT_OUT and ERASURE requests.
688
+
689
+ ```sh
690
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT,ERASURE
691
+ ```
692
+
693
+ Specifying the backend URL, needed for US hosted backend infrastructure.
694
+
695
+ ```sh
696
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --transcendUrl=https://api.us.transcend.io
697
+ ```
698
+
699
+ Bulk cancel all Erasure (request.type=ERASURE) requests that are in an enriching state (request.status=ENRICHING)
700
+
701
+ ```sh
702
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --statuses=ENRICHING
703
+ ```
704
+
705
+ Send a specific email template to the request that are being canceled. When not provided, the default cancellation template is used ("Request Canceled").
706
+
707
+ ```sh
708
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --cancellationTitle="Custom Email Template"
709
+ ```
710
+
711
+ Cancel all open SALE_OPT_OUT, but mark any request made before 05/03/2023 as silent mode to prevent emailing those requests. When not provided, the existing silent mode state of that request will be used to determine if emails are sent.
712
+
713
+ ```sh
714
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
715
+ ```
716
+
717
+ Increase the concurrency (defaults to 100)
718
+
719
+ ```sh
720
+ yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
721
+ ```
722
+
601
723
  ### tr-request-upload
602
724
 
603
725
  If you need to upload a set of requests from a CSV, you can run this command.
@@ -1205,7 +1327,7 @@ yarn tr-retry-request-data-silos --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e
1205
1327
  --transcendUrl=https://api.us.transcend.io
1206
1328
  ```
1207
1329
 
1208
- ### tr-upload-data-flows-from-csv
1330
+ ### tr-update-consent-manager
1209
1331
 
1210
1332
  This command allows for updating Consent Manager to latest version. The consent manager bundle can also be deployed using this commannd.
1211
1333
 
@@ -1229,40 +1351,40 @@ The API key must have the following scopes:
1229
1351
  #### Usage
1230
1352
 
1231
1353
  ```sh
1232
- yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY
1354
+ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY
1233
1355
  ```
1234
1356
 
1235
- Specifying the backend URL, needed for US hosted backend infrastructure.
1357
+ Specifying the backend URL, needed for US hosted backend infrastructu re.
1236
1358
 
1237
1359
  ```sh
1238
- yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --transcendUrl=https://api.us.transcend.io
1360
+ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY --transcendUrl=https://api.us.transcend.io
1239
1361
  ```
1240
1362
 
1241
1363
  Update version and deploy bundles.
1242
1364
 
1243
1365
  ```sh
1244
- yarn tr-upload-data-flows-from-csv -auth=$TRANSCEND_API_KEY --deploy=true
1366
+ yarn tr-update-consent-manager -auth=$TRANSCEND_API_KEY --deploy=true
1245
1367
  ```
1246
1368
 
1247
1369
  Update just the TEST bundle
1248
1370
 
1249
1371
  ```sh
1250
- yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --bundleTypes=TEST
1372
+ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY --bundleTypes=TEST
1251
1373
  ```
1252
1374
 
1253
1375
  Update just the PRODUCTION bundle
1254
1376
 
1255
1377
  ```sh
1256
- yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --bundleTypes=PRODUCTION
1378
+ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY --bundleTypes=PRODUCTION
1257
1379
  ```
1258
1380
 
1259
1381
  Update multiple organizations at once
1260
1382
 
1261
1383
  ```sh
1262
- yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --bundleTypes=PRODUCTION
1384
+ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY --bundleTypes=PRODUCTION
1263
1385
 
1264
1386
  tr-generate-api-keys --email=test@transcend.io --password=$TRANSCEND_PASSWORD --scopes="Manage Consent Manager" --apiKeyTitle="CLI Usage Cross Instance Sync" --file=./transcend-api-keys.json
1265
- yarn tr-upload-data-flows-from-csv --auth=./transcend-api-keys.json --deploy=true
1387
+ yarn tr-update-consent-manager --auth=./transcend-api-keys.json --deploy=true
1266
1388
  ```
1267
1389
 
1268
1390
  ### tr-upload-data-flows-from-csv
@@ -1274,6 +1396,7 @@ Step 1) Download the CSV of data flows that you want to edit from the Admin Dash
1274
1396
  <img width="1464" alt="Screenshot 2023-06-22 at 6 05 36 PM" src="https://github.com/transcend-io/cli/assets/10264973/c4b65b31-2cf3-49c9-b543-041567c7aff8">
1275
1397
 
1276
1398
  Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
1399
+
1277
1400
  Step 3) Upload the modified CSV file back into the dashboard with the command `yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --file=./approved-flows.csv --trackerStatus=LIVE`
1278
1401
 
1279
1402
  #### Authentication
@@ -1325,7 +1448,7 @@ yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --trackerStatus=LIV
1325
1448
  Specifying the backend URL, needed for US hosted backend infrastructure.
1326
1449
 
1327
1450
  ```sh
1328
- yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --trackerStatus=LIVE
1451
+ yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --transcendUrl=https://api.us.transcend.io
1329
1452
  ```
1330
1453
 
1331
1454
  ### tr-generate-api-keys
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-approve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-approve.d.ts","sourceRoot":"","sources":["../src/cli-request-approve.ts"],"names":[],"mappings":""}
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const yargs_parser_1 = __importDefault(require("yargs-parser"));
8
+ const colors_1 = __importDefault(require("colors"));
9
+ const logger_1 = require("./logger");
10
+ const privacy_types_1 = require("@transcend-io/privacy-types");
11
+ const requests_1 = require("./requests");
12
+ /**
13
+ * Restart requests based on some filter criteria
14
+ *
15
+ * Requires scopes:
16
+ * - Request Approval and Communication
17
+ * - View Incoming Requests
18
+ * - Manage Request Compilation
19
+ *
20
+ * Dev Usage:
21
+ * yarn ts-node ./src/cli-request-approve.ts --auth=asd123 \
22
+ * --requestType=ERASURE --silentModeBefore=06/23/2023
23
+ *
24
+ * Standard usage:
25
+ * yarn tr-request-approve --auth=asd123 \
26
+ * --requestType=ERASURE --silentModeBefore=06/23/2023
27
+ */
28
+ async function main() {
29
+ // Parse command line arguments
30
+ const { transcendUrl = 'https://api.transcend.io', auth, actions = '', silentModeBefore, concurrency = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
31
+ // Ensure auth is passed
32
+ if (!auth) {
33
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
34
+ process.exit(1);
35
+ }
36
+ // Validate actions
37
+ const parsedActions = (0, requests_1.splitCsvToList)(actions);
38
+ const invalidActions = parsedActions.filter(
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
+ (type) => !Object.values(privacy_types_1.RequestAction).includes(type));
41
+ if (invalidActions.length > 0) {
42
+ logger_1.logger.error(colors_1.default.red(`Failed to parse actions:"${invalidActions.join(',')}".\n` +
43
+ `Expected one of: \n${Object.values(privacy_types_1.RequestAction).join('\n')}`));
44
+ process.exit(1);
45
+ }
46
+ // Pull privacy requests
47
+ await (0, requests_1.approvePrivacyRequests)({
48
+ transcendUrl,
49
+ requestActions: parsedActions,
50
+ auth,
51
+ concurrency: parseInt(concurrency, 10),
52
+ silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
53
+ });
54
+ }
55
+ main();
56
+ //# sourceMappingURL=cli-request-approve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-approve.js","sourceRoot":"","sources":["../src/cli-request-approve.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA4D;AAC5D,yCAAoE;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,YAAY,GAAG,0BAA0B,EACzC,IAAI,EACJ,OAAO,GAAG,EAAE,EACZ,gBAAgB,EAChB,WAAW,GAAG,KAAK,GACpB,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAA8B,CAAC;IAE9D,wBAAwB;IACxB,IAAI,CAAC,IAAI,EAAE;QACT,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,2EAA2E,CAC5E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,mBAAmB;IACnB,MAAM,aAAa,GAAG,IAAA,yBAAc,EAAC,OAAO,CAAoB,CAAC;IACjE,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM;IACzC,8DAA8D;IAC9D,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,QAAQ,CAAC,IAAW,CAAC,CAC9D,CAAC;IACF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,4BAA4B,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM;YACxD,sBAAsB,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,wBAAwB;IACxB,MAAM,IAAA,iCAAsB,EAAC;QAC3B,YAAY;QACZ,cAAc,EAAE,aAAa;QAC7B,IAAI;QACJ,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS;KAC5E,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-cancel.d.ts","sourceRoot":"","sources":["../src/cli-request-cancel.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const yargs_parser_1 = __importDefault(require("yargs-parser"));
8
+ const colors_1 = __importDefault(require("colors"));
9
+ const logger_1 = require("./logger");
10
+ const privacy_types_1 = require("@transcend-io/privacy-types");
11
+ const requests_1 = require("./requests");
12
+ /**
13
+ * Cancel requests based on some filter criteria
14
+ *
15
+ * Requires scopes:
16
+ * - Request Approval and Communication
17
+ *
18
+ * Dev Usage:
19
+ * yarn ts-node ./src/cli-request-cancel.ts --auth=asd123 \
20
+ * --requestType=ERASURE --silentModeBefore=06/23/2023
21
+ *
22
+ * Standard usage:
23
+ * yarn tr-request-cancel --auth=asd123 \
24
+ * --requestType=ERASURE --silentModeBefore=06/23/2023
25
+ */
26
+ async function main() {
27
+ // Parse command line arguments
28
+ const { transcendUrl = 'https://api.transcend.io', auth, actions = '', statuses = '', silentModeBefore, cancellationTitle, concurrency = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
29
+ // Ensure auth is passed
30
+ if (!auth) {
31
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
32
+ process.exit(1);
33
+ }
34
+ // Validate actions
35
+ const parsedActions = (0, requests_1.splitCsvToList)(actions);
36
+ const invalidActions = parsedActions.filter(
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
+ (type) => !Object.values(privacy_types_1.RequestAction).includes(type));
39
+ if (invalidActions.length > 0) {
40
+ logger_1.logger.error(colors_1.default.red(`Failed to parse actions:"${invalidActions.join(',')}".\n` +
41
+ `Expected one of: \n${Object.values(privacy_types_1.RequestAction).join('\n')}`));
42
+ process.exit(1);
43
+ }
44
+ // Validate statuses
45
+ const parsedStatuses = (0, requests_1.splitCsvToList)(statuses);
46
+ const invalidStatues = parsedStatuses.filter(
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
+ (type) => !Object.values(privacy_types_1.RequestStatus).includes(type));
49
+ if (invalidStatues.length > 0) {
50
+ logger_1.logger.error(colors_1.default.red(`Failed to parse statuses:"${invalidStatues.join(',')}".\n` +
51
+ `Expected one of: \n${Object.values(privacy_types_1.RequestStatus).join('\n')}`));
52
+ process.exit(1);
53
+ }
54
+ // Pull privacy requests
55
+ await (0, requests_1.cancelPrivacyRequests)({
56
+ transcendUrl,
57
+ requestActions: parsedActions,
58
+ auth,
59
+ cancellationTitle,
60
+ statuses: parsedStatuses.length > 0 ? parsedStatuses : undefined,
61
+ concurrency: parseInt(concurrency, 10),
62
+ silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
63
+ });
64
+ }
65
+ main();
66
+ //# sourceMappingURL=cli-request-cancel.js.map
@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,oBAAoB;IACpB,MAAM,cAAc,GAAG,IAAA,yBAAc,EAAC,QAAQ,CAAoB,CAAC;IACnE,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM;IAC1C,8DAA8D;IAC9D,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,QAAQ,CAAC,IAAW,CAAC,CAC9D,CAAC;IACF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,6BAA6B,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM;YACzD,sBAAsB,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,wBAAwB;IACxB,MAAM,IAAA,gCAAqB,EAAC;QAC1B,YAAY;QACZ,cAAc,EAAE,aAAa;QAC7B,IAAI;QACJ,iBAAiB;QACjB,QAAQ,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;QAChE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS;KAC5E,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -1,2 +1,5 @@
1
1
  export declare const REQUESTS: string;
2
+ export declare const APPROVE_PRIVACY_REQUEST: string;
3
+ export declare const CANCEL_PRIVACY_REQUEST: string;
4
+ export declare const UPDATE_PRIVACY_REQUEST: string;
2
5
  //# sourceMappingURL=request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QAmCpB,CAAC"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,QAmCpB,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAQnC,CAAC;AACF,eAAO,MAAM,sBAAsB,QAQlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAQlC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REQUESTS = void 0;
3
+ exports.UPDATE_PRIVACY_REQUEST = exports.CANCEL_PRIVACY_REQUEST = exports.APPROVE_PRIVACY_REQUEST = exports.REQUESTS = void 0;
4
4
  const graphql_request_1 = require("graphql-request");
5
5
  exports.REQUESTS = (0, graphql_request_1.gql) `
6
6
  query TranscendCliRequests(
@@ -38,4 +38,31 @@ exports.REQUESTS = (0, graphql_request_1.gql) `
38
38
  }
39
39
  }
40
40
  `;
41
+ exports.APPROVE_PRIVACY_REQUEST = (0, graphql_request_1.gql) `
42
+ mutation TranscendCliApprovePrivacyRequest($input: CommunicationInput!) {
43
+ approveRequest(input: $input) {
44
+ request {
45
+ id
46
+ }
47
+ }
48
+ }
49
+ `;
50
+ exports.CANCEL_PRIVACY_REQUEST = (0, graphql_request_1.gql) `
51
+ mutation TranscendCliCancelPrivacyRequest($input: CommunicationInput!) {
52
+ cancelRequest(input: $input) {
53
+ request {
54
+ id
55
+ }
56
+ }
57
+ }
58
+ `;
59
+ exports.UPDATE_PRIVACY_REQUEST = (0, graphql_request_1.gql) `
60
+ mutation TranscendCliUpdatePrivacyRequest($input: UpdateRequestInput!) {
61
+ updateRequest(input: $input) {
62
+ request {
63
+ id
64
+ }
65
+ }
66
+ }
67
+ `;
41
68
  //# sourceMappingURL=request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC1B,CAAC"}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/graphql/gqls/request.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,QAAQ,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmC1B,CAAC;AAEW,QAAA,uBAAuB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQzC,CAAC;AACW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQxC,CAAC;AAEW,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QASrB,CAAC;AAEF,eAAO,MAAM,eAAe,QAM3B,CAAC"}
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAerB,CAAC;AAEF,eAAO,MAAM,eAAe,QAM3B,CAAC"}
@@ -8,6 +8,12 @@ exports.TEMPLATES = (0, graphql_request_1.gql) `
8
8
  nodes {
9
9
  id
10
10
  title
11
+ subject {
12
+ defaultMessage
13
+ }
14
+ template {
15
+ defaultMessage
16
+ }
11
17
  }
12
18
  }
13
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS3B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMjC,CAAC"}
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/graphql/gqls/template.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;CAe3B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;CAMjC,CAAC"}
@@ -5,6 +5,16 @@ export interface Template {
5
5
  id: string;
6
6
  /** Title of Template */
7
7
  title: string;
8
+ /** Template subject (e.g. email subject) */
9
+ subject: {
10
+ /** Default message for template subject */
11
+ defaultMessage: string;
12
+ };
13
+ /** Template body - rich text HTML */
14
+ template: {
15
+ /** Default message for template body */
16
+ defaultMessage: string;
17
+ };
8
18
  }
9
19
  /**
10
20
  * Fetch all Templates in the organization
@@ -1 +1 @@
1
- {"version":3,"file":"syncTemplates.d.ts","sourceRoot":"","sources":["../../src/graphql/syncTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAID;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,QAAQ,EAAE,CAAC,CA2BrB;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,IAAI,CAAC,CAaf"}
1
+ {"version":3,"file":"syncTemplates.d.ts","sourceRoot":"","sources":["../../src/graphql/syncTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;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AAK,CAAC,CAAC;QACzB,MAAM,IAAI,SAAS,CAAC;QACpB,cAAc,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;KAC7C,QAAQ,cAAc,EAAE;IAEzB,OAAO,SAAS,CAAC;AACnB,CAAC;AA9BD,8CA8BC;AAED;;;;;GAKG;AACI,KAAK,UAAU,YAAY,CAChC,QAAuB,EACvB,MAAqB;IAErB,+CAA+C;IAC/C,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChE,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CACnC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CACxC,CAAC;IAEF,gCAAgC;IAChC,IAAI,CAAC,gBAAgB,EAAE;QACrB,MAAM,IAAA,uCAAkB,EAAC,MAAM,EAAE,sBAAe,EAAE;YAChD,KAAK,EAAE,QAAQ,CAAC,KAAK;SACtB,CAAC,CAAC;KACJ;AACH,CAAC;AAhBD,oCAgBC"}
@@ -0,0 +1,20 @@
1
+ import { RequestAction } from '@transcend-io/privacy-types';
2
+ /**
3
+ * Approve a set of privacy requests
4
+ *
5
+ * @param options - Options
6
+ * @returns The number of requests approved
7
+ */
8
+ export declare function approvePrivacyRequests({ requestActions, auth, silentModeBefore, concurrency, transcendUrl, }: {
9
+ /** The request actions that should be restarted */
10
+ requestActions: RequestAction[];
11
+ /** Transcend API key authentication */
12
+ auth: string;
13
+ /** Concurrency limit for approving */
14
+ concurrency?: number;
15
+ /** Mark these requests as silent mode if they were created before this date */
16
+ silentModeBefore?: Date;
17
+ /** API URL for Transcend backend */
18
+ transcendUrl?: string;
19
+ }): Promise<number>;
20
+ //# sourceMappingURL=approvePrivacyRequests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approvePrivacyRequests.d.ts","sourceRoot":"","sources":["../../src/requests/approvePrivacyRequests.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAiB,MAAM,6BAA6B,CAAC;AAU3E;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,WAAiB,EACjB,YAAyC,GAC1C,EAAE;IACD,mDAAmD;IACnD,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DlB"}