@transcend-io/cli 4.100.0 → 4.102.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 +67 -10
- package/build/ai/getGitFilesThatChanged.d.ts +5 -1
- package/build/ai/getGitFilesThatChanged.d.ts.map +1 -1
- package/build/ai/getGitFilesThatChanged.js +4 -0
- package/build/ai/getGitFilesThatChanged.js.map +1 -1
- package/build/cli-upload-consent-preferences.d.ts +3 -0
- package/build/cli-upload-consent-preferences.d.ts.map +1 -0
- package/build/cli-upload-consent-preferences.js +72 -0
- package/build/cli-upload-consent-preferences.js.map +1 -0
- package/build/consent-manager/createConsentToken.d.ts +11 -0
- package/build/consent-manager/createConsentToken.d.ts.map +1 -0
- package/build/consent-manager/createConsentToken.js +67 -0
- package/build/consent-manager/createConsentToken.js.map +1 -0
- 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 +41 -0
- package/build/consent-manager/uploadConsentPreferences.d.ts.map +1 -0
- package/build/consent-manager/uploadConsentPreferences.js +115 -0
- package/build/consent-manager/uploadConsentPreferences.js.map +1 -0
- package/build/constants.d.ts +5 -0
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +6 -1
- package/build/constants.js.map +1 -1
- package/build/graphql/createTranscendConsentGotInstance.d.ts +10 -0
- package/build/graphql/createTranscendConsentGotInstance.d.ts.map +1 -0
- package/build/graphql/createTranscendConsentGotInstance.js +22 -0
- package/build/graphql/createTranscendConsentGotInstance.js.map +1 -0
- package/build/graphql/index.d.ts +5 -0
- package/build/graphql/index.d.ts.map +1 -1
- package/build/graphql/index.js +5 -0
- package/build/graphql/index.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -97,27 +97,31 @@
|
|
|
97
97
|
- [Authentication](#authentication-21)
|
|
98
98
|
- [Arguments](#arguments-21)
|
|
99
99
|
- [Usage](#usage-22)
|
|
100
|
-
- [tr-upload-
|
|
100
|
+
- [tr-upload-consent-preferences](#tr-upload-consent-preferences)
|
|
101
101
|
- [Authentication](#authentication-22)
|
|
102
102
|
- [Arguments](#arguments-22)
|
|
103
103
|
- [Usage](#usage-23)
|
|
104
|
-
- [tr-upload-
|
|
104
|
+
- [tr-upload-data-flows-from-csv](#tr-upload-data-flows-from-csv)
|
|
105
105
|
- [Authentication](#authentication-23)
|
|
106
106
|
- [Arguments](#arguments-23)
|
|
107
107
|
- [Usage](#usage-24)
|
|
108
|
-
- [tr-
|
|
108
|
+
- [tr-upload-cookies-from-csv](#tr-upload-cookies-from-csv)
|
|
109
109
|
- [Authentication](#authentication-24)
|
|
110
110
|
- [Arguments](#arguments-24)
|
|
111
111
|
- [Usage](#usage-25)
|
|
112
|
-
- [tr-
|
|
112
|
+
- [tr-generate-api-keys](#tr-generate-api-keys)
|
|
113
113
|
- [Authentication](#authentication-25)
|
|
114
114
|
- [Arguments](#arguments-25)
|
|
115
115
|
- [Usage](#usage-26)
|
|
116
|
-
- [
|
|
117
|
-
- [tr-create-assessment](#tr-create-assessment)
|
|
116
|
+
- [tr-build-xdi-sync-endpoint](#tr-build-xdi-sync-endpoint)
|
|
118
117
|
- [Authentication](#authentication-26)
|
|
119
118
|
- [Arguments](#arguments-26)
|
|
120
119
|
- [Usage](#usage-27)
|
|
120
|
+
- [tr-create-assessment](#tr-create-assessment)
|
|
121
|
+
- [Authentication](#authentication-27)
|
|
122
|
+
- [Arguments](#arguments-27)
|
|
123
|
+
- [Usage](#usage-28)
|
|
124
|
+
- [Proxy usage](#proxy-usage)
|
|
121
125
|
|
|
122
126
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
123
127
|
|
|
@@ -157,6 +161,7 @@ yarn tr-consent-manager-service-json-to-yml
|
|
|
157
161
|
yarn tr-derive-data-silos-from-data-flows --auth=$TRANSCEND_API_KEY
|
|
158
162
|
yarn tr-derive-data-silos-from-data-flows-cross-instance --auth=$TRANSCEND_API_KEY
|
|
159
163
|
yarn tr-pull-consent-metrics --auth=$TRANSCEND_API_KEY
|
|
164
|
+
yarn tr-upload-consent-preferences --auth=$TRANSCEND_API_KEY
|
|
160
165
|
yarn tr-upload-data-flows-from-csv --auth=$TRANSCEND_API_KEY
|
|
161
166
|
yarn tr-upload-cookies-from-csv --auth=$TRANSCEND_API_KEY
|
|
162
167
|
yarn tr-generate-api-keys --auth=$TRANSCEND_API_KEY
|
|
@@ -188,6 +193,7 @@ tr-skip-request-data-silos --auth=$TRANSCEND_API_KEY
|
|
|
188
193
|
tr-retry-request-data-silos --auth=$TRANSCEND_API_KEY
|
|
189
194
|
tr-update-consent-manager --auth=$TRANSCEND_API_KEY
|
|
190
195
|
tr-pull-consent-metrics --auth=$TRANSCEND_API_KEY
|
|
196
|
+
tr-upload-consent-preferences --auth=$TRANSCEND_API_KEY
|
|
191
197
|
tr-consent-managers-to-business-entities
|
|
192
198
|
tr-consent-manager-service-json-to-yml
|
|
193
199
|
tr-derive-data-silos-from-data-flows --auth=$TRANSCEND_API_KEY
|
|
@@ -1842,6 +1848,57 @@ Bin data hourly vs daily
|
|
|
1842
1848
|
yarn tr-pull-consent-metrics --auth=$TRANSCEND_API_KEY --start=01/01/2023 --bin=1h
|
|
1843
1849
|
```
|
|
1844
1850
|
|
|
1851
|
+
### tr-upload-consent-preferences
|
|
1852
|
+
|
|
1853
|
+
This command allows for updating of consent preferences to the [Managed Consent Database](https://docs.transcend.io/docs/consent/reference/managed-consent-database).
|
|
1854
|
+
|
|
1855
|
+
Each row in the CSV must include:
|
|
1856
|
+
|
|
1857
|
+
| Argument | Description | Type | Default | Required |
|
|
1858
|
+
| --------- | --------------------------------------------------------------------------------------------------------- | ------------------------- | ------- | -------- |
|
|
1859
|
+
| userId | Unique ID identifying the user that the preferences ar efor | string | N/A | true |
|
|
1860
|
+
| timestamp | Timestamp for when consent was collected for that user | string - timestamp | N/A | true |
|
|
1861
|
+
| purposes | JSON map from consent purpose name -> boolean indicating whether user has opted in or out of that purpose | {[k in string]: boolean } | {} | false |
|
|
1862
|
+
| confirmed | Whether consent preferences have been explicitly confirmed or inferred | boolean | true | false |
|
|
1863
|
+
| updated | Time consent preferences were last updated | string - timestamp | N/A | false |
|
|
1864
|
+
| usp | US Privacy string | string - USP | N/A | false |
|
|
1865
|
+
|
|
1866
|
+
#### Authentication
|
|
1867
|
+
|
|
1868
|
+
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
|
|
1869
|
+
to grab your encryption and signing keys.
|
|
1870
|
+
|
|
1871
|
+
#### Arguments
|
|
1872
|
+
|
|
1873
|
+
| Argument | Description | Type | Default | Required |
|
|
1874
|
+
| ------------------- | --------------------------------------------------------------------------------- | ------------- | ---------------------------- | -------- |
|
|
1875
|
+
| base64EncryptionKey | The encyption key used to encrypt the userId | string | N/A | true |
|
|
1876
|
+
| base64SigningKey | The signing key used to prove authentication of consent request | string | N/A | true |
|
|
1877
|
+
| partition | The partition key to upload consent preferences to | string | N/A | true |
|
|
1878
|
+
| file | The file to pull consent preferences from | string - path | ./preferences.csv | false |
|
|
1879
|
+
| transcendUrl | URL of the Transcend backend. Use https://consent.us.transcend.io for US hosting. | string - URL | https://consent.transcend.io | false |
|
|
1880
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
1881
|
+
|
|
1882
|
+
#### Usage
|
|
1883
|
+
|
|
1884
|
+
Upload consent preferences to partition key `4d1c5daa-90b7-4d18-aa40-f86a43d2c726`
|
|
1885
|
+
|
|
1886
|
+
```sh
|
|
1887
|
+
yarn tr-upload-consent-preferences --base64EncryptionKey=$TRANSCEND_CONSENT_ENCRYPTION_KEY --base64SigningKey=$TRANSCEND_CONSENT_SIGNING_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726
|
|
1888
|
+
```
|
|
1889
|
+
|
|
1890
|
+
Upload consent preferences to partition key `4d1c5daa-90b7-4d18-aa40-f86a43d2c726` from file `./consent.csv`
|
|
1891
|
+
|
|
1892
|
+
```sh
|
|
1893
|
+
yarn tr-upload-consent-preferences --base64EncryptionKey=$TRANSCEND_CONSENT_ENCRYPTION_KEY --base64SigningKey=$TRANSCEND_CONSENT_SIGNING_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 --file=./consent.csv
|
|
1894
|
+
```
|
|
1895
|
+
|
|
1896
|
+
Upload consent preferences to partition key `4d1c5daa-90b7-4d18-aa40-f86a43d2c726` and set concurrency
|
|
1897
|
+
|
|
1898
|
+
```sh
|
|
1899
|
+
yarn tr-upload-consent-preferences --base64EncryptionKey=$TRANSCEND_CONSENT_ENCRYPTION_KEY --base64SigningKey=$TRANSCEND_CONSENT_SIGNING_KEY --partition=4d1c5daa-90b7-4d18-aa40-f86a43d2c726 --concurrency=200
|
|
1900
|
+
```
|
|
1901
|
+
|
|
1845
1902
|
### tr-upload-data-flows-from-csv
|
|
1846
1903
|
|
|
1847
1904
|
This command allows for uploading of data flows from CSV.
|
|
@@ -2103,10 +2160,6 @@ Override XDI allowed commands
|
|
|
2103
2160
|
yarn tr-build-xdi-sync-endpoint --auth=$TRANSCEND_API_KEY --xdiLocation=https://cdn.your-site.com/xdi.js --xdiAllowedCommands="ExtractIdentifiers:Simple"
|
|
2104
2161
|
```
|
|
2105
2162
|
|
|
2106
|
-
## Proxy usage
|
|
2107
|
-
|
|
2108
|
-
If you are trying to use the cli inside a corporate firewall and need to send traffic through a proxy, you can do so via the `http_proxy` environment variable or the `--httpProxy` flag, with a command like `yarn tr-pull --auth=$TRANSCEND_API_KEY --httpProxy="http://localhost:5051"`.
|
|
2109
|
-
|
|
2110
2163
|
### tr-create-assessment
|
|
2111
2164
|
|
|
2112
2165
|
This command allows for creating a new assessment form an assessment template.
|
|
@@ -2149,3 +2202,7 @@ Configuring additional variables:
|
|
|
2149
2202
|
```sh
|
|
2150
2203
|
yarn tr-create-assessment --auth=$TRANSCEND_API_KEY --title="Test" --template="[AI Prompt] Product Manager Notes Parsing" --variables=description:"testt test"
|
|
2151
2204
|
```
|
|
2205
|
+
|
|
2206
|
+
## Proxy usage
|
|
2207
|
+
|
|
2208
|
+
If you are trying to use the cli inside a corporate firewall and need to send traffic through a proxy, you can do so via the `http_proxy` environment variable or the `--httpProxy` flag, with a command like `yarn tr-pull --auth=$TRANSCEND_API_KEY --httpProxy="http://localhost:5051"`.
|
|
@@ -19,7 +19,11 @@ export declare function getGitFilesThatChanged({ baseBranch, rootDirectory, gith
|
|
|
19
19
|
}): {
|
|
20
20
|
/** The list of files that changed */
|
|
21
21
|
changedFiles: string[];
|
|
22
|
-
/**
|
|
22
|
+
/** Github repo name */
|
|
23
|
+
repoName: string;
|
|
24
|
+
/** Current commit */
|
|
25
|
+
commit: string;
|
|
26
|
+
/** File diffs */
|
|
23
27
|
fileDiffs: {
|
|
24
28
|
[k in string]: string;
|
|
25
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGitFilesThatChanged.d.ts","sourceRoot":"","sources":["../../src/ai/getGitFilesThatChanged.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,aAAa,EACb,UAAU,EACV,YAAiB,EACjB,aAAkB,GACnB,EAAE;IACD,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,GAAG;IACF,qCAAqC;IACrC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"getGitFilesThatChanged.d.ts","sourceRoot":"","sources":["../../src/ai/getGitFilesThatChanged.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,aAAa,EACb,UAAU,EACV,YAAiB,EACjB,aAAkB,GACnB,EAAE;IACD,kBAAkB;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,GAAG;IACF,qCAAqC;IACrC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,uBAAuB;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB;IACjB,SAAS,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,MAAM;KAAE,CAAC;CACtC,CA0DA"}
|
|
@@ -43,9 +43,13 @@ function getGitFilesThatChanged({ baseBranch, rootDirectory, githubRepo, exclude
|
|
|
43
43
|
});
|
|
44
44
|
fileDiffs[file] = contents;
|
|
45
45
|
});
|
|
46
|
+
// Pull the github repo name
|
|
47
|
+
const repoName = githubRepo.split('/').pop().split('.')[0];
|
|
46
48
|
return {
|
|
47
49
|
changedFiles,
|
|
48
50
|
fileDiffs,
|
|
51
|
+
repoName,
|
|
52
|
+
commit: latestThisCommit,
|
|
49
53
|
};
|
|
50
54
|
}
|
|
51
55
|
exports.getGitFilesThatChanged = getGitFilesThatChanged;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGitFilesThatChanged.js","sourceRoot":"","sources":["../../src/ai/getGitFilesThatChanged.ts"],"names":[],"mappings":";;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AAA,oBAAU,EAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EACjC,aAAa,CACd,CAAC;IAEF,mBAAmB;IACnB,MAAM,eAAe,GACnB,YAAY,CAAC,MAAM,GAAG,CAAC;QACrB,CAAC,CAAC,mBAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;QACvD,CAAC,CAAC,YAAY,CAAC;IAEnB,6CAA6C;IAC7C,MAAM,SAAS,GAA8B,EAAE,CAAC;IAChD,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC/B,MAAM,QAAQ,GAAG,IAAA,wBAAQ,EAAC,YAAY,gBAAgB,IAAI,IAAI,EAAE,EAAE;YAChE,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;QACH,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,4BAA4B;IAC5B,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5D,OAAO;QACL,YAAY;QACZ,SAAS;QACT,QAAQ;QACR,MAAM,EAAE,gBAAgB;KACzB,CAAC;AACJ,CAAC;AApFD,wDAoFC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-upload-consent-preferences.d.ts","sourceRoot":"","sources":["../src/cli-upload-consent-preferences.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,72 @@
|
|
|
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 uploadConsentPreferences_1 = require("./consent-manager/uploadConsentPreferences");
|
|
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.ts --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 --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_CONSENT_API,
|
|
34
|
+
/** base64 encryption key */
|
|
35
|
+
base64EncryptionKey,
|
|
36
|
+
/** base64 signing key */
|
|
37
|
+
base64SigningKey,
|
|
38
|
+
/** Partition key to load into */
|
|
39
|
+
partition,
|
|
40
|
+
/** Concurrency */
|
|
41
|
+
concurrency = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
42
|
+
// Ensure auth is passed
|
|
43
|
+
if (!base64EncryptionKey) {
|
|
44
|
+
logger_1.logger.error(colors_1.default.red('A base64EncryptionKey must be provided. ' +
|
|
45
|
+
'You can specify using --base64EncryptionKey=$TRANSCEND_CONSENT_ENCRYPTION_KEY'));
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
if (!base64SigningKey) {
|
|
49
|
+
logger_1.logger.error(colors_1.default.red('A base64SigningKey must be provided. ' +
|
|
50
|
+
'You can specify using --base64SigningKey=$TRANSCEND_CONSENT_SIGNING_KEY'));
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
// Ensure partition
|
|
54
|
+
if (!partition) {
|
|
55
|
+
logger_1.logger.error(colors_1.default.red('A partition must be provided. ' +
|
|
56
|
+
'You can specify using --partition=ee1a0845-694e-4820-9d51-50c7d0a23467'));
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
// Load in preferences from csv
|
|
60
|
+
const preferences = (0, requests_1.readCsv)(file, uploadConsentPreferences_1.ManagedConsentDatabaseConsentPreference);
|
|
61
|
+
// Upload cookies
|
|
62
|
+
await (0, uploadConsentPreferences_1.uploadConsentPreferences)({
|
|
63
|
+
base64EncryptionKey,
|
|
64
|
+
base64SigningKey,
|
|
65
|
+
preferences,
|
|
66
|
+
partition,
|
|
67
|
+
concurrency: parseInt(concurrency, 10),
|
|
68
|
+
transcendUrl,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
main();
|
|
72
|
+
//# sourceMappingURL=cli-upload-consent-preferences.js.map
|
|
@@ -0,0 +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,yFAGoD;AACpD,yCAAqC;AAErC;;;;;;;;;;;;;GAaG;AACH,KAAK,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@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function to create a consent manager token
|
|
3
|
+
*
|
|
4
|
+
* @see https://docs.transcend.io/docs/consent/reference/managed-consent-database
|
|
5
|
+
* @param userId - User ID
|
|
6
|
+
* @param base64EncryptionKey - Encryption key
|
|
7
|
+
* @param base64SigningKey - Signing key
|
|
8
|
+
* @returns Token
|
|
9
|
+
*/
|
|
10
|
+
export declare function createConsentToken(userId: string, base64EncryptionKey: string, base64SigningKey: string): string;
|
|
11
|
+
//# sourceMappingURL=createConsentToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createConsentToken.d.ts","sourceRoot":"","sources":["../../src/consent-manager/createConsentToken.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,MAAM,EAC3B,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAgCR"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.createConsentToken = void 0;
|
|
27
|
+
const crypto = __importStar(require("crypto"));
|
|
28
|
+
const jwt = __importStar(require("jsonwebtoken"));
|
|
29
|
+
/**
|
|
30
|
+
* Function to create a consent manager token
|
|
31
|
+
*
|
|
32
|
+
* @see https://docs.transcend.io/docs/consent/reference/managed-consent-database
|
|
33
|
+
* @param userId - User ID
|
|
34
|
+
* @param base64EncryptionKey - Encryption key
|
|
35
|
+
* @param base64SigningKey - Signing key
|
|
36
|
+
* @returns Token
|
|
37
|
+
*/
|
|
38
|
+
function createConsentToken(userId, base64EncryptionKey, base64SigningKey) {
|
|
39
|
+
// Read on for where to find these keys
|
|
40
|
+
const signingKey = Buffer.from(base64SigningKey, 'base64');
|
|
41
|
+
const encryptionKey = Buffer.from(base64EncryptionKey, 'base64');
|
|
42
|
+
// NIST's AES-KWP implementation { aes 48 } - see https://tools.ietf.org/html/rfc5649
|
|
43
|
+
const encryptionAlgorithm = 'id-aes256-wrap-pad';
|
|
44
|
+
// Initial Value for AES-KWP integrity check - see https://tools.ietf.org/html/rfc5649#section-3
|
|
45
|
+
const iv = Buffer.from('A65959A6', 'hex');
|
|
46
|
+
// Set up encryption algorithm
|
|
47
|
+
const cipher = crypto.createCipheriv(encryptionAlgorithm, encryptionKey, iv);
|
|
48
|
+
// Encrypt the userId and base64-encode the result
|
|
49
|
+
const encryptedIdentifier = Buffer.concat([
|
|
50
|
+
cipher.update(userId),
|
|
51
|
+
cipher.final(),
|
|
52
|
+
]).toString('base64');
|
|
53
|
+
// Create the JWT content - jwt.sign will add a 'iat' (issued at) field to the payload
|
|
54
|
+
// If you wanted to add something manually, consider
|
|
55
|
+
// const issued: Date = new Date();
|
|
56
|
+
// const isoDate = issued.toISOString();
|
|
57
|
+
const jwtPayload = {
|
|
58
|
+
encryptedIdentifier,
|
|
59
|
+
};
|
|
60
|
+
// Create a JSON web token and HMAC it with SHA-384
|
|
61
|
+
const consentToken = jwt.sign(jwtPayload, signingKey, {
|
|
62
|
+
algorithm: 'HS384',
|
|
63
|
+
});
|
|
64
|
+
return consentToken;
|
|
65
|
+
}
|
|
66
|
+
exports.createConsentToken = createConsentToken;
|
|
67
|
+
//# sourceMappingURL=createConsentToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createConsentToken.js","sourceRoot":"","sources":["../../src/consent-manager/createConsentToken.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,kDAAoC;AAEpC;;;;;;;;GAQG;AACH,SAAgB,kBAAkB,CAChC,MAAc,EACd,mBAA2B,EAC3B,gBAAwB;IAExB,uCAAuC;IACvC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAC3D,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IAEjE,qFAAqF;IACrF,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;IACjD,gGAAgG;IAChG,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1C,8BAA8B;IAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,mBAAmB,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;IAE7E,kDAAkD;IAClD,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;QACrB,MAAM,CAAC,KAAK,EAAE;KACf,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEtB,sFAAsF;IACtF,oDAAoD;IACpD,mCAAmC;IACnC,wCAAwC;IACxC,MAAM,UAAU,GAAG;QACjB,mBAAmB;KACpB,CAAC;IAEF,mDAAmD;IACnD,MAAM,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE;QACpD,SAAS,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC;AACtB,CAAC;AApCD,gDAoCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consent-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/consent-manager/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
|
@@ -21,4 +21,5 @@ __exportStar(require("./pullConsentManagerMetrics"), exports);
|
|
|
21
21
|
__exportStar(require("./buildXdiSyncEndpoint"), exports);
|
|
22
22
|
__exportStar(require("./consentManagersToBusinessEntities"), exports);
|
|
23
23
|
__exportStar(require("./domainToHost"), exports);
|
|
24
|
+
__exportStar(require("./createConsentToken"), exports);
|
|
24
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consent-manager/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAsD;AACtD,2DAAyC;AACzC,yDAAuC;AACvC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/consent-manager/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAsD;AACtD,2DAAyC;AACzC,yDAAuC;AACvC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,iDAA+B;AAC/B,uDAAqC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as t from 'io-ts';
|
|
2
|
+
export declare const USP_STRING_REGEX: RegExp;
|
|
3
|
+
export declare const ManagedConsentDatabaseConsentPreference: t.IntersectionC<[t.TypeC<{
|
|
4
|
+
/** User ID */
|
|
5
|
+
userId: t.StringC;
|
|
6
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
7
|
+
timestamp: t.StringC;
|
|
8
|
+
}>, t.PartialC<{
|
|
9
|
+
/** Purpose map */
|
|
10
|
+
purposes: t.RecordC<t.StringC, t.UnionC<[t.BooleanC, t.LiteralC<"Auto">]>>;
|
|
11
|
+
/** Was tracking consent confirmed by the user? If this is false, the consent was resolved from defaults & is not yet confirmed */
|
|
12
|
+
confirmed: t.BooleanC;
|
|
13
|
+
/** Time updated */
|
|
14
|
+
updated: t.BooleanC;
|
|
15
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
16
|
+
prompted: t.BooleanC;
|
|
17
|
+
/** US Privacy (USP) String */
|
|
18
|
+
usp: t.StringC;
|
|
19
|
+
}>]>;
|
|
20
|
+
/** Type override */
|
|
21
|
+
export type ManagedConsentDatabaseConsentPreference = t.TypeOf<typeof ManagedConsentDatabaseConsentPreference>;
|
|
22
|
+
/**
|
|
23
|
+
* Upload a set of consent preferences
|
|
24
|
+
*
|
|
25
|
+
* @param options - Options
|
|
26
|
+
*/
|
|
27
|
+
export declare function uploadConsentPreferences({ base64EncryptionKey, base64SigningKey, preferences, partition, concurrency, transcendUrl, }: {
|
|
28
|
+
/** base64 encryption key */
|
|
29
|
+
base64EncryptionKey: string;
|
|
30
|
+
/** base64 signing key */
|
|
31
|
+
base64SigningKey: string;
|
|
32
|
+
/** Partition key */
|
|
33
|
+
partition: string;
|
|
34
|
+
/** Sombra API key authentication */
|
|
35
|
+
preferences: ManagedConsentDatabaseConsentPreference[];
|
|
36
|
+
/** API URL for Transcend backend */
|
|
37
|
+
transcendUrl?: string;
|
|
38
|
+
/** Concurrency limit for approving */
|
|
39
|
+
concurrency?: number;
|
|
40
|
+
}): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=uploadConsentPreferences.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadConsentPreferences.d.ts","sourceRoot":"","sources":["../../src/consent-manager/uploadConsentPreferences.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAO3B,eAAO,MAAM,gBAAgB,QAA6B,CAAC;AAE3D,eAAO,MAAM,uCAAuC;IAEhD,cAAc;;IAEd,+FAA+F;;;IAI/F,kBAAkB;;IAElB,kIAAkI;;IAElI,mBAAmB;;IAEnB,sGAAsG;;IAEtG,8BAA8B;;IAGhC,CAAC;AAEH,oBAAoB;AACpB,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAC5D,OAAO,uCAAuC,CAC/C,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,WAAiB,EACjB,YAA4C,GAC7C,EAAE;IACD,4BAA4B;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yBAAyB;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,WAAW,EAAE,uCAAuC,EAAE,CAAC;IACvD,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoGhB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.uploadConsentPreferences = exports.ManagedConsentDatabaseConsentPreference = exports.USP_STRING_REGEX = void 0;
|
|
30
|
+
const graphql_1 = require("../graphql");
|
|
31
|
+
const colors_1 = __importDefault(require("colors"));
|
|
32
|
+
const t = __importStar(require("io-ts"));
|
|
33
|
+
const constants_1 = require("../constants");
|
|
34
|
+
const bluebird_1 = require("bluebird");
|
|
35
|
+
const createConsentToken_1 = require("./createConsentToken");
|
|
36
|
+
const logger_1 = require("../logger");
|
|
37
|
+
const cli_progress_1 = __importDefault(require("cli-progress"));
|
|
38
|
+
exports.USP_STRING_REGEX = /^[0-9][Y|N]([Y|N])[Y|N]$/;
|
|
39
|
+
exports.ManagedConsentDatabaseConsentPreference = t.intersection([
|
|
40
|
+
t.type({
|
|
41
|
+
/** User ID */
|
|
42
|
+
userId: t.string,
|
|
43
|
+
/** Has the consent been updated (including no-change confirmation) since default resolution */
|
|
44
|
+
timestamp: t.string,
|
|
45
|
+
}),
|
|
46
|
+
t.partial({
|
|
47
|
+
/** Purpose map */
|
|
48
|
+
purposes: t.record(t.string, t.union([t.boolean, t.literal('Auto')])),
|
|
49
|
+
/** Was tracking consent confirmed by the user? If this is false, the consent was resolved from defaults & is not yet confirmed */
|
|
50
|
+
confirmed: t.boolean,
|
|
51
|
+
/** Time updated */
|
|
52
|
+
updated: t.boolean,
|
|
53
|
+
/** Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js) */
|
|
54
|
+
prompted: t.boolean,
|
|
55
|
+
/** US Privacy (USP) String */
|
|
56
|
+
usp: t.string,
|
|
57
|
+
}),
|
|
58
|
+
]);
|
|
59
|
+
/**
|
|
60
|
+
* Upload a set of consent preferences
|
|
61
|
+
*
|
|
62
|
+
* @param options - Options
|
|
63
|
+
*/
|
|
64
|
+
async function uploadConsentPreferences({ base64EncryptionKey, base64SigningKey, preferences, partition, concurrency = 100, transcendUrl = constants_1.DEFAULT_TRANSCEND_CONSENT_API, }) {
|
|
65
|
+
// Create connection to API
|
|
66
|
+
const transcendConsentApi = (0, graphql_1.createTranscendConsentGotInstance)(transcendUrl);
|
|
67
|
+
// Ensure usp strings are valid
|
|
68
|
+
const invalidUspStrings = preferences.filter((pref) => pref.usp && !exports.USP_STRING_REGEX.test(pref.usp));
|
|
69
|
+
if (invalidUspStrings.length > 0) {
|
|
70
|
+
throw new Error(`Received invalid usp strings: ${JSON.stringify(invalidUspStrings, null, 2)}`);
|
|
71
|
+
}
|
|
72
|
+
// Ensure usp or preferences are provided
|
|
73
|
+
const invalidInputs = preferences.filter((pref) => !pref.usp && !pref.purposes);
|
|
74
|
+
if (invalidInputs.length > 0) {
|
|
75
|
+
throw new Error(`Received invalid inputs, expected either purposes or usp to be defined: ${JSON.stringify(invalidInputs, null, 2)}`);
|
|
76
|
+
}
|
|
77
|
+
logger_1.logger.info(colors_1.default.magenta(`Uploading ${preferences.length} user preferences to partition ${partition}`));
|
|
78
|
+
// Time duration
|
|
79
|
+
const t0 = new Date().getTime();
|
|
80
|
+
// create a new progress bar instance and use shades_classic theme
|
|
81
|
+
const progressBar = new cli_progress_1.default.SingleBar({}, cli_progress_1.default.Presets.shades_classic);
|
|
82
|
+
// Build a GraphQL client
|
|
83
|
+
let total = 0;
|
|
84
|
+
progressBar.start(preferences.length, 0);
|
|
85
|
+
await (0, bluebird_1.map)(preferences, async ({ userId, confirmed = true, purposes, ...consent }) => {
|
|
86
|
+
const token = (0, createConsentToken_1.createConsentToken)(userId, base64EncryptionKey, base64SigningKey);
|
|
87
|
+
// parse usp string
|
|
88
|
+
const [, saleStatus] = consent.usp
|
|
89
|
+
? exports.USP_STRING_REGEX.exec(consent.usp) || []
|
|
90
|
+
: [];
|
|
91
|
+
const input = {
|
|
92
|
+
token,
|
|
93
|
+
partition,
|
|
94
|
+
consent: {
|
|
95
|
+
confirmed,
|
|
96
|
+
purposes: purposes || (consent.usp ? { SaleOfInfo: saleStatus === 'Y' } : {}),
|
|
97
|
+
...consent,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
// Make the request
|
|
101
|
+
await transcendConsentApi
|
|
102
|
+
.post('sync', {
|
|
103
|
+
json: input,
|
|
104
|
+
})
|
|
105
|
+
.json();
|
|
106
|
+
total += 1;
|
|
107
|
+
progressBar.update(total);
|
|
108
|
+
}, { concurrency });
|
|
109
|
+
progressBar.stop();
|
|
110
|
+
const t1 = new Date().getTime();
|
|
111
|
+
const totalTime = t1 - t0;
|
|
112
|
+
logger_1.logger.info(colors_1.default.green(`Successfully uploaded ${preferences.length} user preferences to partition ${partition} in "${totalTime / 1000}" seconds!`));
|
|
113
|
+
}
|
|
114
|
+
exports.uploadConsentPreferences = uploadConsentPreferences;
|
|
115
|
+
//# sourceMappingURL=uploadConsentPreferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uploadConsentPreferences.js","sourceRoot":"","sources":["../../src/consent-manager/uploadConsentPreferences.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA+D;AAC/D,oDAA4B;AAC5B,yCAA2B;AAC3B,4CAA6D;AAC7D,uCAA+B;AAC/B,6DAA0D;AAC1D,sCAAmC;AACnC,gEAAuC;AAE1B,QAAA,gBAAgB,GAAG,0BAA0B,CAAC;AAE9C,QAAA,uCAAuC,GAAG,CAAC,CAAC,YAAY,CAAC;IACpE,CAAC,CAAC,IAAI,CAAC;QACL,cAAc;QACd,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,+FAA+F;QAC/F,SAAS,EAAE,CAAC,CAAC,MAAM;KACpB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,kBAAkB;QAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACrE,kIAAkI;QAClI,SAAS,EAAE,CAAC,CAAC,OAAO;QACpB,mBAAmB;QACnB,O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C,IAAI,EAAE,CAAC;IACnB,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,CAAC;IAE1B,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,yBACE,WAAW,CAAC,MACd,kCAAkC,SAAS,QACzC,SAAS,GAAG,IACd,YAAY,CACb,CACF,CAAC;AACJ,CAAC;AAxHD,4DAwHC"}
|
package/build/constants.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ export declare const ADMIN_DASH_INTEGRATIONS: string;
|
|
|
7
7
|
* TRANSCEND_API_URL=https://api.us.transcend.io tr-pull ...
|
|
8
8
|
*/
|
|
9
9
|
export declare const DEFAULT_TRANSCEND_API: string;
|
|
10
|
+
/**
|
|
11
|
+
* Override default transcend API url using
|
|
12
|
+
* TRANSCEND_API_URL=https://consent.us.transcend.io tr-pull ...
|
|
13
|
+
*/
|
|
14
|
+
export declare const DEFAULT_TRANSCEND_CONSENT_API: string;
|
|
10
15
|
/**
|
|
11
16
|
* Mapping between resource type and scopes required for cli
|
|
12
17
|
*/
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,6BAA6B,CAAC;AAErD,eAAO,MAAM,uBAAuB,QAA8C,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAC2B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE;KACtC,CAAC,IAAI,qBAAqB,GAAG,SAAS,EAAE;CAuB1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE;KACtC,CAAC,IAAI,qBAAqB,GAAG,SAAS,EAAE;CAqB1C,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,UAAU,6BAA6B,CAAC;AAErD,eAAO,MAAM,uBAAuB,QAA8C,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAC2B,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,QAC+B,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE;KACtC,CAAC,IAAI,qBAAqB,GAAG,SAAS,EAAE;CAuB1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE;KACtC,CAAC,IAAI,qBAAqB,GAAG,SAAS,EAAE;CAqB1C,CAAC"}
|
package/build/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TR_PULL_RESOURCE_SCOPE_MAP = exports.TR_PUSH_RESOURCE_SCOPE_MAP = exports.DEFAULT_TRANSCEND_API = exports.ADMIN_DASH_INTEGRATIONS = exports.ADMIN_DASH = void 0;
|
|
3
|
+
exports.TR_PULL_RESOURCE_SCOPE_MAP = exports.TR_PUSH_RESOURCE_SCOPE_MAP = exports.DEFAULT_TRANSCEND_CONSENT_API = exports.DEFAULT_TRANSCEND_API = exports.ADMIN_DASH_INTEGRATIONS = exports.ADMIN_DASH = void 0;
|
|
4
4
|
const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
5
5
|
const enums_1 = require("./enums");
|
|
6
6
|
exports.ADMIN_DASH = 'https://app.transcend.io';
|
|
@@ -10,6 +10,11 @@ exports.ADMIN_DASH_INTEGRATIONS = `${exports.ADMIN_DASH}/infrastructure/integrat
|
|
|
10
10
|
* TRANSCEND_API_URL=https://api.us.transcend.io tr-pull ...
|
|
11
11
|
*/
|
|
12
12
|
exports.DEFAULT_TRANSCEND_API = process.env.TRANSCEND_API_URL || 'https://api.transcend.io';
|
|
13
|
+
/**
|
|
14
|
+
* Override default transcend API url using
|
|
15
|
+
* TRANSCEND_API_URL=https://consent.us.transcend.io tr-pull ...
|
|
16
|
+
*/
|
|
17
|
+
exports.DEFAULT_TRANSCEND_CONSENT_API = process.env.TRANSCEND_CONSENT_API_URL || 'https://consent.transcend.io';
|
|
13
18
|
/**
|
|
14
19
|
* Mapping between resource type and scopes required for cli
|
|
15
20
|
*/
|
package/build/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAwD;AACxD,mCAAgD;AAEnC,QAAA,UAAU,GAAG,0BAA0B,CAAC;AAExC,QAAA,uBAAuB,GAAG,GAAG,kBAAU,8BAA8B,CAAC;AAEnF;;;GAGG;AACU,QAAA,qBAAqB,GAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,0BAA0B,CAAC;AAE9D;;GAEG;AACU,QAAA,0BAA0B,GAEnC;IACF,CAAC,6BAAqB,CAAC,OAAO,CAAC,EAAE,CAAC,yBAAS,CAAC,WAAW,CAAC;IACxD,CAAC,6BAAqB,CAAC,SAAS,CAAC,EAAE,CAAC,yBAAS,CAAC,oBAAoB,CAAC;IACnE,CAAC,6BAAqB,CAAC,SAAS,CAAC,EAAE;QACjC,yBAAS,CAAC,aAAa;QACvB,yBAAS,CAAC,gBAAgB;KAC3B;IACD,CAAC,6BAAqB,CAAC,SAAS,CAAC,EAAE,CAAC,yBAAS,CAAC,uBAAuB,CAAC;IACtE,CAAC,6BAAqB,CAAC,gBAAgB,CAAC,EAAE,CAAC,yBAAS,CAAC,mBAAmB,CAAC;IACzE,CAAC,6B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,yBAAS,CAAC,8BAA8B;KACzC;IACD,CAAC,6BAAqB,CAAC,SAAS,CAAC,EAAE,CAAC,yBAAS,CAAC,2BAA2B,CAAC;IAC1E,CAAC,6BAAqB,CAAC,gBAAgB,CAAC,EAAE,CAAC,yBAAS,CAAC,iBAAiB,CAAC;IACvE,CAAC,6BAAqB,CAAC,WAAW,CAAC,EAAE,CAAC,yBAAS,CAAC,2BAA2B,CAAC;IAC5E,CAAC,6BAAqB,CAAC,UAAU,CAAC,EAAE,CAAC,yBAAS,CAAC,oBAAoB,CAAC;IACpE,CAAC,6BAAqB,CAAC,SAAS,CAAC,EAAE,CAAC,yBAAS,CAAC,YAAY,CAAC;IAC3D,CAAC,6BAAqB,CAAC,OAAO,CAAC,EAAE,CAAC,yBAAS,CAAC,YAAY,CAAC;IACzD,CAAC,6BAAqB,CAAC,cAAc,CAAC,EAAE,CAAC,yBAAS,CAAC,kBAAkB,CAAC;IACtE,CAAC,6BAAqB,CAAC,OAAO,CAAC,EAAE,CAAC,yBAAS,CAAC,8BAA8B,CAAC;IAC3E,CAAC,6BAAqB,CAAC,YAAY,CAAC,EAAE;QACpC,yBAAS,CAAC,8BAA8B;KACzC;IACD,CAAC,6BAAqB,CAAC,UAAU,CAAC,EAAE,CAAC,yBAAS,CAAC,eAAe,CAAC;IAC/D,CAAC,6BAAqB,CAAC,kBAAkB,CAAC,EAAE,CAAC,yBAAS,CAAC,eAAe,CAAC;CACxE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Got } from 'got';
|
|
2
|
+
/**
|
|
3
|
+
* Instantiate an instance of got that is capable of making requests
|
|
4
|
+
* to a sombra gateway.
|
|
5
|
+
*
|
|
6
|
+
* @param transcendUrl - URL of Transcend API
|
|
7
|
+
* @returns The instance of got that is capable of making requests to the customer ingress
|
|
8
|
+
*/
|
|
9
|
+
export declare function createTranscendConsentGotInstance(transcendUrl: string): Got;
|
|
10
|
+
//# sourceMappingURL=createTranscendConsentGotInstance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTranscendConsentGotInstance.d.ts","sourceRoot":"","sources":["../../src/graphql/createTranscendConsentGotInstance.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,CAK3E"}
|