@transcend-io/cli 4.12.0 → 4.13.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.
Files changed (62) hide show
  1. package/README.md +137 -14
  2. package/build/cli-request-upload.d.ts +3 -0
  3. package/build/cli-request-upload.d.ts.map +1 -0
  4. package/build/cli-request-upload.js +57 -0
  5. package/build/cli-request-upload.js.map +1 -0
  6. package/build/graphql/fetchAllAttributeKeys.d.ts +15 -0
  7. package/build/graphql/fetchAllAttributeKeys.d.ts.map +1 -0
  8. package/build/graphql/fetchAllAttributeKeys.js +32 -0
  9. package/build/graphql/fetchAllAttributeKeys.js.map +1 -0
  10. package/build/graphql/gqls/attributeKey.d.ts +2 -0
  11. package/build/graphql/gqls/attributeKey.d.ts.map +1 -0
  12. package/build/graphql/gqls/attributeKey.js +19 -0
  13. package/build/graphql/gqls/attributeKey.js.map +1 -0
  14. package/build/graphql/gqls/enricher.d.ts +10 -0
  15. package/build/graphql/gqls/enricher.d.ts.map +1 -1
  16. package/build/graphql/gqls/enricher.js +11 -1
  17. package/build/graphql/gqls/enricher.js.map +1 -1
  18. package/build/graphql/gqls/index.d.ts +1 -0
  19. package/build/graphql/gqls/index.d.ts.map +1 -1
  20. package/build/graphql/gqls/index.js +1 -0
  21. package/build/graphql/gqls/index.js.map +1 -1
  22. package/build/graphql/index.d.ts +1 -0
  23. package/build/graphql/index.d.ts.map +1 -1
  24. package/build/graphql/index.js +1 -0
  25. package/build/graphql/index.js.map +1 -1
  26. package/build/requests/constants.d.ts +32 -5
  27. package/build/requests/constants.d.ts.map +1 -1
  28. package/build/requests/constants.js +21 -3
  29. package/build/requests/constants.js.map +1 -1
  30. package/build/requests/fuzzyMatchColumns.d.ts +3 -2
  31. package/build/requests/fuzzyMatchColumns.d.ts.map +1 -1
  32. package/build/requests/fuzzyMatchColumns.js +4 -2
  33. package/build/requests/fuzzyMatchColumns.js.map +1 -1
  34. package/build/requests/index.d.ts +3 -0
  35. package/build/requests/index.d.ts.map +1 -1
  36. package/build/requests/index.js +3 -0
  37. package/build/requests/index.js.map +1 -1
  38. package/build/requests/mapColumnsToAttributes.d.ts +20 -0
  39. package/build/requests/mapColumnsToAttributes.d.ts.map +1 -0
  40. package/build/requests/mapColumnsToAttributes.js +46 -0
  41. package/build/requests/mapColumnsToAttributes.js.map +1 -0
  42. package/build/requests/mapColumnsToIdentifiers.d.ts +20 -0
  43. package/build/requests/mapColumnsToIdentifiers.d.ts.map +1 -0
  44. package/build/requests/mapColumnsToIdentifiers.js +48 -0
  45. package/build/requests/mapColumnsToIdentifiers.js.map +1 -0
  46. package/build/requests/mapCsvColumnsToApi.d.ts.map +1 -1
  47. package/build/requests/mapCsvColumnsToApi.js +1 -1
  48. package/build/requests/mapCsvColumnsToApi.js.map +1 -1
  49. package/build/requests/mapCsvRowsToRequestInputs.d.ts +25 -7
  50. package/build/requests/mapCsvRowsToRequestInputs.d.ts.map +1 -1
  51. package/build/requests/mapCsvRowsToRequestInputs.js +108 -38
  52. package/build/requests/mapCsvRowsToRequestInputs.js.map +1 -1
  53. package/build/requests/submitPrivacyRequest.d.ts +6 -4
  54. package/build/requests/submitPrivacyRequest.d.ts.map +1 -1
  55. package/build/requests/submitPrivacyRequest.js +22 -5
  56. package/build/requests/submitPrivacyRequest.js.map +1 -1
  57. package/build/requests/uploadPrivacyRequestsFromCsv.d.ts +32 -0
  58. package/build/requests/uploadPrivacyRequestsFromCsv.d.ts.map +1 -0
  59. package/build/requests/uploadPrivacyRequestsFromCsv.js +139 -0
  60. package/build/requests/uploadPrivacyRequestsFromCsv.js.map +1 -0
  61. package/build/tsbuildinfo +1 -1
  62. package/package.json +3 -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,86 @@ 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/205434290-85cd3ce7-cc6f-44fc-83ca-3bb8fde4d589.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-bulk-upload;my-customer-tag,Customer:acme-corp
469
+ ```
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli-request-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-request-upload.d.ts","sourceRoot":"","sources":["../src/cli-request-upload.ts"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
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 = '20', isTest = 'false', isSilent = 'true', emailIsVerified = 'true', dryRun = 'false', skipFilterStep = 'false', attributes = 'Tags:transcend-bulk-upload', } = (0, yargs_parser_1.default)(process.argv.slice(2));
35
+ // Ensure auth is passed
36
+ if (!auth) {
37
+ logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
38
+ process.exit(1);
39
+ }
40
+ // Upload privacy requests
41
+ await (0, requests_1.uploadPrivacyRequestsFromCsv)({
42
+ cacheFilepath,
43
+ file,
44
+ auth,
45
+ sombraAuth,
46
+ concurrency: parseInt(concurrency, 10),
47
+ transcendApiUrl,
48
+ attributes: (0, requests_1.splitCsvToList)(attributes),
49
+ skipFilterStep: skipFilterStep === 'true',
50
+ isSilent: isSilent === 'true',
51
+ emailIsVerified: emailIsVerified === 'true',
52
+ isTest: isTest === 'true',
53
+ dryRun: dryRun === 'true',
54
+ });
55
+ }
56
+ main();
57
+ //# 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,IAAI,EAClB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,EACjB,eAAe,GAAG,MAAM,EACxB,MAAM,GAAG,OAAO,EAChB,cAAc,GAAG,OAAO,EACxB,UAAU,GAAG,4BAA4B,GAC1C,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,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,eAAe;QACf,UAAU,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;QACtC,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,15 @@
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
+ }
8
+ /**
9
+ * Fetch all attribute keys enabled for privacy requests
10
+ *
11
+ * @param client - GraphQL client
12
+ * @returns All attribute keys in the organization
13
+ */
14
+ export declare function fetchAllRequestAttributeKeys(client: GraphQLClient): Promise<AttributeKey[]>;
15
+ //# 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;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;AAS1D,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,2 @@
1
+ export declare const ATTRIBUTE_KEYS_REQUESTS: string;
2
+ //# sourceMappingURL=attributeKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attributeKey.d.ts","sourceRoot":"","sources":["../../../src/graphql/gqls/attributeKey.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,QAanC,CAAC"}
@@ -0,0 +1,19 @@
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
+ }
16
+ }
17
+ }
18
+ `;
19
+ //# 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;;;;;;;;;;;;;CAazC,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"}
@@ -7,4 +7,5 @@ export * from './apiKey';
7
7
  export * from './siloDiscovery';
8
8
  export * from './template';
9
9
  export * from './organization';
10
+ export * from './attributeKey';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -12,4 +12,5 @@ export * from './makeGraphQLRequest';
12
12
  export * from './createSombraGotInstance';
13
13
  export * from './buildTranscendGraphQLClient';
14
14
  export * from './gqls';
15
+ export * from './fetchAllAttributeKeys';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -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 = "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,22 @@ export declare const CachedFileState: t.TypeC<{
120
135
  "he-IL": unknown;
121
136
  "en-NZ": unknown;
122
137
  }>>;
123
- failingRequests: t.ArrayC<t.RecordC<t.StringC, t.AnyC>>;
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>>;
132
149
  }>;
133
150
  /** Type override */
134
151
  export declare type CachedFileState = t.TypeOf<typeof CachedFileState>;
135
152
  export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
153
+ /** Mapping between the default request input column names and the CSV column name for that input */
136
154
  columnNames: t.PartialC<{
137
155
  email: t.StringC;
138
156
  coreIdentifier: t.StringC;
@@ -143,6 +161,11 @@ export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
143
161
  createdAt: t.StringC;
144
162
  dataSiloIds: t.StringC;
145
163
  }>;
164
+ /** Mapping between the identifier names and the CSV column name for that input */
165
+ identifierNames: t.RecordC<t.StringC, t.StringC>;
166
+ /** Mapping between the request attribute inputs and the CSV column name for that input */
167
+ attributeNames: t.RecordC<t.StringC, t.StringC>;
168
+ /** Mapping between CSV request type and Transcend Request Action */
146
169
  requestTypeToRequestAction: t.RecordC<t.StringC, t.KeyofC<{
147
170
  ACCESS: unknown;
148
171
  ERASURE: unknown;
@@ -164,7 +187,9 @@ export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
164
187
  TRACKING_OPT_OUT: unknown;
165
188
  CUSTOM_OPT_OUT: unknown;
166
189
  }>>;
190
+ /** Mapping between CSV data subject type and the name of the data subject in Transcend */
167
191
  subjectTypeToSubjectName: t.RecordC<t.StringC, t.StringC>;
192
+ /** Mapping between language imported and Transcend locale code */
168
193
  languageToLocale: t.RecordC<t.StringC, t.KeyofC<{
169
194
  en: unknown;
170
195
  ar: unknown;
@@ -228,14 +253,16 @@ export declare const CachedState: t.RecordC<t.StringC, t.TypeC<{
228
253
  "he-IL": unknown;
229
254
  "en-NZ": unknown;
230
255
  }>>;
231
- failingRequests: t.ArrayC<t.RecordC<t.StringC, t.AnyC>>;
256
+ /** Mapping between request status in import to Transcend request status */
232
257
  statusToRequestStatus: t.RecordC<t.StringC, t.KeyofC<{
233
- NONE: unknown;
258
+ "[NONE]": unknown;
234
259
  FAILED_VERIFICATION: unknown;
235
260
  COMPLETED: unknown;
236
261
  CANCELED: unknown;
237
262
  SECONDARY_COMPLETED: unknown;
238
263
  REVOKED: unknown;
239
264
  }>>;
265
+ /** Set of privacy requests that failed to upload */
266
+ failingRequests: t.ArrayC<t.RecordC<t.StringC, t.AnyC>>;
240
267
  }>>;
241
268
  //# 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,SAAS,CAAC;AAE3B;;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,eAAO,MAAM,WAAW,EAAE;KAAG,CAAC,IAAI,UAAU,GAAG,OAAO;CASrD,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU1B,CAAC;AAEH,oBAAoB;AACpB,oBAAY,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAsC,CAAC"}
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;;EAEpD,CAAC;AAEH,oBAAoB;AACpB,oBAAY,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D,eAAO,MAAM,WAAW;IAxBtB,oGAAoG;;;;;;;;;;;IAEpG,kFAAkF;;IAElF,0FAA0F;;IAE1F,oEAAoE;;;;;;;;;;;;;;;;;;;;;;IAEpE,0FAA0F;;IAE1F,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAElE,2EAA2E;;;;;;;;;IAK3E,oDAAoD;;GAOQ,CAAC"}
@@ -19,12 +19,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.CachedState = exports.CachedFileState = exports.IS_REQUIRED = exports.ColumnName = exports.NONE = void 0;
22
+ exports.CachedState = exports.CachedFileState = exports.CAN_APPLY_IN_BULK = exports.IS_REQUIRED = exports.ColumnName = exports.BLANK = exports.BULK_APPLY = exports.NONE = void 0;
23
23
  const type_utils_1 = require("@transcend-io/type-utils");
24
24
  const internationalization_1 = require("@transcend-io/internationalization");
25
25
  const privacy_types_1 = require("@transcend-io/privacy-types");
26
26
  const t = __importStar(require("io-ts"));
27
- exports.NONE = 'NONE';
27
+ exports.NONE = '[NONE]';
28
+ exports.BULK_APPLY = '[APPLY VALUE TO ALL ROWS]';
29
+ exports.BLANK = '<blank>';
28
30
  /**
29
31
  * Column names to map
30
32
  */
@@ -47,6 +49,7 @@ var ColumnName;
47
49
  /** The title of the dataSiloIds column */
48
50
  ColumnName["DataSiloIds"] = "dataSiloIds";
49
51
  })(ColumnName = exports.ColumnName || (exports.ColumnName = {}));
52
+ /** These parameters are required in the Transcend DSR API */
50
53
  exports.IS_REQUIRED = {
51
54
  [ColumnName.Email]: false,
52
55
  [ColumnName.CoreIdentifier]: true,
@@ -57,14 +60,29 @@ exports.IS_REQUIRED = {
57
60
  [ColumnName.DataSiloIds]: false,
58
61
  [ColumnName.Locale]: false,
59
62
  };
63
+ /** These parameters can be specified for the entire CSV set if needed */
64
+ exports.CAN_APPLY_IN_BULK = {
65
+ [ColumnName.RequestType]: true,
66
+ [ColumnName.SubjectType]: true,
67
+ };
60
68
  // Cache state
61
69
  exports.CachedFileState = t.type({
70
+ /** Mapping between the default request input column names and the CSV column name for that input */
62
71
  columnNames: t.partial((0, type_utils_1.applyEnum)(ColumnName, () => t.string)),
72
+ /** Mapping between the identifier names and the CSV column name for that input */
73
+ identifierNames: t.record(t.string, t.string),
74
+ /** Mapping between the request attribute inputs and the CSV column name for that input */
75
+ attributeNames: t.record(t.string, t.string),
76
+ /** Mapping between CSV request type and Transcend Request Action */
63
77
  requestTypeToRequestAction: t.record(t.string, (0, type_utils_1.valuesOf)(privacy_types_1.RequestAction)),
78
+ /** Mapping between CSV data subject type and the name of the data subject in Transcend */
64
79
  subjectTypeToSubjectName: t.record(t.string, t.string),
80
+ /** Mapping between language imported and Transcend locale code */
65
81
  languageToLocale: t.record(t.string, (0, type_utils_1.valuesOf)(internationalization_1.LanguageKey)),
66
- failingRequests: t.array(t.record(t.string, t.any)),
82
+ /** Mapping between request status in import to Transcend request status */
67
83
  statusToRequestStatus: t.record(t.string, (0, type_utils_1.valuesOf)({ ...privacy_types_1.CompletedRequestStatus, [exports.NONE]: exports.NONE })),
84
+ /** Set of privacy requests that failed to upload */
85
+ failingRequests: t.array(t.record(t.string, t.any)),
68
86
  });
69
87
  exports.CachedState = t.record(t.string, exports.CachedFileState);
70
88
  //# sourceMappingURL=constants.js.map