@transcend-io/cli 4.37.0 → 4.39.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 +33 -16
- package/build/api-keys/generateCrossAccountApiKeys.d.ts +2 -9
- package/build/api-keys/generateCrossAccountApiKeys.d.ts.map +1 -1
- package/build/api-keys/generateCrossAccountApiKeys.js +1 -1
- package/build/api-keys/generateCrossAccountApiKeys.js.map +1 -1
- package/build/api-keys/index.d.ts +1 -0
- package/build/api-keys/index.d.ts.map +1 -1
- package/build/api-keys/index.js +1 -0
- package/build/api-keys/index.js.map +1 -1
- package/build/api-keys/validateTranscendAuth.d.ts +10 -0
- package/build/api-keys/validateTranscendAuth.d.ts.map +1 -0
- package/build/api-keys/validateTranscendAuth.js +54 -0
- package/build/api-keys/validateTranscendAuth.js.map +1 -0
- package/build/cli-generate-cross-account-api-keys.js +1 -1
- package/build/cli-generate-cross-account-api-keys.js.map +1 -1
- package/build/cli-pull.js +66 -24
- package/build/cli-pull.js.map +1 -1
- package/build/cli-push.js +61 -15
- package/build/cli-push.js.map +1 -1
- package/build/codecs.d.ts +13 -0
- package/build/codecs.d.ts.map +1 -1
- package/build/codecs.js +12 -1
- package/build/codecs.js.map +1 -1
- package/build/graphql/fetchAllAttributes.js +1 -1
- package/build/graphql/fetchAllAttributes.js.map +1 -1
- package/build/graphql/fetchConsentManagerId.d.ts +3 -2
- package/build/graphql/fetchConsentManagerId.d.ts.map +1 -1
- package/build/graphql/fetchConsentManagerId.js +4 -3
- package/build/graphql/fetchConsentManagerId.js.map +1 -1
- package/build/graphql/fetchDataSubjects.d.ts.map +1 -1
- package/build/graphql/fetchDataSubjects.js +1 -0
- package/build/graphql/fetchDataSubjects.js.map +1 -1
- package/build/graphql/fetchIdentifiers.d.ts +2 -1
- package/build/graphql/fetchIdentifiers.d.ts.map +1 -1
- package/build/graphql/fetchIdentifiers.js +9 -5
- package/build/graphql/fetchIdentifiers.js.map +1 -1
- package/build/graphql/fetchPrivacyCenterId.d.ts +9 -0
- package/build/graphql/fetchPrivacyCenterId.d.ts.map +1 -0
- package/build/graphql/fetchPrivacyCenterId.js +17 -0
- package/build/graphql/fetchPrivacyCenterId.js.map +1 -0
- package/build/graphql/gqls/consentManager.d.ts +1 -0
- package/build/graphql/gqls/consentManager.d.ts.map +1 -1
- package/build/graphql/gqls/consentManager.js +10 -1
- package/build/graphql/gqls/consentManager.js.map +1 -1
- package/build/graphql/gqls/identifier.d.ts.map +1 -1
- package/build/graphql/gqls/identifier.js +2 -5
- package/build/graphql/gqls/identifier.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/gqls/privacyCenter.d.ts +3 -0
- package/build/graphql/gqls/privacyCenter.d.ts.map +1 -0
- package/build/graphql/gqls/privacyCenter.js +19 -0
- package/build/graphql/gqls/privacyCenter.js.map +1 -0
- package/build/graphql/index.d.ts +1 -1
- package/build/graphql/index.d.ts.map +1 -1
- package/build/graphql/index.js +1 -1
- package/build/graphql/index.js.map +1 -1
- package/build/graphql/makeGraphQLRequest.d.ts +2 -1
- package/build/graphql/makeGraphQLRequest.d.ts.map +1 -1
- package/build/graphql/makeGraphQLRequest.js +5 -4
- package/build/graphql/makeGraphQLRequest.js.map +1 -1
- package/build/graphql/syncAction.d.ts +3 -1
- package/build/graphql/syncAction.d.ts.map +1 -1
- package/build/graphql/syncAction.js +2 -4
- package/build/graphql/syncAction.js.map +1 -1
- package/build/graphql/syncConfigurationToTranscend.d.ts +6 -1
- package/build/graphql/syncConfigurationToTranscend.d.ts.map +1 -1
- package/build/graphql/syncConfigurationToTranscend.js +29 -8
- package/build/graphql/syncConfigurationToTranscend.js.map +1 -1
- package/build/graphql/syncConsentManager.d.ts.map +1 -1
- package/build/graphql/syncConsentManager.js +21 -1
- package/build/graphql/syncConsentManager.js.map +1 -1
- package/build/graphql/syncDataFlows.js +2 -2
- package/build/graphql/syncDataFlows.js.map +1 -1
- package/build/graphql/syncDataSubject.d.ts +3 -1
- package/build/graphql/syncDataSubject.d.ts.map +1 -1
- package/build/graphql/syncDataSubject.js +3 -6
- package/build/graphql/syncDataSubject.js.map +1 -1
- package/build/graphql/syncIdentifier.d.ts +3 -1
- package/build/graphql/syncIdentifier.d.ts.map +1 -1
- package/build/graphql/syncIdentifier.js +2 -4
- package/build/graphql/syncIdentifier.js.map +1 -1
- package/build/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/build/graphql/sleepPromise.d.ts +0 -8
- package/build/graphql/sleepPromise.d.ts.map +0 -1
- package/build/graphql/sleepPromise.js +0 -16
- package/build/graphql/sleepPromise.js.map +0 -1
package/README.md
CHANGED
|
@@ -249,15 +249,15 @@ _Note: The scopes for tr-push are comprehensive of the scopes for tr-pull_
|
|
|
249
249
|
|
|
250
250
|
#### Arguments
|
|
251
251
|
|
|
252
|
-
| Argument | Description | Type
|
|
253
|
-
| ------------ | ---------------------------------------------------------------------------------------- |
|
|
254
|
-
| auth | The Transcend API capable of fetching the configuration | string
|
|
255
|
-
| resources | The different resource types to pull in (see table above for breakdown of each resource) | string
|
|
256
|
-
| file | Path to the YAML file to pull into | string - file-path
|
|
257
|
-
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL
|
|
258
|
-
| dataSiloIds | The UUIDs of the data silos that should be pulled into the YAML file. | list(string - UUID)
|
|
259
|
-
| pageSize | The page size to use when paginating over the API | number
|
|
260
|
-
| debug | Set to true to include debug logs while pulling the configuration | boolean
|
|
252
|
+
| Argument | Description | Type | Default | Required |
|
|
253
|
+
| ------------ | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------- | -------- |
|
|
254
|
+
| auth | The Transcend API capable of fetching the configuration | string (API key or path to tr-generate-api-keys JSON output) | N/A | true |
|
|
255
|
+
| resources | The different resource types to pull in (see table above for breakdown of each resource) | string | apiKeys,templates,dataSilos,enrichers | false |
|
|
256
|
+
| file | Path to the YAML file to pull into | string - file-path | ./transcend.yml | false |
|
|
257
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
258
|
+
| dataSiloIds | The UUIDs of the data silos that should be pulled into the YAML file. | list(string - UUID) | N/A | false |
|
|
259
|
+
| pageSize | The page size to use when paginating over the API | number | 50 | false |
|
|
260
|
+
| debug | Set to true to include debug logs while pulling the configuration | boolean | false | false |
|
|
261
261
|
|
|
262
262
|
#### Usage
|
|
263
263
|
|
|
@@ -357,6 +357,14 @@ Or with debug logs
|
|
|
357
357
|
tr-pull --auth=$TRANSCEND_API_KEY --integrationNames=salesforce,snowflake --debug=true
|
|
358
358
|
```
|
|
359
359
|
|
|
360
|
+
Pull in configuration files across multiple instances
|
|
361
|
+
|
|
362
|
+
```sh
|
|
363
|
+
tr-generate-api-keys --email=test@transcend.io --password=$TRANSCEND_PASSWORD \
|
|
364
|
+
--scopes="View Consent Manager" --apiKeyTitle="CLI Usage Cross Instance Sync" --file=./transcend-api-keys.json
|
|
365
|
+
tr-pull --auth=./transcend-api-keys.json --resources=consentManager --file=./transcend/
|
|
366
|
+
```
|
|
367
|
+
|
|
360
368
|
Note: This command will overwrite the existing transcend.yml file that you have locally.
|
|
361
369
|
|
|
362
370
|
### tr-push
|
|
@@ -386,13 +394,13 @@ The API key needs the following scopes when pushing the various resource types:
|
|
|
386
394
|
|
|
387
395
|
#### Arguments
|
|
388
396
|
|
|
389
|
-
| Argument | Description | Type
|
|
390
|
-
| ------------ | ----------------------------------------------------------------------------------------------------------- |
|
|
391
|
-
| auth | The Transcend API capable of pushing the configuration | string
|
|
392
|
-
| file | Path to the YAML file to push from | string - file-path
|
|
393
|
-
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL
|
|
394
|
-
| pageSize | The page size to use when paginating over the API | number
|
|
395
|
-
| variables | The variables to template into the YAML file when pushing configuration. e.g. domain:acme.com,stage:staging | string
|
|
397
|
+
| Argument | Description | Type | Default | Required |
|
|
398
|
+
| ------------ | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------ | -------- |
|
|
399
|
+
| auth | The Transcend API capable of pushing the configuration | string (API key or path to tr-generate-api-keys JSON output) | N/A | true |
|
|
400
|
+
| file | Path to the YAML file to push from | string - file-path | ./transcend.yml | false |
|
|
401
|
+
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
|
|
402
|
+
| pageSize | The page size to use when paginating over the API | number | 50 | false |
|
|
403
|
+
| variables | The variables to template into the YAML file when pushing configuration. e.g. domain:acme.com,stage:staging | string | N/A | false |
|
|
396
404
|
|
|
397
405
|
#### Usage
|
|
398
406
|
|
|
@@ -408,6 +416,15 @@ An alternative file destination can be specified:
|
|
|
408
416
|
tr-push --auth=$TRANSCEND_API_KEY --file=./custom/location.yml
|
|
409
417
|
```
|
|
410
418
|
|
|
419
|
+
Push changes to multiple Transcend instances using the output of [tr-generate-api-keys](#tr-generate-api-keys)
|
|
420
|
+
|
|
421
|
+
```sh
|
|
422
|
+
tr-generate-api-keys --email=test@transcend.io --password=$TRANSCEND_PASSWORD \
|
|
423
|
+
--scopes="View Email Templates,View Data Map" --apiKeyTitle="CLI Usage Cross Instance Sync" --file=./transcend-api-keys.json
|
|
424
|
+
tr-pull --auth=$TRANSCEND_API_KEY
|
|
425
|
+
tr-push --auth=./transcend-api-keys.json
|
|
426
|
+
```
|
|
427
|
+
|
|
411
428
|
Some things to note about this sync process:
|
|
412
429
|
|
|
413
430
|
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.
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { ScopeName } from '@transcend-io/privacy-types';
|
|
2
|
-
|
|
3
|
-
/** Name of instance */
|
|
4
|
-
organizationName: string;
|
|
5
|
-
/** API key */
|
|
6
|
-
apiKey: string;
|
|
7
|
-
/** Organization ID API key is for */
|
|
8
|
-
organizationId: string;
|
|
9
|
-
}
|
|
2
|
+
import { StoredApiKey } from '../codecs';
|
|
10
3
|
export interface ApiKeyGenerateError {
|
|
11
4
|
/** Name of instance */
|
|
12
5
|
organizationName: string;
|
|
@@ -38,7 +31,7 @@ export declare function generateCrossAccountApiKeys({ email, password, scopes, a
|
|
|
38
31
|
createNewApiKey?: boolean;
|
|
39
32
|
}): Promise<{
|
|
40
33
|
/** Successfully generated */
|
|
41
|
-
apiKeys:
|
|
34
|
+
apiKeys: StoredApiKey[];
|
|
42
35
|
/** Error results */
|
|
43
36
|
errors: ApiKeyGenerateError[];
|
|
44
37
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateCrossAccountApiKeys.d.ts","sourceRoot":"","sources":["../../src/api-keys/generateCrossAccountApiKeys.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"generateCrossAccountApiKeys.d.ts","sourceRoot":"","sources":["../../src/api-keys/generateCrossAccountApiKeys.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,WAAW,mBAAmB;IAClC,uBAAuB;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,KAAK,EACL,QAAQ,EACR,MAAM,EACN,WAAW,EACX,oBAA2B,EAC3B,eAAsB,EACtB,YAAyC,GAC1C,EAAE;IACD,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gIAAgI;IAChI,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iFAAiF;IACjF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,OAAO,CAAC;IACV,6BAA6B;IAC7B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,oBAAoB;IACpB,MAAM,EAAE,mBAAmB,EAAE,CAAC;CAC/B,CAAC,CA8HD"}
|
|
@@ -80,7 +80,7 @@ async function generateCrossAccountApiKeys({ email, password, scopes, apiKeyTitl
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
logger_1.logger.info(colors_1.default.green(`Successfully created ${results.length} API
|
|
83
|
+
logger_1.logger.info(colors_1.default.green(`Successfully created ${results.length} API key${results.length === 1 ? '' : 's'}`));
|
|
84
84
|
if (errors.length > 0) {
|
|
85
85
|
logger_1.logger.error(colors_1.default.red(`Failed to create ${errors.length} API key${errors.length === 1 ? '' : 's'}!`));
|
|
86
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateCrossAccountApiKeys.js","sourceRoot":"","sources":["../../src/api-keys/generateCrossAccountApiKeys.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqC;AACrC,wCAOoB;AAEpB,oDAA4B;
|
|
1
|
+
{"version":3,"file":"generateCrossAccountApiKeys.js","sourceRoot":"","sources":["../../src/api-keys/generateCrossAccountApiKeys.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqC;AACrC,wCAOoB;AAEpB,oDAA4B;AAE5B,sCAAmC;AAWnC;;;;;GAKG;AACI,KAAK,UAAU,2BAA2B,CAAC,EAChD,KAAK,EACL,QAAQ,EACR,MAAM,EACN,WAAW,EACX,oBAAoB,GAAG,IAAI,EA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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api-keys/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC"}
|
package/build/api-keys/index.js
CHANGED
|
@@ -11,4 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./generateCrossAccountApiKeys"), exports);
|
|
14
|
+
__exportStar(require("./validateTranscendAuth"), exports);
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-keys/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA8C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api-keys/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAA8C;AAC9C,0DAAwC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StoredApiKey } from '../codecs';
|
|
2
|
+
/**
|
|
3
|
+
* Determine if the `--auth` parameter is an API key or a path to a JSON
|
|
4
|
+
* file containing a list of API keys.
|
|
5
|
+
*
|
|
6
|
+
* @param auth - Raw auth parameter
|
|
7
|
+
* @returns The API key or the list API keys
|
|
8
|
+
*/
|
|
9
|
+
export declare function validateTranscendAuth(auth: string): string | StoredApiKey[];
|
|
10
|
+
//# sourceMappingURL=validateTranscendAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateTranscendAuth.d.ts","sourceRoot":"","sources":["../../src/api-keys/validateTranscendAuth.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,EAAE,CAmB3E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.validateTranscendAuth = void 0;
|
|
26
|
+
const type_utils_1 = require("@transcend-io/type-utils");
|
|
27
|
+
const colors_1 = __importDefault(require("colors"));
|
|
28
|
+
const t = __importStar(require("io-ts"));
|
|
29
|
+
const logger_1 = require("../logger");
|
|
30
|
+
const fs_1 = require("fs");
|
|
31
|
+
const codecs_1 = require("../codecs");
|
|
32
|
+
/**
|
|
33
|
+
* Determine if the `--auth` parameter is an API key or a path to a JSON
|
|
34
|
+
* file containing a list of API keys.
|
|
35
|
+
*
|
|
36
|
+
* @param auth - Raw auth parameter
|
|
37
|
+
* @returns The API key or the list API keys
|
|
38
|
+
*/
|
|
39
|
+
function validateTranscendAuth(auth) {
|
|
40
|
+
// Ensure auth is passed
|
|
41
|
+
if (!auth) {
|
|
42
|
+
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
// Read from disk
|
|
46
|
+
if ((0, fs_1.existsSync)(auth)) {
|
|
47
|
+
// validate that file is a list of API keys
|
|
48
|
+
return (0, type_utils_1.decodeCodec)(t.array(codecs_1.StoredApiKey), (0, fs_1.readFileSync)(auth, 'utf-8'));
|
|
49
|
+
}
|
|
50
|
+
// Return as single API key
|
|
51
|
+
return auth;
|
|
52
|
+
}
|
|
53
|
+
exports.validateTranscendAuth = validateTranscendAuth;
|
|
54
|
+
//# sourceMappingURL=validateTranscendAuth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateTranscendAuth.js","sourceRoot":"","sources":["../../src/api-keys/validateTranscendAuth.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAuD;AACvD,oDAA4B;AAC5B,yCAA2B;AAC3B,sCAAmC;AACnC,2BAA8C;AAC9C,sCAAyC;AAEzC;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,IAAY;IAChD,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,iBAAiB;IACjB,IAAI,IAAA,eAAU,EAAC,IAAI,CAAC,EAAE;QACpB,2CAA2C;QAC3C,OAAO,IAAA,wBAAW,EAAC,CAAC,CAAC,KAAK,CAAC,qBAAY,CAAC,EAAE,IAAA,iBAAY,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;KACxE;IAED,2BAA2B;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC;AAnBD,sDAmBC"}
|
|
@@ -59,7 +59,7 @@ async function main() {
|
|
|
59
59
|
process.exit(1);
|
|
60
60
|
}
|
|
61
61
|
// Validate scopes
|
|
62
|
-
const splitScopes = scopes.split(',');
|
|
62
|
+
const splitScopes = scopes.split(',').map((x) => x.trim());
|
|
63
63
|
const invalidScopes = splitScopes.filter((scopeTitle) => !SCOPES_BY_TITLE[scopeTitle]);
|
|
64
64
|
if (invalidScopes.length > 0) {
|
|
65
65
|
logger_1.logger.error(colors_1.default.red(`Failed to parse scopes:"${invalidScopes.join(',')}".\n` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-generate-cross-account-api-keys.js","sourceRoot":"","sources":["../src/cli-generate-cross-account-api-keys.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAC5B,2BAAmC;AACnC,yDAAiC;AACjC,+DAA0E;AAE1E,qCAAkC;AAClC,yCAAyD;AAEzD,MAAM,eAAe,GAAG,IAAA,eAAK,EAC3B,MAAM,CAAC,OAAO,CAAC,gCAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IACvD,GAAG,KAAK;IACR,IAAI;CACL,CAAC,CAAC,EACH,OAAO,CACR,CAAC;AACF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,YAAY,GAAG,0BAA0B,EACzC,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,MAAM,EACN,oBAAoB,GAAG,MAAM,EAC7B,eAAe,GAAG,MAAM,GACzB,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,sEAAsE,CACvE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,yBAAyB;IACzB,IAAI,CAAC,KAAK,EAAE;QACV,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,0EAA0E,CAC3E,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,4BAA4B;IAC5B,IAAI,CAAC,QAAQ,EAAE;QACb,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,sEAAsE,CACvE,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,+BAA+B;IAC/B,IAAI,CAAC,WAAW,EAAE;QAChB,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,mFAAmF,CACpF,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,0BAA0B;IAC1B,IAAI,CAAC,MAAM,EAAE;QACX,eAAM,CAAC,KAAK,CACV,gBAAM,CAAC,GAAG,CACR,gGAAgG;YAC9F,sBAAsB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClD,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,kBAAkB;IAClB,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-generate-cross-account-api-keys.js","sourceRoot":"","sources":["../src/cli-generate-cross-account-api-keys.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,oDAA4B;AAC5B,2BAAmC;AACnC,yDAAiC;AACjC,+DAA0E;AAE1E,qCAAkC;AAClC,yCAAyD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AAC,CAAC;IAEH,gBAAgB;IAChB,IAAA,kBAAa,EAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/build/cli-pull.js
CHANGED
|
@@ -7,7 +7,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
8
8
|
const logger_1 = require("./logger");
|
|
9
9
|
const colors_1 = __importDefault(require("colors"));
|
|
10
|
+
const bluebird_1 = require("bluebird");
|
|
11
|
+
const path_1 = require("path");
|
|
12
|
+
const fs_1 = __importDefault(require("fs"));
|
|
10
13
|
const graphql_1 = require("./graphql");
|
|
14
|
+
const api_keys_1 = require("./api-keys");
|
|
11
15
|
const readTranscendYaml_1 = require("./readTranscendYaml");
|
|
12
16
|
const constants_1 = require("./constants");
|
|
13
17
|
const VALID_RESOURCES = Object.values(graphql_1.TranscendPullResource);
|
|
@@ -23,13 +27,8 @@ const VALID_RESOURCES = Object.values(graphql_1.TranscendPullResource);
|
|
|
23
27
|
async function main() {
|
|
24
28
|
// Parse command line arguments
|
|
25
29
|
const { file = './transcend.yml', transcendUrl = 'https://api.transcend.io', dataSiloIds = '', integrationNames = '', resources = graphql_1.DEFAULT_TRANSCEND_PULL_RESOURCES.join(','), pageSize = '', debug = '', auth, } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
// Create a GraphQL client
|
|
32
|
-
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
|
|
30
|
+
// Parse authentication as API key or path to list of API keys
|
|
31
|
+
const apiKeyOrList = await (0, api_keys_1.validateTranscendAuth)(auth);
|
|
33
32
|
// Parse request actions
|
|
34
33
|
let splitResources = [];
|
|
35
34
|
if (!resources) {
|
|
@@ -45,26 +44,69 @@ async function main() {
|
|
|
45
44
|
logger_1.logger.error(colors_1.default.red(`Received invalid resources values: "${invalidResources.join(',')}". Allowed: ${VALID_RESOURCES.join(',')}`));
|
|
46
45
|
process.exit(1);
|
|
47
46
|
}
|
|
47
|
+
const dataSiloIdsParsed = dataSiloIds
|
|
48
|
+
.split(',')
|
|
49
|
+
.filter((x) => !!x);
|
|
50
|
+
const integrationNamesParsed = integrationNames
|
|
51
|
+
.split(',')
|
|
52
|
+
.filter((x) => !!x);
|
|
53
|
+
const pageSizeParsed = pageSize ? parseInt(pageSize, 10) : 50;
|
|
54
|
+
const isDebug = debug === 'true';
|
|
48
55
|
// Sync to Disk
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
if (typeof apiKeyOrList === 'string') {
|
|
57
|
+
try {
|
|
58
|
+
// Create a GraphQL client
|
|
59
|
+
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, apiKeyOrList);
|
|
60
|
+
const configuration = await (0, graphql_1.pullTranscendConfiguration)(client, {
|
|
61
|
+
dataSiloIds: dataSiloIdsParsed,
|
|
62
|
+
integrationNames: integrationNamesParsed,
|
|
63
|
+
resources: splitResources,
|
|
64
|
+
pageSize: pageSizeParsed,
|
|
65
|
+
debug: isDebug,
|
|
66
|
+
});
|
|
67
|
+
logger_1.logger.info(colors_1.default.magenta(`Writing configuration to file "${file}"...`));
|
|
68
|
+
(0, readTranscendYaml_1.writeTranscendYaml)(file, configuration);
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
logger_1.logger.error(colors_1.default.red(`An error occurred syncing the schema: ${err.message}`));
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
// Indicate success
|
|
75
|
+
logger_1.logger.info(colors_1.default.green(`Successfully synced yaml file to disk at ${file}! View at ${constants_1.ADMIN_DASH_INTEGRATIONS}`));
|
|
61
76
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
77
|
+
else {
|
|
78
|
+
if (!fs_1.default.lstatSync(file).isDirectory()) {
|
|
79
|
+
throw new Error('File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/');
|
|
80
|
+
}
|
|
81
|
+
const encounteredErrors = [];
|
|
82
|
+
await (0, bluebird_1.mapSeries)(apiKeyOrList, async (apiKey, ind) => {
|
|
83
|
+
const prefix = `[${ind}/${apiKeyOrList.length}][${apiKey.organizationName}] `;
|
|
84
|
+
logger_1.logger.info(colors_1.default.magenta(`~~~\n\n${prefix}Attempting to pull configuration...\n\n~~~`));
|
|
85
|
+
// Create a GraphQL client
|
|
86
|
+
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, apiKey.apiKey);
|
|
87
|
+
try {
|
|
88
|
+
const configuration = await (0, graphql_1.pullTranscendConfiguration)(client, {
|
|
89
|
+
dataSiloIds: dataSiloIdsParsed,
|
|
90
|
+
integrationNames: integrationNamesParsed,
|
|
91
|
+
resources: splitResources,
|
|
92
|
+
pageSize: pageSizeParsed,
|
|
93
|
+
debug: isDebug,
|
|
94
|
+
});
|
|
95
|
+
const filePath = (0, path_1.join)(file, `${apiKey.organizationName}.yml`);
|
|
96
|
+
logger_1.logger.info(colors_1.default.magenta(`Writing configuration to file "${filePath}"...`));
|
|
97
|
+
(0, readTranscendYaml_1.writeTranscendYaml)(filePath, configuration);
|
|
98
|
+
logger_1.logger.info(colors_1.default.green(`${prefix}Successfully pulled configuration!`));
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
logger_1.logger.error(colors_1.default.red(`${prefix}Failed to sync configuration.`));
|
|
102
|
+
encounteredErrors.push(apiKey.organizationName);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
if (encounteredErrors.length > 0) {
|
|
106
|
+
logger_1.logger.info(colors_1.default.red(`Sync encountered errors for "${encounteredErrors.join(',')}". View output above for more information, or check out ${constants_1.ADMIN_DASH_INTEGRATIONS}`));
|
|
107
|
+
process.exit(1);
|
|
108
|
+
}
|
|
65
109
|
}
|
|
66
|
-
// Indicate success
|
|
67
|
-
logger_1.logger.info(colors_1.default.green(`Successfully synced yaml file to disk at ${file}! View at ${constants_1.ADMIN_DASH_INTEGRATIONS}`));
|
|
68
110
|
}
|
|
69
111
|
main();
|
|
70
112
|
//# sourceMappingURL=cli-pull.js.map
|
package/build/cli-pull.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-pull.js","sourceRoot":"","sources":["../src/cli-pull.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,qCAAkC;AAClC,oDAA4B;AAC5B,uCAKmB;AACnB,2DAAyD;AACzD,2CAAsD;AAEtD,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,+BAAqB,CAAC,CAAC;AAE7D;;;;;;;;GAQG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,IAAI,GAAG,iBAAiB,EACxB,YAAY,GAAG,0BAA0B,EACzC,WAAW,GAAG,EAAE,EAChB,gBAAgB,GAAG,EAAE,EACrB,SAAS,GAAG,0CAAgC,CAAC,IAAI,CAAC,GAAG,CAAC,EACtD,QAAQ,GAAG,EAAE,EACb,KAAK,GAAG,EAAE,EACV,IAAI,GACL,GAAG,IAAA,sBAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjC,
|
|
1
|
+
{"version":3,"file":"cli-pull.js","sourceRoot":"","sources":["../src/cli-pull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ACT,gBAAM,CAAC,OAAO,CAAC,kCAAkC,QAAQ,MAAM,CAAC,CACjE,CAAC;gBACF,IAAA,sCAAkB,EAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;gBAE5C,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CAAC,GAAG,MAAM,oCAAoC,CAAC,CAC5D,CAAC;aACH;YAAC,OAAO,GAAG,EAAE;gBACZ,eAAM,CAAC,KAAK,CAAC,gBAAM,CAAC,GAAG,CAAC,GAAG,MAAM,+BAA+B,CAAC,CAAC,CAAC;gBACnE,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;aACjD;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,GAAG,CACR,gCAAgC,iBAAiB,CAAC,IAAI,CACpD,GAAG,CACJ,2DAA2D,mCAAuB,EAAE,CACtF,CACF,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;KACF;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/build/cli-push.js
CHANGED
|
@@ -6,12 +6,33 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
8
8
|
const logger_1 = require("./logger");
|
|
9
|
+
const bluebird_1 = require("bluebird");
|
|
9
10
|
const fs_1 = require("fs");
|
|
10
11
|
const readTranscendYaml_1 = require("./readTranscendYaml");
|
|
11
12
|
const colors_1 = __importDefault(require("colors"));
|
|
12
13
|
const graphql_1 = require("./graphql");
|
|
13
14
|
const constants_1 = require("./constants");
|
|
15
|
+
const api_keys_1 = require("./api-keys");
|
|
14
16
|
const mergeTranscendInputs_1 = require("./mergeTranscendInputs");
|
|
17
|
+
/**
|
|
18
|
+
* Sync configuration to Transcend
|
|
19
|
+
*
|
|
20
|
+
* @param options - Options
|
|
21
|
+
* @returns True if synced successfully, false if error occurs
|
|
22
|
+
*/
|
|
23
|
+
async function syncConfiguration({ transcendUrl, auth, pageSize, publishToPrivacyCenter, contents, }) {
|
|
24
|
+
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
|
|
25
|
+
// Sync to Transcend
|
|
26
|
+
try {
|
|
27
|
+
const encounteredError = await (0, graphql_1.syncConfigurationToTranscend)(contents, client, { pageSize, publishToPrivacyCenter });
|
|
28
|
+
return !encounteredError;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
logger_1.logger.error(colors_1.default.red(`An unexpected error occurred syncing the schema: ${err.message}`));
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
15
36
|
/**
|
|
16
37
|
* Push the transcend.yml file remotely into a Transcend instance
|
|
17
38
|
*
|
|
@@ -23,12 +44,9 @@ const mergeTranscendInputs_1 = require("./mergeTranscendInputs");
|
|
|
23
44
|
*/
|
|
24
45
|
async function main() {
|
|
25
46
|
// Parse command line arguments
|
|
26
|
-
const { file = './transcend.yml', transcendUrl = 'https://api.transcend.io', auth, variables = '', pageSize = '', } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=asd123'));
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
47
|
+
const { file = './transcend.yml', transcendUrl = 'https://api.transcend.io', auth, variables = '', pageSize = '', publishToPrivacyCenter, } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
48
|
+
// Parse authentication as API key or path to list of API keys
|
|
49
|
+
const apiKeyOrList = await (0, api_keys_1.validateTranscendAuth)(auth);
|
|
32
50
|
// Parse out the variables
|
|
33
51
|
const splitVars = variables.split(',').filter((x) => !!x);
|
|
34
52
|
const vars = {};
|
|
@@ -66,19 +84,47 @@ async function main() {
|
|
|
66
84
|
});
|
|
67
85
|
const [base, ...rest] = transcendInputs;
|
|
68
86
|
const contents = (0, mergeTranscendInputs_1.mergeTranscendInputs)(base, ...rest);
|
|
69
|
-
//
|
|
70
|
-
const
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
87
|
+
// Parse page size
|
|
88
|
+
const parsedPageSize = pageSize ? parseInt(pageSize, 10) : 50;
|
|
89
|
+
// process a single API key
|
|
90
|
+
if (typeof apiKeyOrList === 'string') {
|
|
91
|
+
const success = await syncConfiguration({
|
|
92
|
+
transcendUrl,
|
|
93
|
+
auth: apiKeyOrList,
|
|
94
|
+
contents,
|
|
95
|
+
publishToPrivacyCenter: publishToPrivacyCenter === 'true',
|
|
96
|
+
pageSize: parsedPageSize,
|
|
97
|
+
});
|
|
98
|
+
// exist with error code
|
|
99
|
+
if (!success) {
|
|
75
100
|
logger_1.logger.info(colors_1.default.red(`Sync encountered errors. View output above for more information, or check out ${constants_1.ADMIN_DASH_INTEGRATIONS}`));
|
|
76
101
|
process.exit(1);
|
|
77
102
|
}
|
|
78
103
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
104
|
+
else {
|
|
105
|
+
const encounteredErrors = [];
|
|
106
|
+
await (0, bluebird_1.mapSeries)(apiKeyOrList, async (apiKey, ind) => {
|
|
107
|
+
const prefix = `[${ind}/${apiKeyOrList.length}][${apiKey.organizationName}] `;
|
|
108
|
+
logger_1.logger.info(colors_1.default.magenta(`~~~\n\n${prefix}Attempting to push configuration...\n\n~~~`));
|
|
109
|
+
const success = await syncConfiguration({
|
|
110
|
+
transcendUrl,
|
|
111
|
+
auth: apiKey.apiKey,
|
|
112
|
+
contents,
|
|
113
|
+
pageSize: parsedPageSize,
|
|
114
|
+
publishToPrivacyCenter: publishToPrivacyCenter === 'true',
|
|
115
|
+
});
|
|
116
|
+
if (success) {
|
|
117
|
+
logger_1.logger.info(colors_1.default.green(`${prefix}Successfully pushed configuration!`));
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
logger_1.logger.error(colors_1.default.red(`${prefix}Failed to sync configuration.`));
|
|
121
|
+
encounteredErrors.push(apiKey.organizationName);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
if (encounteredErrors.length > 0) {
|
|
125
|
+
logger_1.logger.info(colors_1.default.red(`Sync encountered errors for "${encounteredErrors.join(',')}". View output above for more information, or check out ${constants_1.ADMIN_DASH_INTEGRATIONS}`));
|
|
126
|
+
process.exit(1);
|
|
127
|
+
}
|
|
82
128
|
}
|
|
83
129
|
// Indicate success
|
|
84
130
|
logger_1.logger.info(colors_1.default.green(`Successfully synced yaml file to Transcend! View at ${constants_1.ADMIN_DASH_INTEGRATIONS}`));
|
package/build/cli-push.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-push.js","sourceRoot":"","sources":["../src/cli-push.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,qCAAkC;AAClC,2BAAgC;AAChC,2DAAwD;AACxD,oDAA4B;AAC5B,uCAGmB;AAEnB,2CAAsD;
|
|
1
|
+
{"version":3,"file":"cli-push.js","sourceRoot":"","sources":["../src/cli-push.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAiC;AACjC,qCAAkC;AAClC,uCAAqC;AACrC,2BAAgC;AAChC,2DAAwD;AACxD,oDAA4B;AAC5B,uCAGmB;AAEnB,2CAAsD;AAGtD,yCAAmD;AACnD,iEAA8D;AAE9D;;;;;GAKG;AACH,KAAK,UAAU,iBAAiB,CAAC,EAC/B,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,sBAAsB,EACtB,QAAQ,GAYT;IACC,MAAM,MAAM,GAAG,IAAA,qCAA2B,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAE/D,oBAAoB;IACpB,IAAI;QACF,MAAM,gBAAgB,GAAG,MAAM,IAAA,sCAA4B,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I,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;YAChC,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,GAAG,CACR,gCAAgC,iBAAiB,CAAC,IAAI,CACpD,GAAG,CACJ,2DAA2D,mCAAuB,EAAE,CACtF,CACF,CAAC;YAEF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SACjB;KACF;IAED,mBAAmB;IACnB,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,uDAAuD,mCAAuB,EAAE,CACjF,CACF,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/build/codecs.d.ts
CHANGED
|
@@ -12516,4 +12516,17 @@ export declare const TranscendInput: t.PartialC<{
|
|
|
12516
12516
|
}>;
|
|
12517
12517
|
/** Type override */
|
|
12518
12518
|
export declare type TranscendInput = t.TypeOf<typeof TranscendInput>;
|
|
12519
|
+
/**
|
|
12520
|
+
* The output of `tr-generate-api-keys` that can be provided to `tr-push`
|
|
12521
|
+
*/
|
|
12522
|
+
export declare const StoredApiKey: t.TypeC<{
|
|
12523
|
+
/** Name of instance */
|
|
12524
|
+
organizationName: t.StringC;
|
|
12525
|
+
/** API key */
|
|
12526
|
+
apiKey: t.StringC;
|
|
12527
|
+
/** Organization ID API key is for */
|
|
12528
|
+
organizationId: t.StringC;
|
|
12529
|
+
}>;
|
|
12530
|
+
/** Type override */
|
|
12531
|
+
export declare type StoredApiKey = t.TypeOf<typeof StoredApiKey>;
|
|
12519
12532
|
//# sourceMappingURL=codecs.d.ts.map
|