@transcend-io/cli 8.0.2 → 8.0.4
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/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/bash-complete.cjs.map +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/cli.cjs.map +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/bin/deprecated-command.cjs.map +1 -1
- package/dist/{chunk-YKZKPWDF.cjs → chunk-2P2C7ZL3.cjs} +2 -2
- package/dist/{chunk-YKZKPWDF.cjs.map → chunk-2P2C7ZL3.cjs.map} +1 -1
- package/dist/{chunk-XARKMCNP.cjs → chunk-4ZN6PNJE.cjs} +4 -4
- package/dist/{chunk-XARKMCNP.cjs.map → chunk-4ZN6PNJE.cjs.map} +1 -1
- package/dist/{chunk-3PX3HVEO.cjs → chunk-6VG44TPZ.cjs} +2 -2
- package/dist/{chunk-3PX3HVEO.cjs.map → chunk-6VG44TPZ.cjs.map} +1 -1
- package/dist/{chunk-BPX6MSMC.cjs → chunk-6Z44RBJE.cjs} +2 -2
- package/dist/{chunk-BPX6MSMC.cjs.map → chunk-6Z44RBJE.cjs.map} +1 -1
- package/dist/chunk-GVWWTQ2S.cjs +3 -0
- package/dist/chunk-GVWWTQ2S.cjs.map +1 -0
- package/dist/chunk-HJBQCKCR.cjs +12 -0
- package/dist/chunk-HJBQCKCR.cjs.map +1 -0
- package/dist/chunk-LQHB5EIW.cjs +2 -0
- package/dist/chunk-LQHB5EIW.cjs.map +1 -0
- package/dist/{chunk-FNBADTTI.cjs → chunk-OBNZ7JBG.cjs} +19 -19
- package/dist/chunk-OBNZ7JBG.cjs.map +1 -0
- package/dist/chunk-QG4ECDFE.cjs +15 -0
- package/dist/chunk-QG4ECDFE.cjs.map +1 -0
- package/dist/{chunk-YP2PMUM5.cjs → chunk-XJAEXXYU.cjs} +2 -2
- package/dist/{chunk-YP2PMUM5.cjs.map → chunk-XJAEXXYU.cjs.map} +1 -1
- package/dist/{chunk-W3S3ULXN.cjs → chunk-YREFLYHM.cjs} +2 -2
- package/dist/{chunk-W3S3ULXN.cjs.map → chunk-YREFLYHM.cjs.map} +1 -1
- package/dist/chunk-ZBKJMC7C.cjs +2920 -0
- package/dist/chunk-ZBKJMC7C.cjs.map +1 -0
- package/dist/impl-35XLHL4O.cjs +2 -0
- package/dist/impl-35XLHL4O.cjs.map +1 -0
- package/dist/impl-3IUL3P3V.cjs +2 -0
- package/dist/impl-3IUL3P3V.cjs.map +1 -0
- package/dist/impl-3WG6YKYX.cjs +2 -0
- package/dist/impl-3WG6YKYX.cjs.map +1 -0
- package/dist/{impl-WWQBCKZV.cjs → impl-426AX523.cjs} +2 -2
- package/dist/impl-426AX523.cjs.map +1 -0
- package/dist/{impl-7MIPQI3E.cjs → impl-5B6CLRP6.cjs} +2 -2
- package/dist/impl-5B6CLRP6.cjs.map +1 -0
- package/dist/impl-5IBWZCND.cjs +2 -0
- package/dist/impl-5IBWZCND.cjs.map +1 -0
- package/dist/impl-6GEUCO6I.cjs +2 -0
- package/dist/impl-6GEUCO6I.cjs.map +1 -0
- package/dist/impl-6HXNGVRH.cjs +2 -0
- package/dist/impl-6HXNGVRH.cjs.map +1 -0
- package/dist/impl-77KAZ4XH.cjs +6 -0
- package/dist/impl-77KAZ4XH.cjs.map +1 -0
- package/dist/impl-AIUN3M37.cjs +2 -0
- package/dist/impl-AIUN3M37.cjs.map +1 -0
- package/dist/impl-B5MBY4PI.cjs +2 -0
- package/dist/impl-B5MBY4PI.cjs.map +1 -0
- package/dist/impl-BYVUQ5PD.cjs +2 -0
- package/dist/impl-BYVUQ5PD.cjs.map +1 -0
- package/dist/impl-CQPYZDEP.cjs +2 -0
- package/dist/impl-CQPYZDEP.cjs.map +1 -0
- package/dist/impl-E6NFYH4V.cjs +2 -0
- package/dist/impl-E6NFYH4V.cjs.map +1 -0
- package/dist/impl-E7RIXWG5.cjs +2 -0
- package/dist/impl-E7RIXWG5.cjs.map +1 -0
- package/dist/{impl-OXCKKL3L.cjs → impl-EHBBW7RO.cjs} +2 -2
- package/dist/impl-EHBBW7RO.cjs.map +1 -0
- package/dist/impl-EPE2BP2D.cjs +2 -0
- package/dist/impl-EPE2BP2D.cjs.map +1 -0
- package/dist/impl-G7JOSWM6.cjs +12 -0
- package/dist/impl-G7JOSWM6.cjs.map +1 -0
- package/dist/impl-HOCQ2FU3.cjs +3 -0
- package/dist/impl-HOCQ2FU3.cjs.map +1 -0
- package/dist/impl-I7QN6JHE.cjs +2 -0
- package/dist/impl-I7QN6JHE.cjs.map +1 -0
- package/dist/impl-IHFTH6YX.cjs +2 -0
- package/dist/impl-IHFTH6YX.cjs.map +1 -0
- package/dist/impl-JZLYOI5F.cjs +2 -0
- package/dist/impl-JZLYOI5F.cjs.map +1 -0
- package/dist/impl-M6FW6NDT.cjs +2 -0
- package/dist/impl-M6FW6NDT.cjs.map +1 -0
- package/dist/impl-O5FXKTSS.cjs +2 -0
- package/dist/impl-O5FXKTSS.cjs.map +1 -0
- package/dist/{impl-TC6DE6BU.cjs → impl-OKNOTBT6.cjs} +5 -5
- package/dist/impl-OKNOTBT6.cjs.map +1 -0
- package/dist/impl-PB3CEDXP.cjs +2 -0
- package/dist/impl-PB3CEDXP.cjs.map +1 -0
- package/dist/impl-QHLD4E4E.cjs +2 -0
- package/dist/impl-QHLD4E4E.cjs.map +1 -0
- package/dist/impl-RO3RT7ZE.cjs +2 -0
- package/dist/impl-RO3RT7ZE.cjs.map +1 -0
- package/dist/impl-SDF36RUQ.cjs +2 -0
- package/dist/impl-SDF36RUQ.cjs.map +1 -0
- package/dist/{impl-DFDEITPV.cjs → impl-T4JNIPRU.cjs} +4 -4
- package/dist/impl-T4JNIPRU.cjs.map +1 -0
- package/dist/impl-UIQVAQFF.cjs +2 -0
- package/dist/impl-UIQVAQFF.cjs.map +1 -0
- package/dist/impl-V4AAI72P.cjs +2 -0
- package/dist/impl-V4AAI72P.cjs.map +1 -0
- package/dist/impl-VMZLIXUM.cjs +4 -0
- package/dist/impl-VMZLIXUM.cjs.map +1 -0
- package/dist/impl-VO6SR3UF.cjs +2 -0
- package/dist/impl-VO6SR3UF.cjs.map +1 -0
- package/dist/impl-WVOC3NBM.cjs +2 -0
- package/dist/impl-WVOC3NBM.cjs.map +1 -0
- package/dist/impl-YJ7MLTPD.cjs +2 -0
- package/dist/impl-YJ7MLTPD.cjs.map +1 -0
- package/dist/impl-YVUKRVNV.cjs +2 -0
- package/dist/impl-YVUKRVNV.cjs.map +1 -0
- package/dist/impl-ZGRHLCA3.cjs +6 -0
- package/dist/impl-ZGRHLCA3.cjs.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -12
- package/package.json +1 -1
- package/dist/chunk-44J2TVZU.cjs +0 -15
- package/dist/chunk-44J2TVZU.cjs.map +0 -1
- package/dist/chunk-7UL54E7X.cjs +0 -2
- package/dist/chunk-7UL54E7X.cjs.map +0 -1
- package/dist/chunk-A4OQQVQT.cjs +0 -3
- package/dist/chunk-A4OQQVQT.cjs.map +0 -1
- package/dist/chunk-FNBADTTI.cjs.map +0 -1
- package/dist/chunk-N7QF44VW.cjs +0 -2
- package/dist/chunk-N7QF44VW.cjs.map +0 -1
- package/dist/chunk-PQTI6C4Q.cjs +0 -12
- package/dist/chunk-PQTI6C4Q.cjs.map +0 -1
- package/dist/chunk-TD7ADMVO.cjs +0 -2
- package/dist/chunk-TD7ADMVO.cjs.map +0 -1
- package/dist/chunk-UONUI4AB.cjs +0 -2920
- package/dist/chunk-UONUI4AB.cjs.map +0 -1
- package/dist/chunk-XPKFB4IL.cjs +0 -2
- package/dist/chunk-XPKFB4IL.cjs.map +0 -1
- package/dist/chunk-YMXQXAUZ.cjs +0 -2
- package/dist/chunk-YMXQXAUZ.cjs.map +0 -1
- package/dist/impl-2BXBJZII.cjs +0 -2
- package/dist/impl-2BXBJZII.cjs.map +0 -1
- package/dist/impl-2SHN3CZX.cjs +0 -2
- package/dist/impl-2SHN3CZX.cjs.map +0 -1
- package/dist/impl-334G4VTL.cjs +0 -2
- package/dist/impl-334G4VTL.cjs.map +0 -1
- package/dist/impl-37NGCBEQ.cjs +0 -2
- package/dist/impl-37NGCBEQ.cjs.map +0 -1
- package/dist/impl-5IS3UVQQ.cjs +0 -2
- package/dist/impl-5IS3UVQQ.cjs.map +0 -1
- package/dist/impl-5IZQDLG7.cjs +0 -2
- package/dist/impl-5IZQDLG7.cjs.map +0 -1
- package/dist/impl-7MIPQI3E.cjs.map +0 -1
- package/dist/impl-AJMAFFJG.cjs +0 -2
- package/dist/impl-AJMAFFJG.cjs.map +0 -1
- package/dist/impl-BL64FHKY.cjs +0 -2
- package/dist/impl-BL64FHKY.cjs.map +0 -1
- package/dist/impl-BXNGIHN2.cjs +0 -4
- package/dist/impl-BXNGIHN2.cjs.map +0 -1
- package/dist/impl-DDHHIRXW.cjs +0 -12
- package/dist/impl-DDHHIRXW.cjs.map +0 -1
- package/dist/impl-DFDEITPV.cjs.map +0 -1
- package/dist/impl-DZSW2V2J.cjs +0 -2
- package/dist/impl-DZSW2V2J.cjs.map +0 -1
- package/dist/impl-FC7ICRDM.cjs +0 -2
- package/dist/impl-FC7ICRDM.cjs.map +0 -1
- package/dist/impl-G2MAA4QD.cjs +0 -2
- package/dist/impl-G2MAA4QD.cjs.map +0 -1
- package/dist/impl-GIZXIRD5.cjs +0 -2
- package/dist/impl-GIZXIRD5.cjs.map +0 -1
- package/dist/impl-H3RZXUMP.cjs +0 -2
- package/dist/impl-H3RZXUMP.cjs.map +0 -1
- package/dist/impl-HG3PK5DG.cjs +0 -2
- package/dist/impl-HG3PK5DG.cjs.map +0 -1
- package/dist/impl-IAZCCRHG.cjs +0 -2
- package/dist/impl-IAZCCRHG.cjs.map +0 -1
- package/dist/impl-K3VBUCUB.cjs +0 -2
- package/dist/impl-K3VBUCUB.cjs.map +0 -1
- package/dist/impl-KMLDAWB5.cjs +0 -6
- package/dist/impl-KMLDAWB5.cjs.map +0 -1
- package/dist/impl-LDJGDZNJ.cjs +0 -2
- package/dist/impl-LDJGDZNJ.cjs.map +0 -1
- package/dist/impl-LLCE3XUF.cjs +0 -6
- package/dist/impl-LLCE3XUF.cjs.map +0 -1
- package/dist/impl-MVGWE3OY.cjs +0 -2
- package/dist/impl-MVGWE3OY.cjs.map +0 -1
- package/dist/impl-N56GZUUE.cjs +0 -2
- package/dist/impl-N56GZUUE.cjs.map +0 -1
- package/dist/impl-NRVKZ6QP.cjs +0 -2
- package/dist/impl-NRVKZ6QP.cjs.map +0 -1
- package/dist/impl-O7M62JQO.cjs +0 -2
- package/dist/impl-O7M62JQO.cjs.map +0 -1
- package/dist/impl-OXCKKL3L.cjs.map +0 -1
- package/dist/impl-OYQLTGBY.cjs +0 -2
- package/dist/impl-OYQLTGBY.cjs.map +0 -1
- package/dist/impl-PNDNQD25.cjs +0 -2
- package/dist/impl-PNDNQD25.cjs.map +0 -1
- package/dist/impl-Q2JAFPV5.cjs +0 -2
- package/dist/impl-Q2JAFPV5.cjs.map +0 -1
- package/dist/impl-Q6LOHZB6.cjs +0 -2
- package/dist/impl-Q6LOHZB6.cjs.map +0 -1
- package/dist/impl-QS77O4PW.cjs +0 -2
- package/dist/impl-QS77O4PW.cjs.map +0 -1
- package/dist/impl-TC6DE6BU.cjs.map +0 -1
- package/dist/impl-W6WGF5YD.cjs +0 -3
- package/dist/impl-W6WGF5YD.cjs.map +0 -1
- package/dist/impl-WHZWURMO.cjs +0 -2
- package/dist/impl-WHZWURMO.cjs.map +0 -1
- package/dist/impl-WWQBCKZV.cjs.map +0 -1
- package/dist/impl-XWRII7ET.cjs +0 -2
- package/dist/impl-XWRII7ET.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-GVWWTQ2S.cjs","../src/lib/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.ts","../src/lib/manual-enrichment/pushManualEnrichmentIdentifiersFromCsv.ts"],"names":["pullManualEnrichmentIdentifiersToCsv","file","auth","sombraAuth","requestActions","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClient","sombra","createSombraGotInstance","logger","colors"],"mappings":"AAAA,mfAAwC,wDAAyG,wDAAyC,wDAAuD,2DCApM,oCACzB,gFACD,MA6BnB,SAAsBA,EAAAA,CAAqC,CACzD,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,CAAC,CAAA,CAClB,WAAA,CAAAC,CAAAA,CAAc,GAAA,CACd,YAAA,CAAAC,CAAAA,CAAeC,mBACjB,CAAA,CAa6C,CAE3C,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BH,CAAcJ,CAAI,CAAA,CACvDQ,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBL,CAAcJ,CAAAA,CAAMC,CAAU,CAAA,CAE3ES,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,0DAAA,EAA6DT,CAAAA,CAAe,IAAA,CAC1E,GACF,CAAC,CAAA,CAAA;ACuDP,gBAAA","file":"/home/runner/work/cli/cli/dist/chunk-GVWWTQ2S.cjs","sourcesContent":[null,"import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { map } from 'bluebird';\nimport colors from 'colors';\nimport { groupBy, uniq } from 'lodash-es';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { writeCsv } from '../cron/writeCsv';\nimport {\n PrivacyRequest,\n RequestEnricher,\n RequestIdentifier,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllRequestEnrichers,\n fetchAllRequestIdentifiers,\n fetchAllRequests,\n} from '../graphql';\nimport { logger } from '../../logger';\n\nexport interface PrivacyRequestWithIdentifiers extends PrivacyRequest {\n /** Request Enrichers */\n requestEnrichers: RequestEnricher[];\n /** Request Identifiers */\n requestIdentifiers: RequestIdentifier[];\n}\n\n/**\n * Pull the set of manual enrichment jobs to CSV\n *\n * @param options - Options\n * @returns List of requests with identifiers\n */\nexport async function pullManualEnrichmentIdentifiersToCsv({\n file,\n auth,\n sombraAuth,\n requestActions = [],\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** The request actions to fetch */\n requestActions?: RequestAction[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<PrivacyRequestWithIdentifiers[]> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n logger.info(\n colors.magenta(\n `Pulling manual enrichment requests, filtered for actions: ${requestActions.join(\n ',',\n )}`,\n ),\n );\n\n // Pull all privacy requests\n const allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n statuses: [RequestStatus.Enriching],\n });\n\n // Requests to save\n const savedRequests: PrivacyRequestWithIdentifiers[] = [];\n\n // Filter down requests to what is needed\n await map(\n allRequests,\n async (request) => {\n // Fetch enrichers\n const requestEnrichers = await fetchAllRequestEnrichers(client, {\n requestId: request.id,\n });\n\n // Check if manual enrichment exists for that request\n const hasManualEnrichment = requestEnrichers.filter(\n ({ status }) => status === 'ACTION_REQUIRED',\n );\n\n // Save request to queue\n if (hasManualEnrichment) {\n const requestIdentifiers = await fetchAllRequestIdentifiers(\n client,\n sombra,\n {\n requestId: request.id,\n },\n );\n savedRequests.push({\n ...request,\n requestIdentifiers,\n requestEnrichers,\n });\n }\n },\n {\n concurrency,\n },\n );\n\n const data = savedRequests.map(\n ({\n attributeValues,\n requestIdentifiers,\n requestEnrichers, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...request\n }) => ({\n ...request,\n // flatten identifiers\n ...Object.entries(groupBy(requestIdentifiers, 'name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ value }) => value).join(','),\n }),\n {},\n ),\n // flatten attributes\n ...Object.entries(groupBy(attributeValues, 'attributeKey.name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ name }) => name).join(','),\n }),\n {},\n ),\n }),\n );\n\n // Write out to CSV\n const headers = uniq(data.map((d) => Object.keys(d)).flat());\n writeCsv(file, data, headers);\n\n logger.info(\n colors.green(\n `Successfully wrote ${savedRequests.length} requests to file \"${file}\"`,\n ),\n );\n\n return savedRequests;\n}\n","import colors from 'colors';\nimport { map } from 'bluebird';\nimport { logger } from '../../logger';\nimport {\n UPDATE_PRIVACY_REQUEST,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n makeGraphQLRequest,\n} from '../graphql';\nimport {\n enrichPrivacyRequest,\n EnrichPrivacyRequest,\n} from './enrichPrivacyRequest';\nimport { readCsv } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Push a CSV of enriched requests back into Transcend\n *\n * @param options - Options\n * @returns Number of items processed\n */\nexport async function pushManualEnrichmentIdentifiersFromCsv({\n file,\n auth,\n sombraAuth,\n enricherId,\n markSilent,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** ID of enricher being uploaded to */\n enricherId: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Mark requests in silent mode before enriching */\n markSilent?: boolean;\n}): Promise<number> {\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, EnrichPrivacyRequest);\n\n // Notify Transcend\n logger.info(\n colors.magenta(`Enriching \"${activeResults.length}\" privacy requests.`),\n );\n\n let successCount = 0;\n let skippedCount = 0;\n let errorCount = 0;\n\n await map(\n activeResults,\n async (request, index) => {\n try {\n // Mark requests in silent mode before a certain date\n if (markSilent) {\n await makeGraphQLRequest(client, UPDATE_PRIVACY_REQUEST, {\n input: {\n id: request.id,\n isSilent: true,\n },\n });\n\n logger.info(\n colors.magenta(`Mark request as silent mode - ${request.id}`),\n );\n }\n\n const result = await enrichPrivacyRequest(\n sombra,\n request,\n enricherId,\n index,\n );\n if (result) {\n successCount += 1;\n } else {\n skippedCount += 1;\n }\n } catch (err) {\n errorCount += 1;\n }\n },\n { concurrency },\n );\n\n logger.info(\n colors.green(\n `Successfully notified Transcend! \\n Success count: ${successCount}.`,\n ),\n );\n\n if (skippedCount > 0) {\n logger.info(colors.magenta(`Skipped count: ${skippedCount}.`));\n }\n\n if (errorCount > 0) {\n logger.info(colors.red(`Error Count: ${errorCount}.`));\n throw new Error(`Failed to enrich: ${errorCount} requests.`);\n }\n\n return activeResults.length;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk6Z44RBJEcjs = require('./chunk-6Z44RBJE.cjs');var _chunkQEM6S2W7cjs = require('./chunk-QEM6S2W7.cjs');var _chunkZBKJMC7Ccjs = require('./chunk-ZBKJMC7C.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkQG4ECDFEcjs = require('./chunk-QG4ECDFE.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function at({auth:e,deploy:i=!1,transcendUrl:o=_chunkQG4ECDFEcjs.r,bundleTypes:t=Object.values(_privacytypes.ConsentBundleType)}){let r=_chunkZBKJMC7Ccjs.vc.call(void 0, o,e),n=await _chunkZBKJMC7Ccjs.Oc.call(void 0, r);await _bluebird.mapSeries.call(void 0, t,async a=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Update Consent Manager bundle with ID "${n}" and type "${a}" to latest version...`)),await _chunkZBKJMC7Ccjs.zc.call(void 0, r,{id:n,bundleType:a}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Updated Consent Manager bundle with ID "${n}" and type "${a}" to latest version!`))}),i&&await _bluebird.mapSeries.call(void 0, t,async a=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Deploying Consent Manager bundle with ID "${n}" and type "${a}"...`)),await _chunkZBKJMC7Ccjs.yc.call(void 0, r,{id:n,bundleType:a}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Deployed Consent Manager bundle with ID "${n}" and type "${a}"!`))})}var K=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function Ct({auth:e,trackerStatus:i,file:o,classifyService:t=!1,transcendUrl:r=_chunkQG4ECDFEcjs.r}){let n=_chunkZBKJMC7Ccjs.vc.call(void 0, r,e);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let l=_chunkZBKJMC7Ccjs.qc.call(void 0, o,_chunkQEM6S2W7cjs.ia).map(({Type:d,Notes:m,Service:f,Purpose:E,Status:g,Owners:I,Teams:T,"Connections Made To":v,...y})=>({value:v,type:d,description:m,trackingPurposes:_chunkZBKJMC7Ccjs.nc.call(void 0, E),status:g||i,owners:I?_chunkZBKJMC7Ccjs.nc.call(void 0, I):void 0,teams:T?_chunkZBKJMC7Ccjs.nc.call(void 0, T):void 0,attributes:Object.entries(y).filter(([h])=>!K.includes(h)).map(([h,B])=>({key:h,values:_chunkZBKJMC7Ccjs.nc.call(void 0, B)}))}));await _chunkZBKJMC7Ccjs.Pe.call(void 0, n,l,t)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Encountered error(s) syncing data flows from CSV, see logs above for more info. ")),process.exit(1))}var j=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function vt({auth:e,trackerStatus:i,file:o,transcendUrl:t=_chunkQG4ECDFEcjs.r}){let r=_chunkZBKJMC7Ccjs.vc.call(void 0, t,e);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let a=_chunkZBKJMC7Ccjs.qc.call(void 0, o,_chunkQEM6S2W7cjs.ja).map(({"Is Regex?":s,Notes:d,Service:m,Purpose:f,Status:E,Owners:g,Teams:I,Name:T,...v})=>({...typeof s=="string"?{isRegex:s.toLowerCase()==="true"}:{},name:T,description:d,trackingPurposes:_chunkZBKJMC7Ccjs.nc.call(void 0, f),status:E||i,owners:g?_chunkZBKJMC7Ccjs.nc.call(void 0, g):void 0,teams:I?_chunkZBKJMC7Ccjs.nc.call(void 0, I):void 0,attributes:Object.entries(v).filter(([y])=>!j.includes(y)).map(([y,h])=>({key:y,values:_chunkZBKJMC7Ccjs.nc.call(void 0, h)}))}));await _chunkZBKJMC7Ccjs.Je.call(void 0, r,a)||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("Encountered error(s) syncing cookies from CSV, see logs above for more info. ")),process.exit(1))}var Y=1e3,Q=60*Y,V=60*Q,X=24*V,z=7*X;async function Lt(e,{bin:i,start:o,end:t=new Date}){let r=await _chunkZBKJMC7Ccjs.Oc.call(void 0, e),n=Math.floor(o.getTime()/1e3),a=Math.floor(t.getTime()/1e3);if(n>a)throw new Error('Received "end" date that happened before "start" date');if(i==="1h"&&t.getTime()-o.getTime()>z*2)throw new Error("When using bin=1h, start and end time can be no more than 2 weeks apart");let l=o.toISOString(),s=t.toISOString(),[d,m,f]=await Promise.all([_chunkZBKJMC7Ccjs.Rc.call(void 0, e,{dataSource:"PRIVACY_SIGNAL_TIMESERIES",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1}),_chunkZBKJMC7Ccjs.Rc.call(void 0, e,{dataSource:"CONSENT_CHANGES_TIMESERIES",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1}),_chunkZBKJMC7Ccjs.Rc.call(void 0, e,{dataSource:"CONSENT_SESSIONS_BY_REGIME",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1})]);return{PRIVACY_SIGNAL_TIMESERIES:d,CONSENT_CHANGES_TIMESERIES:m,CONSENT_SESSIONS_BY_REGIME:f}}var $=e=>new URL(`https://${e}`).hostname.split(".").slice(-2).join(".");var J=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;async function Ht(e,{xdiLocation:i,transcendUrl:o=_chunkQG4ECDFEcjs.r,removeIpAddresses:t=!0,domainBlockList:r=["localhost"],xdiAllowedCommands:n="ConsentManager:Sync"}){let a=Array.isArray(e)?e:[{apiKey:e,organizationId:"",organizationName:""}],l=await _bluebird.map.call(void 0, a,async m=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling consent metadata for organization - ${m.organizationName}`));let f=_chunkZBKJMC7Ccjs.vc.call(void 0, o,m.apiKey);return await _chunkZBKJMC7Ccjs.Nc.call(void 0, f)},{concurrency:5}),s={};return l.forEach(m=>{let f=_optionalChain([m, 'access', _2 => _2.partition, 'optionalAccess', _3 => _3.partition])||m.bundleURL.split("/").reverse()[1];s[f]||(s[f]=[]);let E=_chunkQG4ECDFEcjs.c.call(void 0, m.configuration.domains.filter(g=>!t||!J.test(g)).map(g=>$(g)),r);s[f]=[...new Set([...s[f]||[],...E])]}),{html:`
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<script
|
|
4
|
+
src="${i}"
|
|
5
|
+
data-sync-groups='${JSON.stringify(s,null,2)}'
|
|
6
|
+
data-xdi-commands="${n}"
|
|
7
|
+
></script>
|
|
8
|
+
`,syncGroups:s}}function Yt(e){let i=e.map(({name:o,input:t})=>({title:o.replace(".yml",""),attributes:[..._optionalChain([t, 'optionalAccess', _4 => _4.domains])?[{key:"Transcend Domain List",values:[...new Set(t.domains)]}]:[],..._optionalChain([t, 'optionalAccess', _5 => _5.bundleUrls])?[{key:"Airgap Production URL",values:[t.bundleUrls.PRODUCTION]},{key:"Airgap Test URL",values:[t.bundleUrls.TEST]},{key:"Airgap XDI URL",values:[t.bundleUrls.PRODUCTION.replace("airgap.js","xdi.js")]}]:[],..._optionalChain([t, 'optionalAccess', _6 => _6.partition])?[{key:"Consent Partition Key",values:[t.partition]}]:[]]}));return _chunkZUNVPK23cjs.a.info(`
|
|
9
|
+
|
|
10
|
+
~~~~~~~~~~~
|
|
11
|
+
Airgap scripts to host:`),i.forEach(({attributes:o,title:t},r)=>{_optionalChain([o, 'optionalAccess', _7 => _7.find, 'call', _8 => _8(n=>n.key==="Airgap Production URL"), 'optionalAccess', _9 => _9.values, 'optionalAccess', _10 => _10.forEach, 'call', _11 => _11(n=>{_chunkZUNVPK23cjs.a.info(`${r}) ${t} - ${n}`)})])}),i}var _iots = require('io-ts'); var p = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var tt=p.intersection([p.type({nodes:p.array(_chunk6Z44RBJEcjs.c)}),p.partial({lastKey:p.partial({userId:p.string,partition:p.string,timestamp:p.string})})]);async function zt(e,{partition:i,filterBy:o={},limit:t=50}){let r,n=[],a=!0;for(;a;){let l=await e.post("v1/consent-preferences",{json:{partition:i,...o,startKey:r||void 0,limit:t}}).json(),{nodes:s,lastKey:d}=_typeutils.decodeCodec.call(void 0, tt,l);if(!s||s.length===0)break;n.push(...s),r=d,a=!!d&&Object.keys(d).length>0}return n}exports.a = at; exports.b = Ct; exports.c = vt; exports.d = Lt; exports.e = $; exports.f = J; exports.g = Ht; exports.h = Yt; exports.i = tt; exports.j = zt;
|
|
12
|
+
//# sourceMappingURL=chunk-HJBQCKCR.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-HJBQCKCR.cjs","../src/lib/consent-manager/updateConsentManagerVersionToLatest.ts","../src/lib/consent-manager/uploadDataFlowsFromCsv.ts","../src/lib/consent-manager/uploadCookiesFromCsv.ts","../src/lib/consent-manager/pullConsentManagerMetrics.ts","../src/lib/consent-manager/domainToHost.ts","../src/lib/consent-manager/buildXdiSyncEndpoint.ts","../src/lib/consent-manager/consentManagersToBusinessEntities.ts","../src/lib/consent-manager/fetchConsentPreferences.ts"],"names":["updateConsentManagerVersionToLatest","auth","deploy","transcendUrl","DEFAULT_TRANSCEND_API","bundleTypes","ConsentBundleType","client","buildTranscendGraphQLClient","consentManagerId","fetchConsentManagerId","mapSeries","bundleType","logger","colors","updateConsentManagerToLatest","deployConsentManager","OMIT_COLUMNS","uploadDataFlowsFromCsv","trackerStatus","file","classifyService","validatedDataFlowInputs","readCsv","DataFlowCsvInput","Type","Notes","Service","Purpose","Status","Owners","Teams","value","rest","splitCsvToList","key","syncDataFlows","uploadCookiesFromCsv","validatedCookieInputs","CookieCsvInput","isRegex","Name","syncCookies","ONE_SECOND","ONE_MINUTE","ONE_HOUR","ONE_DAY","ONE_WEEK","pullConsentManagerMetrics","bin","start","end","airgapBundleId","startTime","endTime","startDate","endDate","privacySignalData","consentChangesData","consentSessionsByRegimeData","fetchConsentManagerAnalyticsData","domainToHost","domain"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/chunk-HJBQCKCR.cjs","sourcesContent":[null,"import { ConsentBundleType } from '@transcend-io/privacy-types';\nimport { mapSeries } from 'bluebird';\nimport {\n updateConsentManagerToLatest,\n buildTranscendGraphQLClient,\n fetchConsentManagerId,\n deployConsentManager,\n} from '../graphql';\nimport colors from 'colors';\n\nimport { logger } from '../../logger';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Update the consent manager to latest version\n *\n * @param options - Options\n */\nexport async function updateConsentManagerVersionToLatest({\n auth,\n deploy = false,\n transcendUrl = DEFAULT_TRANSCEND_API,\n bundleTypes = Object.values(ConsentBundleType),\n}: {\n /** Transcend API key authentication */\n auth: string;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Deploy consent manager with this update */\n deploy?: boolean;\n /** The bundle types to update and deploy */\n bundleTypes?: ConsentBundleType[];\n}): Promise<void> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Grab Consent Manager ID\n const consentManagerId = await fetchConsentManagerId(client);\n\n // Update each bundle type to latest version\n await mapSeries(bundleTypes, async (bundleType) => {\n logger.info(\n colors.magenta(\n `Update Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\" to latest version...`,\n ),\n );\n await updateConsentManagerToLatest(client, {\n id: consentManagerId,\n bundleType,\n });\n logger.info(\n colors.green(\n `Updated Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\" to latest version!`,\n ),\n );\n });\n\n // deploy Consent Managers\n if (deploy) {\n // Update each bundle type to latest version\n await mapSeries(bundleTypes, async (bundleType) => {\n logger.info(\n colors.magenta(\n `Deploying Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\"...`,\n ),\n );\n await deployConsentManager(client, {\n id: consentManagerId,\n bundleType,\n });\n logger.info(\n colors.green(\n `Deployed Consent Manager bundle with ID \"${consentManagerId}\" and type \"${bundleType}\"!`,\n ),\n );\n });\n }\n}\n","import colors from 'colors';\nimport { logger } from '../../logger';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { buildTranscendGraphQLClient, syncDataFlows } from '../graphql';\nimport { readCsv } from '../requests/readCsv';\nimport { DataFlowInput, DataFlowCsvInput } from '../../codecs';\nimport { splitCsvToList } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nconst OMIT_COLUMNS = [\n 'ID',\n 'Activity',\n 'Encounters',\n 'Last Seen At',\n 'Has Native Do Not Sell/Share Support',\n 'IAB USP API Support',\n 'Service Description',\n 'Website URL',\n 'Categories of Recipients',\n];\n\n/**\n * Upload a set of data flows from CSV\n *\n * @param options - Options\n */\nexport async function uploadDataFlowsFromCsv({\n auth,\n trackerStatus,\n file,\n classifyService = false,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key authentication */\n trackerStatus: ConsentTrackerStatus;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<void> {\n // Build a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV the set of data flow inputs\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const dataFlowInputs = readCsv(file, DataFlowCsvInput);\n\n // Convert these data flow inputs into a format that the other function can use\n const validatedDataFlowInputs = dataFlowInputs.map(\n ({\n Type,\n Notes,\n // TODO: https://transcend.height.app/T-26391 - export in CSV\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Service,\n Purpose,\n Status,\n Owners,\n Teams,\n 'Connections Made To': value,\n ...rest\n }): DataFlowInput => ({\n value,\n type: Type,\n description: Notes,\n trackingPurposes: splitCsvToList(Purpose),\n // TODO: https://transcend.height.app/T-26391\n // service: Service,\n // Apply the trackerStatus to all values in the CSV -> allows for customer to define tracker status\n // on a row by row basis if needed\n status: Status || trackerStatus,\n owners: Owners ? splitCsvToList(Owners) : undefined,\n teams: Teams ? splitCsvToList(Teams) : undefined,\n // all remaining options are attribute\n attributes: Object.entries(rest)\n // filter out native columns that are exported from the admin dashboard\n // but not custom attributes\n .filter(([key]) => !OMIT_COLUMNS.includes(key))\n .map(([key, value]) => ({\n key,\n values: splitCsvToList(value),\n })),\n }),\n );\n\n // Upload the data flows into Transcend dashboard\n const syncedDataFlows = await syncDataFlows(\n client,\n validatedDataFlowInputs,\n classifyService,\n );\n\n // Log errors\n if (!syncedDataFlows) {\n logger.error(\n colors.red(\n 'Encountered error(s) syncing data flows from CSV, see logs above for more info. ',\n ),\n );\n process.exit(1);\n }\n}\n","import colors from 'colors';\nimport { logger } from '../../logger';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { buildTranscendGraphQLClient, syncCookies } from '../graphql';\nimport { readCsv } from '../requests/readCsv';\nimport { CookieInput, CookieCsvInput } from '../../codecs';\nimport { splitCsvToList } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nconst OMIT_COLUMNS = [\n 'ID',\n 'Activity',\n 'Encounters',\n 'Last Seen At',\n 'Has Native Do Not Sell/Share Support',\n 'IAB USP API Support',\n 'Service Description',\n 'Website URL',\n 'Categories of Recipients',\n];\n\n/**\n * Upload a set of cookies from CSV\n *\n * @param options - Options\n */\nexport async function uploadCookiesFromCsv({\n auth,\n trackerStatus,\n file,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key authentication */\n trackerStatus: ConsentTrackerStatus;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<void> {\n // Build a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV the set of cookie inputs\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const cookieInputs = readCsv(file, CookieCsvInput);\n\n // Convert these inputs into a format that the other function can use\n const validatedCookieInputs = cookieInputs.map(\n ({\n 'Is Regex?': isRegex,\n Notes,\n // TODO: https://transcend.height.app/T-26391 - export in CSV\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Service,\n Purpose,\n Status,\n Owners,\n Teams,\n Name,\n ...rest\n }): CookieInput => ({\n ...(typeof isRegex === 'string'\n ? { isRegex: isRegex.toLowerCase() === 'true' }\n : {}),\n name: Name,\n description: Notes,\n trackingPurposes: splitCsvToList(Purpose),\n // TODO: https://transcend.height.app/T-26391\n // service: Service,\n // Apply the trackerStatus to all values in the CSV -> allows for customer to define tracker status\n // on a row by row basis if needed\n status: Status || trackerStatus,\n owners: Owners ? splitCsvToList(Owners) : undefined,\n teams: Teams ? splitCsvToList(Teams) : undefined,\n // all remaining options are attribute\n attributes: Object.entries(rest)\n // filter out native columns that are exported from the admin dashboard\n // but not custom attributes\n .filter(([key]) => !OMIT_COLUMNS.includes(key))\n .map(([key, value]) => ({\n key,\n values: splitCsvToList(value),\n })),\n }),\n );\n\n // Upload the cookies into Transcend dashboard\n const syncedCookies = await syncCookies(client, validatedCookieInputs);\n\n // Log errors\n if (!syncedCookies) {\n logger.error(\n colors.red(\n 'Encountered error(s) syncing cookies from CSV, see logs above for more info. ',\n ),\n );\n process.exit(1);\n }\n}\n","import type { GraphQLClient } from 'graphql-request';\nimport {\n ConsentManagerMetric,\n ConsentManagerMetricBin,\n fetchConsentManagerAnalyticsData,\n fetchConsentManagerId,\n} from '../graphql';\n\n/**\n * One second of time in ms\n */\nconst ONE_SECOND = 1000;\nconst ONE_MINUTE = 60 * ONE_SECOND;\nconst ONE_HOUR = 60 * ONE_MINUTE;\nconst ONE_DAY = 24 * ONE_HOUR;\nconst ONE_WEEK = 7 * ONE_DAY;\n\n/**\n * Pull consent manager metrics in an organization\n *\n * @param client - GraphQL client\n * @param options - Options\n * @returns The consent manager metrics\n */\nexport async function pullConsentManagerMetrics(\n client: GraphQLClient,\n {\n bin,\n start,\n end = new Date(),\n }: {\n /** Start date to pull metrics from */\n start: Date;\n /** End date to pull metrics from (assumes now) */\n end?: Date;\n /** Bin size to pull metrics */\n bin: ConsentManagerMetricBin;\n },\n): Promise<{\n /** Privacy signal data */\n PRIVACY_SIGNAL_TIMESERIES: ConsentManagerMetric[];\n /** Consent changes data */\n CONSENT_CHANGES_TIMESERIES: ConsentManagerMetric[];\n /** Consent sessions by regime */\n CONSENT_SESSIONS_BY_REGIME: ConsentManagerMetric[];\n}> {\n // Grab the bundleId associated with this API key\n const airgapBundleId = await fetchConsentManagerId(client);\n\n // convert start and end to times\n const startTime = Math.floor(start.getTime() / 1000);\n const endTime = Math.floor(end.getTime() / 1000);\n if (startTime > endTime) {\n throw new Error('Received \"end\" date that happened before \"start\" date');\n }\n\n // do not allow hourly bins greater than 2 weeks\n if (bin === '1h' && end.getTime() - start.getTime() > ONE_WEEK * 2) {\n throw new Error(\n 'When using bin=1h, start and end time can be no more than 2 weeks apart',\n );\n }\n\n // Pull in the metrics\n const startDate = start.toISOString();\n const endDate = end.toISOString();\n const [privacySignalData, consentChangesData, consentSessionsByRegimeData] =\n await Promise.all([\n fetchConsentManagerAnalyticsData(client, {\n dataSource: 'PRIVACY_SIGNAL_TIMESERIES',\n startDate,\n endDate,\n forceRefetch: true,\n airgapBundleId,\n binInterval: bin,\n smoothTimeseries: false,\n }),\n fetchConsentManagerAnalyticsData(client, {\n dataSource: 'CONSENT_CHANGES_TIMESERIES',\n startDate,\n endDate,\n forceRefetch: true,\n airgapBundleId,\n binInterval: bin,\n smoothTimeseries: false,\n }),\n fetchConsentManagerAnalyticsData(client, {\n dataSource: 'CONSENT_SESSIONS_BY_REGIME',\n startDate,\n endDate,\n forceRefetch: true,\n airgapBundleId,\n binInterval: bin,\n smoothTimeseries: false,\n }),\n ]);\n\n return {\n PRIVACY_SIGNAL_TIMESERIES: privacySignalData,\n CONSENT_CHANGES_TIMESERIES: consentChangesData,\n CONSENT_SESSIONS_BY_REGIME: consentSessionsByRegimeData,\n };\n}\n","/**\n * Convert a domain to host\n *\n * @param domain - e.g. test.acme.com\n * @returns Host acme.com\n */\nexport const domainToHost = (domain: string): string =>\n new URL(`https://${domain}`).hostname.split('.').slice(-2).join('.');\n","import colors from 'colors';\n\nimport { buildTranscendGraphQLClient, fetchConsentManager } from '../graphql';\nimport { difference } from 'lodash-es';\nimport { map } from 'bluebird';\nimport { StoredApiKey } from '../../codecs';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { logger } from '../../logger';\nimport { domainToHost } from './domainToHost';\n\n/**\n * Sync group configuration mapping\n * e.g.\n * {\n * \"abdb5e78-0d69-4554-a3bd-84b72ca3b3d9\": [\n * \"test.com\"\n * ],\n * \"f6b3ba87-c9df-444f-b420-6fac49e35910\": [\n * \"blue.com\"\n * ]\n * }\n */\nexport type XdiSyncGroups = { [k in string]: string[] };\n\n/** Regular expression for IP addresses - remove these from sync endpoint */\nexport const IP_ADDRESS_REGEX =\n // eslint-disable-next-line max-len\n /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;\n\n/**\n * Build the sync endpoint definition for a set of Transcend accounts\n *\n * @param apiKeys - The API keys that will be used to pull down configurations for\n * @param options - Options\n * @returns The XDI configuration\n */\nexport async function buildXdiSyncEndpoint(\n apiKeys: string | StoredApiKey[],\n {\n xdiLocation,\n transcendUrl = DEFAULT_TRANSCEND_API,\n removeIpAddresses = true,\n domainBlockList = ['localhost'],\n xdiAllowedCommands = 'ConsentManager:Sync',\n }: {\n /** The file location where the XDI file is hosted */\n xdiLocation: string;\n /** URL of Transcend API */\n transcendUrl?: string;\n /** When true, remove IP addresses (defaults to true) */\n removeIpAddresses?: boolean;\n /** Block list of domains to omit from sync endpoint - includes `localhost` by default */\n domainBlockList?: string[];\n /** Allows XDI commands */\n xdiAllowedCommands?: string;\n },\n): Promise<{\n /** Sync group configurations */\n syncGroups: XdiSyncGroups;\n /** The HTML string */\n html: string;\n}> {\n // Convert API keys to list\n const apiKeysAsList = Array.isArray(apiKeys)\n ? apiKeys\n : [{ apiKey: apiKeys, organizationId: '', organizationName: '' }];\n\n // Fetch configuration for each account\n const consentManagers = await map(\n apiKeysAsList,\n async (apiKey) => {\n logger.info(\n colors.magenta(\n `Pulling consent metadata for organization - ${apiKey.organizationName}`,\n ),\n );\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKey.apiKey);\n\n // Grab consent manager\n const consentManager = await fetchConsentManager(client);\n return consentManager;\n },\n { concurrency: 5 },\n );\n\n // construct the sync groups\n const syncGroups: XdiSyncGroups = {};\n consentManagers.forEach((consentManager) => {\n // grab the partition key\n const partitionKey =\n // take explicit key first\n consentManager.partition?.partition ||\n // fallback to bundle ID\n consentManager.bundleURL.split('/').reverse()[1];\n\n // Ensure that partition exists in the sync groups\n if (!syncGroups[partitionKey]) {\n syncGroups[partitionKey] = [];\n }\n\n // Map domain list to a host list\n const hosts = difference(\n consentManager.configuration.domains\n .filter(\n // ignore IP addresses\n (domain) => !removeIpAddresses || !IP_ADDRESS_REGEX.test(domain),\n )\n .map((domain) => domainToHost(domain)),\n // ignore block list\n domainBlockList,\n );\n // merge existing sync group with hosts for this consent manager\n syncGroups[partitionKey] = [\n ...new Set([...(syncGroups[partitionKey] || []), ...hosts]),\n ];\n });\n\n // Construct the HTML\n const syncEndpointHtml = `\n<!DOCTYPE html>\n<script\nsrc=\"${xdiLocation}\"\ndata-sync-groups='${JSON.stringify(syncGroups, null, 2)}'\ndata-xdi-commands=\"${xdiAllowedCommands}\"\n></script>\n`;\n\n return {\n html: syncEndpointHtml,\n syncGroups,\n };\n}\n","import { BusinessEntityInput, ConsentManagerInput } from '../../codecs';\nimport { logger } from '../../logger';\n\n/**\n * Combine multiple consent manager configurations into a list of business entity configurations\n *\n * @param inputs - Consent manager configurations to combine\n * @returns Business entity configuration input\n */\nexport function consentManagersToBusinessEntities(\n inputs: {\n /** Name of business entity */\n name: string;\n /** Consent manager input */\n input?: ConsentManagerInput;\n }[],\n): BusinessEntityInput[] {\n // Construct the business entities YAML definition\n const businessEntities = inputs.map(\n ({ name, input }): BusinessEntityInput => ({\n // Title of Transcend Instance\n title: name.replace('.yml', ''),\n attributes: [\n // Sync domain list\n ...(input?.domains\n ? [\n {\n key: 'Transcend Domain List',\n values: [...new Set(input.domains)],\n },\n ]\n : []),\n // Sync bundle URLs\n ...(input?.bundleUrls\n ? [\n {\n key: 'Airgap Production URL',\n values: [input.bundleUrls.PRODUCTION],\n },\n {\n key: 'Airgap Test URL',\n values: [input.bundleUrls.TEST],\n },\n {\n key: 'Airgap XDI URL',\n values: [\n input.bundleUrls.PRODUCTION.replace('airgap.js', 'xdi.js'),\n ],\n },\n ]\n : []),\n // Sync partition keys\n ...(input?.partition\n ? [\n {\n key: 'Consent Partition Key',\n values: [input.partition],\n },\n ]\n : []),\n ],\n }),\n );\n\n // Log out info on airgap scripts to host\n logger.info('\\n\\n~~~~~~~~~~~\\nAirgap scripts to host:');\n businessEntities.forEach(({ attributes, title }, ind) => {\n attributes\n ?.find((attr) => attr.key === 'Airgap Production URL')\n ?.values?.forEach((url) => {\n logger.info(`${ind}) ${title} - ${url}`);\n });\n });\n\n return businessEntities;\n}\n","import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport type { Got } from 'got';\nimport { ConsentPreferenceFetch } from './types';\n\nexport const ConsentPreferenceResponse = t.intersection([\n t.type({\n nodes: t.array(ConsentPreferenceFetch),\n }),\n t.partial({\n lastKey: t.partial({\n userId: t.string,\n partition: t.string,\n timestamp: t.string,\n }),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceResponse = t.TypeOf<\n typeof ConsentPreferenceResponse\n>;\n\n/**\n * Fetch consent preferences for the managed consent database\n *\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns The consent preferences\n */\nexport async function fetchConsentPreferences(\n sombra: Got,\n {\n partition,\n filterBy = {},\n limit = 50,\n }: {\n /** Partition key to fetch */\n partition: string;\n /** Filter consent preferences */\n filterBy?: {\n /** Fetch specific identifiers */\n identifiers?: string[];\n /** Filter before timestamp */\n timestampBefore?: string;\n /** Filter after timestamp */\n timestampAfter?: string;\n };\n /** Number of items to pull back at once */\n limit?: number;\n },\n): Promise<ConsentPreferenceFetch[]> {\n let currentLastKey: ConsentPreferenceResponse['lastKey'];\n const data: ConsentPreferenceFetch[] = [];\n let shouldContinue = true;\n\n while (shouldContinue) {\n const response = await sombra\n .post('v1/consent-preferences', {\n json: {\n partition,\n ...filterBy,\n // using lastKey to paginate if it exists (will not for first iteration)\n startKey: currentLastKey || undefined,\n limit,\n },\n })\n .json();\n const { nodes, lastKey } = decodeCodec(ConsentPreferenceResponse, response);\n\n if (!nodes || nodes.length === 0) {\n break;\n }\n\n // Process the data received from the API call\n // For example, push the new data into an array\n data.push(...nodes);\n\n // Extract the lastKey from the API response\n currentLastKey = lastKey;\n shouldContinue = !!lastKey && Object.keys(lastKey).length > 0;\n }\n\n return data;\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkZBKJMC7Ccjs = require('./chunk-ZBKJMC7C.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkQG4ECDFEcjs = require('./chunk-QG4ECDFE.cjs');var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var S = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(r,{dataSiloId:s,limit:c=100,offset:n=0,requestType:a}){try{let i=await r.get(`v1/data-silo/${s}/pending-requests/${a}`,{searchParams:{offset:n,limit:c}}).json(),{items:f}=_typeutils.decodeCodec.call(void 0, e.type({items:e.array(X)}),i);return f}catch(i){throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([i, 'optionalAccess', _4 => _4.message])}`)}}var L=S.type({nonce:S.string,identifier:S.string});async function B(r,{nonce:s,identifier:c}){try{return await r.put("v1/data-silo",{headers:{"x-transcend-nonce":s},json:{profiles:[{profileId:c}]}}),!0}catch(n){if(_optionalChain([n, 'access', _5 => _5.response, 'optionalAccess', _6 => _6.statusCode])===409)return!1;throw new Error(`Received an error from server: ${_optionalChain([n, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([n, 'optionalAccess', _9 => _9.message])}`)}}var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function ge({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=_chunkQG4ECDFEcjs.r,sleepSeconds:f=10}){let y=await _chunkZBKJMC7Ccjs.wc.call(void 0, i,c,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${r}" from disk`));let o=_chunkZBKJMC7Ccjs.qc.call(void 0, r,L);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${o.length}" identifiers as completed.`));let C=new Date().getTime(),w=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0,u=0,l=0;w.start(o.length,0);let m=_chunkQG4ECDFEcjs.b.call(void 0, o,a),I=m.length;await _bluebird.mapSeries.call(void 0, m,async($,P)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processing chunk ${P+1}/${I} (${_chunkQG4ECDFEcjs.b.length} items)`)),await _bluebird.map.call(void 0, $,async h=>{try{await B(y,h)?d+=1:u+=1}catch(b){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error notifying Transcend for identifier "${h.identifier}" - ${_optionalChain([b, 'optionalAccess', _10 => _10.message])}`)),l+=1}w.update(d+u)}),f>0&&P<I-1&&(_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Sleeping for ${f}s before next chunk...`)),await new Promise(h=>{setTimeout(h,f*1e3)}))}),w.stop();let D=new Date().getTime()-C;if(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend for ${d} identifiers in "${D/1e3}" seconds!`)),u&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`There were ${u} identifiers that were not in a state to be updated.They likely have already been resolved.`)),l)throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`There were ${l} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return o.length}var _privacytypes = require('@transcend-io/privacy-types');async function Se({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=_privacytypes.RequestDataSiloStatus.Resolved,transcendUrl:i=_chunkQG4ECDFEcjs.r}){let f=_chunkZBKJMC7Ccjs.vc.call(void 0, i,c),y=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${r.length}" requests as completed.`));let C=0;o.start(r.length,0),await _bluebird.map.call(void 0, r,async u=>{let l=await _chunkZBKJMC7Ccjs.Bd.call(void 0, f,{requestId:u,dataSiloId:s});try{await _chunkZBKJMC7Ccjs.Uf.call(void 0, f,_chunkZBKJMC7Ccjs.ua,{requestDataSiloId:l.id,status:a})}catch(m){if(!m.message.includes("Client error: Request must be active:"))throw m}C+=1,o.update(C)},{concurrency:n}),o.stop();let d=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${d/1e3}" seconds!`)),r.length}async function _e({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=_chunkQG4ECDFEcjs.r,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await _chunkZBKJMC7Ccjs.wc.call(void 0, y,s,c),w=_chunkZBKJMC7Ccjs.vc.call(void 0, y,s),d=0;o||(d=await _chunkZBKJMC7Ccjs.Cd.call(void 0, w,{dataSiloId:r})),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling ${o?"all":d} outstanding request identifiers for data silo: "${r}" for requests of types "${n.join('", "')}"`));let u=new Date().getTime(),l=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=new Set,I=[],g=[];o||l.start(d,0),await _bluebird.mapSeries.call(void 0, n,async $=>{let P=0,h=!0;for(;h;){let b=await U(C,{dataSiloId:r,limit:a,offset:P,requestType:$}),k=b.map(A=>(m.add(A.requestId),{...A,action:$})),J=k.map(({attributes:A,...K})=>({...K,...A.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));I.push(...k),g.push(...J),g.length>=i&&(await f(g),g=[]),h=b.length===a,P+=a,o?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${b.length} outstanding identifiers for ${m.size} requests`)):l.update(m.size)}}),g.length>0&&await f(g),o||l.stop();let D=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${D/1e3}" seconds!`)),{identifiers:I}}exports.a = X; exports.b = U; exports.c = L; exports.d = B; exports.e = ge; exports.f = Se; exports.g = _e;
|
|
2
|
+
//# sourceMappingURL=chunk-LQHB5EIW.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-LQHB5EIW.cjs","../src/lib/cron/pullCronPageOfIdentifiers.ts"],"names":["CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response"],"mappings":"AAAA,u/BAAyF,wDAAyC,wDAAgD,6GCA/J,qDACS,IAIfA,CAAAA,CAAmB,CAAA,CAAA,IAAA,CAAK,CAEnC,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,cAAA,CAAkB,CAAA,CAAA,MAAA,CAElB,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,SAAA,CAAa,CAAA,CAAA,MAAA,CAEb,KAAA,CAAS,CAAA,CAAA,MAAA,CAET,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,UAAA,CAAc,CAAA,CAAA,KAAA,CACV,CAAA,CAAA,IAAA,CAAK,CACL,GAAA,CAAO,CAAA,CAAA,MAAA,CACP,MAAA,CAAU,CAAA,CAAA,KAAA,CAAQ,CAAA,CAAA,MAAM,CAC1B,CAAC,CACH,CACF,CAAC,CAAA,CAaD,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,GAAA,CACR,MAAA,CAAAC,CAAAA,CAAS,CAAA,CACT,WAAA,CAAAC,CACF,CAAA,CAU2B,CAC3B,GAAI,CAEF,IAAMC,CAAAA,CAAW,MAAML,CAAAA,CACpB,GAAA,CAAI,CAAA,aAAA,EAAgBC,CAAU,CAAA,kBAAA,EAAqBG,CAAW,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-LQHB5EIW.cjs","sourcesContent":[null,"import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\n\nexport const CronIdentifier = t.type({\n /** The identifier value */\n identifier: t.string,\n /** The type of identifier */\n type: t.string,\n /** The core identifier of the request */\n coreIdentifier: t.string,\n /** The ID of the underlying data silo */\n dataSiloId: t.string,\n /** The ID of the underlying request */\n requestId: t.string,\n /** The request nonce */\n nonce: t.string,\n /** The time the request was created */\n requestCreatedAt: t.string,\n /** The number of days until the request is overdue */\n daysUntilOverdue: t.number,\n /** Request attributes */\n attributes: t.array(\n t.type({\n key: t.string,\n values: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type CronIdentifier = t.TypeOf<typeof CronIdentifier>;\n\n/**\n * Pull a offset of identifiers for a cron job\n *\n * @see https://docs.transcend.io/docs/api-reference/GET/v1/data-silo/(id)/pending-requests/(type)\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns Successfully submitted request\n */\nexport async function pullCronPageOfIdentifiers(\n sombra: Got,\n {\n dataSiloId,\n limit = 100,\n offset = 0,\n requestType,\n }: {\n /** Data Silo ID */\n dataSiloId: string;\n /** Type of request */\n requestType: RequestAction;\n /** Number of identifiers to pull in */\n limit?: number;\n /** Page to pull in */\n offset?: number;\n },\n): Promise<CronIdentifier[]> {\n try {\n // Make the GraphQL request\n const response = await sombra\n .get(`v1/data-silo/${dataSiloId}/pending-requests/${requestType}`, {\n searchParams: {\n offset,\n limit,\n },\n })\n .json();\n\n const { items } = decodeCodec(\n t.type({\n items: t.array(CronIdentifier),\n }),\n response,\n );\n return items;\n } catch (err) {\n throw new Error(\n `Received an error from server: ${err?.response?.body || err?.message}`,\n );\n }\n}\n"]}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkXJAEXXYUcjs = require('./chunk-XJAEXXYU.cjs');var _chunkQG4ECDFEcjs = require('./chunk-QG4ECDFE.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _autocomplete = require('@stricli/auto-complete');var _core = require('@stricli/core');var A=_core.buildCommand.call(void 0, {loader:async()=>{let{generateApiKeys:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-HOCQ2FU3.cjs")));return e},parameters:{flags:{email:{kind:"parsed",parse:String,brief:"The email address that you use to log into Transcend"},password:{kind:"parsed",parse:String,brief:"The password for your account login"},apiKeyTitle:{kind:"parsed",parse:String,brief:"The title of the API key being generated or destroyed"},file:{kind:"parsed",parse:String,brief:"The file where API keys should be written to"},scopes:{kind:"enum",values:_chunkQG4ECDFEcjs.x,variadic:",",brief:"The list of scopes that should be given to the API key"},deleteExistingApiKey:{kind:"boolean",brief:"When true, if an API key exists with the specified apiKeyTitle, the existing API key is deleted",default:!0},createNewApiKey:{kind:"boolean",brief:"When true, new API keys will be created. Set to false if you simply want to delete all API keys with a title",default:!0},parentOrganizationId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"Filter for only a specific organization by ID, returning all child accounts associated with that organization",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Generate API keys",fullDescription:`This command allows for creating API keys across multiple Transcend instances. This is useful for customers that are managing many Transcend instances and need to regularly create, cycle or delete API keys across all of their instances.
|
|
2
2
|
|
|
3
3
|
Unlike the other commands that rely on API key authentication, this command relies upon username/password authentication. This command will spit out the API keys into a JSON file, and that JSON file can be used in subsequent CLI commands.
|
|
4
4
|
|
|
5
|
-
Authentication requires your email and password for the Transcend account. This command will only generate API keys for Transcend instances where you have the permission to "Manage API Keys".`}});var I=_core.buildRouteMap.call(void 0, {routes:{"generate-api-keys":A},docs:{brief:"Admin commands"}});var _privacytypes = require('@transcend-io/privacy-types');var D=_core.buildCommand.call(void 0, {loader:async()=>{let{buildXdiSyncEndpoint:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
5
|
+
Authentication requires your email and password for the Transcend account. This command will only generate API keys for Transcend instances where you have the permission to "Manage API Keys".`}});var I=_core.buildRouteMap.call(void 0, {routes:{"generate-api-keys":A},docs:{brief:"Admin commands"}});var _privacytypes = require('@transcend-io/privacy-types');var D=_core.buildCommand.call(void 0, {loader:async()=>{let{buildXdiSyncEndpoint:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-426AX523.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewConsentManager]}),xdiLocation:{kind:"parsed",parse:String,brief:"The location of the XDI that will be loaded by the generated sync endpoint"},file:{kind:"parsed",parse:String,brief:"The HTML file path where the sync endpoint should be written",default:"./sync-endpoint.html"},removeIpAddresses:{kind:"boolean",brief:"When true, remove IP addresses from the domain list",default:!0},domainBlockList:{kind:"parsed",parse:_chunkXJAEXXYUcjs.b,brief:"The set of domains that should be excluded from the sync endpoint. Comma-separated list.",default:"localhost"},xdiAllowedCommands:{kind:"parsed",parse:String,brief:"The allowed set of XDI commands",default:"ConsentManager:Sync"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Build XDI sync endpoint",fullDescription:"This command allows for building of the XDI Sync Endpoint across a set of Transcend accounts."}});var R=_core.buildCommand.call(void 0, {loader:async()=>{let{pullConsentMetrics:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-OKNOTBT6.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewConsentManager]}),start:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"The start date to pull metrics from"},end:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"The end date to pull metrics until",optional:!0},folder:{kind:"parsed",parse:String,brief:"The folder to save metrics to",default:"./consent-metrics/"},bin:{kind:"parsed",parse:String,brief:"The bin metric when pulling data (1h or 1d)",default:"1d"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Pull consent metrics",fullDescription:"This command allows for pulling consent manager metrics for a Transcend account, or a set of Transcend accounts.\n\nBy default, the consent metrics will be written to a folder named `consent-metrics` within the directory where you run the command. You can override the location that these CSVs are written to using the flag `--folder=./my-folder/`. This folder will contain a set of CSV files:\n\n- `CONSENT_CHANGES_TIMESERIES_optIn.csv` -> this is a feed containing the number of explicit opt in events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: true });`\n- `CONSENT_CHANGES_TIMESERIES_optOut.csv` -> this is a feed containing the number of explicit opt out events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: false });`\n- `CONSENT_SESSIONS_BY_REGIME_Default.csv` -> this contains the number of sessions detected for the bin period\n- `PRIVACY_SIGNAL_TIMESERIES_DNT.csv` -> the number of DNT signals detected.\n- `PRIVACY_SIGNAL_TIMESERIES_GPC.csv` -> the number of GPC signals detected."}});var U=_core.buildCommand.call(void 0, {loader:async()=>{let{pullConsentPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-V4AAI72P.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewManagedConsentDatabaseAdminApi]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to save preferences to",default:"./preferences.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),timestampBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Filter for consents updated this time",optional:!0},timestampAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Filter for consents updated after this time",optional:!0},identifiers:{kind:"parsed",parse:String,variadic:",",brief:"Filter for specific identifiers",optional:!0},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when downloading consents in parallel",default:"100"}}},docs:{brief:"Pull consent preferences",fullDescription:"This command allows for pull of consent preferences from the Managed Consent Database."}});var x=_core.buildCommand.call(void 0, {loader:async()=>{let{updateConsentManager:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-5B6CLRP6.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings]}),bundleTypes:{kind:"enum",values:Object.values(_privacytypes.ConsentBundleType),brief:"The bundle types to deploy. Defaults to PRODUCTION,TEST.",variadic:","},deploy:{kind:"boolean",brief:"When true, deploy the Consent Manager after updating the version",default:!1},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Update consent manager",fullDescription:"This command allows for updating Consent Manager to latest version. The Consent Manager bundle can also be deployed using this command."}});var F=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadConsentPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-M6FW6NDT.cjs")));return e},parameters:{flags:{base64EncryptionKey:{kind:"parsed",parse:String,brief:"The encryption key used to encrypt the userId"},base64SigningKey:{kind:"parsed",parse:String,brief:"The signing key used to prove authentication of consent request"},partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},file:{kind:"parsed",parse:String,brief:"The file to pull consent preferences from",default:"./preferences.csv"},consentUrl:_chunkXJAEXXYUcjs.f.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Upload consent preferences to the Managed Consent Database",fullDescription:"This command allows for updating of consent preferences to the Managed Consent Database."}});var V=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadCookiesFromCsv:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-VO6SR3UF.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(_privacytypes.ConsentTrackerStatus),brief:"The status of the cookies you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./cookies.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Upload cookies from CSV",fullDescription:`Upload cookies from CSV. This command allows for uploading of cookies from CSV.
|
|
6
6
|
|
|
7
7
|
Step 1) Download the CSV of cookies that you want to edit from the Admin Dashboard under [Consent Management -> Cookies](https://app.transcend.io/consent-manager/cookies). You can download cookies from both the "Triage" and "Approved" tabs.
|
|
8
8
|
|
|
9
9
|
Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
|
|
10
10
|
|
|
11
|
-
Step 3) Upload the modified CSV file back into the dashboard with this command.`}});var M=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadDataFlowsFromCsv:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
11
|
+
Step 3) Upload the modified CSV file back into the dashboard with this command.`}});var M=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadDataFlowsFromCsv:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-YJ7MLTPD.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(_privacytypes.ConsentTrackerStatus),brief:"The status of the data flows you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./data-flows.csv"},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Upload data flows from CSV",fullDescription:`Upload data flows from CSV. This command allows for uploading of data flows from CSV.
|
|
12
12
|
|
|
13
13
|
Step 1) Download the CSV of data flows that you want to edit from the Admin Dashboard under [Consent Management -> Data Flows](https://app.transcend.io/consent-manager/data-flows). You can download data flows from both the "Triage" and "Approved" tabs.
|
|
14
14
|
|
|
15
15
|
Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
|
|
16
16
|
|
|
17
|
-
Step 3) Upload the modified CSV file back into the dashboard with this command.`}});var O=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
17
|
+
Step 3) Upload the modified CSV file back into the dashboard with this command.`}});var O=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-G7JOSWM6.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageStoredPreferences,_privacytypes.ScopeName.ViewManagedConsentDatabaseAdminApi,_privacytypes.ScopeName.ViewPreferenceStoreSettings]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to load preferences from",optional:!0},directory:{kind:"parsed",parse:String,brief:"Path to the directory of CSV files to load preferences from",optional:!0},dryRun:{kind:"boolean",brief:"Whether to do a dry run only - will write results to receiptFilepath without updating Transcend",default:!1},skipExistingRecordCheck:{kind:"boolean",brief:"Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD",default:!1},receiptFileDir:{kind:"parsed",parse:String,brief:"Directory path where the response receipts should be saved",default:"./receipts"},skipWorkflowTriggers:{kind:"boolean",brief:"Whether to skip workflow triggers when uploading to preference store",default:!1},forceTriggerWorkflows:{kind:"boolean",brief:"Whether to force trigger workflows for existing consent records",default:!1},skipConflictUpdates:{kind:"boolean",brief:"Whether to skip uploading of any records where the preference store and file have a hard conflict",default:!1},isSilent:{kind:"boolean",brief:"Whether to skip sending emails in workflows",default:!0},attributes:{kind:"parsed",parse:String,brief:"Attributes to add to any DSR request if created. Comma-separated list of key:value pairs.",default:"Tags:transcend-cli,Source:transcend-cli"},receiptFilepath:{kind:"parsed",parse:String,brief:"Store resulting, continuing where left off",default:"./preference-management-upload-receipts.json"},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading in parallel",default:"10"}}},docs:{brief:"Upload preference management data to your Preference Store",fullDescription:`Upload preference management data to your Preference Store.
|
|
18
18
|
|
|
19
19
|
This command prompts you to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
|
|
20
20
|
|
|
21
|
-
The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var j=_core.buildRouteMap.call(void 0, {routes:{"build-xdi-sync-endpoint":D,"pull-consent-metrics":R,"pull-consent-preferences":U,"update-consent-manager":x,"upload-consent-preferences":F,"upload-cookies-from-csv":V,"upload-data-flows-from-csv":M,"upload-preferences":O},docs:{brief:"Consent commands"}});var N=_core.buildCommand.call(void 0, {loader:async()=>{let{deriveDataSilosFromDataFlowsCrossInstance:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
21
|
+
The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var j=_core.buildRouteMap.call(void 0, {routes:{"build-xdi-sync-endpoint":D,"pull-consent-metrics":R,"pull-consent-preferences":U,"update-consent-manager":x,"upload-consent-preferences":F,"upload-cookies-from-csv":V,"upload-data-flows-from-csv":M,"upload-preferences":O},docs:{brief:"Consent commands"}});var N=_core.buildCommand.call(void 0, {loader:async()=>{let{deriveDataSilosFromDataFlowsCrossInstance:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-O5FXKTSS.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},output:{kind:"parsed",parse:String,brief:"The output transcend.yml file containing the data silo configurations",default:"./transcend.yml"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Derive data silos from data flows cross instance",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to a single transcend.yml configurations of all related data silos."}});var E=_core.buildCommand.call(void 0, {loader:async()=>{let{deriveDataSilosFromDataFlows:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-5IBWZCND.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},dataSilosYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data silo yml files"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Derive data silos from data flows",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to set of data silo transcend.yml configurations."}});var B=_core.buildCommand.call(void 0, {loader:async()=>{let{discoverSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-VMZLIXUM.cjs")));return e},parameters:{flags:{scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan"},dataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The UUID of the corresponding data silo"},auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageAssignedDataInventory],requiresSiloScope:!0}),fileGlobs:{kind:"parsed",parse:String,brief:"You can pass a glob syntax pattern(s) to specify additional file paths to scan. Comma-separated list of globs.",default:""},ignoreDirs:{kind:"parsed",parse:String,brief:"Comma-separated list of directories to ignore.",default:""},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Scan dependency management files to discover new data silos.",fullDescription:`We support scanning for new data silos in JavaScript, Python, Gradle, and CocoaPods projects.
|
|
22
22
|
|
|
23
|
-
To get started, add a data silo for the corresponding project type with the "silo discovery" plugin enabled. For example, if you want to scan a JavaScript project, add a package.json data silo. Then, specify the data silo ID in the "--dataSiloId" parameter.`}});var $=_core.buildCommand.call(void 0, {loader:async()=>{let{pullDatapoints:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
23
|
+
To get started, add a data silo for the corresponding project type with the "silo discovery" plugin enabled. For example, if you want to scan a JavaScript project, add a package.json data silo. Then, specify the data silo ID in the "--dataSiloId" parameter.`}});var $=_core.buildCommand.call(void 0, {loader:async()=>{let{pullDatapoints:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-35XLHL4O.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./datapoints.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"List of data silo IDs to filter by",optional:!0},includeAttributes:{kind:"boolean",brief:"Whether to include attributes in the output",default:!1},includeGuessedCategories:{kind:"boolean",brief:"Whether to include guessed categories in the output",default:!1},parentCategories:{kind:"enum",values:Object.values(_privacytypes.DataCategoryType),brief:"List of parent categories to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of subcategories to filter by",variadic:",",optional:!0}}},docs:{brief:"Export the datapoints from your Data Inventory into a CSV."}});var W=_core.buildCommand.call(void 0, {loader:async()=>{let{pullUnstructuredDiscoveryFiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-PB3CEDXP.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./unstructured-discovery-files.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),dataSiloIds:{kind:"parsed",parse:String,brief:"List of data silo IDs to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of data categories to filter by",variadic:",",optional:!0},status:{kind:"enum",values:Object.values(_privacytypes.UnstructuredSubDataPointRecommendationStatus),brief:"List of classification statuses to filter by",variadic:",",optional:!0},includeEncryptedSnippets:{kind:"boolean",brief:"Whether to include encrypted snippets of the entries classified",default:!1}}},docs:{brief:"Pull unstructured discovery files",fullDescription:"This command allows for pulling Unstructured Discovery into a CSV."}});var L=_core.buildCommand.call(void 0, {loader:async()=>{let{push:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-ZGRHLCA3.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:"Varies"}),file:{kind:"parsed",parse:String,brief:"Path to the YAML file to push from",default:"./transcend.yml"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),pageSize:{kind:"parsed",parse:_core.numberParser,brief:"The page size to use when paginating over the API",default:"50"},variables:{kind:"parsed",parse:String,brief:"The variables to template into the YAML file when pushing configuration. Comma-separated list of key:value pairs.",default:""},publishToPrivacyCenter:{kind:"boolean",brief:"When true, publish the configuration to the Privacy Center",default:!1},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},deleteExtraAttributeValues:{kind:"boolean",brief:"When true and syncing attributes, delete any extra attributes instead of just upserting",default:!1}}},docs:{brief:"Push metadata from transcend.yml to Transcend",fullDescription:"Given a transcend.yml file, sync the contents up to your Transcend instance."}});var Y=_core.buildCommand.call(void 0, {loader:async()=>{let{scanPackages:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-YVUKRVNV.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageCodeScanning]}),scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan",default:"./"},ignoreDirs:{kind:"parsed",parse:String,variadic:",",brief:"List of directories to ignore in scan",optional:!0},repositoryName:{kind:"parsed",parse:String,brief:"Name of the git repository that the package should be tied to",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Scan dependency management files to inventory code dependencies.",fullDescription:`Transcend scans packages and dependencies for the following frameworks:
|
|
24
24
|
|
|
25
25
|
- package.json
|
|
26
26
|
- requirements.txt & setup.py
|
|
@@ -36,9 +36,9 @@ This command will scan the folder you point at to look for any of these files. O
|
|
|
36
36
|
- repository name
|
|
37
37
|
- package names
|
|
38
38
|
- dependency names and versions
|
|
39
|
-
- package descriptions`}});function n(e,l,d){let i=e.join(" "),u=ft(l),{forceSingleLine:De=!1,argsIndent:y=2}=_nullishCoalesce(d, () => ({}));if(u.length===0)return`${
|
|
39
|
+
- package descriptions`}});function n(e,l,d){let i=e.join(" "),u=ft(l),{forceSingleLine:De=!1,argsIndent:y=2}=_nullishCoalesce(d, () => ({}));if(u.length===0)return`${_chunkQG4ECDFEcjs.n} ${i}`;let Re=`${_chunkQG4ECDFEcjs.n} ${i} ${u.join(" ")}`.length<=117&&!De?`${i} ${u.join(" ")}`:`${i} \\
|
|
40
40
|
${" ".repeat(y)}${u.join(` \\
|
|
41
|
-
${" ".repeat(y)}`)}`;return`${
|
|
41
|
+
${" ".repeat(y)}`)}`;return`${_chunkQG4ECDFEcjs.n} ${Re}`}function _(e,l=0){if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number")return e.toString();if(e instanceof Date)return e.toISOString();if(Array.isArray(e)&&l===0){let d=e.map(i=>_(i,l+1));return d.every(i=>i.startsWith("$")||i.includes(" "))?`"${d.join(",")}"`:d.join(",")}if(typeof e=="string")return l===1?e.startsWith("$")?`\${${e.slice(1)}}`:e:e.startsWith("$")||e.includes(" ")?`"${e}"`:e;throw new Error(`Unsupported value type: ${typeof e}`)}function ft(e,l=0){return Object.entries(e).map(([d,i])=>{if(typeof i=="boolean"&&i)return`--${d}`;let u=_(i,l);return`--${d}=${u}`})}var G=_core.buildCommand.call(void 0, {loader:async()=>{let{consentManagerServiceJsonToYml:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-MLVIXJWF.cjs")));return e},parameters:{flags:{file:{kind:"parsed",parse:String,brief:"Path to the services.json file, output of await airgap.getMetadata()",default:"./services.json"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml to write to",default:"./transcend.yml"}}},docs:{brief:"Convert consent manager services to transcend.yml",fullDescription:`Import the services from an airgap.js file into a Transcend instance.
|
|
42
42
|
|
|
43
43
|
1. Run \`await airgap.getMetadata()\` on a site with airgap
|
|
44
44
|
2. Right click on the printed object, and click \`Copy object\`
|
|
@@ -49,14 +49,14 @@ ${" ".repeat(y)}`)}`;return`${_chunkXPKFB4ILcjs.a} ${Re}`}function _(e,l=0){if(t
|
|
|
49
49
|
|
|
50
50
|
5. Run:
|
|
51
51
|
|
|
52
|
-
${n(["inventory","push"],{auth:"$TRANSCEND_API_KEY",file:"./transcend.yml",classifyService:!0},{argsIndent:5})}`}});var J=_core.buildCommand.call(void 0, {loader:async()=>{let{consentManagersToBusinessEntities:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
52
|
+
${n(["inventory","push"],{auth:"$TRANSCEND_API_KEY",file:"./transcend.yml",classifyService:!0},{argsIndent:5})}`}});var J=_core.buildCommand.call(void 0, {loader:async()=>{let{consentManagersToBusinessEntities:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-EHBBW7RO.cjs")));return e},parameters:{flags:{consentManagerYmlFolder:{kind:"parsed",parse:String,brief:"Path to the folder of Consent Manager transcend.yml files to combine"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml with business entity configuration",default:"./combined-business-entities.yml"}}},docs:{brief:"Convert consent managers to business entities",fullDescription:"This command allows for converting a folder or Consent Manager transcend.yml files into a single transcend.yml file where each consent manager configuration is a Business Entity in the data inventory."}});var z=_core.buildRouteMap.call(void 0, {routes:{pull:_chunkXJAEXXYUcjs.j,push:L,"scan-packages":Y,"discover-silos":B,"pull-datapoints":$,"pull-unstructured-discovery-files":W,"derive-data-silos-from-data-flows":E,"derive-data-silos-from-data-flows-cross-instance":N,"consent-manager-service-json-to-yml":G,"consent-managers-to-business-entities":J},docs:{brief:"Inventory commands"}});var K=_core.buildCommand.call(void 0, {loader:async()=>{let{syncOt:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-T4JNIPRU.cjs")));return e},parameters:{flags:{hostname:{kind:"parsed",parse:String,brief:"The domain of the OneTrust environment from which to pull the resource",optional:!0},oneTrustAuth:{kind:"parsed",parse:String,brief:"The OAuth access token with the scopes necessary to access the OneTrust Public APIs",optional:!0},source:{kind:"enum",values:Object.values(_chunkQ7I37FJVcjs.c),brief:"Whether to read the assessments from OneTrust or from a file",default:"oneTrust"},transcendAuth:{..._chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageAssessments]}),optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the file to pull the resource into. Must be a json file!",optional:!0},resource:{kind:"enum",values:Object.values(_chunkQ7I37FJVcjs.b),brief:"The resource to pull from OneTrust. For now, only assessments is supported",default:"assessments"},dryRun:{kind:"boolean",brief:"Whether to export the resource to a file rather than sync to Transcend",default:!1},debug:{kind:"boolean",brief:"Whether to print detailed logs in case of error",default:!1}}},docs:{brief:"Sync OneTrust data",fullDescription:`Pulls resources from a OneTrust and syncs them to a Transcend instance. For now, it only supports retrieving OneTrust Assessments.
|
|
53
53
|
|
|
54
54
|
This command can be helpful if you are looking to:
|
|
55
55
|
- Pull resources from your OneTrust account.
|
|
56
56
|
- Migrate your resources from your OneTrust account to Transcend.
|
|
57
57
|
|
|
58
58
|
OneTrust authentication requires an OAuth Token with scope for accessing the assessment endpoints.
|
|
59
|
-
If syncing the resources to Transcend, you will also need to generate an API key on the Transcend Admin Dashboard.`}});var X=_core.buildRouteMap.call(void 0, {routes:{"sync-ot":K},docs:{brief:"Migration commands"}});var H=_core.buildCommand.call(void 0, {loader:async()=>{let{approve:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
59
|
+
If syncing the resources to Transcend, you will also need to generate an API key on the Transcend Admin Dashboard.`}});var X=_core.buildRouteMap.call(void 0, {routes:{"sync-ot":K},docs:{brief:"Migration commands"}});var H=_core.buildCommand.call(void 0, {loader:async()=>{let{approve:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-EPE2BP2D.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.RequestApproval,_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to approve"},origins:{kind:"enum",values:Object.values(_privacytypes.RequestOrigin),variadic:",",brief:"The request origins to approve",optional:!0},silentModeBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Any requests made before this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Approve requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Approve requests that were submitted after this time",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk approve a set of privacy requests",fullDescription:"Bulk approve a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});var Z=_core.buildCommand.call(void 0, {loader:async()=>{let{cancel:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-RO3RT7ZE.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.RequestApproval]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to cancel"},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to cancel. Comma-separated list.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to cancel",optional:!0},silentModeBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Any requests made before this date should be marked as silent mode for canceling to skip email sending",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Cancel requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Cancel requests that were submitted after this time",optional:!0},cancellationTitle:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests upon cancelation",default:"Request Canceled"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk cancel a set of privacy requests",fullDescription:"Bulk cancel a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});var ee=_core.buildCommand.call(void 0, {loader:async()=>{let{markIdentifiersCompleted:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-B5MBY4PI.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, )}},docs:{brief:"Mark identifiers as completed after processing.",fullDescription:`This command takes the output of "${n(["request","cron","pull-identifiers"],{})}" and notifies Transcend that all of the requests in the CSV have been processed.
|
|
60
60
|
This is used in the workflow like:
|
|
61
61
|
|
|
62
62
|
1. Pull identifiers to CSV:
|
|
@@ -69,18 +69,18 @@ This is used in the workflow like:
|
|
|
69
69
|
|
|
70
70
|
${n(["request","cron","mark-identifiers-completed"],{auth:"$TRANSCEND_API_KEY",dataSiloId:"70810f2e-cf90-43f6-9776-901a5950599f",file:"./outstanding-requests.csv"},{argsIndent:5})}
|
|
71
71
|
|
|
72
|
-
Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var re=_core.buildCommand.call(void 0, {loader:async()=>{let{pullIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
72
|
+
Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var re=_core.buildCommand.call(void 0, {loader:async()=>{let{pullIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-6GEUCO6I.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),pageLimit:{kind:"parsed",parse:_core.numberParser,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:_core.numberParser,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"10000"}}},docs:{brief:"Pull identifiers of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding identifiers for the data silo to a CSV.
|
|
73
73
|
|
|
74
74
|
For large datasets, the output will be automatically split into multiple CSV files to avoid file system size limits. Use the --chunkSize parameter to control the maximum number of rows per file.
|
|
75
75
|
|
|
76
|
-
Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var oe=_core.buildCommand.call(void 0, {loader:async()=>{let{pullProfiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
76
|
+
Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var oe=_core.buildCommand.call(void 0, {loader:async()=>{let{pullProfiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-AIUN3M37.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[],requiresSiloScope:!0}),cronDataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the cron data silo to pull in"},targetDataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the target data silo to pull in"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},fileTarget:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers-target.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),pageLimit:{kind:"parsed",parse:_core.numberParser,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:_core.numberParser,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"10000"}}},docs:{brief:"Pull profiles of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding profiles for the data silo to a CSV.
|
|
77
77
|
|
|
78
78
|
For large datasets, the output will be automatically split into multiple CSV files to avoid file system size limits. Use the --chunkSize parameter to control the maximum number of rows per file.
|
|
79
79
|
|
|
80
|
-
Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var se=_core.buildRouteMap.call(void 0, {routes:{"pull-identifiers":re,"pull-profiles":oe,"mark-identifiers-completed":ee},docs:{brief:"Cron commands",hideRoute:{"pull-profiles":!0}}});var ie=_core.buildCommand.call(void 0, {loader:async()=>{let{downloadFiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
80
|
+
Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var se=_core.buildRouteMap.call(void 0, {routes:{"pull-identifiers":re,"pull-profiles":oe,"mark-identifiers-completed":ee},docs:{brief:"Cron commands",hideRoute:{"pull-profiles":!0}}});var ie=_core.buildCommand.call(void 0, {loader:async()=>{let{downloadFiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-BYVUQ5PD.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequestCompilation,_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.RequestApproval]}),sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when downloading requests in parallel",default:"10"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to download",optional:!0},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to download. Comma-separated list. Defaults to APPROVING,DOWNLOADABLE.",optional:!0},folderPath:{kind:"parsed",parse:String,brief:"The folder to download files to",default:"./dsr-files"},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Download requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Download requests that were submitted after this time",optional:!0},approveAfterDownload:{kind:"boolean",brief:"If the request is in status=APPROVING, approve the request after its downloaded",default:!1},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Download the files associated with a Data Subject Access Request (DSAR)",fullDescription:"Download the files associated with a Data Subject Access Request (DSAR) from DSR Automation -> Incoming Requests tab."}});var ne=_core.buildCommand.call(void 0, {loader:async()=>{let{enricherRestart:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-3IUL3P3V.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:String,brief:"The ID of the enricher to restart"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request action to restart",optional:!0},requestEnricherStatuses:{kind:"enum",values:Object.values(_privacytypes.RequestEnricherStatus),variadic:",",brief:"The request enricher statuses to restart",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Restart requests that were submitted after this time",optional:!0}}},docs:{brief:"Bulk restart a particular enricher across a series of DSRs",fullDescription:`Bulk restart a particular enricher across a series of DSRs.
|
|
81
81
|
|
|
82
82
|
The API key needs the following scopes:
|
|
83
|
-
- Manage Request Compilation`}});var ue=_core.buildCommand.call(void 0, {loader:async()=>{let{_export:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
83
|
+
- Manage Request Compilation`}});var ue=_core.buildCommand.call(void 0, {loader:async()=>{let{_export:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-6HXNGVRH.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.ViewRequestCompilation]}),sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to export",optional:!0},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to export",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./transcend-request-export.csv"},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Pull requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Pull requests that were submitted after this time",optional:!0},showTests:{kind:"boolean",brief:"Filter for test requests or production requests - when not provided, pulls both",optional:!0},pageLimit:{kind:"parsed",parse:_core.numberParser,brief:"The page limit to use when pulling in pages of requests",default:"100"}}},docs:{brief:"Export privacy requests and request identifiers to a CSV file",fullDescription:"Export privacy requests and request identifiers to a CSV file."}});var me=_core.buildCommand.call(void 0, {loader:async()=>{let{markSilent:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-QHLD4E4E.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to mark silent"},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to mark silent. Comma-separated list. Defaults to REQUEST_MADE,WAITING,ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to mark silent",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Mark silent requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Mark silent requests that were submitted after this time",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk update a set of privacy requests to be in silent mode",fullDescription:"Bulk update a set of privacy requests from the DSR Automation -> Incoming Requests tab to be in silent mode."}});var ce=_core.buildCommand.call(void 0, {loader:async()=>{let{notifyAdditionalTime:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-CQPYZDEP.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.RequestApproval]}),createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Notify requests that are open but submitted before this time"},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Notify requests that are open but submitted after this time",optional:!0},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to notify",optional:!0},daysLeft:{kind:"parsed",parse:_core.numberParser,brief:"Only notify requests that have less than this number of days until they are considered expired",default:"10"},days:{kind:"parsed",parse:_core.numberParser,brief:"The number of days to adjust the expiration of the request to",default:"45"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to notify",optional:!0},emailTemplate:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests",default:"Additional Time Needed"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk notify a set of privacy requests that more time is needed",fullDescription:"Bulk notify a set of privacy requests from the DSR Automation -> Incoming Requests tab that more time is needed to complete the request. Note any request in silent mode will not be emailed."}});var he=_core.buildCommand.call(void 0, {loader:async()=>{let{pullIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-SDF36RUQ.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.ViewRequestCompilation]}),sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to pull for",optional:!0},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Pull identifiers for manual enrichment",fullDescription:`This command pulls down the set of privacy requests that are currently pending manual enrichment.
|
|
84
84
|
|
|
85
85
|
This is useful for the following workflow:
|
|
86
86
|
|
|
@@ -92,7 +92,7 @@ This is useful for the following workflow:
|
|
|
92
92
|
|
|
93
93
|
3. Push updated back to Transcend:
|
|
94
94
|
|
|
95
|
-
${n(["request","preflight","push-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}`}});var ge=_core.buildCommand.call(void 0, {loader:async()=>{let{pushIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
95
|
+
${n(["request","preflight","push-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}`}});var ge=_core.buildCommand.call(void 0, {loader:async()=>{let{pushIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-UIQVAQFF.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestIdentities,_privacytypes.ScopeName.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the Request Enricher to upload to"},sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},markSilent:{kind:"boolean",brief:"When true, set requests into silent mode before enriching",default:!1},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Push identifiers for manual enrichment",fullDescription:`This command push up a set of identifiers for a set of requests pending manual enrichment.
|
|
96
96
|
|
|
97
97
|
This is useful for the following workflow:
|
|
98
98
|
|
|
@@ -104,10 +104,10 @@ This is useful for the following workflow:
|
|
|
104
104
|
|
|
105
105
|
3. Push updated back to Transcend:
|
|
106
106
|
|
|
107
|
-
${n(["request","preflight","push-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}`}});var ye=_core.buildRouteMap.call(void 0, {routes:{"pull-identifiers":he,"push-identifiers":ge},docs:{brief:"Preflight commands"}});var ke=_core.buildCommand.call(void 0, {loader:async()=>{let{rejectUnverifiedIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
108
|
-
This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".`}});var Te=_core.buildCommand.call(void 0, {loader:async()=>{let{retryRequestDataSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-
|
|
107
|
+
${n(["request","preflight","push-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}`}});var ye=_core.buildRouteMap.call(void 0, {routes:{"pull-identifiers":he,"push-identifiers":ge},docs:{brief:"Preflight commands"}});var ke=_core.buildCommand.call(void 0, {loader:async()=>{let{rejectUnverifiedIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-I7QN6JHE.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),identifierNames:{kind:"parsed",parse:String,variadic:",",brief:"The names of identifiers to clear out"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request action to restart",optional:!0},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Bulk clear out any request identifiers that are unverified",fullDescription:"Bulk clear out any request identifiers that are unverified."}});var Ce=_core.buildCommand.call(void 0, {loader:async()=>{let{restart:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-IHFTH6YX.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.MakeDataSubjectRequest,_privacytypes.ScopeName.ViewRequestCompilation]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to restart"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},emailIsVerified:{kind:"boolean",brief:"Indicate whether the primary email address is verified. Set to false to send a verification email",default:!0},createdAt:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Restart requests that were submitted before a specific date",optional:!0},silentModeBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Requests older than this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkXJAEXXYUcjs.c,brief:"Restart requests that were submitted after this time",optional:!0},sendEmailReceipt:{kind:"boolean",brief:"Send email receipts to the restarted requests",default:!1},copyIdentifiers:{kind:"boolean",brief:"Copy over all enriched identifiers from the initial request",default:!1},skipWaitingPeriod:{kind:"boolean",brief:"Skip queued state of request and go straight to compiling",default:!1}}},docs:{brief:"Bulk update a set of privacy requests based on a set of request filters",fullDescription:"Bulk update a set of privacy requests based on a set of request filters."}});var we=_core.buildCommand.call(void 0, {loader:async()=>{let{skipPreflightJobs:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-E6NFYH4V.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),enricherIds:{kind:"parsed",parse:String,variadic:",",brief:"The ID of the enrichers to skip privacy request jobs for"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Skip preflight jobs",fullDescription:"This command allows for bulk skipping preflight checks."}});var ve=_core.buildCommand.call(void 0, {loader:async()=>{let{markRequestDataSilosCompleted:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-WVOC3NBM.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:'Path to the CSV file where identifiers will be written to. The CSV is expected to have 1 column named "Request Id".',default:"./request-identifiers.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Mark request data silos as completed",fullDescription:`This command takes in a CSV of Request IDs as well as a Data Silo ID and marks all associated privacy request jobs as completed.
|
|
108
|
+
This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".`}});var Te=_core.buildCommand.call(void 0, {loader:async()=>{let{retryRequestDataSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-E7RIXWG5.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, )}},docs:{brief:"Retry request data silos",fullDescription:'This command allows for bulk restarting a set of data silos jobs for open privacy requests. This is equivalent to clicking the "Wipe and Retry" button for a particular data silo across a set of privacy requests.'}});var Pe=_core.buildCommand.call(void 0, {loader:async()=>{let{skipRequestDataSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-JZLYOI5F.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:_chunkXJAEXXYUcjs.a,brief:"The ID of the data silo to skip privacy request jobs for"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to skip"},status:{kind:"enum",values:[_privacytypes.RequestDataSiloStatus.Skipped,_privacytypes.RequestDataSiloStatus.Resolved],brief:"The status to set the request data silo job to",default:_privacytypes.RequestDataSiloStatus.Skipped}}},docs:{brief:"Skip request data silos",fullDescription:"This command allows for bulk skipping all open privacy request jobs for a particular data silo. This command is useful if you want to disable a data silo and then clear out any active privacy requests that are still queued up for that data silo."}});var qe=_core.buildRouteMap.call(void 0, {routes:{"mark-request-data-silos-completed":ve,"retry-request-data-silos":Te,"skip-request-data-silos":Pe},docs:{brief:"System commands"}});var Ae=_core.buildCommand.call(void 0, {loader:async()=>{let{upload:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-3WG6YKYX.cjs")));return e},parameters:{flags:{auth:_chunkXJAEXXYUcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.MakeDataSubjectRequest,_privacytypes.ScopeName.ViewRequestIdentitySettings,_privacytypes.ScopeName.ViewGlobalAttributes]}),file:{kind:"parsed",parse:String,brief:"Path to the CSV file of requests to upload",default:"./requests.csv"},transcendUrl:_chunkXJAEXXYUcjs.e.call(void 0, ),cacheFilepath:{kind:"parsed",parse:String,brief:"The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API",default:"./transcend-privacy-requests-cache.json"},requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:_chunkXJAEXXYUcjs.g.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"},attributes:{kind:"parsed",parse:String,brief:"Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4",default:"Tags:transcend-cli"},isTest:{kind:"boolean",brief:"Flag whether the requests being uploaded are test requests or regular requests",default:!1},isSilent:{kind:"boolean",brief:"Flag whether the requests being uploaded should be submitted in silent mode",default:!0},skipSendingReceipt:{kind:"boolean",brief:"Flag whether to skip sending of the receipt email",default:!1},emailIsVerified:{kind:"boolean",brief:"Indicate whether the email address being uploaded is pre-verified. Set to false to send a verification email",default:!0},skipFilterStep:{kind:"boolean",brief:"When true, skip the interactive step to filter down the CSV",default:!1},dryRun:{kind:"boolean",brief:"When true, perform a dry run of the upload instead of calling the API to submit the requests",default:!1},debug:{kind:"boolean",brief:"Debug logging",default:!1},defaultPhoneCountryCode:{kind:"parsed",parse:String,brief:"When uploading phone numbers, if the phone number is missing a country code, assume this country code",default:"1"}}},docs:{brief:"Upload a set of requests from a CSV",fullDescription:`Upload a set of requests from a CSV.
|
|
109
109
|
|
|
110
110
|
This command prompts you to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
|
|
111
111
|
|
|
112
|
-
The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var Ie=_core.buildRouteMap.call(void 0, {routes:{approve:H,upload:Ae,"download-files":ie,cancel:Z,restart:Ce,"notify-additional-time":ce,"mark-silent":me,"enricher-restart":ne,"reject-unverified-identifiers":ke,export:ue,"skip-preflight-jobs":we,system:qe,preflight:ye,cron:se},docs:{brief:"All commands related to DSR requests"}});var Ur=_core.buildRouteMap.call(void 0, {routes:{request:Ie,consent:j,inventory:z,admin:I,migration:X,install:_autocomplete.buildInstallCommand.call(void 0, "@transcend-io/transcend",{bash:"__@transcend-io/cli_bash_complete"}),uninstall:_autocomplete.buildUninstallCommand.call(void 0, "@transcend-io/transcend",{bash:!0})},docs:{brief:
|
|
113
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var Ie=_core.buildRouteMap.call(void 0, {routes:{approve:H,upload:Ae,"download-files":ie,cancel:Z,restart:Ce,"notify-additional-time":ce,"mark-silent":me,"enricher-restart":ne,"reject-unverified-identifiers":ke,export:ue,"skip-preflight-jobs":we,system:qe,preflight:ye,cron:se},docs:{brief:"All commands related to DSR requests"}});var Ur=_core.buildRouteMap.call(void 0, {routes:{request:Ie,consent:j,inventory:z,admin:I,migration:X,install:_autocomplete.buildInstallCommand.call(void 0, "@transcend-io/transcend",{bash:"__@transcend-io/cli_bash_complete"}),uninstall:_autocomplete.buildUninstallCommand.call(void 0, "@transcend-io/transcend",{bash:!0})},docs:{brief:_chunkQG4ECDFEcjs.l,hideRoute:{install:!0,uninstall:!0}}}),en= exports.a =_core.buildApplication.call(void 0, Ur,{name:_chunkQG4ECDFEcjs.n,versionInfo:{currentVersion:_chunkQG4ECDFEcjs.m}});exports.a = en;
|
|
113
|
+
//# sourceMappingURL=chunk-OBNZ7JBG.cjs.map
|