@transcend-io/cli 4.96.0 → 4.97.1
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/build/ai/TranscendAiPrompt.d.ts.map +1 -1
- package/build/ai/TranscendAiPrompt.js +6 -0
- package/build/ai/TranscendAiPrompt.js.map +1 -1
- package/build/ai/createHandlebarsWithHelpers.d.ts.map +1 -1
- package/build/ai/createHandlebarsWithHelpers.js +1 -1
- package/build/ai/createHandlebarsWithHelpers.js.map +1 -1
- package/build/ai/index.d.ts +1 -0
- package/build/ai/index.d.ts.map +1 -1
- package/build/ai/index.js +1 -0
- package/build/ai/index.js.map +1 -1
- package/build/ai/removeLinks.d.ts +8 -0
- package/build/ai/removeLinks.d.ts.map +1 -0
- package/build/ai/removeLinks.js +15 -0
- package/build/ai/removeLinks.js.map +1 -0
- package/build/codecs.d.ts +7 -7
- package/build/graphql/fetchAllRequests.d.ts +4 -4
- package/build/requests/constants.d.ts +1 -1
- package/build/requests/submitPrivacyRequest.d.ts +4 -4
- package/build/tests/removeLinks.test.d.ts +2 -0
- package/build/tests/removeLinks.test.d.ts.map +1 -0
- package/build/tests/removeLinks.test.js +21 -0
- package/build/tests/removeLinks.test.js.map +1 -0
- package/build/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/build/cli-test.d.ts +0 -3
- package/build/cli-test.d.ts.map +0 -1
- package/build/cli-test.js +0 -72
- package/build/cli-test.js.map +0 -1
- package/build/cron/pullCronIdentifiersToCsv.d.ts +0 -24
- package/build/cron/pullCronIdentifiersToCsv.d.ts.map +0 -1
- package/build/cron/pullCronIdentifiersToCsv.js +0 -53
- package/build/cron/pullCronIdentifiersToCsv.js.map +0 -1
- package/build/graphql/tests/fetchApiKeys.test.d.ts +0 -1
- package/build/graphql/tests/fetchApiKeys.test.d.ts.map +0 -1
- package/build/graphql/tests/fetchApiKeys.test.js +0 -3
- package/build/graphql/tests/fetchApiKeys.test.js.map +0 -1
- package/build/graphql/tests/fetchDataSubjects.test.d.ts +0 -1
- package/build/graphql/tests/fetchDataSubjects.test.d.ts.map +0 -1
- package/build/graphql/tests/fetchDataSubjects.test.js +0 -3
- package/build/graphql/tests/fetchDataSubjects.test.js.map +0 -1
- package/build/graphql/tests/fetchIdentifiers.test.d.ts +0 -1
- package/build/graphql/tests/fetchIdentifiers.test.d.ts.map +0 -1
- package/build/graphql/tests/fetchIdentifiers.test.js +0 -3
- package/build/graphql/tests/fetchIdentifiers.test.js.map +0 -1
- package/build/graphql/tests/syncDataSilos.test.d.ts +0 -1
- package/build/graphql/tests/syncDataSilos.test.d.ts.map +0 -1
- package/build/graphql/tests/syncDataSilos.test.js +0 -3
- package/build/graphql/tests/syncDataSilos.test.js.map +0 -1
- package/build/graphql/tests/syncEnrichers.test.d.ts +0 -1
- package/build/graphql/tests/syncEnrichers.test.d.ts.map +0 -1
- package/build/graphql/tests/syncEnrichers.test.js +0 -3
- package/build/graphql/tests/syncEnrichers.test.js.map +0 -1
- package/build/helpers/compile.d.ts +0 -22
- package/build/helpers/compile.d.ts.map +0 -1
- package/build/helpers/compile.js +0 -37
- package/build/helpers/compile.js.map +0 -1
- package/build/helpers/getHandlebarsVariablesFromTemplate.d.ts +0 -12
- package/build/helpers/getHandlebarsVariablesFromTemplate.d.ts.map +0 -1
- package/build/helpers/getHandlebarsVariablesFromTemplate.js +0 -54
- package/build/helpers/getHandlebarsVariablesFromTemplate.js.map +0 -1
- package/build/requests/pullRequestsToCsv.d.ts +0 -32
- package/build/requests/pullRequestsToCsv.d.ts.map +0 -1
- package/build/requests/pullRequestsToCsv.js +0 -86
- package/build/requests/pullRequestsToCsv.js.map +0 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Transcend Inc.",
|
|
3
3
|
"name": "@transcend-io/cli",
|
|
4
4
|
"description": "Small package containing useful typescript utilities.",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.97.1",
|
|
6
6
|
"homepage": "https://github.com/transcend-io/cli",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
package/build/cli-test.d.ts
DELETED
package/build/cli-test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-test.d.ts","sourceRoot":"","sources":["../src/cli-test.ts"],"names":[],"mappings":""}
|
package/build/cli-test.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
-
if (mod && mod.__esModule) return mod;
|
|
21
|
-
var result = {};
|
|
22
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
-
__setModuleDefault(result, mod);
|
|
24
|
-
return result;
|
|
25
|
-
};
|
|
26
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
const yargs_parser_1 = __importDefault(require("yargs-parser"));
|
|
31
|
-
const t = __importStar(require("io-ts"));
|
|
32
|
-
const colors_1 = __importDefault(require("colors"));
|
|
33
|
-
const logger_1 = require("./logger");
|
|
34
|
-
const constants_1 = require("./constants");
|
|
35
|
-
const ai_1 = require("./ai");
|
|
36
|
-
/**
|
|
37
|
-
* FIXME
|
|
38
|
-
*/
|
|
39
|
-
async function main() {
|
|
40
|
-
// Parse command line arguments
|
|
41
|
-
const { transcendUrl = constants_1.DEFAULT_TRANSCEND_API, auth, title, } = (0, yargs_parser_1.default)(process.argv.slice(2));
|
|
42
|
-
// Ensure auth is passed
|
|
43
|
-
if (!auth) {
|
|
44
|
-
logger_1.logger.error(colors_1.default.red('A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY'));
|
|
45
|
-
process.exit(1);
|
|
46
|
-
}
|
|
47
|
-
// Ensure title is passed
|
|
48
|
-
if (!title) {
|
|
49
|
-
logger_1.logger.error(colors_1.default.red('A prompt title must be provided'));
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
const codec = t.type({
|
|
53
|
-
product: t.string,
|
|
54
|
-
clarification: t.union([t.string, t.null]),
|
|
55
|
-
});
|
|
56
|
-
const prompt = new ai_1.TranscendAiPrompt({
|
|
57
|
-
title,
|
|
58
|
-
codec,
|
|
59
|
-
});
|
|
60
|
-
const createPromptString = await prompt.fetchPromptFromTranscend({
|
|
61
|
-
transcendApiKey: auth,
|
|
62
|
-
transcendUrl,
|
|
63
|
-
fillTemplateWithAttributes: true,
|
|
64
|
-
requireApproval: false,
|
|
65
|
-
});
|
|
66
|
-
const template = createPromptString({ slackChannelName: 'my-channel' });
|
|
67
|
-
console.log(template);
|
|
68
|
-
const parsed = prompt.parseAiResponse('{ "product": "test", "clarification": null }');
|
|
69
|
-
console.log(parsed);
|
|
70
|
-
}
|
|
71
|
-
main();
|
|
72
|
-
//# sourceMappingURL=cli-test.js.map
|
package/build/cli-test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-test.js","sourceRoot":"","sources":["../src/cli-test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gEAAiC;AACjC,yCAA2B;AAC3B,oDAA4B;AAE5B,qCAAkC;AAClC,2CAAoD;AACpD,6BAAyC;AAEzC;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,+BAA+B;IAC/B,MAAM,EACJ,YAAY,GAAG,iCAAqB,EACpC,IAAI,EACJ,KAAK,GACN,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,uFAAuF,CACxF,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,yBAAyB;IACzB,IAAI,CAAC,KAAK,EAAE;QACV,eAAM,CAAC,KAAK,CAAC,gBAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;QAC5D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM;QACjB,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;KAC3C,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,IAAI,sBAAiB,CAMlC;QACA,KAAK;QACL,KAAK;KACN,CAAC,CAAC;IACH,MAAM,kBAAkB,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC;QAC/D,eAAe,EAAE,IAAI;QACrB,YAAY;QACZ,0BAA0B,EAAE,IAAI;QAChC,eAAe,EAAE,KAAK;KACvB,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,kBAAkB,CAAC,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC,CAAC;IACxE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CACnC,+CAA+C,CAChD,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { CronIdentifier } from './pullCronPageOfIdentifiers';
|
|
2
|
-
import { RequestAction } from '@transcend-io/privacy-types';
|
|
3
|
-
/**
|
|
4
|
-
* Pull the set of cron job identifiers to CSV
|
|
5
|
-
*
|
|
6
|
-
* @param options - Options
|
|
7
|
-
*/
|
|
8
|
-
export declare function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombraAuth, requestType, pageLimit, transcendUrl, }: {
|
|
9
|
-
/** CSV file path */
|
|
10
|
-
file: string;
|
|
11
|
-
/** Transcend API key authentication */
|
|
12
|
-
auth: string;
|
|
13
|
-
/** Data Silo ID to pull down jobs for */
|
|
14
|
-
dataSiloId: string;
|
|
15
|
-
/** The request action to fetch */
|
|
16
|
-
requestType: RequestAction;
|
|
17
|
-
/** Page limit when fetching identifiers */
|
|
18
|
-
pageLimit?: number;
|
|
19
|
-
/** API URL for Transcend backend */
|
|
20
|
-
transcendUrl?: string;
|
|
21
|
-
/** Sombra API key authentication */
|
|
22
|
-
sombraAuth?: string;
|
|
23
|
-
}): Promise<CronIdentifier[]>;
|
|
24
|
-
//# sourceMappingURL=pullCronIdentifiersToCsv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pullCronIdentifiersToCsv.d.ts","sourceRoot":"","sources":["../../src/cron/pullCronIdentifiersToCsv.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,cAAc,EACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK5D;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAe,EACf,YAAoC,GACrC,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,CAuD5B"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.pullCronIdentifiersToCsv = void 0;
|
|
7
|
-
const graphql_1 = require("../graphql");
|
|
8
|
-
const colors_1 = __importDefault(require("colors"));
|
|
9
|
-
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
10
|
-
const pullCronPageOfIdentifiers_1 = require("./pullCronPageOfIdentifiers");
|
|
11
|
-
const writeCsv_1 = require("./writeCsv");
|
|
12
|
-
const logger_1 = require("../logger");
|
|
13
|
-
const constants_1 = require("../constants");
|
|
14
|
-
/**
|
|
15
|
-
* Pull the set of cron job identifiers to CSV
|
|
16
|
-
*
|
|
17
|
-
* @param options - Options
|
|
18
|
-
*/
|
|
19
|
-
async function pullCronIdentifiersToCsv({ file, dataSiloId, auth, sombraAuth, requestType, pageLimit = 100, transcendUrl = constants_1.DEFAULT_TRANSCEND_API, }) {
|
|
20
|
-
// Create sombra instance to communicate with
|
|
21
|
-
const sombra = await (0, graphql_1.createSombraGotInstance)(transcendUrl, auth, sombraAuth);
|
|
22
|
-
logger_1.logger.info(colors_1.default.magenta(`Pulling identifier for data silo: ${dataSiloId} of type ${requestType}`));
|
|
23
|
-
let offset = 0;
|
|
24
|
-
const identifiers = [];
|
|
25
|
-
let shouldContinue = true;
|
|
26
|
-
// Fetch a page of identifiers
|
|
27
|
-
while (shouldContinue) {
|
|
28
|
-
// eslint-disable-next-line no-await-in-loop
|
|
29
|
-
const pageIdentifiers = await (0, pullCronPageOfIdentifiers_1.pullCronPageOfIdentifiers)(sombra, {
|
|
30
|
-
dataSiloId,
|
|
31
|
-
limit: pageLimit,
|
|
32
|
-
offset,
|
|
33
|
-
requestType,
|
|
34
|
-
});
|
|
35
|
-
identifiers.push(...pageIdentifiers);
|
|
36
|
-
shouldContinue = pageIdentifiers.length === pageLimit;
|
|
37
|
-
offset += pageLimit;
|
|
38
|
-
}
|
|
39
|
-
logger_1.logger.info(colors_1.default.magenta(`Found: ${identifiers.length} outstanding identifiers to parse`));
|
|
40
|
-
// Write out to CSV
|
|
41
|
-
const data = identifiers.map(({ attributes, ...identifier }) => ({
|
|
42
|
-
...identifier,
|
|
43
|
-
...attributes.reduce((acc, val) => Object.assign(acc, {
|
|
44
|
-
[val.key]: val.values.join(','),
|
|
45
|
-
}), {}),
|
|
46
|
-
}));
|
|
47
|
-
const headers = (0, uniq_1.default)(data.map((d) => Object.keys(d)).flat());
|
|
48
|
-
(0, writeCsv_1.writeCsv)(file, data, headers);
|
|
49
|
-
logger_1.logger.info(colors_1.default.green(`Successfully wrote ${identifiers.length} identifiers to file "${file}"`));
|
|
50
|
-
return identifiers;
|
|
51
|
-
}
|
|
52
|
-
exports.pullCronIdentifiersToCsv = pullCronIdentifiersToCsv;
|
|
53
|
-
//# sourceMappingURL=pullCronIdentifiersToCsv.js.map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EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QAC/D,GAAG,UAAU;QACb,GAAG,UAAU,CAAC,MAAM,CAClB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CACX,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE;YACjB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;SAChC,CAAC,EACJ,EAAE,CACH;KACF,CAAC,CAAC,CAAC;IACJ,MAAM,OAAO,GAAG,IAAA,cAAI,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7D,IAAA,mBAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAE9B,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,KAAK,CACV,sBAAsB,WAAW,CAAC,MAAM,yBAAyB,IAAI,GAAG,CACzE,CACF,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AA9ED,4DA8EC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=fetchApiKeys.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchApiKeys.test.d.ts","sourceRoot":"","sources":["../../../src/graphql/tests/fetchApiKeys.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchApiKeys.test.js","sourceRoot":"","sources":["../../../src/graphql/tests/fetchApiKeys.test.ts"],"names":[],"mappings":";AAAA,iEAAiE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=fetchDataSubjects.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDataSubjects.test.d.ts","sourceRoot":"","sources":["../../../src/graphql/tests/fetchDataSubjects.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchDataSubjects.test.js","sourceRoot":"","sources":["../../../src/graphql/tests/fetchDataSubjects.test.ts"],"names":[],"mappings":";AAAA,sEAAsE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=fetchIdentifiers.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchIdentifiers.test.d.ts","sourceRoot":"","sources":["../../../src/graphql/tests/fetchIdentifiers.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetchIdentifiers.test.js","sourceRoot":"","sources":["../../../src/graphql/tests/fetchIdentifiers.test.ts"],"names":[],"mappings":";AAAA,qEAAqE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=syncDataSilos.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncDataSilos.test.d.ts","sourceRoot":"","sources":["../../../src/graphql/tests/syncDataSilos.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncDataSilos.test.js","sourceRoot":"","sources":["../../../src/graphql/tests/syncDataSilos.test.ts"],"names":[],"mappings":";AAAA,kEAAkE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=syncEnrichers.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncEnrichers.test.d.ts","sourceRoot":"","sources":["../../../src/graphql/tests/syncEnrichers.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncEnrichers.test.js","sourceRoot":"","sources":["../../../src/graphql/tests/syncEnrichers.test.ts"],"names":[],"mappings":";AAAA,kEAAkE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ObjByString } from '@transcend-io/type-utils';
|
|
2
|
-
/**
|
|
3
|
-
* Render a template linked to handlebars
|
|
4
|
-
*
|
|
5
|
-
* @example <caption>Example usage of render</caption>
|
|
6
|
-
* // The template string
|
|
7
|
-
* const template = 'here there {{firstName}}';
|
|
8
|
-
* // The parameters to fill the template with
|
|
9
|
-
* const props = { firstName: 'Mason' };
|
|
10
|
-
* // Returns
|
|
11
|
-
* render(template, props);
|
|
12
|
-
*
|
|
13
|
-
* Note: the usage of this function is not recommended. It is better
|
|
14
|
-
* to use react-intl on the frontend or handlebars on the backend, but
|
|
15
|
-
* if you find yourself in a situation where you want to use handlebars
|
|
16
|
-
* on the frontend with a dynamic message, this function can be used.
|
|
17
|
-
* @param template - The template string
|
|
18
|
-
* @param props - The parameters to fill the template with
|
|
19
|
-
* @returns The template rendered
|
|
20
|
-
*/
|
|
21
|
-
export declare function compile(template: string, props: ObjByString): string;
|
|
22
|
-
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/helpers/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,MAAM,CAapE"}
|
package/build/helpers/compile.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compile = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Render a template linked to handlebars
|
|
6
|
-
*
|
|
7
|
-
* @example <caption>Example usage of render</caption>
|
|
8
|
-
* // The template string
|
|
9
|
-
* const template = 'here there {{firstName}}';
|
|
10
|
-
* // The parameters to fill the template with
|
|
11
|
-
* const props = { firstName: 'Mason' };
|
|
12
|
-
* // Returns
|
|
13
|
-
* render(template, props);
|
|
14
|
-
*
|
|
15
|
-
* Note: the usage of this function is not recommended. It is better
|
|
16
|
-
* to use react-intl on the frontend or handlebars on the backend, but
|
|
17
|
-
* if you find yourself in a situation where you want to use handlebars
|
|
18
|
-
* on the frontend with a dynamic message, this function can be used.
|
|
19
|
-
* @param template - The template string
|
|
20
|
-
* @param props - The parameters to fill the template with
|
|
21
|
-
* @returns The template rendered
|
|
22
|
-
*/
|
|
23
|
-
function compile(template, props) {
|
|
24
|
-
let res = template;
|
|
25
|
-
Object.keys(props).forEach((prop) => {
|
|
26
|
-
// loosely handlebars syntax
|
|
27
|
-
res = res.split(`{{{${prop}}}}`).join(props[prop]);
|
|
28
|
-
res = res.split(`{{{ ${prop} }}}`).join(props[prop]);
|
|
29
|
-
res = res.split(`{{${prop}}}`).join(props[prop]);
|
|
30
|
-
res = res.split(`{{ ${prop} }}`).join(props[prop]);
|
|
31
|
-
// loosely react-intl syntax
|
|
32
|
-
res = res.split(`{${prop}}`).join(props[prop]);
|
|
33
|
-
});
|
|
34
|
-
return res;
|
|
35
|
-
}
|
|
36
|
-
exports.compile = compile;
|
|
37
|
-
//# sourceMappingURL=compile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/helpers/compile.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,OAAO,CAAC,QAAgB,EAAE,KAAkB;IAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC;IACnB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,4BAA4B;QAC5B,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACnD,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACrD,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACjD,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAEnD,4BAA4B;QAC5B,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAbD,0BAaC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pull out handlebars variables from a handlebars template
|
|
3
|
-
*
|
|
4
|
-
* e.g. Hello {{person}}! Today is {{day}}
|
|
5
|
-
* -> ["person", "day"]
|
|
6
|
-
*
|
|
7
|
-
* @param template - Handlebars template
|
|
8
|
-
* @param handlebarsCode
|
|
9
|
-
* @returns List of template variables
|
|
10
|
-
*/
|
|
11
|
-
export declare function getHandlebarsVariablesFromTemplate(handlebarsCode: string): Record<string, any>;
|
|
12
|
-
//# sourceMappingURL=getHandlebarsVariablesFromTemplate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getHandlebarsVariablesFromTemplate.d.ts","sourceRoot":"","sources":["../../src/helpers/getHandlebarsVariablesFromTemplate.ts"],"names":[],"mappings":"AA2BA;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAChD,cAAc,EAAE,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAerB"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHandlebarsVariablesFromTemplate = void 0;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param obj
|
|
7
|
-
* @param variable
|
|
8
|
-
*/
|
|
9
|
-
function initializeVariable(obj, variable) {
|
|
10
|
-
// Split the variable into parts based on dot notation
|
|
11
|
-
const parts = variable.split('.');
|
|
12
|
-
let currentObj = obj;
|
|
13
|
-
// Create nested objects based on the parts
|
|
14
|
-
for (let i = 0; i < parts.length; i++) {
|
|
15
|
-
const part = parts[i];
|
|
16
|
-
if (i === parts.length - 1) {
|
|
17
|
-
// Assign null to the final part of the variable
|
|
18
|
-
currentObj[part] = null;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
// Create an empty object for the intermediate part
|
|
22
|
-
if (!currentObj[part]) {
|
|
23
|
-
currentObj[part] = {};
|
|
24
|
-
}
|
|
25
|
-
// Move to the next nested object
|
|
26
|
-
currentObj = currentObj[part];
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Pull out handlebars variables from a handlebars template
|
|
32
|
-
*
|
|
33
|
-
* e.g. Hello {{person}}! Today is {{day}}
|
|
34
|
-
* -> ["person", "day"]
|
|
35
|
-
*
|
|
36
|
-
* @param template - Handlebars template
|
|
37
|
-
* @param handlebarsCode
|
|
38
|
-
* @returns List of template variables
|
|
39
|
-
*/
|
|
40
|
-
function getHandlebarsVariablesFromTemplate(handlebarsCode) {
|
|
41
|
-
const regex = /{{{\s*([\w\d_]+)\s*}}}|{{\s*([\w\d_]+)\s*}}/g;
|
|
42
|
-
const variables = {};
|
|
43
|
-
let match;
|
|
44
|
-
// eslint-disable-next-line no-cond-assign
|
|
45
|
-
while ((match = regex.exec(handlebarsCode)) !== null) {
|
|
46
|
-
// Use match[1] if triple curly braces, match[2] if double curly braces
|
|
47
|
-
const variable = match[1] || match[2];
|
|
48
|
-
// Initialize the variable in the variables object with null
|
|
49
|
-
initializeVariable(variables, variable);
|
|
50
|
-
}
|
|
51
|
-
return variables;
|
|
52
|
-
}
|
|
53
|
-
exports.getHandlebarsVariablesFromTemplate = getHandlebarsVariablesFromTemplate;
|
|
54
|
-
//# sourceMappingURL=getHandlebarsVariablesFromTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getHandlebarsVariablesFromTemplate.js","sourceRoot":"","sources":["../../src/helpers/getHandlebarsVariablesFromTemplate.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,GAAwB,EAAE,QAAgB;IACpE,sDAAsD;IACtD,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,UAAU,GAAG,GAAG,CAAC;IAErB,2CAA2C;IAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAC1B,gDAAgD;YAChD,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;SACzB;aAAM;YACL,mDAAmD;YACnD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE;gBACrB,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;aACvB;YACD,iCAAiC;YACjC,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;SAC/B;KACF;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,kCAAkC,CAChD,cAAsB;IAEtB,MAAM,KAAK,GAAG,8CAA8C,CAAC;IAC7D,MAAM,SAAS,GAAwB,EAAE,CAAC;IAE1C,IAAI,KAAK,CAAC;IACV,0CAA0C;IAC1C,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,KAAK,IAAI,EAAE;QACpD,uEAAuE;QACvE,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;QAEtC,4DAA4D;QAC5D,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;KACzC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAjBD,gFAiBC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { RequestIdentifier, PrivacyRequest } from '../graphql';
|
|
2
|
-
import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';
|
|
3
|
-
export interface ExportedPrivacyRequest extends PrivacyRequest {
|
|
4
|
-
/** Request identifiers */
|
|
5
|
-
requestIdentifiers: RequestIdentifier[];
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Pull the set of cron job requests to CSV
|
|
9
|
-
*
|
|
10
|
-
* @param options - Options
|
|
11
|
-
*/
|
|
12
|
-
export declare function pullRequestsToCsv({ file, auth, actions, statuses, pageLimit, transcendUrl, createdAtBefore, createdAtAfter, showTests, }: {
|
|
13
|
-
/** CSV file path */
|
|
14
|
-
file: string;
|
|
15
|
-
/** Transcend API key authentication */
|
|
16
|
-
auth: string;
|
|
17
|
-
/** API URL for Transcend backend */
|
|
18
|
-
transcendUrl?: string;
|
|
19
|
-
/** Statuses to filter on */
|
|
20
|
-
statuses?: RequestStatus[];
|
|
21
|
-
/** The request action to fetch */
|
|
22
|
-
actions?: RequestAction[];
|
|
23
|
-
/** Page limit when fetching requests */
|
|
24
|
-
pageLimit?: number;
|
|
25
|
-
/** Filter for requests created before this date */
|
|
26
|
-
createdAtBefore?: Date;
|
|
27
|
-
/** Filter for requests created after this date */
|
|
28
|
-
createdAtAfter?: Date;
|
|
29
|
-
/** Return test requests */
|
|
30
|
-
showTests?: boolean;
|
|
31
|
-
}): Promise<ExportedPrivacyRequest[]>;
|
|
32
|
-
//# sourceMappingURL=pullRequestsToCsv.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pullRequestsToCsv.d.ts","sourceRoot":"","sources":["../../src/requests/pullRequestsToCsv.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EACjB,cAAc,EAEf,MAAM,YAAY,CAAC;AAKpB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAK3E,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,0BAA0B;IAC1B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,IAAI,EACJ,IAAI,EACJ,OAAY,EACZ,QAAa,EACb,SAAe,EACf,YAAoC,EACpC,eAAe,EACf,cAAc,EACd,SAAS,GACV,EAAE;IACD,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,kCAAkC;IAClC,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,eAAe,CAAC,EAAE,IAAI,CAAC;IACvB,kDAAkD;IAClD,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAsHpC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.pullRequestsToCsv = void 0;
|
|
7
|
-
const graphql_1 = require("../graphql");
|
|
8
|
-
const colors_1 = __importDefault(require("colors"));
|
|
9
|
-
const bluebird_1 = require("bluebird");
|
|
10
|
-
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
11
|
-
const groupBy_1 = __importDefault(require("lodash/groupBy"));
|
|
12
|
-
const writeCsv_1 = require("../cron/writeCsv");
|
|
13
|
-
const logger_1 = require("../logger");
|
|
14
|
-
const constants_1 = require("../constants");
|
|
15
|
-
/**
|
|
16
|
-
* Pull the set of cron job requests to CSV
|
|
17
|
-
*
|
|
18
|
-
* @param options - Options
|
|
19
|
-
*/
|
|
20
|
-
async function pullRequestsToCsv({ file, auth, actions = [], statuses = [], pageLimit = 100, transcendUrl = constants_1.DEFAULT_TRANSCEND_API, createdAtBefore, createdAtAfter, showTests, }) {
|
|
21
|
-
// Find all requests made before createdAt that are in a removing data state
|
|
22
|
-
const client = (0, graphql_1.buildTranscendGraphQLClient)(transcendUrl, auth);
|
|
23
|
-
// Log date range
|
|
24
|
-
let dateRange = '';
|
|
25
|
-
if (createdAtBefore) {
|
|
26
|
-
dateRange += ` before ${createdAtBefore.toISOString()}`;
|
|
27
|
-
}
|
|
28
|
-
if (createdAtAfter) {
|
|
29
|
-
dateRange += `${dateRange ? ', and' : ''} after ${createdAtAfter.toISOString()}`;
|
|
30
|
-
}
|
|
31
|
-
// Log out
|
|
32
|
-
logger_1.logger.info(colors_1.default.magenta(`${actions.length > 0
|
|
33
|
-
? `Pulling requests of type "${actions.join(',')}"`
|
|
34
|
-
: 'Pulling all requests'}${dateRange}`));
|
|
35
|
-
// fetch the requests
|
|
36
|
-
const requests = await (0, graphql_1.fetchAllRequests)(client, {
|
|
37
|
-
actions,
|
|
38
|
-
statuses,
|
|
39
|
-
createdAtBefore,
|
|
40
|
-
createdAtAfter,
|
|
41
|
-
showTests,
|
|
42
|
-
});
|
|
43
|
-
// Fetch the request identifiers for those requests
|
|
44
|
-
const requestsWithRequestIdentifiers = await (0, bluebird_1.map)(requests, async (request) => {
|
|
45
|
-
const requestIdentifiers = await (0, graphql_1.fetchAllRequestIdentifiers)(client, {
|
|
46
|
-
requestId: request.id,
|
|
47
|
-
});
|
|
48
|
-
return {
|
|
49
|
-
...request,
|
|
50
|
-
requestIdentifiers,
|
|
51
|
-
};
|
|
52
|
-
}, {
|
|
53
|
-
concurrency: pageLimit,
|
|
54
|
-
});
|
|
55
|
-
logger_1.logger.info(colors_1.default.magenta(`Pulled ${requestsWithRequestIdentifiers.length} requests`));
|
|
56
|
-
// Write out to CSV
|
|
57
|
-
const data = requestsWithRequestIdentifiers.map(({ attributeValues, requestIdentifiers, id, email, type, status, subjectType, details, createdAt, country, locale, origin, countrySubDivision, isSilent, isTest, coreIdentifier, ...request }) => ({
|
|
58
|
-
'Request ID': id,
|
|
59
|
-
'Created At': createdAt,
|
|
60
|
-
Email: email,
|
|
61
|
-
'Core Identifier': coreIdentifier,
|
|
62
|
-
'Request Type': type,
|
|
63
|
-
'Data Subject Type': subjectType,
|
|
64
|
-
Status: status,
|
|
65
|
-
Country: country,
|
|
66
|
-
'Country Sub Division': countrySubDivision,
|
|
67
|
-
Details: details,
|
|
68
|
-
Origin: origin,
|
|
69
|
-
'Silent Mode': isSilent,
|
|
70
|
-
'Is Test Request': isTest,
|
|
71
|
-
Language: locale,
|
|
72
|
-
...request,
|
|
73
|
-
...Object.entries((0, groupBy_1.default)(attributeValues, 'attributeKey.name')).reduce((acc, [name, values]) => Object.assign(acc, {
|
|
74
|
-
[name]: values.map(({ name }) => name).join(','),
|
|
75
|
-
}), {}),
|
|
76
|
-
...Object.entries((0, groupBy_1.default)(requestIdentifiers, 'name')).reduce((acc, [name, values]) => Object.assign(acc, {
|
|
77
|
-
[name]: values.map(({ value }) => value).join(','),
|
|
78
|
-
}), {}),
|
|
79
|
-
}));
|
|
80
|
-
const headers = (0, uniq_1.default)(data.map((d) => Object.keys(d)).flat());
|
|
81
|
-
(0, writeCsv_1.writeCsv)(file, data, headers);
|
|
82
|
-
logger_1.logger.info(colors_1.default.green(`Successfully wrote ${requests.length} requests to file "${file}"`));
|
|
83
|
-
return requestsWithRequestIdentifiers;
|
|
84
|
-
}
|
|
85
|
-
exports.pullRequestsToCsv = pullRequestsToCsv;
|
|
86
|
-
//# sourceMappingURL=pullRequestsToCsv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pullRequestsToCsv.js","sourceRoot":"","sources":["../../src/requests/pullRequestsToCsv.ts"],"names":[],"mappings":";;;;;;AAAA,wCAMoB;AACpB,oDAA4B;AAC5B,uCAA+B;AAC/B,uDAA+B;AAC/B,6DAAqC;AAErC,+CAA4C;AAC5C,sCAAmC;AACnC,4CAAqD;AAOrD;;;;GAIG;AACI,KAAK,UAAU,iBAAiB,CAAC,EACtC,IAAI,EACJ,IAAI,EACJ,OAAO,GAAG,EAAE,EACZ,QAAQ,GAAG,EAAE,EACb,SAAS,GAAG,GAAG,EACf,YAAY,GAAG,iCAAqB,EACpC,eAAe,EACf,cAAc,EACd,SAAS,GAoBV;IACC,4EAA4E;IAC5E,MAAM,MAAM,GAAG,IAAA,qCAA2B,EAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAE/D,iBAAiB;IACjB,IAAI,SAAS,GAAG,EAAE,CAAC;IACnB,IAAI,eAAe,EAAE;QACnB,SAAS,IAAI,WAAW,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC;KACzD;IACD,IAAI,cAAc,EAAE;QAClB,SAAS,IAAI,GACX,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACxB,UAAU,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC;KAC1C;IAED,UAAU;IACV,eAAM,CAAC,IAAI,CACT,gBAAM,CAAC,OAAO,CACZ,GACE,OAAO,CAAC,MAAM,GAAG,CAAC;QAChB,CAAC,CAAC,6BAA6B,OAAO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