@transcend-io/cli 7.0.0-alpha.6 → 7.0.0-alpha.7

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.
Files changed (60) hide show
  1. package/dist/bin/bash-complete.js +1 -1
  2. package/dist/bin/cli.js +1 -1
  3. package/dist/bin/deprecated-command.js +1 -1
  4. package/dist/{chunk-T5XKXHEX.js → chunk-4HZHZ32O.js} +1 -1
  5. package/dist/{chunk-NGVJ6L35.js → chunk-5TDUSKDZ.js} +1 -1
  6. package/dist/{chunk-FI3PMXDN.js → chunk-AYMLP7SL.js} +1 -1
  7. package/dist/{chunk-P6Y4JJ7H.js → chunk-DLIWRRVR.js} +14 -14
  8. package/dist/{chunk-CZFGCIEO.js → chunk-F5KKB33H.js} +1 -1
  9. package/dist/chunk-IQZKONXI.js +8 -0
  10. package/dist/{chunk-7HDHUOTF.js → chunk-LE6MXFBT.js} +1 -1
  11. package/dist/{chunk-4ZV5X5DQ.js → chunk-MLF3XCRS.js} +1 -1
  12. package/dist/{chunk-B45U2NAI.js → chunk-NYDK4VPA.js} +1 -1
  13. package/dist/{chunk-Z77MEZNJ.js → chunk-PNOEWENG.js} +1 -1
  14. package/dist/{chunk-HNMFVG75.js → chunk-QAPBYN24.js} +1 -1
  15. package/dist/{chunk-ELYPVDLC.js → chunk-QXOUJ7DT.js} +1 -1
  16. package/dist/{chunk-4S2LOGFN.js → chunk-T4AGEIE3.js} +1 -1
  17. package/dist/{impl-T22SYITP.js → impl-22YTZZ5H.js} +1 -1
  18. package/dist/{impl-LAJLFEXD.js → impl-46IFTUCW.js} +1 -1
  19. package/dist/{impl-FJRPV5PJ.js → impl-4WQTM3GN.js} +1 -1
  20. package/dist/{impl-XS4TFODP.js → impl-52S3Z4ZE.js} +1 -1
  21. package/dist/{impl-H4UVNREH.js → impl-6J4LHKU5.js} +1 -1
  22. package/dist/{impl-UPRMABFX.js → impl-75FHAT4R.js} +1 -1
  23. package/dist/{impl-J2EOVLOE.js → impl-7C43442T.js} +1 -1
  24. package/dist/{impl-7SOARMNA.js → impl-7W6EBZXZ.js} +1 -1
  25. package/dist/{impl-4HVU2DPL.js → impl-CLLZCY76.js} +1 -1
  26. package/dist/{impl-6XFLK23G.js → impl-GSXYV2XR.js} +1 -1
  27. package/dist/impl-ICGIPWVJ.js +1 -0
  28. package/dist/{impl-6QYOU3LQ.js → impl-IDWP2NIG.js} +1 -1
  29. package/dist/{impl-FAK3X2IM.js → impl-ISWFGOUS.js} +1 -1
  30. package/dist/{impl-BE2FBQB2.js → impl-JRA6GN3V.js} +1 -1
  31. package/dist/{impl-4J5UT2YS.js → impl-K2ZB3AKB.js} +1 -1
  32. package/dist/{impl-CWRYQS7O.js → impl-KQ2R65SG.js} +1 -1
  33. package/dist/{impl-WMDL5UOF.js → impl-LNLKIPIP.js} +1 -1
  34. package/dist/{impl-ERKTUJJM.js → impl-MFDS7DPF.js} +1 -1
  35. package/dist/{impl-FWV53PHN.js → impl-NVBTQCSL.js} +1 -1
  36. package/dist/{impl-27ZMTITY.js → impl-PS2DUGWP.js} +1 -1
  37. package/dist/{impl-6XIVNFHV.js → impl-Q65ZCWEQ.js} +1 -1
  38. package/dist/{impl-ABUUSFBL.js → impl-QR3ARAMQ.js} +1 -1
  39. package/dist/{impl-CQWH2NIM.js → impl-QTDGR3SU.js} +1 -1
  40. package/dist/{impl-SRQ3L7UZ.js → impl-QYJFDBIV.js} +1 -1
  41. package/dist/{impl-FWVAOA62.js → impl-TLUPGHWG.js} +1 -1
  42. package/dist/impl-ULVQLOA5.js +1 -0
  43. package/dist/{impl-F3HANU3F.js → impl-URMADXQA.js} +1 -1
  44. package/dist/{impl-SWXA6ZBI.js → impl-UV5ERXN5.js} +1 -1
  45. package/dist/{impl-M6PFOSZI.js → impl-UYCGE2TQ.js} +1 -1
  46. package/dist/impl-VT26YO3N.js +1 -0
  47. package/dist/{impl-CFQR7ENW.js → impl-W454HAAT.js} +1 -1
  48. package/dist/{impl-XDCAAD6P.js → impl-YBSUR2MT.js} +1 -1
  49. package/dist/{impl-JA6H6ALC.js → impl-YJ2FK37I.js} +1 -1
  50. package/dist/{impl-GJK6YEB5.js → impl-YT7F6KTN.js} +1 -1
  51. package/dist/{impl-IM4ZHNF7.js → impl-ZBWVSFDE.js} +1 -1
  52. package/dist/{impl-UCJD5FZ6.js → impl-ZEEUCWKF.js} +1 -1
  53. package/dist/impl-ZXDLJ2TY.js +8 -0
  54. package/dist/index.js +1 -1
  55. package/package.json +1 -1
  56. package/dist/chunk-FL3V7KJR.js +0 -8
  57. package/dist/impl-4LDKW5YP.js +0 -8
  58. package/dist/impl-KE4S4ANH.js +0 -1
  59. package/dist/impl-UIHX2POD.js +0 -1
  60. package/dist/impl-ZTS5VZXR.js +0 -1
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{a as s}from"../chunk-XMGVDVM2.js";import{a as o}from"../chunk-P6Y4JJ7H.js";import"../chunk-FL3V7KJR.js";import"../chunk-APA5PR4U.js";import"../chunk-4ZV5X5DQ.js";import"../chunk-EZCJGIOS.js";import{proposeCompletions as r}from"@stricli/core";var t=process.argv.slice(3);process.env.COMP_LINE?.endsWith(" ")&&t.push("");await r(o,t,s(process));try{for(let{completion:p}of await r(o,t,s(process)))process.stdout.write(`${p}
2
+ import{a as s}from"../chunk-XMGVDVM2.js";import{a as o}from"../chunk-DLIWRRVR.js";import"../chunk-IQZKONXI.js";import"../chunk-APA5PR4U.js";import"../chunk-MLF3XCRS.js";import"../chunk-EZCJGIOS.js";import{proposeCompletions as r}from"@stricli/core";var t=process.argv.slice(3);process.env.COMP_LINE?.endsWith(" ")&&t.push("");await r(o,t,s(process));try{for(let{completion:p}of await r(o,t,s(process)))process.stdout.write(`${p}
3
3
  `)}catch{}
package/dist/bin/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as o}from"../chunk-XMGVDVM2.js";import{a as r}from"../chunk-P6Y4JJ7H.js";import"../chunk-FL3V7KJR.js";import"../chunk-APA5PR4U.js";import"../chunk-4ZV5X5DQ.js";import"../chunk-EZCJGIOS.js";import{run as i}from"@stricli/core";await i(r,process.argv.slice(2),o(process));
2
+ import{a as o}from"../chunk-XMGVDVM2.js";import{a as r}from"../chunk-DLIWRRVR.js";import"../chunk-IQZKONXI.js";import"../chunk-APA5PR4U.js";import"../chunk-MLF3XCRS.js";import"../chunk-EZCJGIOS.js";import{run as i}from"@stricli/core";await i(r,process.argv.slice(2),o(process));
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as n}from"../chunk-P6Y4JJ7H.js";import"../chunk-FL3V7KJR.js";import{a as r}from"../chunk-OERYFLN2.js";import"../chunk-APA5PR4U.js";import"../chunk-4ZV5X5DQ.js";import"../chunk-EZCJGIOS.js";import{generateHelpTextForAllCommands as c}from"@stricli/core";var s={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function m(t){return c(n).find(o=>o[0]===`${n.config.name} ${t.join(" ")}`)?.[1]}function i(t){r.log("[DEPRECATION NOTICE]");let e=s[t];if(!e){let a=Object.entries(s).map(([d,l])=>`\`${d}\` -> \`${n.config.name} ${l.join(" ")}\``).join(`
2
+ import{a as n}from"../chunk-DLIWRRVR.js";import"../chunk-IQZKONXI.js";import{a as r}from"../chunk-OERYFLN2.js";import"../chunk-APA5PR4U.js";import"../chunk-MLF3XCRS.js";import"../chunk-EZCJGIOS.js";import{generateHelpTextForAllCommands as c}from"@stricli/core";var s={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function m(t){return c(n).find(o=>o[0]===`${n.config.name} ${t.join(" ")}`)?.[1]}function i(t){r.log("[DEPRECATION NOTICE]");let e=s[t];if(!e){let a=Object.entries(s).map(([d,l])=>`\`${d}\` -> \`${n.config.name} ${l.join(" ")}\``).join(`
3
3
  `);r.log(`This command is deprecated as of v7.0.0. Here is a list of new commands, mapped to their legacy command names:
4
4
  ${a}`);return}r.log(`\`${t}\` is deprecated as of v7.0.0.
5
5
  Use \`${n.config.name} ${e.join(" ")}\` instead.
@@ -1 +1 @@
1
- import{Ee as N,b}from"./chunk-7HDHUOTF.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};
1
+ import{Ee as N,b}from"./chunk-LE6MXFBT.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};
@@ -1 +1 @@
1
- import{q as F}from"./chunk-ELYPVDLC.js";import{De as O,_b as G,a as _,b as S,pe as A,qe as P,ve as N,wa as k}from"./chunk-7HDHUOTF.js";import{a as r}from"./chunk-OERYFLN2.js";import{e as I}from"./chunk-APA5PR4U.js";import*as e from"io-ts";import{decodeCodec as V}from"@transcend-io/type-utils";var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(t,{dataSiloId:n,limit:m=100,offset:o=0,requestType:s}){try{let i=await t.get(`v1/data-silo/${n}/pending-requests/${s}`,{searchParams:{offset:o,limit:m}}).json(),{items:c}=V(e.type({items:e.array(X)}),i);return c}catch(i){throw new Error(`Received an error from server: ${i?.response?.body||i?.message}`)}}import*as T from"io-ts";var L=T.type({nonce:T.string,identifier:T.string});async function B(t,{nonce:n,identifier:m}){try{return await t.put("v1/data-silo",{headers:{"x-transcend-nonce":n},json:{profiles:[{profileId:m}]}}),!0}catch(o){if(o.response?.statusCode===409)return!1;throw new Error(`Received an error from server: ${o?.response?.body||o?.message}`)}}import w from"colors";import j from"cli-progress";async function de({file:t,dataSiloId:n,auth:m,sombraAuth:o,concurrency:s=100,transcendUrl:i=I}){let c=await P(i,m,o);r.info(w.magenta(`Reading "${t}" from disk`));let d=F(t,L);r.info(w.magenta(`Notifying Transcend for data silo "${n}" marking "${d.length}" identifiers as completed.`));let a=new Date().getTime(),p=new j.SingleBar({},j.Presets.shades_classic),h=0,f=0,g=0;p.start(d.length,0),await S(d,async C=>{try{await B(c,C)?h+=1:f+=1}catch(u){r.error(w.red(`Error notifying Transcend for identifier "${C.identifier}" - ${u.message}`)),g+=1}p.update(h+f)},{concurrency:s}),p.stop();let l=new Date().getTime()-a;if(r.info(w.green(`Successfully notified Transcend for ${h} identifiers in "${l/1e3}" seconds!`)),f&&r.info(w.magenta(`There were ${f} identifiers that were not in a state to be updated.They likely have already been resolved.`)),g)throw r.error(w.red(`There were ${g} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return d.length}import W from"colors";import Q from"cli-progress";import{RequestDataSiloStatus as Y}from"@transcend-io/privacy-types";async function we({requestIds:t,dataSiloId:n,auth:m,concurrency:o=100,status:s=Y.Resolved,transcendUrl:i=I}){let c=A(i,m),d=new Date().getTime(),a=new Q.SingleBar({},Q.Presets.shades_classic);r.info(W.magenta(`Notifying Transcend for data silo "${n}" marking "${t.length}" requests as completed.`));let p=0;a.start(t.length,0),await S(t,async g=>{let y=await O(c,{requestId:g,dataSiloId:n});try{await G(c,k,{requestDataSiloId:y.id,status:s})}catch(l){if(!l.message.includes("Client error: Request must be active:"))throw l}p+=1,a.update(p)},{concurrency:o}),a.stop();let f=new Date().getTime()-d;return r.info(W.green(`Successfully notified Transcend in "${f/1e3}" seconds!`)),t.length}import v from"colors";import z from"cli-progress";async function Re({dataSiloId:t,auth:n,sombraAuth:m,actions:o,apiPageSize:s=100,savePageSize:i=1e3,onSave:c,transcendUrl:d=I,skipRequestCount:a=!1}){if(i%s!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${s}`);let p=await P(d,n,m),h=A(d,n),f=0;a||(f=await N(h,{dataSiloId:t})),r.info(v.magenta(`Pulling ${a?"all":f} outstanding request identifiers for data silo: "${t}" for requests of types "${o.join('", "')}"`));let g=new Date().getTime(),y=new z.SingleBar({},z.Presets.shades_classic),l=new Set,C=[],u=[];a||y.start(f,0),await _(o,async q=>{let D=0,R=!0;for(;R;){let $=await U(p,{dataSiloId:t,limit:s,offset:D,requestType:q}),x=$.map(b=>(l.add(b.requestId),{...b,action:q})),J=x.map(({attributes:b,...K})=>({...K,...b.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));C.push(...x),u.push(...J),u.length>=i&&(await c(u),u=[]),R=$.length===s,D+=s,a?r.info(v.magenta(`Pulled ${$.length} outstanding identifiers for ${l.size} requests`)):y.update(l.size)}}),u.length>0&&await c(u),a||y.stop();let H=new Date().getTime()-g;return r.info(v.green(`Successfully pulled ${C.length} outstanding identifiers from ${l.size} requests in "${H/1e3}" seconds!`)),{identifiers:C}}export{X as a,U as b,L as c,B as d,de as e,we as f,Re as g};
1
+ import{q as F}from"./chunk-QXOUJ7DT.js";import{De as O,_b as G,a as _,b as S,pe as A,qe as P,ve as N,wa as k}from"./chunk-LE6MXFBT.js";import{a as r}from"./chunk-OERYFLN2.js";import{e as I}from"./chunk-APA5PR4U.js";import*as e from"io-ts";import{decodeCodec as V}from"@transcend-io/type-utils";var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(t,{dataSiloId:n,limit:m=100,offset:o=0,requestType:s}){try{let i=await t.get(`v1/data-silo/${n}/pending-requests/${s}`,{searchParams:{offset:o,limit:m}}).json(),{items:c}=V(e.type({items:e.array(X)}),i);return c}catch(i){throw new Error(`Received an error from server: ${i?.response?.body||i?.message}`)}}import*as T from"io-ts";var L=T.type({nonce:T.string,identifier:T.string});async function B(t,{nonce:n,identifier:m}){try{return await t.put("v1/data-silo",{headers:{"x-transcend-nonce":n},json:{profiles:[{profileId:m}]}}),!0}catch(o){if(o.response?.statusCode===409)return!1;throw new Error(`Received an error from server: ${o?.response?.body||o?.message}`)}}import w from"colors";import j from"cli-progress";async function de({file:t,dataSiloId:n,auth:m,sombraAuth:o,concurrency:s=100,transcendUrl:i=I}){let c=await P(i,m,o);r.info(w.magenta(`Reading "${t}" from disk`));let d=F(t,L);r.info(w.magenta(`Notifying Transcend for data silo "${n}" marking "${d.length}" identifiers as completed.`));let a=new Date().getTime(),p=new j.SingleBar({},j.Presets.shades_classic),h=0,f=0,g=0;p.start(d.length,0),await S(d,async C=>{try{await B(c,C)?h+=1:f+=1}catch(u){r.error(w.red(`Error notifying Transcend for identifier "${C.identifier}" - ${u.message}`)),g+=1}p.update(h+f)},{concurrency:s}),p.stop();let l=new Date().getTime()-a;if(r.info(w.green(`Successfully notified Transcend for ${h} identifiers in "${l/1e3}" seconds!`)),f&&r.info(w.magenta(`There were ${f} identifiers that were not in a state to be updated.They likely have already been resolved.`)),g)throw r.error(w.red(`There were ${g} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return d.length}import W from"colors";import Q from"cli-progress";import{RequestDataSiloStatus as Y}from"@transcend-io/privacy-types";async function we({requestIds:t,dataSiloId:n,auth:m,concurrency:o=100,status:s=Y.Resolved,transcendUrl:i=I}){let c=A(i,m),d=new Date().getTime(),a=new Q.SingleBar({},Q.Presets.shades_classic);r.info(W.magenta(`Notifying Transcend for data silo "${n}" marking "${t.length}" requests as completed.`));let p=0;a.start(t.length,0),await S(t,async g=>{let y=await O(c,{requestId:g,dataSiloId:n});try{await G(c,k,{requestDataSiloId:y.id,status:s})}catch(l){if(!l.message.includes("Client error: Request must be active:"))throw l}p+=1,a.update(p)},{concurrency:o}),a.stop();let f=new Date().getTime()-d;return r.info(W.green(`Successfully notified Transcend in "${f/1e3}" seconds!`)),t.length}import v from"colors";import z from"cli-progress";async function Re({dataSiloId:t,auth:n,sombraAuth:m,actions:o,apiPageSize:s=100,savePageSize:i=1e3,onSave:c,transcendUrl:d=I,skipRequestCount:a=!1}){if(i%s!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${s}`);let p=await P(d,n,m),h=A(d,n),f=0;a||(f=await N(h,{dataSiloId:t})),r.info(v.magenta(`Pulling ${a?"all":f} outstanding request identifiers for data silo: "${t}" for requests of types "${o.join('", "')}"`));let g=new Date().getTime(),y=new z.SingleBar({},z.Presets.shades_classic),l=new Set,C=[],u=[];a||y.start(f,0),await _(o,async q=>{let D=0,R=!0;for(;R;){let $=await U(p,{dataSiloId:t,limit:s,offset:D,requestType:q}),x=$.map(b=>(l.add(b.requestId),{...b,action:q})),J=x.map(({attributes:b,...K})=>({...K,...b.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));C.push(...x),u.push(...J),u.length>=i&&(await c(u),u=[]),R=$.length===s,D+=s,a?r.info(v.magenta(`Pulled ${$.length} outstanding identifiers for ${l.size} requests`)):y.update(l.size)}}),u.length>0&&await c(u),a||y.stop();let H=new Date().getTime()-g;return r.info(v.green(`Successfully pulled ${C.length} outstanding identifiers from ${l.size} requests in "${H/1e3}" seconds!`)),{identifiers:C}}export{X as a,U as b,L as c,B as d,de as e,we as f,Re as g};
@@ -1,3 +1,3 @@
1
- import{c as u}from"./chunk-HNMFVG75.js";import{a as E}from"./chunk-OERYFLN2.js";import{readFileSync as b}from"fs";import{findAllWithRegex as F}from"@transcend-io/type-utils";import{CodePackageType as w}from"@transcend-io/privacy-types";var N=/target ('|")(.*?)('|")/,O=/pod ('|")(.*?)('|")(, ('|")~> (.+?)('|")|)/,y={supportedFiles:["Podfile"],ignoreDirs:["Pods"],scanFunction:e=>{let n=b(e,"utf-8"),o=F({value:new RegExp(N,"g"),matches:["quote1","name","quote2"]},n),c=F({value:new RegExp(O,"g"),matches:["quote1","name","quote2","extra","quote3","version","quote4"]},n);return o.map((t,p)=>({name:t.name,type:w.CocoaPods,softwareDevelopmentKits:c.filter(r=>r.matchIndex>t.matchIndex&&(!o[p+1]||r.matchIndex<o[p+1].matchIndex)).map(r=>({name:r.name,version:r.version}))}))}};import{readFileSync as T}from"fs";import{findAllWithRegex as l}from"@transcend-io/type-utils";import{dirname as h}from"path";var K=/implementation( *)('|")(.+?):(.+?):(.+?|)('|")/,M=/apply plugin: *('|")(.+?)(:(.+?)|)('|")/,j=/implementation group:( *)('|")(.+?)('|"),( *)name:( *)('|")(.+?)('|"),( *)version:( *)('|")(.+?)('|")/,L=/applicationId( *)"(.+?)"/,S={supportedFiles:["build.gradle**"],ignoreDirs:["gradle-app.setting","gradle-wrapper.jar","gradle-wrapper.properties"],scanFunction:e=>{let n=T(e,"utf-8"),o=h(e),c=l({value:new RegExp(K,"g"),matches:["space","quote1","name","path","version","quote2"]},n),a=l({value:new RegExp(M,"g"),matches:["quote1","name","group","version","quote2"]},n),t=l({value:new RegExp(j,"g"),matches:["space1","quote1","group","quote2","space2","space3","quote3","name","quote4","space4","space5","quote5","version","quote6"]},n),p=l({value:new RegExp(L,"g"),matches:["space","name"]},n);if(p.length>1)throw new Error(`Expected only one applicationId per file: ${e}`);return[{name:p[0]?.name||o.split("/").pop(),softwareDevelopmentKits:[...c,...t,...a].map(r=>({name:r.name,version:r.version||void 0}))}]}};import{readFileSync as $}from"fs";import{dirname as J}from"path";var x={supportedFiles:["package.json"],ignoreDirs:["node_modules","serverless-build","lambda-build"],scanFunction:e=>{let n=$(e,"utf-8"),o=J(e),c=JSON.parse(n),{name:a,description:t,dependencies:p={},devDependencies:r={},optionalDependencies:i={}}=c;return[{name:a||o.split("/").pop(),description:t,softwareDevelopmentKits:[...Object.entries(p).map(([s,m])=>({name:s,version:typeof m=="string"?m:void 0})),...Object.entries(r).map(([s,m])=>({name:s,version:typeof m=="string"?m:void 0,isDevDependency:!0})),...Object.entries(i).map(([s,m])=>({name:s,version:typeof m=="string"?m:void 0}))]}]}};import{readFileSync as R}from"fs";import{findAllWithRegex as X}from"@transcend-io/type-utils";import{dirname as U,join as W}from"path";import{CodePackageType as Y}from"@transcend-io/privacy-types";var V=/(.+?)(=+)(.+)/,H=/name *= *('|")(.+?)('|")/,Q=/description *= *('|")(.+?)('|")/,P={supportedFiles:["requirements.txt"],ignoreDirs:["build","lib","lib64"],scanFunction:e=>{let n=R(e,"utf-8"),o=U(e),a=u(o).find(s=>s==="setup.py"),t=a?R(W(o,a),"utf-8"):void 0,p=t?(H.exec(t)||[])[2]:void 0,r=t?(Q.exec(t)||[])[2]:void 0,i=X({value:new RegExp(V,"g"),matches:["name","equals","version"]},n);return[{name:p||o.split("/").pop(),description:r||void 0,type:Y.RequirementsTxt,softwareDevelopmentKits:i.map(s=>({name:s.name,version:s.version}))}]}};import{readFileSync as G}from"fs";import{findAllWithRegex as z}from"@transcend-io/type-utils";import{dirname as B}from"path";import{CodePackageType as Z}from"@transcend-io/privacy-types";var ee=/gem *('|")(.+?)('|")(, *('|")(.+?)('|")|)/,ne=/spec\.name *= *('|")(.+?)('|")/,oe=/spec\.description *= *('|")(.+?)('|")/,te=/spec\.summary *= *('|")(.+?)('|")/,k={supportedFiles:["Gemfile"],ignoreDirs:["bin"],scanFunction:e=>{let n=G(e,"utf-8"),o=B(e),a=u(o).find(s=>s===".gemspec"),t=a?G(a,"utf-8"):void 0,p=t?(ne.exec(t)||[])[2]:void 0,r=t?(oe.exec(t)||te.exec(t)||[])[1]:void 0,i=z({value:new RegExp(ee,"g"),matches:["quote1","name","quote2","hasVersion","quote3","version","quote4"]},n);return[{name:p||o.split("/").pop(),description:r||void 0,type:Z.RequirementsTxt,softwareDevelopmentKits:i.map(s=>({name:s.name,version:s.version}))}]}};import{readFileSync as re}from"fs";import{CodePackageType as ie}from"@transcend-io/privacy-types";import se from"js-yaml";import{dirname as ae}from"path";function pe(e){return e.split(`
1
+ import{c as u}from"./chunk-QAPBYN24.js";import{a as E}from"./chunk-OERYFLN2.js";import{readFileSync as b}from"fs";import{findAllWithRegex as F}from"@transcend-io/type-utils";import{CodePackageType as w}from"@transcend-io/privacy-types";var N=/target ('|")(.*?)('|")/,O=/pod ('|")(.*?)('|")(, ('|")~> (.+?)('|")|)/,y={supportedFiles:["Podfile"],ignoreDirs:["Pods"],scanFunction:e=>{let n=b(e,"utf-8"),o=F({value:new RegExp(N,"g"),matches:["quote1","name","quote2"]},n),c=F({value:new RegExp(O,"g"),matches:["quote1","name","quote2","extra","quote3","version","quote4"]},n);return o.map((t,p)=>({name:t.name,type:w.CocoaPods,softwareDevelopmentKits:c.filter(r=>r.matchIndex>t.matchIndex&&(!o[p+1]||r.matchIndex<o[p+1].matchIndex)).map(r=>({name:r.name,version:r.version}))}))}};import{readFileSync as T}from"fs";import{findAllWithRegex as l}from"@transcend-io/type-utils";import{dirname as h}from"path";var K=/implementation( *)('|")(.+?):(.+?):(.+?|)('|")/,M=/apply plugin: *('|")(.+?)(:(.+?)|)('|")/,j=/implementation group:( *)('|")(.+?)('|"),( *)name:( *)('|")(.+?)('|"),( *)version:( *)('|")(.+?)('|")/,L=/applicationId( *)"(.+?)"/,S={supportedFiles:["build.gradle**"],ignoreDirs:["gradle-app.setting","gradle-wrapper.jar","gradle-wrapper.properties"],scanFunction:e=>{let n=T(e,"utf-8"),o=h(e),c=l({value:new RegExp(K,"g"),matches:["space","quote1","name","path","version","quote2"]},n),a=l({value:new RegExp(M,"g"),matches:["quote1","name","group","version","quote2"]},n),t=l({value:new RegExp(j,"g"),matches:["space1","quote1","group","quote2","space2","space3","quote3","name","quote4","space4","space5","quote5","version","quote6"]},n),p=l({value:new RegExp(L,"g"),matches:["space","name"]},n);if(p.length>1)throw new Error(`Expected only one applicationId per file: ${e}`);return[{name:p[0]?.name||o.split("/").pop(),softwareDevelopmentKits:[...c,...t,...a].map(r=>({name:r.name,version:r.version||void 0}))}]}};import{readFileSync as $}from"fs";import{dirname as J}from"path";var x={supportedFiles:["package.json"],ignoreDirs:["node_modules","serverless-build","lambda-build"],scanFunction:e=>{let n=$(e,"utf-8"),o=J(e),c=JSON.parse(n),{name:a,description:t,dependencies:p={},devDependencies:r={},optionalDependencies:i={}}=c;return[{name:a||o.split("/").pop(),description:t,softwareDevelopmentKits:[...Object.entries(p).map(([s,m])=>({name:s,version:typeof m=="string"?m:void 0})),...Object.entries(r).map(([s,m])=>({name:s,version:typeof m=="string"?m:void 0,isDevDependency:!0})),...Object.entries(i).map(([s,m])=>({name:s,version:typeof m=="string"?m:void 0}))]}]}};import{readFileSync as R}from"fs";import{findAllWithRegex as X}from"@transcend-io/type-utils";import{dirname as U,join as W}from"path";import{CodePackageType as Y}from"@transcend-io/privacy-types";var V=/(.+?)(=+)(.+)/,H=/name *= *('|")(.+?)('|")/,Q=/description *= *('|")(.+?)('|")/,P={supportedFiles:["requirements.txt"],ignoreDirs:["build","lib","lib64"],scanFunction:e=>{let n=R(e,"utf-8"),o=U(e),a=u(o).find(s=>s==="setup.py"),t=a?R(W(o,a),"utf-8"):void 0,p=t?(H.exec(t)||[])[2]:void 0,r=t?(Q.exec(t)||[])[2]:void 0,i=X({value:new RegExp(V,"g"),matches:["name","equals","version"]},n);return[{name:p||o.split("/").pop(),description:r||void 0,type:Y.RequirementsTxt,softwareDevelopmentKits:i.map(s=>({name:s.name,version:s.version}))}]}};import{readFileSync as G}from"fs";import{findAllWithRegex as z}from"@transcend-io/type-utils";import{dirname as B}from"path";import{CodePackageType as Z}from"@transcend-io/privacy-types";var ee=/gem *('|")(.+?)('|")(, *('|")(.+?)('|")|)/,ne=/spec\.name *= *('|")(.+?)('|")/,oe=/spec\.description *= *('|")(.+?)('|")/,te=/spec\.summary *= *('|")(.+?)('|")/,k={supportedFiles:["Gemfile"],ignoreDirs:["bin"],scanFunction:e=>{let n=G(e,"utf-8"),o=B(e),a=u(o).find(s=>s===".gemspec"),t=a?G(a,"utf-8"):void 0,p=t?(ne.exec(t)||[])[2]:void 0,r=t?(oe.exec(t)||te.exec(t)||[])[1]:void 0,i=z({value:new RegExp(ee,"g"),matches:["quote1","name","quote2","hasVersion","quote3","version","quote4"]},n);return[{name:p||o.split("/").pop(),description:r||void 0,type:Z.RequirementsTxt,softwareDevelopmentKits:i.map(s=>({name:s.name,version:s.version}))}]}};import{readFileSync as re}from"fs";import{CodePackageType as ie}from"@transcend-io/privacy-types";import se from"js-yaml";import{dirname as ae}from"path";function pe(e){return e.split(`
2
2
  `).map(n=>{let o=n.indexOf("#");return o>-1&&!n.substring(0,o).includes('"')&&!n.substring(0,o).includes("'")?n.substring(0,o).trim():n}).filter(n=>n.length>0).join(`
3
3
  `)}var v={supportedFiles:["pubspec.yml"],ignoreDirs:["build"],scanFunction:e=>{let n=ae(e),o=re(e,"utf-8"),{name:c,description:a,dev_dependencies:t={},dependencies:p={}}=se.load(pe(o));return[{name:c||n.split("/").pop(),description:a,type:ie.RequirementsTxt,softwareDevelopmentKits:[...Object.entries(p).map(([r,i])=>({name:r,version:typeof i=="string"?i:typeof i=="number"?i.toString():i?.sdk})),...Object.entries(t).map(([r,i])=>({name:r,version:typeof i=="string"?i:typeof i=="number"?i.toString():i?.sdk,isDevDependency:!0}))]}]}};import{readFileSync as ce}from"fs";import{dirname as me}from"path";var I={supportedFiles:["composer.json"],ignoreDirs:["vendor","node_modules","cache","build","dist"],scanFunction:e=>{let n=ce(e,"utf-8"),o=me(e),c=JSON.parse(n),{name:a,description:t,require:p={},"require-dev":r={}}=c;return[{name:a||o.split("/").pop(),description:t,softwareDevelopmentKits:[...Object.entries(p).map(([i,s])=>({name:i,version:typeof s=="string"?s:void 0})),...Object.entries(r).map(([i,s])=>({name:i,version:typeof s=="string"?s:void 0,isDevDependency:!0}))]}]}};import{readFileSync as de}from"fs";import{CodePackageType as ge}from"@transcend-io/privacy-types";import{decodeCodec as fe}from"@transcend-io/type-utils";import*as d from"io-ts";import{dirname as ue}from"path";var le=d.type({pins:d.array(d.type({identity:d.string,kind:d.string,location:d.string,state:d.type({revision:d.string,version:d.string})})),version:d.number}),D={supportedFiles:["Package.resolved"],ignoreDirs:[],scanFunction:e=>{let n=de(e,"utf-8"),o=fe(le,n);return[{name:ue(e).split("/").pop()||"",type:ge.CocoaPods,softwareDevelopmentKits:o.pins.map(c=>({name:c.identity,version:c.state.version}))}]}};import{CodePackageType as f}from"@transcend-io/privacy-types";var gn={cocoaPods:y,gradle:S,javascriptPackageJson:x,pythonRequirementsTxt:P,gemfile:k,pubspec:v,swift:D},_={[f.CocoaPods]:y,[f.Gradle]:S,[f.PackageJson]:x,[f.RequirementsTxt]:P,[f.Gemfile]:k,[f.Pubspec]:v,[f.ComposerJson]:I,[f.Swift]:D};import Ce from"fast-glob";import A from"colors";import{getEntries as Ee}from"@transcend-io/type-utils";async function Sn({scanPath:e,ignoreDirs:n=[],repositoryName:o}){return(await Promise.all(Ee(_).map(async([a,t])=>{let{ignoreDirs:p,supportedFiles:r,scanFunction:i}=t,s=[...n,...p].filter(m=>m.length>0);try{let m=await Ce(`${e}/**/${r.join("|")}`,{ignore:s.map(g=>`${e}/**/${g}`),unique:!0,onlyFiles:!0});E.info(A.magenta(`Scanning: ${m.length} files of type ${a}`));let C=m.map(g=>i(g).map(q=>({...q,relativePath:g.replace(`${e}/`,"")}))).flat();return E.info(A.green(`Found: ${C.length} packages and ${C.map(({softwareDevelopmentKits:g=[]})=>g).flat().length} sdks`)),C.map(g=>({...g,type:a,repositoryName:o}))}catch(m){throw new Error(`Error scanning globs ${r} with error: ${m}`)}}))).flat()}export{gn as a,Sn as b};
@@ -1,26 +1,26 @@
1
- import{a as s,b as n,c as g,d as a,e as t,f as r,g as o,j as k}from"./chunk-FL3V7KJR.js";import{a as i}from"./chunk-APA5PR4U.js";import{a as h,b}from"./chunk-4ZV5X5DQ.js";import{b as m,c as f}from"./chunk-EZCJGIOS.js";import{buildInstallCommand as ur,buildUninstallCommand as cr}from"@stricli/auto-complete";import{buildApplication as pr,buildRouteMap as mr}from"@stricli/core";import{buildRouteMap as ye}from"@stricli/core";import{buildCommand as ke}from"@stricli/core";var y=ke({loader:async()=>{let{generateApiKeys:e}=await import("./impl-4J5UT2YS.js");return e},parameters:{flags:{email:{kind:"parsed",parse:String,brief:"The email address that you use to log into Transcend"},password:{kind:"parsed",parse:String,brief:"The password for your account login"},apiKeyTitle:{kind:"parsed",parse:String,brief:"The title of the API key being generated or destroyed"},file:{kind:"parsed",parse:String,brief:"The file where API keys should be written to"},scopes:{kind:"parsed",parse:String,variadic:",",brief:"The list of scopes that should be given to the API key"},deleteExistingApiKey:{kind:"boolean",brief:"When true, if an API key exists with the specified apiKeyTitle, the existing API key is deleted",default:!0},createNewApiKey:{kind:"boolean",brief:"When true, new API keys will be created. Set to false if you simply want to delete all API keys with a title",default:!0},parentOrganizationId:{kind:"parsed",parse:s,brief:"Filter for only a specific organization by ID, returning all child accounts associated with that organization",optional:!0},transcendUrl:r()}},docs:{brief:"Generate API keys",fullDescription:`This command allows for creating API keys across multiple Transcend instances. This is useful for customers that are managing many Transcend instances and need to regularly create, cycle or delete API keys across all of their instances.
1
+ import{a as s,b as n,c as g,d as a,e as t,f as r,g as o,j as k}from"./chunk-IQZKONXI.js";import{a as i}from"./chunk-APA5PR4U.js";import{a as h,b}from"./chunk-MLF3XCRS.js";import{b as m,c as f}from"./chunk-EZCJGIOS.js";import{buildInstallCommand as ur,buildUninstallCommand as cr}from"@stricli/auto-complete";import{buildApplication as pr,buildRouteMap as mr}from"@stricli/core";import{buildRouteMap as ye}from"@stricli/core";import{buildCommand as ke}from"@stricli/core";var y=ke({loader:async()=>{let{generateApiKeys:e}=await import("./impl-K2ZB3AKB.js");return e},parameters:{flags:{email:{kind:"parsed",parse:String,brief:"The email address that you use to log into Transcend"},password:{kind:"parsed",parse:String,brief:"The password for your account login"},apiKeyTitle:{kind:"parsed",parse:String,brief:"The title of the API key being generated or destroyed"},file:{kind:"parsed",parse:String,brief:"The file where API keys should be written to"},scopes:{kind:"parsed",parse:String,variadic:",",brief:"The list of scopes that should be given to the API key"},deleteExistingApiKey:{kind:"boolean",brief:"When true, if an API key exists with the specified apiKeyTitle, the existing API key is deleted",default:!0},createNewApiKey:{kind:"boolean",brief:"When true, new API keys will be created. Set to false if you simply want to delete all API keys with a title",default:!0},parentOrganizationId:{kind:"parsed",parse:s,brief:"Filter for only a specific organization by ID, returning all child accounts associated with that organization",optional:!0},transcendUrl:r()}},docs:{brief:"Generate API keys",fullDescription:`This command allows for creating API keys across multiple Transcend instances. This is useful for customers that are managing many Transcend instances and need to regularly create, cycle or delete API keys across all of their instances.
2
2
 
3
3
  Unlike the other commands that rely on API key authentication, this command relies upon username/password authentication. This command will spit out the API keys into a JSON file, and that JSON file can be used in subsequent cli commands.
4
4
 
5
- Authentication requires your email and password for the Transcend account. This command will only generate API keys for Transcend instances where you have the permission to "Manage API Keys".`}});var S=ye({routes:{"generate-api-keys":y},docs:{brief:"Admin commands"}});import{buildRouteMap as Be}from"@stricli/core";import{buildCommand as Se}from"@stricli/core";import{ScopeName as we}from"@transcend-io/privacy-types";var w=Se({loader:async()=>{let{buildXdiSyncEndpoint:e}=await import("./impl-6QYOU3LQ.js");return e},parameters:{flags:{auth:t({scopes:[we.ViewConsentManager]}),xdiLocation:{kind:"parsed",parse:String,brief:"The location of the XDI that will be loaded by the generated sync endpoint"},file:{kind:"parsed",parse:String,brief:"The HTML file path where the sync endpoint should be written",default:"./sync-endpoint.html"},removeIpAddresses:{kind:"boolean",brief:"When true, remove IP addresses from the domain list",default:!0},domainBlockList:{kind:"parsed",parse:g,brief:"The set of domains that should be excluded from the sync endpoint. Comma-separated list.",default:"localhost"},xdiAllowedCommands:{kind:"parsed",parse:String,brief:"The allowed set of XDI commands",default:"ConsentManager:Sync"},transcendUrl:r()}},docs:{brief:"Build XDI sync endpoint",fullDescription:"This command allows for building of the XDI Sync Endpoint across a set of Transcend accounts."}});import{buildCommand as ve}from"@stricli/core";import{ScopeName as Ce}from"@transcend-io/privacy-types";var v=ve({loader:async()=>{let{pullConsentMetrics:e}=await import("./impl-4LDKW5YP.js");return e},parameters:{flags:{auth:t({scopes:[Ce.ViewConsentManager]}),start:{kind:"parsed",parse:a,brief:"The start date to pull metrics from"},end:{kind:"parsed",parse:a,brief:"The end date to pull metrics until",optional:!0},folder:{kind:"parsed",parse:String,brief:"The folder to save metrics to",default:"./consent-metrics/"},bin:{kind:"parsed",parse:String,brief:"The bin metric when pulling data (1h or 1d)",default:"1d"},transcendUrl:r()}},docs:{brief:"Pull consent metrics",fullDescription:"This command allows for pulling consent manager metrics for a Transcend account, or a set of Transcend accounts.\n\nBy default, the consent metrics will be written to a folder named `consent-metrics` within the directory where you run the command. You can override the location that these CSVs are written to using the flag `--folder=./my-folder/`. This folder will contain a set of CSV files:\n\n- `CONSENT_CHANGES_TIMESERIES_optIn.csv` -> this is a feed containing the number of explicit opt in events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: true });`\n- `CONSENT_CHANGES_TIMESERIES_optOut.csv` -> this is a feed containing the number of explicit opt out events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: false });`\n- `CONSENT_SESSIONS_BY_REGIME_Default.csv` -> this contains the number of sessions detected for the bin period\n- `PRIVACY_SIGNAL_TIMESERIES_DNT.csv` -> the number of DNT signals detected.\n- `PRIVACY_SIGNAL_TIMESERIES_GPC.csv` -> the number of GPC signals detected."}});import{buildCommand as Te,numberParser as qe}from"@stricli/core";import{ScopeName as Pe}from"@transcend-io/privacy-types";var C=Te({loader:async()=>{let{pullConsentPreferences:e}=await import("./impl-BE2FBQB2.js");return e},parameters:{flags:{auth:t({scopes:[Pe.ViewManagedConsentDatabaseAdminApi]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:o(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to save preferences to",default:"./preferences.csv"},transcendUrl:r(),timestampBefore:{kind:"parsed",parse:a,brief:"Filter for consents updated this time",optional:!0},timestampAfter:{kind:"parsed",parse:a,brief:"Filter for consents updated after this time",optional:!0},identifiers:{kind:"parsed",parse:String,variadic:",",brief:"Filter for specific identifiers",optional:!0},concurrency:{kind:"parsed",parse:qe,brief:"The concurrency to use when downloading consents in parallel",default:"100"}}},docs:{brief:"Pull consent preferences",fullDescription:"This command allows for pull of consent preferences from the Managed Consent Database."}});import{buildCommand as Ae}from"@stricli/core";import{ConsentBundleType as De,ScopeName as Re}from"@transcend-io/privacy-types";var T=Ae({loader:async()=>{let{updateConsentManager:e}=await import("./impl-WMDL5UOF.js");return e},parameters:{flags:{auth:t({scopes:[Re.ManageConsentManagerDeveloperSettings]}),bundleTypes:{kind:"enum",values:Object.values(De),brief:"The bundle types to deploy. Defaults to PRODUCTION,TEST.",variadic:","},deploy:{kind:"boolean",brief:"When true, deploy the Consent Manager after updating the version",default:!1},transcendUrl:r()}},docs:{brief:"Update consent manager",fullDescription:"This command allows for updating Consent Manager to latest version. The Consent Manager bundle can also be deployed using this command."}});import{buildCommand as Ie,numberParser as Ue}from"@stricli/core";var q=Ie({loader:async()=>{let{uploadConsentPreferences:e}=await import("./impl-UIHX2POD.js");return e},parameters:{flags:{base64EncryptionKey:{kind:"parsed",parse:String,brief:"The encryption key used to encrypt the userId"},base64SigningKey:{kind:"parsed",parse:String,brief:"The signing key used to prove authentication of consent request"},partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},file:{kind:"parsed",parse:String,brief:"The file to pull consent preferences from",default:"./preferences.csv"},consentUrl:{kind:"parsed",parse:n,brief:"URL of the Transcend Consent backend. Use https://consent.us.transcend.io for US hosting",default:"https://consent.transcend.io"},concurrency:{kind:"parsed",parse:Ue,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Upload consent preferences to the Managed Consent Database",fullDescription:"This command allows for updating of consent preferences to the Managed Consent Database."}});import{buildCommand as Ve}from"@stricli/core";import{ConsentTrackerStatus as Me,ScopeName as xe}from"@transcend-io/privacy-types";var P=Ve({loader:async()=>{let{uploadCookiesFromCsv:e}=await import("./impl-ZTS5VZXR.js");return e},parameters:{flags:{auth:t({scopes:[xe.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(Me),brief:"The status of the cookies you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./cookies.csv"},transcendUrl:r()}},docs:{brief:"Upload cookies from CSV",fullDescription:`Upload cookies from CSV. This command allows for uploading of cookies from CSV.
5
+ Authentication requires your email and password for the Transcend account. This command will only generate API keys for Transcend instances where you have the permission to "Manage API Keys".`}});var S=ye({routes:{"generate-api-keys":y},docs:{brief:"Admin commands"}});import{buildRouteMap as Be}from"@stricli/core";import{buildCommand as Se}from"@stricli/core";import{ScopeName as we}from"@transcend-io/privacy-types";var w=Se({loader:async()=>{let{buildXdiSyncEndpoint:e}=await import("./impl-IDWP2NIG.js");return e},parameters:{flags:{auth:t({scopes:[we.ViewConsentManager]}),xdiLocation:{kind:"parsed",parse:String,brief:"The location of the XDI that will be loaded by the generated sync endpoint"},file:{kind:"parsed",parse:String,brief:"The HTML file path where the sync endpoint should be written",default:"./sync-endpoint.html"},removeIpAddresses:{kind:"boolean",brief:"When true, remove IP addresses from the domain list",default:!0},domainBlockList:{kind:"parsed",parse:g,brief:"The set of domains that should be excluded from the sync endpoint. Comma-separated list.",default:"localhost"},xdiAllowedCommands:{kind:"parsed",parse:String,brief:"The allowed set of XDI commands",default:"ConsentManager:Sync"},transcendUrl:r()}},docs:{brief:"Build XDI sync endpoint",fullDescription:"This command allows for building of the XDI Sync Endpoint across a set of Transcend accounts."}});import{buildCommand as ve}from"@stricli/core";import{ScopeName as Ce}from"@transcend-io/privacy-types";var v=ve({loader:async()=>{let{pullConsentMetrics:e}=await import("./impl-ZXDLJ2TY.js");return e},parameters:{flags:{auth:t({scopes:[Ce.ViewConsentManager]}),start:{kind:"parsed",parse:a,brief:"The start date to pull metrics from"},end:{kind:"parsed",parse:a,brief:"The end date to pull metrics until",optional:!0},folder:{kind:"parsed",parse:String,brief:"The folder to save metrics to",default:"./consent-metrics/"},bin:{kind:"parsed",parse:String,brief:"The bin metric when pulling data (1h or 1d)",default:"1d"},transcendUrl:r()}},docs:{brief:"Pull consent metrics",fullDescription:"This command allows for pulling consent manager metrics for a Transcend account, or a set of Transcend accounts.\n\nBy default, the consent metrics will be written to a folder named `consent-metrics` within the directory where you run the command. You can override the location that these CSVs are written to using the flag `--folder=./my-folder/`. This folder will contain a set of CSV files:\n\n- `CONSENT_CHANGES_TIMESERIES_optIn.csv` -> this is a feed containing the number of explicit opt in events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: true });`\n- `CONSENT_CHANGES_TIMESERIES_optOut.csv` -> this is a feed containing the number of explicit opt out events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: false });`\n- `CONSENT_SESSIONS_BY_REGIME_Default.csv` -> this contains the number of sessions detected for the bin period\n- `PRIVACY_SIGNAL_TIMESERIES_DNT.csv` -> the number of DNT signals detected.\n- `PRIVACY_SIGNAL_TIMESERIES_GPC.csv` -> the number of GPC signals detected."}});import{buildCommand as Te,numberParser as qe}from"@stricli/core";import{ScopeName as Pe}from"@transcend-io/privacy-types";var C=Te({loader:async()=>{let{pullConsentPreferences:e}=await import("./impl-JRA6GN3V.js");return e},parameters:{flags:{auth:t({scopes:[Pe.ViewManagedConsentDatabaseAdminApi]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:o(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to save preferences to",default:"./preferences.csv"},transcendUrl:r(),timestampBefore:{kind:"parsed",parse:a,brief:"Filter for consents updated this time",optional:!0},timestampAfter:{kind:"parsed",parse:a,brief:"Filter for consents updated after this time",optional:!0},identifiers:{kind:"parsed",parse:String,variadic:",",brief:"Filter for specific identifiers",optional:!0},concurrency:{kind:"parsed",parse:qe,brief:"The concurrency to use when downloading consents in parallel",default:"100"}}},docs:{brief:"Pull consent preferences",fullDescription:"This command allows for pull of consent preferences from the Managed Consent Database."}});import{buildCommand as Ae}from"@stricli/core";import{ConsentBundleType as De,ScopeName as Re}from"@transcend-io/privacy-types";var T=Ae({loader:async()=>{let{updateConsentManager:e}=await import("./impl-LNLKIPIP.js");return e},parameters:{flags:{auth:t({scopes:[Re.ManageConsentManagerDeveloperSettings]}),bundleTypes:{kind:"enum",values:Object.values(De),brief:"The bundle types to deploy. Defaults to PRODUCTION,TEST.",variadic:","},deploy:{kind:"boolean",brief:"When true, deploy the Consent Manager after updating the version",default:!1},transcendUrl:r()}},docs:{brief:"Update consent manager",fullDescription:"This command allows for updating Consent Manager to latest version. The Consent Manager bundle can also be deployed using this command."}});import{buildCommand as Ie,numberParser as Ue}from"@stricli/core";var q=Ie({loader:async()=>{let{uploadConsentPreferences:e}=await import("./impl-VT26YO3N.js");return e},parameters:{flags:{base64EncryptionKey:{kind:"parsed",parse:String,brief:"The encryption key used to encrypt the userId"},base64SigningKey:{kind:"parsed",parse:String,brief:"The signing key used to prove authentication of consent request"},partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},file:{kind:"parsed",parse:String,brief:"The file to pull consent preferences from",default:"./preferences.csv"},consentUrl:{kind:"parsed",parse:n,brief:"URL of the Transcend Consent backend. Use https://consent.us.transcend.io for US hosting",default:"https://consent.transcend.io"},concurrency:{kind:"parsed",parse:Ue,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Upload consent preferences to the Managed Consent Database",fullDescription:"This command allows for updating of consent preferences to the Managed Consent Database."}});import{buildCommand as Ve}from"@stricli/core";import{ConsentTrackerStatus as Me,ScopeName as xe}from"@transcend-io/privacy-types";var P=Ve({loader:async()=>{let{uploadCookiesFromCsv:e}=await import("./impl-ULVQLOA5.js");return e},parameters:{flags:{auth:t({scopes:[xe.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(Me),brief:"The status of the cookies you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./cookies.csv"},transcendUrl:r()}},docs:{brief:"Upload cookies from CSV",fullDescription:`Upload cookies from CSV. This command allows for uploading of cookies from CSV.
6
6
 
7
7
  Step 1) Download the CSV of cookies that you want to edit from the Admin Dashboard under [Consent Management -> Cookies](https://app.transcend.io/consent-manager/cookies). You can download cookies from both the "Triage" and "Approved" tabs.
8
8
 
9
9
  Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
10
10
 
11
- Step 3) Upload the modified CSV file back into the dashboard with this command.`}});import{buildCommand as Oe}from"@stricli/core";import{ConsentTrackerStatus as Ne,ScopeName as je}from"@transcend-io/privacy-types";var A=Oe({loader:async()=>{let{uploadDataFlowsFromCsv:e}=await import("./impl-KE4S4ANH.js");return e},parameters:{flags:{auth:t({scopes:[je.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(Ne),brief:"The status of the data flows you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./data-flows.csv"},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},transcendUrl:r()}},docs:{brief:"Upload data flows from CSV",fullDescription:`Upload data flows from CSV. This command allows for uploading of data flows from CSV.
11
+ Step 3) Upload the modified CSV file back into the dashboard with this command.`}});import{buildCommand as Oe}from"@stricli/core";import{ConsentTrackerStatus as Ne,ScopeName as je}from"@transcend-io/privacy-types";var A=Oe({loader:async()=>{let{uploadDataFlowsFromCsv:e}=await import("./impl-ICGIPWVJ.js");return e},parameters:{flags:{auth:t({scopes:[je.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(Ne),brief:"The status of the data flows you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./data-flows.csv"},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},transcendUrl:r()}},docs:{brief:"Upload data flows from CSV",fullDescription:`Upload data flows from CSV. This command allows for uploading of data flows from CSV.
12
12
 
13
13
  Step 1) Download the CSV of data flows that you want to edit from the Admin Dashboard under [Consent Management -> Data Flows](https://app.transcend.io/consent-manager/data-flows). You can download data flows from both the "Triage" and "Approved" tabs.
14
14
 
15
15
  Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
16
16
 
17
- Step 3) Upload the modified CSV file back into the dashboard with this command.`}});import{buildCommand as Ee,numberParser as Fe}from"@stricli/core";import{ScopeName as d}from"@transcend-io/privacy-types";var D=Ee({loader:async()=>{let{uploadPreferences:e}=await import("./impl-FAK3X2IM.js");return e},parameters:{flags:{auth:t({scopes:[d.ManageStoredPreferences,d.ViewManagedConsentDatabaseAdminApi,d.ViewPreferenceStoreSettings]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:o(),consentUrl:{kind:"parsed",parse:n,brief:"URL of the Transcend backend. Use https://consent.us.transcend.io for US hosting",default:"https://consent.transcend.io"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to load preferences from",optional:!0},directory:{kind:"parsed",parse:String,brief:"Path to the directory of CSV files to load preferences from",optional:!0},dryRun:{kind:"boolean",brief:"Whether to do a dry run only - will write results to receiptFilepath without updating Transcend",default:!1},skipExistingRecordCheck:{kind:"boolean",brief:"Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD",default:!1},receiptFileDir:{kind:"parsed",parse:String,brief:"Directory path where the response receipts should be saved",default:"./receipts"},skipWorkflowTriggers:{kind:"boolean",brief:"Whether to skip workflow triggers when uploading to preference store",default:!1},forceTriggerWorkflows:{kind:"boolean",brief:"Whether to force trigger workflows for existing consent records",default:!1},skipConflictUpdates:{kind:"boolean",brief:"Whether to skip uploading of any records where the preference store and file have a hard conflict",default:!1},isSilent:{kind:"boolean",brief:"Whether to skip sending emails in workflows",default:!0},attributes:{kind:"parsed",parse:String,brief:"Attributes to add to any DSR request if created. Comma-separated list of key:value pairs.",default:"Tags:transcend-cli,Source:transcend-cli"},receiptFilepath:{kind:"parsed",parse:String,brief:"Store resulting, continuing where left off",default:"./preference-management-upload-receipts.json"},concurrency:{kind:"parsed",parse:Fe,brief:"The concurrency to use when uploading in parallel",default:"10"}}},docs:{brief:"Upload preference management data to your Preference Store",fullDescription:`Upload preference management data to your Preference Store.
17
+ Step 3) Upload the modified CSV file back into the dashboard with this command.`}});import{buildCommand as Ee,numberParser as Fe}from"@stricli/core";import{ScopeName as d}from"@transcend-io/privacy-types";var D=Ee({loader:async()=>{let{uploadPreferences:e}=await import("./impl-ISWFGOUS.js");return e},parameters:{flags:{auth:t({scopes:[d.ManageStoredPreferences,d.ViewManagedConsentDatabaseAdminApi,d.ViewPreferenceStoreSettings]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:o(),consentUrl:{kind:"parsed",parse:n,brief:"URL of the Transcend backend. Use https://consent.us.transcend.io for US hosting",default:"https://consent.transcend.io"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to load preferences from",optional:!0},directory:{kind:"parsed",parse:String,brief:"Path to the directory of CSV files to load preferences from",optional:!0},dryRun:{kind:"boolean",brief:"Whether to do a dry run only - will write results to receiptFilepath without updating Transcend",default:!1},skipExistingRecordCheck:{kind:"boolean",brief:"Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD",default:!1},receiptFileDir:{kind:"parsed",parse:String,brief:"Directory path where the response receipts should be saved",default:"./receipts"},skipWorkflowTriggers:{kind:"boolean",brief:"Whether to skip workflow triggers when uploading to preference store",default:!1},forceTriggerWorkflows:{kind:"boolean",brief:"Whether to force trigger workflows for existing consent records",default:!1},skipConflictUpdates:{kind:"boolean",brief:"Whether to skip uploading of any records where the preference store and file have a hard conflict",default:!1},isSilent:{kind:"boolean",brief:"Whether to skip sending emails in workflows",default:!0},attributes:{kind:"parsed",parse:String,brief:"Attributes to add to any DSR request if created. Comma-separated list of key:value pairs.",default:"Tags:transcend-cli,Source:transcend-cli"},receiptFilepath:{kind:"parsed",parse:String,brief:"Store resulting, continuing where left off",default:"./preference-management-upload-receipts.json"},concurrency:{kind:"parsed",parse:Fe,brief:"The concurrency to use when uploading in parallel",default:"10"}}},docs:{brief:"Upload preference management data to your Preference Store",fullDescription:`Upload preference management data to your Preference Store.
18
18
 
19
19
  This command prompts you to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
20
20
 
21
- The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var R=Be({routes:{"build-xdi-sync-endpoint":w,"pull-consent-metrics":v,"pull-consent-preferences":C,"update-consent-manager":T,"upload-consent-preferences":q,"upload-cookies-from-csv":P,"upload-data-flows-from-csv":A,"upload-preferences":D},docs:{brief:"Consent commands"}});import{buildRouteMap as at}from"@stricli/core";import{buildCommand as We}from"@stricli/core";var I=We({loader:async()=>{let{deriveDataSilosFromDataFlowsCrossInstance:e}=await import("./impl-6XIVNFHV.js");return e},parameters:{flags:{auth:t({scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},output:{kind:"parsed",parse:String,brief:"The output transcend.yml file containing the data silo configurations",default:"./transcend.yml"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:r()}},docs:{brief:"Derive data silos from data flows cross instance",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to a single transcend.yml configurations of all related data silos."}});import{buildCommand as Ye}from"@stricli/core";var U=Ye({loader:async()=>{let{deriveDataSilosFromDataFlows:e}=await import("./impl-IM4ZHNF7.js");return e},parameters:{flags:{auth:t({scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},dataSilosYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data silo yml files"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:r()}},docs:{brief:"Derive data silos from data flows",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to set of data silo transcend.yml configurations."}});import{buildCommand as _e}from"@stricli/core";import{ScopeName as Le}from"@transcend-io/privacy-types";var V=_e({loader:async()=>{let{discoverSilos:e}=await import("./impl-J2EOVLOE.js");return e},parameters:{flags:{scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan"},dataSiloId:{kind:"parsed",parse:s,brief:"The UUID of the corresponding data silo"},auth:t({scopes:[Le.ManageAssignedDataInventory],requiresSiloScope:!0}),fileGlobs:{kind:"parsed",parse:String,brief:"You can pass a glob syntax pattern(s) to specify additional file paths to scan. Comma-separated list of globs.",default:""},ignoreDirs:{kind:"parsed",parse:String,brief:"Comma-separated list of directories to ignore.",default:""},transcendUrl:r()}},docs:{brief:"Scan dependency management files to discover new data silos.",fullDescription:`We support scanning for new data silos in JavaScript, Python, Gradle, and CocoaPods projects.
21
+ The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var R=Be({routes:{"build-xdi-sync-endpoint":w,"pull-consent-metrics":v,"pull-consent-preferences":C,"update-consent-manager":T,"upload-consent-preferences":q,"upload-cookies-from-csv":P,"upload-data-flows-from-csv":A,"upload-preferences":D},docs:{brief:"Consent commands"}});import{buildRouteMap as at}from"@stricli/core";import{buildCommand as We}from"@stricli/core";var I=We({loader:async()=>{let{deriveDataSilosFromDataFlowsCrossInstance:e}=await import("./impl-Q65ZCWEQ.js");return e},parameters:{flags:{auth:t({scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},output:{kind:"parsed",parse:String,brief:"The output transcend.yml file containing the data silo configurations",default:"./transcend.yml"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:r()}},docs:{brief:"Derive data silos from data flows cross instance",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to a single transcend.yml configurations of all related data silos."}});import{buildCommand as Ye}from"@stricli/core";var U=Ye({loader:async()=>{let{deriveDataSilosFromDataFlows:e}=await import("./impl-ZBWVSFDE.js");return e},parameters:{flags:{auth:t({scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},dataSilosYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data silo yml files"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:r()}},docs:{brief:"Derive data silos from data flows",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to set of data silo transcend.yml configurations."}});import{buildCommand as _e}from"@stricli/core";import{ScopeName as Le}from"@transcend-io/privacy-types";var V=_e({loader:async()=>{let{discoverSilos:e}=await import("./impl-7C43442T.js");return e},parameters:{flags:{scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan"},dataSiloId:{kind:"parsed",parse:s,brief:"The UUID of the corresponding data silo"},auth:t({scopes:[Le.ManageAssignedDataInventory],requiresSiloScope:!0}),fileGlobs:{kind:"parsed",parse:String,brief:"You can pass a glob syntax pattern(s) to specify additional file paths to scan. Comma-separated list of globs.",default:""},ignoreDirs:{kind:"parsed",parse:String,brief:"Comma-separated list of directories to ignore.",default:""},transcendUrl:r()}},docs:{brief:"Scan dependency management files to discover new data silos.",fullDescription:`We support scanning for new data silos in JavaScript, Python, Gradle, and CocoaPods projects.
22
22
 
23
- To get started, add a data silo for the corresponding project type with the "silo discovery" plugin enabled. For example, if you want to scan a JavaScript project, add a package.json data silo. Then, specify the data silo ID in the "--dataSiloId" parameter.`}});import{buildCommand as Ge}from"@stricli/core";import{DataCategoryType as Ke,ScopeName as Je}from"@transcend-io/privacy-types";var M=Ge({loader:async()=>{let{pullDatapoints:e}=await import("./impl-CQWH2NIM.js");return e},parameters:{flags:{auth:t({scopes:[Je.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./datapoints.csv"},transcendUrl:r(),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"List of data silo IDs to filter by",optional:!0},includeAttributes:{kind:"boolean",brief:"Whether to include attributes in the output",default:!1},includeGuessedCategories:{kind:"boolean",brief:"Whether to include guessed categories in the output",default:!1},parentCategories:{kind:"enum",values:Object.values(Ke),brief:"List of parent categories to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of subcategories to filter by",variadic:",",optional:!0}}},docs:{brief:"Export the datapoints from your Data Inventory into a CSV."}});import{buildCommand as $e}from"@stricli/core";import{ScopeName as ze,UnstructuredSubDataPointRecommendationStatus as Xe}from"@transcend-io/privacy-types";var x=$e({loader:async()=>{let{pullUnstructuredDiscoveryFiles:e}=await import("./impl-UPRMABFX.js");return e},parameters:{flags:{auth:t({scopes:[ze.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./unstructured-discovery-files.csv"},transcendUrl:r(),dataSiloIds:{kind:"parsed",parse:String,brief:"List of data silo IDs to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of data categories to filter by",variadic:",",optional:!0},status:{kind:"enum",values:Object.values(Xe),brief:"List of classification statuses to filter by",variadic:",",optional:!0},includeEncryptedSnippets:{kind:"boolean",brief:"Whether to include encrypted snippets of the entries classified",default:!1}}},docs:{brief:"Pull unstructured discovery files",fullDescription:"This command allows for pulling Unstructured Discovery into a CSV."}});import{buildCommand as He,numberParser as Qe}from"@stricli/core";var O=He({loader:async()=>{let{push:e}=await import("./impl-7SOARMNA.js");return e},parameters:{flags:{auth:t({scopes:"Varies"}),file:{kind:"parsed",parse:String,brief:"Path to the YAML file to push from",default:"./transcend.yml"},transcendUrl:r(),pageSize:{kind:"parsed",parse:Qe,brief:"The page size to use when paginating over the API",default:"50"},variables:{kind:"parsed",parse:String,brief:"The variables to template into the YAML file when pushing configuration. Comma-separated list of key:value pairs.",default:""},publishToPrivacyCenter:{kind:"boolean",brief:"When true, publish the configuration to the Privacy Center",default:!1},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},deleteExtraAttributeValues:{kind:"boolean",brief:"When true and syncing attributes, delete any extra attributes instead of just upserting",default:!1}}},docs:{brief:"Push metadata from transcend.yml to Transcend",fullDescription:"Given a transcend.yml file, sync the contents up to your Transcend instance."}});import{buildCommand as Ze}from"@stricli/core";import{ScopeName as et}from"@transcend-io/privacy-types";var N=Ze({loader:async()=>{let{scanPackages:e}=await import("./impl-CFQR7ENW.js");return e},parameters:{flags:{auth:t({scopes:[et.ManageCodeScanning]}),scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan",default:"./"},ignoreDirs:{kind:"parsed",parse:String,variadic:",",brief:"List of directories to ignore in scan",optional:!0},repositoryName:{kind:"parsed",parse:String,brief:"Name of the git repository that the package should be tied to",optional:!0},transcendUrl:r()}},docs:{brief:"Scan dependency management files to inventory code dependencies.",fullDescription:`Transcend scans packages and dependencies for the following frameworks:
23
+ To get started, add a data silo for the corresponding project type with the "silo discovery" plugin enabled. For example, if you want to scan a JavaScript project, add a package.json data silo. Then, specify the data silo ID in the "--dataSiloId" parameter.`}});import{buildCommand as Ge}from"@stricli/core";import{DataCategoryType as Ke,ScopeName as Je}from"@transcend-io/privacy-types";var M=Ge({loader:async()=>{let{pullDatapoints:e}=await import("./impl-QTDGR3SU.js");return e},parameters:{flags:{auth:t({scopes:[Je.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./datapoints.csv"},transcendUrl:r(),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"List of data silo IDs to filter by",optional:!0},includeAttributes:{kind:"boolean",brief:"Whether to include attributes in the output",default:!1},includeGuessedCategories:{kind:"boolean",brief:"Whether to include guessed categories in the output",default:!1},parentCategories:{kind:"enum",values:Object.values(Ke),brief:"List of parent categories to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of subcategories to filter by",variadic:",",optional:!0}}},docs:{brief:"Export the datapoints from your Data Inventory into a CSV."}});import{buildCommand as $e}from"@stricli/core";import{ScopeName as ze,UnstructuredSubDataPointRecommendationStatus as Xe}from"@transcend-io/privacy-types";var x=$e({loader:async()=>{let{pullUnstructuredDiscoveryFiles:e}=await import("./impl-75FHAT4R.js");return e},parameters:{flags:{auth:t({scopes:[ze.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./unstructured-discovery-files.csv"},transcendUrl:r(),dataSiloIds:{kind:"parsed",parse:String,brief:"List of data silo IDs to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of data categories to filter by",variadic:",",optional:!0},status:{kind:"enum",values:Object.values(Xe),brief:"List of classification statuses to filter by",variadic:",",optional:!0},includeEncryptedSnippets:{kind:"boolean",brief:"Whether to include encrypted snippets of the entries classified",default:!1}}},docs:{brief:"Pull unstructured discovery files",fullDescription:"This command allows for pulling Unstructured Discovery into a CSV."}});import{buildCommand as He,numberParser as Qe}from"@stricli/core";var O=He({loader:async()=>{let{push:e}=await import("./impl-7W6EBZXZ.js");return e},parameters:{flags:{auth:t({scopes:"Varies"}),file:{kind:"parsed",parse:String,brief:"Path to the YAML file to push from",default:"./transcend.yml"},transcendUrl:r(),pageSize:{kind:"parsed",parse:Qe,brief:"The page size to use when paginating over the API",default:"50"},variables:{kind:"parsed",parse:String,brief:"The variables to template into the YAML file when pushing configuration. Comma-separated list of key:value pairs.",default:""},publishToPrivacyCenter:{kind:"boolean",brief:"When true, publish the configuration to the Privacy Center",default:!1},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},deleteExtraAttributeValues:{kind:"boolean",brief:"When true and syncing attributes, delete any extra attributes instead of just upserting",default:!1}}},docs:{brief:"Push metadata from transcend.yml to Transcend",fullDescription:"Given a transcend.yml file, sync the contents up to your Transcend instance."}});import{buildCommand as Ze}from"@stricli/core";import{ScopeName as et}from"@transcend-io/privacy-types";var N=Ze({loader:async()=>{let{scanPackages:e}=await import("./impl-W454HAAT.js");return e},parameters:{flags:{auth:t({scopes:[et.ManageCodeScanning]}),scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan",default:"./"},ignoreDirs:{kind:"parsed",parse:String,variadic:",",brief:"List of directories to ignore in scan",optional:!0},repositoryName:{kind:"parsed",parse:String,brief:"Name of the git repository that the package should be tied to",optional:!0},transcendUrl:r()}},docs:{brief:"Scan dependency management files to inventory code dependencies.",fullDescription:`Transcend scans packages and dependencies for the following frameworks:
24
24
 
25
25
  - package.json
26
26
  - requirements.txt & setup.py
@@ -42,14 +42,14 @@ Step 1) Run \`await airgap.getMetadata()\` on a site with airgap
42
42
  Step 2) Right click on the printed object, and click \`Copy object\`
43
43
  Step 3) Place output of file in a file named \`services.json\`
44
44
  Step 4) Run \`${i} consent consent-manager-service-json-to-yml --file=./services.json --output=./transcend.yml\`
45
- Step 5) Run \`${i} inventory push --auth=$TRANSCEND_API_KEY --file=./transcend.yml --classifyService=true\``}});import{buildCommand as rt}from"@stricli/core";var E=rt({loader:async()=>{let{consentManagersToBusinessEntities:e}=await import("./impl-LAJLFEXD.js");return e},parameters:{flags:{consentManagerYmlFolder:{kind:"parsed",parse:String,brief:"Path to the folder of Consent Manager transcend.yml files to combine"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml with business entity configuration",default:"./combined-business-entities.yml"}}},docs:{brief:"Convert consent managers to business entities",fullDescription:"This command allows for converting a folder or Consent Manager transcend.yml files into a single transcend.yml file where each consent manager configuration is a Business Entity in the data inventory."}});var F=at({routes:{pull:k,push:O,"scan-packages":N,"discover-silos":V,"pull-datapoints":M,"pull-unstructured-discovery-files":x,"derive-data-silos-from-data-flows":U,"derive-data-silos-from-data-flows-cross-instance":I,"consent-manager-service-json-to-yml":j,"consent-managers-to-business-entities":E},docs:{brief:"Inventory commands"}});import{buildRouteMap as it}from"@stricli/core";import{buildCommand as ot}from"@stricli/core";import{ScopeName as st}from"@transcend-io/privacy-types";var B=ot({loader:async()=>{let{syncOt:e}=await import("./impl-FWV53PHN.js");return e},parameters:{flags:{hostname:{kind:"parsed",parse:String,brief:"The domain of the OneTrust environment from which to pull the resource",optional:!0},oneTrustAuth:{kind:"parsed",parse:String,brief:"The OAuth access token with the scopes necessary to access the OneTrust Public APIs",optional:!0},source:{kind:"enum",values:Object.values(f),brief:"Whether to read the assessments from OneTrust or from a file",default:"oneTrust"},transcendAuth:{...t({scopes:[st.ManageAssessments]}),optional:!0},transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the file to pull the resource into. Must be a json file!",optional:!0},resource:{kind:"enum",values:Object.values(m),brief:"The resource to pull from OneTrust. For now, only assessments is supported",default:"assessments"},dryRun:{kind:"boolean",brief:"Whether to export the resource to a file rather than sync to Transcend",default:!1},debug:{kind:"boolean",brief:"Whether to print detailed logs in case of error",default:!1}}},docs:{brief:"Sync OneTrust data",fullDescription:`Pulls resources from a OneTrust and syncs them to a Transcend instance. For now, it only supports retrieving OneTrust Assessments.
45
+ Step 5) Run \`${i} inventory push --auth=$TRANSCEND_API_KEY --file=./transcend.yml --classifyService=true\``}});import{buildCommand as rt}from"@stricli/core";var E=rt({loader:async()=>{let{consentManagersToBusinessEntities:e}=await import("./impl-46IFTUCW.js");return e},parameters:{flags:{consentManagerYmlFolder:{kind:"parsed",parse:String,brief:"Path to the folder of Consent Manager transcend.yml files to combine"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml with business entity configuration",default:"./combined-business-entities.yml"}}},docs:{brief:"Convert consent managers to business entities",fullDescription:"This command allows for converting a folder or Consent Manager transcend.yml files into a single transcend.yml file where each consent manager configuration is a Business Entity in the data inventory."}});var F=at({routes:{pull:k,push:O,"scan-packages":N,"discover-silos":V,"pull-datapoints":M,"pull-unstructured-discovery-files":x,"derive-data-silos-from-data-flows":U,"derive-data-silos-from-data-flows-cross-instance":I,"consent-manager-service-json-to-yml":j,"consent-managers-to-business-entities":E},docs:{brief:"Inventory commands"}});import{buildRouteMap as it}from"@stricli/core";import{buildCommand as ot}from"@stricli/core";import{ScopeName as st}from"@transcend-io/privacy-types";var B=ot({loader:async()=>{let{syncOt:e}=await import("./impl-NVBTQCSL.js");return e},parameters:{flags:{hostname:{kind:"parsed",parse:String,brief:"The domain of the OneTrust environment from which to pull the resource",optional:!0},oneTrustAuth:{kind:"parsed",parse:String,brief:"The OAuth access token with the scopes necessary to access the OneTrust Public APIs",optional:!0},source:{kind:"enum",values:Object.values(f),brief:"Whether to read the assessments from OneTrust or from a file",default:"oneTrust"},transcendAuth:{...t({scopes:[st.ManageAssessments]}),optional:!0},transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the file to pull the resource into. Must be a json file!",optional:!0},resource:{kind:"enum",values:Object.values(m),brief:"The resource to pull from OneTrust. For now, only assessments is supported",default:"assessments"},dryRun:{kind:"boolean",brief:"Whether to export the resource to a file rather than sync to Transcend",default:!1},debug:{kind:"boolean",brief:"Whether to print detailed logs in case of error",default:!1}}},docs:{brief:"Sync OneTrust data",fullDescription:`Pulls resources from a OneTrust and syncs them to a Transcend instance. For now, it only supports retrieving OneTrust Assessments.
46
46
 
47
47
  This command can be helpful if you are looking to:
48
48
  - Pull resources from your OneTrust account.
49
49
  - Migrate your resources from your OneTrust account to Transcend.
50
50
 
51
51
  OneTrust authentication requires an OAuth Token with scope for accessing the assessment endpoints.
52
- If syncing the resources to Transcend, you will also need to generate an API key on the Transcend Admin Dashboard.`}});var W=it({routes:{"sync-ot":B},docs:{brief:"Migration commands"}});import{buildRouteMap as lr}from"@stricli/core";import{buildCommand as nt,numberParser as dt}from"@stricli/core";import{RequestAction as lt,RequestOrigin as ut,ScopeName as l}from"@transcend-io/privacy-types";var Y=nt({loader:async()=>{let{approve:e}=await import("./impl-H4UVNREH.js");return e},parameters:{flags:{auth:t({scopes:[l.RequestApproval,l.ViewRequests,l.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(lt),variadic:",",brief:"The request actions to approve"},origins:{kind:"enum",values:Object.values(ut),variadic:",",brief:"The request origins to approve",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Any requests made before this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Approve requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Approve requests that were submitted after this time",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:dt,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk approve a set of privacy requests",fullDescription:"Bulk approve a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});import{buildCommand as ct,numberParser as pt}from"@stricli/core";import{RequestAction as mt,RequestStatus as ft,ScopeName as _}from"@transcend-io/privacy-types";var L=ct({loader:async()=>{let{cancel:e}=await import("./impl-CWRYQS7O.js");return e},parameters:{flags:{auth:t({scopes:[_.ViewRequests,_.RequestApproval]}),actions:{kind:"enum",values:Object.values(mt),variadic:",",brief:"The request actions to cancel"},statuses:{kind:"enum",values:Object.values(ft),variadic:",",brief:"The request statuses to cancel. Comma-separated list.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to cancel",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Any requests made before this date should be marked as silent mode for canceling to skip email sending",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Cancel requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Cancel requests that were submitted after this time",optional:!0},cancellationTitle:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests upon cancelation",default:"Request Canceled"},transcendUrl:r(),concurrency:{kind:"parsed",parse:pt,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk cancel a set of privacy requests",fullDescription:"Bulk cancel a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});import{buildRouteMap as kt}from"@stricli/core";import{buildCommand as ht}from"@stricli/core";var G=ht({loader:async()=>{let{markIdentifiersCompleted:e}=await import("./impl-ABUUSFBL.js");return e},parameters:{flags:{auth:t({scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:r(),sombraAuth:o()}},docs:{brief:"Mark identifiers as completed after processing.",fullDescription:`This command takes the output of tr-cron-pull-identifiers and notifies Transcend that all of the requests in the CSV have been processed.
52
+ If syncing the resources to Transcend, you will also need to generate an API key on the Transcend Admin Dashboard.`}});var W=it({routes:{"sync-ot":B},docs:{brief:"Migration commands"}});import{buildRouteMap as lr}from"@stricli/core";import{buildCommand as nt,numberParser as dt}from"@stricli/core";import{RequestAction as lt,RequestOrigin as ut,ScopeName as l}from"@transcend-io/privacy-types";var Y=nt({loader:async()=>{let{approve:e}=await import("./impl-6J4LHKU5.js");return e},parameters:{flags:{auth:t({scopes:[l.RequestApproval,l.ViewRequests,l.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(lt),variadic:",",brief:"The request actions to approve"},origins:{kind:"enum",values:Object.values(ut),variadic:",",brief:"The request origins to approve",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Any requests made before this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Approve requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Approve requests that were submitted after this time",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:dt,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk approve a set of privacy requests",fullDescription:"Bulk approve a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});import{buildCommand as ct,numberParser as pt}from"@stricli/core";import{RequestAction as mt,RequestStatus as ft,ScopeName as _}from"@transcend-io/privacy-types";var L=ct({loader:async()=>{let{cancel:e}=await import("./impl-KQ2R65SG.js");return e},parameters:{flags:{auth:t({scopes:[_.ViewRequests,_.RequestApproval]}),actions:{kind:"enum",values:Object.values(mt),variadic:",",brief:"The request actions to cancel"},statuses:{kind:"enum",values:Object.values(ft),variadic:",",brief:"The request statuses to cancel. Comma-separated list.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to cancel",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Any requests made before this date should be marked as silent mode for canceling to skip email sending",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Cancel requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Cancel requests that were submitted after this time",optional:!0},cancellationTitle:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests upon cancelation",default:"Request Canceled"},transcendUrl:r(),concurrency:{kind:"parsed",parse:pt,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk cancel a set of privacy requests",fullDescription:"Bulk cancel a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});import{buildRouteMap as kt}from"@stricli/core";import{buildCommand as ht}from"@stricli/core";var G=ht({loader:async()=>{let{markIdentifiersCompleted:e}=await import("./impl-QR3ARAMQ.js");return e},parameters:{flags:{auth:t({scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:r(),sombraAuth:o()}},docs:{brief:"Mark identifiers as completed after processing.",fullDescription:`This command takes the output of tr-cron-pull-identifiers and notifies Transcend that all of the requests in the CSV have been processed.
53
53
  This is used in the workflow like:
54
54
 
55
55
  1. Pull identifiers to CSV:
@@ -58,14 +58,14 @@ This is used in the workflow like:
58
58
  3. Notify Transcend of completion
59
59
  ${i} request cron mark-identifiers-completed --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --file=./outstanding-requests.csv
60
60
 
61
- Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});import{buildCommand as bt,numberParser as K}from"@stricli/core";import{RequestAction as gt}from"@transcend-io/privacy-types";var J=bt({loader:async()=>{let{pullIdentifiers:e}=await import("./impl-GJK6YEB5.js");return e},parameters:{flags:{auth:t({scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(gt),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:r(),sombraAuth:o(),pageLimit:{kind:"parsed",parse:K,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:K,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"10000"}}},docs:{brief:"Pull identifiers of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding identifiers for the data silo to a CSV.
61
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});import{buildCommand as bt,numberParser as K}from"@stricli/core";import{RequestAction as gt}from"@transcend-io/privacy-types";var J=bt({loader:async()=>{let{pullIdentifiers:e}=await import("./impl-YT7F6KTN.js");return e},parameters:{flags:{auth:t({scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(gt),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:r(),sombraAuth:o(),pageLimit:{kind:"parsed",parse:K,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:K,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"10000"}}},docs:{brief:"Pull identifiers of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding identifiers for the data silo to a CSV.
62
62
 
63
63
  For large datasets, the output will be automatically split into multiple CSV files to avoid file system size limits. Use the --chunkSize parameter to control the maximum number of rows per file.
64
64
 
65
- Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var $=kt({routes:{"pull-identifiers":J,"mark-identifiers-completed":G},docs:{brief:"Cron commands"}});import{buildCommand as yt,numberParser as St}from"@stricli/core";import{RequestStatus as wt,ScopeName as u}from"@transcend-io/privacy-types";var z=yt({loader:async()=>{let{downloadFiles:e}=await import("./impl-JA6H6ALC.js");return e},parameters:{flags:{auth:t({scopes:[u.ViewRequestCompilation,u.ViewRequests,u.RequestApproval]}),sombraAuth:o(),concurrency:{kind:"parsed",parse:St,brief:"The concurrency to use when downloading requests in parallel",default:"10"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to download",optional:!0},statuses:{kind:"enum",values:Object.values(wt),variadic:",",brief:"The request statuses to download. Comma-separated list. Defaults to APPROVING,DOWNLOADABLE.",optional:!0},folderPath:{kind:"parsed",parse:String,brief:"The folder to download files to",default:"./dsr-files"},createdAtBefore:{kind:"parsed",parse:a,brief:"Download requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Download requests that were submitted after this time",optional:!0},approveAfterDownload:{kind:"boolean",brief:"If the request is in status=APPROVING, approve the request after its downloaded",default:!1},transcendUrl:r()}},docs:{brief:"Download the files associated with a Data Subject Access Request (DSAR)",fullDescription:"Download the files associated with a Data Subject Access Request (DSAR) from DSR Automation -> Incoming Requests tab."}});import{buildCommand as vt,numberParser as Ct}from"@stricli/core";import{RequestAction as Tt,RequestEnricherStatus as qt,ScopeName as Pt}from"@transcend-io/privacy-types";var X=vt({loader:async()=>{let{enricherRestart:e}=await import("./impl-F3HANU3F.js");return e},parameters:{flags:{auth:t({scopes:[Pt.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:String,brief:"The ID of the enricher to restart"},actions:{kind:"enum",values:Object.values(Tt),variadic:",",brief:"The request action to restart",optional:!0},requestEnricherStatuses:{kind:"enum",values:Object.values(qt),variadic:",",brief:"The request enricher statuses to restart",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:Ct,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Restart requests that were submitted after this time",optional:!0}}},docs:{brief:"Bulk restart a particular enricher across a series of DSRs",fullDescription:`Bulk restart a particular enricher across a series of DSRs.
65
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var $=kt({routes:{"pull-identifiers":J,"mark-identifiers-completed":G},docs:{brief:"Cron commands"}});import{buildCommand as yt,numberParser as St}from"@stricli/core";import{RequestStatus as wt,ScopeName as u}from"@transcend-io/privacy-types";var z=yt({loader:async()=>{let{downloadFiles:e}=await import("./impl-YJ2FK37I.js");return e},parameters:{flags:{auth:t({scopes:[u.ViewRequestCompilation,u.ViewRequests,u.RequestApproval]}),sombraAuth:o(),concurrency:{kind:"parsed",parse:St,brief:"The concurrency to use when downloading requests in parallel",default:"10"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to download",optional:!0},statuses:{kind:"enum",values:Object.values(wt),variadic:",",brief:"The request statuses to download. Comma-separated list. Defaults to APPROVING,DOWNLOADABLE.",optional:!0},folderPath:{kind:"parsed",parse:String,brief:"The folder to download files to",default:"./dsr-files"},createdAtBefore:{kind:"parsed",parse:a,brief:"Download requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Download requests that were submitted after this time",optional:!0},approveAfterDownload:{kind:"boolean",brief:"If the request is in status=APPROVING, approve the request after its downloaded",default:!1},transcendUrl:r()}},docs:{brief:"Download the files associated with a Data Subject Access Request (DSAR)",fullDescription:"Download the files associated with a Data Subject Access Request (DSAR) from DSR Automation -> Incoming Requests tab."}});import{buildCommand as vt,numberParser as Ct}from"@stricli/core";import{RequestAction as Tt,RequestEnricherStatus as qt,ScopeName as Pt}from"@transcend-io/privacy-types";var X=vt({loader:async()=>{let{enricherRestart:e}=await import("./impl-URMADXQA.js");return e},parameters:{flags:{auth:t({scopes:[Pt.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:String,brief:"The ID of the enricher to restart"},actions:{kind:"enum",values:Object.values(Tt),variadic:",",brief:"The request action to restart",optional:!0},requestEnricherStatuses:{kind:"enum",values:Object.values(qt),variadic:",",brief:"The request enricher statuses to restart",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:Ct,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Restart requests that were submitted after this time",optional:!0}}},docs:{brief:"Bulk restart a particular enricher across a series of DSRs",fullDescription:`Bulk restart a particular enricher across a series of DSRs.
66
66
 
67
67
  The API key needs the following scopes:
68
- - Manage Request Compilation`}});import{buildCommand as At,numberParser as H}from"@stricli/core";import{RequestAction as Dt,RequestStatus as Rt,ScopeName as Q}from"@transcend-io/privacy-types";var Z=At({loader:async()=>{let{_export:e}=await import("./impl-XS4TFODP.js");return e},parameters:{flags:{auth:t({scopes:[Q.ViewRequests,Q.ViewRequestCompilation]}),sombraAuth:o(),actions:{kind:"enum",values:Object.values(Dt),variadic:",",brief:"The request actions to export",optional:!0},statuses:{kind:"enum",values:Object.values(Rt),variadic:",",brief:"The request statuses to export",optional:!0},transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./transcend-request-export.csv"},concurrency:{kind:"parsed",parse:H,brief:"The concurrency to use when uploading requests in parallel",default:"100"},createdAtBefore:{kind:"parsed",parse:a,brief:"Pull requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Pull requests that were submitted after this time",optional:!0},showTests:{kind:"boolean",brief:"Filter for test requests or production requests - when not provided, pulls both",optional:!0},pageLimit:{kind:"parsed",parse:H,brief:"The page limit to use when pulling in pages of requests",default:"100"}}},docs:{brief:"Export privacy requests and request identifiers to a CSV file",fullDescription:"Export privacy requests and request identifiers to a CSV file."}});import{buildCommand as It,numberParser as Ut}from"@stricli/core";import{RequestAction as Vt,RequestStatus as Mt,ScopeName as xt}from"@transcend-io/privacy-types";var ee=It({loader:async()=>{let{markSilent:e}=await import("./impl-T22SYITP.js");return e},parameters:{flags:{auth:t({scopes:[xt.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(Vt),variadic:",",brief:"The request actions to mark silent"},statuses:{kind:"enum",values:Object.values(Mt),variadic:",",brief:"The request statuses to mark silent. Comma-separated list. Defaults to REQUEST_MADE,WAITING,ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to mark silent",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Mark silent requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Mark silent requests that were submitted after this time",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:Ut,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk update a set of privacy requests to be in silent mode",fullDescription:"Bulk update a set of privacy requests from the DSR Automation -> Incoming Requests tab to be in silent mode."}});import{buildCommand as Ot,numberParser as c}from"@stricli/core";import{RequestAction as Nt,ScopeName as te}from"@transcend-io/privacy-types";var re=Ot({loader:async()=>{let{notifyAdditionalTime:e}=await import("./impl-6XFLK23G.js");return e},parameters:{flags:{auth:t({scopes:[te.ViewRequests,te.RequestApproval]}),createdAtBefore:{kind:"parsed",parse:a,brief:"Notify requests that are open but submitted before this time"},createdAtAfter:{kind:"parsed",parse:a,brief:"Notify requests that are open but submitted after this time",optional:!0},actions:{kind:"enum",values:Object.values(Nt),variadic:",",brief:"The request actions to notify",optional:!0},daysLeft:{kind:"parsed",parse:c,brief:"Only notify requests that have less than this number of days until they are considered expired",default:"10"},days:{kind:"parsed",parse:c,brief:"The number of days to adjust the expiration of the request to",default:"45"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to notify",optional:!0},emailTemplate:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests",default:"Additional Time Needed"},transcendUrl:r(),concurrency:{kind:"parsed",parse:c,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk notify a set of privacy requests that more time is needed",fullDescription:"Bulk notify a set of privacy requests from the DSR Automation -> Incoming Requests tab that more time is needed to complete the request. Note any request in silent mode will not be emailed."}});import{buildRouteMap as Yt}from"@stricli/core";import{buildCommand as jt,numberParser as Et}from"@stricli/core";import{RequestAction as Ft,ScopeName as ae}from"@transcend-io/privacy-types";var oe=jt({loader:async()=>{let{pullIdentifiers:e}=await import("./impl-FJRPV5PJ.js");return e},parameters:{flags:{auth:t({scopes:[ae.ViewRequests,ae.ViewRequestCompilation]}),sombraAuth:o(),transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},actions:{kind:"enum",values:Object.values(Ft),variadic:",",brief:"The request actions to pull for",optional:!0},concurrency:{kind:"parsed",parse:Et,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Pull identifiers for manual enrichment",fullDescription:`This command pulls down the set of privacy requests that are currently pending manual enrichment.
68
+ - Manage Request Compilation`}});import{buildCommand as At,numberParser as H}from"@stricli/core";import{RequestAction as Dt,RequestStatus as Rt,ScopeName as Q}from"@transcend-io/privacy-types";var Z=At({loader:async()=>{let{_export:e}=await import("./impl-52S3Z4ZE.js");return e},parameters:{flags:{auth:t({scopes:[Q.ViewRequests,Q.ViewRequestCompilation]}),sombraAuth:o(),actions:{kind:"enum",values:Object.values(Dt),variadic:",",brief:"The request actions to export",optional:!0},statuses:{kind:"enum",values:Object.values(Rt),variadic:",",brief:"The request statuses to export",optional:!0},transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./transcend-request-export.csv"},concurrency:{kind:"parsed",parse:H,brief:"The concurrency to use when uploading requests in parallel",default:"100"},createdAtBefore:{kind:"parsed",parse:a,brief:"Pull requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Pull requests that were submitted after this time",optional:!0},showTests:{kind:"boolean",brief:"Filter for test requests or production requests - when not provided, pulls both",optional:!0},pageLimit:{kind:"parsed",parse:H,brief:"The page limit to use when pulling in pages of requests",default:"100"}}},docs:{brief:"Export privacy requests and request identifiers to a CSV file",fullDescription:"Export privacy requests and request identifiers to a CSV file."}});import{buildCommand as It,numberParser as Ut}from"@stricli/core";import{RequestAction as Vt,RequestStatus as Mt,ScopeName as xt}from"@transcend-io/privacy-types";var ee=It({loader:async()=>{let{markSilent:e}=await import("./impl-22YTZZ5H.js");return e},parameters:{flags:{auth:t({scopes:[xt.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(Vt),variadic:",",brief:"The request actions to mark silent"},statuses:{kind:"enum",values:Object.values(Mt),variadic:",",brief:"The request statuses to mark silent. Comma-separated list. Defaults to REQUEST_MADE,WAITING,ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to mark silent",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Mark silent requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Mark silent requests that were submitted after this time",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:Ut,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk update a set of privacy requests to be in silent mode",fullDescription:"Bulk update a set of privacy requests from the DSR Automation -> Incoming Requests tab to be in silent mode."}});import{buildCommand as Ot,numberParser as c}from"@stricli/core";import{RequestAction as Nt,ScopeName as te}from"@transcend-io/privacy-types";var re=Ot({loader:async()=>{let{notifyAdditionalTime:e}=await import("./impl-GSXYV2XR.js");return e},parameters:{flags:{auth:t({scopes:[te.ViewRequests,te.RequestApproval]}),createdAtBefore:{kind:"parsed",parse:a,brief:"Notify requests that are open but submitted before this time"},createdAtAfter:{kind:"parsed",parse:a,brief:"Notify requests that are open but submitted after this time",optional:!0},actions:{kind:"enum",values:Object.values(Nt),variadic:",",brief:"The request actions to notify",optional:!0},daysLeft:{kind:"parsed",parse:c,brief:"Only notify requests that have less than this number of days until they are considered expired",default:"10"},days:{kind:"parsed",parse:c,brief:"The number of days to adjust the expiration of the request to",default:"45"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to notify",optional:!0},emailTemplate:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests",default:"Additional Time Needed"},transcendUrl:r(),concurrency:{kind:"parsed",parse:c,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk notify a set of privacy requests that more time is needed",fullDescription:"Bulk notify a set of privacy requests from the DSR Automation -> Incoming Requests tab that more time is needed to complete the request. Note any request in silent mode will not be emailed."}});import{buildRouteMap as Yt}from"@stricli/core";import{buildCommand as jt,numberParser as Et}from"@stricli/core";import{RequestAction as Ft,ScopeName as ae}from"@transcend-io/privacy-types";var oe=jt({loader:async()=>{let{pullIdentifiers:e}=await import("./impl-4WQTM3GN.js");return e},parameters:{flags:{auth:t({scopes:[ae.ViewRequests,ae.ViewRequestCompilation]}),sombraAuth:o(),transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},actions:{kind:"enum",values:Object.values(Ft),variadic:",",brief:"The request actions to pull for",optional:!0},concurrency:{kind:"parsed",parse:Et,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Pull identifiers for manual enrichment",fullDescription:`This command pulls down the set of privacy requests that are currently pending manual enrichment.
69
69
 
70
70
  This is useful for the following workflow:
71
71
 
@@ -73,7 +73,7 @@ This is useful for the following workflow:
73
73
  ${i} request preflight pull-identifiers --file=./enrichment-requests.csv
74
74
  2. Fill out the CSV with additional identifiers
75
75
  3. Push updated back to Transcend
76
- ${i} request preflight push-identifiers --file=./enrichment-requests.csv`}});import{buildCommand as Bt,numberParser as Wt}from"@stricli/core";import{ScopeName as se}from"@transcend-io/privacy-types";var ie=Bt({loader:async()=>{let{pushIdentifiers:e}=await import("./impl-4HVU2DPL.js");return e},parameters:{flags:{auth:t({scopes:[se.ManageRequestIdentities,se.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:s,brief:"The ID of the Request Enricher to upload to"},sombraAuth:o(),transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},markSilent:{kind:"boolean",brief:"When true, set requests into silent mode before enriching",default:!1},concurrency:{kind:"parsed",parse:Wt,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Push identifiers for manual enrichment",fullDescription:`This command push up a set of identifiers for a set of requests pending manual enrichment.
76
+ ${i} request preflight push-identifiers --file=./enrichment-requests.csv`}});import{buildCommand as Bt,numberParser as Wt}from"@stricli/core";import{ScopeName as se}from"@transcend-io/privacy-types";var ie=Bt({loader:async()=>{let{pushIdentifiers:e}=await import("./impl-CLLZCY76.js");return e},parameters:{flags:{auth:t({scopes:[se.ManageRequestIdentities,se.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:s,brief:"The ID of the Request Enricher to upload to"},sombraAuth:o(),transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},markSilent:{kind:"boolean",brief:"When true, set requests into silent mode before enriching",default:!1},concurrency:{kind:"parsed",parse:Wt,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Push identifiers for manual enrichment",fullDescription:`This command push up a set of identifiers for a set of requests pending manual enrichment.
77
77
 
78
78
  This is useful for the following workflow:
79
79
 
@@ -81,8 +81,8 @@ This is useful for the following workflow:
81
81
  ${i} request preflight pull-identifiers --file=./enrichment-requests.csv
82
82
  2. Fill out the CSV with additional identifiers
83
83
  3. Push updated back to Transcend
84
- ${i} request preflight push-identifiers --file=./enrichment-requests.csv`}});var ne=Yt({routes:{"pull-identifiers":oe,"push-identifiers":ie},docs:{brief:"Preflight commands"}});import{buildCommand as _t}from"@stricli/core";import{RequestAction as Lt,ScopeName as Gt}from"@transcend-io/privacy-types";var de=_t({loader:async()=>{let{rejectUnverifiedIdentifiers:e}=await import("./impl-SWXA6ZBI.js");return e},parameters:{flags:{auth:t({scopes:[Gt.ManageRequestCompilation]}),identifierNames:{kind:"parsed",parse:String,variadic:",",brief:"The names of identifiers to clear out"},actions:{kind:"enum",values:Object.values(Lt),variadic:",",brief:"The request action to restart",optional:!0},transcendUrl:r()}},docs:{brief:"Bulk clear out any request identifiers that are unverified",fullDescription:"Bulk clear out any request identifiers that are unverified."}});import{buildCommand as Kt,numberParser as Jt}from"@stricli/core";import{RequestAction as $t,RequestStatus as zt,ScopeName as le}from"@transcend-io/privacy-types";var ue=Kt({loader:async()=>{let{restart:e}=await import("./impl-SRQ3L7UZ.js");return e},parameters:{flags:{auth:t({scopes:[le.MakeDataSubjectRequest,le.ViewRequestCompilation]}),actions:{kind:"enum",values:Object.values($t),variadic:",",brief:"The request actions to restart"},statuses:{kind:"enum",values:Object.values(zt),variadic:",",brief:"The request statuses to restart"},transcendUrl:r(),requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:o(),concurrency:{kind:"parsed",parse:Jt,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},emailIsVerified:{kind:"boolean",brief:"Indicate whether the primary email address is verified. Set to false to send a verification email",default:!0},createdAt:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before a specific date",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Requests older than this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Restart requests that were submitted after this time",optional:!0},sendEmailReceipt:{kind:"boolean",brief:"Send email receipts to the restarted requests",default:!1},copyIdentifiers:{kind:"boolean",brief:"Copy over all enriched identifiers from the initial request",default:!1},skipWaitingPeriod:{kind:"boolean",brief:"Skip queued state of request and go straight to compiling",default:!1}}},docs:{brief:"Bulk update a set of privacy requests based on a set of request filters",fullDescription:"Bulk update a set of privacy requests based on a set of request filters."}});import{buildCommand as Xt}from"@stricli/core";import{ScopeName as Ht}from"@transcend-io/privacy-types";var ce=Xt({loader:async()=>{let{skipPreflightJobs:e}=await import("./impl-XDCAAD6P.js");return e},parameters:{flags:{auth:t({scopes:[Ht.ManageRequestCompilation]}),enricherIds:{kind:"parsed",parse:String,variadic:",",brief:"The ID of the enrichers to skip privacy request jobs for"},transcendUrl:r()}},docs:{brief:"Skip preflight jobs",fullDescription:"This command allows for bulk skipping preflight checks."}});import{buildRouteMap as ir}from"@stricli/core";import{buildCommand as Qt}from"@stricli/core";import{ScopeName as Zt}from"@transcend-io/privacy-types";var pe=Qt({loader:async()=>{let{markRequestDataSilosCompleted:e}=await import("./impl-ERKTUJJM.js");return e},parameters:{flags:{auth:t({scopes:[Zt.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:'Path to the CSV file where identifiers will be written to. The CSV is expected to have 1 column named "Request Id".',default:"./request-identifiers.csv"},transcendUrl:r()}},docs:{brief:"Mark request data silos as completed",fullDescription:`This command takes in a CSV of Request IDs as well as a Data Silo ID and marks all associated privacy request jobs as completed.
85
- This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".`}});import{buildCommand as er}from"@stricli/core";import{RequestAction as tr,ScopeName as rr}from"@transcend-io/privacy-types";var me=er({loader:async()=>{let{retryRequestDataSilos:e}=await import("./impl-UCJD5FZ6.js");return e},parameters:{flags:{auth:t({scopes:[rr.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(tr),variadic:",",brief:"The request actions to restart"},transcendUrl:r()}},docs:{brief:"Retry request data silos",fullDescription:'This command allows for bulk restarting a set of data silos jobs for open privacy requests. This is equivalent to clicking the "Wipe and Retry" button for a particular data silo across a set of privacy requests.'}});import{buildCommand as ar}from"@stricli/core";import{RequestStatus as or,ScopeName as sr}from"@transcend-io/privacy-types";var fe=ar({loader:async()=>{let{skipRequestDataSilos:e}=await import("./impl-FWVAOA62.js");return e},parameters:{flags:{auth:t({scopes:[sr.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to skip privacy request jobs for"},transcendUrl:r(),statuses:{kind:"enum",values:Object.values(or),variadic:",",brief:"The request statuses to skip"},status:{kind:"enum",values:["SKIPPED","RESOLVED"],brief:"The status to set the request data silo job to",default:"SKIPPED"}}},docs:{brief:"Skip request data silos",fullDescription:"This command allows for bulk skipping all open privacy request jobs for a particular data silo. This command is useful if you want to disable a data silo and then clear out any active privacy requests that are still queued up for that data silo."}});var he=ir({routes:{"mark-request-data-silos-completed":pe,"retry-request-data-silos":me,"skip-request-data-silos":fe},docs:{brief:"System commands"}});import{buildCommand as nr,numberParser as dr}from"@stricli/core";import{ScopeName as p}from"@transcend-io/privacy-types";var be=nr({loader:async()=>{let{upload:e}=await import("./impl-M6PFOSZI.js");return e},parameters:{flags:{auth:t({scopes:[p.MakeDataSubjectRequest,p.ViewRequestIdentitySettings,p.ViewGlobalAttributes]}),file:{kind:"parsed",parse:String,brief:"Path to the CSV file of requests to upload",default:"./requests.csv"},transcendUrl:r(),cacheFilepath:{kind:"parsed",parse:String,brief:"The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API",default:"./transcend-privacy-requests-cache.json"},requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:o(),concurrency:{kind:"parsed",parse:dr,brief:"The concurrency to use when uploading requests in parallel",default:"50"},attributes:{kind:"parsed",parse:String,brief:"Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4",default:"Tags:transcend-cli"},isTest:{kind:"boolean",brief:"Flag whether the requests being uploaded are test requests or regular requests",default:!1},isSilent:{kind:"boolean",brief:"Flag whether the requests being uploaded should be submitted in silent mode",default:!0},skipSendingReceipt:{kind:"boolean",brief:"Flag whether to skip sending of the receipt email",default:!1},emailIsVerified:{kind:"boolean",brief:"Indicate whether the email address being uploaded is pre-verified. Set to false to send a verification email",default:!0},skipFilterStep:{kind:"boolean",brief:"When true, skip the interactive step to filter down the CSV",default:!1},dryRun:{kind:"boolean",brief:"When true, perform a dry run of the upload instead of calling the API to submit the requests",default:!1},debug:{kind:"boolean",brief:"Debug logging",default:!1},defaultPhoneCountryCode:{kind:"parsed",parse:String,brief:"When uploading phone numbers, if the phone number is missing a country code, assume this country code",default:"1"}}},docs:{brief:"Upload a set of requests from a CSV",fullDescription:`Upload a set of requests from a CSV.
84
+ ${i} request preflight push-identifiers --file=./enrichment-requests.csv`}});var ne=Yt({routes:{"pull-identifiers":oe,"push-identifiers":ie},docs:{brief:"Preflight commands"}});import{buildCommand as _t}from"@stricli/core";import{RequestAction as Lt,ScopeName as Gt}from"@transcend-io/privacy-types";var de=_t({loader:async()=>{let{rejectUnverifiedIdentifiers:e}=await import("./impl-UV5ERXN5.js");return e},parameters:{flags:{auth:t({scopes:[Gt.ManageRequestCompilation]}),identifierNames:{kind:"parsed",parse:String,variadic:",",brief:"The names of identifiers to clear out"},actions:{kind:"enum",values:Object.values(Lt),variadic:",",brief:"The request action to restart",optional:!0},transcendUrl:r()}},docs:{brief:"Bulk clear out any request identifiers that are unverified",fullDescription:"Bulk clear out any request identifiers that are unverified."}});import{buildCommand as Kt,numberParser as Jt}from"@stricli/core";import{RequestAction as $t,RequestStatus as zt,ScopeName as le}from"@transcend-io/privacy-types";var ue=Kt({loader:async()=>{let{restart:e}=await import("./impl-QYJFDBIV.js");return e},parameters:{flags:{auth:t({scopes:[le.MakeDataSubjectRequest,le.ViewRequestCompilation]}),actions:{kind:"enum",values:Object.values($t),variadic:",",brief:"The request actions to restart"},statuses:{kind:"enum",values:Object.values(zt),variadic:",",brief:"The request statuses to restart"},transcendUrl:r(),requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:o(),concurrency:{kind:"parsed",parse:Jt,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},emailIsVerified:{kind:"boolean",brief:"Indicate whether the primary email address is verified. Set to false to send a verification email",default:!0},createdAt:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before a specific date",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Requests older than this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Restart requests that were submitted after this time",optional:!0},sendEmailReceipt:{kind:"boolean",brief:"Send email receipts to the restarted requests",default:!1},copyIdentifiers:{kind:"boolean",brief:"Copy over all enriched identifiers from the initial request",default:!1},skipWaitingPeriod:{kind:"boolean",brief:"Skip queued state of request and go straight to compiling",default:!1}}},docs:{brief:"Bulk update a set of privacy requests based on a set of request filters",fullDescription:"Bulk update a set of privacy requests based on a set of request filters."}});import{buildCommand as Xt}from"@stricli/core";import{ScopeName as Ht}from"@transcend-io/privacy-types";var ce=Xt({loader:async()=>{let{skipPreflightJobs:e}=await import("./impl-YBSUR2MT.js");return e},parameters:{flags:{auth:t({scopes:[Ht.ManageRequestCompilation]}),enricherIds:{kind:"parsed",parse:String,variadic:",",brief:"The ID of the enrichers to skip privacy request jobs for"},transcendUrl:r()}},docs:{brief:"Skip preflight jobs",fullDescription:"This command allows for bulk skipping preflight checks."}});import{buildRouteMap as ir}from"@stricli/core";import{buildCommand as Qt}from"@stricli/core";import{ScopeName as Zt}from"@transcend-io/privacy-types";var pe=Qt({loader:async()=>{let{markRequestDataSilosCompleted:e}=await import("./impl-MFDS7DPF.js");return e},parameters:{flags:{auth:t({scopes:[Zt.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:'Path to the CSV file where identifiers will be written to. The CSV is expected to have 1 column named "Request Id".',default:"./request-identifiers.csv"},transcendUrl:r()}},docs:{brief:"Mark request data silos as completed",fullDescription:`This command takes in a CSV of Request IDs as well as a Data Silo ID and marks all associated privacy request jobs as completed.
85
+ This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".`}});import{buildCommand as er}from"@stricli/core";import{RequestAction as tr,ScopeName as rr}from"@transcend-io/privacy-types";var me=er({loader:async()=>{let{retryRequestDataSilos:e}=await import("./impl-ZEEUCWKF.js");return e},parameters:{flags:{auth:t({scopes:[rr.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(tr),variadic:",",brief:"The request actions to restart"},transcendUrl:r()}},docs:{brief:"Retry request data silos",fullDescription:'This command allows for bulk restarting a set of data silos jobs for open privacy requests. This is equivalent to clicking the "Wipe and Retry" button for a particular data silo across a set of privacy requests.'}});import{buildCommand as ar}from"@stricli/core";import{RequestStatus as or,ScopeName as sr}from"@transcend-io/privacy-types";var fe=ar({loader:async()=>{let{skipRequestDataSilos:e}=await import("./impl-TLUPGHWG.js");return e},parameters:{flags:{auth:t({scopes:[sr.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:s,brief:"The ID of the data silo to skip privacy request jobs for"},transcendUrl:r(),statuses:{kind:"enum",values:Object.values(or),variadic:",",brief:"The request statuses to skip"},status:{kind:"enum",values:["SKIPPED","RESOLVED"],brief:"The status to set the request data silo job to",default:"SKIPPED"}}},docs:{brief:"Skip request data silos",fullDescription:"This command allows for bulk skipping all open privacy request jobs for a particular data silo. This command is useful if you want to disable a data silo and then clear out any active privacy requests that are still queued up for that data silo."}});var he=ir({routes:{"mark-request-data-silos-completed":pe,"retry-request-data-silos":me,"skip-request-data-silos":fe},docs:{brief:"System commands"}});import{buildCommand as nr,numberParser as dr}from"@stricli/core";import{ScopeName as p}from"@transcend-io/privacy-types";var be=nr({loader:async()=>{let{upload:e}=await import("./impl-UYCGE2TQ.js");return e},parameters:{flags:{auth:t({scopes:[p.MakeDataSubjectRequest,p.ViewRequestIdentitySettings,p.ViewGlobalAttributes]}),file:{kind:"parsed",parse:String,brief:"Path to the CSV file of requests to upload",default:"./requests.csv"},transcendUrl:r(),cacheFilepath:{kind:"parsed",parse:String,brief:"The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API",default:"./transcend-privacy-requests-cache.json"},requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:o(),concurrency:{kind:"parsed",parse:dr,brief:"The concurrency to use when uploading requests in parallel",default:"50"},attributes:{kind:"parsed",parse:String,brief:"Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4",default:"Tags:transcend-cli"},isTest:{kind:"boolean",brief:"Flag whether the requests being uploaded are test requests or regular requests",default:!1},isSilent:{kind:"boolean",brief:"Flag whether the requests being uploaded should be submitted in silent mode",default:!0},skipSendingReceipt:{kind:"boolean",brief:"Flag whether to skip sending of the receipt email",default:!1},emailIsVerified:{kind:"boolean",brief:"Indicate whether the email address being uploaded is pre-verified. Set to false to send a verification email",default:!0},skipFilterStep:{kind:"boolean",brief:"When true, skip the interactive step to filter down the CSV",default:!1},dryRun:{kind:"boolean",brief:"When true, perform a dry run of the upload instead of calling the API to submit the requests",default:!1},debug:{kind:"boolean",brief:"Debug logging",default:!1},defaultPhoneCountryCode:{kind:"parsed",parse:String,brief:"When uploading phone numbers, if the phone number is missing a country code, assume this country code",default:"1"}}},docs:{brief:"Upload a set of requests from a CSV",fullDescription:`Upload a set of requests from a CSV.
86
86
 
87
87
  This command prompts you to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
88
88
 
@@ -1 +1 @@
1
- import{k as i}from"./chunk-ELYPVDLC.js";import o from"inquirer";import m from"inquirer-autocomplete-prompt";async function c({message:e}){let{response:r}=await o.prompt([{name:"response",message:e,type:"confirm"}]);return r}async function l({message:e}){let{response:r}=await o.prompt([{name:"response",message:e,type:"text",validate:t=>t.trim().length>0}]);return r}async function y({defaultValue:e,values:r,message:t}){o.registerPrompt("autocomplete",m);let{response:p}=await o.prompt([{name:"response",message:t,type:"autocomplete",default:e,source:(a,n)=>n?r.filter(s=>typeof s=="string"&&i(n,s)):r}]);return p}export{c as a,l as b,y as c};
1
+ import{k as i}from"./chunk-QXOUJ7DT.js";import o from"inquirer";import m from"inquirer-autocomplete-prompt";async function c({message:e}){let{response:r}=await o.prompt([{name:"response",message:e,type:"confirm"}]);return r}async function l({message:e}){let{response:r}=await o.prompt([{name:"response",message:e,type:"text",validate:t=>t.trim().length>0}]);return r}async function y({defaultValue:e,values:r,message:t}){o.registerPrompt("autocomplete",m);let{response:p}=await o.prompt([{name:"response",message:t,type:"autocomplete",default:e,source:(a,n)=>n?r.filter(s=>typeof s=="string"&&i(n,s)):r}]);return p}export{c as a,l as b,y as c};
@@ -0,0 +1,8 @@
1
+ import{d as a}from"./chunk-EZCJGIOS.js";import{buildCommand as c,numberParser as p}from"@stricli/core";import{ConsentTrackerStatus as l}from"@transcend-io/privacy-types";import{ScopeName as u,TRANSCEND_SCOPES as i}from"@transcend-io/privacy-types";function m(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 n(e){try{return new URL(e).toString().replace(/\/$/,"")}catch{throw new Error(`Invalid URL format: ${e}`)}}function h(e){return e.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function g(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 o=({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 ${i[u.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(d=>`"${i[d].title}"`).join(", ")}`}},s=(e="https://api.transcend.io")=>({kind:"parsed",parse:n,brief:"URL of the Transcend backend. Use https://api.us.transcend.io for US hosting",default:e}),k=()=>({kind:"parsed",parse:String,brief:"The Sombra internal key, use for additional authentication when self-hosting Sombra",optional:!0});var f=["dataSilos","enrichers","templates","apiKeys"],U=Object.values(l),v=c({loader:async()=>{let{pull:e}=await import("./impl-PS2DUGWP.js");return e},parameters:{flags:{auth:o({scopes:"Varies"}),resources:{kind:"enum",values:["all",...Object.values(a)],brief:`The different resource types to pull in. Defaults to ${f.join(",")}.`,variadic:",",optional:!0},file:{kind:"parsed",parse:String,brief:"Path to the YAML file to pull into",default:"./transcend.yml"},transcendUrl:s(),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(l),variadic:",",brief:"The statuses of consent manager trackers to pull down. Defaults to all statuses.",optional:!0},pageSize:{kind:"parsed",parse:p,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{m as a,n as b,h as c,g as d,o as e,s as f,k as g,f as h,U as i,v as j};
@@ -1,4 +1,4 @@
1
- import{a}from"./chunk-OERYFLN2.js";import{b as di}from"./chunk-4ZV5X5DQ.js";async function T(t,e){let n=[];for(let r=0;r<t.length;r+=1)n.push(await e(t[r],r,t.length));return n}async function M(t,e,n={}){let{concurrency:r=1/0}=n,i=new Array(t.length),s=[],o=0,l=async()=>{if(o>=t.length)return;let d=o;o+=1;let m=e(t[d],d,t.length).then(h=>{i[d]=h});s.push(m),await m;let g=s.indexOf(m);g>-1&&s.splice(g,1)},u=Math.min(r,t.length),c=[];for(let d=0;d<u;d+=1)c.push(l());for(await Promise.all(c);o<t.length;)s.length<r?await l():await Promise.race(s);return await Promise.all(s),i}import{gql as Me}from"graphql-request";var fi=Me`
1
+ import{a}from"./chunk-OERYFLN2.js";import{b as di}from"./chunk-MLF3XCRS.js";async function T(t,e){let n=[];for(let r=0;r<t.length;r+=1)n.push(await e(t[r],r,t.length));return n}async function M(t,e,n={}){let{concurrency:r=1/0}=n,i=new Array(t.length),s=[],o=0,l=async()=>{if(o>=t.length)return;let d=o;o+=1;let m=e(t[d],d,t.length).then(h=>{i[d]=h});s.push(m),await m;let g=s.indexOf(m);g>-1&&s.splice(g,1)},u=Math.min(r,t.length),c=[];for(let d=0;d<u;d+=1)c.push(l());for(await Promise.all(c);o<t.length;)s.length<r?await l():await Promise.race(s);return await Promise.all(s),i}import{gql as Me}from"graphql-request";var fi=Me`
2
2
  query TranscendCliDataPoints(
3
3
  $filterBy: DataPointFiltersInput
4
4
  $first: Int!
@@ -1 +1 @@
1
- var s="A command line interface for programmatic operations across Transcend.",n="7.0.0-alpha.6";export{s as a,n as b};
1
+ var s="A command line interface for programmatic operations across Transcend.",n="7.0.0-alpha.7";export{s as a,n as b};
@@ -1,2 +1,2 @@
1
- import{c as _}from"./chunk-RBOBI6B6.js";import{n as A,q as x}from"./chunk-ELYPVDLC.js";import{Ae as O,Be as D,_ as T,_b as j,b as R,pe as y,qe as E,ye as L}from"./chunk-7HDHUOTF.js";import{a as r}from"./chunk-OERYFLN2.js";import{e as b}from"./chunk-APA5PR4U.js";import{RequestStatus as U}from"@transcend-io/privacy-types";import k from"colors";import{groupBy as G,uniq as Q}from"lodash-es";async function te({file:u,auth:s,sombraAuth:g,requestActions:f=[],concurrency:p=100,transcendUrl:n=b}){let o=y(n,s),e=await E(n,s,g);r.info(k.magenta(`Pulling manual enrichment requests, filtered for actions: ${f.join(",")}`));let d=await L(o,{actions:f,statuses:[U.Enriching]}),i=[];await R(d,async t=>{let c=await D(o,{requestId:t.id});if(c.filter(({status:m})=>m==="ACTION_REQUIRED")){let m=await O(o,e,{requestId:t.id});i.push({...t,requestIdentifiers:m,requestEnrichers:c})}},{concurrency:p});let l=i.map(({attributeValues:t,requestIdentifiers:c,requestEnrichers:I,...m})=>({...m,...Object.entries(G(c,"name")).reduce((w,[P,$])=>Object.assign(w,{[P]:$.map(({value:C})=>C).join(",")}),{}),...Object.entries(G(t,"attributeKey.name")).reduce((w,[P,$])=>Object.assign(w,{[P]:$.map(({name:C})=>C).join(",")}),{})})),a=Q(l.map(t=>Object.keys(t)).flat());return _(u,l,a),r.info(k.green(`Successfully wrote ${i.length} requests to file "${u}"`)),i}import*as q from"io-ts";import{uniq as F}from"lodash-es";import v from"colors";var S="https://app.transcend.io/privacy-requests/incoming-requests/",M=q.record(q.string,q.string);async function N(u,{id:s,...g},f,p){if(!s){let e=`Request ID must be provided to enricher request.${p?` Found error in row: ${p}`:""}`;throw r.error(v.red(e)),new Error(e)}let n=s.toLowerCase(),o=Object.entries(g).reduce((e,[d,i])=>F(A(i)).length===0?e:Object.assign(e,{[d]:F(A(i)).map(a=>({value:d==="email"?a.toLowerCase():a}))}),{});try{return await u.post("v1/enrich-identifiers",{headers:{"x-transcend-request-id":n,"x-transcend-enricher-id":f},json:{enrichedIdentifiers:o}}).json(),r.error(v.green(`Successfully enriched request: ${S}${n}`)),!0}catch(e){if(typeof e.response.body=="string"&&e.response.body.includes("Cannot update a resolved RequestEnricher"))return r.warn(v.magenta(`Skipped enrichment for request: ${S}${n}, request is no longer in the enriching phase.`)),!1;throw r.error(v.red(`Failed to enricher identifiers for request with id: ${S}${n} - ${e.message} - ${e.response.body}`)),e}}import h from"colors";async function ge({file:u,auth:s,sombraAuth:g,enricherId:f,markSilent:p,concurrency:n=100,transcendUrl:o=b}){let e=await E(o,s,g),d=y(o,s);r.info(h.magenta(`Reading "${u}" from disk`));let i=x(u,M);r.info(h.magenta(`Enriching "${i.length}" privacy requests.`));let l=0,a=0,t=0;if(await R(i,async(c,I)=>{try{p&&(await j(d,T,{input:{id:c.id,isSilent:!0}}),r.info(h.magenta(`Mark request as silent mode - ${c.id}`))),await N(e,c,f,I)?l+=1:a+=1}catch{t+=1}},{concurrency:n}),r.info(h.green(`Successfully notified Transcend!
1
+ import{c as _}from"./chunk-RBOBI6B6.js";import{n as A,q as x}from"./chunk-QXOUJ7DT.js";import{Ae as O,Be as D,_ as T,_b as j,b as R,pe as y,qe as E,ye as L}from"./chunk-LE6MXFBT.js";import{a as r}from"./chunk-OERYFLN2.js";import{e as b}from"./chunk-APA5PR4U.js";import{RequestStatus as U}from"@transcend-io/privacy-types";import k from"colors";import{groupBy as G,uniq as Q}from"lodash-es";async function te({file:u,auth:s,sombraAuth:g,requestActions:f=[],concurrency:p=100,transcendUrl:n=b}){let o=y(n,s),e=await E(n,s,g);r.info(k.magenta(`Pulling manual enrichment requests, filtered for actions: ${f.join(",")}`));let d=await L(o,{actions:f,statuses:[U.Enriching]}),i=[];await R(d,async t=>{let c=await D(o,{requestId:t.id});if(c.filter(({status:m})=>m==="ACTION_REQUIRED")){let m=await O(o,e,{requestId:t.id});i.push({...t,requestIdentifiers:m,requestEnrichers:c})}},{concurrency:p});let l=i.map(({attributeValues:t,requestIdentifiers:c,requestEnrichers:I,...m})=>({...m,...Object.entries(G(c,"name")).reduce((w,[P,$])=>Object.assign(w,{[P]:$.map(({value:C})=>C).join(",")}),{}),...Object.entries(G(t,"attributeKey.name")).reduce((w,[P,$])=>Object.assign(w,{[P]:$.map(({name:C})=>C).join(",")}),{})})),a=Q(l.map(t=>Object.keys(t)).flat());return _(u,l,a),r.info(k.green(`Successfully wrote ${i.length} requests to file "${u}"`)),i}import*as q from"io-ts";import{uniq as F}from"lodash-es";import v from"colors";var S="https://app.transcend.io/privacy-requests/incoming-requests/",M=q.record(q.string,q.string);async function N(u,{id:s,...g},f,p){if(!s){let e=`Request ID must be provided to enricher request.${p?` Found error in row: ${p}`:""}`;throw r.error(v.red(e)),new Error(e)}let n=s.toLowerCase(),o=Object.entries(g).reduce((e,[d,i])=>F(A(i)).length===0?e:Object.assign(e,{[d]:F(A(i)).map(a=>({value:d==="email"?a.toLowerCase():a}))}),{});try{return await u.post("v1/enrich-identifiers",{headers:{"x-transcend-request-id":n,"x-transcend-enricher-id":f},json:{enrichedIdentifiers:o}}).json(),r.error(v.green(`Successfully enriched request: ${S}${n}`)),!0}catch(e){if(typeof e.response.body=="string"&&e.response.body.includes("Cannot update a resolved RequestEnricher"))return r.warn(v.magenta(`Skipped enrichment for request: ${S}${n}, request is no longer in the enriching phase.`)),!1;throw r.error(v.red(`Failed to enricher identifiers for request with id: ${S}${n} - ${e.message} - ${e.response.body}`)),e}}import h from"colors";async function ge({file:u,auth:s,sombraAuth:g,enricherId:f,markSilent:p,concurrency:n=100,transcendUrl:o=b}){let e=await E(o,s,g),d=y(o,s);r.info(h.magenta(`Reading "${u}" from disk`));let i=x(u,M);r.info(h.magenta(`Enriching "${i.length}" privacy requests.`));let l=0,a=0,t=0;if(await R(i,async(c,I)=>{try{p&&(await j(d,T,{input:{id:c.id,isSilent:!0}}),r.info(h.magenta(`Mark request as silent mode - ${c.id}`))),await N(e,c,f,I)?l+=1:a+=1}catch{t+=1}},{concurrency:n}),r.info(h.green(`Successfully notified Transcend!
2
2
  Success count: ${l}.`)),a>0&&r.info(h.magenta(`Skipped count: ${a}.`)),t>0)throw r.info(h.red(`Error Count: ${t}.`)),new Error(`Failed to enrich: ${t} requests.`);return i.length}export{te as a,M as b,N as c,ge as d};
@@ -1,4 +1,4 @@
1
- import{_b as S,a as w,f as $,i as B,j as T,l as R}from"./chunk-7HDHUOTF.js";import{a as i}from"./chunk-OERYFLN2.js";import{keyBy as O,uniq as A,chunk as U,sortBy as G}from"lodash-es";import{SubDataPointDataSubCategoryGuessStatus as _}from"@transcend-io/privacy-types";import h from"cli-progress";import{gql as L}from"graphql-request";import f from"colors";async function q(u,{dataSiloIds:e=[],includeGuessedCategories:l,includeAttributes:a,parentCategories:c=[],subCategories:t=[],pageSize:p=1e3}={}){let n=[],m=new Date().getTime(),d=new h.SingleBar({},h.Presets.shades_classic),s={...c.length>0?{category:c}:{},...t.length>0?{subCategoryIds:t}:{},...c.length+t.length>0&&!l?{status:_.Approved}:{},...e.length>0?{dataSilos:e}:{}},{subDataPoints:{totalCount:o}}=await S(u,$,{filterBy:s});i.info(f.magenta("[Step 1/3] Pulling in all subdatapoints")),d.start(o,0);let y=0,D=!1,r,b=0;do try{let{subDataPoints:{nodes:P}}=await S(u,L`
1
+ import{_b as S,a as w,f as $,i as B,j as T,l as R}from"./chunk-LE6MXFBT.js";import{a as i}from"./chunk-OERYFLN2.js";import{keyBy as O,uniq as A,chunk as U,sortBy as G}from"lodash-es";import{SubDataPointDataSubCategoryGuessStatus as _}from"@transcend-io/privacy-types";import h from"cli-progress";import{gql as L}from"graphql-request";import f from"colors";async function q(u,{dataSiloIds:e=[],includeGuessedCategories:l,includeAttributes:a,parentCategories:c=[],subCategories:t=[],pageSize:p=1e3}={}){let n=[],m=new Date().getTime(),d=new h.SingleBar({},h.Presets.shades_classic),s={...c.length>0?{category:c}:{},...t.length>0?{subCategoryIds:t}:{},...c.length+t.length>0&&!l?{status:_.Approved}:{},...e.length>0?{dataSilos:e}:{}},{subDataPoints:{totalCount:o}}=await S(u,$,{filterBy:s});i.info(f.magenta("[Step 1/3] Pulling in all subdatapoints")),d.start(o,0);let y=0,D=!1,r,b=0;do try{let{subDataPoints:{nodes:P}}=await S(u,L`
2
2
  query TranscendCliSubDataPointCsvExport(
3
3
  $filterBy: SubDataPointFiltersInput
4
4
  $first: Int!
@@ -1 +1 @@
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-7HDHUOTF.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};
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-LE6MXFBT.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};