@transcend-io/cli 4.88.7 → 4.91.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 +84 -47
- package/build/cli-pull.js +8 -2
- package/build/cli-pull.js.map +1 -1
- 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 +18 -2
- 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/graphql/fetchAllRequests.d.ts +4 -2
- package/build/graphql/fetchAllRequests.d.ts.map +1 -1
- package/build/graphql/fetchAllRequests.js +3 -2
- package/build/graphql/fetchAllRequests.js.map +1 -1
- package/build/graphql/gqls/RequestEnricher.d.ts.map +1 -1
- package/build/graphql/gqls/RequestEnricher.js +1 -2
- package/build/graphql/gqls/RequestEnricher.js.map +1 -1
- package/build/graphql/gqls/businessEntity.d.ts.map +1 -1
- package/build/graphql/gqls/businessEntity.js +1 -2
- package/build/graphql/gqls/businessEntity.js.map +1 -1
- package/build/graphql/gqls/dataPoint.d.ts.map +1 -1
- package/build/graphql/gqls/dataPoint.js +1 -2
- package/build/graphql/gqls/dataPoint.js.map +1 -1
- package/build/graphql/gqls/dataSilo.d.ts +1 -1
- package/build/graphql/gqls/dataSilo.d.ts.map +1 -1
- package/build/graphql/gqls/dataSilo.js +63 -46
- package/build/graphql/gqls/dataSilo.js.map +1 -1
- package/build/graphql/gqls/request.d.ts.map +1 -1
- package/build/graphql/gqls/request.js +1 -2
- package/build/graphql/gqls/request.js.map +1 -1
- package/build/graphql/pullTranscendConfiguration.d.ts +5 -1
- package/build/graphql/pullTranscendConfiguration.d.ts.map +1 -1
- package/build/graphql/pullTranscendConfiguration.js +3 -1
- package/build/graphql/pullTranscendConfiguration.js.map +1 -1
- package/build/graphql/syncDataSilos.d.ts +16 -6
- package/build/graphql/syncDataSilos.d.ts.map +1 -1
- package/build/graphql/syncDataSilos.js +54 -56
- package/build/graphql/syncDataSilos.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 +5 -3
- package/build/requests/markSilentPrivacyRequests.js.map +1 -1
- package/build/requests/pullPrivacyRequests.d.ts +2 -2
- package/build/requests/pullPrivacyRequests.d.ts.map +1 -1
- package/build/requests/pullPrivacyRequests.js +2 -2
- package/build/requests/pullPrivacyRequests.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/build/graphql/tests/fetchApiKeys.test.d.ts +0 -1
- package/build/graphql/tests/fetchApiKeys.test.d.ts.map +0 -1
- package/build/graphql/tests/fetchApiKeys.test.js +0 -3
- package/build/graphql/tests/fetchApiKeys.test.js.map +0 -1
- package/build/graphql/tests/fetchDataSubjects.test.d.ts +0 -1
- package/build/graphql/tests/fetchDataSubjects.test.d.ts.map +0 -1
- package/build/graphql/tests/fetchDataSubjects.test.js +0 -3
- package/build/graphql/tests/fetchDataSubjects.test.js.map +0 -1
- package/build/graphql/tests/fetchIdentifiers.test.d.ts +0 -1
- package/build/graphql/tests/fetchIdentifiers.test.d.ts.map +0 -1
- package/build/graphql/tests/fetchIdentifiers.test.js +0 -3
- package/build/graphql/tests/fetchIdentifiers.test.js.map +0 -1
- package/build/graphql/tests/syncDataSilos.test.d.ts +0 -1
- package/build/graphql/tests/syncDataSilos.test.d.ts.map +0 -1
- package/build/graphql/tests/syncDataSilos.test.js +0 -3
- package/build/graphql/tests/syncDataSilos.test.js.map +0 -1
- package/build/graphql/tests/syncEnrichers.test.d.ts +0 -1
- package/build/graphql/tests/syncEnrichers.test.d.ts.map +0 -1
- package/build/graphql/tests/syncEnrichers.test.js +0 -3
- package/build/graphql/tests/syncEnrichers.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -337,17 +337,19 @@ _Note: The scopes for tr-push are comprehensive of the scopes for tr-pull_
|
|
|
337
337
|
|
|
338
338
|
#### Arguments
|
|
339
339
|
|
|
340
|
-
| Argument
|
|
341
|
-
|
|
|
342
|
-
| auth
|
|
343
|
-
| resources
|
|
344
|
-
| file
|
|
345
|
-
| transcendUrl
|
|
346
|
-
| dataSiloIds
|
|
347
|
-
| integrationNames
|
|
348
|
-
| trackerStatuses
|
|
349
|
-
| pageSize
|
|
350
|
-
|
|
|
340
|
+
| Argument | Description | Type | Default | Required |
|
|
341
|
+
| ----------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------- | -------- |
|
|
342
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string (API key or path to tr-generate-api-keys JSON output) | N/A | true |
|
|
343
|
+
| resources | The different resource types to pull in (see table above for breakdown of each resource) | string | apiKeys,templates,dataSilos,enrichers | false |
|
|
344
|
+
| file | Path to the YAML file to pull into | string - file-path | ./transcend.yml | false |
|
|
345
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
346
|
+
| dataSiloIds | The UUIDs of the data silos that should be pulled into the YAML file. | list(string - UUID) | N/A | false |
|
|
347
|
+
| integrationNames | The types of integrations to pull down | string[] | N/A | false |
|
|
348
|
+
| trackerStatuses | The statuses of consent manager trackers to pull down. (Triage, Approved or both) | ConsentTrackerStatus[] | LIVE,NEEDS_REVIEW | false |
|
|
349
|
+
| pageSize | The page size to use when paginating over the API | number | 50 | false |
|
|
350
|
+
| skipDatapoints | When true, skip pulling in datapoints alongside data silo resource | boolean | false | false |
|
|
351
|
+
| skipSubDatapoints | When true, skip pulling in subDatapoints alongside data silo resource | boolean | false | false |
|
|
352
|
+
| debug | Set to true to include debug logs while pulling the configuration | boolean | false | false |
|
|
351
353
|
|
|
352
354
|
#### Usage
|
|
353
355
|
|
|
@@ -387,6 +389,18 @@ Pull in data flow and cookie resources, filtering for specific tracker statuses
|
|
|
387
389
|
tr-pull --auth=$TRANSCEND_API_KEY --resources=dataFlows,cookies --trackerStatuses=NEEDS_REVIEW,LIVE
|
|
388
390
|
```
|
|
389
391
|
|
|
392
|
+
Pull in data silos without any datapoint/table information
|
|
393
|
+
|
|
394
|
+
```sh
|
|
395
|
+
tr-pull --auth=$TRANSCEND_API_KEY --resources=dataSilos --skipDatapoints=true
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Pull in data silos and datapoints without any subdatapoint/column information
|
|
399
|
+
|
|
400
|
+
```sh
|
|
401
|
+
tr-pull --auth=$TRANSCEND_API_KEY --resources=dataSilos --skipSubDatapoints=true
|
|
402
|
+
```
|
|
403
|
+
|
|
390
404
|
Pull in attribute definitions only (see [this example](./examples/attributes.yml)):
|
|
391
405
|
|
|
392
406
|
```sh
|
|
@@ -683,6 +697,8 @@ The API key needs the following scopes:
|
|
|
683
697
|
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
684
698
|
| 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
699
|
| silentModeBefore | Any requests made before this date should be marked as silent mode | Date | N/A | false |
|
|
700
|
+
| createdAtBefore | Approve requests that were submitted before this time | Date | N/A | false |
|
|
701
|
+
| createdAtAfter | Approve requests that were submitted after this time | Date | N/A | false |
|
|
686
702
|
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
687
703
|
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
688
704
|
|
|
@@ -712,6 +728,12 @@ Increase the concurrency (defaults to 100)
|
|
|
712
728
|
yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
|
|
713
729
|
```
|
|
714
730
|
|
|
731
|
+
Approve ERASURE requests created within a specific time frame
|
|
732
|
+
|
|
733
|
+
```sh
|
|
734
|
+
yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
|
|
735
|
+
```
|
|
736
|
+
|
|
715
737
|
### tr-request-cancel
|
|
716
738
|
|
|
717
739
|
Bulk cancel a set of privacy requests from the [Privacy Requests -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
|
|
@@ -727,17 +749,18 @@ The API key needs the following scopes:
|
|
|
727
749
|
|
|
728
750
|
#### Arguments
|
|
729
751
|
|
|
730
|
-
| Argument
|
|
731
|
-
|
|
|
732
|
-
| auth
|
|
733
|
-
| actions
|
|
734
|
-
| statuses
|
|
735
|
-
| requestIds
|
|
736
|
-
|
|
737
|
-
|
|
|
738
|
-
|
|
|
739
|
-
|
|
|
740
|
-
|
|
|
752
|
+
| Argument | Description | Type | Default | Required |
|
|
753
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
|
|
754
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
755
|
+
| actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to cancel. | RequestAction[] | N/A | true |
|
|
756
|
+
| 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 |
|
|
757
|
+
| requestIds | Specify the specific request IDs to cancel | string[] | [] | false |
|
|
758
|
+
| silentModeBefore | Any requests made before this date should be marked as silent mode for canceling to skip email sending | Date | N/A | false |
|
|
759
|
+
| createdAtBefore | Cancel requests that were submitted before this time | Date | N/A | false |
|
|
760
|
+
| createdAtAfter | Cancel requests that were submitted after this time | Date | N/A | false |
|
|
761
|
+
| 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 |
|
|
762
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
763
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
741
764
|
|
|
742
765
|
#### Usage
|
|
743
766
|
|
|
@@ -778,6 +801,12 @@ Cancel all open SALE_OPT_OUT, but mark any request made before 05/03/2023 as sil
|
|
|
778
801
|
yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
|
|
779
802
|
```
|
|
780
803
|
|
|
804
|
+
Cancel all open SALE_OPT_OUT, within a specific time frame
|
|
805
|
+
|
|
806
|
+
```sh
|
|
807
|
+
yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
|
|
808
|
+
```
|
|
809
|
+
|
|
781
810
|
Increase the concurrency (defaults to 100)
|
|
782
811
|
|
|
783
812
|
```sh
|
|
@@ -798,16 +827,16 @@ The API key needs the following scopes:
|
|
|
798
827
|
|
|
799
828
|
#### Arguments
|
|
800
829
|
|
|
801
|
-
| Argument
|
|
802
|
-
|
|
|
803
|
-
| auth
|
|
804
|
-
| actions
|
|
805
|
-
| statuses
|
|
806
|
-
| requestIds
|
|
807
|
-
|
|
808
|
-
|
|
|
809
|
-
| transcendUrl
|
|
810
|
-
| concurrency
|
|
830
|
+
| Argument | Description | Type | Default | Required |
|
|
831
|
+
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
|
|
832
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
833
|
+
| 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 |
|
|
834
|
+
| 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 |
|
|
835
|
+
| requestIds | Specify the specific request IDs to mark silent | string[] | [] | false |
|
|
836
|
+
| createdAtBefore | Mark silent requests that were submitted before this time | Date | N/A | false |
|
|
837
|
+
| createdAtAfter | Mark silent requests that were submitted after this time | Date | N/A | false |
|
|
838
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
839
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
811
840
|
|
|
812
841
|
#### Usage
|
|
813
842
|
|
|
@@ -836,10 +865,10 @@ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ACCESS,ERASURE,S
|
|
|
836
865
|
--requestIds=c3ae78c9-2768-4666-991a-d2f729503337,342e4bd1-64ea-4af0-a4ad-704b5a07cfe4
|
|
837
866
|
```
|
|
838
867
|
|
|
839
|
-
Mark sale opt out requests as silent
|
|
868
|
+
Mark sale opt out requests as silent within a certain date range
|
|
840
869
|
|
|
841
870
|
```sh
|
|
842
|
-
yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --
|
|
871
|
+
yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
|
|
843
872
|
```
|
|
844
873
|
|
|
845
874
|
Increase the concurrency (defaults to 100)
|
|
@@ -1004,7 +1033,9 @@ The API key needs the following scopes:
|
|
|
1004
1033
|
| requestIds | Specify the specific request IDs to restart | string[] | [] | false |
|
|
1005
1034
|
| emailIsVerified | Indicate whether the primary email address is verified. Set to false to send a verification email. | boolean | true | false |
|
|
1006
1035
|
| createdAt | Restart requests that were submitted before a specific date. | Date | Date.now() | false |
|
|
1007
|
-
|
|
|
1036
|
+
| silentModeBefore | Requests older than this date should be marked as silent mode | Date | N/A | false |
|
|
1037
|
+
| createdAtBefore | Restart requests that were submitted before this time | Date | N/A | false |
|
|
1038
|
+
| createdAtAfter | Restart requests that were submitted after this time | Date | N/A | false |
|
|
1008
1039
|
| sendEmailReceipt | Send email receipts to the restarted requests | boolean | false | false |
|
|
1009
1040
|
| copyIdentifiers | Copy over all enriched identifiers from the initial request. Leave false to restart from scratch with initial identifiers only. | boolean | false | false |
|
|
1010
1041
|
| skipWaitingPeriod | Skip queued state of request and go straight to compiling | boolean | false | false |
|
|
@@ -1055,7 +1086,13 @@ yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING
|
|
|
1055
1086
|
Restart requests and place everything in silent mode submitted before a certain date
|
|
1056
1087
|
|
|
1057
1088
|
```sh
|
|
1058
|
-
yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING --actions=ACCESS,ERASURE --
|
|
1089
|
+
yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING --actions=ACCESS,ERASURE --silentModeBefore=2022-12-05T00:46
|
|
1090
|
+
```
|
|
1091
|
+
|
|
1092
|
+
Restart requests within a specific timeframe
|
|
1093
|
+
|
|
1094
|
+
```sh
|
|
1095
|
+
yarn tr-request-restart --auth=$TRANSCEND_API_KEY --statuses=COMPILING,ENRICHING --actions=ACCESS,ERASURE ---createdAtBefore="04/05/2023" --createdAtAfter="02/21/2023"
|
|
1059
1096
|
```
|
|
1060
1097
|
|
|
1061
1098
|
Send email receipts to the restarted requests
|
|
@@ -1345,19 +1382,19 @@ In order to use this cli, you will first need to generate an API key on the Tran
|
|
|
1345
1382
|
The API key must have the following scopes:
|
|
1346
1383
|
|
|
1347
1384
|
- "Manage Request Identity Verification"
|
|
1348
|
-
- "Manage Request Compilation" (only when specifying `
|
|
1385
|
+
- "Manage Request Compilation" (only when specifying `silentModeBefore`)
|
|
1349
1386
|
|
|
1350
1387
|
#### Arguments
|
|
1351
1388
|
|
|
1352
|
-
| Argument
|
|
1353
|
-
|
|
|
1354
|
-
| auth
|
|
1355
|
-
| enricherId
|
|
1356
|
-
| sombraAuth
|
|
1357
|
-
| transcendUrl
|
|
1358
|
-
| file
|
|
1359
|
-
|
|
|
1360
|
-
| concurrency
|
|
1389
|
+
| Argument | Description | Type | Default | Required |
|
|
1390
|
+
| ---------------- | ------------------------------------------------------------------------------------ | ------------------ | ----------------------------------- | -------- |
|
|
1391
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
1392
|
+
| enricherId | The ID of the Request Enricher to upload to | string - UUID | N/A | true |
|
|
1393
|
+
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
|
|
1394
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
1395
|
+
| file | Path to the CSV file where requests will be written to. | string - file-path | ./manual-enrichment-identifiers.csv | false |
|
|
1396
|
+
| silentModeBefore | When true, set requests into silent mode before enriching | boolean | false | false |
|
|
1397
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
1361
1398
|
|
|
1362
1399
|
#### Usage
|
|
1363
1400
|
|
|
@@ -1392,7 +1429,7 @@ yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherI
|
|
|
1392
1429
|
When enriching requests, mark all requests as silent mode before processing
|
|
1393
1430
|
|
|
1394
1431
|
```sh
|
|
1395
|
-
yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherId=27d45a0d-7d03-47fa-9b30-6d697005cfcf --
|
|
1432
|
+
yarn tr-manual-enrichment-push-identifiers --auth=$TRANSCEND_API_KEY --enricherId=27d45a0d-7d03-47fa-9b30-6d697005cfcf --silentModeBefore=true
|
|
1396
1433
|
```
|
|
1397
1434
|
|
|
1398
1435
|
### tr-mark-request-data-silos-completed
|
package/build/cli-pull.js
CHANGED
|
@@ -29,7 +29,7 @@ const VALID_RESOURCES = Object.values(enums_1.TranscendPullResource);
|
|
|
29
29
|
*/
|
|
30
30
|
async function main() {
|
|
31
31
|
// Parse command line arguments
|
|
32
|
-
const { file = './transcend.yml', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, dataSiloIds = '', integrationNames = '', resources = graphql_1.DEFAULT_TRANSCEND_PULL_RESOURCES.join(','), pageSize = '', debug = '', auth, trackerStatuses = Object.values(privacy_types_1.ConsentTrackerStatus).join(','), } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
32
|
+
const { file = './transcend.yml', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, dataSiloIds = '', integrationNames = '', skipDatapoints, skipSubDatapoints, resources = graphql_1.DEFAULT_TRANSCEND_PULL_RESOURCES.join(','), pageSize = '', debug = '', auth, trackerStatuses = Object.values(privacy_types_1.ConsentTrackerStatus).join(','), } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
33
33
|
// Parse authentication as API key or path to list of API keys
|
|
34
34
|
const apiKeyOrList = await (0, api_keys_1.validateTranscendAuth)(auth);
|
|
35
35
|
// Validate trackerStatuses
|
|
@@ -65,6 +65,8 @@ async function main() {
|
|
|
65
65
|
.filter((x) => !!x);
|
|
66
66
|
const pageSizeParsed = pageSize ? parseInt(pageSize, 10) : 50;
|
|
67
67
|
const isDebug = debug === 'true';
|
|
68
|
+
const shouldSkipDataPoints = skipDatapoints;
|
|
69
|
+
const shouldSkipSubDataPoints = skipSubDatapoints;
|
|
68
70
|
// Sync to Disk
|
|
69
71
|
if (typeof apiKeyOrList === 'string') {
|
|
70
72
|
try {
|
|
@@ -76,13 +78,15 @@ async function main() {
|
|
|
76
78
|
resources: splitResources,
|
|
77
79
|
pageSize: pageSizeParsed,
|
|
78
80
|
debug: isDebug,
|
|
81
|
+
skipDatapoints: shouldSkipDataPoints,
|
|
82
|
+
skipSubDatapoints: shouldSkipSubDataPoints,
|
|
79
83
|
trackerStatuses: parsedTrackerStatuses,
|
|
80
84
|
});
|
|
81
85
|
logger_1.logger.info(colors_1.default.magenta(`Writing configuration to file "${file}"...`));
|
|
82
86
|
(0, readTranscendYaml_1.writeTranscendYaml)(file, configuration);
|
|
83
87
|
}
|
|
84
88
|
catch (err) {
|
|
85
|
-
logger_1.logger.error(colors_1.default.red(`An error occurred syncing the schema: ${err.message}`));
|
|
89
|
+
logger_1.logger.error(colors_1.default.red(`An error occurred syncing the schema: ${debug ? err.stack : err.message}`));
|
|
86
90
|
process.exit(1);
|
|
87
91
|
}
|
|
88
92
|
// Indicate success
|
|
@@ -104,6 +108,8 @@ async function main() {
|
|
|
104
108
|
integrationNames: integrationNamesParsed,
|
|
105
109
|
resources: splitResources,
|
|
106
110
|
pageSize: pageSizeParsed,
|
|
111
|
+
skipDatapoints: shouldSkipDataPoints,
|
|
112
|
+
skipSubDatapoints: shouldSkipSubDataPoints,
|
|
107
113
|
debug: isDebug,
|
|
108
114
|
trackerStatuses: parsedTrackerStatuses,
|
|
109
115
|
});
|
package/build/cli-pull.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-pull.js","sourceRoot":"","sources":["../src/cli-pull.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,qCAAkC;AAClC,oD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AC,IAAI,CACT,gBAAM,CAAC,OAAO,CAAC,kCAAkC,QAAQ,MAAM,CAAC,CACjE,CAAC;gBACF,IAAA,sCAAkB,EAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAE5C,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CAAC,GAAG,MAAM,oCAAoC,CAAC,CAC5D,CAAC;aACH;YAAC,OAAO,GAAG,EAAE;gBACZ,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CAAC,GAAG,MAAM,mCAAmC,GAAG,CAAC,OAAO,EAAE,CAAC,CACtE,CAAC;gBACF,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;aACjD;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,GAAG,CACR,gCAAgC,iBAAiB,CAAC,IAAI,CACpD,GAAG,CACJ,2DAA2D,mCAAuB,EAAE,CACtF,CACF,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;KACF;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -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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AC,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,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA2E;AAC3E,yCAAmE;AACnE,2CAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,oCAAoC;IACpC,OAAO,GAAG,EAAE;IACZ,6CAA6C;IAC7C,QAAQ,GAAG,EAAE;IACb,8EAA8E;IAC9E,gBAAgB;IAChB,0DAA0D;IAC1D,iBAAiB;IACjB,wCAAwC;IACxC,WAAW,GAAG,IAAI;IAClB,mDAAmD;IACnD,eAAe;IACf,kDAAkD;IAClD,cAAc;IACd,0BAA0B;IAC1B,UAAU,GAAG,EAAE,GAChB,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,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AAC,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;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"}
|
|
@@ -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'));
|
|
@@ -66,7 +82,7 @@ async function main() {
|
|
|
66
82
|
auth,
|
|
67
83
|
createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,
|
|
68
84
|
createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
|
|
69
|
-
|
|
85
|
+
isTest: showTests === 'true' ? true : showTests === 'false' ? false : undefined,
|
|
70
86
|
});
|
|
71
87
|
// Write to CSV
|
|
72
88
|
const headers = (0, uniq_1.default)(requestsFormattedForCsv.map((d) => Object.keys(d)).flat());
|
|
@@ -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,"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;IACvC,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,gCAAgC;IAChC,OAAO,GAAG,EAAE;IACZ,iCAAiC;IACjC,QAAQ,GAAG,EAAE;IACb,8CAA8C;IAC9C,SAAS;IACT,kDAAkD;IAClD,eAAe;IACf,iDAAiD;IACjD,cAAc;IACd,iCAAiC;IACjC,SAAS,GAAG,KAAK,GAClB,GAAG,IAAA,sBAAK,EAAC,OAAO,CAA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$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;IACjC,WAAW,GAAG,IAAI;IAClB,mDAAmD;IACnD,eAAe;IACf,kDAAkD;IAClD,cAAc;IACd,0BAA0B;IAC1B,UAAU,GAAG,EAAE,GAChB,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,C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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":"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,IAAA,yBAAc,EAAC,UAAU,CAAC;QACtC,SAAS,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC;QAC9B,eAAe,EAAE,eAAe,KAAK,MAAM;QAC3C,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS;QAC3E,gBAAgB,EAAE,gBAAgB,KAAK,MAAM;QAC7C,eAAe,EAAE,eAAe,KAAK,MAAM;QAC3C,iBAAiB,EAAE,iBAAiB,KAAK,MAAM;QAC/C,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;QACrE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,YAAY;KACb,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -5546,7 +5546,7 @@ export type PrivacyRequest = t.TypeOf<typeof PrivacyRequest>;
|
|
|
5546
5546
|
* @param options - Filter options
|
|
5547
5547
|
* @returns List of requests
|
|
5548
5548
|
*/
|
|
5549
|
-
export declare function fetchAllRequests(client: GraphQLClient, { actions, statuses, createdAtBefore, createdAtAfter,
|
|
5549
|
+
export declare function fetchAllRequests(client: GraphQLClient, { actions, statuses, createdAtBefore, createdAtAfter, isTest, isSilent, }?: {
|
|
5550
5550
|
/** Actions to filter on */
|
|
5551
5551
|
actions?: RequestAction[];
|
|
5552
5552
|
/** Statuses to filter on */
|
|
@@ -5556,6 +5556,8 @@ export declare function fetchAllRequests(client: GraphQLClient, { actions, statu
|
|
|
5556
5556
|
/** Filter for requests created after this date */
|
|
5557
5557
|
createdAtAfter?: Date;
|
|
5558
5558
|
/** Return test requests */
|
|
5559
|
-
|
|
5559
|
+
isTest?: boolean;
|
|
5560
|
+
/** Return silent mode requests */
|
|
5561
|
+
isSilent?: boolean;
|
|
5560
5562
|
}): Promise<PrivacyRequest[]>;
|
|
5561
5563
|
//# sourceMappingURL=fetchAllRequests.d.ts.map
|