@transcend-io/cli 8.1.6 → 8.1.8

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 (110) hide show
  1. package/README.md +5 -2
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-VKNIPZ42.cjs → chunk-22FMPHOU.cjs} +2 -2
  6. package/dist/{chunk-VKNIPZ42.cjs.map → chunk-22FMPHOU.cjs.map} +1 -1
  7. package/dist/{chunk-3BZWG5GJ.cjs → chunk-2CCKVEWS.cjs} +2 -2
  8. package/dist/{chunk-3BZWG5GJ.cjs.map → chunk-2CCKVEWS.cjs.map} +1 -1
  9. package/dist/{chunk-VGTGGUCM.cjs → chunk-6LMZMYBN.cjs} +2 -2
  10. package/dist/{chunk-VGTGGUCM.cjs.map → chunk-6LMZMYBN.cjs.map} +1 -1
  11. package/dist/{chunk-SADDDAXF.cjs → chunk-FK7EPQ7K.cjs} +2 -2
  12. package/dist/{chunk-SADDDAXF.cjs.map → chunk-FK7EPQ7K.cjs.map} +1 -1
  13. package/dist/{chunk-VXJ3QION.cjs → chunk-IXOC4S5L.cjs} +3 -3
  14. package/dist/{chunk-VXJ3QION.cjs.map → chunk-IXOC4S5L.cjs.map} +1 -1
  15. package/dist/{chunk-OAG7DICW.cjs → chunk-K45V7WKN.cjs} +2 -2
  16. package/dist/{chunk-OAG7DICW.cjs.map → chunk-K45V7WKN.cjs.map} +1 -1
  17. package/dist/{chunk-J5D25IXA.cjs → chunk-L3GIP73U.cjs} +20 -20
  18. package/dist/{chunk-J5D25IXA.cjs.map → chunk-L3GIP73U.cjs.map} +1 -1
  19. package/dist/{chunk-GVK66NZA.cjs → chunk-TXG7TJLK.cjs} +2 -2
  20. package/dist/{chunk-GVK66NZA.cjs.map → chunk-TXG7TJLK.cjs.map} +1 -1
  21. package/dist/{chunk-JEH3FW7J.cjs → chunk-UTU4F57H.cjs} +4 -4
  22. package/dist/{chunk-JEH3FW7J.cjs.map → chunk-UTU4F57H.cjs.map} +1 -1
  23. package/dist/{chunk-5CDEM565.cjs → chunk-VWFYPZ4Q.cjs} +2 -2
  24. package/dist/{chunk-5CDEM565.cjs.map → chunk-VWFYPZ4Q.cjs.map} +1 -1
  25. package/dist/{chunk-OFZ7ZSEV.cjs → chunk-WI7C7KDM.cjs} +2 -2
  26. package/dist/{chunk-OFZ7ZSEV.cjs.map → chunk-WI7C7KDM.cjs.map} +1 -1
  27. package/dist/{chunk-UW2YF6JM.cjs → chunk-XCTTKA6C.cjs} +4 -4
  28. package/dist/{chunk-UW2YF6JM.cjs.map → chunk-XCTTKA6C.cjs.map} +1 -1
  29. package/dist/{impl-Y2QTEYJ5.cjs → impl-24WF6BP2.cjs} +2 -2
  30. package/dist/{impl-Y2QTEYJ5.cjs.map → impl-24WF6BP2.cjs.map} +1 -1
  31. package/dist/{impl-IJTQXS6O.cjs → impl-2YFKUYD6.cjs} +2 -2
  32. package/dist/{impl-IJTQXS6O.cjs.map → impl-2YFKUYD6.cjs.map} +1 -1
  33. package/dist/{impl-P4SXH5YA.cjs → impl-57VL3VKK.cjs} +2 -2
  34. package/dist/{impl-P4SXH5YA.cjs.map → impl-57VL3VKK.cjs.map} +1 -1
  35. package/dist/{impl-43UGCXOQ.cjs → impl-6RCILBC5.cjs} +2 -2
  36. package/dist/{impl-43UGCXOQ.cjs.map → impl-6RCILBC5.cjs.map} +1 -1
  37. package/dist/{impl-UOHFNQMH.cjs → impl-76RWHLA4.cjs} +2 -2
  38. package/dist/{impl-UOHFNQMH.cjs.map → impl-76RWHLA4.cjs.map} +1 -1
  39. package/dist/{impl-3THXGCQP.cjs → impl-AA2S5XWZ.cjs} +2 -2
  40. package/dist/{impl-3THXGCQP.cjs.map → impl-AA2S5XWZ.cjs.map} +1 -1
  41. package/dist/{impl-E3URUIOG.cjs → impl-AYAPFSK5.cjs} +2 -2
  42. package/dist/{impl-E3URUIOG.cjs.map → impl-AYAPFSK5.cjs.map} +1 -1
  43. package/dist/{impl-H3AZBUG5.cjs → impl-DBWCR5EV.cjs} +2 -2
  44. package/dist/{impl-H3AZBUG5.cjs.map → impl-DBWCR5EV.cjs.map} +1 -1
  45. package/dist/{impl-N7G3LUCY.cjs → impl-DOPOJXH2.cjs} +2 -2
  46. package/dist/{impl-N7G3LUCY.cjs.map → impl-DOPOJXH2.cjs.map} +1 -1
  47. package/dist/{impl-Q3KJJPJO.cjs → impl-FXYNZQL3.cjs} +2 -2
  48. package/dist/{impl-Q3KJJPJO.cjs.map → impl-FXYNZQL3.cjs.map} +1 -1
  49. package/dist/{impl-WQY2NAQM.cjs → impl-GZ2ZIYWN.cjs} +2 -2
  50. package/dist/{impl-WQY2NAQM.cjs.map → impl-GZ2ZIYWN.cjs.map} +1 -1
  51. package/dist/{impl-4TH3KKOU.cjs → impl-IP7IRDK3.cjs} +2 -2
  52. package/dist/{impl-4TH3KKOU.cjs.map → impl-IP7IRDK3.cjs.map} +1 -1
  53. package/dist/{impl-4OHRVXEI.cjs → impl-JLVAP3PH.cjs} +2 -2
  54. package/dist/{impl-4OHRVXEI.cjs.map → impl-JLVAP3PH.cjs.map} +1 -1
  55. package/dist/{impl-7RHWAGHN.cjs → impl-KFML3O7R.cjs} +2 -2
  56. package/dist/{impl-7RHWAGHN.cjs.map → impl-KFML3O7R.cjs.map} +1 -1
  57. package/dist/{impl-6A3ARA2O.cjs → impl-KZATCJTP.cjs} +6 -6
  58. package/dist/{impl-6A3ARA2O.cjs.map → impl-KZATCJTP.cjs.map} +1 -1
  59. package/dist/{impl-FFNYFUNL.cjs → impl-MCCYBIUO.cjs} +2 -2
  60. package/dist/{impl-FFNYFUNL.cjs.map → impl-MCCYBIUO.cjs.map} +1 -1
  61. package/dist/{impl-N3T5JJN3.cjs → impl-MKEVOXWE.cjs} +2 -2
  62. package/dist/{impl-N3T5JJN3.cjs.map → impl-MKEVOXWE.cjs.map} +1 -1
  63. package/dist/{impl-KULLM3ES.cjs → impl-N24QF4DA.cjs} +5 -5
  64. package/dist/{impl-KULLM3ES.cjs.map → impl-N24QF4DA.cjs.map} +1 -1
  65. package/dist/{impl-WDHTHO7S.cjs → impl-NCKHD5HN.cjs} +3 -3
  66. package/dist/{impl-WDHTHO7S.cjs.map → impl-NCKHD5HN.cjs.map} +1 -1
  67. package/dist/{impl-FXW73S5T.cjs → impl-NFM4JZLR.cjs} +2 -2
  68. package/dist/{impl-FXW73S5T.cjs.map → impl-NFM4JZLR.cjs.map} +1 -1
  69. package/dist/{impl-DRCKNEM2.cjs → impl-NNT5EBMK.cjs} +2 -2
  70. package/dist/{impl-DRCKNEM2.cjs.map → impl-NNT5EBMK.cjs.map} +1 -1
  71. package/dist/{impl-Z3VKOYUT.cjs → impl-NPNBU4L2.cjs} +2 -2
  72. package/dist/{impl-Z3VKOYUT.cjs.map → impl-NPNBU4L2.cjs.map} +1 -1
  73. package/dist/{impl-TP5ZB4AS.cjs → impl-PFPN37IX.cjs} +2 -2
  74. package/dist/{impl-TP5ZB4AS.cjs.map → impl-PFPN37IX.cjs.map} +1 -1
  75. package/dist/{impl-DSNVVZRC.cjs → impl-PZBN6XCO.cjs} +2 -2
  76. package/dist/{impl-DSNVVZRC.cjs.map → impl-PZBN6XCO.cjs.map} +1 -1
  77. package/dist/{impl-TDSXUSMZ.cjs → impl-QK22H5S4.cjs} +2 -2
  78. package/dist/{impl-TDSXUSMZ.cjs.map → impl-QK22H5S4.cjs.map} +1 -1
  79. package/dist/{impl-PPDM46JD.cjs → impl-QTO2EWMC.cjs} +2 -2
  80. package/dist/{impl-PPDM46JD.cjs.map → impl-QTO2EWMC.cjs.map} +1 -1
  81. package/dist/{impl-UANPW425.cjs → impl-RCSSVIJF.cjs} +2 -2
  82. package/dist/{impl-UANPW425.cjs.map → impl-RCSSVIJF.cjs.map} +1 -1
  83. package/dist/{impl-JQTEIK2F.cjs → impl-RD2RWVVR.cjs} +2 -2
  84. package/dist/{impl-JQTEIK2F.cjs.map → impl-RD2RWVVR.cjs.map} +1 -1
  85. package/dist/{impl-67VIE5PB.cjs → impl-RDXUUMXQ.cjs} +2 -2
  86. package/dist/{impl-67VIE5PB.cjs.map → impl-RDXUUMXQ.cjs.map} +1 -1
  87. package/dist/{impl-YENS4XKY.cjs → impl-RM5WL2FX.cjs} +2 -2
  88. package/dist/{impl-YENS4XKY.cjs.map → impl-RM5WL2FX.cjs.map} +1 -1
  89. package/dist/{impl-7RXJTTTG.cjs → impl-RSPCWV5C.cjs} +2 -2
  90. package/dist/{impl-7RXJTTTG.cjs.map → impl-RSPCWV5C.cjs.map} +1 -1
  91. package/dist/{impl-FUTK5GS3.cjs → impl-SXGH7WAQ.cjs} +2 -2
  92. package/dist/{impl-FUTK5GS3.cjs.map → impl-SXGH7WAQ.cjs.map} +1 -1
  93. package/dist/{impl-V5BNNVFJ.cjs → impl-T2FIEZLI.cjs} +2 -2
  94. package/dist/{impl-V5BNNVFJ.cjs.map → impl-T2FIEZLI.cjs.map} +1 -1
  95. package/dist/{impl-DSHX3YJG.cjs → impl-T3XZ5262.cjs} +2 -2
  96. package/dist/{impl-DSHX3YJG.cjs.map → impl-T3XZ5262.cjs.map} +1 -1
  97. package/dist/{impl-S5RVN46S.cjs → impl-U67PZO2U.cjs} +5 -5
  98. package/dist/{impl-S5RVN46S.cjs.map → impl-U67PZO2U.cjs.map} +1 -1
  99. package/dist/{impl-H7O5YVYG.cjs → impl-VRKVDMBB.cjs} +3 -3
  100. package/dist/{impl-H7O5YVYG.cjs.map → impl-VRKVDMBB.cjs.map} +1 -1
  101. package/dist/{impl-YLZABO2C.cjs → impl-XGKSU4NG.cjs} +2 -2
  102. package/dist/{impl-YLZABO2C.cjs.map → impl-XGKSU4NG.cjs.map} +1 -1
  103. package/dist/impl-XN2JRARB.cjs +2 -0
  104. package/dist/{impl-534MCRL5.cjs.map → impl-XN2JRARB.cjs.map} +1 -1
  105. package/dist/{impl-IASTUGV6.cjs → impl-YI6MEGDR.cjs} +4 -4
  106. package/dist/{impl-IASTUGV6.cjs.map → impl-YI6MEGDR.cjs.map} +1 -1
  107. package/dist/index.cjs +3 -3
  108. package/dist/index.d.cts +7 -7
  109. package/package.json +1 -1
  110. package/dist/impl-534MCRL5.cjs +0 -2
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkGVK66NZAcjs = require('./chunk-GVK66NZA.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkJEH3FW7Jcjs = require('./chunk-JEH3FW7J.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkOFZ7ZSEVcjs = require('./chunk-OFZ7ZSEV.cjs');require('./chunk-Q7I37FJV.cjs');var _bluebird = require('bluebird');var _fs = require('fs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=_chunkJEH3FW7Jcjs.vc.call(void 0, i,c);try{return!await _chunkJEH3FW7Jcjs.bg.call(void 0, l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(o){return _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An unexpected error occurred syncing the schema: ${o.message}`)),!1}}async function U({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let o=await _chunkGVK66NZAcjs.b.call(void 0, h),N=_chunkJEH3FW7Jcjs.Rf.call(void 0, y),p;if(Array.isArray(o)&&_fs.lstatSync.call(void 0, i).isDirectory()?p=_chunkGVK66NZAcjs.c.call(void 0, i).map(e=>_path.join.call(void 0, i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{_fs.existsSync.call(void 0, e)?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading file "${e}"...`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),this.process.exit(1));try{let r=_chunkSW5CIF5Dcjs.d.call(void 0, e,N);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),this.process.exit(1)}});if(typeof o=="string"){let[e,...r]=s.map(({content:d})=>d),$=_chunkIBTP5OXEcjs.a.call(void 0, e,...r);await I({transcendUrl:c,auth:o,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors. View output above for more information, or check out ${_chunkOFZ7ZSEVcjs.p}`)),this.process.exit(1))}else{if(s.length!==1&&s.length!==o.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${o.length} API key${o.length===1?"":"s"}`);let e=[];await _bluebird.mapSeries.call(void 0, o,async(r,$)=>{let a=`[${$+1}/${o.length}][${r.organizationName}] `;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`~~~
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkTXG7TJLKcjs = require('./chunk-TXG7TJLK.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkUTU4F57Hcjs = require('./chunk-UTU4F57H.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkWI7C7KDMcjs = require('./chunk-WI7C7KDM.cjs');require('./chunk-Q7I37FJV.cjs');var _bluebird = require('bluebird');var _fs = require('fs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=_chunkUTU4F57Hcjs.vc.call(void 0, i,c);try{return!await _chunkUTU4F57Hcjs.bg.call(void 0, l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(o){return _chunkZUNVPK23cjs.a.error(_colors2.default.red(`An unexpected error occurred syncing the schema: ${o.message}`)),!1}}async function U({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let o=await _chunkTXG7TJLKcjs.b.call(void 0, h),N=_chunkUTU4F57Hcjs.Rf.call(void 0, y),p;if(Array.isArray(o)&&_fs.lstatSync.call(void 0, i).isDirectory()?p=_chunkTXG7TJLKcjs.c.call(void 0, i).map(e=>_path.join.call(void 0, i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{_fs.existsSync.call(void 0, e)?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading file "${e}"...`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),this.process.exit(1));try{let r=_chunkSW5CIF5Dcjs.d.call(void 0, e,N);return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),this.process.exit(1)}});if(typeof o=="string"){let[e,...r]=s.map(({content:d})=>d),$=_chunkIBTP5OXEcjs.a.call(void 0, e,...r);await I({transcendUrl:c,auth:o,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors. View output above for more information, or check out ${_chunkWI7C7KDMcjs.p}`)),this.process.exit(1))}else{if(s.length!==1&&s.length!==o.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${o.length} API key${o.length===1?"":"s"}`);let e=[];await _bluebird.mapSeries.call(void 0, o,async(r,$)=>{let a=`[${$+1}/${o.length}][${r.organizationName}] `;_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`~~~
2
2
 
3
3
  ${a}Attempting to push configuration...
4
4
 
5
- ~~~`));let d=s.length===1?s[0].content:_optionalChain([s, 'access', _ => _.find, 'call', _2 => _2(E=>E.name===r.organizationName), 'optionalAccess', _3 => _3.content]);if(!d){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:d,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?_chunkZUNVPK23cjs.a.info(_colors2.default.green(`${a}Successfully pushed configuration!`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${_chunkOFZ7ZSEVcjs.p}`)),this.process.exit(1))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced yaml file to Transcend! View at ${_chunkOFZ7ZSEVcjs.p}`))}exports.push = U;
6
- //# sourceMappingURL=impl-H7O5YVYG.cjs.map
5
+ ~~~`));let d=s.length===1?s[0].content:_optionalChain([s, 'access', _ => _.find, 'call', _2 => _2(E=>E.name===r.organizationName), 'optionalAccess', _3 => _3.content]);if(!d){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:d,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?_chunkZUNVPK23cjs.a.info(_colors2.default.green(`${a}Successfully pushed configuration!`)):(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(_chunkZUNVPK23cjs.a.info(_colors2.default.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${_chunkWI7C7KDMcjs.p}`)),this.process.exit(1))}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced yaml file to Transcend! View at ${_chunkWI7C7KDMcjs.p}`))}exports.push = U;
6
+ //# sourceMappingURL=impl-VRKVDMBB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-H7O5YVYG.cjs","../src/commands/inventory/push/impl.ts"],"names":["syncConfiguration","transcendUrl","auth","pageSize","publishToPrivacyCenter","contents","deleteExtraAttributeValues","classifyService","client","buildTranscendGraphQLClient","syncConfigurationToTranscend","err","logger","colors"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAgD,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,oCCGnX,wBACY,4BACjB,gFAEF,MAmBnB,SAAeA,CAAAA,CAAkB,CAC/B,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,0BAAA,CAAAC,CAAAA,CAA6B,CAAA,CAAA,CAC7B,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CACpB,CAAA,CAeqB,CACnB,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcC,CAAI,CAAA,CAG7D,GAAI,CAWF,MAAO,CAVkB,MAAMQ,kCAAAA,CAC7BL,CACAG,CAAAA,CACA,CACE,QAAA,CAAAL,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAG,CAAAA,CACA,0BAAA,CAAAD,CACF,CACF,CAEF,CAAA,KAAA,CAASK,CAAAA,CAAK,CACZ,OAAAC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,iDAAA,EAAoDF,CAAAA,CAAI,OAAO,CAAA,CAAA;AAsI7D;AAAgB;AAAA;AA8D1B,GAAA","file":"/home/runner/work/cli/cli/dist/impl-H7O5YVYG.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from 'bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-VRKVDMBB.cjs","../src/commands/inventory/push/impl.ts"],"names":["syncConfiguration","transcendUrl","auth","pageSize","publishToPrivacyCenter","contents","deleteExtraAttributeValues","classifyService","client","buildTranscendGraphQLClient","syncConfigurationToTranscend","err","logger","colors"],"mappings":"AAAA,quBAAwC,wDAAyC,wDAAgD,gCAA6B,wDAAyC,wDAA0D,gCAA6B,wDAAyC,wDAAyC,gCAA6B,oCCGnX,wBACY,4BACjB,gFAEF,MAmBnB,SAAeA,CAAAA,CAAkB,CAC/B,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,0BAAA,CAAAC,CAAAA,CAA6B,CAAA,CAAA,CAC7B,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CACpB,CAAA,CAeqB,CACnB,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BR,CAAcC,CAAI,CAAA,CAG7D,GAAI,CAWF,MAAO,CAVkB,MAAMQ,kCAAAA,CAC7BL,CACAG,CAAAA,CACA,CACE,QAAA,CAAAL,CAAAA,CACA,sBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAG,CAAAA,CACA,0BAAA,CAAAD,CACF,CACF,CAEF,CAAA,KAAA,CAASK,CAAAA,CAAK,CACZ,OAAAC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,iDAAA,EAAoDF,CAAAA,CAAI,OAAO,CAAA,CAAA;AAsI7D;AAAgB;AAAA;AA8D1B,GAAA","file":"/home/runner/work/cli/cli/dist/impl-VRKVDMBB.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from 'bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk5CDEM565cjs = require('./chunk-5CDEM565.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkJEH3FW7Jcjs = require('./chunk-JEH3FW7J.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkOFZ7ZSEVcjs = require('./chunk-OFZ7ZSEV.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _bluebird = require('bluebird');async function Z({file:l,fileTarget:f,transcendUrl:p,auth:g,sombraAuth:x,cronDataSiloId:v,targetDataSiloId:N,actions:R,skipRequestCount:h,pageLimit:s,chunkSize:r}){h&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(r)||r<=0||r%s!==0)&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Invalid chunk size: "${r}". Must be a positive integer that is a multiple of ${s}.`)),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let S=_chunkJEH3FW7Jcjs.vc.call(void 0, p,g),{baseName:j,extension:O}=_chunkLR3CPNDMcjs.d.call(void 0, l),{baseName:A,extension:D}=_chunkLR3CPNDMcjs.d.call(void 0, f),$=0,b=0,d=0;await _chunk5CDEM565cjs.g.call(void 0, {dataSiloId:v,auth:g,sombraAuth:x,actions:R,apiPageSize:s,savePageSize:r,onSave:async n=>{$+=n.length;let k=n.map(t=>t.requestId),E=_chunkOFZ7ZSEVcjs.j.call(void 0, k),G=_chunkOFZ7ZSEVcjs.b.call(void 0, E,s),y=await _bluebird.map.call(void 0, G,async t=>(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching target identifiers for ${t.length} requests`)),(await _chunkJEH3FW7Jcjs.Fd.call(void 0, S,s*2,{requestIds:t,dataSiloIds:[N]})).map(({fileName:I,remoteId:C})=>{if(!C)throw new Error(`Failed to find remoteId for ${I}`);return{RecordId:C,Object:_optionalChain([I, 'access', _ => _.replace, 'call', _2 => _2(".json",""), 'access', _3 => _3.split, 'call', _4 => _4("/"), 'access', _5 => _5.pop, 'call', _6 => _6(), 'optionalAccess', _7 => _7.replace, 'call', _8 => _8(" Information","")]),Comment:"Customer data deletion request submitted via transcend.io"}})),{concurrency:1});b+=y.flat().length;let M=_chunkOFZ7ZSEVcjs.j.call(void 0, n.map(t=>Object.keys(t)).flat()),Q=`${j}-${d}${O}`,T=`${A}-${d}${D}`;_chunkLR3CPNDMcjs.c.call(void 0, Q,n,M),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${n.length} identifiers to file "${l}"`));let o=y.flat(),V=_chunkOFZ7ZSEVcjs.j.call(void 0, o.map(t=>Object.keys(t)).flat());_chunkLR3CPNDMcjs.c.call(void 0, T,o,V),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${o.length} identifiers to file "${f}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processed chunk of ${_chunkOFZ7ZSEVcjs.b.length} identifiers, found ${o.length} target identifiers`)),d+=1},transcendUrl:p,skipRequestCount:h}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${$} identifiers to file "${l}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${b} identifiers to file "${f}"`))}exports.pullProfiles = Z;
2
- //# sourceMappingURL=impl-YLZABO2C.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunkVWFYPZ4Qcjs = require('./chunk-VWFYPZ4Q.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkUTU4F57Hcjs = require('./chunk-UTU4F57H.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkWI7C7KDMcjs = require('./chunk-WI7C7KDM.cjs');require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _bluebird = require('bluebird');async function Z({file:l,fileTarget:f,transcendUrl:p,auth:g,sombraAuth:x,cronDataSiloId:v,targetDataSiloId:N,actions:R,skipRequestCount:h,pageLimit:s,chunkSize:r}){h&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(r)||r<=0||r%s!==0)&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Invalid chunk size: "${r}". Must be a positive integer that is a multiple of ${s}.`)),this.process.exit(1)),_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let S=_chunkUTU4F57Hcjs.vc.call(void 0, p,g),{baseName:j,extension:O}=_chunkLR3CPNDMcjs.d.call(void 0, l),{baseName:A,extension:D}=_chunkLR3CPNDMcjs.d.call(void 0, f),$=0,b=0,d=0;await _chunkVWFYPZ4Qcjs.g.call(void 0, {dataSiloId:v,auth:g,sombraAuth:x,actions:R,apiPageSize:s,savePageSize:r,onSave:async n=>{$+=n.length;let k=n.map(t=>t.requestId),E=_chunkWI7C7KDMcjs.j.call(void 0, k),G=_chunkWI7C7KDMcjs.b.call(void 0, E,s),y=await _bluebird.map.call(void 0, G,async t=>(_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Fetching target identifiers for ${t.length} requests`)),(await _chunkUTU4F57Hcjs.Fd.call(void 0, S,s*2,{requestIds:t,dataSiloIds:[N]})).map(({fileName:I,remoteId:C})=>{if(!C)throw new Error(`Failed to find remoteId for ${I}`);return{RecordId:C,Object:_optionalChain([I, 'access', _ => _.replace, 'call', _2 => _2(".json",""), 'access', _3 => _3.split, 'call', _4 => _4("/"), 'access', _5 => _5.pop, 'call', _6 => _6(), 'optionalAccess', _7 => _7.replace, 'call', _8 => _8(" Information","")]),Comment:"Customer data deletion request submitted via transcend.io"}})),{concurrency:1});b+=y.flat().length;let M=_chunkWI7C7KDMcjs.j.call(void 0, n.map(t=>Object.keys(t)).flat()),Q=`${j}-${d}${O}`,T=`${A}-${d}${D}`;_chunkLR3CPNDMcjs.c.call(void 0, Q,n,M),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${n.length} identifiers to file "${l}"`));let o=y.flat(),V=_chunkWI7C7KDMcjs.j.call(void 0, o.map(t=>Object.keys(t)).flat());_chunkLR3CPNDMcjs.c.call(void 0, T,o,V),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${o.length} identifiers to file "${f}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processed chunk of ${_chunkWI7C7KDMcjs.b.length} identifiers, found ${o.length} target identifiers`)),d+=1},transcendUrl:p,skipRequestCount:h}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${$} identifiers to file "${l}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${b} identifiers to file "${f}"`))}exports.pullProfiles = Z;
2
+ //# sourceMappingURL=impl-XGKSU4NG.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YLZABO2C.cjs","../src/commands/request/cron/pull-profiles/impl.ts"],"names":["pullProfiles","file","fileTarget","transcendUrl","auth","sombraAuth","cronDataSiloId","targetDataSiloId","actions","skipRequestCount","pageLimit","chunkSize","logger","colors","doneInputValidation","client","buildTranscendGraphQLClient","baseName","extension","parseFilePath","baseNameTarget","extensionTarget","allIdentifiersCount","allTargetIdentifiersCount","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunkToSave","requestIds","d","uniqueRequestIds","uniq_default","chunkedRequestIds","chunk_default","results","map","fetchRequestFilesForRequest","fileName","remoteId"],"mappings":"AAAA,quBAAwC,wDAAgD,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAgD,gCAA6B,gFCEnT,oCAEC,MA4BpB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXF,CAAAA,EACFG,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYD,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDD,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBI,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAASC,kCAAAA,CAA4Bb,CAAcC,CAAI,CAAA,CACvD,CAAE,QAAA,CAAAa,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,iCAAAA,CAAkB,CAAA,CAC5C,CAAE,QAAA,CAAUC,CAAAA,CAAgB,SAAA,CAAWC,CAAgB,CAAA,CAC3DF,iCAAAA,CAAwB,CAAA,CAEtBG,CAAAA,CAAsB,CAAA,CACtBC,CAAAA,CAA4B,CAAA,CAC5BC,CAAAA,CAAY,CAAA,CAmFhB,MAAMC,iCAAAA,CACJ,UAAA,CAAYnB,CAAAA,CACZ,IAAA,CAAAF,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAG,CAAAA,CACA,WAAA,CAAaE,CAAAA,CACb,YAAA,CAAcC,CAAAA,CACd,MAAA,CAxFa,MACbe,CAAAA,EACkB,CAElBJ,CAAAA,EAAuBI,CAAAA,CAAY,MAAA,CAGnC,IAAMC,CAAAA,CAAaD,CAAAA,CAAY,GAAA,CAAKE,CAAAA,EAAMA,CAAAA,CAAE,SAAmB,CAAA,CACzDC,CAAAA,CAAmBC,iCAAAA,CAAe,CAAA,CAGlCC,CAAAA,CAAoBC,iCAAAA,CAAMH,CAAkBnB,CAAS,CAAA,CACrDuB,CAAAA,CAAU,MAAMC,2BAAAA,CACpBH,CACA,MAAOJ,CAAAA,EAAAA,CACLf,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,gCAAA,EAAmCc,CAAAA,CAAW,MAAM,CAAA,SAAA,CACtD,CACF,CAAA,CAAA,CACgB,MAAMQ,kCAAAA,CACpBpB,CACAL,CAAAA,CAAY,CAAA,CACZ,CACE,UAAA,CAAAiB,CAAAA,CACA,WAAA,CAAa,CAACpB,CAAgB,CAChC,CACF,CAAA,CAAA,CACe,GAAA,CAAI,CAAC,CAAE,QAAA,CAAA6B,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAA,EAAM,CAC7C,EAAA,CAAI,CAACA,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,CAAA,4BAAA,EAA+BD,CAAQ,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-YLZABO2C.cjs","sourcesContent":[null,"import type { RequestAction } from '@transcend-io/privacy-types';\nimport { logger } from '../../../../logger';\nimport colors from 'colors';\nimport { uniq, chunk } from 'lodash-es';\nimport { map } from 'bluebird';\nimport {\n buildTranscendGraphQLClient,\n fetchRequestFilesForRequest,\n} from '../../../../lib/graphql';\nimport type { LocalContext } from '../../../../context';\nimport {\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n type CsvFormattedIdentifier,\n} from '../../../../lib/cron';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullProfilesCommandFlags {\n file: string;\n fileTarget: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n cronDataSiloId: string;\n targetDataSiloId: string;\n actions: RequestAction[];\n skipRequestCount: boolean;\n pageLimit: number;\n chunkSize: number;\n}\n\nexport async function pullProfiles(\n this: LocalContext,\n {\n file,\n fileTarget,\n transcendUrl,\n auth,\n sombraAuth,\n cronDataSiloId,\n targetDataSiloId,\n actions,\n skipRequestCount,\n pageLimit,\n chunkSize,\n }: PullProfilesCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { baseName, extension } = parseFilePath(file);\n const { baseName: baseNameTarget, extension: extensionTarget } =\n parseFilePath(fileTarget);\n\n let allIdentifiersCount = 0;\n let allTargetIdentifiersCount = 0;\n let fileCount = 0;\n // Create onSave callback to handle chunked processing\n const onSave = async (\n chunkToSave: CsvFormattedIdentifier[],\n ): Promise<void> => {\n // Add to all identifiers\n allIdentifiersCount += chunkToSave.length;\n\n // Get unique request IDs from this chunk\n const requestIds = chunkToSave.map((d) => d.requestId as string);\n const uniqueRequestIds = uniq(requestIds);\n\n // Pull down target identifiers for this chunk\n const chunkedRequestIds = chunk(uniqueRequestIds, pageLimit);\n const results = await map(\n chunkedRequestIds,\n async (requestIds) => {\n logger.info(\n colors.magenta(\n `Fetching target identifiers for ${requestIds.length} requests`,\n ),\n );\n const results = await fetchRequestFilesForRequest(\n client,\n pageLimit * 2,\n {\n requestIds,\n dataSiloIds: [targetDataSiloId],\n },\n );\n return results.map(({ fileName, remoteId }) => {\n if (!remoteId) {\n throw new Error(`Failed to find remoteId for ${fileName}`);\n }\n return {\n RecordId: remoteId,\n Object: fileName\n .replace('.json', '')\n .split('/')\n .pop()\n ?.replace(' Information', ''),\n Comment:\n 'Customer data deletion request submitted via transcend.io',\n };\n });\n },\n // We are grabbing all the request files for the 'pageLimit' # of requests at a time\n {\n concurrency: 1,\n },\n );\n\n allTargetIdentifiersCount += results.flat().length;\n\n // Write the identifiers and target identifiers to CSV\n const headers = uniq(chunkToSave.map((d) => Object.keys(d)).flat());\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n const numberedFileNameTarget = `${baseNameTarget}-${fileCount}${extensionTarget}`;\n writeCsv(numberedFileName, chunkToSave, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunkToSave.length} identifiers to file \"${file}\"`,\n ),\n );\n\n const targetIdentifiers = results.flat();\n const headers2 = uniq(targetIdentifiers.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileNameTarget, targetIdentifiers, headers2);\n logger.info(\n colors.green(\n `Successfully wrote ${targetIdentifiers.length} identifiers to file \"${fileTarget}\"`,\n ),\n );\n\n logger.info(\n colors.blue(\n `Processed chunk of ${chunk.length} identifiers, found ${targetIdentifiers.length} target identifiers`,\n ),\n );\n fileCount += 1;\n };\n\n // Pull down outstanding identifiers using the new chunked function\n await pullChunkedCustomSiloOutstandingIdentifiers({\n dataSiloId: cronDataSiloId,\n auth,\n sombraAuth,\n actions,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n transcendUrl,\n skipRequestCount,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${allIdentifiersCount} identifiers to file \"${file}\"`,\n ),\n );\n logger.info(\n colors.green(\n `Successfully wrote ${allTargetIdentifiersCount} identifiers to file \"${fileTarget}\"`,\n ),\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-XGKSU4NG.cjs","../src/commands/request/cron/pull-profiles/impl.ts"],"names":["pullProfiles","file","fileTarget","transcendUrl","auth","sombraAuth","cronDataSiloId","targetDataSiloId","actions","skipRequestCount","pageLimit","chunkSize","logger","colors","doneInputValidation","client","buildTranscendGraphQLClient","baseName","extension","parseFilePath","baseNameTarget","extensionTarget","allIdentifiersCount","allTargetIdentifiersCount","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunkToSave","requestIds","d","uniqueRequestIds","uniq_default","chunkedRequestIds","chunk_default","results","map","fetchRequestFilesForRequest","fileName","remoteId"],"mappings":"AAAA,quBAAwC,wDAAgD,wDAAyC,wDAAkD,gCAA6B,wDAAyC,wDAAgD,gCAA6B,gFCEnT,oCAEC,MA4BpB,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,gBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CACF,CAAA,CACe,CACXF,CAAAA,EACFG,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,uEACF,CACF,CAAA,CAAA,CAIA,MAAA,CAAO,KAAA,CAAMF,CAAS,CAAA,EACtBA,CAAAA,EAAa,CAAA,EACbA,CAAAA,CAAYD,CAAAA,GAAc,CAAA,CAAA,EAAA,CAE1BE,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,qBAAA,EAAwBF,CAAS,CAAA,oDAAA,EAAuDD,CAAS,CAAA,CAAA,CACnG,CACF,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAGrBI,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAASC,kCAAAA,CAA4Bb,CAAcC,CAAI,CAAA,CACvD,CAAE,QAAA,CAAAa,CAAAA,CAAU,SAAA,CAAAC,CAAU,CAAA,CAAIC,iCAAAA,CAAkB,CAAA,CAC5C,CAAE,QAAA,CAAUC,CAAAA,CAAgB,SAAA,CAAWC,CAAgB,CAAA,CAC3DF,iCAAAA,CAAwB,CAAA,CAEtBG,CAAAA,CAAsB,CAAA,CACtBC,CAAAA,CAA4B,CAAA,CAC5BC,CAAAA,CAAY,CAAA,CAmFhB,MAAMC,iCAAAA,CACJ,UAAA,CAAYnB,CAAAA,CACZ,IAAA,CAAAF,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,OAAA,CAAAG,CAAAA,CACA,WAAA,CAAaE,CAAAA,CACb,YAAA,CAAcC,CAAAA,CACd,MAAA,CAxFa,MACbe,CAAAA,EACkB,CAElBJ,CAAAA,EAAuBI,CAAAA,CAAY,MAAA,CAGnC,IAAMC,CAAAA,CAAaD,CAAAA,CAAY,GAAA,CAAKE,CAAAA,EAAMA,CAAAA,CAAE,SAAmB,CAAA,CACzDC,CAAAA,CAAmBC,iCAAAA,CAAe,CAAA,CAGlCC,CAAAA,CAAoBC,iCAAAA,CAAMH,CAAkBnB,CAAS,CAAA,CACrDuB,CAAAA,CAAU,MAAMC,2BAAAA,CACpBH,CACA,MAAOJ,CAAAA,EAAAA,CACLf,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,gCAAA,EAAmCc,CAAAA,CAAW,MAAM,CAAA,SAAA,CACtD,CACF,CAAA,CAAA,CACgB,MAAMQ,kCAAAA,CACpBpB,CACAL,CAAAA,CAAY,CAAA,CACZ,CACE,UAAA,CAAAiB,CAAAA,CACA,WAAA,CAAa,CAACpB,CAAgB,CAChC,CACF,CAAA,CAAA,CACe,GAAA,CAAI,CAAC,CAAE,QAAA,CAAA6B,CAAAA,CAAU,QAAA,CAAAC,CAAS,CAAA,CAAA,EAAM,CAC7C,EAAA,CAAI,CAACA,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,CAAA,4BAAA,EAA+BD,CAAQ,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-XGKSU4NG.cjs","sourcesContent":[null,"import type { RequestAction } from '@transcend-io/privacy-types';\nimport { logger } from '../../../../logger';\nimport colors from 'colors';\nimport { uniq, chunk } from 'lodash-es';\nimport { map } from 'bluebird';\nimport {\n buildTranscendGraphQLClient,\n fetchRequestFilesForRequest,\n} from '../../../../lib/graphql';\nimport type { LocalContext } from '../../../../context';\nimport {\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n type CsvFormattedIdentifier,\n} from '../../../../lib/cron';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface PullProfilesCommandFlags {\n file: string;\n fileTarget: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n cronDataSiloId: string;\n targetDataSiloId: string;\n actions: RequestAction[];\n skipRequestCount: boolean;\n pageLimit: number;\n chunkSize: number;\n}\n\nexport async function pullProfiles(\n this: LocalContext,\n {\n file,\n fileTarget,\n transcendUrl,\n auth,\n sombraAuth,\n cronDataSiloId,\n targetDataSiloId,\n actions,\n skipRequestCount,\n pageLimit,\n chunkSize,\n }: PullProfilesCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { baseName, extension } = parseFilePath(file);\n const { baseName: baseNameTarget, extension: extensionTarget } =\n parseFilePath(fileTarget);\n\n let allIdentifiersCount = 0;\n let allTargetIdentifiersCount = 0;\n let fileCount = 0;\n // Create onSave callback to handle chunked processing\n const onSave = async (\n chunkToSave: CsvFormattedIdentifier[],\n ): Promise<void> => {\n // Add to all identifiers\n allIdentifiersCount += chunkToSave.length;\n\n // Get unique request IDs from this chunk\n const requestIds = chunkToSave.map((d) => d.requestId as string);\n const uniqueRequestIds = uniq(requestIds);\n\n // Pull down target identifiers for this chunk\n const chunkedRequestIds = chunk(uniqueRequestIds, pageLimit);\n const results = await map(\n chunkedRequestIds,\n async (requestIds) => {\n logger.info(\n colors.magenta(\n `Fetching target identifiers for ${requestIds.length} requests`,\n ),\n );\n const results = await fetchRequestFilesForRequest(\n client,\n pageLimit * 2,\n {\n requestIds,\n dataSiloIds: [targetDataSiloId],\n },\n );\n return results.map(({ fileName, remoteId }) => {\n if (!remoteId) {\n throw new Error(`Failed to find remoteId for ${fileName}`);\n }\n return {\n RecordId: remoteId,\n Object: fileName\n .replace('.json', '')\n .split('/')\n .pop()\n ?.replace(' Information', ''),\n Comment:\n 'Customer data deletion request submitted via transcend.io',\n };\n });\n },\n // We are grabbing all the request files for the 'pageLimit' # of requests at a time\n {\n concurrency: 1,\n },\n );\n\n allTargetIdentifiersCount += results.flat().length;\n\n // Write the identifiers and target identifiers to CSV\n const headers = uniq(chunkToSave.map((d) => Object.keys(d)).flat());\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n const numberedFileNameTarget = `${baseNameTarget}-${fileCount}${extensionTarget}`;\n writeCsv(numberedFileName, chunkToSave, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunkToSave.length} identifiers to file \"${file}\"`,\n ),\n );\n\n const targetIdentifiers = results.flat();\n const headers2 = uniq(targetIdentifiers.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileNameTarget, targetIdentifiers, headers2);\n logger.info(\n colors.green(\n `Successfully wrote ${targetIdentifiers.length} identifiers to file \"${fileTarget}\"`,\n ),\n );\n\n logger.info(\n colors.blue(\n `Processed chunk of ${chunk.length} identifiers, found ${targetIdentifiers.length} target identifiers`,\n ),\n );\n fileCount += 1;\n };\n\n // Pull down outstanding identifiers using the new chunked function\n await pullChunkedCustomSiloOutstandingIdentifiers({\n dataSiloId: cronDataSiloId,\n auth,\n sombraAuth,\n actions,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n transcendUrl,\n skipRequestCount,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${allIdentifiersCount} identifiers to file \"${file}\"`,\n ),\n );\n logger.info(\n colors.green(\n `Successfully wrote ${allTargetIdentifiersCount} identifiers to file \"${fileTarget}\"`,\n ),\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIXOC4S5Lcjs = require('./chunk-IXOC4S5L.cjs');require('./chunk-K45V7WKN.cjs');require('./chunk-QEM6S2W7.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-UTU4F57H.cjs');require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-WI7C7KDM.cjs');require('./chunk-Q7I37FJV.cjs');async function m({auth:r,trackerStatus:s,file:a,transcendUrl:e}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkIXOC4S5Lcjs.c.call(void 0, {auth:r,trackerStatus:s,file:a,transcendUrl:e})}exports.uploadCookiesFromCsv = m;
2
+ //# sourceMappingURL=impl-XN2JRARB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-534MCRL5.cjs","../src/commands/consent/upload-cookies-from-csv/impl.ts"],"names":["uploadCookiesFromCsv","auth","trackerStatus","file","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCY5R,SAAsBA,CAAAA,CAEpB,CAAE,IAAA,CAAAC,CAAAA,CAAM,aAAA,CAAAC,CAAAA,CAAe,IAAA,CAAAC,CAAAA,CAAM,YAAA,CAAAC,CAAa,CAAA,CAC3B,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,MAAML,iCAAAA,CACJ,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-534MCRL5.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uploadCookiesFromCsv as uploadCookiesFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadCookiesFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n transcendUrl: string;\n}\n\nexport async function uploadCookiesFromCsv(\n this: LocalContext,\n { auth, trackerStatus, file, transcendUrl }: UploadCookiesFromCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Upload cookies\n await uploadCookiesFromCsvHelper({\n auth,\n trackerStatus,\n file,\n transcendUrl,\n });\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-XN2JRARB.cjs","../src/commands/consent/upload-cookies-from-csv/impl.ts"],"names":["uploadCookiesFromCsv","auth","trackerStatus","file","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCY5R,SAAsBA,CAAAA,CAEpB,CAAE,IAAA,CAAAC,CAAAA,CAAM,aAAA,CAAAC,CAAAA,CAAe,IAAA,CAAAC,CAAAA,CAAM,YAAA,CAAAC,CAAa,CAAA,CAC3B,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,MAAML,iCAAAA,CACJ,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,iCAAA","file":"/home/runner/work/cli/cli/dist/impl-XN2JRARB.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uploadCookiesFromCsv as uploadCookiesFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadCookiesFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n transcendUrl: string;\n}\n\nexport async function uploadCookiesFromCsv(\n this: LocalContext,\n { auth, trackerStatus, file, transcendUrl }: UploadCookiesFromCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Upload cookies\n await uploadCookiesFromCsvHelper({\n auth,\n trackerStatus,\n file,\n transcendUrl,\n });\n}\n"]}
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkJEH3FW7Jcjs = require('./chunk-JEH3FW7J.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkOFZ7ZSEVcjs = require('./chunk-OFZ7ZSEV.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _got = require('got'); var _got2 = _interopRequireDefault(_got);var j=({hostname:t,auth:e})=>_got2.default.extend({prefixUrl:`https://${t}`,headers:{accept:"application/json","content-type":"application/json",authorization:`Bearer ${e}`}});var _yargsparser = require('yargs-parser'); var _yargsparser2 = _interopRequireDefault(_yargsparser);var ve=Object.values(_chunkQ7I37FJVcjs.b);var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);var R=({assessment:t,index:e,total:s,wrap:r=!0})=>{let n="";(e===0||r)&&(n=`[
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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 _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');var _chunkUTU4F57Hcjs = require('./chunk-UTU4F57H.cjs');require('./chunk-LCDYXJN6.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkWI7C7KDMcjs = require('./chunk-WI7C7KDM.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _got = require('got'); var _got2 = _interopRequireDefault(_got);var j=({hostname:t,auth:e})=>_got2.default.extend({prefixUrl:`https://${t}`,headers:{accept:"application/json","content-type":"application/json",authorization:`Bearer ${e}`}});var _yargsparser = require('yargs-parser'); var _yargsparser2 = _interopRequireDefault(_yargsparser);var ve=Object.values(_chunkQ7I37FJVcjs.b);var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);var R=({assessment:t,index:e,total:s,wrap:r=!0})=>{let n="";(e===0||r)&&(n=`[
2
2
  `);let m=JSON.stringify(t),o=s&&e<s-1&&!r?",":"";return n=`${n+m+o}
3
3
  `,(s&&e===s-1||r)&&(n+=`
4
- ]`),n};var q=({file:t,assessment:e,index:s,total:r})=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing enriched assessment ${s+1} of ${r} to file "${t}"...`)),s===0?_fs2.default.writeFileSync(t,R({assessment:e,index:s,total:r,wrap:!1})):_fs2.default.appendFileSync(t,R({assessment:e,index:s,total:r,wrap:!1}))};var _typeutils = require('@transcend-io/type-utils');var _privacytypes = require('@transcend-io/privacy-types');var J=async({oneTrust:t})=>{let e=0,s=1,r=0,n=[];for(;e<s;){let{body:m}=await t.get(`api/assessment/v2/assessments?page=${e}&size=2000`),{page:o,content:u}=_typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetListOfAssessmentsResponse,m);n.push(..._nullishCoalesce(u, () => ([]))),e===0&&(s=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _2 => _2.totalPages]), () => (0)),r=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _3 => _3.totalElements]), () => (0))),e+=1,_chunkZUNVPK23cjs.a.info(`Fetched ${n.length} of ${r} assessments.`)}return n};var K=async({oneTrust:t,assessmentId:e})=>{let{body:s}=await t.get(`api/assessment/v2/assessments/${e}/export?ExcludeSkippedQuestions=false`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetAssessmentResponse,s)};var W=async({oneTrust:t,riskId:e})=>{let{body:s}=await t.get(`api/risk/v2/risks/${e}`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetRiskResponse,s)};var b=async({oneTrust:t,userId:e})=>{let{body:s}=await t.get(`api/scim/v2/Users/${e}`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetUserResponse,s)};var _bluebird = require('bluebird');var H=({assessment:t,assessmentDetails:e,riskDetails:s,creatorDetails:r,approversDetails:n,respondentsDetails:m})=>{let o=_chunkOFZ7ZSEVcjs.e.call(void 0, s,"id"),{sections:u,createdBy:h,...g}=e,O=u.map(i=>{let{questions:A,...$}=i,w=A.map(x=>{let{risks:U,...E}=x,G=(_nullishCoalesce(U, () => ([]))).map(y=>{let v=o[y.riskId];return{...y,...v,level:y.level,impactLevel:_nullishCoalesce(y.impactLevel, () => (0))}});return{...E,risks:G}});return{...$,questions:w}}),p={...h,active:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _4 => _4.active]), () => (!1)),userType:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _5 => _5.userType]), () => ("Internal")),emails:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _6 => _6.emails]), () => ([])),title:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _7 => _7.title]), () => (null)),givenName:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _8 => _8.name, 'access', _9 => _9.givenName]), () => (null)),familyName:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _10 => _10.name, 'access', _11 => _11.familyName]), () => (null))},d=_chunkOFZ7ZSEVcjs.e.call(void 0, n,"id"),l=e.approvers.flatMap(i=>d[i.id]?[{...i,approver:{...i.approver,active:d[i.id].active,userType:d[i.id].userType,emails:d[i.id].emails,title:d[i.id].title,givenName:_nullishCoalesce(d[i.id].name.givenName, () => (null)),familyName:_nullishCoalesce(d[i.id].name.familyName, () => (null))}}]:[]),T=_chunkOFZ7ZSEVcjs.e.call(void 0, m,"id"),C=e.respondents.filter(i=>!i.name.includes("@")).flatMap(i=>T[i.id]?[{...i,active:T[i.id].active,userType:T[i.id].userType,emails:T[i.id].emails,title:T[i.id].title,givenName:_nullishCoalesce(T[i.id].name.givenName, () => (null)),familyName:_nullishCoalesce(T[i.id].name.familyName, () => (null))}]:[]);return{...t,...g,approvers:l,respondents:C,createdBy:p,sections:O}};var k=async({transcend:t,assessment:e,total:s,index:r})=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing enriched assessment ${r+1} ${s?`of ${s} `:" "}to Transcend...`));let m={json:R({assessment:e,index:r,total:s})};try{await _chunkJEH3FW7Jcjs._f.call(void 0, t,_chunkJEH3FW7Jcjs.fa,{input:m})}catch (e2){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to sync assessment ${r+1} ${s?`of ${s} `:" "}to Transcend.
4
+ ]`),n};var q=({file:t,assessment:e,index:s,total:r})=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing enriched assessment ${s+1} of ${r} to file "${t}"...`)),s===0?_fs2.default.writeFileSync(t,R({assessment:e,index:s,total:r,wrap:!1})):_fs2.default.appendFileSync(t,R({assessment:e,index:s,total:r,wrap:!1}))};var _typeutils = require('@transcend-io/type-utils');var _privacytypes = require('@transcend-io/privacy-types');var J=async({oneTrust:t})=>{let e=0,s=1,r=0,n=[];for(;e<s;){let{body:m}=await t.get(`api/assessment/v2/assessments?page=${e}&size=2000`),{page:o,content:u}=_typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetListOfAssessmentsResponse,m);n.push(..._nullishCoalesce(u, () => ([]))),e===0&&(s=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _2 => _2.totalPages]), () => (0)),r=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _3 => _3.totalElements]), () => (0))),e+=1,_chunkZUNVPK23cjs.a.info(`Fetched ${n.length} of ${r} assessments.`)}return n};var K=async({oneTrust:t,assessmentId:e})=>{let{body:s}=await t.get(`api/assessment/v2/assessments/${e}/export?ExcludeSkippedQuestions=false`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetAssessmentResponse,s)};var W=async({oneTrust:t,riskId:e})=>{let{body:s}=await t.get(`api/risk/v2/risks/${e}`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetRiskResponse,s)};var b=async({oneTrust:t,userId:e})=>{let{body:s}=await t.get(`api/scim/v2/Users/${e}`);return _typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustGetUserResponse,s)};var _bluebird = require('bluebird');var H=({assessment:t,assessmentDetails:e,riskDetails:s,creatorDetails:r,approversDetails:n,respondentsDetails:m})=>{let o=_chunkWI7C7KDMcjs.e.call(void 0, s,"id"),{sections:u,createdBy:h,...g}=e,O=u.map(i=>{let{questions:A,...$}=i,w=A.map(x=>{let{risks:U,...E}=x,G=(_nullishCoalesce(U, () => ([]))).map(y=>{let v=o[y.riskId];return{...y,...v,level:y.level,impactLevel:_nullishCoalesce(y.impactLevel, () => (0))}});return{...E,risks:G}});return{...$,questions:w}}),p={...h,active:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _4 => _4.active]), () => (!1)),userType:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _5 => _5.userType]), () => ("Internal")),emails:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _6 => _6.emails]), () => ([])),title:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _7 => _7.title]), () => (null)),givenName:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _8 => _8.name, 'access', _9 => _9.givenName]), () => (null)),familyName:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _10 => _10.name, 'access', _11 => _11.familyName]), () => (null))},d=_chunkWI7C7KDMcjs.e.call(void 0, n,"id"),l=e.approvers.flatMap(i=>d[i.id]?[{...i,approver:{...i.approver,active:d[i.id].active,userType:d[i.id].userType,emails:d[i.id].emails,title:d[i.id].title,givenName:_nullishCoalesce(d[i.id].name.givenName, () => (null)),familyName:_nullishCoalesce(d[i.id].name.familyName, () => (null))}}]:[]),T=_chunkWI7C7KDMcjs.e.call(void 0, m,"id"),C=e.respondents.filter(i=>!i.name.includes("@")).flatMap(i=>T[i.id]?[{...i,active:T[i.id].active,userType:T[i.id].userType,emails:T[i.id].emails,title:T[i.id].title,givenName:_nullishCoalesce(T[i.id].name.givenName, () => (null)),familyName:_nullishCoalesce(T[i.id].name.familyName, () => (null))}]:[]);return{...t,...g,approvers:l,respondents:C,createdBy:p,sections:O}};var k=async({transcend:t,assessment:e,total:s,index:r})=>{_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Writing enriched assessment ${r+1} ${s?`of ${s} `:" "}to Transcend...`));let m={json:R({assessment:e,index:r,total:s})};try{await _chunkUTU4F57Hcjs._f.call(void 0, t,_chunkUTU4F57Hcjs.fa,{input:m})}catch (e2){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to sync assessment ${r+1} ${s?`of ${s} `:" "}to Transcend.
5
5
  Assessment Title: ${e.name}. Template Title: ${e.template.name}
6
- `))}};var Y=async({oneTrust:t,file:e,dryRun:s,transcend:r})=>{_chunkZUNVPK23cjs.a.info("Getting list of all assessments from OneTrust...");let n=await J({oneTrust:t}),m={},o=5,u=Array.from({length:Math.ceil(n.length/o)},(h,g)=>n.slice(g*o,(g+1)*o));await _bluebird.mapSeries.call(void 0, u,async(h,g)=>{let O=[];await _bluebird.map.call(void 0, h,async(p,d)=>{let l=o*g+d+1;_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching details...`);let{templateName:T,assessmentId:C}=p,i=await K({oneTrust:t,assessmentId:C}),A=i.createdBy.id,$=m[A];if(!$){_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching creator...`);try{$=await b({oneTrust:t,userId:A}),m[A]=$}catch (e3){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch form creator. creatorId: ${A}. Assessment Title: ${p.name}. Template Title: ${T}`))}}let{approvers:w}=i,x=[];w.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching approvers...`),x=await _bluebird.map.call(void 0, w.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch (e4){return _chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a form approver. approverId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let{respondents:U}=i,E=U.filter(c=>!c.name.includes("@")),G=[];E.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching respondents...`),G=await _bluebird.map.call(void 0, E.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch (e5){return _chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a respondent. respondentId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let y=[],v=_chunkOFZ7ZSEVcjs.j.call(void 0, i.sections.flatMap(c=>c.questions.flatMap(f=>(_nullishCoalesce(f.risks, () => ([]))).flatMap(ee=>ee.riskId))));v.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching risks...`),y=await _bluebird.map.call(void 0, v,c=>W({oneTrust:t,riskId:c}),{concurrency:5}));let X=H({assessment:p,assessmentDetails:i,riskDetails:y,creatorDetails:$,approversDetails:x.flat(),respondentsDetails:G.flat()});O.push(X)},{concurrency:o}),await _bluebird.mapSeries.call(void 0, O,async(p,d)=>{let l=g*o+d;s&&e?q({assessment:p,index:l,total:n.length,file:e}):r&&await k({assessment:p,transcend:r,total:n.length,index:l})})})};var _JSONStream = require('JSONStream'); var _JSONStream2 = _interopRequireDefault(_JSONStream);var Z=({transcend:t,file:e})=>(_chunkZUNVPK23cjs.a.info(`Getting list of all assessments from file ${e}...`),new Promise((s,r)=>{let n=_fs.createReadStream.call(void 0, e,{encoding:"utf-8",highWaterMark:65536}),m=_JSONStream2.default.parse("*"),o=0;n.pipe(m),m.on("data",async u=>{try{m.pause();let h=_typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustEnrichedAssessment,u);await k({assessment:h,transcend:t,index:o}),o+=1,m.resume()}catch(h){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to parse the assessment ${o} from file '${e}': ${h.message}.`))}}),m.on("end",()=>{_chunkZUNVPK23cjs.a.info(`Finished processing ${o} assessments from file ${e}`),s()}),m.on("error",u=>{_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error parsing file '${e}': ${u.message}`)),r(u)}),n.on("error",u=>{_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error reading file '${e}': ${u.message}`)),r(u)})}));async function Ds({hostname:t,oneTrustAuth:e,source:s,transcendAuth:r,transcendUrl:n,resource:m,file:o,dryRun:u,debug:h}){if(!u&&!r)throw new Error('Must specify a "transcendAuth" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}');if(u&&!o)throw new Error('Must set a "file" parameter when "dryRun" is "true". e.g. --file=./oneTrustAssessments.json');if(o){let p=o.split(".");if(p.length<2)throw new Error('The "file" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.');if(p.at(-1)!=="json")throw new Error(`Expected the format of the "file" parameters '${o}' to be 'json', but got '${p.at(-1)}'.`)}if(s==="oneTrust"){if(!t)throw new Error('Missing required parameter "hostname". e.g. --hostname=customer.my.onetrust.com');if(!e)throw new Error('Missing required parameter "oneTrustAuth". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN')}else{if(!o)throw new Error('Must specify a "file" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json');if(u)throw new Error('Cannot read and write to a file simultaneously. Emit the "source" parameter or set it to oneTrust if "dryRun" is enabled.')}_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let g=t&&e?j({hostname:t,auth:e}):void 0,O=n&&r?_chunkJEH3FW7Jcjs.vc.call(void 0, n,r):void 0;try{m==="assessments"&&(s==="oneTrust"&&g?await Y({oneTrust:g,file:o,dryRun:u,...O&&{transcend:O}}):s==="file"&&o&&O&&await Z({file:o,transcend:O}))}catch(p){throw new Error(`An error occurred syncing the resource ${m} from OneTrust: ${h?p.stack:p.message}`)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced OneTrust ${m} to ${u?`disk at "${o}"`:"Transcend"}!`))}exports.syncOt = Ds;
7
- //# sourceMappingURL=impl-IASTUGV6.cjs.map
6
+ `))}};var Y=async({oneTrust:t,file:e,dryRun:s,transcend:r})=>{_chunkZUNVPK23cjs.a.info("Getting list of all assessments from OneTrust...");let n=await J({oneTrust:t}),m={},o=5,u=Array.from({length:Math.ceil(n.length/o)},(h,g)=>n.slice(g*o,(g+1)*o));await _bluebird.mapSeries.call(void 0, u,async(h,g)=>{let O=[];await _bluebird.map.call(void 0, h,async(p,d)=>{let l=o*g+d+1;_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching details...`);let{templateName:T,assessmentId:C}=p,i=await K({oneTrust:t,assessmentId:C}),A=i.createdBy.id,$=m[A];if(!$){_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching creator...`);try{$=await b({oneTrust:t,userId:A}),m[A]=$}catch (e3){_chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch form creator. creatorId: ${A}. Assessment Title: ${p.name}. Template Title: ${T}`))}}let{approvers:w}=i,x=[];w.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching approvers...`),x=await _bluebird.map.call(void 0, w.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch (e4){return _chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a form approver. approverId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let{respondents:U}=i,E=U.filter(c=>!c.name.includes("@")),G=[];E.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching respondents...`),G=await _bluebird.map.call(void 0, E.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch (e5){return _chunkZUNVPK23cjs.a.warn(_colors2.default.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a respondent. respondentId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let y=[],v=_chunkWI7C7KDMcjs.j.call(void 0, i.sections.flatMap(c=>c.questions.flatMap(f=>(_nullishCoalesce(f.risks, () => ([]))).flatMap(ee=>ee.riskId))));v.length>0&&(_chunkZUNVPK23cjs.a.info(`[assessment ${l} of ${n.length}]: fetching risks...`),y=await _bluebird.map.call(void 0, v,c=>W({oneTrust:t,riskId:c}),{concurrency:5}));let X=H({assessment:p,assessmentDetails:i,riskDetails:y,creatorDetails:$,approversDetails:x.flat(),respondentsDetails:G.flat()});O.push(X)},{concurrency:o}),await _bluebird.mapSeries.call(void 0, O,async(p,d)=>{let l=g*o+d;s&&e?q({assessment:p,index:l,total:n.length,file:e}):r&&await k({assessment:p,transcend:r,total:n.length,index:l})})})};var _JSONStream = require('JSONStream'); var _JSONStream2 = _interopRequireDefault(_JSONStream);var Z=({transcend:t,file:e})=>(_chunkZUNVPK23cjs.a.info(`Getting list of all assessments from file ${e}...`),new Promise((s,r)=>{let n=_fs.createReadStream.call(void 0, e,{encoding:"utf-8",highWaterMark:65536}),m=_JSONStream2.default.parse("*"),o=0;n.pipe(m),m.on("data",async u=>{try{m.pause();let h=_typeutils.decodeCodec.call(void 0, _privacytypes.OneTrustEnrichedAssessment,u);await k({assessment:h,transcend:t,index:o}),o+=1,m.resume()}catch(h){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to parse the assessment ${o} from file '${e}': ${h.message}.`))}}),m.on("end",()=>{_chunkZUNVPK23cjs.a.info(`Finished processing ${o} assessments from file ${e}`),s()}),m.on("error",u=>{_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error parsing file '${e}': ${u.message}`)),r(u)}),n.on("error",u=>{_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error reading file '${e}': ${u.message}`)),r(u)})}));async function Ds({hostname:t,oneTrustAuth:e,source:s,transcendAuth:r,transcendUrl:n,resource:m,file:o,dryRun:u,debug:h}){if(!u&&!r)throw new Error('Must specify a "transcendAuth" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}');if(u&&!o)throw new Error('Must set a "file" parameter when "dryRun" is "true". e.g. --file=./oneTrustAssessments.json');if(o){let p=o.split(".");if(p.length<2)throw new Error('The "file" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.');if(p.at(-1)!=="json")throw new Error(`Expected the format of the "file" parameters '${o}' to be 'json', but got '${p.at(-1)}'.`)}if(s==="oneTrust"){if(!t)throw new Error('Missing required parameter "hostname". e.g. --hostname=customer.my.onetrust.com');if(!e)throw new Error('Missing required parameter "oneTrustAuth". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN')}else{if(!o)throw new Error('Must specify a "file" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json');if(u)throw new Error('Cannot read and write to a file simultaneously. Emit the "source" parameter or set it to oneTrust if "dryRun" is enabled.')}_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let g=t&&e?j({hostname:t,auth:e}):void 0,O=n&&r?_chunkUTU4F57Hcjs.vc.call(void 0, n,r):void 0;try{m==="assessments"&&(s==="oneTrust"&&g?await Y({oneTrust:g,file:o,dryRun:u,...O&&{transcend:O}}):s==="file"&&o&&O&&await Z({file:o,transcend:O}))}catch(p){throw new Error(`An error occurred syncing the resource ${m} from OneTrust: ${h?p.stack:p.message}`)}_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully synced OneTrust ${m} to ${u?`disk at "${o}"`:"Transcend"}!`))}exports.syncOt = Ds;
7
+ //# sourceMappingURL=impl-YI6MEGDR.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-IASTUGV6.cjs","../src/commands/migration/sync-ot/impl.ts","../src/lib/oneTrust/createOneTrustGotInstance.ts","../src/lib/oneTrust/helpers/oneTrustAssessmentToJson.ts","../src/lib/oneTrust/endpoints/getListOfOneTrustAssessments.ts","../src/lib/oneTrust/helpers/syncOneTrustAssessmentToTranscend.ts","../src/lib/oneTrust/helpers/syncOneTrustAssessmentsFromOneTrust.ts"],"names":["createOneTrustGotInstance","hostname","auth","got"],"mappings":"AAAA,y0BAAwC,wDAA0D,gCAA6B,wDAAoC,wDAAgD,wDAAyC,gFCEzO,oECFM,IAQZA,CAAAA,CAA4B,CAAC,CACxC,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CACF,CAAA,CAAA,EAMEC,aAAAA,CAAI,MAAA,CAAO,CACT,SAAA,CAAW,CAAA,QAAA,EAAWF,CAAQ,CAAA,CAAA;ACiBwB;AAIzC;AClCf,CAAA;ACsE2F,mBAAA;ACC3B","file":"/home/runner/work/cli/cli/dist/impl-IASTUGV6.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { createOneTrustGotInstance } from '../../../lib/oneTrust';\nimport {\n OneTrustFileFormat,\n OneTrustPullResource,\n OneTrustPullSource,\n} from '../../../enums';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport {\n syncOneTrustAssessmentsFromFile,\n syncOneTrustAssessmentsFromOneTrust,\n} from '../../../lib/oneTrust/helpers';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n// Command flag interface\nexport interface SyncOtCommandFlags {\n hostname?: string;\n oneTrustAuth?: string;\n source: OneTrustPullSource;\n transcendAuth?: string;\n transcendUrl: string;\n file?: string;\n resource: OneTrustPullResource;\n dryRun: boolean;\n debug: boolean;\n}\n\n// Command implementation\nexport async function syncOt(\n this: LocalContext,\n {\n hostname,\n oneTrustAuth,\n source,\n transcendAuth,\n transcendUrl,\n resource,\n file,\n dryRun,\n debug,\n }: SyncOtCommandFlags,\n): Promise<void> {\n // Must be able to authenticate to transcend to sync resources to it\n if (!dryRun && !transcendAuth) {\n throw new Error(\n // eslint-disable-next-line no-template-curly-in-string\n 'Must specify a \"transcendAuth\" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}',\n );\n }\n\n // If trying to sync to disk, must specify a file path\n if (dryRun && !file) {\n throw new Error(\n 'Must set a \"file\" parameter when \"dryRun\" is \"true\". e.g. --file=./oneTrustAssessments.json',\n );\n }\n\n if (file) {\n const splitFile = file.split('.');\n if (splitFile.length < 2) {\n throw new Error(\n 'The \"file\" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.',\n );\n }\n if (splitFile.at(-1) !== OneTrustFileFormat.Json) {\n throw new Error(\n `Expected the format of the \"file\" parameters '${file}' to be '${\n OneTrustFileFormat.Json\n }', but got '${splitFile.at(-1)}'.`,\n );\n }\n }\n\n // if reading assessments from a OneTrust\n if (source === OneTrustPullSource.OneTrust) {\n // must specify the OneTrust hostname\n if (!hostname) {\n throw new Error(\n 'Missing required parameter \"hostname\". e.g. --hostname=customer.my.onetrust.com',\n );\n }\n // must specify the OneTrust auth\n if (!oneTrustAuth) {\n throw new Error(\n 'Missing required parameter \"oneTrustAuth\". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN',\n );\n }\n } else {\n // if reading the assessments from a file, must specify a file to read from\n if (!file) {\n throw new Error(\n 'Must specify a \"file\" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json',\n );\n }\n\n // Cannot try reading from file and save assessments to a file simultaneously\n if (dryRun) {\n throw new Error(\n 'Cannot read and write to a file simultaneously.' +\n ` Emit the \"source\" parameter or set it to ${OneTrustPullSource.OneTrust} if \"dryRun\" is enabled.`,\n );\n }\n }\n\n doneInputValidation(this.process.exit);\n\n // instantiate a client to talk to OneTrust\n const oneTrust =\n hostname && oneTrustAuth\n ? createOneTrustGotInstance({\n hostname,\n auth: oneTrustAuth,\n })\n : undefined;\n\n // instantiate a client to talk to Transcend\n const transcend =\n transcendUrl && transcendAuth\n ? buildTranscendGraphQLClient(transcendUrl, transcendAuth)\n : undefined;\n\n try {\n if (resource === OneTrustPullResource.Assessments) {\n if (source === OneTrustPullSource.OneTrust && oneTrust) {\n await syncOneTrustAssessmentsFromOneTrust({\n oneTrust,\n file,\n dryRun,\n ...(transcend && { transcend }),\n });\n } else if (source === OneTrustPullSource.File && file && transcend) {\n await syncOneTrustAssessmentsFromFile({ file, transcend });\n }\n }\n } catch (err) {\n throw new Error(\n `An error occurred syncing the resource ${resource} from OneTrust: ${\n debug ? err.stack : err.message\n }`,\n );\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced OneTrust ${resource} to ${\n dryRun ? `disk at \"${file}\"` : 'Transcend'\n }!`,\n ),\n );\n}\n","import got, { Got } from 'got';\n\n/**\n * Instantiate an instance of got that is capable of making requests to OneTrust\n *\n * @param param - information about the OneTrust URL\n * @returns The instance of got that is capable of making requests to the customer ingress\n */\nexport const createOneTrustGotInstance = ({\n hostname,\n auth,\n}: {\n /** Hostname of the OneTrust API */\n hostname: string;\n /** The OAuth access token */\n auth: string;\n}): Got =>\n got.extend({\n prefixUrl: `https://${hostname}`,\n headers: {\n accept: 'application/json',\n 'content-type': 'application/json',\n authorization: `Bearer ${auth}`,\n },\n });\n","import { OneTrustEnrichedAssessment } from '@transcend-io/privacy-types';\n\n/**\n * Converts the assessment into a json entry.\n *\n * @param param - information about the assessment and amount of entries\n * @returns a stringified json entry ready to be appended to a file\n */\nexport const oneTrustAssessmentToJson = ({\n assessment,\n index,\n total,\n wrap = true,\n}: {\n /** The assessment to convert */\n assessment: OneTrustEnrichedAssessment;\n /** The position of the assessment in the final Json object */\n index: number;\n /** The total amount of the assessments in the final Json object */\n total?: number;\n /** Whether to wrap every entry in brackets */\n wrap?: boolean;\n}): string => {\n let jsonEntry = '';\n // start with an opening bracket\n if (index === 0 || wrap) {\n jsonEntry = '[\\n';\n }\n\n const stringifiedAssessment = JSON.stringify(assessment);\n\n // Add comma for all items except the last one\n const comma = total && index < total - 1 && !wrap ? ',' : '';\n\n // write to file\n jsonEntry = `${jsonEntry + stringifiedAssessment + comma}\\n`;\n\n // end with closing bracket\n if ((total && index === total - 1) || wrap) {\n jsonEntry += '\\n]';\n }\n\n return jsonEntry;\n};\n","import { Got } from 'got';\nimport { logger } from '../../../logger';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport {\n OneTrustAssessment,\n OneTrustGetListOfAssessmentsResponse,\n} from '@transcend-io/privacy-types';\n\n/**\n * Fetch a list of all assessments from the OneTrust client.\n * ref: https://developer.onetrust.com/onetrust/reference/getallassessmentbasicdetailsusingget\n *\n * @param param - the information about the OneTrust client\n * @returns a list of OneTrustAssessment\n */\nexport const getListOfOneTrustAssessments = async ({\n oneTrust,\n}: {\n /** The OneTrust client instance */\n oneTrust: Got;\n}): Promise<OneTrustAssessment[]> => {\n let currentPage = 0;\n let totalPages = 1;\n let totalElements = 0;\n\n const allAssessments: OneTrustAssessment[] = [];\n\n while (currentPage < totalPages) {\n const { body } = await oneTrust.get(\n `api/assessment/v2/assessments?page=${currentPage}&size=2000`,\n );\n\n const { page, content } = decodeCodec(\n OneTrustGetListOfAssessmentsResponse,\n body,\n );\n allAssessments.push(...(content ?? []));\n if (currentPage === 0) {\n totalPages = page?.totalPages ?? 0;\n totalElements = page?.totalElements ?? 0;\n }\n currentPage += 1;\n\n // log progress\n logger.info(\n `Fetched ${allAssessments.length} of ${totalElements} assessments.`,\n );\n }\n\n return allAssessments;\n};\n","import { logger } from '../../../logger';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n IMPORT_ONE_TRUST_ASSESSMENT_FORMS,\n makeGraphQLRequest,\n} from '../../graphql';\nimport { ImportOnetrustAssessmentsInput } from '../../../codecs';\nimport { OneTrustEnrichedAssessment } from '@transcend-io/privacy-types';\nimport { oneTrustAssessmentToJson } from './oneTrustAssessmentToJson';\n\nexport interface AssessmentForm {\n /** ID of Assessment Form */\n id: string;\n /** Title of Assessment Form */\n name: string;\n}\n\n/**\n * Write the assessment to a Transcend instance.\n *\n *\n * @param param - information about the assessment and Transcend instance to write to\n */\nexport const syncOneTrustAssessmentToTranscend = async ({\n transcend,\n assessment,\n total,\n index,\n}: {\n /** the Transcend client instance */\n transcend: GraphQLClient;\n /** the assessment to sync to Transcend */\n assessment: OneTrustEnrichedAssessment;\n /** The index of the assessment being written to the file */\n index: number;\n /** The total amount of assessments that we will write */\n total?: number;\n}): Promise<void> => {\n logger.info(\n colors.magenta(\n `Writing enriched assessment ${index + 1} ${\n total ? `of ${total} ` : ' '\n }to Transcend...`,\n ),\n );\n\n // convert the OneTrust assessment object into a json record\n const json = oneTrustAssessmentToJson({\n assessment,\n index,\n total,\n });\n\n // transform the json record into a valid input to the mutation\n const input: ImportOnetrustAssessmentsInput = {\n json,\n };\n\n try {\n await makeGraphQLRequest<{\n /** the importOneTrustAssessmentForms mutation */\n importOneTrustAssessmentForms: {\n /** Created Assessment Forms */\n assessmentForms: AssessmentForm[];\n };\n }>(transcend, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, {\n input,\n });\n } catch (e) {\n logger.error(\n colors.red(\n `Failed to sync assessment ${index + 1} ${\n total ? `of ${total} ` : ' '\n }to Transcend.\\n` +\n `\\tAssessment Title: ${assessment.name}. Template Title: ${assessment.template.name}\\n`,\n ),\n );\n }\n};\n","import type { Got } from 'got';\nimport colors from 'colors';\nimport {\n getListOfOneTrustAssessments,\n getOneTrustAssessment,\n getOneTrustRisk,\n getOneTrustUser,\n} from '../endpoints';\nimport { mapSeries, map } from 'bluebird';\nimport { logger } from '../../../logger';\nimport {\n OneTrustAssessmentQuestion,\n OneTrustAssessmentSection,\n OneTrustEnrichedAssessment,\n OneTrustGetRiskResponse,\n OneTrustGetUserResponse,\n} from '@transcend-io/privacy-types';\nimport { uniq } from 'lodash-es';\nimport { enrichOneTrustAssessment } from './enrichOneTrustAssessment';\nimport { syncOneTrustAssessmentToDisk } from './syncOneTrustAssessmentToDisk';\nimport { GraphQLClient } from 'graphql-request';\nimport { syncOneTrustAssessmentToTranscend } from './syncOneTrustAssessmentToTranscend';\n\nexport interface AssessmentForm {\n /** ID of Assessment Form */\n id: string;\n /** Title of Assessment Form */\n name: string;\n}\n\n/**\n * Reads all the assessments from a OneTrust instance and syncs them to Transcend or to Disk.\n *\n * @param param - the information about the assessment, its OneTrust source, and destination (disk or Transcend)\n */\nexport const syncOneTrustAssessmentsFromOneTrust = async ({\n oneTrust,\n file,\n dryRun,\n transcend,\n}: {\n /** the OneTrust client instance */\n oneTrust: Got;\n /** the Transcend client instance */\n transcend?: GraphQLClient;\n /** Whether to write to file instead of syncing to Transcend */\n dryRun: boolean;\n /** the path to the file in case dryRun is true */\n file?: string;\n}): Promise<void> => {\n // fetch the list of all assessments in the OneTrust organization\n logger.info('Getting list of all assessments from OneTrust...');\n const assessments = await getListOfOneTrustAssessments({ oneTrust });\n\n // a cache of OneTrust users so we avoid requesting already fetched users\n const oneTrustCachedUsers: Record<string, OneTrustGetUserResponse> = {};\n\n // split all assessments in batches, so we can process some of steps in parallel\n const BATCH_SIZE = 5;\n const assessmentBatches = Array.from(\n {\n length: Math.ceil(assessments.length / BATCH_SIZE),\n },\n (_, i) => assessments.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE),\n );\n\n // process each batch and sync the batch right away so it's garbage collected and we don't run out of memory\n await mapSeries(assessmentBatches, async (assessmentBatch, batch) => {\n const batchEnrichedAssessments: OneTrustEnrichedAssessment[] = [];\n\n // fetch assessment details from OneTrust in parallel\n await map(\n assessmentBatch,\n async (assessment, index) => {\n const assessmentNumber = BATCH_SIZE * batch + index + 1;\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching details...`,\n );\n const { templateName, assessmentId } = assessment;\n const assessmentDetails = await getOneTrustAssessment({\n oneTrust,\n assessmentId,\n });\n // fetch assessment's creator information\n const creatorId = assessmentDetails.createdBy.id;\n let creator = oneTrustCachedUsers[creatorId];\n if (!creator) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching creator...`,\n );\n try {\n creator = await getOneTrustUser({\n oneTrust,\n userId: creatorId,\n });\n oneTrustCachedUsers[creatorId] = creator;\n } catch (e) {\n logger.warn(\n colors.yellow(\n `[assessment ${assessmentNumber} of ${assessments.length}]: failed to fetch form creator.` +\n `\\tcreatorId: ${creatorId}. Assessment Title: ${assessment.name}. Template Title: ${templateName}`,\n ),\n );\n }\n }\n\n // fetch assessment approvers information\n const { approvers } = assessmentDetails;\n let approversDetails: OneTrustGetUserResponse[][] = [];\n if (approvers.length > 0) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching approvers...`,\n );\n approversDetails = await map(\n approvers.map(({ id }) => id),\n async (userId) => {\n try {\n let approver = oneTrustCachedUsers[userId];\n if (!approver) {\n approver = await getOneTrustUser({ oneTrust, userId });\n oneTrustCachedUsers[userId] = approver;\n }\n return [approver];\n } catch (e) {\n logger.warn(\n colors.yellow(\n `[assessment ${assessmentNumber} of ${assessments.length}]: failed to fetch a form approver.` +\n `\\tapproverId: ${userId}. Assessment Title: ${assessment.name}. Template Title: ${templateName}`,\n ),\n );\n return [];\n }\n },\n { concurrency: 5 },\n );\n }\n\n // fetch assessment internal respondents information\n const { respondents } = assessmentDetails;\n // if a user is an internal respondents, their 'name' field can't be an email.\n const internalRespondents = respondents.filter(\n (r) => !r.name.includes('@'),\n );\n let respondentsDetails: OneTrustGetUserResponse[][] = [];\n if (internalRespondents.length > 0) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching respondents...`,\n );\n respondentsDetails = await map(\n internalRespondents.map(({ id }) => id),\n async (userId) => {\n try {\n let respondent = oneTrustCachedUsers[userId];\n if (!respondent) {\n respondent = await getOneTrustUser({ oneTrust, userId });\n oneTrustCachedUsers[userId] = respondent;\n }\n return [respondent];\n } catch (e) {\n logger.warn(\n colors.yellow(\n `[assessment ${assessmentNumber} of ${assessments.length}]: failed to fetch a respondent.` +\n `\\trespondentId: ${userId}. Assessment Title: ${assessment.name}. Template Title: ${templateName}`,\n ),\n );\n return [];\n }\n },\n { concurrency: 5 },\n );\n }\n\n // fetch assessment risk information\n let riskDetails: OneTrustGetRiskResponse[] = [];\n const riskIds = uniq(\n assessmentDetails.sections.flatMap((s: OneTrustAssessmentSection) =>\n s.questions.flatMap((q: OneTrustAssessmentQuestion) =>\n (q.risks ?? []).flatMap((r) => r.riskId),\n ),\n ),\n );\n if (riskIds.length > 0) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching risks...`,\n );\n riskDetails = await map(\n riskIds,\n (riskId) => getOneTrustRisk({ oneTrust, riskId: riskId as string }),\n {\n concurrency: 5,\n },\n );\n }\n\n // enrich the assessments with user and risk details\n const enrichedAssessment = enrichOneTrustAssessment({\n assessment,\n assessmentDetails,\n riskDetails,\n creatorDetails: creator,\n approversDetails: approversDetails.flat(),\n respondentsDetails: respondentsDetails.flat(),\n });\n\n batchEnrichedAssessments.push(enrichedAssessment);\n },\n { concurrency: BATCH_SIZE },\n );\n\n // sync assessments in series to avoid concurrency bugs\n await mapSeries(\n batchEnrichedAssessments,\n async (enrichedAssessment, index) => {\n // the assessment's global index takes its batch into consideration\n const globalIndex = batch * BATCH_SIZE + index;\n\n if (dryRun && file) {\n // sync to file\n syncOneTrustAssessmentToDisk({\n assessment: enrichedAssessment,\n index: globalIndex,\n total: assessments.length,\n file,\n });\n } else if (transcend) {\n // sync to transcend\n await syncOneTrustAssessmentToTranscend({\n assessment: enrichedAssessment,\n transcend,\n total: assessments.length,\n index: globalIndex,\n });\n }\n },\n );\n });\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YI6MEGDR.cjs","../src/commands/migration/sync-ot/impl.ts","../src/lib/oneTrust/createOneTrustGotInstance.ts","../src/lib/oneTrust/helpers/oneTrustAssessmentToJson.ts","../src/lib/oneTrust/endpoints/getListOfOneTrustAssessments.ts","../src/lib/oneTrust/helpers/syncOneTrustAssessmentToTranscend.ts","../src/lib/oneTrust/helpers/syncOneTrustAssessmentsFromOneTrust.ts"],"names":["createOneTrustGotInstance","hostname","auth","got"],"mappings":"AAAA,y0BAAwC,wDAA0D,gCAA6B,wDAAoC,wDAAgD,wDAAyC,gFCEzO,oECFM,IAQZA,CAAAA,CAA4B,CAAC,CACxC,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CACF,CAAA,CAAA,EAMEC,aAAAA,CAAI,MAAA,CAAO,CACT,SAAA,CAAW,CAAA,QAAA,EAAWF,CAAQ,CAAA,CAAA;ACiBwB;AAIzC;AClCf,CAAA;ACsE2F,mBAAA;ACC3B","file":"/home/runner/work/cli/cli/dist/impl-YI6MEGDR.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { createOneTrustGotInstance } from '../../../lib/oneTrust';\nimport {\n OneTrustFileFormat,\n OneTrustPullResource,\n OneTrustPullSource,\n} from '../../../enums';\nimport { buildTranscendGraphQLClient } from '../../../lib/graphql';\nimport {\n syncOneTrustAssessmentsFromFile,\n syncOneTrustAssessmentsFromOneTrust,\n} from '../../../lib/oneTrust/helpers';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n// Command flag interface\nexport interface SyncOtCommandFlags {\n hostname?: string;\n oneTrustAuth?: string;\n source: OneTrustPullSource;\n transcendAuth?: string;\n transcendUrl: string;\n file?: string;\n resource: OneTrustPullResource;\n dryRun: boolean;\n debug: boolean;\n}\n\n// Command implementation\nexport async function syncOt(\n this: LocalContext,\n {\n hostname,\n oneTrustAuth,\n source,\n transcendAuth,\n transcendUrl,\n resource,\n file,\n dryRun,\n debug,\n }: SyncOtCommandFlags,\n): Promise<void> {\n // Must be able to authenticate to transcend to sync resources to it\n if (!dryRun && !transcendAuth) {\n throw new Error(\n // eslint-disable-next-line no-template-curly-in-string\n 'Must specify a \"transcendAuth\" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}',\n );\n }\n\n // If trying to sync to disk, must specify a file path\n if (dryRun && !file) {\n throw new Error(\n 'Must set a \"file\" parameter when \"dryRun\" is \"true\". e.g. --file=./oneTrustAssessments.json',\n );\n }\n\n if (file) {\n const splitFile = file.split('.');\n if (splitFile.length < 2) {\n throw new Error(\n 'The \"file\" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.',\n );\n }\n if (splitFile.at(-1) !== OneTrustFileFormat.Json) {\n throw new Error(\n `Expected the format of the \"file\" parameters '${file}' to be '${\n OneTrustFileFormat.Json\n }', but got '${splitFile.at(-1)}'.`,\n );\n }\n }\n\n // if reading assessments from a OneTrust\n if (source === OneTrustPullSource.OneTrust) {\n // must specify the OneTrust hostname\n if (!hostname) {\n throw new Error(\n 'Missing required parameter \"hostname\". e.g. --hostname=customer.my.onetrust.com',\n );\n }\n // must specify the OneTrust auth\n if (!oneTrustAuth) {\n throw new Error(\n 'Missing required parameter \"oneTrustAuth\". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN',\n );\n }\n } else {\n // if reading the assessments from a file, must specify a file to read from\n if (!file) {\n throw new Error(\n 'Must specify a \"file\" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json',\n );\n }\n\n // Cannot try reading from file and save assessments to a file simultaneously\n if (dryRun) {\n throw new Error(\n 'Cannot read and write to a file simultaneously.' +\n ` Emit the \"source\" parameter or set it to ${OneTrustPullSource.OneTrust} if \"dryRun\" is enabled.`,\n );\n }\n }\n\n doneInputValidation(this.process.exit);\n\n // instantiate a client to talk to OneTrust\n const oneTrust =\n hostname && oneTrustAuth\n ? createOneTrustGotInstance({\n hostname,\n auth: oneTrustAuth,\n })\n : undefined;\n\n // instantiate a client to talk to Transcend\n const transcend =\n transcendUrl && transcendAuth\n ? buildTranscendGraphQLClient(transcendUrl, transcendAuth)\n : undefined;\n\n try {\n if (resource === OneTrustPullResource.Assessments) {\n if (source === OneTrustPullSource.OneTrust && oneTrust) {\n await syncOneTrustAssessmentsFromOneTrust({\n oneTrust,\n file,\n dryRun,\n ...(transcend && { transcend }),\n });\n } else if (source === OneTrustPullSource.File && file && transcend) {\n await syncOneTrustAssessmentsFromFile({ file, transcend });\n }\n }\n } catch (err) {\n throw new Error(\n `An error occurred syncing the resource ${resource} from OneTrust: ${\n debug ? err.stack : err.message\n }`,\n );\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced OneTrust ${resource} to ${\n dryRun ? `disk at \"${file}\"` : 'Transcend'\n }!`,\n ),\n );\n}\n","import got, { Got } from 'got';\n\n/**\n * Instantiate an instance of got that is capable of making requests to OneTrust\n *\n * @param param - information about the OneTrust URL\n * @returns The instance of got that is capable of making requests to the customer ingress\n */\nexport const createOneTrustGotInstance = ({\n hostname,\n auth,\n}: {\n /** Hostname of the OneTrust API */\n hostname: string;\n /** The OAuth access token */\n auth: string;\n}): Got =>\n got.extend({\n prefixUrl: `https://${hostname}`,\n headers: {\n accept: 'application/json',\n 'content-type': 'application/json',\n authorization: `Bearer ${auth}`,\n },\n });\n","import { OneTrustEnrichedAssessment } from '@transcend-io/privacy-types';\n\n/**\n * Converts the assessment into a json entry.\n *\n * @param param - information about the assessment and amount of entries\n * @returns a stringified json entry ready to be appended to a file\n */\nexport const oneTrustAssessmentToJson = ({\n assessment,\n index,\n total,\n wrap = true,\n}: {\n /** The assessment to convert */\n assessment: OneTrustEnrichedAssessment;\n /** The position of the assessment in the final Json object */\n index: number;\n /** The total amount of the assessments in the final Json object */\n total?: number;\n /** Whether to wrap every entry in brackets */\n wrap?: boolean;\n}): string => {\n let jsonEntry = '';\n // start with an opening bracket\n if (index === 0 || wrap) {\n jsonEntry = '[\\n';\n }\n\n const stringifiedAssessment = JSON.stringify(assessment);\n\n // Add comma for all items except the last one\n const comma = total && index < total - 1 && !wrap ? ',' : '';\n\n // write to file\n jsonEntry = `${jsonEntry + stringifiedAssessment + comma}\\n`;\n\n // end with closing bracket\n if ((total && index === total - 1) || wrap) {\n jsonEntry += '\\n]';\n }\n\n return jsonEntry;\n};\n","import { Got } from 'got';\nimport { logger } from '../../../logger';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport {\n OneTrustAssessment,\n OneTrustGetListOfAssessmentsResponse,\n} from '@transcend-io/privacy-types';\n\n/**\n * Fetch a list of all assessments from the OneTrust client.\n * ref: https://developer.onetrust.com/onetrust/reference/getallassessmentbasicdetailsusingget\n *\n * @param param - the information about the OneTrust client\n * @returns a list of OneTrustAssessment\n */\nexport const getListOfOneTrustAssessments = async ({\n oneTrust,\n}: {\n /** The OneTrust client instance */\n oneTrust: Got;\n}): Promise<OneTrustAssessment[]> => {\n let currentPage = 0;\n let totalPages = 1;\n let totalElements = 0;\n\n const allAssessments: OneTrustAssessment[] = [];\n\n while (currentPage < totalPages) {\n const { body } = await oneTrust.get(\n `api/assessment/v2/assessments?page=${currentPage}&size=2000`,\n );\n\n const { page, content } = decodeCodec(\n OneTrustGetListOfAssessmentsResponse,\n body,\n );\n allAssessments.push(...(content ?? []));\n if (currentPage === 0) {\n totalPages = page?.totalPages ?? 0;\n totalElements = page?.totalElements ?? 0;\n }\n currentPage += 1;\n\n // log progress\n logger.info(\n `Fetched ${allAssessments.length} of ${totalElements} assessments.`,\n );\n }\n\n return allAssessments;\n};\n","import { logger } from '../../../logger';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n IMPORT_ONE_TRUST_ASSESSMENT_FORMS,\n makeGraphQLRequest,\n} from '../../graphql';\nimport { ImportOnetrustAssessmentsInput } from '../../../codecs';\nimport { OneTrustEnrichedAssessment } from '@transcend-io/privacy-types';\nimport { oneTrustAssessmentToJson } from './oneTrustAssessmentToJson';\n\nexport interface AssessmentForm {\n /** ID of Assessment Form */\n id: string;\n /** Title of Assessment Form */\n name: string;\n}\n\n/**\n * Write the assessment to a Transcend instance.\n *\n *\n * @param param - information about the assessment and Transcend instance to write to\n */\nexport const syncOneTrustAssessmentToTranscend = async ({\n transcend,\n assessment,\n total,\n index,\n}: {\n /** the Transcend client instance */\n transcend: GraphQLClient;\n /** the assessment to sync to Transcend */\n assessment: OneTrustEnrichedAssessment;\n /** The index of the assessment being written to the file */\n index: number;\n /** The total amount of assessments that we will write */\n total?: number;\n}): Promise<void> => {\n logger.info(\n colors.magenta(\n `Writing enriched assessment ${index + 1} ${\n total ? `of ${total} ` : ' '\n }to Transcend...`,\n ),\n );\n\n // convert the OneTrust assessment object into a json record\n const json = oneTrustAssessmentToJson({\n assessment,\n index,\n total,\n });\n\n // transform the json record into a valid input to the mutation\n const input: ImportOnetrustAssessmentsInput = {\n json,\n };\n\n try {\n await makeGraphQLRequest<{\n /** the importOneTrustAssessmentForms mutation */\n importOneTrustAssessmentForms: {\n /** Created Assessment Forms */\n assessmentForms: AssessmentForm[];\n };\n }>(transcend, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, {\n input,\n });\n } catch (e) {\n logger.error(\n colors.red(\n `Failed to sync assessment ${index + 1} ${\n total ? `of ${total} ` : ' '\n }to Transcend.\\n` +\n `\\tAssessment Title: ${assessment.name}. Template Title: ${assessment.template.name}\\n`,\n ),\n );\n }\n};\n","import type { Got } from 'got';\nimport colors from 'colors';\nimport {\n getListOfOneTrustAssessments,\n getOneTrustAssessment,\n getOneTrustRisk,\n getOneTrustUser,\n} from '../endpoints';\nimport { mapSeries, map } from 'bluebird';\nimport { logger } from '../../../logger';\nimport {\n OneTrustAssessmentQuestion,\n OneTrustAssessmentSection,\n OneTrustEnrichedAssessment,\n OneTrustGetRiskResponse,\n OneTrustGetUserResponse,\n} from '@transcend-io/privacy-types';\nimport { uniq } from 'lodash-es';\nimport { enrichOneTrustAssessment } from './enrichOneTrustAssessment';\nimport { syncOneTrustAssessmentToDisk } from './syncOneTrustAssessmentToDisk';\nimport { GraphQLClient } from 'graphql-request';\nimport { syncOneTrustAssessmentToTranscend } from './syncOneTrustAssessmentToTranscend';\n\nexport interface AssessmentForm {\n /** ID of Assessment Form */\n id: string;\n /** Title of Assessment Form */\n name: string;\n}\n\n/**\n * Reads all the assessments from a OneTrust instance and syncs them to Transcend or to Disk.\n *\n * @param param - the information about the assessment, its OneTrust source, and destination (disk or Transcend)\n */\nexport const syncOneTrustAssessmentsFromOneTrust = async ({\n oneTrust,\n file,\n dryRun,\n transcend,\n}: {\n /** the OneTrust client instance */\n oneTrust: Got;\n /** the Transcend client instance */\n transcend?: GraphQLClient;\n /** Whether to write to file instead of syncing to Transcend */\n dryRun: boolean;\n /** the path to the file in case dryRun is true */\n file?: string;\n}): Promise<void> => {\n // fetch the list of all assessments in the OneTrust organization\n logger.info('Getting list of all assessments from OneTrust...');\n const assessments = await getListOfOneTrustAssessments({ oneTrust });\n\n // a cache of OneTrust users so we avoid requesting already fetched users\n const oneTrustCachedUsers: Record<string, OneTrustGetUserResponse> = {};\n\n // split all assessments in batches, so we can process some of steps in parallel\n const BATCH_SIZE = 5;\n const assessmentBatches = Array.from(\n {\n length: Math.ceil(assessments.length / BATCH_SIZE),\n },\n (_, i) => assessments.slice(i * BATCH_SIZE, (i + 1) * BATCH_SIZE),\n );\n\n // process each batch and sync the batch right away so it's garbage collected and we don't run out of memory\n await mapSeries(assessmentBatches, async (assessmentBatch, batch) => {\n const batchEnrichedAssessments: OneTrustEnrichedAssessment[] = [];\n\n // fetch assessment details from OneTrust in parallel\n await map(\n assessmentBatch,\n async (assessment, index) => {\n const assessmentNumber = BATCH_SIZE * batch + index + 1;\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching details...`,\n );\n const { templateName, assessmentId } = assessment;\n const assessmentDetails = await getOneTrustAssessment({\n oneTrust,\n assessmentId,\n });\n // fetch assessment's creator information\n const creatorId = assessmentDetails.createdBy.id;\n let creator = oneTrustCachedUsers[creatorId];\n if (!creator) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching creator...`,\n );\n try {\n creator = await getOneTrustUser({\n oneTrust,\n userId: creatorId,\n });\n oneTrustCachedUsers[creatorId] = creator;\n } catch (e) {\n logger.warn(\n colors.yellow(\n `[assessment ${assessmentNumber} of ${assessments.length}]: failed to fetch form creator.` +\n `\\tcreatorId: ${creatorId}. Assessment Title: ${assessment.name}. Template Title: ${templateName}`,\n ),\n );\n }\n }\n\n // fetch assessment approvers information\n const { approvers } = assessmentDetails;\n let approversDetails: OneTrustGetUserResponse[][] = [];\n if (approvers.length > 0) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching approvers...`,\n );\n approversDetails = await map(\n approvers.map(({ id }) => id),\n async (userId) => {\n try {\n let approver = oneTrustCachedUsers[userId];\n if (!approver) {\n approver = await getOneTrustUser({ oneTrust, userId });\n oneTrustCachedUsers[userId] = approver;\n }\n return [approver];\n } catch (e) {\n logger.warn(\n colors.yellow(\n `[assessment ${assessmentNumber} of ${assessments.length}]: failed to fetch a form approver.` +\n `\\tapproverId: ${userId}. Assessment Title: ${assessment.name}. Template Title: ${templateName}`,\n ),\n );\n return [];\n }\n },\n { concurrency: 5 },\n );\n }\n\n // fetch assessment internal respondents information\n const { respondents } = assessmentDetails;\n // if a user is an internal respondents, their 'name' field can't be an email.\n const internalRespondents = respondents.filter(\n (r) => !r.name.includes('@'),\n );\n let respondentsDetails: OneTrustGetUserResponse[][] = [];\n if (internalRespondents.length > 0) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching respondents...`,\n );\n respondentsDetails = await map(\n internalRespondents.map(({ id }) => id),\n async (userId) => {\n try {\n let respondent = oneTrustCachedUsers[userId];\n if (!respondent) {\n respondent = await getOneTrustUser({ oneTrust, userId });\n oneTrustCachedUsers[userId] = respondent;\n }\n return [respondent];\n } catch (e) {\n logger.warn(\n colors.yellow(\n `[assessment ${assessmentNumber} of ${assessments.length}]: failed to fetch a respondent.` +\n `\\trespondentId: ${userId}. Assessment Title: ${assessment.name}. Template Title: ${templateName}`,\n ),\n );\n return [];\n }\n },\n { concurrency: 5 },\n );\n }\n\n // fetch assessment risk information\n let riskDetails: OneTrustGetRiskResponse[] = [];\n const riskIds = uniq(\n assessmentDetails.sections.flatMap((s: OneTrustAssessmentSection) =>\n s.questions.flatMap((q: OneTrustAssessmentQuestion) =>\n (q.risks ?? []).flatMap((r) => r.riskId),\n ),\n ),\n );\n if (riskIds.length > 0) {\n logger.info(\n `[assessment ${assessmentNumber} of ${assessments.length}]: fetching risks...`,\n );\n riskDetails = await map(\n riskIds,\n (riskId) => getOneTrustRisk({ oneTrust, riskId: riskId as string }),\n {\n concurrency: 5,\n },\n );\n }\n\n // enrich the assessments with user and risk details\n const enrichedAssessment = enrichOneTrustAssessment({\n assessment,\n assessmentDetails,\n riskDetails,\n creatorDetails: creator,\n approversDetails: approversDetails.flat(),\n respondentsDetails: respondentsDetails.flat(),\n });\n\n batchEnrichedAssessments.push(enrichedAssessment);\n },\n { concurrency: BATCH_SIZE },\n );\n\n // sync assessments in series to avoid concurrency bugs\n await mapSeries(\n batchEnrichedAssessments,\n async (enrichedAssessment, index) => {\n // the assessment's global index takes its batch into consideration\n const globalIndex = batch * BATCH_SIZE + index;\n\n if (dryRun && file) {\n // sync to file\n syncOneTrustAssessmentToDisk({\n assessment: enrichedAssessment,\n index: globalIndex,\n total: assessments.length,\n file,\n });\n } else if (transcend) {\n // sync to transcend\n await syncOneTrustAssessmentToTranscend({\n assessment: enrichedAssessment,\n transcend,\n total: assessments.length,\n index: globalIndex,\n });\n }\n },\n );\n });\n};\n"]}
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunk3BZWG5GJcjs = require('./chunk-3BZWG5GJ.cjs');var _chunkUW2YF6JMcjs = require('./chunk-UW2YF6JM.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunk5CDEM565cjs = require('./chunk-5CDEM565.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkVXJ3QIONcjs = require('./chunk-VXJ3QION.cjs');var _chunkOAG7DICWcjs = require('./chunk-OAG7DICW.cjs');var _chunkGVK66NZAcjs = require('./chunk-GVK66NZA.cjs');var _chunkQEM6S2W7cjs = require('./chunk-QEM6S2W7.cjs');var _chunkJEH3FW7Jcjs = require('./chunk-JEH3FW7J.cjs');var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkOFZ7ZSEVcjs = require('./chunk-OFZ7ZSEV.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunkJEH3FW7Jcjs._f.call(void 0, a,_chunkJEH3FW7Jcjs.Fb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Gm(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkOFZ7ZSEVcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunkJEH3FW7Jcjs.vc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkOFZ7ZSEVcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunkJEH3FW7Jcjs.zd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunkJEH3FW7Jcjs.Fc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkOFZ7ZSEVcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkOFZ7ZSEVcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkOFZ7ZSEVcjs.e.call(void 0, o.prompts,"title"),c=_chunkOFZ7ZSEVcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunkJEH3FW7Jcjs.Fc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunkJEH3FW7Jcjs.Ad.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkOFZ7ZSEVcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkOFZ7ZSEVcjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunkJEH3FW7Jcjs.Fc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunkJEH3FW7Jcjs.Dc.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunkJEH3FW7Jcjs.ee.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunkJEH3FW7Jcjs.ee.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunkJEH3FW7Jcjs.ee.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function jm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Vm(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function Jm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunk2CCKVEWScjs = require('./chunk-2CCKVEWS.cjs');var _chunkXCTTKA6Ccjs = require('./chunk-XCTTKA6C.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkSW5CIF5Dcjs = require('./chunk-SW5CIF5D.cjs');var _chunkVWFYPZ4Qcjs = require('./chunk-VWFYPZ4Q.cjs');var _chunkLR3CPNDMcjs = require('./chunk-LR3CPNDM.cjs');var _chunkIXOC4S5Lcjs = require('./chunk-IXOC4S5L.cjs');var _chunkK45V7WKNcjs = require('./chunk-K45V7WKN.cjs');var _chunkTXG7TJLKcjs = require('./chunk-TXG7TJLK.cjs');var _chunkQEM6S2W7cjs = require('./chunk-QEM6S2W7.cjs');var _chunkUTU4F57Hcjs = require('./chunk-UTU4F57H.cjs');var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkWI7C7KDMcjs = require('./chunk-WI7C7KDM.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function D(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunkUTU4F57Hcjs._f.call(void 0, a,_chunkUTU4F57Hcjs.Fb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}var _bluebird = require('bluebird');function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Gm(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},B= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkWI7C7KDMcjs.r,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunkUTU4F57Hcjs.vc.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkWI7C7KDMcjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunkUTU4F57Hcjs.zd.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),D(this.graphQLClient),_chunkUTU4F57Hcjs.Fc.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkWI7C7KDMcjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkWI7C7KDMcjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkWI7C7KDMcjs.e.call(void 0, o.prompts,"title"),c=_chunkWI7C7KDMcjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunkUTU4F57Hcjs.Fc.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunkUTU4F57Hcjs.Ad.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkWI7C7KDMcjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkWI7C7KDMcjs.b.call(void 0, t,50),i=[];return await _bluebird.mapSeries.call(void 0, o,async p=>{let m=await _chunkUTU4F57Hcjs.Fc.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunkUTU4F57Hcjs.Dc.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunkUTU4F57Hcjs.ee.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunkUTU4F57Hcjs.ee.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunkUTU4F57Hcjs.ee.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function jm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Vm(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function Jm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
2
2
  `)[0],i=_child_process.execSync.call(void 0, "git rev-parse HEAD",{encoding:"utf-8"}).split(`
3
- `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkOFZ7ZSEVcjs.c.call(void 0, p.split(`
4
- `).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunkJEH3FW7Jcjs.tb; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunkJEH3FW7Jcjs.Ga; exports.ADD_SILO_DISCOVERY_RESULTS = _chunkJEH3FW7Jcjs.G; exports.ADMIN_DASH = _chunkOFZ7ZSEVcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkOFZ7ZSEVcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkOFZ7ZSEVcjs.p; exports.AGENTS = _chunkJEH3FW7Jcjs.Gb; exports.AGENT_FILES = _chunkJEH3FW7Jcjs.Jb; exports.AGENT_FUNCTIONS = _chunkJEH3FW7Jcjs.Mb; exports.API_KEYS = _chunkJEH3FW7Jcjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunkJEH3FW7Jcjs.W; exports.ASSESSMENTS = _chunkJEH3FW7Jcjs.ea; exports.ASSESSMENT_SECTION_FIELDS = _chunkJEH3FW7Jcjs.da; exports.ASSESSMENT_TEMPLATES = _chunkJEH3FW7Jcjs.ia; exports.ASSUME_ROLE = _chunkJEH3FW7Jcjs.Eb; exports.ATTRIBUTES = _chunkJEH3FW7Jcjs.Ka; exports.ATTRIBUTE_KEYS_REQUESTS = _chunkJEH3FW7Jcjs.L; exports.ATTRIBUTE_VALUES = _chunkJEH3FW7Jcjs.Oa; exports.ActionInput = _chunkQEM6S2W7cjs.G; exports.ActionItemCollectionInput = _chunkQEM6S2W7cjs.R; exports.ActionItemInput = _chunkQEM6S2W7cjs.S; exports.AgentFileInput = _chunkQEM6S2W7cjs.o; exports.AgentFunctionInput = _chunkQEM6S2W7cjs.n; exports.AgentInput = _chunkQEM6S2W7cjs.m; exports.ApiKeyInput = _chunkQEM6S2W7cjs.c; exports.AssessmentAction = _chunkJEH3FW7Jcjs.Od; exports.AssessmentAnswerOptionInput = _chunkQEM6S2W7cjs.Y; exports.AssessmentDisplayLogicInput = _chunkQEM6S2W7cjs.V; exports.AssessmentInput = _chunkQEM6S2W7cjs.ca; exports.AssessmentNestedRule = _chunkJEH3FW7Jcjs.Nd; exports.AssessmentNestedRuleInput = _chunkQEM6S2W7cjs.U; exports.AssessmentResourceInput = _chunkQEM6S2W7cjs.ba; exports.AssessmentRetentionScheduleInput = _chunkQEM6S2W7cjs.$; exports.AssessmentRiskLogic = _chunkJEH3FW7Jcjs.Qd; exports.AssessmentRule = _chunkJEH3FW7Jcjs.Md; exports.AssessmentRuleInput = _chunkQEM6S2W7cjs.T; exports.AssessmentRuleWithOperands = _chunkJEH3FW7Jcjs.Kd; exports.AssessmentRuleWithoutOperands = _chunkJEH3FW7Jcjs.Ld; exports.AssessmentSectionInput = _chunkQEM6S2W7cjs._; exports.AssessmentSectionQuestionInput = _chunkQEM6S2W7cjs.Z; exports.AssessmentTemplateInput = _chunkQEM6S2W7cjs.aa; exports.AttestedExtraIdentifiers = _chunkJEH3FW7Jcjs.nf; exports.AttributeInput = _chunkQEM6S2W7cjs.k; exports.AttributePreview = _chunkQEM6S2W7cjs.l; exports.AttributeValueInput = _chunkQEM6S2W7cjs.j; exports.BLANK = _chunkJEH3FW7Jcjs.cc; exports.BULK_APPLY = _chunkJEH3FW7Jcjs.bc; exports.BULK_REQUEST_FILES = _chunkJEH3FW7Jcjs.Ea; exports.BUSINESS_ENTITIES = _chunkJEH3FW7Jcjs.qb; exports.BusinessEntityInput = _chunkQEM6S2W7cjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunkJEH3FW7Jcjs.X; exports.CAN_APPLY_IN_BULK = _chunkJEH3FW7Jcjs.gc; exports.CATALOGS = _chunkJEH3FW7Jcjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunkJEH3FW7Jcjs.ua; exports.CODE_PACKAGES = _chunkJEH3FW7Jcjs.P; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunkJEH3FW7Jcjs.pb; exports.CONSENT_PARTITIONS = _chunkJEH3FW7Jcjs.Ta; exports.COOKIES = _chunkJEH3FW7Jcjs.Ya; exports.CREATE_ACTION_ITEMS = _chunkJEH3FW7Jcjs.xb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunkJEH3FW7Jcjs.Ia; exports.CREATE_AGENT = _chunkJEH3FW7Jcjs.Hb; exports.CREATE_AGENT_FILE = _chunkJEH3FW7Jcjs.Kb; exports.CREATE_AGENT_FUNCTION = _chunkJEH3FW7Jcjs.Nb; exports.CREATE_API_KEY = _chunkJEH3FW7Jcjs.E; exports.CREATE_ATTRIBUTE = _chunkJEH3FW7Jcjs.Pa; exports.CREATE_ATTRIBUTE_VALUES = _chunkJEH3FW7Jcjs.La; exports.CREATE_BUSINESS_ENTITY = _chunkJEH3FW7Jcjs.rb; exports.CREATE_CODE_PACKAGE = _chunkJEH3FW7Jcjs.R; exports.CREATE_CONSENT_EXPERIENCE = _chunkJEH3FW7Jcjs.nb; exports.CREATE_CONSENT_MANAGER = _chunkJEH3FW7Jcjs.ab; exports.CREATE_CONSENT_PARTITION = _chunkJEH3FW7Jcjs.ob; exports.CREATE_DATA_FLOWS = _chunkJEH3FW7Jcjs.Ua; exports.CREATE_DATA_SILOS = _chunkJEH3FW7Jcjs.m; exports.CREATE_DATA_SUBJECT = _chunkJEH3FW7Jcjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunkJEH3FW7Jcjs.Tb; exports.CREATE_ENRICHER = _chunkJEH3FW7Jcjs.p; exports.CREATE_IDENTIFIER = _chunkJEH3FW7Jcjs.u; exports.CREATE_PROCESSING_ACTIVITY = _chunkJEH3FW7Jcjs.Zb; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunkJEH3FW7Jcjs.Wb; exports.CREATE_PROMPT = _chunkJEH3FW7Jcjs.oa; exports.CREATE_PROMPT_GROUP = _chunkJEH3FW7Jcjs.sa; exports.CREATE_PROMPT_PARTIAL = _chunkJEH3FW7Jcjs.qa; exports.CREATE_REPOSITORY = _chunkJEH3FW7Jcjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunkJEH3FW7Jcjs.O; exports.CREATE_TEAM = _chunkJEH3FW7Jcjs.ya; exports.CREATE_TEMPLATE = _chunkJEH3FW7Jcjs.J; exports.CREATE_VENDOR = _chunkJEH3FW7Jcjs.Qb; exports.CachedFileState = _chunkJEH3FW7Jcjs.hc; exports.CachedRequestState = _chunkJEH3FW7Jcjs.jc; exports.CodePackageInput = _chunkQEM6S2W7cjs.D; exports.CodePackageSdk = _chunkQEM6S2W7cjs.C; exports.ColumnName = _chunkJEH3FW7Jcjs.ec; exports.ConsentManageExperienceInput = _chunkQEM6S2W7cjs.K; exports.ConsentManagerInput = _chunkQEM6S2W7cjs.M; exports.ConsentManagerMetricBin = _chunkJEH3FW7Jcjs.Qc; exports.ConsentManagerServiceMetadata = _chunkQEM6S2W7cjs.ka; exports.ConsentPreferenceResponse = _chunkVXJ3QIONcjs.i; exports.ConsentPreferenceTopic = _chunkQEM6S2W7cjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunkQEM6S2W7cjs.da; exports.ConsentPurpose = _chunkQEM6S2W7cjs.fa; exports.CookieCsvInput = _chunkQEM6S2W7cjs.ja; exports.CookieInput = _chunkQEM6S2W7cjs.J; exports.CronIdentifier = _chunk5CDEM565cjs.a; exports.CronIdentifierPush = _chunk5CDEM565cjs.c; exports.DATAPOINT_EXPORT = _chunkJEH3FW7Jcjs.g; exports.DATA_FLOWS = _chunkJEH3FW7Jcjs.Xa; exports.DATA_POINTS = _chunkJEH3FW7Jcjs.a; exports.DATA_POINT_COUNT = _chunkJEH3FW7Jcjs.b; exports.DATA_SILOS = _chunkJEH3FW7Jcjs.i; exports.DATA_SILOS_ENRICHED = _chunkJEH3FW7Jcjs.k; exports.DATA_SILO_EXPORT = _chunkJEH3FW7Jcjs.j; exports.DATA_SUBJECTS = _chunkJEH3FW7Jcjs.w; exports.DATA_SUB_CATEGORIES = _chunkJEH3FW7Jcjs.Sb; exports.DEBUG = _chunkOFZ7ZSEVcjs.z; exports.DEFAULT_TRANSCEND_API = _chunkOFZ7ZSEVcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkOFZ7ZSEVcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunkJEH3FW7Jcjs.ce; exports.DELETE_API_KEY = _chunkJEH3FW7Jcjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunkJEH3FW7Jcjs.Na; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunkJEH3FW7Jcjs.zb; exports.DEPLOY_CONSENT_MANAGER = _chunkJEH3FW7Jcjs.db; exports.DETERMINE_LOGIN_METHOD = _chunkJEH3FW7Jcjs.Cb; exports.DataCategoryGuessInput = _chunkQEM6S2W7cjs.h; exports.DataCategoryInput = _chunkQEM6S2W7cjs.q; exports.DataCategoryPreviewInput = _chunkQEM6S2W7cjs.g; exports.DataCategoryRecommendationInput = _chunkQEM6S2W7cjs.i; exports.DataFlowCsvInput = _chunkQEM6S2W7cjs.ia; exports.DataFlowInput = _chunkQEM6S2W7cjs.I; exports.DataSiloInput = _chunkQEM6S2W7cjs.Q; exports.DataSubjectInput = _chunkQEM6S2W7cjs.F; exports.DatapointInput = _chunkQEM6S2W7cjs.w; exports.ENABLED_PLUGINS = _chunkJEH3FW7Jcjs.H; exports.ENRICHERS = _chunkJEH3FW7Jcjs.n; exports.ENTRY_COUNT = _chunkJEH3FW7Jcjs.h; exports.EXPERIENCES = _chunkJEH3FW7Jcjs.Sa; exports.EnrichPrivacyRequest = _chunk3BZWG5GJcjs.b; exports.EnricherInput = _chunkQEM6S2W7cjs.e; exports.FETCH_CONSENT_MANAGER = _chunkJEH3FW7Jcjs._a; exports.FETCH_CONSENT_MANAGER_ID = _chunkJEH3FW7Jcjs.Za; exports.FETCH_CONSENT_MANAGER_THEME = _chunkJEH3FW7Jcjs.$a; exports.FETCH_PRIVACY_CENTER_ID = _chunkJEH3FW7Jcjs.yb; exports.FieldInput = _chunkQEM6S2W7cjs.v; exports.GLOBAL_ACTION_ITEMS = _chunkJEH3FW7Jcjs.vb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunkJEH3FW7Jcjs.Ha; exports.IDENTIFIERS = _chunkJEH3FW7Jcjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunkJEH3FW7Jcjs.dc; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunkJEH3FW7Jcjs.fa; exports.INITIALIZER = _chunkJEH3FW7Jcjs.o; exports.IP_ADDRESS_REGEX = _chunkVXJ3QIONcjs.f; exports.IS_REQUIRED = _chunkJEH3FW7Jcjs.fc; exports.IdentifierInput = _chunkQEM6S2W7cjs.H; exports.ImportOnetrustAssessmentsInput = _chunkQEM6S2W7cjs.ra; exports.IntlMessage = _chunkJEH3FW7Jcjs.rf; exports.IntlMessageInput = _chunkQEM6S2W7cjs.P; exports.LARGE_LANGUAGE_MODELS = _chunkJEH3FW7Jcjs.Fb; exports.LOGIN = _chunkJEH3FW7Jcjs.Db; exports.MESSAGES = _chunkJEH3FW7Jcjs._; exports.NEW_IDENTIFIER_TYPES = _chunkJEH3FW7Jcjs.t; exports.NONE = _chunkJEH3FW7Jcjs.ac; exports.NOTIFY_ADDITIONAL_TIME = _chunkJEH3FW7Jcjs.Z; exports.ORGANIZATION = _chunkJEH3FW7Jcjs.K; exports.OneTrustFileFormat = _chunkQ7I37FJVcjs.a; exports.OneTrustPullResource = _chunkQ7I37FJVcjs.b; exports.OneTrustPullSource = _chunkQ7I37FJVcjs.c; exports.OpenAIEnabledRoute = _chunkQEM6S2W7cjs.ma; exports.OpenAIEnabledRoutes = _chunkQEM6S2W7cjs.na; exports.OpenAIIntegration = _chunkQEM6S2W7cjs.oa; exports.OpenAIRouteName = _chunkQ7I37FJVcjs.f; exports.POLICIES = _chunkJEH3FW7Jcjs.T; exports.PREFERENCE_TOPICS = _chunkJEH3FW7Jcjs.ha; exports.PRIVACY_CENTER = _chunkJEH3FW7Jcjs.Ab; exports.PROCESSING_ACTIVITIES = _chunkJEH3FW7Jcjs.Yb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkJEH3FW7Jcjs.Vb; exports.PROMPTS = _chunkJEH3FW7Jcjs.ja; exports.PROMPTS_WITH_VARIABLES = _chunkJEH3FW7Jcjs.ma; exports.PROMPT_GROUPS = _chunkJEH3FW7Jcjs.la; exports.PROMPT_PARTIALS = _chunkJEH3FW7Jcjs.ka; exports.PROMPT_THREADS = _chunkJEH3FW7Jcjs.S; exports.PURPOSES = _chunkJEH3FW7Jcjs.ga; exports.ParsedAttributeInput = _chunkJEH3FW7Jcjs.oc; exports.PartitionInput = _chunkQEM6S2W7cjs.L; exports.PathfinderPolicy = _chunkQEM6S2W7cjs.pa; exports.PathfinderPolicyName = _chunkQ7I37FJVcjs.e; exports.PathfinderPolicyNameC = _chunkQEM6S2W7cjs.la; exports.PathfinderPromptRunMetadata = _chunkQEM6S2W7cjs.qa; exports.PolicyInput = _chunkQEM6S2W7cjs.O; exports.PrivacyCenterInput = _chunkQEM6S2W7cjs.N; exports.PrivacyRequest = _chunkJEH3FW7Jcjs.jd; exports.PrivacyRequestInput = _chunkJEH3FW7Jcjs.of; exports.PrivacyRequestResponse = _chunkJEH3FW7Jcjs.xf; exports.ProcessingActivityInput = _chunkQEM6S2W7cjs.A; exports.ProcessingPurposeInput = _chunkQEM6S2W7cjs.r; exports.ProcessingPurposePreviewInput = _chunkQEM6S2W7cjs.f; exports.PromptAVendorEmailSettings = _chunkQEM6S2W7cjs.x; exports.PromptGroupInput = _chunkQEM6S2W7cjs.u; exports.PromptInput = _chunkQEM6S2W7cjs.s; exports.PromptPartialInput = _chunkQEM6S2W7cjs.t; exports.PurposeMap = _chunkOAG7DICWcjs.e; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunkJEH3FW7Jcjs.wa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunkJEH3FW7Jcjs.Aa; exports.REPORT_PROMPT_RUN = _chunkJEH3FW7Jcjs.Fa; exports.REPOSITORIES = _chunkJEH3FW7Jcjs.A; exports.REQUESTS = _chunkJEH3FW7Jcjs.V; exports.REQUEST_DATA_SILOS = _chunkJEH3FW7Jcjs.ta; exports.REQUEST_ENRICHERS = _chunkJEH3FW7Jcjs.aa; exports.REQUEST_FILES = _chunkJEH3FW7Jcjs.Da; exports.REQUEST_IDENTIFIERS = _chunkJEH3FW7Jcjs.Ba; exports.RETRYABLE_BATCH_STATUSES = _chunkOFZ7ZSEVcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunkJEH3FW7Jcjs.va; exports.RETRY_REQUEST_ENRICHER = _chunkJEH3FW7Jcjs.ba; exports.RateCounter = _chunkJEH3FW7Jcjs.Yf; exports.RegionInput = _chunkQEM6S2W7cjs.z; exports.RepositoryInput = _chunkQEM6S2W7cjs.E; exports.RequestFileMetadata = _chunkJEH3FW7Jcjs.sf; exports.RequestFileMetadataResponse = _chunkJEH3FW7Jcjs.tf; exports.RequestIdentifiersResponse = _chunkJEH3FW7Jcjs.hd; exports.RiskAssignmentInput = _chunkQEM6S2W7cjs.W; exports.RiskLogicInput = _chunkQEM6S2W7cjs.X; exports.SCOPES_BY_TITLE = _chunkOFZ7ZSEVcjs.w; exports.SCOPE_TITLES = _chunkOFZ7ZSEVcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunkJEH3FW7Jcjs.Ra; exports.SKIP_REQUEST_ENRICHER = _chunkJEH3FW7Jcjs.ca; exports.SOFTWARE_DEVELOPMENT_KITS = _chunkJEH3FW7Jcjs.M; exports.SOMBRA_VERSION = _chunkJEH3FW7Jcjs.$b; exports.SUB_DATA_POINTS = _chunkJEH3FW7Jcjs.c; exports.SUB_DATA_POINTS_COUNT = _chunkJEH3FW7Jcjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunkJEH3FW7Jcjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunkJEH3FW7Jcjs.Kc; exports.SoftwareDevelopmentKitInput = _chunkQEM6S2W7cjs.B; exports.StoredApiKey = _chunkQEM6S2W7cjs.ha; exports.SuccessfulRequest = _chunkJEH3FW7Jcjs.ic; exports.TEAMS = _chunkJEH3FW7Jcjs.xa; exports.TEMPLATES = _chunkJEH3FW7Jcjs.I; exports.TOGGLE_CONSENT_PRECEDENCE = _chunkJEH3FW7Jcjs.kb; exports.TOGGLE_DATA_SUBJECT = _chunkJEH3FW7Jcjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunkJEH3FW7Jcjs.jb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunkJEH3FW7Jcjs.ib; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunkJEH3FW7Jcjs.hb; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkOFZ7ZSEVcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkOFZ7ZSEVcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkOFZ7ZSEVcjs.v; exports.TeamInput = _chunkQEM6S2W7cjs.d; exports.TemplateInput = _chunkQEM6S2W7cjs.a; exports.TranscendInput = _chunkQEM6S2W7cjs.ga; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunkQ7I37FJVcjs.d; exports.UPDATE_ACTION = _chunkJEH3FW7Jcjs.ub; exports.UPDATE_ACTION_ITEMS = _chunkJEH3FW7Jcjs.wb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunkJEH3FW7Jcjs.Ja; exports.UPDATE_AGENTS = _chunkJEH3FW7Jcjs.Ib; exports.UPDATE_AGENT_FILES = _chunkJEH3FW7Jcjs.Lb; exports.UPDATE_AGENT_FUNCTIONS = _chunkJEH3FW7Jcjs.Ob; exports.UPDATE_ATTRIBUTE = _chunkJEH3FW7Jcjs.Qa; exports.UPDATE_ATTRIBUTE_VALUES = _chunkJEH3FW7Jcjs.Ma; exports.UPDATE_BUSINESS_ENTITIES = _chunkJEH3FW7Jcjs.sb; exports.UPDATE_CODE_PACKAGES = _chunkJEH3FW7Jcjs.Q; exports.UPDATE_CONSENT_EXPERIENCE = _chunkJEH3FW7Jcjs.mb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunkJEH3FW7Jcjs.eb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunkJEH3FW7Jcjs.fb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunkJEH3FW7Jcjs.lb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunkJEH3FW7Jcjs.cb; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunkJEH3FW7Jcjs.bb; exports.UPDATE_DATA_FLOWS = _chunkJEH3FW7Jcjs.Va; exports.UPDATE_DATA_SILOS = _chunkJEH3FW7Jcjs.l; exports.UPDATE_DATA_SUBJECT = _chunkJEH3FW7Jcjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunkJEH3FW7Jcjs.Ub; exports.UPDATE_ENRICHER = _chunkJEH3FW7Jcjs.q; exports.UPDATE_IDENTIFIER = _chunkJEH3FW7Jcjs.v; exports.UPDATE_INTL_MESSAGES = _chunkJEH3FW7Jcjs.$; exports.UPDATE_LOAD_OPTIONS = _chunkJEH3FW7Jcjs.gb; exports.UPDATE_OR_CREATE_COOKIES = _chunkJEH3FW7Jcjs.Wa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunkJEH3FW7Jcjs.f; exports.UPDATE_POLICIES = _chunkJEH3FW7Jcjs.U; exports.UPDATE_PRIVACY_CENTER = _chunkJEH3FW7Jcjs.Bb; exports.UPDATE_PRIVACY_REQUEST = _chunkJEH3FW7Jcjs.Y; exports.UPDATE_PROCESSING_ACTIVITIES = _chunkJEH3FW7Jcjs._b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkJEH3FW7Jcjs.Xb; exports.UPDATE_PROMPTS = _chunkJEH3FW7Jcjs.na; exports.UPDATE_PROMPT_GROUPS = _chunkJEH3FW7Jcjs.ra; exports.UPDATE_PROMPT_PARTIALS = _chunkJEH3FW7Jcjs.pa; exports.UPDATE_REPOSITORIES = _chunkJEH3FW7Jcjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunkJEH3FW7Jcjs.N; exports.UPDATE_TEAM = _chunkJEH3FW7Jcjs.za; exports.UPDATE_VENDORS = _chunkJEH3FW7Jcjs.Rb; exports.USERS = _chunkJEH3FW7Jcjs.Ca; exports.USP_STRING_REGEX = _chunkOAG7DICWcjs.d; exports.VARIABLE_PARAMETERS_NAME = _chunkSW5CIF5Dcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkSW5CIF5Dcjs.a; exports.VENDORS = _chunkJEH3FW7Jcjs.Pb; exports.VendorInput = _chunkQEM6S2W7cjs.p; exports.WebhookHeader = _chunkQEM6S2W7cjs.b; exports.addMessagesToPromptRun = _chunkJEH3FW7Jcjs.tc; exports.appendCsvSync = _chunkLR3CPNDMcjs.b; exports.approvePrivacyRequests = _chunkJEH3FW7Jcjs.zf; exports.assumeRole = _chunkJEH3FW7Jcjs.Hd; exports.buildAIIntegrationType = _chunkLCDYXJN6cjs.b; exports.buildEnabledRouteType = _chunkLCDYXJN6cjs.a; exports.buildTranscendGraphQLClient = _chunkJEH3FW7Jcjs.vc; exports.buildTranscendGraphQLClientGeneric = _chunkJEH3FW7Jcjs.uc; exports.buildXdiSyncEndpoint = _chunkVXJ3QIONcjs.g; exports.bulkRestartRequests = _chunkJEH3FW7Jcjs.Hf; exports.bulkRetryEnrichers = _chunkJEH3FW7Jcjs.Jf; exports.cancelPrivacyRequests = _chunkJEH3FW7Jcjs.Cf; exports.consentManagersToBusinessEntities = _chunkVXJ3QIONcjs.h; exports.convertToDataSubjectAllowlist = _chunkJEH3FW7Jcjs.vd; exports.convertToDataSubjectBlockList = _chunkJEH3FW7Jcjs.ud; exports.createActionItemCollection = _chunkJEH3FW7Jcjs.ie; exports.createActionItems = _chunkJEH3FW7Jcjs.le; exports.createAgent = _chunkJEH3FW7Jcjs.ue; exports.createAgentFile = _chunkJEH3FW7Jcjs.oe; exports.createAgentFunction = _chunkJEH3FW7Jcjs.re; exports.createApiKey = _chunkJEH3FW7Jcjs.Id; exports.createBusinessEntity = _chunkJEH3FW7Jcjs.ye; exports.createCodePackage = _chunkJEH3FW7Jcjs.He; exports.createConsentToken = _chunkOAG7DICWcjs.a; exports.createDataCategory = _chunkJEH3FW7Jcjs.Oe; exports.createDataFlows = _chunkJEH3FW7Jcjs.Se; exports.createProcessingPurpose = _chunkJEH3FW7Jcjs.af; exports.createPrompt = _chunkJEH3FW7Jcjs.df; exports.createRegexForTag = j; exports.createRepository = _chunkJEH3FW7Jcjs.Ee; exports.createSoftwareDevelopmentKit = _chunkJEH3FW7Jcjs.Be; exports.createSombraGotInstance = _chunkJEH3FW7Jcjs.wc; exports.createTranscendConsentGotInstance = _chunkJEH3FW7Jcjs.xc; exports.createVendor = _chunkJEH3FW7Jcjs.gf; exports.defineTranscendPrompts = Gm; exports.deleteApiKey = _chunkJEH3FW7Jcjs.Jd; exports.deployConsentManager = _chunkJEH3FW7Jcjs.yc; exports.description = _chunkOFZ7ZSEVcjs.l; exports.domainToHost = _chunkVXJ3QIONcjs.e; exports.downloadPrivacyRequestFiles = _chunkJEH3FW7Jcjs.wf; exports.enrichPrivacyRequest = _chunk3BZWG5GJcjs.c; exports.ensureAllDataSubjectsExist = _chunkJEH3FW7Jcjs.td; exports.extractClientError = _chunkJEH3FW7Jcjs.Ef; exports.extractErrorMessage = _chunkJEH3FW7Jcjs.Tf; exports.fetchActiveSiloDiscoPlugin = _chunkJEH3FW7Jcjs.Ac; exports.fetchAllActionItems = _chunkJEH3FW7Jcjs.Bc; exports.fetchAllActions = _chunkJEH3FW7Jcjs.Cc; exports.fetchAllAgentFiles = _chunkJEH3FW7Jcjs.Dc; exports.fetchAllAgentFunctions = _chunkJEH3FW7Jcjs.Ec; exports.fetchAllAgents = _chunkJEH3FW7Jcjs.Fc; exports.fetchAllApiKeys = _chunkJEH3FW7Jcjs.od; exports.fetchAllAssessmentTemplates = _chunkJEH3FW7Jcjs.Hc; exports.fetchAllAssessments = _chunkJEH3FW7Jcjs.Gc; exports.fetchAllAttributeValues = _chunkJEH3FW7Jcjs.Jc; exports.fetchAllAttributes = _chunkJEH3FW7Jcjs.Lc; exports.fetchAllBusinessEntities = _chunkJEH3FW7Jcjs.Mc; exports.fetchAllCatalogs = _chunkJEH3FW7Jcjs.qd; exports.fetchAllCookies = _chunkJEH3FW7Jcjs.Tc; exports.fetchAllDataCategories = _chunkJEH3FW7Jcjs.Uc; exports.fetchAllDataFlows = _chunkJEH3FW7Jcjs.Vc; exports.fetchAllDataPoints = _chunkJEH3FW7Jcjs.Ud; exports.fetchAllDataSilos = _chunkJEH3FW7Jcjs.Sd; exports.fetchAllDataSubjects = _chunkJEH3FW7Jcjs.sd; exports.fetchAllEnrichers = _chunkJEH3FW7Jcjs.Yd; exports.fetchAllIdentifiers = _chunkJEH3FW7Jcjs.$f; exports.fetchAllMessages = _chunkJEH3FW7Jcjs.Wc; exports.fetchAllPolicies = _chunkJEH3FW7Jcjs.Zc; exports.fetchAllPreferenceTopics = _chunkJEH3FW7Jcjs.$c; exports.fetchAllPrivacyCenters = _chunkJEH3FW7Jcjs.ad; exports.fetchAllProcessingActivities = _chunkJEH3FW7Jcjs.bd; exports.fetchAllProcessingPurposes = _chunkJEH3FW7Jcjs.cd; exports.fetchAllPromptGroups = _chunkJEH3FW7Jcjs.wd; exports.fetchAllPromptPartials = _chunkJEH3FW7Jcjs.xd; exports.fetchAllPromptThreads = _chunkJEH3FW7Jcjs.Ad; exports.fetchAllPrompts = _chunkJEH3FW7Jcjs.yd; exports.fetchAllPurposes = _chunkJEH3FW7Jcjs.dd; exports.fetchAllPurposesAndPreferences = _chunkJEH3FW7Jcjs.ed; exports.fetchAllRequestAttributeKeys = _chunkJEH3FW7Jcjs.Ic; exports.fetchAllRequestEnrichers = _chunkJEH3FW7Jcjs.fd; exports.fetchAllRequestIdentifierMetadata = _chunkJEH3FW7Jcjs.gd; exports.fetchAllRequestIdentifiers = _chunkJEH3FW7Jcjs.id; exports.fetchAllRequests = _chunkJEH3FW7Jcjs.kd; exports.fetchAllSubDataPoints = _chunkJEH3FW7Jcjs.Td; exports.fetchAllTeams = _chunkJEH3FW7Jcjs.ld; exports.fetchAllTemplates = _chunkJEH3FW7Jcjs._d; exports.fetchAllUsers = _chunkJEH3FW7Jcjs.md; exports.fetchAllVendors = _chunkJEH3FW7Jcjs.nd; exports.fetchAndIndexCatalogs = _chunkJEH3FW7Jcjs.rd; exports.fetchApiKeys = _chunkJEH3FW7Jcjs.pd; exports.fetchConsentManager = _chunkJEH3FW7Jcjs.Nc; exports.fetchConsentManagerAnalyticsData = _chunkJEH3FW7Jcjs.Rc; exports.fetchConsentManagerExperiences = _chunkJEH3FW7Jcjs.Pc; exports.fetchConsentManagerId = _chunkJEH3FW7Jcjs.Oc; exports.fetchConsentManagerTheme = _chunkJEH3FW7Jcjs.Sc; exports.fetchConsentPreferences = _chunkVXJ3QIONcjs.j; exports.fetchEnrichedDataSilos = _chunkJEH3FW7Jcjs.Vd; exports.fetchIdentifiersAndCreateMissing = _chunkJEH3FW7Jcjs.ag; exports.fetchPartitions = _chunkJEH3FW7Jcjs.ae; exports.fetchPrivacyCenterId = _chunkJEH3FW7Jcjs.Yc; exports.fetchPrivacyCenterUrl = _chunkJEH3FW7Jcjs.Xc; exports.fetchPromptsWithVariables = _chunkJEH3FW7Jcjs.zd; exports.fetchRequestDataSilo = _chunkJEH3FW7Jcjs.Dd; exports.fetchRequestDataSiloActiveCount = _chunkJEH3FW7Jcjs.Ed; exports.fetchRequestDataSilos = _chunkJEH3FW7Jcjs.Cd; exports.fetchRequestDataSilosCount = _chunkJEH3FW7Jcjs.Bd; exports.fetchRequestFilesForRequest = _chunkJEH3FW7Jcjs.Fd; exports.filterNullishValuesFromObject = Vm; exports.filterRows = _chunkJEH3FW7Jcjs.sc; exports.formatAttributeValues = _chunkJEH3FW7Jcjs._c; exports.fuzzyMatchColumns = _chunkJEH3FW7Jcjs.lc; exports.fuzzySearch = _chunkJEH3FW7Jcjs.kc; exports.generateCrossAccountApiKeys = _chunkGVK66NZAcjs.a; exports.getErrorStatus = _chunkJEH3FW7Jcjs.Sf; exports.getFileMetadataForPrivacyRequests = _chunkJEH3FW7Jcjs.uf; exports.getGitFilesThatChanged = Jm; exports.getUniqueValuesForColumn = _chunkJEH3FW7Jcjs.rc; exports.inquirerAutoComplete = _chunkJEH3FW7Jcjs.Qf; exports.inquirerConfirmBoolean = _chunkJEH3FW7Jcjs.Of; exports.inquirerConfirmText = _chunkJEH3FW7Jcjs.Pf; exports.limitRecords = _chunkJEH3FW7Jcjs.Xf; exports.listDirectories = _chunkGVK66NZAcjs.d; exports.listFiles = _chunkGVK66NZAcjs.c; exports.loginUser = _chunkJEH3FW7Jcjs.Gd; exports.makeGraphQLRequest = _chunkJEH3FW7Jcjs._f; exports.mapColumnsToAttributes = _chunkJEH3FW7Jcjs.Df; exports.mapColumnsToIdentifiers = _chunkJEH3FW7Jcjs.Bf; exports.mapCsvColumnsToApi = _chunkJEH3FW7Jcjs.lf; exports.mapCsvRowsToRequestInputs = _chunkJEH3FW7Jcjs.qf; exports.mapEnumValues = _chunkJEH3FW7Jcjs.mc; exports.mapRequestEnumValues = _chunkJEH3FW7Jcjs.mf; exports.markCronIdentifierCompleted = _chunk5CDEM565cjs.d; exports.markRequestDataSiloIdsCompleted = _chunk5CDEM565cjs.f; exports.markSilentPrivacyRequests = _chunkJEH3FW7Jcjs.kf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkOFZ7ZSEVcjs.n; exports.normalizeIdentifierValue = _chunkJEH3FW7Jcjs.pf; exports.notifyPrivacyRequestsAdditionalTime = _chunkJEH3FW7Jcjs.Af; exports.parseAssessmentDisplayLogic = _chunkJEH3FW7Jcjs.Pd; exports.parseAssessmentRiskLogic = _chunkJEH3FW7Jcjs.Rd; exports.parseAttributesFromString = _chunkJEH3FW7Jcjs.pc; exports.parseFilePath = _chunkLR3CPNDMcjs.d; exports.parseVariablesFromString = _chunkJEH3FW7Jcjs.Rf; exports.pullAllDatapoints = _chunkUW2YF6JMcjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunk5CDEM565cjs.g; exports.pullConsentManagerMetrics = _chunkVXJ3QIONcjs.d; exports.pullCronPageOfIdentifiers = _chunk5CDEM565cjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunk3BZWG5GJcjs.a; exports.pullPrivacyRequests = _chunkJEH3FW7Jcjs.Lf; exports.pullTranscendConfiguration = _chunkJEH3FW7Jcjs.de; exports.pullUnstructuredSubDataPointRecommendations = _chunkUW2YF6JMcjs.b; exports.pushCronIdentifiersFromCsv = _chunk5CDEM565cjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunk3BZWG5GJcjs.d; exports.readCsv = _chunkJEH3FW7Jcjs.qc; exports.readSafe = _chunkJEH3FW7Jcjs.Zf; exports.readTranscendYaml = _chunkSW5CIF5Dcjs.d; exports.removeLinks = jm; exports.removeUnverifiedRequestIdentifiers = _chunkJEH3FW7Jcjs.Nf; exports.replaceVariablesInYaml = _chunkSW5CIF5Dcjs.c; exports.reportPromptRun = _chunkJEH3FW7Jcjs.ee; exports.restartPrivacyRequest = _chunkJEH3FW7Jcjs.Gf; exports.retryRequestDataSilos = _chunkJEH3FW7Jcjs.Kf; exports.retryRequestEnricher = _chunkJEH3FW7Jcjs.fe; exports.retrySamePromise = _chunkJEH3FW7Jcjs.Wf; exports.setResourceAttributes = _chunkJEH3FW7Jcjs.ge; exports.skipPreflightJobs = _chunkJEH3FW7Jcjs.If; exports.skipRequestDataSilos = _chunkJEH3FW7Jcjs.Mf; exports.sleepPromise = _chunkJEH3FW7Jcjs.Uf; exports.splitCsvToList = _chunkJEH3FW7Jcjs.nc; exports.splitInHalf = _chunkJEH3FW7Jcjs.Vf; exports.streamPrivacyRequestFiles = _chunkJEH3FW7Jcjs.vf; exports.submitPrivacyRequest = _chunkJEH3FW7Jcjs.yf; exports.syncAction = _chunkJEH3FW7Jcjs.he; exports.syncActionItemCollections = _chunkJEH3FW7Jcjs.ke; exports.syncActionItems = _chunkJEH3FW7Jcjs.ne; exports.syncAgentFiles = _chunkJEH3FW7Jcjs.qe; exports.syncAgentFunctions = _chunkJEH3FW7Jcjs.te; exports.syncAgents = _chunkJEH3FW7Jcjs.we; exports.syncAttribute = _chunkJEH3FW7Jcjs.xe; exports.syncBusinessEntities = _chunkJEH3FW7Jcjs.Ae; exports.syncCodePackages = _chunkJEH3FW7Jcjs.Je; exports.syncConfigurationToTranscend = _chunkJEH3FW7Jcjs.bg; exports.syncConsentManager = _chunkJEH3FW7Jcjs.Le; exports.syncConsentManagerExperiences = _chunkJEH3FW7Jcjs.Ke; exports.syncCookies = _chunkJEH3FW7Jcjs.Ne; exports.syncDataCategories = _chunkJEH3FW7Jcjs.Qe; exports.syncDataFlows = _chunkJEH3FW7Jcjs.Te; exports.syncDataSiloDependencies = _chunkJEH3FW7Jcjs.Xd; exports.syncDataSilos = _chunkJEH3FW7Jcjs.Wd; exports.syncDataSubject = _chunkJEH3FW7Jcjs.Ue; exports.syncEnricher = _chunkJEH3FW7Jcjs.Zd; exports.syncIdentifier = _chunkJEH3FW7Jcjs.Ve; exports.syncIntlMessages = _chunkJEH3FW7Jcjs.Xe; exports.syncPartitions = _chunkJEH3FW7Jcjs.be; exports.syncPolicies = _chunkJEH3FW7Jcjs.Ze; exports.syncPrivacyCenter = _chunkJEH3FW7Jcjs._e; exports.syncProcessingActivities = _chunkJEH3FW7Jcjs.$e; exports.syncProcessingPurposes = _chunkJEH3FW7Jcjs.cf; exports.syncPrompts = _chunkJEH3FW7Jcjs.ff; exports.syncRepositories = _chunkJEH3FW7Jcjs.Ge; exports.syncSoftwareDevelopmentKits = _chunkJEH3FW7Jcjs.De; exports.syncTemplate = _chunkJEH3FW7Jcjs.$d; exports.syncVendors = _chunkJEH3FW7Jcjs.if; exports.updateActionItem = _chunkJEH3FW7Jcjs.me; exports.updateActionItemCollection = _chunkJEH3FW7Jcjs.je; exports.updateAgentFiles = _chunkJEH3FW7Jcjs.pe; exports.updateAgentFunctions = _chunkJEH3FW7Jcjs.se; exports.updateAgents = _chunkJEH3FW7Jcjs.ve; exports.updateBusinessEntities = _chunkJEH3FW7Jcjs.ze; exports.updateCodePackages = _chunkJEH3FW7Jcjs.Ie; exports.updateConsentManagerToLatest = _chunkJEH3FW7Jcjs.zc; exports.updateConsentManagerVersionToLatest = _chunkVXJ3QIONcjs.a; exports.updateDataCategories = _chunkJEH3FW7Jcjs.Pe; exports.updateDataFlows = _chunkJEH3FW7Jcjs.Re; exports.updateIntlMessages = _chunkJEH3FW7Jcjs.We; exports.updateOrCreateCookies = _chunkJEH3FW7Jcjs.Me; exports.updatePolicies = _chunkJEH3FW7Jcjs.Ye; exports.updateProcessingPurposes = _chunkJEH3FW7Jcjs.bf; exports.updatePrompts = _chunkJEH3FW7Jcjs.ef; exports.updateRepositories = _chunkJEH3FW7Jcjs.Fe; exports.updateSoftwareDevelopmentKits = _chunkJEH3FW7Jcjs.Ce; exports.updateVendors = _chunkJEH3FW7Jcjs.hf; exports.uploadConsents = _chunkOAG7DICWcjs.f; exports.uploadCookiesFromCsv = _chunkVXJ3QIONcjs.c; exports.uploadDataFlowsFromCsv = _chunkVXJ3QIONcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunkJEH3FW7Jcjs.Ff; exports.uploadSiloDiscoveryResults = _chunkJEH3FW7Jcjs.jf; exports.validateTranscendAuth = _chunkGVK66NZAcjs.b; exports.version = _chunkOFZ7ZSEVcjs.m; exports.writeCsv = _chunkLR3CPNDMcjs.c; exports.writeCsvSync = _chunkLR3CPNDMcjs.a; exports.writeLargeCsv = _chunkLR3CPNDMcjs.e; exports.writeTranscendYaml = _chunkSW5CIF5Dcjs.e;
3
+ `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkWI7C7KDMcjs.c.call(void 0, p.split(`
4
+ `).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let F=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=F});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunkUTU4F57Hcjs.tb; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunkUTU4F57Hcjs.Ga; exports.ADD_SILO_DISCOVERY_RESULTS = _chunkUTU4F57Hcjs.G; exports.ADMIN_DASH = _chunkWI7C7KDMcjs.o; exports.ADMIN_DASH_DATAPOINTS = _chunkWI7C7KDMcjs.q; exports.ADMIN_DASH_INTEGRATIONS = _chunkWI7C7KDMcjs.p; exports.AGENTS = _chunkUTU4F57Hcjs.Gb; exports.AGENT_FILES = _chunkUTU4F57Hcjs.Jb; exports.AGENT_FUNCTIONS = _chunkUTU4F57Hcjs.Mb; exports.API_KEYS = _chunkUTU4F57Hcjs.D; exports.APPROVE_PRIVACY_REQUEST = _chunkUTU4F57Hcjs.W; exports.ASSESSMENTS = _chunkUTU4F57Hcjs.ea; exports.ASSESSMENT_SECTION_FIELDS = _chunkUTU4F57Hcjs.da; exports.ASSESSMENT_TEMPLATES = _chunkUTU4F57Hcjs.ia; exports.ASSUME_ROLE = _chunkUTU4F57Hcjs.Eb; exports.ATTRIBUTES = _chunkUTU4F57Hcjs.Ka; exports.ATTRIBUTE_KEYS_REQUESTS = _chunkUTU4F57Hcjs.L; exports.ATTRIBUTE_VALUES = _chunkUTU4F57Hcjs.Oa; exports.ActionInput = _chunkQEM6S2W7cjs.G; exports.ActionItemCollectionInput = _chunkQEM6S2W7cjs.R; exports.ActionItemInput = _chunkQEM6S2W7cjs.S; exports.AgentFileInput = _chunkQEM6S2W7cjs.o; exports.AgentFunctionInput = _chunkQEM6S2W7cjs.n; exports.AgentInput = _chunkQEM6S2W7cjs.m; exports.ApiKeyInput = _chunkQEM6S2W7cjs.c; exports.AssessmentAction = _chunkUTU4F57Hcjs.Od; exports.AssessmentAnswerOptionInput = _chunkQEM6S2W7cjs.Y; exports.AssessmentDisplayLogicInput = _chunkQEM6S2W7cjs.V; exports.AssessmentInput = _chunkQEM6S2W7cjs.ca; exports.AssessmentNestedRule = _chunkUTU4F57Hcjs.Nd; exports.AssessmentNestedRuleInput = _chunkQEM6S2W7cjs.U; exports.AssessmentResourceInput = _chunkQEM6S2W7cjs.ba; exports.AssessmentRetentionScheduleInput = _chunkQEM6S2W7cjs.$; exports.AssessmentRiskLogic = _chunkUTU4F57Hcjs.Qd; exports.AssessmentRule = _chunkUTU4F57Hcjs.Md; exports.AssessmentRuleInput = _chunkQEM6S2W7cjs.T; exports.AssessmentRuleWithOperands = _chunkUTU4F57Hcjs.Kd; exports.AssessmentRuleWithoutOperands = _chunkUTU4F57Hcjs.Ld; exports.AssessmentSectionInput = _chunkQEM6S2W7cjs._; exports.AssessmentSectionQuestionInput = _chunkQEM6S2W7cjs.Z; exports.AssessmentTemplateInput = _chunkQEM6S2W7cjs.aa; exports.AttestedExtraIdentifiers = _chunkUTU4F57Hcjs.nf; exports.AttributeInput = _chunkQEM6S2W7cjs.k; exports.AttributePreview = _chunkQEM6S2W7cjs.l; exports.AttributeValueInput = _chunkQEM6S2W7cjs.j; exports.BLANK = _chunkUTU4F57Hcjs.cc; exports.BULK_APPLY = _chunkUTU4F57Hcjs.bc; exports.BULK_REQUEST_FILES = _chunkUTU4F57Hcjs.Ea; exports.BUSINESS_ENTITIES = _chunkUTU4F57Hcjs.qb; exports.BusinessEntityInput = _chunkQEM6S2W7cjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunkUTU4F57Hcjs.X; exports.CAN_APPLY_IN_BULK = _chunkUTU4F57Hcjs.gc; exports.CATALOGS = _chunkUTU4F57Hcjs.r; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunkUTU4F57Hcjs.ua; exports.CODE_PACKAGES = _chunkUTU4F57Hcjs.P; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunkUTU4F57Hcjs.pb; exports.CONSENT_PARTITIONS = _chunkUTU4F57Hcjs.Ta; exports.COOKIES = _chunkUTU4F57Hcjs.Ya; exports.CREATE_ACTION_ITEMS = _chunkUTU4F57Hcjs.xb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunkUTU4F57Hcjs.Ia; exports.CREATE_AGENT = _chunkUTU4F57Hcjs.Hb; exports.CREATE_AGENT_FILE = _chunkUTU4F57Hcjs.Kb; exports.CREATE_AGENT_FUNCTION = _chunkUTU4F57Hcjs.Nb; exports.CREATE_API_KEY = _chunkUTU4F57Hcjs.E; exports.CREATE_ATTRIBUTE = _chunkUTU4F57Hcjs.Pa; exports.CREATE_ATTRIBUTE_VALUES = _chunkUTU4F57Hcjs.La; exports.CREATE_BUSINESS_ENTITY = _chunkUTU4F57Hcjs.rb; exports.CREATE_CODE_PACKAGE = _chunkUTU4F57Hcjs.R; exports.CREATE_CONSENT_EXPERIENCE = _chunkUTU4F57Hcjs.nb; exports.CREATE_CONSENT_MANAGER = _chunkUTU4F57Hcjs.ab; exports.CREATE_CONSENT_PARTITION = _chunkUTU4F57Hcjs.ob; exports.CREATE_DATA_FLOWS = _chunkUTU4F57Hcjs.Ua; exports.CREATE_DATA_SILOS = _chunkUTU4F57Hcjs.m; exports.CREATE_DATA_SUBJECT = _chunkUTU4F57Hcjs.x; exports.CREATE_DATA_SUB_CATEGORY = _chunkUTU4F57Hcjs.Tb; exports.CREATE_ENRICHER = _chunkUTU4F57Hcjs.p; exports.CREATE_IDENTIFIER = _chunkUTU4F57Hcjs.u; exports.CREATE_PROCESSING_ACTIVITY = _chunkUTU4F57Hcjs.Zb; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunkUTU4F57Hcjs.Wb; exports.CREATE_PROMPT = _chunkUTU4F57Hcjs.oa; exports.CREATE_PROMPT_GROUP = _chunkUTU4F57Hcjs.sa; exports.CREATE_PROMPT_PARTIAL = _chunkUTU4F57Hcjs.qa; exports.CREATE_REPOSITORY = _chunkUTU4F57Hcjs.C; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunkUTU4F57Hcjs.O; exports.CREATE_TEAM = _chunkUTU4F57Hcjs.ya; exports.CREATE_TEMPLATE = _chunkUTU4F57Hcjs.J; exports.CREATE_VENDOR = _chunkUTU4F57Hcjs.Qb; exports.CachedFileState = _chunkUTU4F57Hcjs.hc; exports.CachedRequestState = _chunkUTU4F57Hcjs.jc; exports.CodePackageInput = _chunkQEM6S2W7cjs.D; exports.CodePackageSdk = _chunkQEM6S2W7cjs.C; exports.ColumnName = _chunkUTU4F57Hcjs.ec; exports.ConsentManageExperienceInput = _chunkQEM6S2W7cjs.K; exports.ConsentManagerInput = _chunkQEM6S2W7cjs.M; exports.ConsentManagerMetricBin = _chunkUTU4F57Hcjs.Qc; exports.ConsentManagerServiceMetadata = _chunkQEM6S2W7cjs.ka; exports.ConsentPreferenceResponse = _chunkIXOC4S5Lcjs.i; exports.ConsentPreferenceTopic = _chunkQEM6S2W7cjs.ea; exports.ConsentPreferenceTopicOptionValue = _chunkQEM6S2W7cjs.da; exports.ConsentPurpose = _chunkQEM6S2W7cjs.fa; exports.CookieCsvInput = _chunkQEM6S2W7cjs.ja; exports.CookieInput = _chunkQEM6S2W7cjs.J; exports.CronIdentifier = _chunkVWFYPZ4Qcjs.a; exports.CronIdentifierPush = _chunkVWFYPZ4Qcjs.c; exports.DATAPOINT_EXPORT = _chunkUTU4F57Hcjs.g; exports.DATA_FLOWS = _chunkUTU4F57Hcjs.Xa; exports.DATA_POINTS = _chunkUTU4F57Hcjs.a; exports.DATA_POINT_COUNT = _chunkUTU4F57Hcjs.b; exports.DATA_SILOS = _chunkUTU4F57Hcjs.i; exports.DATA_SILOS_ENRICHED = _chunkUTU4F57Hcjs.k; exports.DATA_SILO_EXPORT = _chunkUTU4F57Hcjs.j; exports.DATA_SUBJECTS = _chunkUTU4F57Hcjs.w; exports.DATA_SUB_CATEGORIES = _chunkUTU4F57Hcjs.Sb; exports.DEBUG = _chunkWI7C7KDMcjs.z; exports.DEFAULT_TRANSCEND_API = _chunkWI7C7KDMcjs.r; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkWI7C7KDMcjs.s; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunkUTU4F57Hcjs.ce; exports.DELETE_API_KEY = _chunkUTU4F57Hcjs.F; exports.DELETE_ATTRIBUTE_VALUE = _chunkUTU4F57Hcjs.Na; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunkUTU4F57Hcjs.zb; exports.DEPLOY_CONSENT_MANAGER = _chunkUTU4F57Hcjs.db; exports.DETERMINE_LOGIN_METHOD = _chunkUTU4F57Hcjs.Cb; exports.DataCategoryGuessInput = _chunkQEM6S2W7cjs.h; exports.DataCategoryInput = _chunkQEM6S2W7cjs.q; exports.DataCategoryPreviewInput = _chunkQEM6S2W7cjs.g; exports.DataCategoryRecommendationInput = _chunkQEM6S2W7cjs.i; exports.DataFlowCsvInput = _chunkQEM6S2W7cjs.ia; exports.DataFlowInput = _chunkQEM6S2W7cjs.I; exports.DataSiloInput = _chunkQEM6S2W7cjs.Q; exports.DataSubjectInput = _chunkQEM6S2W7cjs.F; exports.DatapointInput = _chunkQEM6S2W7cjs.w; exports.ENABLED_PLUGINS = _chunkUTU4F57Hcjs.H; exports.ENRICHERS = _chunkUTU4F57Hcjs.n; exports.ENTRY_COUNT = _chunkUTU4F57Hcjs.h; exports.EXPERIENCES = _chunkUTU4F57Hcjs.Sa; exports.EnrichPrivacyRequest = _chunk2CCKVEWScjs.b; exports.EnricherInput = _chunkQEM6S2W7cjs.e; exports.FETCH_CONSENT_MANAGER = _chunkUTU4F57Hcjs._a; exports.FETCH_CONSENT_MANAGER_ID = _chunkUTU4F57Hcjs.Za; exports.FETCH_CONSENT_MANAGER_THEME = _chunkUTU4F57Hcjs.$a; exports.FETCH_PRIVACY_CENTER_ID = _chunkUTU4F57Hcjs.yb; exports.FieldInput = _chunkQEM6S2W7cjs.v; exports.GLOBAL_ACTION_ITEMS = _chunkUTU4F57Hcjs.vb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunkUTU4F57Hcjs.Ha; exports.IDENTIFIERS = _chunkUTU4F57Hcjs.s; exports.IDENTIFIER_BLOCK_LIST = _chunkUTU4F57Hcjs.dc; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunkUTU4F57Hcjs.fa; exports.INITIALIZER = _chunkUTU4F57Hcjs.o; exports.IP_ADDRESS_REGEX = _chunkIXOC4S5Lcjs.f; exports.IS_REQUIRED = _chunkUTU4F57Hcjs.fc; exports.IdentifierInput = _chunkQEM6S2W7cjs.H; exports.ImportOnetrustAssessmentsInput = _chunkQEM6S2W7cjs.ra; exports.IntlMessage = _chunkUTU4F57Hcjs.rf; exports.IntlMessageInput = _chunkQEM6S2W7cjs.P; exports.LARGE_LANGUAGE_MODELS = _chunkUTU4F57Hcjs.Fb; exports.LOGIN = _chunkUTU4F57Hcjs.Db; exports.MESSAGES = _chunkUTU4F57Hcjs._; exports.NEW_IDENTIFIER_TYPES = _chunkUTU4F57Hcjs.t; exports.NONE = _chunkUTU4F57Hcjs.ac; exports.NOTIFY_ADDITIONAL_TIME = _chunkUTU4F57Hcjs.Z; exports.ORGANIZATION = _chunkUTU4F57Hcjs.K; exports.OneTrustFileFormat = _chunkQ7I37FJVcjs.a; exports.OneTrustPullResource = _chunkQ7I37FJVcjs.b; exports.OneTrustPullSource = _chunkQ7I37FJVcjs.c; exports.OpenAIEnabledRoute = _chunkQEM6S2W7cjs.ma; exports.OpenAIEnabledRoutes = _chunkQEM6S2W7cjs.na; exports.OpenAIIntegration = _chunkQEM6S2W7cjs.oa; exports.OpenAIRouteName = _chunkQ7I37FJVcjs.f; exports.POLICIES = _chunkUTU4F57Hcjs.T; exports.PREFERENCE_TOPICS = _chunkUTU4F57Hcjs.ha; exports.PRIVACY_CENTER = _chunkUTU4F57Hcjs.Ab; exports.PROCESSING_ACTIVITIES = _chunkUTU4F57Hcjs.Yb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkUTU4F57Hcjs.Vb; exports.PROMPTS = _chunkUTU4F57Hcjs.ja; exports.PROMPTS_WITH_VARIABLES = _chunkUTU4F57Hcjs.ma; exports.PROMPT_GROUPS = _chunkUTU4F57Hcjs.la; exports.PROMPT_PARTIALS = _chunkUTU4F57Hcjs.ka; exports.PROMPT_THREADS = _chunkUTU4F57Hcjs.S; exports.PURPOSES = _chunkUTU4F57Hcjs.ga; exports.ParsedAttributeInput = _chunkUTU4F57Hcjs.oc; exports.PartitionInput = _chunkQEM6S2W7cjs.L; exports.PathfinderPolicy = _chunkQEM6S2W7cjs.pa; exports.PathfinderPolicyName = _chunkQ7I37FJVcjs.e; exports.PathfinderPolicyNameC = _chunkQEM6S2W7cjs.la; exports.PathfinderPromptRunMetadata = _chunkQEM6S2W7cjs.qa; exports.PolicyInput = _chunkQEM6S2W7cjs.O; exports.PrivacyCenterInput = _chunkQEM6S2W7cjs.N; exports.PrivacyRequest = _chunkUTU4F57Hcjs.jd; exports.PrivacyRequestInput = _chunkUTU4F57Hcjs.of; exports.PrivacyRequestResponse = _chunkUTU4F57Hcjs.xf; exports.ProcessingActivityInput = _chunkQEM6S2W7cjs.A; exports.ProcessingPurposeInput = _chunkQEM6S2W7cjs.r; exports.ProcessingPurposePreviewInput = _chunkQEM6S2W7cjs.f; exports.PromptAVendorEmailSettings = _chunkQEM6S2W7cjs.x; exports.PromptGroupInput = _chunkQEM6S2W7cjs.u; exports.PromptInput = _chunkQEM6S2W7cjs.s; exports.PromptPartialInput = _chunkQEM6S2W7cjs.t; exports.PurposeMap = _chunkK45V7WKNcjs.e; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunkUTU4F57Hcjs.wa; exports.REMOVE_REQUEST_IDENTIFIERS = _chunkUTU4F57Hcjs.Aa; exports.REPORT_PROMPT_RUN = _chunkUTU4F57Hcjs.Fa; exports.REPOSITORIES = _chunkUTU4F57Hcjs.A; exports.REQUESTS = _chunkUTU4F57Hcjs.V; exports.REQUEST_DATA_SILOS = _chunkUTU4F57Hcjs.ta; exports.REQUEST_ENRICHERS = _chunkUTU4F57Hcjs.aa; exports.REQUEST_FILES = _chunkUTU4F57Hcjs.Da; exports.REQUEST_IDENTIFIERS = _chunkUTU4F57Hcjs.Ba; exports.RETRYABLE_BATCH_STATUSES = _chunkWI7C7KDMcjs.y; exports.RETRY_REQUEST_DATA_SILO = _chunkUTU4F57Hcjs.va; exports.RETRY_REQUEST_ENRICHER = _chunkUTU4F57Hcjs.ba; exports.RateCounter = _chunkUTU4F57Hcjs.Yf; exports.RegionInput = _chunkQEM6S2W7cjs.z; exports.RepositoryInput = _chunkQEM6S2W7cjs.E; exports.RequestFileMetadata = _chunkUTU4F57Hcjs.sf; exports.RequestFileMetadataResponse = _chunkUTU4F57Hcjs.tf; exports.RequestIdentifiersResponse = _chunkUTU4F57Hcjs.hd; exports.RiskAssignmentInput = _chunkQEM6S2W7cjs.W; exports.RiskLogicInput = _chunkQEM6S2W7cjs.X; exports.SCOPES_BY_TITLE = _chunkWI7C7KDMcjs.w; exports.SCOPE_TITLES = _chunkWI7C7KDMcjs.x; exports.SET_RESOURCE_ATTRIBUTES = _chunkUTU4F57Hcjs.Ra; exports.SKIP_REQUEST_ENRICHER = _chunkUTU4F57Hcjs.ca; exports.SOFTWARE_DEVELOPMENT_KITS = _chunkUTU4F57Hcjs.M; exports.SOMBRA_VERSION = _chunkUTU4F57Hcjs.$b; exports.SUB_DATA_POINTS = _chunkUTU4F57Hcjs.c; exports.SUB_DATA_POINTS_COUNT = _chunkUTU4F57Hcjs.d; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunkUTU4F57Hcjs.e; exports.SYNC_ATTRIBUTE_TYPES = _chunkUTU4F57Hcjs.Kc; exports.SoftwareDevelopmentKitInput = _chunkQEM6S2W7cjs.B; exports.StoredApiKey = _chunkQEM6S2W7cjs.ha; exports.SuccessfulRequest = _chunkUTU4F57Hcjs.ic; exports.TEAMS = _chunkUTU4F57Hcjs.xa; exports.TEMPLATES = _chunkUTU4F57Hcjs.I; exports.TOGGLE_CONSENT_PRECEDENCE = _chunkUTU4F57Hcjs.kb; exports.TOGGLE_DATA_SUBJECT = _chunkUTU4F57Hcjs.z; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunkUTU4F57Hcjs.jb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunkUTU4F57Hcjs.ib; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunkUTU4F57Hcjs.hb; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkWI7C7KDMcjs.u; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkWI7C7KDMcjs.t; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkWI7C7KDMcjs.v; exports.TeamInput = _chunkQEM6S2W7cjs.d; exports.TemplateInput = _chunkQEM6S2W7cjs.a; exports.TranscendInput = _chunkQEM6S2W7cjs.ga; exports.TranscendPromptManager = B; exports.TranscendPullResource = _chunkQ7I37FJVcjs.d; exports.UPDATE_ACTION = _chunkUTU4F57Hcjs.ub; exports.UPDATE_ACTION_ITEMS = _chunkUTU4F57Hcjs.wb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunkUTU4F57Hcjs.Ja; exports.UPDATE_AGENTS = _chunkUTU4F57Hcjs.Ib; exports.UPDATE_AGENT_FILES = _chunkUTU4F57Hcjs.Lb; exports.UPDATE_AGENT_FUNCTIONS = _chunkUTU4F57Hcjs.Ob; exports.UPDATE_ATTRIBUTE = _chunkUTU4F57Hcjs.Qa; exports.UPDATE_ATTRIBUTE_VALUES = _chunkUTU4F57Hcjs.Ma; exports.UPDATE_BUSINESS_ENTITIES = _chunkUTU4F57Hcjs.sb; exports.UPDATE_CODE_PACKAGES = _chunkUTU4F57Hcjs.Q; exports.UPDATE_CONSENT_EXPERIENCE = _chunkUTU4F57Hcjs.mb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunkUTU4F57Hcjs.eb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunkUTU4F57Hcjs.fb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunkUTU4F57Hcjs.lb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunkUTU4F57Hcjs.cb; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunkUTU4F57Hcjs.bb; exports.UPDATE_DATA_FLOWS = _chunkUTU4F57Hcjs.Va; exports.UPDATE_DATA_SILOS = _chunkUTU4F57Hcjs.l; exports.UPDATE_DATA_SUBJECT = _chunkUTU4F57Hcjs.y; exports.UPDATE_DATA_SUB_CATEGORIES = _chunkUTU4F57Hcjs.Ub; exports.UPDATE_ENRICHER = _chunkUTU4F57Hcjs.q; exports.UPDATE_IDENTIFIER = _chunkUTU4F57Hcjs.v; exports.UPDATE_INTL_MESSAGES = _chunkUTU4F57Hcjs.$; exports.UPDATE_LOAD_OPTIONS = _chunkUTU4F57Hcjs.gb; exports.UPDATE_OR_CREATE_COOKIES = _chunkUTU4F57Hcjs.Wa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunkUTU4F57Hcjs.f; exports.UPDATE_POLICIES = _chunkUTU4F57Hcjs.U; exports.UPDATE_PRIVACY_CENTER = _chunkUTU4F57Hcjs.Bb; exports.UPDATE_PRIVACY_REQUEST = _chunkUTU4F57Hcjs.Y; exports.UPDATE_PROCESSING_ACTIVITIES = _chunkUTU4F57Hcjs._b; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkUTU4F57Hcjs.Xb; exports.UPDATE_PROMPTS = _chunkUTU4F57Hcjs.na; exports.UPDATE_PROMPT_GROUPS = _chunkUTU4F57Hcjs.ra; exports.UPDATE_PROMPT_PARTIALS = _chunkUTU4F57Hcjs.pa; exports.UPDATE_REPOSITORIES = _chunkUTU4F57Hcjs.B; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunkUTU4F57Hcjs.N; exports.UPDATE_TEAM = _chunkUTU4F57Hcjs.za; exports.UPDATE_VENDORS = _chunkUTU4F57Hcjs.Rb; exports.USERS = _chunkUTU4F57Hcjs.Ca; exports.USP_STRING_REGEX = _chunkK45V7WKNcjs.d; exports.VARIABLE_PARAMETERS_NAME = _chunkSW5CIF5Dcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkSW5CIF5Dcjs.a; exports.VENDORS = _chunkUTU4F57Hcjs.Pb; exports.VendorInput = _chunkQEM6S2W7cjs.p; exports.WebhookHeader = _chunkQEM6S2W7cjs.b; exports.addMessagesToPromptRun = _chunkUTU4F57Hcjs.tc; exports.appendCsvSync = _chunkLR3CPNDMcjs.b; exports.approvePrivacyRequests = _chunkUTU4F57Hcjs.zf; exports.assumeRole = _chunkUTU4F57Hcjs.Hd; exports.buildAIIntegrationType = _chunkLCDYXJN6cjs.b; exports.buildEnabledRouteType = _chunkLCDYXJN6cjs.a; exports.buildTranscendGraphQLClient = _chunkUTU4F57Hcjs.vc; exports.buildTranscendGraphQLClientGeneric = _chunkUTU4F57Hcjs.uc; exports.buildXdiSyncEndpoint = _chunkIXOC4S5Lcjs.g; exports.bulkRestartRequests = _chunkUTU4F57Hcjs.Hf; exports.bulkRetryEnrichers = _chunkUTU4F57Hcjs.Jf; exports.cancelPrivacyRequests = _chunkUTU4F57Hcjs.Cf; exports.consentManagersToBusinessEntities = _chunkIXOC4S5Lcjs.h; exports.convertToDataSubjectAllowlist = _chunkUTU4F57Hcjs.vd; exports.convertToDataSubjectBlockList = _chunkUTU4F57Hcjs.ud; exports.createActionItemCollection = _chunkUTU4F57Hcjs.ie; exports.createActionItems = _chunkUTU4F57Hcjs.le; exports.createAgent = _chunkUTU4F57Hcjs.ue; exports.createAgentFile = _chunkUTU4F57Hcjs.oe; exports.createAgentFunction = _chunkUTU4F57Hcjs.re; exports.createApiKey = _chunkUTU4F57Hcjs.Id; exports.createBusinessEntity = _chunkUTU4F57Hcjs.ye; exports.createCodePackage = _chunkUTU4F57Hcjs.He; exports.createConsentToken = _chunkK45V7WKNcjs.a; exports.createDataCategory = _chunkUTU4F57Hcjs.Oe; exports.createDataFlows = _chunkUTU4F57Hcjs.Se; exports.createProcessingPurpose = _chunkUTU4F57Hcjs.af; exports.createPrompt = _chunkUTU4F57Hcjs.df; exports.createRegexForTag = j; exports.createRepository = _chunkUTU4F57Hcjs.Ee; exports.createSoftwareDevelopmentKit = _chunkUTU4F57Hcjs.Be; exports.createSombraGotInstance = _chunkUTU4F57Hcjs.wc; exports.createTranscendConsentGotInstance = _chunkUTU4F57Hcjs.xc; exports.createVendor = _chunkUTU4F57Hcjs.gf; exports.defineTranscendPrompts = Gm; exports.deleteApiKey = _chunkUTU4F57Hcjs.Jd; exports.deployConsentManager = _chunkUTU4F57Hcjs.yc; exports.description = _chunkWI7C7KDMcjs.l; exports.domainToHost = _chunkIXOC4S5Lcjs.e; exports.downloadPrivacyRequestFiles = _chunkUTU4F57Hcjs.wf; exports.enrichPrivacyRequest = _chunk2CCKVEWScjs.c; exports.ensureAllDataSubjectsExist = _chunkUTU4F57Hcjs.td; exports.extractClientError = _chunkUTU4F57Hcjs.Ef; exports.extractErrorMessage = _chunkUTU4F57Hcjs.Tf; exports.fetchActiveSiloDiscoPlugin = _chunkUTU4F57Hcjs.Ac; exports.fetchAllActionItems = _chunkUTU4F57Hcjs.Bc; exports.fetchAllActions = _chunkUTU4F57Hcjs.Cc; exports.fetchAllAgentFiles = _chunkUTU4F57Hcjs.Dc; exports.fetchAllAgentFunctions = _chunkUTU4F57Hcjs.Ec; exports.fetchAllAgents = _chunkUTU4F57Hcjs.Fc; exports.fetchAllApiKeys = _chunkUTU4F57Hcjs.od; exports.fetchAllAssessmentTemplates = _chunkUTU4F57Hcjs.Hc; exports.fetchAllAssessments = _chunkUTU4F57Hcjs.Gc; exports.fetchAllAttributeValues = _chunkUTU4F57Hcjs.Jc; exports.fetchAllAttributes = _chunkUTU4F57Hcjs.Lc; exports.fetchAllBusinessEntities = _chunkUTU4F57Hcjs.Mc; exports.fetchAllCatalogs = _chunkUTU4F57Hcjs.qd; exports.fetchAllCookies = _chunkUTU4F57Hcjs.Tc; exports.fetchAllDataCategories = _chunkUTU4F57Hcjs.Uc; exports.fetchAllDataFlows = _chunkUTU4F57Hcjs.Vc; exports.fetchAllDataPoints = _chunkUTU4F57Hcjs.Ud; exports.fetchAllDataSilos = _chunkUTU4F57Hcjs.Sd; exports.fetchAllDataSubjects = _chunkUTU4F57Hcjs.sd; exports.fetchAllEnrichers = _chunkUTU4F57Hcjs.Yd; exports.fetchAllIdentifiers = _chunkUTU4F57Hcjs.$f; exports.fetchAllMessages = _chunkUTU4F57Hcjs.Wc; exports.fetchAllPolicies = _chunkUTU4F57Hcjs.Zc; exports.fetchAllPreferenceTopics = _chunkUTU4F57Hcjs.$c; exports.fetchAllPrivacyCenters = _chunkUTU4F57Hcjs.ad; exports.fetchAllProcessingActivities = _chunkUTU4F57Hcjs.bd; exports.fetchAllProcessingPurposes = _chunkUTU4F57Hcjs.cd; exports.fetchAllPromptGroups = _chunkUTU4F57Hcjs.wd; exports.fetchAllPromptPartials = _chunkUTU4F57Hcjs.xd; exports.fetchAllPromptThreads = _chunkUTU4F57Hcjs.Ad; exports.fetchAllPrompts = _chunkUTU4F57Hcjs.yd; exports.fetchAllPurposes = _chunkUTU4F57Hcjs.dd; exports.fetchAllPurposesAndPreferences = _chunkUTU4F57Hcjs.ed; exports.fetchAllRequestAttributeKeys = _chunkUTU4F57Hcjs.Ic; exports.fetchAllRequestEnrichers = _chunkUTU4F57Hcjs.fd; exports.fetchAllRequestIdentifierMetadata = _chunkUTU4F57Hcjs.gd; exports.fetchAllRequestIdentifiers = _chunkUTU4F57Hcjs.id; exports.fetchAllRequests = _chunkUTU4F57Hcjs.kd; exports.fetchAllSubDataPoints = _chunkUTU4F57Hcjs.Td; exports.fetchAllTeams = _chunkUTU4F57Hcjs.ld; exports.fetchAllTemplates = _chunkUTU4F57Hcjs._d; exports.fetchAllUsers = _chunkUTU4F57Hcjs.md; exports.fetchAllVendors = _chunkUTU4F57Hcjs.nd; exports.fetchAndIndexCatalogs = _chunkUTU4F57Hcjs.rd; exports.fetchApiKeys = _chunkUTU4F57Hcjs.pd; exports.fetchConsentManager = _chunkUTU4F57Hcjs.Nc; exports.fetchConsentManagerAnalyticsData = _chunkUTU4F57Hcjs.Rc; exports.fetchConsentManagerExperiences = _chunkUTU4F57Hcjs.Pc; exports.fetchConsentManagerId = _chunkUTU4F57Hcjs.Oc; exports.fetchConsentManagerTheme = _chunkUTU4F57Hcjs.Sc; exports.fetchConsentPreferences = _chunkIXOC4S5Lcjs.j; exports.fetchEnrichedDataSilos = _chunkUTU4F57Hcjs.Vd; exports.fetchIdentifiersAndCreateMissing = _chunkUTU4F57Hcjs.ag; exports.fetchPartitions = _chunkUTU4F57Hcjs.ae; exports.fetchPrivacyCenterId = _chunkUTU4F57Hcjs.Yc; exports.fetchPrivacyCenterUrl = _chunkUTU4F57Hcjs.Xc; exports.fetchPromptsWithVariables = _chunkUTU4F57Hcjs.zd; exports.fetchRequestDataSilo = _chunkUTU4F57Hcjs.Dd; exports.fetchRequestDataSiloActiveCount = _chunkUTU4F57Hcjs.Ed; exports.fetchRequestDataSilos = _chunkUTU4F57Hcjs.Cd; exports.fetchRequestDataSilosCount = _chunkUTU4F57Hcjs.Bd; exports.fetchRequestFilesForRequest = _chunkUTU4F57Hcjs.Fd; exports.filterNullishValuesFromObject = Vm; exports.filterRows = _chunkUTU4F57Hcjs.sc; exports.formatAttributeValues = _chunkUTU4F57Hcjs._c; exports.fuzzyMatchColumns = _chunkUTU4F57Hcjs.lc; exports.fuzzySearch = _chunkUTU4F57Hcjs.kc; exports.generateCrossAccountApiKeys = _chunkTXG7TJLKcjs.a; exports.getErrorStatus = _chunkUTU4F57Hcjs.Sf; exports.getFileMetadataForPrivacyRequests = _chunkUTU4F57Hcjs.uf; exports.getGitFilesThatChanged = Jm; exports.getUniqueValuesForColumn = _chunkUTU4F57Hcjs.rc; exports.inquirerAutoComplete = _chunkUTU4F57Hcjs.Qf; exports.inquirerConfirmBoolean = _chunkUTU4F57Hcjs.Of; exports.inquirerConfirmText = _chunkUTU4F57Hcjs.Pf; exports.limitRecords = _chunkUTU4F57Hcjs.Xf; exports.listDirectories = _chunkTXG7TJLKcjs.d; exports.listFiles = _chunkTXG7TJLKcjs.c; exports.loginUser = _chunkUTU4F57Hcjs.Gd; exports.makeGraphQLRequest = _chunkUTU4F57Hcjs._f; exports.mapColumnsToAttributes = _chunkUTU4F57Hcjs.Df; exports.mapColumnsToIdentifiers = _chunkUTU4F57Hcjs.Bf; exports.mapCsvColumnsToApi = _chunkUTU4F57Hcjs.lf; exports.mapCsvRowsToRequestInputs = _chunkUTU4F57Hcjs.qf; exports.mapEnumValues = _chunkUTU4F57Hcjs.mc; exports.mapRequestEnumValues = _chunkUTU4F57Hcjs.mf; exports.markCronIdentifierCompleted = _chunkVWFYPZ4Qcjs.d; exports.markRequestDataSiloIdsCompleted = _chunkVWFYPZ4Qcjs.f; exports.markSilentPrivacyRequests = _chunkUTU4F57Hcjs.kf; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkWI7C7KDMcjs.n; exports.normalizeIdentifierValue = _chunkUTU4F57Hcjs.pf; exports.notifyPrivacyRequestsAdditionalTime = _chunkUTU4F57Hcjs.Af; exports.parseAssessmentDisplayLogic = _chunkUTU4F57Hcjs.Pd; exports.parseAssessmentRiskLogic = _chunkUTU4F57Hcjs.Rd; exports.parseAttributesFromString = _chunkUTU4F57Hcjs.pc; exports.parseFilePath = _chunkLR3CPNDMcjs.d; exports.parseVariablesFromString = _chunkUTU4F57Hcjs.Rf; exports.pullAllDatapoints = _chunkXCTTKA6Ccjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkVWFYPZ4Qcjs.g; exports.pullConsentManagerMetrics = _chunkIXOC4S5Lcjs.d; exports.pullCronPageOfIdentifiers = _chunkVWFYPZ4Qcjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunk2CCKVEWScjs.a; exports.pullPrivacyRequests = _chunkUTU4F57Hcjs.Lf; exports.pullTranscendConfiguration = _chunkUTU4F57Hcjs.de; exports.pullUnstructuredSubDataPointRecommendations = _chunkXCTTKA6Ccjs.b; exports.pushCronIdentifiersFromCsv = _chunkVWFYPZ4Qcjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunk2CCKVEWScjs.d; exports.readCsv = _chunkUTU4F57Hcjs.qc; exports.readSafe = _chunkUTU4F57Hcjs.Zf; exports.readTranscendYaml = _chunkSW5CIF5Dcjs.d; exports.removeLinks = jm; exports.removeUnverifiedRequestIdentifiers = _chunkUTU4F57Hcjs.Nf; exports.replaceVariablesInYaml = _chunkSW5CIF5Dcjs.c; exports.reportPromptRun = _chunkUTU4F57Hcjs.ee; exports.restartPrivacyRequest = _chunkUTU4F57Hcjs.Gf; exports.retryRequestDataSilos = _chunkUTU4F57Hcjs.Kf; exports.retryRequestEnricher = _chunkUTU4F57Hcjs.fe; exports.retrySamePromise = _chunkUTU4F57Hcjs.Wf; exports.setResourceAttributes = _chunkUTU4F57Hcjs.ge; exports.skipPreflightJobs = _chunkUTU4F57Hcjs.If; exports.skipRequestDataSilos = _chunkUTU4F57Hcjs.Mf; exports.sleepPromise = _chunkUTU4F57Hcjs.Uf; exports.splitCsvToList = _chunkUTU4F57Hcjs.nc; exports.splitInHalf = _chunkUTU4F57Hcjs.Vf; exports.streamPrivacyRequestFiles = _chunkUTU4F57Hcjs.vf; exports.submitPrivacyRequest = _chunkUTU4F57Hcjs.yf; exports.syncAction = _chunkUTU4F57Hcjs.he; exports.syncActionItemCollections = _chunkUTU4F57Hcjs.ke; exports.syncActionItems = _chunkUTU4F57Hcjs.ne; exports.syncAgentFiles = _chunkUTU4F57Hcjs.qe; exports.syncAgentFunctions = _chunkUTU4F57Hcjs.te; exports.syncAgents = _chunkUTU4F57Hcjs.we; exports.syncAttribute = _chunkUTU4F57Hcjs.xe; exports.syncBusinessEntities = _chunkUTU4F57Hcjs.Ae; exports.syncCodePackages = _chunkUTU4F57Hcjs.Je; exports.syncConfigurationToTranscend = _chunkUTU4F57Hcjs.bg; exports.syncConsentManager = _chunkUTU4F57Hcjs.Le; exports.syncConsentManagerExperiences = _chunkUTU4F57Hcjs.Ke; exports.syncCookies = _chunkUTU4F57Hcjs.Ne; exports.syncDataCategories = _chunkUTU4F57Hcjs.Qe; exports.syncDataFlows = _chunkUTU4F57Hcjs.Te; exports.syncDataSiloDependencies = _chunkUTU4F57Hcjs.Xd; exports.syncDataSilos = _chunkUTU4F57Hcjs.Wd; exports.syncDataSubject = _chunkUTU4F57Hcjs.Ue; exports.syncEnricher = _chunkUTU4F57Hcjs.Zd; exports.syncIdentifier = _chunkUTU4F57Hcjs.Ve; exports.syncIntlMessages = _chunkUTU4F57Hcjs.Xe; exports.syncPartitions = _chunkUTU4F57Hcjs.be; exports.syncPolicies = _chunkUTU4F57Hcjs.Ze; exports.syncPrivacyCenter = _chunkUTU4F57Hcjs._e; exports.syncProcessingActivities = _chunkUTU4F57Hcjs.$e; exports.syncProcessingPurposes = _chunkUTU4F57Hcjs.cf; exports.syncPrompts = _chunkUTU4F57Hcjs.ff; exports.syncRepositories = _chunkUTU4F57Hcjs.Ge; exports.syncSoftwareDevelopmentKits = _chunkUTU4F57Hcjs.De; exports.syncTemplate = _chunkUTU4F57Hcjs.$d; exports.syncVendors = _chunkUTU4F57Hcjs.if; exports.updateActionItem = _chunkUTU4F57Hcjs.me; exports.updateActionItemCollection = _chunkUTU4F57Hcjs.je; exports.updateAgentFiles = _chunkUTU4F57Hcjs.pe; exports.updateAgentFunctions = _chunkUTU4F57Hcjs.se; exports.updateAgents = _chunkUTU4F57Hcjs.ve; exports.updateBusinessEntities = _chunkUTU4F57Hcjs.ze; exports.updateCodePackages = _chunkUTU4F57Hcjs.Ie; exports.updateConsentManagerToLatest = _chunkUTU4F57Hcjs.zc; exports.updateConsentManagerVersionToLatest = _chunkIXOC4S5Lcjs.a; exports.updateDataCategories = _chunkUTU4F57Hcjs.Pe; exports.updateDataFlows = _chunkUTU4F57Hcjs.Re; exports.updateIntlMessages = _chunkUTU4F57Hcjs.We; exports.updateOrCreateCookies = _chunkUTU4F57Hcjs.Me; exports.updatePolicies = _chunkUTU4F57Hcjs.Ye; exports.updateProcessingPurposes = _chunkUTU4F57Hcjs.bf; exports.updatePrompts = _chunkUTU4F57Hcjs.ef; exports.updateRepositories = _chunkUTU4F57Hcjs.Fe; exports.updateSoftwareDevelopmentKits = _chunkUTU4F57Hcjs.Ce; exports.updateVendors = _chunkUTU4F57Hcjs.hf; exports.uploadConsents = _chunkK45V7WKNcjs.f; exports.uploadCookiesFromCsv = _chunkIXOC4S5Lcjs.c; exports.uploadDataFlowsFromCsv = _chunkIXOC4S5Lcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunkUTU4F57Hcjs.Ff; exports.uploadSiloDiscoveryResults = _chunkUTU4F57Hcjs.jf; exports.validateTranscendAuth = _chunkTXG7TJLKcjs.b; exports.version = _chunkWI7C7KDMcjs.m; exports.writeCsv = _chunkLR3CPNDMcjs.c; exports.writeCsvSync = _chunkLR3CPNDMcjs.a; exports.writeLargeCsv = _chunkLR3CPNDMcjs.e; exports.writeTranscendYaml = _chunkSW5CIF5Dcjs.e;
5
5
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -131174,23 +131174,23 @@ declare function deleteApiKey(client: GraphQLClient, id: string): Promise<void>;
131174
131174
 
131175
131175
  declare const AssessmentRuleWithOperands: t.TypeC<{
131176
131176
  dependsOnQuestionReferenceId: t.StringC;
131177
- comparisonOperator: t.UnionC<[t.LiteralC<"IS_EQUAL_TO">, t.LiteralC<"IS_NOT_EQUAL_TO">, t.LiteralC<"IS_ONE_OF">, t.LiteralC<"IS_NOT_ONE_OF">, t.LiteralC<"CONTAINS">, t.LiteralC<"IS_SHOWN">]>;
131177
+ comparisonOperator: t.UnionC<[t.LiteralC<"IS_EQUAL_TO">, t.LiteralC<"IS_NOT_EQUAL_TO">, t.LiteralC<"IS_ONE_OF">, t.LiteralC<"IS_NOT_ONE_OF">, t.LiteralC<"CONTAINS">]>;
131178
131178
  comparisonOperands: t.ArrayC<t.StringC>;
131179
131179
  }>;
131180
131180
  declare const AssessmentRuleWithoutOperands: t.TypeC<{
131181
131181
  dependsOnQuestionReferenceId: t.StringC;
131182
- comparisonOperator: t.LiteralC<"IS_NOT_SHOWN">;
131182
+ comparisonOperator: t.UnionC<[t.LiteralC<"IS_NOT_SHOWN">, t.LiteralC<"IS_SHOWN">]>;
131183
131183
  }>;
131184
131184
  /**
131185
131185
  * The final, flexible codec that accepts EITHER a rule with operands OR a rule without them.
131186
131186
  */
131187
131187
  declare const AssessmentRule: t.UnionC<[t.TypeC<{
131188
131188
  dependsOnQuestionReferenceId: t.StringC;
131189
- comparisonOperator: t.UnionC<[t.LiteralC<"IS_EQUAL_TO">, t.LiteralC<"IS_NOT_EQUAL_TO">, t.LiteralC<"IS_ONE_OF">, t.LiteralC<"IS_NOT_ONE_OF">, t.LiteralC<"CONTAINS">, t.LiteralC<"IS_SHOWN">]>;
131189
+ comparisonOperator: t.UnionC<[t.LiteralC<"IS_EQUAL_TO">, t.LiteralC<"IS_NOT_EQUAL_TO">, t.LiteralC<"IS_ONE_OF">, t.LiteralC<"IS_NOT_ONE_OF">, t.LiteralC<"CONTAINS">]>;
131190
131190
  comparisonOperands: t.ArrayC<t.StringC>;
131191
131191
  }>, t.TypeC<{
131192
131192
  dependsOnQuestionReferenceId: t.StringC;
131193
- comparisonOperator: t.LiteralC<"IS_NOT_SHOWN">;
131193
+ comparisonOperator: t.UnionC<[t.LiteralC<"IS_NOT_SHOWN">, t.LiteralC<"IS_SHOWN">]>;
131194
131194
  }>]>;
131195
131195
  /** Type override */
131196
131196
  type AssessmentRule = t.TypeOf<typeof AssessmentRule>;
@@ -131210,11 +131210,11 @@ declare const AssessmentAction: t.PartialC<{
131210
131210
  }>;
131211
131211
  rule: t.UnionC<[t.TypeC<{
131212
131212
  dependsOnQuestionReferenceId: t.StringC;
131213
- comparisonOperator: t.UnionC<[t.LiteralC<"IS_EQUAL_TO">, t.LiteralC<"IS_NOT_EQUAL_TO">, t.LiteralC<"IS_ONE_OF">, t.LiteralC<"IS_NOT_ONE_OF">, t.LiteralC<"CONTAINS">, t.LiteralC<"IS_SHOWN">]>;
131213
+ comparisonOperator: t.UnionC<[t.LiteralC<"IS_EQUAL_TO">, t.LiteralC<"IS_NOT_EQUAL_TO">, t.LiteralC<"IS_ONE_OF">, t.LiteralC<"IS_NOT_ONE_OF">, t.LiteralC<"CONTAINS">]>;
131214
131214
  comparisonOperands: t.ArrayC<t.StringC>;
131215
131215
  }>, t.TypeC<{
131216
131216
  dependsOnQuestionReferenceId: t.StringC;
131217
- comparisonOperator: t.LiteralC<"IS_NOT_SHOWN">;
131217
+ comparisonOperator: t.UnionC<[t.LiteralC<"IS_NOT_SHOWN">, t.LiteralC<"IS_SHOWN">]>;
131218
131218
  }>]>;
131219
131219
  nestedRule: t.RecursiveType<t.Type<AssessmentNestedRule, AssessmentNestedRule, unknown>, any, any, unknown>;
131220
131220
  }>;
@@ -143890,7 +143890,7 @@ declare function removeUnverifiedRequestIdentifiers({ requestActions, identifier
143890
143890
  }): Promise<number>;
143891
143891
 
143892
143892
  var description = "A command line interface for programmatic operations across Transcend.";
143893
- var version = "8.1.6";
143893
+ var version = "8.1.8";
143894
143894
 
143895
143895
  /**
143896
143896
  * The name of the main binary for the CLI