@transcend-io/cli 6.23.1 → 6.25.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 (73) hide show
  1. package/README.md +154 -32
  2. package/build/cli-request-download-files.d.ts +3 -0
  3. package/build/cli-request-download-files.d.ts.map +1 -0
  4. package/build/cli-request-download-files.js +77 -0
  5. package/build/cli-request-download-files.js.map +1 -0
  6. package/build/cli-skip-preflight-jobs.d.ts +3 -0
  7. package/build/cli-skip-preflight-jobs.d.ts.map +1 -0
  8. package/build/cli-skip-preflight-jobs.js +53 -0
  9. package/build/cli-skip-preflight-jobs.js.map +1 -0
  10. package/build/codecs.d.ts +8 -0
  11. package/build/codecs.d.ts.map +1 -1
  12. package/build/graphql/fetchAllPrivacyCenters.d.ts +0 -2
  13. package/build/graphql/fetchAllPrivacyCenters.d.ts.map +1 -1
  14. package/build/graphql/fetchAllPrivacyCenters.js.map +1 -1
  15. package/build/graphql/fetchAllRequests.d.ts +6 -1
  16. package/build/graphql/fetchAllRequests.d.ts.map +1 -1
  17. package/build/graphql/fetchAllRequests.js +9 -2
  18. package/build/graphql/fetchAllRequests.js.map +1 -1
  19. package/build/graphql/fetchConsentManagerId.d.ts +0 -8
  20. package/build/graphql/fetchConsentManagerId.d.ts.map +1 -1
  21. package/build/graphql/fetchConsentManagerId.js.map +1 -1
  22. package/build/graphql/gqls/RequestEnricher.d.ts +1 -0
  23. package/build/graphql/gqls/RequestEnricher.d.ts.map +1 -1
  24. package/build/graphql/gqls/RequestEnricher.js +10 -1
  25. package/build/graphql/gqls/RequestEnricher.js.map +1 -1
  26. package/build/graphql/gqls/privacyCenter.d.ts.map +1 -1
  27. package/build/graphql/gqls/privacyCenter.js +0 -1
  28. package/build/graphql/gqls/privacyCenter.js.map +1 -1
  29. package/build/graphql/pullTranscendConfiguration.d.ts.map +1 -1
  30. package/build/graphql/pullTranscendConfiguration.js +0 -1
  31. package/build/graphql/pullTranscendConfiguration.js.map +1 -1
  32. package/build/graphql/syncPrivacyCenter.d.ts.map +1 -1
  33. package/build/graphql/syncPrivacyCenter.js +0 -3
  34. package/build/graphql/syncPrivacyCenter.js.map +1 -1
  35. package/build/preference-management/codecs.d.ts +22 -4
  36. package/build/preference-management/codecs.d.ts.map +1 -1
  37. package/build/requests/bulkRestartRequests.d.ts.map +1 -1
  38. package/build/requests/bulkRestartRequests.js +1 -3
  39. package/build/requests/bulkRestartRequests.js.map +1 -1
  40. package/build/requests/bulkRetryEnrichers.d.ts.map +1 -1
  41. package/build/requests/bulkRetryEnrichers.js +2 -3
  42. package/build/requests/bulkRetryEnrichers.js.map +1 -1
  43. package/build/requests/cancelPrivacyRequests.d.ts.map +1 -1
  44. package/build/requests/cancelPrivacyRequests.js +2 -5
  45. package/build/requests/cancelPrivacyRequests.js.map +1 -1
  46. package/build/requests/downloadPrivacyRequestFiles.d.ts +30 -0
  47. package/build/requests/downloadPrivacyRequestFiles.d.ts.map +1 -0
  48. package/build/requests/downloadPrivacyRequestFiles.js +96 -0
  49. package/build/requests/downloadPrivacyRequestFiles.js.map +1 -0
  50. package/build/requests/getFileMetadataForPrivacyRequests.d.ts +157 -0
  51. package/build/requests/getFileMetadataForPrivacyRequests.d.ts.map +1 -0
  52. package/build/requests/getFileMetadataForPrivacyRequests.js +159 -0
  53. package/build/requests/getFileMetadataForPrivacyRequests.js.map +1 -0
  54. package/build/requests/index.d.ts +4 -0
  55. package/build/requests/index.d.ts.map +1 -1
  56. package/build/requests/index.js +4 -0
  57. package/build/requests/index.js.map +1 -1
  58. package/build/requests/markSilentPrivacyRequests.d.ts.map +1 -1
  59. package/build/requests/markSilentPrivacyRequests.js +2 -5
  60. package/build/requests/markSilentPrivacyRequests.js.map +1 -1
  61. package/build/requests/notifyPrivacyRequestsAdditionalTime.d.ts.map +1 -1
  62. package/build/requests/notifyPrivacyRequestsAdditionalTime.js +1 -4
  63. package/build/requests/notifyPrivacyRequestsAdditionalTime.js.map +1 -1
  64. package/build/requests/skipPreflightJobs.d.ts +20 -0
  65. package/build/requests/skipPreflightJobs.d.ts.map +1 -0
  66. package/build/requests/skipPreflightJobs.js +73 -0
  67. package/build/requests/skipPreflightJobs.js.map +1 -0
  68. package/build/requests/streamPrivacyRequestFiles.d.ts +22 -0
  69. package/build/requests/streamPrivacyRequestFiles.d.ts.map +1 -0
  70. package/build/requests/streamPrivacyRequestFiles.js +48 -0
  71. package/build/requests/streamPrivacyRequestFiles.js.map +1 -0
  72. package/build/tsbuildinfo +1 -1
  73. package/package.json +3 -2
package/README.md CHANGED
@@ -34,127 +34,135 @@
34
34
  - [Authentication](#authentication-5)
35
35
  - [Arguments](#arguments-5)
36
36
  - [Usage](#usage-6)
37
- - [tr-request-cancel](#tr-request-cancel)
37
+ - [tr-request-download-files](#tr-request-download-files)
38
38
  - [Authentication](#authentication-6)
39
39
  - [Arguments](#arguments-6)
40
40
  - [Usage](#usage-7)
41
- - [tr-request-notify-additional-time](#tr-request-notify-additional-time)
41
+ - [tr-request-cancel](#tr-request-cancel)
42
42
  - [Authentication](#authentication-7)
43
43
  - [Arguments](#arguments-7)
44
44
  - [Usage](#usage-8)
45
- - [tr-request-mark-silent](#tr-request-mark-silent)
45
+ - [tr-request-notify-additional-time](#tr-request-notify-additional-time)
46
46
  - [Authentication](#authentication-8)
47
47
  - [Arguments](#arguments-8)
48
48
  - [Usage](#usage-9)
49
- - [tr-request-upload](#tr-request-upload)
49
+ - [tr-request-mark-silent](#tr-request-mark-silent)
50
50
  - [Authentication](#authentication-9)
51
51
  - [Arguments](#arguments-9)
52
52
  - [Usage](#usage-10)
53
- - [tr-request-restart](#tr-request-restart)
53
+ - [tr-request-upload](#tr-request-upload)
54
54
  - [Authentication](#authentication-10)
55
55
  - [Arguments](#arguments-10)
56
56
  - [Usage](#usage-11)
57
- - [tr-request-enricher-restart](#tr-request-enricher-restart)
57
+ - [tr-request-restart](#tr-request-restart)
58
58
  - [Authentication](#authentication-11)
59
59
  - [Arguments](#arguments-11)
60
60
  - [Usage](#usage-12)
61
- - [tr-request-reject-unverified-identifiers](#tr-request-reject-unverified-identifiers)
61
+ - [tr-request-enricher-restart](#tr-request-enricher-restart)
62
62
  - [Authentication](#authentication-12)
63
63
  - [Arguments](#arguments-12)
64
64
  - [Usage](#usage-13)
65
- - [tr-request-export](#tr-request-export)
65
+ - [tr-request-reject-unverified-identifiers](#tr-request-reject-unverified-identifiers)
66
66
  - [Authentication](#authentication-13)
67
67
  - [Arguments](#arguments-13)
68
68
  - [Usage](#usage-14)
69
- - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
69
+ - [tr-request-export](#tr-request-export)
70
70
  - [Authentication](#authentication-14)
71
71
  - [Arguments](#arguments-14)
72
72
  - [Usage](#usage-15)
73
- - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
73
+ - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
74
74
  - [Authentication](#authentication-15)
75
75
  - [Arguments](#arguments-15)
76
76
  - [Usage](#usage-16)
77
- - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
77
+ - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
78
78
  - [Authentication](#authentication-16)
79
79
  - [Arguments](#arguments-16)
80
80
  - [Usage](#usage-17)
81
- - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
81
+ - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
82
82
  - [Authentication](#authentication-17)
83
83
  - [Arguments](#arguments-17)
84
84
  - [Usage](#usage-18)
85
- - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
85
+ - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
86
86
  - [Authentication](#authentication-18)
87
87
  - [Arguments](#arguments-18)
88
88
  - [Usage](#usage-19)
89
- - [tr-skip-request-data-silos](#tr-skip-request-data-silos)
89
+ - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
90
90
  - [Authentication](#authentication-19)
91
91
  - [Arguments](#arguments-19)
92
92
  - [Usage](#usage-20)
93
- - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
93
+ - [tr-skip-request-data-silos](#tr-skip-request-data-silos)
94
94
  - [Authentication](#authentication-20)
95
95
  - [Arguments](#arguments-20)
96
96
  - [Usage](#usage-21)
97
- - [tr-update-consent-manager](#tr-update-consent-manager)
97
+ - [tr-skip-preflight-jobs](#tr-skip-preflight-jobs)
98
98
  - [Authentication](#authentication-21)
99
99
  - [Arguments](#arguments-21)
100
100
  - [Usage](#usage-22)
101
- - [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
101
+ - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
102
102
  - [Authentication](#authentication-22)
103
103
  - [Arguments](#arguments-22)
104
104
  - [Usage](#usage-23)
105
- - [tr-consent-manager-service-json-to-yml](#tr-consent-manager-service-json-to-yml)
105
+ - [tr-update-consent-manager](#tr-update-consent-manager)
106
106
  - [Authentication](#authentication-23)
107
107
  - [Arguments](#arguments-23)
108
108
  - [Usage](#usage-24)
109
- - [tr-derive-data-silos-from-data-flows](#tr-derive-data-silos-from-data-flows)
109
+ - [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
110
110
  - [Authentication](#authentication-24)
111
111
  - [Arguments](#arguments-24)
112
112
  - [Usage](#usage-25)
113
- - [tr-derive-data-silos-from-data-flows-cross-instance](#tr-derive-data-silos-from-data-flows-cross-instance)
113
+ - [tr-consent-manager-service-json-to-yml](#tr-consent-manager-service-json-to-yml)
114
114
  - [Authentication](#authentication-25)
115
115
  - [Arguments](#arguments-25)
116
116
  - [Usage](#usage-26)
117
- - [tr-pull-consent-metrics](#tr-pull-consent-metrics)
117
+ - [tr-derive-data-silos-from-data-flows](#tr-derive-data-silos-from-data-flows)
118
118
  - [Authentication](#authentication-26)
119
119
  - [Arguments](#arguments-26)
120
120
  - [Usage](#usage-27)
121
- - [tr-pull-datapoints](#tr-pull-datapoints)
121
+ - [tr-derive-data-silos-from-data-flows-cross-instance](#tr-derive-data-silos-from-data-flows-cross-instance)
122
122
  - [Authentication](#authentication-27)
123
123
  - [Arguments](#arguments-27)
124
124
  - [Usage](#usage-28)
125
- - [tr-pull-pull-unstructured-discovery-files](#tr-pull-pull-unstructured-discovery-files)
125
+ - [tr-pull-consent-metrics](#tr-pull-consent-metrics)
126
126
  - [Authentication](#authentication-28)
127
127
  - [Arguments](#arguments-28)
128
128
  - [Usage](#usage-29)
129
- - [tr-upload-preferences](#tr-upload-preferences)
129
+ - [tr-pull-datapoints](#tr-pull-datapoints)
130
130
  - [Authentication](#authentication-29)
131
- - [Authentication](#authentication-30)
132
131
  - [Arguments](#arguments-29)
133
132
  - [Usage](#usage-30)
134
- - [tr-upload-consent-preferences](#tr-upload-consent-preferences)
135
- - [Authentication](#authentication-31)
133
+ - [tr-pull-pull-unstructured-discovery-files](#tr-pull-pull-unstructured-discovery-files)
134
+ - [Authentication](#authentication-30)
136
135
  - [Arguments](#arguments-30)
137
136
  - [Usage](#usage-31)
138
- - [tr-pull-consent-preferences](#tr-pull-consent-preferences)
137
+ - [tr-upload-preferences](#tr-upload-preferences)
138
+ - [Authentication](#authentication-31)
139
139
  - [Authentication](#authentication-32)
140
140
  - [Arguments](#arguments-31)
141
141
  - [Usage](#usage-32)
142
- - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
142
+ - [tr-upload-consent-preferences](#tr-upload-consent-preferences)
143
143
  - [Authentication](#authentication-33)
144
144
  - [Arguments](#arguments-32)
145
145
  - [Usage](#usage-33)
146
- - [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
146
+ - [tr-pull-consent-preferences](#tr-pull-consent-preferences)
147
147
  - [Authentication](#authentication-34)
148
148
  - [Arguments](#arguments-33)
149
149
  - [Usage](#usage-34)
150
- - [tr-generate-api-keys](#tr-generate-api-keys)
150
+ - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
151
151
  - [Authentication](#authentication-35)
152
152
  - [Arguments](#arguments-34)
153
153
  - [Usage](#usage-35)
154
- - [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
154
+ - [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
155
155
  - [Authentication](#authentication-36)
156
156
  - [Arguments](#arguments-35)
157
157
  - [Usage](#usage-36)
158
+ - [tr-generate-api-keys](#tr-generate-api-keys)
159
+ - [Authentication](#authentication-37)
160
+ - [Arguments](#arguments-36)
161
+ - [Usage](#usage-37)
162
+ - [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
163
+ - [Authentication](#authentication-38)
164
+ - [Arguments](#arguments-37)
165
+ - [Usage](#usage-38)
158
166
  - [Prompt Manager](#prompt-manager)
159
167
  - [Proxy usage](#proxy-usage)
160
168
 
@@ -1008,6 +1016,87 @@ Approve ERASURE requests created within a specific time frame
1008
1016
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
1009
1017
  ```
1010
1018
 
1019
+ ### tr-request-download-files
1020
+
1021
+ Download the files associated with a Data Subject Access Request (DSAR) from [DSR Automation -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
1022
+
1023
+ <img width="213" alt="Screenshot 2025-06-03 at 3 32 00 PM" src="https://github.com/user-attachments/assets/9e5c3047-5092-454e-9d05-c68509ea3f77" />
1024
+
1025
+ #### Authentication
1026
+
1027
+ 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).
1028
+
1029
+ The API key needs the following scopes:
1030
+
1031
+ - View the Request Compilation
1032
+ - View Incoming Requests
1033
+ - Request Approval and Communication
1034
+
1035
+ #### Arguments
1036
+
1037
+ | Argument | Description | Type | Default | Required |
1038
+ | -------------------- | -------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------ | -------- |
1039
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
1040
+ | sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
1041
+ | concurrency | The concurrency to use when downloading requests in parallel. | number | 10 | false |
1042
+ | requestIds | Specify the specific request IDs to download | string[] | [] | false |
1043
+ | statuses | The [request statuses](https://docs.transcend.io/docs/privacy-requests/overview#request-statuses) to download. | RequestStatus[] | APPROVING,DOWNLOADABLE | false |
1044
+ | folderPath | The folder to download files to | string | ./dsr-files | false |
1045
+ | createdAtBefore | Download requests that were submitted before this time | Date | N/A | false |
1046
+ | createdAtAfter | Download requests that were submitted after this time | Date | N/A | false |
1047
+ | approveAfterDownload | If the request is in status=APPROVING, approve the request after its downloaded | boolean | false | false |
1048
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
1049
+
1050
+ #### Usage
1051
+
1052
+ Download all requests in status=APPROVING or status=DOWNLOADABLE
1053
+
1054
+ ```sh
1055
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY
1056
+ ```
1057
+
1058
+ Specifying the backend URL, needed for US hosted backend infrastructure.
1059
+
1060
+ ```sh
1061
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --transcendUrl=https://api.us.transcend.io
1062
+ ```
1063
+
1064
+ Write files to a specific folder on disk
1065
+
1066
+ ```sh
1067
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --folderPath=./my-folder
1068
+ ```
1069
+
1070
+ Auto approve after download
1071
+
1072
+ ```sh
1073
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --approveAfterDownload=true
1074
+ ```
1075
+
1076
+ Download requests in APPROVING state only
1077
+
1078
+ ```sh
1079
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --statues=APPROVING
1080
+ ```
1081
+
1082
+ Increase the concurrency (defaults to 50)
1083
+
1084
+ ```sh
1085
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --concurrency=100
1086
+ ```
1087
+
1088
+ Approve requests in a timeframe
1089
+
1090
+ ```sh
1091
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --createdAtBefore=05/03/2023 --createdAtAfter=04/03/2023
1092
+ ```
1093
+
1094
+ Approve specific requests
1095
+
1096
+ ```sh
1097
+ yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --requestIds=b8c2ce13-9e40-4104-af79-23c68f2a87ba,d5eedc52-0f85-4034-bc01-14951acad5aa
1098
+ ```
1099
+
1011
1100
  ### tr-request-cancel
1012
1101
 
1013
1102
  Bulk cancel a set of privacy requests from the [DSR Automation -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab.
@@ -1995,6 +2084,39 @@ Set to status "RESOLVED" instead of status "SKIPPED"
1995
2084
  yarn tr-skip-request-data-silos --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --status=RESOLVED
1996
2085
  ```
1997
2086
 
2087
+ ### tr-skip-preflight-jobs
2088
+
2089
+ This command allows for bulk skipping preflight checks.
2090
+
2091
+ #### Authentication
2092
+
2093
+ 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).
2094
+
2095
+ The API key must have the following scopes:
2096
+
2097
+ - "Manage Request Compilation"
2098
+
2099
+ #### Arguments
2100
+
2101
+ | Argument | Description | Type | Default | Required |
2102
+ | ------------ | ----------------------------------------------------------------------------- | --------------- | ------------------------ | -------- |
2103
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
2104
+ | enricherIds | The ID of the enrichers to skip privacy request jobs for. | string[] - UUID | N/A | true |
2105
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
2106
+
2107
+ #### Usage
2108
+
2109
+ ```sh
2110
+ yarn tr-skip-preflight-jobs --auth=$TRANSCEND_API_KEY --enricherIds=70810f2e-cf90-43f6-9776-901a5950599f
2111
+ ```
2112
+
2113
+ Specifying the backend URL, needed for US hosted backend infrastructure.
2114
+
2115
+ ```sh
2116
+ yarn tr-skip-preflight-jobs --auth=$TRANSCEND_API_KEY --enricherIds=70810f2e-cf90-43f6-9776-901a5950599f,db1e64ba-cea6-43ff-ad27-5dc8122e5224 \
2117
+ --transcendUrl=https://api.us.transcend.io
2118
+ ```
2119
+
1998
2120
  ### tr-retry-request-data-silos
1999
2121
 
2000
2122
  This command allows for bulk restarting a set of data silos jobs for open privacy requests. This is equivalent to clicking the "Wipe and Retry" button for a particular data silo across a set of privacy requests.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-download-files.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-download-files.d.ts","sourceRoot":"","sources":["../src/cli-request-download-files.ts"],"names":[],"mappings":""}
@@ -0,0 +1,77 @@
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
+ * Download a set of data access requests to local machine.
15
+ *
16
+ * Requires scopes:
17
+ * - View Incoming Requests
18
+ * - View the Request Compilation
19
+ * - Request Approval and Communication (only if `approveAfterDownload` is true)
20
+ *
21
+ * Dev Usage:
22
+ * yarn ts-node ./src/cli-request-download-files.ts --auth=$TRANSCEND_API_KEY --statuses=APPROVING
23
+ *
24
+ * Standard usage:
25
+ * yarn tr-request-download-files --auth=$TRANSCEND_API_KEY --statuses=APPROVING
26
+ */
27
+ async function main() {
28
+ // Parse command line arguments
29
+ const {
30
+ /** Transcend Backend URL */
31
+ transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
32
+ /** API key */
33
+ auth,
34
+ /** Download these specific request statuses */
35
+ statuses = `${privacy_types_1.RequestStatus.Approving},${privacy_types_1.RequestStatus.Downloadable}`,
36
+ /** Folder path to download files to */
37
+ folderPath = './dsr-files',
38
+ /** Concurrency to download requests at */
39
+ concurrency = '10',
40
+ /** Filter for requests created before this date */
41
+ createdAtBefore,
42
+ /** Filter for requests created after this date */
43
+ createdAtAfter,
44
+ /** List of request IDs to download */
45
+ requestIds = '',
46
+ /** Approve the requests after download */
47
+ approveAfterDownload = 'false', } = (0, yargs_parser_1.default)(process.argv.slice(2));
48
+ // Ensure auth is passed
49
+ if (!auth) {
50
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
51
+ process.exit(1);
52
+ }
53
+ // Validate statuses
54
+ const parsedStatuses = (0, requests_1.splitCsvToList)(statuses);
55
+ const invalidStatues = parsedStatuses.filter(
56
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
+ (type) => !Object.values(privacy_types_1.RequestStatus).includes(type));
58
+ if (invalidStatues.length > 0) {
59
+ logger_1.logger.error(colors_1.default.red(`Failed to parse statuses:"${invalidStatues.join(',')}".\n` +
60
+ `Expected one of: \n${Object.values(privacy_types_1.RequestStatus).join('\n')}`));
61
+ process.exit(1);
62
+ }
63
+ // Download privacy request files
64
+ await (0, requests_1.downloadPrivacyRequestFiles)({
65
+ transcendUrl,
66
+ auth,
67
+ folderPath,
68
+ requestIds: requestIds ? (0, requests_1.splitCsvToList)(requestIds) : undefined,
69
+ statuses: parsedStatuses.length > 0 ? parsedStatuses : undefined,
70
+ concurrency: parseInt(concurrency, 10),
71
+ createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,
72
+ createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,
73
+ approveAfterDownload: approveAfterDownload === 'true',
74
+ });
75
+ }
76
+ main();
77
+ //# sourceMappingURL=cli-request-download-files.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-download-files.js","sourceRoot":"","sources":["../src/cli-request-download-files.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,+DAA4D;AAC5D,yCAAyE;AACzE,2CAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,+CAA+C;IAC/C,QAAQ,GAAG,GAAG,6BAAa,CAAC,SAAS,IAAI,6BAAa,CAAC,YAAY,EAAE;IACrE,uCAAuC;IACvC,UAAU,GAAG,aAAa;IAC1B,0CAA0C;IAC1C,WAAW,GAAG,IAAI;IAClB,mDAAmD;IACnD,eAAe;IACf,kDAAkD;IAClD,cAAc;IACd,sCAAsC;IACtC,UAAU,GAAG,EAAE;IACf,0CAA0C;IAC1C,oBAAoB,GAAG,OAAO,GAC/B,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,oBAAoB;IACpB,MAAM,cAAc,GAAG,IAAA,yBAAc,EAAC,QAAQ,CAAoB,CAAC;IACnE,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM;IAC1C,8DAA8D;IAC9D,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,QAAQ,CAAC,IAAW,CAAC,CAC9D,CAAC;IACF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC7B,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,6BAA6B,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM;YACzD,sBAAsB,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,iCAAiC;IACjC,MAAM,IAAA,sCAA2B,EAAC;QAChC,YAAY;QACZ,IAAI;QACJ,UAAU;QACV,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;QACrE,oBAAoB,EAAE,oBAAoB,KAAK,MAAM;KACtD,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-skip-preflight-jobs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-skip-preflight-jobs.d.ts","sourceRoot":"","sources":["../src/cli-skip-preflight-jobs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,53 @@
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 requests_1 = require("./requests");
11
+ const constants_1 = require("./constants");
12
+ /**
13
+ * Given an enricher ID, skip all active enrichment jobs that are open for that enricher
14
+ *
15
+ * Requires an API key with scope:
16
+ * - "Manage Request Compilation"
17
+ *
18
+ * Dev Usage:
19
+ * yarn ts-node ./src/cli-skip-preflight-jobs.ts --auth=$TRANSCEND_API_KEY \
20
+ * --enricherIds=92636cda-b7c6-48c6-b1b1-2df574596cbc
21
+ *
22
+ * Standard usage:
23
+ * yarn tr-skip-request-data-silos --auth=$TRANSCEND_API_KEY \
24
+ * --enricherIds=92636cda-b7c6-48c6-b1b1-2df574596cbc
25
+ */
26
+ async function main() {
27
+ // Parse command line arguments
28
+ const {
29
+ /** Transcend Backend URL */
30
+ transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
31
+ /** API key */
32
+ auth,
33
+ /** Enricher ID to mark requests fpr */
34
+ enricherIds, } = (0, yargs_parser_1.default)(process.argv.slice(2));
35
+ // Ensure auth is passed
36
+ if (!auth) {
37
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
38
+ process.exit(1);
39
+ }
40
+ // Ensure enricherIds is provided
41
+ if (!enricherIds) {
42
+ logger_1.logger.error(colors_1.default.red('An enricher ID must be provided. You can specify using --enricherIds=2560bb81-b837-4c6f-a57e-dcef87069d43'));
43
+ process.exit(1);
44
+ }
45
+ // Upload privacy requests
46
+ await (0, requests_1.skipPreflightJobs)({
47
+ transcendUrl,
48
+ auth,
49
+ enricherIds: (0, requests_1.splitCsvToList)(enricherIds),
50
+ });
51
+ }
52
+ main();
53
+ //# sourceMappingURL=cli-skip-preflight-jobs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-skip-preflight-jobs.js","sourceRoot":"","sources":["../src/cli-skip-preflight-jobs.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,yCAA+D;AAC/D,2CAAoD;AAEpD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,4BAA4B;IAC5B,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,uCAAuC;IACvC,WAAW,GACZ,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,iCAAiC;IACjC,IAAI,CAAC,WAAW,EAAE;QAChB,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,2GAA2G,CAC5G,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,0BAA0B;IAC1B,MAAM,IAAA,4BAAiB,EAAC;QACtB,YAAY;QACZ,IAAI;QACJ,WAAW,EAAE,IAAA,yBAAc,EAAC,WAAW,CAAC;KACzC,CAAC,CAAC;AACL,CAAC;AACD,IAAI,EAAE,CAAC"}
package/build/codecs.d.ts CHANGED
@@ -148,6 +148,7 @@ export declare const TeamInput: t.IntersectionC<[t.TypeC<{
148
148
  manageIntlMessages: unknown;
149
149
  viewIntlMessages: unknown;
150
150
  llmLogTransfer: unknown;
151
+ manageWorkflows: unknown;
151
152
  }>>;
152
153
  }>]>;
153
154
  /** Type override */
@@ -47374,6 +47375,7 @@ export declare const AssessmentSectionQuestionInput: t.IntersectionC<[t.TypeC<{
47374
47375
  WEBSITE_URL: unknown;
47375
47376
  TRANSFER_REGIONS: unknown;
47376
47377
  CONTROLLERSHIPS: unknown;
47378
+ CUSTOM_SILO_CONNECTION_STRATEGY: unknown;
47377
47379
  NAME: unknown;
47378
47380
  DATA_POINT_ID: unknown;
47379
47381
  ENCRYPTED_SAMPLES_S3_KEY: unknown;
@@ -47589,6 +47591,7 @@ export declare const AssessmentSectionInput: t.IntersectionC<[t.TypeC<{
47589
47591
  WEBSITE_URL: unknown;
47590
47592
  TRANSFER_REGIONS: unknown;
47591
47593
  CONTROLLERSHIPS: unknown;
47594
+ CUSTOM_SILO_CONNECTION_STRATEGY: unknown;
47592
47595
  NAME: unknown;
47593
47596
  DATA_POINT_ID: unknown;
47594
47597
  ENCRYPTED_SAMPLES_S3_KEY: unknown;
@@ -47836,6 +47839,7 @@ export declare const AssessmentTemplateInput: t.IntersectionC<[t.TypeC<{
47836
47839
  WEBSITE_URL: unknown;
47837
47840
  TRANSFER_REGIONS: unknown;
47838
47841
  CONTROLLERSHIPS: unknown;
47842
+ CUSTOM_SILO_CONNECTION_STRATEGY: unknown;
47839
47843
  NAME: unknown;
47840
47844
  DATA_POINT_ID: unknown;
47841
47845
  ENCRYPTED_SAMPLES_S3_KEY: unknown;
@@ -48148,6 +48152,7 @@ export declare const AssessmentInput: t.IntersectionC<[t.TypeC<{
48148
48152
  WEBSITE_URL: unknown;
48149
48153
  TRANSFER_REGIONS: unknown;
48150
48154
  CONTROLLERSHIPS: unknown;
48155
+ CUSTOM_SILO_CONNECTION_STRATEGY: unknown;
48151
48156
  NAME: unknown;
48152
48157
  DATA_POINT_ID: unknown;
48153
48158
  ENCRYPTED_SAMPLES_S3_KEY: unknown;
@@ -48567,6 +48572,7 @@ export declare const TranscendInput: t.PartialC<{
48567
48572
  manageIntlMessages: unknown;
48568
48573
  viewIntlMessages: unknown;
48569
48574
  llmLogTransfer: unknown;
48575
+ manageWorkflows: unknown;
48570
48576
  }>>;
48571
48577
  }>]>>;
48572
48578
  /**
@@ -88711,6 +88717,7 @@ export declare const TranscendInput: t.PartialC<{
88711
88717
  WEBSITE_URL: unknown;
88712
88718
  TRANSFER_REGIONS: unknown;
88713
88719
  CONTROLLERSHIPS: unknown;
88720
+ CUSTOM_SILO_CONNECTION_STRATEGY: unknown;
88714
88721
  NAME: unknown;
88715
88722
  DATA_POINT_ID: unknown;
88716
88723
  ENCRYPTED_SAMPLES_S3_KEY: unknown;
@@ -88988,6 +88995,7 @@ export declare const TranscendInput: t.PartialC<{
88988
88995
  WEBSITE_URL: unknown;
88989
88996
  TRANSFER_REGIONS: unknown;
88990
88997
  CONTROLLERSHIPS: unknown;
88998
+ CUSTOM_SILO_CONNECTION_STRATEGY: unknown;
88991
88999
  NAME: unknown;
88992
89000
  DATA_POINT_ID: unknown;
88993
89001
  ENCRYPTED_SAMPLES_S3_KEY: unknown;