@transcend-io/cli 8.0.0-alpha.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/README.md +1826 -161
  2. package/dist/bin/bash-complete.cjs +4 -0
  3. package/dist/bin/bash-complete.cjs.map +1 -0
  4. package/dist/bin/cli.cjs +3 -0
  5. package/dist/bin/cli.cjs.map +1 -0
  6. package/dist/bin/deprecated-command.cjs +7 -0
  7. package/dist/bin/deprecated-command.cjs.map +1 -0
  8. package/dist/chunk-3EZGFSMD.cjs +15 -0
  9. package/dist/chunk-3EZGFSMD.cjs.map +1 -0
  10. package/dist/chunk-3FEOMF7G.cjs +2 -0
  11. package/dist/chunk-3FEOMF7G.cjs.map +1 -0
  12. package/dist/chunk-6DMFIXMV.cjs +113 -0
  13. package/dist/chunk-6DMFIXMV.cjs.map +1 -0
  14. package/dist/chunk-6PCS4IRI.cjs +4 -0
  15. package/dist/chunk-6PCS4IRI.cjs.map +1 -0
  16. package/dist/chunk-7QV5QNGW.cjs +75 -0
  17. package/dist/chunk-7QV5QNGW.cjs.map +1 -0
  18. package/dist/chunk-AADFRD6P.cjs +2 -0
  19. package/dist/chunk-AADFRD6P.cjs.map +1 -0
  20. package/dist/chunk-ASFWHSOV.cjs +2 -0
  21. package/dist/chunk-ASFWHSOV.cjs.map +1 -0
  22. package/dist/chunk-FMX5SPCL.cjs +9 -0
  23. package/dist/chunk-FMX5SPCL.cjs.map +1 -0
  24. package/dist/chunk-GZ2U36SS.cjs +12 -0
  25. package/dist/chunk-GZ2U36SS.cjs.map +1 -0
  26. package/dist/chunk-IBTP5OXE.cjs +2 -0
  27. package/dist/chunk-IBTP5OXE.cjs.map +1 -0
  28. package/dist/chunk-KC7NDLN7.cjs +2 -0
  29. package/dist/chunk-KC7NDLN7.cjs.map +1 -0
  30. package/dist/chunk-LCDYXJN6.cjs +2 -0
  31. package/dist/chunk-LCDYXJN6.cjs.map +1 -0
  32. package/dist/chunk-MPI5VURJ.cjs +2920 -0
  33. package/dist/chunk-MPI5VURJ.cjs.map +1 -0
  34. package/dist/chunk-NKVC5Y53.cjs +2 -0
  35. package/dist/chunk-NKVC5Y53.cjs.map +1 -0
  36. package/dist/chunk-Q7I37FJV.cjs +2 -0
  37. package/dist/chunk-Q7I37FJV.cjs.map +1 -0
  38. package/dist/chunk-QEM6S2W7.cjs +2 -0
  39. package/dist/chunk-QEM6S2W7.cjs.map +1 -0
  40. package/dist/chunk-R7QYSUEN.cjs +2 -0
  41. package/dist/{chunk-CBAHSBSW.js.map → chunk-R7QYSUEN.cjs.map} +1 -1
  42. package/dist/chunk-SUCCU2FS.cjs +4 -0
  43. package/dist/chunk-SUCCU2FS.cjs.map +1 -0
  44. package/dist/chunk-T462ONFX.cjs +2 -0
  45. package/dist/chunk-T462ONFX.cjs.map +1 -0
  46. package/dist/chunk-TD7ADMVO.cjs +2 -0
  47. package/dist/chunk-TD7ADMVO.cjs.map +1 -0
  48. package/dist/chunk-V4X4IT3T.cjs +2 -0
  49. package/dist/chunk-V4X4IT3T.cjs.map +1 -0
  50. package/dist/chunk-VHQY7TSF.cjs +3 -0
  51. package/dist/chunk-VHQY7TSF.cjs.map +1 -0
  52. package/dist/chunk-WKCTKYN4.cjs +2 -0
  53. package/dist/chunk-WKCTKYN4.cjs.map +1 -0
  54. package/dist/chunk-ZUNVPK23.cjs +2 -0
  55. package/dist/chunk-ZUNVPK23.cjs.map +1 -0
  56. package/dist/chunk-ZVK4HIDF.cjs +6 -0
  57. package/dist/chunk-ZVK4HIDF.cjs.map +1 -0
  58. package/dist/impl-3MB7W3JD.cjs +2 -0
  59. package/dist/impl-3MB7W3JD.cjs.map +1 -0
  60. package/dist/impl-4EYSMS5J.cjs +2 -0
  61. package/dist/impl-4EYSMS5J.cjs.map +1 -0
  62. package/dist/impl-4QGHJNOF.cjs +2 -0
  63. package/dist/impl-4QGHJNOF.cjs.map +1 -0
  64. package/dist/impl-4TMKRPWO.cjs +2 -0
  65. package/dist/impl-4TMKRPWO.cjs.map +1 -0
  66. package/dist/impl-5OEUTJB7.cjs +2 -0
  67. package/dist/impl-5OEUTJB7.cjs.map +1 -0
  68. package/dist/impl-6CESPVNS.cjs +3 -0
  69. package/dist/impl-6CESPVNS.cjs.map +1 -0
  70. package/dist/impl-6OK7OVS6.cjs +2 -0
  71. package/dist/impl-6OK7OVS6.cjs.map +1 -0
  72. package/dist/impl-A6IYDZLA.cjs +2 -0
  73. package/dist/impl-A6IYDZLA.cjs.map +1 -0
  74. package/dist/impl-ALXI3TP7.cjs +2 -0
  75. package/dist/impl-ALXI3TP7.cjs.map +1 -0
  76. package/dist/impl-AMXKTPKE.cjs +2 -0
  77. package/dist/impl-AMXKTPKE.cjs.map +1 -0
  78. package/dist/impl-BEGQABL3.cjs +2 -0
  79. package/dist/impl-BEGQABL3.cjs.map +1 -0
  80. package/dist/impl-CT62BE2Y.cjs +2 -0
  81. package/dist/impl-CT62BE2Y.cjs.map +1 -0
  82. package/dist/impl-DCPTYADV.cjs +2 -0
  83. package/dist/impl-DCPTYADV.cjs.map +1 -0
  84. package/dist/impl-DHMLZZX7.cjs +2 -0
  85. package/dist/impl-DHMLZZX7.cjs.map +1 -0
  86. package/dist/impl-DJ3SW7AG.cjs +2 -0
  87. package/dist/impl-DJ3SW7AG.cjs.map +1 -0
  88. package/dist/impl-EE72U2AE.cjs +2 -0
  89. package/dist/impl-EE72U2AE.cjs.map +1 -0
  90. package/dist/impl-GSLBE3DP.cjs +2 -0
  91. package/dist/impl-GSLBE3DP.cjs.map +1 -0
  92. package/dist/impl-HFDUNV2A.cjs +2 -0
  93. package/dist/impl-HFDUNV2A.cjs.map +1 -0
  94. package/dist/impl-HV2SRHDV.cjs +2 -0
  95. package/dist/impl-HV2SRHDV.cjs.map +1 -0
  96. package/dist/impl-JTBEG5AM.cjs +2 -0
  97. package/dist/impl-JTBEG5AM.cjs.map +1 -0
  98. package/dist/impl-JYCFV5ST.cjs +2 -0
  99. package/dist/impl-JYCFV5ST.cjs.map +1 -0
  100. package/dist/impl-L7AJQDYS.cjs +2 -0
  101. package/dist/impl-L7AJQDYS.cjs.map +1 -0
  102. package/dist/impl-LJMBCW6Z.cjs +2 -0
  103. package/dist/impl-LJMBCW6Z.cjs.map +1 -0
  104. package/dist/impl-NCT2NJ62.cjs +2 -0
  105. package/dist/impl-NCT2NJ62.cjs.map +1 -0
  106. package/dist/impl-OEZVSI3U.cjs +2 -0
  107. package/dist/impl-OEZVSI3U.cjs.map +1 -0
  108. package/dist/impl-OZ7S4WDL.cjs +4 -0
  109. package/dist/impl-OZ7S4WDL.cjs.map +1 -0
  110. package/dist/impl-SCO4LJDB.cjs +2 -0
  111. package/dist/impl-SCO4LJDB.cjs.map +1 -0
  112. package/dist/impl-SLRQDZB4.cjs +2 -0
  113. package/dist/impl-SLRQDZB4.cjs.map +1 -0
  114. package/dist/impl-SQDB5BDK.cjs +9 -0
  115. package/dist/impl-SQDB5BDK.cjs.map +1 -0
  116. package/dist/impl-TI7DA67A.cjs +2 -0
  117. package/dist/impl-TI7DA67A.cjs.map +1 -0
  118. package/dist/impl-TVSTWXSI.cjs +2 -0
  119. package/dist/impl-TVSTWXSI.cjs.map +1 -0
  120. package/dist/impl-ULAYJG2T.cjs +6 -0
  121. package/dist/impl-ULAYJG2T.cjs.map +1 -0
  122. package/dist/impl-VVADV3UA.cjs +2 -0
  123. package/dist/impl-VVADV3UA.cjs.map +1 -0
  124. package/dist/impl-WBR473NQ.cjs +7 -0
  125. package/dist/impl-WBR473NQ.cjs.map +1 -0
  126. package/dist/impl-WKWQYPI4.cjs +6 -0
  127. package/dist/impl-WKWQYPI4.cjs.map +1 -0
  128. package/dist/impl-XTEZTAM2.cjs +2 -0
  129. package/dist/impl-XTEZTAM2.cjs.map +1 -0
  130. package/dist/impl-YLORLMRQ.cjs +2 -0
  131. package/dist/impl-YLORLMRQ.cjs.map +1 -0
  132. package/dist/impl-YVMYL724.cjs +12 -0
  133. package/dist/impl-YVMYL724.cjs.map +1 -0
  134. package/dist/impl-ZFJM6LMZ.cjs +2 -0
  135. package/dist/impl-ZFJM6LMZ.cjs.map +1 -0
  136. package/dist/index.cjs +5 -0
  137. package/dist/index.cjs.map +1 -0
  138. package/dist/{index.d.ts → index.d.cts} +33417 -6065
  139. package/package.json +54 -48
  140. package/dist/bin/bash-complete.js +0 -4
  141. package/dist/bin/bash-complete.js.map +0 -1
  142. package/dist/bin/cli.js +0 -3
  143. package/dist/bin/cli.js.map +0 -1
  144. package/dist/bin/deprecated-command.js +0 -7
  145. package/dist/bin/deprecated-command.js.map +0 -1
  146. package/dist/chunk-26T4RUOI.js +0 -12
  147. package/dist/chunk-26T4RUOI.js.map +0 -1
  148. package/dist/chunk-2LCGZ77N.js +0 -2
  149. package/dist/chunk-2LCGZ77N.js.map +0 -1
  150. package/dist/chunk-2V6ABZRI.js +0 -2
  151. package/dist/chunk-2V6ABZRI.js.map +0 -1
  152. package/dist/chunk-347UQP43.js +0 -2
  153. package/dist/chunk-347UQP43.js.map +0 -1
  154. package/dist/chunk-43JWXG77.js +0 -2
  155. package/dist/chunk-43JWXG77.js.map +0 -1
  156. package/dist/chunk-4GLITB3Y.js +0 -2
  157. package/dist/chunk-4GLITB3Y.js.map +0 -1
  158. package/dist/chunk-65I2PF73.js +0 -2
  159. package/dist/chunk-65I2PF73.js.map +0 -1
  160. package/dist/chunk-72U6ETHG.js +0 -2
  161. package/dist/chunk-72U6ETHG.js.map +0 -1
  162. package/dist/chunk-ARVEJERC.js +0 -2
  163. package/dist/chunk-ARVEJERC.js.map +0 -1
  164. package/dist/chunk-CBAHSBSW.js +0 -2
  165. package/dist/chunk-EZHASXA5.js +0 -2
  166. package/dist/chunk-EZHASXA5.js.map +0 -1
  167. package/dist/chunk-FHZRITAV.js +0 -2
  168. package/dist/chunk-FHZRITAV.js.map +0 -1
  169. package/dist/chunk-HJULYIHF.js +0 -3
  170. package/dist/chunk-HJULYIHF.js.map +0 -1
  171. package/dist/chunk-HOZXN2EM.js +0 -94
  172. package/dist/chunk-HOZXN2EM.js.map +0 -1
  173. package/dist/chunk-L5ULN3IT.js +0 -2
  174. package/dist/chunk-L5ULN3IT.js.map +0 -1
  175. package/dist/chunk-L7ZIX4SU.js +0 -2
  176. package/dist/chunk-L7ZIX4SU.js.map +0 -1
  177. package/dist/chunk-LAYHULHH.js +0 -2
  178. package/dist/chunk-LAYHULHH.js.map +0 -1
  179. package/dist/chunk-MA4JWWRO.js +0 -6
  180. package/dist/chunk-MA4JWWRO.js.map +0 -1
  181. package/dist/chunk-MK5T6DBK.js +0 -2831
  182. package/dist/chunk-MK5T6DBK.js.map +0 -1
  183. package/dist/chunk-N6JZHL5U.js +0 -2
  184. package/dist/chunk-N6JZHL5U.js.map +0 -1
  185. package/dist/chunk-NZZKRVAI.js +0 -4
  186. package/dist/chunk-NZZKRVAI.js.map +0 -1
  187. package/dist/chunk-OEB7WG3G.js +0 -4
  188. package/dist/chunk-OEB7WG3G.js.map +0 -1
  189. package/dist/chunk-SRLEEKKQ.js +0 -9
  190. package/dist/chunk-SRLEEKKQ.js.map +0 -1
  191. package/dist/chunk-WO5MQBXP.js +0 -75
  192. package/dist/chunk-WO5MQBXP.js.map +0 -1
  193. package/dist/impl-24IS3GIF.js +0 -2
  194. package/dist/impl-24IS3GIF.js.map +0 -1
  195. package/dist/impl-3YESYKVQ.js +0 -2
  196. package/dist/impl-3YESYKVQ.js.map +0 -1
  197. package/dist/impl-6MGNPY7O.js +0 -2
  198. package/dist/impl-6MGNPY7O.js.map +0 -1
  199. package/dist/impl-6SYXV3YI.js +0 -2
  200. package/dist/impl-6SYXV3YI.js.map +0 -1
  201. package/dist/impl-BVOF3W2V.js +0 -4
  202. package/dist/impl-BVOF3W2V.js.map +0 -1
  203. package/dist/impl-D4AEXEMN.js +0 -12
  204. package/dist/impl-D4AEXEMN.js.map +0 -1
  205. package/dist/impl-EAY4M3OY.js +0 -2
  206. package/dist/impl-EAY4M3OY.js.map +0 -1
  207. package/dist/impl-F4IQEKTF.js +0 -9
  208. package/dist/impl-F4IQEKTF.js.map +0 -1
  209. package/dist/impl-G4JGSVWD.js +0 -2
  210. package/dist/impl-G4JGSVWD.js.map +0 -1
  211. package/dist/impl-HFXHM3PH.js +0 -2
  212. package/dist/impl-HFXHM3PH.js.map +0 -1
  213. package/dist/impl-HMHOYOZZ.js +0 -2
  214. package/dist/impl-HMHOYOZZ.js.map +0 -1
  215. package/dist/impl-IU4EANSX.js +0 -7
  216. package/dist/impl-IU4EANSX.js.map +0 -1
  217. package/dist/impl-IWDHKBWZ.js +0 -2
  218. package/dist/impl-IWDHKBWZ.js.map +0 -1
  219. package/dist/impl-JFD2JMP6.js +0 -2
  220. package/dist/impl-JFD2JMP6.js.map +0 -1
  221. package/dist/impl-JH4VBMNT.js +0 -2
  222. package/dist/impl-JH4VBMNT.js.map +0 -1
  223. package/dist/impl-LSP4V37Z.js +0 -6
  224. package/dist/impl-LSP4V37Z.js.map +0 -1
  225. package/dist/impl-MIJFNSLS.js +0 -2
  226. package/dist/impl-MIJFNSLS.js.map +0 -1
  227. package/dist/impl-NL32KFH4.js +0 -2
  228. package/dist/impl-NL32KFH4.js.map +0 -1
  229. package/dist/impl-NLCPSIYZ.js +0 -2
  230. package/dist/impl-NLCPSIYZ.js.map +0 -1
  231. package/dist/impl-NXRQU2U5.js +0 -6
  232. package/dist/impl-NXRQU2U5.js.map +0 -1
  233. package/dist/impl-QEOVZIM5.js +0 -2
  234. package/dist/impl-QEOVZIM5.js.map +0 -1
  235. package/dist/impl-QRK4B3FD.js +0 -2
  236. package/dist/impl-QRK4B3FD.js.map +0 -1
  237. package/dist/impl-QZBKOJBQ.js +0 -2
  238. package/dist/impl-QZBKOJBQ.js.map +0 -1
  239. package/dist/impl-RFRQUKQY.js +0 -2
  240. package/dist/impl-RFRQUKQY.js.map +0 -1
  241. package/dist/impl-RIVVHWBR.js +0 -2
  242. package/dist/impl-RIVVHWBR.js.map +0 -1
  243. package/dist/impl-SJHU5PR7.js +0 -2
  244. package/dist/impl-SJHU5PR7.js.map +0 -1
  245. package/dist/impl-SYC5TORT.js +0 -2
  246. package/dist/impl-SYC5TORT.js.map +0 -1
  247. package/dist/impl-TP4QITXR.js +0 -2
  248. package/dist/impl-TP4QITXR.js.map +0 -1
  249. package/dist/impl-UOB7PV4W.js +0 -2
  250. package/dist/impl-UOB7PV4W.js.map +0 -1
  251. package/dist/impl-UUQ2BEZR.js +0 -2
  252. package/dist/impl-UUQ2BEZR.js.map +0 -1
  253. package/dist/impl-WH2I2JB7.js +0 -2
  254. package/dist/impl-WH2I2JB7.js.map +0 -1
  255. package/dist/impl-X6N6NFUV.js +0 -6
  256. package/dist/impl-X6N6NFUV.js.map +0 -1
  257. package/dist/impl-XF3OTAQZ.js +0 -2
  258. package/dist/impl-XF3OTAQZ.js.map +0 -1
  259. package/dist/impl-XH3KTZRN.js +0 -2
  260. package/dist/impl-XH3KTZRN.js.map +0 -1
  261. package/dist/impl-XQBTTRCU.js +0 -2
  262. package/dist/impl-XQBTTRCU.js.map +0 -1
  263. package/dist/impl-YA2HU57Y.js +0 -2
  264. package/dist/impl-YA2HU57Y.js.map +0 -1
  265. package/dist/impl-YEGS4G24.js +0 -2
  266. package/dist/impl-YEGS4G24.js.map +0 -1
  267. package/dist/impl-YNBHGQJK.js +0 -2
  268. package/dist/impl-YNBHGQJK.js.map +0 -1
  269. package/dist/impl-ZJL2YE7A.js +0 -2
  270. package/dist/impl-ZJL2YE7A.js.map +0 -1
  271. package/dist/index.js +0 -5
  272. package/dist/index.js.map +0 -1
  273. /package/dist/bin/{bash-complete.d.ts → bash-complete.d.cts} +0 -0
  274. /package/dist/bin/{cli.d.ts → cli.d.cts} +0 -0
  275. /package/dist/bin/{deprecated-command.d.ts → deprecated-command.d.cts} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkMPI5VURJcjs = require('./chunk-MPI5VURJ.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkKC7NDLN7cjs = require('./chunk-KC7NDLN7.cjs');var _chunk3EZGFSMDcjs = require('./chunk-3EZGFSMD.cjs');var _typeutils = require('@transcend-io/type-utils');var _internationalization = require('@transcend-io/internationalization');var _privacytypes = require('@transcend-io/privacy-types');var _iots = require('io-ts'); var R = _interopRequireWildcard(_iots); var re = _interopRequireWildcard(_iots); var lt = _interopRequireWildcard(_iots); var D = _interopRequireWildcard(_iots); var q = _interopRequireWildcard(_iots); var I = _interopRequireWildcard(_iots); var de = _interopRequireWildcard(_iots); var Ft = _interopRequireWildcard(_iots); var M = _interopRequireWildcard(_iots);var A="[NONE]",pe= exports.b ="[APPLY VALUE TO ALL ROWS]",De= exports.c ="<blank>",be= exports.d =["email","coreIdentifier"],ne= exports.e =(c=>(c.Email="email",c.CoreIdentifier="coreIdentifier",c.RequestType="requestType",c.SubjectType="subjectType",c.Locale="locale",c.Country="country",c.CountrySubDivision="countrySubDivision",c.RequestStatus="requestStatus",c.CreatedAt="createdAt",c.DataSiloIds="dataSiloIds",c))(ne||{}),et= exports.f ={email:!1,coreIdentifier:!0,requestType:!0,subjectType:!0,requestStatus:!1,createdAt:!1,dataSiloIds:!1,locale:!1,country:!1,countrySubDivision:!1},tt= exports.g ={requestType:!0,subjectType:!0},rt= exports.h =R.type({columnNames:R.partial(_typeutils.applyEnum.call(void 0, ne,()=>R.string)),identifierNames:R.record(R.string,R.string),attributeNames:R.record(R.string,R.string),requestTypeToRequestAction:R.record(R.string,_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),subjectTypeToSubjectName:R.record(R.string,R.string),languageToLocale:R.record(R.string,_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)),regionToCountry:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,[A]:A})),regionToCountrySubDivision:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountrySubdivisionCode,[A]:A})),statusToRequestStatus:R.record(R.string,_typeutils.valuesOf.call(void 0, {..._privacytypes.CompletedRequestStatus,[A]:A}))}),Te= exports.i =R.type({id:R.string,link:R.string,rowIndex:R.number,coreIdentifier:R.string,attemptedAt:R.string}),st= exports.j =R.type({failingRequests:R.array(R.record(R.string,R.any)),successfulRequests:R.array(Te),duplicateRequests:R.array(R.type({rowIndex:R.number,coreIdentifier:R.string,attemptedAt:R.string}))});var _inquirer = require('inquirer'); var _inquirer2 = _interopRequireDefault(_inquirer);var _fuzzysearch = require('fuzzysearch'); var _fuzzysearch2 = _interopRequireDefault(_fuzzysearch);function Ae(n,e){return _fuzzysearch2.default.call(void 0, n.toLowerCase(),e.toLowerCase())||_fuzzysearch2.default.call(void 0, e.toLowerCase(),n.toLowerCase())}function ae(n,e,s,l){let a=n.filter(o=>Ae(e.toLowerCase(),o.toLowerCase()));return[...a,new _inquirer2.default.Separator,...s?[]:[A],...l?[pe]:[],...n.filter(o=>!a.includes(o))]}var _inquirerautocompleteprompt = require('inquirer-autocomplete-prompt'); var _inquirerautocompleteprompt2 = _interopRequireDefault(_inquirerautocompleteprompt);async function te(n,e,s){_inquirer2.default.registerPrompt("autocomplete",_inquirerautocompleteprompt2.default);let l=n.map(o=>o||"<blank>").filter(o=>!s[o]);if(l.length===0)return s;let a=await _inquirer2.default.prompt(l.map(o=>({name:o,message:`Map value of: ${o}`,type:"autocomplete",default:e.find(i=>Ae(o,i)),source:(i,r)=>r?e.filter(t=>typeof t=="string"&&Ae(r,t)):e})));return{...s,..._typeutils.apply.call(void 0, a,o=>typeof o=="string"?o:Object.values(o)[0])}}function Ee(n){return n.split(",").map(e=>e.trim()).filter(e=>e)}var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var at=re.type({key:re.string,values:re.array(re.string)});function ut(n){let e=n.map(s=>{let[l,a]=s.trim().split(":");if(!a)throw new Error("Expected attributes in key:value1;value2,key2:value3;value4");let o=a.split(";");return{key:l,values:o}});return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Attributes to apply to all requests:")),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(JSON.stringify(e,null,2))),e}var _sync = require('csv-parse/sync');var _fs = require('fs');function ct(n,e,s={columns:!0}){let l=_sync.parse.call(void 0, _fs.readFileSync.call(void 0, n,"utf-8"),s);return _typeutils.decodeCodec.call(void 0, lt.array(e),l).map(i=>Object.entries(i).reduce((r,[t,y])=>Object.assign(r,{[t.replace(/[^a-z_.+\-A-Z -~]/g,"")]:y}),{}))}function G(n,e){return _chunk3EZGFSMDcjs.j.call(void 0, n.map(s=>s[e]||"").flat())}async function pt(n){let e=_chunk3EZGFSMDcjs.j.call(void 0, n.map(a=>Object.keys(a)).flat()),s=n,l=!0;for(;l;){let{filterColumnName:a}=await _inquirer2.default.prompt([{name:"filterColumnName",message:`If you need to filter the list of requests to import, choose the column to filter on. Currently ${s.length} rows.`,type:"list",default:e,choices:[A,...e]}]);if(l=A!==a,l){let o=G(s,a),{valuesToKeep:i}=await _inquirer2.default.prompt([{name:"valuesToKeep",message:"Keep rows matching this value",type:"checkbox",default:e,choices:o}]);s=s.filter(r=>i.includes(r[a]))}}return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Importing ${s.length} requests`)),s}var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function Us({requestActions:n,auth:e,requestIds:s,statuses:l=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.RequestMade,_privacytypes.RequestStatus.Delayed,_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Secondary,_privacytypes.RequestStatus.Enriching,_privacytypes.RequestStatus.Waiting,_privacytypes.RequestStatus.SecondaryApproving],createdAtAfter:a,createdAtBefore:o,concurrency:i=100,transcendUrl:r=_chunkKC7NDLN7cjs.e}){let t=_chunkMPI5VURJcjs.Wd.call(void 0, r,e),y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=await _chunkMPI5VURJcjs.ne.call(void 0, t,{actions:n,statuses:l,createdAtBefore:o,createdAtAfter:a,isSilent:!1,requestIds:s});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Marking "${g.length}" as silent mode.`));let m=0;c.start(g.length,0),await _chunkMPI5VURJcjs.b.call(void 0, g,async f=>{await _chunkMPI5VURJcjs.cc.call(void 0, t,_chunkMPI5VURJcjs._,{input:{id:f.id,isSilent:!0}}),m+=1,c.update(m)},{concurrency:i}),c.stop();let p=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${m} requests as silent mode in "${p/1e3}" seconds!`)),g.length}async function gt(n,e){let s=_typeutils.getValues.call(void 0, ne).filter(a=>!e.getValue("columnNames",a)),l=s.length===0?{}:await _inquirer2.default.prompt(s.map(a=>{let o=_chunk3EZGFSMDcjs.h.call(void 0, a.replace("ColumnName","")),i=ae(n,o,et[a],!!tt[a]);return{name:a,message:`Choose the column that will be used to map in the field: ${o}`,type:"list",default:i[0],choices:i}}));return await Promise.all(_typeutils.getEntries.call(void 0, l).map(([a,o])=>e.setValue(o,"columnNames",a))),l}async function yt(n,e,{state:s,columnNameMap:l}){let a=f=>s.getValue("columnNames",f)||l[f],{internalSubjects:o}=await _chunkMPI5VURJcjs.cc.call(void 0, n,_chunkMPI5VURJcjs.y);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request action"));let i=await te(G(e,a("requestType")),Object.values(_privacytypes.RequestAction),s.getValue("requestTypeToRequestAction"));await s.setValue(i,"requestTypeToRequestAction"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for subject"));let r=await te(G(e,a("subjectType")),o.map(({type:f})=>f),s.getValue("subjectTypeToSubjectName"));await s.setValue(r,"subjectTypeToSubjectName"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for locale"));let t=await te(G(e,a("locale")),Object.values(_internationalization.LanguageKey),s.getValue("languageToLocale"));await s.setValue(t,"languageToLocale"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request status")),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for request status"));let y=a("requestStatus"),c=y===A?{}:await te(G(e,y),[...Object.values(_privacytypes.CompletedRequestStatus),A],s.getValue("statusToRequestStatus"));await s.setValue(c,"statusToRequestStatus"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country"));let g=a("country"),m=g===A?{}:await te(G(e,g),[...Object.values(_privacytypes.IsoCountryCode),A],s.getValue("regionToCountry"));await s.setValue(m,"regionToCountry"),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Determining mapping of columns for country sub division"));let d=a("countrySubDivision"),p=d===A?{}:await te(G(e,d),[...Object.values(_privacytypes.IsoCountrySubdivisionCode),A],s.getValue("regionToCountrySubDivision"));await s.setValue(p,"regionToCountrySubDivision")}var _iotstypes = require('io-ts-types');var Pr=D.record(D.string,D.array(D.intersection([D.type({value:D.string}),D.partial({name:D.string})]))),ho= exports.x =D.intersection([D.type({email:D.string,attestedExtraIdentifiers:Pr,coreIdentifier:D.string,requestType:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:D.string}),D.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:D.array(at),status:_typeutils.valuesOf.call(void 0, _privacytypes.CompletedRequestStatus),createdAt:_iotstypes.DateFromISOString,dataSiloIds:D.array(D.string),locale:_typeutils.valuesOf.call(void 0, _internationalization.LanguageKey)})]);function Dr(n,e,s){if(e===_privacytypes.IdentifierType.Email)return n.toLowerCase();if(e===_privacytypes.IdentifierType.Phone){let l=n.replace(_privacytypes.NORMALIZE_PHONE_NUMBER,"").replace(/[()]/g,"").replace(/[–]/g,"").replace(/[:]/g,"").replace(/[‭‬]/g,"").replace(/[A-Za-z]/g,"");return l?l.startsWith("+")?l:`+${s}${l}`:""}return n}function qt(n,e,{columnNameMap:s,identifierNameMap:l,attributeNameMap:a,requestAttributeKeys:o,defaultPhoneCountryCode:i="1"}){let r=t=>e.getValue("columnNames",t)||s[t];return n.map(t=>{let y={};Object.entries(l).filter(([,d])=>d!==A).forEach(([d,p])=>{let f=Object.values(_privacytypes.IdentifierType).includes(d)?d:_privacytypes.IdentifierType.Custom,h=t[p];if(h){let S=Dr(h,f,i);S&&(y[f]||(y[f]=[]),y[f].push({value:S,name:d}))}});let c=[];Object.entries(a).filter(([,d])=>d!==A).forEach(([d,p])=>{let f=t[p];if(f){let h=_optionalChain([o, 'access', _2 => _2.find, 'call', _3 => _3(S=>S.name===d), 'optionalAccess', _4 => _4.type])==="MULTI_SELECT";c.push({values:h?Ee(f):f,key:d})}});let g=r("requestType"),m=r("subjectType");return[t,{email:t[r("email")],attestedExtraIdentifiers:y,attributes:c,coreIdentifier:t[r("coreIdentifier")],requestType:g===pe?e.getValue("requestTypeToRequestAction",De):e.getValue("requestTypeToRequestAction",t[g]),subjectType:m===pe?e.getValue("subjectTypeToSubjectName",De):e.getValue("subjectTypeToSubjectName",t[m]),...r("locale")!==A&&t[r("locale")]?{locale:e.getValue("languageToLocale",t[r("locale")])}:{},...r("country")!==A&&t[r("country")]?{country:e.getValue("regionToCountry",t[r("country")])}:{},...r("countrySubDivision")!==A&&t[r("countrySubDivision")]?{countrySubDivision:e.getValue("regionToCountrySubDivision",t[r("countrySubDivision")])}:{},...r("requestStatus")!==A&&e.getValue("statusToRequestStatus",t[r("requestStatus")])!==A&&t[r("requestStatus")]?{status:e.getValue("statusToRequestStatus",t[r("requestStatus")])}:{},...r("createdAt")!==A&&t[r("createdAt")]?{createdAt:new Date(t[r("createdAt")])}:{},...r("dataSiloIds")!==A&&t[r("dataSiloIds")]?{dataSiloIds:Ee(t[r("dataSiloIds")])}:{}}]})}var St=q.type({defaultMessage:q.string,id:q.string}),xr= exports.B =q.type({downloadKey:q.string,error:q.union([q.null,q.string]),mimetype:q.string,size:q.string,fileName:q.string,dataPoint:q.type({id:q.string,title:q.union([St,q.null]),description:q.union([St,q.null]),name:q.string,slug:q.string,encryption:q.union([_typeutils.valuesOf.call(void 0, _privacytypes.TableEncryptionType),q.null]),dataSilo:q.type({id:q.string,title:q.string,description:q.string,type:q.string,outerType:q.union([q.string,q.null])}),path:q.array(q.string)})}),Lr= exports.C =q.type({nodes:q.array(xr),totalCount:q.number,_links:q.partial({next:q.union([q.string,q.null]),previous:q.union([q.string,q.null])})});async function bt(n,{sombra:e,concurrency:s=5,limit:l=100}){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling file metadata for ${n.length} requests`));let a=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),i=0;o.start(n.length,0);let r=await _chunkMPI5VURJcjs.b.call(void 0, n,async c=>{let g=[],m=!0,d=0;for(;m;){let p;try{let f=await e.get(`v1/data-subject-request/${c.id}/download-keys`,{searchParams:{limit:l,offset:d}}).json();p=_typeutils.decodeCodec.call(void 0, Lr,f),g.push(...p.nodes),d+=l,m=!!p._links.next&&p.nodes.length===l}catch(f){throw new Error(`Received an error from server: ${_optionalChain([f, 'optionalAccess', _5 => _5.response, 'optionalAccess', _6 => _6.body])||_optionalChain([f, 'optionalAccess', _7 => _7.message])}`)}}return i+=1,o.update(i),[c,g]},{concurrency:s});o.stop();let y=new Date().getTime()-a;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded file metadata ${n.length} requests in "${y/1e3}" seconds!`)),r}async function Tt(n,{requestId:e,sombra:s,onFileDownloaded:l,concurrency:a=20}){await _chunkMPI5VURJcjs.b.call(void 0, n,async o=>{try{await s.get("v1/files",{searchParams:{downloadKey:o.downloadKey}}).buffer().then(i=>l(o,i))}catch(i){if(_optionalChain([i, 'optionalAccess', _8 => _8.response, 'optionalAccess', _9 => _9.body, 'optionalAccess', _10 => _10.includes, 'call', _11 => _11("fileMetadata#verify")])){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to pull file for: ${o.fileName} (request:${e}) - JWT expired. This likely means that the file is no longer available. Try restarting the request from scratch in Transcend Admin Dashboard. Skipping the download of this file.`));return}throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _12 => _12.response, 'optionalAccess', _13 => _13.body])||_optionalChain([i, 'optionalAccess', _14 => _14.message])}`)}},{concurrency:a})}var _path = require('path');async function Uo({auth:n,folderPath:e,requestIds:s,createdAtBefore:l,sombraAuth:a,createdAtAfter:o,statuses:i=[_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Downloadable],concurrency:r=5,transcendUrl:t=_chunkKC7NDLN7cjs.e,approveAfterDownload:y=!1}){let c=_chunkMPI5VURJcjs.Wd.call(void 0, t,n),g=await _chunkMPI5VURJcjs.Xd.call(void 0, t,n,a);_fs.existsSync.call(void 0, e)||_fs.mkdirSync.call(void 0, e);let m=await _chunkMPI5VURJcjs.ne.call(void 0, c,{actions:[_privacytypes.RequestAction.Access],createdAtBefore:l,createdAtAfter:o,statuses:i,requestIds:s}),d=await bt(m,{sombra:g,concurrency:r}),p=new Date().getTime(),f=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),h=0,S=0;f.start(m.length,0),await _chunkMPI5VURJcjs.b.call(void 0, d,async([v,x])=>{let K=_path.join.call(void 0, e,v.id);_fs.existsSync.call(void 0, K)||_fs.mkdirSync.call(void 0, K),await Tt(x,{sombra:g,requestId:v.id,onFileDownloaded:($,_)=>{let z=_path.join.call(void 0, K,$.fileName),j=_path.dirname.call(void 0, z);_fs.existsSync.call(void 0, j)||_fs.mkdirSync.call(void 0, j,{recursive:!0}),_fs.writeFileSync.call(void 0, z,_)}}),y&&v.status===_privacytypes.RequestStatus.Approving&&(await _chunkMPI5VURJcjs.cc.call(void 0, c,_chunkMPI5VURJcjs.Y,{input:{requestId:v.id}}),S+=1),h+=1,f.update(h)},{concurrency:r}),f.stop();let T=new Date().getTime()-p;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully downloaded ${h} requests in "${T/1e3}" seconds!`)),S>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Approved ${S} requests in Transcend.`)),m.length}var Le=I.type({id:I.string,link:I.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.RequestStatus),type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction),subjectType:I.string,email:I.union([I.null,I.string]),coreIdentifier:I.string,isSilent:I.boolean,isTest:I.boolean,country:I.union([I.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode)]),countrySubDivision:I.union([I.null,_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)]),attributeValues:I.array(I.type({attributeKey:I.type({name:I.string}),name:I.string}))});async function It(n,e,{details:s="",isTest:l=!1,emailIsVerified:a=!0,skipSendingReceipt:o=!1,isSilent:i=!0,additionalAttributes:r=[]}={}){let t=[...r];(e.attributes||[]).forEach(g=>{let m=t.find(d=>d.key===g.key);m?(m.values.push(...g.values),m.values=_chunk3EZGFSMDcjs.j.call(void 0, m.values)):t.push(g)});let y;try{y=await n.post("v1/data-subject-request",{json:{type:e.requestType,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:a,attestedExtraIdentifiers:e.attestedExtraIdentifiers},subjectType:e.subjectType,isSilent:i,isTest:l,skipSendingReceipt:o,...e.locale?{locale:e.locale}:{},details:s,attributes:t,...e.country||e.countrySubDivision?{region:{...e.country?{country:e.country}:e.countrySubDivision?{country:e.countrySubDivision.split("-")[0]}:{},...e.countrySubDivision?{countrySubDivision:e.countrySubDivision}:{}}}:{},...e.createdAt?{createdAt:e.createdAt}:{},...e.dataSiloIds?{dataSiloIds:e.dataSiloIds}:{},...e.status?{completedRequestStatus:e.status}:{}}}).json()}catch(g){throw new Error(`Received an error from server: ${_optionalChain([g, 'optionalAccess', _15 => _15.response, 'optionalAccess', _16 => _16.body])||_optionalChain([g, 'optionalAccess', _17 => _17.message])}`)}let{request:c}=_typeutils.decodeCodec.call(void 0, I.type({request:Le}),y);return c}async function oi({requestActions:n,requestOrigins:e,auth:s,silentModeBefore:l,createdAtAfter:a,createdAtBefore:o,concurrency:i=50,transcendUrl:r=_chunkKC7NDLN7cjs.e}){let t=_chunkMPI5VURJcjs.Wd.call(void 0, r,s),y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=await _chunkMPI5VURJcjs.ne.call(void 0, t,{actions:n,statuses:[_privacytypes.RequestStatus.Approving],createdAtAfter:a,origins:e,createdAtBefore:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Approving "${g.length}" requests.`));let m=0,d=0;c.start(g.length,0),await _chunkMPI5VURJcjs.b.call(void 0, g,async h=>{l&&new Date(l)>new Date(h.createdAt)&&await _chunkMPI5VURJcjs.cc.call(void 0, t,_chunkMPI5VURJcjs._,{input:{id:h.id,isSilent:!0}});try{await _chunkMPI5VURJcjs.cc.call(void 0, t,_chunkMPI5VURJcjs.Y,{input:{requestId:h.id}})}catch(S){S.message.includes("Request must be in an approving state,")&&(d+=1)}m+=1,c.update(m)},{concurrency:i}),c.stop();let f=new Date().getTime()-y;return d>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`${d} requests were skipped.`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully approved ${m} requests in "${f/1e3}" seconds!`)),g.length}async function fi({requestActions:n=Object.values(_privacytypes.RequestAction),auth:e,requestIds:s,createdAtBefore:l,days:a=45,daysLeft:o=10,createdAtAfter:i,emailTemplate:r="Additional Time Needed",concurrency:t=100,transcendUrl:y=_chunkKC7NDLN7cjs.e}){let c=_chunkMPI5VURJcjs.Wd.call(void 0, y,e),g=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),p=(await _chunkMPI5VURJcjs.hd.call(void 0, c,r)).find(T=>T.title===r);if(!p)throw new Error(`Failed to find a template with title: "${r}"`);let f=await _chunkMPI5VURJcjs.ne.call(void 0, c,{actions:n,createdAtBefore:l,createdAtAfter:i,isSilent:!1,isClosed:!1,requestIds:s});f=f.filter(T=>typeof T.daysRemaining=="number"&&T.daysRemaining<o),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying "${f.length}" that more time is needed.`));let h=0;m.start(f.length,0),await _chunkMPI5VURJcjs.b.call(void 0, f,async T=>{await _chunkMPI5VURJcjs.cc.call(void 0, c,_chunkMPI5VURJcjs.$,{input:{requestId:T.id,template:p.template.defaultMessage,subject:p.subject.defaultMessage,additionalTime:a}}),h+=1,m.update(h)},{concurrency:t}),m.stop();let N=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully marked ${h} requests as silent mode in "${N/1e3}" seconds!`)),f.length}async function vt(n,e,s){let{initializer:l}=await _chunkMPI5VURJcjs.cc.call(void 0, n,_chunkMPI5VURJcjs.q),a=l.identifiers.filter(({name:i})=>!s.getValue("identifierNames",i)&&!be.includes(i)),o=a.length===0?{}:await _inquirer2.default.prompt(a.map(({name:i})=>{let r=ae(e,i,!1);return{name:i,message:`Choose the column that will be used to map in the identifier: ${i}`,type:"list",default:r[0],choices:r}}));return await Promise.all(Object.entries(o).map(([i,r])=>s.setValue(r,"identifierNames",i))),{...s.getValue("identifierNames"),...o}}async function Ni({requestActions:n,cancellationTitle:e,auth:s,requestIds:l,silentModeBefore:a,createdAtBefore:o,createdAtAfter:i,statuses:r=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.RequestMade,_privacytypes.RequestStatus.Delayed,_privacytypes.RequestStatus.Approving,_privacytypes.RequestStatus.Secondary,_privacytypes.RequestStatus.Enriching,_privacytypes.RequestStatus.Waiting,_privacytypes.RequestStatus.SecondaryApproving],concurrency:t=50,transcendUrl:y=_chunkKC7NDLN7cjs.e}){let c=_chunkMPI5VURJcjs.Wd.call(void 0, y,s),g=new Date().getTime(),m=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d;if(e){let T=(await _chunkMPI5VURJcjs.hd.call(void 0, c,e)).find(v=>v.title===e);if(!T)throw new Error(`Failed to find a template with title: "${e}"`);d=T}let p=await _chunkMPI5VURJcjs.ne.call(void 0, c,{actions:n,createdAtBefore:o,createdAtAfter:i,statuses:r,requestIds:l});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Canceling "${p.length}" requests${d?` Using template: ${d.title}`:""}.`));let f=0;m.start(p.length,0),await _chunkMPI5VURJcjs.b.call(void 0, p,async N=>{a&&new Date(a)>new Date(N.createdAt)&&await _chunkMPI5VURJcjs.cc.call(void 0, c,_chunkMPI5VURJcjs._,{input:{id:N.id,isSilent:!0}}),await _chunkMPI5VURJcjs.cc.call(void 0, c,_chunkMPI5VURJcjs.Z,{input:{requestId:N.id,...d?{subject:`Re: ${d.subject.defaultMessage}`,template:d.template.defaultMessage}:{}}}),f+=1,m.update(f)},{concurrency:t}),m.stop();let S=new Date().getTime()-g;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully canceled ${f} requests in "${S/1e3}" seconds!`)),p.length}async function Lt(n,e,s,l){let a=l.filter(({name:i})=>!s.getValue("attributeNames",i)),o=a.length===0?{}:await _inquirer2.default.prompt(a.map(({name:i})=>{let r=ae(e,i,!1);return{name:i,message:`Choose the column that will be used to map in the attribute: ${i}`,type:"list",default:r[0],choices:r}}));return await Promise.all(Object.entries(o).map(([i,r])=>s.setValue(r,"attributeNames",i))),{...s.getValue("attributeNames"),...o}}var $t=/{\\"message\\":\\"(.+?)\\",/;function Ie(n){return $t.test(n)?$t.exec(n)[1]:null}var _persistedstate = require('@transcend-io/persisted-state');async function sn({cacheFilepath:n,requestReceiptFolder:e,file:s,auth:l,sombraAuth:a,concurrency:o=100,defaultPhoneCountryCode:i="1",transcendUrl:r=_chunkKC7NDLN7cjs.e,attributes:t=[],emailIsVerified:y=!0,skipFilterStep:c=!1,skipSendingReceipt:g=!0,isTest:m=!1,isSilent:d=!0,debug:p=!1,dryRun:f=!1}){let h=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),N=ut(t),T=new (0, _persistedstate.PersistedState)(n,rt,{columnNames:{},requestTypeToRequestAction:{},subjectTypeToSubjectName:{},languageToLocale:{},statusToRequestStatus:{},identifierNames:{},attributeNames:{},regionToCountrySubDivision:{},regionToCountry:{}}),v=_path.join.call(void 0, e,`tr-request-upload-${new Date().toISOString()}-${s.split("/").pop()}`.replace(".csv",".json")),x=new (0, _persistedstate.PersistedState)(v,st,{successfulRequests:[],duplicateRequests:[],failingRequests:[]}),K=await _chunkMPI5VURJcjs.Xd.call(void 0, r,l,a),$=ct(s,de.record(de.string,de.string)),_=_chunk3EZGFSMDcjs.j.call(void 0, $.map(U=>Object.keys(U)).flat());if($.length===0)throw new Error("No Requests found in list! Ensure the first row of the CSV is a header and the rest are requests.");if(p){let U=$[0];_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`First request: ${JSON.stringify(U,null,2)}`))}let z=c?$:await pt($),j=_chunkMPI5VURJcjs.Wd.call(void 0, r,l),L=await _chunkMPI5VURJcjs.ce.call(void 0, j),B=await gt(_,T),Y=await vt(j,_,T),k=await Lt(j,_,T,L);await yt(j,z,{state:T,columnNameMap:B});let O=qt(z,T,{defaultPhoneCountryCode:i,columnNameMap:B,identifierNameMap:Y,attributeNameMap:k,requestAttributeKeys:L});p||S.start(O.length,0);let X=0;await _chunkMPI5VURJcjs.b.call(void 0, O,async([U,V],Q)=>{let _e=p?`email:${V.email} | coreIdentifier:${V.coreIdentifier}`:`row:${Q.toString()}`;if(p&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`[${Q+1}/${O.length}] Importing: ${JSON.stringify(V,null,2)}`)),f){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Bailing out on dry run because dryRun is set"));return}try{let ee=await It(K,V,{details:`Uploaded by Transcend Cli: "tr-request-upload" : ${JSON.stringify(U,null,2)}`,isTest:m,emailIsVerified:y,skipSendingReceipt:g,isSilent:d,additionalAttributes:N});p&&(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Q+1}/${O.length}] Successfully submitted the test data subject request: "${_e}"`)),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`[${Q+1}/${O.length}] View it at: "${ee.link}"`)));let oe=x.getValue("successfulRequests");oe.push({id:ee.id,link:ee.link,rowIndex:Q,coreIdentifier:ee.coreIdentifier,attemptedAt:new Date().toISOString()}),await x.setValue(oe,"successfulRequests")}catch(ee){let oe=`${ee.message} - ${JSON.stringify(_optionalChain([ee, 'access', _18 => _18.response, 'optionalAccess', _19 => _19.body]),null,2)}`,Pe=Ie(oe);if(Pe==="Client error: You have already made this request."){p&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`[${Q+1}/${O.length}] Skipping request as it is a duplicate`));let le=x.getValue("duplicateRequests");le.push({coreIdentifier:V.coreIdentifier,rowIndex:Q,attemptedAt:new Date().toISOString()}),await x.setValue(le,"duplicateRequests")}else{let le=x.getValue("failingRequests");le.push({...V,rowIndex:Q,error:Pe||oe,attemptedAt:new Date().toISOString()}),await x.setValue(le,"failingRequests"),p&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(Pe||oe)),_chunkZUNVPK23cjs.a.error(_colors2.default.red(`[${Q+1}/${O.length}] Failed to submit request for: "${_e}"`)))}}X+=1,p||S.update(X)},{concurrency:o}),S.stop();let ue=new Date().getTime()-h;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed upload in "${ue/1e3}" seconds.`)),x.getValue("duplicateRequests").length>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Encountered "${x.getValue("duplicateRequests").length}" duplicate requests. See "${v}" to review the core identifiers for these requests.`)),x.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${x.getValue("failingRequests").length}" errors. See "${v}" to review the error messages and inputs.`)),process.exit(1))}async function _t(n,e,{sendEmailReceipt:s=!1,skipWaitingPeriod:l=!1,emailIsVerified:a=!0,requestIdentifiers:o=[]}={}){let i=await n.post("v1/data-subject-request",{json:{type:e.type,subject:{coreIdentifier:e.coreIdentifier,email:e.email,emailIsVerified:a,...o.length>0?{attestedExtraIdentifiers:_typeutils.apply.call(void 0, _chunk3EZGFSMDcjs.d.call(void 0, o.filter(t=>!(t.name==="email"&&t.value===e.email)&&!be.includes(t.name)).map(t=>({...t,type:Object.values(_privacytypes.IdentifierType).includes(t.name)?t.name:_privacytypes.IdentifierType.Custom})),"type"),(t,y)=>t.map(({name:c,value:g})=>({...y===_privacytypes.IdentifierType.Custom?{name:c}:{},value:g})))}:{}},requestId:e.id,subjectType:e.subjectType,isSilent:e.isSilent,isTest:e.isTest,locale:e.locale,skipWaitingPeriod:l,createdAt:e.createdAt,details:`Restarted by Transcend cli: "tr-request-restart" - ${e.details}`,skipSendingReceipt:!s}}).json(),{request:r}=_typeutils.decodeCodec.call(void 0, Ft.type({request:Le}),i);return r}var Hr=M.intersection([Te,M.type({error:M.string})]),Xr=M.type({restartedRequests:M.array(Te),failingRequests:M.array(Hr)});async function wn({requestReceiptFolder:n,auth:e,sombraAuth:s,requestActions:l,requestStatuses:a,createdAtBefore:o,createdAtAfter:i,transcendUrl:r=_chunkKC7NDLN7cjs.e,requestIds:t=[],createdAt:y=new Date,silentModeBefore:c,sendEmailReceipt:g=!1,emailIsVerified:m=!0,copyIdentifiers:d=!1,skipWaitingPeriod:p=!1,concurrency:f=20}){let h=new Date().getTime(),S=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),N=_path.join.call(void 0, n,`tr-request-restart-${new Date().toISOString()}`),T=new (0, _persistedstate.PersistedState)(N,Xr,{restartedRequests:[],failingRequests:[]}),v=await _chunkMPI5VURJcjs.Xd.call(void 0, r,e,s),x=_chunkMPI5VURJcjs.Wd.call(void 0, r,e),$=(await _chunkMPI5VURJcjs.ne.call(void 0, x,{actions:l,statuses:a,createdAtBefore:o,createdAtAfter:i})).filter(L=>new Date(L.createdAt)<y);if(_chunkZUNVPK23cjs.a.info(`Found ${$.length} requests to process`),d&&_chunkZUNVPK23cjs.a.info("copyIdentifiers detected - All Identifiers will be copied."),g&&_chunkZUNVPK23cjs.a.info("sendEmailReceipt detected - Email receipts will be sent."),p&&_chunkZUNVPK23cjs.a.info("skipWaitingPeriod detected - Waiting period will be skipped."),t.length>0&&t.length!==$.length){let L=_chunk3EZGFSMDcjs.c.call(void 0, t,$.map(({id:B})=>B));L.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${L.join(",")}.`)),process.exit(1))}let _=0;S.start($.length,0),await _chunkMPI5VURJcjs.b.call(void 0, $,async(L,B)=>{try{let Y=d?await _chunkMPI5VURJcjs.le.call(void 0, x,v,{requestId:L.id}):[],k=await _t(v,{...L,isSilent:c&&new Date(L.createdAt)<c?!0:L.isSilent},{requestIdentifiers:Y,skipWaitingPeriod:p,sendEmailReceipt:g,emailIsVerified:m}),O=T.getValue("restartedRequests");O.push({id:k.id,link:k.link,rowIndex:B,coreIdentifier:k.coreIdentifier,attemptedAt:new Date().toISOString()}),await T.setValue(O,"restartedRequests")}catch(Y){let k=`${Y.message} - ${JSON.stringify(_optionalChain([Y, 'access', _20 => _20.response, 'optionalAccess', _21 => _21.body]),null,2)}`,O=Ie(k),X=T.getValue("failingRequests");X.push({id:L.id,link:L.link,rowIndex:B,coreIdentifier:L.coreIdentifier,attemptedAt:new Date().toISOString(),error:O||k}),await T.setValue(X,"failingRequests")}_+=1,S.update(_)},{concurrency:f}),S.stop();let j=new Date().getTime()-h;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of requests in "${j/1e3}" seconds.`)),T.getValue("failingRequests").length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Encountered "${T.getValue("failingRequests").length}" errors. See "${N}" to review the error messages and inputs.`)),process.exit(1))}async function Ln({enricherIds:n,auth:e,concurrency:s=100,transcendUrl:l=_chunkKC7NDLN7cjs.e}){let a=_chunkMPI5VURJcjs.Wd.call(void 0, l,e),o=new Date().getTime(),i=await _chunkMPI5VURJcjs.ne.call(void 0, a,{statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing enricher: "${n.join(",")}" fetched "${i.length}" in enriching status.`));let r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=0;r.start(i.length,0);let y=0;await _chunkMPI5VURJcjs.b.call(void 0, i,async m=>{let p=(await _chunkMPI5VURJcjs.ie.call(void 0, a,{requestId:m.id})).filter(f=>n.includes(f.enricher.id)&&![_privacytypes.RequestEnricherStatus.Resolved,_privacytypes.RequestEnricherStatus.Skipped].includes(f.status));p.length>0&&await _chunkMPI5VURJcjs.a.call(void 0, p,async f=>{try{await _chunkMPI5VURJcjs.cc.call(void 0, a,_chunkMPI5VURJcjs.ea,{requestEnricherId:f.id}),y+=1}catch(h){if(!h.message.includes("Client error: Cannot skip Request enricher because it has already completed"))throw h}}),t+=1,r.update(t)},{concurrency:s}),r.stop();let g=new Date().getTime()-o;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${y}" for "${i.length}" requests in "${g/1e3}" seconds!`)),i.length}async function Qn({auth:n,requestActions:e=[],createdAtBefore:s,createdAtAfter:l,transcendUrl:a=_chunkKC7NDLN7cjs.e,requestEnricherStatuses:o=Object.values(_privacytypes.RequestEnricherStatus),requestIds:i=[],enricherId:r,concurrency:t=20}){let y=new Date().getTime(),c=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),g=_chunkMPI5VURJcjs.Wd.call(void 0, a,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetching requests to restart..."));let m=await _chunkMPI5VURJcjs.ne.call(void 0, g,{actions:e,statuses:[_privacytypes.RequestStatus.Enriching],createdAtBefore:s,createdAtAfter:l,requestIds:i}),d=0;if(i.length>0&&i.length!==m.length){let S=_chunk3EZGFSMDcjs.c.call(void 0, i,m.map(({id:N})=>N));S.length>0&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to find the following requests by ID: ${S.join(",")}.`)),process.exit(1))}let p=0;c.start(m.length,0),await _chunkMPI5VURJcjs.b.call(void 0, m,async S=>{let T=(await _chunkMPI5VURJcjs.ie.call(void 0, g,{requestId:S.id})).filter(v=>v.enricher.id===r&&o.includes(v.status));await _chunkMPI5VURJcjs.b.call(void 0, T,async v=>{await _chunkMPI5VURJcjs.Je.call(void 0, g,v.id),d+=1}),p+=1,c.update(p)},{concurrency:t}),c.stop();let h=new Date().getTime()-y;_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Completed restarting of ${m.length} requests and ${d} enrichers in "${h/1e3}" seconds.`))}async function ea({requestActions:n,dataSiloId:e,auth:s,concurrency:l=20,transcendUrl:a=_chunkKC7NDLN7cjs.e}){let o=_chunkMPI5VURJcjs.Wd.call(void 0, a,s),i=new Date().getTime(),r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=await _chunkMPI5VURJcjs.ne.call(void 0, o,{actions:n,statuses:[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Approving]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Retrying requests for Data Silo: "${e}", restarting "${t.length}" requests.`));let y=0,c=0;r.start(t.length,0),await _chunkMPI5VURJcjs.b.call(void 0, t,async d=>{try{let p=await _chunkMPI5VURJcjs.te.call(void 0, o,{requestId:d.id,dataSiloId:e});await _chunkMPI5VURJcjs.cc.call(void 0, o,_chunkMPI5VURJcjs.xa,{requestDataSiloId:p.id})}catch(p){if(!p.message.includes("Failed to find RequestDataSilo"))throw p;c+=1}y+=1,r.update(y)},{concurrency:l}),r.stop();let m=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${m/1e3}" seconds for ${y} requests, ${c} requests were skipped because data silo was not attached to the request!`)),t.length}async function ca({auth:n,sombraAuth:e,actions:s=[],statuses:l=[],identifierSearch:a,pageLimit:o=100,transcendUrl:i=_chunkKC7NDLN7cjs.e,createdAtBefore:r,createdAtAfter:t,isTest:y}){let c=_chunkMPI5VURJcjs.Wd.call(void 0, i,n),g=await _chunkMPI5VURJcjs.Xd.call(void 0, i,n,e),m="";r&&(m+=` before ${r.toISOString()}`),t&&(m+=`${m?", and":""} after ${t.toISOString()}`),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`${s.length>0?`Pulling requests of type "${s.join('" , "')}"`:"Pulling all requests"}${m}`));let d=await _chunkMPI5VURJcjs.ne.call(void 0, c,{actions:s,text:a,statuses:l,createdAtBefore:r,createdAtAfter:t,isTest:y}),p=await _chunkMPI5VURJcjs.b.call(void 0, d,async h=>{let S=await _chunkMPI5VURJcjs.le.call(void 0, c,g,{requestId:h.id});return{...h,requestIdentifiers:S}},{concurrency:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${p.length} requests`));let f=p.map(({attributeValues:h,requestIdentifiers:S,id:N,email:T,type:v,status:x,subjectType:K,details:$,createdAt:_,country:z,locale:j,origin:L,countrySubDivision:B,isSilent:Y,isTest:k,coreIdentifier:O,...X})=>({"Request ID":N,"Created At":_,Email:T,"Core Identifier":O,"Request Type":v,"Data Subject Type":K,Status:x,Country:z,"Country Sub Division":B,Details:$,Origin:L,"Silent Mode":Y,"Is Test Request":k,Language:j,...X,...Object.entries(_chunk3EZGFSMDcjs.d.call(void 0, h,"attributeKey.name")).reduce((ge,[ue,U])=>Object.assign(ge,{[ue]:U.map(({name:V})=>V).join(",")}),{}),...Object.entries(_chunk3EZGFSMDcjs.d.call(void 0, S,"name")).reduce((ge,[ue,U])=>Object.assign(ge,{[ue]:U.map(({value:V})=>V).join(",")}),{})}));return{requestsWithRequestIdentifiers:p,requestsFormattedForCsv:f}}async function ha({dataSiloId:n,auth:e,concurrency:s=100,status:l="SKIPPED",transcendUrl:a=_chunkKC7NDLN7cjs.e,requestStatuses:o=[_privacytypes.RequestStatus.Compiling,_privacytypes.RequestStatus.Secondary]}){let i=_chunkMPI5VURJcjs.Wd.call(void 0, a,e),r=new Date().getTime(),t=await _chunkMPI5VURJcjs.se.call(void 0, i,{dataSiloId:n,requestStatuses:o});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Processing data silo: "${n}" marking "${t.length}" requests as skipped.`));let y=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),c=0;y.start(t.length,0),await _chunkMPI5VURJcjs.b.call(void 0, t,async d=>{try{await _chunkMPI5VURJcjs.cc.call(void 0, i,_chunkMPI5VURJcjs.wa,{requestDataSiloId:d.id,status:l})}catch(p){if(!p.message.includes("Client error: Request must be active:"))throw p}c+=1,y.update(c)},{concurrency:s}),y.stop();let m=new Date().getTime()-r;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully skipped "${t.length}" requests in "${m/1e3}" seconds!`)),t.length}async function Ea({requestActions:n,identifierNames:e,auth:s,concurrency:l=20,transcendUrl:a=_chunkKC7NDLN7cjs.e}){let o=_chunkMPI5VURJcjs.Wd.call(void 0, a,s),i=new Date().getTime(),r=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),t=await _chunkMPI5VURJcjs.ne.call(void 0, o,{actions:n,statuses:[_privacytypes.RequestStatus.Enriching]});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Fetched requests in preflight/enriching state."));let y=0,c=0;r.start(t.length,0),await _chunkMPI5VURJcjs.b.call(void 0, t,async d=>{let f=(await _chunkMPI5VURJcjs.je.call(void 0, o,{requestId:d.id})).filter(({isVerifiedAtLeastOnce:h,name:S})=>h===!1&&e.includes(S)).map(({id:h})=>h);f.length>0&&(await _chunkMPI5VURJcjs.cc.call(void 0, o,_chunkMPI5VURJcjs.Ca,{input:{requestId:d.id,requestIdentifierIds:f}}),c+=f.length),y+=1,r.update(y)},{concurrency:l}),r.stop();let m=new Date().getTime()-i;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully cleared out unverified identifiers "${m/1e3}" seconds for ${y} requests, ${c} identifiers were cleared out!`)),t.length}exports.a = A; exports.b = pe; exports.c = De; exports.d = be; exports.e = ne; exports.f = et; exports.g = tt; exports.h = rt; exports.i = Te; exports.j = st; exports.k = Ae; exports.l = ae; exports.m = te; exports.n = Ee; exports.o = at; exports.p = ut; exports.q = ct; exports.r = G; exports.s = pt; exports.t = Us; exports.u = gt; exports.v = yt; exports.w = Pr; exports.x = ho; exports.y = Dr; exports.z = qt; exports.A = St; exports.B = xr; exports.C = Lr; exports.D = bt; exports.E = Tt; exports.F = Uo; exports.G = Le; exports.H = It; exports.I = oi; exports.J = fi; exports.K = vt; exports.L = Ni; exports.M = Lt; exports.N = Ie; exports.O = sn; exports.P = _t; exports.Q = wn; exports.R = Ln; exports.S = Qn; exports.T = ea; exports.U = ca; exports.V = ha; exports.W = Ea;
2
+ //# sourceMappingURL=chunk-3FEOMF7G.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-3FEOMF7G.cjs","../src/lib/requests/constants.ts","../src/lib/requests/fuzzyMatchColumns.ts","../src/lib/requests/mapEnumValues.ts"],"names":["NONE","BULK_APPLY","BLANK","IDENTIFIER_BLOCK_LIST","ColumnName","IS_REQUIRED","CAN_APPLY_IN_BULK","CachedFileState","applyEnum","valuesOf","IsoCountryCode","IsoCountrySubdivisionCode","CompletedRequestStatus","SuccessfulRequest","CachedRequestState","fuzzySearch","word1","word2","fuzzysearch","fuzzyMatchColumns","allColumnNames","fuzzyMapName","isRequired","canApplyAll","matchingColumnNames","x","inquirer","mapEnumValues","csvInputs","expectedOutputs","cache","autoCompletePrompt","inputs","item","value","result"],"mappings":"AAAA,u/BAAuO,wDAAyC,wDAAyC,wDAAiE,qDCAtV,0EACR,2DAMrB,yYACY,IAENA,CAAAA,CAAO,QAAA,CACPC,EAAAA,aAAa,2BAAA,CACbC,EAAAA,aAAQ,SAAA,CAGRC,EAAAA,aAAwB,CAAC,OAAA,CAAS,gBAAgB,CAAA,CAKnDC,EAAAA,aAAAA,CAAAA,CAAAA,EAAAA,CAEVA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CAERA,CAAAA,CAAA,cAAA,CAAiB,gBAAA,CAEjBA,CAAAA,CAAA,WAAA,CAAc,aAAA,CAEdA,CAAAA,CAAA,WAAA,CAAc,aAAA,CAEdA,CAAAA,CAAA,MAAA,CAAS,QAAA,CAETA,CAAAA,CAAA,OAAA,CAAU,SAAA,CAEVA,CAAAA,CAAA,kBAAA,CAAqB,oBAAA,CAErBA,CAAAA,CAAA,aAAA,CAAgB,eAAA,CAEhBA,CAAAA,CAAA,SAAA,CAAY,WAAA,CAEZA,CAAAA,CAAA,WAAA,CAAc,aAAA,CApBJA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,EAAA,CAAA,CAAA,CAAA,CAwBCC,EAAAA,aAA8C,CACxD,KAAA,CAAmB,CAAA,CAAA,CACnB,cAAA,CAA4B,CAAA,CAAA,CAC5B,WAAA,CAAyB,CAAA,CAAA,CACzB,WAAA,CAAyB,CAAA,CAAA,CACzB,aAAA,CAA2B,CAAA,CAAA,CAC3B,SAAA,CAAuB,CAAA,CAAA,CACvB,WAAA,CAAyB,CAAA,CAAA,CACzB,MAAA,CAAoB,CAAA,CAAA,CACpB,OAAA,CAAqB,CAAA,CAAA,CACrB,kBAAA,CAAgC,CAAA,CACnC,CAAA,CAGaC,EAAAA,aAAqD,CAC/D,WAAA,CAAyB,CAAA,CAAA,CACzB,WAAA,CAAyB,CAAA,CAC5B,CAAA,CAGaC,EAAAA,aAAoB,CAAA,CAAA,IAAA,CAAK,CAEpC,WAAA,CAAe,CAAA,CAAA,OAAA,CAAQC,kCAAAA,EAAUJ,CAAY,CAAA,CAAA,EAAQ,CAAA,CAAA,MAAM,CAAC,CAAA,CAE5D,eAAA,CAAmB,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAU,CAAA,CAAA,MAAM,CAAA,CAE5C,cAAA,CAAkB,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAU,CAAA,CAAA,MAAM,CAAA,CAE3C,0BAAA,CAA8B,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAQK,iCAAAA,2BAAsB,CAAC,CAAA,CAEtE,wBAAA,CAA4B,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAU,CAAA,CAAA,MAAM,CAAA,CAErD,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAQA,iCAAAA,iCAAoB,CAAC,CAAA,CAE1D,eAAA,CAAmB,CAAA,CAAA,MAAA,CACf,CAAA,CAAA,MAAA,CACFA,iCAAAA,CAAW,GAAGC,4BAAAA,CAAgB,CAACV,CAAI,CAAA,CAAGA,CAAK,CAAC,CAC9C,CAAA,CAEA,0BAAA,CAA8B,CAAA,CAAA,MAAA,CAC1B,CAAA,CAAA,MAAA,CACFS,iCAAAA,CAAW,GAAGE,uCAAAA,CAA2B,CAACX,CAAI,CAAA,CAAGA,CAAK,CAAC,CACzD,CAAA,CAEA,qBAAA,CAAyB,CAAA,CAAA,MAAA,CACrB,CAAA,CAAA,MAAA,CACFS,iCAAAA,CAAW,GAAGG,oCAAAA,CAAwB,CAACZ,CAAI,CAAA,CAAGA,CAAK,CAAC,CACtD,CACF,CAAC,CAAA,CAQYa,EAAAA,aAAsB,CAAA,CAAA,IAAA,CAAK,CACtC,EAAA,CAAM,CAAA,CAAA,MAAA,CACN,IAAA,CAAQ,CAAA,CAAA,MAAA,CACR,QAAA,CAAY,CAAA,CAAA,MAAA,CACZ,cAAA,CAAkB,CAAA,CAAA,MAAA,CAClB,WAAA,CAAe,CAAA,CAAA,MACjB,CAAC,CAAA,CAMYC,EAAAA,aAAuB,CAAA,CAAA,IAAA,CAAK,CAEvC,eAAA,CAAmB,CAAA,CAAA,KAAA,CAAQ,CAAA,CAAA,MAAA,CAAS,CAAA,CAAA,MAAA,CAAU,CAAA,CAAA,GAAG,CAAC,CAAA,CAElD,kBAAA,CAAsB,CAAA,CAAA,KAAA,CAAMD,EAAiB,CAAA,CAE7C,iBAAA,CAAqB,CAAA,CAAA,KAAA,CACjB,CAAA,CAAA,IAAA,CAAK,CACL,QAAA,CAAY,CAAA,CAAA,MAAA,CACZ,cAAA,CAAkB,CAAA,CAAA,MAAA,CAClB,WAAA,CAAe,CAAA,CAAA,MACjB,CAAC,CACH,CACF,CAAC,CAAA,CC7HD,wFAAqB,oGAGG,SAURE,EAAAA,CAAYC,CAAAA,CAAeC,CAAAA,CAAwB,CACjE,OACEC,mCAAAA,CAAYF,CAAM,WAAA,CAAY,CAAA,CAAGC,CAAAA,CAAM,WAAA,CAAY,CAAC,CAAA,EACpDC,mCAAAA,CAAYD,CAAM,WAAA,CAAY,CAAA,CAAGD,CAAAA,CAAM,WAAA,CAAY,CAAC,CAExD,CAWO,SAASG,EAAAA,CACdC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACsD,CACtD,IAAMC,CAAAA,CAAsBJ,CAAAA,CAAe,MAAA,CAAQK,CAAAA,EACjDV,EAAAA,CAAYM,CAAAA,CAAa,WAAA,CAAY,CAAA,CAAGI,CAAAA,CAAE,WAAA,CAAY,CAAC,CACzD,CAAA,CACA,MAAO,CACL,GAAGD,CAAAA,CACH,IAAIE,kBAAAA,CAAS,SAAA,CACb,GAAIJ,CAAAA,CAAa,CAAC,CAAA,CAAI,CAACtB,CAAI,CAAA,CAC3B,GAAIuB,CAAAA,CAAc,CAACtB,EAAU,CAAA,CAAI,CAAC,CAAA,CAClC,GAAGmB,CAAAA,CAAe,MAAA,CAAQK,CAAAA,EAAM,CAACD,CAAAA,CAAoB,QAAA,CAASC,CAAC,CAAC,CAClE,CACF,CC7CA,kKAC+B,MAY/B,SAAsBE,EAAAA,CACpBC,CAAAA,CACAC,CAAAA,CACAC,CAAAA,CACoC,CACpCJ,kBAAAA,CAAS,cAAA,CAAe,cAAA,CAAgBK,oCAAkB,CAAA,CAE1D,IAAMC,CAAAA,CAASJ,CAAAA,CACZ,GAAA,CAAKK,CAAAA,EAASA,CAAAA,EAAQ,SAAS,CAAA,CAC/B,MAAA,CAAQC,CAAAA,EAAU,CAACJ,CAAAA,CAAMI,CAAK,CAAC,CAAA,CAClC,EAAA,CAAIF,CAAAA,CAAO,MAAA,GAAW,CAAA,CACpB,OAAOF,CAAAA,CAET,IAAMK,CAAAA,CAAS,MAAMT,kBAAAA,CAAS,MAAA,CAC5BM,CAAAA,CAAO,GAAA,CAAKE,CAAAA,EAAAA,CAAW,CACrB,IAAA,CAAMA,CAAAA,CACN,OAAA,CAAS,CAAA,cAAA,EAAiBA,CAAK,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-3FEOMF7G.cjs","sourcesContent":[null,"import { applyEnum, valuesOf } from '@transcend-io/type-utils';\nimport { LanguageKey } from '@transcend-io/internationalization';\nimport {\n CompletedRequestStatus,\n RequestAction,\n IsoCountryCode,\n IsoCountrySubdivisionCode,\n} from '@transcend-io/privacy-types';\nimport * as t from 'io-ts';\n\nexport const NONE = '[NONE]' as const;\nexport const BULK_APPLY = '[APPLY VALUE TO ALL ROWS]' as const;\nexport const BLANK = '<blank>' as const;\n\n/** These are uploaded at the top level of the request */\nexport const IDENTIFIER_BLOCK_LIST = ['email', 'coreIdentifier'];\n\n/**\n * Column names to map\n */\nexport enum ColumnName {\n /** The title of the email column */\n Email = 'email',\n /** The title of the core identifier column */\n CoreIdentifier = 'coreIdentifier',\n /** The title of the requestType column */\n RequestType = 'requestType',\n /** The title of the subjectType column */\n SubjectType = 'subjectType',\n /** The title of the locale column */\n Locale = 'locale',\n /** The country */\n Country = 'country',\n /** The country sub division */\n CountrySubDivision = 'countrySubDivision',\n /** The title of the requestStatus column */\n RequestStatus = 'requestStatus',\n /** The title of the createdAt column */\n CreatedAt = 'createdAt',\n /** The title of the dataSiloIds column */\n DataSiloIds = 'dataSiloIds',\n}\n\n/** These parameters are required in the Transcend DSR API */\nexport const IS_REQUIRED: { [k in ColumnName]: boolean } = {\n [ColumnName.Email]: false,\n [ColumnName.CoreIdentifier]: true,\n [ColumnName.RequestType]: true,\n [ColumnName.SubjectType]: true,\n [ColumnName.RequestStatus]: false,\n [ColumnName.CreatedAt]: false,\n [ColumnName.DataSiloIds]: false,\n [ColumnName.Locale]: false,\n [ColumnName.Country]: false,\n [ColumnName.CountrySubDivision]: false,\n};\n\n/** These parameters can be specified for the entire CSV set if needed */\nexport const CAN_APPLY_IN_BULK: { [k in ColumnName]?: boolean } = {\n [ColumnName.RequestType]: true,\n [ColumnName.SubjectType]: true,\n};\n\n// Cache state\nexport const CachedFileState = t.type({\n /** Mapping between the default request input column names and the CSV column name for that input */\n columnNames: t.partial(applyEnum(ColumnName, () => t.string)),\n /** Mapping between the identifier names and the CSV column name for that input */\n identifierNames: t.record(t.string, t.string),\n /** Mapping between the request attribute inputs and the CSV column name for that input */\n attributeNames: t.record(t.string, t.string),\n /** Mapping between CSV request type and Transcend Request Action */\n requestTypeToRequestAction: t.record(t.string, valuesOf(RequestAction)),\n /** Mapping between CSV data subject type and the name of the data subject in Transcend */\n subjectTypeToSubjectName: t.record(t.string, t.string),\n /** Mapping between language imported and Transcend locale code */\n languageToLocale: t.record(t.string, valuesOf(LanguageKey)),\n /** Mapping between region and country code */\n regionToCountry: t.record(\n t.string,\n valuesOf({ ...IsoCountryCode, [NONE]: NONE }),\n ),\n /** Mapping between region and country sub division code */\n regionToCountrySubDivision: t.record(\n t.string,\n valuesOf({ ...IsoCountrySubdivisionCode, [NONE]: NONE }),\n ),\n /** Mapping between request status in import to Transcend request status */\n statusToRequestStatus: t.record(\n t.string,\n valuesOf({ ...CompletedRequestStatus, [NONE]: NONE }),\n ),\n});\n\n/** Type override */\nexport type CachedFileState = t.TypeOf<typeof CachedFileState>;\n\n/**\n * Successfully processed request\n */\nexport const SuccessfulRequest = t.type({\n id: t.string,\n link: t.string,\n rowIndex: t.number,\n coreIdentifier: t.string,\n attemptedAt: t.string,\n});\n\n/** Type override */\nexport type SuccessfulRequest = t.TypeOf<typeof SuccessfulRequest>;\n\n// Cache state\nexport const CachedRequestState = t.type({\n /** Set of privacy requests that failed to upload */\n failingRequests: t.array(t.record(t.string, t.any)),\n /** Successfully uploaded requests */\n successfulRequests: t.array(SuccessfulRequest),\n /** Duplicate requests */\n duplicateRequests: t.array(\n t.type({\n rowIndex: t.number,\n coreIdentifier: t.string,\n attemptedAt: t.string,\n }),\n ),\n});\n\n/** Type override */\nexport type CachedRequestState = t.TypeOf<typeof CachedRequestState>;\n","import inquirer from 'inquirer';\nimport { NONE, BULK_APPLY } from './constants';\n\nimport fuzzysearch from 'fuzzysearch';\n\n/**\n * Check if word1 and word2 are a fuzzy match of each other.\n * Returns true if word1 is fuzzy match of word2 or vice versa.\n *\n * @param word1 - First word\n * @param word2 - Second word\n * @returns True if words are fuzzy match\n */\nexport function fuzzySearch(word1: string, word2: string): boolean {\n return (\n fuzzysearch(word1.toLowerCase(), word2.toLowerCase()) ||\n fuzzysearch(word2.toLowerCase(), word1.toLowerCase())\n );\n}\n\n/**\n * Fuzzy match column names for a particular field\n *\n * @param allColumnNames - List of all column names\n * @param fuzzyMapName - The name of field being mapped to\n * @param isRequired - When true, don't include \"NONE\" as an option\n * @param canApplyAll - When true, include an option to specify the value in bulk\n * @returns The list of suggestions for inquirer\n */\nexport function fuzzyMatchColumns(\n allColumnNames: string[],\n fuzzyMapName: string,\n isRequired: boolean,\n canApplyAll?: boolean,\n): (string | InstanceType<typeof inquirer.Separator>)[] {\n const matchingColumnNames = allColumnNames.filter((x) =>\n fuzzySearch(fuzzyMapName.toLowerCase(), x.toLowerCase()),\n );\n return [\n ...matchingColumnNames,\n new inquirer.Separator(),\n ...(isRequired ? [] : [NONE]),\n ...(canApplyAll ? [BULK_APPLY] : []),\n ...allColumnNames.filter((x) => !matchingColumnNames.includes(x)),\n ];\n}\n","import inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\nimport { apply, ObjByString } from '@transcend-io/type-utils';\nimport { fuzzySearch } from './fuzzyMatchColumns';\n\n/**\n * Map a set of inputs to a set of outputs\n *\n * @param csvInputs - Input list\n * @param expectedOutputs - Output list\n * @param cache - Cache\n * @returns Mapping from row to enum value\n */\nexport async function mapEnumValues<TValue extends string>(\n csvInputs: string[],\n expectedOutputs: TValue[],\n cache: { [k in string]: TValue },\n): Promise<{ [k in string]: TValue }> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n\n const inputs = csvInputs\n .map((item) => item || '<blank>')\n .filter((value) => !cache[value]);\n if (inputs.length === 0) {\n return cache;\n }\n const result = await inquirer.prompt<{ [k in string]: TValue }>(\n inputs.map((value) => ({\n name: value,\n message: `Map value of: ${value}`,\n type: 'autocomplete',\n default: expectedOutputs.find((x) => fuzzySearch(value, x)),\n source: (answersSoFar: ObjByString, input: string) =>\n !input\n ? expectedOutputs\n : expectedOutputs.filter(\n (x) => typeof x === 'string' && fuzzySearch(input, x),\n ),\n })),\n );\n return {\n ...cache,\n ...apply(result, (r) =>\n typeof r === 'string' ? (r as TValue) : (Object.values(r)[0] as TValue),\n ),\n };\n}\n"]}
@@ -0,0 +1,113 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunkFMX5SPCLcjs = require('./chunk-FMX5SPCL.cjs');var _chunkKC7NDLN7cjs = require('./chunk-KC7NDLN7.cjs');var _chunk3EZGFSMDcjs = require('./chunk-3EZGFSMD.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _autocomplete = require('@stricli/auto-complete');var _core = require('@stricli/core');var A=_core.buildCommand.call(void 0, {loader:async()=>{let{generateApiKeys:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-6CESPVNS.cjs")));return e},parameters:{flags:{email:{kind:"parsed",parse:String,brief:"The email address that you use to log into Transcend"},password:{kind:"parsed",parse:String,brief:"The password for your account login"},apiKeyTitle:{kind:"parsed",parse:String,brief:"The title of the API key being generated or destroyed"},file:{kind:"parsed",parse:String,brief:"The file where API keys should be written to"},scopes:{kind:"enum",values:_chunkKC7NDLN7cjs.k,variadic:",",brief:"The list of scopes that should be given to the API key"},deleteExistingApiKey:{kind:"boolean",brief:"When true, if an API key exists with the specified apiKeyTitle, the existing API key is deleted",default:!0},createNewApiKey:{kind:"boolean",brief:"When true, new API keys will be created. Set to false if you simply want to delete all API keys with a title",default:!0},parentOrganizationId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"Filter for only a specific organization by ID, returning all child accounts associated with that organization",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Generate API keys",fullDescription:`This command allows for creating API keys across multiple Transcend instances. This is useful for customers that are managing many Transcend instances and need to regularly create, cycle or delete API keys across all of their instances.
2
+
3
+ Unlike the other commands that rely on API key authentication, this command relies upon username/password authentication. This command will spit out the API keys into a JSON file, and that JSON file can be used in subsequent CLI commands.
4
+
5
+ Authentication requires your email and password for the Transcend account. This command will only generate API keys for Transcend instances where you have the permission to "Manage API Keys".`}});var I=_core.buildRouteMap.call(void 0, {routes:{"generate-api-keys":A},docs:{brief:"Admin commands"}});var _privacytypes = require('@transcend-io/privacy-types');var D=_core.buildCommand.call(void 0, {loader:async()=>{let{buildXdiSyncEndpoint:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-AMXKTPKE.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewConsentManager]}),xdiLocation:{kind:"parsed",parse:String,brief:"The location of the XDI that will be loaded by the generated sync endpoint"},file:{kind:"parsed",parse:String,brief:"The HTML file path where the sync endpoint should be written",default:"./sync-endpoint.html"},removeIpAddresses:{kind:"boolean",brief:"When true, remove IP addresses from the domain list",default:!0},domainBlockList:{kind:"parsed",parse:_chunkFMX5SPCLcjs.b,brief:"The set of domains that should be excluded from the sync endpoint. Comma-separated list.",default:"localhost"},xdiAllowedCommands:{kind:"parsed",parse:String,brief:"The allowed set of XDI commands",default:"ConsentManager:Sync"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Build XDI sync endpoint",fullDescription:"This command allows for building of the XDI Sync Endpoint across a set of Transcend accounts."}});var R=_core.buildCommand.call(void 0, {loader:async()=>{let{pullConsentMetrics:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-SQDB5BDK.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewConsentManager]}),start:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"The start date to pull metrics from"},end:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"The end date to pull metrics until",optional:!0},folder:{kind:"parsed",parse:String,brief:"The folder to save metrics to",default:"./consent-metrics/"},bin:{kind:"parsed",parse:String,brief:"The bin metric when pulling data (1h or 1d)",default:"1d"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Pull consent metrics",fullDescription:"This command allows for pulling consent manager metrics for a Transcend account, or a set of Transcend accounts.\n\nBy default, the consent metrics will be written to a folder named `consent-metrics` within the directory where you run the command. You can override the location that these CSVs are written to using the flag `--folder=./my-folder/`. This folder will contain a set of CSV files:\n\n- `CONSENT_CHANGES_TIMESERIES_optIn.csv` -> this is a feed containing the number of explicit opt in events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: true });`\n- `CONSENT_CHANGES_TIMESERIES_optOut.csv` -> this is a feed containing the number of explicit opt out events that happen - these are calls to `airgap.setConsent(event, { SaleOfInfo: false });`\n- `CONSENT_SESSIONS_BY_REGIME_Default.csv` -> this contains the number of sessions detected for the bin period\n- `PRIVACY_SIGNAL_TIMESERIES_DNT.csv` -> the number of DNT signals detected.\n- `PRIVACY_SIGNAL_TIMESERIES_GPC.csv` -> the number of GPC signals detected."}});var U=_core.buildCommand.call(void 0, {loader:async()=>{let{pullConsentPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-ZFJM6LMZ.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewManagedConsentDatabaseAdminApi]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to save preferences to",default:"./preferences.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),timestampBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Filter for consents updated this time",optional:!0},timestampAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Filter for consents updated after this time",optional:!0},identifiers:{kind:"parsed",parse:String,variadic:",",brief:"Filter for specific identifiers",optional:!0},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when downloading consents in parallel",default:"100"}}},docs:{brief:"Pull consent preferences",fullDescription:"This command allows for pull of consent preferences from the Managed Consent Database."}});var x=_core.buildCommand.call(void 0, {loader:async()=>{let{updateConsentManager:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-L7AJQDYS.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageConsentManagerDeveloperSettings]}),bundleTypes:{kind:"enum",values:Object.values(_privacytypes.ConsentBundleType),brief:"The bundle types to deploy. Defaults to PRODUCTION,TEST.",variadic:","},deploy:{kind:"boolean",brief:"When true, deploy the Consent Manager after updating the version",default:!1},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Update consent manager",fullDescription:"This command allows for updating Consent Manager to latest version. The Consent Manager bundle can also be deployed using this command."}});var F=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadConsentPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-SCO4LJDB.cjs")));return e},parameters:{flags:{base64EncryptionKey:{kind:"parsed",parse:String,brief:"The encryption key used to encrypt the userId"},base64SigningKey:{kind:"parsed",parse:String,brief:"The signing key used to prove authentication of consent request"},partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},file:{kind:"parsed",parse:String,brief:"The file to pull consent preferences from",default:"./preferences.csv"},consentUrl:_chunkFMX5SPCLcjs.f.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Upload consent preferences to the Managed Consent Database",fullDescription:"This command allows for updating of consent preferences to the Managed Consent Database."}});var V=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadCookiesFromCsv:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-3MB7W3JD.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(_privacytypes.ConsentTrackerStatus),brief:"The status of the cookies you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./cookies.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Upload cookies from CSV",fullDescription:`Upload cookies from CSV. This command allows for uploading of cookies from CSV.
6
+
7
+ Step 1) Download the CSV of cookies that you want to edit from the Admin Dashboard under [Consent Management -> Cookies](https://app.transcend.io/consent-manager/cookies). You can download cookies from both the "Triage" and "Approved" tabs.
8
+
9
+ Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
10
+
11
+ Step 3) Upload the modified CSV file back into the dashboard with this command.`}});var M=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadDataFlowsFromCsv:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-VVADV3UA.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(_privacytypes.ConsentTrackerStatus),brief:"The status of the data flows you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./data-flows.csv"},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Upload data flows from CSV",fullDescription:`Upload data flows from CSV. This command allows for uploading of data flows from CSV.
12
+
13
+ Step 1) Download the CSV of data flows that you want to edit from the Admin Dashboard under [Consent Management -> Data Flows](https://app.transcend.io/consent-manager/data-flows). You can download data flows from both the "Triage" and "Approved" tabs.
14
+
15
+ Step 2) You can edit the contents of the CSV file as needed. You may adjust the "Purpose" column, adjust the "Notes" column, add "Owners" and "Teams" or even add custom columns with additional metadata.
16
+
17
+ Step 3) Upload the modified CSV file back into the dashboard with this command.`}});var O=_core.buildCommand.call(void 0, {loader:async()=>{let{uploadPreferences:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-YVMYL724.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageStoredPreferences,_privacytypes.ScopeName.ViewManagedConsentDatabaseAdminApi,_privacytypes.ScopeName.ViewPreferenceStoreSettings]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to load preferences from",optional:!0},directory:{kind:"parsed",parse:String,brief:"Path to the directory of CSV files to load preferences from",optional:!0},dryRun:{kind:"boolean",brief:"Whether to do a dry run only - will write results to receiptFilepath without updating Transcend",default:!1},skipExistingRecordCheck:{kind:"boolean",brief:"Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD",default:!1},receiptFileDir:{kind:"parsed",parse:String,brief:"Directory path where the response receipts should be saved",default:"./receipts"},skipWorkflowTriggers:{kind:"boolean",brief:"Whether to skip workflow triggers when uploading to preference store",default:!1},forceTriggerWorkflows:{kind:"boolean",brief:"Whether to force trigger workflows for existing consent records",default:!1},skipConflictUpdates:{kind:"boolean",brief:"Whether to skip uploading of any records where the preference store and file have a hard conflict",default:!1},isSilent:{kind:"boolean",brief:"Whether to skip sending emails in workflows",default:!0},attributes:{kind:"parsed",parse:String,brief:"Attributes to add to any DSR request if created. Comma-separated list of key:value pairs.",default:"Tags:transcend-cli,Source:transcend-cli"},receiptFilepath:{kind:"parsed",parse:String,brief:"Store resulting, continuing where left off",default:"./preference-management-upload-receipts.json"},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading in parallel",default:"10"}}},docs:{brief:"Upload preference management data to your Preference Store",fullDescription:`Upload preference management data to your Preference Store.
18
+
19
+ This command prompts you to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
20
+
21
+ The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var j=_core.buildRouteMap.call(void 0, {routes:{"build-xdi-sync-endpoint":D,"pull-consent-metrics":R,"pull-consent-preferences":U,"update-consent-manager":x,"upload-consent-preferences":F,"upload-cookies-from-csv":V,"upload-data-flows-from-csv":M,"upload-preferences":O},docs:{brief:"Consent commands"}});var N=_core.buildCommand.call(void 0, {loader:async()=>{let{deriveDataSilosFromDataFlowsCrossInstance:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-HV2SRHDV.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},output:{kind:"parsed",parse:String,brief:"The output transcend.yml file containing the data silo configurations",default:"./transcend.yml"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Derive data silos from data flows cross instance",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to a single transcend.yml configurations of all related data silos."}});var E=_core.buildCommand.call(void 0, {loader:async()=>{let{deriveDataSilosFromDataFlows:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-JTBEG5AM.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},dataSilosYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data silo yml files"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Derive data silos from data flows",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to set of data silo transcend.yml configurations."}});var B=_core.buildCommand.call(void 0, {loader:async()=>{let{discoverSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-OZ7S4WDL.cjs")));return e},parameters:{flags:{scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan"},dataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The UUID of the corresponding data silo"},auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageAssignedDataInventory],requiresSiloScope:!0}),fileGlobs:{kind:"parsed",parse:String,brief:"You can pass a glob syntax pattern(s) to specify additional file paths to scan. Comma-separated list of globs.",default:""},ignoreDirs:{kind:"parsed",parse:String,brief:"Comma-separated list of directories to ignore.",default:""},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Scan dependency management files to discover new data silos.",fullDescription:`We support scanning for new data silos in JavaScript, Python, Gradle, and CocoaPods projects.
22
+
23
+ To get started, add a data silo for the corresponding project type with the "silo discovery" plugin enabled. For example, if you want to scan a JavaScript project, add a package.json data silo. Then, specify the data silo ID in the "--dataSiloId" parameter.`}});var $=_core.buildCommand.call(void 0, {loader:async()=>{let{pullDatapoints:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-LJMBCW6Z.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./datapoints.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"List of data silo IDs to filter by",optional:!0},includeAttributes:{kind:"boolean",brief:"Whether to include attributes in the output",default:!1},includeGuessedCategories:{kind:"boolean",brief:"Whether to include guessed categories in the output",default:!1},parentCategories:{kind:"enum",values:Object.values(_privacytypes.DataCategoryType),brief:"List of parent categories to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of subcategories to filter by",variadic:",",optional:!0}}},docs:{brief:"Export the datapoints from your Data Inventory into a CSV."}});var W=_core.buildCommand.call(void 0, {loader:async()=>{let{pullUnstructuredDiscoveryFiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-A6IYDZLA.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./unstructured-discovery-files.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),dataSiloIds:{kind:"parsed",parse:String,brief:"List of data silo IDs to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of data categories to filter by",variadic:",",optional:!0},status:{kind:"enum",values:Object.values(_privacytypes.UnstructuredSubDataPointRecommendationStatus),brief:"List of classification statuses to filter by",variadic:",",optional:!0},includeEncryptedSnippets:{kind:"boolean",brief:"Whether to include encrypted snippets of the entries classified",default:!1}}},docs:{brief:"Pull unstructured discovery files",fullDescription:"This command allows for pulling Unstructured Discovery into a CSV."}});var L=_core.buildCommand.call(void 0, {loader:async()=>{let{push:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-ULAYJG2T.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:"Varies"}),file:{kind:"parsed",parse:String,brief:"Path to the YAML file to push from",default:"./transcend.yml"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),pageSize:{kind:"parsed",parse:_core.numberParser,brief:"The page size to use when paginating over the API",default:"50"},variables:{kind:"parsed",parse:String,brief:"The variables to template into the YAML file when pushing configuration. Comma-separated list of key:value pairs.",default:""},publishToPrivacyCenter:{kind:"boolean",brief:"When true, publish the configuration to the Privacy Center",default:!1},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},deleteExtraAttributeValues:{kind:"boolean",brief:"When true and syncing attributes, delete any extra attributes instead of just upserting",default:!1}}},docs:{brief:"Push metadata from transcend.yml to Transcend",fullDescription:"Given a transcend.yml file, sync the contents up to your Transcend instance."}});var Y=_core.buildCommand.call(void 0, {loader:async()=>{let{scanPackages:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-NCT2NJ62.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageCodeScanning]}),scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan",default:"./"},ignoreDirs:{kind:"parsed",parse:String,variadic:",",brief:"List of directories to ignore in scan",optional:!0},repositoryName:{kind:"parsed",parse:String,brief:"Name of the git repository that the package should be tied to",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Scan dependency management files to inventory code dependencies.",fullDescription:`Transcend scans packages and dependencies for the following frameworks:
24
+
25
+ - package.json
26
+ - requirements.txt & setup.py
27
+ - Podfile
28
+ - Package.resolved
29
+ - build.gradle
30
+ - pubspec.yaml
31
+ - Gemfile & .gemspec
32
+ - composer.json
33
+
34
+ This command will scan the folder you point at to look for any of these files. Once found, the build file will be parsed in search of dependencies. Those code packages and dependencies will be uploaded to Transcend. The information uploaded to Transcend is:
35
+
36
+ - repository name
37
+ - package names
38
+ - dependency names and versions
39
+ - package descriptions`}});function n(e,l,d){let i=e.join(" "),u=ft(l),{forceSingleLine:De=!1,argsIndent:y=2}=_nullishCoalesce(d, () => ({}));if(u.length===0)return`${_chunkKC7NDLN7cjs.a} ${i}`;let Re=`${_chunkKC7NDLN7cjs.a} ${i} ${u.join(" ")}`.length<=117&&!De?`${i} ${u.join(" ")}`:`${i} \\
40
+ ${" ".repeat(y)}${u.join(` \\
41
+ ${" ".repeat(y)}`)}`;return`${_chunkKC7NDLN7cjs.a} ${Re}`}function _(e,l=0){if(typeof e=="boolean")return e?"true":"false";if(typeof e=="number")return e.toString();if(e instanceof Date)return e.toISOString();if(Array.isArray(e)&&l===0){let d=e.map(i=>_(i,l+1));return d.every(i=>i.startsWith("$")||i.includes(" "))?`"${d.join(",")}"`:d.join(",")}if(typeof e=="string")return l===1?e.startsWith("$")?`\${${e.slice(1)}}`:e:e.startsWith("$")||e.includes(" ")?`"${e}"`:e;throw new Error(`Unsupported value type: ${typeof e}`)}function ft(e,l=0){return Object.entries(e).map(([d,i])=>{if(typeof i=="boolean"&&i)return`--${d}`;let u=_(i,l);return`--${d}=${u}`})}var G=_core.buildCommand.call(void 0, {loader:async()=>{let{consentManagerServiceJsonToYml:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-EE72U2AE.cjs")));return e},parameters:{flags:{file:{kind:"parsed",parse:String,brief:"Path to the services.json file, output of await airgap.getMetadata()",default:"./services.json"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml to write to",default:"./transcend.yml"}}},docs:{brief:"Convert consent manager services to transcend.yml",fullDescription:`Import the services from an airgap.js file into a Transcend instance.
42
+
43
+ 1. Run \`await airgap.getMetadata()\` on a site with airgap
44
+ 2. Right click on the printed object, and click \`Copy object\`
45
+ 3. Place output of file in a file named \`services.json\`
46
+ 4. Run:
47
+
48
+ ${n(["inventory","consent-manager-service-json-to-yml"],{file:"./services.json",output:"./transcend.yml"},{argsIndent:5})}
49
+
50
+ 5. Run:
51
+
52
+ ${n(["inventory","push"],{auth:"$TRANSCEND_API_KEY",file:"./transcend.yml",classifyService:!0},{argsIndent:5})}`}});var J=_core.buildCommand.call(void 0, {loader:async()=>{let{consentManagersToBusinessEntities:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-DJ3SW7AG.cjs")));return e},parameters:{flags:{consentManagerYmlFolder:{kind:"parsed",parse:String,brief:"Path to the folder of Consent Manager transcend.yml files to combine"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml with business entity configuration",default:"./combined-business-entities.yml"}}},docs:{brief:"Convert consent managers to business entities",fullDescription:"This command allows for converting a folder or Consent Manager transcend.yml files into a single transcend.yml file where each consent manager configuration is a Business Entity in the data inventory."}});var z=_core.buildRouteMap.call(void 0, {routes:{pull:_chunkFMX5SPCLcjs.j,push:L,"scan-packages":Y,"discover-silos":B,"pull-datapoints":$,"pull-unstructured-discovery-files":W,"derive-data-silos-from-data-flows":E,"derive-data-silos-from-data-flows-cross-instance":N,"consent-manager-service-json-to-yml":G,"consent-managers-to-business-entities":J},docs:{brief:"Inventory commands"}});var K=_core.buildCommand.call(void 0, {loader:async()=>{let{syncOt:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-WBR473NQ.cjs")));return e},parameters:{flags:{hostname:{kind:"parsed",parse:String,brief:"The domain of the OneTrust environment from which to pull the resource",optional:!0},oneTrustAuth:{kind:"parsed",parse:String,brief:"The OAuth access token with the scopes necessary to access the OneTrust Public APIs",optional:!0},source:{kind:"enum",values:Object.values(_chunkQ7I37FJVcjs.c),brief:"Whether to read the assessments from OneTrust or from a file",default:"oneTrust"},transcendAuth:{..._chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageAssessments]}),optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the file to pull the resource into. Must be a json file!",optional:!0},resource:{kind:"enum",values:Object.values(_chunkQ7I37FJVcjs.b),brief:"The resource to pull from OneTrust. For now, only assessments is supported",default:"assessments"},dryRun:{kind:"boolean",brief:"Whether to export the resource to a file rather than sync to Transcend",default:!1},debug:{kind:"boolean",brief:"Whether to print detailed logs in case of error",default:!1}}},docs:{brief:"Sync OneTrust data",fullDescription:`Pulls resources from a OneTrust and syncs them to a Transcend instance. For now, it only supports retrieving OneTrust Assessments.
53
+
54
+ This command can be helpful if you are looking to:
55
+ - Pull resources from your OneTrust account.
56
+ - Migrate your resources from your OneTrust account to Transcend.
57
+
58
+ OneTrust authentication requires an OAuth Token with scope for accessing the assessment endpoints.
59
+ If syncing the resources to Transcend, you will also need to generate an API key on the Transcend Admin Dashboard.`}});var X=_core.buildRouteMap.call(void 0, {routes:{"sync-ot":K},docs:{brief:"Migration commands"}});var H=_core.buildCommand.call(void 0, {loader:async()=>{let{approve:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-4QGHJNOF.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.RequestApproval,_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to approve"},origins:{kind:"enum",values:Object.values(_privacytypes.RequestOrigin),variadic:",",brief:"The request origins to approve",optional:!0},silentModeBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Any requests made before this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Approve requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Approve requests that were submitted after this time",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk approve a set of privacy requests",fullDescription:"Bulk approve a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});var Z=_core.buildCommand.call(void 0, {loader:async()=>{let{cancel:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-YLORLMRQ.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.RequestApproval]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to cancel"},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to cancel. Comma-separated list.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to cancel",optional:!0},silentModeBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Any requests made before this date should be marked as silent mode for canceling to skip email sending",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Cancel requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Cancel requests that were submitted after this time",optional:!0},cancellationTitle:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests upon cancelation",default:"Request Canceled"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk cancel a set of privacy requests",fullDescription:"Bulk cancel a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});var ee=_core.buildCommand.call(void 0, {loader:async()=>{let{markIdentifiersCompleted:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-DHMLZZX7.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, )}},docs:{brief:"Mark identifiers as completed after processing.",fullDescription:`This command takes the output of "${n(["request","cron","pull-identifiers"],{})}" and notifies Transcend that all of the requests in the CSV have been processed.
60
+ This is used in the workflow like:
61
+
62
+ 1. Pull identifiers to CSV:
63
+
64
+ ${n(["request","cron","pull-identifiers"],{auth:"$TRANSCEND_API_KEY",dataSiloId:"70810f2e-cf90-43f6-9776-901a5950599f",actions:[_privacytypes.RequestAction.Erasure],file:"./outstanding-requests.csv"},{argsIndent:5})}
65
+
66
+ 2. Run your process to operate on that CSV of requests.
67
+
68
+ 3. Notify Transcend of completion
69
+
70
+ ${n(["request","cron","mark-identifiers-completed"],{auth:"$TRANSCEND_API_KEY",dataSiloId:"70810f2e-cf90-43f6-9776-901a5950599f",file:"./outstanding-requests.csv"},{argsIndent:5})}
71
+
72
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var re=_core.buildCommand.call(void 0, {loader:async()=>{let{pullIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-BEGQABL3.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),pageLimit:{kind:"parsed",parse:_core.numberParser,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:_core.numberParser,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"10000"}}},docs:{brief:"Pull identifiers of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding identifiers for the data silo to a CSV.
73
+
74
+ For large datasets, the output will be automatically split into multiple CSV files to avoid file system size limits. Use the --chunkSize parameter to control the maximum number of rows per file.
75
+
76
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var oe=_core.buildCommand.call(void 0, {loader:async()=>{let{pullProfiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-4TMKRPWO.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[],requiresSiloScope:!0}),cronDataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the cron data silo to pull in"},targetDataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the target data silo to pull in"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},fileTarget:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers-target.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),pageLimit:{kind:"parsed",parse:_core.numberParser,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:_core.numberParser,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"10000"}}},docs:{brief:"Pull profiles of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding profiles for the data silo to a CSV.
77
+
78
+ For large datasets, the output will be automatically split into multiple CSV files to avoid file system size limits. Use the --chunkSize parameter to control the maximum number of rows per file.
79
+
80
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var se=_core.buildRouteMap.call(void 0, {routes:{"pull-identifiers":re,"pull-profiles":oe,"mark-identifiers-completed":ee},docs:{brief:"Cron commands",hideRoute:{"pull-profiles":!0}}});var ie=_core.buildCommand.call(void 0, {loader:async()=>{let{downloadFiles:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-ALXI3TP7.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequestCompilation,_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.RequestApproval]}),sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when downloading requests in parallel",default:"10"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to download",optional:!0},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to download. Comma-separated list. Defaults to APPROVING,DOWNLOADABLE.",optional:!0},folderPath:{kind:"parsed",parse:String,brief:"The folder to download files to",default:"./dsr-files"},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Download requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Download requests that were submitted after this time",optional:!0},approveAfterDownload:{kind:"boolean",brief:"If the request is in status=APPROVING, approve the request after its downloaded",default:!1},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Download the files associated with a Data Subject Access Request (DSAR)",fullDescription:"Download the files associated with a Data Subject Access Request (DSAR) from DSR Automation -> Incoming Requests tab."}});var ne=_core.buildCommand.call(void 0, {loader:async()=>{let{enricherRestart:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-DCPTYADV.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:String,brief:"The ID of the enricher to restart"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request action to restart",optional:!0},requestEnricherStatuses:{kind:"enum",values:Object.values(_privacytypes.RequestEnricherStatus),variadic:",",brief:"The request enricher statuses to restart",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Restart requests that were submitted after this time",optional:!0}}},docs:{brief:"Bulk restart a particular enricher across a series of DSRs",fullDescription:`Bulk restart a particular enricher across a series of DSRs.
81
+
82
+ The API key needs the following scopes:
83
+ - Manage Request Compilation`}});var ue=_core.buildCommand.call(void 0, {loader:async()=>{let{_export:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-OEZVSI3U.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.ViewRequestCompilation]}),sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to export",optional:!0},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to export",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./transcend-request-export.csv"},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Pull requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Pull requests that were submitted after this time",optional:!0},showTests:{kind:"boolean",brief:"Filter for test requests or production requests - when not provided, pulls both",optional:!0},pageLimit:{kind:"parsed",parse:_core.numberParser,brief:"The page limit to use when pulling in pages of requests",default:"100"}}},docs:{brief:"Export privacy requests and request identifiers to a CSV file",fullDescription:"Export privacy requests and request identifiers to a CSV file."}});var me=_core.buildCommand.call(void 0, {loader:async()=>{let{markSilent:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-TI7DA67A.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to mark silent"},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to mark silent. Comma-separated list. Defaults to REQUEST_MADE,WAITING,ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to mark silent",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Mark silent requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Mark silent requests that were submitted after this time",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk update a set of privacy requests to be in silent mode",fullDescription:"Bulk update a set of privacy requests from the DSR Automation -> Incoming Requests tab to be in silent mode."}});var ce=_core.buildCommand.call(void 0, {loader:async()=>{let{notifyAdditionalTime:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-6OK7OVS6.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.RequestApproval]}),createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Notify requests that are open but submitted before this time"},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Notify requests that are open but submitted after this time",optional:!0},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to notify",optional:!0},daysLeft:{kind:"parsed",parse:_core.numberParser,brief:"Only notify requests that have less than this number of days until they are considered expired",default:"10"},days:{kind:"parsed",parse:_core.numberParser,brief:"The number of days to adjust the expiration of the request to",default:"45"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to notify",optional:!0},emailTemplate:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests",default:"Additional Time Needed"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk notify a set of privacy requests that more time is needed",fullDescription:"Bulk notify a set of privacy requests from the DSR Automation -> Incoming Requests tab that more time is needed to complete the request. Note any request in silent mode will not be emailed."}});var he=_core.buildCommand.call(void 0, {loader:async()=>{let{pullIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-4EYSMS5J.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ViewRequests,_privacytypes.ScopeName.ViewRequestCompilation]}),sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to pull for",optional:!0},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Pull identifiers for manual enrichment",fullDescription:`This command pulls down the set of privacy requests that are currently pending manual enrichment.
84
+
85
+ This is useful for the following workflow:
86
+
87
+ 1. Pull identifiers to CSV:
88
+
89
+ ${n(["request","preflight","pull-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}
90
+
91
+ 2. Fill out the CSV with additional identifiers
92
+
93
+ 3. Push updated back to Transcend:
94
+
95
+ ${n(["request","preflight","push-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}`}});var ge=_core.buildCommand.call(void 0, {loader:async()=>{let{pushIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-TVSTWXSI.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestIdentities,_privacytypes.ScopeName.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the Request Enricher to upload to"},sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},markSilent:{kind:"boolean",brief:"When true, set requests into silent mode before enriching",default:!1},concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Push identifiers for manual enrichment",fullDescription:`This command push up a set of identifiers for a set of requests pending manual enrichment.
96
+
97
+ This is useful for the following workflow:
98
+
99
+ 1. Pull identifiers to CSV:
100
+
101
+ ${n(["request","preflight","pull-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}
102
+
103
+ 2. Fill out the CSV with additional identifiers
104
+
105
+ 3. Push updated back to Transcend:
106
+
107
+ ${n(["request","preflight","push-identifiers"],{file:"./enrichment-requests.csv"},{argsIndent:5})}`}});var ye=_core.buildRouteMap.call(void 0, {routes:{"pull-identifiers":he,"push-identifiers":ge},docs:{brief:"Preflight commands"}});var ke=_core.buildCommand.call(void 0, {loader:async()=>{let{rejectUnverifiedIdentifiers:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-CT62BE2Y.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),identifierNames:{kind:"parsed",parse:String,variadic:",",brief:"The names of identifiers to clear out"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request action to restart",optional:!0},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Bulk clear out any request identifiers that are unverified",fullDescription:"Bulk clear out any request identifiers that are unverified."}});var Ce=_core.buildCommand.call(void 0, {loader:async()=>{let{restart:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-XTEZTAM2.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.MakeDataSubjectRequest,_privacytypes.ScopeName.ViewRequestCompilation]}),actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to restart"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},emailIsVerified:{kind:"boolean",brief:"Indicate whether the primary email address is verified. Set to false to send a verification email",default:!0},createdAt:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Restart requests that were submitted before a specific date",optional:!0},silentModeBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Requests older than this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:_chunkFMX5SPCLcjs.c,brief:"Restart requests that were submitted after this time",optional:!0},sendEmailReceipt:{kind:"boolean",brief:"Send email receipts to the restarted requests",default:!1},copyIdentifiers:{kind:"boolean",brief:"Copy over all enriched identifiers from the initial request",default:!1},skipWaitingPeriod:{kind:"boolean",brief:"Skip queued state of request and go straight to compiling",default:!1}}},docs:{brief:"Bulk update a set of privacy requests based on a set of request filters",fullDescription:"Bulk update a set of privacy requests based on a set of request filters."}});var we=_core.buildCommand.call(void 0, {loader:async()=>{let{skipPreflightJobs:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-SLRQDZB4.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),enricherIds:{kind:"parsed",parse:String,variadic:",",brief:"The ID of the enrichers to skip privacy request jobs for"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Skip preflight jobs",fullDescription:"This command allows for bulk skipping preflight checks."}});var ve=_core.buildCommand.call(void 0, {loader:async()=>{let{markRequestDataSilosCompleted:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-GSLBE3DP.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:'Path to the CSV file where identifiers will be written to. The CSV is expected to have 1 column named "Request Id".',default:"./request-identifiers.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Mark request data silos as completed",fullDescription:`This command takes in a CSV of Request IDs as well as a Data Silo ID and marks all associated privacy request jobs as completed.
108
+ This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".`}});var Te=_core.buildCommand.call(void 0, {loader:async()=>{let{retryRequestDataSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-JYCFV5ST.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(_privacytypes.RequestAction),variadic:",",brief:"The request actions to restart"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, )}},docs:{brief:"Retry request data silos",fullDescription:'This command allows for bulk restarting a set of data silos jobs for open privacy requests. This is equivalent to clicking the "Wipe and Retry" button for a particular data silo across a set of privacy requests.'}});var Pe=_core.buildCommand.call(void 0, {loader:async()=>{let{skipRequestDataSilos:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-HFDUNV2A.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:_chunkFMX5SPCLcjs.a,brief:"The ID of the data silo to skip privacy request jobs for"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),statuses:{kind:"enum",values:Object.values(_privacytypes.RequestStatus),variadic:",",brief:"The request statuses to skip"},status:{kind:"enum",values:[_privacytypes.RequestDataSiloStatus.Skipped,_privacytypes.RequestDataSiloStatus.Resolved],brief:"The status to set the request data silo job to",default:_privacytypes.RequestDataSiloStatus.Skipped}}},docs:{brief:"Skip request data silos",fullDescription:"This command allows for bulk skipping all open privacy request jobs for a particular data silo. This command is useful if you want to disable a data silo and then clear out any active privacy requests that are still queued up for that data silo."}});var qe=_core.buildRouteMap.call(void 0, {routes:{"mark-request-data-silos-completed":ve,"retry-request-data-silos":Te,"skip-request-data-silos":Pe},docs:{brief:"System commands"}});var Ae=_core.buildCommand.call(void 0, {loader:async()=>{let{upload:e}=await Promise.resolve().then(() => _interopRequireWildcard(require("./impl-5OEUTJB7.cjs")));return e},parameters:{flags:{auth:_chunkFMX5SPCLcjs.d.call(void 0, {scopes:[_privacytypes.ScopeName.MakeDataSubjectRequest,_privacytypes.ScopeName.ViewRequestIdentitySettings,_privacytypes.ScopeName.ViewGlobalAttributes]}),file:{kind:"parsed",parse:String,brief:"Path to the CSV file of requests to upload",default:"./requests.csv"},transcendUrl:_chunkFMX5SPCLcjs.e.call(void 0, ),cacheFilepath:{kind:"parsed",parse:String,brief:"The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API",default:"./transcend-privacy-requests-cache.json"},requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:_chunkFMX5SPCLcjs.g.call(void 0, ),concurrency:{kind:"parsed",parse:_core.numberParser,brief:"The concurrency to use when uploading requests in parallel",default:"50"},attributes:{kind:"parsed",parse:String,brief:"Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4",default:"Tags:transcend-cli"},isTest:{kind:"boolean",brief:"Flag whether the requests being uploaded are test requests or regular requests",default:!1},isSilent:{kind:"boolean",brief:"Flag whether the requests being uploaded should be submitted in silent mode",default:!0},skipSendingReceipt:{kind:"boolean",brief:"Flag whether to skip sending of the receipt email",default:!1},emailIsVerified:{kind:"boolean",brief:"Indicate whether the email address being uploaded is pre-verified. Set to false to send a verification email",default:!0},skipFilterStep:{kind:"boolean",brief:"When true, skip the interactive step to filter down the CSV",default:!1},dryRun:{kind:"boolean",brief:"When true, perform a dry run of the upload instead of calling the API to submit the requests",default:!1},debug:{kind:"boolean",brief:"Debug logging",default:!1},defaultPhoneCountryCode:{kind:"parsed",parse:String,brief:"When uploading phone numbers, if the phone number is missing a country code, assume this country code",default:"1"}}},docs:{brief:"Upload a set of requests from a CSV",fullDescription:`Upload a set of requests from a CSV.
109
+
110
+ This command prompts you to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
111
+
112
+ The script will also produce a JSON cache file that allows for the mappings to be preserved between runs.`}});var Ie=_core.buildRouteMap.call(void 0, {routes:{approve:H,upload:Ae,"download-files":ie,cancel:Z,restart:Ce,"notify-additional-time":ce,"mark-silent":me,"enricher-restart":ne,"reject-unverified-identifiers":ke,export:ue,"skip-preflight-jobs":we,system:qe,preflight:ye,cron:se},docs:{brief:"All commands related to DSR requests"}});var Ur=_core.buildRouteMap.call(void 0, {routes:{request:Ie,consent:j,inventory:z,admin:I,migration:X,install:_autocomplete.buildInstallCommand.call(void 0, "@transcend-io/transcend",{bash:"__@transcend-io/cli_bash_complete"}),uninstall:_autocomplete.buildUninstallCommand.call(void 0, "@transcend-io/transcend",{bash:!0})},docs:{brief:_chunk3EZGFSMDcjs.l,hideRoute:{install:!0,uninstall:!0}}}),en= exports.a =_core.buildApplication.call(void 0, Ur,{name:_chunkKC7NDLN7cjs.a,versionInfo:{currentVersion:_chunk3EZGFSMDcjs.m}});exports.a = en;
113
+ //# sourceMappingURL=chunk-6DMFIXMV.cjs.map