@transcend-io/cli 8.26.1 → 8.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/bash-complete.cjs +1 -1
- package/dist/bin/cli.cjs +1 -1
- package/dist/bin/deprecated-command.cjs +2 -2
- package/dist/{chunk-C75HAQGX.cjs → chunk-4LSUJDDH.cjs} +2 -2
- package/dist/{chunk-C75HAQGX.cjs.map → chunk-4LSUJDDH.cjs.map} +1 -1
- package/dist/{chunk-3DCVMHY6.cjs → chunk-5HNRVLH2.cjs} +4 -4
- package/dist/{chunk-3DCVMHY6.cjs.map → chunk-5HNRVLH2.cjs.map} +1 -1
- package/dist/{chunk-CUJ4LPDX.cjs → chunk-5QRRUXRI.cjs} +2 -2
- package/dist/{chunk-CUJ4LPDX.cjs.map → chunk-5QRRUXRI.cjs.map} +1 -1
- package/dist/{chunk-EYEQDDPS.cjs → chunk-6GWHYOPM.cjs} +2 -2
- package/dist/{chunk-EYEQDDPS.cjs.map → chunk-6GWHYOPM.cjs.map} +1 -1
- package/dist/{chunk-GPY2KIUX.cjs → chunk-7OG6A4LI.cjs} +4 -4
- package/dist/{chunk-GPY2KIUX.cjs.map → chunk-7OG6A4LI.cjs.map} +1 -1
- package/dist/{chunk-4U5KIWRN.cjs → chunk-ACHJOO4S.cjs} +2 -2
- package/dist/{chunk-4U5KIWRN.cjs.map → chunk-ACHJOO4S.cjs.map} +1 -1
- package/dist/{chunk-QYZGRKUS.cjs → chunk-BLSMEA5C.cjs} +2 -2
- package/dist/{chunk-QYZGRKUS.cjs.map → chunk-BLSMEA5C.cjs.map} +1 -1
- package/dist/{chunk-L75V2N2G.cjs → chunk-CP42F62X.cjs} +6 -6
- package/dist/chunk-CP42F62X.cjs.map +1 -0
- package/dist/{chunk-7K2OJZ42.cjs → chunk-FE6CECES.cjs} +4 -4
- package/dist/{chunk-7K2OJZ42.cjs.map → chunk-FE6CECES.cjs.map} +1 -1
- package/dist/{chunk-5ES627PZ.cjs → chunk-JKEVZFNY.cjs} +2 -2
- package/dist/{chunk-5ES627PZ.cjs.map → chunk-JKEVZFNY.cjs.map} +1 -1
- package/dist/{chunk-QETUIUW4.cjs → chunk-M7EKT75X.cjs} +2 -2
- package/dist/{chunk-QETUIUW4.cjs.map → chunk-M7EKT75X.cjs.map} +1 -1
- package/dist/{chunk-R4RQHX4D.cjs → chunk-QMXGMC2H.cjs} +2 -2
- package/dist/{chunk-R4RQHX4D.cjs.map → chunk-QMXGMC2H.cjs.map} +1 -1
- package/dist/{chunk-SJBHG25C.cjs → chunk-TQEFJGW6.cjs} +21 -21
- package/dist/{chunk-SJBHG25C.cjs.map → chunk-TQEFJGW6.cjs.map} +1 -1
- package/dist/{chunk-D7F476WZ.cjs → chunk-UBVZKE7V.cjs} +2 -2
- package/dist/{chunk-D7F476WZ.cjs.map → chunk-UBVZKE7V.cjs.map} +1 -1
- package/dist/{impl-GTHEIJ3U.cjs → impl-24WXRAZH.cjs} +2 -2
- package/dist/{impl-GTHEIJ3U.cjs.map → impl-24WXRAZH.cjs.map} +1 -1
- package/dist/{impl-KVSZJPYR.cjs → impl-2QA5YMX7.cjs} +2 -2
- package/dist/{impl-KVSZJPYR.cjs.map → impl-2QA5YMX7.cjs.map} +1 -1
- package/dist/{impl-M5X5R6ZW.cjs → impl-33BZGWDB.cjs} +2 -2
- package/dist/{impl-M5X5R6ZW.cjs.map → impl-33BZGWDB.cjs.map} +1 -1
- package/dist/{impl-S7HFR52D.cjs → impl-3NHKBP7U.cjs} +2 -2
- package/dist/{impl-S7HFR52D.cjs.map → impl-3NHKBP7U.cjs.map} +1 -1
- package/dist/{impl-OTGVVJRX.cjs → impl-47P6B22N.cjs} +2 -2
- package/dist/{impl-OTGVVJRX.cjs.map → impl-47P6B22N.cjs.map} +1 -1
- package/dist/{impl-7QFIDNL3.cjs → impl-5T356QQ5.cjs} +2 -2
- package/dist/{impl-7QFIDNL3.cjs.map → impl-5T356QQ5.cjs.map} +1 -1
- package/dist/{impl-36ZYYUFX.cjs → impl-72VUDRUK.cjs} +2 -2
- package/dist/{impl-36ZYYUFX.cjs.map → impl-72VUDRUK.cjs.map} +1 -1
- package/dist/{impl-YI5FD3Y2.cjs → impl-7RRE2GGO.cjs} +2 -2
- package/dist/{impl-YI5FD3Y2.cjs.map → impl-7RRE2GGO.cjs.map} +1 -1
- package/dist/{impl-IL2JVYMJ.cjs → impl-7V22LA5U.cjs} +2 -2
- package/dist/{impl-IL2JVYMJ.cjs.map → impl-7V22LA5U.cjs.map} +1 -1
- package/dist/{impl-QC74YSO5.cjs → impl-A7QHIGMS.cjs} +2 -2
- package/dist/{impl-QC74YSO5.cjs.map → impl-A7QHIGMS.cjs.map} +1 -1
- package/dist/{impl-4IL27GAM.cjs → impl-ARSWR7NX.cjs} +2 -2
- package/dist/{impl-4IL27GAM.cjs.map → impl-ARSWR7NX.cjs.map} +1 -1
- package/dist/{impl-K4LVHR54.cjs → impl-BEATRFDE.cjs} +2 -2
- package/dist/{impl-K4LVHR54.cjs.map → impl-BEATRFDE.cjs.map} +1 -1
- package/dist/{impl-GYP6MAQC.cjs → impl-BQKRH5GQ.cjs} +2 -2
- package/dist/{impl-GYP6MAQC.cjs.map → impl-BQKRH5GQ.cjs.map} +1 -1
- package/dist/{impl-WRFXMDFM.cjs → impl-CBO3W76N.cjs} +2 -2
- package/dist/{impl-WRFXMDFM.cjs.map → impl-CBO3W76N.cjs.map} +1 -1
- package/dist/{impl-EFMTV32I.cjs → impl-CSXBLMR7.cjs} +2 -2
- package/dist/{impl-EFMTV32I.cjs.map → impl-CSXBLMR7.cjs.map} +1 -1
- package/dist/{impl-X7OLSMDW.cjs → impl-DVDXXRQC.cjs} +2 -2
- package/dist/{impl-X7OLSMDW.cjs.map → impl-DVDXXRQC.cjs.map} +1 -1
- package/dist/impl-EMD77BVT.cjs +2 -0
- package/dist/{impl-H4RSPA73.cjs.map → impl-EMD77BVT.cjs.map} +1 -1
- package/dist/{impl-UN6EXZPS.cjs → impl-FHICSIT4.cjs} +2 -2
- package/dist/{impl-UN6EXZPS.cjs.map → impl-FHICSIT4.cjs.map} +1 -1
- package/dist/{impl-2VFQTO54.cjs → impl-FK7FC2AF.cjs} +2 -2
- package/dist/{impl-2VFQTO54.cjs.map → impl-FK7FC2AF.cjs.map} +1 -1
- package/dist/{impl-P72AOBA3.cjs → impl-GCAHKCXJ.cjs} +2 -2
- package/dist/{impl-P72AOBA3.cjs.map → impl-GCAHKCXJ.cjs.map} +1 -1
- package/dist/{impl-WWDPF7X4.cjs → impl-GOJL7NWE.cjs} +2 -2
- package/dist/{impl-WWDPF7X4.cjs.map → impl-GOJL7NWE.cjs.map} +1 -1
- package/dist/{impl-KFANWXGE.cjs → impl-HRVPP3AF.cjs} +2 -2
- package/dist/{impl-KFANWXGE.cjs.map → impl-HRVPP3AF.cjs.map} +1 -1
- package/dist/{impl-4BB6SQUW.cjs → impl-JY5JVCKH.cjs} +2 -2
- package/dist/{impl-4BB6SQUW.cjs.map → impl-JY5JVCKH.cjs.map} +1 -1
- package/dist/{impl-KVMONO7I.cjs → impl-K7NLXEZN.cjs} +3 -3
- package/dist/{impl-KVMONO7I.cjs.map → impl-K7NLXEZN.cjs.map} +1 -1
- package/dist/{impl-NCDGG3FL.cjs → impl-KBXUU7JT.cjs} +2 -2
- package/dist/{impl-NCDGG3FL.cjs.map → impl-KBXUU7JT.cjs.map} +1 -1
- package/dist/{impl-N4NXAFA3.cjs → impl-LDYN63H6.cjs} +2 -2
- package/dist/{impl-N4NXAFA3.cjs.map → impl-LDYN63H6.cjs.map} +1 -1
- package/dist/{impl-2TOT7QRF.cjs → impl-LOR6NAV6.cjs} +2 -2
- package/dist/{impl-2TOT7QRF.cjs.map → impl-LOR6NAV6.cjs.map} +1 -1
- package/dist/{impl-JNRPENKJ.cjs → impl-M4OXXOMC.cjs} +2 -2
- package/dist/{impl-JNRPENKJ.cjs.map → impl-M4OXXOMC.cjs.map} +1 -1
- package/dist/impl-M6YOD7LA.cjs +2 -0
- package/dist/{impl-2VXHDYTF.cjs.map → impl-M6YOD7LA.cjs.map} +1 -1
- package/dist/{impl-5RTLS67K.cjs → impl-NILGKSUG.cjs} +5 -5
- package/dist/{impl-5RTLS67K.cjs.map → impl-NILGKSUG.cjs.map} +1 -1
- package/dist/{impl-MR3MWUKG.cjs → impl-NVHVPNKZ.cjs} +2 -2
- package/dist/{impl-MR3MWUKG.cjs.map → impl-NVHVPNKZ.cjs.map} +1 -1
- package/dist/{impl-EYWLH7LE.cjs → impl-ONAOXMKU.cjs} +2 -2
- package/dist/{impl-EYWLH7LE.cjs.map → impl-ONAOXMKU.cjs.map} +1 -1
- package/dist/{impl-JZWGCGCU.cjs → impl-OU5VJBRQ.cjs} +4 -4
- package/dist/{impl-JZWGCGCU.cjs.map → impl-OU5VJBRQ.cjs.map} +1 -1
- package/dist/{impl-YP5JGS5G.cjs → impl-RHZNZ6CW.cjs} +2 -2
- package/dist/{impl-YP5JGS5G.cjs.map → impl-RHZNZ6CW.cjs.map} +1 -1
- package/dist/{impl-HW5FKIGS.cjs → impl-SXOCIQPX.cjs} +2 -2
- package/dist/{impl-HW5FKIGS.cjs.map → impl-SXOCIQPX.cjs.map} +1 -1
- package/dist/{impl-W7QN33OP.cjs → impl-TSZSY33S.cjs} +2 -2
- package/dist/{impl-W7QN33OP.cjs.map → impl-TSZSY33S.cjs.map} +1 -1
- package/dist/{impl-WURLJFUQ.cjs → impl-VSGGPMKM.cjs} +2 -2
- package/dist/{impl-WURLJFUQ.cjs.map → impl-VSGGPMKM.cjs.map} +1 -1
- package/dist/{impl-WYS7ZPC5.cjs → impl-VUMK2QR4.cjs} +2 -2
- package/dist/{impl-WYS7ZPC5.cjs.map → impl-VUMK2QR4.cjs.map} +1 -1
- package/dist/{impl-G2RHRQXG.cjs → impl-WJZL3F6W.cjs} +3 -3
- package/dist/{impl-G2RHRQXG.cjs.map → impl-WJZL3F6W.cjs.map} +1 -1
- package/dist/{impl-DIBTJG3W.cjs → impl-YEQ5CW47.cjs} +2 -2
- package/dist/{impl-DIBTJG3W.cjs.map → impl-YEQ5CW47.cjs.map} +1 -1
- package/dist/{impl-FV24P5HT.cjs → impl-ZA3FYBHK.cjs} +2 -2
- package/dist/{impl-FV24P5HT.cjs.map → impl-ZA3FYBHK.cjs.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +1 -1
- package/package.json +1 -1
- package/dist/chunk-L75V2N2G.cjs.map +0 -1
- package/dist/impl-2VXHDYTF.cjs +0 -2
- package/dist/impl-H4RSPA73.cjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-WJZL3F6W.cjs","../src/commands/inventory/push/impl.ts"],"names":["syncConfiguration","transcendUrl","auth","pageSize","publishToPrivacyCenter","contents","deleteExtraAttributeValues","classifyService","client","buildTranscendGraphQLClient","syncConfigurationToTranscend","err","logger","colors"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAgD,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,oCCGnX,wBACY,4BACjB,gFAEF,MAmBnB,SAAeA,CAAAA,CAAkB,CAC/B,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,0BAAA,CAAAC,CAAAA,CAA6B,CAAA,CAAA,CAC7B,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CACpB,CAAA,CAeqB,CACnB,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcC,CAAI,CAAA,CAG7D,GAAI,CAWF,MAAO,CAVkB,MAAMQ,kCAAAA,CAC7BL,CACAG,CAAAA,CACA,CACE,QAAA,CAAAL,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAG,CAAAA,CACA,0BAAA,CAAAD,CACF,CACF,CAEF,CAAA,KAAA,CAASK,CAAAA,CAAK,CACZ,OAAAC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,iDAAA,EAAoDF,CAAAA,CAAI,OAAO,CAAA,CAAA;AAsI7D;AAAgB;AAAA;AA8D1B,GAAA","file":"/home/runner/work/cli/cli/dist/impl-WJZL3F6W.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from 'bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-UBVZKE7V.cjs');require('./chunk-Q7I37FJV.cjs');async function y({auth:s,requestReceiptFolder:r,sombraAuth:o,actions:a,statuses:i,requestIds:n,createdAt:c,emailIsVerified:u,silentModeBefore:d,sendEmailReceipt:m,copyIdentifiers:p,skipWaitingPeriod:l,createdAtBefore:f,createdAtAfter:R,concurrency:q,transcendUrl:g}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkFE6CECEScjs.Kf.call(void 0, {requestReceiptFolder:r,auth:s,sombraAuth:o,requestActions:a,requestStatuses:i,requestIds:n,createdAt:c,emailIsVerified:u,silentModeBefore:d,sendEmailReceipt:m,copyIdentifiers:p,skipWaitingPeriod:l,createdAtBefore:f,createdAtAfter:R,concurrency:q,transcendUrl:g})}exports.restart = y;
|
|
2
|
+
//# sourceMappingURL=impl-YEQ5CW47.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YEQ5CW47.cjs","../src/commands/request/restart/impl.ts"],"names":["restart","auth","requestReceiptFolder","sombraAuth","actions","statuses","requestIds","createdAt","emailIsVerified","silentModeBefore","sendEmailReceipt","copyIdentifiers","skipWaitingPeriod","createdAtBefore","createdAtAfter","concurrency","transcendUrl","doneInputValidation","bulkRestartRequests"],"mappings":"AAAA,iIAAwC,wDAA0C,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCwBtM,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMC,kCAAAA,CACJ,oBAAA,CAAAhB,CAAAA,CACA,IAAA,CAAAD,CAAAA,CACA,UAAA,CAAAE,CAAAA,CACA,cAAA,CAAgBC,CAAAA,CAChB,eAAA,CAAiBC,CAAAA,CACjB,UAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,oBAAA","file":"/home/runner/work/cli/cli/dist/impl-YEQ5CW47.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { bulkRestartRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface RestartCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses: RequestStatus[];\n transcendUrl: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n emailIsVerified: boolean;\n createdAt?: Date;\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n sendEmailReceipt: boolean;\n copyIdentifiers: boolean;\n skipWaitingPeriod: boolean;\n}\n\nexport async function restart(\n this: LocalContext,\n {\n auth,\n requestReceiptFolder,\n sombraAuth,\n actions,\n statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: RestartCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await bulkRestartRequests({\n requestReceiptFolder,\n auth,\n sombraAuth,\n requestActions: actions,\n requestStatuses: statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n });\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
2
|
-
//# sourceMappingURL=impl-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkBLSMEA5Ccjs = require('./chunk-BLSMEA5C.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-UBVZKE7V.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var c=t.type({"Request Id":t.string});async function q({auth:i,dataSiloId:m,file:o,transcendUrl:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${o}" from disk`));let d=_chunkFE6CECEScjs.rc.call(void 0, o,c);await _chunkBLSMEA5Ccjs.f.call(void 0, {requestIds:d.map(l=>l["Request Id"]),transcendUrl:n,auth:i,dataSiloId:m})}exports.markRequestDataSilosCompleted = q;
|
|
2
|
+
//# sourceMappingURL=impl-ZA3FYBHK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-ZA3FYBHK.cjs","../src/commands/request/system/mark-request-data-silos-completed/impl.ts"],"names":["RequestIdRow","markRequestDataSilosCompleted","auth","dataSiloId","file","transcendUrl","doneInputValidation","logger","colors","activeResults","readCsv","markRequestDataSiloIdsCompleted","request"],"mappings":"AAAA,mfAAwC,wDAAyC,wDAA0C,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gFCCxO,qEACA,IAObA,CAAAA,CAAiB,CAAA,CAAA,IAAA,CAAK,CAC1B,YAAA,CAAgB,CAAA,CAAA,MAClB,CAAC,CAAA,CASD,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErCC,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,SAAA,EAAYJ,CAAI,CAAA,WAAA,CAAa,CAAC,CAAA,CACzD,IAAMK,CAAAA,CAAgBC,kCAAAA,CAAQN,CAAMJ,CAAY,CAAA,CAEhD,MAAMW,iCAAAA,CACJ,UAAA,CAAYF,CAAAA,CAAc,GAAA,CAAKG,CAAAA,EAAYA,CAAAA,CAAQ,YAAY,CAAC,CAAA,CAChE,YAAA,CAAAP,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,0CAAA","file":"/home/runner/work/cli/cli/dist/impl-ZA3FYBHK.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\nimport * as t from 'io-ts';\n\nimport { logger } from '../../../../logger';\nimport { markRequestDataSiloIdsCompleted } from '../../../../lib/cron';\nimport { readCsv } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nconst RequestIdRow = t.type({\n 'Request Id': t.string,\n});\n\nexport interface MarkRequestDataSilosCompletedCommandFlags {\n auth: string;\n dataSiloId: string;\n file: string;\n transcendUrl: string;\n}\n\nexport async function markRequestDataSilosCompleted(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n file,\n transcendUrl,\n }: MarkRequestDataSilosCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, RequestIdRow);\n\n await markRequestDataSiloIdsCompleted({\n requestIds: activeResults.map((request) => request['Request Id']),\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunkEYEQDDPScjs = require('./chunk-EYEQDDPS.cjs');var _chunkQYZGRKUScjs = require('./chunk-QYZGRKUS.cjs');var _chunk3DCVMHY6cjs = require('./chunk-3DCVMHY6.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkRE5YALEOcjs = require('./chunk-RE5YALEO.cjs');var _chunkC75HAQGXcjs = require('./chunk-C75HAQGX.cjs');var _chunk4U5KIWRNcjs = require('./chunk-4U5KIWRN.cjs');var _chunk5ES627PZcjs = require('./chunk-5ES627PZ.cjs');var _chunk5UBGZNDCcjs = require('./chunk-5UBGZNDC.cjs');var _chunk7K2OJZ42cjs = require('./chunk-7K2OJZ42.cjs');var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkD7F476WZcjs = require('./chunk-D7F476WZ.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunk7K2OJZ42cjs.rg.call(void 0, a,_chunk7K2OJZ42cjs.Gb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Km(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkD7F476WZcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunk7K2OJZ42cjs.wc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkD7F476WZcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunk7K2OJZ42cjs.Cd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunk7K2OJZ42cjs.Gc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkD7F476WZcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkD7F476WZcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkD7F476WZcjs.e.call(void 0, o.prompts,"title"),c=_chunkD7F476WZcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunk7K2OJZ42cjs.Gc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunk7K2OJZ42cjs.Dd.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkD7F476WZcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkD7F476WZcjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunk7K2OJZ42cjs.Gc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunk7K2OJZ42cjs.Ec.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunk7K2OJZ42cjs.he.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunk7K2OJZ42cjs.he.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunk7K2OJZ42cjs.he.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function Ym(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function ec(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function ac({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunk6GWHYOPMcjs = require('./chunk-6GWHYOPM.cjs');var _chunkBLSMEA5Ccjs = require('./chunk-BLSMEA5C.cjs');var _chunk5HNRVLH2cjs = require('./chunk-5HNRVLH2.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkRE5YALEOcjs = require('./chunk-RE5YALEO.cjs');var _chunk4LSUJDDHcjs = require('./chunk-4LSUJDDH.cjs');var _chunkACHJOO4Scjs = require('./chunk-ACHJOO4S.cjs');var _chunkJKEVZFNYcjs = require('./chunk-JKEVZFNY.cjs');var _chunk5UBGZNDCcjs = require('./chunk-5UBGZNDC.cjs');var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkUBVZKE7Vcjs = require('./chunk-UBVZKE7V.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunkFE6CECEScjs.rg.call(void 0, a,_chunkFE6CECEScjs.Gb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Km(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkUBVZKE7Vcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunkFE6CECEScjs.wc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkUBVZKE7Vcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunkFE6CECEScjs.Cd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunkFE6CECEScjs.Gc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkUBVZKE7Vcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkUBVZKE7Vcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkUBVZKE7Vcjs.e.call(void 0, o.prompts,"title"),c=_chunkUBVZKE7Vcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunkFE6CECEScjs.Gc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunkFE6CECEScjs.Dd.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkUBVZKE7Vcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkUBVZKE7Vcjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunkFE6CECEScjs.Gc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunkFE6CECEScjs.Ec.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunkFE6CECEScjs.he.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunkFE6CECEScjs.he.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunkFE6CECEScjs.he.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function Ym(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function ec(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function ac({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
|
|
2
2
|
`)[0],i=_child_process.execSync.call(void 0, "git rev-parse HEAD",{encoding:"utf-8"}).split(`
|
|
3
|
-
`)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=
|
|
4
|
-
`).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunk7K2OJZ42cjs.ub; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunk7K2OJZ42cjs.Ha; exports.ADD_SILO_DISCOVERY_RESULTS = _chunk7K2OJZ42cjs.H; exports.ADMIN_DASH = _chunkD7F476WZcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkD7F476WZcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkD7F476WZcjs.p; exports.AGENTS = _chunk7K2OJZ42cjs.Hb; exports.AGENT_FILES = _chunk7K2OJZ42cjs.Kb; exports.AGENT_FUNCTIONS = _chunk7K2OJZ42cjs.Nb; exports.API_KEYS = _chunk7K2OJZ42cjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunk7K2OJZ42cjs.X; exports.ASSESSMENTS = _chunk7K2OJZ42cjs.fa; exports.ASSESSMENT_SECTION_FIELDS = _chunk7K2OJZ42cjs.ea; exports.ASSESSMENT_TEMPLATES = _chunk7K2OJZ42cjs.ja; exports.ASSUME_ROLE = _chunk7K2OJZ42cjs.Fb; exports.ATTRIBUTES = _chunk7K2OJZ42cjs.La; exports.ATTRIBUTE_KEYS_REQUESTS = _chunk7K2OJZ42cjs.M; exports.ATTRIBUTE_VALUES = _chunk7K2OJZ42cjs.Pa; exports.ActionInput = _chunk5UBGZNDCcjs.G; exports.ActionItemCollectionInput = _chunk5UBGZNDCcjs.R; exports.ActionItemInput = _chunk5UBGZNDCcjs.S; exports.AgentFileInput = _chunk5UBGZNDCcjs.o; exports.AgentFunctionInput = _chunk5UBGZNDCcjs.n; exports.AgentInput = _chunk5UBGZNDCcjs.m; exports.ApiKeyInput = _chunk5UBGZNDCcjs.c; exports.AssessmentAction = _chunk7K2OJZ42cjs.Rd; exports.AssessmentAnswerOptionInput = _chunk5UBGZNDCcjs.Y; exports.AssessmentDisplayLogicInput = _chunk5UBGZNDCcjs.V; exports.AssessmentInput = _chunk5UBGZNDCcjs.ca; exports.AssessmentNestedRule = _chunk7K2OJZ42cjs.Qd; exports.AssessmentNestedRuleInput = _chunk5UBGZNDCcjs.U; exports.AssessmentResourceInput = _chunk5UBGZNDCcjs.ba; exports.AssessmentRetentionScheduleInput = _chunk5UBGZNDCcjs.$; exports.AssessmentRiskLogic = _chunk7K2OJZ42cjs.Td; exports.AssessmentRule = _chunk7K2OJZ42cjs.Pd; exports.AssessmentRuleInput = _chunk5UBGZNDCcjs.T; exports.AssessmentRuleWithOperands = _chunk7K2OJZ42cjs.Nd; exports.AssessmentRuleWithoutOperands = _chunk7K2OJZ42cjs.Od; exports.AssessmentSectionInput = _chunk5UBGZNDCcjs._; exports.AssessmentSectionQuestionInput = _chunk5UBGZNDCcjs.Z; exports.AssessmentTemplateInput = _chunk5UBGZNDCcjs.aa; exports.AttestedExtraIdentifiers = _chunk7K2OJZ42cjs.qf; exports.AttributeInput = _chunk5UBGZNDCcjs.k; exports.AttributePreview = _chunk5UBGZNDCcjs.l; exports.AttributeValueInput = _chunk5UBGZNDCcjs.j; exports.BLANK = _chunk7K2OJZ42cjs.dc; exports.BULK_APPLY = _chunk7K2OJZ42cjs.cc; exports.BULK_REQUEST_FILES = _chunk7K2OJZ42cjs.Fa; exports.BUSINESS_ENTITIES = _chunk7K2OJZ42cjs.rb; exports.BusinessEntityInput = _chunk5UBGZNDCcjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunk7K2OJZ42cjs.Y; exports.CAN_APPLY_IN_BULK = _chunk7K2OJZ42cjs.hc; exports.CATALOGS = _chunk7K2OJZ42cjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunk7K2OJZ42cjs.va; exports.CODE_PACKAGES = _chunk7K2OJZ42cjs.Q; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunk7K2OJZ42cjs.qb; exports.CONSENT_PARTITIONS = _chunk7K2OJZ42cjs.Ua; exports.COOKIES = _chunk7K2OJZ42cjs.Za; exports.CREATE_ACTION_ITEMS = _chunk7K2OJZ42cjs.yb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunk7K2OJZ42cjs.Ja; exports.CREATE_AGENT = _chunk7K2OJZ42cjs.Ib; exports.CREATE_AGENT_FILE = _chunk7K2OJZ42cjs.Lb; exports.CREATE_AGENT_FUNCTION = _chunk7K2OJZ42cjs.Ob; exports.CREATE_API_KEY = _chunk7K2OJZ42cjs.E; exports.CREATE_ATTRIBUTE = _chunk7K2OJZ42cjs.Qa; exports.CREATE_ATTRIBUTE_VALUES = _chunk7K2OJZ42cjs.Ma; exports.CREATE_BUSINESS_ENTITY = _chunk7K2OJZ42cjs.sb; exports.CREATE_CODE_PACKAGE = _chunk7K2OJZ42cjs.S; exports.CREATE_CONSENT_EXPERIENCE = _chunk7K2OJZ42cjs.ob; exports.CREATE_CONSENT_MANAGER = _chunk7K2OJZ42cjs.bb; exports.CREATE_CONSENT_PARTITION = _chunk7K2OJZ42cjs.pb; exports.CREATE_DATA_FLOWS = _chunk7K2OJZ42cjs.Va; exports.CREATE_DATA_SILOS = _chunk7K2OJZ42cjs.m; exports.CREATE_DATA_SUBJECT = _chunk7K2OJZ42cjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunk7K2OJZ42cjs.Ub; exports.CREATE_ENRICHER = _chunk7K2OJZ42cjs.p; exports.CREATE_IDENTIFIER = _chunk7K2OJZ42cjs.u; exports.CREATE_PREFERENCE_ACCESS_TOKENS = _chunk7K2OJZ42cjs.G; exports.CREATE_PROCESSING_ACTIVITY = _chunk7K2OJZ42cjs._b; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunk7K2OJZ42cjs.Xb; exports.CREATE_PROMPT = _chunk7K2OJZ42cjs.pa; exports.CREATE_PROMPT_GROUP = _chunk7K2OJZ42cjs.ta; exports.CREATE_PROMPT_PARTIAL = _chunk7K2OJZ42cjs.ra; exports.CREATE_REPOSITORY = _chunk7K2OJZ42cjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunk7K2OJZ42cjs.P; exports.CREATE_TEAM = _chunk7K2OJZ42cjs.za; exports.CREATE_TEMPLATE = _chunk7K2OJZ42cjs.K; exports.CREATE_VENDOR = _chunk7K2OJZ42cjs.Rb; exports.CachedFileState = _chunk7K2OJZ42cjs.ic; exports.CachedRequestState = _chunk7K2OJZ42cjs.kc; exports.CodePackageInput = _chunk5UBGZNDCcjs.D; exports.CodePackageSdk = _chunk5UBGZNDCcjs.C; exports.ColumnName = _chunk7K2OJZ42cjs.fc; exports.ConsentManageExperienceInput = _chunk5UBGZNDCcjs.K; exports.ConsentManagerInput = _chunk5UBGZNDCcjs.M; exports.ConsentManagerMetricBin = _chunk7K2OJZ42cjs.Sc; exports.ConsentManagerServiceMetadata = _chunk5UBGZNDCcjs.ka; exports.ConsentPreferenceTopic = _chunk5UBGZNDCcjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunk5UBGZNDCcjs.da; exports.ConsentPurpose = _chunk5UBGZNDCcjs.fa; exports.CookieCsvInput = _chunk5UBGZNDCcjs.ja; exports.CookieInput = _chunk5UBGZNDCcjs.J; exports.CronIdentifier = _chunkQYZGRKUScjs.a; exports.CronIdentifierPush = _chunkQYZGRKUScjs.c; exports.DATAPOINT_EXPORT = _chunk7K2OJZ42cjs.g; exports.DATA_FLOWS = _chunk7K2OJZ42cjs.Ya; exports.DATA_POINTS = _chunk7K2OJZ42cjs.a; exports.DATA_POINT_COUNT = _chunk7K2OJZ42cjs.b; exports.DATA_SILOS = _chunk7K2OJZ42cjs.i; exports.DATA_SILOS_ENRICHED = _chunk7K2OJZ42cjs.k; exports.DATA_SILO_EXPORT = _chunk7K2OJZ42cjs.j; exports.DATA_SUBJECTS = _chunk7K2OJZ42cjs.w; exports.DATA_SUB_CATEGORIES = _chunk7K2OJZ42cjs.Tb; exports.DAY_MS = _chunk7K2OJZ42cjs.dg; exports.DEBUG = _chunkD7F476WZcjs.z; exports.DEFAULT_TRANSCEND_API = _chunkD7F476WZcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkD7F476WZcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunk7K2OJZ42cjs.fe; exports.DELETE_API_KEY = _chunk7K2OJZ42cjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunk7K2OJZ42cjs.Oa; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunk7K2OJZ42cjs.Ab; exports.DEPLOY_CONSENT_MANAGER = _chunk7K2OJZ42cjs.eb; exports.DETERMINE_LOGIN_METHOD = _chunk7K2OJZ42cjs.Db; exports.DataCategoryGuessInput = _chunk5UBGZNDCcjs.h; exports.DataCategoryInput = _chunk5UBGZNDCcjs.q; exports.DataCategoryPreviewInput = _chunk5UBGZNDCcjs.g; exports.DataCategoryRecommendationInput = _chunk5UBGZNDCcjs.i; exports.DataFlowCsvInput = _chunk5UBGZNDCcjs.ia; exports.DataFlowInput = _chunk5UBGZNDCcjs.I; exports.DataSiloInput = _chunk5UBGZNDCcjs.Q; exports.DataSubjectInput = _chunk5UBGZNDCcjs.F; exports.DatapointInput = _chunk5UBGZNDCcjs.w; exports.ENABLED_PLUGINS = _chunk7K2OJZ42cjs.I; exports.ENRICHERS = _chunk7K2OJZ42cjs.n; exports.ENTRY_COUNT = _chunk7K2OJZ42cjs.h; exports.EXPERIENCES = _chunk7K2OJZ42cjs.Ta; exports.EnrichPrivacyRequest = _chunkEYEQDDPScjs.b; exports.EnricherInput = _chunk5UBGZNDCcjs.e; exports.FETCH_CONSENT_MANAGER = _chunk7K2OJZ42cjs.$a; exports.FETCH_CONSENT_MANAGER_ID = _chunk7K2OJZ42cjs._a; exports.FETCH_CONSENT_MANAGER_THEME = _chunk7K2OJZ42cjs.ab; exports.FETCH_PRIVACY_CENTER_ID = _chunk7K2OJZ42cjs.zb; exports.FieldInput = _chunk5UBGZNDCcjs.v; exports.GLOBAL_ACTION_ITEMS = _chunk7K2OJZ42cjs.wb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunk7K2OJZ42cjs.Ia; exports.HOUR_MS = _chunk7K2OJZ42cjs.eg; exports.IDENTIFIERS = _chunk7K2OJZ42cjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunk7K2OJZ42cjs.ec; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunk7K2OJZ42cjs.ga; exports.INITIALIZER = _chunk7K2OJZ42cjs.o; exports.IP_ADDRESS_REGEX = _chunkC75HAQGXcjs.f; exports.IS_REQUIRED = _chunk7K2OJZ42cjs.gc; exports.IdentifierInput = _chunk5UBGZNDCcjs.H; exports.ImportOnetrustAssessmentsInput = _chunk5UBGZNDCcjs.ra; exports.IntlMessage = _chunk7K2OJZ42cjs.uf; exports.IntlMessageInput = _chunk5UBGZNDCcjs.P; exports.LARGE_LANGUAGE_MODELS = _chunk7K2OJZ42cjs.Gb; exports.LOGIN = _chunk7K2OJZ42cjs.Eb; exports.MESSAGES = _chunk7K2OJZ42cjs.$; exports.NEW_IDENTIFIER_TYPES = _chunk7K2OJZ42cjs.t; exports.NONE = _chunk7K2OJZ42cjs.bc; exports.NOTIFY_ADDITIONAL_TIME = _chunk7K2OJZ42cjs._; exports.ORGANIZATION = _chunk7K2OJZ42cjs.L; exports.OneTrustFileFormat = _chunkQ7I37FJVcjs.a; exports.OneTrustPullResource = _chunkQ7I37FJVcjs.b; exports.OneTrustPullSource = _chunkQ7I37FJVcjs.c; exports.OpenAIEnabledRoute = _chunk5UBGZNDCcjs.ma; exports.OpenAIEnabledRoutes = _chunk5UBGZNDCcjs.na; exports.OpenAIIntegration = _chunk5UBGZNDCcjs.oa; exports.OpenAIRouteName = _chunkQ7I37FJVcjs.f; exports.POLICIES = _chunk7K2OJZ42cjs.U; exports.PREFERENCE_TOPICS = _chunk7K2OJZ42cjs.ia; exports.PRIVACY_CENTER = _chunk7K2OJZ42cjs.Bb; exports.PROCESSING_ACTIVITIES = _chunk7K2OJZ42cjs.Zb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk7K2OJZ42cjs.Wb; exports.PROMPTS = _chunk7K2OJZ42cjs.ka; exports.PROMPTS_WITH_VARIABLES = _chunk7K2OJZ42cjs.na; exports.PROMPT_GROUPS = _chunk7K2OJZ42cjs.ma; exports.PROMPT_PARTIALS = _chunk7K2OJZ42cjs.la; exports.PROMPT_THREADS = _chunk7K2OJZ42cjs.T; exports.PURPOSES = _chunk7K2OJZ42cjs.ha; exports.ParsedAttributeInput = _chunk7K2OJZ42cjs.pc; exports.PartitionInput = _chunk5UBGZNDCcjs.L; exports.PathfinderPolicy = _chunk5UBGZNDCcjs.pa; exports.PathfinderPolicyName = _chunkQ7I37FJVcjs.e; exports.PathfinderPolicyNameC = _chunk5UBGZNDCcjs.la; exports.PathfinderPromptRunMetadata = _chunk5UBGZNDCcjs.qa; exports.PolicyInput = _chunk5UBGZNDCcjs.O; exports.PrivacyCenterInput = _chunk5UBGZNDCcjs.N; exports.PrivacyRequest = _chunk7K2OJZ42cjs.md; exports.PrivacyRequestInput = _chunk7K2OJZ42cjs.rf; exports.PrivacyRequestResponse = _chunk7K2OJZ42cjs.Af; exports.ProcessingActivityInput = _chunk5UBGZNDCcjs.A; exports.ProcessingPurposeInput = _chunk5UBGZNDCcjs.r; exports.ProcessingPurposePreviewInput = _chunk5UBGZNDCcjs.f; exports.PromptAVendorEmailSettings = _chunk5UBGZNDCcjs.x; exports.PromptGroupInput = _chunk5UBGZNDCcjs.u; exports.PromptInput = _chunk5UBGZNDCcjs.s; exports.PromptPartialInput = _chunk5UBGZNDCcjs.t; exports.PurposeMap = _chunk4U5KIWRNcjs.c; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunk7K2OJZ42cjs.xa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunk7K2OJZ42cjs.Ba; exports.REPORT_PROMPT_RUN = _chunk7K2OJZ42cjs.Ga; exports.REPOSITORIES = _chunk7K2OJZ42cjs.A; exports.REQUESTS = _chunk7K2OJZ42cjs.W; exports.REQUEST_DATA_SILOS = _chunk7K2OJZ42cjs.ua; exports.REQUEST_ENRICHERS = _chunk7K2OJZ42cjs.ba; exports.REQUEST_FILES = _chunk7K2OJZ42cjs.Ea; exports.REQUEST_IDENTIFIERS = _chunk7K2OJZ42cjs.Ca; exports.RETRYABLE_BATCH_STATUSES = _chunkD7F476WZcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunk7K2OJZ42cjs.wa; exports.RETRY_REQUEST_ENRICHER = _chunk7K2OJZ42cjs.ca; exports.RateCounter = _chunk7K2OJZ42cjs.$f; exports.RegionInput = _chunk5UBGZNDCcjs.z; exports.RepositoryInput = _chunk5UBGZNDCcjs.E; exports.RequestFileMetadata = _chunk7K2OJZ42cjs.vf; exports.RequestFileMetadataResponse = _chunk7K2OJZ42cjs.wf; exports.RequestIdentifiersResponse = _chunk7K2OJZ42cjs.jd; exports.RequestPurposeTrigger = _chunk7K2OJZ42cjs.ld; exports.RiskAssignmentInput = _chunk5UBGZNDCcjs.W; exports.RiskLogicInput = _chunk5UBGZNDCcjs.X; exports.SCOPES_BY_TITLE = _chunkD7F476WZcjs.w; exports.SCOPE_TITLES = _chunkD7F476WZcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunk7K2OJZ42cjs.Sa; exports.SKIP_REQUEST_ENRICHER = _chunk7K2OJZ42cjs.da; exports.SOFTWARE_DEVELOPMENT_KITS = _chunk7K2OJZ42cjs.N; exports.SOMBRA_VERSION = _chunk7K2OJZ42cjs.ac; exports.SUB_DATA_POINTS = _chunk7K2OJZ42cjs.c; exports.SUB_DATA_POINTS_COUNT = _chunk7K2OJZ42cjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunk7K2OJZ42cjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunk7K2OJZ42cjs.Mc; exports.SoftwareDevelopmentKitInput = _chunk5UBGZNDCcjs.B; exports.StoredApiKey = _chunk5UBGZNDCcjs.ha; exports.SuccessfulRequest = _chunk7K2OJZ42cjs.jc; exports.TEAMS = _chunk7K2OJZ42cjs.ya; exports.TEMPLATES = _chunk7K2OJZ42cjs.J; exports.TOGGLE_CONSENT_PRECEDENCE = _chunk7K2OJZ42cjs.lb; exports.TOGGLE_DATA_SUBJECT = _chunk7K2OJZ42cjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunk7K2OJZ42cjs.kb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunk7K2OJZ42cjs.jb; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunk7K2OJZ42cjs.ib; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkD7F476WZcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkD7F476WZcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkD7F476WZcjs.v; exports.TeamInput = _chunk5UBGZNDCcjs.d; exports.TemplateInput = _chunk5UBGZNDCcjs.a; exports.TranscendInput = _chunk5UBGZNDCcjs.ga; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunkQ7I37FJVcjs.d; exports.UPDATE_ACTION = _chunk7K2OJZ42cjs.vb; exports.UPDATE_ACTION_ITEMS = _chunk7K2OJZ42cjs.xb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunk7K2OJZ42cjs.Ka; exports.UPDATE_AGENTS = _chunk7K2OJZ42cjs.Jb; exports.UPDATE_AGENT_FILES = _chunk7K2OJZ42cjs.Mb; exports.UPDATE_AGENT_FUNCTIONS = _chunk7K2OJZ42cjs.Pb; exports.UPDATE_ATTRIBUTE = _chunk7K2OJZ42cjs.Ra; exports.UPDATE_ATTRIBUTE_VALUES = _chunk7K2OJZ42cjs.Na; exports.UPDATE_BUSINESS_ENTITIES = _chunk7K2OJZ42cjs.tb; exports.UPDATE_CODE_PACKAGES = _chunk7K2OJZ42cjs.R; exports.UPDATE_CONSENT_EXPERIENCE = _chunk7K2OJZ42cjs.nb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunk7K2OJZ42cjs.fb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunk7K2OJZ42cjs.gb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunk7K2OJZ42cjs.mb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunk7K2OJZ42cjs.db; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunk7K2OJZ42cjs.cb; exports.UPDATE_DATA_FLOWS = _chunk7K2OJZ42cjs.Wa; exports.UPDATE_DATA_SILOS = _chunk7K2OJZ42cjs.l; exports.UPDATE_DATA_SUBJECT = _chunk7K2OJZ42cjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunk7K2OJZ42cjs.Vb; exports.UPDATE_ENRICHER = _chunk7K2OJZ42cjs.q; exports.UPDATE_IDENTIFIER = _chunk7K2OJZ42cjs.v; exports.UPDATE_INTL_MESSAGES = _chunk7K2OJZ42cjs.aa; exports.UPDATE_LOAD_OPTIONS = _chunk7K2OJZ42cjs.hb; exports.UPDATE_OR_CREATE_COOKIES = _chunk7K2OJZ42cjs.Xa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunk7K2OJZ42cjs.f; exports.UPDATE_POLICIES = _chunk7K2OJZ42cjs.V; exports.UPDATE_PRIVACY_CENTER = _chunk7K2OJZ42cjs.Cb; exports.UPDATE_PRIVACY_REQUEST = _chunk7K2OJZ42cjs.Z; exports.UPDATE_PROCESSING_ACTIVITIES = _chunk7K2OJZ42cjs.$b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunk7K2OJZ42cjs.Yb; exports.UPDATE_PROMPTS = _chunk7K2OJZ42cjs.oa; exports.UPDATE_PROMPT_GROUPS = _chunk7K2OJZ42cjs.sa; exports.UPDATE_PROMPT_PARTIALS = _chunk7K2OJZ42cjs.qa; exports.UPDATE_REPOSITORIES = _chunk7K2OJZ42cjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunk7K2OJZ42cjs.O; exports.UPDATE_TEAM = _chunk7K2OJZ42cjs.Aa; exports.UPDATE_VENDORS = _chunk7K2OJZ42cjs.Sb; exports.USERS = _chunk7K2OJZ42cjs.Da; exports.USP_STRING_REGEX = _chunk4U5KIWRNcjs.b; exports.VARIABLE_PARAMETERS_NAME = _chunkRE5YALEOcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkRE5YALEOcjs.a; exports.VENDORS = _chunk7K2OJZ42cjs.Qb; exports.VendorInput = _chunk5UBGZNDCcjs.p; exports.WebhookHeader = _chunk5UBGZNDCcjs.b; exports.addDaysUtc = _chunk7K2OJZ42cjs.jg; exports.addMessagesToPromptRun = _chunk7K2OJZ42cjs.uc; exports.addMs = _chunk7K2OJZ42cjs.ig; exports.appendCsvRowsOrdered = _chunk7K2OJZ42cjs.mg; exports.appendCsvSync = _chunk7K2OJZ42cjs.ng; exports.approvePrivacyRequests = _chunk7K2OJZ42cjs.Cf; exports.assumeRole = _chunk7K2OJZ42cjs.Kd; exports.buildAIIntegrationType = _chunkLCDYXJN6cjs.b; exports.buildEnabledRouteType = _chunkLCDYXJN6cjs.a; exports.buildTranscendGraphQLClient = _chunk7K2OJZ42cjs.wc; exports.buildTranscendGraphQLClientGeneric = _chunk7K2OJZ42cjs.vc; exports.buildXdiSyncEndpoint = _chunkC75HAQGXcjs.g; exports.bulkRestartRequests = _chunk7K2OJZ42cjs.Kf; exports.bulkRetryEnrichers = _chunk7K2OJZ42cjs.Mf; exports.cancelPrivacyRequests = _chunk7K2OJZ42cjs.Ff; exports.clampPageSize = _chunk7K2OJZ42cjs.fg; exports.collectParquetFilesOrExit = _chunk7K2OJZ42cjs.bg; exports.consentManagersToBusinessEntities = _chunkC75HAQGXcjs.h; exports.convertToDataSubjectAllowlist = _chunk7K2OJZ42cjs.yd; exports.convertToDataSubjectBlockList = _chunk7K2OJZ42cjs.xd; exports.createActionItemCollection = _chunk7K2OJZ42cjs.le; exports.createActionItems = _chunk7K2OJZ42cjs.oe; exports.createAgent = _chunk7K2OJZ42cjs.xe; exports.createAgentFile = _chunk7K2OJZ42cjs.re; exports.createAgentFunction = _chunk7K2OJZ42cjs.ue; exports.createApiKey = _chunk7K2OJZ42cjs.Ld; exports.createBusinessEntity = _chunk7K2OJZ42cjs.Be; exports.createCodePackage = _chunk7K2OJZ42cjs.Ke; exports.createConsentToken = _chunk4U5KIWRNcjs.a; exports.createDataCategory = _chunk7K2OJZ42cjs.Re; exports.createDataFlows = _chunk7K2OJZ42cjs.Ve; exports.createPreferenceAccessTokens = _chunk7K2OJZ42cjs.Jc; exports.createProcessingPurpose = _chunk7K2OJZ42cjs.df; exports.createPrompt = _chunk7K2OJZ42cjs.gf; exports.createRegexForTag = j; exports.createRepository = _chunk7K2OJZ42cjs.He; exports.createSoftwareDevelopmentKit = _chunk7K2OJZ42cjs.Ee; exports.createSombraGotInstance = _chunk7K2OJZ42cjs.xc; exports.createTranscendConsentGotInstance = _chunk7K2OJZ42cjs.yc; exports.createVendor = _chunk7K2OJZ42cjs.jf; exports.defineTranscendPrompts = Km; exports.deleteApiKey = _chunk7K2OJZ42cjs.Md; exports.deployConsentManager = _chunk7K2OJZ42cjs.zc; exports.description = _chunkD7F476WZcjs.l; exports.domainToHost = _chunkC75HAQGXcjs.e; exports.downloadPrivacyRequestFiles = _chunk7K2OJZ42cjs.zf; exports.enrichPrivacyRequest = _chunkEYEQDDPScjs.c; exports.ensureAllDataSubjectsExist = _chunk7K2OJZ42cjs.wd; exports.extractClientError = _chunk7K2OJZ42cjs.Hf; exports.extractErrorMessage = _chunk7K2OJZ42cjs.Wf; exports.fetchActiveSiloDiscoPlugin = _chunk7K2OJZ42cjs.Bc; exports.fetchAllActionItems = _chunk7K2OJZ42cjs.Cc; exports.fetchAllActions = _chunk7K2OJZ42cjs.Dc; exports.fetchAllAgentFiles = _chunk7K2OJZ42cjs.Ec; exports.fetchAllAgentFunctions = _chunk7K2OJZ42cjs.Fc; exports.fetchAllAgents = _chunk7K2OJZ42cjs.Gc; exports.fetchAllApiKeys = _chunk7K2OJZ42cjs.rd; exports.fetchAllAssessmentTemplates = _chunk7K2OJZ42cjs.Ic; exports.fetchAllAssessments = _chunk7K2OJZ42cjs.Hc; exports.fetchAllAttributeValues = _chunk7K2OJZ42cjs.Lc; exports.fetchAllAttributes = _chunk7K2OJZ42cjs.Nc; exports.fetchAllBusinessEntities = _chunk7K2OJZ42cjs.Oc; exports.fetchAllCatalogs = _chunk7K2OJZ42cjs.td; exports.fetchAllCookies = _chunk7K2OJZ42cjs.Vc; exports.fetchAllDataCategories = _chunk7K2OJZ42cjs.Wc; exports.fetchAllDataFlows = _chunk7K2OJZ42cjs.Xc; exports.fetchAllDataPoints = _chunk7K2OJZ42cjs.Xd; exports.fetchAllDataSilos = _chunk7K2OJZ42cjs.Vd; exports.fetchAllDataSubjects = _chunk7K2OJZ42cjs.vd; exports.fetchAllEnrichers = _chunk7K2OJZ42cjs.$d; exports.fetchAllIdentifiers = _chunk7K2OJZ42cjs.sg; exports.fetchAllMessages = _chunk7K2OJZ42cjs.Yc; exports.fetchAllPolicies = _chunk7K2OJZ42cjs.$c; exports.fetchAllPreferenceTopics = _chunk7K2OJZ42cjs.bd; exports.fetchAllPrivacyCenters = _chunk7K2OJZ42cjs.cd; exports.fetchAllProcessingActivities = _chunk7K2OJZ42cjs.dd; exports.fetchAllProcessingPurposes = _chunk7K2OJZ42cjs.ed; exports.fetchAllPromptGroups = _chunk7K2OJZ42cjs.zd; exports.fetchAllPromptPartials = _chunk7K2OJZ42cjs.Ad; exports.fetchAllPromptThreads = _chunk7K2OJZ42cjs.Dd; exports.fetchAllPrompts = _chunk7K2OJZ42cjs.Bd; exports.fetchAllPurposes = _chunk7K2OJZ42cjs.fd; exports.fetchAllPurposesAndPreferences = _chunk7K2OJZ42cjs.gd; exports.fetchAllRequestAttributeKeys = _chunk7K2OJZ42cjs.Kc; exports.fetchAllRequestEnrichers = _chunk7K2OJZ42cjs.hd; exports.fetchAllRequestIdentifierMetadata = _chunk7K2OJZ42cjs.id; exports.fetchAllRequestIdentifiers = _chunk7K2OJZ42cjs.kd; exports.fetchAllRequests = _chunk7K2OJZ42cjs.nd; exports.fetchAllSubDataPoints = _chunk7K2OJZ42cjs.Wd; exports.fetchAllTeams = _chunk7K2OJZ42cjs.od; exports.fetchAllTemplates = _chunk7K2OJZ42cjs.be; exports.fetchAllUsers = _chunk7K2OJZ42cjs.pd; exports.fetchAllVendors = _chunk7K2OJZ42cjs.qd; exports.fetchAndIndexCatalogs = _chunk7K2OJZ42cjs.ud; exports.fetchApiKeys = _chunk7K2OJZ42cjs.sd; exports.fetchConsentManager = _chunk7K2OJZ42cjs.Pc; exports.fetchConsentManagerAnalyticsData = _chunk7K2OJZ42cjs.Tc; exports.fetchConsentManagerExperiences = _chunk7K2OJZ42cjs.Rc; exports.fetchConsentManagerId = _chunk7K2OJZ42cjs.Qc; exports.fetchConsentManagerTheme = _chunk7K2OJZ42cjs.Uc; exports.fetchEnrichedDataSilos = _chunk7K2OJZ42cjs.Yd; exports.fetchIdentifiersAndCreateMissing = _chunk7K2OJZ42cjs.tg; exports.fetchPartitions = _chunk7K2OJZ42cjs.de; exports.fetchPrivacyCenterId = _chunk7K2OJZ42cjs._c; exports.fetchPrivacyCenterUrl = _chunk7K2OJZ42cjs.Zc; exports.fetchPromptsWithVariables = _chunk7K2OJZ42cjs.Cd; exports.fetchRequestDataSilo = _chunk7K2OJZ42cjs.Gd; exports.fetchRequestDataSiloActiveCount = _chunk7K2OJZ42cjs.Hd; exports.fetchRequestDataSilos = _chunk7K2OJZ42cjs.Fd; exports.fetchRequestDataSilosCount = _chunk7K2OJZ42cjs.Ed; exports.fetchRequestFilesForRequest = _chunk7K2OJZ42cjs.Id; exports.filterNullishValuesFromObject = ec; exports.filterRows = _chunk7K2OJZ42cjs.tc; exports.formatAttributeValues = _chunk7K2OJZ42cjs.ad; exports.fuzzyMatchColumns = _chunk7K2OJZ42cjs.mc; exports.fuzzySearch = _chunk7K2OJZ42cjs.lc; exports.generateCrossAccountApiKeys = _chunk5ES627PZcjs.a; exports.getErrorStatus = _chunk7K2OJZ42cjs.Vf; exports.getFileMetadataForPrivacyRequests = _chunk7K2OJZ42cjs.xf; exports.getGitFilesThatChanged = ac; exports.getUniqueValuesForColumn = _chunk7K2OJZ42cjs.sc; exports.initCsvFile = _chunk7K2OJZ42cjs.lg; exports.inquirerAutoComplete = _chunk7K2OJZ42cjs.Tf; exports.inquirerConfirmBoolean = _chunk7K2OJZ42cjs.Rf; exports.inquirerConfirmText = _chunk7K2OJZ42cjs.Sf; exports.limitRecords = _chunk7K2OJZ42cjs._f; exports.listDirectories = _chunk5ES627PZcjs.d; exports.listFiles = _chunk5ES627PZcjs.c; exports.loginUser = _chunk7K2OJZ42cjs.Jd; exports.makeGraphQLRequest = _chunk7K2OJZ42cjs.rg; exports.mapColumnsToAttributes = _chunk7K2OJZ42cjs.Gf; exports.mapColumnsToIdentifiers = _chunk7K2OJZ42cjs.Ef; exports.mapCsvColumnsToApi = _chunk7K2OJZ42cjs.of; exports.mapCsvRowsToRequestInputs = _chunk7K2OJZ42cjs.tf; exports.mapEnumValues = _chunk7K2OJZ42cjs.nc; exports.mapRequestEnumValues = _chunk7K2OJZ42cjs.pf; exports.markCronIdentifierCompleted = _chunkQYZGRKUScjs.d; exports.markRequestDataSiloIdsCompleted = _chunkQYZGRKUScjs.f; exports.markSilentPrivacyRequests = _chunk7K2OJZ42cjs.nf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkD7F476WZcjs.n; exports.normalizeIdentifierValue = _chunk7K2OJZ42cjs.sf; exports.notifyPrivacyRequestsAdditionalTime = _chunk7K2OJZ42cjs.Df; exports.parquetToCsvOneFile = _chunk7K2OJZ42cjs.cg; exports.parseAssessmentDisplayLogic = _chunk7K2OJZ42cjs.Sd; exports.parseAssessmentRiskLogic = _chunk7K2OJZ42cjs.Ud; exports.parseAttributesFromString = _chunk7K2OJZ42cjs.qc; exports.parseFilePath = _chunk7K2OJZ42cjs.pg; exports.parseVariablesFromString = _chunk7K2OJZ42cjs.Uf; exports.pullAllDatapoints = _chunk3DCVMHY6cjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkQYZGRKUScjs.g; exports.pullConsentManagerMetrics = _chunkC75HAQGXcjs.d; exports.pullCronPageOfIdentifiers = _chunkQYZGRKUScjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunkEYEQDDPScjs.a; exports.pullPrivacyRequests = _chunk7K2OJZ42cjs.Of; exports.pullTranscendConfiguration = _chunk7K2OJZ42cjs.ge; exports.pullUnstructuredSubDataPointRecommendations = _chunk3DCVMHY6cjs.b; exports.pushCronIdentifiersFromCsv = _chunkQYZGRKUScjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunkEYEQDDPScjs.d; exports.readCsv = _chunk7K2OJZ42cjs.rc; exports.readSafe = _chunk7K2OJZ42cjs.ag; exports.readTranscendYaml = _chunkRE5YALEOcjs.d; exports.removeLinks = Ym; exports.removeUnverifiedRequestIdentifiers = _chunk7K2OJZ42cjs.Qf; exports.replaceVariablesInYaml = _chunkRE5YALEOcjs.c; exports.reportPromptRun = _chunk7K2OJZ42cjs.he; exports.restartPrivacyRequest = _chunk7K2OJZ42cjs.Jf; exports.retryRequestDataSilos = _chunk7K2OJZ42cjs.Nf; exports.retryRequestEnricher = _chunk7K2OJZ42cjs.ie; exports.retrySamePromise = _chunk7K2OJZ42cjs.Zf; exports.setResourceAttributes = _chunk7K2OJZ42cjs.je; exports.skipPreflightJobs = _chunk7K2OJZ42cjs.Lf; exports.skipRequestDataSilos = _chunk7K2OJZ42cjs.Pf; exports.sleepPromise = _chunk7K2OJZ42cjs.Xf; exports.splitCsvToList = _chunk7K2OJZ42cjs.oc; exports.splitInHalf = _chunk7K2OJZ42cjs.Yf; exports.startOfHour = _chunk7K2OJZ42cjs.hg; exports.startOfUtcDay = _chunk7K2OJZ42cjs.gg; exports.streamPrivacyRequestFiles = _chunk7K2OJZ42cjs.yf; exports.submitPrivacyRequest = _chunk7K2OJZ42cjs.Bf; exports.syncAction = _chunk7K2OJZ42cjs.ke; exports.syncActionItemCollections = _chunk7K2OJZ42cjs.ne; exports.syncActionItems = _chunk7K2OJZ42cjs.qe; exports.syncAgentFiles = _chunk7K2OJZ42cjs.te; exports.syncAgentFunctions = _chunk7K2OJZ42cjs.we; exports.syncAgents = _chunk7K2OJZ42cjs.ze; exports.syncAttribute = _chunk7K2OJZ42cjs.Ae; exports.syncBusinessEntities = _chunk7K2OJZ42cjs.De; exports.syncCodePackages = _chunk7K2OJZ42cjs.Me; exports.syncConfigurationToTranscend = _chunk7K2OJZ42cjs.ug; exports.syncConsentManager = _chunk7K2OJZ42cjs.Oe; exports.syncConsentManagerExperiences = _chunk7K2OJZ42cjs.Ne; exports.syncCookies = _chunk7K2OJZ42cjs.Qe; exports.syncDataCategories = _chunk7K2OJZ42cjs.Te; exports.syncDataFlows = _chunk7K2OJZ42cjs.We; exports.syncDataSiloDependencies = _chunk7K2OJZ42cjs._d; exports.syncDataSilos = _chunk7K2OJZ42cjs.Zd; exports.syncDataSubject = _chunk7K2OJZ42cjs.Xe; exports.syncEnricher = _chunk7K2OJZ42cjs.ae; exports.syncIdentifier = _chunk7K2OJZ42cjs.Ye; exports.syncIntlMessages = _chunk7K2OJZ42cjs._e; exports.syncPartitions = _chunk7K2OJZ42cjs.ee; exports.syncPolicies = _chunk7K2OJZ42cjs.af; exports.syncPrivacyCenter = _chunk7K2OJZ42cjs.bf; exports.syncProcessingActivities = _chunk7K2OJZ42cjs.cf; exports.syncProcessingPurposes = _chunk7K2OJZ42cjs.ff; exports.syncPrompts = _chunk7K2OJZ42cjs.if; exports.syncRepositories = _chunk7K2OJZ42cjs.Je; exports.syncSoftwareDevelopmentKits = _chunk7K2OJZ42cjs.Ge; exports.syncTemplate = _chunk7K2OJZ42cjs.ce; exports.syncVendors = _chunk7K2OJZ42cjs.lf; exports.updateActionItem = _chunk7K2OJZ42cjs.pe; exports.updateActionItemCollection = _chunk7K2OJZ42cjs.me; exports.updateAgentFiles = _chunk7K2OJZ42cjs.se; exports.updateAgentFunctions = _chunk7K2OJZ42cjs.ve; exports.updateAgents = _chunk7K2OJZ42cjs.ye; exports.updateBusinessEntities = _chunk7K2OJZ42cjs.Ce; exports.updateCodePackages = _chunk7K2OJZ42cjs.Le; exports.updateConsentManagerToLatest = _chunk7K2OJZ42cjs.Ac; exports.updateConsentManagerVersionToLatest = _chunkC75HAQGXcjs.a; exports.updateDataCategories = _chunk7K2OJZ42cjs.Se; exports.updateDataFlows = _chunk7K2OJZ42cjs.Ue; exports.updateIntlMessages = _chunk7K2OJZ42cjs.Ze; exports.updateOrCreateCookies = _chunk7K2OJZ42cjs.Pe; exports.updatePolicies = _chunk7K2OJZ42cjs.$e; exports.updateProcessingPurposes = _chunk7K2OJZ42cjs.ef; exports.updatePrompts = _chunk7K2OJZ42cjs.hf; exports.updateRepositories = _chunk7K2OJZ42cjs.Ie; exports.updateSoftwareDevelopmentKits = _chunk7K2OJZ42cjs.Fe; exports.updateVendors = _chunk7K2OJZ42cjs.kf; exports.uploadConsents = _chunk4U5KIWRNcjs.d; exports.uploadCookiesFromCsv = _chunkC75HAQGXcjs.c; exports.uploadDataFlowsFromCsv = _chunkC75HAQGXcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunk7K2OJZ42cjs.If; exports.uploadSiloDiscoveryResults = _chunk7K2OJZ42cjs.mf; exports.validateTranscendAuth = _chunk5ES627PZcjs.b; exports.version = _chunkD7F476WZcjs.m; exports.writeCsv = _chunk7K2OJZ42cjs.og; exports.writeCsvSync = _chunk7K2OJZ42cjs.kg; exports.writeLargeCsv = _chunk7K2OJZ42cjs.qg; exports.writeTranscendYaml = _chunkRE5YALEOcjs.e;
|
|
3
|
+
`)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkUBVZKE7Vcjs.c.call(void 0, p.split(`
|
|
4
|
+
`).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunkFE6CECEScjs.ub; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunkFE6CECEScjs.Ha; exports.ADD_SILO_DISCOVERY_RESULTS = _chunkFE6CECEScjs.H; exports.ADMIN_DASH = _chunkUBVZKE7Vcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkUBVZKE7Vcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkUBVZKE7Vcjs.p; exports.AGENTS = _chunkFE6CECEScjs.Hb; exports.AGENT_FILES = _chunkFE6CECEScjs.Kb; exports.AGENT_FUNCTIONS = _chunkFE6CECEScjs.Nb; exports.API_KEYS = _chunkFE6CECEScjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunkFE6CECEScjs.X; exports.ASSESSMENTS = _chunkFE6CECEScjs.fa; exports.ASSESSMENT_SECTION_FIELDS = _chunkFE6CECEScjs.ea; exports.ASSESSMENT_TEMPLATES = _chunkFE6CECEScjs.ja; exports.ASSUME_ROLE = _chunkFE6CECEScjs.Fb; exports.ATTRIBUTES = _chunkFE6CECEScjs.La; exports.ATTRIBUTE_KEYS_REQUESTS = _chunkFE6CECEScjs.M; exports.ATTRIBUTE_VALUES = _chunkFE6CECEScjs.Pa; exports.ActionInput = _chunk5UBGZNDCcjs.G; exports.ActionItemCollectionInput = _chunk5UBGZNDCcjs.R; exports.ActionItemInput = _chunk5UBGZNDCcjs.S; exports.AgentFileInput = _chunk5UBGZNDCcjs.o; exports.AgentFunctionInput = _chunk5UBGZNDCcjs.n; exports.AgentInput = _chunk5UBGZNDCcjs.m; exports.ApiKeyInput = _chunk5UBGZNDCcjs.c; exports.AssessmentAction = _chunkFE6CECEScjs.Rd; exports.AssessmentAnswerOptionInput = _chunk5UBGZNDCcjs.Y; exports.AssessmentDisplayLogicInput = _chunk5UBGZNDCcjs.V; exports.AssessmentInput = _chunk5UBGZNDCcjs.ca; exports.AssessmentNestedRule = _chunkFE6CECEScjs.Qd; exports.AssessmentNestedRuleInput = _chunk5UBGZNDCcjs.U; exports.AssessmentResourceInput = _chunk5UBGZNDCcjs.ba; exports.AssessmentRetentionScheduleInput = _chunk5UBGZNDCcjs.$; exports.AssessmentRiskLogic = _chunkFE6CECEScjs.Td; exports.AssessmentRule = _chunkFE6CECEScjs.Pd; exports.AssessmentRuleInput = _chunk5UBGZNDCcjs.T; exports.AssessmentRuleWithOperands = _chunkFE6CECEScjs.Nd; exports.AssessmentRuleWithoutOperands = _chunkFE6CECEScjs.Od; exports.AssessmentSectionInput = _chunk5UBGZNDCcjs._; exports.AssessmentSectionQuestionInput = _chunk5UBGZNDCcjs.Z; exports.AssessmentTemplateInput = _chunk5UBGZNDCcjs.aa; exports.AttestedExtraIdentifiers = _chunkFE6CECEScjs.qf; exports.AttributeInput = _chunk5UBGZNDCcjs.k; exports.AttributePreview = _chunk5UBGZNDCcjs.l; exports.AttributeValueInput = _chunk5UBGZNDCcjs.j; exports.BLANK = _chunkFE6CECEScjs.dc; exports.BULK_APPLY = _chunkFE6CECEScjs.cc; exports.BULK_REQUEST_FILES = _chunkFE6CECEScjs.Fa; exports.BUSINESS_ENTITIES = _chunkFE6CECEScjs.rb; exports.BusinessEntityInput = _chunk5UBGZNDCcjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunkFE6CECEScjs.Y; exports.CAN_APPLY_IN_BULK = _chunkFE6CECEScjs.hc; exports.CATALOGS = _chunkFE6CECEScjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunkFE6CECEScjs.va; exports.CODE_PACKAGES = _chunkFE6CECEScjs.Q; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunkFE6CECEScjs.qb; exports.CONSENT_PARTITIONS = _chunkFE6CECEScjs.Ua; exports.COOKIES = _chunkFE6CECEScjs.Za; exports.CREATE_ACTION_ITEMS = _chunkFE6CECEScjs.yb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunkFE6CECEScjs.Ja; exports.CREATE_AGENT = _chunkFE6CECEScjs.Ib; exports.CREATE_AGENT_FILE = _chunkFE6CECEScjs.Lb; exports.CREATE_AGENT_FUNCTION = _chunkFE6CECEScjs.Ob; exports.CREATE_API_KEY = _chunkFE6CECEScjs.E; exports.CREATE_ATTRIBUTE = _chunkFE6CECEScjs.Qa; exports.CREATE_ATTRIBUTE_VALUES = _chunkFE6CECEScjs.Ma; exports.CREATE_BUSINESS_ENTITY = _chunkFE6CECEScjs.sb; exports.CREATE_CODE_PACKAGE = _chunkFE6CECEScjs.S; exports.CREATE_CONSENT_EXPERIENCE = _chunkFE6CECEScjs.ob; exports.CREATE_CONSENT_MANAGER = _chunkFE6CECEScjs.bb; exports.CREATE_CONSENT_PARTITION = _chunkFE6CECEScjs.pb; exports.CREATE_DATA_FLOWS = _chunkFE6CECEScjs.Va; exports.CREATE_DATA_SILOS = _chunkFE6CECEScjs.m; exports.CREATE_DATA_SUBJECT = _chunkFE6CECEScjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunkFE6CECEScjs.Ub; exports.CREATE_ENRICHER = _chunkFE6CECEScjs.p; exports.CREATE_IDENTIFIER = _chunkFE6CECEScjs.u; exports.CREATE_PREFERENCE_ACCESS_TOKENS = _chunkFE6CECEScjs.G; exports.CREATE_PROCESSING_ACTIVITY = _chunkFE6CECEScjs._b; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunkFE6CECEScjs.Xb; exports.CREATE_PROMPT = _chunkFE6CECEScjs.pa; exports.CREATE_PROMPT_GROUP = _chunkFE6CECEScjs.ta; exports.CREATE_PROMPT_PARTIAL = _chunkFE6CECEScjs.ra; exports.CREATE_REPOSITORY = _chunkFE6CECEScjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunkFE6CECEScjs.P; exports.CREATE_TEAM = _chunkFE6CECEScjs.za; exports.CREATE_TEMPLATE = _chunkFE6CECEScjs.K; exports.CREATE_VENDOR = _chunkFE6CECEScjs.Rb; exports.CachedFileState = _chunkFE6CECEScjs.ic; exports.CachedRequestState = _chunkFE6CECEScjs.kc; exports.CodePackageInput = _chunk5UBGZNDCcjs.D; exports.CodePackageSdk = _chunk5UBGZNDCcjs.C; exports.ColumnName = _chunkFE6CECEScjs.fc; exports.ConsentManageExperienceInput = _chunk5UBGZNDCcjs.K; exports.ConsentManagerInput = _chunk5UBGZNDCcjs.M; exports.ConsentManagerMetricBin = _chunkFE6CECEScjs.Sc; exports.ConsentManagerServiceMetadata = _chunk5UBGZNDCcjs.ka; exports.ConsentPreferenceTopic = _chunk5UBGZNDCcjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunk5UBGZNDCcjs.da; exports.ConsentPurpose = _chunk5UBGZNDCcjs.fa; exports.CookieCsvInput = _chunk5UBGZNDCcjs.ja; exports.CookieInput = _chunk5UBGZNDCcjs.J; exports.CronIdentifier = _chunkBLSMEA5Ccjs.a; exports.CronIdentifierPush = _chunkBLSMEA5Ccjs.c; exports.DATAPOINT_EXPORT = _chunkFE6CECEScjs.g; exports.DATA_FLOWS = _chunkFE6CECEScjs.Ya; exports.DATA_POINTS = _chunkFE6CECEScjs.a; exports.DATA_POINT_COUNT = _chunkFE6CECEScjs.b; exports.DATA_SILOS = _chunkFE6CECEScjs.i; exports.DATA_SILOS_ENRICHED = _chunkFE6CECEScjs.k; exports.DATA_SILO_EXPORT = _chunkFE6CECEScjs.j; exports.DATA_SUBJECTS = _chunkFE6CECEScjs.w; exports.DATA_SUB_CATEGORIES = _chunkFE6CECEScjs.Tb; exports.DAY_MS = _chunkFE6CECEScjs.dg; exports.DEBUG = _chunkUBVZKE7Vcjs.z; exports.DEFAULT_TRANSCEND_API = _chunkUBVZKE7Vcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkUBVZKE7Vcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunkFE6CECEScjs.fe; exports.DELETE_API_KEY = _chunkFE6CECEScjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunkFE6CECEScjs.Oa; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunkFE6CECEScjs.Ab; exports.DEPLOY_CONSENT_MANAGER = _chunkFE6CECEScjs.eb; exports.DETERMINE_LOGIN_METHOD = _chunkFE6CECEScjs.Db; exports.DataCategoryGuessInput = _chunk5UBGZNDCcjs.h; exports.DataCategoryInput = _chunk5UBGZNDCcjs.q; exports.DataCategoryPreviewInput = _chunk5UBGZNDCcjs.g; exports.DataCategoryRecommendationInput = _chunk5UBGZNDCcjs.i; exports.DataFlowCsvInput = _chunk5UBGZNDCcjs.ia; exports.DataFlowInput = _chunk5UBGZNDCcjs.I; exports.DataSiloInput = _chunk5UBGZNDCcjs.Q; exports.DataSubjectInput = _chunk5UBGZNDCcjs.F; exports.DatapointInput = _chunk5UBGZNDCcjs.w; exports.ENABLED_PLUGINS = _chunkFE6CECEScjs.I; exports.ENRICHERS = _chunkFE6CECEScjs.n; exports.ENTRY_COUNT = _chunkFE6CECEScjs.h; exports.EXPERIENCES = _chunkFE6CECEScjs.Ta; exports.EnrichPrivacyRequest = _chunk6GWHYOPMcjs.b; exports.EnricherInput = _chunk5UBGZNDCcjs.e; exports.FETCH_CONSENT_MANAGER = _chunkFE6CECEScjs.$a; exports.FETCH_CONSENT_MANAGER_ID = _chunkFE6CECEScjs._a; exports.FETCH_CONSENT_MANAGER_THEME = _chunkFE6CECEScjs.ab; exports.FETCH_PRIVACY_CENTER_ID = _chunkFE6CECEScjs.zb; exports.FieldInput = _chunk5UBGZNDCcjs.v; exports.GLOBAL_ACTION_ITEMS = _chunkFE6CECEScjs.wb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunkFE6CECEScjs.Ia; exports.HOUR_MS = _chunkFE6CECEScjs.eg; exports.IDENTIFIERS = _chunkFE6CECEScjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunkFE6CECEScjs.ec; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunkFE6CECEScjs.ga; exports.INITIALIZER = _chunkFE6CECEScjs.o; exports.IP_ADDRESS_REGEX = _chunk4LSUJDDHcjs.f; exports.IS_REQUIRED = _chunkFE6CECEScjs.gc; exports.IdentifierInput = _chunk5UBGZNDCcjs.H; exports.ImportOnetrustAssessmentsInput = _chunk5UBGZNDCcjs.ra; exports.IntlMessage = _chunkFE6CECEScjs.uf; exports.IntlMessageInput = _chunk5UBGZNDCcjs.P; exports.LARGE_LANGUAGE_MODELS = _chunkFE6CECEScjs.Gb; exports.LOGIN = _chunkFE6CECEScjs.Eb; exports.MESSAGES = _chunkFE6CECEScjs.$; exports.NEW_IDENTIFIER_TYPES = _chunkFE6CECEScjs.t; exports.NONE = _chunkFE6CECEScjs.bc; exports.NOTIFY_ADDITIONAL_TIME = _chunkFE6CECEScjs._; exports.ORGANIZATION = _chunkFE6CECEScjs.L; exports.OneTrustFileFormat = _chunkQ7I37FJVcjs.a; exports.OneTrustPullResource = _chunkQ7I37FJVcjs.b; exports.OneTrustPullSource = _chunkQ7I37FJVcjs.c; exports.OpenAIEnabledRoute = _chunk5UBGZNDCcjs.ma; exports.OpenAIEnabledRoutes = _chunk5UBGZNDCcjs.na; exports.OpenAIIntegration = _chunk5UBGZNDCcjs.oa; exports.OpenAIRouteName = _chunkQ7I37FJVcjs.f; exports.POLICIES = _chunkFE6CECEScjs.U; exports.PREFERENCE_TOPICS = _chunkFE6CECEScjs.ia; exports.PRIVACY_CENTER = _chunkFE6CECEScjs.Bb; exports.PROCESSING_ACTIVITIES = _chunkFE6CECEScjs.Zb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkFE6CECEScjs.Wb; exports.PROMPTS = _chunkFE6CECEScjs.ka; exports.PROMPTS_WITH_VARIABLES = _chunkFE6CECEScjs.na; exports.PROMPT_GROUPS = _chunkFE6CECEScjs.ma; exports.PROMPT_PARTIALS = _chunkFE6CECEScjs.la; exports.PROMPT_THREADS = _chunkFE6CECEScjs.T; exports.PURPOSES = _chunkFE6CECEScjs.ha; exports.ParsedAttributeInput = _chunkFE6CECEScjs.pc; exports.PartitionInput = _chunk5UBGZNDCcjs.L; exports.PathfinderPolicy = _chunk5UBGZNDCcjs.pa; exports.PathfinderPolicyName = _chunkQ7I37FJVcjs.e; exports.PathfinderPolicyNameC = _chunk5UBGZNDCcjs.la; exports.PathfinderPromptRunMetadata = _chunk5UBGZNDCcjs.qa; exports.PolicyInput = _chunk5UBGZNDCcjs.O; exports.PrivacyCenterInput = _chunk5UBGZNDCcjs.N; exports.PrivacyRequest = _chunkFE6CECEScjs.md; exports.PrivacyRequestInput = _chunkFE6CECEScjs.rf; exports.PrivacyRequestResponse = _chunkFE6CECEScjs.Af; exports.ProcessingActivityInput = _chunk5UBGZNDCcjs.A; exports.ProcessingPurposeInput = _chunk5UBGZNDCcjs.r; exports.ProcessingPurposePreviewInput = _chunk5UBGZNDCcjs.f; exports.PromptAVendorEmailSettings = _chunk5UBGZNDCcjs.x; exports.PromptGroupInput = _chunk5UBGZNDCcjs.u; exports.PromptInput = _chunk5UBGZNDCcjs.s; exports.PromptPartialInput = _chunk5UBGZNDCcjs.t; exports.PurposeMap = _chunkACHJOO4Scjs.c; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunkFE6CECEScjs.xa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunkFE6CECEScjs.Ba; exports.REPORT_PROMPT_RUN = _chunkFE6CECEScjs.Ga; exports.REPOSITORIES = _chunkFE6CECEScjs.A; exports.REQUESTS = _chunkFE6CECEScjs.W; exports.REQUEST_DATA_SILOS = _chunkFE6CECEScjs.ua; exports.REQUEST_ENRICHERS = _chunkFE6CECEScjs.ba; exports.REQUEST_FILES = _chunkFE6CECEScjs.Ea; exports.REQUEST_IDENTIFIERS = _chunkFE6CECEScjs.Ca; exports.RETRYABLE_BATCH_STATUSES = _chunkUBVZKE7Vcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunkFE6CECEScjs.wa; exports.RETRY_REQUEST_ENRICHER = _chunkFE6CECEScjs.ca; exports.RateCounter = _chunkFE6CECEScjs.$f; exports.RegionInput = _chunk5UBGZNDCcjs.z; exports.RepositoryInput = _chunk5UBGZNDCcjs.E; exports.RequestFileMetadata = _chunkFE6CECEScjs.vf; exports.RequestFileMetadataResponse = _chunkFE6CECEScjs.wf; exports.RequestIdentifiersResponse = _chunkFE6CECEScjs.jd; exports.RequestPurposeTrigger = _chunkFE6CECEScjs.ld; exports.RiskAssignmentInput = _chunk5UBGZNDCcjs.W; exports.RiskLogicInput = _chunk5UBGZNDCcjs.X; exports.SCOPES_BY_TITLE = _chunkUBVZKE7Vcjs.w; exports.SCOPE_TITLES = _chunkUBVZKE7Vcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunkFE6CECEScjs.Sa; exports.SKIP_REQUEST_ENRICHER = _chunkFE6CECEScjs.da; exports.SOFTWARE_DEVELOPMENT_KITS = _chunkFE6CECEScjs.N; exports.SOMBRA_VERSION = _chunkFE6CECEScjs.ac; exports.SUB_DATA_POINTS = _chunkFE6CECEScjs.c; exports.SUB_DATA_POINTS_COUNT = _chunkFE6CECEScjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunkFE6CECEScjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunkFE6CECEScjs.Mc; exports.SoftwareDevelopmentKitInput = _chunk5UBGZNDCcjs.B; exports.StoredApiKey = _chunk5UBGZNDCcjs.ha; exports.SuccessfulRequest = _chunkFE6CECEScjs.jc; exports.TEAMS = _chunkFE6CECEScjs.ya; exports.TEMPLATES = _chunkFE6CECEScjs.J; exports.TOGGLE_CONSENT_PRECEDENCE = _chunkFE6CECEScjs.lb; exports.TOGGLE_DATA_SUBJECT = _chunkFE6CECEScjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunkFE6CECEScjs.kb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunkFE6CECEScjs.jb; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunkFE6CECEScjs.ib; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkUBVZKE7Vcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkUBVZKE7Vcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkUBVZKE7Vcjs.v; exports.TeamInput = _chunk5UBGZNDCcjs.d; exports.TemplateInput = _chunk5UBGZNDCcjs.a; exports.TranscendInput = _chunk5UBGZNDCcjs.ga; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunkQ7I37FJVcjs.d; exports.UPDATE_ACTION = _chunkFE6CECEScjs.vb; exports.UPDATE_ACTION_ITEMS = _chunkFE6CECEScjs.xb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunkFE6CECEScjs.Ka; exports.UPDATE_AGENTS = _chunkFE6CECEScjs.Jb; exports.UPDATE_AGENT_FILES = _chunkFE6CECEScjs.Mb; exports.UPDATE_AGENT_FUNCTIONS = _chunkFE6CECEScjs.Pb; exports.UPDATE_ATTRIBUTE = _chunkFE6CECEScjs.Ra; exports.UPDATE_ATTRIBUTE_VALUES = _chunkFE6CECEScjs.Na; exports.UPDATE_BUSINESS_ENTITIES = _chunkFE6CECEScjs.tb; exports.UPDATE_CODE_PACKAGES = _chunkFE6CECEScjs.R; exports.UPDATE_CONSENT_EXPERIENCE = _chunkFE6CECEScjs.nb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunkFE6CECEScjs.fb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunkFE6CECEScjs.gb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunkFE6CECEScjs.mb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunkFE6CECEScjs.db; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunkFE6CECEScjs.cb; exports.UPDATE_DATA_FLOWS = _chunkFE6CECEScjs.Wa; exports.UPDATE_DATA_SILOS = _chunkFE6CECEScjs.l; exports.UPDATE_DATA_SUBJECT = _chunkFE6CECEScjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunkFE6CECEScjs.Vb; exports.UPDATE_ENRICHER = _chunkFE6CECEScjs.q; exports.UPDATE_IDENTIFIER = _chunkFE6CECEScjs.v; exports.UPDATE_INTL_MESSAGES = _chunkFE6CECEScjs.aa; exports.UPDATE_LOAD_OPTIONS = _chunkFE6CECEScjs.hb; exports.UPDATE_OR_CREATE_COOKIES = _chunkFE6CECEScjs.Xa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunkFE6CECEScjs.f; exports.UPDATE_POLICIES = _chunkFE6CECEScjs.V; exports.UPDATE_PRIVACY_CENTER = _chunkFE6CECEScjs.Cb; exports.UPDATE_PRIVACY_REQUEST = _chunkFE6CECEScjs.Z; exports.UPDATE_PROCESSING_ACTIVITIES = _chunkFE6CECEScjs.$b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkFE6CECEScjs.Yb; exports.UPDATE_PROMPTS = _chunkFE6CECEScjs.oa; exports.UPDATE_PROMPT_GROUPS = _chunkFE6CECEScjs.sa; exports.UPDATE_PROMPT_PARTIALS = _chunkFE6CECEScjs.qa; exports.UPDATE_REPOSITORIES = _chunkFE6CECEScjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunkFE6CECEScjs.O; exports.UPDATE_TEAM = _chunkFE6CECEScjs.Aa; exports.UPDATE_VENDORS = _chunkFE6CECEScjs.Sb; exports.USERS = _chunkFE6CECEScjs.Da; exports.USP_STRING_REGEX = _chunkACHJOO4Scjs.b; exports.VARIABLE_PARAMETERS_NAME = _chunkRE5YALEOcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkRE5YALEOcjs.a; exports.VENDORS = _chunkFE6CECEScjs.Qb; exports.VendorInput = _chunk5UBGZNDCcjs.p; exports.WebhookHeader = _chunk5UBGZNDCcjs.b; exports.addDaysUtc = _chunkFE6CECEScjs.jg; exports.addMessagesToPromptRun = _chunkFE6CECEScjs.uc; exports.addMs = _chunkFE6CECEScjs.ig; exports.appendCsvRowsOrdered = _chunkFE6CECEScjs.mg; exports.appendCsvSync = _chunkFE6CECEScjs.ng; exports.approvePrivacyRequests = _chunkFE6CECEScjs.Cf; exports.assumeRole = _chunkFE6CECEScjs.Kd; exports.buildAIIntegrationType = _chunkLCDYXJN6cjs.b; exports.buildEnabledRouteType = _chunkLCDYXJN6cjs.a; exports.buildTranscendGraphQLClient = _chunkFE6CECEScjs.wc; exports.buildTranscendGraphQLClientGeneric = _chunkFE6CECEScjs.vc; exports.buildXdiSyncEndpoint = _chunk4LSUJDDHcjs.g; exports.bulkRestartRequests = _chunkFE6CECEScjs.Kf; exports.bulkRetryEnrichers = _chunkFE6CECEScjs.Mf; exports.cancelPrivacyRequests = _chunkFE6CECEScjs.Ff; exports.clampPageSize = _chunkFE6CECEScjs.fg; exports.collectParquetFilesOrExit = _chunkFE6CECEScjs.bg; exports.consentManagersToBusinessEntities = _chunk4LSUJDDHcjs.h; exports.convertToDataSubjectAllowlist = _chunkFE6CECEScjs.yd; exports.convertToDataSubjectBlockList = _chunkFE6CECEScjs.xd; exports.createActionItemCollection = _chunkFE6CECEScjs.le; exports.createActionItems = _chunkFE6CECEScjs.oe; exports.createAgent = _chunkFE6CECEScjs.xe; exports.createAgentFile = _chunkFE6CECEScjs.re; exports.createAgentFunction = _chunkFE6CECEScjs.ue; exports.createApiKey = _chunkFE6CECEScjs.Ld; exports.createBusinessEntity = _chunkFE6CECEScjs.Be; exports.createCodePackage = _chunkFE6CECEScjs.Ke; exports.createConsentToken = _chunkACHJOO4Scjs.a; exports.createDataCategory = _chunkFE6CECEScjs.Re; exports.createDataFlows = _chunkFE6CECEScjs.Ve; exports.createPreferenceAccessTokens = _chunkFE6CECEScjs.Jc; exports.createProcessingPurpose = _chunkFE6CECEScjs.df; exports.createPrompt = _chunkFE6CECEScjs.gf; exports.createRegexForTag = j; exports.createRepository = _chunkFE6CECEScjs.He; exports.createSoftwareDevelopmentKit = _chunkFE6CECEScjs.Ee; exports.createSombraGotInstance = _chunkFE6CECEScjs.xc; exports.createTranscendConsentGotInstance = _chunkFE6CECEScjs.yc; exports.createVendor = _chunkFE6CECEScjs.jf; exports.defineTranscendPrompts = Km; exports.deleteApiKey = _chunkFE6CECEScjs.Md; exports.deployConsentManager = _chunkFE6CECEScjs.zc; exports.description = _chunkUBVZKE7Vcjs.l; exports.domainToHost = _chunk4LSUJDDHcjs.e; exports.downloadPrivacyRequestFiles = _chunkFE6CECEScjs.zf; exports.enrichPrivacyRequest = _chunk6GWHYOPMcjs.c; exports.ensureAllDataSubjectsExist = _chunkFE6CECEScjs.wd; exports.extractClientError = _chunkFE6CECEScjs.Hf; exports.extractErrorMessage = _chunkFE6CECEScjs.Wf; exports.fetchActiveSiloDiscoPlugin = _chunkFE6CECEScjs.Bc; exports.fetchAllActionItems = _chunkFE6CECEScjs.Cc; exports.fetchAllActions = _chunkFE6CECEScjs.Dc; exports.fetchAllAgentFiles = _chunkFE6CECEScjs.Ec; exports.fetchAllAgentFunctions = _chunkFE6CECEScjs.Fc; exports.fetchAllAgents = _chunkFE6CECEScjs.Gc; exports.fetchAllApiKeys = _chunkFE6CECEScjs.rd; exports.fetchAllAssessmentTemplates = _chunkFE6CECEScjs.Ic; exports.fetchAllAssessments = _chunkFE6CECEScjs.Hc; exports.fetchAllAttributeValues = _chunkFE6CECEScjs.Lc; exports.fetchAllAttributes = _chunkFE6CECEScjs.Nc; exports.fetchAllBusinessEntities = _chunkFE6CECEScjs.Oc; exports.fetchAllCatalogs = _chunkFE6CECEScjs.td; exports.fetchAllCookies = _chunkFE6CECEScjs.Vc; exports.fetchAllDataCategories = _chunkFE6CECEScjs.Wc; exports.fetchAllDataFlows = _chunkFE6CECEScjs.Xc; exports.fetchAllDataPoints = _chunkFE6CECEScjs.Xd; exports.fetchAllDataSilos = _chunkFE6CECEScjs.Vd; exports.fetchAllDataSubjects = _chunkFE6CECEScjs.vd; exports.fetchAllEnrichers = _chunkFE6CECEScjs.$d; exports.fetchAllIdentifiers = _chunkFE6CECEScjs.sg; exports.fetchAllMessages = _chunkFE6CECEScjs.Yc; exports.fetchAllPolicies = _chunkFE6CECEScjs.$c; exports.fetchAllPreferenceTopics = _chunkFE6CECEScjs.bd; exports.fetchAllPrivacyCenters = _chunkFE6CECEScjs.cd; exports.fetchAllProcessingActivities = _chunkFE6CECEScjs.dd; exports.fetchAllProcessingPurposes = _chunkFE6CECEScjs.ed; exports.fetchAllPromptGroups = _chunkFE6CECEScjs.zd; exports.fetchAllPromptPartials = _chunkFE6CECEScjs.Ad; exports.fetchAllPromptThreads = _chunkFE6CECEScjs.Dd; exports.fetchAllPrompts = _chunkFE6CECEScjs.Bd; exports.fetchAllPurposes = _chunkFE6CECEScjs.fd; exports.fetchAllPurposesAndPreferences = _chunkFE6CECEScjs.gd; exports.fetchAllRequestAttributeKeys = _chunkFE6CECEScjs.Kc; exports.fetchAllRequestEnrichers = _chunkFE6CECEScjs.hd; exports.fetchAllRequestIdentifierMetadata = _chunkFE6CECEScjs.id; exports.fetchAllRequestIdentifiers = _chunkFE6CECEScjs.kd; exports.fetchAllRequests = _chunkFE6CECEScjs.nd; exports.fetchAllSubDataPoints = _chunkFE6CECEScjs.Wd; exports.fetchAllTeams = _chunkFE6CECEScjs.od; exports.fetchAllTemplates = _chunkFE6CECEScjs.be; exports.fetchAllUsers = _chunkFE6CECEScjs.pd; exports.fetchAllVendors = _chunkFE6CECEScjs.qd; exports.fetchAndIndexCatalogs = _chunkFE6CECEScjs.ud; exports.fetchApiKeys = _chunkFE6CECEScjs.sd; exports.fetchConsentManager = _chunkFE6CECEScjs.Pc; exports.fetchConsentManagerAnalyticsData = _chunkFE6CECEScjs.Tc; exports.fetchConsentManagerExperiences = _chunkFE6CECEScjs.Rc; exports.fetchConsentManagerId = _chunkFE6CECEScjs.Qc; exports.fetchConsentManagerTheme = _chunkFE6CECEScjs.Uc; exports.fetchEnrichedDataSilos = _chunkFE6CECEScjs.Yd; exports.fetchIdentifiersAndCreateMissing = _chunkFE6CECEScjs.tg; exports.fetchPartitions = _chunkFE6CECEScjs.de; exports.fetchPrivacyCenterId = _chunkFE6CECEScjs._c; exports.fetchPrivacyCenterUrl = _chunkFE6CECEScjs.Zc; exports.fetchPromptsWithVariables = _chunkFE6CECEScjs.Cd; exports.fetchRequestDataSilo = _chunkFE6CECEScjs.Gd; exports.fetchRequestDataSiloActiveCount = _chunkFE6CECEScjs.Hd; exports.fetchRequestDataSilos = _chunkFE6CECEScjs.Fd; exports.fetchRequestDataSilosCount = _chunkFE6CECEScjs.Ed; exports.fetchRequestFilesForRequest = _chunkFE6CECEScjs.Id; exports.filterNullishValuesFromObject = ec; exports.filterRows = _chunkFE6CECEScjs.tc; exports.formatAttributeValues = _chunkFE6CECEScjs.ad; exports.fuzzyMatchColumns = _chunkFE6CECEScjs.mc; exports.fuzzySearch = _chunkFE6CECEScjs.lc; exports.generateCrossAccountApiKeys = _chunkJKEVZFNYcjs.a; exports.getErrorStatus = _chunkFE6CECEScjs.Vf; exports.getFileMetadataForPrivacyRequests = _chunkFE6CECEScjs.xf; exports.getGitFilesThatChanged = ac; exports.getUniqueValuesForColumn = _chunkFE6CECEScjs.sc; exports.initCsvFile = _chunkFE6CECEScjs.lg; exports.inquirerAutoComplete = _chunkFE6CECEScjs.Tf; exports.inquirerConfirmBoolean = _chunkFE6CECEScjs.Rf; exports.inquirerConfirmText = _chunkFE6CECEScjs.Sf; exports.limitRecords = _chunkFE6CECEScjs._f; exports.listDirectories = _chunkJKEVZFNYcjs.d; exports.listFiles = _chunkJKEVZFNYcjs.c; exports.loginUser = _chunkFE6CECEScjs.Jd; exports.makeGraphQLRequest = _chunkFE6CECEScjs.rg; exports.mapColumnsToAttributes = _chunkFE6CECEScjs.Gf; exports.mapColumnsToIdentifiers = _chunkFE6CECEScjs.Ef; exports.mapCsvColumnsToApi = _chunkFE6CECEScjs.of; exports.mapCsvRowsToRequestInputs = _chunkFE6CECEScjs.tf; exports.mapEnumValues = _chunkFE6CECEScjs.nc; exports.mapRequestEnumValues = _chunkFE6CECEScjs.pf; exports.markCronIdentifierCompleted = _chunkBLSMEA5Ccjs.d; exports.markRequestDataSiloIdsCompleted = _chunkBLSMEA5Ccjs.f; exports.markSilentPrivacyRequests = _chunkFE6CECEScjs.nf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkUBVZKE7Vcjs.n; exports.normalizeIdentifierValue = _chunkFE6CECEScjs.sf; exports.notifyPrivacyRequestsAdditionalTime = _chunkFE6CECEScjs.Df; exports.parquetToCsvOneFile = _chunkFE6CECEScjs.cg; exports.parseAssessmentDisplayLogic = _chunkFE6CECEScjs.Sd; exports.parseAssessmentRiskLogic = _chunkFE6CECEScjs.Ud; exports.parseAttributesFromString = _chunkFE6CECEScjs.qc; exports.parseFilePath = _chunkFE6CECEScjs.pg; exports.parseVariablesFromString = _chunkFE6CECEScjs.Uf; exports.pullAllDatapoints = _chunk5HNRVLH2cjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkBLSMEA5Ccjs.g; exports.pullConsentManagerMetrics = _chunk4LSUJDDHcjs.d; exports.pullCronPageOfIdentifiers = _chunkBLSMEA5Ccjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunk6GWHYOPMcjs.a; exports.pullPrivacyRequests = _chunkFE6CECEScjs.Of; exports.pullTranscendConfiguration = _chunkFE6CECEScjs.ge; exports.pullUnstructuredSubDataPointRecommendations = _chunk5HNRVLH2cjs.b; exports.pushCronIdentifiersFromCsv = _chunkBLSMEA5Ccjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunk6GWHYOPMcjs.d; exports.readCsv = _chunkFE6CECEScjs.rc; exports.readSafe = _chunkFE6CECEScjs.ag; exports.readTranscendYaml = _chunkRE5YALEOcjs.d; exports.removeLinks = Ym; exports.removeUnverifiedRequestIdentifiers = _chunkFE6CECEScjs.Qf; exports.replaceVariablesInYaml = _chunkRE5YALEOcjs.c; exports.reportPromptRun = _chunkFE6CECEScjs.he; exports.restartPrivacyRequest = _chunkFE6CECEScjs.Jf; exports.retryRequestDataSilos = _chunkFE6CECEScjs.Nf; exports.retryRequestEnricher = _chunkFE6CECEScjs.ie; exports.retrySamePromise = _chunkFE6CECEScjs.Zf; exports.setResourceAttributes = _chunkFE6CECEScjs.je; exports.skipPreflightJobs = _chunkFE6CECEScjs.Lf; exports.skipRequestDataSilos = _chunkFE6CECEScjs.Pf; exports.sleepPromise = _chunkFE6CECEScjs.Xf; exports.splitCsvToList = _chunkFE6CECEScjs.oc; exports.splitInHalf = _chunkFE6CECEScjs.Yf; exports.startOfHour = _chunkFE6CECEScjs.hg; exports.startOfUtcDay = _chunkFE6CECEScjs.gg; exports.streamPrivacyRequestFiles = _chunkFE6CECEScjs.yf; exports.submitPrivacyRequest = _chunkFE6CECEScjs.Bf; exports.syncAction = _chunkFE6CECEScjs.ke; exports.syncActionItemCollections = _chunkFE6CECEScjs.ne; exports.syncActionItems = _chunkFE6CECEScjs.qe; exports.syncAgentFiles = _chunkFE6CECEScjs.te; exports.syncAgentFunctions = _chunkFE6CECEScjs.we; exports.syncAgents = _chunkFE6CECEScjs.ze; exports.syncAttribute = _chunkFE6CECEScjs.Ae; exports.syncBusinessEntities = _chunkFE6CECEScjs.De; exports.syncCodePackages = _chunkFE6CECEScjs.Me; exports.syncConfigurationToTranscend = _chunkFE6CECEScjs.ug; exports.syncConsentManager = _chunkFE6CECEScjs.Oe; exports.syncConsentManagerExperiences = _chunkFE6CECEScjs.Ne; exports.syncCookies = _chunkFE6CECEScjs.Qe; exports.syncDataCategories = _chunkFE6CECEScjs.Te; exports.syncDataFlows = _chunkFE6CECEScjs.We; exports.syncDataSiloDependencies = _chunkFE6CECEScjs._d; exports.syncDataSilos = _chunkFE6CECEScjs.Zd; exports.syncDataSubject = _chunkFE6CECEScjs.Xe; exports.syncEnricher = _chunkFE6CECEScjs.ae; exports.syncIdentifier = _chunkFE6CECEScjs.Ye; exports.syncIntlMessages = _chunkFE6CECEScjs._e; exports.syncPartitions = _chunkFE6CECEScjs.ee; exports.syncPolicies = _chunkFE6CECEScjs.af; exports.syncPrivacyCenter = _chunkFE6CECEScjs.bf; exports.syncProcessingActivities = _chunkFE6CECEScjs.cf; exports.syncProcessingPurposes = _chunkFE6CECEScjs.ff; exports.syncPrompts = _chunkFE6CECEScjs.if; exports.syncRepositories = _chunkFE6CECEScjs.Je; exports.syncSoftwareDevelopmentKits = _chunkFE6CECEScjs.Ge; exports.syncTemplate = _chunkFE6CECEScjs.ce; exports.syncVendors = _chunkFE6CECEScjs.lf; exports.updateActionItem = _chunkFE6CECEScjs.pe; exports.updateActionItemCollection = _chunkFE6CECEScjs.me; exports.updateAgentFiles = _chunkFE6CECEScjs.se; exports.updateAgentFunctions = _chunkFE6CECEScjs.ve; exports.updateAgents = _chunkFE6CECEScjs.ye; exports.updateBusinessEntities = _chunkFE6CECEScjs.Ce; exports.updateCodePackages = _chunkFE6CECEScjs.Le; exports.updateConsentManagerToLatest = _chunkFE6CECEScjs.Ac; exports.updateConsentManagerVersionToLatest = _chunk4LSUJDDHcjs.a; exports.updateDataCategories = _chunkFE6CECEScjs.Se; exports.updateDataFlows = _chunkFE6CECEScjs.Ue; exports.updateIntlMessages = _chunkFE6CECEScjs.Ze; exports.updateOrCreateCookies = _chunkFE6CECEScjs.Pe; exports.updatePolicies = _chunkFE6CECEScjs.$e; exports.updateProcessingPurposes = _chunkFE6CECEScjs.ef; exports.updatePrompts = _chunkFE6CECEScjs.hf; exports.updateRepositories = _chunkFE6CECEScjs.Ie; exports.updateSoftwareDevelopmentKits = _chunkFE6CECEScjs.Fe; exports.updateVendors = _chunkFE6CECEScjs.kf; exports.uploadConsents = _chunkACHJOO4Scjs.d; exports.uploadCookiesFromCsv = _chunk4LSUJDDHcjs.c; exports.uploadDataFlowsFromCsv = _chunk4LSUJDDHcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunkFE6CECEScjs.If; exports.uploadSiloDiscoveryResults = _chunkFE6CECEScjs.mf; exports.validateTranscendAuth = _chunkJKEVZFNYcjs.b; exports.version = _chunkUBVZKE7Vcjs.m; exports.writeCsv = _chunkFE6CECEScjs.og; exports.writeCsvSync = _chunkFE6CECEScjs.kg; exports.writeLargeCsv = _chunkFE6CECEScjs.qg; exports.writeTranscendYaml = _chunkRE5YALEOcjs.e;
|
|
5
5
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -145348,7 +145348,7 @@ declare function removeUnverifiedRequestIdentifiers({ requestActions, identifier
|
|
|
145348
145348
|
}): Promise<number>;
|
|
145349
145349
|
|
|
145350
145350
|
var description = "A command line interface for programmatic operations across Transcend.";
|
|
145351
|
-
var version = "8.26.
|
|
145351
|
+
var version = "8.26.2";
|
|
145352
145352
|
|
|
145353
145353
|
/**
|
|
145354
145354
|
* The name of the main binary for the CLI
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "Transcend Inc.",
|
|
3
3
|
"name": "@transcend-io/cli",
|
|
4
4
|
"description": "A command line interface for programmatic operations across Transcend.",
|
|
5
|
-
"version": "8.26.
|
|
5
|
+
"version": "8.26.2",
|
|
6
6
|
"homepage": "https://github.com/transcend-io/cli",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-L75V2N2G.cjs","../src/lib/preference-management/uploadPreferenceManagementPreferencesInteractive.ts","../src/lib/preference-management/parsePreferenceManagementCsv.ts","../src/lib/preference-management/getPreferencesForIdentifiers.ts","../src/lib/preference-management/withPreferenceQueryRetry.ts","../src/lib/preference-management/parsePreferenceIdentifiersFromCsv.ts","../src/lib/preference-management/parsePreferenceAndPurposeValuesFromCsv.ts","../src/lib/preference-management/codecs.ts"],"names":["RETRY_PREFERENCE_MSGS","withPreferenceQueryRetry","fn","maxAttempts","baseDelayMs","isRetryable","_err","msg","m","onRetry","attempt","err"],"mappings":"AAAA,2lCAAqK,wDAAyC,wDAAuE,gFCQlQ,oCACC,qGAGI,+DAEO,qJCXZ,qDCES,ICGfA,EAAAA,CAAkC,CAC7C,WAAA,CACA,YAAA,CACA,WAAA,CACA,sBAAA,CACA,sBACF,CAAA,CAwBA,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,WAAA,CAAAC,CAAAA,CAAc,CAAA,CACd,WAAA,CAAAC,CAAAA,CAAc,GAAA,CACd,WAAA,CAAAC,CAAAA,CAAc,CAACC,CAAAA,CAAMC,CAAAA,CAAAA,EACnBP,EAAAA,CAAsB,IAAA,CAAMQ,CAAAA,EAAMD,CAAAA,CAAI,QAAA,CAASC,CAAC,CAAC,CAAA,CACnD,OAAA,CAAAC,CACF,CAAA,CAAkB,CAAC,CAAA,CACP,CACZ,IAAIC,CAAAA,CAAU,CAAA,CAEd,GAAA,CAAA,CAAA,CAAA,CAAa,CACXA,CAAAA,EAAW,CAAA,CACX,GAAI,CACF,OAAO,MAAMR,CAAAA,CAAG,CAElB,CAAA,KAAA,CAASS,CAAAA,CAAU,CACjB,IAAMJ,CAAAA,kBAAAA,CACHI,CAAAA,EAAAA,iBAAQA,CAAAA,qBAAI,QAAA,6BAAU,MAAA,EAAQA,CAAAA,CAAI,OAAA,CAAA,CAAA,SACnC,MAAA,kBAAOA,CAAAA,SAAO,iBAAe,GAAA,CAE/B,EAAA,CAAI,CAAA,CADcD,CAAAA,CAAUP,CAAAA,EAAeE,CAAAA,CAAYM,CAAAA,CAAKJ,CAAG,CAAA,CAAA,CAE7D,MAAM,IAAI,KAAA,CACR,CAAA,8BAAA,EAAiCG,CAAO,CAAA,aAAA,EAAgBH,CAAG,CAAA,CAAA;AC6B7D;ACdE;ACiBsD,oGAAA;ANJxD;AAGA;AAAA;AAKQ;AAAK;AACgC,sCAAA;AAyF3C","file":"/home/runner/work/cli/cli/dist/chunk-L75V2N2G.cjs","sourcesContent":[null,"import {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllPurposes,\n fetchAllPreferenceTopics,\n PreferenceTopic,\n Purpose,\n} from '../graphql';\nimport colors from 'colors';\nimport { map } from 'bluebird';\nimport { chunk } from 'lodash-es';\nimport { logger } from '../../logger';\nimport cliProgress from 'cli-progress';\nimport { parseAttributesFromString } from '../requests';\nimport { PersistedState } from '@transcend-io/persisted-state';\nimport { parsePreferenceManagementCsvWithCache } from './parsePreferenceManagementCsv';\nimport { PreferenceState } from './codecs';\nimport { PreferenceUpdateItem } from '@transcend-io/privacy-types';\nimport { apply } from '@transcend-io/type-utils';\nimport { NONE_PREFERENCE_MAP } from './parsePreferenceTimestampsFromCsv';\nimport { getPreferenceUpdatesFromRow } from './getPreferenceUpdatesFromRow';\n\n/**\n * Upload a set of consent preferences\n *\n * @param options - Options\n */\nexport async function uploadPreferenceManagementPreferencesInteractive({\n auth,\n sombraAuth,\n receiptFilepath,\n file,\n partition,\n isSilent = true,\n dryRun = false,\n skipWorkflowTriggers = false,\n skipConflictUpdates = false,\n skipExistingRecordCheck = false,\n attributes = [],\n transcendUrl,\n forceTriggerWorkflows = false,\n}: {\n /** The Transcend API key */\n auth: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Partition key */\n partition: string;\n /** File where to store receipt and continue from where left off */\n receiptFilepath: string;\n /** The file to process */\n file: string;\n /** API URL for Transcend backend */\n transcendUrl: string;\n /** Whether to do a dry run */\n dryRun?: boolean;\n /** Whether to upload as isSilent */\n isSilent?: boolean;\n /** Attributes string pre-parse. In format Key:Value */\n attributes?: string[];\n /** Skip workflow triggers */\n skipWorkflowTriggers?: boolean;\n /**\n * When true, only update preferences that do not conflict with existing\n * preferences. When false, update all preferences in CSV based on timestamp.\n */\n skipConflictUpdates?: boolean;\n /** Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD */\n skipExistingRecordCheck?: boolean;\n /** Whether to force trigger workflows */\n forceTriggerWorkflows?: boolean;\n}): Promise<void> {\n // Parse out the extra attributes to apply to all requests uploaded\n const parsedAttributes = parseAttributesFromString(attributes);\n\n // Create a new state file to store the requests from this run\n const preferenceState = new PersistedState(receiptFilepath, PreferenceState, {\n fileMetadata: {},\n failingUpdates: {},\n pendingUpdates: {},\n });\n const failingRequests = preferenceState.getValue('failingUpdates');\n const pendingRequests = preferenceState.getValue('pendingUpdates');\n let fileMetadata = preferenceState.getValue('fileMetadata');\n\n logger.info(\n colors.magenta(\n 'Restored cache, there are: \\n' +\n `${\n Object.values(failingRequests).length\n } failing requests to be retried\\n` +\n `${\n Object.values(pendingRequests).length\n } pending requests to be processed\\n` +\n `The following files are stored in cache and will be used:\\n${Object.keys(\n fileMetadata,\n )\n .map((x) => x)\n .join('\\n')}\\n` +\n `The following file will be processed: ${file}\\n`,\n ),\n );\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const [sombra, purposes, preferenceTopics] = await Promise.all([\n // Create sombra instance to communicate with\n createSombraGotInstance(transcendUrl, auth, sombraAuth),\n // get all purposes and topics\n forceTriggerWorkflows\n ? Promise.resolve([] as Purpose[])\n : fetchAllPurposes(client),\n forceTriggerWorkflows\n ? Promise.resolve([] as PreferenceTopic[])\n : fetchAllPreferenceTopics(client),\n ]);\n\n // Process the file\n await parsePreferenceManagementCsvWithCache(\n {\n file,\n purposeSlugs: purposes.map((x) => x.trackingType),\n preferenceTopics,\n sombra,\n partitionKey: partition,\n skipExistingRecordCheck,\n forceTriggerWorkflows,\n },\n preferenceState,\n );\n\n // Construct the pending updates\n const pendingUpdates: Record<string, PreferenceUpdateItem> = {};\n fileMetadata = preferenceState.getValue('fileMetadata');\n const metadata = fileMetadata[file];\n\n logger.info(\n colors.magenta(\n `Found ${\n Object.entries(metadata.pendingSafeUpdates).length\n } safe updates in ${file}`,\n ),\n );\n logger.info(\n colors.magenta(\n `Found ${\n Object.entries(metadata.pendingConflictUpdates).length\n } conflict updates in ${file}`,\n ),\n );\n logger.info(\n colors.magenta(\n `Found ${\n Object.entries(metadata.skippedUpdates).length\n } skipped updates in ${file}`,\n ),\n );\n\n // Update either safe updates only or safe + conflict\n Object.entries({\n ...metadata.pendingSafeUpdates,\n ...(skipConflictUpdates\n ? {}\n : apply(metadata.pendingConflictUpdates, ({ row }) => row)),\n }).forEach(([userId, update]) => {\n // Determine timestamp\n const timestamp =\n metadata.timestampColum === NONE_PREFERENCE_MAP\n ? new Date()\n : new Date(update[metadata.timestampColum!]);\n\n // Determine updates\n const updates = getPreferenceUpdatesFromRow({\n row: update,\n columnToPurposeName: metadata.columnToPurposeName,\n preferenceTopics,\n purposeSlugs: purposes.map((x) => x.trackingType),\n });\n pendingUpdates[userId] = {\n userId,\n partition,\n timestamp: timestamp.toISOString(),\n purposes: Object.entries(updates).map(([purpose, value]) => ({\n ...value,\n purpose,\n workflowSettings: {\n attributes: parsedAttributes,\n isSilent,\n skipWorkflowTrigger: skipWorkflowTriggers,\n },\n })),\n };\n });\n await preferenceState.setValue(pendingUpdates, 'pendingUpdates');\n await preferenceState.setValue({}, 'failingUpdates');\n\n // Exist early if dry run\n if (dryRun) {\n logger.info(\n colors.green(\n `Dry run complete, exiting. ${\n Object.values(pendingUpdates).length\n } pending updates. Check file: ${receiptFilepath}`,\n ),\n );\n return;\n }\n\n logger.info(\n colors.magenta(\n `Uploading ${\n Object.values(pendingUpdates).length\n } preferences to partition: ${partition}`,\n ),\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 // Build a GraphQL client\n let total = 0;\n const updatesToRun = Object.entries(pendingUpdates);\n const chunkedUpdates = chunk(updatesToRun, skipWorkflowTriggers ? 100 : 10);\n progressBar.start(updatesToRun.length, 0);\n await map(\n chunkedUpdates,\n async (currentChunk) => {\n // Make the request\n try {\n await sombra\n .put('v1/preferences', {\n json: {\n records: currentChunk.map(([, update]) => update),\n skipWorkflowTriggers,\n forceTriggerWorkflows,\n },\n })\n .json();\n } catch (err) {\n try {\n const parsed = JSON.parse(err?.response?.body || '{}');\n if (parsed.error) {\n logger.error(colors.red(`Error: ${parsed.error}`));\n }\n } catch (e) {\n // continue\n }\n logger.error(\n colors.red(\n `Failed to upload ${\n currentChunk.length\n } user preferences to partition ${partition}: ${\n err?.response?.body || err?.message\n }`,\n ),\n );\n const failingUpdates = preferenceState.getValue('failingUpdates');\n currentChunk.forEach(([userId, update]) => {\n failingUpdates[userId] = {\n uploadedAt: new Date().toISOString(),\n update,\n error: err?.response?.body || err?.message || 'Unknown error',\n };\n });\n await preferenceState.setValue(failingUpdates, 'failingUpdates');\n }\n\n total += currentChunk.length;\n progressBar.update(total);\n },\n {\n concurrency: 40,\n },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n logger.info(\n colors.green(\n `Successfully uploaded ${\n updatesToRun.length\n } user preferences to partition ${partition} in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n}\n","import { PersistedState } from '@transcend-io/persisted-state';\nimport type { Got } from 'got';\nimport { keyBy } from 'lodash-es';\nimport * as t from 'io-ts';\nimport colors from 'colors';\nimport { FileMetadataState, PreferenceState } from './codecs';\nimport { logger } from '../../logger';\nimport { readCsv } from '../requests';\nimport { getPreferencesForIdentifiers } from './getPreferencesForIdentifiers';\nimport { PreferenceTopic } from '../graphql';\nimport { getPreferenceUpdatesFromRow } from './getPreferenceUpdatesFromRow';\nimport { parsePreferenceTimestampsFromCsv } from './parsePreferenceTimestampsFromCsv';\nimport { parsePreferenceIdentifiersFromCsv } from './parsePreferenceIdentifiersFromCsv';\nimport { parsePreferenceAndPurposeValuesFromCsv } from './parsePreferenceAndPurposeValuesFromCsv';\nimport { checkIfPendingPreferenceUpdatesAreNoOp } from './checkIfPendingPreferenceUpdatesAreNoOp';\nimport { checkIfPendingPreferenceUpdatesCauseConflict } from './checkIfPendingPreferenceUpdatesCauseConflict';\n\n/**\n * Parse a file into the cache\n *\n *\n * @param options - Options\n * @param cache - The cache to store the parsed file in\n * @returns The cache with the parsed file\n */\nexport async function parsePreferenceManagementCsvWithCache(\n {\n file,\n sombra,\n purposeSlugs,\n preferenceTopics,\n partitionKey,\n skipExistingRecordCheck,\n forceTriggerWorkflows,\n }: {\n /** File to parse */\n file: string;\n /** The purpose slugs that are allowed to be updated */\n purposeSlugs: string[];\n /** The preference topics */\n preferenceTopics: PreferenceTopic[];\n /** Sombra got instance */\n sombra: Got;\n /** Partition key */\n partitionKey: string;\n /** Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD */\n skipExistingRecordCheck: boolean;\n /** Wheather to force workflow triggers */\n forceTriggerWorkflows: boolean;\n },\n cache: PersistedState<typeof PreferenceState>,\n): Promise<void> {\n // Start the timer\n const t0 = new Date().getTime();\n\n // Get the current metadata\n const fileMetadata = cache.getValue('fileMetadata');\n\n // Read in the file\n logger.info(colors.magenta(`Reading in file: \"${file}\"`));\n let preferences = readCsv(file, t.record(t.string, t.string));\n\n // start building the cache, can use previous cache as well\n let currentState: FileMetadataState = {\n columnToPurposeName: {},\n pendingSafeUpdates: {},\n pendingConflictUpdates: {},\n skippedUpdates: {},\n // Load in the last fetched time\n ...((fileMetadata[file] || {}) as Partial<FileMetadataState>),\n lastFetchedAt: new Date().toISOString(),\n };\n\n // Validate that all timestamps are present in the file\n currentState = await parsePreferenceTimestampsFromCsv(\n preferences,\n currentState,\n );\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n\n // Validate that all identifiers are present and unique\n const result = await parsePreferenceIdentifiersFromCsv(\n preferences,\n currentState,\n );\n currentState = result.currentState;\n preferences = result.preferences;\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n\n // Ensure all other columns are mapped to purpose and preference\n // slug values\n currentState = await parsePreferenceAndPurposeValuesFromCsv(\n preferences,\n currentState,\n {\n preferenceTopics,\n purposeSlugs,\n forceTriggerWorkflows,\n },\n );\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n\n // Grab existing preference store records\n const identifiers = preferences.map(\n (pref) => pref[currentState.identifierColumn!],\n );\n const existingConsentRecords = skipExistingRecordCheck\n ? []\n : await getPreferencesForIdentifiers(sombra, {\n identifiers: identifiers.map((x) => ({ value: x })),\n partitionKey,\n });\n const consentRecordByIdentifier = keyBy(existingConsentRecords, 'userId');\n\n // Clear out previous updates\n currentState.pendingConflictUpdates = {};\n currentState.pendingSafeUpdates = {};\n currentState.skippedUpdates = {};\n\n // Process each row\n preferences.forEach((pref) => {\n // Grab unique Id for the user\n const userId = pref[currentState.identifierColumn!];\n\n // determine updates for user\n const pendingUpdates = getPreferenceUpdatesFromRow({\n row: pref,\n columnToPurposeName: currentState.columnToPurposeName,\n preferenceTopics,\n purposeSlugs,\n });\n\n // Grab current state of the update\n const currentConsentRecord = consentRecordByIdentifier[userId];\n if (forceTriggerWorkflows && !currentConsentRecord) {\n throw new Error(\n `No existing consent record found for user with id: ${userId}. \n When 'forceTriggerWorkflows' is set all the user identifiers should contain a consent record`,\n );\n }\n // Check if the update can be skipped\n // this is the case if a record exists, and the purpose\n // and preference values are all in sync\n if (\n currentConsentRecord &&\n checkIfPendingPreferenceUpdatesAreNoOp({\n currentConsentRecord,\n pendingUpdates,\n preferenceTopics,\n }) &&\n !forceTriggerWorkflows\n ) {\n currentState.skippedUpdates[userId] = pref;\n return;\n }\n\n // Determine if there are any conflicts\n if (\n currentConsentRecord &&\n checkIfPendingPreferenceUpdatesCauseConflict({\n currentConsentRecord,\n pendingUpdates,\n preferenceTopics,\n })\n ) {\n currentState.pendingConflictUpdates[userId] = {\n row: pref,\n record: currentConsentRecord,\n };\n return;\n }\n\n // Add to pending updates\n currentState.pendingSafeUpdates[userId] = pref;\n });\n\n // Read in the file\n fileMetadata[file] = currentState;\n await cache.setValue(fileMetadata, 'fileMetadata');\n const t1 = new Date().getTime();\n logger.info(\n colors.green(\n `Successfully pre-processed file: \"${file}\" in ${(t1 - t0) / 1000}s`,\n ),\n );\n}\n","import { PreferenceQueryResponseItem } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\nimport colors from 'colors';\nimport cliProgress from 'cli-progress';\nimport { chunk } from 'lodash-es';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { map } from 'bluebird';\nimport { logger } from '../../logger';\nimport { withPreferenceQueryRetry } from './withPreferenceQueryRetry';\nimport { ConsentPreferenceResponse } from './types';\n\n/**\n * Grab the current consent preference values for a list of identifiers\n *\n * @param sombra - Backend to make API call to\n * @param options - Options\n * @returns Plaintext context information\n */\nexport async function getPreferencesForIdentifiers(\n sombra: Got,\n {\n identifiers,\n partitionKey,\n skipLogging = false,\n concurrency = 40,\n }: {\n /** The list of identifiers to look up */\n identifiers: {\n /** The value of the identifier */\n value: string;\n }[];\n /** The partition key to look up */\n partitionKey: string;\n /** Whether to skip logging */\n skipLogging?: boolean;\n /** Concurrency for requests (default 40) */\n concurrency?: number;\n },\n): Promise<PreferenceQueryResponseItem[]> {\n const results: PreferenceQueryResponseItem[] = [];\n const groupedIdentifiers = chunk(identifiers, 100);\n\n // create a new progress bar instance and use shades_classic theme\n const t0 = new Date().getTime();\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n if (!skipLogging) {\n progressBar.start(identifiers.length, 0);\n }\n\n let total = 0;\n await map(\n groupedIdentifiers,\n async (group) => {\n const rawResult = await withPreferenceQueryRetry(\n () =>\n sombra\n .post(`v1/preferences/${partitionKey}/query`, {\n json: {\n filter: { identifiers: group },\n limit: group.length,\n },\n })\n .json(),\n {\n onRetry: (attempt, _err, msg) => {\n logger.warn(\n colors.yellow(\n `[RETRY] group size=${group.length} partition=${partitionKey} attempt=${attempt}: ${msg}`,\n ),\n );\n },\n },\n );\n\n const result = decodeCodec(ConsentPreferenceResponse, rawResult);\n results.push(...result.nodes);\n total += group.length;\n progressBar.update(total);\n },\n {\n concurrency,\n },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n if (!skipLogging) {\n // Log completion time\n logger.info(\n colors.green(`Completed download in \"${totalTime / 1000}\" seconds.`),\n );\n }\n\n return results;\n}\n","import colors from 'colors';\nimport { logger } from '../../logger';\nimport { sleepPromise } from '../helpers';\n\n/**\n * Transient network / platform errors that merit a retry.\n * Keep this list short and specific to avoid masking real failures.\n */\nexport const RETRY_PREFERENCE_MSGS: string[] = [\n 'ENOTFOUND',\n 'ECONNRESET',\n 'ETIMEDOUT',\n '504 Gateway Time-out',\n 'Task timed out after',\n];\n\n/**\n * Options for retrying preference queries.\n */\nexport type RetryOptions = {\n /** Max attempts including the first try (default 3) */\n maxAttempts?: number;\n /** Initial backoff in ms (default 250) */\n baseDelayMs?: number;\n /** Optional custom predicate to decide if an error is retryable */\n isRetryable?: (err: unknown, message: string) => boolean;\n /** Optional hook to log on each retry */\n onRetry?: (attempt: number, err: unknown, message: string) => void;\n};\n\n/**\n * Run an async function with standardized retry behavior for preference queries.\n * Exponential backoff with jitter; only retries on known-transient messages.\n *\n * @param fn - Function to run\n * @param options - Retry options\n * @returns Result of the function\n */\nexport async function withPreferenceQueryRetry<T>(\n fn: () => Promise<T>,\n {\n maxAttempts = 3,\n baseDelayMs = 250,\n isRetryable = (_err, msg) =>\n RETRY_PREFERENCE_MSGS.some((m) => msg.includes(m)),\n onRetry,\n }: RetryOptions = {},\n): Promise<T> {\n let attempt = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n attempt += 1;\n try {\n return await fn();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (err: any) {\n const msg: string =\n (err && (err.response?.body || err.message)) ??\n String(err ?? 'Unknown error');\n const willRetry = attempt < maxAttempts && isRetryable(err, msg);\n if (!willRetry) {\n throw new Error(\n `Preference query failed after ${attempt} attempt(s): ${msg}`,\n );\n }\n onRetry?.(attempt, err, msg);\n\n const backoff = baseDelayMs * 2 ** (attempt - 1);\n const jitter = Math.floor(Math.random() * baseDelayMs);\n const delay = backoff + jitter;\n logger.warn(\n colors.yellow(\n `[retry] attempt ${attempt}/${\n maxAttempts - 1\n }; backing off ${delay}ms: ${msg}`,\n ),\n );\n await sleepPromise(delay);\n }\n }\n}\n","import { uniq, groupBy, difference } from 'lodash-es';\nimport colors from 'colors';\nimport inquirer from 'inquirer';\nimport { FileMetadataState } from './codecs';\nimport { logger } from '../../logger';\nimport { inquirerConfirmBoolean } from '../helpers';\n\n/* eslint-disable no-param-reassign */\n\n/**\n * Parse identifiers from a CSV list of preferences\n *\n * Ensures that all rows have a valid identifier\n * and that all identifiers are unique.\n *\n * @param preferences - List of preferences\n * @param currentState - The current file metadata state for parsing this list\n * @returns The updated file metadata state\n */\nexport async function parsePreferenceIdentifiersFromCsv(\n preferences: Record<string, string>[],\n currentState: FileMetadataState,\n): Promise<{\n /** The updated state */\n currentState: FileMetadataState;\n /** The updated preferences */\n preferences: Record<string, string>[];\n}> {\n // Determine columns to map\n const columnNames = uniq(preferences.map((x) => Object.keys(x)).flat());\n\n // Determine the columns that could potentially be used for identifier\n const remainingColumnsForIdentifier = difference(columnNames, [\n ...(currentState.identifierColumn ? [currentState.identifierColumn] : []),\n ...Object.keys(currentState.columnToPurposeName),\n ]);\n\n // Determine the identifier column to work off of\n if (!currentState.identifierColumn) {\n const { identifierName } = await inquirer.prompt<{\n /** Identifier name */\n identifierName: string;\n }>([\n {\n name: 'identifierName',\n message:\n 'Choose the column that will be used as the identifier to upload consent preferences by',\n type: 'list',\n default:\n remainingColumnsForIdentifier.find((col) =>\n col.toLowerCase().includes('email'),\n ) || remainingColumnsForIdentifier[0],\n choices: remainingColumnsForIdentifier,\n },\n ]);\n currentState.identifierColumn = identifierName;\n }\n logger.info(\n colors.magenta(\n `Using identifier column \"${currentState.identifierColumn}\"`,\n ),\n );\n\n // Validate that the identifier column is present for all rows and unique\n const identifierColumnsMissing = preferences\n .map((pref, ind) => (pref[currentState.identifierColumn!] ? null : [ind]))\n .filter((x): x is number[] => !!x)\n .flat();\n if (identifierColumnsMissing.length > 0) {\n const msg = `The identifier column \"${\n currentState.identifierColumn\n }\" is missing a value for the following rows: ${identifierColumnsMissing.join(\n ', ',\n )}`;\n logger.warn(colors.yellow(msg));\n\n // Ask user if they would like to skip rows missing an identifier\n const skip = await inquirerConfirmBoolean({\n message: 'Would you like to skip rows missing an identifier?',\n });\n if (!skip) {\n throw new Error(msg);\n }\n\n // Filter out rows missing an identifier\n const previous = preferences.length;\n preferences = preferences.filter(\n (pref) => pref[currentState.identifierColumn!],\n );\n logger.info(\n colors.yellow(\n `Skipped ${previous - preferences.length} rows missing an identifier`,\n ),\n );\n }\n logger.info(\n colors.magenta(\n `The identifier column \"${currentState.identifierColumn}\" is present for all rows`,\n ),\n );\n\n // Validate that all identifiers are unique\n const rowsByUserId = groupBy(preferences, currentState.identifierColumn);\n const duplicateIdentifiers = Object.entries(rowsByUserId).filter(\n ([, rows]) => rows.length > 1,\n );\n if (duplicateIdentifiers.length > 0) {\n const msg = `The identifier column \"${\n currentState.identifierColumn\n }\" has duplicate values for the following rows: ${duplicateIdentifiers\n .slice(0, 10)\n .map(([userId, rows]) => `${userId} (${rows.length})`)\n .join('\\n')}`;\n logger.warn(colors.yellow(msg));\n\n // Ask user if they would like to take the most recent update\n // for each duplicate identifier\n const skip = await inquirerConfirmBoolean({\n message: 'Would you like to automatically take the latest update?',\n });\n if (!skip) {\n throw new Error(msg);\n }\n preferences = Object.entries(rowsByUserId)\n .map(([, rows]) => {\n const sorted = rows.sort(\n (a, b) =>\n new Date(b[currentState.timestampColum!]).getTime() -\n new Date(a[currentState.timestampColum!]).getTime(),\n );\n return sorted[0];\n })\n .filter((x) => x);\n }\n\n return { currentState, preferences };\n}\n/* eslint-enable no-param-reassign */\n","import { uniq, difference } from 'lodash-es';\nimport colors from 'colors';\nimport inquirer from 'inquirer';\nimport { FileMetadataState } from './codecs';\nimport { logger } from '../../logger';\nimport { mapSeries } from 'bluebird';\nimport { PreferenceTopic } from '../graphql';\nimport { PreferenceTopicType } from '@transcend-io/privacy-types';\nimport { splitCsvToList } from '../requests';\n\n/* eslint-disable no-param-reassign */\n\n/**\n * Parse out the purpose.enabled and preference values from a CSV file\n *\n * @param preferences - List of preferences\n * @param currentState - The current file metadata state for parsing this list\n * @param options - Options\n * @returns The updated file metadata state\n */\nexport async function parsePreferenceAndPurposeValuesFromCsv(\n preferences: Record<string, string>[],\n currentState: FileMetadataState,\n {\n purposeSlugs,\n preferenceTopics,\n forceTriggerWorkflows,\n }: {\n /** The purpose slugs that are allowed to be updated */\n purposeSlugs: string[];\n /** The preference topics */\n preferenceTopics: PreferenceTopic[];\n /** Force workflow triggers */\n forceTriggerWorkflows: boolean;\n },\n): Promise<FileMetadataState> {\n // Determine columns to map\n const columnNames = uniq(preferences.map((x) => Object.keys(x)).flat());\n\n // Determine the columns that could potentially be used for identifier\n const otherColumns = difference(columnNames, [\n ...(currentState.identifierColumn ? [currentState.identifierColumn] : []),\n ...(currentState.timestampColum ? [currentState.timestampColum] : []),\n ]);\n if (otherColumns.length === 0) {\n if (forceTriggerWorkflows) {\n return currentState;\n }\n throw new Error('No other columns to process');\n }\n\n // The purpose and preferences to map to\n const purposeNames = [\n ...purposeSlugs,\n ...preferenceTopics.map((x) => `${x.purpose.trackingType}->${x.slug}`),\n ];\n\n // Ensure all columns are accounted for\n await mapSeries(otherColumns, async (col) => {\n // Determine the unique values to map in this column\n const uniqueValues = uniq(preferences.map((x) => x[col]));\n\n // Map the column to a purpose\n let purposeMapping = currentState.columnToPurposeName[col];\n if (purposeMapping) {\n logger.info(\n colors.magenta(\n `Column \"${col}\" is associated with purpose \"${purposeMapping.purpose}\"`,\n ),\n );\n } else {\n const { purposeName } = await inquirer.prompt<{\n /** purpose name */\n purposeName: string;\n }>([\n {\n name: 'purposeName',\n message: `Choose the purpose that column ${col} is associated with`,\n type: 'list',\n default: purposeNames.find((x) => x.startsWith(purposeSlugs[0])),\n choices: purposeNames,\n },\n ]);\n const [purposeSlug, preferenceSlug] = purposeName.split('->');\n purposeMapping = {\n purpose: purposeSlug,\n preference: preferenceSlug || null,\n valueMapping: {},\n };\n }\n\n // map each value to the purpose value\n await mapSeries(uniqueValues, async (value) => {\n if (purposeMapping.valueMapping[value] !== undefined) {\n logger.info(\n colors.magenta(\n `Value \"${value}\" is associated with purpose value \"${purposeMapping.valueMapping[value]}\"`,\n ),\n );\n return;\n }\n // if preference is null, this column is just for the purpose\n if (purposeMapping.preference === null) {\n const { purposeValue } = await inquirer.prompt<{\n /** purpose value */\n purposeValue: boolean;\n }>([\n {\n name: 'purposeValue',\n message: `Choose the purpose value for value \"${value}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'confirm',\n default: value !== 'false',\n },\n ]);\n purposeMapping.valueMapping[value] = purposeValue;\n }\n\n // if preference is not null, this column is for a specific preference\n if (purposeMapping.preference !== null) {\n const preferenceTopic = preferenceTopics.find(\n (x) => x.slug === purposeMapping.preference,\n );\n if (!preferenceTopic) {\n logger.error(\n colors.red(\n `Preference topic \"${purposeMapping.preference}\" not found`,\n ),\n );\n return;\n }\n const preferenceOptions = preferenceTopic.preferenceOptionValues.map(\n ({ slug }) => slug,\n );\n\n if (preferenceTopic.type === PreferenceTopicType.Boolean) {\n const { preferenceValue } = await inquirer.prompt<{\n /** purpose value */\n preferenceValue: boolean;\n }>([\n {\n name: 'preferenceValue',\n message:\n // eslint-disable-next-line max-len\n `Choose the preference value for \"${preferenceTopic.slug}\" value \"${value}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'confirm',\n default: value !== 'false',\n },\n ]);\n purposeMapping.valueMapping[value] = preferenceValue;\n return;\n }\n\n if (preferenceTopic.type === PreferenceTopicType.Select) {\n const { preferenceValue } = await inquirer.prompt<{\n /** purpose value */\n preferenceValue: boolean;\n }>([\n {\n name: 'preferenceValue',\n // eslint-disable-next-line max-len\n message: `Choose the preference value for \"${preferenceTopic.slug}\" value \"${value}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'list',\n choices: preferenceOptions,\n default: preferenceOptions.find((x) => x === value),\n },\n ]);\n purposeMapping.valueMapping[value] = preferenceValue;\n return;\n }\n\n if (preferenceTopic.type === PreferenceTopicType.MultiSelect) {\n const parsedValues = splitCsvToList(value);\n // need to do this serially\n await mapSeries(parsedValues, async (parsedValue) => {\n // if we already have a value, skip re-processing it again\n if (purposeMapping.valueMapping[parsedValue] !== undefined) {\n return;\n }\n const { preferenceValue } = await inquirer.prompt<{\n /** purpose value */\n preferenceValue: boolean;\n }>([\n {\n name: 'preferenceValue',\n // eslint-disable-next-line max-len\n message: `Choose the preference value for \"${preferenceTopic.slug}\" value \"${parsedValue}\" associated with purpose \"${purposeMapping.purpose}\"`,\n type: 'list',\n choices: preferenceOptions,\n default: preferenceOptions.find((x) => x === parsedValue),\n },\n ]);\n purposeMapping.valueMapping[parsedValue] = preferenceValue;\n });\n return;\n }\n\n throw new Error(\n `Unknown preference topic type: ${preferenceTopic.type}`,\n );\n }\n });\n\n currentState.columnToPurposeName[col] = purposeMapping;\n });\n\n return currentState;\n}\n/* eslint-enable no-param-reassign */\n","import {\n PreferenceQueryResponseItem,\n PreferenceUpdateItem,\n} from '@transcend-io/privacy-types';\nimport * as t from 'io-ts';\n\nexport const PurposeRowMapping = t.type({\n /**\n * The slug or trackingType of the purpose to map to\n *\n * e.g. `Marketing`\n */\n purpose: t.string,\n /**\n * If the column maps to a preference instead of a purpose\n * this is the slug of the purpose.\n *\n * null value indicates that this column maps to the true/false\n * value of the purpose\n */\n preference: t.union([t.string, t.null]),\n /**\n * The mapping between each row value and purpose/preference value.\n *\n * e.g. for a boolean preference or purpose\n * {\n * 'true': true,\n * 'false': false,\n * '': true,\n * }\n *\n * or for a single or multi select preference\n * {\n * '': true,\n * 'value1': 'Value1',\n * 'value2': 'Value2',\n * }\n */\n valueMapping: t.record(\n t.string,\n t.union([t.string, t.boolean, t.null, t.undefined]),\n ),\n});\n\n/** Override type */\nexport type PurposeRowMapping = t.TypeOf<typeof PurposeRowMapping>;\n\n/**\n * Mapping of column name to purpose row mapping.\n * This is used to map each column in the CSV to the relevant purpose and preference definitions in\n * transcend.\n */\nexport const ColumnPurposeMap = t.record(t.string, PurposeRowMapping);\n\n/** Override type */\nexport type ColumnPurposeMap = t.TypeOf<typeof ColumnPurposeMap>;\n\nexport const IdentifierMetadataForPreference = t.type({\n /** The identifier name */\n name: t.string,\n /** Is unique on preference store */\n isUniqueOnPreferenceStore: t.boolean,\n});\n\n/** Override type */\nexport type IdentifierMetadataForPreference = t.TypeOf<\n typeof IdentifierMetadataForPreference\n>;\n\n/**\n * Mapping of identifier name to the column name in the CSV file.\n * This is used to map each identifier name to the column in the CSV file.\n */\nexport const ColumnIdentifierMap = t.record(\n t.string,\n IdentifierMetadataForPreference,\n);\n\n/** Override type */\nexport type ColumnIdentifierMap = t.TypeOf<typeof ColumnIdentifierMap>;\n\nexport const FileMetadataState = t.intersection([\n t.type({\n /**\n * Definition of how to map each column in the CSV to\n * the relevant purpose and preference definitions in transcend\n */\n columnToPurposeName: t.record(t.string, PurposeRowMapping),\n /** Last time the file was last parsed at */\n lastFetchedAt: t.string,\n /**\n * Mapping of userId to the rows in the file that need to be uploaded\n * These uploads are overwriting non-existent preferences and are safe\n */\n pendingSafeUpdates: t.record(t.string, t.record(t.string, t.string)),\n /**\n * Mapping of userId to the rows in the file that need to be uploaded\n * these records have conflicts with existing consent preferences\n */\n pendingConflictUpdates: t.record(\n t.string,\n t.type({\n record: PreferenceQueryResponseItem,\n row: t.record(t.string, t.string),\n }),\n ),\n /**\n * Mapping of userId to the rows in the file that can be skipped because\n * their preferences are already in the store\n */\n skippedUpdates: t.record(t.string, t.record(t.string, t.string)),\n }),\n t.partial({\n /** Determine which column name in file maps to consent record identifier to upload on */\n identifierColumn: t.string,\n /** Determine which column name in file maps to the timestamp */\n timestampColum: t.string,\n }),\n]);\n\n/** Override type */\nexport type FileMetadataState = t.TypeOf<typeof FileMetadataState>;\n\n/**\n * This is the type of the receipts that are stored in the file\n * that is used to track the state of the upload process.\n * It is used to resume the upload process from where it left off.\n * It is used to persist the state of the upload process across multiple runs.\n */\nexport const PreferenceUpdateMap = t.record(\n t.string,\n // This can either be true to indicate the record is pending\n // or it can be an object showing the object\n // We only return a fixed number of results to avoid\n // making the JSON file too large\n t.union([t.boolean, PreferenceUpdateItem]),\n);\n\n/** Override type */\nexport type PreferenceUpdateMap = t.TypeOf<typeof PreferenceUpdateMap>;\n\n/**\n * This is the type of the pending updates that are safe to run without\n * conflicts with existing consent preferences.\n *\n * Key is primaryKey of the record in the file.\n * The value is the row in the file that is safe to upload.\n */\nexport const PendingSafePreferenceUpdates = t.record(\n t.string,\n // This can either be true to indicate the record is safe\n // or it can be an object showing the object\n // We only return a fixed number of results to avoid\n // making the JSON file too large\n t.union([t.boolean, t.record(t.string, t.string)]),\n);\n\n/** Override type */\nexport type PendingSafePreferenceUpdates = t.TypeOf<\n typeof PendingSafePreferenceUpdates\n>;\n\n/**\n * These are the updates that failed to be uploaded to the API.\n */\nexport const FailingPreferenceUpdates = t.record(\n t.string,\n t.type({\n /** Time upload ran at */\n uploadedAt: t.string,\n /** Attempts to upload that resulted in an error */\n error: t.string,\n /** The update body */\n update: PreferenceUpdateItem,\n }),\n);\n\n/** Override type */\nexport type FailingPreferenceUpdates = t.TypeOf<\n typeof FailingPreferenceUpdates\n>;\n\n/**\n * This is the type of the pending updates that are in conflict with existing consent preferences.\n *\n * Key is primaryKey of the record in the file.\n * The value is the row in the file that is pending upload.\n */\nexport const PendingWithConflictPreferenceUpdates = t.record(\n t.string,\n // We always return the conflicts for investigation\n t.type({\n /** Record to be inserted to transcend v1/preferences API */\n record: PreferenceQueryResponseItem,\n /** The row in the file that is pending upload */\n row: t.record(t.string, t.string),\n }),\n);\n\n/** Override type */\nexport type PendingWithConflictPreferenceUpdates = t.TypeOf<\n typeof PendingWithConflictPreferenceUpdates\n>;\n\n/**\n * The set of preference updates that are skipped\n * Key is primaryKey and value is the row in the CSV\n * that is skipped.\n *\n * This is usually because the preferences are already in the store\n * or there are duplicate rows in the CSV file that are identical.\n */\nexport const SkippedPreferenceUpdates = t.record(\n t.string,\n t.record(t.string, t.string),\n);\n\n/** Override type */\nexport type SkippedPreferenceUpdates = t.TypeOf<\n typeof SkippedPreferenceUpdates\n>;\n\n/** Persist this data between runs of the script */\nexport const PreferenceState = t.type({\n /**\n * Store a cache of previous files read in\n */\n fileMetadata: t.record(t.string, FileMetadataState),\n /**\n * The set of successful uploads to Transcend\n * Mapping from userId to the upload metadata\n */\n failingUpdates: t.record(\n t.string,\n t.type({\n /** Time upload ran at */\n uploadedAt: t.string,\n /** Attempts to upload that resulted in an error */\n error: t.string,\n /** The update body */\n update: PreferenceUpdateItem,\n }),\n ),\n /**\n * The set of pending uploads to Transcend\n * Mapping from userId to the upload metadata\n */\n pendingUpdates: t.record(t.string, PreferenceUpdateItem),\n});\n\n/** Override type */\nexport type PreferenceState = t.TypeOf<typeof PreferenceState>;\n"]}
|
package/dist/impl-2VXHDYTF.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEYEQDDPScjs = require('./chunk-EYEQDDPS.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-7K2OJZ42.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-D7F476WZ.cjs');require('./chunk-Q7I37FJV.cjs');async function u({auth:r,transcendUrl:i,file:e,enricherId:o,concurrency:s,markSilent:a,sombraAuth:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkEYEQDDPScjs.d.call(void 0, {file:e,transcendUrl:i,enricherId:o,concurrency:s,markSilent:a,auth:r,sombraAuth:m})}exports.pushIdentifiers = u;
|
|
2
|
-
//# sourceMappingURL=impl-2VXHDYTF.cjs.map
|
package/dist/impl-H4RSPA73.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkC75HAQGXcjs = require('./chunk-C75HAQGX.cjs');require('./chunk-4U5KIWRN.cjs');require('./chunk-5UBGZNDC.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-7K2OJZ42.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-D7F476WZ.cjs');require('./chunk-Q7I37FJV.cjs');async function m({auth:r,trackerStatus:s,file:a,transcendUrl:e}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkC75HAQGXcjs.c.call(void 0, {auth:r,trackerStatus:s,file:a,transcendUrl:e})}exports.uploadCookiesFromCsv = m;
|
|
2
|
-
//# sourceMappingURL=impl-H4RSPA73.cjs.map
|