Skip to content

Commit

Permalink
Upload cookies from CSV vz-combine-legal-csv-cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfarrell76 committed Aug 4, 2023
1 parent 92c7523 commit 12bfaa6
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 43 deletions.
56 changes: 28 additions & 28 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
- [Arguments](#arguments)
- [Usage](#usage)
- [vz-combine-legal-csv-cookies](#vz-combine-legal-csv-cookies)
- [Authentication](#authentication-1)
- [Arguments](#arguments-1)
- [Usage](#usage-1)
- [vz-transform-from-parent-for-children](#vz-transform-from-parent-for-children)
- [vz-consent-manager-configuration-to-summary](#vz-consent-manager-configuration-to-summary)
- [vz-derive-integrations-from-data-flows](#vz-derive-integrations-from-data-flows)
- [vz-derive-per-instance-integrations-from-data-flows](#vz-derive-per-instance-integrations-from-data-flows)
- [Useful Commands](#useful-commands)
Expand Down Expand Up @@ -68,14 +70,14 @@ yarn add -D @transcend-io/cli

### Step 3) Create a .env file to store secrets and common environment configuration

Create a .env file with variables like this:
Create a `./.env` file with variables like this:

```.sh
TRANSCEND_API_KEY=FILL_ME
TRANSCEND_API_URL=https://api.us.transcend.io
```

The `TRANSCEND_API_KEY` is a secret, and this should not be committed to git or pasted into your terminal history. If you do either of these, the API key can be cycled [in the Transcend Dashboard](https://app.transcend.io/infrastructure/api-keys).
The `TRANSCEND_API_KEY` is a secret, and this should not be committed to git or pasted into your terminal history. You should add your `./.env` to the `.gitignore` if you are running these commands from a git repository. If you do commit an API key or paste it in the terminal, the API key can be cycled [in the Transcend Dashboard](https://app.transcend.io/infrastructure/api-keys).

### Step 4) Run commands

Expand All @@ -97,6 +99,7 @@ yarn tr-update-consent-manager --auth=$TRANSCEND_API_KEY
yarn tr-pull-consent-metrics --auth=$TRANSCEND_API_KEY --start=01/01/2023
yarn tr-consent-managers-to-business-entities --consentManagerYmlFolder=./working/consent-managers/ --output=./custom.yml
yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY --file=./approved-flows.csv --trackerStatus=LIVE
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY --file=./approved-flows.csv --trackerStatus=LIVE
yarn tr-generate-api-keys --auth=$TRANSCEND_API_KEY [email protected] --password=$TRANSCEND_PASSWORD \
--scopes="View Email Templates,View Data Map" --apiKeyTitle="CLI Usage Cross Instance Sync" -file=./working/auth.json
yarn tr-build-xdi-sync-endpoint --auth=$TRANSCEND_API_KEY --xdiLocation=https://cdn.your-site.com/xdi.js
Expand Down Expand Up @@ -141,9 +144,32 @@ yarn vz-combine-legal-csv-data-flows \

### vz-combine-legal-csv-cookies

FIXME
This command allows for combining information in a CSV from a legal team into a CSV of cookies

#### Authentication

FIXME add tr-upload-cookies-csv
No authentication is required to run this cli command, it comes CSV files that are expected to be on disk.

#### Arguments

| Argument | Description | Type | Default | Required |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------------------- | -------- |
| legalCsv | Custom Legal CSV file. File format defined by [`LegalTrackerCsvCodec`](https://github.com/transcend-io/vz-cli/blob/757b42301116b551d0a927944e3c4407a802a9de/src/codecs.ts#L6) | string - file-path | ./legalMaster.csv | false |
| cookieExportCsv | Export of cookies from the Transcend dashboard. File format defined by [`CookieCsvInput`](https://github.com/transcend-io/cli/blob/main/src/codecs.ts#L849-L873) | string - file-path | ./triage-cookies.csv | false |
| output | Output file format that can be re-imported into Transcend dashboard. File format defined by [`CookieCsvInput`](https://github.com/transcend-io/cli/blob/main/src/codecs.ts#L849-L873) | string - file-path | ./combined.csv | false |

Note: You `trackerStatus` can be specified on a per data flow basis by adding a column named "Status" to the CSV. The values should be of type `ConsentTrackerStatus` - which is `LIVE` or `NEEDS_REVIEW`.

#### Usage

Combine two files on disk

```sh
yarn vz-combine-legal-csv-cookies \
--legalCsv=/Users/test/Desktop/legal.csv \
--cookieExportCsv=/Users/test/Desktop/cookies.csv \
--output=/Users/test/Desktop/output.csv
```

### vz-transform-from-parent-for-children

Expand All @@ -153,10 +179,6 @@ Remove data from the `0 - Data Mapping` `transcend.yml` output that should not b
yarn vz-transcend-from-parent-for-children --file=./transcend.yml
```

### vz-consent-manager-configuration-to-summary

FIXME

### vz-derive-integrations-from-data-flows

FIXME
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"license": "MIT",
"main": "build/index",
"bin": {
"vz-combine-legal-csv-cookies": "./build/cli-combine-legal-csv-cookies.js",
"vz-combine-legal-csv-data-flows": "./build/cli-combine-legal-csv-data-flows.js",
"vz-transcend-from-parent-for-children": "./build/cli-transcend-from-parent-for-children.js"
},
Expand Down Expand Up @@ -45,7 +46,7 @@
},
"packageManager": "[email protected]",
"dependencies": {
"@transcend-io/cli": "^4.73.0",
"@transcend-io/cli": "^4.74.0",
"colors": "^1.4.0",
"fp-ts": "=2.11.8",
"io-ts": "=2.2.16",
Expand Down
Loading

0 comments on commit 12bfaa6

Please sign in to comment.