@transcend-io/cli 4.83.0 → 4.85.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 CHANGED
@@ -29,86 +29,90 @@
29
29
  - [Authentication](#authentication-4)
30
30
  - [Arguments](#arguments-4)
31
31
  - [Usage](#usage-5)
32
- - [tr-request-upload](#tr-request-upload)
32
+ - [tr-request-mark-silent](#tr-request-mark-silent)
33
33
  - [Authentication](#authentication-5)
34
34
  - [Arguments](#arguments-5)
35
35
  - [Usage](#usage-6)
36
- - [tr-request-restart](#tr-request-restart)
36
+ - [tr-request-upload](#tr-request-upload)
37
37
  - [Authentication](#authentication-6)
38
38
  - [Arguments](#arguments-6)
39
39
  - [Usage](#usage-7)
40
- - [tr-request-export](#tr-request-export)
40
+ - [tr-request-restart](#tr-request-restart)
41
41
  - [Authentication](#authentication-7)
42
42
  - [Arguments](#arguments-7)
43
43
  - [Usage](#usage-8)
44
- - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
44
+ - [tr-request-export](#tr-request-export)
45
45
  - [Authentication](#authentication-8)
46
46
  - [Arguments](#arguments-8)
47
47
  - [Usage](#usage-9)
48
- - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
48
+ - [tr-cron-pull-identifiers](#tr-cron-pull-identifiers)
49
49
  - [Authentication](#authentication-9)
50
50
  - [Arguments](#arguments-9)
51
51
  - [Usage](#usage-10)
52
- - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
52
+ - [tr-cron-mark-identifiers-completed](#tr-cron-mark-identifiers-completed)
53
53
  - [Authentication](#authentication-10)
54
54
  - [Arguments](#arguments-10)
55
55
  - [Usage](#usage-11)
56
- - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
56
+ - [tr-manual-enrichment-pull-identifiers](#tr-manual-enrichment-pull-identifiers)
57
57
  - [Authentication](#authentication-11)
58
58
  - [Arguments](#arguments-11)
59
59
  - [Usage](#usage-12)
60
- - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
60
+ - [tr-manual-enrichment-push-identifiers](#tr-manual-enrichment-push-identifiers)
61
61
  - [Authentication](#authentication-12)
62
62
  - [Arguments](#arguments-12)
63
63
  - [Usage](#usage-13)
64
- - [tr-skip-request-data-silos](#tr-skip-request-data-silos)
64
+ - [tr-mark-request-data-silos-completed](#tr-mark-request-data-silos-completed)
65
65
  - [Authentication](#authentication-13)
66
66
  - [Arguments](#arguments-13)
67
67
  - [Usage](#usage-14)
68
- - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
68
+ - [tr-skip-request-data-silos](#tr-skip-request-data-silos)
69
69
  - [Authentication](#authentication-14)
70
70
  - [Arguments](#arguments-14)
71
71
  - [Usage](#usage-15)
72
- - [tr-update-consent-manager](#tr-update-consent-manager)
72
+ - [tr-retry-request-data-silos](#tr-retry-request-data-silos)
73
73
  - [Authentication](#authentication-15)
74
74
  - [Arguments](#arguments-15)
75
75
  - [Usage](#usage-16)
76
- - [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
76
+ - [tr-update-consent-manager](#tr-update-consent-manager)
77
77
  - [Authentication](#authentication-16)
78
78
  - [Arguments](#arguments-16)
79
79
  - [Usage](#usage-17)
80
- - [tr-consent-manager-service-json-to-yml](#tr-consent-manager-service-json-to-yml)
80
+ - [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
81
81
  - [Authentication](#authentication-17)
82
82
  - [Arguments](#arguments-17)
83
83
  - [Usage](#usage-18)
84
- - [tr-derive-data-silos-from-data-flows](#tr-derive-data-silos-from-data-flows)
84
+ - [tr-consent-manager-service-json-to-yml](#tr-consent-manager-service-json-to-yml)
85
85
  - [Authentication](#authentication-18)
86
86
  - [Arguments](#arguments-18)
87
87
  - [Usage](#usage-19)
88
- - [tr-derive-data-silos-from-data-flows-cross-instance](#tr-derive-data-silos-from-data-flows-cross-instance)
88
+ - [tr-derive-data-silos-from-data-flows](#tr-derive-data-silos-from-data-flows)
89
89
  - [Authentication](#authentication-19)
90
90
  - [Arguments](#arguments-19)
91
91
  - [Usage](#usage-20)
92
- - [tr-pull-consent-metrics](#tr-pull-consent-metrics)
92
+ - [tr-derive-data-silos-from-data-flows-cross-instance](#tr-derive-data-silos-from-data-flows-cross-instance)
93
93
  - [Authentication](#authentication-20)
94
94
  - [Arguments](#arguments-20)
95
95
  - [Usage](#usage-21)
96
- - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
96
+ - [tr-pull-consent-metrics](#tr-pull-consent-metrics)
97
97
  - [Authentication](#authentication-21)
98
98
  - [Arguments](#arguments-21)
99
99
  - [Usage](#usage-22)
100
- - [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
100
+ - [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
101
101
  - [Authentication](#authentication-22)
102
102
  - [Arguments](#arguments-22)
103
103
  - [Usage](#usage-23)
104
- - [tr-generate-api-keys](#tr-generate-api-keys)
104
+ - [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
105
105
  - [Authentication](#authentication-23)
106
106
  - [Arguments](#arguments-23)
107
107
  - [Usage](#usage-24)
108
- - [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
108
+ - [tr-generate-api-keys](#tr-generate-api-keys)
109
109
  - [Authentication](#authentication-24)
110
110
  - [Arguments](#arguments-24)
111
111
  - [Usage](#usage-25)
112
+ - [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
113
+ - [Authentication](#authentication-25)
114
+ - [Arguments](#arguments-25)
115
+ - [Usage](#usage-26)
112
116
  - [Proxy usage](#proxy-usage)
113
117
 
114
118
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -133,6 +137,7 @@ yarn tr-push --auth=$TRANSCEND_API_KEY
133
137
  yarn tr-discover-silos --auth=$TRANSCEND_API_KEY
134
138
  yarn tr-request-approve --auth=$TRANSCEND_API_KEY
135
139
  yarn tr-request-cancel --auth=$TRANSCEND_API_KEY
140
+ yarn tr-mark-silent --auth=$TRANSCEND_API_KEY
136
141
  yarn tr-request-upload --auth=$TRANSCEND_API_KEY
137
142
  yarn tr-request-export --auth=$TRANSCEND_API_KEY
138
143
  yarn tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -166,6 +171,7 @@ tr-push --auth=$TRANSCEND_API_KEY
166
171
  tr-discover-silos --auth=$TRANSCEND_API_KEY
167
172
  tr-request-approve --auth=$TRANSCEND_API_KEY
168
173
  tr-request-cancel --auth=$TRANSCEND_API_KEY
174
+ tr-request-mark-silent --auth=$TRANSCEND_API_KEY
169
175
  tr-request-upload --auth=$TRANSCEND_API_KEY
170
176
  tr-request-export --auth=$TRANSCEND_API_KEY
171
177
  tr-request-restart --auth=$TRANSCEND_API_KEY
@@ -778,6 +784,70 @@ Increase the concurrency (defaults to 100)
778
784
  yarn tr-request-cancel --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
779
785
  ```
780
786
 
787
+ ### tr-request-mark-silent
788
+
789
+ Bulk update a set of privacy requests from the [Privacy Requests -> Incoming Requests](https://app.transcend.io/privacy-requests/incoming-requests) tab to be in silent mode.
790
+
791
+ #### Authentication
792
+
793
+ 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).
794
+
795
+ The API key needs the following scopes:
796
+
797
+ - Manage Request Compilation
798
+
799
+ #### Arguments
800
+
801
+ | Argument | Description | Type | Default | Required |
802
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------------------------------------------------------------------------------------- | -------- |
803
+ | auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
804
+ | 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 |
805
+ | 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 |
806
+ | requestIds | Specify the specific request IDs to mark silent | string[] | [] | false |
807
+
808
+ | silentModeBefore | Any requests made before this date should be marked as silent mode | Date | N/A | false |
809
+ | transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
810
+ | concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
811
+
812
+ #### Usage
813
+
814
+ Bulk mark silent all open SALE_OPT_OUT and ERASURE requests.
815
+
816
+ ```sh
817
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT,ERASURE
818
+ ```
819
+
820
+ Specifying the backend URL, needed for US hosted backend infrastructure.
821
+
822
+ ```sh
823
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ERASURE --transcendUrl=https://api.us.transcend.io
824
+ ```
825
+
826
+ Bulk mark as silent all Erasure (request.type=ERASURE) requests that are in an enriching state (request.status=ENRICHING)
827
+
828
+ ```sh
829
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ERASURE --statuses=ENRICHING
830
+ ```
831
+
832
+ Bulk mark as silent requests by ID
833
+
834
+ ```sh
835
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ACCESS,ERASURE,SALE_OPT_OUT,CONTACT_OPT_OUT --statuses=ENRICHING,COMPILING,APPROVING,WAITING,REQUEST_MADE,ON_HOLD,DELAYED,SECONDARY \
836
+ --requestIds=c3ae78c9-2768-4666-991a-d2f729503337,342e4bd1-64ea-4af0-a4ad-704b5a07cfe4
837
+ ```
838
+
839
+ Mark sale opt out requests as silent if those requests were made before a certain date
840
+
841
+ ```sh
842
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=SALE_OPT_OUT --silentModeBefore=05/03/2023
843
+ ```
844
+
845
+ Increase the concurrency (defaults to 100)
846
+
847
+ ```sh
848
+ yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY --actions=ERASURE --concurrency=500
849
+ ```
850
+
781
851
  ### tr-request-upload
782
852
 
783
853
  If you need to upload a set of requests from a CSV, you can run this command.
@@ -20,11 +20,11 @@ const constants_1 = require("./constants");
20
20
  *
21
21
  * Dev Usage:
22
22
  * yarn ts-node ./src/cli-request-approve.ts --auth=$TRANSCEND_API_KEY \
23
- * --requestType=ERASURE --silentModeBefore=06/23/2023
23
+ * --actions=ERASURE --silentModeBefore=06/23/2023
24
24
  *
25
25
  * Standard usage:
26
26
  * yarn tr-request-approve --auth=$TRANSCEND_API_KEY \
27
- * --requestType=ERASURE --silentModeBefore=06/23/2023
27
+ * --actions=ERASURE --silentModeBefore=06/23/2023
28
28
  */
29
29
  async function main() {
30
30
  // Parse command line arguments
@@ -18,11 +18,11 @@ const constants_1 = require("./constants");
18
18
  *
19
19
  * Dev Usage:
20
20
  * yarn ts-node ./src/cli-request-cancel.ts --auth=$TRANSCEND_API_KEY \
21
- * --requestType=ERASURE --silentModeBefore=06/23/2023
21
+ * --actions=ERASURE --silentModeBefore=06/23/2023
22
22
  *
23
23
  * Standard usage:
24
24
  * yarn tr-request-cancel --auth=$TRANSCEND_API_KEY \
25
- * --requestType=ERASURE --silentModeBefore=06/23/2023
25
+ * --actions=ERASURE --silentModeBefore=06/23/2023
26
26
  */
27
27
  async function main() {
28
28
  // Parse command line arguments
@@ -19,12 +19,12 @@ const constants_1 = require("./constants");
19
19
  *
20
20
  * Dev Usage:
21
21
  * yarn ts-node ./src/cli-request-export.ts --auth=$TRANSCEND_API_KEY \
22
- * --requestType=ERASURE \
22
+ * --actions=ERASURE \
23
23
  * --file=/Users/michaelfarrell/Desktop/test.csv
24
24
  *
25
25
  * Standard usage:
26
26
  * yarn tr-request-export --auth=$TRANSCEND_API_KEY \
27
- * --requestType=ERASURE \
27
+ * --actions=ERASURE \
28
28
  * --file=/Users/michaelfarrell/Desktop/test.csv
29
29
  */
30
30
  async function main() {
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-mark-silent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-mark-silent.d.ts","sourceRoot":"","sources":["../src/cli-request-mark-silent.ts"],"names":[],"mappings":""}
@@ -0,0 +1,69 @@
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
+ * Bulk update requests to be in silent mode
15
+ *
16
+ * Requires scopes:
17
+ * - Manage Request Compilation
18
+ *
19
+ * Dev Usage:
20
+ * yarn ts-node ./src/cli-request-mark-silent.ts --auth=$TRANSCEND_API_KEY \
21
+ * --actions=ERASURE --silentModeBefore=06/23/2023
22
+ *
23
+ * Standard usage:
24
+ * yarn tr-request-mark-silent --auth=$TRANSCEND_API_KEY \
25
+ * --actions=ERASURE --silentModeBefore=06/23/2023
26
+ */
27
+ async function main() {
28
+ // Parse command line arguments
29
+ const { transcendUrl = constants_1.DEFAULT_TRANSCEND_API, auth, actions = '', statuses = '', silentModeBefore, concurrency = '100',
30
+ /** List of request IDs */
31
+ requestIds = '', } = (0, yargs_parser_1.default)(process.argv.slice(2));
32
+ // Ensure auth is passed
33
+ if (!auth) {
34
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
35
+ process.exit(1);
36
+ }
37
+ // Validate actions
38
+ const parsedActions = (0, requests_1.splitCsvToList)(actions);
39
+ const invalidActions = parsedActions.filter(
40
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
+ (type) => !Object.values(privacy_types_1.RequestAction).includes(type));
42
+ if (invalidActions.length > 0) {
43
+ logger_1.logger.error(colors_1.default.red(`Failed to parse actions:"${invalidActions.join(',')}".\n` +
44
+ `Expected one of: \n${Object.values(privacy_types_1.RequestAction).join('\n')}`));
45
+ process.exit(1);
46
+ }
47
+ // Validate statuses
48
+ const parsedStatuses = (0, requests_1.splitCsvToList)(statuses);
49
+ const invalidStatues = parsedStatuses.filter(
50
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
51
+ (type) => !Object.values(privacy_types_1.RequestStatus).includes(type));
52
+ if (invalidStatues.length > 0) {
53
+ logger_1.logger.error(colors_1.default.red(`Failed to parse statuses:"${invalidStatues.join(',')}".\n` +
54
+ `Expected one of: \n${Object.values(privacy_types_1.RequestStatus).join('\n')}`));
55
+ process.exit(1);
56
+ }
57
+ // Pull privacy requests
58
+ await (0, requests_1.markSilentPrivacyRequests)({
59
+ transcendUrl,
60
+ requestActions: parsedActions,
61
+ auth,
62
+ requestIds: requestIds ? (0, requests_1.splitCsvToList)(requestIds) : undefined,
63
+ statuses: parsedStatuses.length > 0 ? parsedStatuses : undefined,
64
+ concurrency: parseInt(concurrency, 10),
65
+ silentModeBefore: silentModeBefore ? new Date(silentModeBefore) : undefined,
66
+ });
67
+ }
68
+ main();
69
+ //# sourceMappingURL=cli-request-mark-silent.js.map
@@ -0,0 +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,EACJ,YAAY,GAAG,iCAAqB,EACpC,IAAI,EACJ,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,EAAE,EACb,gBAAgB,EAChB,WAA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,CAAC,GAAG,CACR,6BAA6B,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM;YACzD,sBAAsB,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,wBAAwB;IACxB,MAAM,IAAA,oCAAyB,EAAC;QAC9B,YAAY;QACZ,cAAc,EAAE,aAAa;QAC7B,IAAI;QACJ,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,IAAA,yBAAc,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QAC/D,QAAQ,EAAE,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS;QAChE,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,SAAS;KAC5E,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
package/build/codecs.d.ts CHANGED
@@ -63474,7 +63474,8 @@ export type AIIntegrationC<T extends t.Mixed> = t.TypeC<{
63474
63474
  /** The codec of OpenAI routeName */
63475
63475
  export type OpenAIRouteNameC = t.UnionC<[
63476
63476
  t.LiteralC<'/v1/chat/completions'>,
63477
- t.LiteralC<'/v1/embeddings'>
63477
+ t.LiteralC<'/v1/embeddings'>,
63478
+ t.LiteralC<'/v1/completions'>
63478
63479
  ]>;
63479
63480
  /**
63480
63481
  * The names of the OpenAI routes that we support setting policies for