@transcend-io/cli 4.12.0 → 4.14.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 +156 -14
- package/build/cli-request-upload.d.ts +3 -0
- package/build/cli-request-upload.d.ts.map +1 -0
- package/build/cli-request-upload.js +63 -0
- package/build/cli-request-upload.js.map +1 -0
- package/build/graphql/fetchAllAttributeKeys.d.ts +17 -0
- package/build/graphql/fetchAllAttributeKeys.d.ts.map +1 -0
- package/build/graphql/fetchAllAttributeKeys.js +32 -0
- package/build/graphql/fetchAllAttributeKeys.js.map +1 -0
- package/build/graphql/gqls/attributeKey.d.ts +2 -0
- package/build/graphql/gqls/attributeKey.d.ts.map +1 -0
- package/build/graphql/gqls/attributeKey.js +20 -0
- package/build/graphql/gqls/attributeKey.js.map +1 -0
- package/build/graphql/gqls/enricher.d.ts +10 -0
- package/build/graphql/gqls/enricher.d.ts.map +1 -1
- package/build/graphql/gqls/enricher.js +11 -1
- package/build/graphql/gqls/enricher.js.map +1 -1
- package/build/graphql/gqls/index.d.ts +1 -0
- package/build/graphql/gqls/index.d.ts.map +1 -1
- package/build/graphql/gqls/index.js +1 -0
- package/build/graphql/gqls/index.js.map +1 -1
- package/build/graphql/index.d.ts +1 -0
- package/build/graphql/index.d.ts.map +1 -1
- package/build/graphql/index.js +1 -0
- package/build/graphql/index.js.map +1 -1
- package/build/requests/constants.d.ts +56 -5
- package/build/requests/constants.d.ts.map +1 -1
- package/build/requests/constants.js +33 -3
- package/build/requests/constants.js.map +1 -1
- package/build/requests/extractClientError.d.ts +8 -0
- package/build/requests/extractClientError.d.ts.map +1 -0
- package/build/requests/extractClientError.js +15 -0
- package/build/requests/extractClientError.js.map +1 -0
- package/build/requests/fuzzyMatchColumns.d.ts +3 -2
- package/build/requests/fuzzyMatchColumns.d.ts.map +1 -1
- package/build/requests/fuzzyMatchColumns.js +4 -2
- package/build/requests/fuzzyMatchColumns.js.map +1 -1
- package/build/requests/index.d.ts +4 -0
- package/build/requests/index.d.ts.map +1 -1
- package/build/requests/index.js +4 -0
- package/build/requests/index.js.map +1 -1
- package/build/requests/mapColumnsToAttributes.d.ts +22 -0
- package/build/requests/mapColumnsToAttributes.d.ts.map +1 -0
- package/build/requests/mapColumnsToAttributes.js +47 -0
- package/build/requests/mapColumnsToAttributes.js.map +1 -0
- package/build/requests/mapColumnsToIdentifiers.d.ts +20 -0
- package/build/requests/mapColumnsToIdentifiers.d.ts.map +1 -0
- package/build/requests/mapColumnsToIdentifiers.js +51 -0
- package/build/requests/mapColumnsToIdentifiers.js.map +1 -0
- package/build/requests/mapCsvColumnsToApi.d.ts.map +1 -1
- package/build/requests/mapCsvColumnsToApi.js +1 -1
- package/build/requests/mapCsvColumnsToApi.js.map +1 -1
- package/build/requests/mapCsvRowsToRequestInputs.d.ts +31 -7
- package/build/requests/mapCsvRowsToRequestInputs.d.ts.map +1 -1
- package/build/requests/mapCsvRowsToRequestInputs.js +121 -38
- package/build/requests/mapCsvRowsToRequestInputs.js.map +1 -1
- package/build/requests/mapRequestEnumValues.d.ts.map +1 -1
- package/build/requests/mapRequestEnumValues.js +8 -4
- package/build/requests/mapRequestEnumValues.js.map +1 -1
- package/build/requests/parseAttributesFromString.js +1 -1
- package/build/requests/parseAttributesFromString.js.map +1 -1
- package/build/requests/submitPrivacyRequest.d.ts +7 -5
- package/build/requests/submitPrivacyRequest.d.ts.map +1 -1
- package/build/requests/submitPrivacyRequest.js +23 -6
- package/build/requests/submitPrivacyRequest.js.map +1 -1
- package/build/requests/uploadPrivacyRequestsFromCsv.d.ts +43 -0
- package/build/requests/uploadPrivacyRequestsFromCsv.d.ts.map +1 -0
- package/build/requests/uploadPrivacyRequestsFromCsv.js +220 -0
- package/build/requests/uploadPrivacyRequestsFromCsv.js.map +1 -0
- package/build/tsbuildinfo +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -5,14 +5,22 @@
|
|
|
5
5
|
|
|
6
6
|
- [Overview](#overview)
|
|
7
7
|
- [Installation](#installation)
|
|
8
|
-
- [Authentication](#authentication)
|
|
9
8
|
- [transcend.yml](#transcendyml)
|
|
10
9
|
- [Usage](#usage)
|
|
11
10
|
- [tr-pull](#tr-pull)
|
|
11
|
+
- [Authentication](#authentication)
|
|
12
|
+
- [Usage](#usage-1)
|
|
12
13
|
- [tr-push](#tr-push)
|
|
14
|
+
- [Authentication](#authentication-1)
|
|
15
|
+
- [Usage](#usage-2)
|
|
13
16
|
- [CI Integration](#ci-integration)
|
|
14
17
|
- [Dynamic Variables](#dynamic-variables)
|
|
15
18
|
- [tr-discover-silos](#tr-discover-silos)
|
|
19
|
+
- [Authentication](#authentication-2)
|
|
20
|
+
- [Usage](#usage-3)
|
|
21
|
+
- [tr-request-upload](#tr-request-upload)
|
|
22
|
+
- [Authentication](#authentication-3)
|
|
23
|
+
- [Usage](#usage-4)
|
|
16
24
|
|
|
17
25
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
18
26
|
|
|
@@ -34,6 +42,7 @@ yarn add -D @transcend-io/cli
|
|
|
34
42
|
yarn tr-pull --auth=xxx
|
|
35
43
|
yarn tr-push --auth=xxx
|
|
36
44
|
yarn tr-discover-silos --auth=xxx
|
|
45
|
+
yarn tr-request-upload --auth=xxx
|
|
37
46
|
```
|
|
38
47
|
|
|
39
48
|
or
|
|
@@ -46,6 +55,7 @@ npm i -D @transcend-io/cli
|
|
|
46
55
|
tr-pull --auth=xxx
|
|
47
56
|
tr-push --auth=xxx
|
|
48
57
|
tr-discover-silos --auth=xxx
|
|
58
|
+
tr-request-upload --auth=xxx
|
|
49
59
|
```
|
|
50
60
|
|
|
51
61
|
alternatively, you can install the cli globally on your machine:
|
|
@@ -58,21 +68,9 @@ npm i -g @transcend-io/cli
|
|
|
58
68
|
tr-pull --auth=xxx
|
|
59
69
|
tr-push --auth=xxx
|
|
60
70
|
tr-discover-silos --auth=xxx
|
|
71
|
+
tr-request-upload --auth=xxx
|
|
61
72
|
```
|
|
62
73
|
|
|
63
|
-
## Authentication
|
|
64
|
-
|
|
65
|
-
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).
|
|
66
|
-
|
|
67
|
-
The API key needs the following scopes:
|
|
68
|
-
|
|
69
|
-
- Manage Data Map
|
|
70
|
-
- Manage Request Identity Verification
|
|
71
|
-
- Connect Data Silos
|
|
72
|
-
- Manage Data Subject Request Settings
|
|
73
|
-
- View API Keys
|
|
74
|
-
- Manage Email Templates
|
|
75
|
-
|
|
76
74
|
## transcend.yml
|
|
77
75
|
|
|
78
76
|
Within your git repositories, you can define a file `transcend.yml`. This file allows you define part of your Data Map in code. Using the cli, you can sync that configuration back to the Transcend Admin Dashboard (https://app.transcend.io/privacy-requests/connected-services).
|
|
@@ -175,6 +173,22 @@ This command can be helpful if you are looking to:
|
|
|
175
173
|
- Copy parts of your Data Map from one Transcend instance into another instance
|
|
176
174
|
- Generate a transcend.yml file as a starting point to maintain parts of your Data Map in code
|
|
177
175
|
|
|
176
|
+
#### Authentication
|
|
177
|
+
|
|
178
|
+
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).
|
|
179
|
+
|
|
180
|
+
The API key needs the following scopes:
|
|
181
|
+
|
|
182
|
+
- View Data Map
|
|
183
|
+
- View Identity Verification Settings
|
|
184
|
+
- View Data Subject Request Settings
|
|
185
|
+
- View API Keys
|
|
186
|
+
- View Email Templates
|
|
187
|
+
|
|
188
|
+
_Note: The scopes for tr-push are comprehensive of the scopes for tr-pull_
|
|
189
|
+
|
|
190
|
+
#### Usage
|
|
191
|
+
|
|
178
192
|
```sh
|
|
179
193
|
# Writes out file to ./transcend.yml
|
|
180
194
|
tr-pull --auth=<api-key>
|
|
@@ -217,6 +231,21 @@ Note: This command will overwrite the existing transcend.yml file that you have
|
|
|
217
231
|
|
|
218
232
|
Given a transcend.yml file, sync the contents up to your connected services view (https://app.transcend.io/privacy-requests/connected-services).
|
|
219
233
|
|
|
234
|
+
#### Authentication
|
|
235
|
+
|
|
236
|
+
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).
|
|
237
|
+
|
|
238
|
+
The API key needs the following scopes:
|
|
239
|
+
|
|
240
|
+
- Manage Data Map
|
|
241
|
+
- Manage Request Identity Verification
|
|
242
|
+
- Connect Data Silos
|
|
243
|
+
- Manage Data Subject Request Settings
|
|
244
|
+
- View API Keys
|
|
245
|
+
- Manage Email Templates
|
|
246
|
+
|
|
247
|
+
#### Usage
|
|
248
|
+
|
|
220
249
|
```sh
|
|
221
250
|
# Looks for file at ./transcend.yml
|
|
222
251
|
tr-push --auth=<api-key>
|
|
@@ -327,6 +356,17 @@ Transcend can help scan dependency management files to help detect new data silo
|
|
|
327
356
|
|
|
328
357
|
To get started, you'll need to add a data silo for the corresponding project type with "silo discovery" plugin enabled. For example, if you want to scan a JavaScript project, add a JavaScript package.json data silo. You can do this in the Transcend admin-dashboard (or via this CLI tooling).
|
|
329
358
|
|
|
359
|
+
#### Authentication
|
|
360
|
+
|
|
361
|
+
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).
|
|
362
|
+
|
|
363
|
+
The API key needs the following scopes:
|
|
364
|
+
|
|
365
|
+
- Manage Assigned Data Inventory
|
|
366
|
+
- [Data Silo for Scanner]
|
|
367
|
+
|
|
368
|
+
#### Usage
|
|
369
|
+
|
|
330
370
|
Then, you'll need to grab that `dataSiloId` and a Transcend API key and pass it to the CLI. Using JavaScript package.json as an example:
|
|
331
371
|
|
|
332
372
|
```sh
|
|
@@ -344,3 +384,105 @@ You can include additional arguments as well:
|
|
|
344
384
|
| dataSiloID | The UUID of the corresponding data silo. |
|
|
345
385
|
| auth | Transcend API key. |
|
|
346
386
|
| fileGlobs | You can pass a [glob syntax pattern(s)](https://github.com/mrmlnc/fast-glob) to specify additional file paths to scan in addition to the default (ex: package.json). |
|
|
387
|
+
|
|
388
|
+
### tr-request-upload
|
|
389
|
+
|
|
390
|
+
If you need to upload a set of requests from a CSV, you can run this command.
|
|
391
|
+
This command uses [inquirer](https://github.com/SBoudrias/Inquirer.js/) to prompt the user to
|
|
392
|
+
map the shape of the CSV to the shape of the Transcend API. There is no requirement for the
|
|
393
|
+
shape of the incoming CSV, as the script will handle the mapping process.
|
|
394
|
+
|
|
395
|
+
The script will also produce a JSON cache file, that allows for the mappings to be preserved between runs.
|
|
396
|
+
This can be useful if you have the same CSV shape that needs to be imported multiple times.
|
|
397
|
+
Once the mapping process is done once, it does not need to be done again.
|
|
398
|
+
|
|
399
|
+
Additionally, the JSON cache file will store the result of any privacy requests that fail to be uploaded.
|
|
400
|
+
This allows for the script to continue uploading requests even if some requests error out. The script
|
|
401
|
+
user can then inspect the errors, and decide whether it is necessary to re-run those requests.
|
|
402
|
+
|
|
403
|
+
https://user-images.githubusercontent.com/10264973/205477183-d4762087-668c-43f1-a84c-0fce0ec3e132.mov
|
|
404
|
+
|
|
405
|
+
#### Authentication
|
|
406
|
+
|
|
407
|
+
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).
|
|
408
|
+
|
|
409
|
+
The API key needs the following scopes:
|
|
410
|
+
|
|
411
|
+
- Submit New Data Subject Request
|
|
412
|
+
- View Identity Verification Settings
|
|
413
|
+
- View Global Attributes
|
|
414
|
+
|
|
415
|
+
### Usage
|
|
416
|
+
|
|
417
|
+
```sh
|
|
418
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
For self-hosted sombras that use an internal key:
|
|
422
|
+
|
|
423
|
+
```sh
|
|
424
|
+
yarn tr-request-upload --auth=<api-key> --sombraAuth=<sombra-internal-key> --file=/Users/michaelfarrell/Desktop/test.csv
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
Run without being prompted to filter requests
|
|
428
|
+
|
|
429
|
+
```sh
|
|
430
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --skipFilterStep=true
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
Perform a dry run to see what will be uploaded, without calling the Transcend API to upload the request
|
|
434
|
+
|
|
435
|
+
```sh
|
|
436
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --dryRun=true
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
Mark the uploaded requests as test requests
|
|
440
|
+
|
|
441
|
+
```sh
|
|
442
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --isTest=true
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Send email communications to the users throughout the request lifecycle.
|
|
446
|
+
|
|
447
|
+
```sh
|
|
448
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --isSilent=false
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
Send email verification to user before request continues.
|
|
452
|
+
|
|
453
|
+
```sh
|
|
454
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
455
|
+
--isSilent=false --emailIsVerified=false
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
Increase the concurrency (defaults to 20)
|
|
459
|
+
|
|
460
|
+
```sh
|
|
461
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --concurrency=20
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Tag all uploaded requests with an attribute
|
|
465
|
+
|
|
466
|
+
```sh
|
|
467
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
468
|
+
--attributes=Tags:transcend-cli;my-customer-tag,Customer:acme-corp
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
Clear out the cache of failed and successful requests
|
|
472
|
+
|
|
473
|
+
```sh
|
|
474
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
475
|
+
--clearFailingRequests=true --clearSuccessfulRequests=true --clearDuplicateRequests=true
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
Specify default country code for phone numbers
|
|
479
|
+
|
|
480
|
+
```sh
|
|
481
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --defaultPhoneCountryCode=44
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
Include debug logs - warning, this logs out personal data.
|
|
485
|
+
|
|
486
|
+
```sh
|
|
487
|
+
yarn tr-request-upload --auth=<api-key> --file=/Users/michaelfarrell/Desktop/test.csv --debug=true
|
|
488
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-request-upload.d.ts","sourceRoot":"","sources":["../src/cli-request-upload.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 requests_1 = require("./requests");
|
|
11
|
+
/**
|
|
12
|
+
* Upload a CSV of Privacy Requests.
|
|
13
|
+
*
|
|
14
|
+
* Requirements:
|
|
15
|
+
*
|
|
16
|
+
* 1. Create API key with follow scopes: https://app.transcend.io/infrastructure/api-keys
|
|
17
|
+
* - "Submit New Data Subject Request"
|
|
18
|
+
* - "View Identity Verification Settings"
|
|
19
|
+
* - "View Global Attributes"
|
|
20
|
+
* 2. Invite a new user into the dashboard with no scopes but email/password login (needed for diffie hellman channel)
|
|
21
|
+
*
|
|
22
|
+
* Dev Usage:
|
|
23
|
+
* yarn ts-node ./src/cli-request-upload.ts --auth=asd123 \
|
|
24
|
+
* --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
25
|
+
* --skipFilterStep=true --isTest=true
|
|
26
|
+
*
|
|
27
|
+
* Standard usage:
|
|
28
|
+
* yarn tr-request-upload --auth=asd123 \
|
|
29
|
+
* --file=/Users/michaelfarrell/Desktop/test.csv \
|
|
30
|
+
* --skipFilterStep=true --isTest=true
|
|
31
|
+
*/
|
|
32
|
+
async function main() {
|
|
33
|
+
// Parse command line arguments
|
|
34
|
+
const { file = './requests.csv', transcendApiUrl = 'https://api.transcend.io', cacheFilepath = './transcend-privacy-requests-cache.json', auth, sombraAuth, concurrency = '100', isTest = 'false', isSilent = 'true', defaultPhoneCountryCode = '1', // USA
|
|
35
|
+
emailIsVerified = 'true', clearDuplicateRequests = 'false', clearSuccessfulRequests = 'false', clearFailingRequests = 'false', dryRun = 'false', debug = 'false', skipFilterStep = 'false', attributes = 'Tags:transcend-cli', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
36
|
+
// Ensure auth is passed
|
|
37
|
+
if (!auth) {
|
|
38
|
+
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
// Upload privacy requests
|
|
42
|
+
await (0, requests_1.uploadPrivacyRequestsFromCsv)({
|
|
43
|
+
cacheFilepath,
|
|
44
|
+
file,
|
|
45
|
+
auth,
|
|
46
|
+
sombraAuth,
|
|
47
|
+
clearFailingRequests: clearFailingRequests === 'true',
|
|
48
|
+
concurrency: parseInt(concurrency, 10),
|
|
49
|
+
transcendApiUrl,
|
|
50
|
+
defaultPhoneCountryCode,
|
|
51
|
+
attributes: (0, requests_1.splitCsvToList)(attributes),
|
|
52
|
+
clearDuplicateRequests: clearDuplicateRequests === 'true',
|
|
53
|
+
clearSuccessfulRequests: clearSuccessfulRequests === 'true',
|
|
54
|
+
debug: debug === 'true',
|
|
55
|
+
skipFilterStep: skipFilterStep === 'true',
|
|
56
|
+
isSilent: isSilent === 'true',
|
|
57
|
+
emailIsVerified: emailIsVerified === 'true',
|
|
58
|
+
isTest: isTest === 'true',
|
|
59
|
+
dryRun: dryRun === 'true',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
main();
|
|
63
|
+
//# sourceMappingURL=cli-request-upload.js.map
|
|
@@ -0,0 +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;AAE1E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,gBAAgB,EACvB,eAAe,GAAG,0BAA0B,EAC5C,aAAa,GAAG,yCAAyC,EACzD,IAAI,EACJ,UAAU,EACV,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,EACjB,uBAAuB,GAAG,GAAG,EAAE,MAAM;IACrC,eAAe,GAAG,MAAM,EACxB,sBAAsB,GAAG,OAAO,EAChC,uBAAuB,GAAG,OAAO,EACjC,oBAAoB,GAAG,OAAO,EAC9B,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,2EAA2E,CAC5E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,0BAA0B;IAC1B,MAAM,IAAA,uCAA4B,EAAC;QACjC,aAAa;QACb,IAAI;QACJ,IAAI;QACJ,UAAU;QACV,oBAAoB,EAAE,oBAAoB,KAAK,MAAM;QACrD,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,eAAe;QACf,uBAAuB;QACvB,UAAU,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;QACtC,sBAAsB,EAAE,sBAAsB,KAAK,MAAM;QACzD,uBAAuB,EAAE,uBAAuB,KAAK,MAAM;QAC3D,KAAK,EAAE,KAAK,KAAK,MAAM;QACvB,cAAc,EAAE,cAAc,KAAK,MAAM;QACzC,QAAQ,EAAE,QAAQ,KAAK,MAAM;QAC7B,eAAe,EAAE,eAAe,KAAK,MAAM;QAC3C,MAAM,EAAE,MAAM,KAAK,MAAM;QACzB,MAAM,EAAE,MAAM,KAAK,MAAM;KAC1B,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
export interface AttributeKey {
|
|
3
|
+
/** ID of attribute key */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Name of attribute key */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Attribute key type */
|
|
8
|
+
type: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Fetch all attribute keys enabled for privacy requests
|
|
12
|
+
*
|
|
13
|
+
* @param client - GraphQL client
|
|
14
|
+
* @returns All attribute keys in the organization
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchAllRequestAttributeKeys(client: GraphQLClient): Promise<AttributeKey[]>;
|
|
17
|
+
//# sourceMappingURL=fetchAllAttributeKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAllAttributeKeys.d.ts","sourceRoot":"","sources":["../../src/graphql/fetchAllAttributeKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,YAAY;IAC3B,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAID;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,YAAY,EAAE,CAAC,CA0BzB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchAllRequestAttributeKeys = void 0;
|
|
4
|
+
const gqls_1 = require("./gqls");
|
|
5
|
+
const makeGraphQLRequest_1 = require("./makeGraphQLRequest");
|
|
6
|
+
const PAGE_SIZE = 20;
|
|
7
|
+
/**
|
|
8
|
+
* Fetch all attribute keys enabled for privacy requests
|
|
9
|
+
*
|
|
10
|
+
* @param client - GraphQL client
|
|
11
|
+
* @returns All attribute keys in the organization
|
|
12
|
+
*/
|
|
13
|
+
async function fetchAllRequestAttributeKeys(client) {
|
|
14
|
+
const attributeKeys = [];
|
|
15
|
+
let offset = 0;
|
|
16
|
+
// Try to fetch an enricher with the same title
|
|
17
|
+
let shouldContinue = false;
|
|
18
|
+
do {
|
|
19
|
+
const { attributeKeys: { nodes },
|
|
20
|
+
// eslint-disable-next-line no-await-in-loop
|
|
21
|
+
} = await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.ATTRIBUTE_KEYS_REQUESTS, {
|
|
22
|
+
first: PAGE_SIZE,
|
|
23
|
+
offset,
|
|
24
|
+
});
|
|
25
|
+
attributeKeys.push(...nodes);
|
|
26
|
+
offset += PAGE_SIZE;
|
|
27
|
+
shouldContinue = nodes.length === PAGE_SIZE;
|
|
28
|
+
} while (shouldContinue);
|
|
29
|
+
return attributeKeys;
|
|
30
|
+
}
|
|
31
|
+
exports.fetchAllRequestAttributeKeys = fetchAllRequestAttributeKeys;
|
|
32
|
+
//# sourceMappingURL=fetchAllAttributeKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAllAttributeKeys.js","sourceRoot":"","sources":["../../src/graphql/fetchAllAttributeKeys.ts"],"names":[],"mappings":";;;AACA,iCAAiD;AACjD,6DAA0D;AAW1D,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB;;;;;GAKG;AACI,KAAK,UAAU,4BAA4B,CAChD,MAAqB;IAErB,MAAM,aAAa,GAAmB,EAAE,CAAC;IACzC,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,+CAA+C;IAC/C,IAAI,cAAc,GAAG,KAAK,CAAC;IAC3B,GAAG;QACD,MAAM,EACJ,aAAa,EAAE,EAAE,KAAK,EAAE;QACxB,4CAA4C;UAC7C,GAAG,MAAM,IAAA,uCAAkB,EAMzB,MAAM,EAAE,8BAAuB,EAAE;YAClC,KAAK,EAAE,SAAS;YAChB,MAAM;SACP,CAAC,CAAC;QACH,aAAa,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAC7B,MAAM,IAAI,SAAS,CAAC;QACpB,cAAc,GAAG,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;KAC7C,QAAQ,cAAc,EAAE;IAEzB,OAAO,aAAa,CAAC;AACvB,CAAC;AA5BD,oEA4BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributeKey.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/attributeKey.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,QAcnC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ATTRIBUTE_KEYS_REQUESTS = void 0;
|
|
4
|
+
const graphql_request_1 = require("graphql-request");
|
|
5
|
+
exports.ATTRIBUTE_KEYS_REQUESTS = (0, graphql_request_1.gql) `
|
|
6
|
+
query TranscendCliAttributeKeys($first: Int!, $offset: Int!) {
|
|
7
|
+
attributeKeys(
|
|
8
|
+
filterBy: { enabledOnRequests: true }
|
|
9
|
+
first: $first
|
|
10
|
+
offset: $offset
|
|
11
|
+
) {
|
|
12
|
+
nodes {
|
|
13
|
+
id
|
|
14
|
+
name
|
|
15
|
+
type
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
//# sourceMappingURL=attributeKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attributeKey.js","sourceRoot":"","sources":["../../../src/graphql/gqls/attributeKey.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,uBAAuB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAczC,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export declare const ENRICHERS: string;
|
|
2
|
+
export interface Initializer {
|
|
3
|
+
/** ID of enricher */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Identifiers */
|
|
6
|
+
identifiers: {
|
|
7
|
+
/** Name of identifier */
|
|
8
|
+
name: string;
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
export declare const INITIALIZER: string;
|
|
2
12
|
export declare const CREATE_ENRICHER: string;
|
|
3
13
|
export declare const UPDATE_ENRICHER: string;
|
|
4
14
|
//# sourceMappingURL=enricher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enricher.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/enricher.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAkBrB,CAAC;AAEF,eAAO,MAAM,eAAe,QAyB3B,CAAC;AAEF,eAAO,MAAM,eAAe,QA0B3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"enricher.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/enricher.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAkBrB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB;IAClB,WAAW,EAAE;QACX,yBAAyB;QACzB,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;CACL;AAED,eAAO,MAAM,WAAW,QASvB,CAAC;AAEF,eAAO,MAAM,eAAe,QAyB3B,CAAC;AAEF,eAAO,MAAM,eAAe,QA0B3B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UPDATE_ENRICHER = exports.CREATE_ENRICHER = exports.ENRICHERS = void 0;
|
|
3
|
+
exports.UPDATE_ENRICHER = exports.CREATE_ENRICHER = exports.INITIALIZER = exports.ENRICHERS = void 0;
|
|
4
4
|
const graphql_request_1 = require("graphql-request");
|
|
5
5
|
exports.ENRICHERS = (0, graphql_request_1.gql) `
|
|
6
6
|
query TranscendCliEnrichers($title: String, $first: Int!, $offset: Int!) {
|
|
@@ -21,6 +21,16 @@ exports.ENRICHERS = (0, graphql_request_1.gql) `
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
`;
|
|
24
|
+
exports.INITIALIZER = (0, graphql_request_1.gql) `
|
|
25
|
+
query TranscendCliInitializer {
|
|
26
|
+
initializer {
|
|
27
|
+
id
|
|
28
|
+
identifiers {
|
|
29
|
+
name
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
24
34
|
exports.CREATE_ENRICHER = (0, graphql_request_1.gql) `
|
|
25
35
|
mutation TranscendCliCreateEnricher(
|
|
26
36
|
$title: String!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enricher.js","sourceRoot":"","sources":["../../../src/graphql/gqls/enricher.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBjC,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"enricher.js","sourceRoot":"","sources":["../../../src/graphql/gqls/enricher.ts"],"names":[],"mappings":";;;AAAA,qDAAsC;AAEzB,QAAA,SAAS,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;CAkB3B,CAAC;AAYW,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;CAS7B,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBjC,CAAC;AAEW,QAAA,eAAe,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./apiKey"), exports);
|
|
|
19
19
|
__exportStar(require("./siloDiscovery"), exports);
|
|
20
20
|
__exportStar(require("./template"), exports);
|
|
21
21
|
__exportStar(require("./organization"), exports);
|
|
22
|
+
__exportStar(require("./attributeKey"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graphql/gqls/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B;AAC3B,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,iDAA+B;AAC/B,iDAA+B"}
|
package/build/graphql/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,QAAQ,CAAC;AACvB,cAAc,yBAAyB,CAAC"}
|
package/build/graphql/index.js
CHANGED
|
@@ -24,4 +24,5 @@ __exportStar(require("./makeGraphQLRequest"), exports);
|
|
|
24
24
|
__exportStar(require("./createSombraGotInstance"), exports);
|
|
25
25
|
__exportStar(require("./buildTranscendGraphQLClient"), exports);
|
|
26
26
|
__exportStar(require("./gqls"), exports);
|
|
27
|
+
__exportStar(require("./fetchAllAttributeKeys"), exports);
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA6C;AAC7C,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,+DAA6C;AAC7C,iEAA+C;AAC/C,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,kDAAgC;AAChC,uDAAqC;AACrC,4DAA0C;AAC1C,gEAA8C;AAC9C,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/graphql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA6C;AAC7C,iDAA+B;AAC/B,sDAAoC;AACpC,qDAAmC;AACnC,+DAA6C;AAC7C,iEAA+C;AAC/C,kDAAgC;AAChC,kDAAgC;AAChC,+DAA6C;AAC7C,kDAAgC;AAChC,uDAAqC;AACrC,4DAA0C;AAC1C,gEAA8C;AAC9C,yCAAuB;AACvB,0DAAwC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as t from 'io-ts';
|
|
2
|
-
export declare const NONE
|
|
2
|
+
export declare const NONE: "[NONE]";
|
|
3
|
+
export declare const BULK_APPLY: "[APPLY VALUE TO ALL ROWS]";
|
|
4
|
+
export declare const BLANK: "<blank>";
|
|
3
5
|
/**
|
|
4
6
|
* Column names to map
|
|
5
7
|
*/
|
|
@@ -21,10 +23,16 @@ export declare enum ColumnName {
|
|
|
21
23
|
/** The title of the dataSiloIds column */
|
|
22
24
|
DataSiloIds = "dataSiloIds"
|
|
23
25
|
}
|
|
26
|
+
/** These parameters are required in the Transcend DSR API */
|
|
24
27
|
export declare const IS_REQUIRED: {
|
|
25
28
|
[k in ColumnName]: boolean;
|
|
26
29
|
};
|
|
30
|
+
/** These parameters can be specified for the entire CSV set if needed */
|
|
31
|
+
export declare const CAN_APPLY_IN_BULK: {
|
|
32
|
+
[k in ColumnName]?: boolean;
|
|
33
|
+
};
|
|
27
34
|
export declare const CachedFileState: t.TypeC<{
|
|
35
|
+
/** Mapping between the default request input column names and the CSV column name for that input */
|
|
28
36
|
columnNames: t.PartialC<{
|
|
29
37
|
email: t.StringC;
|
|
30
38
|
coreIdentifier: t.StringC;
|
|
@@ -35,6 +43,11 @@ export declare const CachedFileState: t.TypeC<{
|
|
|
35
43
|
createdAt: t.StringC;
|
|
36
44
|
dataSiloIds: t.StringC;
|
|
37
45
|
}>;
|
|
46
|
+
/** Mapping between the identifier names and the CSV column name for that input */
|
|
47
|
+
identifierNames: t.RecordC<t.StringC, t.StringC>;
|
|
48
|
+
/** Mapping between the request attribute inputs and the CSV column name for that input */
|
|
49
|
+
attributeNames: t.RecordC<t.StringC, t.StringC>;
|
|
50
|
+
/** Mapping between CSV request type and Transcend Request Action */
|
|
38
51
|
requestTypeToRequestAction: t.RecordC<t.StringC, t.KeyofC<{
|
|
39
52
|
ACCESS: unknown;
|
|
40
53
|
ERASURE: unknown;
|
|
@@ -56,7 +69,9 @@ export declare const CachedFileState: t.TypeC<{
|
|
|
56
69
|
TRACKING_OPT_OUT: unknown;
|
|
57
70
|
CUSTOM_OPT_OUT: unknown;
|
|
58
71
|
}>>;
|
|
72
|
+
/** Mapping between CSV data subject type and the name of the data subject in Transcend */
|
|
59
73
|
subjectTypeToSubjectName: t.RecordC<t.StringC, t.StringC>;
|
|
74
|
+
/** Mapping between language imported and Transcend locale code */
|
|
60
75
|
languageToLocale: t.RecordC<t.StringC, t.KeyofC<{
|
|
61
76
|
en: unknown;
|
|
62
77
|
ar: unknown;
|
|
@@ -120,19 +135,34 @@ export declare const CachedFileState: t.TypeC<{
|
|
|
120
135
|
"he-IL": unknown;
|
|
121
136
|
"en-NZ": unknown;
|
|
122
137
|
}>>;
|
|
123
|
-
|
|
138
|
+
/** Mapping between request status in import to Transcend request status */
|
|
124
139
|
statusToRequestStatus: t.RecordC<t.StringC, t.KeyofC<{
|
|
125
|
-
NONE: unknown;
|
|
140
|
+
"[NONE]": unknown;
|
|
126
141
|
FAILED_VERIFICATION: unknown;
|
|
127
142
|
COMPLETED: unknown;
|
|
128
143
|
CANCELED: unknown;
|
|
129
144
|
SECONDARY_COMPLETED: unknown;
|
|
130
145
|
REVOKED: unknown;
|
|
131
146
|
}>>;
|
|
147
|
+
/** Set of privacy requests that failed to upload */
|
|
148
|
+
failingRequests: t.ArrayC<t.RecordC<t.StringC, t.AnyC>>;
|
|
149
|
+
/** Successfully uploaded requests */
|
|
150
|
+
successfulRequests: t.ArrayC<t.TypeC<{
|
|
151
|
+
id: t.StringC;
|
|
152
|
+
link: t.StringC;
|
|
153
|
+
coreIdentifier: t.StringC;
|
|
154
|
+
attemptedAt: t.StringC;
|
|
155
|
+
}>>;
|
|
156
|
+
/** Duplicate requests */
|
|
157
|
+
duplicateRequests: t.ArrayC<t.TypeC<{
|
|
158
|
+
coreIdentifier: t.StringC;
|
|
159
|
+
attemptedAt: t.StringC;
|
|
160
|
+
}>>;
|
|
132
161
|
}>;
|
|
133
162
|
/** Type override */
|
|
134
163
|
export declare type CachedFileState = t.TypeOf<typeof CachedFileState>;
|
|
135
164
|
export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
|
|
165
|
+
/** Mapping between the default request input column names and the CSV column name for that input */
|
|
136
166
|
columnNames: t.PartialC<{
|
|
137
167
|
email: t.StringC;
|
|
138
168
|
coreIdentifier: t.StringC;
|
|
@@ -143,6 +173,11 @@ export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
|
|
|
143
173
|
createdAt: t.StringC;
|
|
144
174
|
dataSiloIds: t.StringC;
|
|
145
175
|
}>;
|
|
176
|
+
/** Mapping between the identifier names and the CSV column name for that input */
|
|
177
|
+
identifierNames: t.RecordC<t.StringC, t.StringC>;
|
|
178
|
+
/** Mapping between the request attribute inputs and the CSV column name for that input */
|
|
179
|
+
attributeNames: t.RecordC<t.StringC, t.StringC>;
|
|
180
|
+
/** Mapping between CSV request type and Transcend Request Action */
|
|
146
181
|
requestTypeToRequestAction: t.RecordC<t.StringC, t.KeyofC<{
|
|
147
182
|
ACCESS: unknown;
|
|
148
183
|
ERASURE: unknown;
|
|
@@ -164,7 +199,9 @@ export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
|
|
|
164
199
|
TRACKING_OPT_OUT: unknown;
|
|
165
200
|
CUSTOM_OPT_OUT: unknown;
|
|
166
201
|
}>>;
|
|
202
|
+
/** Mapping between CSV data subject type and the name of the data subject in Transcend */
|
|
167
203
|
subjectTypeToSubjectName: t.RecordC<t.StringC, t.StringC>;
|
|
204
|
+
/** Mapping between language imported and Transcend locale code */
|
|
168
205
|
languageToLocale: t.RecordC<t.StringC, t.KeyofC<{
|
|
169
206
|
en: unknown;
|
|
170
207
|
ar: unknown;
|
|
@@ -228,14 +265,28 @@ export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
|
|
|
228
265
|
"he-IL": unknown;
|
|
229
266
|
"en-NZ": unknown;
|
|
230
267
|
}>>;
|
|
231
|
-
|
|
268
|
+
/** Mapping between request status in import to Transcend request status */
|
|
232
269
|
statusToRequestStatus: t.RecordC<t.StringC, t.KeyofC<{
|
|
233
|
-
NONE: unknown;
|
|
270
|
+
"[NONE]": unknown;
|
|
234
271
|
FAILED_VERIFICATION: unknown;
|
|
235
272
|
COMPLETED: unknown;
|
|
236
273
|
CANCELED: unknown;
|
|
237
274
|
SECONDARY_COMPLETED: unknown;
|
|
238
275
|
REVOKED: unknown;
|
|
239
276
|
}>>;
|
|
277
|
+
/** Set of privacy requests that failed to upload */
|
|
278
|
+
failingRequests: t.ArrayC<t.RecordC<t.StringC, t.AnyC>>;
|
|
279
|
+
/** Successfully uploaded requests */
|
|
280
|
+
successfulRequests: t.ArrayC<t.TypeC<{
|
|
281
|
+
id: t.StringC;
|
|
282
|
+
link: t.StringC;
|
|
283
|
+
coreIdentifier: t.StringC;
|
|
284
|
+
attemptedAt: t.StringC;
|
|
285
|
+
}>>;
|
|
286
|
+
/** Duplicate requests */
|
|
287
|
+
duplicateRequests: t.ArrayC<t.TypeC<{
|
|
288
|
+
coreIdentifier: t.StringC;
|
|
289
|
+
attemptedAt: t.StringC;
|
|
290
|
+
}>>;
|
|
240
291
|
}>>;
|
|
241
292
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/requests/constants.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAE3B,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/requests/constants.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAE3B,eAAO,MAAM,IAAI,UAAoB,CAAC;AACtC,eAAO,MAAM,UAAU,6BAAuC,CAAC;AAC/D,eAAO,MAAM,KAAK,WAAqB,CAAC;AAExC;;GAEG;AACH,oBAAY,UAAU;IACpB,oCAAoC;IACpC,KAAK,UAAU;IACf,8CAA8C;IAC9C,cAAc,mBAAmB;IACjC,0CAA0C;IAC1C,WAAW,gBAAgB;IAC3B,0CAA0C;IAC1C,WAAW,gBAAgB;IAC3B,qCAAqC;IACrC,MAAM,WAAW;IACjB,4CAA4C;IAC5C,aAAa,kBAAkB;IAC/B,wCAAwC;IACxC,SAAS,cAAc;IACvB,0CAA0C;IAC1C,WAAW,gBAAgB;CAC5B;AAED,6DAA6D;AAC7D,eAAO,MAAM,WAAW,EAAE;KAAG,CAAC,IAAI,UAAU,GAAG,OAAO;CASrD,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,EAAE;KAAG,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,OAAO;CAG5D,CAAC;AAGF,eAAO,MAAM,eAAe;IAC1B,oGAAoG;;;;;;;;;;;IAEpG,kFAAkF;;IAElF,0FAA0F;;IAE1F,oEAAoE;;;;;;;;;;;;;;;;;;;;;;IAEpE,0FAA0F;;IAE1F,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAElE,2EAA2E;;;;;;;;;IAK3E,oDAAoD;;IAEpD,qCAAqC;;;;;;;IASrC,yBAAyB;;;;;EAOzB,CAAC;AAEH,oBAAoB;AACpB,oBAAY,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,eAAO,MAAM,WAAW;IAxCtB,oGAAoG;;;;;;;;;;;IAEpG,kFAAkF;;IAElF,0FAA0F;;IAE1F,oEAAoE;;;;;;;;;;;;;;;;;;;;;;IAEpE,0FAA0F;;IAE1F,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAElE,2EAA2E;;;;;;;;;IAK3E,oDAAoD;;IAEpD,qCAAqC;;;;;;;IASrC,yBAAyB;;;;;GAYmC,CAAC"}
|