@transcend-io/cli 4.128.1 → 4.130.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 (38) hide show
  1. package/README.md +125 -34
  2. package/build/cli-request-notify-additional-time.d.ts +3 -0
  3. package/build/cli-request-notify-additional-time.d.ts.map +1 -0
  4. package/build/cli-request-notify-additional-time.js +88 -0
  5. package/build/cli-request-notify-additional-time.js.map +1 -0
  6. package/build/cli-request-upload.js +1 -1
  7. package/build/cli-request-upload.js.map +1 -1
  8. package/build/codecs.d.ts +8 -0
  9. package/build/codecs.d.ts.map +1 -1
  10. package/build/enums.d.ts +2 -0
  11. package/build/enums.d.ts.map +1 -1
  12. package/build/enums.js +2 -0
  13. package/build/enums.js.map +1 -1
  14. package/build/graphql/fetchAllRequests.d.ts +8 -3
  15. package/build/graphql/fetchAllRequests.d.ts.map +1 -1
  16. package/build/graphql/fetchAllRequests.js +45 -38
  17. package/build/graphql/fetchAllRequests.js.map +1 -1
  18. package/build/graphql/gqls/request.d.ts +1 -0
  19. package/build/graphql/gqls/request.d.ts.map +1 -1
  20. package/build/graphql/gqls/request.js +9 -1
  21. package/build/graphql/gqls/request.js.map +1 -1
  22. package/build/requests/index.d.ts +1 -0
  23. package/build/requests/index.d.ts.map +1 -1
  24. package/build/requests/index.js +1 -0
  25. package/build/requests/index.js.map +1 -1
  26. package/build/requests/markSilentPrivacyRequests.d.ts +2 -2
  27. package/build/requests/markSilentPrivacyRequests.d.ts.map +1 -1
  28. package/build/requests/markSilentPrivacyRequests.js +2 -2
  29. package/build/requests/markSilentPrivacyRequests.js.map +1 -1
  30. package/build/requests/notifyPrivacyRequestsAdditionalTime.d.ts +34 -0
  31. package/build/requests/notifyPrivacyRequestsAdditionalTime.d.ts.map +1 -0
  32. package/build/requests/notifyPrivacyRequestsAdditionalTime.js +72 -0
  33. package/build/requests/notifyPrivacyRequestsAdditionalTime.js.map +1 -0
  34. package/build/requests/pullPrivacyRequests.d.ts +1 -1
  35. package/build/requests/pullPrivacyRequests.d.ts.map +1 -1
  36. package/build/requests/pullPrivacyRequests.js.map +1 -1
  37. package/build/tsbuildinfo +1 -1
  38. package/package.json +3 -2
package/README.md CHANGED
@@ -33,102 +33,106 @@
33
33
  - [Authentication](#authentication-5)
34
34
  - [Arguments](#arguments-5)
35
35
  - [Usage](#usage-6)
36
- - [tr-request-mark-silent](#tr-request-mark-silent)
36
+ - [tr-request-notify-additional-time](#tr-request-notify-additional-time)
37
37
  - [Authentication](#authentication-6)
38
38
  - [Arguments](#arguments-6)
39
39
  - [Usage](#usage-7)
40
- - [tr-request-upload](#tr-request-upload)
40
+ - [tr-request-mark-silent](#tr-request-mark-silent)
41
41
  - [Authentication](#authentication-7)
42
42
  - [Arguments](#arguments-7)
43
43
  - [Usage](#usage-8)
44
- - [tr-request-restart](#tr-request-restart)
44
+ - [tr-request-upload](#tr-request-upload)
45
45
  - [Authentication](#authentication-8)
46
46
  - [Arguments](#arguments-8)
47
47
  - [Usage](#usage-9)
48
- - [tr-request-export](#tr-request-export)
48
+ - [tr-request-restart](#tr-request-restart)
49
49
  - [Authentication](#authentication-9)
50
50
  - [Arguments](#arguments-9)
51
51
  - [Usage](#usage-10)
52
- - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
52
+ - [tr-request-export](#tr-request-export)
53
53
  - [Authentication](#authentication-10)
54
54
  - [Arguments](#arguments-10)
55
55
  - [Usage](#usage-11)
56
- - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
56
+ - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
57
57
  - [Authentication](#authentication-11)
58
58
  - [Arguments](#arguments-11)
59
59
  - [Usage](#usage-12)
60
- - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
60
+ - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
61
61
  - [Authentication](#authentication-12)
62
62
  - [Arguments](#arguments-12)
63
63
  - [Usage](#usage-13)
64
- - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
64
+ - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
65
65
  - [Authentication](#authentication-13)
66
66
  - [Arguments](#arguments-13)
67
67
  - [Usage](#usage-14)
68
- - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
68
+ - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
69
69
  - [Authentication](#authentication-14)
70
70
  - [Arguments](#arguments-14)
71
71
  - [Usage](#usage-15)
72
- - [tr-skip-request-data-silos](#tr-skip-request-data-silos)
72
+ - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
73
73
  - [Authentication](#authentication-15)
74
74
  - [Arguments](#arguments-15)
75
75
  - [Usage](#usage-16)
76
- - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
76
+ - [tr-skip-request-data-silos](#tr-skip-request-data-silos)
77
77
  - [Authentication](#authentication-16)
78
78
  - [Arguments](#arguments-16)
79
79
  - [Usage](#usage-17)
80
- - [tr-update-consent-manager](#tr-update-consent-manager)
80
+ - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
81
81
  - [Authentication](#authentication-17)
82
82
  - [Arguments](#arguments-17)
83
83
  - [Usage](#usage-18)
84
- - [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
84
+ - [tr-update-consent-manager](#tr-update-consent-manager)
85
85
  - [Authentication](#authentication-18)
86
86
  - [Arguments](#arguments-18)
87
87
  - [Usage](#usage-19)
88
- - [tr-consent-manager-service-json-to-yml](#tr-consent-manager-service-json-to-yml)
88
+ - [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
89
89
  - [Authentication](#authentication-19)
90
90
  - [Arguments](#arguments-19)
91
91
  - [Usage](#usage-20)
92
- - [tr-derive-data-silos-from-data-flows](#tr-derive-data-silos-from-data-flows)
92
+ - [tr-consent-manager-service-json-to-yml](#tr-consent-manager-service-json-to-yml)
93
93
  - [Authentication](#authentication-20)
94
94
  - [Arguments](#arguments-20)
95
95
  - [Usage](#usage-21)
96
- - [tr-derive-data-silos-from-data-flows-cross-instance](#tr-derive-data-silos-from-data-flows-cross-instance)
96
+ - [tr-derive-data-silos-from-data-flows](#tr-derive-data-silos-from-data-flows)
97
97
  - [Authentication](#authentication-21)
98
98
  - [Arguments](#arguments-21)
99
99
  - [Usage](#usage-22)
100
- - [tr-pull-consent-metrics](#tr-pull-consent-metrics)
100
+ - [tr-derive-data-silos-from-data-flows-cross-instance](#tr-derive-data-silos-from-data-flows-cross-instance)
101
101
  - [Authentication](#authentication-22)
102
102
  - [Arguments](#arguments-22)
103
103
  - [Usage](#usage-23)
104
- - [tr-upload-consent-preferences](#tr-upload-consent-preferences)
104
+ - [tr-pull-consent-metrics](#tr-pull-consent-metrics)
105
105
  - [Authentication](#authentication-23)
106
106
  - [Arguments](#arguments-23)
107
107
  - [Usage](#usage-24)
108
- - [tr-pull-consent-preferences](#tr-pull-consent-preferences)
108
+ - [tr-upload-consent-preferences](#tr-upload-consent-preferences)
109
109
  - [Authentication](#authentication-24)
110
110
  - [Arguments](#arguments-24)
111
111
  - [Usage](#usage-25)
112
- - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
112
+ - [tr-pull-consent-preferences](#tr-pull-consent-preferences)
113
113
  - [Authentication](#authentication-25)
114
114
  - [Arguments](#arguments-25)
115
115
  - [Usage](#usage-26)
116
- - [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
116
+ - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
117
117
  - [Authentication](#authentication-26)
118
118
  - [Arguments](#arguments-26)
119
119
  - [Usage](#usage-27)
120
- - [tr-generate-api-keys](#tr-generate-api-keys)
120
+ - [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
121
121
  - [Authentication](#authentication-27)
122
122
  - [Arguments](#arguments-27)
123
123
  - [Usage](#usage-28)
124
- - [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
124
+ - [tr-generate-api-keys](#tr-generate-api-keys)
125
125
  - [Authentication](#authentication-28)
126
126
  - [Arguments](#arguments-28)
127
127
  - [Usage](#usage-29)
128
- - [tr-create-assessment](#tr-create-assessment)
128
+ - [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
129
129
  - [Authentication](#authentication-29)
130
130
  - [Arguments](#arguments-29)
131
131
  - [Usage](#usage-30)
132
+ - [tr-create-assessment](#tr-create-assessment)
133
+ - [Authentication](#authentication-30)
134
+ - [Arguments](#arguments-30)
135
+ - [Usage](#usage-31)
132
136
  - [Prompt Manager](#prompt-manager)
133
137
  - [Proxy usage](#proxy-usage)
134
138
 
@@ -155,7 +159,8 @@ yarn tr-scan-packages --auth=$TRANSCEND_API_KEY
155
159
  yarn tr-discover-silos --auth=$TRANSCEND_API_KEY
156
160
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY
157
161
  yarn tr-request-cancel --auth=$TRANSCEND_API_KEY
158
- yarn tr-mark-silent --auth=$TRANSCEND_API_KEY
162
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY
163
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY
159
164
  yarn tr-request-upload --auth=$TRANSCEND_API_KEY
160
165
  yarn tr-request-export --auth=$TRANSCEND_API_KEY
161
166
  yarn tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -194,6 +199,7 @@ tr-discover-silos --auth=$TRANSCEND_API_KEY
194
199
  tr-request-approve --auth=$TRANSCEND_API_KEY
195
200
  tr-request-cancel --auth=$TRANSCEND_API_KEY
196
201
  tr-request-mark-silent --auth=$TRANSCEND_API_KEY
202
+ tr-request-mark-silent --auth=$TRANSCEND_API_KEY
197
203
  tr-request-upload --auth=$TRANSCEND_API_KEY
198
204
  tr-request-export --auth=$TRANSCEND_API_KEY
199
205
  tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -841,7 +847,7 @@ The API key needs the following scopes:
841
847
  | createdAtBefore | Approve requests that were submitted before this time | Date | N/A | false |
842
848
  | createdAtAfter | Approve requests that were submitted after this time | Date | N/A | false |
843
849
  | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
844
- | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
850
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 50 | false |
845
851
 
846
852
  #### Usage
847
853
 
@@ -863,10 +869,10 @@ Approve all requests, but mark any request made before 05/03/2023 as silent mode
863
869
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
864
870
  ```
865
871
 
866
- Increase the concurrency (defaults to 100)
872
+ Increase the concurrency (defaults to 50)
867
873
 
868
874
  ```sh
869
- yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
875
+ yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=100
870
876
  ```
871
877
 
872
878
  Approve ERASURE requests created within a specific time frame
@@ -901,7 +907,7 @@ The API key needs the following scopes:
901
907
  | createdAtAfter | Cancel requests that were submitted after this time | Date | N/A | false |
902
908
  | 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 |
903
909
  | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
904
- | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
910
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 50 | false |
905
911
 
906
912
  #### Usage
907
913
 
@@ -948,12 +954,97 @@ Cancel all open SALE_OPT_OUT, within a specific time frame
948
954
  yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
949
955
  ```
950
956
 
951
- Increase the concurrency (defaults to 100)
957
+ Increase the concurrency (defaults to 50)
952
958
 
953
959
  ```sh
954
960
  yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
955
961
  ```
956
962
 
963
+ ### tr-request-notify-additional-time
964
+
965
+ Bulk notify a set of privacy requests from the [DSR Automation -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab that more time is needed to complete the request. Note any request in silent mode will not be emailed.
966
+
967
+ #### Authentication
968
+
969
+ 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).
970
+
971
+ The API key needs the following scopes:
972
+
973
+ - Request Approval and Communication
974
+ - View Incoming Requests
975
+
976
+ #### Arguments
977
+
978
+ | Argument | Description | Type | Default | Required |
979
+ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------ | -------- |
980
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
981
+ | createdAtBefore | Notify requests that are open but submitted before this time | Date | N/A | true |
982
+ | createdAtAfter | Notify requests that are open but submitted after this time. | Date | now() | false |
983
+ | actions | The [request actions](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to notify. | RequestAction[] | RequestAction[] | false |
984
+ | daysLeft | Only notify requests that have less than this number of days until they are considered expired. This allows for re-running the command without notifying the same users multiple times | number | 10 | false |
985
+ | days | The number of days to adjust the expiration of the request to | number | 45 | false |
986
+ | requestIds | Specify the specific request IDs to notify | string[] | [] | false |
987
+ | emailTemplate | The title of the [email template](https://app.transcend.io/privacy-requests/email-templates) that should be sent to the requests. | string | Additional Time Needed | false |
988
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
989
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 50 | false |
990
+
991
+ #### Usage
992
+
993
+ Notify all request types that were made before 01/01/2024
994
+
995
+ ```sh
996
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024
997
+ ```
998
+
999
+ Notify all request types that were made during a date range
1000
+
1001
+ ```sh
1002
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --createdAtAfter=12/15/2023
1003
+ ```
1004
+
1005
+ Notify certain request types
1006
+
1007
+ ```sh
1008
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --actions=SALE_OPT_OUT,ERASURE
1009
+ ```
1010
+
1011
+ Specifying the backend URL, needed for US hosted backend infrastructure.
1012
+
1013
+ ```sh
1014
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --transcendUrl=https://api.us.transcend.io
1015
+ ```
1016
+
1017
+ Bulk notify requests by ID
1018
+
1019
+ ```sh
1020
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 \
1021
+ --requestIds=c3ae78c9-2768-4666-991a-d2f729503337,342e4bd1-64ea-4af0-a4ad-704b5a07cfe4
1022
+ ```
1023
+
1024
+ Only notify requests that are expiring in the next 3 days or less
1025
+
1026
+ ```sh
1027
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --daysLeft=3
1028
+ ```
1029
+
1030
+ Change number of days to extend request by
1031
+
1032
+ ```sh
1033
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --days=30
1034
+ ```
1035
+
1036
+ Send a specific email template to the request that instead of the default
1037
+
1038
+ ```sh
1039
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --emailTemplate="Custom Email Template"
1040
+ ```
1041
+
1042
+ Increase the concurrency (defaults to 50)
1043
+
1044
+ ```sh
1045
+ yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY --createdAtBefore=01/01/2024 --concurrency=500
1046
+ ```
1047
+
957
1048
  ### tr-request-mark-silent
958
1049
 
959
1050
  Bulk update a set of privacy requests from the [DSR Automation -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab to be in silent mode.
@@ -977,7 +1068,7 @@ The API key needs the following scopes:
977
1068
  | createdAtBefore | Mark silent requests that were submitted before this time | Date | N/A | false |
978
1069
  | createdAtAfter | Mark silent requests that were submitted after this time | Date | N/A | false |
979
1070
  | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
980
- | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
1071
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 50 | false |
981
1072
 
982
1073
  #### Usage
983
1074
 
@@ -1012,7 +1103,7 @@ Mark sale opt out requests as silent within a certain date range
1012
1103
  yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
1013
1104
  ```
1014
1105
 
1015
- Increase the concurrency (defaults to 100)
1106
+ Increase the concurrency (defaults to 50)
1016
1107
 
1017
1108
  ```sh
1018
1109
  yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
@@ -1055,7 +1146,7 @@ The API key needs the following scopes:
1055
1146
  | cacheFilepath | The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API. | string | ./transcend-privacy-requests-cache.json | false |
1056
1147
  | requestReceiptFolder | The path to the folder where receipts of each upload are stored. This allows for debugging of errors. | string | ./privacy-request-upload-receipts | false |
1057
1148
  | sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
1058
- | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
1149
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 50 | false |
1059
1150
  | attributes | Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4 | string | Tags:transcend-cli | false |
1060
1151
  | isTest | Flag whether the requests being uploaded are test requests or regular requests. | boolean | false | false |
1061
1152
  | isSilent | Flag whether the requests being uploaded should be submitted in silent mode. | boolean | true | false |
@@ -1122,7 +1213,7 @@ yarn tr-request-upload --auth=$TRANSCEND_API_KEY --file=/Users/transcend/Desktop
1122
1213
  --isSilent=false --emailIsVerified=false
1123
1214
  ```
1124
1215
 
1125
- Increase the concurrency (defaults to 100)
1216
+ Increase the concurrency (defaults to 50)
1126
1217
 
1127
1218
  ```sh
1128
1219
  yarn tr-request-upload --auth=$TRANSCEND_API_KEY --file=/Users/transcend/Desktop/test.csv --concurrency=100
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-notify-additional-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-notify-additional-time.d.ts","sourceRoot":"","sources":["../src/cli-request-notify-additional-time.ts"],"names":[],"mappings":""}
@@ -0,0 +1,88 @@
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
+ const constants_1 = require("./constants");
13
+ /**
14
+ * Notify requests that more time is needed
15
+ *
16
+ * Requires scopes:
17
+ * - Request Approval and Communication
18
+ * - View Incoming Requests
19
+ *
20
+ * Dev Usage:
21
+ * yarn ts-node ./src/cli-request-notify-additional-time.ts --auth=$TRANSCEND_API_KEY \
22
+ * --actions=ERASURE --createdAtBefore=01/01/2024
23
+ *
24
+ * Standard usage:
25
+ * yarn tr-request-notify-additional-time --auth=$TRANSCEND_API_KEY \
26
+ * --actions=ERASURE --createdAtBefore=01/01/2024
27
+ */
28
+ async function main() {
29
+ // Parse command line arguments
30
+ const {
31
+ /** Transcend Backend URL */
32
+ transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
33
+ /** API key */
34
+ auth,
35
+ /** Cancel these specific actions */
36
+ actions = '',
37
+ /** Concurrency to notify requests at */
38
+ concurrency = '50',
39
+ /** Number of days to extend by */
40
+ days = '45',
41
+ /**
42
+ * Only notify requests that have less than this number of days until they are considered expired.
43
+ * This allows for re-running the command without notifying the same users multiple times
44
+ */
45
+ daysLeft = '10',
46
+ /** Filter for requests created before this date */
47
+ createdAtBefore,
48
+ /** Email template title to sue when notifying requests */
49
+ emailTemplate = 'Additional Time Needed',
50
+ /** Filter for requests created after this date */
51
+ createdAtAfter,
52
+ /** List of request IDs */
53
+ requestIds = '', } = (0, yargs_parser_1.default)(process.argv.slice(2));
54
+ // Ensure auth is passed
55
+ if (!auth) {
56
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
57
+ process.exit(1);
58
+ }
59
+ if (!createdAtBefore) {
60
+ logger_1.logger.error(colors_1.default.red('createdAtBefore must be provided. You can specify using --createdAtBefore=01/01/2024'));
61
+ process.exit(1);
62
+ }
63
+ // Validate actions
64
+ const parsedActions = (0, requests_1.splitCsvToList)(actions);
65
+ const invalidActions = parsedActions.filter(
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
+ (type) => !Object.values(privacy_types_1.RequestAction).includes(type));
68
+ if (invalidActions.length > 0) {
69
+ logger_1.logger.error(colors_1.default.red(`Failed to parse actions:"${invalidActions.join(',')}".\n` +
70
+ `Expected one of: \n${Object.values(privacy_types_1.RequestAction).join('\n')}`));
71
+ process.exit(1);
72
+ }
73
+ // Pull privacy requests
74
+ await (0, requests_1.notifyPrivacyRequestsAdditionalTime)({
75
+ transcendUrl,
76
+ requestActions: parsedActions,
77
+ auth,
78
+ emailTemplate,
79
+ days: parseInt(days, 10),
80
+ daysLeft: parseInt(daysLeft, 10),
81
+ requestIds: requestIds ? (0, requests_1.splitCsvToList)(requestIds) : undefined,
82
+ concurrency: parseInt(concurrency, 10),
83
+ createdAtBefore: new Date(createdAtBefore),
84
+ createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
85
+ });
86
+ }
87
+ main();
88
+ //# sourceMappingURL=cli-request-notify-additional-time.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-notify-additional-time.js","sourceRoot":"","sources":["../src/cli-request-notify-additional-time.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA4D;AAC5D,yCAGoB;AACpB,2CAAoD;AAEpD;;;;;;;;;;;;;;GAcG;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,wCAAwC;IACxC,WAAW,GAAG,IAAI;IAClB,kCAAkC;IAClC,IAAI,GAAG,IAAI;IACX;;;OAGG;IACH,QAAQ,GAAG,IAAI;IACf,mDAAmD;IACnD,eAAe;IACf,0DAA0D;IAC1D,aAAa,GAAG,wBAAwB;IACxC,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,IAAI,CAAC,eAAe,EAAE;QACpB,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,sFAAsF,CACvF,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,8CAAmC,EAAC;QACxC,YAAY;QACZ,cAAc,EAAE,aAAa;QAC7B,IAAI;QACJ,aAAa;QACb,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACxB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;QAChC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,IAAA,yBAAc,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/D,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,eAAe,EAAE,IAAI,IAAI,CAAC,eAAe,CAAC;QAC1C,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS;KACtE,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -29,7 +29,7 @@ const constants_1 = require("./constants");
29
29
  */
30
30
  async function main() {
31
31
  // Parse command line arguments
32
- const { auth, file = './requests.csv', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, cacheFilepath = './transcend-privacy-requests-cache.json', requestReceiptFolder = './privacy-request-upload-receipts', sombraAuth, concurrency = '100', isTest = 'false', isSilent = 'true', skipSendingReceipt = 'false', defaultPhoneCountryCode = '1', // USA
32
+ const { auth, file = './requests.csv', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, cacheFilepath = './transcend-privacy-requests-cache.json', requestReceiptFolder = './privacy-request-upload-receipts', sombraAuth, concurrency = '50', isTest = 'false', isSilent = 'true', skipSendingReceipt = 'false', defaultPhoneCountryCode = '1', // USA
33
33
  emailIsVerified = 'true', dryRun = 'false', debug = 'false', skipFilterStep = 'false', attributes = 'Tags:transcend-cli', } = (0, yargs_parser_1.default)(process.argv.slice(2));
34
34
  // Ensure auth is passed
35
35
  if (!auth) {
@@ -1 +1 @@
1
- {"version":3,"file":"cli-request-upload.js","sourceRoot":"","sources":["../src/cli-request-upload.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,yCAA0E;AAC1E,2CAAoD;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,EACJ,IAAI,GAAG,gBAAgB,EACvB,YAAY,GAAG,iCAAqB,EACpC,aAAa,GAAG,yCAAyC,EACzD,oBAAoB,GAAG,mCAAmC,EAC1D,UAAU,EACV,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,EACjB,kBAAkB,GAAG,OAAO,EAC5B,uBAAuB,GAAG,GAAG,EAAE,MAAM;IACrC,eAAe,GAAG,MAAM,EACxB,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,OAAO,EACf,cAAc,GAAG,OAAO,EACxB,UAAU,GAAG,oBAAoB,GAClC,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,0BAA0B;IAC1B,MAAM,IAAA,uCAA4B,EAAC;QACjC,aAAa;QACb,oBAAoB;QACpB,IAAI;QACJ,IAAI;QACJ,UAAU;QACV,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,YAAY;QACZ,uBAAuB;QACvB,UAAU,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;QACtC,KAAK,EAAE,KAAK,KAAK,MAAM;QACvB,cAAc,EAAE,cAAc,KAAK,MAAM;QACzC,QAAQ,EAAE,QAAQ,KAAK,MAAM;QAC7B,kBAAkB,EAAE,kBAAkB,KAAK,MAAM;QACjD,eAAe,EAAE,eAAe,KAAK,MAAM;QAC3C,MAAM,EAAE,MAAM,KAAK,MAAM;QACzB,MAAM,EAAE,MAAM,KAAK,MAAM;KAC1B,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"cli-request-upload.js","sourceRoot":"","sources":["../src/cli-request-upload.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,yCAA0E;AAC1E,2CAAoD;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,EACJ,IAAI,GAAG,gBAAgB,EACvB,YAAY,GAAG,iCAAqB,EACpC,aAAa,GAAG,yCAAyC,EACzD,oBAAoB,GAAG,mCAAmC,EAC1D,UAAU,EACV,WAAW,GAAG,IAAI,EAClB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,EACjB,kBAAkB,GAAG,OAAO,EAC5B,uBAAuB,GAAG,GAAG,EAAE,MAAM;IACrC,eAAe,GAAG,MAAM,EACxB,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,OAAO,EACf,cAAc,GAAG,OAAO,EACxB,UAAU,GAAG,oBAAoB,GAClC,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,0BAA0B;IAC1B,MAAM,IAAA,uCAA4B,EAAC;QACjC,aAAa;QACb,oBAAoB;QACpB,IAAI;QACJ,IAAI;QACJ,UAAU;QACV,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,YAAY;QACZ,uBAAuB;QACvB,UAAU,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;QACtC,KAAK,EAAE,KAAK,KAAK,MAAM;QACvB,cAAc,EAAE,cAAc,KAAK,MAAM;QACzC,QAAQ,EAAE,QAAQ,KAAK,MAAM;QAC7B,kBAAkB,EAAE,kBAAkB,KAAK,MAAM;QACjD,eAAe,EAAE,eAAe,KAAK,MAAM;QAC3C,MAAM,EAAE,MAAM,KAAK,MAAM;QACzB,MAAM,EAAE,MAAM,KAAK,MAAM;KAC1B,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
package/build/codecs.d.ts CHANGED
@@ -86093,6 +86093,8 @@ export declare const OpenAIEnabledRoute: EnabledRouteC<t.KeyofC<{
86093
86093
  "/v1/threads/:threadId/messages/:messageId": unknown;
86094
86094
  "/v1/threads/:threadId/runs": unknown;
86095
86095
  "/v1/threads/:threadId/runs/:runId": unknown;
86096
+ "/v1/files": unknown;
86097
+ "/v1/files/:fileId": unknown;
86096
86098
  }>>;
86097
86099
  /** Type override */
86098
86100
  export type OpenAIEnabledRoute = t.TypeOf<typeof OpenAIEnabledRoute>;
@@ -86108,6 +86110,8 @@ declare const OpenAIRouteNameC: t.KeyofC<{
86108
86110
  "/v1/threads/:threadId/messages/:messageId": unknown;
86109
86111
  "/v1/threads/:threadId/runs": unknown;
86110
86112
  "/v1/threads/:threadId/runs/:runId": unknown;
86113
+ "/v1/files": unknown;
86114
+ "/v1/files/:fileId": unknown;
86111
86115
  }>;
86112
86116
  /** The enabled routes for OpenAI */
86113
86117
  export declare const OpenAIEnabledRoutes: EnabledRoutesC<typeof OpenAIRouteNameC>;
@@ -86125,6 +86129,8 @@ export declare const OpenAIIntegration: AIIntegrationC<t.KeyofC<{
86125
86129
  "/v1/threads/:threadId/messages/:messageId": unknown;
86126
86130
  "/v1/threads/:threadId/runs": unknown;
86127
86131
  "/v1/threads/:threadId/runs/:runId": unknown;
86132
+ "/v1/files": unknown;
86133
+ "/v1/files/:fileId": unknown;
86128
86134
  }>>;
86129
86135
  /** Type override */
86130
86136
  export type OpenAIIntegration = t.TypeOf<typeof OpenAIIntegration>;
@@ -86142,6 +86148,8 @@ export declare const PathfinderPolicy: t.PartialC<{
86142
86148
  "/v1/threads/:threadId/messages/:messageId": unknown;
86143
86149
  "/v1/threads/:threadId/runs": unknown;
86144
86150
  "/v1/threads/:threadId/runs/:runId": unknown;
86151
+ "/v1/files": unknown;
86152
+ "/v1/files/:fileId": unknown;
86145
86153
  }>>;
86146
86154
  }>;
86147
86155
  }>;