@transcend-io/cli 4.72.0 → 4.74.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 +99 -4
- package/build/cli-consent-managers-to-business-entities.d.ts +3 -0
- package/build/cli-consent-managers-to-business-entities.d.ts.map +1 -0
- package/build/cli-consent-managers-to-business-entities.js +56 -0
- package/build/cli-consent-managers-to-business-entities.js.map +1 -0
- package/build/cli-upload-cookies-from-csv.d.ts +3 -0
- package/build/cli-upload-cookies-from-csv.d.ts.map +1 -0
- package/build/cli-upload-cookies-from-csv.js +59 -0
- package/build/cli-upload-cookies-from-csv.js.map +1 -0
- package/build/codecs.d.ts +22 -0
- package/build/codecs.d.ts.map +1 -1
- package/build/codecs.js +23 -1
- package/build/codecs.js.map +1 -1
- package/build/consent-manager/buildXdiSyncEndpoint.d.ts.map +1 -1
- package/build/consent-manager/buildXdiSyncEndpoint.js +2 -8
- package/build/consent-manager/buildXdiSyncEndpoint.js.map +1 -1
- package/build/consent-manager/consentManagersToBusinessEntities.d.ts +14 -0
- package/build/consent-manager/consentManagersToBusinessEntities.d.ts.map +1 -0
- package/build/consent-manager/consentManagersToBusinessEntities.js +67 -0
- package/build/consent-manager/consentManagersToBusinessEntities.js.map +1 -0
- package/build/consent-manager/domainToHost.d.ts +8 -0
- package/build/consent-manager/domainToHost.d.ts.map +1 -0
- package/build/consent-manager/domainToHost.js +12 -0
- package/build/consent-manager/domainToHost.js.map +1 -0
- package/build/consent-manager/index.d.ts +3 -0
- package/build/consent-manager/index.d.ts.map +1 -1
- package/build/consent-manager/index.js +3 -0
- package/build/consent-manager/index.js.map +1 -1
- package/build/consent-manager/uploadCookiesFromCsv.d.ts +17 -0
- package/build/consent-manager/uploadCookiesFromCsv.d.ts.map +1 -0
- package/build/consent-manager/uploadCookiesFromCsv.js +70 -0
- package/build/consent-manager/uploadCookiesFromCsv.js.map +1 -0
- package/build/tsbuildinfo +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -73,22 +73,30 @@
|
|
|
73
73
|
- [Authentication](#authentication-15)
|
|
74
74
|
- [Arguments](#arguments-15)
|
|
75
75
|
- [Usage](#usage-16)
|
|
76
|
-
- [tr-
|
|
76
|
+
- [tr-consent-managers-to-business-entities](#tr-consent-managers-to-business-entities)
|
|
77
77
|
- [Authentication](#authentication-16)
|
|
78
78
|
- [Arguments](#arguments-16)
|
|
79
79
|
- [Usage](#usage-17)
|
|
80
|
-
- [tr-
|
|
80
|
+
- [tr-pull-consent-metrics](#tr-pull-consent-metrics)
|
|
81
81
|
- [Authentication](#authentication-17)
|
|
82
82
|
- [Arguments](#arguments-17)
|
|
83
83
|
- [Usage](#usage-18)
|
|
84
|
-
- [tr-
|
|
84
|
+
- [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
|
|
85
85
|
- [Authentication](#authentication-18)
|
|
86
86
|
- [Arguments](#arguments-18)
|
|
87
87
|
- [Usage](#usage-19)
|
|
88
|
-
- [tr-
|
|
88
|
+
- [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
|
|
89
89
|
- [Authentication](#authentication-19)
|
|
90
90
|
- [Arguments](#arguments-19)
|
|
91
91
|
- [Usage](#usage-20)
|
|
92
|
+
- [tr-generate-api-keys](#tr-generate-api-keys)
|
|
93
|
+
- [Authentication](#authentication-20)
|
|
94
|
+
- [Arguments](#arguments-20)
|
|
95
|
+
- [Usage](#usage-21)
|
|
96
|
+
- [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
|
|
97
|
+
- [Authentication](#authentication-21)
|
|
98
|
+
- [Arguments](#arguments-21)
|
|
99
|
+
- [Usage](#usage-22)
|
|
92
100
|
- [Proxy usage](#proxy-usage)
|
|
93
101
|
|
|
94
102
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
@@ -123,8 +131,10 @@ yarn tr-mark-request-data-silos-completed --auth=$TRANSCEND_API_KEY
|
|
|
123
131
|
yarn tr-skip-request-data-silos --auth=$TRANSCEND_API_KEY
|
|
124
132
|
yarn tr-retry-request-data-silos --auth=$TRANSCEND_API_KEY
|
|
125
133
|
yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY
|
|
134
|
+
yarn tr-consent-managers-to-business-entities --auth=$TRANSCEND_API_KEY
|
|
126
135
|
yarn tr-pull-consent-metrics --auth=$TRANSCEND_API_KEY
|
|
127
136
|
yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY
|
|
137
|
+
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY
|
|
128
138
|
yarn tr-generate-api-keys --auth=$TRANSCEND_API_KEY
|
|
129
139
|
yarn tr-build-xdi-sync-endpoint --auth=$TRANSCEND_API_KEY
|
|
130
140
|
```
|
|
@@ -152,6 +162,7 @@ tr-skip-request-data-silos --auth=$TRANSCEND_API_KEY
|
|
|
152
162
|
tr-retry-request-data-silos --auth=$TRANSCEND_API_KEY
|
|
153
163
|
tr-update-consent-manager --auth=$TRANSCEND_API_KEY
|
|
154
164
|
tr-pull-consent-metrics --auth=$TRANSCEND_API_KEY
|
|
165
|
+
tr-consent-managers-to-business-entities --auth=$TRANSCEND_API_KEY
|
|
155
166
|
tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY
|
|
156
167
|
tr-generate-api-keys --auth=$TRANSCEND_API_KEY
|
|
157
168
|
tr-build-xdi-sync-endpoint --auth=$TRANSCEND_API_KEY
|
|
@@ -1457,6 +1468,35 @@ tr-generate-api-keys --email=test@transcend.io --password=$TRANSCEND_PASSWORD -
|
|
|
1457
1468
|
yarn tr-update-consent-manager --auth=./transcend-api-keys.json --deploy=true
|
|
1458
1469
|
```
|
|
1459
1470
|
|
|
1471
|
+
### tr-consent-managers-to-business-entities
|
|
1472
|
+
|
|
1473
|
+
This command allows for converting a folder or Consent Manager `transcend.yml` files into a single `transcend.yml` file where each consent manager configuration is a Business Entity in the data inventory.
|
|
1474
|
+
|
|
1475
|
+
#### Authentication
|
|
1476
|
+
|
|
1477
|
+
No authentication is required to run this command. It reads and writes files from local disk.
|
|
1478
|
+
|
|
1479
|
+
#### Arguments
|
|
1480
|
+
|
|
1481
|
+
| Argument | Description | Type | Default | Required |
|
|
1482
|
+
| ----------------------- | ---------------------------------------------------------------------- | -------------------- | -------------------------------- | -------- |
|
|
1483
|
+
| consentManagerYmlFolder | Path to the folder of Consent Manager `transcend.yml` files to combine | string - folder-path | N/A | true |
|
|
1484
|
+
| output | Path to the output `transcend.yml` with business entity configuration | string - file-path | ./combined-business-entities.yml | false |
|
|
1485
|
+
|
|
1486
|
+
#### Usage
|
|
1487
|
+
|
|
1488
|
+
Combine files in folder `./working/consent-managers/` to file `./combined-business-entities.yml`
|
|
1489
|
+
|
|
1490
|
+
```sh
|
|
1491
|
+
yarn tr-consent-managers-to-business-entities --consentManagerYmlFolder=./working/consent-managers/
|
|
1492
|
+
```
|
|
1493
|
+
|
|
1494
|
+
Specify custom output file
|
|
1495
|
+
|
|
1496
|
+
```sh
|
|
1497
|
+
yarn tr-consent-managers-to-business-entities --consentManagerYmlFolder=./working/consent-managers/ --output=./custom.yml
|
|
1498
|
+
```
|
|
1499
|
+
|
|
1460
1500
|
### tr-pull-consent-metrics
|
|
1461
1501
|
|
|
1462
1502
|
This command allows for pulling consent manager metrics for a Transcend account, or a set of Transcend accounts.
|
|
@@ -1574,6 +1614,61 @@ Specifying the backend URL, needed for US hosted backend infrastructure.
|
|
|
1574
1614
|
yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --transcendUrl=https://api.us.transcend.io
|
|
1575
1615
|
```
|
|
1576
1616
|
|
|
1617
|
+
### tr-upload-cookies-from-csv
|
|
1618
|
+
|
|
1619
|
+
This command allows for uploading cookies from CSV
|
|
1620
|
+
|
|
1621
|
+
Step 1) Download the CSV of cookies that you want to edit from the Admin Dashboard under [Consent Manager -> Cookies](https://app.transcend.io/consent-manager/cookies). You can download cookies from both the "Triage" and "Approved" tabs.
|
|
1622
|
+
|
|
1623
|
+
Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
|
|
1624
|
+
|
|
1625
|
+
Step 3) Upload the modified CSV file back into the dashboard with the command `yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY --file=./approved-flows.csv --trackerStatus=LIVE`
|
|
1626
|
+
|
|
1627
|
+
#### Authentication
|
|
1628
|
+
|
|
1629
|
+
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).
|
|
1630
|
+
|
|
1631
|
+
The API key must have the following scopes:
|
|
1632
|
+
|
|
1633
|
+
- "Manage Cookies"
|
|
1634
|
+
|
|
1635
|
+
#### Arguments
|
|
1636
|
+
|
|
1637
|
+
| Argument | Description | Type | Default | Required |
|
|
1638
|
+
| ------------- | ------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------ | -------- |
|
|
1639
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
1640
|
+
| trackerStatus | Whether or not to upload the cookies into the "Approved" tab (LIVE) or the "Triage" tab (NEEDS_REVIEW). | ConsentTrackerStatus | N/A | true |
|
|
1641
|
+
| file | Path to the CSV file to upload | string - file-path | ./cookies.csv | false |
|
|
1642
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
1643
|
+
|
|
1644
|
+
Note: You `trackerStatus` can be specified on a per cookie basis by adding a column named "Status" to the CSV. The values should be of type `ConsentTrackerStatus` - which is `LIVE` or `NEEDS_REVIEW`.
|
|
1645
|
+
|
|
1646
|
+
#### Usage
|
|
1647
|
+
|
|
1648
|
+
Upload the file of cookies in `./cookies.csv` into the ["Approved" tab](https://app.transcend.io/consent-manager/cookies/approved).
|
|
1649
|
+
|
|
1650
|
+
```sh
|
|
1651
|
+
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY --trackerStatus=LIVE
|
|
1652
|
+
```
|
|
1653
|
+
|
|
1654
|
+
Upload the file of cookies in `./cookies.csv` into the ["Triage" tab](https://app.transcend.io/consent-manager/cookies).
|
|
1655
|
+
|
|
1656
|
+
```sh
|
|
1657
|
+
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY --trackerStatus=NEEDS_REVIEW
|
|
1658
|
+
```
|
|
1659
|
+
|
|
1660
|
+
Specifying the CSV file to read from:
|
|
1661
|
+
|
|
1662
|
+
```sh
|
|
1663
|
+
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY --trackerStatus=LIVE --file=./custom/my-cookies.csv
|
|
1664
|
+
```
|
|
1665
|
+
|
|
1666
|
+
Specifying the backend URL, needed for US hosted backend infrastructure.
|
|
1667
|
+
|
|
1668
|
+
```sh
|
|
1669
|
+
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY --transcendUrl=https://api.us.transcend.io
|
|
1670
|
+
```
|
|
1671
|
+
|
|
1577
1672
|
### tr-generate-api-keys
|
|
1578
1673
|
|
|
1579
1674
|
This command allows for creating API keys across multiple Transcend instances. This is useful for customers that are managing many Transcend instances and need to regularly create, cycle or delete API keys across all of their instances. Unlike the other commands that rely on API key authentication, this command relies upon username/password authentication. This command will spit out the API keys into a [JSON file](./examples/api-keys.json), and that JSON file can be used in subsequent cli commands.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-consent-managers-to-business-entities.d.ts","sourceRoot":"","sources":["../src/cli-consent-managers-to-business-entities.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 api_keys_1 = require("./api-keys");
|
|
8
|
+
const consent_manager_1 = require("./consent-manager");
|
|
9
|
+
const readTranscendYaml_1 = require("./readTranscendYaml");
|
|
10
|
+
const path_1 = require("path");
|
|
11
|
+
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
12
|
+
const colors_1 = __importDefault(require("colors"));
|
|
13
|
+
const logger_1 = require("./logger");
|
|
14
|
+
const fs_1 = require("fs");
|
|
15
|
+
/**
|
|
16
|
+
* Combines folder of consent manager `transcend.yml` files into a single `transcend.yml` file
|
|
17
|
+
* where each consent manager configuration is created as a business entity.
|
|
18
|
+
*
|
|
19
|
+
* yarn ts-node ./src/cli-consent-managers-to-business-entities.ts \
|
|
20
|
+
* --consentManagerYmlFolder=./working/consent-managers/ \
|
|
21
|
+
* --output=./combined-business-entities.yml
|
|
22
|
+
*
|
|
23
|
+
* Standard usage:
|
|
24
|
+
* yarn tr-consent-managers-to-business-entities \
|
|
25
|
+
* --consentManagerYmlFolder=./working/consent-managers/ \
|
|
26
|
+
* --output=./combined-business-entities.yml
|
|
27
|
+
*/
|
|
28
|
+
function main() {
|
|
29
|
+
// Parse command line arguments
|
|
30
|
+
const { consentManagerYmlFolder, output = './combined-business-entities.yml', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
31
|
+
// Ensure folder is passed to consentManagerYmlFolder
|
|
32
|
+
if (!consentManagerYmlFolder) {
|
|
33
|
+
logger_1.logger.error(colors_1.default.red('Missing required arg: --consentManagerYmlFolder=./working/consent-managers/'));
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
// Ensure file is passed
|
|
37
|
+
if (!(0, fs_1.existsSync)(consentManagerYmlFolder) ||
|
|
38
|
+
!(0, fs_1.lstatSync)(consentManagerYmlFolder).isDirectory()) {
|
|
39
|
+
logger_1.logger.error(colors_1.default.red(`Folder does not exist: "${consentManagerYmlFolder}"`));
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
// Read in each consent manager configuration
|
|
43
|
+
const inputs = (0, api_keys_1.listFiles)(consentManagerYmlFolder).map((directory) => {
|
|
44
|
+
const { 'consent-manager': consentManager } = (0, readTranscendYaml_1.readTranscendYaml)((0, path_1.join)(consentManagerYmlFolder, directory));
|
|
45
|
+
return { name: directory, input: consentManager };
|
|
46
|
+
});
|
|
47
|
+
// Convert to business entities
|
|
48
|
+
const businessEntities = (0, consent_manager_1.consentManagersToBusinessEntities)(inputs);
|
|
49
|
+
// write to disk
|
|
50
|
+
(0, readTranscendYaml_1.writeTranscendYaml)(output, {
|
|
51
|
+
'business-entities': businessEntities,
|
|
52
|
+
});
|
|
53
|
+
logger_1.logger.info(colors_1.default.green(`Successfully wrote ${businessEntities.length} business entities to file "${output}"`));
|
|
54
|
+
}
|
|
55
|
+
main();
|
|
56
|
+
//# sourceMappingURL=cli-consent-managers-to-business-entities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-consent-managers-to-business-entities.js","sourceRoot":"","sources":["../src/cli-consent-managers-to-business-entities.ts"],"names":[],"mappings":";;;;;;AACA,yCAAuC;AACvC,uDAAsE;AACtE,2DAA4E;AAC5E,+BAA4B;AAC5B,gEAAiC;AACjC,oDAA4B;AAC5B,qCAAkC;AAClC,2BAA2C;AAE3C;;;;;;;;;;;;GAYG;AACH,SAAS,IAAI;IACX,+BAA+B;IAC/B,MAAM,EACJ,uBAAuB,EACvB,MAAM,GAAG,kCAAkC,GAC5C,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAA8B,CAAC;IAE9D,qDAAqD;IACrD,IAAI,CAAC,uBAAuB,EAAE;QAC5B,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,6EAA6E,CAC9E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,wBAAwB;IACxB,IACE,CAAC,IAAA,eAAU,EAAC,uBAAuB,CAAC;QACpC,CAAC,IAAA,cAAS,EAAC,uBAAuB,CAAC,CAAC,WAAW,EAAE,EACjD;QACA,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CAAC,2BAA2B,uBAAuB,GAAG,CAAC,CAClE,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,6CAA6C;IAC7C,MAAM,MAAM,GAAG,IAAA,oBAAS,EAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;QAClE,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,IAAA,qCAAiB,EAC7D,IAAA,WAAI,EAAC,uBAAuB,EAAE,SAAS,CAAC,CACzC,CAAC;QACF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,+BAA+B;IAC/B,MAAM,gBAAgB,GAAG,IAAA,mDAAiC,EAAC,MAAM,CAAC,CAAC;IAEnE,gBAAgB;IAChB,IAAA,sCAAkB,EAAC,MAAM,EAAE;QACzB,mBAAmB,EAAE,gBAAgB;KACtC,CAAC,CAAC;IAEH,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,sBAAsB,gBAAgB,CAAC,MAAM,+BAA+B,MAAM,GAAG,CACtF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-upload-cookies-from-csv.d.ts","sourceRoot":"","sources":["../src/cli-upload-cookies-from-csv.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 consent_manager_1 = require("./consent-manager");
|
|
11
|
+
const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
12
|
+
const constants_1 = require("./constants");
|
|
13
|
+
/**
|
|
14
|
+
* Upload a CSV of cookies
|
|
15
|
+
*
|
|
16
|
+
* Requires an API key with follow scopes: https://app.transcend.io/infrastructure/api-keys
|
|
17
|
+
* - "Manage Consent Manager"
|
|
18
|
+
*
|
|
19
|
+
* Dev Usage:
|
|
20
|
+
* yarn ts-node ./src/cli-upload-cookies-from-csv.ts --auth=$TRANSCEND_API_KEY \
|
|
21
|
+
* --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
22
|
+
* --trackerStatus=LIVE
|
|
23
|
+
*
|
|
24
|
+
* Standard usage:
|
|
25
|
+
* yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY \
|
|
26
|
+
* --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
27
|
+
* --trackerStatus=LIVE
|
|
28
|
+
*/
|
|
29
|
+
async function main() {
|
|
30
|
+
// Parse command line arguments
|
|
31
|
+
const { auth, trackerStatus, file = 'cookies.csv', transcendUrl = constants_1.DEFAULT_TRANSCEND_API, } = (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
|
+
// Ensure trackerStatus is passed
|
|
38
|
+
const VALID_TRACKER_OPTIONS = Object.values(privacy_types_1.ConsentTrackerStatus);
|
|
39
|
+
if (!trackerStatus) {
|
|
40
|
+
logger_1.logger.error(colors_1.default.red('The trackerStatus must be provided. You can specify using --trackerStatus=LIVE. ' +
|
|
41
|
+
`Valid options include: ${VALID_TRACKER_OPTIONS.join(',')}`));
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const consentTrackerStatus = trackerStatus;
|
|
45
|
+
if (!VALID_TRACKER_OPTIONS.includes(consentTrackerStatus)) {
|
|
46
|
+
logger_1.logger.error(colors_1.default.red(`The trackerStatus option was invalid, got: "${trackerStatus}". You can specify using --trackerStatus=LIVE. ` +
|
|
47
|
+
`Valid options include: ${VALID_TRACKER_OPTIONS.join(',')}`));
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
// Upload cookies
|
|
51
|
+
await (0, consent_manager_1.uploadCookiesFromCsv)({
|
|
52
|
+
auth,
|
|
53
|
+
trackerStatus: consentTrackerStatus,
|
|
54
|
+
file,
|
|
55
|
+
transcendUrl,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
main();
|
|
59
|
+
//# sourceMappingURL=cli-upload-cookies-from-csv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-upload-cookies-from-csv.js","sourceRoot":"","sources":["../src/cli-upload-cookies-from-csv.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,uDAAyD;AACzD,+DAAmE;AACnE,2CAAoD;AAEpD;;;;;;;;;;;;;;;GAeG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,EACJ,aAAa,EACb,IAAI,GAAG,aAAa,EACpB,YAAY,GAAG,iCAAqB,GACrC,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,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,oCAAoB,CAAC,CAAC;IAClE,IAAI,CAAC,aAAa,EAAE;QAClB,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,kFAAkF;YAChF,0BAA0B,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC9D,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,MAAM,oBAAoB,GAAG,aAAqC,CAAC;IACnE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;QACzD,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,+CAA+C,aAAa,iDAAiD;YAC3G,0BAA0B,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC9D,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,iBAAiB;IACjB,MAAM,IAAA,sCAAoB,EAAC;QACzB,IAAI;QACJ,aAAa,EAAE,oBAAoB;QACnC,IAAI;QACJ,YAAY;KACb,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/build/codecs.d.ts
CHANGED
|
@@ -63378,4 +63378,26 @@ export declare const DataFlowCsvInput: t.IntersectionC<[t.TypeC<{
|
|
|
63378
63378
|
}>, t.RecordC<t.StringC, t.StringC>]>;
|
|
63379
63379
|
/** Type override */
|
|
63380
63380
|
export type DataFlowCsvInput = t.TypeOf<typeof DataFlowCsvInput>;
|
|
63381
|
+
export declare const CookieCsvInput: t.IntersectionC<[t.TypeC<{
|
|
63382
|
+
/** The value of the cookie */
|
|
63383
|
+
Name: t.StringC;
|
|
63384
|
+
/** The CSV of purposes mapped to that cookie */
|
|
63385
|
+
Purpose: t.StringC;
|
|
63386
|
+
}>, t.PartialC<{
|
|
63387
|
+
/** The service that the cookie relates to */
|
|
63388
|
+
Service: t.StringC;
|
|
63389
|
+
/** Notes and descriptions for the cookie */
|
|
63390
|
+
Notes: t.StringC;
|
|
63391
|
+
/** Set of cookie owners */
|
|
63392
|
+
Owners: t.StringC;
|
|
63393
|
+
/** Set of cookie team owners */
|
|
63394
|
+
Teams: t.StringC;
|
|
63395
|
+
/** LIVE vs NEEDS_REVIEW aka Approved vs Triage */
|
|
63396
|
+
Status: t.KeyofC<{
|
|
63397
|
+
LIVE: unknown;
|
|
63398
|
+
NEEDS_REVIEW: unknown;
|
|
63399
|
+
}>;
|
|
63400
|
+
}>, t.RecordC<t.StringC, t.StringC>]>;
|
|
63401
|
+
/** Type override */
|
|
63402
|
+
export type CookieCsvInput = t.TypeOf<typeof CookieCsvInput>;
|
|
63381
63403
|
//# sourceMappingURL=codecs.d.ts.map
|