@transcend-io/cli 8.0.0 → 8.0.1

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 (136) hide show
  1. package/dist/bin/bash-complete.cjs +1 -1
  2. package/dist/bin/cli.cjs +1 -1
  3. package/dist/bin/deprecated-command.cjs +2 -2
  4. package/dist/{chunk-NKVC5Y53.cjs → chunk-56TB3NTQ.cjs} +2 -2
  5. package/dist/{chunk-NKVC5Y53.cjs.map → chunk-56TB3NTQ.cjs.map} +1 -1
  6. package/dist/{chunk-KC7NDLN7.cjs → chunk-6IHSPKMP.cjs} +2 -2
  7. package/dist/{chunk-KC7NDLN7.cjs.map → chunk-6IHSPKMP.cjs.map} +1 -1
  8. package/dist/{chunk-V4X4IT3T.cjs → chunk-7G4SCKPN.cjs} +2 -2
  9. package/dist/{chunk-V4X4IT3T.cjs.map → chunk-7G4SCKPN.cjs.map} +1 -1
  10. package/dist/{chunk-6DMFIXMV.cjs → chunk-7NYZMFPT.cjs} +19 -19
  11. package/dist/{chunk-6DMFIXMV.cjs.map → chunk-7NYZMFPT.cjs.map} +1 -1
  12. package/dist/{chunk-ASFWHSOV.cjs → chunk-AMO6I4AO.cjs} +2 -2
  13. package/dist/{chunk-ASFWHSOV.cjs.map → chunk-AMO6I4AO.cjs.map} +1 -1
  14. package/dist/{chunk-3EZGFSMD.cjs → chunk-DBYKJZEA.cjs} +2 -2
  15. package/dist/{chunk-3EZGFSMD.cjs.map → chunk-DBYKJZEA.cjs.map} +1 -1
  16. package/dist/{chunk-VHQY7TSF.cjs → chunk-JMBVOY56.cjs} +2 -2
  17. package/dist/{chunk-VHQY7TSF.cjs.map → chunk-JMBVOY56.cjs.map} +1 -1
  18. package/dist/{chunk-7QV5QNGW.cjs → chunk-KS2REJYA.cjs} +4 -4
  19. package/dist/{chunk-7QV5QNGW.cjs.map → chunk-KS2REJYA.cjs.map} +1 -1
  20. package/dist/{chunk-ZVK4HIDF.cjs → chunk-LR3CPNDM.cjs} +1 -1
  21. package/dist/chunk-LR3CPNDM.cjs.map +1 -0
  22. package/dist/{chunk-3FEOMF7G.cjs → chunk-MBB6OD4E.cjs} +2 -2
  23. package/dist/{chunk-3FEOMF7G.cjs.map → chunk-MBB6OD4E.cjs.map} +1 -1
  24. package/dist/{chunk-FMX5SPCL.cjs → chunk-PNSZQIYV.cjs} +2 -2
  25. package/dist/{chunk-FMX5SPCL.cjs.map → chunk-PNSZQIYV.cjs.map} +1 -1
  26. package/dist/{chunk-AADFRD6P.cjs → chunk-PSRKLYGK.cjs} +2 -2
  27. package/dist/{chunk-AADFRD6P.cjs.map → chunk-PSRKLYGK.cjs.map} +1 -1
  28. package/dist/{chunk-GZ2U36SS.cjs → chunk-PTQHBKJU.cjs} +3 -3
  29. package/dist/{chunk-GZ2U36SS.cjs.map → chunk-PTQHBKJU.cjs.map} +1 -1
  30. package/dist/{chunk-SUCCU2FS.cjs → chunk-SW5CIF5D.cjs} +1 -1
  31. package/dist/chunk-SW5CIF5D.cjs.map +1 -0
  32. package/dist/{chunk-MPI5VURJ.cjs → chunk-UPUHHIXZ.cjs} +4 -4
  33. package/dist/{chunk-MPI5VURJ.cjs.map → chunk-UPUHHIXZ.cjs.map} +1 -1
  34. package/dist/{chunk-6PCS4IRI.cjs → chunk-WLUTU3MY.cjs} +2 -2
  35. package/dist/chunk-WLUTU3MY.cjs.map +1 -0
  36. package/dist/{chunk-R7QYSUEN.cjs → chunk-WRJVOXRS.cjs} +2 -2
  37. package/dist/{chunk-R7QYSUEN.cjs.map → chunk-WRJVOXRS.cjs.map} +1 -1
  38. package/dist/{impl-4QGHJNOF.cjs → impl-4VCIYJCG.cjs} +2 -2
  39. package/dist/{impl-4QGHJNOF.cjs.map → impl-4VCIYJCG.cjs.map} +1 -1
  40. package/dist/{impl-HV2SRHDV.cjs → impl-57LDSC2M.cjs} +2 -2
  41. package/dist/impl-57LDSC2M.cjs.map +1 -0
  42. package/dist/{impl-L7AJQDYS.cjs → impl-5BNP4JYG.cjs} +2 -2
  43. package/dist/{impl-L7AJQDYS.cjs.map → impl-5BNP4JYG.cjs.map} +1 -1
  44. package/dist/{impl-3MB7W3JD.cjs → impl-5KEI5AJG.cjs} +2 -2
  45. package/dist/{impl-3MB7W3JD.cjs.map → impl-5KEI5AJG.cjs.map} +1 -1
  46. package/dist/{impl-YVMYL724.cjs → impl-5MGEJPTO.cjs} +6 -6
  47. package/dist/impl-5MGEJPTO.cjs.map +1 -0
  48. package/dist/{impl-LJMBCW6Z.cjs → impl-AHLMRZNM.cjs} +2 -2
  49. package/dist/{impl-LJMBCW6Z.cjs.map → impl-AHLMRZNM.cjs.map} +1 -1
  50. package/dist/{impl-GSLBE3DP.cjs → impl-AHNQLAH5.cjs} +2 -2
  51. package/dist/{impl-GSLBE3DP.cjs.map → impl-AHNQLAH5.cjs.map} +1 -1
  52. package/dist/{impl-JTBEG5AM.cjs → impl-C53IQ5HC.cjs} +2 -2
  53. package/dist/impl-C53IQ5HC.cjs.map +1 -0
  54. package/dist/{impl-4TMKRPWO.cjs → impl-DSRH7IN2.cjs} +2 -2
  55. package/dist/{impl-4TMKRPWO.cjs.map → impl-DSRH7IN2.cjs.map} +1 -1
  56. package/dist/impl-FP3D5M5B.cjs +2 -0
  57. package/dist/{impl-ZFJM6LMZ.cjs.map → impl-FP3D5M5B.cjs.map} +1 -1
  58. package/dist/{impl-JYCFV5ST.cjs → impl-G24XCV65.cjs} +2 -2
  59. package/dist/{impl-JYCFV5ST.cjs.map → impl-G24XCV65.cjs.map} +1 -1
  60. package/dist/{impl-DCPTYADV.cjs → impl-GP2DMI4O.cjs} +2 -2
  61. package/dist/{impl-DCPTYADV.cjs.map → impl-GP2DMI4O.cjs.map} +1 -1
  62. package/dist/impl-GPTJLZHD.cjs +2 -0
  63. package/dist/{impl-SCO4LJDB.cjs.map → impl-GPTJLZHD.cjs.map} +1 -1
  64. package/dist/{impl-XTEZTAM2.cjs → impl-HQLA253Z.cjs} +2 -2
  65. package/dist/{impl-XTEZTAM2.cjs.map → impl-HQLA253Z.cjs.map} +1 -1
  66. package/dist/impl-HVKSG236.cjs +2 -0
  67. package/dist/{impl-TVSTWXSI.cjs.map → impl-HVKSG236.cjs.map} +1 -1
  68. package/dist/{impl-VVADV3UA.cjs → impl-IKTY3PZ3.cjs} +2 -2
  69. package/dist/{impl-VVADV3UA.cjs.map → impl-IKTY3PZ3.cjs.map} +1 -1
  70. package/dist/{impl-WKWQYPI4.cjs → impl-IVDJEVS4.cjs} +3 -3
  71. package/dist/impl-IVDJEVS4.cjs.map +1 -0
  72. package/dist/{impl-4EYSMS5J.cjs → impl-JUUYZHGL.cjs} +2 -2
  73. package/dist/{impl-4EYSMS5J.cjs.map → impl-JUUYZHGL.cjs.map} +1 -1
  74. package/dist/{impl-NCT2NJ62.cjs → impl-L2XUXKHL.cjs} +2 -2
  75. package/dist/{impl-NCT2NJ62.cjs.map → impl-L2XUXKHL.cjs.map} +1 -1
  76. package/dist/{impl-YLORLMRQ.cjs → impl-LZUXHWDU.cjs} +2 -2
  77. package/dist/{impl-YLORLMRQ.cjs.map → impl-LZUXHWDU.cjs.map} +1 -1
  78. package/dist/{impl-SQDB5BDK.cjs → impl-MLEPL5MZ.cjs} +5 -5
  79. package/dist/impl-MLEPL5MZ.cjs.map +1 -0
  80. package/dist/{impl-EE72U2AE.cjs → impl-MLVIXJWF.cjs} +2 -2
  81. package/dist/impl-MLVIXJWF.cjs.map +1 -0
  82. package/dist/{impl-CT62BE2Y.cjs → impl-PAXESZFC.cjs} +2 -2
  83. package/dist/{impl-CT62BE2Y.cjs.map → impl-PAXESZFC.cjs.map} +1 -1
  84. package/dist/{impl-OZ7S4WDL.cjs → impl-QJJNBKJR.cjs} +2 -2
  85. package/dist/{impl-OZ7S4WDL.cjs.map → impl-QJJNBKJR.cjs.map} +1 -1
  86. package/dist/{impl-WBR473NQ.cjs → impl-QW6NAOEK.cjs} +4 -4
  87. package/dist/{impl-WBR473NQ.cjs.map → impl-QW6NAOEK.cjs.map} +1 -1
  88. package/dist/{impl-ALXI3TP7.cjs → impl-RGYCC7MP.cjs} +2 -2
  89. package/dist/{impl-ALXI3TP7.cjs.map → impl-RGYCC7MP.cjs.map} +1 -1
  90. package/dist/{impl-6CESPVNS.cjs → impl-RPRRJOI3.cjs} +2 -2
  91. package/dist/impl-RPRRJOI3.cjs.map +1 -0
  92. package/dist/{impl-SLRQDZB4.cjs → impl-RXVSZRCO.cjs} +2 -2
  93. package/dist/{impl-SLRQDZB4.cjs.map → impl-RXVSZRCO.cjs.map} +1 -1
  94. package/dist/{impl-DJ3SW7AG.cjs → impl-SW44TCHM.cjs} +2 -2
  95. package/dist/impl-SW44TCHM.cjs.map +1 -0
  96. package/dist/{impl-HFDUNV2A.cjs → impl-T4BXYX2K.cjs} +2 -2
  97. package/dist/{impl-HFDUNV2A.cjs.map → impl-T4BXYX2K.cjs.map} +1 -1
  98. package/dist/{impl-BEGQABL3.cjs → impl-TJP4ZLHS.cjs} +2 -2
  99. package/dist/{impl-BEGQABL3.cjs.map → impl-TJP4ZLHS.cjs.map} +1 -1
  100. package/dist/{impl-6OK7OVS6.cjs → impl-TLDBJN7P.cjs} +2 -2
  101. package/dist/{impl-6OK7OVS6.cjs.map → impl-TLDBJN7P.cjs.map} +1 -1
  102. package/dist/{impl-TI7DA67A.cjs → impl-UG3FWG22.cjs} +2 -2
  103. package/dist/{impl-TI7DA67A.cjs.map → impl-UG3FWG22.cjs.map} +1 -1
  104. package/dist/{impl-A6IYDZLA.cjs → impl-UMRC5P5T.cjs} +2 -2
  105. package/dist/{impl-A6IYDZLA.cjs.map → impl-UMRC5P5T.cjs.map} +1 -1
  106. package/dist/{impl-ULAYJG2T.cjs → impl-VF3LT3IJ.cjs} +3 -3
  107. package/dist/impl-VF3LT3IJ.cjs.map +1 -0
  108. package/dist/impl-W6OLYSNF.cjs +2 -0
  109. package/dist/{impl-OEZVSI3U.cjs.map → impl-W6OLYSNF.cjs.map} +1 -1
  110. package/dist/{impl-AMXKTPKE.cjs → impl-WSRMGN2H.cjs} +2 -2
  111. package/dist/impl-WSRMGN2H.cjs.map +1 -0
  112. package/dist/{impl-5OEUTJB7.cjs → impl-XW7JECCZ.cjs} +2 -2
  113. package/dist/{impl-5OEUTJB7.cjs.map → impl-XW7JECCZ.cjs.map} +1 -1
  114. package/dist/impl-YUYWOPRG.cjs +2 -0
  115. package/dist/{impl-DHMLZZX7.cjs.map → impl-YUYWOPRG.cjs.map} +1 -1
  116. package/dist/index.cjs +3 -3
  117. package/dist/index.d.cts +1 -1
  118. package/package.json +1 -1
  119. package/dist/chunk-6PCS4IRI.cjs.map +0 -1
  120. package/dist/chunk-SUCCU2FS.cjs.map +0 -1
  121. package/dist/chunk-ZVK4HIDF.cjs.map +0 -1
  122. package/dist/impl-6CESPVNS.cjs.map +0 -1
  123. package/dist/impl-AMXKTPKE.cjs.map +0 -1
  124. package/dist/impl-DHMLZZX7.cjs +0 -2
  125. package/dist/impl-DJ3SW7AG.cjs.map +0 -1
  126. package/dist/impl-EE72U2AE.cjs.map +0 -1
  127. package/dist/impl-HV2SRHDV.cjs.map +0 -1
  128. package/dist/impl-JTBEG5AM.cjs.map +0 -1
  129. package/dist/impl-OEZVSI3U.cjs +0 -2
  130. package/dist/impl-SCO4LJDB.cjs +0 -2
  131. package/dist/impl-SQDB5BDK.cjs.map +0 -1
  132. package/dist/impl-TVSTWXSI.cjs +0 -2
  133. package/dist/impl-ULAYJG2T.cjs.map +0 -1
  134. package/dist/impl-WKWQYPI4.cjs.map +0 -1
  135. package/dist/impl-YVMYL724.cjs.map +0 -1
  136. package/dist/impl-ZFJM6LMZ.cjs +0 -2
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunk6DMFIXMVcjs = require('../chunk-6DMFIXMV.cjs');require('../chunk-FMX5SPCL.cjs');require('../chunk-KC7NDLN7.cjs');require('../chunk-3EZGFSMD.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunk6DMFIXMVcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunk6DMFIXMVcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
2
+ "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunk7NYZMFPTcjs = require('../chunk-7NYZMFPT.cjs');require('../chunk-PNSZQIYV.cjs');require('../chunk-6IHSPKMP.cjs');require('../chunk-DBYKJZEA.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunk7NYZMFPTcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunk7NYZMFPTcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
3
3
  `)}catch (e2){}}e();
4
4
  //# sourceMappingURL=bash-complete.cjs.map
package/dist/bin/cli.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunk6DMFIXMVcjs = require('../chunk-6DMFIXMV.cjs');require('../chunk-FMX5SPCL.cjs');require('../chunk-KC7NDLN7.cjs');require('../chunk-3EZGFSMD.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunk6DMFIXMVcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
2
+ "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunk7NYZMFPTcjs = require('../chunk-7NYZMFPT.cjs');require('../chunk-PNSZQIYV.cjs');require('../chunk-6IHSPKMP.cjs');require('../chunk-DBYKJZEA.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunk7NYZMFPTcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
3
3
  //# sourceMappingURL=cli.cjs.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk6DMFIXMVcjs = require('../chunk-6DMFIXMV.cjs');require('../chunk-FMX5SPCL.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-KC7NDLN7.cjs');require('../chunk-3EZGFSMD.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');var o={"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 p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunk6DMFIXMVcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunk6DMFIXMVcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunk6DMFIXMVcjs.a.config.name} ${d.join(" ")}\``).join(`
2
+ "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk7NYZMFPTcjs = require('../chunk-7NYZMFPT.cjs');require('../chunk-PNSZQIYV.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-6IHSPKMP.cjs');require('../chunk-DBYKJZEA.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');var o={"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 p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunk7NYZMFPTcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunk7NYZMFPTcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunk7NYZMFPTcjs.a.config.name} ${d.join(" ")}\``).join(`
3
3
  `);_chunkZUNVPK23cjs.a.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}_chunkZUNVPK23cjs.a.log(`\`${t}\` is deprecated as of v7.0.0.
5
- Use \`${_chunk6DMFIXMVcjs.a.config.name} ${e.join(" ")}\` instead.
5
+ Use \`${_chunk7NYZMFPTcjs.a.config.name} ${e.join(" ")}\` instead.
6
6
  `);let s=p(e);if(!s)throw new Error(`Failed to get help text for command: \`${e.join(" ")}\``);_chunkZUNVPK23cjs.a.log(s)}function m(){let e=_optionalChain([process, 'access', _4 => _4.argv, 'access', _5 => _5.at, 'call', _6 => _6(-1), 'optionalAccess', _7 => _7.split, 'call', _8 => _8("/"), 'access', _9 => _9.pop, 'call', _10 => _10(), 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]);if(e)i(e);else throw new Error("Deprecated command");process.exit(1)}m();
7
7
  //# sourceMappingURL=deprecated-command.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk3FEOMF7Gcjs = require('./chunk-3FEOMF7G.cjs');var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function c({message:e}){let{response:r}=await _inquirer2.default.prompt([{name:"response",message:e,type:"confirm"}]);return r}async function l({message:e}){let{response:r}=await _inquirer2.default.prompt([{name:"response",message:e,type:"text",validate:t=>t.trim().length>0}]);return r}async function y({defaultValue:e,values:r,message:t}){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let{response:p}=await _inquirer2.default.prompt([{name:"response",message:t,type:"autocomplete",default:e,source:(a,n)=>n?r.filter(s=>typeof s=="string"&&_chunk3FEOMF7Gcjs.k.call(void 0, n,s)):r}]);return p}exports.a = c; exports.b = l; exports.c = y;
2
- //# sourceMappingURL=chunk-NKVC5Y53.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMBB6OD4Ecjs = require('./chunk-MBB6OD4E.cjs');var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function c({message:e}){let{response:r}=await _inquirer2.default.prompt([{name:"response",message:e,type:"confirm"}]);return r}async function l({message:e}){let{response:r}=await _inquirer2.default.prompt([{name:"response",message:e,type:"text",validate:t=>t.trim().length>0}]);return r}async function y({defaultValue:e,values:r,message:t}){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let{response:p}=await _inquirer2.default.prompt([{name:"response",message:t,type:"autocomplete",default:e,source:(a,n)=>n?r.filter(s=>typeof s=="string"&&_chunkMBB6OD4Ecjs.k.call(void 0, n,s)):r}]);return p}exports.a = c; exports.b = l; exports.c = y;
2
+ //# sourceMappingURL=chunk-56TB3NTQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-NKVC5Y53.cjs","../src/lib/helpers/inquirer.ts"],"names":["inquirerConfirmBoolean","message","response","inquirer","inquirerConfirmText","x","inquirerAutoComplete","defaultValue","values","autoCompletePrompt","answersSoFar","input","fuzzySearch"],"mappings":"AAAA,iOAAwC,wFCAnB,kKACU,MAU/B,SAAsBA,CAAAA,CAAuB,CAC3C,OAAA,CAAAC,CACF,CAAA,CAGqB,CACnB,GAAM,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,SACR,CACF,CAAC,CAAA,CACD,OAAOC,CACT,CAQA,MAAA,SAAsBE,CAAAA,CAAoB,CACxC,OAAA,CAAAH,CACF,CAAA,CAGoB,CAClB,GAAM,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,MAAA,CACN,QAAA,CAAWI,CAAAA,EAAMA,CAAAA,CAAE,IAAA,CAAK,CAAA,CAAE,MAAA,CAAS,CACrC,CACF,CAAC,CAAA,CACD,OAAOH,CACT,CAQA,MAAA,SAAsBI,CAAAA,CAAqB,CACzC,YAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,OAAA,CAAAP,CACF,CAAA,CAOoB,CAClBE,kBAAAA,CAAS,cAAA,CAAe,cAAA,CAAgBM,oCAAkB,CAAA,CAC1D,GAAM,CAAE,QAAA,CAAAP,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,cAAA,CACN,OAAA,CAASM,CAAAA,CACT,MAAA,CAAQ,CAACG,CAAAA,CAA2BC,CAAAA,CAAAA,EACjCA,CAAAA,CAEGH,CAAAA,CAAO,MAAA,CACJH,CAAAA,EAAM,OAAOA,CAAAA,EAAM,QAAA,EAAYO,iCAAAA,CAAYD,CAAON,CAAC,CACtD,CAAA,CAHAG,CAIR,CACF,CAAC,CAAA,CACD,OAAON,CACT,CAAA,4CAAA","file":"/home/runner/work/cli/cli/dist/chunk-NKVC5Y53.cjs","sourcesContent":[null,"import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { fuzzySearch } from '../requests';\nimport { ObjByString } from '@transcend-io/type-utils';\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmBoolean({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<boolean> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: boolean;\n }>([\n {\n name: 'response',\n message,\n type: 'confirm',\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmText({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<string> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'text',\n validate: (x) => x.trim().length > 0,\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer auto complete\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerAutoComplete({\n defaultValue,\n values,\n message,\n}: {\n /** Default value */\n defaultValue?: string;\n /** Message */\n message: string;\n /** Values to select */\n values: string[];\n}): Promise<string> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'autocomplete',\n default: defaultValue,\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? values\n : values.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n },\n ]);\n return response;\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-56TB3NTQ.cjs","../src/lib/helpers/inquirer.ts"],"names":["inquirerConfirmBoolean","message","response","inquirer","inquirerConfirmText","x","inquirerAutoComplete","defaultValue","values","autoCompletePrompt","answersSoFar","input","fuzzySearch"],"mappings":"AAAA,iOAAwC,wFCAnB,kKACU,MAU/B,SAAsBA,CAAAA,CAAuB,CAC3C,OAAA,CAAAC,CACF,CAAA,CAGqB,CACnB,GAAM,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,SACR,CACF,CAAC,CAAA,CACD,OAAOC,CACT,CAQA,MAAA,SAAsBE,CAAAA,CAAoB,CACxC,OAAA,CAAAH,CACF,CAAA,CAGoB,CAClB,GAAM,CAAE,QAAA,CAAAC,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,MAAA,CACN,QAAA,CAAWI,CAAAA,EAAMA,CAAAA,CAAE,IAAA,CAAK,CAAA,CAAE,MAAA,CAAS,CACrC,CACF,CAAC,CAAA,CACD,OAAOH,CACT,CAQA,MAAA,SAAsBI,CAAAA,CAAqB,CACzC,YAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,OAAA,CAAAP,CACF,CAAA,CAOoB,CAClBE,kBAAAA,CAAS,cAAA,CAAe,cAAA,CAAgBM,oCAAkB,CAAA,CAC1D,GAAM,CAAE,QAAA,CAAAP,CAAS,CAAA,CAAI,MAAMC,kBAAAA,CAAS,MAAA,CAGjC,CACD,CACE,IAAA,CAAM,UAAA,CACN,OAAA,CAAAF,CAAAA,CACA,IAAA,CAAM,cAAA,CACN,OAAA,CAASM,CAAAA,CACT,MAAA,CAAQ,CAACG,CAAAA,CAA2BC,CAAAA,CAAAA,EACjCA,CAAAA,CAEGH,CAAAA,CAAO,MAAA,CACJH,CAAAA,EAAM,OAAOA,CAAAA,EAAM,QAAA,EAAYO,iCAAAA,CAAYD,CAAON,CAAC,CACtD,CAAA,CAHAG,CAIR,CACF,CAAC,CAAA,CACD,OAAON,CACT,CAAA,4CAAA","file":"/home/runner/work/cli/cli/dist/chunk-56TB3NTQ.cjs","sourcesContent":[null,"import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { fuzzySearch } from '../requests';\nimport { ObjByString } from '@transcend-io/type-utils';\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmBoolean({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<boolean> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: boolean;\n }>([\n {\n name: 'response',\n message,\n type: 'confirm',\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmText({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<string> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'text',\n validate: (x) => x.trim().length > 0,\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer auto complete\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerAutoComplete({\n defaultValue,\n values,\n message,\n}: {\n /** Default value */\n defaultValue?: string;\n /** Message */\n message: string;\n /** Values to select */\n values: string[];\n}): Promise<string> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'autocomplete',\n default: defaultValue,\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? values\n : values.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n },\n ]);\n return response;\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3EZGFSMDcjs = require('./chunk-3EZGFSMD.cjs');var _privacytypes = require('@transcend-io/privacy-types');var A="transcend",s= exports.b ="https://app.transcend.io",P= exports.c =`${s}/infrastructure/integrations`,u= exports.d =`${s}/data-map/data-inventory/data-points`,M= exports.e =process.env.TRANSCEND_API_URL||"https://api.transcend.io",S= exports.f =process.env.TRANSCEND_CONSENT_API_URL||"https://consent.transcend.io",D= exports.g ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ManageEmailTemplates],dataSilos:[_privacytypes.ScopeName.ManageDataMap,_privacytypes.ScopeName.ConnectDataSilos],enrichers:[_privacytypes.ScopeName.ManageRequestIdentities],businessEntities:[_privacytypes.ScopeName.ManageDataInventory],processingActivities:[_privacytypes.ScopeName.ManageDataMap],identifiers:[_privacytypes.ScopeName.ManageRequestIdentities],customFields:[_privacytypes.ScopeName.ManageGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ManageDataFlow],cookies:[_privacytypes.ScopeName.ManageDataFlow],consentManager:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],partitions:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],actions:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ManagePrompts],promptPartials:[_privacytypes.ScopeName.ManagePrompts],promptGroups:[_privacytypes.ScopeName.ManagePrompts],agents:[_privacytypes.ScopeName.ManagePathfinder],agentFunctions:[_privacytypes.ScopeName.ManagePathfinder],agentFiles:[_privacytypes.ScopeName.ManagePathfinder],vendors:[_privacytypes.ScopeName.ManageDataInventory],dataCategories:[_privacytypes.ScopeName.ManageDataInventory],processingPurposes:[_privacytypes.ScopeName.ManageDataInventory],actionItems:[_privacytypes.ScopeName.ManageAllActionItems,_privacytypes.ScopeName.ViewGlobalAttributes],actionItemCollections:[_privacytypes.ScopeName.ManageActionItemCollections],teams:[_privacytypes.ScopeName.ManageAccessControl],messages:[_privacytypes.ScopeName.ManageIntlMessages],privacyCenters:[_privacytypes.ScopeName.ManagePrivacyCenter],policies:[_privacytypes.ScopeName.ManagePolicies],assessments:[_privacytypes.ScopeName.ManageAssessments],assessmentTemplates:[_privacytypes.ScopeName.ManageAssessments],purposes:[_privacytypes.ScopeName.ManageConsentManager,_privacytypes.ScopeName.ManagePreferenceStoreSettings]},w= exports.h ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ViewEmailTemplates],dataSilos:[_privacytypes.ScopeName.ViewDataMap,_privacytypes.ScopeName.ViewDataSubjectRequestSettings],enrichers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],businessEntities:[_privacytypes.ScopeName.ViewDataInventory],processingActivities:[_privacytypes.ScopeName.ViewDataInventory],identifiers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],customFields:[_privacytypes.ScopeName.ViewGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ViewDataFlow],cookies:[_privacytypes.ScopeName.ViewDataFlow],consentManager:[_privacytypes.ScopeName.ViewConsentManager],partitions:[_privacytypes.ScopeName.ViewConsentManager],actions:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ViewPrompts],promptPartials:[_privacytypes.ScopeName.ViewPrompts],promptGroups:[_privacytypes.ScopeName.ViewPrompts],agents:[_privacytypes.ScopeName.ViewPathfinder],agentFunctions:[_privacytypes.ScopeName.ViewPathfinder],agentFiles:[_privacytypes.ScopeName.ViewPathfinder],vendors:[_privacytypes.ScopeName.ViewDataInventory],dataCategories:[_privacytypes.ScopeName.ViewDataInventory],processingPurposes:[_privacytypes.ScopeName.ViewDataInventory],actionItemCollections:[_privacytypes.ScopeName.ViewAllActionItems],actionItems:[_privacytypes.ScopeName.ViewAllActionItems],teams:[_privacytypes.ScopeName.ViewScopes],messages:[_privacytypes.ScopeName.ViewIntlMessages],privacyCenters:[_privacytypes.ScopeName.ViewPrivacyCenter],policies:[_privacytypes.ScopeName.ViewPolicies],assessments:[_privacytypes.ScopeName.ViewAssessments],assessmentTemplates:[_privacytypes.ScopeName.ViewAssessments],purposes:[_privacytypes.ScopeName.ViewConsentManager,_privacytypes.ScopeName.ViewPreferenceStoreSettings]},I= exports.i ={apiKeys:"api-keys",customFields:"attributes",dataFlows:"data-flows",cookies:"cookies",consentManager:"consent-manager",partitions:"partitions",actions:"actions",dataSubjects:"data-subjects",businessEntities:"business-entities",processingActivities:"processing-activities",identifiers:"identifiers",enrichers:"enrichers",dataSilos:"data-silos",templates:"templates",prompts:"prompts",promptPartials:"prompt-partials",promptGroups:"prompt-groups",agents:"agents",agentFunctions:"agent-functions",agentFiles:"agent-files",vendors:"vendors",dataCategories:"data-categories",processingPurposes:"processing-purposes",actionItems:"action-items",actionItemCollections:"action-item-collections",teams:"teams",messages:"messages",privacyCenters:"privacy-center",policies:"policies",assessments:"assessments",assessmentTemplates:"assessment-templates",purposes:"purposes"},o= exports.j =_chunk3EZGFSMDcjs.e.call(void 0, Object.entries(_privacytypes.TRANSCEND_SCOPES).map(([a,n])=>({...n,name:a})),"title"),C= exports.k =Object.keys(o);exports.a = A; exports.b = s; exports.c = P; exports.d = u; exports.e = M; exports.f = S; exports.g = D; exports.h = w; exports.i = I; exports.j = o; exports.k = C;
2
- //# sourceMappingURL=chunk-KC7NDLN7.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDBYKJZEAcjs = require('./chunk-DBYKJZEA.cjs');var _privacytypes = require('@transcend-io/privacy-types');var A="transcend",s= exports.b ="https://app.transcend.io",P= exports.c =`${s}/infrastructure/integrations`,u= exports.d =`${s}/data-map/data-inventory/data-points`,M= exports.e =process.env.TRANSCEND_API_URL||"https://api.transcend.io",S= exports.f =process.env.TRANSCEND_CONSENT_API_URL||"https://consent.transcend.io",D= exports.g ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ManageEmailTemplates],dataSilos:[_privacytypes.ScopeName.ManageDataMap,_privacytypes.ScopeName.ConnectDataSilos],enrichers:[_privacytypes.ScopeName.ManageRequestIdentities],businessEntities:[_privacytypes.ScopeName.ManageDataInventory],processingActivities:[_privacytypes.ScopeName.ManageDataMap],identifiers:[_privacytypes.ScopeName.ManageRequestIdentities],customFields:[_privacytypes.ScopeName.ManageGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ManageDataFlow],cookies:[_privacytypes.ScopeName.ManageDataFlow],consentManager:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],partitions:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings],actions:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ManageDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ManagePrompts],promptPartials:[_privacytypes.ScopeName.ManagePrompts],promptGroups:[_privacytypes.ScopeName.ManagePrompts],agents:[_privacytypes.ScopeName.ManagePathfinder],agentFunctions:[_privacytypes.ScopeName.ManagePathfinder],agentFiles:[_privacytypes.ScopeName.ManagePathfinder],vendors:[_privacytypes.ScopeName.ManageDataInventory],dataCategories:[_privacytypes.ScopeName.ManageDataInventory],processingPurposes:[_privacytypes.ScopeName.ManageDataInventory],actionItems:[_privacytypes.ScopeName.ManageAllActionItems,_privacytypes.ScopeName.ViewGlobalAttributes],actionItemCollections:[_privacytypes.ScopeName.ManageActionItemCollections],teams:[_privacytypes.ScopeName.ManageAccessControl],messages:[_privacytypes.ScopeName.ManageIntlMessages],privacyCenters:[_privacytypes.ScopeName.ManagePrivacyCenter],policies:[_privacytypes.ScopeName.ManagePolicies],assessments:[_privacytypes.ScopeName.ManageAssessments],assessmentTemplates:[_privacytypes.ScopeName.ManageAssessments],purposes:[_privacytypes.ScopeName.ManageConsentManager,_privacytypes.ScopeName.ManagePreferenceStoreSettings]},w= exports.h ={apiKeys:[_privacytypes.ScopeName.ViewApiKeys],templates:[_privacytypes.ScopeName.ViewEmailTemplates],dataSilos:[_privacytypes.ScopeName.ViewDataMap,_privacytypes.ScopeName.ViewDataSubjectRequestSettings],enrichers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],businessEntities:[_privacytypes.ScopeName.ViewDataInventory],processingActivities:[_privacytypes.ScopeName.ViewDataInventory],identifiers:[_privacytypes.ScopeName.ViewRequestIdentitySettings],customFields:[_privacytypes.ScopeName.ViewGlobalAttributes],dataFlows:[_privacytypes.ScopeName.ViewDataFlow],cookies:[_privacytypes.ScopeName.ViewDataFlow],consentManager:[_privacytypes.ScopeName.ViewConsentManager],partitions:[_privacytypes.ScopeName.ViewConsentManager],actions:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],dataSubjects:[_privacytypes.ScopeName.ViewDataSubjectRequestSettings],prompts:[_privacytypes.ScopeName.ViewPrompts],promptPartials:[_privacytypes.ScopeName.ViewPrompts],promptGroups:[_privacytypes.ScopeName.ViewPrompts],agents:[_privacytypes.ScopeName.ViewPathfinder],agentFunctions:[_privacytypes.ScopeName.ViewPathfinder],agentFiles:[_privacytypes.ScopeName.ViewPathfinder],vendors:[_privacytypes.ScopeName.ViewDataInventory],dataCategories:[_privacytypes.ScopeName.ViewDataInventory],processingPurposes:[_privacytypes.ScopeName.ViewDataInventory],actionItemCollections:[_privacytypes.ScopeName.ViewAllActionItems],actionItems:[_privacytypes.ScopeName.ViewAllActionItems],teams:[_privacytypes.ScopeName.ViewScopes],messages:[_privacytypes.ScopeName.ViewIntlMessages],privacyCenters:[_privacytypes.ScopeName.ViewPrivacyCenter],policies:[_privacytypes.ScopeName.ViewPolicies],assessments:[_privacytypes.ScopeName.ViewAssessments],assessmentTemplates:[_privacytypes.ScopeName.ViewAssessments],purposes:[_privacytypes.ScopeName.ViewConsentManager,_privacytypes.ScopeName.ViewPreferenceStoreSettings]},I= exports.i ={apiKeys:"api-keys",customFields:"attributes",dataFlows:"data-flows",cookies:"cookies",consentManager:"consent-manager",partitions:"partitions",actions:"actions",dataSubjects:"data-subjects",businessEntities:"business-entities",processingActivities:"processing-activities",identifiers:"identifiers",enrichers:"enrichers",dataSilos:"data-silos",templates:"templates",prompts:"prompts",promptPartials:"prompt-partials",promptGroups:"prompt-groups",agents:"agents",agentFunctions:"agent-functions",agentFiles:"agent-files",vendors:"vendors",dataCategories:"data-categories",processingPurposes:"processing-purposes",actionItems:"action-items",actionItemCollections:"action-item-collections",teams:"teams",messages:"messages",privacyCenters:"privacy-center",policies:"policies",assessments:"assessments",assessmentTemplates:"assessment-templates",purposes:"purposes"},o= exports.j =_chunkDBYKJZEAcjs.e.call(void 0, Object.entries(_privacytypes.TRANSCEND_SCOPES).map(([a,n])=>({...n,name:a})),"title"),C= exports.k =Object.keys(o);exports.a = A; exports.b = s; exports.c = P; exports.d = u; exports.e = M; exports.f = S; exports.g = D; exports.h = w; exports.i = I; exports.j = o; exports.k = C;
2
+ //# sourceMappingURL=chunk-6IHSPKMP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-KC7NDLN7.cjs","../src/constants.ts"],"names":["name","ADMIN_DASH","ADMIN_DASH_INTEGRATIONS"],"mappings":"AAAA,iIAAwC,2DCKjC,IAQMA,CAAAA,CAAO,WAAA,CAEPC,CAAAA,aAAa,0BAAA,CAEbC,CAAAA,aAA0B,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/chunk-KC7NDLN7.cjs","sourcesContent":[null,"import { keyBy } from 'lodash-es';\nimport {\n ScopeName,\n TRANSCEND_SCOPES,\n type ScopeDefinition,\n} from '@transcend-io/privacy-types';\nimport { TranscendPullResource } from './enums';\nimport { TranscendInput } from './codecs';\n\nexport { description, version } from '../package.json';\n/**\n * The name of the main binary for the CLI\n */\nexport const name = 'transcend';\n\nexport const ADMIN_DASH = 'https://app.transcend.io';\n\nexport const ADMIN_DASH_INTEGRATIONS = `${ADMIN_DASH}/infrastructure/integrations`;\nexport const ADMIN_DASH_DATAPOINTS = `${ADMIN_DASH}/data-map/data-inventory/data-points`;\n\n/**\n * Override default transcend API url using\n * TRANSCEND_API_URL=https://api.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_API =\n process.env.TRANSCEND_API_URL || 'https://api.transcend.io';\n\n/**\n * Override default transcend API url using\n * TRANSCEND_CONSENT_API_URL=https://consent.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_CONSENT_API =\n process.env.TRANSCEND_CONSENT_API_URL || 'https://consent.transcend.io';\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PUSH_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ManageEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ManageDataMap,\n ScopeName.ConnectDataSilos,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingActivities]: [ScopeName.ManageDataMap],\n [TranscendPullResource.Identifiers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.Attributes]: [ScopeName.ManageGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.ConsentManager]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Partitions]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Actions]: [ScopeName.ManageDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ManageDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ManagePrompts],\n [TranscendPullResource.Agents]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ActionItems]: [\n ScopeName.ManageAllActionItems,\n ScopeName.ViewGlobalAttributes,\n ],\n [TranscendPullResource.ActionItemCollections]: [\n ScopeName.ManageActionItemCollections,\n ],\n [TranscendPullResource.Teams]: [ScopeName.ManageAccessControl],\n [TranscendPullResource.Messages]: [ScopeName.ManageIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ManagePrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ManagePolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ManageAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ManageAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ManageConsentManager,\n ScopeName.ManagePreferenceStoreSettings,\n ],\n};\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PULL_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ViewEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ViewDataMap,\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingActivities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.Attributes]: [ScopeName.ViewGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.ConsentManager]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Partitions]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Actions]: [ScopeName.ViewDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ViewPrompts],\n [TranscendPullResource.Agents]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ActionItemCollections]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.ActionItems]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.Teams]: [ScopeName.ViewScopes],\n [TranscendPullResource.Messages]: [ScopeName.ViewIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ViewPrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ViewPolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ViewAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ViewAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ViewConsentManager,\n ScopeName.ViewPreferenceStoreSettings,\n ],\n};\n\nexport const TR_YML_RESOURCE_TO_FIELD_NAME: Record<\n TranscendPullResource,\n keyof TranscendInput\n> = {\n [TranscendPullResource.ApiKeys]: 'api-keys',\n [TranscendPullResource.Attributes]: 'attributes',\n [TranscendPullResource.DataFlows]: 'data-flows',\n [TranscendPullResource.Cookies]: 'cookies',\n [TranscendPullResource.ConsentManager]: 'consent-manager',\n [TranscendPullResource.Partitions]: 'partitions',\n [TranscendPullResource.Actions]: 'actions',\n [TranscendPullResource.DataSubjects]: 'data-subjects',\n [TranscendPullResource.BusinessEntities]: 'business-entities',\n [TranscendPullResource.ProcessingActivities]: 'processing-activities',\n [TranscendPullResource.Identifiers]: 'identifiers',\n [TranscendPullResource.Enrichers]: 'enrichers',\n [TranscendPullResource.DataSilos]: 'data-silos',\n [TranscendPullResource.Templates]: 'templates',\n [TranscendPullResource.Prompts]: 'prompts',\n [TranscendPullResource.PromptPartials]: 'prompt-partials',\n [TranscendPullResource.PromptGroups]: 'prompt-groups',\n [TranscendPullResource.Agents]: 'agents',\n [TranscendPullResource.AgentFunctions]: 'agent-functions',\n [TranscendPullResource.AgentFiles]: 'agent-files',\n [TranscendPullResource.Vendors]: 'vendors',\n [TranscendPullResource.DataCategories]: 'data-categories',\n [TranscendPullResource.ProcessingPurposes]: 'processing-purposes',\n [TranscendPullResource.ActionItems]: 'action-items',\n [TranscendPullResource.ActionItemCollections]: 'action-item-collections',\n [TranscendPullResource.Teams]: 'teams',\n [TranscendPullResource.Messages]: 'messages',\n [TranscendPullResource.PrivacyCenters]: 'privacy-center',\n [TranscendPullResource.Policies]: 'policies',\n [TranscendPullResource.Assessments]: 'assessments',\n [TranscendPullResource.AssessmentTemplates]: 'assessment-templates',\n [TranscendPullResource.Purposes]: 'purposes',\n};\n\nexport const SCOPES_BY_TITLE = keyBy(\n Object.entries(TRANSCEND_SCOPES).map(([name, value]) => ({\n ...value,\n name,\n })),\n 'title',\n) as Record<\n string,\n ScopeDefinition & {\n /** The camelCased name which identifies the scope */\n name: ScopeName;\n }\n>;\n\nexport const SCOPE_TITLES = Object.keys(SCOPES_BY_TITLE);\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-6IHSPKMP.cjs","../src/constants.ts"],"names":["name","ADMIN_DASH","ADMIN_DASH_INTEGRATIONS"],"mappings":"AAAA,iIAAwC,2DCKjC,IAQMA,CAAAA,CAAO,WAAA,CAEPC,CAAAA,aAAa,0BAAA,CAEbC,CAAAA,aAA0B,CAAA,EAAA","file":"/home/runner/work/cli/cli/dist/chunk-6IHSPKMP.cjs","sourcesContent":[null,"import { keyBy } from 'lodash-es';\nimport {\n ScopeName,\n TRANSCEND_SCOPES,\n type ScopeDefinition,\n} from '@transcend-io/privacy-types';\nimport { TranscendPullResource } from './enums';\nimport { TranscendInput } from './codecs';\n\nexport { description, version } from '../package.json';\n/**\n * The name of the main binary for the CLI\n */\nexport const name = 'transcend';\n\nexport const ADMIN_DASH = 'https://app.transcend.io';\n\nexport const ADMIN_DASH_INTEGRATIONS = `${ADMIN_DASH}/infrastructure/integrations`;\nexport const ADMIN_DASH_DATAPOINTS = `${ADMIN_DASH}/data-map/data-inventory/data-points`;\n\n/**\n * Override default transcend API url using\n * TRANSCEND_API_URL=https://api.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_API =\n process.env.TRANSCEND_API_URL || 'https://api.transcend.io';\n\n/**\n * Override default transcend API url using\n * TRANSCEND_CONSENT_API_URL=https://consent.us.transcend.io transcend ...\n */\nexport const DEFAULT_TRANSCEND_CONSENT_API =\n process.env.TRANSCEND_CONSENT_API_URL || 'https://consent.transcend.io';\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PUSH_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ManageEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ManageDataMap,\n ScopeName.ConnectDataSilos,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingActivities]: [ScopeName.ManageDataMap],\n [TranscendPullResource.Identifiers]: [ScopeName.ManageRequestIdentities],\n [TranscendPullResource.Attributes]: [ScopeName.ManageGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ManageDataFlow],\n [TranscendPullResource.ConsentManager]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Partitions]: [\n ScopeName.ManageConsentManagerDeveloperSettings,\n ],\n [TranscendPullResource.Actions]: [ScopeName.ManageDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ManageDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ManagePrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ManagePrompts],\n [TranscendPullResource.Agents]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ManagePathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ManageDataInventory],\n [TranscendPullResource.ActionItems]: [\n ScopeName.ManageAllActionItems,\n ScopeName.ViewGlobalAttributes,\n ],\n [TranscendPullResource.ActionItemCollections]: [\n ScopeName.ManageActionItemCollections,\n ],\n [TranscendPullResource.Teams]: [ScopeName.ManageAccessControl],\n [TranscendPullResource.Messages]: [ScopeName.ManageIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ManagePrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ManagePolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ManageAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ManageAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ManageConsentManager,\n ScopeName.ManagePreferenceStoreSettings,\n ],\n};\n\n/**\n * Mapping between resource type and scopes required for cli\n */\nexport const TR_PULL_RESOURCE_SCOPE_MAP: {\n [k in TranscendPullResource]: ScopeName[];\n} = {\n [TranscendPullResource.ApiKeys]: [ScopeName.ViewApiKeys],\n [TranscendPullResource.Templates]: [ScopeName.ViewEmailTemplates],\n [TranscendPullResource.DataSilos]: [\n ScopeName.ViewDataMap,\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Enrichers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.BusinessEntities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingActivities]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.Identifiers]: [ScopeName.ViewRequestIdentitySettings],\n [TranscendPullResource.Attributes]: [ScopeName.ViewGlobalAttributes],\n [TranscendPullResource.DataFlows]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.Cookies]: [ScopeName.ViewDataFlow],\n [TranscendPullResource.ConsentManager]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Partitions]: [ScopeName.ViewConsentManager],\n [TranscendPullResource.Actions]: [ScopeName.ViewDataSubjectRequestSettings],\n [TranscendPullResource.DataSubjects]: [\n ScopeName.ViewDataSubjectRequestSettings,\n ],\n [TranscendPullResource.Prompts]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptPartials]: [ScopeName.ViewPrompts],\n [TranscendPullResource.PromptGroups]: [ScopeName.ViewPrompts],\n [TranscendPullResource.Agents]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFunctions]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.AgentFiles]: [ScopeName.ViewPathfinder],\n [TranscendPullResource.Vendors]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.DataCategories]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ProcessingPurposes]: [ScopeName.ViewDataInventory],\n [TranscendPullResource.ActionItemCollections]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.ActionItems]: [ScopeName.ViewAllActionItems],\n [TranscendPullResource.Teams]: [ScopeName.ViewScopes],\n [TranscendPullResource.Messages]: [ScopeName.ViewIntlMessages],\n [TranscendPullResource.PrivacyCenters]: [ScopeName.ViewPrivacyCenter],\n [TranscendPullResource.Policies]: [ScopeName.ViewPolicies],\n [TranscendPullResource.Assessments]: [ScopeName.ViewAssessments],\n [TranscendPullResource.AssessmentTemplates]: [ScopeName.ViewAssessments],\n [TranscendPullResource.Purposes]: [\n ScopeName.ViewConsentManager,\n ScopeName.ViewPreferenceStoreSettings,\n ],\n};\n\nexport const TR_YML_RESOURCE_TO_FIELD_NAME: Record<\n TranscendPullResource,\n keyof TranscendInput\n> = {\n [TranscendPullResource.ApiKeys]: 'api-keys',\n [TranscendPullResource.Attributes]: 'attributes',\n [TranscendPullResource.DataFlows]: 'data-flows',\n [TranscendPullResource.Cookies]: 'cookies',\n [TranscendPullResource.ConsentManager]: 'consent-manager',\n [TranscendPullResource.Partitions]: 'partitions',\n [TranscendPullResource.Actions]: 'actions',\n [TranscendPullResource.DataSubjects]: 'data-subjects',\n [TranscendPullResource.BusinessEntities]: 'business-entities',\n [TranscendPullResource.ProcessingActivities]: 'processing-activities',\n [TranscendPullResource.Identifiers]: 'identifiers',\n [TranscendPullResource.Enrichers]: 'enrichers',\n [TranscendPullResource.DataSilos]: 'data-silos',\n [TranscendPullResource.Templates]: 'templates',\n [TranscendPullResource.Prompts]: 'prompts',\n [TranscendPullResource.PromptPartials]: 'prompt-partials',\n [TranscendPullResource.PromptGroups]: 'prompt-groups',\n [TranscendPullResource.Agents]: 'agents',\n [TranscendPullResource.AgentFunctions]: 'agent-functions',\n [TranscendPullResource.AgentFiles]: 'agent-files',\n [TranscendPullResource.Vendors]: 'vendors',\n [TranscendPullResource.DataCategories]: 'data-categories',\n [TranscendPullResource.ProcessingPurposes]: 'processing-purposes',\n [TranscendPullResource.ActionItems]: 'action-items',\n [TranscendPullResource.ActionItemCollections]: 'action-item-collections',\n [TranscendPullResource.Teams]: 'teams',\n [TranscendPullResource.Messages]: 'messages',\n [TranscendPullResource.PrivacyCenters]: 'privacy-center',\n [TranscendPullResource.Policies]: 'policies',\n [TranscendPullResource.Assessments]: 'assessments',\n [TranscendPullResource.AssessmentTemplates]: 'assessment-templates',\n [TranscendPullResource.Purposes]: 'purposes',\n};\n\nexport const SCOPES_BY_TITLE = keyBy(\n Object.entries(TRANSCEND_SCOPES).map(([name, value]) => ({\n ...value,\n name,\n })),\n 'title',\n) as Record<\n string,\n ScopeDefinition & {\n /** The camelCased name which identifies the scope */\n name: ScopeName;\n }\n>;\n\nexport const SCOPE_TITLES = Object.keys(SCOPES_BY_TITLE);\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkMPI5VURJcjs = require('./chunk-MPI5VURJ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkKC7NDLN7cjs = require('./chunk-KC7NDLN7.cjs');var _crypto = require('crypto'); var E = _interopRequireWildcard(_crypto);var _jsonwebtoken = require('jsonwebtoken'); var $ = _interopRequireWildcard(_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"})}var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var r = _interopRequireWildcard(_iots);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= exports.b =e.intersection([O,e.partial({purposes:e.string})]),G= exports.c =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]))})]);var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _typeutils = require('@transcend-io/type-utils');var R=/^[0-9][Y|N]([Y|N])[Y|N]$/,_= exports.e =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=_chunkKC7NDLN7cjs.f}){let d=_chunkMPI5VURJcjs.Yd.call(void 0, 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 _typeutils.decodeCodec.call(void 0, _,t.purposes),!1}catch (e2){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)}`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Uploading ${n.length} user preferences to partition ${o}`));let w=new Date().getTime(),g=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),S=0;g.start(n.length,0),await _chunkMPI5VURJcjs.b.call(void 0, 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?_typeutils.decodeCodec.call(void 0, _,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(_optionalChain([h, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||"{}");C.error&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error: ${C.error}`))}catch (e3){}throw new Error(`Received an error from server: ${_optionalChain([h, 'optionalAccess', _4 => _4.response, 'optionalAccess', _5 => _5.body])||_optionalChain([h, 'optionalAccess', _6 => _6.message])}`)}S+=1,g.update(S)},{concurrency:f}),g.stop();let j=new Date().getTime()-w;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully uploaded ${n.length} user preferences to partition ${o} in "${j/1e3}" seconds!`))}exports.a = B; exports.b = Y; exports.c = G; exports.d = R; exports.e = _; exports.f = Z;
2
- //# sourceMappingURL=chunk-V4X4IT3T.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkUPUHHIXZcjs = require('./chunk-UPUHHIXZ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunk6IHSPKMPcjs = require('./chunk-6IHSPKMP.cjs');var _crypto = require('crypto'); var E = _interopRequireWildcard(_crypto);var _jsonwebtoken = require('jsonwebtoken'); var $ = _interopRequireWildcard(_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"})}var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var r = _interopRequireWildcard(_iots);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= exports.b =e.intersection([O,e.partial({purposes:e.string})]),G= exports.c =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]))})]);var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);var _typeutils = require('@transcend-io/type-utils');var R=/^[0-9][Y|N]([Y|N])[Y|N]$/,_= exports.e =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=_chunk6IHSPKMPcjs.f}){let d=_chunkUPUHHIXZcjs.Yd.call(void 0, 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 _typeutils.decodeCodec.call(void 0, _,t.purposes),!1}catch (e2){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)}`);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Uploading ${n.length} user preferences to partition ${o}`));let w=new Date().getTime(),g=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),S=0;g.start(n.length,0),await _chunkUPUHHIXZcjs.b.call(void 0, 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?_typeutils.decodeCodec.call(void 0, _,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(_optionalChain([h, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||"{}");C.error&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error: ${C.error}`))}catch (e3){}throw new Error(`Received an error from server: ${_optionalChain([h, 'optionalAccess', _4 => _4.response, 'optionalAccess', _5 => _5.body])||_optionalChain([h, 'optionalAccess', _6 => _6.message])}`)}S+=1,g.update(S)},{concurrency:f}),g.stop();let j=new Date().getTime()-w;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully uploaded ${n.length} user preferences to partition ${o} in "${j/1e3}" seconds!`))}exports.a = B; exports.b = Y; exports.c = G; exports.d = R; exports.e = _; exports.f = Z;
2
+ //# sourceMappingURL=chunk-7G4SCKPN.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-V4X4IT3T.cjs","../src/lib/consent-manager/createConsentToken.ts","../src/lib/consent-manager/types.ts","../src/lib/consent-manager/uploadConsents.ts"],"names":["createConsentToken","userId","base64EncryptionKey","base64SigningKey","signingKey","encryptionKey","encryptionAlgorithm","iv","cipher","jwtPayload","ConsentPreferenceBase","ConsentPreferenceUpload","ConsentPreferenceFetch","USP_STRING_REGEX","PurposeMap","uploadConsents","preferences","partition","concurrency","transcendUrl","DEFAULT_TRANSCEND_CONSENT_API","transcendConsentApi","createTranscendConsentGotInstance","invalidUspStrings","pref"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/chunk-V4X4IT3T.cjs","sourcesContent":[null,"import * as crypto from 'crypto';\nimport * as jwt from 'jsonwebtoken';\n\n/**\n * Function to create a consent manager token\n *\n * @see https://docs.transcend.io/docs/consent/reference/managed-consent-database\n * @param userId - User ID\n * @param base64EncryptionKey - Encryption key\n * @param base64SigningKey - Signing key\n * @returns Token\n */\nexport function createConsentToken(\n userId: string,\n base64EncryptionKey: string,\n base64SigningKey: string,\n): string {\n // Read on for where to find these keys\n const signingKey = Buffer.from(base64SigningKey, 'base64');\n const encryptionKey = Buffer.from(base64EncryptionKey, 'base64');\n\n // NIST's AES-KWP implementation { aes 48 } - see https://tools.ietf.org/html/rfc5649\n const encryptionAlgorithm = 'id-aes256-wrap-pad';\n // Initial Value for AES-KWP integrity check - see https://tools.ietf.org/html/rfc5649#section-3\n const iv = Buffer.from('A65959A6', 'hex');\n // Set up encryption algorithm\n const cipher = crypto.createCipheriv(encryptionAlgorithm, encryptionKey, iv);\n\n // Encrypt the userId and base64-encode the result\n const encryptedIdentifier = Buffer.concat([\n cipher.update(userId),\n cipher.final(),\n ]).toString('base64');\n\n // Create the JWT content - jwt.sign will add a 'iat' (issued at) field to the payload\n // If you wanted to add something manually, consider\n // const issued: Date = new Date();\n // const isoDate = issued.toISOString();\n const jwtPayload = {\n encryptedIdentifier,\n };\n\n // Create a JSON web token and HMAC it with SHA-384\n const consentToken = jwt.sign(jwtPayload, signingKey, {\n algorithm: 'HS384',\n });\n\n return consentToken;\n}\n","import * as t from 'io-ts';\n\nexport const ConsentPreferenceBase = t.intersection([\n t.type({\n /** User ID */\n userId: t.string,\n /** Has the consent been updated (including no-change confirmation) since default resolution */\n timestamp: t.string,\n }),\n t.partial({\n /** Was tracking consent confirmed by the user? If this is false, the consent was resolved from defaults & is not yet confirmed */\n confirmed: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Has the consent been updated (including no-change confirmation) since default resolution\n */\n updated: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)\n */\n prompted: t.union([t.literal('true'), t.literal('false')]),\n /** Consent metadata */\n metadata: t.string,\n /** US Privacy (USP) String */\n usp: t.union([t.string, t.null]),\n /** IAB GPP String */\n gpp: t.union([t.string, t.null]),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceBase = t.TypeOf<typeof ConsentPreferenceUpload>;\n\nexport const ConsentPreferenceUpload = t.intersection([\n ConsentPreferenceBase,\n t.partial({\n /**\n * Purpose map\n * This is a stringified JSON object with keys as purpose names and values as booleans or 'Auto'\n */\n purposes: t.string,\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceUpload = t.TypeOf<typeof ConsentPreferenceUpload>;\n\nexport const ConsentPreferenceFetch = t.intersection([\n ConsentPreferenceBase,\n t.type({\n /** This is the partition key used for the dynamo entry */\n partition: t.string,\n }),\n t.partial({\n /** IAB TCF String */\n tcf: t.union([t.string, t.null]),\n /**\n * Purpose map\n * This is a JSON object with keys as purpose names and values as booleans or 'Auto'\n */\n purposes: t.record(t.string, t.union([t.boolean, t.string])),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceFetch = t.TypeOf<typeof ConsentPreferenceFetch>;\n","import { createTranscendConsentGotInstance } from '../graphql';\nimport colors from 'colors';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_CONSENT_API } from '../../constants';\nimport { map } from '../bluebird-replace';\nimport { createConsentToken } from './createConsentToken';\nimport { logger } from '../../logger';\nimport cliProgress from 'cli-progress';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport type { ConsentPreferenceUpload } from './types';\nimport { ConsentPreferencesBody } from '@transcend-io/airgap.js-types';\n\nexport const USP_STRING_REGEX = /^[0-9][Y|N]([Y|N])[Y|N]$/;\n\nexport const PurposeMap = t.record(\n t.string,\n t.union([t.boolean, t.literal('Auto')]),\n);\n\n/**\n * Upload a set of consent preferences\n *\n * @param options - Options\n */\nexport async function uploadConsents({\n base64EncryptionKey,\n base64SigningKey,\n preferences,\n partition,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_CONSENT_API,\n}: {\n /** base64 encryption key */\n base64EncryptionKey: string;\n /** base64 signing key */\n base64SigningKey: string;\n /** Partition key */\n partition: string;\n /** Sombra API key authentication */\n preferences: ConsentPreferenceUpload[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Concurrency limit for approving */\n concurrency?: number;\n}): Promise<void> {\n // Create connection to API\n const transcendConsentApi = createTranscendConsentGotInstance(transcendUrl);\n\n // Ensure usp strings are valid\n const invalidUspStrings = preferences.filter(\n (pref) => pref.usp && !USP_STRING_REGEX.test(pref.usp),\n );\n if (invalidUspStrings.length > 0) {\n throw new Error(\n `Received invalid usp strings: ${JSON.stringify(\n invalidUspStrings,\n null,\n 2,\n )}`,\n );\n }\n\n // Ensure purpose maps are valid\n const invalidPurposeMaps = preferences\n .map((pref, ind) => [pref, ind] as [ConsentPreferenceUpload, number])\n .filter(([pref]) => {\n if (!pref.purposes) {\n return false;\n }\n try {\n decodeCodec(PurposeMap, pref.purposes);\n return false;\n } catch {\n return true;\n }\n });\n if (invalidPurposeMaps.length > 0) {\n throw new Error(\n `Received invalid purpose maps: ${JSON.stringify(\n invalidPurposeMaps,\n null,\n 2,\n )}`,\n );\n }\n\n // Ensure usp or preferences are provided\n const invalidInputs = preferences.filter(\n (pref) => !pref.usp && !pref.purposes,\n );\n if (invalidInputs.length > 0) {\n throw new Error(\n `Received invalid inputs, expected either purposes or usp to be defined: ${JSON.stringify(\n invalidInputs,\n null,\n 2,\n )}`,\n );\n }\n\n logger.info(\n colors.magenta(\n `Uploading ${preferences.length} user preferences to partition ${partition}`,\n ),\n );\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Build a GraphQL client\n let total = 0;\n progressBar.start(preferences.length, 0);\n await map(\n preferences,\n async ({\n userId,\n confirmed = 'true',\n updated,\n prompted,\n purposes,\n ...consent\n }) => {\n const token = createConsentToken(\n userId,\n base64EncryptionKey,\n base64SigningKey,\n );\n\n // parse usp string\n const [, saleStatus] = consent.usp\n ? USP_STRING_REGEX.exec(consent.usp) || []\n : [];\n\n const input = {\n token,\n partition,\n consent: {\n confirmed: confirmed === 'true',\n purposes: purposes\n ? decodeCodec(PurposeMap, purposes)\n : consent.usp\n ? { SaleOfInfo: saleStatus === 'Y' }\n : {},\n ...(updated ? { updated: updated === 'true' } : {}),\n ...(prompted ? { prompted: prompted === 'true' } : {}),\n ...consent,\n },\n } as ConsentPreferencesBody;\n\n // Make the request\n try {\n await transcendConsentApi\n .post('sync', {\n json: input,\n })\n .json();\n } catch (err) {\n try {\n const parsed = JSON.parse(err?.response?.body || '{}');\n if (parsed.error) {\n logger.error(colors.red(`Error: ${parsed.error}`));\n }\n } catch (e) {\n // continue\n }\n throw new Error(\n `Received an error from server: ${\n err?.response?.body || err?.message\n }`,\n );\n }\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully uploaded ${\n preferences.length\n } user preferences to partition ${partition} in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-7G4SCKPN.cjs","../src/lib/consent-manager/createConsentToken.ts","../src/lib/consent-manager/types.ts","../src/lib/consent-manager/uploadConsents.ts"],"names":["createConsentToken","userId","base64EncryptionKey","base64SigningKey","signingKey","encryptionKey","encryptionAlgorithm","iv","cipher","jwtPayload","ConsentPreferenceBase","ConsentPreferenceUpload","ConsentPreferenceFetch","USP_STRING_REGEX","PurposeMap","uploadConsents","preferences","partition","concurrency","transcendUrl","DEFAULT_TRANSCEND_CONSENT_API","transcendConsentApi","createTranscendConsentGotInstance","invalidUspStrings","pref"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/chunk-7G4SCKPN.cjs","sourcesContent":[null,"import * as crypto from 'crypto';\nimport * as jwt from 'jsonwebtoken';\n\n/**\n * Function to create a consent manager token\n *\n * @see https://docs.transcend.io/docs/consent/reference/managed-consent-database\n * @param userId - User ID\n * @param base64EncryptionKey - Encryption key\n * @param base64SigningKey - Signing key\n * @returns Token\n */\nexport function createConsentToken(\n userId: string,\n base64EncryptionKey: string,\n base64SigningKey: string,\n): string {\n // Read on for where to find these keys\n const signingKey = Buffer.from(base64SigningKey, 'base64');\n const encryptionKey = Buffer.from(base64EncryptionKey, 'base64');\n\n // NIST's AES-KWP implementation { aes 48 } - see https://tools.ietf.org/html/rfc5649\n const encryptionAlgorithm = 'id-aes256-wrap-pad';\n // Initial Value for AES-KWP integrity check - see https://tools.ietf.org/html/rfc5649#section-3\n const iv = Buffer.from('A65959A6', 'hex');\n // Set up encryption algorithm\n const cipher = crypto.createCipheriv(encryptionAlgorithm, encryptionKey, iv);\n\n // Encrypt the userId and base64-encode the result\n const encryptedIdentifier = Buffer.concat([\n cipher.update(userId),\n cipher.final(),\n ]).toString('base64');\n\n // Create the JWT content - jwt.sign will add a 'iat' (issued at) field to the payload\n // If you wanted to add something manually, consider\n // const issued: Date = new Date();\n // const isoDate = issued.toISOString();\n const jwtPayload = {\n encryptedIdentifier,\n };\n\n // Create a JSON web token and HMAC it with SHA-384\n const consentToken = jwt.sign(jwtPayload, signingKey, {\n algorithm: 'HS384',\n });\n\n return consentToken;\n}\n","import * as t from 'io-ts';\n\nexport const ConsentPreferenceBase = t.intersection([\n t.type({\n /** User ID */\n userId: t.string,\n /** Has the consent been updated (including no-change confirmation) since default resolution */\n timestamp: t.string,\n }),\n t.partial({\n /** Was tracking consent confirmed by the user? If this is false, the consent was resolved from defaults & is not yet confirmed */\n confirmed: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Has the consent been updated (including no-change confirmation) since default resolution\n */\n updated: t.union([t.literal('true'), t.literal('false')]),\n /**\n * Whether or not the UI has been shown to the end-user (undefined in older versions of airgap.js)\n */\n prompted: t.union([t.literal('true'), t.literal('false')]),\n /** Consent metadata */\n metadata: t.string,\n /** US Privacy (USP) String */\n usp: t.union([t.string, t.null]),\n /** IAB GPP String */\n gpp: t.union([t.string, t.null]),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceBase = t.TypeOf<typeof ConsentPreferenceUpload>;\n\nexport const ConsentPreferenceUpload = t.intersection([\n ConsentPreferenceBase,\n t.partial({\n /**\n * Purpose map\n * This is a stringified JSON object with keys as purpose names and values as booleans or 'Auto'\n */\n purposes: t.string,\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceUpload = t.TypeOf<typeof ConsentPreferenceUpload>;\n\nexport const ConsentPreferenceFetch = t.intersection([\n ConsentPreferenceBase,\n t.type({\n /** This is the partition key used for the dynamo entry */\n partition: t.string,\n }),\n t.partial({\n /** IAB TCF String */\n tcf: t.union([t.string, t.null]),\n /**\n * Purpose map\n * This is a JSON object with keys as purpose names and values as booleans or 'Auto'\n */\n purposes: t.record(t.string, t.union([t.boolean, t.string])),\n }),\n]);\n\n/** Type override */\nexport type ConsentPreferenceFetch = t.TypeOf<typeof ConsentPreferenceFetch>;\n","import { createTranscendConsentGotInstance } from '../graphql';\nimport colors from 'colors';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_CONSENT_API } from '../../constants';\nimport { map } from '../bluebird-replace';\nimport { createConsentToken } from './createConsentToken';\nimport { logger } from '../../logger';\nimport cliProgress from 'cli-progress';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport type { ConsentPreferenceUpload } from './types';\nimport { ConsentPreferencesBody } from '@transcend-io/airgap.js-types';\n\nexport const USP_STRING_REGEX = /^[0-9][Y|N]([Y|N])[Y|N]$/;\n\nexport const PurposeMap = t.record(\n t.string,\n t.union([t.boolean, t.literal('Auto')]),\n);\n\n/**\n * Upload a set of consent preferences\n *\n * @param options - Options\n */\nexport async function uploadConsents({\n base64EncryptionKey,\n base64SigningKey,\n preferences,\n partition,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_CONSENT_API,\n}: {\n /** base64 encryption key */\n base64EncryptionKey: string;\n /** base64 signing key */\n base64SigningKey: string;\n /** Partition key */\n partition: string;\n /** Sombra API key authentication */\n preferences: ConsentPreferenceUpload[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Concurrency limit for approving */\n concurrency?: number;\n}): Promise<void> {\n // Create connection to API\n const transcendConsentApi = createTranscendConsentGotInstance(transcendUrl);\n\n // Ensure usp strings are valid\n const invalidUspStrings = preferences.filter(\n (pref) => pref.usp && !USP_STRING_REGEX.test(pref.usp),\n );\n if (invalidUspStrings.length > 0) {\n throw new Error(\n `Received invalid usp strings: ${JSON.stringify(\n invalidUspStrings,\n null,\n 2,\n )}`,\n );\n }\n\n // Ensure purpose maps are valid\n const invalidPurposeMaps = preferences\n .map((pref, ind) => [pref, ind] as [ConsentPreferenceUpload, number])\n .filter(([pref]) => {\n if (!pref.purposes) {\n return false;\n }\n try {\n decodeCodec(PurposeMap, pref.purposes);\n return false;\n } catch {\n return true;\n }\n });\n if (invalidPurposeMaps.length > 0) {\n throw new Error(\n `Received invalid purpose maps: ${JSON.stringify(\n invalidPurposeMaps,\n null,\n 2,\n )}`,\n );\n }\n\n // Ensure usp or preferences are provided\n const invalidInputs = preferences.filter(\n (pref) => !pref.usp && !pref.purposes,\n );\n if (invalidInputs.length > 0) {\n throw new Error(\n `Received invalid inputs, expected either purposes or usp to be defined: ${JSON.stringify(\n invalidInputs,\n null,\n 2,\n )}`,\n );\n }\n\n logger.info(\n colors.magenta(\n `Uploading ${preferences.length} user preferences to partition ${partition}`,\n ),\n );\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar(\n {},\n cliProgress.Presets.shades_classic,\n );\n\n // Build a GraphQL client\n let total = 0;\n progressBar.start(preferences.length, 0);\n await map(\n preferences,\n async ({\n userId,\n confirmed = 'true',\n updated,\n prompted,\n purposes,\n ...consent\n }) => {\n const token = createConsentToken(\n userId,\n base64EncryptionKey,\n base64SigningKey,\n );\n\n // parse usp string\n const [, saleStatus] = consent.usp\n ? USP_STRING_REGEX.exec(consent.usp) || []\n : [];\n\n const input = {\n token,\n partition,\n consent: {\n confirmed: confirmed === 'true',\n purposes: purposes\n ? decodeCodec(PurposeMap, purposes)\n : consent.usp\n ? { SaleOfInfo: saleStatus === 'Y' }\n : {},\n ...(updated ? { updated: updated === 'true' } : {}),\n ...(prompted ? { prompted: prompted === 'true' } : {}),\n ...consent,\n },\n } as ConsentPreferencesBody;\n\n // Make the request\n try {\n await transcendConsentApi\n .post('sync', {\n json: input,\n })\n .json();\n } catch (err) {\n try {\n const parsed = JSON.parse(err?.response?.body || '{}');\n if (parsed.error) {\n logger.error(colors.red(`Error: ${parsed.error}`));\n }\n } catch (e) {\n // continue\n }\n throw new Error(\n `Received an error from server: ${\n err?.response?.body || err?.message\n }`,\n );\n }\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully uploaded ${\n preferences.length\n } user preferences to partition ${partition} in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n}\n"]}