@transcend-io/cli 7.0.0-alpha.13 → 7.0.0-alpha.15
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 +4 -0
- package/dist/bin/bash-complete.cjs.map +1 -0
- package/dist/bin/cli.cjs +3 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/deprecated-command.cjs +7 -0
- package/dist/bin/deprecated-command.cjs.map +1 -0
- package/dist/chunk-5TWQU6YF.cjs +2844 -0
- package/dist/chunk-5TWQU6YF.cjs.map +1 -0
- package/dist/chunk-6HKJGDAM.cjs +2 -0
- package/dist/chunk-6HKJGDAM.cjs.map +1 -0
- package/dist/chunk-ABQQ23HK.cjs +2 -0
- package/dist/chunk-ABQQ23HK.cjs.map +1 -0
- package/dist/chunk-BY7W4UQF.cjs +2 -0
- package/dist/chunk-BY7W4UQF.cjs.map +1 -0
- package/dist/chunk-EG4L6YAJ.cjs +2 -0
- package/dist/chunk-EG4L6YAJ.cjs.map +1 -0
- package/dist/chunk-IBTP5OXE.cjs +2 -0
- package/dist/chunk-IBTP5OXE.cjs.map +1 -0
- package/dist/chunk-KEH7CZKK.cjs +75 -0
- package/dist/chunk-KEH7CZKK.cjs.map +1 -0
- package/dist/chunk-KOV2SQO2.cjs +4 -0
- package/dist/chunk-KOV2SQO2.cjs.map +1 -0
- package/dist/chunk-KXRTLA5U.cjs +94 -0
- package/dist/chunk-KXRTLA5U.cjs.map +1 -0
- package/dist/chunk-LZZZALF3.cjs +4 -0
- package/dist/chunk-LZZZALF3.cjs.map +1 -0
- package/dist/chunk-PBT4YWG7.cjs +9 -0
- package/dist/chunk-PBT4YWG7.cjs.map +1 -0
- package/dist/chunk-PUWWHSAM.cjs +2 -0
- package/dist/chunk-PUWWHSAM.cjs.map +1 -0
- package/dist/chunk-RPT6OXNL.cjs +3 -0
- package/dist/chunk-RPT6OXNL.cjs.map +1 -0
- package/dist/chunk-SAEKBZGF.cjs +2 -0
- package/dist/chunk-SAEKBZGF.cjs.map +1 -0
- package/dist/chunk-SEJ2UCU4.cjs +2 -0
- package/dist/chunk-SEJ2UCU4.cjs.map +1 -0
- package/dist/chunk-SR7OAEWS.cjs +2 -0
- package/dist/chunk-SR7OAEWS.cjs.map +1 -0
- package/dist/chunk-T462ONFX.cjs +2 -0
- package/dist/chunk-T462ONFX.cjs.map +1 -0
- package/dist/chunk-TD7ADMVO.cjs +2 -0
- package/dist/chunk-TD7ADMVO.cjs.map +1 -0
- package/dist/chunk-UEGX6GZ2.cjs +2 -0
- package/dist/chunk-UEGX6GZ2.cjs.map +1 -0
- package/dist/chunk-XWRWKB4H.cjs +12 -0
- package/dist/chunk-XWRWKB4H.cjs.map +1 -0
- package/dist/chunk-YGYXLCPI.cjs +2 -0
- package/dist/chunk-YGYXLCPI.cjs.map +1 -0
- package/dist/chunk-ZFZPE5BJ.cjs +2 -0
- package/dist/chunk-ZFZPE5BJ.cjs.map +1 -0
- package/dist/chunk-ZUNVPK23.cjs +2 -0
- package/dist/chunk-ZUNVPK23.cjs.map +1 -0
- package/dist/chunk-ZVK4HIDF.cjs +6 -0
- package/dist/chunk-ZVK4HIDF.cjs.map +1 -0
- package/dist/impl-2E3PAZHM.cjs +2 -0
- package/dist/impl-2E3PAZHM.cjs.map +1 -0
- package/dist/impl-2I7MIYNB.cjs +2 -0
- package/dist/impl-2I7MIYNB.cjs.map +1 -0
- package/dist/impl-7H4CBYYB.cjs +12 -0
- package/dist/impl-7H4CBYYB.cjs.map +1 -0
- package/dist/impl-7KOHW25M.cjs +6 -0
- package/dist/impl-7KOHW25M.cjs.map +1 -0
- package/dist/impl-7M4OQEYH.cjs +2 -0
- package/dist/impl-7M4OQEYH.cjs.map +1 -0
- package/dist/impl-AHGBQO5E.cjs +2 -0
- package/dist/impl-AHGBQO5E.cjs.map +1 -0
- package/dist/impl-AJB3VAJO.cjs +2 -0
- package/dist/impl-AJB3VAJO.cjs.map +1 -0
- package/dist/impl-B3EPOCAJ.cjs +2 -0
- package/dist/impl-B3EPOCAJ.cjs.map +1 -0
- package/dist/impl-BDRTVVF2.cjs +2 -0
- package/dist/impl-BDRTVVF2.cjs.map +1 -0
- package/dist/impl-CBBAWKT7.cjs +2 -0
- package/dist/impl-CBBAWKT7.cjs.map +1 -0
- package/dist/impl-DI7FIYZI.cjs +2 -0
- package/dist/impl-DI7FIYZI.cjs.map +1 -0
- package/dist/impl-DPLGIVNZ.cjs +2 -0
- package/dist/impl-DPLGIVNZ.cjs.map +1 -0
- package/dist/impl-DRJ7E2FN.cjs +2 -0
- package/dist/impl-DRJ7E2FN.cjs.map +1 -0
- package/dist/impl-F3CYEECC.cjs +2 -0
- package/dist/impl-F3CYEECC.cjs.map +1 -0
- package/dist/impl-FQF3AWHR.cjs +2 -0
- package/dist/impl-FQF3AWHR.cjs.map +1 -0
- package/dist/impl-FQYT2XK3.cjs +2 -0
- package/dist/impl-FQYT2XK3.cjs.map +1 -0
- package/dist/impl-HDVI2F6D.cjs +2 -0
- package/dist/impl-HDVI2F6D.cjs.map +1 -0
- package/dist/impl-HEGJOPZK.cjs +2 -0
- package/dist/impl-HEGJOPZK.cjs.map +1 -0
- package/dist/impl-ITBKGH3N.cjs +2 -0
- package/dist/impl-ITBKGH3N.cjs.map +1 -0
- package/dist/impl-K7CHXRVJ.cjs +2 -0
- package/dist/impl-K7CHXRVJ.cjs.map +1 -0
- package/dist/impl-NFRFFLXM.cjs +2 -0
- package/dist/impl-NFRFFLXM.cjs.map +1 -0
- package/dist/impl-NIMVACZO.cjs +2 -0
- package/dist/impl-NIMVACZO.cjs.map +1 -0
- package/dist/impl-OBZFKR4D.cjs +2 -0
- package/dist/impl-OBZFKR4D.cjs.map +1 -0
- package/dist/impl-P7P4PHKK.cjs +2 -0
- package/dist/impl-P7P4PHKK.cjs.map +1 -0
- package/dist/impl-PKVWUYYX.cjs +2 -0
- package/dist/impl-PKVWUYYX.cjs.map +1 -0
- package/dist/impl-PUU55WCF.cjs +2 -0
- package/dist/impl-PUU55WCF.cjs.map +1 -0
- package/dist/impl-QTYOX6E5.cjs +2 -0
- package/dist/impl-QTYOX6E5.cjs.map +1 -0
- package/dist/impl-RNWZPIFE.cjs +2 -0
- package/dist/impl-RNWZPIFE.cjs.map +1 -0
- package/dist/impl-S3OTWWYU.cjs +6 -0
- package/dist/impl-S3OTWWYU.cjs.map +1 -0
- package/dist/impl-TFECR52S.cjs +2 -0
- package/dist/impl-TFECR52S.cjs.map +1 -0
- package/dist/impl-VBCRH4YN.cjs +2 -0
- package/dist/impl-VBCRH4YN.cjs.map +1 -0
- package/dist/impl-W5XYDQXZ.cjs +6 -0
- package/dist/{impl-CCUCFOCW.js.map → impl-W5XYDQXZ.cjs.map} +1 -1
- package/dist/impl-WBDBDZHE.cjs +2 -0
- package/dist/impl-WBDBDZHE.cjs.map +1 -0
- package/dist/impl-WDYARUUL.cjs +7 -0
- package/dist/impl-WDYARUUL.cjs.map +1 -0
- package/dist/impl-WJ7VUNYC.cjs +2 -0
- package/dist/impl-WJ7VUNYC.cjs.map +1 -0
- package/dist/impl-WMHBCVAN.cjs +2 -0
- package/dist/impl-WMHBCVAN.cjs.map +1 -0
- package/dist/impl-WYJHZILF.cjs +9 -0
- package/dist/impl-WYJHZILF.cjs.map +1 -0
- package/dist/impl-ZBKQ6GRT.cjs +2 -0
- package/dist/impl-ZBKQ6GRT.cjs.map +1 -0
- package/dist/impl-ZSFEQ5UA.cjs +4 -0
- package/dist/impl-ZSFEQ5UA.cjs.map +1 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.ts → index.d.cts} +1 -1
- package/package.json +49 -45
- package/dist/bin/bash-complete.js +0 -4
- package/dist/bin/bash-complete.js.map +0 -1
- package/dist/bin/cli.js +0 -3
- package/dist/bin/cli.js.map +0 -1
- package/dist/bin/deprecated-command.js +0 -7
- package/dist/bin/deprecated-command.js.map +0 -1
- package/dist/chunk-24SSWBXM.js +0 -4
- package/dist/chunk-24SSWBXM.js.map +0 -1
- package/dist/chunk-347UQP43.js +0 -2
- package/dist/chunk-347UQP43.js.map +0 -1
- package/dist/chunk-43JWXG77.js +0 -2
- package/dist/chunk-43JWXG77.js.map +0 -1
- package/dist/chunk-4GLITB3Y.js +0 -2
- package/dist/chunk-4GLITB3Y.js.map +0 -1
- package/dist/chunk-6P4FW6XR.js +0 -3
- package/dist/chunk-6P4FW6XR.js.map +0 -1
- package/dist/chunk-72U6ETHG.js +0 -2
- package/dist/chunk-72U6ETHG.js.map +0 -1
- package/dist/chunk-7QHA6ZIV.js +0 -2
- package/dist/chunk-7QHA6ZIV.js.map +0 -1
- package/dist/chunk-ARVEJERC.js +0 -2
- package/dist/chunk-ARVEJERC.js.map +0 -1
- package/dist/chunk-CBAHSBSW.js +0 -2
- package/dist/chunk-CBAHSBSW.js.map +0 -1
- package/dist/chunk-HH2PQ3PQ.js +0 -2
- package/dist/chunk-HH2PQ3PQ.js.map +0 -1
- package/dist/chunk-INLBXSQE.js +0 -9
- package/dist/chunk-INLBXSQE.js.map +0 -1
- package/dist/chunk-KRN6Q433.js +0 -75
- package/dist/chunk-KRN6Q433.js.map +0 -1
- package/dist/chunk-L5ULN3IT.js +0 -2
- package/dist/chunk-L5ULN3IT.js.map +0 -1
- package/dist/chunk-L7ZIX4SU.js +0 -2
- package/dist/chunk-L7ZIX4SU.js.map +0 -1
- package/dist/chunk-LAYHULHH.js +0 -2
- package/dist/chunk-LAYHULHH.js.map +0 -1
- package/dist/chunk-MA4JWWRO.js +0 -6
- package/dist/chunk-MA4JWWRO.js.map +0 -1
- package/dist/chunk-MVDOKJ6J.js +0 -2
- package/dist/chunk-MVDOKJ6J.js.map +0 -1
- package/dist/chunk-OEB7WG3G.js +0 -4
- package/dist/chunk-OEB7WG3G.js.map +0 -1
- package/dist/chunk-SF46ZLPT.js +0 -2
- package/dist/chunk-SF46ZLPT.js.map +0 -1
- package/dist/chunk-TDBKATQK.js +0 -2831
- package/dist/chunk-TDBKATQK.js.map +0 -1
- package/dist/chunk-WSDWILYI.js +0 -2
- package/dist/chunk-WSDWILYI.js.map +0 -1
- package/dist/chunk-XNR74SBS.js +0 -12
- package/dist/chunk-XNR74SBS.js.map +0 -1
- package/dist/chunk-ZLRUIEVQ.js +0 -94
- package/dist/chunk-ZLRUIEVQ.js.map +0 -1
- package/dist/chunk-ZTD7APNF.js +0 -2
- package/dist/chunk-ZTD7APNF.js.map +0 -1
- package/dist/impl-25VWUB6L.js +0 -2
- package/dist/impl-25VWUB6L.js.map +0 -1
- package/dist/impl-3M5R6G5M.js +0 -6
- package/dist/impl-3M5R6G5M.js.map +0 -1
- package/dist/impl-5OEPVWPL.js +0 -2
- package/dist/impl-5OEPVWPL.js.map +0 -1
- package/dist/impl-5YV7K446.js +0 -2
- package/dist/impl-5YV7K446.js.map +0 -1
- package/dist/impl-AFRHPZGF.js +0 -2
- package/dist/impl-AFRHPZGF.js.map +0 -1
- package/dist/impl-CCUCFOCW.js +0 -6
- package/dist/impl-E36SWF4Z.js +0 -2
- package/dist/impl-E36SWF4Z.js.map +0 -1
- package/dist/impl-E5WXNV47.js +0 -2
- package/dist/impl-E5WXNV47.js.map +0 -1
- package/dist/impl-EVICJMI3.js +0 -2
- package/dist/impl-EVICJMI3.js.map +0 -1
- package/dist/impl-G5TGSB4H.js +0 -2
- package/dist/impl-G5TGSB4H.js.map +0 -1
- package/dist/impl-GNG2DOKG.js +0 -2
- package/dist/impl-GNG2DOKG.js.map +0 -1
- package/dist/impl-GNSHZ3OL.js +0 -2
- package/dist/impl-GNSHZ3OL.js.map +0 -1
- package/dist/impl-GPCURY4M.js +0 -7
- package/dist/impl-GPCURY4M.js.map +0 -1
- package/dist/impl-GZRQOFY6.js +0 -2
- package/dist/impl-GZRQOFY6.js.map +0 -1
- package/dist/impl-HEC3SVYP.js +0 -2
- package/dist/impl-HEC3SVYP.js.map +0 -1
- package/dist/impl-HH24GIMG.js +0 -2
- package/dist/impl-HH24GIMG.js.map +0 -1
- package/dist/impl-I24OLEN5.js +0 -2
- package/dist/impl-I24OLEN5.js.map +0 -1
- package/dist/impl-IAXNYDJT.js +0 -2
- package/dist/impl-IAXNYDJT.js.map +0 -1
- package/dist/impl-J33PI3PK.js +0 -2
- package/dist/impl-J33PI3PK.js.map +0 -1
- package/dist/impl-JZDUGI7W.js +0 -2
- package/dist/impl-JZDUGI7W.js.map +0 -1
- package/dist/impl-LZ3HI26W.js +0 -4
- package/dist/impl-LZ3HI26W.js.map +0 -1
- package/dist/impl-MEDPDKAE.js +0 -2
- package/dist/impl-MEDPDKAE.js.map +0 -1
- package/dist/impl-MLS6TI7N.js +0 -2
- package/dist/impl-MLS6TI7N.js.map +0 -1
- package/dist/impl-NI7KSBSS.js +0 -2
- package/dist/impl-NI7KSBSS.js.map +0 -1
- package/dist/impl-OM6EKANE.js +0 -9
- package/dist/impl-OM6EKANE.js.map +0 -1
- package/dist/impl-T4WDJSWZ.js +0 -2
- package/dist/impl-T4WDJSWZ.js.map +0 -1
- package/dist/impl-U37YTCPW.js +0 -2
- package/dist/impl-U37YTCPW.js.map +0 -1
- package/dist/impl-U5555HGJ.js +0 -12
- package/dist/impl-U5555HGJ.js.map +0 -1
- package/dist/impl-UHFSVVIS.js +0 -6
- package/dist/impl-UHFSVVIS.js.map +0 -1
- package/dist/impl-UIVTSO57.js +0 -2
- package/dist/impl-UIVTSO57.js.map +0 -1
- package/dist/impl-UQYL5PXR.js +0 -2
- package/dist/impl-UQYL5PXR.js.map +0 -1
- package/dist/impl-V5QTKTU4.js +0 -2
- package/dist/impl-V5QTKTU4.js.map +0 -1
- package/dist/impl-WDPWOOFV.js +0 -2
- package/dist/impl-WDPWOOFV.js.map +0 -1
- package/dist/impl-WZAF2LD3.js +0 -2
- package/dist/impl-WZAF2LD3.js.map +0 -1
- package/dist/impl-XF26H3HG.js +0 -2
- package/dist/impl-XF26H3HG.js.map +0 -1
- package/dist/impl-XQY2Q5R6.js +0 -2
- package/dist/impl-XQY2Q5R6.js.map +0 -1
- package/dist/impl-YB2LON7S.js +0 -2
- package/dist/impl-YB2LON7S.js.map +0 -1
- package/dist/impl-YNGQIWW7.js +0 -2
- package/dist/impl-YNGQIWW7.js.map +0 -1
- package/dist/impl-ZA3PKNQN.js +0 -2
- package/dist/impl-ZA3PKNQN.js.map +0 -1
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -1
- /package/dist/bin/{bash-complete.d.ts → bash-complete.d.cts} +0 -0
- /package/dist/bin/{cli.d.ts → cli.d.cts} +0 -0
- /package/dist/bin/{deprecated-command.d.ts → deprecated-command.d.cts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.ts","../src/lib/manual-enrichment/enrichPrivacyRequest.ts","../src/lib/manual-enrichment/pushManualEnrichmentIdentifiersFromCsv.ts"],"sourcesContent":["import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { map } from '@/lib/bluebird-replace';\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 type { Got } from 'got';\nimport * as t from 'io-ts';\nimport { logger } from '../../logger';\nimport { uniq } from 'lodash-es';\nimport colors from 'colors';\nimport { splitCsvToList } from '../requests/splitCsvToList';\n\nconst ADMIN_URL =\n 'https://app.transcend.io/privacy-requests/incoming-requests/';\n/**\n * Minimal set required to mark as completed\n */\nexport const EnrichPrivacyRequest = t.record(t.string, t.string);\n\n/** Type override */\nexport type EnrichPrivacyRequest = t.TypeOf<typeof EnrichPrivacyRequest>;\n\n/**\n * Upload identifiers to a privacy request or mark request as\n *\n * @param sombra - Sombra instance configured to make requests\n * @param request - Request to enricher\n * @param enricherId - The ID of the enricher being uploaded to\n * @param index - Index of request ID\n * @returns True if enriched successfully, false if skipped, throws error if failed\n */\nexport async function enrichPrivacyRequest(\n sombra: Got,\n { id: rawId, ...rest }: EnrichPrivacyRequest,\n enricherId: string,\n index?: number,\n): Promise<boolean> {\n if (!rawId) {\n // error\n const msg = `Request ID must be provided to enricher request.${\n index ? ` Found error in row: ${index}` : ''\n }`;\n logger.error(colors.red(msg));\n throw new Error(msg);\n }\n\n const id = rawId.toLowerCase();\n\n // Pull out the identifiers\n const enrichedIdentifiers = Object.entries(rest).reduce(\n (acc, [key, value]) => {\n const values = uniq(splitCsvToList(value));\n return values.length === 0\n ? acc\n : Object.assign(acc, {\n [key]: uniq(splitCsvToList(value)).map((val) => ({\n value: key === 'email' ? val.toLowerCase() : val,\n })),\n });\n },\n {} as Record<string, string[]>,\n );\n\n // Make the GraphQL request\n try {\n await sombra\n .post('v1/enrich-identifiers', {\n headers: {\n 'x-transcend-request-id': id,\n 'x-transcend-enricher-id': enricherId,\n },\n json: {\n enrichedIdentifiers,\n },\n })\n .json();\n\n logger.error(\n colors.green(`Successfully enriched request: ${ADMIN_URL}${id}`),\n );\n return true;\n } catch (err) {\n // skip if already enriched\n if (\n typeof err.response.body === 'string' &&\n err.response.body.includes('Cannot update a resolved RequestEnricher')\n ) {\n logger.warn(\n colors.magenta(\n `Skipped enrichment for request: ${ADMIN_URL}${id}, request is no longer in the enriching phase.`,\n ),\n );\n return false;\n }\n\n // error\n logger.error(\n colors.red(\n `Failed to enricher identifiers for request with id: ${ADMIN_URL}${id} - ${err.message} - ${err.response.body}`,\n ),\n );\n throw err;\n }\n}\n","import colors from 'colors';\nimport { map } from '@/lib/bluebird-replace';\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"],"mappings":"sQAAA,OAAwB,iBAAAA,MAAqB,8BAE7C,OAAOC,MAAY,SACnB,OAAS,WAAAC,EAAS,QAAAC,MAAY,YA4B9B,eAAsBC,GAAqC,CACzD,KAAAC,EACA,KAAAC,EACA,WAAAC,EACA,eAAAC,EAAiB,CAAC,EAClB,YAAAC,EAAc,IACd,aAAAC,EAAeC,CACjB,EAa6C,CAE3C,IAAMC,EAASC,EAA4BH,EAAcJ,CAAI,EACvDQ,EAAS,MAAMC,EAAwBL,EAAcJ,EAAMC,CAAU,EAE3ES,EAAO,KACLC,EAAO,QACL,6DAA6DT,EAAe,KAC1E,GACF,CAAC,EACH,CACF,EAGA,IAAMU,EAAc,MAAMC,EAAiBP,EAAQ,CACjD,QAASJ,EACT,SAAU,CAACY,EAAc,SAAS,CACpC,CAAC,EAGKC,EAAiD,CAAC,EAGxD,MAAMC,EACJJ,EACA,MAAOK,GAAY,CAEjB,IAAMC,EAAmB,MAAMC,EAAyBb,EAAQ,CAC9D,UAAWW,EAAQ,EACrB,CAAC,EAQD,GAL4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ACA,YAAAC,EAAc,IACd,aAAAC,EAAeC,CACjB,EAeoB,CAElB,IAAMC,EAAS,MAAMC,EAAwBH,EAAcL,EAAMC,CAAU,EACrEQ,EAASC,EAA4BL,EAAcL,CAAI,EAG7DW,EAAO,KAAKC,EAAO,QAAQ,YAAYb,CAAI,aAAa,CAAC,EACzD,IAAMc,EAAgBC,EAAQf,EAAMgB,CAAoB,EAGxDJ,EAAO,KACLC,EAAO,QAAQ,cAAcC,EAAc,MAAM,qBAAqB,CACxE,EAEA,IAAIG,EAAe,EACfC,EAAe,EACfC,EAAa,EAgDjB,GA9CA,MAAMC,EACJN,EACA,MAAOO,EAASC,IAAU,CACxB,GAAI,CAEElB,IACF,MAAMmB,EAAmBb,EAAQc,EAAwB,CACvD,MAAO,CACL,GAAIH,EAAQ,GACZ,SAAU,EACZ,CACF,CAAC,EAEDT,EAAO,KACLC,EAAO,QAAQ,iCAAiCQ,EAAQ,EAAE,EAAE,CAC9D,GAGa,MAAMI,EACnBjB,EACAa,EACAlB,EACAmB,CACF,EAEEL,GAAgB,EAEhBC,GAAgB,CAEpB,MAAc,CACZC,GAAc,CAChB,CACF,EACA,CAAE,YAAAd,CAAY,CAChB,EAEAO,EAAO,KACLC,EAAO,MACL;AAAA,kBAAsDI,CAAY,GACpE,CACF,EAEIC,EAAe,GACjBN,EAAO,KAAKC,EAAO,QAAQ,kBAAkBK,CAAY,GAAG,CAAC,EAG3DC,EAAa,EACf,MAAAP,EAAO,KAAKC,EAAO,IAAI,gBAAgBM,CAAU,GAAG,CAAC,EAC/C,IAAI,MAAM,qBAAqBA,CAAU,YAAY,EAG7D,OAAOL,EAAc,MACvB","names":["RequestStatus","colors","groupBy","uniq","pullManualEnrichmentIdentifiersToCsv","file","auth","sombraAuth","requestActions","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClient","sombra","createSombraGotInstance","logger","colors","allRequests","fetchAllRequests","RequestStatus","savedRequests","map","request","requestEnrichers","fetchAllRequestEnrichers","status","requestIdentifiers","fetchAllRequestIdentifiers","data","attributeValues","groupBy","acc","key","values","value","name","headers","uniq","d","writeCsv","t","uniq","colors","ADMIN_URL","EnrichPrivacyRequest","enrichPrivacyRequest","sombra","rawId","rest","enricherId","index","msg","logger","colors","id","enrichedIdentifiers","acc","key","value","uniq","splitCsvToList","val","err","colors","pushManualEnrichmentIdentifiersFromCsv","file","auth","sombraAuth","enricherId","markSilent","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","sombra","createSombraGotInstance","client","buildTranscendGraphQLClient","logger","colors","activeResults","readCsv","EnrichPrivacyRequest","successCount","skippedCount","errorCount","map","request","index","makeGraphQLRequest","UPDATE_PRIVACY_REQUEST","enrichPrivacyRequest"]}
|
package/dist/chunk-72U6ETHG.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/context.ts"],"sourcesContent":["import fs from 'node:fs';\nimport os from 'node:os';\nimport path from 'node:path';\nimport type { StricliAutoCompleteContext } from '@stricli/auto-complete';\nimport type { CommandContext } from '@stricli/core';\n\nexport interface LocalContext\n extends CommandContext,\n StricliAutoCompleteContext {\n /** The Node.js process object */\n readonly process: NodeJS.Process;\n // ...\n}\n\n/**\n * Builds the context for the CLI.\n *\n * @param process - The Node.js process object.\n * @returns The context for the CLI.\n */\nexport function buildContext(process: NodeJS.Process): LocalContext {\n return {\n process,\n os,\n fs,\n path,\n };\n}\n"],"mappings":"AAAA,OAAOA,MAAQ,KACf,OAAOC,MAAQ,KACf,OAAOC,MAAU,OAkBV,SAASC,EAAaC,EAAuC,CAClE,MAAO,CACL,QAAAA,EACA,GAAAH,EACA,GAAAD,EACA,KAAAE,CACF,CACF","names":["fs","os","path","buildContext","process"]}
|
package/dist/chunk-7QHA6ZIV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{q as N}from"./chunk-ZTD7APNF.js";import{De as U,_b as F,a as v,b as q,pe as D,qe as R,ve as O,wa as G}from"./chunk-TDBKATQK.js";import{a as t}from"./chunk-43JWXG77.js";import{e as T}from"./chunk-L5ULN3IT.js";import*as e from"io-ts";import{decodeCodec as Y}from"@transcend-io/type-utils";var Z=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 L(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}=Y(e.type({items:e.array(Z)}),i);return f}catch(i){throw new Error(`Received an error from server: ${i?.response?.body||i?.message}`)}}import*as S from"io-ts";var B=S.type({nonce:S.string,identifier:S.string});async function j(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(n.response?.statusCode===409)return!1;throw new Error(`Received an error from server: ${n?.response?.body||n?.message}`)}}import{chunk as W}from"lodash-es";import p from"colors";import Q from"cli-progress";async function ue({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=T,sleepSeconds:f=10}){let y=await R(i,c,n);t.info(p.magenta(`Reading "${r}" from disk`));let o=N(r,B);t.info(p.magenta(`Notifying Transcend for data silo "${s}" marking "${o.length}" identifiers as completed.`));let C=new Date().getTime(),w=new Q.SingleBar({},Q.Presets.shades_classic),d=0,u=0,l=0;w.start(o.length,0);let m=W(o,a),I=m.length;await v(m,async($,P)=>{t.info(p.blue(`Processing chunk ${P+1}/${I} (${W.length} items)`)),await q($,async h=>{try{await j(y,h)?d+=1:u+=1}catch(b){t.error(p.red(`Error notifying Transcend for identifier "${h.identifier}" - ${b?.message}`)),l+=1}w.update(d+u)}),f>0&&P<I-1&&(t.info(p.yellow(`Sleeping for ${f}s before next chunk...`)),await new Promise(h=>{setTimeout(h,f*1e3)}))}),w.stop();let x=new Date().getTime()-C;if(t.info(p.green(`Successfully notified Transcend for ${d} identifiers in "${x/1e3}" seconds!`)),u&&t.info(p.magenta(`There were ${u} identifiers that were not in a state to be updated.They likely have already been resolved.`)),l)throw t.error(p.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}import z from"colors";import H from"cli-progress";import{RequestDataSiloStatus as ee}from"@transcend-io/privacy-types";async function Te({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=ee.Resolved,transcendUrl:i=T}){let f=D(i,c),y=new Date().getTime(),o=new H.SingleBar({},H.Presets.shades_classic);t.info(z.magenta(`Notifying Transcend for data silo "${s}" marking "${r.length}" requests as completed.`));let C=0;o.start(r.length,0),await q(r,async u=>{let l=await U(f,{requestId:u,dataSiloId:s});try{await F(f,G,{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 t.info(z.green(`Successfully notified Transcend in "${d/1e3}" seconds!`)),r.length}import k from"colors";import J from"cli-progress";async function ke({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=T,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await R(y,s,c),w=D(y,s),d=0;o||(d=await O(w,{dataSiloId:r})),t.info(k.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 J.SingleBar({},J.Presets.shades_classic),m=new Set,I=[],g=[];o||l.start(d,0),await v(n,async $=>{let P=0,h=!0;for(;h;){let b=await L(C,{dataSiloId:r,limit:a,offset:P,requestType:$}),E=b.map(A=>(m.add(A.requestId),{...A,action:$})),M=E.map(({attributes:A,...V})=>({...V,...A.reduce((X,_)=>Object.assign(X,{[_.key]:_.values.join(",")}),{})}));I.push(...E),g.push(...M),g.length>=i&&(await f(g),g=[]),h=b.length===a,P+=a,o?t.info(k.magenta(`Pulled ${b.length} outstanding identifiers for ${m.size} requests`)):l.update(m.size)}}),g.length>0&&await f(g),o||l.stop();let x=new Date().getTime()-u;return t.info(k.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${x/1e3}" seconds!`)),{identifiers:I}}export{Z as a,L as b,B as c,j as d,ue as e,Te as f,ke as g};
|
|
2
|
-
//# sourceMappingURL=chunk-7QHA6ZIV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/cron/pullCronPageOfIdentifiers.ts","../src/lib/cron/markCronIdentifierCompleted.ts","../src/lib/cron/pushCronIdentifiersFromCsv.ts","../src/lib/cron/markRequestDataSiloIdsCompleted.ts","../src/lib/cron/pullChunkedCustomSiloOutstandingIdentifiers.ts"],"sourcesContent":["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","import type { Got } from 'got';\nimport * as t from 'io-ts';\n\n/**\n * Minimal set required to mark as completed\n */\nexport const CronIdentifierPush = t.type({\n nonce: t.string,\n identifier: t.string,\n});\n\n/** Type override */\nexport type CronIdentifierPush = t.TypeOf<typeof CronIdentifierPush>;\n\n/**\n * Mark an identifier output by the cron job as completed.\n *\n * @see https://docs.transcend.io/docs/api-reference/PUT/v1/data-silo\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns Successfully submitted request, false if not in a state to update\n */\nexport async function markCronIdentifierCompleted(\n sombra: Got,\n { nonce, identifier }: CronIdentifierPush,\n): Promise<boolean> {\n try {\n // Make the GraphQL request\n await sombra.put('v1/data-silo', {\n headers: {\n 'x-transcend-nonce': nonce,\n },\n json: {\n profiles: [\n {\n profileId: identifier,\n },\n ],\n },\n });\n return true;\n } catch (err) {\n // handle gracefully\n if (err.response?.statusCode === 409) {\n return false;\n }\n throw new Error(\n `Received an error from server: ${err?.response?.body || err?.message}`,\n );\n }\n}\n","import { map, mapSeries } from '@/lib/bluebird-replace';\nimport { chunk } from 'lodash-es';\nimport { createSombraGotInstance } from '../graphql';\nimport colors from 'colors';\nimport {\n markCronIdentifierCompleted,\n CronIdentifierPush,\n} from './markCronIdentifierCompleted';\nimport cliProgress from 'cli-progress';\nimport { logger } from '../../logger';\nimport { readCsv } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Given a CSV of cron job outputs, mark all requests as completed in Transcend\n *\n * @param options - Options\n * @returns Number of items marked as completed\n */\nexport async function pushCronIdentifiersFromCsv({\n file,\n dataSiloId,\n auth,\n sombraAuth,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n sleepSeconds = 10,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Data Silo ID to pull down jobs for */\n dataSiloId: string;\n /** Upload concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Sleep time in seconds between chunks of concurrent calls */\n sleepSeconds?: number;\n}): Promise<number> {\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n // Read from CSV\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, CronIdentifierPush);\n\n // Notify Transcend\n logger.info(\n colors.magenta(\n `Notifying Transcend for data silo \"${dataSiloId}\" marking \"${activeResults.length}\" identifiers as completed.`,\n ),\n );\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n let successCount = 0;\n let failureCount = 0;\n let errorCount = 0;\n progressBar.start(activeResults.length, 0);\n\n // Process in chunks with sleep intervals\n const chunks = chunk(activeResults, concurrency);\n const totalChunks = chunks.length;\n const processChunk = async (\n items: CronIdentifierPush[],\n chunkIndex: number,\n ): Promise<void> => {\n logger.info(\n colors.blue(\n `Processing chunk ${chunkIndex + 1}/${totalChunks} (${\n chunk.length\n } items)`,\n ),\n );\n\n // Process the items of the chunk concurrently\n await map(items, async (identifier) => {\n try {\n const success = await markCronIdentifierCompleted(sombra, identifier);\n if (success) {\n successCount += 1;\n } else {\n failureCount += 1;\n }\n } catch (e) {\n logger.error(\n colors.red(\n `Error notifying Transcend for identifier \"${identifier.identifier}\" - ${e?.message}`,\n ),\n );\n errorCount += 1;\n }\n progressBar.update(successCount + failureCount);\n });\n\n // Sleep between chunks (except for the last chunk)\n if (sleepSeconds > 0 && chunkIndex < totalChunks - 1) {\n logger.info(\n colors.yellow(`Sleeping for ${sleepSeconds}s before next chunk...`),\n );\n\n await new Promise((resolve) => {\n setTimeout(resolve, sleepSeconds * 1000);\n });\n }\n };\n\n // Process all chunks sequentially\n await mapSeries(chunks, processChunk);\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully notified Transcend for ${successCount} identifiers in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n if (failureCount) {\n logger.info(\n colors.magenta(\n `There were ${failureCount} identifiers that were not in a state to be updated.` +\n 'They likely have already been resolved.',\n ),\n );\n }\n if (errorCount) {\n logger.error(\n colors.red(\n `There were ${errorCount} identifiers that failed to be updated. Please review the logs for more information.`,\n ),\n );\n throw new Error('Failed to update all identifiers');\n }\n return activeResults.length;\n}\n","import { map } from '@/lib/bluebird-replace';\nimport colors from 'colors';\nimport { logger } from '../../logger';\nimport {\n CHANGE_REQUEST_DATA_SILO_STATUS,\n fetchRequestDataSilo,\n makeGraphQLRequest,\n buildTranscendGraphQLClient,\n} from '../graphql';\nimport cliProgress from 'cli-progress';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { RequestDataSiloStatus } from '@transcend-io/privacy-types';\n\n/**\n * Given a CSV of Request IDs, mark associated RequestDataSilos as completed\n *\n * @param options - Options\n * @returns Number of items marked as completed\n */\nexport async function markRequestDataSiloIdsCompleted({\n requestIds,\n dataSiloId,\n auth,\n concurrency = 100,\n status = RequestDataSiloStatus.Resolved,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** The list of request ids to mark as completed */\n requestIds: string[];\n /** Transcend API key authentication */\n auth: string;\n /** Data Silo ID to pull down jobs for */\n dataSiloId: string;\n /** Status to update requests to */\n status?: RequestDataSiloStatus;\n /** Upload concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<number> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Notify Transcend\n logger.info(\n colors.magenta(\n `Notifying Transcend for data silo \"${dataSiloId}\" marking \"${requestIds.length}\" requests as completed.`,\n ),\n );\n\n let total = 0;\n progressBar.start(requestIds.length, 0);\n await map(\n requestIds,\n async (requestId) => {\n const requestDataSilo = await fetchRequestDataSilo(client, {\n requestId,\n dataSiloId,\n });\n\n try {\n await makeGraphQLRequest<{\n /** Whether we successfully uploaded the results */\n success: boolean;\n }>(client, CHANGE_REQUEST_DATA_SILO_STATUS, {\n requestDataSiloId: requestDataSilo.id,\n status,\n });\n } catch (err) {\n if (!err.message.includes('Client error: Request must be active:')) {\n throw err;\n }\n }\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully notified Transcend in \"${totalTime / 1000}\" seconds!`,\n ),\n );\n return requestIds.length;\n}\n","import {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchRequestDataSiloActiveCount,\n} from '../graphql';\nimport colors from 'colors';\nimport cliProgress from 'cli-progress';\nimport {\n pullCronPageOfIdentifiers,\n CronIdentifier,\n} from './pullCronPageOfIdentifiers';\nimport { RequestAction } from '@transcend-io/privacy-types';\n\nimport { logger } from '../../logger';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { mapSeries } from '@/lib/bluebird-replace';\n\n/**\n * A CSV formatted identifier\n */\nexport type CsvFormattedIdentifier = {\n [k in string]: string | null | boolean | number;\n};\n\nexport interface CronIdentifierWithAction extends CronIdentifier {\n /** The request action that the identifier relates to */\n action: RequestAction;\n}\n\n/**\n * Pull the set of identifiers outstanding for a cron or AVC integration\n *\n * This function is designed to be used in a loop, and will call the onSave callback\n * with a chunk of identifiers when the savePageSize is reached.\n *\n * @param options - Options\n * @returns The identifiers and identifiers formatted for CSV\n */\nexport async function pullChunkedCustomSiloOutstandingIdentifiers({\n dataSiloId,\n auth,\n sombraAuth,\n actions,\n apiPageSize = 100,\n savePageSize = 1000,\n onSave,\n transcendUrl = DEFAULT_TRANSCEND_API,\n skipRequestCount = false,\n}: {\n /** Transcend API key authentication */\n auth: string;\n /** Data Silo ID to pull down jobs for */\n dataSiloId: string;\n /** The request actions to fetch */\n actions: RequestAction[];\n /** How many identifiers to pull in a single call to the backend */\n apiPageSize: number;\n /** How many identifiers to save at a time (usually to a CSV file, should be a multiple of apiPageSize) */\n savePageSize: number;\n /** Callback function called when a chunk of identifiers is ready to be saved */\n onSave: (chunk: CsvFormattedIdentifier[]) => Promise<void>;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Skip request count */\n skipRequestCount?: boolean;\n}): Promise<{\n /** Raw Identifiers */\n identifiers: CronIdentifierWithAction[];\n}> {\n // Validate savePageSize\n if (savePageSize % apiPageSize !== 0) {\n throw new Error(\n `savePageSize must be a multiple of apiPageSize. savePageSize: ${savePageSize}, apiPageSize: ${apiPageSize}`,\n );\n }\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n let totalRequestCount = 0;\n if (!skipRequestCount) {\n totalRequestCount = await fetchRequestDataSiloActiveCount(client, {\n dataSiloId,\n });\n }\n\n logger.info(\n colors.magenta(\n `Pulling ${\n skipRequestCount ? 'all' : totalRequestCount\n } outstanding request identifiers ` +\n `for data silo: \"${dataSiloId}\" for requests of types \"${actions.join(\n '\", \"',\n )}\"`,\n ),\n );\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n const foundRequestIds = new Set<string>();\n\n // identifiers found in total\n const identifiers: CronIdentifierWithAction[] = [];\n // current chunk of identifiers to be saved\n let currentChunk: CsvFormattedIdentifier[] = [];\n\n // map over each action\n if (!skipRequestCount) {\n progressBar.start(totalRequestCount, 0);\n }\n await mapSeries(actions, async (action) => {\n let offset = 0;\n let shouldContinue = true;\n\n // Fetch a page of identifiers\n while (shouldContinue) {\n const pageIdentifiers = await pullCronPageOfIdentifiers(sombra, {\n dataSiloId,\n limit: apiPageSize,\n offset,\n requestType: action,\n });\n\n const identifiersWithAction: CronIdentifierWithAction[] =\n pageIdentifiers.map((identifier) => {\n foundRequestIds.add(identifier.requestId);\n return {\n ...identifier,\n action,\n };\n });\n\n const csvFormattedIdentifiers = identifiersWithAction.map(\n ({ attributes, ...identifier }) => ({\n ...identifier,\n ...attributes.reduce(\n (acc, val) =>\n Object.assign(acc, {\n [val.key]: val.values.join(','),\n }),\n {},\n ),\n }),\n );\n\n identifiers.push(...identifiersWithAction);\n currentChunk.push(...csvFormattedIdentifiers);\n\n // Check if we've reached the savePageSize and call the onSave callback\n if (currentChunk.length >= savePageSize) {\n await onSave(currentChunk);\n currentChunk = [];\n }\n\n shouldContinue = pageIdentifiers.length === apiPageSize;\n offset += apiPageSize;\n if (!skipRequestCount) {\n progressBar.update(foundRequestIds.size);\n } else {\n logger.info(\n colors.magenta(\n `Pulled ${pageIdentifiers.length} outstanding identifiers for ${foundRequestIds.size} requests`,\n ),\n );\n }\n }\n });\n\n // Save any remaining identifiers in the current chunk\n if (currentChunk.length > 0) {\n await onSave(currentChunk);\n }\n\n if (!skipRequestCount) {\n progressBar.stop();\n }\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully pulled ${identifiers.length} outstanding identifiers from ${\n foundRequestIds.size\n } requests in \"${totalTime / 1000}\" seconds!`,\n ),\n );\n\n return { identifiers };\n}\n"],"mappings":"uNAAA,UAAYA,MAAO,QACnB,OAAS,eAAAC,MAAmB,2BAIrB,IAAMC,EAAmB,OAAK,CAEnC,WAAc,SAEd,KAAQ,SAER,eAAkB,SAElB,WAAc,SAEd,UAAa,SAEb,MAAS,SAET,iBAAoB,SAEpB,iBAAoB,SAEpB,WAAc,QACV,OAAK,CACL,IAAO,SACP,OAAU,QAAQ,QAAM,CAC1B,CAAC,CACH,CACF,CAAC,EAaD,eAAsBC,EACpBC,EACA,CACE,WAAAC,EACA,MAAAC,EAAQ,IACR,OAAAC,EAAS,EACT,YAAAC,CACF,EAU2B,CAC3B,GAAI,CAEF,IAAMC,EAAW,MAAML,EACpB,IAAI,gBAAgBC,CAAU,qBAAqBG,CAAW,GAAI,CACjE,aAAc,CACZ,OAAAD,EACA,MAAAD,CACF,CACF,CAAC,EACA,KAAK,EAEF,CAAE,MAAAI,CAAM,EAAIT,EACd,OAAK,CACL,MAAS,QAAMC,CAAc,CAC/B,CAAC,EACDO,CACF,EACA,OAAOC,CACT,OAASC,EAAK,CACZ,MAAM,IAAI,MACR,kCAAkCA,GAAK,UAAU,MAAQA,GAAK,OAAO,EACvE,CACF,CACF,CClFA,UAAYC,MAAO,QAKZ,IAAMC,EAAuB,OAAK,CACvC,MAAS,SACT,WAAc,QAChB,CAAC,EAaD,eAAsBC,EACpBC,EACA,CAAE,MAAAC,EAAO,WAAAC,CAAW,EACF,CAClB,GAAI,CAEF,aAAMF,EAAO,IAAI,eAAgB,CAC/B,QAAS,CACP,oBAAqBC,CACvB,EACA,KAAM,CACJ,SAAU,CACR,CACE,UAAWC,CACb,CACF,CACF,CACF,CAAC,EACM,EACT,OAASC,EAAK,CAEZ,GAAIA,EAAI,UAAU,aAAe,IAC/B,MAAO,GAET,MAAM,IAAI,MACR,kCAA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AV,EACA,MAAOI,EACP,OAAAsB,EACA,YAAaD,CACf,CAAC,EAEKK,EACJF,EAAgB,IAAKG,IACnBV,EAAgB,IAAIU,EAAW,SAAS,EACjC,CACL,GAAGA,EACH,OAAAN,CACF,EACD,EAEGO,EAA0BF,EAAsB,IACpD,CAAC,CAAE,WAAAG,EAAY,GAAGF,CAAW,KAAO,CAClC,GAAGA,EACH,GAAGE,EAAW,OACZ,CAACC,EAAKC,IACJ,OAAO,OAAOD,EAAK,CACjB,CAACC,EAAI,GAAG,EAAGA,EAAI,OAAO,KAAK,GAAG,CAChC,CAAC,EACH,CAAC,CACH,CACF,EACF,EAEAb,EAAY,KAAK,GAAGQ,CAAqB,EACzCP,EAAa,KAAK,GAAGS,CAAuB,EAGxCT,EAAa,QAAUlB,IACzB,MAAMC,EAAOiB,CAAY,EACzBA,EAAe,CAAC,GAGlBI,EAAiBC,EAAgB,SAAWxB,EAC5CsB,GAAUtB,EACLK,EAGHO,EAAO,KACLC,EAAO,QACL,UAAUW,EAAgB,MAAM,gCAAgCP,EAAgB,IAAI,WACtF,CACF,EANAF,EAAY,OAAOE,EAAgB,IAAI,CAQ3C,CACF,CAAC,EAGGE,EAAa,OAAS,GACxB,MAAMjB,EAAOiB,CAAY,EAGtBd,GACHU,EAAY,KAAK,EAGnB,IAAMiB,EADK,IAAI,KAAK,EAAE,QAAQ,EACPlB,EAEvB,OAAAF,EAAO,KACLC,EAAO,MACL,uBAAuBK,EAAY,MAAM,iCACvCD,EAAgB,IAClB,iBAAiBe,EAAY,GAAI,YACnC,CACF,EAEO,CAAE,YAAAd,CAAY,CACvB","names":["t","decodeCodec","CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response","items","err","t","CronIdentifierPush","markCronIdentifierCompleted","sombra","nonce","identifier","err","chunk","colors","cliProgress","pushCronIdentifiersFromCsv","file","dataSiloId","auth","sombraAuth","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","sleepSeconds","sombra","createSombraGotInstance","logger","colors","activeResults","readCsv","CronIdentifierPush","t0","progressBar","cliProgress","successCount","failureCount","errorCount","chunks","chunk","totalChunks","mapSeries","items","chunkIndex","map","identifier","markCronIdentifierCompleted","e","resolve","totalTime","colors","cliProgress","RequestDataSiloStatus","markRequestDataSiloIdsCompleted","requestIds","dataSiloId","auth","concurrency","status","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClient","t0","progressBar","cliProgress","logger","colors","total","map","requestId","requestDataSilo","fetchRequestDataSilo","makeGraphQLRequest","CHANGE_REQUEST_DATA_SILO_STATUS","err","totalTime","colors","cliProgress","pullChunkedCustomSiloOutstandingIdentifiers","dataSiloId","auth","sombraAuth","actions","apiPageSize","savePageSize","onSave","transcendUrl","DEFAULT_TRANSCEND_API","skipRequestCount","sombra","createSombraGotInstance","client","buildTranscendGraphQLClient","totalRequestCount","fetchRequestDataSiloActiveCount","logger","colors","t0","progressBar","cliProgress","foundRequestIds","identifiers","currentChunk","mapSeries","action","offset","shouldContinue","pageIdentifiers","pullCronPageOfIdentifiers","identifiersWithAction","identifier","csvFormattedIdentifiers","attributes","acc","val","totalTime"]}
|
package/dist/chunk-ARVEJERC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{makeEnum as e}from"@transcend-io/type-utils";var a=(s=>(s.Json="json",s))(a||{}),o=(s=>(s.Assessments="assessments",s))(o||{}),p=(i=>(i.OneTrust="oneTrust",i.File="file",i))(p||{}),m=(t=>(t.ApiKeys="apiKeys",t.Attributes="customFields",t.Templates="templates",t.DataSilos="dataSilos",t.Enrichers="enrichers",t.DataFlows="dataFlows",t.BusinessEntities="businessEntities",t.Actions="actions",t.DataSubjects="dataSubjects",t.Identifiers="identifiers",t.Cookies="cookies",t.ConsentManager="consentManager",t.Partitions="partitions",t.Prompts="prompts",t.PromptPartials="promptPartials",t.PromptGroups="promptGroups",t.Agents="agents",t.AgentFunctions="agentFunctions",t.AgentFiles="agentFiles",t.Vendors="vendors",t.DataCategories="dataCategories",t.ProcessingPurposes="processingPurposes",t.ActionItems="actionItems",t.ActionItemCollections="actionItemCollections",t.Teams="teams",t.PrivacyCenters="privacyCenters",t.Policies="policies",t.Messages="messages",t.Assessments="assessments",t.AssessmentTemplates="assessmentTemplates",t.Purposes="purposes",t))(m||{}),n=e({RedactEmail:"redactEmail",Log:"log",LogToTranscend:"logToTranscend",ApplyTranscendPolicies:"applyTranscendPolicies"}),h=e({ChatCompletion:"/v1/chat/completions",Embeddings:"/v1/embeddings",Completions:"/v1/completions",Agents:"/v1/assistants",Agent:"/v1/assistants/:assistantId",Threads:"/v1/threads",Thread:"/v1/threads/:threadId",Messages:"/v1/threads/:threadId/messages",Message:"/v1/threads/:threadId/messages/:messageId",Runs:"/v1/threads/:threadId/runs",Run:"/v1/threads/:threadId/runs/:runId",Files:"/v1/files",File:"/v1/files/:fileId"});export{a,o as b,p as c,m as d,n as e,h as f};
|
|
2
|
-
//# sourceMappingURL=chunk-ARVEJERC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/enums.ts"],"sourcesContent":["import { makeEnum } from '@transcend-io/type-utils';\n\n/** Accepted file formats for exporting resources from OneTrust */\nexport enum OneTrustFileFormat {\n Json = 'json',\n}\n\n/**\n * Resources that can be pulled in from OneTrust\n */\nexport enum OneTrustPullResource {\n Assessments = 'assessments',\n}\n\n/**\n * Where to read OneTrust resources from\n */\nexport enum OneTrustPullSource {\n OneTrust = 'oneTrust',\n File = 'file',\n}\n\n/**\n * Resources that can be pulled in\n */\nexport enum TranscendPullResource {\n ApiKeys = 'apiKeys',\n Attributes = 'customFields',\n Templates = 'templates',\n DataSilos = 'dataSilos',\n Enrichers = 'enrichers',\n DataFlows = 'dataFlows',\n BusinessEntities = 'businessEntities',\n Actions = 'actions',\n DataSubjects = 'dataSubjects',\n Identifiers = 'identifiers',\n Cookies = 'cookies',\n ConsentManager = 'consentManager',\n Partitions = 'partitions',\n Prompts = 'prompts',\n PromptPartials = 'promptPartials',\n PromptGroups = 'promptGroups',\n Agents = 'agents',\n AgentFunctions = 'agentFunctions',\n AgentFiles = 'agentFiles',\n Vendors = 'vendors',\n DataCategories = 'dataCategories',\n ProcessingPurposes = 'processingPurposes',\n ActionItems = 'actionItems',\n ActionItemCollections = 'actionItemCollections',\n Teams = 'teams',\n PrivacyCenters = 'privacyCenters',\n Policies = 'policies',\n Messages = 'messages',\n Assessments = 'assessments',\n AssessmentTemplates = 'assessmentTemplates',\n Purposes = 'purposes',\n}\n\n/**\n * Names of built in policies for pathfinder\n */\nexport const PathfinderPolicyName = makeEnum({\n RedactEmail: 'redactEmail',\n Log: 'log',\n LogToTranscend: 'logToTranscend',\n ApplyTranscendPolicies: 'applyTranscendPolicies',\n});\n\n/**\n * Type override\n */\nexport type PathfinderPolicyName =\n (typeof PathfinderPolicyName)[keyof typeof PathfinderPolicyName];\n\n/**\n * The names of the OpenAI routes that we support setting policies for\n * reference: https://platform.openai.com/docs/api-reference/introduction\n */\nexport const OpenAIRouteName = makeEnum({\n ChatCompletion: '/v1/chat/completions',\n Embeddings: '/v1/embeddings',\n Completions: '/v1/completions',\n Agents: '/v1/assistants',\n Agent: '/v1/assistants/:assistantId',\n Threads: '/v1/threads',\n Thread: '/v1/threads/:threadId',\n Messages: '/v1/threads/:threadId/messages',\n Message: '/v1/threads/:threadId/messages/:messageId',\n Runs: '/v1/threads/:threadId/runs',\n Run: '/v1/threads/:threadId/runs/:runId',\n Files: '/v1/files',\n File: '/v1/files/:fileId',\n});\n\n/**\n * Type override\n */\nexport type OpenAIRouteName =\n (typeof OpenAIRouteName)[keyof typeof OpenAIRouteName];\n"],"mappings":"AAAA,OAAS,YAAAA,MAAgB,2BAGlB,IAAKC,OACVA,EAAA,KAAO,OADGA,OAAA,IAOAC,OACVA,EAAA,YAAc,cADJA,OAAA,IAOAC,OACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OAFGA,OAAA,IAQAC,OACVA,EAAA,QAAU,UACVA,EAAA,WAAa,eACbA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,iBAAmB,mBACnBA,EAAA,QAAU,UACVA,EAAA,aAAe,eACfA,EAAA,YAAc,cACdA,EAAA,QAAU,UACVA,EAAA,eAAiB,iBACjBA,EAAA,WAAa,aACbA,EAAA,QAAU,UACVA,EAAA,eAAiB,iBACjBA,EAAA,aAAe,eACfA,EAAA,OAAS,SACTA,EAAA,eAAiB,iBACjBA,EAAA,WAAa,aACbA,EAAA,QAAU,UACVA,EAAA,eAAiB,iBACjBA,EAAA,mBAAqB,qBACrBA,EAAA,YAAc,cACdA,EAAA,sBAAwB,wBACxBA,EAAA,MAAQ,QACRA,EAAA,eAAiB,iBACjBA,EAAA,SAAW,WACXA,EAAA,SAAW,WACXA,EAAA,YAAc,cACdA,EAAA,oBAAsB,sBACtBA,EAAA,SAAW,WA/BDA,OAAA,IAqCCC,EAAuBL,EAAS,CAC3C,YAAa,cACb,IAAK,MACL,eAAgB,iBAChB,uBAAwB,wBAC1B,CAAC,EAYYM,EAAkBN,EAAS,CACtC,eAAgB,uBAChB,WAAY,iBACZ,YAAa,kBACb,OAAQ,iBACR,MAAO,8BACP,QAAS,cACT,OAAQ,wBACR,SAAU,iCACV,QAAS,4CACT,KAAM,6BACN,IAAK,oCACL,MAAO,YACP,KAAM,mBACR,CAAC","names":["makeEnum","OneTrustFileFormat","OneTrustPullResource","OneTrustPullSource","TranscendPullResource","PathfinderPolicyName","OpenAIRouteName"]}
|
package/dist/chunk-CBAHSBSW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{union as c}from"lodash-es";function f(l,{adTechPurposes:p=["SaleOfInfo"],serviceToTitle:s,serviceToSupportedIntegration:r}){let e=[],i=[],n={};l.forEach(t=>{let{service:a,attributes:h=[]}=t;if(!a||a==="internalService")return;let u=h.find(o=>o.key==="Found on Domain");u&&(n[a]||(n[a]=[]),n[a].push(...u.values.map(o=>o.replace("https://","").replace("http://",""))),n[a]=[...new Set(n[a])]),c(t.trackingPurposes,p).length>0?(i.push(a),e.includes(a)&&(e=e.filter(o=>o!==a))):i.includes(a)||e.push(a)});let m=[...new Set(i)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Found On Domain",values:n[t]||[]}]}));return{siteTechDataSilos:[...new Set(e)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson",outerType:t},attributes:[{key:"Tech Type",values:["Site Tech"]},{key:"Found On Domain",values:n[t]||[]}]})),adTechDataSilos:m}}export{f as a};
|
|
2
|
-
//# sourceMappingURL=chunk-CBAHSBSW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/consent-manager/dataFlowsToDataSilos.ts"],"sourcesContent":["import { DataFlowInput, DataSiloInput } from '../../codecs';\nimport { union } from 'lodash-es';\nimport { IndexedCatalogs } from '../graphql';\n\n/**\n * Convert data flow configurations into a set of data silo configurations\n *\n * @param inputs - Data flow input to convert to data silos\n * @param options - Additional options\n * @returns Business entity configuration input\n */\nexport function dataFlowsToDataSilos(\n inputs: DataFlowInput[],\n {\n adTechPurposes = ['SaleOfInfo'],\n serviceToTitle,\n serviceToSupportedIntegration,\n }: IndexedCatalogs & {\n /** List of purposes that are considered \"Ad Tech\" */\n adTechPurposes?: string[];\n },\n): {\n /** List of data silo configurations for site-tech services */\n siteTechDataSilos: DataSiloInput[];\n /** List of data silo configurations for ad-tech services */\n adTechDataSilos: DataSiloInput[];\n} {\n // List of site tech integrations\n let siteTechIntegrations: string[] = [];\n\n // List of ad tech integrations\n const adTechIntegrations: string[] = [];\n\n // Mapping from service name to list of\n const serviceToFoundOnDomain: { [k in string]: string[] } = {};\n\n // iterate over each flow\n inputs.forEach((flow) => {\n // process data flows with services\n const { service, attributes = [] } = flow;\n if (!service || service === 'internalService') {\n return;\n }\n\n // create mapping to found on domain\n const foundOnDomain = attributes.find(\n (attr) => attr.key === 'Found on Domain',\n );\n\n // Create a list of all domains where the data flow was found\n if (foundOnDomain) {\n if (!serviceToFoundOnDomain[service]) {\n serviceToFoundOnDomain[service] = [];\n }\n serviceToFoundOnDomain[service]!.push(\n ...foundOnDomain.values.map((v) =>\n v.replace('https://', '').replace('http://', ''),\n ),\n );\n serviceToFoundOnDomain[service] = [\n ...new Set(serviceToFoundOnDomain[service]),\n ];\n }\n\n // Keep track of ad tech\n if (union(flow.trackingPurposes, adTechPurposes).length > 0) {\n // add service to ad tech list\n adTechIntegrations.push(service);\n\n // remove from site tech list\n if (siteTechIntegrations.includes(service)) {\n siteTechIntegrations = siteTechIntegrations.filter(\n (s) => s !== service,\n );\n }\n } else if (!adTechIntegrations.includes(service)) {\n // add to site tech list\n siteTechIntegrations.push(service);\n }\n });\n\n // create the list of ad tech integrations\n const adTechDataSilos = [...new Set(adTechIntegrations)].map((service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', 'outer-type': service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Ad Tech'],\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }));\n\n // create the list of site tech integrations\n const siteTechDataSilos = [...new Set(siteTechIntegrations)].map(\n (service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', outerType: service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Site Tech'],\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }),\n );\n\n return {\n siteTechDataSilos,\n adTechDataSilos,\n };\n}\n"],"mappings":"AACA,OAAS,SAAAA,MAAa,YAUf,SAASC,EACdC,EACA,CACE,eAAAC,EAAiB,CAAC,YAAY,EAC9B,eAAAC,EACA,8BAAAC,CACF,EASA,CAEA,I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,EACrC,CAAE,gBAAiBA,CAAQ,EAC3B,CAAE,gBAAiB,gBAAiB,UAAWA,CAAQ,EAC3D,WAAY,CACV,CACE,IAAK,YACL,OAAQ,CAAC,WAAW,CACtB,EACA,CACE,IAAK,kBACL,OAAQF,EAAuBE,CAAO,GAAK,CAAC,CAC9C,CACF,CACF,EACF,EAIE,gBAAAM,CACF,CACF","names":["union","dataFlowsToDataSilos","inputs","adTechPurposes","serviceToTitle","serviceToSupportedIntegration","siteTechIntegrations","adTechIntegrations","serviceToFoundOnDomain","flow","service","attributes","foundOnDomain","attr","v","s","adTechDataSilos"]}
|
package/dist/chunk-HH2PQ3PQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{k as i}from"./chunk-ZTD7APNF.js";import o from"inquirer";import m from"inquirer-autocomplete-prompt";async function c({message:e}){let{response:r}=await o.prompt([{name:"response",message:e,type:"confirm"}]);return r}async function l({message:e}){let{response:r}=await o.prompt([{name:"response",message:e,type:"text",validate:t=>t.trim().length>0}]);return r}async function y({defaultValue:e,values:r,message:t}){o.registerPrompt("autocomplete",m);let{response:p}=await o.prompt([{name:"response",message:t,type:"autocomplete",default:e,source:(a,n)=>n?r.filter(s=>typeof s=="string"&&i(n,s)):r}]);return p}export{c as a,l as b,y as c};
|
|
2
|
-
//# sourceMappingURL=chunk-HH2PQ3PQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/helpers/inquirer.ts"],"sourcesContent":["import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { fuzzySearch } from '../requests';\nimport { ObjByString } from '@transcend-io/type-utils';\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n */\nexport async function inquirerConfirmBoolean({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<boolean> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: boolean;\n }>([\n {\n name: 'response',\n message,\n type: 'confirm',\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n */\nexport async function inquirerConfirmText({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<string> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'text',\n validate: (x) => x.trim().length > 0,\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer auto complete\n *\n * @param options - Options\n */\nexport async function inquirerAutoComplete({\n defaultValue,\n values,\n message,\n}: {\n /** Default value */\n defaultValue?: string;\n /** Message */\n message: string;\n /** Values to select */\n values: string[];\n}): Promise<string> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'autocomplete',\n default: defaultValue,\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? values\n : values.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n },\n ]);\n return response;\n}\n"],"mappings":"wCAAA,OAAOA,MAAc,WACrB,OAAOC,MAAwB,+BAS/B,eAAsBC,EAAuB,CAC3C,QAAAC,CACF,EAGqB,CACnB,GAAM,CAAE,SAAAC,CAAS,EAAI,MAAMC,EAAS,OAGjC,CACD,CACE,KAAM,WACN,QAAAF,EACA,KAAM,SACR,CACF,CAAC,EACD,OAAOC,CACT,CAOA,eAAsBE,EAAoB,CACxC,QAAAH,CACF,EAGoB,CAClB,GAAM,CAAE,SAAAC,CAAS,EAAI,MAAMC,EAAS,OAGjC,CACD,CACE,KAAM,WACN,QAAAF,EACA,KAAM,OACN,SAAWI,GAAMA,EAAE,KAAK,EAAE,OAAS,CACrC,CACF,CAAC,EACD,OAAOH,CACT,CAOA,eAAsBI,EAAqB,CACzC,aAAAC,EACA,OAAAC,EACA,QAAAP,CACF,EAOoB,CAClBE,EAAS,eAAe,eAAgBM,CAAkB,EAC1D,GAAM,CAAE,SAAAP,CAAS,EAAI,MAAMC,EAAS,OAGjC,CACD,CACE,KAAM,WACN,QAAAF,EACA,KAAM,eACN,QAASM,EACT,OAAQ,CAACG,EAA2BC,IACjCA,EAEGH,EAAO,OACJH,GAAM,OAAOA,GAAM,UAAYO,EAAYD,EAAON,CAAC,CACtD,EAHAG,CAIR,CACF,CAAC,EACD,OAAON,CACT","names":["inquirer","autoCompletePrompt","inquirerConfirmBoolean","message","response","inquirer","inquirerConfirmText","x","inquirerAutoComplete","defaultValue","values","autoCompletePrompt","answersSoFar","input","fuzzySearch"]}
|
package/dist/chunk-INLBXSQE.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{e as o,f as i}from"./chunk-L5ULN3IT.js";import{d as n}from"./chunk-ARVEJERC.js";import{buildCommand as p,numberParser as m}from"@stricli/core";import{ConsentTrackerStatus as u}from"@transcend-io/privacy-types";import{ScopeName as f,TRANSCEND_SCOPES as s}from"@transcend-io/privacy-types";function b(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e))throw new Error(`Invalid UUID format: ${e}`);return e}function a(e){try{return new URL(e).toString().replace(/\/$/,"")}catch{throw new Error(`Invalid URL format: ${e}`)}}function g(e){return e.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function S(e){let r=new Date(e);if(Number.isNaN(r.getTime()))throw new TypeError(`Invalid date: ${e}. Try using the ISO 8601 format (YYYY-MM-DDTHH:MM:SS.SSSZ)`);return r}var l=({scopes:e,requiresSiloScope:r=!1})=>{let t={kind:"parsed",parse:String,brief:"The Transcend API key."};return r&&(t.brief+=" This key must be associated with the data silo(s) being operated on."),e==="Varies"?{...t,brief:`${t.brief} The scopes required will vary depending on the operation performed. If in doubt, the ${s[f.FullAdmin].title} scope will always work.`}:e.length===0?{...t,brief:`${t.brief} No scopes are required for this command.`}:{...t,brief:`${t.brief} Requires scopes: ${e.map(c=>`"${s[c].title}"`).join(", ")}`}},d=(e=o)=>({kind:"parsed",parse:a,brief:"URL of the Transcend backend. Use https://api.us.transcend.io for US hosting",default:e}),U=(e=i)=>({kind:"parsed",parse:a,brief:"URL of the Transcend consent backend. Use https://consent.us.transcend.io for US hosting",default:e}),D=()=>({kind:"parsed",parse:String,brief:"The Sombra internal key, use for additional authentication when self-hosting Sombra",optional:!0});var h=["dataSilos","enrichers","templates","apiKeys"],v=Object.values(u),C=p({loader:async()=>{let{pull:e}=await import("./impl-3M5R6G5M.js");return e},parameters:{flags:{auth:l({scopes:"Varies"}),resources:{kind:"enum",values:["all",...Object.values(n)],brief:`The different resource types to pull in. Defaults to ${h.join(",")}.`,variadic:",",optional:!0},file:{kind:"parsed",parse:String,brief:"Path to the YAML file to pull into",default:"./transcend.yml"},transcendUrl:d(),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"The UUIDs of the data silos that should be pulled into the YAML file",optional:!0},integrationNames:{kind:"parsed",parse:String,variadic:",",brief:"The types of integrations to pull down",optional:!0},trackerStatuses:{kind:"enum",values:Object.values(u),variadic:",",brief:"The statuses of consent manager trackers to pull down. Defaults to all statuses.",optional:!0},pageSize:{kind:"parsed",parse:m,brief:"The page size to use when paginating over the API",default:"50"},skipDatapoints:{kind:"boolean",brief:"When true, skip pulling in datapoints alongside data silo resource",default:!1},skipSubDatapoints:{kind:"boolean",brief:"When true, skip pulling in subDatapoints alongside data silo resource",default:!1},includeGuessedCategories:{kind:"boolean",brief:"When true, included guessed data categories that came from the content classifier",default:!1},debug:{kind:"boolean",brief:"Set to true to include debug logs while pulling the configuration",default:!1}}},docs:{brief:"Pull metadata from Transcend into transcend.yml",fullDescription:`Generates a transcend.yml by pulling the configuration from your Transcend instance.
|
|
2
|
-
|
|
3
|
-
The API key needs various scopes depending on the resources being pulled (see the CLI's README for more details).
|
|
4
|
-
|
|
5
|
-
This command can be helpful if you are looking to:
|
|
6
|
-
|
|
7
|
-
- Copy your data into another instance
|
|
8
|
-
- Generate a transcend.yml file as a starting point to maintain parts of your data inventory in code.`}});export{b as a,g as b,S as c,l as d,d as e,U as f,D as g,h,v as i,C as j};
|
|
9
|
-
//# sourceMappingURL=chunk-INLBXSQE.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/inventory/pull/command.ts","../src/cli/common-parameters.ts","../src/cli/parsers.ts"],"sourcesContent":["import { buildCommand, numberParser } from '@stricli/core';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport {\n createAuthParameter,\n createTranscendUrlParameter,\n} from '@/cli/common-parameters';\nimport { TranscendPullResource } from '@/enums';\n\nexport const DEFAULT_TRANSCEND_PULL_RESOURCES = [\n TranscendPullResource.DataSilos,\n TranscendPullResource.Enrichers,\n TranscendPullResource.Templates,\n TranscendPullResource.ApiKeys,\n];\n\nexport const DEFAULT_CONSENT_TRACKER_STATUSES =\n Object.values(ConsentTrackerStatus);\n\nexport const pullCommand = buildCommand({\n loader: async () => {\n const { pull } = await import('./impl');\n return pull;\n },\n parameters: {\n flags: {\n auth: createAuthParameter({\n scopes: 'Varies',\n }),\n resources: {\n kind: 'enum',\n values: ['all', ...Object.values(TranscendPullResource)],\n brief: `The different resource types to pull in. Defaults to ${DEFAULT_TRANSCEND_PULL_RESOURCES.join(\n ',',\n )}.`,\n variadic: ',',\n optional: true,\n },\n file: {\n kind: 'parsed',\n parse: String,\n brief: 'Path to the YAML file to pull into',\n default: './transcend.yml',\n },\n transcendUrl: createTranscendUrlParameter(),\n dataSiloIds: {\n kind: 'parsed',\n parse: String,\n variadic: ',',\n brief:\n 'The UUIDs of the data silos that should be pulled into the YAML file',\n optional: true,\n },\n integrationNames: {\n kind: 'parsed',\n parse: String,\n variadic: ',',\n brief: 'The types of integrations to pull down',\n optional: true,\n },\n trackerStatuses: {\n kind: 'enum',\n values: Object.values(ConsentTrackerStatus),\n variadic: ',',\n brief:\n 'The statuses of consent manager trackers to pull down. Defaults to all statuses.',\n optional: true,\n },\n pageSize: {\n kind: 'parsed',\n parse: numberParser,\n brief: 'The page size to use when paginating over the API',\n default: '50',\n },\n skipDatapoints: {\n kind: 'boolean',\n brief:\n 'When true, skip pulling in datapoints alongside data silo resource',\n default: false,\n },\n skipSubDatapoints: {\n kind: 'boolean',\n brief:\n 'When true, skip pulling in subDatapoints alongside data silo resource',\n default: false,\n },\n includeGuessedCategories: {\n kind: 'boolean',\n brief:\n 'When true, included guessed data categories that came from the content classifier',\n default: false,\n },\n debug: {\n kind: 'boolean',\n brief:\n 'Set to true to include debug logs while pulling the configuration',\n default: false,\n },\n },\n },\n docs: {\n brief: 'Pull metadata from Transcend into transcend.yml',\n fullDescription: `Generates a transcend.yml by pulling the configuration from your Transcend instance.\n\nThe API key needs various scopes depending on the resources being pulled (see the CLI's README for more details).\n\nThis command can be helpful if you are looking to:\n\n- Copy your data into another instance\n- Generate a transcend.yml file as a starting point to maintain parts of your data inventory in code.`,\n },\n});\n","import { ScopeName, TRANSCEND_SCOPES } from '@transcend-io/privacy-types';\nimport { urlParser } from './parsers';\nimport {\n DEFAULT_TRANSCEND_API,\n DEFAULT_TRANSCEND_CONSENT_API,\n} from '@/constants';\n\n/**\n * Common parameter builders for CLI commands\n * These reduce duplication and ensure consistency across commands\n */\n\n/**\n * Creates a standard authentication parameter\n *\n * @param root0 - The scopes and whether it requires a silo scope\n * @returns The parameter object\n */\nexport const createAuthParameter = ({\n scopes,\n requiresSiloScope = false,\n}: {\n /** The scopes required for the command */\n scopes: ScopeName[] | 'Varies';\n /** Whether the command requires a silo scope */\n requiresSiloScope?: boolean;\n}) => {\n const parameter = {\n kind: 'parsed' as const,\n parse: String,\n brief: 'The Transcend API key.',\n };\n\n if (requiresSiloScope) {\n parameter.brief +=\n ' This key must be associated with the data silo(s) being operated on.';\n }\n\n if (scopes === 'Varies') {\n return {\n ...parameter,\n brief: `${\n parameter.brief\n } The scopes required will vary depending on the operation performed. If in doubt, the ${\n TRANSCEND_SCOPES[ScopeName.FullAdmin].title\n } scope will always work.`,\n };\n }\n\n if (scopes.length === 0) {\n return {\n ...parameter,\n brief: `${parameter.brief} No scopes are required for this command.`,\n };\n }\n\n return {\n ...parameter,\n brief: `${parameter.brief} Requires scopes: ${scopes\n .map((s) => `\"${TRANSCEND_SCOPES[s].title}\"`)\n .join(', ')}`,\n };\n};\n\n/**\n * Creates a standard Transcend URL parameter\n *\n * @param defaultUrl - The default URL to use if not provided\n * @returns The parameter object\n */\nexport const createTranscendUrlParameter = (\n defaultUrl = DEFAULT_TRANSCEND_API,\n) => ({\n kind: 'parsed' as const,\n parse: urlParser,\n brief:\n 'URL of the Transcend backend. Use https://api.us.transcend.io for US hosting',\n default: defaultUrl,\n});\n\n/**\n * Creates a standard Consent URL parameter\n *\n * @param defaultUrl - The default URL to use if not provided\n * @returns The parameter object\n */\nexport const createConsentUrlParameter = (\n defaultUrl = DEFAULT_TRANSCEND_CONSENT_API,\n) => ({\n kind: 'parsed' as const,\n parse: urlParser,\n brief:\n 'URL of the Transcend consent backend. Use https://consent.us.transcend.io for US hosting',\n default: defaultUrl,\n});\n\n/**\n * Creates a standard Sombra authentication parameter\n *\n * @returns The parameter object\n */\nexport const createSombraAuthParameter = () => ({\n kind: 'parsed' as const,\n parse: String,\n brief:\n 'The Sombra internal key, use for additional authentication when self-hosting Sombra',\n optional: true as const,\n});\n","/**\n * Validates and returns a UUID string.\n *\n * @param input - The input string to validate as UUID\n * @returns The validated UUID string\n * @throws Error if input is not a valid UUID\n */\nexport function uuidParser(input: string): string {\n const uuidRegex =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n if (!uuidRegex.test(input)) {\n throw new Error(`Invalid UUID format: ${input}`);\n }\n return input;\n}\n\n/**\n * Validates and returns a URL string.\n *\n * @param input - The input string to validate as URL\n * @returns The validated URL string\n * @throws Error if input is not a valid URL\n */\nexport function urlParser(input: string): string {\n try {\n const url = new URL(input);\n return url.toString().replace(/\\/$/, '');\n } catch {\n throw new Error(`Invalid URL format: ${input}`);\n }\n}\n\n/**\n * Parse a comma-separated string to array.\n * NOTE: Prefer using `variadic` for list arguments instead of this function. This should only be used for arguments which have a default value.\n *\n * @param input - The comma-separated string to parse\n * @returns Array of trimmed, non-empty strings\n */\nexport function arrayParser(input: string): string[] {\n return input\n .split(',')\n .map((s) => s.trim())\n .filter((s) => s.length > 0);\n}\n\n/**\n * Parse a date string to a Date object.\n *\n * @param input - The date string to parse\n * @returns The parsed Date object\n * @throws TypeError if input is not a valid date\n */\nexport function dateParser(input: string): Date {\n const date = new Date(input);\n if (Number.isNaN(date.getTime())) {\n throw new TypeError(\n `Invalid date: ${input}. Try using the ISO 8601 format (YYYY-MM-DDTHH:MM:SS.SSSZ)`,\n );\n }\n return date;\n}\n"],"mappings":"uFAAA,OAAS,gBAAAA,EAAc,gBAAAC,MAAoB,gBAC3C,OAAS,wBAAAC,MAA4B,8BCDrC,OAAS,aAAAC,EAAW,oBAAAC,MAAwB,8BCOrC,SAASC,EAAWC,EAAuB,CAGhD,GAAI,CADF,6EACa,KAAKA,CAAK,EACvB,MAAM,IAAI,MAAM,wBAAwBA,CAAK,EAAE,EAEjD,OAAOA,CACT,CASO,SAASC,EAAUD,EAAuB,CAC/C,GAAI,CAEF,OADY,IAAI,IAAIA,CAAK,EACd,SAAS,EAAE,QAAQ,MAAO,EAAE,CACzC,MAAQ,CACN,MAAM,IAAI,MAAM,uBAAuBA,CAAK,EAAE,CAChD,CACF,CASO,SAASE,EAAYF,EAAyB,CACnD,OAAOA,EACJ,MAAM,GAAG,EACT,IAAKG,GAAMA,EAAE,KAAK,CAAC,EACnB,OAAQA,GAAMA,EAAE,OAAS,CAAC,CAC/B,CASO,SAASC,EAAWJ,EAAqB,CAC9C,IAAMK,EAAO,IAAI,KAAKL,CAAK,EAC3B,GAAI,OAAO,MAAMK,EAAK,QAAQ,CAAC,EAC7B,MAAM,IAAI,UACR,iBAAiBL,CAAK,4DACxB,EAEF,OAAOK,CACT,CD3CO,IAAMC,EAAsB,CAAC,CAClC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,MACE,uEACF,SAAU,EACZ,EACA,iBAAkB,CAChB,KAAM,SACN,MAAO,OACP,SAAU,IACV,MAAO,yCACP,SAAU,EACZ,EACA,gBAAiB,CACf,KAAM,OACN,OAAQ,OAAO,OAAON,CAAoB,EAC1C,SAAU,IACV,MACE,mFACF,SAAU,EACZ,EACA,SAAU,CACR,KAAM,SACN,MAAOO,EACP,MAAO,oDACP,QAAS,IACX,EACA,eAAgB,CACd,KAAM,UACN,MACE,qEACF,QAAS,EACX,EACA,kBAAmB,CACjB,KAAM,UACN,MACE,wEACF,QAAS,EACX,EACA,yBAA0B,CACxB,KAAM,UACN,MACE,oFACF,QAAS,EACX,EACA,MAAO,CACL,KAAM,UACN,MACE,oEACF,QAAS,EACX,CACF,CACF,EACA,KAAM,CACJ,MAAO,kDACP,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sGAQnB,CACF,CAAC","names":["buildCommand","numberParser","ConsentTrackerStatus","ScopeName","TRANSCEND_SCOPES","uuidParser","input","urlParser","arrayParser","s","dateParser","date","createAuthParameter","scopes","requiresSiloScope","parameter","TRANSCEND_SCOPES","ScopeName","s","createTranscendUrlParameter","defaultUrl","DEFAULT_TRANSCEND_API","urlParser","createConsentUrlParameter","DEFAULT_TRANSCEND_CONSENT_API","createSombraAuthParameter","DEFAULT_TRANSCEND_PULL_RESOURCES","DEFAULT_CONSENT_TRACKER_STATUSES","ConsentTrackerStatus","pullCommand","buildCommand","pull","createAuthParameter","TranscendPullResource","createTranscendUrlParameter","numberParser"]}
|
package/dist/chunk-KRN6Q433.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import{_b as S,a as w,f as $,i as B,j as T,l as R}from"./chunk-TDBKATQK.js";import{a as i}from"./chunk-43JWXG77.js";import{keyBy as O,uniq as A,chunk as U,sortBy as G}from"lodash-es";import{SubDataPointDataSubCategoryGuessStatus as _}from"@transcend-io/privacy-types";import h from"cli-progress";import{gql as L}from"graphql-request";import f from"colors";async function q(u,{dataSiloIds:e=[],includeGuessedCategories:l,includeAttributes:a,parentCategories:c=[],subCategories:t=[],pageSize:p=1e3}={}){let n=[],m=new Date().getTime(),d=new h.SingleBar({},h.Presets.shades_classic),s={...c.length>0?{category:c}:{},...t.length>0?{subCategoryIds:t}:{},...c.length+t.length>0&&!l?{status:_.Approved}:{},...e.length>0?{dataSilos:e}:{}},{subDataPoints:{totalCount:o}}=await S(u,$,{filterBy:s});i.info(f.magenta("[Step 1/3] Pulling in all subdatapoints")),d.start(o,0);let y=0,D=!1,r,b=0;do try{let{subDataPoints:{nodes:P}}=await S(u,L`
|
|
2
|
-
query TranscendCliSubDataPointCsvExport(
|
|
3
|
-
$filterBy: SubDataPointFiltersInput
|
|
4
|
-
$first: Int!
|
|
5
|
-
$offset: Int!
|
|
6
|
-
) {
|
|
7
|
-
subDataPoints(
|
|
8
|
-
filterBy: $filterBy
|
|
9
|
-
first: $first
|
|
10
|
-
offset: $offset
|
|
11
|
-
useMaster: false
|
|
12
|
-
) {
|
|
13
|
-
nodes {
|
|
14
|
-
id
|
|
15
|
-
name
|
|
16
|
-
description
|
|
17
|
-
dataPointId
|
|
18
|
-
dataSiloId
|
|
19
|
-
purposes {
|
|
20
|
-
name
|
|
21
|
-
purpose
|
|
22
|
-
}
|
|
23
|
-
categories {
|
|
24
|
-
name
|
|
25
|
-
category
|
|
26
|
-
}
|
|
27
|
-
${l?`pendingCategoryGuesses {
|
|
28
|
-
category {
|
|
29
|
-
name
|
|
30
|
-
category
|
|
31
|
-
}
|
|
32
|
-
status
|
|
33
|
-
classifierVersion
|
|
34
|
-
}`:""}
|
|
35
|
-
${a?`attributeValues {
|
|
36
|
-
attributeKey {
|
|
37
|
-
name
|
|
38
|
-
}
|
|
39
|
-
name
|
|
40
|
-
}`:""}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
`,{first:p,offset:b,filterBy:{...s}});r=P[P.length-1]?.id,n.push(...P),D=P.length===p,y+=P.length,b+=P.length,d.update(y)}catch(P){throw i.error(f.red(`An error fetching subdatapoints for cursor ${r} and offset ${b}`)),P}while(D);d.stop();let C=new Date().getTime()-m,g=G(n,"name");return i.info(f.green(`Successfully pulled in ${g.length} subdatapoints in ${C/1e3} seconds!`)),g}async function F(u,{dataPointIds:e=[],pageSize:l=100}){let a=[],c=new Date().getTime(),t=new h.SingleBar({},h.Presets.shades_classic);i.info(f.magenta(`[Step 2/3] Fetching metadata for ${e.length} datapoints`));let p=U(e,l);t.start(e.length,0);let n=0;await w(p,async s=>{try{let{dataPoints:{nodes:o}}=await S(u,B,{first:l,filterBy:{ids:s}});a.push(...o),n+=s.length,t.update(n)}catch(o){throw i.error(f.red(`An error fetching subdatapoints for IDs ${s.join(", ")}`)),o}}),t.stop();let d=new Date().getTime()-c;return i.info(f.green(`Successfully pulled in ${a.length} dataPoints in ${d/1e3} seconds!`)),a}async function Q(u,{dataSiloIds:e=[],pageSize:l=100}){let a=[],c=new Date().getTime(),t=new h.SingleBar({},h.Presets.shades_classic);i.info(f.magenta(`[Step 3/3] Fetching metadata for ${e.length} data silos`));let p=U(e,l);t.start(e.length,0);let n=0;await w(p,async s=>{try{let{dataSilos:{nodes:o}}=await S(u,R,{first:l,filterBy:{ids:s}});a.push(...o),n+=s.length,t.update(n)}catch(o){throw i.error(f.red(`An error fetching data silos for IDs ${s.join(", ")}`)),o}}),t.stop();let d=new Date().getTime()-c;return i.info(f.green(`Successfully pulled in ${a.length} data silos in ${d/1e3} seconds!`)),a}async function H(u,{dataSiloIds:e=[],includeGuessedCategories:l,includeAttributes:a,parentCategories:c=[],subCategories:t=[],pageSize:p=1e3}={}){let n=await q(u,{dataSiloIds:e,includeGuessedCategories:l,includeAttributes:a,parentCategories:c,subCategories:t,pageSize:p}),m=A(n.map(r=>r.dataPointId)),d=await F(u,{dataPointIds:m}),s=O(d,"id"),o=A(n.map(r=>r.dataSiloId)),y=await Q(u,{dataSiloIds:o}),D=O(y,"id");return n.map(r=>({...r,dataPoint:s[r.dataPointId],dataSilo:D[r.dataSiloId]}))}import x from"cli-progress";import v from"colors";import{gql as E}from"graphql-request";import{sortBy as V}from"lodash-es";async function st(u,{dataSiloIds:e=[],status:l,subCategories:a=[],includeEncryptedSnippets:c,pageSize:t=100}={}){let p=[],n=new Date().getTime(),m=new x.SingleBar({},x.Presets.shades_classic),d={...a.length>0?{subCategoryIds:a}:{},...l?{status:l}:{},...e.length>0?{dataSilos:e}:{}},{unstructuredSubDataPointRecommendations:{totalCount:s}}=await S(u,T,{filterBy:d});i.info(v.magenta("[Step 1/3] Pulling in all subdatapoints")),m.start(s,0);let o=0,y=!1,D,r=0;do try{let{unstructuredSubDataPointRecommendations:{nodes:g}}=await S(u,E`
|
|
45
|
-
query TranscendCliUnstructuredSubDataPointRecommendationCsvExport(
|
|
46
|
-
$filterBy: UnstructuredSubDataPointRecommendationsFilterInput
|
|
47
|
-
$first: Int!
|
|
48
|
-
$offset: Int!
|
|
49
|
-
) {
|
|
50
|
-
unstructuredSubDataPointRecommendations(
|
|
51
|
-
filterBy: $filterBy
|
|
52
|
-
first: $first
|
|
53
|
-
offset: $offset
|
|
54
|
-
useMaster: false
|
|
55
|
-
) {
|
|
56
|
-
nodes {
|
|
57
|
-
id
|
|
58
|
-
dataSiloId
|
|
59
|
-
scannedObjectPathId
|
|
60
|
-
scannedObjectId
|
|
61
|
-
${c?"name":""}
|
|
62
|
-
${c?"contextSnippet":""}
|
|
63
|
-
dataSubCategory {
|
|
64
|
-
name
|
|
65
|
-
category
|
|
66
|
-
}
|
|
67
|
-
status
|
|
68
|
-
confidence
|
|
69
|
-
classificationMethod
|
|
70
|
-
classifierVersion
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
`,{first:t,offset:r,filterBy:{...d}});D=g[g.length-1]?.id,p.push(...g),y=g.length===t,o+=g.length,r+=g.length,m.update(o)}catch(g){throw i.error(v.red(`An error fetching subdatapoints for cursor ${D} and offset ${r}`)),g}while(y);m.stop();let I=new Date().getTime()-n,C=V(p,"name");return i.info(v.green(`Successfully pulled in ${C.length} subdatapoints in ${I/1e3} seconds!`)),C}export{H as a,st as b};
|
|
75
|
-
//# sourceMappingURL=chunk-KRN6Q433.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/data-inventory/pullAllDatapoints.ts","../src/lib/data-inventory/pullUnstructuredSubDataPointRecommendations.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport { keyBy, uniq, chunk, sortBy } from 'lodash-es';\nimport {\n type DataCategoryType,\n SubDataPointDataSubCategoryGuessStatus,\n} from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport { gql } from 'graphql-request';\nimport colors from 'colors';\nimport type { GraphQLClient } from 'graphql-request';\nimport {\n DATAPOINT_EXPORT,\n DATA_SILO_EXPORT,\n type DataSiloAttributeValue,\n SUB_DATA_POINTS_COUNT,\n makeGraphQLRequest,\n} from '../graphql';\nimport { logger } from '../../logger';\nimport type { DataCategoryInput, ProcessingPurposeInput } from '../../codecs';\nimport { mapSeries } from '@/lib/bluebird-replace';\n\nexport interface DataSiloCsvPreview {\n /** ID of dataSilo */\n id: string;\n /** Name of dataSilo */\n title: string;\n}\n\nexport interface DataPointCsvPreview {\n /** ID of dataPoint */\n id: string;\n /** The path to this data point */\n path: string[];\n /** Description */\n description: {\n /** Default message */\n defaultMessage: string;\n };\n /** Name */\n name: string;\n}\n\nexport interface SubDataPointCsvPreview {\n /** ID of subDatapoint */\n id: string;\n /** Name (or key) of the subdatapoint */\n name: string;\n /** The description */\n description?: string;\n /** Personal data category */\n categories: DataCategoryInput[];\n /** Data point ID */\n dataPointId: string;\n /** The data silo ID */\n dataSiloId: string;\n /** The processing purpose for this sub datapoint */\n purposes: ProcessingPurposeInput[];\n /** Attribute attached to subdatapoint */\n attributeValues?: DataSiloAttributeValue[];\n /** Data category guesses that are output by the classifier */\n pendingCategoryGuesses?: {\n /** Data category being guessed */\n category: DataCategoryInput;\n /** Status of guess */\n status: SubDataPointDataSubCategoryGuessStatus;\n /** classifier version that produced the guess */\n classifierVersion: number;\n }[];\n}\n\nexport interface DatapointFilterOptions {\n /** IDs of data silos to filter down */\n dataSiloIds?: string[];\n /** Whether to include guessed categories, defaults to only approved categories */\n includeGuessedCategories?: boolean;\n /** Whether or not to include attributes */\n includeAttributes?: boolean;\n /** Parent categories to filter down for */\n parentCategories?: DataCategoryType[];\n /** Sub categories to filter down for */\n subCategories?: string[]; // TODO: https://transcend.height.app/T-40482 - do by name not ID\n}\n\n/**\n * Pull subdatapoint information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The subdatapoints\n */\nasync function pullSubDatapoints(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n includeGuessedCategories,\n includeAttributes,\n parentCategories = [],\n subCategories = [],\n pageSize = 1000,\n }: DatapointFilterOptions & {\n /** Page size to pull in */\n pageSize?: number;\n } = {},\n): Promise<SubDataPointCsvPreview[]> {\n const subDataPoints: SubDataPointCsvPreview[] = [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Filters\n const filterBy = {\n ...(parentCategories.length > 0 ? { category: parentCategories } : {}),\n ...(subCategories.length > 0 ? { subCategoryIds: subCategories } : {}),\n // if parentCategories or subCategories and not includeGuessedCategories\n ...(parentCategories.length + subCategories.length > 0 &&\n !includeGuessedCategories\n ? // then only show data points with approved data categories\n { status: SubDataPointDataSubCategoryGuessStatus.Approved }\n : {}),\n ...(dataSiloIds.length > 0 ? { dataSilos: dataSiloIds } : {}),\n };\n\n // Build a GraphQL client\n const {\n subDataPoints: { totalCount },\n } = await makeGraphQLRequest<{\n /** Query response */\n subDataPoints: {\n /** Count */\n totalCount: number;\n };\n }>(client, SUB_DATA_POINTS_COUNT, {\n filterBy,\n });\n\n logger.info(colors.magenta('[Step 1/3] Pulling in all subdatapoints'));\n\n progressBar.start(totalCount, 0);\n let total = 0;\n let shouldContinue = false;\n let cursor: string | undefined;\n let offset = 0;\n do {\n try {\n const {\n subDataPoints: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n subDataPoints: {\n /** List of matches */\n nodes: SubDataPointCsvPreview[];\n };\n }>(\n client,\n gql`\n query TranscendCliSubDataPointCsvExport(\n $filterBy: SubDataPointFiltersInput\n $first: Int!\n $offset: Int!\n ) {\n subDataPoints(\n filterBy: $filterBy\n first: $first\n offset: $offset\n useMaster: false\n ) {\n nodes {\n id\n name\n description\n dataPointId\n dataSiloId\n purposes {\n name\n purpose\n }\n categories {\n name\n category\n }\n ${\n includeGuessedCategories\n ? `pendingCategoryGuesses {\n category {\n name\n category\n }\n status\n classifierVersion\n }`\n : ''\n }\n ${\n includeAttributes\n ? `attributeValues {\n attributeKey {\n name\n }\n name\n }`\n : ''\n }\n }\n }\n }\n `,\n {\n first: pageSize,\n offset,\n filterBy: {\n ...filterBy,\n // TODO: https://transcend.height.app/T-40484 - add cursor support\n // ...(cursor ? { cursor: { id: cursor } } : {}),\n },\n },\n );\n\n cursor = nodes[nodes.length - 1]?.id as string;\n subDataPoints.push(...nodes);\n shouldContinue = nodes.length === pageSize;\n total += nodes.length;\n offset += nodes.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching subdatapoints for cursor ${cursor} and offset ${offset}`,\n ),\n );\n throw err;\n }\n } while (shouldContinue);\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n const sorted = sortBy(subDataPoints, 'name');\n\n logger.info(\n colors.green(\n `Successfully pulled in ${sorted.length} subdatapoints in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return sorted;\n}\n\n/**\n * Pull datapoint information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The datapoints\n */\nasync function pullDatapoints(\n client: GraphQLClient,\n {\n dataPointIds = [],\n pageSize = 100,\n }: {\n /** IDs of data points to filter down */\n dataPointIds: string[];\n /** Page size to pull in */\n pageSize?: number;\n },\n): Promise<DataPointCsvPreview[]> {\n const dataPoints: DataPointCsvPreview[] = [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n logger.info(\n colors.magenta(\n `[Step 2/3] Fetching metadata for ${dataPointIds.length} datapoints`,\n ),\n );\n\n // Group by 100\n const dataPointsGrouped = chunk(dataPointIds, pageSize);\n\n progressBar.start(dataPointIds.length, 0);\n let total = 0;\n await mapSeries(dataPointsGrouped, async (dataPointIdsGroup) => {\n try {\n const {\n dataPoints: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n dataPoints: {\n /** List of matches */\n nodes: DataPointCsvPreview[];\n };\n }>(client, DATAPOINT_EXPORT, {\n first: pageSize,\n filterBy: {\n ids: dataPointIdsGroup,\n },\n });\n\n dataPoints.push(...nodes);\n total += dataPointIdsGroup.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching subdatapoints for IDs ${dataPointIdsGroup.join(\n ', ',\n )}`,\n ),\n );\n throw err;\n }\n });\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully pulled in ${dataPoints.length} dataPoints in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return dataPoints;\n}\n\n/**\n * Pull data silo information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The data silos\n */\nasync function pullDataSilos(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n pageSize = 100,\n }: {\n /** IDs of data silos to filter down */\n dataSiloIds: string[];\n /** Page size to pull in */\n pageSize?: number;\n },\n): Promise<DataSiloCsvPreview[]> {\n const dataSilos: DataSiloCsvPreview[] = [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n logger.info(\n colors.magenta(\n `[Step 3/3] Fetching metadata for ${dataSiloIds.length} data silos`,\n ),\n );\n\n // Group by 100\n const dataSilosGrouped = chunk(dataSiloIds, pageSize);\n\n progressBar.start(dataSiloIds.length, 0);\n let total = 0;\n await mapSeries(dataSilosGrouped, async (dataSiloIdsGroup) => {\n try {\n const {\n dataSilos: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n dataSilos: {\n /** List of matches */\n nodes: DataSiloCsvPreview[];\n };\n }>(client, DATA_SILO_EXPORT, {\n first: pageSize,\n filterBy: {\n ids: dataSiloIdsGroup,\n },\n });\n\n dataSilos.push(...nodes);\n total += dataSiloIdsGroup.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching data silos for IDs ${dataSiloIdsGroup.join(', ')}`,\n ),\n );\n throw err;\n }\n });\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully pulled in ${dataSilos.length} data silos in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return dataSilos;\n}\n\n/**\n * Pull all datapoints from the data inventory.\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @returns The datapoints and data silos\n */\nexport async function pullAllDatapoints(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n includeGuessedCategories,\n includeAttributes,\n parentCategories = [],\n subCategories = [],\n pageSize = 1000,\n }: DatapointFilterOptions & {\n /** Page size to pull in */\n pageSize?: number;\n } = {},\n): Promise<\n (SubDataPointCsvPreview & {\n /** Data point information */\n dataPoint: DataPointCsvPreview;\n /** Data silo information */\n dataSilo: DataSiloCsvPreview;\n })[]\n> {\n // Subdatapoint information\n const subDatapoints = await pullSubDatapoints(client, {\n dataSiloIds,\n includeGuessedCategories,\n includeAttributes,\n parentCategories,\n subCategories,\n pageSize,\n });\n\n // The datapoint ids to grab\n const dataPointIds = uniq(subDatapoints.map((point) => point.dataPointId));\n const dataPoints = await pullDatapoints(client, {\n dataPointIds,\n });\n const dataPointById = keyBy(dataPoints, 'id');\n\n // The data silo IDs to grab\n const allDataSiloIds = uniq(subDatapoints.map((point) => point.dataSiloId));\n const dataSilos = await pullDataSilos(client, {\n dataSiloIds: allDataSiloIds,\n });\n const dataSiloById = keyBy(dataSilos, 'id');\n\n return subDatapoints.map((subDataPoint) => ({\n ...subDataPoint,\n dataPoint: dataPointById[subDataPoint.dataPointId],\n dataSilo: dataSiloById[subDataPoint.dataSiloId],\n }));\n}\n/* eslint-enable max-lines */\n","import type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\nimport { gql, type GraphQLClient } from 'graphql-request';\nimport { sortBy } from 'lodash-es';\nimport type { DataCategoryInput } from '../../codecs';\nimport { ENTRY_COUNT, makeGraphQLRequest } from '../graphql';\nimport { logger } from '../../logger';\n\ninterface UnstructuredSubDataPointRecommendationCsvPreview {\n /** ID of subDatapoint */\n id: string;\n /** Entry or Named Entity recognized by the classifier */\n name: string;\n /** Context snippet including entry */\n contextSnippet: string;\n /** Scanned object ID */\n scannedObjectId: string;\n /** Scanned object path ID */\n scannedObjectPathId: string;\n /** The data silo ID */\n dataSiloId: string;\n /** Personal data category */\n dataSubCategory: DataCategoryInput;\n /** Classification Status */\n status: UnstructuredSubDataPointRecommendationStatus;\n /** Confidence */\n confidence: number;\n /** Classification method */\n classificationMethod: string;\n /** Classifier version */\n classifierVersion: string;\n}\n\ninterface EntryFilterOptions {\n /** IDs of data silos to filter down */\n dataSiloIds?: string[];\n /** Parent categories to filter down for */\n status?: UnstructuredSubDataPointRecommendationStatus[];\n /** Sub categories to filter down for */\n subCategories?: string[]; // TODO: https://transcend.height.app/T-40482 - do by name not ID\n /** Include entry and snippet */\n includeEncryptedSnippets?: boolean;\n /** Include encryptedSamplesS3Key */\n includeEncryptedSamplesS3Key?: boolean;\n}\n/**\n * Pull unstructured subdatapoint information\n *\n * @param client - Client to use for the request\n * @param options - Options\n * @param options.dataSiloIds - IDs of data silos to filter down\n * @param options.status - Parent categories to filter down for\n * @param options.subCategories - Sub categories to filter down for\n * @param options.includeEncryptedSnippets - Include entry and snippet\n * @param options.includeEncryptedSamplesS3Key - Include encryptedSamplesS3Key\n * @param options.pageSize - Page size to pull in\n * @returns A promise that resolves to an array of unstructured subdatapoint recommendations\n */\nexport async function pullUnstructuredSubDataPointRecommendations(\n client: GraphQLClient,\n {\n dataSiloIds = [],\n status,\n subCategories = [],\n includeEncryptedSnippets,\n pageSize = 100,\n }: EntryFilterOptions & {\n /** Page size to pull in */\n pageSize?: number;\n } = {},\n): Promise<UnstructuredSubDataPointRecommendationCsvPreview[]> {\n const unstructuredSubDataPointRecommendations: UnstructuredSubDataPointRecommendationCsvPreview[] =\n [];\n\n // Time duration\n const t0 = new Date().getTime();\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Filters\n const filterBy = {\n ...(subCategories.length > 0 ? { subCategoryIds: subCategories } : {}),\n ...(status ? { status } : {}),\n ...(dataSiloIds.length > 0 ? { dataSilos: dataSiloIds } : {}),\n };\n\n // Build a GraphQL client\n const {\n unstructuredSubDataPointRecommendations: { totalCount },\n } = await makeGraphQLRequest<{\n /** Query response */\n unstructuredSubDataPointRecommendations: {\n /** Count */\n totalCount: number;\n };\n }>(client, ENTRY_COUNT, {\n filterBy,\n });\n\n logger.info(colors.magenta('[Step 1/3] Pulling in all subdatapoints'));\n\n progressBar.start(totalCount, 0);\n let total = 0;\n let shouldContinue = false;\n let cursor: string | undefined;\n let offset = 0;\n do {\n try {\n const {\n unstructuredSubDataPointRecommendations: { nodes },\n } = await makeGraphQLRequest<{\n /** Query response */\n unstructuredSubDataPointRecommendations: {\n /** List of matches */\n nodes: UnstructuredSubDataPointRecommendationCsvPreview[];\n };\n }>(\n client,\n gql`\n query TranscendCliUnstructuredSubDataPointRecommendationCsvExport(\n $filterBy: UnstructuredSubDataPointRecommendationsFilterInput\n $first: Int!\n $offset: Int!\n ) {\n unstructuredSubDataPointRecommendations(\n filterBy: $filterBy\n first: $first\n offset: $offset\n useMaster: false\n ) {\n nodes {\n id\n dataSiloId\n scannedObjectPathId\n scannedObjectId\n ${includeEncryptedSnippets ? 'name' : ''}\n ${includeEncryptedSnippets ? 'contextSnippet' : ''}\n dataSubCategory {\n name\n category\n }\n status\n confidence\n classificationMethod\n classifierVersion\n }\n }\n }\n `,\n {\n first: pageSize,\n offset,\n filterBy: {\n ...filterBy,\n },\n },\n );\n\n cursor = nodes[nodes.length - 1]?.id as string;\n unstructuredSubDataPointRecommendations.push(...nodes);\n shouldContinue = nodes.length === pageSize;\n total += nodes.length;\n offset += nodes.length;\n progressBar.update(total);\n } catch (err) {\n logger.error(\n colors.red(\n `An error fetching subdatapoints for cursor ${cursor} and offset ${offset}`,\n ),\n );\n throw err;\n }\n } while (shouldContinue);\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n const sorted = sortBy(unstructuredSubDataPointRecommendations, 'name');\n\n logger.info(\n colors.green(\n `Successfully pulled in ${sorted.length} subdatapoints in ${\n totalTime / 1000\n } seconds!`,\n ),\n );\n return sorted;\n}\n"],"mappings":"oHACA,OAAS,SAAAA,EAAO,QAAAC,EAAM,SAAAC,EAAO,UAAAC,MAAc,YAC3C,OAEE,0CAAAC,MACK,8BACP,OAAOC,MAAiB,eACxB,OAAS,OAAAC,MAAW,kBACpB,OAAOC,MAAY,SAkFnB,eAAeC,EACbC,EACA,CACE,YAAAC,EAAc,CAAC,EACf,yBAAAC,EACA,kBAAAC,EACA,iBAAAC,EAAmB,CAAC,EACpB,cAAAC,EAAgB,CAAC,EACjB,SAAAC,EAAW,GACb,EAGI,CAAC,EAC8B,CACnC,IAAMC,EAA0C,CAAC,EAG3CC,EAAK,IAAI,KAAK,EAAE,QAAQ,EAGxBC,EAAc,IAAIC,EAAY,UAClC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,CAAC,EAErEP,EAAY,MAAMG,EAAY,CAAC,EAC/B,IAAIK,EAAQ,EACRC,EAAiB,GACjBC,EACAC,EAAS,EACb,EACE,IAAI,CACF,GAAM,CACJ,wCAAyC,CAAE,MAAAC,CAAM,CACnD,EAAI,MAAMR,EAORZ,EACAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAiBUjB,EAA2B,OAAS,EAAE;AAAA,kBACtCA,EAA2B,iBAAmB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,UAa1D,CACE,MAAOC,EACP,OAAAc,EACA,SAAU,CACR,GAAGT,CACL,CACF,CACF,EAEAQ,EAASE,EAAMA,EAAM,OAAS,CAAC,GAAG,GAClCd,EAAwC,KAAK,GAAGc,CAAK,EACrDH,EAAiBG,EAAM,SAAWf,EAClCW,GAASI,EAAM,OACfD,GAAUC,EAAM,OAChBZ,EAAY,OAAOQ,CAAK,CAC1B,OAASM,EAAK,CACZ,MAAAR,EAAO,MACLC,EAAO,IACL,8CAA8CG,CAAM,eAAeC,CAAM,EAC3E,CACF,EACMG,CACR,OACOL,GAETT,EAAY,KAAK,EAEjB,IAAMe,EADK,IAAI,KAAK,EAAE,QAAQ,EACPhB,EAEjBiB,EAASC,EAAOnB,EAAyC,MAAM,EAErE,OAAAQ,EAAO,KACLC,EAAO,MACL,0BAA0BS,EAAO,MAAM,qBACrCD,EAAY,GACd,WACF,CACF,EACOC,CACT","names":["keyBy","uniq","chunk","sortBy","SubDataPointDataSubCategoryGuessStatus","cliProgress","gql","colors","pullSubDatapoints","client","dataSiloIds","includeGuessedCategories","includeAttributes","parentCategories","subCategories","pageSize","subDataPoints","t0","progressBar","cliProgress","filterBy","SubDataPointDataSubCategoryGuessStatus","totalCount","makeGraphQLRequest","SUB_DATA_POINTS_COUNT","logger","colors","total","shouldContinue","cursor","offset","nodes","gql","err","totalTime","sorted","sortBy","pullDatapoints","dataPointIds","dataPoints","dataPointsGrouped","chunk","mapSeries","dataPointIdsGroup","DATAPOINT_EXPORT","pullDataSilos","dataSilos","dataSilosGrouped","dataSiloIdsGroup","DATA_SILO_EXPORT","pullAllDatapoints","subDatapoints","uniq","point","dataPointById","keyBy","allDataSiloIds","dataSiloById","subDataPoint","cliProgress","colors","gql","sortBy","pullUnstructuredSubDataPointRecommendations","client","dataSiloIds","status","subCategories","includeEncryptedSnippets","pageSize","unstructuredSubDataPointRecommendations","t0","progressBar","cliProgress","filterBy","totalCount","makeGraphQLRequest","ENTRY_COUNT","logger","colors","total","shouldContinue","cursor","offset","nodes","gql","err","totalTime","sorted","sortBy"]}
|
package/dist/chunk-L5ULN3IT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ScopeName as e}from"@transcend-io/privacy-types";var r="transcend",s="https://app.transcend.io",c=`${s}/infrastructure/integrations`,p=`${s}/data-map/data-inventory/data-points`,g=process.env.TRANSCEND_API_URL||"https://api.transcend.io",l=process.env.TRANSCEND_CONSENT_API_URL||"https://consent.transcend.io",m={apiKeys:[e.ViewApiKeys],templates:[e.ManageEmailTemplates],dataSilos:[e.ManageDataMap,e.ConnectDataSilos],enrichers:[e.ManageRequestIdentities],businessEntities:[e.ManageDataInventory],identifiers:[e.ManageRequestIdentities],customFields:[e.ManageGlobalAttributes],dataFlows:[e.ManageDataFlow],cookies:[e.ManageDataFlow],consentManager:[e.ManageConsentManagerDeveloperSettings],partitions:[e.ManageConsentManagerDeveloperSettings],actions:[e.ManageDataSubjectRequestSettings],dataSubjects:[e.ManageDataSubjectRequestSettings],prompts:[e.ManagePrompts],promptPartials:[e.ManagePrompts],promptGroups:[e.ManagePrompts],agents:[e.ManagePathfinder],agentFunctions:[e.ManagePathfinder],agentFiles:[e.ManagePathfinder],vendors:[e.ManageDataInventory],dataCategories:[e.ManageDataInventory],processingPurposes:[e.ManageDataInventory],actionItems:[e.ManageAllActionItems,e.ViewGlobalAttributes],actionItemCollections:[e.ManageActionItemCollections],teams:[e.ManageAccessControl],messages:[e.ManageIntlMessages],privacyCenters:[e.ManagePrivacyCenter],policies:[e.ManagePolicies],assessments:[e.ManageAssessments],assessmentTemplates:[e.ManageAssessments],purposes:[e.ManageConsentManager,e.ManagePreferenceStoreSettings]},A={apiKeys:[e.ViewApiKeys],templates:[e.ViewEmailTemplates],dataSilos:[e.ViewDataMap,e.ViewDataSubjectRequestSettings],enrichers:[e.ViewRequestIdentitySettings],businessEntities:[e.ViewDataInventory],identifiers:[e.ViewRequestIdentitySettings],customFields:[e.ViewGlobalAttributes],dataFlows:[e.ViewDataFlow],cookies:[e.ViewDataFlow],consentManager:[e.ViewConsentManager],partitions:[e.ViewConsentManager],actions:[e.ViewDataSubjectRequestSettings],dataSubjects:[e.ViewDataSubjectRequestSettings],prompts:[e.ViewPrompts],promptPartials:[e.ViewPrompts],promptGroups:[e.ViewPrompts],agents:[e.ViewPathfinder],agentFunctions:[e.ViewPathfinder],agentFiles:[e.ViewPathfinder],vendors:[e.ViewDataInventory],dataCategories:[e.ViewDataInventory],processingPurposes:[e.ViewDataInventory],actionItemCollections:[e.ViewAllActionItems],actionItems:[e.ViewAllActionItems],teams:[e.ViewScopes],messages:[e.ViewIntlMessages],privacyCenters:[e.ViewPrivacyCenter],policies:[e.ViewPolicies],assessments:[e.ViewAssessments],assessmentTemplates:[e.ViewAssessments],purposes:[e.ViewConsentManager,e.ViewPreferenceStoreSettings]},P={apiKeys:"api-keys",customFields:"attributes",dataFlows:"data-flows",cookies:"cookies",consentManager:"consent-manager",partitions:"partitions",actions:"actions",dataSubjects:"data-subjects",businessEntities:"business-entities",identifiers:"identifiers",enrichers:"enrichers",dataSilos:"data-silos",templates:"templates",prompts:"prompts",promptPartials:"prompt-partials",promptGroups:"prompt-groups",agents:"agents",agentFunctions:"agent-functions",agentFiles:"agent-files",vendors:"vendors",dataCategories:"data-categories",processingPurposes:"processing-purposes",actionItems:"action-items",actionItemCollections:"action-item-collections",teams:"teams",messages:"messages",privacyCenters:"privacy-center",policies:"policies",assessments:"assessments",assessmentTemplates:"assessment-templates",purposes:"purposes"};export{r as a,s as b,c,p as d,g as e,l as f,m as g,A as h,P as i};
|
|
2
|
-
//# sourceMappingURL=chunk-L5ULN3IT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["import { ScopeName } from '@transcend-io/privacy-types';\nimport { TranscendPullResource } from './enums';\nimport { TranscendInput } from './codecs';\n\nexport { description, version } from '../package.json';\nexport const name = 'transcend';\n\nexport const ADMIN_DASH = 'https://app.transcend.io';\n\nexport const ADMIN_DASH_INTEGRATIONS = `${ADMIN_DASH}/infrastructure/integrations`;\nexport const ADMIN_DASH_DATAPOINTS = `${ADMIN_DASH}/data-map/data-inventory/data-points`;\n\n/**\n * Override default transcend API url using\n * TRANSCEND_API_URL=https://api.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_API =\n process.env.TRANSCEND_API_URL || 'https://api.transcend.io';\n\n/**\n * Override default transcend API url using\n * TRANSCEND_CONSENT_API_URL=https://consent.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_CONSENT_API =\n process.env.TRANSCEND_CONSENT_API_URL || 'https://consent.transcend.io';\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PUSH_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ManageEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ManageDataMap,\n ScopeName.ConnectDataSilos,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.Attributes]: [ScopeName.ManageGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.ConsentManager]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Partitions]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Actions]: [ScopeName.ManageDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ManageDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ManagePrompts],\n [TranscendPullResource.Agents]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ActionItems]: [\n ScopeName.ManageAllActionItems,\n ScopeName.ViewGlobalAttributes,\n ],\n [TranscendPullResource.ActionItemCollections]: [\n ScopeName.ManageActionItemCollections,\n ],\n [TranscendPullResource.Teams]: [ScopeName.ManageAccessControl],\n [TranscendPullResource.Messages]: [ScopeName.ManageIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ManagePrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ManagePolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ManageAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ManageAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ManageConsentManager,\n ScopeName.ManagePreferenceStoreSettings,\n ],\n};\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PULL_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ViewEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ViewDataMap,\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.Attributes]: [ScopeName.ViewGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.ConsentManager]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Partitions]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Actions]: [ScopeName.ViewDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ViewPrompts],\n [TranscendPullResource.Agents]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ActionItemCollections]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.ActionItems]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.Teams]: [ScopeName.ViewScopes],\n [TranscendPullResource.Messages]: [ScopeName.ViewIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ViewPrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ViewPolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ViewAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ViewAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ViewConsentManager,\n ScopeName.ViewPreferenceStoreSettings,\n ],\n};\n\nexport const TR_YML_RESOURCE_TO_FIELD_NAME: Record<\n TranscendPullResource,\n keyof TranscendInput\n> = {\n [TranscendPullResource.ApiKeys]: 'api-keys',\n [TranscendPullResource.Attributes]: 'attributes',\n [TranscendPullResource.DataFlows]: 'data-flows',\n [TranscendPullResource.Cookies]: 'cookies',\n [TranscendPullResource.ConsentManager]: 'consent-manager',\n [TranscendPullResource.Partitions]: 'partitions',\n [TranscendPullResource.Actions]: 'actions',\n [TranscendPullResource.DataSubjects]: 'data-subjects',\n [TranscendPullResource.BusinessEntities]: 'business-entities',\n [TranscendPullResource.Identifiers]: 'identifiers',\n [TranscendPullResource.Enrichers]: 'enrichers',\n [TranscendPullResource.DataSilos]: 'data-silos',\n [TranscendPullResource.Templates]: 'templates',\n [TranscendPullResource.Prompts]: 'prompts',\n [TranscendPullResource.PromptPartials]: 'prompt-partials',\n [TranscendPullResource.PromptGroups]: 'prompt-groups',\n [TranscendPullResource.Agents]: 'agents',\n [TranscendPullResource.AgentFunctions]: 'agent-functions',\n [TranscendPullResource.AgentFiles]: 'agent-files',\n [TranscendPullResource.Vendors]: 'vendors',\n [TranscendPullResource.DataCategories]: 'data-categories',\n [TranscendPullResource.ProcessingPurposes]: 'processing-purposes',\n [TranscendPullResource.ActionItems]: 'action-items',\n [TranscendPullResource.ActionItemCollections]: 'action-item-collections',\n [TranscendPullResource.Teams]: 'teams',\n [TranscendPullResource.Messages]: 'messages',\n [TranscendPullResource.PrivacyCenters]: 'privacy-center',\n [TranscendPullResource.Policies]: 'policies',\n [TranscendPullResource.Assessments]: 'assessments',\n [TranscendPullResource.AssessmentTemplates]: 'assessment-templates',\n [TranscendPullResource.Purposes]: 'purposes',\n};\n"],"mappings":"AAAA,OAAS,aAAAA,MAAiB,8BAKnB,IAAMC,EAAO,YAEPC,EAAa,2BAEbC,EAA0B,GAAGD,CAAU,+BACvCE,EAAwB,GAAGF,CAAU,uCAMrCG,EACX,QAAQ,IAAI,mBAAqB,2BAMtBC,EACX,QAAQ,IAAI,2BAA6B,+BAK9BC,EAET,CACD,QAAgC,CAACC,EAAU,WAAW,EACtD,UAAkC,CAACA,EAAU,oBAAoB,EACjE,UAAkC,CACjCA,EAAU,cACVA,EAAU,gBACZ,EACC,UAAkC,CAACA,EAAU,uBAAuB,EACpE,iBAAyC,CAACA,EAAU,mBAAmB,EACvE,YAAoC,CAACA,EAAU,uBAAuB,EACtE,aAAmC,CAACA,EAAU,sBAAsB,EACpE,UAAkC,CAACA,EAAU,cAAc,EAC3D,QAAgC,CAACA,EAAU,cAAc,EACzD,eAAuC,CACtCA,EAAU,qCACZ,EACC,WAAmC,CAClCA,EAAU,qCACZ,EACC,QAAgC,CAACA,EAAU,gCAAgC,EAC3E,aAAqC,CACpCA,EAAU,gCACZ,EACC,QAAgC,CAACA,EAAU,aAAa,EACxD,eAAuC,CAACA,EAAU,aAAa,EAC/D,aAAqC,CAACA,EAAU,aAAa,EAC7D,OAA+B,CAACA,EAAU,gBAAgB,EAC1D,eAAuC,CAACA,EAAU,gBAAgB,EAClE,WAAmC,CAACA,EAAU,gBAAgB,EAC9D,QAAgC,CAACA,EAAU,mBAAmB,EAC9D,eAAuC,CAACA,EAAU,mBAAmB,EACrE,mBAA2C,CAACA,EAAU,mBAAmB,EACzE,YAAoC,CACnCA,EAAU,qBACVA,EAAU,oBACZ,EACC,sBAA8C,CAC7CA,EAAU,2BACZ,EACC,MAA8B,CAACA,EAAU,mBAAmB,EAC5D,SAAiC,CAACA,EAAU,kBAAkB,EAC9D,eAAuC,CAACA,EAAU,mBAAmB,EACrE,SAAiC,CA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ChC,aAAmC,aACnC,UAAkC,aAClC,QAAgC,UAChC,eAAuC,kBACvC,WAAmC,aACnC,QAAgC,UAChC,aAAqC,gBACrC,iBAAyC,oBACzC,YAAoC,cACpC,UAAkC,YAClC,UAAkC,aAClC,UAAkC,YAClC,QAAgC,UAChC,eAAuC,kBACvC,aAAqC,gBACrC,OAA+B,SAC/B,eAAuC,kBACvC,WAAmC,cACnC,QAAgC,UAChC,eAAuC,kBACvC,mBAA2C,sBAC3C,YAAoC,eACpC,sBAA8C,0BAC9C,MAA8B,QAC9B,SAAiC,WACjC,eAAuC,iBACvC,SAAiC,WACjC,YAAoC,cACpC,oBAA4C,uBAC5C,SAAiC,UACpC","names":["ScopeName","name","ADMIN_DASH","ADMIN_DASH_INTEGRATIONS","ADMIN_DASH_DATAPOINTS","DEFAULT_TRANSCEND_API","DEFAULT_TRANSCEND_CONSENT_API","TR_PUSH_RESOURCE_SCOPE_MAP","ScopeName","TR_PULL_RESOURCE_SCOPE_MAP","TR_YML_RESOURCE_TO_FIELD_NAME"]}
|
package/dist/chunk-L7ZIX4SU.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{getEntries as c}from"@transcend-io/type-utils";function o(s,...e){let n=JSON.parse(JSON.stringify(s));return e.forEach(a=>{c(a).forEach(([r,t])=>{n[r]===void 0?n[r]=t:Array.isArray(t)?n[r]=[...n[r],...t]:n[r]=t})}),n}export{o as a};
|
|
2
|
-
//# sourceMappingURL=chunk-L7ZIX4SU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/mergeTranscendInputs.ts"],"sourcesContent":["import { TranscendInput } from '../codecs';\nimport { getEntries } from '@transcend-io/type-utils';\n\n/**\n * Combine a set of TranscendInput yaml files into a single yaml\n *\n * @param base - Base input\n * @param inputs - The list of inputs\n * @returns Merged input\n */\nexport function mergeTranscendInputs(\n base: TranscendInput,\n ...inputs: TranscendInput[]\n): TranscendInput {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const cloned: any = JSON.parse(JSON.stringify(base));\n inputs.forEach((input) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntries(input).forEach(([key, value]: [any, any]) => {\n if (cloned[key] === undefined) {\n cloned[key] = value;\n } else if (Array.isArray(value)) {\n cloned[key] = [...cloned[key], ...value];\n } else {\n cloned[key] = value;\n }\n });\n });\n return cloned;\n}\n"],"mappings":"AACA,OAAS,cAAAA,MAAkB,2BASpB,SAASC,EACdC,KACGC,EACa,CAEhB,IAAMC,EAAc,KAAK,MAAM,KAAK,UAAUF,CAAI,CAAC,EACnD,OAAAC,EAAO,QAASE,GAAU,CAExBL,EAAWK,CAAK,EAAE,QAAQ,CAAC,CAACC,EAAKC,CAAK,IAAkB,CAClDH,EAAOE,CAAG,IAAM,OAClBF,EAAOE,CAAG,EAAIC,EACL,MAAM,QAAQA,CAAK,EAC5BH,EAAOE,CAAG,EAAI,CAAC,GAAGF,EAAOE,CAAG,EAAG,GAAGC,CAAK,EAEvCH,EAAOE,CAAG,EAAIC,CAElB,CAAC,CACH,CAAC,EACMH,CACT","names":["getEntries","mergeTranscendInputs","base","inputs","cloned","input","key","value"]}
|
package/dist/chunk-LAYHULHH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as l,b as m}from"./chunk-347UQP43.js";import{e as g,f as p}from"./chunk-ARVEJERC.js";import*as t from"io-ts";import{applyEnum as y,valuesOf as e}from"@transcend-io/type-utils";import{DataCategoryType as x,ConsentBundleType as R,EnricherType as S,ProcessingPurpose as b,RequestAction as i,ComparisonOperator as T,RequestActionObjectResolver as d,AssessmentSyncColumn as h,RetentionScheduleType as D,AssessmentQuestionType as E,UspapiOption as N,DataFlowScope as u,PromptAVendorEmailSendType as M,RetentionScheduleOperation as L,AssessmentsDisplayLogicAction as F,DefaultConsentOption as q,LogicOperator as V,ConsentPrecedenceOption as K,AssessmentSyncModel as j,AssessmentQuestionSubType as B,IsoCountryCode as n,BrowserTimeZone as G,IsoCountrySubdivisionCode as s,ConsentTrackerStatus as a,AttributeKeyType as U,PromptAVendorEmailCompletionLinkType as Q,RegionsOperator as z,UnknownRequestPolicy as I,TelemetryPartitionStrategy as H,SignedIabAgreementOption as W,RegionDetectionMethod as Z,PreflightRequestStatus as J,AttributeSupportedResourceType as P,SubDataPointDataSubCategoryGuessStatus as Y,LargeLanguageModelClient as X,PromptFilePurpose as _,CodePackageType as A,ActionItemPriorityOverride as $,ActionItemCode as tt,ScopeName as et,TranscendProduct as rt,PrivacyCenterComponentStyles as nt,PrivacyCenterTextStyles as st,PreferenceStoreAuthLevel as ot,ConfigurableColorPaletteColor as it,AssessmentFormTemplateStatus as at,AssessmentFormStatus as pt,AssessmentFormTemplateSource as yt,UnstructuredSubDataPointRecommendationStatus as ut,PreferenceTopicType as ct}from"@transcend-io/privacy-types";import{InitialViewState as gt,BrowserLanguage as lt,UserPrivacySignalEnum as mt,OnConsentExpiry as dt}from"@transcend-io/airgap.js-types";import{LanguageKey as o}from"@transcend-io/internationalization";var It=t.type({title:t.string}),O=t.intersection([t.type({name:t.string,value:t.string}),t.partial({isSecret:t.boolean})]),ft=t.type({title:t.string}),xt=t.intersection([t.type({name:t.string,description:t.string}),t.partial({"sso-department":t.string,"sso-group":t.string,"sso-title":t.string,users:t.array(t.string),scopes:t.array(e(et))})]),bt=t.intersection([t.type({title:t.string,"output-identifiers":t.array(t.string)}),t.partial({description:t.string,url:t.string,type:e(S),"input-identifier":t.string,testRegex:t.string,lookerQueryTitle:t.string,expirationDuration:t.number,transitionRequestStatus:e(J),phoneNumbers:t.array(t.string),regionList:t.array(e({...n,...s})),"data-subjects":t.array(t.string),headers:t.array(O),"privacy-actions":t.array(e(i))})]),Tt=t.type({purpose:e(b),name:t.string}),c=t.intersection([t.type({category:e(x)}),t.partial({name:t.string})]),Pt=t.intersection([t.type({category:c,status:e(Y),confidence:t.number}),t.partial({classifierVersion:t.number})]),Te=t.intersection([t.type({category:c,status:e(ut),confidence:t.number}),t.partial({classifierVersion:t.number})]),At=t.intersection([t.type({name:t.string}),t.partial({description:t.string,color:t.string})]),Ot=t.intersection([t.type({name:t.string,type:e(U)}),t.partial({description:t.string,resources:t.array(e(P)),values:t.array(At)})]),r=t.type({key:t.string,values:t.array(t.string)}),Ct=t.intersection([t.type({name:t.string,instructions:t.string,agentId:t.string,codeInterpreterEnabled:t.boolean,retrievalEnabled:t.boolean,"large-language-model":t.type({name:t.string,client:e(X)})}),t.partial({description:t.string,prompt:t.string,owners:t.array(t.string),teams:t.array(t.string),"agent-functions":t.array(t.string),"agent-files":t.array(t.string)})]),vt=t.type({name:t.string,description:t.string,parameters:t.string}),kt=t.intersection([t.type({name:t.string,fileId:t.string,size:t.number,purpose:e(_)}),t.partial({description:t.string})]),wt=t.intersection([t.type({title:t.string}),t.partial({description:t.string,dataProcessingAgreementLink:t.string,contactName:t.string,contactPhone:t.string,address:t.string,headquarterCountry:e(n),headquarterSubDivision:e(s),websiteUrl:t.string,businessEntity:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Rt=t.intersection([t.type({name:t.string,category:e(x)}),t.partial({description:t.string,regex:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),St=t.intersection([t.type({name:t.string,purpose:e(b)}),t.partial({description:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),ht=t.type({title:t.string,content:t.string}),Dt=t.type({title:t.string,content:t.string}),Et=t.type({title:t.string,description:t.string,prompts:t.array(t.string)}),Nt=t.intersection([t.type({key:t.string}),t.partial({title:t.string,description:t.union([t.string,t.null]),purposes:t.array(Tt),categories:t.array(c),"guessed-categories":t.array(Pt),"access-request-visibility-enabled":t.boolean,"erasure-request-redaction-enabled":t.boolean,attributes:t.array(r)})]),Mt=t.intersection([t.type({key:t.string}),t.partial({path:t.array(t.string),title:t.string,description:t.string,"data-collection-tag":t.string,"privacy-action-queries":t.partial(y(d,()=>t.string)),"privacy-actions":t.array(e(d)),fields:t.array(Nt),owners:t.array(t.string),teams:t.array(t.string)})]),Lt=t.partial({"notify-email-address":t.string,"send-frequency":t.number,"send-type":e(M),"include-identifiers-attachment":t.boolean,"completion-link-type":e(Q),"manual-work-retry-frequency":t.string}),Ft=t.intersection([t.type({title:t.string}),t.partial({description:t.string,address:t.string,headquarterCountry:e(n),headquarterSubDivision:e(s),dataProtectionOfficerName:t.string,dataProtectionOfficerEmail:t.string,attributes:t.array(r),owners:t.array(t.string),teams:t.array(t.string)})]),Pe=t.intersection([t.type({name:t.string,codePackageType:e(A)}),t.partial({description:t.string,repositoryUrl:t.string,catalogIntegrationName:t.string,documentationLinks:t.array(t.string),ownerEmails:t.array(t.string),teamNames:t.array(t.string)})]),qt=t.intersection([t.type({name:t.string}),t.partial({version:t.string,isDevDependency:t.boolean})]),Ae=t.intersection([t.type({name:t.string,type:e(A),relativePath:t.string,repositoryName:t.string}),t.partial({description:t.string,softwareDevelopmentKits:t.array(qt),teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),Oe=t.intersection([t.type({name:t.string,url:t.string}),t.partial({description:t.string,teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),Vt=t.intersection([t.type({type:t.string}),t.partial({active:t.boolean,title:t.string,adminDashboardDefaultSilentMode:t.boolean,actions:t.array(e(i))})]),Kt=t.intersection([t.type({type:e(i)}),t.partial({skipSecondaryIfNoFiles:t.boolean,skipDownloadableStep:t.boolean,requiresReview:t.boolean,waitingPeriod:t.number,regionDetectionMethod:e(Z),regionList:t.array(e({...n,...s})),regionBlockList:t.array(e({...n,...s}))})]),jt=t.intersection([t.type({name:t.string,type:t.string}),t.partial({regex:t.string,selectOptions:t.array(t.string),privacyCenterVisibility:t.array(e(i)),dataSubjects:t.array(t.string),isRequiredInForm:t.boolean,placeholder:t.string,displayTitle:t.string,displayDescription:t.string,displayOrder:t.number})]),Bt=t.intersection([t.type({value:t.string,type:e(u)}),t.partial({description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:e(a),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Gt=t.intersection([t.type({name:t.string}),t.partial({isRegex:t.boolean,description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:e(a),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Ut=t.intersection([t.type({name:t.string}),t.partial({displayName:t.string,regions:t.array(t.partial({countrySubDivision:e(s),country:e(n)})),onConsentExpiry:e(dt),consentExpiry:t.number,operator:e(z),displayPriority:t.number,viewState:e(gt),purposes:t.array(t.type({trackingType:t.string})),optedOutPurposes:t.array(t.type({trackingType:t.string})),browserLanguages:t.array(e(lt)),browserTimeZones:t.array(e(G))})]),Qt=t.intersection([t.type({name:t.string}),t.partial({partition:t.string})]),zt=t.partial({version:t.string,bundleUrls:t.record(e(R),t.string),domains:t.array(t.string),partition:t.string,consentPrecedence:e(K),unknownRequestPolicy:e(I),unknownCookiePolicy:e(I),syncEndpoint:t.string,telemetryPartitioning:e(H),signedIabAgreement:e(W),uspapi:e(N),experiences:t.array(Ut),theme:t.partial({primaryColor:t.string,fontColor:t.string,privacyPolicy:t.string,prompt:t.number}),syncGroups:t.string}),Ht=t.partial({isDisabled:t.boolean,showPrivacyRequestButton:t.boolean,showDataPractices:t.boolean,showPolicies:t.boolean,showTrackingTechnologies:t.boolean,showCookies:t.boolean,showDataFlows:t.boolean,showConsentManager:t.boolean,showManageYourPrivacy:t.boolean,showMarketingPreferences:t.boolean,locales:t.array(e(o)),defaultLocale:e(o),preferBrowserDefaultLocale:t.boolean,supportEmail:t.string,replyToEmail:t.string,useNoReplyEmailAddress:t.boolean,useCustomEmailDomain:t.boolean,transformAccessReportJsonToCsv:t.boolean,theme:t.partial({colors:t.partial(y(it,()=>t.string)),componentStyles:nt,textStyles:st})}),Wt=t.intersection([t.type({title:t.string}),t.partial({effectiveOn:t.string,disableEffectiveOn:t.boolean,content:t.string,disabledLocales:t.array(e(o))})]),Zt=t.intersection([t.type({id:t.string}),t.partial({targetReactIntlId:t.string,defaultMessage:t.string,translations:t.partial(y(o,()=>t.string))})]),Jt=t.intersection([t.type({title:t.string,integrationName:t.string}),t.partial({"outer-type":t.string,description:t.string,url:t.string,"api-key-title":t.string,headers:t.array(O),"data-subjects":t.array(t.string),"identity-keys":t.array(t.string),"deletion-dependencies":t.array(t.string),owners:t.array(t.string),teams:t.array(t.string),disabled:t.boolean,datapoints:t.array(Mt),"email-settings":Lt,country:e(n),countrySubDivision:e(s),attributes:t.array(r),businessEntityTitles:t.array(t.string)})]),Yt=t.intersection([t.type({title:t.string,productLine:e(rt)}),t.partial({description:t.string,hidden:t.boolean})]),Xt=t.intersection([t.type({title:t.string,type:e(tt),collections:t.array(t.string)}),t.partial({priority:e($),customerExperienceActionItemId:t.string,dueDate:t.string,resolved:t.boolean,notes:t.string,link:t.string,users:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),C=t.intersection([t.type({"depends-on-question-reference-id":t.string,"comparison-operator":e(T)}),t.partial({"comparison-operands":t.array(t.string)})]),_t=t.recursion("AssessmentNestedRuleInput",w=>t.intersection([t.type({"logic-operator":e(V)}),t.partial({rules:t.array(C),"nested-rules":t.array(w)})])),$t=t.intersection([t.type({action:e(F)}),t.partial({rule:C,"nested-rule":_t})]),Ce=t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string}),te=t.intersection([t.type({"comparison-operands":t.array(t.string),"comparison-operator":e(T)}),t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string})]),ee=t.type({value:t.string}),re=t.intersection([t.type({title:t.string,type:e(E)}),t.partial({"sub-type":e(B),placeholder:t.string,description:t.string,"is-required":t.boolean,"reference-id":t.string,"display-logic":$t,"risk-logic":t.array(te),"risk-categories":t.array(t.string),"risk-framework":t.string,"answer-options":t.array(ee),"selected-answers":t.array(t.string),"allowed-mime-types":t.array(t.string),"allow-select-other":t.boolean,"sync-model":e(j),"sync-column":e(h),"attribute-key":t.string,"require-risk-evaluation":t.boolean,"require-risk-matrix-evaluation":t.boolean})]),v=t.intersection([t.type({title:t.string,questions:t.array(re)}),t.partial({assignees:t.array(t.string),"external-assignees":t.array(t.string),status:t.string,"is-reviewed":t.boolean})]),k=t.type({type:e(D),"duration-days":t.number,operand:e(L)}),ne=t.intersection([t.type({title:t.string}),t.partial({sections:t.array(v),description:t.string,status:e(at),source:e(yt),creator:t.string,locked:t.boolean,"parent-id":t.string,archived:t.boolean,"created-at":t.string,"attribute-keys":t.array(t.string),"retention-schedule":k,templates:t.array(t.string)})]),f=t.type({title:t.string,type:e(P)}),se=t.intersection([t.type({title:t.string,group:t.string}),t.partial({sections:t.array(v),creator:t.string,description:t.string,status:e(pt),assignees:t.array(t.string),"external-assignees":t.array(t.string),reviewers:t.array(t.string),locked:t.boolean,archived:t.boolean,external:t.boolean,"title-is-internal":t.boolean,"due-date":t.string,"created-at":t.string,"assigned-at":t.string,"submitted-at":t.string,"approved-at":t.string,"rejected-at":t.string,resources:t.array(f),rows:t.array(f),"retention-schedule":k,attributes:t.array(r)})]),oe=t.type({title:t.string,slug:t.string}),ie=t.intersection([t.type({type:e(ct),title:t.string,description:t.string}),t.partial({"default-configuration":t.string,"show-in-privacy-center":t.boolean,options:t.array(oe)})]),ae=t.intersection([t.type({trackingType:t.string,title:t.string,name:t.string}),t.partial({description:t.string,"is-active":t.boolean,configurable:t.boolean,"display-order":t.number,"show-in-privacy-center":t.boolean,"show-in-consent-manager":t.boolean,"preference-topics":t.array(ie),"auth-level":e(ot),"opt-out-signals":t.array(e(mt)),"default-consent":e(q)})]),ve=t.partial({"action-items":t.array(Xt),"action-item-collections":t.array(Yt),"api-keys":t.array(ft),teams:t.array(xt),templates:t.array(It),enrichers:t.array(bt),attributes:t.array(Ot),"business-entities":t.array(Ft),vendors:t.array(wt),"data-categories":t.array(Rt),"processing-purposes":t.array(St),"data-subjects":t.array(Vt),actions:t.array(Kt),identifiers:t.array(jt),"data-silos":t.array(Jt),"data-flows":t.array(Bt),cookies:t.array(Gt),"consent-manager":zt,prompts:t.array(ht),"prompt-partials":t.array(Dt),"prompt-groups":t.array(Et),agents:t.array(Ct),"agent-functions":t.array(vt),"agent-files":t.array(kt),"privacy-center":Ht,policies:t.array(Wt),messages:t.array(Zt),partitions:t.array(Qt),"assessment-templates":t.array(ne),assessments:t.array(se),purposes:t.array(ae)}),ke=t.type({organizationName:t.string,apiKey:t.string,organizationId:t.string}),we=t.intersection([t.type({"Connections Made To":t.string,Type:e(u),Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:e(a)}),t.record(t.string,t.string)]),Re=t.intersection([t.type({Name:t.string,Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:e(a)}),t.record(t.string,t.string)]),Se=t.type({title:t.string,description:t.string,cookies:t.array(t.type({name:t.string,trackingPurposes:t.array(t.string)})),dataFlows:t.array(t.type({value:t.string,type:e(u),trackingPurposes:t.array(t.string)}))}),he=e(g),pe=l({TRouteName:e(p)}),De=e(p),ye=t.array(pe),ue=m({TEnabledRoutes:ye}),Ee=t.partial({enabledIntegrations:t.partial({openAI:ue})}),Ne=t.partial({promptRunName:t.string,promptId:t.string,promptTitle:t.string,promptGroupId:t.string,promptGroupTitle:t.string,runByEmployeeEmail:t.string,applicationId:t.string,applicationName:t.string,codePackageName:t.string,repositoryName:t.string,applicationUserCoreIdentifier:t.string,applicationUserName:t.string,slackMessageTs:t.string,slackTeamId:t.string,slackChannelId:t.string,slackChannelName:t.string}),ce=t.intersection([t.type({title:t.string}),t.partial({value:t.string})]),ge=t.type({columns:t.array(ce)}),Me=t.partial({rows:t.array(ge),json:t.string});export{It as a,O as b,ft as c,xt as d,bt as e,Tt as f,c as g,Pt as h,Te as i,At as j,Ot as k,r as l,Ct as m,vt as n,kt as o,wt as p,Rt as q,St as r,ht as s,Dt as t,Et as u,Nt as v,Mt as w,Lt as x,Ft as y,Pe as z,qt as A,Ae as B,Oe as C,Vt as D,Kt as E,jt as F,Bt as G,Gt as H,Ut as I,Qt as J,zt as K,Ht as L,Wt as M,Zt as N,Jt as O,Yt as P,Xt as Q,C as R,_t as S,$t as T,Ce as U,te as V,ee as W,re as X,v as Y,k as Z,ne as _,f as $,se as aa,oe as ba,ie as ca,ae as da,ve as ea,ke as fa,we as ga,Re as ha,Se as ia,he as ja,pe as ka,ye as la,ue as ma,Ee as na,Ne as oa,Me as pa};
|
|
2
|
-
//# sourceMappingURL=chunk-LAYHULHH.js.map
|