@transcend-io/cli 7.0.0-alpha.9 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/bin/bash-complete.cjs +4 -0
- package/dist/bin/bash-complete.cjs.map +1 -0
- package/dist/bin/bash-complete.d.cts +1 -0
- package/dist/bin/cli.cjs +3 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/cli.d.cts +1 -0
- package/dist/bin/deprecated-command.cjs +7 -0
- package/dist/bin/deprecated-command.cjs.map +1 -0
- package/dist/bin/deprecated-command.d.cts +1 -0
- package/dist/chunk-ANCIGXE5.cjs +4 -0
- package/dist/chunk-ANCIGXE5.cjs.map +1 -0
- package/dist/chunk-AW6I4V4F.cjs +3 -0
- package/dist/chunk-AW6I4V4F.cjs.map +1 -0
- package/dist/chunk-BY7W4UQF.cjs +2 -0
- package/dist/chunk-BY7W4UQF.cjs.map +1 -0
- package/dist/chunk-CHTWXNEA.cjs +2 -0
- package/dist/chunk-CHTWXNEA.cjs.map +1 -0
- package/dist/chunk-DS6VH676.cjs +2 -0
- package/dist/chunk-DS6VH676.cjs.map +1 -0
- package/dist/chunk-EG4L6YAJ.cjs +2 -0
- package/dist/chunk-EG4L6YAJ.cjs.map +1 -0
- package/dist/chunk-ETNRSKUM.cjs +2 -0
- package/dist/chunk-ETNRSKUM.cjs.map +1 -0
- package/dist/chunk-GM2EDRKN.cjs +12 -0
- package/dist/chunk-GM2EDRKN.cjs.map +1 -0
- package/dist/chunk-IBTP5OXE.cjs +2 -0
- package/dist/chunk-IBTP5OXE.cjs.map +1 -0
- package/dist/chunk-KOV2SQO2.cjs +4 -0
- package/dist/chunk-KOV2SQO2.cjs.map +1 -0
- package/dist/chunk-LBDIZJ23.cjs +2844 -0
- package/dist/chunk-LBDIZJ23.cjs.map +1 -0
- package/dist/chunk-LZYEIVWM.cjs +94 -0
- package/dist/chunk-LZYEIVWM.cjs.map +1 -0
- package/dist/chunk-MPJABCSW.cjs +75 -0
- package/dist/chunk-MPJABCSW.cjs.map +1 -0
- package/dist/chunk-R5N2S5UU.cjs +2 -0
- package/dist/chunk-R5N2S5UU.cjs.map +1 -0
- package/dist/chunk-RW5GSSAA.cjs +2 -0
- package/dist/chunk-RW5GSSAA.cjs.map +1 -0
- package/dist/chunk-RZWMOCW3.cjs +2 -0
- package/dist/chunk-RZWMOCW3.cjs.map +1 -0
- package/dist/chunk-SAEKBZGF.cjs +2 -0
- package/dist/chunk-SAEKBZGF.cjs.map +1 -0
- package/dist/chunk-T462ONFX.cjs +2 -0
- package/dist/chunk-T462ONFX.cjs.map +1 -0
- package/dist/chunk-TD7ADMVO.cjs +2 -0
- package/dist/chunk-TD7ADMVO.cjs.map +1 -0
- package/dist/chunk-UBUNHRCG.cjs +2 -0
- package/dist/chunk-UBUNHRCG.cjs.map +1 -0
- package/dist/chunk-UEGX6GZ2.cjs +2 -0
- package/dist/chunk-UEGX6GZ2.cjs.map +1 -0
- package/dist/chunk-VCWGXJ2H.cjs +9 -0
- package/dist/chunk-VCWGXJ2H.cjs.map +1 -0
- package/dist/chunk-ZUNVPK23.cjs +2 -0
- package/dist/chunk-ZUNVPK23.cjs.map +1 -0
- package/dist/chunk-ZVK4HIDF.cjs +6 -0
- package/dist/chunk-ZVK4HIDF.cjs.map +1 -0
- package/dist/impl-2GU6CYMY.cjs +2 -0
- package/dist/impl-2GU6CYMY.cjs.map +1 -0
- package/dist/impl-2OEHQTIR.cjs +2 -0
- package/dist/impl-2OEHQTIR.cjs.map +1 -0
- package/dist/impl-2QXJ3WST.cjs +9 -0
- package/dist/impl-2QXJ3WST.cjs.map +1 -0
- package/dist/impl-442H4ODN.cjs +7 -0
- package/dist/impl-442H4ODN.cjs.map +1 -0
- package/dist/impl-44QRPPUX.cjs +6 -0
- package/dist/impl-44QRPPUX.cjs.map +1 -0
- package/dist/impl-4DOGSDPC.cjs +2 -0
- package/dist/impl-4DOGSDPC.cjs.map +1 -0
- package/dist/impl-5J3MG42D.cjs +2 -0
- package/dist/impl-5J3MG42D.cjs.map +1 -0
- package/dist/impl-5YMSNFJU.cjs +2 -0
- package/dist/impl-5YMSNFJU.cjs.map +1 -0
- package/dist/impl-6TBKGA4Y.cjs +2 -0
- package/dist/impl-6TBKGA4Y.cjs.map +1 -0
- package/dist/impl-7VYQSZVO.cjs +2 -0
- package/dist/impl-7VYQSZVO.cjs.map +1 -0
- package/dist/impl-BB24LU3N.cjs +2 -0
- package/dist/impl-BB24LU3N.cjs.map +1 -0
- package/dist/impl-CWZ26FTN.cjs +2 -0
- package/dist/impl-CWZ26FTN.cjs.map +1 -0
- package/dist/impl-EFTKRWUA.cjs +2 -0
- package/dist/impl-EFTKRWUA.cjs.map +1 -0
- package/dist/impl-EJT3AX73.cjs +2 -0
- package/dist/impl-EJT3AX73.cjs.map +1 -0
- package/dist/impl-EKQ6ZNN3.cjs +2 -0
- package/dist/impl-EKQ6ZNN3.cjs.map +1 -0
- package/dist/impl-EV6T5UOK.cjs +6 -0
- package/dist/impl-EV6T5UOK.cjs.map +1 -0
- package/dist/impl-FPFUAY4Q.cjs +2 -0
- package/dist/impl-FPFUAY4Q.cjs.map +1 -0
- package/dist/impl-GDKUHX2J.cjs +2 -0
- package/dist/impl-GDKUHX2J.cjs.map +1 -0
- package/dist/impl-GXDABG5X.cjs +2 -0
- package/dist/impl-GXDABG5X.cjs.map +1 -0
- package/dist/impl-IG7QEF6D.cjs +2 -0
- package/dist/impl-IG7QEF6D.cjs.map +1 -0
- package/dist/impl-JQLYJA5L.cjs +2 -0
- package/dist/impl-JQLYJA5L.cjs.map +1 -0
- package/dist/impl-LPI3M7L3.cjs +6 -0
- package/dist/impl-LPI3M7L3.cjs.map +1 -0
- package/dist/impl-M7WMSIK4.cjs +4 -0
- package/dist/impl-M7WMSIK4.cjs.map +1 -0
- package/dist/impl-MRGZ5OLO.cjs +2 -0
- package/dist/impl-MRGZ5OLO.cjs.map +1 -0
- package/dist/impl-OI4UWRAU.cjs +12 -0
- package/dist/impl-OI4UWRAU.cjs.map +1 -0
- package/dist/impl-OX24YDRR.cjs +2 -0
- package/dist/impl-OX24YDRR.cjs.map +1 -0
- package/dist/impl-PFQKPCUL.cjs +2 -0
- package/dist/impl-PFQKPCUL.cjs.map +1 -0
- package/dist/impl-PXJZK6BV.cjs +2 -0
- package/dist/impl-PXJZK6BV.cjs.map +1 -0
- package/dist/impl-QOGUUIE6.cjs +2 -0
- package/dist/impl-QOGUUIE6.cjs.map +1 -0
- package/dist/impl-QR3LLBZL.cjs +2 -0
- package/dist/impl-QR3LLBZL.cjs.map +1 -0
- package/dist/impl-RODUB22E.cjs +2 -0
- package/dist/impl-RODUB22E.cjs.map +1 -0
- package/dist/impl-S56PHXGG.cjs +2 -0
- package/dist/impl-S56PHXGG.cjs.map +1 -0
- package/dist/impl-SDGCTSWN.cjs +2 -0
- package/dist/impl-SDGCTSWN.cjs.map +1 -0
- package/dist/impl-VEMQEG27.cjs +2 -0
- package/dist/impl-VEMQEG27.cjs.map +1 -0
- package/dist/impl-VFWBSWT5.cjs +2 -0
- package/dist/impl-VFWBSWT5.cjs.map +1 -0
- package/dist/impl-XRRNIJUK.cjs +2 -0
- package/dist/impl-XRRNIJUK.cjs.map +1 -0
- package/dist/impl-YA7HWMYB.cjs +2 -0
- package/dist/impl-YA7HWMYB.cjs.map +1 -0
- package/dist/impl-YOWRUVYG.cjs +2 -0
- package/dist/impl-YOWRUVYG.cjs.map +1 -0
- package/dist/impl-ZHZOMOST.cjs +2 -0
- package/dist/impl-ZHZOMOST.cjs.map +1 -0
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +117658 -0
- package/package.json +67 -62
- package/dist/bin/bash-complete.js +0 -3
- package/dist/bin/cli.js +0 -2
- package/dist/bin/deprecated-command.js +0 -6
- package/dist/chunk-355AXZQZ.js +0 -1
- package/dist/chunk-4QPDLGCV.js +0 -3
- package/dist/chunk-AHYJJKNA.js +0 -1
- package/dist/chunk-APA5PR4U.js +0 -1
- package/dist/chunk-B6ZR2J5H.js +0 -74
- package/dist/chunk-BQKOX64R.js +0 -1
- package/dist/chunk-DKNP2CU7.js +0 -2
- package/dist/chunk-EZCJGIOS.js +0 -1
- package/dist/chunk-FSIXUJFP.js +0 -93
- package/dist/chunk-HMF46LB7.js +0 -1
- package/dist/chunk-HZNRGCLH.js +0 -1
- package/dist/chunk-J2ZBQKW5.js +0 -1
- package/dist/chunk-OERYFLN2.js +0 -1
- package/dist/chunk-PDDJKJLS.js +0 -2830
- package/dist/chunk-QQRMUEM7.js +0 -3
- package/dist/chunk-RBOBI6B6.js +0 -5
- package/dist/chunk-RLLIDCPR.js +0 -8
- package/dist/chunk-S7ZUY224.js +0 -11
- package/dist/chunk-T2PLXAEM.js +0 -1
- package/dist/chunk-W6GUOMVP.js +0 -1
- package/dist/chunk-XMGVDVM2.js +0 -1
- package/dist/chunk-ZB5DNAF3.js +0 -1
- package/dist/chunk-ZES4XGUM.js +0 -1
- package/dist/chunk-ZEXWBTLE.js +0 -1
- package/dist/impl-27HXB774.js +0 -8
- package/dist/impl-2IJTNY4B.js +0 -1
- package/dist/impl-45AP5ZX5.js +0 -5
- package/dist/impl-4L5FLYLP.js +0 -1
- package/dist/impl-5WT54GJ6.js +0 -1
- package/dist/impl-6TJVPXFA.js +0 -1
- package/dist/impl-7MZ2GRX2.js +0 -1
- package/dist/impl-7X6DB6TS.js +0 -5
- package/dist/impl-AOO42JWA.js +0 -5
- package/dist/impl-CINASI7X.js +0 -1
- package/dist/impl-CJQKXJK5.js +0 -1
- package/dist/impl-CMZBIUTF.js +0 -1
- package/dist/impl-CUATNMND.js +0 -1
- package/dist/impl-FFM7HH6E.js +0 -1
- package/dist/impl-GURHBO3R.js +0 -1
- package/dist/impl-HHBFHJSK.js +0 -1
- package/dist/impl-KTX24C4K.js +0 -1
- package/dist/impl-KZXH3Y3W.js +0 -1
- package/dist/impl-LM4DMVYI.js +0 -1
- package/dist/impl-LQ275RBM.js +0 -1
- package/dist/impl-M7DBU4GI.js +0 -1
- package/dist/impl-M7QB2XPW.js +0 -1
- package/dist/impl-MDZJCI4H.js +0 -1
- package/dist/impl-N5VJXHO7.js +0 -1
- package/dist/impl-NN2CT2AA.js +0 -1
- package/dist/impl-NYB4YSNU.js +0 -1
- package/dist/impl-PRQTJKHF.js +0 -1
- package/dist/impl-RALRZG3L.js +0 -1
- package/dist/impl-SBRSPHTB.js +0 -1
- package/dist/impl-SCSRN2JZ.js +0 -1
- package/dist/impl-SZVOCN3A.js +0 -1
- package/dist/impl-TE32S5WA.js +0 -1
- package/dist/impl-TONFW3HX.js +0 -1
- package/dist/impl-TX7YFUXO.js +0 -11
- package/dist/impl-U3BDV3RA.js +0 -1
- package/dist/impl-V3A77FGE.js +0 -6
- package/dist/impl-V3YOC4MQ.js +0 -1
- package/dist/impl-WOYVKA3U.js +0 -3
- package/dist/impl-Y4NEIKHE.js +0 -1
- package/dist/index.js +0 -4
package/dist/chunk-QQRMUEM7.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{ea as o}from"./chunk-HMF46LB7.js";import{decodeCodec as c}from"@transcend-io/type-utils";import l from"js-yaml";import{readFileSync as m,writeFileSync as d}from"fs";var s=/<<parameters\.(.+?)>>/,i="parameters";function u(e,t,a=""){let r=e;if(Object.entries(t).forEach(([n,p])=>{r=r.split(`<<${i}.${n}>>`).join(p)}),s.test(r)){let[,n]=s.exec(r)||[];throw new Error(`Found variable that was not set: ${n}.
|
|
2
|
-
Make sure you are passing all parameters through the --${i}=${n}:value-for-param flag.
|
|
3
|
-
${a}`)}return r}function b(e,t={}){let a=m(e,"utf-8"),r=u(a,t,`Also check that there are no extra variables defined in your yaml: ${e}`);return c(o,l.load(r))}function h(e,t){d(e,l.dump(c(o,t)))}export{s as a,i as b,u as c,b as d,h as e};
|
package/dist/chunk-RBOBI6B6.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import*as u from"fast-csv";import{createWriteStream as f,writeFileSync as j,appendFileSync as v}from"fs";function m(n){return n.includes('"')||n.includes(",")||n.includes(`
|
|
2
|
-
`)?`"${n.replace(/"/g,'""')}"`:n}function d(n,t,i){let r=[];r.push(i),r.push(...t.map(e=>Object.values(e)));let s=r.map(e=>e.map(m).join(",")).join(`
|
|
3
|
-
`);j(n,s)}function C(n,t){let r=t.map(s=>Object.values(s)).map(s=>s.map(m).join(",")).join(`
|
|
4
|
-
`);v(n,`
|
|
5
|
-
${r}`)}async function p(n,t,i=!0){let r=f(n);await new Promise((s,e)=>{try{u.write(t,{headers:i,objectMode:!0}).pipe(r).on("error",e).on("end",()=>s(!0))}catch(c){e(c)}})}function x(n){let t=n.lastIndexOf(".");return{baseName:t!==-1?n.substring(0,t):n,extension:t!==-1?n.substring(t):".csv"}}async function O(n,t,i=!0,r=1e5){if(t.length<=r)return await p(n,t,i),[n];let s=[],e=Math.ceil(t.length/r),{baseName:c,extension:b}=x(n);for(let o=0;o<e;o+=1){let a=o*r,l=Math.min(a+r,t.length),w=t.slice(a,l),y=String(o+1).padStart(String(e).length,"0"),g=`${c}_part${y}_of_${e}${b}`;await p(g,w,i),s.push(g)}return s}export{d as a,C as b,p as c,x as d,O as e};
|
package/dist/chunk-RLLIDCPR.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{e as o,f as i}from"./chunk-APA5PR4U.js";import{d as n}from"./chunk-EZCJGIOS.js";import{buildCommand as p,numberParser as m}from"@stricli/core";import{ConsentTrackerStatus as u}from"@transcend-io/privacy-types";import{ScopeName as f,TRANSCEND_SCOPES as s}from"@transcend-io/privacy-types";function b(e){if(!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e))throw new Error(`Invalid UUID format: ${e}`);return e}function a(e){try{return new URL(e).toString().replace(/\/$/,"")}catch{throw new Error(`Invalid URL format: ${e}`)}}function g(e){return e.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function S(e){let r=new Date(e);if(Number.isNaN(r.getTime()))throw new TypeError(`Invalid date: ${e}. Try using the ISO 8601 format (YYYY-MM-DDTHH:MM:SS.SSSZ)`);return r}var l=({scopes:e,requiresSiloScope:r=!1})=>{let t={kind:"parsed",parse:String,brief:"The Transcend API key."};return r&&(t.brief+=" This key must be associated with the data silo(s) being operated on."),e==="Varies"?{...t,brief:`${t.brief} The scopes required will vary depending on the operation performed. If in doubt, the ${s[f.FullAdmin].title} scope will always work.`}:e.length===0?{...t,brief:`${t.brief} No scopes are required for this command.`}:{...t,brief:`${t.brief} Requires scopes: ${e.map(c=>`"${s[c].title}"`).join(", ")}`}},d=(e=o)=>({kind:"parsed",parse:a,brief:"URL of the Transcend backend. Use https://api.us.transcend.io for US hosting",default:e}),U=(e=i)=>({kind:"parsed",parse:a,brief:"URL of the Transcend consent backend. Use https://consent.us.transcend.io for US hosting",default:e}),D=()=>({kind:"parsed",parse:String,brief:"The Sombra internal key, use for additional authentication when self-hosting Sombra",optional:!0});var h=["dataSilos","enrichers","templates","apiKeys"],v=Object.values(u),C=p({loader:async()=>{let{pull:e}=await import("./impl-AOO42JWA.js");return e},parameters:{flags:{auth:l({scopes:"Varies"}),resources:{kind:"enum",values:["all",...Object.values(n)],brief:`The different resource types to pull in. Defaults to ${h.join(",")}.`,variadic:",",optional:!0},file:{kind:"parsed",parse:String,brief:"Path to the YAML file to pull into",default:"./transcend.yml"},transcendUrl:d(),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"The UUIDs of the data silos that should be pulled into the YAML file",optional:!0},integrationNames:{kind:"parsed",parse:String,variadic:",",brief:"The types of integrations to pull down",optional:!0},trackerStatuses:{kind:"enum",values:Object.values(u),variadic:",",brief:"The statuses of consent manager trackers to pull down. Defaults to all statuses.",optional:!0},pageSize:{kind:"parsed",parse:m,brief:"The page size to use when paginating over the API",default:"50"},skipDatapoints:{kind:"boolean",brief:"When true, skip pulling in datapoints alongside data silo resource",default:!1},skipSubDatapoints:{kind:"boolean",brief:"When true, skip pulling in subDatapoints alongside data silo resource",default:!1},includeGuessedCategories:{kind:"boolean",brief:"When true, included guessed data categories that came from the content classifier",default:!1},debug:{kind:"boolean",brief:"Set to true to include debug logs while pulling the configuration",default:!1}}},docs:{brief:"Pull metadata from Transcend into transcend.yml",fullDescription:`Generates a transcend.yml by pulling the configuration from your Transcend instance.
|
|
2
|
-
|
|
3
|
-
The API key needs various scopes depending on the resources being pulled (see the CLI's README for more details).
|
|
4
|
-
|
|
5
|
-
This command can be helpful if you are looking to:
|
|
6
|
-
|
|
7
|
-
- Copy your data into another instance
|
|
8
|
-
- Generate a transcend.yml file as a starting point to maintain parts of your data inventory in code.`}});export{b as a,g as b,S as c,l as d,d as e,U as f,D as g,h,v as i,C as j};
|
package/dist/chunk-S7ZUY224.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{c as x}from"./chunk-ZEXWBTLE.js";import{n as u,q as D}from"./chunk-HZNRGCLH.js";import{ga as w,ha as _}from"./chunk-HMF46LB7.js";import{Le as O,Me as U,a as R,b as P,bd as b,pc as L,pe as S,qc as M,tc as N,wc as k}from"./chunk-PDDJKJLS.js";import{a as c}from"./chunk-OERYFLN2.js";import{e as C}from"./chunk-APA5PR4U.js";import{ConsentBundleType as H}from"@transcend-io/privacy-types";import A from"colors";async function at({auth:e,deploy:i=!1,transcendUrl:o=C,bundleTypes:t=Object.values(H)}){let r=S(o,e),n=await M(r);await R(t,async a=>{c.info(A.magenta(`Update Consent Manager bundle with ID "${n}" and type "${a}" to latest version...`)),await U(r,{id:n,bundleType:a}),c.info(A.green(`Updated Consent Manager bundle with ID "${n}" and type "${a}" to latest version!`))}),i&&await R(t,async a=>{c.info(A.magenta(`Deploying Consent Manager bundle with ID "${n}" and type "${a}"...`)),await O(r,{id:n,bundleType:a}),c.info(A.green(`Deployed Consent Manager bundle with ID "${n}" and type "${a}"!`))})}import G from"colors";var K=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function Ct({auth:e,trackerStatus:i,file:o,classifyService:t=!1,transcendUrl:r=C}){let n=S(r,e);c.info(G.magenta(`Reading "${o}" from disk`));let l=D(o,w).map(({Type:d,Notes:m,Service:f,Purpose:E,Status:g,Owners:I,Teams:T,"Connections Made To":v,...y})=>({value:v,type:d,description:m,trackingPurposes:u(E),status:g||i,owners:I?u(I):void 0,teams:T?u(T):void 0,attributes:Object.entries(y).filter(([h])=>!K.includes(h)).map(([h,B])=>({key:h,values:u(B)}))}));await b(n,l,t)||(c.error(G.red("Encountered error(s) syncing data flows from CSV, see logs above for more info. ")),process.exit(1))}import F from"colors";var j=["ID","Activity","Encounters","Last Seen At","Has Native Do Not Sell/Share Support","IAB USP API Support","Service Description","Website URL","Categories of Recipients"];async function vt({auth:e,trackerStatus:i,file:o,transcendUrl:t=C}){let r=S(t,e);c.info(F.magenta(`Reading "${o}" from disk`));let a=D(o,_).map(({"Is Regex?":s,Notes:d,Service:m,Purpose:f,Status:E,Owners:g,Teams:I,Name:T,...v})=>({...typeof s=="string"?{isRegex:s.toLowerCase()==="true"}:{},name:T,description:d,trackingPurposes:u(f),status:E||i,owners:g?u(g):void 0,teams:I?u(I):void 0,attributes:Object.entries(v).filter(([y])=>!j.includes(y)).map(([y,h])=>({key:y,values:u(h)}))}));await k(r,a)||(c.error(F.red("Encountered error(s) syncing cookies from CSV, see logs above for more info. ")),process.exit(1))}var Y=1e3,Q=60*Y,V=60*Q,X=24*V,z=7*X;async function Lt(e,{bin:i,start:o,end:t=new Date}){let r=await M(e),n=Math.floor(o.getTime()/1e3),a=Math.floor(t.getTime()/1e3);if(n>a)throw new Error('Received "end" date that happened before "start" date');if(i==="1h"&&t.getTime()-o.getTime()>z*2)throw new Error("When using bin=1h, start and end time can be no more than 2 weeks apart");let l=o.toISOString(),s=t.toISOString(),[d,m,f]=await Promise.all([N(e,{dataSource:"PRIVACY_SIGNAL_TIMESERIES",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1}),N(e,{dataSource:"CONSENT_CHANGES_TIMESERIES",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1}),N(e,{dataSource:"CONSENT_SESSIONS_BY_REGIME",startDate:l,endDate:s,forceRefetch:!0,airgapBundleId:r,binInterval:i,smoothTimeseries:!1})]);return{PRIVACY_SIGNAL_TIMESERIES:d,CONSENT_CHANGES_TIMESERIES:m,CONSENT_SESSIONS_BY_REGIME:f}}var $=e=>new URL(`https://${e}`).hostname.split(".").slice(-2).join(".");import W from"colors";import{difference as q}from"lodash-es";var J=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;async function Ht(e,{xdiLocation:i,transcendUrl:o=C,removeIpAddresses:t=!0,domainBlockList:r=["localhost"],xdiAllowedCommands:n="ConsentManager:Sync"}){let a=Array.isArray(e)?e:[{apiKey:e,organizationId:"",organizationName:""}],l=await P(a,async m=>{c.info(W.magenta(`Pulling consent metadata for organization - ${m.organizationName}`));let f=S(o,m.apiKey);return await L(f)},{concurrency:5}),s={};return l.forEach(m=>{let f=m.partition?.partition||m.bundleURL.split("/").reverse()[1];s[f]||(s[f]=[]);let E=q(m.configuration.domains.filter(g=>!t||!J.test(g)).map(g=>$(g)),r);s[f]=[...new Set([...s[f]||[],...E])]}),{html:`
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<script
|
|
4
|
-
src="${i}"
|
|
5
|
-
data-sync-groups='${JSON.stringify(s,null,2)}'
|
|
6
|
-
data-xdi-commands="${n}"
|
|
7
|
-
></script>
|
|
8
|
-
`,syncGroups:s}}function Yt(e){let i=e.map(({name:o,input:t})=>({title:o.replace(".yml",""),attributes:[...t?.domains?[{key:"Transcend Domain List",values:[...new Set(t.domains)]}]:[],...t?.bundleUrls?[{key:"Airgap Production URL",values:[t.bundleUrls.PRODUCTION]},{key:"Airgap Test URL",values:[t.bundleUrls.TEST]},{key:"Airgap XDI URL",values:[t.bundleUrls.PRODUCTION.replace("airgap.js","xdi.js")]}]:[],...t?.partition?[{key:"Consent Partition Key",values:[t.partition]}]:[]]}));return c.info(`
|
|
9
|
-
|
|
10
|
-
~~~~~~~~~~~
|
|
11
|
-
Airgap scripts to host:`),i.forEach(({attributes:o,title:t},r)=>{o?.find(n=>n.key==="Airgap Production URL")?.values?.forEach(n=>{c.info(`${r}) ${t} - ${n}`)})}),i}import*as p from"io-ts";import{decodeCodec as Z}from"@transcend-io/type-utils";var tt=p.intersection([p.type({nodes:p.array(x)}),p.partial({lastKey:p.partial({userId:p.string,partition:p.string,timestamp:p.string})})]);async function zt(e,{partition:i,filterBy:o={},limit:t=50}){let r,n=[],a=!0;for(;a;){let l=await e.post("v1/consent-preferences",{json:{partition:i,...o,startKey:r||void 0,limit:t}}).json(),{nodes:s,lastKey:d}=Z(tt,l);if(!s||s.length===0)break;n.push(...s),r=d,a=!!d&&Object.keys(d).length>0}return n}export{at as a,Ct as b,vt as c,Lt as d,$ as e,J as f,Ht as g,Yt as h,tt as i,zt as j};
|
package/dist/chunk-T2PLXAEM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function o(s){let e=s.split(",").filter(r=>!!r),t={};return e.forEach(r=>{let[i,n]=r.split(":");if(!i||!n)throw new Error(`Invalid variable: ${r}. Expected format: key:value`);t[i]=n}),t}export{o as a};
|
package/dist/chunk-W6GUOMVP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as o}from"./chunk-EZCJGIOS.js";import*as e from"io-ts";import{valuesOf as a}from"@transcend-io/type-utils";var d=({TRouteName:t})=>e.type({routeName:t,enabledPolicies:e.array(a(o))});import*as r from"io-ts";var l=({TEnabledRoutes:t})=>r.type({enabledRoutes:t});export{d as a,l as b};
|
package/dist/chunk-XMGVDVM2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"fs";import e from"os";import r from"path";function p(o){return{process:o,os:e,fs:t,path:r}}export{p as a};
|
package/dist/chunk-ZB5DNAF3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{union as c}from"lodash-es";function f(l,{adTechPurposes:p=["SaleOfInfo"],serviceToTitle:s,serviceToSupportedIntegration:r}){let e=[],i=[],n={};l.forEach(t=>{let{service:a,attributes:h=[]}=t;if(!a||a==="internalService")return;let u=h.find(o=>o.key==="Found on Domain");u&&(n[a]||(n[a]=[]),n[a].push(...u.values.map(o=>o.replace("https://","").replace("http://",""))),n[a]=[...new Set(n[a])]),c(t.trackingPurposes,p).length>0?(i.push(a),e.includes(a)&&(e=e.filter(o=>o!==a))):i.includes(a)||e.push(a)});let m=[...new Set(i)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Found On Domain",values:n[t]||[]}]}));return{siteTechDataSilos:[...new Set(e)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson",outerType:t},attributes:[{key:"Tech Type",values:["Site Tech"]},{key:"Found On Domain",values:n[t]||[]}]})),adTechDataSilos:m}}export{f as a};
|
package/dist/chunk-ZES4XGUM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fa as p}from"./chunk-HMF46LB7.js";import{Fe as h,Ge as z,Ie as $,Je as w,a as y,oe as u,zc as A}from"./chunk-PDDJKJLS.js";import{a as i}from"./chunk-OERYFLN2.js";import{e as S}from"./chunk-APA5PR4U.js";import n from"colors";async function H({email:r,password:a,scopes:f,apiKeyTitle:t,parentOrganizationId:o,deleteExistingApiKey:l=!0,createNewApiKey:x=!0,transcendUrl:k=S}){let s=await u(k,{});i.info(n.magenta("Logging in using email and password."));let{roles:d,loginCookie:P}=await h(s,{email:r,password:a});i.info(n.green(`Successfully logged in and found ${d.length} role${d.length===1?"":"s"}!`));let K=o?d.filter(e=>e.organization.id===o||e.organization.parentOrganizationId===o):d;s.setHeaders({Cookie:P});let m=[],c=[];return i.info(n.magenta(`Generating API keys with title: ${t}, scopes: ${f.join(",")}.`)),await y(K,async e=>{try{await z(s,{roleId:e.id,email:r}),i.info(n.magenta(`Checking if API key already exists in organization "${e.organization.name}" with title: "${t}".`));let[g]=await A(s,[t]);if(g&&l)i.info(n.yellow(`Deleting existing API key in "${e.organization.name}" with title: "${t}".`)),await w(s,g.id),i.info(n.green(`Successfully deleted API key in "${e.organization.name}" with title: "${t}".`));else if(g)throw new Error(`API key already exists with title: "${t}"`);if(x){i.info(n.magenta(`Creating API key in "${e.organization.name}" with title: "${t}".`));let{apiKey:N}=await $(s,{title:t,scopes:f});m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:N}),i.info(n.green(`Successfully created API key in "${e.organization.name}" with title: "${t}".`))}else m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:""})}catch(g){i.error(n.red(`Failed to create API key in organization "${e.organization.name}"! - ${g.message}`)),c.push({organizationName:e.organization.name,organizationId:e.organization.id,error:g.message})}}),i.info(n.green(`Successfully created ${m.length} API key${m.length===1?"":"s"}`)),c.length>0&&i.error(n.red(`Failed to create ${c.length} API key${c.length===1?"":"s"}!`)),{errors:c,apiKeys:m}}import{decodeCodec as C}from"@transcend-io/type-utils";import E from"colors";import*as I from"io-ts";import{existsSync as G,readFileSync as D}from"fs";function T(r){return r||(i.error(E.red("A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY")),process.exit(1)),G(r)?C(I.array(p),D(r,"utf-8")):r}import{existsSync as F,readdirSync as b}from"fs";function Z(r,a,f=!1){if(!F(r))return[];let t=b(r).filter(o=>a?a.filter(l=>o.endsWith(l)).length:!0).filter(o=>o.indexOf(".")>0);return f?t.map(o=>o.replace(/\.[^/.]+$/,"")):t}import{readdirSync as R,statSync as _}from"fs";import{join as L}from"path";function te(r){return R(r).filter(a=>_(L(r,a)).isDirectory())}export{H as a,T as b,Z as c,te as d};
|
package/dist/chunk-ZEXWBTLE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ee as N,b}from"./chunk-PDDJKJLS.js";import{a}from"./chunk-OERYFLN2.js";import{f as U}from"./chunk-APA5PR4U.js";import*as E from"crypto";import*as $ from"jsonwebtoken";function B(c,l,n){let o=Buffer.from(n,"base64"),f=Buffer.from(l,"base64"),u="id-aes256-wrap-pad",d=Buffer.from("A65959A6","hex"),s=E.createCipheriv(u,f,d),i={encryptedIdentifier:Buffer.concat([s.update(c),s.final()]).toString("base64")};return $.sign(i,o,{algorithm:"HS384"})}import*as e from"io-ts";var O=e.intersection([e.type({userId:e.string,timestamp:e.string}),e.partial({confirmed:e.union([e.literal("true"),e.literal("false")]),updated:e.union([e.literal("true"),e.literal("false")]),prompted:e.union([e.literal("true"),e.literal("false")]),metadata:e.string,usp:e.union([e.string,e.null]),gpp:e.union([e.string,e.null])})]),Y=e.intersection([O,e.partial({purposes:e.string})]),G=e.intersection([O,e.type({partition:e.string}),e.partial({tcf:e.union([e.string,e.null]),purposes:e.record(e.string,e.union([e.boolean,e.string]))})]);import P from"colors";import*as r from"io-ts";import A from"cli-progress";import{decodeCodec as I}from"@transcend-io/type-utils";var R=/^[0-9][Y|N]([Y|N])[Y|N]$/,_=r.record(r.string,r.union([r.boolean,r.literal("Auto")]));async function Z({base64EncryptionKey:c,base64SigningKey:l,preferences:n,partition:o,concurrency:f=100,transcendUrl:u=U}){let d=N(u),s=n.filter(t=>t.usp&&!R.test(t.usp));if(s.length>0)throw new Error(`Received invalid usp strings: ${JSON.stringify(s,null,2)}`);let m=n.map((t,y)=>[t,y]).filter(([t])=>{if(!t.purposes)return!1;try{return I(_,t.purposes),!1}catch{return!0}});if(m.length>0)throw new Error(`Received invalid purpose maps: ${JSON.stringify(m,null,2)}`);let i=n.filter(t=>!t.usp&&!t.purposes);if(i.length>0)throw new Error(`Received invalid inputs, expected either purposes or usp to be defined: ${JSON.stringify(i,null,2)}`);a.info(P.magenta(`Uploading ${n.length} user preferences to partition ${o}`));let w=new Date().getTime(),g=new A.SingleBar({},A.Presets.shades_classic),S=0;g.start(n.length,0),await b(n,async({userId:t,confirmed:y="true",updated:T,prompted:v,purposes:x,...p})=>{let k=B(t,c,l),[,D]=p.usp?R.exec(p.usp)||[]:[],F={token:k,partition:o,consent:{confirmed:y==="true",purposes:x?I(_,x):p.usp?{SaleOfInfo:D==="Y"}:{},...T?{updated:T==="true"}:{},...v?{prompted:v==="true"}:{},...p}};try{await d.post("sync",{json:F}).json()}catch(h){try{let C=JSON.parse(h?.response?.body||"{}");C.error&&a.error(P.red(`Error: ${C.error}`))}catch{}throw new Error(`Received an error from server: ${h?.response?.body||h?.message}`)}S+=1,g.update(S)},{concurrency:f}),g.stop();let j=new Date().getTime()-w;a.info(P.green(`Successfully uploaded ${n.length} user preferences to partition ${o} in "${j/1e3}" seconds!`))}export{B as a,Y as b,G as c,R as d,_ as e,Z as f};
|
package/dist/impl-27HXB774.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{b as O}from"./chunk-ZES4XGUM.js";import"./chunk-355AXZQZ.js";import{c as v}from"./chunk-RBOBI6B6.js";import{d as b}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as M,pe as x,sc as S}from"./chunk-PDDJKJLS.js";import{a as t}from"./chunk-OERYFLN2.js";import{c as y}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import e from"colors";import{join as w}from"path";import E,{existsSync as j,mkdirSync as T}from"fs";async function q({auth:A,start:C,end:f,folder:r,bin:l,transcendUrl:N}){let m=await O(A);E.existsSync(r)&&!E.lstatSync(r).isDirectory()&&(t.error(e.red('The provided argument "folder" was passed a file. expected: folder="./consent-metrics/"')),process.exit(1));let g=l;Object.values(S).includes(g)||(t.error(e.red(`Failed to parse argument "bin" with value "${l}"
|
|
2
|
-
Expected one of:
|
|
3
|
-
${Object.values(S).join(`
|
|
4
|
-
`)}`)),process.exit(1));let i=new Date(C),o=f?new Date(f):new Date;if(Number.isNaN(i.getTime())&&(t.error(e.red(`Start date provided is invalid date. Got --start="${C}" expected --start="01/01/2023"`)),process.exit(1)),Number.isNaN(o.getTime())&&(t.error(e.red(`End date provided is invalid date. Got --end="${f}" expected --end="01/01/2023"`)),process.exit(1)),i>o&&(t.error(e.red(`Got a start date "${i.toISOString()}" that was larger than the end date "${o.toISOString()}". Start date must be before end date.`)),process.exit(1)),j(r)||T(r),t.info(e.magenta(`Pulling consent metrics from start=${i.toString()} to end=${o.toISOString()} with bin size "${l}"`)),typeof m=="string"){try{let n=x(N,m),s=await b(n,{bin:g,start:i,end:o});Object.entries(s).forEach(([p,c])=>{c.forEach(({points:u,name:d})=>{let a=w(r,`${p}_${d}.csv`);t.info(e.magenta(`Writing configuration to file "${a}"...`)),v(a,u.map(({key:$,value:h})=>({timestamp:$,value:h})))})})}catch(n){t.error(e.red(`An error occurred syncing the schema: ${n.message}`)),process.exit(1)}t.info(e.green(`Successfully synced consent metrics to disk in folder "${r}"! View at ${y}`))}else{let n=[];await M(m,async(s,p)=>{let c=`[${p+1}/${m.length}][${s.organizationName}] `;t.info(e.magenta(`~~~
|
|
5
|
-
|
|
6
|
-
${c}Attempting to pull consent metrics...
|
|
7
|
-
|
|
8
|
-
~~~`));let u=x(N,s.apiKey);try{let d=await b(u,{bin:g,start:i,end:o}),a=w(r,s.organizationName);j(a)||T(a),Object.entries(d).forEach(([$,h])=>{h.forEach(({points:I,name:F})=>{let D=w(a,`${$}_${F}.csv`);t.info(e.magenta(`Writing configuration to file "${D}"...`)),v(D,I.map(({key:G,value:z})=>({timestamp:G,value:z})))})}),t.info(e.green(`${c}Successfully pulled configuration!`))}catch{t.error(e.red(`${c}Failed to sync configuration.`)),n.push(s.organizationName)}}),n.length>0&&(t.info(e.red(`Sync encountered errors for "${n.join(",")}". View output above for more information, or check out ${y}`)),process.exit(1))}}export{q as pullConsentMetrics};
|
package/dist/impl-2IJTNY4B.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as o,e as r}from"./chunk-QQRMUEM7.js";import{c as m}from"./chunk-ZES4XGUM.js";import{h as a}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-PDDJKJLS.js";import{a as t}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{join as u}from"path";import c from"colors";import{existsSync as g,lstatSync as l}from"fs";function b({consentManagerYmlFolder:s,output:n}){(!g(s)||!l(s).isDirectory())&&(t.error(c.red(`Folder does not exist: "${s}"`)),process.exit(1));let p=m(s).map(i=>{let{"consent-manager":f}=o(u(s,i));return{name:i,input:f}}),e=a(p);r(n,{"business-entities":e}),t.info(c.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}export{b as consentManagersToBusinessEntities};
|
package/dist/impl-45AP5ZX5.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-AHYJJKNA.js";import{a as A}from"./chunk-T2PLXAEM.js";import{d as b}from"./chunk-QQRMUEM7.js";import{b as v,c as C}from"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{Nd as x,a as w,pe as T}from"./chunk-PDDJKJLS.js";import{a as n}from"./chunk-OERYFLN2.js";import{c as d}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{existsSync as z,lstatSync as F}from"fs";import{join as L}from"path";import o from"colors";async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=T(i,c);try{return!await x(l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(t){return n.error(o.red(`An unexpected error occurred syncing the schema: ${t.message}`)),!1}}async function H({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){let t=await v(h),N=A(y),p;if(Array.isArray(t)&&F(i).isDirectory()?p=C(i).map(e=>L(i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{z(e)?n.info(o.magenta(`Reading file "${e}"...`)):(n.error(o.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),process.exit(1));try{let r=b(e,N);return n.info(o.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){n.error(o.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),process.exit(1)}});if(typeof t=="string"){let[e,...r]=s.map(({content:g})=>g),$=S(e,...r);await I({transcendUrl:c,auth:t,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(n.info(o.red(`Sync encountered errors. View output above for more information, or check out ${d}`)),process.exit(1))}else{if(s.length!==1&&s.length!==t.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${t.length} API key${t.length===1?"":"s"}`);let e=[];await w(t,async(r,$)=>{let a=`[${$+1}/${t.length}][${r.organizationName}] `;n.info(o.magenta(`~~~
|
|
2
|
-
|
|
3
|
-
${a}Attempting to push configuration...
|
|
4
|
-
|
|
5
|
-
~~~`));let g=s.length===1?s[0].content:s.find(E=>E.name===r.organizationName)?.content;if(!g){n.error(o.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:g,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?n.info(o.green(`${a}Successfully pushed configuration!`)):(n.error(o.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(n.info(o.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${d}`)),process.exit(1))}n.info(o.green(`Successfully synced yaml file to Transcend! View at ${d}`))}export{H as push};
|
package/dist/impl-4L5FLYLP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as n,f as r}from"./chunk-ZEXWBTLE.js";import{q as e}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function d({base64EncryptionKey:o,base64SigningKey:t,partition:s,file:i,consentUrl:a,concurrency:c}){let m=e(i,n);await r({base64EncryptionKey:o,base64SigningKey:t,preferences:m,partition:s,concurrency:c,transcendUrl:a})}export{d as uploadConsentPreferences};
|
package/dist/impl-5WT54GJ6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as t}from"./chunk-355AXZQZ.js";import"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function s({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n}){await t({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n})}export{s as markIdentifiersCompleted};
|
package/dist/impl-6TJVPXFA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as t}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{RequestStatus as e}from"@transcend-io/privacy-types";async function f({auth:o,transcendUrl:a,folderPath:r,requestIds:n,statuses:s=[e.Approving,e.Downloadable],concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c}){await t({transcendUrl:a,auth:o,folderPath:r,requestIds:n,statuses:s,concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c})}export{f as downloadFiles};
|
package/dist/impl-7MZ2GRX2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as e}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function A({auth:t,requestReceiptFolder:s,sombraAuth:r,actions:a,statuses:o,requestIds:i,createdAt:n,emailIsVerified:c,silentModeBefore:u,sendEmailReceipt:d,copyIdentifiers:m,skipWaitingPeriod:l,createdAtBefore:p,createdAtAfter:f,concurrency:R,transcendUrl:q}){await e({requestReceiptFolder:s,auth:t,sombraAuth:r,requestActions:a,requestStatuses:o,requestIds:i,createdAt:n,emailIsVerified:c,silentModeBefore:u,sendEmailReceipt:d,copyIdentifiers:m,skipWaitingPeriod:l,createdAtBefore:p,createdAtAfter:f,concurrency:R,transcendUrl:q})}export{A as restart};
|
package/dist/impl-7X6DB6TS.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-PDDJKJLS.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import x from"colors";import{writeFileSync as A}from"fs";import{TRANSCEND_SCOPES as E}from"@transcend-io/privacy-types";import{keyBy as K}from"lodash-es";var i=K(Object.entries(E).map(([t,o])=>({...o,name:t})),"title"),N=Object.keys(i);async function P({email:t,password:o,apiKeyTitle:p,file:c,scopes:m,deleteExistingApiKey:l,createNewApiKey:g,parentOrganizationId:f,transcendUrl:y}){let r=m.map(e=>e.trim()),s=r.filter(e=>!i[e]);s.length>0&&(n.error(x.red(`Failed to parse scopes:"${s.join(",")}".
|
|
2
|
-
Expected one of:
|
|
3
|
-
${N.join(`
|
|
4
|
-
`)}`)),process.exit(1));let S=r.map(e=>i[e].name),{errors:d,apiKeys:C}=await a({transcendUrl:y,password:o,email:t,parentOrganizationId:f,deleteExistingApiKey:l,createNewApiKey:g,apiKeyTitle:p,scopes:S});A(c,`${JSON.stringify(C,null,2)}
|
|
5
|
-
`),d.length>0&&process.exit(1)}export{P as generateApiKeys};
|
package/dist/impl-AOO42JWA.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{e as l}from"./chunk-QQRMUEM7.js";import{h as R,i as b}from"./chunk-RLLIDCPR.js";import{b as N}from"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as P,be as m,pe as u}from"./chunk-PDDJKJLS.js";import{a as o}from"./chunk-OERYFLN2.js";import{c as f}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import{d as E}from"./chunk-EZCJGIOS.js";import n from"colors";import{join as k}from"path";import D from"fs";async function M({auth:x,resources:g=R,file:t,transcendUrl:p,dataSiloIds:d=[],integrationNames:T=[],trackerStatuses:y=b,pageSize:S,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,debug:a}){let i=await N(x),C=g.includes("all")?Object.values(E):g;if(typeof i=="string"){try{let r=u(p,i),e=await m(r,{dataSiloIds:d,integrationNames:T,resources:C,pageSize:S,debug:a,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:y});o.info(n.magenta(`Writing configuration to file "${t}"...`)),l(t,e)}catch(r){o.error(n.red(`An error occurred syncing the schema: ${a?r.stack:r.message}`)),process.exit(1)}o.info(n.green(`Successfully synced yaml file to disk at ${t}! View at ${f}`))}else{if(!D.lstatSync(t).isDirectory())throw new Error("File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/");let r=[];await P(i,async(e,L)=>{let s=`[${L+1}/${i.length}][${e.organizationName}] `;o.info(n.magenta(`~~~
|
|
2
|
-
|
|
3
|
-
${s}Attempting to pull configuration...
|
|
4
|
-
|
|
5
|
-
~~~`));let _=u(p,e.apiKey);try{let c=await m(_,{dataSiloIds:d,integrationNames:T,resources:C,pageSize:S,debug:a,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:y}),w=k(t,`${e.organizationName}.yml`);o.info(n.magenta(`Writing configuration to file "${w}"...`)),l(w,c),o.info(n.green(`${s}Successfully pulled configuration!`))}catch(c){o.error(n.red(`${s}Failed to sync configuration. - ${c.message}`)),r.push(e.organizationName)}}),r.length>0&&(o.info(n.red(`Sync encountered errors for "${r.join(",")}". View output above for more information, or check out ${f}`)),process.exit(1))}}export{M as pull};
|
package/dist/impl-CINASI7X.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as l}from"./chunk-B6ZR2J5H.js";import"./chunk-355AXZQZ.js";import{c as m}from"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import{pe as c}from"./chunk-PDDJKJLS.js";import{a as r}from"./chunk-OERYFLN2.js";import{d as g}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{uniq as A,groupBy as G}from"lodash-es";import n from"colors";async function k({auth:p,file:a,transcendUrl:d,dataSiloIds:u,includeAttributes:y,includeGuessedCategories:C,parentCategories:f,subCategories:D=[]}){try{let o=c(d,p),P=await l(o,{dataSiloIds:u,includeGuessedCategories:C,parentCategories:f,includeAttributes:y,subCategories:D});r.info(n.magenta(`Writing datapoints to file "${a}"...`));let s=[],b=P.map(e=>{let i={"Property ID":e.id,"Data Silo":e.dataSilo.title,Object:e.dataPoint.name,"Object Path":e.dataPoint.path.join("."),Property:e.name,"Property Description":e.description,"Data Categories":e.categories.map(t=>`${t.category}:${t.name}`).join(", "),"Guessed Category":e.pendingCategoryGuesses?.[0]?`${e.pendingCategoryGuesses[0].category.category}:${e.pendingCategoryGuesses[0].category.name}`:"","Processing Purposes":e.purposes.map(t=>`${t.purpose}:${t.name}`).join(", "),...Object.entries(G(e.attributeValues||[],({attributeKey:t})=>t.name)).reduce((t,[$,h])=>(t[$]=h.map(j=>j.name).join(","),t),{})};return s=A([...s,...Object.keys(i)]),i});m(a,b,s)}catch(o){r.error(n.red(`An error occurred syncing the datapoints: ${o.message}`)),process.exit(1)}r.info(n.green(`Successfully synced datapoints to disk at ${a}! View at ${g}`))}export{k as pullDatapoints};
|
package/dist/impl-CJQKXJK5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function m({auth:t,actions:r,origins:o,silentModeBefore:i,createdAtBefore:n,createdAtAfter:a,transcendUrl:s,concurrency:c}){await e({transcendUrl:s,requestActions:r,auth:t,requestOrigins:o,concurrency:c,silentModeBefore:i,createdAtBefore:n,createdAtAfter:a})}export{m as approve};
|
package/dist/impl-CMZBIUTF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as f}from"./chunk-355AXZQZ.js";import{c as l,d as m}from"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import{a as t}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import o from"colors";import{uniq as P}from"lodash-es";async function N({file:d,transcendUrl:u,auth:p,sombraAuth:g,dataSiloId:c,actions:v,pageLimit:r,skipRequestCount:n,chunkSize:e}){n&&t.info(o.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(e)||e<=0||e%r!==0)&&(t.error(o.red(`Invalid chunk size: "${e}". Must be a positive integer that is a multiple of ${r}.`)),process.exit(1));let{baseName:b,extension:C}=m(d),a=0;await f({transcendUrl:u,apiPageSize:r,savePageSize:e,onSave:i=>{let s=`${b}-${a}${C}`;t.info(o.blue(`Saving ${i.length} identifiers to file "${s}"`));let $=P(i.map(I=>Object.keys(I)).flat());return l(s,i,$),t.info(o.green(`Successfully wrote ${i.length} identifiers to file "${s}"`)),a+=1,Promise.resolve()},actions:v,auth:p,sombraAuth:g,dataSiloId:c,skipRequestCount:n})}export{N as pullIdentifiers};
|
package/dist/impl-CUATNMND.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function u({auth:e,transcendUrl:r,actions:a,statuses:n,requestIds:s,createdAtBefore:o,createdAtAfter:i,concurrency:c}){await t({transcendUrl:r,requestActions:a,auth:e,requestIds:s,statuses:n,concurrency:c,createdAtBefore:o,createdAtAfter:i})}export{u as markSilent};
|
package/dist/impl-FFM7HH6E.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-355AXZQZ.js";import{c as s}from"./chunk-RBOBI6B6.js";import{U as r}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import y from"colors";import{uniq as q}from"lodash-es";async function v({auth:n,transcendUrl:a,file:e,pageLimit:i,actions:m,sombraAuth:c,statuses:u,createdAtBefore:p,createdAtAfter:f,showTests:l}){let{requestsFormattedForCsv:t}=await r({transcendUrl:a,pageLimit:i,actions:m,statuses:u,auth:n,sombraAuth:c,createdAtBefore:p,createdAtAfter:f,isTest:l}),g=q(t.map(d=>Object.keys(d)).flat());s(e,t,g),o.info(y.green(`Successfully wrote ${t.length} requests to file "${e}"`))}export{v as _export};
|
package/dist/impl-GURHBO3R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as t,n as e}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function y({auth:o,file:i,transcendUrl:n,cacheFilepath:a,requestReceiptFolder:r,sombraAuth:s,concurrency:l,attributes:c,isTest:d,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,skipFilterStep:b,dryRun:g,debug:C,defaultPhoneCountryCode:f}){await t({cacheFilepath:a,requestReceiptFolder:r,file:i,auth:o,sombraAuth:s,concurrency:l,transcendUrl:n,defaultPhoneCountryCode:f,attributes:e(c),debug:C,skipFilterStep:b,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,isTest:d,dryRun:g})}export{y as upload};
|
package/dist/impl-HHBFHJSK.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as t}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function n({auth:s,dataSiloId:a,status:e,statuses:i,transcendUrl:o}){await t({transcendUrl:o,auth:s,status:e,dataSiloId:a,requestStatuses:i})}export{n as skipRequestDataSilos};
|
package/dist/impl-KTX24C4K.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-ZES4XGUM.js";import{g as t}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-PDDJKJLS.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import e from"colors";import{writeFileSync as g}from"fs";async function C({auth:d,xdiLocation:s,file:i,removeIpAddresses:c,domainBlockList:o,xdiAllowedCommands:l,transcendUrl:a}){let m=await r(d),{syncGroups:p,html:f}=await t(m,{xdiLocation:s,transcendUrl:a,removeIpAddresses:c,domainBlockList:o.length>0?o:void 0,xdiAllowedCommands:l});n.info(e.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(p,null,2)}`)),g(i,f),n.info(e.green(`Wrote configuration to file "${i}"!`))}export{C as buildXdiSyncEndpoint};
|
package/dist/impl-KZXH3Y3W.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as m}from"./chunk-ZES4XGUM.js";import{a as t}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as g}from"./chunk-PDDJKJLS.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import a from"colors";import{ConsentBundleType as p}from"@transcend-io/privacy-types";async function M({auth:f,bundleTypes:r=[p.Production,p.Test],deploy:i,transcendUrl:s}){let e=await m(f);typeof e=="string"?(await t({deploy:i,transcendUrl:s,auth:e,bundleTypes:r}),n.info(a.green("Successfully updated Consent Manager!"))):(await g(e,async o=>{n.info(a.magenta(`Updating Consent Manager for organization "${o.organizationName}"...`)),await t({deploy:i,transcendUrl:s,auth:o.apiKey,bundleTypes:r}),n.info(a.green(`Successfully updated Consent Manager for organization "${o.organizationName}"!`))}),n.info(a.green("Successfully updated Consent Managers!")))}export{M as updateConsentManager};
|
package/dist/impl-LM4DMVYI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function i({auth:t,trackerStatus:r,file:s,transcendUrl:a}){await o({auth:t,trackerStatus:r,file:s,transcendUrl:a})}export{i as uploadCookiesFromCsv};
|
package/dist/impl-LQ275RBM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as d}from"./chunk-B6ZR2J5H.js";import"./chunk-355AXZQZ.js";import{c as u}from"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import{pe as c}from"./chunk-PDDJKJLS.js";import{a as e}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import i from"colors";import{uniq as b}from"lodash-es";async function x({auth:l,file:s,transcendUrl:m,dataSiloIds:f,subCategories:p,status:g,includeEncryptedSnippets:a}){try{let o=c(m,l),C=await d(o,{dataSiloIds:f,subCategories:p,status:g,includeEncryptedSnippets:a});e.info(i.magenta(`Writing unstructured discovery files to file "${s}"...`));let r=[],S=C.map(t=>{let n={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...a?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return r=b([...r,...Object.keys(n)]),n});u(s,S,r)}catch(o){e.error(i.red(`An error occurred syncing the unstructured discovery files: ${o.message}`)),process.exit(1)}e.info(i.green(`Successfully synced unstructured discovery files to disk at ${s}!`))}export{x as pullUnstructuredDiscoveryFiles};
|
package/dist/impl-M7DBU4GI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as t}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function f({auth:e,transcendUrl:i,createdAtBefore:n,createdAtAfter:o,actions:r,daysLeft:a,days:s,requestIds:m,emailTemplate:c,concurrency:d}){await t({transcendUrl:i,requestActions:r,auth:e,emailTemplate:c,days:s,daysLeft:a,requestIds:m,concurrency:d,createdAtBefore:n,createdAtAfter:o})}export{f as notifyAdditionalTime};
|
package/dist/impl-M7QB2XPW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as t}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function e({auth:i,transcendUrl:o,enricherIds:r}){await t({transcendUrl:o,auth:i,enricherIds:r})}export{e as skipPreflightJobs};
|
package/dist/impl-MDZJCI4H.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as a}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function m({auth:s,actions:o,statuses:r=[],requestIds:c,silentModeBefore:e,createdAtBefore:t,createdAtAfter:n,cancellationTitle:i,transcendUrl:u,concurrency:d}){await a({transcendUrl:u,requestActions:o,auth:s,cancellationTitle:i,requestIds:c,statuses:r,concurrency:d,silentModeBefore:e?new Date(e):void 0,createdAtBefore:t?new Date(t):void 0,createdAtAfter:n?new Date(n):void 0})}export{m as cancel};
|
package/dist/impl-N5VJXHO7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as s}from"./chunk-355AXZQZ.js";import"./chunk-RBOBI6B6.js";import{q as a}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import l from"colors";import*as t from"io-ts";var p=t.type({"Request Id":t.string});async function R({auth:r,dataSiloId:i,file:e,transcendUrl:m}){o.info(l.magenta(`Reading "${e}" from disk`));let n=a(e,p);await s({requestIds:n.map(d=>d["Request Id"]),transcendUrl:m,auth:r,dataSiloId:i})}export{R as markRequestDataSilosCompleted};
|
package/dist/impl-NN2CT2AA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as w}from"./chunk-ZB5DNAF3.js";import{d as D,e as h}from"./chunk-QQRMUEM7.js";import{c as y}from"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{ne as S,pe as T}from"./chunk-PDDJKJLS.js";import{a as c}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{join as O}from"path";import{difference as v}from"lodash-es";import I from"colors";import{existsSync as $,lstatSync as b}from"fs";async function Q({auth:F,dataFlowsYmlFolder:a,output:x,ignoreYmls:C=[],transcendUrl:k}){a||(c.error(I.red("Missing required arg: --dataFlowsYmlFolder=./working/data-flows/")),process.exit(1)),(!$(a)||!b(a).isDirectory())&&(c.error(I.red(`Folder does not exist: "${a}"`)),process.exit(1));let N=C.map(t=>t.split(".")[0]),l=y(a).map(t=>{let{"data-flows":o=[]}=D(O(a,t)),{adTechDataSilos:m,siteTechDataSilos:r}=w(o,{serviceToSupportedIntegration:u,serviceToTitle:f});return{adTechDataSilos:m,siteTechDataSilos:r,organizationName:t.split(".")[0]}}),s={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o,organizationName:m})=>{[...t,...o].forEach(e=>{let n=e["outer-type"]||e.integrationName;s[n]||(s[n]=[]),s[n].push(m),s[n]=[...new Set(s[n])]})});let p=[...new Set(l.map(({adTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],g=v([...new Set(l.map(({siteTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],p),i={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o})=>{[...t,...o].forEach(r=>{let e=r["outer-type"]||r.integrationName,n=r.attributes?.find(E=>E.key==="Found On Domain");i[e]||(i[e]=[]),i[e].push(...n?.values||[]),i[e]=[...new Set(i[e])]})});let A=T(k,F),{serviceToTitle:f,serviceToSupportedIntegration:u}=await S(A),d=[...p,...g].map(t=>({title:f[t],...u[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Business Units",values:v(s[t]||[],N)},{key:"Found On Domain",values:i[t]||[]}]}));c.log(`Total Services: ${d.length}`),c.log(`Ad Tech Services: ${p.length}`),c.log(`Site Tech Services: ${g.length}`),h(x,{"data-silos":d})}export{Q as deriveDataSilosFromDataFlowsCrossInstance};
|
package/dist/impl-NYB4YSNU.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as c}from"./chunk-QQRMUEM7.js";import{ia as i}from"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import*as p from"io-ts";import m from"colors";import{existsSync as u,readFileSync as g}from"fs";import{decodeCodec as d}from"@transcend-io/type-utils";import{ConsentTrackerStatus as l,DataFlowScope as C}from"@transcend-io/privacy-types";function P({file:e,output:n}){u(e)||(a.error(m.red(`File does not exist: --file="${e}"`)),process.exit(1));let f=d(p.array(i),g(e,"utf-8")),t=[],r=[];f.forEach(s=>{s.dataFlows.filter(({type:o})=>o!==C.CSP).forEach(o=>{t.push({value:o.value,type:o.type,status:l.Live,trackingPurposes:o.trackingPurposes})}),s.cookies.forEach(o=>{r.push({name:o.name,status:l.Live,trackingPurposes:o.trackingPurposes})})}),c(n,{"data-flows":t,cookies:r}),a.info(m.green(`Successfully wrote ${t.length} data flows and ${r.length} cookies to file "${n}"`))}export{P as consentManagerServiceJsonToYml};
|
package/dist/impl-PRQTJKHF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as r}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function m({auth:n,enricherId:s,actions:i,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e,createdAtAfter:t,concurrency:o,transcendUrl:u}){await r({auth:n,enricherId:s,requestActions:i,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e?new Date(e):void 0,createdAtAfter:t?new Date(t):void 0,concurrency:o,transcendUrl:u})}export{m as enricherRestart};
|
package/dist/impl-RALRZG3L.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./chunk-DKNP2CU7.js";import"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function c({auth:n,transcendUrl:e,file:i,concurrency:r,actions:o,sombraAuth:s}){await t({file:i,transcendUrl:e,concurrency:r,requestActions:o,auth:n,sombraAuth:s})}export{c as pullIdentifiers};
|
package/dist/impl-SBRSPHTB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as w}from"./chunk-355AXZQZ.js";import{c as d,d as c}from"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import{Ke as v,b as h,pe as q}from"./chunk-PDDJKJLS.js";import{a as t}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import i from"colors";import{uniq as u}from"lodash-es";async function W({file:n,fileTarget:a,transcendUrl:m,auth:p,sombraAuth:P,cronDataSiloId:S,targetDataSiloId:F,actions:x,skipRequestCount:g,pageLimit:l,chunkSize:s}){g&&t.info(i.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(s)||s<=0||s%l!==0)&&(t.error(i.red(`Invalid chunk size: "${s}". Must be a positive integer that is a multiple of ${l}.`)),process.exit(1));let N=q(m,p),{baseName:R,extension:T}=c(n),{baseName:j,extension:O}=c(a),$=0,b=0,f=0;await w({dataSiloId:S,auth:p,sombraAuth:P,actions:x,apiPageSize:l,savePageSize:s,onSave:async o=>{$+=o.length;let A=o.map(e=>e.requestId),D=u(A),y=await h(D,async e=>(await v(N,{requestId:e,dataSiloId:F})).map(({fileName:C,remoteId:I})=>{if(!I)throw new Error(`Failed to find remoteId for ${C} request: ${e}`);return{RecordId:I,Object:C.replace(".json","").split("/").pop()?.replace(" Information",""),Comment:"Customer data deletion request submitted via transcend.io"}}),{concurrency:10});b+=y.flat().length;let L=u(o.map(e=>Object.keys(e)).flat()),E=`${R}-${f}${T}`,G=`${j}-${f}${O}`;d(E,o,L),t.info(i.green(`Successfully wrote ${o.length} identifiers to file "${n}"`));let r=y.flat(),M=u(r.map(e=>Object.keys(e)).flat());d(G,r,M),t.info(i.green(`Successfully wrote ${r.length} identifiers to file "${a}"`)),t.info(i.blue(`Processed chunk of ${o.length} identifiers, found ${r.length} target identifiers`)),f+=1},transcendUrl:m,skipRequestCount:g}),t.info(i.green(`Successfully wrote ${$} identifiers to file "${n}"`)),t.info(i.green(`Successfully wrote ${b} identifiers to file "${a}"`))}export{W as pullProfiles};
|
package/dist/impl-SCSRN2JZ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function n({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e}){await a({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e})}export{n as uploadDataFlowsFromCsv};
|
package/dist/impl-SZVOCN3A.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-ZB5DNAF3.js";import{d as c,e as l}from"./chunk-QQRMUEM7.js";import{c as d}from"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{ne as m,pe as g}from"./chunk-PDDJKJLS.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{join as f}from"path";import e from"colors";import{existsSync as D,lstatSync as h}from"fs";async function M({auth:x,dataFlowsYmlFolder:r,dataSilosYmlFolder:t,ignoreYmls:S=[],transcendUrl:T}){r||(o.error(e.red("Missing required arg: --dataFlowsYmlFolder=./working/data-flows/")),process.exit(1)),(!D(r)||!h(r).isDirectory())&&(o.error(e.red(`Folder does not exist: "${r}"`)),process.exit(1)),t||(o.error(e.red("Missing required arg: --dataSilosYmlFolder=./working/data-silos/")),process.exit(1)),(!D(t)||!h(t).isDirectory())&&(o.error(e.red(`Folder does not exist: "${t}"`)),process.exit(1));let w=g(T,x),{serviceToTitle:u,serviceToSupportedIntegration:v}=await m(w);d(r).forEach(i=>{let{"data-flows":F=[]}=c(f(r,i)),{adTechDataSilos:s,siteTechDataSilos:a}=p(F,{serviceToSupportedIntegration:v,serviceToTitle:u}),n=[...s,...a];o.log(`Total Services: ${n.length}`),o.log(`Ad Tech Services: ${s.length}`),o.log(`Site Tech Services: ${a.length}`),l(f(t,i),{"data-silos":S.includes(i)?[]:n})})}export{M as deriveDataSilosFromDataFlows};
|
package/dist/impl-TE32S5WA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function s({auth:t,transcendUrl:i,identifierNames:n,actions:r=[]}){await e({requestActions:r,transcendUrl:i,auth:t,identifierNames:n})}export{s as rejectUnverifiedIdentifiers};
|
package/dist/impl-TONFW3HX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-355AXZQZ.js";import{c as i}from"./chunk-RBOBI6B6.js";import{j as s}from"./chunk-S7ZUY224.js";import"./chunk-ZEXWBTLE.js";import"./chunk-HZNRGCLH.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{qe as o}from"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function h({auth:a,partition:m,sombraAuth:c,file:p,transcendUrl:f,timestampBefore:e,timestampAfter:r,identifiers:n=[],concurrency:l}){let g=await o(f,a,c),u=await s(g,{partition:m,filterBy:{...e?{timestampBefore:e.toISOString()}:{},...r?{timestampAfter:r.toISOString()}:{},...n.length>0?{identifiers:n}:{}},limit:l});i(p,u.map(t=>({...t,purposes:JSON.stringify(t.purposes),...t.purposes})))}export{h as pullConsentPreferences};
|
package/dist/impl-TX7YFUXO.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as Q}from"./chunk-BQKOX64R.js";import"./chunk-T2PLXAEM.js";import{n as F,p as X,q as Z}from"./chunk-HZNRGCLH.js";import"./chunk-W6GUOMVP.js";import{Qc as H,_d as ee,a as A,b as V,pe as te,qe as re}from"./chunk-PDDJKJLS.js";import{a as l}from"./chunk-OERYFLN2.js";import{f as oe}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import v from"colors";import k from"colors";import{chunk as Qe}from"lodash-es";import ye from"cli-progress";import{PersistedState as Ge}from"@transcend-io/persisted-state";import{keyBy as De}from"lodash-es";import*as x from"io-ts";import de from"colors";import{PreferenceQueryResponseItem as Ue}from"@transcend-io/privacy-types";import ne from"colors";import se from"cli-progress";import{chunk as ke}from"lodash-es";import{decodeCodec as Re}from"@transcend-io/type-utils";import*as T from"io-ts";var Me=T.intersection([T.type({nodes:T.array(Ue)}),T.partial({cursor:T.string})]),Ve=["ENOTFOUND","ETIMEDOUT","504 Gateway Time-out","Task timed out after"];async function ie(m,{identifiers:n,partitionKey:h,skipLogging:d=!1}){let s=[],u=ke(n,100),i=new Date().getTime(),t=new se.SingleBar({},se.Presets.shades_classic);d||t.start(n.length,0);let c=0;await V(u,async e=>{let a=0,g=3;for(;a<g;)try{let p=await m.post(`v1/preferences/${h}/query`,{json:{filter:{identifiers:e},limit:e.length}}).json(),w=Re(Me,p);s.push(...w.nodes),c+=e.length,t.update(c);break}catch(p){a+=1;let w=p?.response?.body||p?.message||"";if(a>=g||!Ve.some(P=>w.includes(P)))throw new Error(`Received an error from server after ${a} attempts: ${w}`);l.warn(ne.yellow(`[RETRYING FAILED REQUEST - Attempt ${a}] Failed to fetch ${e.length} user preferences from partition ${h}: ${w}`))}},{concurrency:40}),t.stop();let r=new Date().getTime()-i;return d||l.info(ne.green(`Completed download in "${r/1e3}" seconds.`)),s}import{PreferenceTopicType as G}from"@transcend-io/privacy-types";import{apply as Fe}from"@transcend-io/type-utils";function D({row:m,columnToPurposeName:n,purposeSlugs:h,preferenceTopics:d}){let s={};return Object.entries(n).forEach(([u,{purpose:i,preference:t,valueMapping:c}])=>{if(!h.includes(i))throw new Error(`Invalid purpose slug: ${i}, expected: ${h.join(", ")}`);if(t){let f=d.find(g=>g.slug===t&&g.purpose.trackingType===i);if(!f){let g=d.filter(p=>p.purpose.trackingType===i).map(p=>p.slug);throw new Error(`Invalid preference slug: ${t} for purpose: ${i}. Allowed preference slugs for purpose are: ${g.join(",")}`)}s[i]||(s[i]={preferences:[]}),s[i].preferences||(s[i].preferences=[]);let r=m[u],e=c[r],a=typeof e=="string"&&e.trim()||null;switch(f.type){case G.Boolean:if(typeof e!="boolean")throw new Error(`Invalid value for boolean preference: ${t}, expected boolean, got: ${r}`);s[i].preferences.push({topic:t,choice:{booleanValue:e}});break;case G.Select:if(typeof e!="string"&&e!==null)throw new Error(`Invalid value for select preference: ${t}, expected string or null, got: ${r}`);if(a&&!f.preferenceOptionValues.map(({slug:g})=>g).includes(a))throw new Error(`Invalid value for select preference: ${t}, expected one of: ${f.preferenceOptionValues.map(({slug:g})=>g).join(", ")}, got: ${r}`);s[i].preferences.push({topic:t,choice:{selectValue:a}});break;case G.MultiSelect:if(typeof r!="string")throw new Error(`Invalid value for multi select preference: ${t}, expected string, got: ${r}`);s[i].preferences.push({topic:t,choice:{selectValues:F(r).map(g=>{let p=c[g];if(typeof p!="string")throw new Error(`Invalid value for multi select preference: ${t}, expected one of: ${f.preferenceOptionValues.map(({slug:w})=>w).join(", ")}, got: ${g}`);return p}).sort((g,p)=>g.localeCompare(p))}});break;default:throw new Error(`Unknown preference type: ${f.type}`)}}else s[i]?s[i].enabled=c[m[u]]===!0:s[i]={enabled:c[m[u]]===!0}}),Fe(s,(u,i)=>{if(typeof u.enabled!="boolean")throw new Error(`No mapping provided for purpose.enabled=true/false value: ${i}`);return{...u,enabled:u.enabled}})}import{uniq as Se,difference as Ee}from"lodash-es";import ae from"colors";import Ie from"inquirer";var q="[NONE]";async function pe(m,n){let h=Se(m.map(s=>Object.keys(s)).flat()),d=Ee(h,[...n.identifierColumn?[n.identifierColumn]:[],...Object.keys(n.columnToPurposeName)]);if(!n.timestampColum){let{timestampName:s}=await Ie.prompt([{name:"timestampName",message:"Choose the column that will be used as the timestamp of last preference update",type:"list",default:d.find(u=>u.toLowerCase().includes("date"))||d.find(u=>u.toLowerCase().includes("time"))||d[0],choices:[...d,q]}]);n.timestampColum=s}if(l.info(ae.magenta(`Using timestamp column "${n.timestampColum}"`)),n.timestampColum!==q){let s=m.map((u,i)=>u[n.timestampColum]?null:[i]).filter(u=>!!u).flat();if(s.length>0)throw new Error(`The timestamp column "${n.timestampColum}" is missing a value for the following rows: ${s.join(`
|
|
2
|
-
`)}`);l.info(ae.magenta(`The timestamp column "${n.timestampColum}" is present for all row`))}return n}import{uniq as Ne,groupBy as Oe,difference as xe}from"lodash-es";import N from"colors";import je from"inquirer";async function le(m,n){let h=Ne(m.map(t=>Object.keys(t)).flat()),d=xe(h,[...n.identifierColumn?[n.identifierColumn]:[],...Object.keys(n.columnToPurposeName)]);if(!n.identifierColumn){let{identifierName:t}=await je.prompt([{name:"identifierName",message:"Choose the column that will be used as the identifier to upload consent preferences by",type:"list",default:d.find(c=>c.toLowerCase().includes("email"))||d[0],choices:d}]);n.identifierColumn=t}l.info(N.magenta(`Using identifier column "${n.identifierColumn}"`));let s=m.map((t,c)=>t[n.identifierColumn]?null:[c]).filter(t=>!!t).flat();if(s.length>0){let t=`The identifier column "${n.identifierColumn}" is missing a value for the following rows: ${s.join(", ")}`;if(l.warn(N.yellow(t)),!await Q({message:"Would you like to skip rows missing an identifier?"}))throw new Error(t);let f=m.length;m=m.filter(r=>r[n.identifierColumn]),l.info(N.yellow(`Skipped ${f-m.length} rows missing an identifier`))}l.info(N.magenta(`The identifier column "${n.identifierColumn}" is present for all rows`));let u=Oe(m,n.identifierColumn),i=Object.entries(u).filter(([,t])=>t.length>1);if(i.length>0){let t=`The identifier column "${n.identifierColumn}" has duplicate values for the following rows: ${i.slice(0,10).map(([f,r])=>`${f} (${r.length})`).join(`
|
|
3
|
-
`)}`;if(l.warn(N.yellow(t)),!await Q({message:"Would you like to automatically take the latest update?"}))throw new Error(t);m=Object.entries(u).map(([,f])=>f.sort((e,a)=>new Date(a[n.timestampColum]).getTime()-new Date(e[n.timestampColum]).getTime())[0]).filter(f=>f)}return{currentState:n,preferences:m}}import{uniq as ce,difference as Ae}from"lodash-es";import W from"colors";import O from"inquirer";import{PreferenceTopicType as _}from"@transcend-io/privacy-types";async function fe(m,n,{purposeSlugs:h,preferenceTopics:d,forceTriggerWorkflows:s}){let u=ce(m.map(c=>Object.keys(c)).flat()),i=Ae(u,[...n.identifierColumn?[n.identifierColumn]:[],...n.timestampColum?[n.timestampColum]:[]]);if(i.length===0){if(s)return n;throw new Error("No other columns to process")}let t=[...h,...d.map(c=>`${c.purpose.trackingType}->${c.slug}`)];return await A(i,async c=>{let f=ce(m.map(e=>e[c])),r=n.columnToPurposeName[c];if(r)l.info(W.magenta(`Column "${c}" is associated with purpose "${r.purpose}"`));else{let{purposeName:e}=await O.prompt([{name:"purposeName",message:`Choose the purpose that column ${c} is associated with`,type:"list",default:t.find(p=>p.startsWith(h[0])),choices:t}]),[a,g]=e.split("->");r={purpose:a,preference:g||null,valueMapping:{}}}await A(f,async e=>{if(r.valueMapping[e]!==void 0){l.info(W.magenta(`Value "${e}" is associated with purpose value "${r.valueMapping[e]}"`));return}if(r.preference===null){let{purposeValue:a}=await O.prompt([{name:"purposeValue",message:`Choose the purpose value for value "${e}" associated with purpose "${r.purpose}"`,type:"confirm",default:e!=="false"}]);r.valueMapping[e]=a}if(r.preference!==null){let a=d.find(p=>p.slug===r.preference);if(!a){l.error(W.red(`Preference topic "${r.preference}" not found`));return}let g=a.preferenceOptionValues.map(({slug:p})=>p);if(a.type===_.Boolean){let{preferenceValue:p}=await O.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${e}" associated with purpose "${r.purpose}"`,type:"confirm",default:e!=="false"}]);r.valueMapping[e]=p;return}if(a.type===_.Select){let{preferenceValue:p}=await O.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${e}" associated with purpose "${r.purpose}"`,type:"list",choices:g,default:g.find(w=>w===e)}]);r.valueMapping[e]=p;return}if(a.type===_.MultiSelect){let p=F(e);await A(p,async w=>{if(r.valueMapping[w]!==void 0)return;let{preferenceValue:P}=await O.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${w}" associated with purpose "${r.purpose}"`,type:"list",choices:g,default:g.find(y=>y===w)}]);r.valueMapping[w]=P});return}throw new Error(`Unknown preference topic type: ${a.type}`)}}),n.columnToPurposeName[c]=r}),n}import{PreferenceTopicType as K}from"@transcend-io/privacy-types";function me({currentConsentRecord:m,pendingUpdates:n,preferenceTopics:h}){return Object.entries(n).every(([d,{preferences:s=[],enabled:u}])=>{let i=m.purposes.find(c=>c.purpose===d);return!!i&&i.enabled===u?s.every(({topic:c,choice:f})=>i.preferences&&i.preferences.find(r=>{if(r.topic!==c)return!1;let e=h.find(a=>a.slug===c&&a.purpose.trackingType===d);if(!e)throw new Error(`Could not find preference topic for ${c}`);switch(e.type){case K.Boolean:return r.choice.booleanValue===f.booleanValue;case K.Select:return r.choice.selectValue===f.selectValue;case K.MultiSelect:let a=(r.choice.selectValues||[]).sort(),g=(f.selectValues||[]).sort();return a.length===g.length&&a.every((p,w)=>p===g[w]);default:throw new Error(`Unknown preference topic type: ${e.type}`)}})):!1})}import{PreferenceTopicType as Y}from"@transcend-io/privacy-types";function ue({currentConsentRecord:m,pendingUpdates:n,preferenceTopics:h}){return!!Object.entries(n).find(([d,{preferences:s=[],enabled:u}])=>{let i=m.purposes.find(t=>t.purpose===d);return i?i.enabled!==u?!0:!!s.find(({topic:t,choice:c})=>{let f=(i.preferences||[]).find(e=>e.topic===t);if(!f)return!1;let r=h.find(e=>e.slug===t&&e.purpose.trackingType===d);if(!r)throw new Error(`Could not find preference topic for ${t}`);switch(r.type){case Y.Boolean:return f.choice.booleanValue!==c.booleanValue;case Y.Select:return f.choice.selectValue!==c.selectValue;case Y.MultiSelect:let e=(f.choice.selectValues||[]).sort(),a=(c.selectValues||[]).sort();return e.length!==a.length||!e.every((g,p)=>g===a[p]);default:throw new Error(`Unknown preference topic type: ${r.type}`)}}):!1})}async function ge({file:m,sombra:n,purposeSlugs:h,preferenceTopics:d,partitionKey:s,skipExistingRecordCheck:u,forceTriggerWorkflows:i},t){let c=new Date().getTime(),f=t.getValue("fileMetadata");l.info(de.magenta(`Reading in file: "${m}"`));let r=Z(m,x.record(x.string,x.string)),e={columnToPurposeName:{},pendingSafeUpdates:{},pendingConflictUpdates:{},skippedUpdates:{},...f[m]||{},lastFetchedAt:new Date().toISOString()};e=await pe(r,e),f[m]=e,await t.setValue(f,"fileMetadata");let a=await le(r,e);e=a.currentState,r=a.preferences,f[m]=e,await t.setValue(f,"fileMetadata"),e=await fe(r,e,{preferenceTopics:d,purposeSlugs:h,forceTriggerWorkflows:i}),f[m]=e,await t.setValue(f,"fileMetadata");let g=r.map(y=>y[e.identifierColumn]),p=u?[]:await ie(n,{identifiers:g.map(y=>({value:y})),partitionKey:s}),w=De(p,"userId");e.pendingConflictUpdates={},e.pendingSafeUpdates={},e.skippedUpdates={},r.forEach(y=>{let C=y[e.identifierColumn],S=D({row:y,columnToPurposeName:e.columnToPurposeName,preferenceTopics:d,purposeSlugs:h}),U=w[C];if(i&&!U)throw new Error(`No existing consent record found for user with id: ${C}.
|
|
4
|
-
When 'forceTriggerWorkflows' is set all the user identifiers should contain a consent record`);if(U&&me({currentConsentRecord:U,pendingUpdates:S,preferenceTopics:d})&&!i){e.skippedUpdates[C]=y;return}if(U&&ue({currentConsentRecord:U,pendingUpdates:S,preferenceTopics:d})){e.pendingConflictUpdates[C]={row:y,record:U};return}e.pendingSafeUpdates[C]=y}),f[m]=e,await t.setValue(f,"fileMetadata");let P=new Date().getTime();l.info(de.green(`Successfully pre-processed file: "${m}" in ${(P-c)/1e3}s`))}import{PreferenceQueryResponseItem as qe,PreferenceUpdateItem as we}from"@transcend-io/privacy-types";import*as o from"io-ts";var Be=o.type({purpose:o.string,preference:o.union([o.string,o.null]),valueMapping:o.record(o.string,o.union([o.string,o.boolean,o.null]))}),Le=o.intersection([o.type({columnToPurposeName:o.record(o.string,Be),lastFetchedAt:o.string,pendingSafeUpdates:o.record(o.string,o.record(o.string,o.string)),pendingConflictUpdates:o.record(o.string,o.type({record:qe,row:o.record(o.string,o.string)})),skippedUpdates:o.record(o.string,o.record(o.string,o.string))}),o.partial({identifierColumn:o.string,timestampColum:o.string})]),he=o.type({fileMetadata:o.record(o.string,Le),failingUpdates:o.record(o.string,o.type({uploadedAt:o.string,error:o.string,update:we})),pendingUpdates:o.record(o.string,we)});import{apply as We}from"@transcend-io/type-utils";async function Pe({auth:m,sombraAuth:n,receiptFilepath:h,file:d,partition:s,isSilent:u=!0,dryRun:i=!1,skipWorkflowTriggers:t=!1,skipConflictUpdates:c=!1,skipExistingRecordCheck:f=!1,attributes:r=[],transcendUrl:e=oe,forceTriggerWorkflows:a=!1}){let g=X(r),p=new Ge(h,he,{fileMetadata:{},failingUpdates:{},pendingUpdates:{}}),w=p.getValue("failingUpdates"),P=p.getValue("pendingUpdates"),y=p.getValue("fileMetadata");l.info(k.magenta(`Restored cache, there are:
|
|
5
|
-
${Object.values(w).length} failing requests to be retried
|
|
6
|
-
${Object.values(P).length} pending requests to be processed
|
|
7
|
-
The following files are stored in cache and will be used:
|
|
8
|
-
${Object.keys(y).map(b=>b).join(`
|
|
9
|
-
`)}
|
|
10
|
-
The following file will be processed: ${d}
|
|
11
|
-
`));let C=te(e,m),[S,U,J]=await Promise.all([re(e,m,n),a?Promise.resolve([]):H(C),a?Promise.resolve([]):ee(C)]);await ge({file:d,purposeSlugs:U.map(b=>b.trackingType),preferenceTopics:J,sombra:S,partitionKey:s,skipExistingRecordCheck:f,forceTriggerWorkflows:a},p);let E={};y=p.getValue("fileMetadata");let R=y[d];if(l.info(k.magenta(`Found ${Object.entries(R.pendingSafeUpdates).length} safe updates in ${d}`)),l.info(k.magenta(`Found ${Object.entries(R.pendingConflictUpdates).length} conflict updates in ${d}`)),l.info(k.magenta(`Found ${Object.entries(R.skippedUpdates).length} skipped updates in ${d}`)),Object.entries({...R.pendingSafeUpdates,...c?{}:We(R.pendingConflictUpdates,({row:b})=>b)}).forEach(([b,$])=>{let j=R.timestampColum===q?new Date:new Date($[R.timestampColum]),M=D({row:$,columnToPurposeName:R.columnToPurposeName,preferenceTopics:J,purposeSlugs:U.map(I=>I.trackingType)});E[b]={userId:b,partition:s,timestamp:j.toISOString(),purposes:Object.entries(M).map(([I,ve])=>({...ve,purpose:I,workflowSettings:{attributes:g,isSilent:u,skipWorkflowTrigger:t}}))}}),await p.setValue(E,"pendingUpdates"),await p.setValue({},"failingUpdates"),i){l.info(k.green(`Dry run complete, exiting. ${Object.values(E).length} pending updates. Check file: ${h}`));return}l.info(k.magenta(`Uploading ${Object.values(E).length} preferences to partition: ${s}`));let Ce=new Date().getTime(),B=new ye.SingleBar({},ye.Presets.shades_classic),z=0,L=Object.entries(E),$e=Qe(L,t?100:10);B.start(L.length,0),await V($e,async b=>{try{await S.put("v1/preferences",{json:{records:b.map(([,$])=>$),skipWorkflowTriggers:t,forceTriggerWorkflows:a}}).json()}catch($){try{let M=JSON.parse($?.response?.body||"{}");M.error&&l.error(k.red(`Error: ${M.error}`))}catch{}l.error(k.red(`Failed to upload ${b.length} user preferences to partition ${s}: ${$?.response?.body||$?.message}`));let j=p.getValue("failingUpdates");b.forEach(([M,I])=>{j[M]={uploadedAt:new Date().toISOString(),update:I,error:$?.response?.body||$?.message||"Unknown error"}}),await p.setValue(j,"failingUpdates")}z+=b.length,B.update(z)},{concurrency:40}),B.stop();let Te=new Date().getTime()-Ce;l.info(k.green(`Successfully uploaded ${L.length} user preferences to partition ${s} in "${Te/1e3}" seconds!`))}import{readdirSync as _e}from"fs";import{basename as Ke,join as be}from"path";async function Sr({auth:m,partition:n,sombraAuth:h,consentUrl:d,file:s="",directory:u,dryRun:i,skipExistingRecordCheck:t,receiptFileDir:c,skipWorkflowTriggers:f,forceTriggerWorkflows:r,skipConflictUpdates:e,isSilent:a,attributes:g,concurrency:p}){u&&s&&(l.error(v.red("Cannot provide both a directory and a file. Please provide only one.")),process.exit(1)),!s&&!u&&(l.error(v.red("A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences")),process.exit(1));let w=[];if(u)try{let y=_e(u).filter(C=>C.endsWith(".csv"));y.length===0&&(l.error(v.red(`No CSV files found in directory: ${u}`)),process.exit(1)),w.push(...y.map(C=>be(u,C)))}catch(P){l.error(v.red(`Failed to read directory: ${u}`)),l.error(v.red(P.message)),process.exit(1)}else try{s.endsWith(".csv")||(l.error(v.red("File must be a CSV file")),process.exit(1)),w.push(s)}catch(P){l.error(v.red(`Failed to access file: ${s}`)),l.error(v.red(P.message)),process.exit(1)}l.info(v.green(`Processing ${w.length} consent preferences files for partition: ${n}`)),l.debug(`Files to process: ${w.join(", ")}`),t&&l.info(v.bgYellow(`Skipping existing record check: ${t}`)),await V(w,async P=>{let y=Ke(P).replace(".csv","");await Pe({receiptFilepath:be(c,`${y}-receipts.json`),auth:m,sombraAuth:h,file:P,partition:n,transcendUrl:d,skipConflictUpdates:e,skipWorkflowTriggers:f,skipExistingRecordCheck:t,isSilent:a,dryRun:i,attributes:F(g),forceTriggerWorkflows:r})},{concurrency:p})}export{Sr as uploadPreferences};
|
package/dist/impl-U3BDV3RA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-4QPDLGCV.js";import"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{ke as c,pe as m}from"./chunk-PDDJKJLS.js";import{a as r}from"./chunk-OERYFLN2.js";import{b as g}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import n from"colors";import{execSync as k}from"child_process";var l='A repository name must be provided. You can specify using --repositoryName=$REPO_NAME or by ensuring the command "git config --get remote.origin.url" returns the name of the repository';async function S({auth:d,scanPath:o,ignoreDirs:f,repositoryName:u,transcendUrl:y}){let e=u;if(!e)try{let t=k(`cd ${o} && git config --get remote.origin.url`).toString("utf-8").trim();[e]=t.includes("https:")?t.split("/").slice(3).join("/").split("."):(t.split(":").pop()||"").split("."),e||(r.error(n.red(l)),process.exit(1))}catch(a){r.error(n.red(`${l} - Got error: ${a.message}`)),process.exit(1)}let h=m(y,d),i=await p({scanPath:o,ignoreDirs:f,repositoryName:e});await c(h,i);let s=new URL(g);s.pathname="/code-scanning/code-packages",r.info(n.green(`Scan found ${i.length} packages at ${o}! View results at '${s.href}'`))}export{S as scanPackages};
|
package/dist/impl-V3A77FGE.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{_b as L,a as N,b as R,ha as _,pe as D}from"./chunk-PDDJKJLS.js";import{a}from"./chunk-OERYFLN2.js";import"./chunk-J2ZBQKW5.js";import{b as U}from"./chunk-EZCJGIOS.js";import ge from"colors";import X from"got";var Q=({hostname:t,auth:e})=>X.extend({prefixUrl:`https://${t}`,headers:{accept:"application/json","content-type":"application/json",authorization:`Bearer ${e}`}});import Re from"colors";import xe from"yargs-parser";var Ge=Object.values(U);import te from"colors";import j from"fs";var w=({assessment:t,index:e,total:s,wrap:r=!0})=>{let n="";(e===0||r)&&(n=`[
|
|
2
|
-
`);let m=JSON.stringify(t),o=s&&e<s-1&&!r?",":"";return n=`${n+m+o}
|
|
3
|
-
`,(s&&e===s-1||r)&&(n+=`
|
|
4
|
-
]`),n};var B=({file:t,assessment:e,index:s,total:r})=>{a.info(te.magenta(`Writing enriched assessment ${s+1} of ${r} to file "${t}"...`)),s===0?j.writeFileSync(t,w({assessment:e,index:s,total:r,wrap:!1})):j.appendFileSync(t,w({assessment:e,index:s,total:r,wrap:!1}))};import P from"colors";import{decodeCodec as re}from"@transcend-io/type-utils";import{OneTrustGetListOfAssessmentsResponse as ne}from"@transcend-io/privacy-types";var q=async({oneTrust:t})=>{let e=0,s=1,r=0,n=[];for(;e<s;){let{body:m}=await t.get(`api/assessment/v2/assessments?page=${e}&size=2000`),{page:o,content:u}=re(ne,m);n.push(...u??[]),e===0&&(s=o?.totalPages??0,r=o?.totalElements??0),e+=1,a.info(`Fetched ${n.length} of ${r} assessments.`)}return n};import{decodeCodec as oe}from"@transcend-io/type-utils";import{OneTrustGetAssessmentResponse as ie}from"@transcend-io/privacy-types";var J=async({oneTrust:t,assessmentId:e})=>{let{body:s}=await t.get(`api/assessment/v2/assessments/${e}/export?ExcludeSkippedQuestions=false`);return oe(ie,s)};import{decodeCodec as ae}from"@transcend-io/type-utils";import{OneTrustGetRiskResponse as me}from"@transcend-io/privacy-types";var K=async({oneTrust:t,riskId:e})=>{let{body:s}=await t.get(`api/risk/v2/risks/${e}`);return ae(me,s)};import{decodeCodec as ce}from"@transcend-io/type-utils";import{OneTrustGetUserResponse as ue}from"@transcend-io/privacy-types";var b=async({oneTrust:t,userId:e})=>{let{body:s}=await t.get(`api/scim/v2/Users/${e}`);return ce(ue,s)};import{uniq as pe}from"lodash-es";import{keyBy as I}from"lodash-es";var W=({assessment:t,assessmentDetails:e,riskDetails:s,creatorDetails:r,approversDetails:n,respondentsDetails:m})=>{let o=I(s,"id"),{sections:u,createdBy:g,...h}=e,O=u.map(i=>{let{questions:A,...$}=i,x=A.map(E=>{let{risks:C,...G}=E,v=(C??[]).map(y=>{let S=o[y.riskId];return{...y,...S,level:y.level,impactLevel:y.impactLevel??0}});return{...G,risks:v}});return{...$,questions:x}}),p={...g,active:r?.active??!1,userType:r?.userType??"Internal",emails:r?.emails??[],title:r?.title??null,givenName:r?.name.givenName??null,familyName:r?.name.familyName??null},d=I(n,"id"),l=e.approvers.flatMap(i=>d[i.id]?[{...i,approver:{...i.approver,active:d[i.id].active,userType:d[i.id].userType,emails:d[i.id].emails,title:d[i.id].title,givenName:d[i.id].name.givenName??null,familyName:d[i.id].name.familyName??null}}]:[]),T=I(m,"id"),F=e.respondents.filter(i=>!i.name.includes("@")).flatMap(i=>T[i.id]?[{...i,active:T[i.id].active,userType:T[i.id].userType,emails:T[i.id].emails,title:T[i.id].title,givenName:T[i.id].name.givenName??null,familyName:T[i.id].name.familyName??null}]:[]);return{...t,...h,approvers:l,respondents:F,createdBy:p,sections:O}};import H from"colors";var k=async({transcend:t,assessment:e,total:s,index:r})=>{a.info(H.magenta(`Writing enriched assessment ${r+1} ${s?`of ${s} `:" "}to Transcend...`));let m={json:w({assessment:e,index:r,total:s})};try{await L(t,_,{input:m})}catch{a.error(H.red(`Failed to sync assessment ${r+1} ${s?`of ${s} `:" "}to Transcend.
|
|
5
|
-
Assessment Title: ${e.name}. Template Title: ${e.template.name}
|
|
6
|
-
`))}};var z=async({oneTrust:t,file:e,dryRun:s,transcend:r})=>{a.info("Getting list of all assessments from OneTrust...");let n=await q({oneTrust:t}),m={},o=5,u=Array.from({length:Math.ceil(n.length/o)},(g,h)=>n.slice(h*o,(h+1)*o));await N(u,async(g,h)=>{let O=[];await R(g,async(p,d)=>{let l=o*h+d+1;a.info(`[assessment ${l} of ${n.length}]: fetching details...`);let{templateName:T,assessmentId:F}=p,i=await J({oneTrust:t,assessmentId:F}),A=i.createdBy.id,$=m[A];if(!$){a.info(`[assessment ${l} of ${n.length}]: fetching creator...`);try{$=await b({oneTrust:t,userId:A}),m[A]=$}catch{a.warn(P.yellow(`[assessment ${l} of ${n.length}]: failed to fetch form creator. creatorId: ${A}. Assessment Title: ${p.name}. Template Title: ${T}`))}}let{approvers:x}=i,E=[];x.length>0&&(a.info(`[assessment ${l} of ${n.length}]: fetching approvers...`),E=await R(x.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch{return a.warn(P.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a form approver. approverId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let{respondents:C}=i,G=C.filter(c=>!c.name.includes("@")),v=[];G.length>0&&(a.info(`[assessment ${l} of ${n.length}]: fetching respondents...`),v=await R(G.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch{return a.warn(P.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a respondent. respondentId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let y=[],S=pe(i.sections.flatMap(c=>c.questions.flatMap(f=>(f.risks??[]).flatMap(Z=>Z.riskId))));S.length>0&&(a.info(`[assessment ${l} of ${n.length}]: fetching risks...`),y=await R(S,c=>K({oneTrust:t,riskId:c}),{concurrency:5}));let V=W({assessment:p,assessmentDetails:i,riskDetails:y,creatorDetails:$,approversDetails:E.flat(),respondentsDetails:v.flat()});O.push(V)},{concurrency:o}),await N(O,async(p,d)=>{let l=h*o+d;s&&e?B({assessment:p,index:l,total:n.length,file:e}):r&&await k({assessment:p,transcend:r,total:n.length,index:l})})})};import{decodeCodec as le}from"@transcend-io/type-utils";import M from"colors";import fe from"JSONStream";import{createReadStream as de}from"fs";import{OneTrustEnrichedAssessment as Te}from"@transcend-io/privacy-types";var Y=({transcend:t,file:e})=>(a.info(`Getting list of all assessments from file ${e}...`),new Promise((s,r)=>{let n=de(e,{encoding:"utf-8",highWaterMark:65536}),m=fe.parse("*"),o=0;n.pipe(m),m.on("data",async u=>{try{m.pause();let g=le(Te,u);await k({assessment:g,transcend:t,index:o}),o+=1,m.resume()}catch(g){a.error(M.red(`Failed to parse the assessment ${o} from file '${e}': ${g.message}.`))}}),m.on("end",()=>{a.info(`Finished processing ${o} assessments from file ${e}`),s()}),m.on("error",u=>{a.error(M.red(`Error parsing file '${e}': ${u.message}`)),r(u)}),n.on("error",u=>{a.error(M.red(`Error reading file '${e}': ${u.message}`)),r(u)})}));async function _s({hostname:t,oneTrustAuth:e,source:s,transcendAuth:r,transcendUrl:n,resource:m,file:o,dryRun:u,debug:g}){if(!u&&!r)throw new Error('Must specify a "transcendAuth" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}');if(u&&!o)throw new Error('Must set a "file" parameter when "dryRun" is "true". e.g. --file=./oneTrustAssessments.json');if(o){let p=o.split(".");if(p.length<2)throw new Error('The "file" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.');if(p.at(-1)!=="json")throw new Error(`Expected the format of the "file" parameters '${o}' to be 'json', but got '${p.at(-1)}'.`)}if(s==="oneTrust"){if(!t)throw new Error('Missing required parameter "hostname". e.g. --hostname=customer.my.onetrust.com');if(!e)throw new Error('Missing required parameter "oneTrustAuth". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN')}else{if(!o)throw new Error('Must specify a "file" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json');if(u)throw new Error('Cannot read and write to a file simultaneously. Emit the "source" parameter or set it to oneTrust if "dryRun" is enabled.')}let h=t&&e?Q({hostname:t,auth:e}):void 0,O=n&&r?D(n,r):void 0;try{m==="assessments"&&(s==="oneTrust"&&h?await z({oneTrust:h,file:o,dryRun:u,...O&&{transcend:O}}):s==="file"&&o&&O&&await Y({file:o,transcend:O}))}catch(p){throw new Error(`An error occurred syncing the resource ${m} from OneTrust: ${g?p.stack:p.message}`)}a.info(ge.green(`Successfully synced OneTrust ${m} to ${u?`disk at "${o}"`:"Transcend"}!`))}export{_s as syncOt};
|
package/dist/impl-V3YOC4MQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as t}from"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function i({auth:e,dataSiloId:a,actions:o,transcendUrl:s}){await t({requestActions:o,transcendUrl:s,auth:e,dataSiloId:a})}export{i as retryRequestDataSilos};
|
package/dist/impl-WOYVKA3U.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as D}from"./chunk-4QPDLGCV.js";import"./chunk-ZES4XGUM.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{Od as u,le as S,pe as y}from"./chunk-PDDJKJLS.js";import{a as r}from"./chunk-OERYFLN2.js";import{b as h}from"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";import{stringify as C}from"query-string";import w from"colors";import v from"fast-glob";async function m({scanPath:t,fileGlobs:e,ignoreDirs:g,config:p}){let{ignoreDirs:f,supportedFiles:s,scanFunction:a}=p,n=e===""?s:s.concat(e.split(",")),l=[...g.split(","),...f].filter(o=>o.length>0);try{let o=await v(`${t}/**/${n.join("|")}`,{ignore:l.map(i=>`${t}/**/${i}`),unique:!0,onlyFiles:!0});r.info(`Scanning: ${o.length} files`);let $=o.map(i=>a(i)).flat().map(i=>i.softwareDevelopmentKits||[]).flat(),d=[...new Set($.map(i=>i.name))];return r.info(`Found: ${d.length} unique dependencies`),d.map(i=>({name:i,resourceId:`${t}/**/${i}`,useStrictClassifier:!0}))}catch(o){throw new Error(`Error scanning globs ${m} with error: ${o}`)}}async function k({scanPath:t,dataSiloId:e,auth:g,fileGlobs:p,ignoreDirs:f,transcendUrl:s}){let a=y(s,g),n=await u(a,e),l=D[n.dataSilo.type];l||(r.error(w.red(`This plugin "${n.dataSilo.type}" is not supported for offline silo discovery.`)),process.exit(1));let o=await m({scanPath:t,fileGlobs:p,ignoreDirs:f,config:l});await S(a,n.id,o);let c=new URL(h);c.pathname="/data-map/data-inventory/silo-discovery/triage",c.search=C({filters:JSON.stringify({pluginIds:[n.id]})}),r.info(w.green(`Scan found ${o.length} potential data silos at ${t}! View at '${c.href}'
|
|
2
|
-
|
|
3
|
-
NOTE: it may take 2-3 minutes for scan results to appear in the UI.`))}export{k as discoverSilos};
|
package/dist/impl-Y4NEIKHE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as n}from"./chunk-DKNP2CU7.js";import"./chunk-RBOBI6B6.js";import"./chunk-HZNRGCLH.js";import"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import"./chunk-APA5PR4U.js";import"./chunk-J2ZBQKW5.js";import"./chunk-EZCJGIOS.js";async function c({auth:t,transcendUrl:r,file:e,enricherId:i,concurrency:s,markSilent:o,sombraAuth:a}){await n({file:e,transcendUrl:r,enricherId:i,concurrency:s,markSilent:o,auth:t,sombraAuth:a})}export{c as pushIdentifiers};
|
package/dist/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{a as Ui,b as ji,c as Hi,d as Vi}from"./chunk-DKNP2CU7.js";import{a as Qi,b as Gi}from"./chunk-B6ZR2J5H.js";import{a as ta}from"./chunk-AHYJJKNA.js";import{a as Ti,b as Ai,c as yi}from"./chunk-BQKOX64R.js";import{a as xi}from"./chunk-T2PLXAEM.js";import{a as ue,b as he,c as fe,d as Pe,e as Te}from"./chunk-QQRMUEM7.js";import{a as Si,b as ki,c as Bi,d as Fi}from"./chunk-ZES4XGUM.js";import{a as bi,b as wi,c as Ei,d as Ii,e as Oi,f as Di,g as $i}from"./chunk-355AXZQZ.js";import{a as Ri,b as Ci,c as Mi,d as Li,e as Ni}from"./chunk-RBOBI6B6.js";import{a as si,b as oi,c as ai,d as pi,e as ii,f as mi,g as ci,h as gi,i as li,j as ui}from"./chunk-S7ZUY224.js";import{a as di,d as hi,e as fi,f as Pi}from"./chunk-ZEXWBTLE.js";import{A as kp,B as Bp,C as Fp,D as Qp,E as Gp,F as Up,G as jp,H as Hp,I as Vp,J as qp,K as vp,L as _p,M as zp,N as Jp,O as Wp,P as Zp,Q as Kp,R as Xp,S as Yp,T as ti,U as ei,V as ri,W as ni,a as ea,b as ra,c as na,d as sa,e as oa,f as aa,g as pa,h as ia,i as ma,j as ca,k as ga,l as da,m as la,n as ua,o as ha,p as fa,q as Pa,r as Ta,s as Aa,t as Np,u as Ep,v as Ip,w as Op,x as Dp,y as $p,z as Sp}from"./chunk-HZNRGCLH.js";import{$ as Kt,A as Rt,B as Ct,C as Mt,D as Lt,E as Nt,F as Et,G as It,H as Ot,I as Dt,J as $t,K as St,L as kt,M as Bt,N as Ft,O as Qt,P as Gt,Q as Ut,R as jt,S as Ht,T as Vt,U as qt,V as vt,W as _t,X as zt,Y as Jt,Z as Wt,_ as Zt,a as X,aa as Xt,b as Y,ba as Yt,c as tt,ca as te,d as et,da as ee,e as rt,ea as re,f as nt,fa as ne,g as st,ga as se,h as ot,ha as oe,i as at,ia as ae,j as pt,ja as pe,k as it,ka as ie,l as mt,la as me,m as ct,ma as ce,n as gt,na as ge,o as dt,oa as de,p as lt,pa as le,q as ut,r as ht,s as ft,t as Pt,u as Tt,v as At,w as yt,x as xt,y as bt,z as wt}from"./chunk-HMF46LB7.js";import{a as Z,b as K}from"./chunk-W6GUOMVP.js";import{$ as fr,$a as Pn,$b as hs,$c as ho,$d as $a,A as Ve,Aa as Vr,Ab as qn,Ac as Hs,Ad as Uo,Ae as ap,B as qe,Ba as qr,Bb as vn,Bc as Vs,Bd as jo,Be as pp,C as ve,Ca as vr,Cb as _n,Cc as R,Cd as Ho,Ce as ip,D as _e,Da as _r,Db as zn,Dc as qs,Dd as Vo,De as mp,E as ze,Ea as zr,Eb as Jn,Ec as vs,Ed as qo,Ee as cp,F as Je,Fa as Jr,Fb as Wn,Fc as _s,Fd as vo,Fe as gp,G as We,Ga as Wr,Gb as b,Gc as zs,Gd as _o,Ge as dp,H as Ze,Ha as Zr,Hb as Zn,Hc as Js,Hd as zo,He as lp,I as Ke,Ia as Kr,Ib as Kn,Ic as Ws,Id as Jo,Ie as up,J as Xe,Ja as Xr,Jb as Xn,Jc as Zs,Jd as Wo,Je as hp,K as Ye,Ka as Yr,Kb as Yn,Kc as Ks,Kd as Zo,Ke as fp,L as tr,La as tn,Lb as ts,Lc as Xs,Ld as Ko,Le as Pp,M as er,Ma as en,Mb as es,Mc as Ys,Md as Xo,Me as Tp,N as rr,Na as rn,Nb as rs,Nc as to,Nd as Yo,Ne as f,O as nr,Oa as nn,Ob as ns,Oc as eo,Od as ya,Oe as Ap,P as sr,Pa as sn,Pb as ss,Pc as ro,Pd as xa,Q as or,Qa as on,Qb as os,Qc as no,Qd as ba,R as ar,Ra as an,Rb as as,Rc as so,Rd as wa,S as pr,Sa as pn,Sb as ps,Sc as oo,Sd as Ra,T as ir,Ta as mn,Tb as is,Tc as ao,Td as Ca,U as mr,Ua as cn,Ub as ms,Uc as po,Ud as Ma,V as cr,Va as gn,Vb as cs,Vc as io,Vd as La,W as gr,Wa as dn,Wb as gs,Wc as mo,Wd as Na,X as dr,Xa as ln,Xb as ds,Xc as co,Xd as Ea,Y as lr,Ya as un,Yb as ls,Yc as go,Yd as Ia,Z as ur,Za as hn,Zb as us,Zc as lo,Zd as Oa,_ as hr,_a as fn,_b as w,_c as uo,_d as Da,a as x,aa as Pr,ab as Tn,ac as fs,ad as fo,ae as Sa,ba as Tr,bb as An,bc as Ps,bd as Po,be as ka,c as Ae,ca as Ar,cb as yn,cc as Ts,cd as To,ce as Ba,d as ye,da as yr,db as xn,dc as As,dd as Ao,de as Fa,e as xe,ea as xr,eb as bn,ec as ys,ed as yo,ee as Qa,f as be,fa as br,fb as wn,fc as xs,fd as xo,fe as Ga,g as we,ga as wr,gb as Rn,gc as bs,gd as bo,ge as Ua,h as Re,ha as Rr,hb as Cn,hc as ws,hd as wo,he as ja,i as Ce,ia as Cr,ib as Mn,ic as Rs,id as h,ie as Ha,j as Me,ja as Mr,jb as Ln,jc as Cs,jd as Ro,je as Va,k as Le,ka as Lr,kb as Nn,kc as Ms,kd as Co,ke as qa,l as Ne,la as Nr,lb as En,lc as Ls,ld as Mo,le as va,m as Ee,ma as Er,mb as In,mc as Ns,md as Lo,me as _a,n as Ie,na as Ir,nb as On,nc as Es,nd as No,ne as za,o as Oe,oa as Or,ob as Dn,oc as Is,od as Eo,oe as Za,p as De,pa as Dr,pb as $n,pc as Os,pd as Io,pe as M,q as $e,qa as $r,qb as Sn,qc as Ds,qd as Oo,qe as Ka,r as Se,ra as Sr,rb as kn,rc as $s,rd as Do,re as Xa,s as ke,sa as kr,sb as Bn,sc as Ss,sd as $o,se as Ya,t as Be,ta as Br,tb as Fn,tc as ks,td as So,te as L,u as Fe,ua as Fr,ub as Qn,uc as Bs,ud as ko,ue as tp,v as Qe,va as Qr,vb as Gn,vc as Fs,vd as Bo,ve as ep,w as Ge,wa as Gr,wb as Un,wc as Qs,wd as Fo,we as rp,x as Ue,xa as Ur,xb as jn,xc as Gs,xd as C,xe as np,y as je,ya as jr,yb as Hn,yc as Us,yd as Qo,ye as sp,z as He,za as Hr,zb as Vn,zc as js,zd as Go,ze as op}from"./chunk-PDDJKJLS.js";import"./chunk-OERYFLN2.js";import{a as yp,b as xp,c as bp,d as wp,e as N,f as Rp,g as Cp,h as Mp,i as Lp}from"./chunk-APA5PR4U.js";import{a as Ja,b as Wa}from"./chunk-J2ZBQKW5.js";import{a as q,b as v,c as _,d as z,e as J,f as W}from"./chunk-EZCJGIOS.js";import{apply as k,decodeCodec as I,getValues as B}from"@transcend-io/type-utils";import{createHandlebarsWithHelpers as O}from"@transcend-io/handlebars-utils";import{PromptStatus as D,ChatCompletionRole as l,PromptRunProductArea as A,QueueStatus as y}from"@transcend-io/privacy-types";var T=20;async function E(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await w(a,b,{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))}import{groupBy as F,keyBy as P,uniq as Q,chunk as G}from"lodash-es";function U(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function hm(a){return a}var j=a=>{try{return JSON.parse(a)}catch{return a}},$=class{prompts;handlebarsOptions;promptContentMap;largeLanguageModels=[];agentsByName={};agentsByAgentId={};graphQLClient;defaultVariables;variables;handlebars;transcendApiKey;transcendUrl;requireApproval;cacheDuration;lastUpdatedAt;constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=N,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=M(t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=O(r)}async fetchPromptsAndMetadata(){let e=B(this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=Q(e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([R(this.graphQLClient,{promptIds:r,promptTitles:t}),E(this.graphQLClient),h(this.graphQLClient,{names:s})]);this.agentsByName=P(p,"name"),this.agentsByAgentId=P(p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=P(o.prompts,"title"),c=P(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=O({...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=k(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 h(this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await L(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=[]}=F(e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=G(t,50),i=[];return await x(o,async p=>{let m=await h(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 C(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!==D.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===D.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return I(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&&(U(t.extractFromTag).exec(r)||[])[1]||r;return I(t.outputCodec,j(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!==l.System)throw new Error(`promptRunMessages[0].role is expected to be = ${l.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==l.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${l.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await f(this.graphQLClient,{productArea:A.PromptManager,...t,name:s,error:c.message,status:y.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 f(this.graphQLClient,{productArea:A.PromptManager,...t,name:s,status:y.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!==l.System)throw new Error(`promptRunMessages[0].role is expected to be = ${l.System}`);let i=await f(this.graphQLClient,{productArea:A.PromptManager,...t,name:s,status:y.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}`}}};function Pm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Am(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,{})}import{difference as H}from"lodash-es";import V from"fast-glob";import{execSync as u}from"child_process";function Rm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){u(`git fetch origin ${a}`);let o=u(`git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
|
|
2
|
-
`)[0],i=u("git rev-parse HEAD",{encoding:"utf-8"}).split(`
|
|
3
|
-
`)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=u(`git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=H(p.split(`
|
|
4
|
-
`).filter(d=>d),s),c=t.length>0?V.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let S=u(`git show ${i}:${d}`,{encoding:"utf-8"});n[d]=S});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}export{Qn as ACTIONS,Zr as ADD_MESSAGES_TO_PROMPT_RUN,Ke as ADD_SILO_DISCOVERY_RESULTS,xp as ADMIN_DASH,wp as ADMIN_DASH_DATAPOINTS,bp as ADMIN_DASH_INTEGRATIONS,Zn as AGENTS,Yn as AGENT_FILES,rs as AGENT_FUNCTIONS,Je as API_KEYS,lr as APPROVE_PRIVACY_REQUEST,wr as ASSESSMENTS,br as ASSESSMENT_SECTION_FIELDS,Lr as ASSESSMENT_TEMPLATES,Wn as ASSUME_ROLE,tn as ATTRIBUTES,rr as ATTRIBUTE_KEYS_REQUESTS,sn as ATTRIBUTE_VALUES,Nt as ActionInput,Gt as ActionItemCollectionInput,Ut as ActionItemInput,dt as AgentFileInput,gt as AgentFunctionInput,ct as AgentInput,tt as ApiKeyInput,Na as AssessmentAction,_t as AssessmentAnswerOptionInput,Vt as AssessmentDisplayLogicInput,Xt as AssessmentInput,La as AssessmentNestedRule,Ht as AssessmentNestedRuleInput,Kt as AssessmentResourceInput,Wt as AssessmentRetentionScheduleInput,Ia as AssessmentRiskLogic,Ma as AssessmentRule,jt as AssessmentRuleInput,Jt as AssessmentSectionInput,zt as AssessmentSectionQuestionInput,Zt as AssessmentTemplateInput,Op as AttestedExtraIdentifiers,it as AttributeInput,mt as AttributePreview,pt as AttributeValueInput,na as BLANK,ra as BULK_APPLY,kn as BUSINESS_ENTITIES,bt as BusinessEntityInput,ur as CANCEL_PRIVACY_REQUEST,pa as CAN_APPLY_IN_BULK,Be as CATALOGS,Gr as CHANGE_REQUEST_DATA_SILO_STATUS,ar as CODE_PACKAGES,Sn as CONSENT_MANAGER_ANALYTICS_DATA,cn as CONSENT_PARTITIONS,hn as COOKIES,Hn as CREATE_ACTION_ITEMS,Xr as CREATE_ACTION_ITEM_COLLECTION,Kn as CREATE_AGENT,ts as CREATE_AGENT_FILE,ns as CREATE_AGENT_FUNCTION,We as CREATE_API_KEY,on as CREATE_ATTRIBUTE,en as CREATE_ATTRIBUTE_VALUES,Bn as CREATE_BUSINESS_ENTITY,ir as CREATE_CODE_PACKAGE,Dn as CREATE_CONSENT_EXPERIENCE,An as CREATE_CONSENT_MANAGER,$n as CREATE_CONSENT_PARTITION,gn as CREATE_DATA_FLOWS,Oe as CREATE_DATA_SILOS,He as CREATE_DATA_SUBJECT,ms as CREATE_DATA_SUB_CATEGORY,Se as CREATE_ENRICHER,Ge as CREATE_IDENTIFIER,ds as CREATE_PROCESSING_PURPOSE_SUB_CATEGORY,$r as CREATE_PROMPT,Fr as CREATE_PROMPT_GROUP,kr as CREATE_PROMPT_PARTIAL,ze as CREATE_REPOSITORY,or as CREATE_SOFTWARE_DEVELOPMENT_KIT,Vr as CREATE_TEAM,tr as CREATE_TEMPLATE,as as CREATE_VENDOR,ia as CachedFileState,ca as CachedRequestState,Ct as CodePackageInput,Rt as CodePackageSdk,oa as ColumnName,Dt as ConsentManageExperienceInput,St as ConsentManagerInput,Ss as ConsentManagerMetricBin,ae as ConsentManagerServiceMetadata,li as ConsentPreferenceResponse,te as ConsentPreferenceTopic,Yt as ConsentPreferenceTopicOptionValue,ee as ConsentPurpose,oe as CookieCsvInput,Ot as CookieInput,bi as CronIdentifier,Ei as CronIdentifierPush,Ce as DATAPOINT_EXPORT,un as DATA_FLOWS,Ae as DATA_POINTS,ye as DATA_POINT_COUNT,Le as DATA_SILOS,Ee as DATA_SILOS_ENRICHED,Ne as DATA_SILO_EXPORT,je as DATA_SUBJECTS,is as DATA_SUB_CATEGORIES,N as DEFAULT_TRANSCEND_API,Rp as DEFAULT_TRANSCEND_CONSENT_API,Sa as DEFAULT_TRANSCEND_PULL_RESOURCES,Ze as DELETE_API_KEY,nn as DELETE_ATTRIBUTE_VALUE,qn as DEPLOYED_PRIVACY_CENTER_URL,bn as DEPLOY_CONSENT_MANAGER,zn as DETERMINE_LOGIN_METHOD,ot as DataCategoryGuessInput,ut as DataCategoryInput,st as DataCategoryPreviewInput,at as DataCategoryRecommendationInput,se as DataFlowCsvInput,It as DataFlowInput,Qt as DataSiloInput,Lt as DataSubjectInput,yt as DatapointInput,Xe as ENABLED_PLUGINS,De as ENRICHERS,Me as ENTRY_COUNT,mn as EXPERIENCES,ji as EnrichPrivacyRequest,rt as EnricherInput,Pn as FETCH_CONSENT_MANAGER,fn as FETCH_CONSENT_MANAGER_ID,Tn as FETCH_CONSENT_MANAGER_THEME,Vn as FETCH_PRIVACY_CENTER_ID,At as FieldInput,Un as GLOBAL_ACTION_ITEMS,Kr as GLOBAL_ACTION_ITEM_COLLECTIONS,Fe as IDENTIFIERS,sa as IDENTIFIER_BLOCK_LIST,Rr as IMPORT_ONE_TRUST_ASSESSMENT_FORMS,$e as INITIALIZER,mi as IP_ADDRESS_REGEX,aa as IS_REQUIRED,Et as IdentifierInput,le as ImportOnetrustAssessmentsInput,kp as IntlMessage,Ft as IntlMessageInput,b as LARGE_LANGUAGE_MODELS,Jn as LOGIN,Pr as MESSAGES,Qe as NEW_IDENTIFIER_TYPES,ea as NONE,fr as NOTIFY_ADDITIONAL_TIME,er as ORGANIZATION,q as OneTrustFileFormat,v as OneTrustPullResource,_ as OneTrustPullSource,ie as OpenAIEnabledRoute,me as OpenAIEnabledRoutes,ce as OpenAIIntegration,W as OpenAIRouteName,cr as POLICIES,Mr as PREFERENCE_TOPICS,vn as PRIVACY_CENTER,gs as PROCESSING_PURPOSE_SUB_CATEGORIES,Nr as PROMPTS,Or as PROMPTS_WITH_VARIABLES,Ir as PROMPT_GROUPS,Er as PROMPT_PARTIALS,mr as PROMPT_THREADS,Cr as PURPOSES,ha as ParsedAttributeInput,$t as PartitionInput,ge as PathfinderPolicy,J as PathfinderPolicyName,pe as PathfinderPolicyNameC,de as PathfinderPromptRunMetadata,Bt as PolicyInput,kt as PrivacyCenterInput,np as PrivacyRequest,Dp as PrivacyRequestInput,jp as PrivacyRequestResponse,ht as ProcessingPurposeInput,nt as ProcessingPurposePreviewInput,xt as PromptAVendorEmailSettings,Tt as PromptGroupInput,ft as PromptInput,Pt as PromptPartialInput,fi as PurposeMap,jr as REDUCED_REQUESTS_FOR_DATA_SILO_COUNT,vr as REMOVE_REQUEST_IDENTIFIERS,Wr as REPORT_PROMPT_RUN,ve as REPOSITORIES,dr as REQUESTS,Qr as REQUEST_DATA_SILOS,Ar as REQUEST_ENRICHERS,Jr as REQUEST_FILES,_r as REQUEST_IDENTIFIERS,Ur as RETRY_REQUEST_DATA_SILO,yr as RETRY_REQUEST_ENRICHER,Mt as RepositoryInput,Bp as RequestFileMetadata,Fp as RequestFileMetadataResponse,op as RequestIdentifiersResponse,qt as RiskAssignmentInput,vt as RiskLogicInput,pn as SET_RESOURCE_ATTRIBUTES,xr as SKIP_REQUEST_ENRICHER,nr as SOFTWARE_DEVELOPMENT_KITS,us as SOMBRA_VERSION,xe as SUB_DATA_POINTS,be as SUB_DATA_POINTS_COUNT,we as SUB_DATA_POINTS_WITH_GUESSES,po as SYNC_ATTRIBUTE_TYPES,wt as SoftwareDevelopmentKitInput,ne as StoredApiKey,ma as SuccessfulRequest,Hr as TEAMS,Ye as TEMPLATES,En as TOGGLE_CONSENT_PRECEDENCE,qe as TOGGLE_DATA_SUBJECT,Nn as TOGGLE_TELEMETRY_PARTITION_STRATEGY,Ln as TOGGLE_UNKNOWN_COOKIE_POLICY,Mn as TOGGLE_UNKNOWN_REQUEST_POLICY,Mp as TR_PULL_RESOURCE_SCOPE_MAP,Cp as TR_PUSH_RESOURCE_SCOPE_MAP,Lp as TR_YML_RESOURCE_TO_FIELD_NAME,et as TeamInput,X as TemplateInput,re as TranscendInput,$ as TranscendPromptManager,z as TranscendPullResource,Gn as UPDATE_ACTION,jn as UPDATE_ACTION_ITEMS,Yr as UPDATE_ACTION_ITEM_COLLECTION,Xn as UPDATE_AGENTS,es as UPDATE_AGENT_FILES,ss as UPDATE_AGENT_FUNCTIONS,an as UPDATE_ATTRIBUTE,rn as UPDATE_ATTRIBUTE_VALUES,Fn as UPDATE_BUSINESS_ENTITIES,pr as UPDATE_CODE_PACKAGES,On as UPDATE_CONSENT_EXPERIENCE,wn as UPDATE_CONSENT_MANAGER_DOMAINS,Rn as UPDATE_CONSENT_MANAGER_PARTITION,In as UPDATE_CONSENT_MANAGER_THEME,xn as UPDATE_CONSENT_MANAGER_TO_LATEST,yn as UPDATE_CONSENT_MANAGER_VERSION,dn as UPDATE_DATA_FLOWS,Ie as UPDATE_DATA_SILOS,Ve as UPDATE_DATA_SUBJECT,cs as UPDATE_DATA_SUB_CATEGORIES,ke as UPDATE_ENRICHER,Ue as UPDATE_IDENTIFIER,Tr as UPDATE_INTL_MESSAGES,ln as UPDATE_OR_CREATE_COOKIES,Re as UPDATE_OR_CREATE_DATA_POINT,gr as UPDATE_POLICIES,_n as UPDATE_PRIVACY_CENTER,hr as UPDATE_PRIVACY_REQUEST,ls as UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES,Dr as UPDATE_PROMPTS,Br as UPDATE_PROMPT_GROUPS,Sr as UPDATE_PROMPT_PARTIALS,_e as UPDATE_REPOSITORIES,sr as UPDATE_SOFTWARE_DEVELOPMENT_KITS,qr as UPDATE_TEAM,Cn as UPDATE_TOGGLE_USP_API,ps as UPDATE_VENDORS,zr as USERS,hi as USP_STRING_REGEX,he as VARIABLE_PARAMETERS_NAME,ue as VARIABLE_PARAMETERS_REGEXP,os as VENDORS,lt as VendorInput,Y as WebhookHeader,Ap as addMessagesToPromptRun,Ci as appendCsvSync,Vp as approvePrivacyRequests,dp as assumeRole,K as buildAIIntegrationType,Z as buildEnabledRouteType,M as buildTranscendGraphQLClient,Za as buildTranscendGraphQLClientGeneric,ci as buildXdiSyncEndpoint,Kp as bulkRestartRequests,Yp as bulkRetryEnrichers,_p as cancelPrivacyRequests,gi as consentManagersToBusinessEntities,Rs as convertToDataSubjectAllowlist,ws as convertToDataSubjectBlockList,Lo as createActionItemCollection,Oo as createActionItems,Ro as createAgent,Qo as createAgentFile,ko as createAgentFunction,up as createApiKey,co as createBusinessEntity,Ha as createCodePackage,di as createConsentToken,_o as createDataCategory,fo as createDataFlows,Zo as createProcessingPurpose,qs as createPrompt,U as createRegexForTag,Ga as createRepository,Ba as createSoftwareDevelopmentKit,Ka as createSombraGotInstance,cp as createTranscendConsentGotInstance,Ho as createVendor,hm as defineTranscendPrompts,hp as deleteApiKey,Pp as deployConsentManager,Ja as description,ii as domainToHost,Up as downloadPrivacyRequestFiles,Hi as enrichPrivacyRequest,bs as ensureAllDataSubjectsExist,Jp as extractClientError,ya as fetchActiveSiloDiscoPlugin,Io as fetchAllActionItems,xo as fetchAllActions,C as fetchAllAgentFiles,So as fetchAllAgentFunctions,h as fetchAllAgents,js as fetchAllApiKeys,Ca as fetchAllAssessmentTemplates,Ra as fetchAllAssessments,ao as fetchAllAttributeValues,io as fetchAllAttributes,mo as fetchAllBusinessEntities,_a as fetchAllCatalogs,wa as fetchAllCookies,vo as fetchAllDataCategories,uo as fetchAllDataFlows,Ls as fetchAllDataPoints,Cs as fetchAllDataSilos,xs as fetchAllDataSubjects,Ts as fetchAllEnrichers,hs as fetchAllIdentifiers,ba as fetchAllMessages,Ws as fetchAllPolicies,Da as fetchAllPreferenceTopics,xa as fetchAllPrivacyCenters,Wo as fetchAllProcessingPurposes,wo as fetchAllPromptGroups,bo as fetchAllPromptPartials,L as fetchAllPromptThreads,Vs as fetchAllPrompts,no as fetchAllPurposes,$a as fetchAllPurposesAndPreferences,rp as fetchAllRequestAttributeKeys,pp as fetchAllRequestEnrichers,tp as fetchAllRequestIdentifierMetadata,ap as fetchAllRequestIdentifiers,sp as fetchAllRequests,Ms as fetchAllSubDataPoints,Gs as fetchAllTeams,Ao as fetchAllTemplates,lp as fetchAllUsers,jo as fetchAllVendors,za as fetchAndIndexCatalogs,Hs as fetchApiKeys,Os as fetchConsentManager,ks as fetchConsentManagerAnalyticsData,$s as fetchConsentManagerExperiences,Ds as fetchConsentManagerId,Bs as fetchConsentManagerTheme,ui as fetchConsentPreferences,Ns as fetchEnrichedDataSilos,fs as fetchIdentifiersAndCreateMissing,eo as fetchPartitions,Js as fetchPrivacyCenterId,zs as fetchPrivacyCenterUrl,R as fetchPromptsWithVariables,mp as fetchRequestDataSilo,ep as fetchRequestDataSiloActiveCount,ip as fetchRequestDataSilos,fp as fetchRequestFilesForRequest,Am as filterNullishValuesFromObject,Aa as filterRows,da as fuzzyMatchColumns,ga as fuzzySearch,Si as generateCrossAccountApiKeys,Qp as getFileMetadataForPrivacyRequests,Rm as getGitFilesThatChanged,Ta as getUniqueValuesForColumn,yi as inquirerAutoComplete,Ti as inquirerConfirmBoolean,Ai as inquirerConfirmText,Fi as listDirectories,Bi as listFiles,gp as loginUser,w as makeGraphQLRequest,zp as mapColumnsToAttributes,vp as mapColumnsToIdentifiers,Ep as mapCsvColumnsToApi,Sp as mapCsvRowsToRequestInputs,la as mapEnumValues,Ip as mapRequestEnumValues,Ii as markCronIdentifierCompleted,Di as markRequestDataSiloIdsCompleted,Np as markSilentPrivacyRequests,ta as mergeTranscendInputs,yp as name,$p as normalizeIdentifierValue,qp as notifyPrivacyRequestsAdditionalTime,Ea as parseAssessmentDisplayLogic,Oa as parseAssessmentRiskLogic,fa as parseAttributesFromString,Li as parseFilePath,xi as parseVariablesFromString,Qi as pullAllDatapoints,$i as pullChunkedCustomSiloOutstandingIdentifiers,pi as pullConsentManagerMetrics,wi as pullCronPageOfIdentifiers,Ui as pullManualEnrichmentIdentifiersToCsv,ei as pullPrivacyRequests,ka as pullTranscendConfiguration,Gi as pullUnstructuredSubDataPointRecommendations,Oi as pushCronIdentifiersFromCsv,Vi as pushManualEnrichmentIdentifiersFromCsv,Pa as readCsv,Pe as readTranscendYaml,Pm as removeLinks,ni as removeUnverifiedRequestIdentifiers,fe as replaceVariablesInYaml,f as reportPromptRun,Zp as restartPrivacyRequest,ti as retryRequestDataSilos,Ya as retryRequestEnricher,Xa as setResourceAttributes,Xp as skipPreflightJobs,ri as skipRequestDataSilos,ua as splitCsvToList,Gp as streamPrivacyRequestFiles,Hp as submitPrivacyRequest,To as syncAction,Eo as syncActionItemCollections,$o as syncActionItems,Uo as syncAgentFiles,Fo as syncAgentFunctions,Mo as syncAgents,ys as syncAttribute,lo as syncBusinessEntities,qa as syncCodePackages,Yo as syncConfigurationToTranscend,oo as syncConsentManager,so as syncConsentManagerExperiences,Qs as syncCookies,Jo as syncDataCategories,Po as syncDataFlows,Is as syncDataSiloDependencies,Es as syncDataSilos,Us as syncDataSubject,As as syncEnricher,Ps as syncIdentifier,Ys as syncIntlMessages,ro as syncPartitions,Ks as syncPolicies,to as syncPrivacyCenter,Xo as syncProcessingPurposes,_s as syncPrompts,ja as syncRepositories,Qa as syncSoftwareDevelopmentKits,yo as syncTemplate,qo as syncVendors,Do as updateActionItem,No as updateActionItemCollection,Go as updateAgentFiles,Bo as updateAgentFunctions,Co as updateAgents,go as updateBusinessEntities,Va as updateCodePackages,Tp as updateConsentManagerToLatest,si as updateConsentManagerVersionToLatest,zo as updateDataCategories,ho as updateDataFlows,Xs as updateIntlMessages,Fs as updateOrCreateCookies,Zs as updatePolicies,Ko as updateProcessingPurposes,vs as updatePrompts,Ua as updateRepositories,Fa as updateSoftwareDevelopmentKits,Vo as updateVendors,Pi as uploadConsents,ai as uploadCookiesFromCsv,oi as uploadDataFlowsFromCsv,Wp as uploadPrivacyRequestsFromCsv,va as uploadSiloDiscoveryResults,ki as validateTranscendAuth,Wa as version,Mi as writeCsv,Ri as writeCsvSync,Ni as writeLargeCsv,Te as writeTranscendYaml};
|