@transcend-io/cli 4.15.0 → 4.17.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 +76 -19
- package/build/cli-pull-cron-identifiers.js +2 -2
- package/build/cli-pull-cron-identifiers.js.map +1 -1
- package/build/cli-request-upload.js +4 -6
- package/build/cli-request-upload.js.map +1 -1
- package/build/cron/pullCronIdentifiersToCsv.d.ts +2 -2
- package/build/cron/pullCronIdentifiersToCsv.d.ts.map +1 -1
- package/build/cron/pullCronIdentifiersToCsv.js +2 -2
- package/build/cron/pullCronIdentifiersToCsv.js.map +1 -1
- package/build/graphql/createSombraGotInstance.d.ts +2 -2
- package/build/graphql/createSombraGotInstance.d.ts.map +1 -1
- package/build/graphql/createSombraGotInstance.js +3 -3
- package/build/graphql/createSombraGotInstance.js.map +1 -1
- package/build/requests/constants.d.ts +5404 -128
- package/build/requests/constants.d.ts.map +1 -1
- package/build/requests/constants.js +16 -2
- package/build/requests/constants.js.map +1 -1
- package/build/requests/mapColumnsToAttributes.d.ts +3 -2
- package/build/requests/mapColumnsToAttributes.d.ts.map +1 -1
- package/build/requests/mapColumnsToAttributes.js +5 -6
- package/build/requests/mapColumnsToAttributes.js.map +1 -1
- package/build/requests/mapColumnsToIdentifiers.d.ts +3 -2
- package/build/requests/mapColumnsToIdentifiers.d.ts.map +1 -1
- package/build/requests/mapColumnsToIdentifiers.js +6 -6
- package/build/requests/mapColumnsToIdentifiers.js.map +1 -1
- package/build/requests/mapCsvColumnsToApi.d.ts +3 -2
- package/build/requests/mapCsvColumnsToApi.d.ts.map +1 -1
- package/build/requests/mapCsvColumnsToApi.js +4 -5
- package/build/requests/mapCsvColumnsToApi.js.map +1 -1
- package/build/requests/mapCsvRowsToRequestInputs.d.ts +8 -3
- package/build/requests/mapCsvRowsToRequestInputs.d.ts.map +1 -1
- package/build/requests/mapCsvRowsToRequestInputs.js +22 -10
- package/build/requests/mapCsvRowsToRequestInputs.js.map +1 -1
- package/build/requests/mapRequestEnumValues.d.ts +3 -5
- package/build/requests/mapRequestEnumValues.d.ts.map +1 -1
- package/build/requests/mapRequestEnumValues.js +29 -16
- package/build/requests/mapRequestEnumValues.js.map +1 -1
- package/build/requests/submitPrivacyRequest.d.ts.map +1 -1
- package/build/requests/submitPrivacyRequest.js +16 -0
- package/build/requests/submitPrivacyRequest.js.map +1 -1
- package/build/requests/uploadPrivacyRequestsFromCsv.d.ts +5 -9
- package/build/requests/uploadPrivacyRequestsFromCsv.d.ts.map +1 -1
- package/build/requests/uploadPrivacyRequestsFromCsv.js +35 -38
- package/build/requests/uploadPrivacyRequestsFromCsv.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,20 +9,25 @@
|
|
|
9
9
|
- [Usage](#usage)
|
|
10
10
|
- [tr-pull](#tr-pull)
|
|
11
11
|
- [Authentication](#authentication)
|
|
12
|
+
- [Arguments](#arguments)
|
|
12
13
|
- [Usage](#usage-1)
|
|
13
14
|
- [tr-push](#tr-push)
|
|
14
15
|
- [Authentication](#authentication-1)
|
|
16
|
+
- [Arguments](#arguments-1)
|
|
15
17
|
- [Usage](#usage-2)
|
|
16
18
|
- [CI Integration](#ci-integration)
|
|
17
19
|
- [Dynamic Variables](#dynamic-variables)
|
|
18
20
|
- [tr-discover-silos](#tr-discover-silos)
|
|
19
21
|
- [Authentication](#authentication-2)
|
|
20
22
|
- [Usage](#usage-3)
|
|
23
|
+
- [Arguments](#arguments-2)
|
|
21
24
|
- [tr-request-upload](#tr-request-upload)
|
|
22
25
|
- [Authentication](#authentication-3)
|
|
26
|
+
- [Arguments](#arguments-3)
|
|
23
27
|
- [Usage](#usage-4)
|
|
24
28
|
- [tr-pull-cron-identifiers](#tr-pull-cron-identifiers)
|
|
25
29
|
- [Authentication](#authentication-4)
|
|
30
|
+
- [Arguments](#arguments-4)
|
|
26
31
|
- [Usage](#usage-5)
|
|
27
32
|
|
|
28
33
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
@@ -76,13 +81,17 @@ tr-discover-silos --auth=xxx
|
|
|
76
81
|
tr-request-upload --auth=xxx
|
|
77
82
|
```
|
|
78
83
|
|
|
84
|
+
Note:
|
|
85
|
+
|
|
86
|
+
_The cli-commands default to using the EU Transcend backend. To use these commands with the US backend, you will need to use the flag --transcendUrl=https://api.us.transend.io._
|
|
87
|
+
|
|
79
88
|
## transcend.yml
|
|
80
89
|
|
|
81
90
|
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).
|
|
82
91
|
|
|
83
92
|
You can find various examples for your `transcend.yml` file in the [examples/](./examples/) folder. If you are looking for a starting point to copy and paste, [simple.yml](./examples/simple.yml) is a good place to start. This file is annotated with links and documentations that new members of your team can use if they come across the file.
|
|
84
93
|
|
|
85
|
-
The API for this YAML file can be found in [./src/codecs.ts](./src/codecs.ts) under the variable named "TranscendInput". The shape of the
|
|
94
|
+
The API for this YAML file can be found in [./src/codecs.ts](./src/codecs.ts) under the variable named "TranscendInput". The shape of the YAML file will be type-checked every time a command is run.
|
|
86
95
|
|
|
87
96
|
The structure of the file looks something like the following:
|
|
88
97
|
|
|
@@ -90,7 +99,7 @@ The structure of the file looks something like the following:
|
|
|
90
99
|
# Manage at: https://app.transcend.io/infrastructure/api-keys
|
|
91
100
|
# See https://docs.transcend.io/docs/authentication
|
|
92
101
|
# Define API keys that may be shared across data silos
|
|
93
|
-
# in the data map. When creating new data silos through the
|
|
102
|
+
# in the data map. When creating new data silos through the YAML
|
|
94
103
|
# cli, it is possible to specify which API key should be associated
|
|
95
104
|
# with the newly created data silo.
|
|
96
105
|
api-keys:
|
|
@@ -192,6 +201,17 @@ The API key needs the following scopes:
|
|
|
192
201
|
|
|
193
202
|
_Note: The scopes for tr-push are comprehensive of the scopes for tr-pull_
|
|
194
203
|
|
|
204
|
+
#### Arguments
|
|
205
|
+
|
|
206
|
+
| Argument | Description | Type | Default | Required |
|
|
207
|
+
| ------------ | ----------------------------------------------------------------------------- | ------------------- | ------------------------ | -------- |
|
|
208
|
+
| auth | The Transcend API capable of fetching the configuration | string | N/A | true |
|
|
209
|
+
| file | Path to the YAML file to pull into | string - file-path | ./transcend.yml | false |
|
|
210
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
211
|
+
| dataSiloIds | The UUIDs of the data silos that should be pulled into the YAML file. | list(string - UUID) | N/A | false |
|
|
212
|
+
| pageSize | The page size to use when paginating over the API | number | 50 | false |
|
|
213
|
+
| debug | Set to true to include debug logs while pulling the configuration | boolean | false | false |
|
|
214
|
+
|
|
195
215
|
#### Usage
|
|
196
216
|
|
|
197
217
|
```sh
|
|
@@ -249,6 +269,16 @@ The API key needs the following scopes:
|
|
|
249
269
|
- View API Keys
|
|
250
270
|
- Manage Email Templates
|
|
251
271
|
|
|
272
|
+
#### Arguments
|
|
273
|
+
|
|
274
|
+
| Argument | Description | Type | Default | Required |
|
|
275
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------- | ------------------ | ------------------------ | -------- |
|
|
276
|
+
| auth | The Transcend API capable of pushing the configuration | string | N/A | true |
|
|
277
|
+
| file | Path to the YAML file to push from | string - file-path | ./transcend.yml | false |
|
|
278
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
279
|
+
| pageSize | The page size to use when paginating over the API | number | 50 | false |
|
|
280
|
+
| variables | The variables to template into the YAML file when pushing configuration. e.g. domain:acme.com,stage:staging | string | N/A | false |
|
|
281
|
+
|
|
252
282
|
#### Usage
|
|
253
283
|
|
|
254
284
|
```sh
|
|
@@ -266,7 +296,7 @@ tr-push --auth=$TRANSCEND_API_KEY --file=./custom/location.yml
|
|
|
266
296
|
Some things to note about this sync process:
|
|
267
297
|
|
|
268
298
|
1. Any field that is defined in your .yml file will be synced up to app.transcend.io. If any change was made on the admin dashboard, it will be overwritten.
|
|
269
|
-
2. If you omit a field from the
|
|
299
|
+
2. If you omit a field from the YAML file, this field will not be synced. This gives you the ability to define as much or as little configuration in your transcend.yml file as you would like, and let the remainder of fields be labeled through the Admin Dashboard
|
|
270
300
|
3. If you define new data subjects, identifiers, data silos or datapoints that were not previously defined on the Admin Dashboard, the cli will create these new resources automatically.
|
|
271
301
|
4. Currently, this cli does not handle deleting or renaming of resources. If you need to delete or rename a data silo, identifier, enricher or API key, you should make the change on the Admin Dashboard.
|
|
272
302
|
5. The only resources that this cli will not auto generate are:
|
|
@@ -323,7 +353,7 @@ The `tr-push` command takes in a parameter `variables`. This is a CSV of `key:va
|
|
|
323
353
|
tr-push --auth=$TRANSCEND_API_KEY --variables=domain:acme.com,stage:staging
|
|
324
354
|
```
|
|
325
355
|
|
|
326
|
-
This command could fill out multiple parameters in a
|
|
356
|
+
This command could fill out multiple parameters in a YAML file like [./examples/multi-instance.yml](./examples/multi-instance.yml), copied below:
|
|
327
357
|
|
|
328
358
|
```yml
|
|
329
359
|
api-keys:
|
|
@@ -383,12 +413,14 @@ This call will look for all the package.json files that in the scan path `./myJa
|
|
|
383
413
|
|
|
384
414
|
You can include additional arguments as well:
|
|
385
415
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
|
389
|
-
|
|
|
390
|
-
|
|
|
391
|
-
|
|
|
416
|
+
#### Arguments
|
|
417
|
+
|
|
418
|
+
| Argument | Description | Type | Default | Required |
|
|
419
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------- | -------- |
|
|
420
|
+
| scanPath | File path in the project to scan. | string | N/A | true |
|
|
421
|
+
| dataSiloID | The UUID of the corresponding data silo. | string | N/A | true |
|
|
422
|
+
| auth | Transcend API key. | string | N/A | true |
|
|
423
|
+
| 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). | string | N/A | false |
|
|
392
424
|
|
|
393
425
|
### tr-request-upload
|
|
394
426
|
|
|
@@ -417,6 +449,26 @@ The API key needs the following scopes:
|
|
|
417
449
|
- View Identity Verification Settings
|
|
418
450
|
- View Global Attributes
|
|
419
451
|
|
|
452
|
+
#### Arguments
|
|
453
|
+
|
|
454
|
+
| Argument | Description | Type | Default | Required |
|
|
455
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------- | -------- |
|
|
456
|
+
| auth | The Transcend API capable of submitting privacy requests. | string | N/A | true |
|
|
457
|
+
| file | Path to the CSV file of requests to tupload. | string - file-path | ./requests.csv | false |
|
|
458
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
459
|
+
| cacheFilepath | The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API. | string | ./transcend-privacy-requests-cache.json | false |
|
|
460
|
+
| requestReceiptFolder | The path to the folder where receipts of each upload are stored. This allows for debugging of errors. | string | ./privacy-request-upload-receipts | false |
|
|
461
|
+
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
|
|
462
|
+
| concurrency | The concurrency to use when uploading requests in parallel. | number | 100 | false |
|
|
463
|
+
| attributes | Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4 | string | Tags:transcend-cli | false |
|
|
464
|
+
| isTest | Flag whether the requests being uploaded are test requests or regular requests. | boolean | false | false |
|
|
465
|
+
| isSilent | Flag whether the requests being uploaded should be submitted in silent mode. | boolean | true | false |
|
|
466
|
+
| emailIsVerified | Indicate whether the email address being uploaded is pre-verified. Set to false to send a verification email. | boolean | true | false |
|
|
467
|
+
| skipFilterStep | When true, skip the interactive step to filter down the CSV. | boolean | false | false |
|
|
468
|
+
| dryRun | When true, perform a dry run of the upload instead of calling the API to submit the requests. | boolean | false | false |
|
|
469
|
+
| debug | Debug logging. | boolean | false | false |
|
|
470
|
+
| defaultPhoneCountryCode | When uploading phone numbers, if the phone number is missing a country code, assume this country code. Defaults to USA. | string | 1 | false |
|
|
471
|
+
|
|
420
472
|
### Usage
|
|
421
473
|
|
|
422
474
|
```sh
|
|
@@ -433,7 +485,7 @@ Specifying the backend URL, needed for US hosted backend infrastructure.
|
|
|
433
485
|
|
|
434
486
|
```sh
|
|
435
487
|
yarn tr-request-upload --auth=$TRANSCEND_API_KEY --sombraAuth=$SOMBRA_INTERNAL_KEY --file=/Users/transcend/Desktop/test.csv \
|
|
436
|
-
--
|
|
488
|
+
--transcendUrl=https://api.us.transcend.io
|
|
437
489
|
```
|
|
438
490
|
|
|
439
491
|
Run without being prompted to filter requests
|
|
@@ -480,13 +532,6 @@ yarn tr-request-upload --auth=$TRANSCEND_API_KEY --file=/Users/transcend/Desktop
|
|
|
480
532
|
--attributes=Tags:transcend-cli;my-customer-tag,Customer:acme-corp
|
|
481
533
|
```
|
|
482
534
|
|
|
483
|
-
Clear out the cache of failed and successful requests
|
|
484
|
-
|
|
485
|
-
```sh
|
|
486
|
-
yarn tr-request-upload --auth=$TRANSCEND_API_KEY --file=/Users/transcend/Desktop/test.csv \
|
|
487
|
-
--clearFailingRequests=true --clearSuccessfulRequests=true --clearDuplicateRequests=true
|
|
488
|
-
```
|
|
489
|
-
|
|
490
535
|
Specify default country code for phone numbers
|
|
491
536
|
|
|
492
537
|
```sh
|
|
@@ -514,6 +559,18 @@ In order to use this cli, you will first need to generate an API key on the Tran
|
|
|
514
559
|
|
|
515
560
|
The API key must be associated to the ID of the integration/data silo that is being operated on.
|
|
516
561
|
|
|
562
|
+
#### Arguments
|
|
563
|
+
|
|
564
|
+
| Argument | Description | Type | Default | Required |
|
|
565
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | ------------------------ | -------- |
|
|
566
|
+
| auth | The Transcend API capable of pulling the cron identifiers. | string | N/A | true |
|
|
567
|
+
| dataSiloId | The ID of the data silo to pull in. | string - UUID | N/A | true |
|
|
568
|
+
| requestType | The [request action](https://docs.transcend.io/docs/privacy-requests/configuring-requests/data-subject-requests#data-actions) to fetch. | string - RequestAction | N/A | true |
|
|
569
|
+
| file | Path to the CSV file where identifiers will be written to. | string - file-path | ./cron-identifiers.csv | false |
|
|
570
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
571
|
+
| sombraAuth | The sombra internal key, use for additional authentication when self-hosting sombra. | string | N/A | false |
|
|
572
|
+
| pageLimit | The page limit to use when pulling in pages of identifiers. | number | 100 | false |
|
|
573
|
+
|
|
517
574
|
### Usage
|
|
518
575
|
|
|
519
576
|
```sh
|
|
@@ -539,7 +596,7 @@ Specifying the backend URL, needed for US hosted backend infrastructure.
|
|
|
539
596
|
|
|
540
597
|
```sh
|
|
541
598
|
yarn tr-pull-cron-identifiers --auth=$TRANSCEND_API_KEY --sombraAuth=$SOMBRA_INTERNAL_KEY --file=/Users/transcend/Desktop/test.csv \
|
|
542
|
-
--
|
|
599
|
+
--transcendUrl=https://api.us.transcend.io
|
|
543
600
|
```
|
|
544
601
|
|
|
545
602
|
Specifying the page limit, defaults to 100.
|
|
@@ -28,7 +28,7 @@ const privacy_types_1 = require("@transcend-io/privacy-types");
|
|
|
28
28
|
*/
|
|
29
29
|
async function main() {
|
|
30
30
|
// Parse command line arguments
|
|
31
|
-
const { file = './cron-identifiers.csv',
|
|
31
|
+
const { file = './cron-identifiers.csv', transcendUrl = 'https://api.transcend.io', auth, sombraAuth, dataSiloId, requestType, pageLimit = '100', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
32
32
|
// Ensure auth is passed
|
|
33
33
|
if (!auth) {
|
|
34
34
|
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
|
|
@@ -44,7 +44,7 @@ async function main() {
|
|
|
44
44
|
// Upload privacy requests
|
|
45
45
|
await (0, cron_1.pullCronIdentifiersToCsv)({
|
|
46
46
|
file,
|
|
47
|
-
|
|
47
|
+
transcendUrl,
|
|
48
48
|
pageLimit: parseInt(pageLimit, 10),
|
|
49
49
|
requestType: requestType,
|
|
50
50
|
auth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-pull-cron-identifiers.js","sourceRoot":"","sources":["../src/cli-pull-cron-identifiers.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,iCAAkD;AAClD,+DAA4D;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,wBAAwB,EAC/B,
|
|
1
|
+
{"version":3,"file":"cli-pull-cron-identifiers.js","sourceRoot":"","sources":["../src/cli-pull-cron-identifiers.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,iCAAkD;AAClD,+DAA4D;AAE5D;;;;;;;;;;;;;;;;GAgBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,wBAAwB,EAC/B,YAAY,GAAG,0BAA0B,EACzC,IAAI,EACJ,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,GAAG,KAAK,GAClB,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,wBAAwB;IACxB,8DAA8D;IAC9D,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,QAAQ,CAAC,WAAkB,CAAC,EAAE;QAC9D,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,gCAAgC,WAAW,MAAM;YAC/C,sBAAsB,MAAM,CAAC,MAAM,CAAC,6BAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,0BAA0B;IAC1B,MAAM,IAAA,+BAAwB,EAAC;QAC7B,IAAI;QACJ,YAAY;QACZ,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC;QAClC,WAAW,EAAE,WAA4B;QACzC,IAAI;QACJ,UAAU;QACV,UAAU;KACX,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -28,8 +28,8 @@ const requests_1 = require("./requests");
|
|
|
28
28
|
*/
|
|
29
29
|
async function main() {
|
|
30
30
|
// Parse command line arguments
|
|
31
|
-
const { file = './requests.csv',
|
|
32
|
-
emailIsVerified = 'true',
|
|
31
|
+
const { auth, file = './requests.csv', transcendUrl = 'https://api.transcend.io', cacheFilepath = './transcend-privacy-requests-cache.json', requestReceiptFolder = './privacy-request-upload-receipts', sombraAuth, concurrency = '100', isTest = 'false', isSilent = 'true', defaultPhoneCountryCode = '1', // USA
|
|
32
|
+
emailIsVerified = 'true', dryRun = 'false', debug = 'false', skipFilterStep = 'false', attributes = 'Tags:transcend-cli', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
33
33
|
// Ensure auth is passed
|
|
34
34
|
if (!auth) {
|
|
35
35
|
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
|
|
@@ -38,16 +38,14 @@ async function main() {
|
|
|
38
38
|
// Upload privacy requests
|
|
39
39
|
await (0, requests_1.uploadPrivacyRequestsFromCsv)({
|
|
40
40
|
cacheFilepath,
|
|
41
|
+
requestReceiptFolder,
|
|
41
42
|
file,
|
|
42
43
|
auth,
|
|
43
44
|
sombraAuth,
|
|
44
|
-
clearFailingRequests: clearFailingRequests === 'true',
|
|
45
45
|
concurrency: parseInt(concurrency, 10),
|
|
46
|
-
|
|
46
|
+
transcendUrl,
|
|
47
47
|
defaultPhoneCountryCode,
|
|
48
48
|
attributes: (0, requests_1.splitCsvToList)(attributes),
|
|
49
|
-
clearDuplicateRequests: clearDuplicateRequests === 'true',
|
|
50
|
-
clearSuccessfulRequests: clearSuccessfulRequests === 'true',
|
|
51
49
|
debug: debug === 'true',
|
|
52
50
|
skipFilterStep: skipFilterStep === 'true',
|
|
53
51
|
isSilent: isSilent === 'true',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-request-upload.js","sourceRoot":"","sources":["../src/cli-request-upload.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAE5B,qCAAkC;AAClC,yCAA0E;AAE1E;;;;;;;;;;;;;;;;;GAiBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,gBAAgB,EACvB,
|
|
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;;;;;;;;;;;;;;;;;GAiBG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,EACJ,IAAI,GAAG,gBAAgB,EACvB,YAAY,GAAG,0BAA0B,EACzC,aAAa,GAAG,yCAAyC,EACzD,oBAAoB,GAAG,mCAAmC,EAC1D,UAAU,EACV,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,MAAM,EACjB,uBAAuB,GAAG,GAAG,EAAE,MAAM;IACrC,eAAe,GAAG,MAAM,EACxB,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,OAAO,EACf,cAAc,GAAG,OAAO,EACxB,UAAU,GAAG,oBAAoB,GAClC,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAA8B,CAAC;IAE9D,wBAAwB;IACxB,IAAI,CAAC,IAAI,EAAE;QACT,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,2EAA2E,CAC5E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,0BAA0B;IAC1B,MAAM,IAAA,uCAA4B,EAAC;QACjC,aAAa;QACb,oBAAoB;QACpB,IAAI;QACJ,IAAI;QACJ,UAAU;QACV,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC;QACtC,YAAY;QACZ,uBAAuB;QACvB,UAAU,EAAE,IAAA,yBAAc,EAAC,UAAU,CAAC;QACtC,KAAK,EAAE,KAAK,KAAK,MAAM;QACvB,cAAc,EAAE,cAAc,KAAK,MAAM;QACzC,QAAQ,EAAE,QAAQ,KAAK,MAAM;QAC7B,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"}
|
|
@@ -5,7 +5,7 @@ import { RequestAction } from '@transcend-io/privacy-types';
|
|
|
5
5
|
*
|
|
6
6
|
* @param options - Options
|
|
7
7
|
*/
|
|
8
|
-
export declare function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombraAuth, requestType, pageLimit,
|
|
8
|
+
export declare function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombraAuth, requestType, pageLimit, transcendUrl, }: {
|
|
9
9
|
/** CSV file path */
|
|
10
10
|
file: string;
|
|
11
11
|
/** Transcend API key authentication */
|
|
@@ -17,7 +17,7 @@ export declare function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombr
|
|
|
17
17
|
/** Page limit when fetching identifiers */
|
|
18
18
|
pageLimit?: number;
|
|
19
19
|
/** API URL for Transcend backend */
|
|
20
|
-
|
|
20
|
+
transcendUrl?: string;
|
|
21
21
|
/** Sombra API key authentication */
|
|
22
22
|
sombraAuth?: string;
|
|
23
23
|
}): Promise<CronIdentifier[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pullCronIdentifiersToCsv.d.ts","sourceRoot":"","sources":["../../src/cron/pullCronIdentifiersToCsv.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAI5D;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAe,EACf,
|
|
1
|
+
{"version":3,"file":"pullCronIdentifiersToCsv.d.ts","sourceRoot":"","sources":["../../src/cron/pullCronIdentifiersToCsv.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAI5D;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAe,EACf,YAAyC,GAC1C,EAAE;IACD,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,WAAW,EAAE,aAAa,CAAC;IAC3B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAoD5B"}
|
|
@@ -14,9 +14,9 @@ const logger_1 = require("../logger");
|
|
|
14
14
|
*
|
|
15
15
|
* @param options - Options
|
|
16
16
|
*/
|
|
17
|
-
async function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombraAuth, requestType, pageLimit = 100,
|
|
17
|
+
async function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombraAuth, requestType, pageLimit = 100, transcendUrl = 'https://api.transcend.io', }) {
|
|
18
18
|
// Create sombra instance to communicate with
|
|
19
|
-
const sombra = await (0, graphql_1.createSombraGotInstance)(
|
|
19
|
+
const sombra = await (0, graphql_1.createSombraGotInstance)(transcendUrl, auth, sombraAuth);
|
|
20
20
|
logger_1.logger.info(colors_1.default.magenta(`Pulling identifier for data silo: ${dataSiloId} of type ${requestType}`));
|
|
21
21
|
let offset = 0;
|
|
22
22
|
const identifiers = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pullCronIdentifiersToCsv.js","sourceRoot":"","sources":["../../src/cron/pullCronIdentifiersToCsv.ts"],"names":[],"mappings":";;;;;;AAAA,wCAAqD;AACrD,oDAA4B;AAC5B,2EAGqC;AAErC,yCAAsC;AACtC,sCAAmC;AAEnC;;;;GAIG;AACI,KAAK,UAAU,wBAAwB,CAAC,EAC7C,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAS,GAAG,GAAG,EACf,
|
|
1
|
+
{"version":3,"file":"pullCronIdentifiersToCsv.js","sourceRoot":"","sources":["../../src/cron/pullCronIdentifiersToCsv.ts"],"names":[],"mappings":";;;;;;AAAA,wCAAqD;AACrD,oDAA4B;AAC5B,2EAGqC;AAErC,yCAAsC;AACtC,sCAAmC;AAEnC;;;;GAIG;AACI,KAAK,UAAU,wBAAwB,CAAC,EAC7C,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAS,GAAG,GAAG,EACf,YAAY,GAAG,0BAA0B,GAgB1C;IACC,6CAA6C;IAC7C,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAuB,EAAC,YAAY,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;IAE7E,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,OAAO,CACZ,qCAAqC,UAAU,YAAY,WAAW,EAAE,CACzE,CACF,CAAC;IAEF,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,WAAW,GAAqB,EAAE,CAAC;IACzC,IAAI,cAAc,GAAG,IAAI,CAAC;IAE1B,8BAA8B;IAC9B,OAAO,cAAc,EAAE;QACrB,4CAA4C;QAC5C,MAAM,eAAe,GAAG,MAAM,IAAA,qDAAyB,EAAC,MAAM,EAAE;YAC9D,UAAU;YACV,KAAK,EAAE,SAAS;YAChB,MAAM;YACN,WAAW;SACZ,CAAC,CAAC;QACH,WAAW,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;QACrC,cAAc,GAAG,eAAe,CAAC,MAAM,KAAK,SAAS,CAAC;QACtD,MAAM,IAAI,SAAS,CAAC;KACrB;IAED,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,OAAO,CACZ,UAAU,WAAW,CAAC,MAAM,mCAAmC,CAChE,CACF,CAAC;IAEF,mBAAmB;IACnB,IAAA,mBAAQ,EACN,IAAI,EACJ,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC/B,GAAG,UAAU;QACb,UAAU,EAAE,UAAU,CAAC,UAAU;aAC9B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;aACrD,IAAI,CAAC,GAAG,CAAC;KACb,CAAC,CAAC,CACJ,CAAC;IAEF,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,sBAAsB,WAAW,CAAC,MAAM,yBAAyB,IAAI,GAAG,CACzE,CACF,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AA3ED,4DA2EC"}
|
|
@@ -3,10 +3,10 @@ import { Got } from 'got';
|
|
|
3
3
|
* Instantiate an instance of got that is capable of making requests
|
|
4
4
|
* to a sombra gateway.
|
|
5
5
|
*
|
|
6
|
-
* @param
|
|
6
|
+
* @param transcendUrl - URL of Transcend API
|
|
7
7
|
* @param transcendApiKey - Transcend API key
|
|
8
8
|
* @param sombraApiKey - Sombra API key
|
|
9
9
|
* @returns The instance of got that is capable of making requests to the customer ingress
|
|
10
10
|
*/
|
|
11
|
-
export declare function createSombraGotInstance(
|
|
11
|
+
export declare function createSombraGotInstance(transcendUrl: string, transcendApiKey: string, sombraApiKey?: string): Promise<Got>;
|
|
12
12
|
//# sourceMappingURL=createSombraGotInstance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSombraGotInstance.d.ts","sourceRoot":"","sources":["../../src/graphql/createSombraGotInstance.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK/B;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,
|
|
1
|
+
{"version":3,"file":"createSombraGotInstance.d.ts","sourceRoot":"","sources":["../../src/graphql/createSombraGotInstance.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK/B;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,GAAG,CAAC,CAmBd"}
|
|
@@ -12,14 +12,14 @@ const buildTranscendGraphQLClient_1 = require("./buildTranscendGraphQLClient");
|
|
|
12
12
|
* Instantiate an instance of got that is capable of making requests
|
|
13
13
|
* to a sombra gateway.
|
|
14
14
|
*
|
|
15
|
-
* @param
|
|
15
|
+
* @param transcendUrl - URL of Transcend API
|
|
16
16
|
* @param transcendApiKey - Transcend API key
|
|
17
17
|
* @param sombraApiKey - Sombra API key
|
|
18
18
|
* @returns The instance of got that is capable of making requests to the customer ingress
|
|
19
19
|
*/
|
|
20
|
-
async function createSombraGotInstance(
|
|
20
|
+
async function createSombraGotInstance(transcendUrl, transcendApiKey, sombraApiKey) {
|
|
21
21
|
// Create GraphQL client to connect to Transcend backend
|
|
22
|
-
const client = (0, buildTranscendGraphQLClient_1.buildTranscendGraphQLClient)(
|
|
22
|
+
const client = (0, buildTranscendGraphQLClient_1.buildTranscendGraphQLClient)(transcendUrl, transcendApiKey);
|
|
23
23
|
// Grab metadata about organization's sombra from GraphQL endpoint
|
|
24
24
|
const { organization } = await (0, makeGraphQLRequest_1.makeGraphQLRequest)(client, gqls_1.ORGANIZATION);
|
|
25
25
|
// Create got instance with default values
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSombraGotInstance.js","sourceRoot":"","sources":["../../src/graphql/createSombraGotInstance.ts"],"names":[],"mappings":";;;;;;AAAA,8CAA+B;AAC/B,iCAAsC;AACtC,6DAA0D;AAC1D,+EAA4E;AAE5E;;;;;;;;GAQG;AACI,KAAK,UAAU,uBAAuB,CAC3C,
|
|
1
|
+
{"version":3,"file":"createSombraGotInstance.js","sourceRoot":"","sources":["../../src/graphql/createSombraGotInstance.ts"],"names":[],"mappings":";;;;;;AAAA,8CAA+B;AAC/B,iCAAsC;AACtC,6DAA0D;AAC1D,+EAA4E;AAE5E;;;;;;;;GAQG;AACI,KAAK,UAAU,uBAAuB,CAC3C,YAAoB,EACpB,eAAuB,EACvB,YAAqB;IAErB,wDAAwD;IACxD,MAAM,MAAM,GAAG,IAAA,yDAA2B,EAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IAE1E,kEAAkE;IAClE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,uCAAkB,EAAC,MAAM,EAAE,mBAAY,CAAC,CAAC;IAExE,0CAA0C;IAC1C,OAAO,aAAG,CAAC,MAAM,CAAC;QAChB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,WAAW;QAC1C,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,eAAe,EAAE;YAC1C,GAAG,CAAC,YAAY;gBACd,CAAC,CAAC;oBACE,wBAAwB,EAAE,UAAU,YAAY,EAAE;iBACnD;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;KACF,CAAC,CAAC;AACL,CAAC;AAvBD,0DAuBC"}
|