@transcend-io/cli 4.88.7 → 4.89.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/README.md +59 -36
- package/build/cli-request-approve.js +17 -1
- package/build/cli-request-approve.js.map +1 -1
- package/build/cli-request-cancel.js +21 -1
- package/build/cli-request-cancel.js.map +1 -1
- package/build/cli-request-export.js +17 -1
- package/build/cli-request-export.js.map +1 -1
- package/build/cli-request-mark-silent.js +19 -4
- package/build/cli-request-mark-silent.js.map +1 -1
- package/build/cli-request-restart.js +16 -5
- package/build/cli-request-restart.js.map +1 -1
- package/build/requests/approvePrivacyRequests.d.ts +5 -1
- package/build/requests/approvePrivacyRequests.d.ts.map +1 -1
- package/build/requests/approvePrivacyRequests.js +3 -1
- package/build/requests/approvePrivacyRequests.js.map +1 -1
- package/build/requests/bulkRestartRequests.d.ts +6 -2
- package/build/requests/bulkRestartRequests.d.ts.map +1 -1
- package/build/requests/bulkRestartRequests.js +5 -2
- package/build/requests/bulkRestartRequests.js.map +1 -1
- package/build/requests/cancelPrivacyRequests.d.ts +5 -1
- package/build/requests/cancelPrivacyRequests.d.ts.map +1 -1
- package/build/requests/cancelPrivacyRequests.js +3 -1
- package/build/requests/cancelPrivacyRequests.js.map +1 -1
- package/build/requests/markSilentPrivacyRequests.d.ts +5 -3
- package/build/requests/markSilentPrivacyRequests.d.ts.map +1 -1
- package/build/requests/markSilentPrivacyRequests.js +4 -3
- package/build/requests/markSilentPrivacyRequests.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -683,6 +683,8 @@ The API key needs the following scopes:
|
|
|
683
683
|
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
684
684
|
| actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to approve. | RequestAction[] | N/A | true |
|
|
685
685
|
| silentModeBefore | Any requests made before this date should be marked as silent mode | Date | N/A | false |
|
|
686
|
+
| createdAtBefore | Approve requests that were submitted before this time | Date | N/A | false |
|
|
687
|
+
| createdAtAfter | Approve requests that were submitted after this time | Date | N/A | false |
|
|
686
688
|
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
687
689
|
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
688
690
|
|
|
@@ -712,6 +714,12 @@ Increase the concurrency (defaults to 100)
|
|
|
712
714
|
yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
|
|
713
715
|
```
|
|
714
716
|
|
|
717
|
+
Approve ERASURE requests created within a specific time frame
|
|
718
|
+
|
|
719
|
+
```sh
|
|
720
|
+
yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
|
|
721
|
+
```
|
|
722
|
+
|
|
715
723
|
### tr-request-cancel
|
|
716
724
|
|
|
717
725
|
Bulk cancel a set of privacy requests from the [Privacy Requests -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
|
|
@@ -727,17 +735,18 @@ The API key needs the following scopes:
|
|
|
727
735
|
|
|
728
736
|
#### Arguments
|
|
729
737
|
|
|
730
|
-
| Argument
|
|
731
|
-
|
|
|
732
|
-
| auth
|
|
733
|
-
| actions
|
|
734
|
-
| statuses
|
|
735
|
-
| requestIds
|
|
736
|
-
|
|
737
|
-
|
|
|
738
|
-
|
|
|
739
|
-
|
|
|
740
|
-
|
|
|
738
|
+
| Argument | Description | Type | Default | Required |
|
|
739
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
|
|
740
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
741
|
+
| actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to cancel. | RequestAction[] | N/A | true |
|
|
742
|
+
| 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 |
|
|
743
|
+
| requestIds | Specify the specific request IDs to cancel | string[] | [] | false |
|
|
744
|
+
| silentModeBefore | Any requests made before this date should be marked as silent mode for canceling to skip email sending | Date | N/A | false |
|
|
745
|
+
| createdAtBefore | Cancel requests that were submitted before this time | Date | N/A | false |
|
|
746
|
+
| createdAtAfter | Cancel requests that were submitted after this time | Date | N/A | false |
|
|
747
|
+
| 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 |
|
|
748
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
749
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
741
750
|
|
|
742
751
|
#### Usage
|
|
743
752
|
|
|
@@ -778,6 +787,12 @@ Cancel all open SALE_OPT_OUT, but mark any request made before 05/03/2023 as sil
|
|
|
778
787
|
yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
|
|
779
788
|
```
|
|
780
789
|
|
|
790
|
+
Cancel all open SALE_OPT_OUT, within a specific time frame
|
|
791
|
+
|
|
792
|
+
```sh
|
|
793
|
+
yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
|
|
794
|
+
```
|
|
795
|
+
|
|
781
796
|
Increase the concurrency (defaults to 100)
|
|
782
797
|
|
|
783
798
|
```sh
|
|
@@ -798,16 +813,16 @@ The API key needs the following scopes:
|
|
|
798
813
|
|
|
799
814
|
#### Arguments
|
|
800
815
|
|
|
801
|
-
| Argument
|
|
802
|
-
|
|
|
803
|
-
| auth
|
|
804
|
-
| actions
|
|
805
|
-
| statuses
|
|
806
|
-
| requestIds
|
|
807
|
-
|
|
808
|
-
|
|
|
809
|
-
| transcendUrl
|
|
810
|
-
| concurrency
|
|
816
|
+
| Argument | Description | Type | Default | Required |
|
|
817
|
+
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
|
|
818
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
819
|
+
| actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to mark silent. | RequestAction[] | N/A | true |
|
|
820
|
+
| statuses | The [request statuses](https://docs.transcend.io/docs/privacy-requests/overview#request-statuses) to mark silent. | RequestStatus[] | REQUEST_MADE,WAITING.ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING | false |
|
|
821
|
+
| requestIds | Specify the specific request IDs to mark silent | string[] | [] | false |
|
|
822
|
+
| createdAtBefore | Mark silent requests that were submitted before this time | Date | N/A | false |
|
|
823
|
+
| createdAtAfter | Mark silent requests that were submitted after this time | Date | N/A | false |
|
|
824
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
825
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
811
826
|
|
|
812
827
|
#### Usage
|
|
813
828
|
|
|
@@ -836,10 +851,10 @@ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ACCESS,ERASURE,S
|
|
|
836
851
|
--requestIds=c3ae78c9-2768-4666-991a-d2f729503337,342e4bd1-64ea-4af0-a4ad-704b5a07cfe4
|
|
837
852
|
```
|
|
838
853
|
|
|
839
|
-
Mark sale opt out requests as silent
|
|
854
|
+
Mark sale opt out requests as silent within a certain date range
|
|
840
855
|
|
|
841
856
|
```sh
|
|
842
|
-
yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --
|
|
857
|
+
yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
|
|
843
858
|
```
|
|
844
859
|
|
|
845
860
|
Increase the concurrency (defaults to 100)
|
|
@@ -1004,7 +1019,9 @@ The API key needs the following scopes:
|
|
|
1004
1019
|
| requestIds | Specify the specific request IDs to restart | string[] | [] | false |
|
|
1005
1020
|
| emailIsVerified | Indicate whether the primary email address is verified. Set to false to send a verification email. | boolean | true | false |
|
|
1006
1021
|
| createdAt | Restart requests that were submitted before a specific date. | Date | Date.now() | false |
|
|
1007
|
-
|
|
|
1022
|
+
| silentModeBefore | Requests older than this date should be marked as silent mode | Date | N/A | false |
|
|
1023
|
+
| createdAtBefore | Restart requests that were submitted before this time | Date | N/A | false |
|
|
1024
|
+
| createdAtAfter | Restart requests that were submitted after this time | Date | N/A | false |
|
|
1008
1025
|
| sendEmailReceipt | Send email receipts to the restarted requests | boolean | false | false |
|
|
1009
1026
|
| copyIdentifiers | Copy over all enriched identifiers from the initial request. Leave false to restart from scratch with initial identifiers only. | boolean | false | false |
|
|
1010
1027
|
| skipWaitingPeriod | Skip queued state of request and go straight to compiling | boolean | false | false |
|
|
@@ -1055,7 +1072,13 @@ yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING
|
|
|
1055
1072
|
Restart requests and place everything in silent mode submitted before a certain date
|
|
1056
1073
|
|
|
1057
1074
|
```sh
|
|
1058
|
-
yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING --actions=ACCESS,ERASURE --
|
|
1075
|
+
yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING --actions=ACCESS,ERASURE --silentModeBefore=2022-12-05T00:46
|
|
1076
|
+
```
|
|
1077
|
+
|
|
1078
|
+
Restart requests within a specific timeframe
|
|
1079
|
+
|
|
1080
|
+
```sh
|
|
1081
|
+
yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING --actions=ACCESS,ERASURE ---createdAtBefore="04/05/2023" --createdAtAfter="02/21/2023"
|
|
1059
1082
|
```
|
|
1060
1083
|
|
|
1061
1084
|
Send email receipts to the restarted requests
|
|
@@ -1345,19 +1368,19 @@ In order to use this cli, you will first need to generate an API key on the Tran
|
|
|
1345
1368
|
The API key must have the following scopes:
|
|
1346
1369
|
|
|
1347
1370
|
- "Manage Request Identity Verification"
|
|
1348
|
-
- "Manage Request Compilation" (only when specifying `
|
|
1371
|
+
- "Manage Request Compilation" (only when specifying `silentModeBefore`)
|
|
1349
1372
|
|
|
1350
1373
|
#### Arguments
|
|
1351
1374
|
|
|
1352
|
-
| Argument
|
|
1353
|
-
|
|
|
1354
|
-
| auth
|
|
1355
|
-
| enricherId
|
|
1356
|
-
| sombraAuth
|
|
1357
|
-
| transcendUrl
|
|
1358
|
-
| file
|
|
1359
|
-
|
|
|
1360
|
-
| concurrency
|
|
1375
|
+
| Argument | Description | Type | Default | Required |
|
|
1376
|
+
| ---------------- | ------------------------------------------------------------------------------------ | ------------------ | ----------------------------------- | -------- |
|
|
1377
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
1378
|
+
| enricherId | The ID of the Request Enricher to upload to | string - UUID | N/A | true |
|
|
1379
|
+
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
|
|
1380
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
1381
|
+
| file | Path to the CSV file where requests will be written to. | string - file-path | ./manual-enrichment-identifiers.csv | false |
|
|
1382
|
+
| silentModeBefore | When true, set requests into silent mode before enriching | boolean | false | false |
|
|
1383
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
1361
1384
|
|
|
1362
1385
|
#### Usage
|
|
1363
1386
|
|
|
@@ -1392,7 +1415,7 @@ yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherI
|
|
|
1392
1415
|
When enriching requests, mark all requests as silent mode before processing
|
|
1393
1416
|
|
|
1394
1417
|
```sh
|
|
1395
|
-
yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherId=27d45a0d-7d03-47fa-9b30-6d697005cfcf --
|
|
1418
|
+
yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherId=27d45a0d-7d03-47fa-9b30-6d697005cfcf --silentModeBefore=true
|
|
1396
1419
|
```
|
|
1397
1420
|
|
|
1398
1421
|
### tr-mark-request-data-silos-completed
|
|
@@ -28,7 +28,21 @@ const constants_1 = require("./constants");
|
|
|
28
28
|
*/
|
|
29
29
|
async function main() {
|
|
30
30
|
// Parse command line arguments
|
|
31
|
-
const {
|
|
31
|
+
const {
|
|
32
|
+
/** Transcend Backend URL */
|
|
33
|
+
transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
|
|
34
|
+
/** API key */
|
|
35
|
+
auth,
|
|
36
|
+
/** Approve these specific actions */
|
|
37
|
+
actions = '',
|
|
38
|
+
/** Mark as silent mode when made before this date */
|
|
39
|
+
silentModeBefore,
|
|
40
|
+
/** Concurrency to approve requests at */
|
|
41
|
+
concurrency = '50',
|
|
42
|
+
/** Filter for requests created before this date */
|
|
43
|
+
createdAtBefore,
|
|
44
|
+
/** Filter for requests created after this date */
|
|
45
|
+
createdAtAfter, } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
32
46
|
// Ensure auth is passed
|
|
33
47
|
if (!auth) {
|
|
34
48
|
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
|
|
@@ -51,6 +65,8 @@ async function main() {
|
|
|
51
65
|
auth,
|
|
52
66
|
concurrency: parseInt(concurrency, 10),
|
|
53
67
|
silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
|
|
68
|
+
createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,
|
|
69
|
+
createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
|
|
54
70
|
});
|
|
55
71
|
}
|
|
56
72
|
main();
|
|
@@ -1 +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;AACpE,2CAAoD;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,
|
|
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;AACpE,2CAAoD;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,qCAAqC;IACrC,OAAO,GAAG,EAAE;IACZ,qDAAqD;IACrD,gBAAgB;IAChB,yCAAyC;IACzC,WAAW,GAAG,IAAI;IAClB,mDAAmD;IACnD,eAAe;IACf,kDAAkD;IAClD,cAAc,GACf,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,uFAAuF,CACxF,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;QAC3E,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS;QACxE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS;KACtE,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -26,7 +26,25 @@ const constants_1 = require("./constants");
|
|
|
26
26
|
*/
|
|
27
27
|
async function main() {
|
|
28
28
|
// Parse command line arguments
|
|
29
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
/** Transcend Backend URL */
|
|
31
|
+
transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
|
|
32
|
+
/** API key */
|
|
33
|
+
auth,
|
|
34
|
+
/** Cancel these specific actions */
|
|
35
|
+
actions = '',
|
|
36
|
+
/** Cancel these specific request statuses */
|
|
37
|
+
statuses = '',
|
|
38
|
+
/** Mark requests to silent mode when canceling if created before this date */
|
|
39
|
+
silentModeBefore,
|
|
40
|
+
/** Email template title to sue when canceling requests */
|
|
41
|
+
cancellationTitle,
|
|
42
|
+
/** Concurrency to cancel requests at */
|
|
43
|
+
concurrency = '50',
|
|
44
|
+
/** Filter for requests created before this date */
|
|
45
|
+
createdAtBefore,
|
|
46
|
+
/** Filter for requests created after this date */
|
|
47
|
+
createdAtAfter,
|
|
30
48
|
/** List of request IDs */
|
|
31
49
|
requestIds = '', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
32
50
|
// Ensure auth is passed
|
|
@@ -64,6 +82,8 @@ async function main() {
|
|
|
64
82
|
statuses: parsedStatuses.length > 0 ? parsedStatuses : undefined,
|
|
65
83
|
concurrency: parseInt(concurrency, 10),
|
|
66
84
|
silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
|
|
85
|
+
createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,
|
|
86
|
+
createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
|
|
67
87
|
});
|
|
68
88
|
}
|
|
69
89
|
main();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-request-cancel.js","sourceRoot":"","sources":["../src/cli-request-cancel.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA2E;AAC3E,yCAAmE;AACnE,2CAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,
|
|
1
|
+
{"version":3,"file":"cli-request-cancel.js","sourceRoot":"","sources":["../src/cli-request-cancel.ts"],"names":[],"mappings":";;;;;;AAEA,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E,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS;KACtE,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -31,7 +31,23 @@ const cron_1 = require("./cron");
|
|
|
31
31
|
*/
|
|
32
32
|
async function main() {
|
|
33
33
|
// Parse command line arguments
|
|
34
|
-
const { file = './transcend-request-export.csv',
|
|
34
|
+
const { file = './transcend-request-export.csv',
|
|
35
|
+
/** Transcend Backend URL */
|
|
36
|
+
transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
|
|
37
|
+
/** API key */
|
|
38
|
+
auth,
|
|
39
|
+
/** Request actions to export */
|
|
40
|
+
actions = '',
|
|
41
|
+
/** Request statuses to export */
|
|
42
|
+
statuses = '',
|
|
43
|
+
/** Whether or not to include test requests */
|
|
44
|
+
showTests,
|
|
45
|
+
/** Filter on requests created before this date */
|
|
46
|
+
createdAtBefore,
|
|
47
|
+
/** Filter on requests created after this date */
|
|
48
|
+
createdAtAfter,
|
|
49
|
+
/** Page limit when paginating */
|
|
50
|
+
pageLimit = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
35
51
|
// Ensure auth is passed
|
|
36
52
|
if (!auth) {
|
|
37
53
|
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-request-export.js","sourceRoot":"","sources":["../src/cli-request-export.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,uDAA+B;AAC/B,+DAA2E;AAC3E,yCAAiE;AACjE,2CAAoD;AACpD,iCAAkC;AAElC;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,gCAAgC,
|
|
1
|
+
{"version":3,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,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;KAC1E,CAAC,CAAC;IAEH,eAAe;IACf,MAAM,OAAO,GAAG,IAAA,cAAI,EAClB,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAC1D,CAAC;IACF,IAAA,eAAQ,EAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACjD,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,sBAAsB,uBAAuB,CAAC,MAAM,sBAAsB,IAAI,GAAG,CAClF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -18,15 +18,29 @@ const constants_1 = require("./constants");
|
|
|
18
18
|
*
|
|
19
19
|
* Dev Usage:
|
|
20
20
|
* yarn ts-node ./src/cli-request-mark-silent.ts --auth=$TRANSCEND_API_KEY \
|
|
21
|
-
* --actions=ERASURE --
|
|
21
|
+
* --actions=ERASURE --createdAtBefore=06/23/2023
|
|
22
22
|
*
|
|
23
23
|
* Standard usage:
|
|
24
24
|
* yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY \
|
|
25
|
-
* --actions=ERASURE --
|
|
25
|
+
* --actions=ERASURE --createdAtBefore=06/23/2023
|
|
26
26
|
*/
|
|
27
27
|
async function main() {
|
|
28
28
|
// Parse command line arguments
|
|
29
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
/** Transcend Backend URL */
|
|
31
|
+
transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
|
|
32
|
+
/** API key */
|
|
33
|
+
auth,
|
|
34
|
+
/** Mark these specific actions as silent mode */
|
|
35
|
+
actions = '',
|
|
36
|
+
/** Make these statuses silent mode - defaults to statuses for active requests */
|
|
37
|
+
statuses = '',
|
|
38
|
+
/** Concurrency to mark silent */
|
|
39
|
+
concurrency = '50',
|
|
40
|
+
/** Filter for requests created before this date */
|
|
41
|
+
createdAtBefore,
|
|
42
|
+
/** Filter for requests created after this date */
|
|
43
|
+
createdAtAfter,
|
|
30
44
|
/** List of request IDs */
|
|
31
45
|
requestIds = '', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
32
46
|
// Ensure auth is passed
|
|
@@ -62,7 +76,8 @@ async function main() {
|
|
|
62
76
|
requestIds: requestIds ? (0, requests_1.splitCsvToList)(requestIds) : undefined,
|
|
63
77
|
statuses: parsedStatuses.length > 0 ? parsedStatuses : undefined,
|
|
64
78
|
concurrency: parseInt(concurrency, 10),
|
|
65
|
-
|
|
79
|
+
createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,
|
|
80
|
+
createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
|
|
66
81
|
});
|
|
67
82
|
}
|
|
68
83
|
main();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-request-mark-silent.js","sourceRoot":"","sources":["../src/cli-request-mark-silent.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA2E;AAC3E,yCAAuE;AACvE,2CAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,
|
|
1
|
+
{"version":3,"file":"cli-request-mark-silent.js","sourceRoot":"","sources":["../src/cli-request-mark-silent.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA2E;AAC3E,yCAAuE;AACvE,2CAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,iDAAiD;IACjD,OAAO,GAAG,EAAE;IACZ,iFAAiF;IACjF,QAAQ,GAAG,EAAE;IACb,iCAAiC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,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,oCAAyB,EAAC;QAC9B,YAAY;QACZ,cAAc,EAAE,aAAa;QAC7B,IAAI;QACJ,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,IAAA,yBAAc,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/D,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,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS;QACxE,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS;KACtE,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -10,7 +10,6 @@ const logger_1 = require("./logger");
|
|
|
10
10
|
const requests_1 = require("./requests");
|
|
11
11
|
const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
|
-
const ONE_MONTH = 30.5 * 24 * 60 * 60 * 1000;
|
|
14
13
|
/**
|
|
15
14
|
* Run a command to bulk restart a set of privacy requests
|
|
16
15
|
*
|
|
@@ -28,7 +27,13 @@ const ONE_MONTH = 30.5 * 24 * 60 * 60 * 1000;
|
|
|
28
27
|
*/
|
|
29
28
|
async function main() {
|
|
30
29
|
// Parse command line arguments
|
|
31
|
-
const {
|
|
30
|
+
const {
|
|
31
|
+
/** Transcend Backend URL */
|
|
32
|
+
transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
|
|
33
|
+
/** API key */
|
|
34
|
+
auth,
|
|
35
|
+
/** Sombra API key */
|
|
36
|
+
sombraAuth,
|
|
32
37
|
/** Restart requests matching these request actions */
|
|
33
38
|
actions,
|
|
34
39
|
/** Restart requests matching these request statuses */
|
|
@@ -40,7 +45,7 @@ async function main() {
|
|
|
40
45
|
/** Filter for requests that were submitted before this date */
|
|
41
46
|
createdAt = new Date().toISOString(),
|
|
42
47
|
/** Requests that have been open for this length of time should be marked as silent mode */
|
|
43
|
-
|
|
48
|
+
silentModeBefore,
|
|
44
49
|
/** Send an email receipt to the restarted requests */
|
|
45
50
|
sendEmailReceipt = 'false',
|
|
46
51
|
/** Copy over all identifiers rather than restarting the request only with the core identifier */
|
|
@@ -50,7 +55,11 @@ async function main() {
|
|
|
50
55
|
/** Skip the waiting period when restarting requests */
|
|
51
56
|
skipWaitingPeriod = 'false',
|
|
52
57
|
/** Include a receipt of the requests that were restarted in this file */
|
|
53
|
-
requestReceiptFolder = './privacy-request-upload-receipts',
|
|
58
|
+
requestReceiptFolder = './privacy-request-upload-receipts',
|
|
59
|
+
/** Filter for requests created before this date */
|
|
60
|
+
createdAtBefore,
|
|
61
|
+
/** Filter for requests created after this date */
|
|
62
|
+
createdAtAfter, } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
54
63
|
// Ensure auth is passed
|
|
55
64
|
if (!auth) {
|
|
56
65
|
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
|
|
@@ -88,10 +97,12 @@ async function main() {
|
|
|
88
97
|
requestIds: (0, requests_1.splitCsvToList)(requestIds),
|
|
89
98
|
createdAt: new Date(createdAt),
|
|
90
99
|
emailIsVerified: emailIsVerified === 'true',
|
|
91
|
-
|
|
100
|
+
silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
|
|
92
101
|
sendEmailReceipt: sendEmailReceipt === 'true',
|
|
93
102
|
copyIdentifiers: copyIdentifiers === 'true',
|
|
94
103
|
skipWaitingPeriod: skipWaitingPeriod === 'true',
|
|
104
|
+
createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,
|
|
105
|
+
createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
|
|
95
106
|
concurrency: parseInt(concurrency, 10),
|
|
96
107
|
transcendUrl,
|
|
97
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-request-restart.js","sourceRoot":"","sources":["../src/cli-request-restart.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,yCAAiE;AACjE,+DAA2E;AAC3E,2CAAoD;AAEpD
|
|
1
|
+
{"version":3,"file":"cli-request-restart.js","sourceRoot":"","sources":["../src/cli-request-restart.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,yCAAiE;AACjE,+DAA2E;AAC3E,2CAAoD;AAEpD;;;;;;;;;;;;;;GAcG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,qBAAqB;IACrB,UAAU;IACV,sDAAsD;IACtD,OAAO;IACP,uDAAuD;IACvD,QAAQ;IACR,yCAAyC;IACzC,WAAW,GAAG,IAAI;IAClB,0BAA0B;IAC1B,UAAU,GAAG,EAAE;IACf,+DAA+D;IAC/D,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;IACpC,2FAA2F;IAC3F,gBAAgB;IAChB,sDAAsD;IACtD,gBAAgB,GAAG,OAAO;IAC1B,iGAAiG;IACjG,eAAe,GAAG,OAAO;IACzB,4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AI,EAAE,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { RequestAction } from '@transcend-io/privacy-types';
|
|
|
5
5
|
* @param options - Options
|
|
6
6
|
* @returns The number of requests approved
|
|
7
7
|
*/
|
|
8
|
-
export declare function approvePrivacyRequests({ requestActions, auth, silentModeBefore, concurrency, transcendUrl, }: {
|
|
8
|
+
export declare function approvePrivacyRequests({ requestActions, auth, silentModeBefore, createdAtAfter, createdAtBefore, concurrency, transcendUrl, }: {
|
|
9
9
|
/** The request actions that should be restarted */
|
|
10
10
|
requestActions: RequestAction[];
|
|
11
11
|
/** Transcend API key authentication */
|
|
@@ -14,6 +14,10 @@ export declare function approvePrivacyRequests({ requestActions, auth, silentMod
|
|
|
14
14
|
concurrency?: number;
|
|
15
15
|
/** Mark these requests as silent mode if they were created before this date */
|
|
16
16
|
silentModeBefore?: Date;
|
|
17
|
+
/** Filter for requests created before this date */
|
|
18
|
+
createdAtBefore?: Date;
|
|
19
|
+
/** Filter for requests created after this date */
|
|
20
|
+
createdAtAfter?: Date;
|
|
17
21
|
/** API URL for Transcend backend */
|
|
18
22
|
transcendUrl?: string;
|
|
19
23
|
}): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvePrivacyRequests.d.ts","sourceRoot":"","sources":["../../src/requests/approvePrivacyRequests.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAiB,MAAM,6BAA6B,CAAC;AAW3E;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,WAAgB,EAChB,YAAoC,GACrC,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,
|
|
1
|
+
{"version":3,"file":"approvePrivacyRequests.d.ts","sourceRoot":"","sources":["../../src/requests/approvePrivacyRequests.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAiB,MAAM,6BAA6B,CAAC;AAW3E;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,WAAgB,EAChB,YAAoC,GACrC,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,mDAAmD;IACnD,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,kDAAkD;IAClD,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiElB"}
|
|
@@ -17,7 +17,7 @@ const constants_1 = require("../constants");
|
|
|
17
17
|
* @param options - Options
|
|
18
18
|
* @returns The number of requests approved
|
|
19
19
|
*/
|
|
20
|
-
async function approvePrivacyRequests({ requestActions, auth, silentModeBefore, concurrency = 50, transcendUrl = constants_1.DEFAULT_TRANSCEND_API, }) {
|
|
20
|
+
async function approvePrivacyRequests({ requestActions, auth, silentModeBefore, createdAtAfter, createdAtBefore, concurrency = 50, transcendUrl = constants_1.DEFAULT_TRANSCEND_API, }) {
|
|
21
21
|
// Find all requests made before createdAt that are in a removing data state
|
|
22
22
|
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
|
|
23
23
|
// Time duration
|
|
@@ -28,6 +28,8 @@ async function approvePrivacyRequests({ requestActions, auth, silentModeBefore,
|
|
|
28
28
|
const allRequests = await (0, graphql_1.fetchAllRequests)(client, {
|
|
29
29
|
actions: requestActions,
|
|
30
30
|
statuses: [privacy_types_1.RequestStatus.Approving],
|
|
31
|
+
createdAtAfter,
|
|
32
|
+
createdAtBefore,
|
|
31
33
|
});
|
|
32
34
|
// Notify Transcend
|
|
33
35
|
logger_1.logger.info(colors_1.default.magenta(`Approving "${allRequests.length}" requests.`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approvePrivacyRequests.js","sourceRoot":"","sources":["../../src/requests/approvePrivacyRequests.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA+B;AAC/B,oDAA4B;AAC5B,sCAAmC;AACnC,+DAA2E;AAC3E,wCAMoB;AACpB,gEAAuC;AACvC,4CAAqD;AAErD;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,EAC3C,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,WAAW,GAAG,EAAE,EAChB,YAAY,GAAG,iCAAqB,
|
|
1
|
+
{"version":3,"file":"approvePrivacyRequests.js","sourceRoot":"","sources":["../../src/requests/approvePrivacyRequests.ts"],"names":[],"mappings":";;;;;;AAAA,uCAA+B;AAC/B,oDAA4B;AAC5B,sCAAmC;AACnC,+DAA2E;AAC3E,wCAMoB;AACpB,gEAAuC;AACvC,4CAAqD;AAErD;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,EAC3C,cAAc,EACd,IAAI,EACJ,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,WAAW,GAAG,EAAE,EAChB,YAAY,GAAG,iCAAqB,GAgBrC;IACC,4EAA4E;IAC5E,MAAM,MAAM,GAAG,IAAA,qCAA2B,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAE/D,gBAAgB;IAChB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAChC,kEAAkE;IAClE,MAAM,WAAW,GAAG,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IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;IAE1B,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,yBAAyB,KAAK,iBAC5B,SAAS,GAAG,IACd,YAAY,CACb,CACF,CAAC;IACF,OAAO,WAAW,CAAC,MAAM,CAAC;AAC5B,CAAC;AAxFD,wDAwFC"}
|
|
@@ -4,7 +4,7 @@ import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';
|
|
|
4
4
|
*
|
|
5
5
|
* @param options - Options
|
|
6
6
|
*/
|
|
7
|
-
export declare function bulkRestartRequests({ requestReceiptFolder, auth, sombraAuth, requestActions, requestStatuses, transcendUrl, requestIds, createdAt,
|
|
7
|
+
export declare function bulkRestartRequests({ requestReceiptFolder, auth, sombraAuth, requestActions, requestStatuses, createdAtBefore, createdAtAfter, transcendUrl, requestIds, createdAt, silentModeBefore, sendEmailReceipt, emailIsVerified, copyIdentifiers, skipWaitingPeriod, concurrency, }: {
|
|
8
8
|
/** Actions to filter for */
|
|
9
9
|
requestActions: RequestAction[];
|
|
10
10
|
/** Statues to filter for */
|
|
@@ -24,13 +24,17 @@ export declare function bulkRestartRequests({ requestReceiptFolder, auth, sombra
|
|
|
24
24
|
/** Filter for requests that were submitted before this date */
|
|
25
25
|
createdAt?: Date;
|
|
26
26
|
/** Requests that have been open for this length of time should be marked as silent mode */
|
|
27
|
-
|
|
27
|
+
silentModeBefore?: Date;
|
|
28
28
|
/** Send an email receipt to the restarted requests */
|
|
29
29
|
sendEmailReceipt?: boolean;
|
|
30
30
|
/** Copy over all identifiers rather than restarting the request only with the core identifier */
|
|
31
31
|
copyIdentifiers?: boolean;
|
|
32
32
|
/** Skip the waiting period when restarting requests */
|
|
33
33
|
skipWaitingPeriod?: boolean;
|
|
34
|
+
/** Filter for requests created before this date */
|
|
35
|
+
createdAtBefore?: Date;
|
|
36
|
+
/** Filter for requests created after this date */
|
|
37
|
+
createdAtAfter?: Date;
|
|
34
38
|
/** Concurrency to upload requests at */
|
|
35
39
|
concurrency?: number;
|
|
36
40
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkRestartRequests.d.ts","sourceRoot":"","sources":["../../src/requests/bulkRestartRequests.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AA+B3E;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,oBAAoB,EACpB,IAAI,EACJ,UAAU,EACV,cAAc,EACd,eAAe,EACf,YAAoC,EACpC,UAAe,EACf,SAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"bulkRestartRequests.d.ts","sourceRoot":"","sources":["../../src/requests/bulkRestartRequests.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AA+B3E;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,oBAAoB,EACpB,IAAI,EACJ,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAoC,EACpC,UAAe,EACf,SAAsB,EACtB,gBAAgB,EAChB,gBAAwB,EACxB,eAAsB,EACtB,eAAuB,EACvB,iBAAyB,EACzB,WAAgB,GACjB,EAAE;IACD,4BAA4B;IAC5B,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,4BAA4B;IAC5B,eAAe,EAAE,aAAa,EAAE,CAAC;IACjC,6CAA6C;IAC7C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iEAAiE;IACjE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,2FAA2F;IAC3F,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iGAAiG;IACjG,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mDAAmD;IACnD,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,kDAAkD;IAClD,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CA8JhB"}
|
|
@@ -57,7 +57,7 @@ const CachedRequestState = t.type({
|
|
|
57
57
|
*
|
|
58
58
|
* @param options - Options
|
|
59
59
|
*/
|
|
60
|
-
async function bulkRestartRequests({ requestReceiptFolder, auth, sombraAuth, requestActions, requestStatuses, transcendUrl = constants_2.DEFAULT_TRANSCEND_API, requestIds = [], createdAt = new Date(),
|
|
60
|
+
async function bulkRestartRequests({ requestReceiptFolder, auth, sombraAuth, requestActions, requestStatuses, createdAtBefore, createdAtAfter, transcendUrl = constants_2.DEFAULT_TRANSCEND_API, requestIds = [], createdAt = new Date(), silentModeBefore, sendEmailReceipt = false, emailIsVerified = true, copyIdentifiers = false, skipWaitingPeriod = false, concurrency = 20, }) {
|
|
61
61
|
// Time duration
|
|
62
62
|
const t0 = new Date().getTime();
|
|
63
63
|
// create a new progress bar instance and use shades_classic theme
|
|
@@ -76,6 +76,8 @@ async function bulkRestartRequests({ requestReceiptFolder, auth, sombraAuth, req
|
|
|
76
76
|
const allRequests = await (0, graphql_1.fetchAllRequests)(client, {
|
|
77
77
|
actions: requestActions,
|
|
78
78
|
statuses: requestStatuses,
|
|
79
|
+
createdAtBefore,
|
|
80
|
+
createdAtAfter,
|
|
79
81
|
});
|
|
80
82
|
const requests = allRequests.filter((request) => new Date(request.createdAt) < createdAt &&
|
|
81
83
|
(requestIds.length === 0 || requestIds.includes(request.id)));
|
|
@@ -113,7 +115,8 @@ async function bulkRestartRequests({ requestReceiptFolder, auth, sombraAuth, req
|
|
|
113
115
|
const requestResponse = await (0, restartPrivacyRequest_1.restartPrivacyRequest)(sombra, {
|
|
114
116
|
...request,
|
|
115
117
|
// override silent mode
|
|
116
|
-
isSilent: !!
|
|
118
|
+
isSilent: !!silentModeBefore &&
|
|
119
|
+
new Date(request.createdAt) < silentModeBefore
|
|
117
120
|
? true
|
|
118
121
|
: request.isSilent,
|
|
119
122
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulkRestartRequests.js","sourceRoot":"","sources":["../../src/requests/bulkRestartRequests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,mEAA2C;AAC3C,uCAA+B;AAC/B,gEAAuC;AACvC,oDAA4B;AAC5B,+BAA4B;AAE5B,mEAA+D;AAC/D,sCAAmC;AACnC,mEAAgE;AAChE,wCAKoB;AACpB,6DAA0D;AAC1D,2CAAgD;AAChD,4CAAqD;AAErD,uDAAuD;AACvD,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;IAClC,6BAAiB;IACjB,CAAC,CAAC,IAAI,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM;KAChB,CAAC;CACH,CAAC,CAAC;AAKH,mDAAmD;AACnD,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,6BAAiB,CAAC;IAC7C,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;CACvC,CAAC,CAAC;AAEH;;;;GAIG;AACI,KAAK,UAAU,mBAAmB,CAAC,EACxC,oBAAoB,EACpB,IAAI,EACJ,UAAU,EACV,cAAc,EACd,eAAe,EACf,YAAY,GAAG,iCAAqB,EACpC,UAAU,GAAG,EAAE,EACf,SAAS,GAAG,IAAI,IAAI,EAAE,EACtB,
|
|
1
|
+
{"version":3,"file":"bulkRestartRequests.js","sourceRoot":"","sources":["../../src/requests/bulkRestartRequests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,mEAA2C;AAC3C,uCAA+B;AAC/B,gEAAuC;AACvC,oDAA4B;AAC5B,+BAA4B;AAE5B,mEAA+D;AAC/D,sCAAmC;AACnC,mEAAgE;AAChE,wCAKoB;AACpB,6DAA0D;AAC1D,2CAAgD;AAChD,4CAAqD;AAErD,uDAAuD;AACvD,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;IAClC,6BAAiB;IACjB,CAAC,CAAC,IAAI,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM;KAChB,CAAC;CACH,CAAC,CAAC;AAKH,mDAAmD;AACnD,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IAChC,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,6BAAiB,CAAC;IAC7C,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;CACvC,CAAC,CAAC;AAEH;;;;GAIG;AACI,KAAK,UAAU,mBAAmB,CAAC,EACxC,oBAAoB,EACpB,IAAI,EACJ,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,GAAG,iCAAqB,EACpC,UAAU,GAAG,EAAE,EACf,SAAS,GAAG,IAAI,IAAI,EAAE,EACtB,gBAAgB,EAChB,gBAAgB,GAAG,KAAK,EACxB,eAAe,GAAG,IAAI,EACtB,eAAe,GAAG,KAAK,EACvB,iBAAiB,GAAG,KAAK,EACzB,WAAW,GAAG,EAAE,GAkCjB;IACC,gBAAgB;IAChB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAChC,kEAAk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