@transcend-io/cli 6.8.0 → 6.10.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 +96 -12
- package/build/cli-request-upload.js +1 -1
- package/build/cli-request-upload.js.map +1 -1
- package/build/cli-upload-consent-preferences.js +2 -2
- package/build/cli-upload-consent-preferences.js.map +1 -1
- package/build/cli-upload-preferences.d.ts +3 -0
- package/build/cli-upload-preferences.d.ts.map +1 -0
- package/build/cli-upload-preferences.js +79 -0
- package/build/cli-upload-preferences.js.map +1 -0
- package/build/codecs.d.ts +1824 -4
- package/build/codecs.d.ts.map +1 -1
- package/build/codecs.js +232 -2
- package/build/codecs.js.map +1 -1
- package/build/consent-manager/index.d.ts +1 -0
- package/build/consent-manager/index.d.ts.map +1 -1
- package/build/consent-manager/index.js +1 -0
- package/build/consent-manager/index.js.map +1 -1
- package/build/consent-manager/{uploadConsentPreferences.d.ts → uploadConsents.d.ts} +2 -2
- package/build/consent-manager/uploadConsents.d.ts.map +1 -0
- package/build/consent-manager/{uploadConsentPreferences.js → uploadConsents.js} +4 -4
- package/build/consent-manager/uploadConsents.js.map +1 -0
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +6 -0
- package/build/constants.js.map +1 -1
- package/build/enums.d.ts +3 -1
- package/build/enums.d.ts.map +1 -1
- package/build/enums.js +2 -0
- package/build/enums.js.map +1 -1
- package/build/graphql/createSombraGotInstance.d.ts.map +1 -1
- package/build/graphql/createSombraGotInstance.js.map +1 -1
- package/build/graphql/fetchAllAssessmentTemplates.d.ts +44 -0
- package/build/graphql/fetchAllAssessmentTemplates.d.ts.map +1 -0
- package/build/graphql/fetchAllAssessmentTemplates.js +31 -0
- package/build/graphql/fetchAllAssessmentTemplates.js.map +1 -0
- package/build/graphql/fetchAllAssessments.d.ts +309 -0
- package/build/graphql/fetchAllAssessments.d.ts.map +1 -0
- package/build/graphql/fetchAllAssessments.js +32 -0
- package/build/graphql/fetchAllAssessments.js.map +1 -0
- package/build/graphql/fetchAllPreferenceTopics.d.ts +28 -0
- package/build/graphql/fetchAllPreferenceTopics.d.ts.map +1 -0
- package/build/graphql/fetchAllPreferenceTopics.js +32 -0
- package/build/graphql/fetchAllPreferenceTopics.js.map +1 -0
- package/build/graphql/fetchAllPurposes.d.ts +25 -0
- package/build/graphql/fetchAllPurposes.d.ts.map +1 -0
- package/build/graphql/fetchAllPurposes.js +36 -0
- package/build/graphql/fetchAllPurposes.js.map +1 -0
- package/build/graphql/fetchAllRequestIdentifiers.d.ts +2 -2
- package/build/graphql/fetchConsentManagerId.d.ts +0 -7
- package/build/graphql/fetchConsentManagerId.d.ts.map +1 -1
- package/build/graphql/fetchConsentManagerId.js +1 -12
- package/build/graphql/fetchConsentManagerId.js.map +1 -1
- package/build/graphql/gqls/assessment.d.ts +3 -0
- package/build/graphql/gqls/assessment.d.ts.map +1 -0
- package/build/graphql/gqls/assessment.js +287 -0
- package/build/graphql/gqls/assessment.js.map +1 -0
- package/build/graphql/gqls/assessmentTemplate.d.ts +2 -0
- package/build/graphql/gqls/assessmentTemplate.d.ts.map +1 -0
- package/build/graphql/gqls/assessmentTemplate.js +70 -0
- package/build/graphql/gqls/assessmentTemplate.js.map +1 -0
- package/build/graphql/gqls/consentManager.d.ts +0 -1
- package/build/graphql/gqls/consentManager.d.ts.map +1 -1
- package/build/graphql/gqls/consentManager.js +1 -12
- package/build/graphql/gqls/consentManager.js.map +1 -1
- package/build/graphql/gqls/index.d.ts +4 -0
- package/build/graphql/gqls/index.d.ts.map +1 -1
- package/build/graphql/gqls/index.js +4 -0
- package/build/graphql/gqls/index.js.map +1 -1
- package/build/graphql/gqls/preferenceTopic.d.ts +2 -0
- package/build/graphql/gqls/preferenceTopic.d.ts.map +1 -0
- package/build/graphql/gqls/preferenceTopic.js +33 -0
- package/build/graphql/gqls/preferenceTopic.js.map +1 -0
- package/build/graphql/gqls/purpose.d.ts +2 -0
- package/build/graphql/gqls/purpose.d.ts.map +1 -0
- package/build/graphql/gqls/purpose.js +35 -0
- package/build/graphql/gqls/purpose.js.map +1 -0
- package/build/graphql/index.d.ts +6 -0
- package/build/graphql/index.d.ts.map +1 -1
- package/build/graphql/index.js +6 -0
- package/build/graphql/index.js.map +1 -1
- package/build/graphql/parseAssessmentDisplayLogic.d.ts +56 -0
- package/build/graphql/parseAssessmentDisplayLogic.d.ts.map +1 -0
- package/build/graphql/parseAssessmentDisplayLogic.js +62 -0
- package/build/graphql/parseAssessmentDisplayLogic.js.map +1 -0
- package/build/graphql/parseAssessmentRiskLogic.d.ts +27 -0
- package/build/graphql/parseAssessmentRiskLogic.d.ts.map +1 -0
- package/build/graphql/parseAssessmentRiskLogic.js +51 -0
- package/build/graphql/parseAssessmentRiskLogic.js.map +1 -0
- package/build/graphql/pullTranscendConfiguration.d.ts.map +1 -1
- package/build/graphql/pullTranscendConfiguration.js +220 -1
- package/build/graphql/pullTranscendConfiguration.js.map +1 -1
- package/build/graphql/syncConsentManager.js +2 -1
- package/build/graphql/syncConsentManager.js.map +1 -1
- package/build/graphql/syncCookies.js +1 -1
- package/build/graphql/syncCookies.js.map +1 -1
- package/build/graphql/syncDataFlows.js +2 -2
- package/build/graphql/syncDataFlows.js.map +1 -1
- package/build/preference-management/checkIfPendingPreferenceUpdatesAreNoOp.d.ts +19 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesAreNoOp.d.ts.map +1 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesAreNoOp.js +56 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesAreNoOp.js.map +1 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesCauseConflict.d.ts +20 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesCauseConflict.d.ts.map +1 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesCauseConflict.js +58 -0
- package/build/preference-management/checkIfPendingPreferenceUpdatesCauseConflict.js.map +1 -0
- package/build/preference-management/codecs.d.ts +369 -0
- package/build/preference-management/codecs.d.ts.map +1 -0
- package/build/preference-management/codecs.js +122 -0
- package/build/preference-management/codecs.js.map +1 -0
- package/build/preference-management/getPreferenceUpdatesFromRow.d.ts +37 -0
- package/build/preference-management/getPreferenceUpdatesFromRow.d.ts.map +1 -0
- package/build/preference-management/getPreferenceUpdatesFromRow.js +144 -0
- package/build/preference-management/getPreferenceUpdatesFromRow.js.map +1 -0
- package/build/preference-management/getPreferencesForIdentifiers.d.ts +21 -0
- package/build/preference-management/getPreferencesForIdentifiers.d.ts.map +1 -0
- package/build/preference-management/getPreferencesForIdentifiers.js +113 -0
- package/build/preference-management/getPreferencesForIdentifiers.js.map +1 -0
- package/build/preference-management/index.d.ts +12 -0
- package/build/preference-management/index.d.ts.map +1 -0
- package/build/preference-management/index.js +28 -0
- package/build/preference-management/index.js.map +1 -0
- package/build/preference-management/parsePreferenceAndPurposeValuesFromCsv.d.ts +17 -0
- package/build/preference-management/parsePreferenceAndPurposeValuesFromCsv.d.ts.map +1 -0
- package/build/preference-management/parsePreferenceAndPurposeValuesFromCsv.js +86 -0
- package/build/preference-management/parsePreferenceAndPurposeValuesFromCsv.js.map +1 -0
- package/build/preference-management/parsePreferenceIdentifiersFromCsv.d.ts +18 -0
- package/build/preference-management/parsePreferenceIdentifiersFromCsv.d.ts.map +1 -0
- package/build/preference-management/parsePreferenceIdentifiersFromCsv.js +97 -0
- package/build/preference-management/parsePreferenceIdentifiersFromCsv.js.map +1 -0
- package/build/preference-management/parsePreferenceManagementCsv.d.ts +25 -0
- package/build/preference-management/parsePreferenceManagementCsv.d.ts.map +1 -0
- package/build/preference-management/parsePreferenceManagementCsv.js +145 -0
- package/build/preference-management/parsePreferenceManagementCsv.js.map +1 -0
- package/build/preference-management/parsePreferenceTimestampsFromCsv.d.ts +16 -0
- package/build/preference-management/parsePreferenceTimestampsFromCsv.d.ts.map +1 -0
- package/build/preference-management/parsePreferenceTimestampsFromCsv.js +65 -0
- package/build/preference-management/parsePreferenceTimestampsFromCsv.js.map +1 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesAreNoOp.test.d.ts +2 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesAreNoOp.test.d.ts.map +1 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesAreNoOp.test.js +408 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesAreNoOp.test.js.map +1 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesCauseConflict.test.d.ts +2 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesCauseConflict.test.d.ts.map +1 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesCauseConflict.test.js +428 -0
- package/build/preference-management/tests/checkIfPendingPreferenceUpdatesCauseConflict.test.js.map +1 -0
- package/build/preference-management/tests/getPreferenceUpdatesFromRow.test.d.ts +2 -0
- package/build/preference-management/tests/getPreferenceUpdatesFromRow.test.d.ts.map +1 -0
- package/build/preference-management/tests/getPreferenceUpdatesFromRow.test.js +549 -0
- package/build/preference-management/tests/getPreferenceUpdatesFromRow.test.js.map +1 -0
- package/build/preference-management/uploadPreferenceManagementPreferencesInteractive.d.ts +33 -0
- package/build/preference-management/uploadPreferenceManagementPreferencesInteractive.d.ts.map +1 -0
- package/build/preference-management/uploadPreferenceManagementPreferencesInteractive.js +166 -0
- package/build/preference-management/uploadPreferenceManagementPreferencesInteractive.js.map +1 -0
- package/build/requests/approvePrivacyRequests.d.ts.map +1 -1
- package/build/requests/approvePrivacyRequests.js +15 -4
- package/build/requests/approvePrivacyRequests.js.map +1 -1
- package/build/requests/bulkRestartRequests.js +2 -2
- package/build/requests/bulkRestartRequests.js.map +1 -1
- package/build/requests/mapColumnsToAttributes.d.ts.map +1 -1
- package/build/requests/mapColumnsToAttributes.js +1 -3
- package/build/requests/mapColumnsToAttributes.js.map +1 -1
- package/build/requests/mapColumnsToIdentifiers.d.ts.map +1 -1
- package/build/requests/mapColumnsToIdentifiers.js +1 -3
- package/build/requests/mapColumnsToIdentifiers.js.map +1 -1
- package/build/requests/mapCsvColumnsToApi.d.ts.map +1 -1
- package/build/requests/mapCsvColumnsToApi.js +1 -3
- package/build/requests/mapCsvColumnsToApi.js.map +1 -1
- package/build/requests/mapRequestEnumValues.d.ts.map +1 -1
- package/build/requests/mapRequestEnumValues.js +6 -6
- package/build/requests/mapRequestEnumValues.js.map +1 -1
- package/build/requests/uploadPrivacyRequestsFromCsv.js +3 -3
- package/build/requests/uploadPrivacyRequestsFromCsv.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +6 -3
- package/build/consent-manager/uploadConsentPreferences.d.ts.map +0 -1
- package/build/consent-manager/uploadConsentPreferences.js.map +0 -1
package/README.md
CHANGED
|
@@ -118,30 +118,35 @@
|
|
|
118
118
|
- [Authentication](#authentication-26)
|
|
119
119
|
- [Arguments](#arguments-26)
|
|
120
120
|
- [Usage](#usage-27)
|
|
121
|
-
- [tr-upload-
|
|
121
|
+
- [tr-upload-preferences](#tr-upload-preferences)
|
|
122
122
|
- [Authentication](#authentication-27)
|
|
123
|
+
- [Authentication](#authentication-28)
|
|
123
124
|
- [Arguments](#arguments-27)
|
|
124
125
|
- [Usage](#usage-28)
|
|
125
|
-
- [tr-
|
|
126
|
-
- [Authentication](#authentication-
|
|
126
|
+
- [tr-upload-consent-preferences](#tr-upload-consent-preferences)
|
|
127
|
+
- [Authentication](#authentication-29)
|
|
127
128
|
- [Arguments](#arguments-28)
|
|
128
129
|
- [Usage](#usage-29)
|
|
129
|
-
- [tr-
|
|
130
|
-
- [Authentication](#authentication-
|
|
130
|
+
- [tr-pull-consent-preferences](#tr-pull-consent-preferences)
|
|
131
|
+
- [Authentication](#authentication-30)
|
|
131
132
|
- [Arguments](#arguments-29)
|
|
132
133
|
- [Usage](#usage-30)
|
|
133
|
-
- [tr-upload-
|
|
134
|
-
- [Authentication](#authentication-
|
|
134
|
+
- [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
|
|
135
|
+
- [Authentication](#authentication-31)
|
|
135
136
|
- [Arguments](#arguments-30)
|
|
136
137
|
- [Usage](#usage-31)
|
|
137
|
-
- [tr-
|
|
138
|
-
- [Authentication](#authentication-
|
|
138
|
+
- [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
|
|
139
|
+
- [Authentication](#authentication-32)
|
|
139
140
|
- [Arguments](#arguments-31)
|
|
140
141
|
- [Usage](#usage-32)
|
|
141
|
-
- [tr-
|
|
142
|
-
- [Authentication](#authentication-
|
|
142
|
+
- [tr-generate-api-keys](#tr-generate-api-keys)
|
|
143
|
+
- [Authentication](#authentication-33)
|
|
143
144
|
- [Arguments](#arguments-32)
|
|
144
145
|
- [Usage](#usage-33)
|
|
146
|
+
- [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
|
|
147
|
+
- [Authentication](#authentication-34)
|
|
148
|
+
- [Arguments](#arguments-33)
|
|
149
|
+
- [Usage](#usage-34)
|
|
145
150
|
- [Prompt Manager](#prompt-manager)
|
|
146
151
|
- [Proxy usage](#proxy-usage)
|
|
147
152
|
|
|
@@ -262,7 +267,13 @@ You can find various examples for your `transcend.yml` file in the [examples/](.
|
|
|
262
267
|
|
|
263
268
|
The API for this YAML file can be found in [./src/codecs.ts](./src/codecs.ts) under the variable named "TranscendInput". The shape of the YAML file will be type-checked every time a command is run.
|
|
264
269
|
|
|
265
|
-
By default, your editor or IDE should recognize `transcend.yml` and validate it against our published [JSON schema](./transcend-yml-schema-
|
|
270
|
+
By default, your editor or IDE should recognize `transcend.yml` and validate it against our latest published [JSON schema](./transcend-yml-schema-latest.json). This is dependent on whether your editor uses [yaml-language-server](https://github.com/redhat-developer/yaml-language-server), such as through the [VS Code YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml).
|
|
271
|
+
|
|
272
|
+
Your editor will use the latest version's schema. To pin the `transcend.yml` schema to a previous major version, include this at the top of your file (and change `v4` to your target major version):
|
|
273
|
+
|
|
274
|
+
```yml
|
|
275
|
+
# yaml-language-server: $schema=https://raw.githubusercontent.com/transcend-io/cli/main/transcend-yml-schema-v4.json
|
|
276
|
+
```
|
|
266
277
|
|
|
267
278
|
The structure of `transcend.yml` looks something like the following:
|
|
268
279
|
|
|
@@ -394,6 +405,8 @@ The API key permissions for this command vary based on the value to the `resourc
|
|
|
394
405
|
| privacyCenters | The privacy center configurations. | View Privacy Center | false | [Privacy Center](https://app.transcend.io/privacy-center/general-settings) |
|
|
395
406
|
| policies | The privacy center policies. | View Policies | false | [Privacy Center -> Policies](https://app.transcend.io/privacy-center/policies) |
|
|
396
407
|
| messages | Message definitions used across consent, privacy center, email templates and more. | View Internationalization Messages | false | [Privacy Center -> Messages](https://app.transcend.io/privacy-center/messages-internationalization), [Consent Management -> Display Settings -> Messages](https://app.transcend.io/consent-manager/display-settings/messages) |
|
|
408
|
+
| assessments | Assessment responses. | View Assessments | false | [Assessments -> Assessments](https://app.transcend.io/assessments/groups) |
|
|
409
|
+
| assessmentTemplates | Assessment template configurations. | View Assessments | false | [Assessment -> Templates](https://app.transcend.io/assessments/form-templates) |
|
|
397
410
|
|
|
398
411
|
_Note: The scopes for tr-push are comprehensive of the scopes for tr-pull_
|
|
399
412
|
|
|
@@ -524,6 +537,12 @@ Pull in prompts, prompt templates, prompt partials and prompt groups (see [this
|
|
|
524
537
|
tr-pull --auth=$TRANSCEND_API_KEY --resources=prompts,promptPartials,promptGroups
|
|
525
538
|
```
|
|
526
539
|
|
|
540
|
+
Pull in assessments and assessment templates.
|
|
541
|
+
|
|
542
|
+
```sh
|
|
543
|
+
tr-pull --auth=$TRANSCEND_API_KEY --resources=assessments,assessmentTemplates
|
|
544
|
+
```
|
|
545
|
+
|
|
527
546
|
Pull everything:
|
|
528
547
|
|
|
529
548
|
```sh
|
|
@@ -2282,6 +2301,71 @@ Specify the backend URL, needed for US hosted backend infrastructure:
|
|
|
2282
2301
|
yarn tr-pull-datapoints --auth=$TRANSCEND_API_KEY --file=./datapoints.csv --transcendUrl=https://api.us.transcend.io
|
|
2283
2302
|
```
|
|
2284
2303
|
|
|
2304
|
+
### tr-upload-preferences
|
|
2305
|
+
|
|
2306
|
+
This command allows for updating of preference management data to your Transcend Preference Store.
|
|
2307
|
+
|
|
2308
|
+
This command uses [inquirer](https://github.com/SBoudrias/Inquirer.js/) to prompt the user to
|
|
2309
|
+
map the shape of the CSV to the shape of the Transcend API. There is no requirement for the
|
|
2310
|
+
shape of the incoming CSV, as the script will handle the mapping process.
|
|
2311
|
+
|
|
2312
|
+
The script will also produce a JSON cache file, that allows for the mappings to be preserved between runs.
|
|
2313
|
+
This can be useful if you have the same CSV shape that needs to be imported multiple times.
|
|
2314
|
+
Once the mapping process is done once, it does not need to be done again.
|
|
2315
|
+
|
|
2316
|
+
Additionally, the JSON cache file will store the result of any preferences that fail to be uploaded so that the
|
|
2317
|
+
script can be run multiple times if an issue happens.
|
|
2318
|
+
|
|
2319
|
+
#### Authentication
|
|
2320
|
+
|
|
2321
|
+
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).
|
|
2322
|
+
|
|
2323
|
+
The API key needs the following scopes:
|
|
2324
|
+
|
|
2325
|
+
- Modify User Stored Preferences
|
|
2326
|
+
- View Managed Consent Database Admin API
|
|
2327
|
+
- View Preference Store Settings
|
|
2328
|
+
|
|
2329
|
+
#### Authentication
|
|
2330
|
+
|
|
2331
|
+
In order to use this cli, you will first need to follow [this guide](https://docs.transcend.io/docs/consent/reference/managed-consent-database#authenticate-a-user's-consent) in order
|
|
2332
|
+
|
|
2333
|
+
#### Arguments
|
|
2334
|
+
|
|
2335
|
+
| Argument | Description | Type | Default | Required |
|
|
2336
|
+
| -------------------- | ------------------------------------------------------------------------------------------------- | ------------------ | -------------------------------------------- | -------- |
|
|
2337
|
+
| auth | The Transcend API key with the scopes necessary for the command. | string | N/A | true |
|
|
2338
|
+
| partition | The partition key to download consent preferences to | string | N/A | true |
|
|
2339
|
+
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
|
|
2340
|
+
| transcendUrl | URL of the Transcend backend. Use https://consent.us.transcend.io for US hosting. | string - URL | https://consent.transcend.io | false |
|
|
2341
|
+
| file | Path to the CSV file to load preferences from | string - file-path | ./preferences.csv | false |
|
|
2342
|
+
| dryRun | Whether to do a dry run only - will write results ti receiptFilepath without updating Transcend | boolean | false | false |
|
|
2343
|
+
| skipWorkflowTriggers | Whether to skip workflow triggers when uploading to preference store | boolean | false | false |
|
|
2344
|
+
| skipConflictUpdates | Whether to skip uploading of any records where the preference store and file have a hard conflict | boolean | false | false |
|
|
2345
|
+
| isSilent | Whether to skip sending emails in workflows | boolean | true | false |
|
|
2346
|
+
| attributes | Attributes to add to any DSR request if created | string | Tags:transcend-cli,Source:transcend-cli | false |
|
|
2347
|
+
| receiptFilepath | Store resulting, continuing where left off | string - file-path | ./preference-management-upload-receipts.json | false |
|
|
2348
|
+
|
|
2349
|
+
#### Usage
|
|
2350
|
+
|
|
2351
|
+
Upload consent preferences to partition key `4d1c5daa-90b7-4d18-aa40-f86a43d2c726`
|
|
2352
|
+
|
|
2353
|
+
```sh
|
|
2354
|
+
yarn tr-upload-preferences --auth=$TRANSCEND_API_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726
|
|
2355
|
+
```
|
|
2356
|
+
|
|
2357
|
+
Upload consent preferences with additional options
|
|
2358
|
+
|
|
2359
|
+
```sh
|
|
2360
|
+
yarn tr-upload-preferences --auth=$TRANSCEND_API_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 --file=./preferences.csv --dryRun=true --skipWorkflowTriggers=true --skipConflictUpdates=true --isSilent=false --attributes="Tags:transcend-cli,Source:transcend-cli" --receiptFilepath=./preference-management-upload-receipts.json
|
|
2361
|
+
```
|
|
2362
|
+
|
|
2363
|
+
Specifying the backend URL, needed for US hosted backend infrastructure.
|
|
2364
|
+
|
|
2365
|
+
```sh
|
|
2366
|
+
yarn tr-upload-preferences --auth=$TRANSCEND_API_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 --transcendUrl=https://consent.us.transcend.io
|
|
2367
|
+
```
|
|
2368
|
+
|
|
2285
2369
|
### tr-upload-consent-preferences
|
|
2286
2370
|
|
|
2287
2371
|
This command allows for updating of consent preferences to the [Managed Consent Database](https://docs.transcend.io/docs/consent/reference/managed-consent-database).
|
|
@@ -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,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,
|
|
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,OAAO;KAC3B,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -8,7 +8,7 @@ const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
|
8
8
|
const colors_1 = __importDefault(require("colors"));
|
|
9
9
|
const logger_1 = require("./logger");
|
|
10
10
|
const constants_1 = require("./constants");
|
|
11
|
-
const
|
|
11
|
+
const uploadConsents_1 = require("./consent-manager/uploadConsents");
|
|
12
12
|
const types_1 = require("./consent-manager/types");
|
|
13
13
|
const requests_1 = require("./requests");
|
|
14
14
|
/**
|
|
@@ -60,7 +60,7 @@ async function main() {
|
|
|
60
60
|
// Load in preferences from csv
|
|
61
61
|
const preferences = (0, requests_1.readCsv)(file, types_1.ConsentPreferenceUpload);
|
|
62
62
|
// Upload cookies
|
|
63
|
-
await (0,
|
|
63
|
+
await (0, uploadConsents_1.uploadConsents)({
|
|
64
64
|
base64EncryptionKey,
|
|
65
65
|
base64SigningKey,
|
|
66
66
|
preferences,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-upload-consent-preferences.js","sourceRoot":"","sources":["../src/cli-upload-consent-preferences.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,2CAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"cli-upload-consent-preferences.js","sourceRoot":"","sources":["../src/cli-upload-consent-preferences.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,2CAA4D;AAC5D,qEAAkE;AAClE,mDAAkE;AAClE,yCAAqC;AAErC;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,oCAAoC;IACpC,IAAI,GAAG,iBAAiB;IACxB,oBAAoB;IACpB,YAAY,GAAG,yCAA6B;IAC5C,4BAA4B;IAC5B,mBAAmB;IACnB,yBAAyB;IACzB,gBAAgB;IAChB,iCAAiC;IACjC,SAAS;IACT,kBAAkB;IAClB,WAAW,GAAG,KAAK,GACpB,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAA8B,CAAC;IAE9D,wBAAwB;IACxB,IAAI,CAAC,mBAAmB,EAAE;QACxB,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,0CAA0C;YACxC,+EAA+E,CAClF,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IACD,IAAI,CAAC,gBAAgB,EAAE;QACrB,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,uCAAuC;YACrC,yEAAyE,CAC5E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,mBAAmB;IACnB,IAAI,CAAC,SAAS,EAAE;QACd,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,gCAAgC;YAC9B,wEAAwE,CAC3E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,+BAA+B;IAC/B,MAAM,WAAW,GAAG,IAAA,kBAAO,EAAC,IAAI,EAAE,+BAAuB,CAAC,CAAC;IAE3D,iBAAiB;IACjB,MAAM,IAAA,+BAAc,EAAC;QACnB,mBAAmB;QACnB,gBAAgB;QAChB,WAAW;QACX,SAAS;QACT,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,YAAY;KACb,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-upload-preferences.d.ts","sourceRoot":"","sources":["../src/cli-upload-preferences.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 constants_1 = require("./constants");
|
|
11
|
+
const preference_management_1 = require("./preference-management");
|
|
12
|
+
const requests_1 = require("./requests");
|
|
13
|
+
/**
|
|
14
|
+
* Upload consent preferences to the managed consent database
|
|
15
|
+
*
|
|
16
|
+
* Requires following documentation found at:
|
|
17
|
+
* https://docs.transcend.io/docs/consent/reference/managed-consent-database
|
|
18
|
+
*
|
|
19
|
+
* Dev Usage:
|
|
20
|
+
* yarn ts-node ./src/cli-upload-consent-preferences-interactive --base64EncryptionKey=$TRANSCEND_CONSENT_ENCRYPTION_KEY \
|
|
21
|
+
* --base64SigningKey=$TRANSCEND_CONSENT_SIGNING_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726
|
|
22
|
+
*
|
|
23
|
+
* Standard usage:
|
|
24
|
+
* yarn tr-upload-consent-preferences-interactive --base64EncryptionKey=$TRANSCEND_CONSENT_ENCRYPTION_KEY \
|
|
25
|
+
* --base64SigningKey=$TRANSCEND_CONSENT_SIGNING_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726
|
|
26
|
+
*/
|
|
27
|
+
async function main() {
|
|
28
|
+
// Parse command line arguments
|
|
29
|
+
const {
|
|
30
|
+
/** File to load preferences from */
|
|
31
|
+
file = './preferences.csv',
|
|
32
|
+
/** Transcend URL */
|
|
33
|
+
transcendUrl = constants_1.DEFAULT_TRANSCEND_API,
|
|
34
|
+
/** API key */
|
|
35
|
+
auth,
|
|
36
|
+
/** Sombra API key */
|
|
37
|
+
sombraAuth,
|
|
38
|
+
/** Partition key to load into */
|
|
39
|
+
partition,
|
|
40
|
+
/** Whether to do a dry run */
|
|
41
|
+
dryRun = 'false',
|
|
42
|
+
/** Whether to skip workflow triggers */
|
|
43
|
+
skipWorkflowTriggers = 'false',
|
|
44
|
+
/** Whether to skip conflict updates */
|
|
45
|
+
skipConflictUpdates = 'false',
|
|
46
|
+
/** Whether to skip sending emails */
|
|
47
|
+
isSilent = 'true',
|
|
48
|
+
/** Attributes to add to any DSR request if created */
|
|
49
|
+
attributes = 'Tags:transcend-cli,Source:transcend-cli',
|
|
50
|
+
/** Store resulting, continuing where left off */
|
|
51
|
+
receiptFilepath = './preference-management-upload-receipts.json', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
52
|
+
// Ensure auth is passed
|
|
53
|
+
if (!auth) {
|
|
54
|
+
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
// Ensure partition
|
|
58
|
+
if (!partition) {
|
|
59
|
+
logger_1.logger.error(colors_1.default.red('A partition must be provided. ' +
|
|
60
|
+
'You can specify using --partition=ee1a0845-694e-4820-9d51-50c7d0a23467'));
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
// Upload cookies
|
|
64
|
+
await (0, preference_management_1.uploadPreferenceManagementPreferencesInteractive)({
|
|
65
|
+
receiptFilepath,
|
|
66
|
+
auth,
|
|
67
|
+
sombraAuth,
|
|
68
|
+
file,
|
|
69
|
+
partition,
|
|
70
|
+
transcendUrl,
|
|
71
|
+
skipConflictUpdates: skipConflictUpdates !== 'false',
|
|
72
|
+
skipWorkflowTriggers: skipWorkflowTriggers !== 'false',
|
|
73
|
+
isSilent: isSilent !== 'false',
|
|
74
|
+
dryRun: dryRun !== 'false',
|
|
75
|
+
attributes: (0, requests_1.splitCsvToList)(attributes),
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
main();
|
|
79
|
+
//# sourceMappingURL=cli-upload-preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-upload-preferences.js","sourceRoot":"","sources":["../src/cli-upload-preferences.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,2CAAoD;AACpD,mEAA2F;AAC3F,yCAA4C;AAE5C;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM;IACJ,oCAAoC;IACpC,IAAI,GAAG,mBAAmB;IAC1B,oBAAoB;IACpB,YAAY,GAAG,iCAAqB;IACpC,cAAc;IACd,IAAI;IACJ,qBAAqB;IACrB,UAAU;IACV,iCAAiC;IACjC,SAAS;IACT,8BAA8B;IAC9B,MAAM,GAAG,OAAO;IAChB,wCAAwC;IACxC,oBAAoB,GAAG,OAAO;IAC9B,uCAAuC;IACvC,mBAAmB,GAAG,OAAO;IAC7B,qCAAqC;IACrC,QAAQ,GAAG,MAAM;IACjB,sDAAsD;IACtD,UAAU,GAAG,yCAAyC;IACtD,kDAAkD;IAClD,eAAe,GAAG,8CAA8C,GACjE,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,mBAAmB;IACnB,IAAI,CAAC,SAAS,EAAE;QACd,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,gCAAgC;YAC9B,wEAAwE,CAC3E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,iBAAiB;IACjB,MAAM,IAAA,wEAAgD,EAAC;QACrD,eAAe;QACf,IAAI;QACJ,UAAU;QACV,IAAI;QACJ,SAAS;QACT,YAAY;QACZ,mBAAmB,EAAE,mBAAmB,KAAK,OAAO;QACpD,oBAAoB,EAAE,oBAAoB,KAAK,OAAO;QACtD,QAAQ,EAAE,QAAQ,KAAK,OAAO;QAC9B,MAAM,EAAE,MAAM,KAAK,OAAO;QAC1B,UAAU,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;KACvC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|