@transcend-io/cli 8.26.2 → 8.27.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 (130) hide show
  1. package/README.md +15 -0
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-JKEVZFNY.cjs → chunk-AD5RNQ4J.cjs} +2 -2
  6. package/dist/{chunk-JKEVZFNY.cjs.map → chunk-AD5RNQ4J.cjs.map} +1 -1
  7. package/dist/{chunk-6GWHYOPM.cjs → chunk-BL2UJW5C.cjs} +2 -2
  8. package/dist/{chunk-6GWHYOPM.cjs.map → chunk-BL2UJW5C.cjs.map} +1 -1
  9. package/dist/{chunk-BLSMEA5C.cjs → chunk-DZ5KTF7W.cjs} +2 -2
  10. package/dist/{chunk-BLSMEA5C.cjs.map → chunk-DZ5KTF7W.cjs.map} +1 -1
  11. package/dist/{chunk-5UBGZNDC.cjs → chunk-ECGHWDVP.cjs} +2 -2
  12. package/dist/chunk-ECGHWDVP.cjs.map +1 -0
  13. package/dist/{chunk-M7EKT75X.cjs → chunk-FQESEVCX.cjs} +2 -2
  14. package/dist/{chunk-M7EKT75X.cjs.map → chunk-FQESEVCX.cjs.map} +1 -1
  15. package/dist/chunk-G3LZCX5D.cjs +12 -0
  16. package/dist/chunk-G3LZCX5D.cjs.map +1 -0
  17. package/dist/{chunk-7OG6A4LI.cjs → chunk-GMTBHFZV.cjs} +4 -4
  18. package/dist/{chunk-7OG6A4LI.cjs.map → chunk-GMTBHFZV.cjs.map} +1 -1
  19. package/dist/{chunk-TQEFJGW6.cjs → chunk-HBI4MFHE.cjs} +21 -21
  20. package/dist/{chunk-TQEFJGW6.cjs.map → chunk-HBI4MFHE.cjs.map} +1 -1
  21. package/dist/{chunk-ACHJOO4S.cjs → chunk-IG445VJR.cjs} +2 -2
  22. package/dist/{chunk-ACHJOO4S.cjs.map → chunk-IG445VJR.cjs.map} +1 -1
  23. package/dist/{chunk-RE5YALEO.cjs → chunk-JFZPP4VV.cjs} +3 -3
  24. package/dist/{chunk-RE5YALEO.cjs.map → chunk-JFZPP4VV.cjs.map} +1 -1
  25. package/dist/{chunk-4LSUJDDH.cjs → chunk-JXUIQS5T.cjs} +2 -2
  26. package/dist/{chunk-4LSUJDDH.cjs.map → chunk-JXUIQS5T.cjs.map} +1 -1
  27. package/dist/{chunk-5QRRUXRI.cjs → chunk-LIFHKHUG.cjs} +2 -2
  28. package/dist/{chunk-5QRRUXRI.cjs.map → chunk-LIFHKHUG.cjs.map} +1 -1
  29. package/dist/{chunk-QMXGMC2H.cjs → chunk-LSZQ3OFG.cjs} +2 -2
  30. package/dist/{chunk-QMXGMC2H.cjs.map → chunk-LSZQ3OFG.cjs.map} +1 -1
  31. package/dist/{chunk-5HNRVLH2.cjs → chunk-NXWJFTTG.cjs} +4 -4
  32. package/dist/{chunk-5HNRVLH2.cjs.map → chunk-NXWJFTTG.cjs.map} +1 -1
  33. package/dist/{chunk-FE6CECES.cjs → chunk-OPHHRNLH.cjs} +11 -10
  34. package/dist/chunk-OPHHRNLH.cjs.map +1 -0
  35. package/dist/{chunk-UBVZKE7V.cjs → chunk-THCW2SNW.cjs} +2 -2
  36. package/dist/{chunk-UBVZKE7V.cjs.map → chunk-THCW2SNW.cjs.map} +1 -1
  37. package/dist/{impl-RHZNZ6CW.cjs → impl-2KMLK6S2.cjs} +2 -2
  38. package/dist/{impl-RHZNZ6CW.cjs.map → impl-2KMLK6S2.cjs.map} +1 -1
  39. package/dist/{impl-NILGKSUG.cjs → impl-3NXCEUTZ.cjs} +5 -5
  40. package/dist/{impl-NILGKSUG.cjs.map → impl-3NXCEUTZ.cjs.map} +1 -1
  41. package/dist/impl-3SWF4GZZ.cjs +2 -0
  42. package/dist/{impl-EMD77BVT.cjs.map → impl-3SWF4GZZ.cjs.map} +1 -1
  43. package/dist/{impl-XW4UTUBW.cjs → impl-3YAJ7ZV3.cjs} +2 -2
  44. package/dist/{impl-XW4UTUBW.cjs.map → impl-3YAJ7ZV3.cjs.map} +1 -1
  45. package/dist/{impl-TSZSY33S.cjs → impl-5AU5GNSB.cjs} +2 -2
  46. package/dist/{impl-TSZSY33S.cjs.map → impl-5AU5GNSB.cjs.map} +1 -1
  47. package/dist/{impl-BQKRH5GQ.cjs → impl-5BIEQWSB.cjs} +2 -2
  48. package/dist/{impl-BQKRH5GQ.cjs.map → impl-5BIEQWSB.cjs.map} +1 -1
  49. package/dist/{impl-CSXBLMR7.cjs → impl-5D3TCFK7.cjs} +2 -2
  50. package/dist/{impl-CSXBLMR7.cjs.map → impl-5D3TCFK7.cjs.map} +1 -1
  51. package/dist/{impl-SXOCIQPX.cjs → impl-5LRIZL6Q.cjs} +2 -2
  52. package/dist/{impl-SXOCIQPX.cjs.map → impl-5LRIZL6Q.cjs.map} +1 -1
  53. package/dist/{impl-FHICSIT4.cjs → impl-5LT5ZA7K.cjs} +2 -2
  54. package/dist/{impl-FHICSIT4.cjs.map → impl-5LT5ZA7K.cjs.map} +1 -1
  55. package/dist/{impl-HRVPP3AF.cjs → impl-6VNSS7JY.cjs} +2 -2
  56. package/dist/{impl-HRVPP3AF.cjs.map → impl-6VNSS7JY.cjs.map} +1 -1
  57. package/dist/{impl-K7NLXEZN.cjs → impl-6X6QOXM3.cjs} +3 -3
  58. package/dist/{impl-K7NLXEZN.cjs.map → impl-6X6QOXM3.cjs.map} +1 -1
  59. package/dist/{impl-FK7FC2AF.cjs → impl-6ZJOSWUH.cjs} +2 -2
  60. package/dist/{impl-FK7FC2AF.cjs.map → impl-6ZJOSWUH.cjs.map} +1 -1
  61. package/dist/{impl-7V22LA5U.cjs → impl-ABBOINXS.cjs} +2 -2
  62. package/dist/{impl-7V22LA5U.cjs.map → impl-ABBOINXS.cjs.map} +1 -1
  63. package/dist/{impl-CBO3W76N.cjs → impl-BGLZ6S7A.cjs} +2 -2
  64. package/dist/{impl-CBO3W76N.cjs.map → impl-BGLZ6S7A.cjs.map} +1 -1
  65. package/dist/{impl-GOJL7NWE.cjs → impl-BIB6PUGE.cjs} +2 -2
  66. package/dist/{impl-GOJL7NWE.cjs.map → impl-BIB6PUGE.cjs.map} +1 -1
  67. package/dist/{impl-JY5JVCKH.cjs → impl-BSODHREX.cjs} +2 -2
  68. package/dist/{impl-JY5JVCKH.cjs.map → impl-BSODHREX.cjs.map} +1 -1
  69. package/dist/{impl-GCAHKCXJ.cjs → impl-D3IADLFZ.cjs} +2 -2
  70. package/dist/{impl-GCAHKCXJ.cjs.map → impl-D3IADLFZ.cjs.map} +1 -1
  71. package/dist/{impl-A7QHIGMS.cjs → impl-FKFSISLZ.cjs} +2 -2
  72. package/dist/{impl-A7QHIGMS.cjs.map → impl-FKFSISLZ.cjs.map} +1 -1
  73. package/dist/{impl-WJZL3F6W.cjs → impl-GE54DKYZ.cjs} +3 -3
  74. package/dist/{impl-WJZL3F6W.cjs.map → impl-GE54DKYZ.cjs.map} +1 -1
  75. package/dist/{impl-BEATRFDE.cjs → impl-GZIWCS6D.cjs} +2 -2
  76. package/dist/{impl-BEATRFDE.cjs.map → impl-GZIWCS6D.cjs.map} +1 -1
  77. package/dist/{impl-ZA3FYBHK.cjs → impl-HIZHI4CT.cjs} +2 -2
  78. package/dist/{impl-ZA3FYBHK.cjs.map → impl-HIZHI4CT.cjs.map} +1 -1
  79. package/dist/{impl-KBXUU7JT.cjs → impl-HULEYZA3.cjs} +2 -2
  80. package/dist/{impl-KBXUU7JT.cjs.map → impl-HULEYZA3.cjs.map} +1 -1
  81. package/dist/{impl-LDYN63H6.cjs → impl-IOI72RK7.cjs} +2 -2
  82. package/dist/{impl-LDYN63H6.cjs.map → impl-IOI72RK7.cjs.map} +1 -1
  83. package/dist/{impl-33BZGWDB.cjs → impl-J23ILBH7.cjs} +2 -2
  84. package/dist/{impl-33BZGWDB.cjs.map → impl-J23ILBH7.cjs.map} +1 -1
  85. package/dist/{impl-M4OXXOMC.cjs → impl-JID5BHDK.cjs} +2 -2
  86. package/dist/{impl-M4OXXOMC.cjs.map → impl-JID5BHDK.cjs.map} +1 -1
  87. package/dist/{impl-72VUDRUK.cjs → impl-KFQWJU6D.cjs} +2 -2
  88. package/dist/{impl-72VUDRUK.cjs.map → impl-KFQWJU6D.cjs.map} +1 -1
  89. package/dist/{impl-YEQ5CW47.cjs → impl-LLP7IXWK.cjs} +2 -2
  90. package/dist/{impl-YEQ5CW47.cjs.map → impl-LLP7IXWK.cjs.map} +1 -1
  91. package/dist/{impl-ARSWR7NX.cjs → impl-OGVRZFXA.cjs} +2 -2
  92. package/dist/{impl-ARSWR7NX.cjs.map → impl-OGVRZFXA.cjs.map} +1 -1
  93. package/dist/{impl-OU5VJBRQ.cjs → impl-OQKJR3OY.cjs} +4 -4
  94. package/dist/{impl-OU5VJBRQ.cjs.map → impl-OQKJR3OY.cjs.map} +1 -1
  95. package/dist/{impl-VSGGPMKM.cjs → impl-OVRVC7X5.cjs} +2 -2
  96. package/dist/{impl-VSGGPMKM.cjs.map → impl-OVRVC7X5.cjs.map} +1 -1
  97. package/dist/{impl-NVHVPNKZ.cjs → impl-OYWTY4Q7.cjs} +2 -2
  98. package/dist/{impl-NVHVPNKZ.cjs.map → impl-OYWTY4Q7.cjs.map} +1 -1
  99. package/dist/{impl-LOR6NAV6.cjs → impl-P7VE347W.cjs} +2 -2
  100. package/dist/{impl-LOR6NAV6.cjs.map → impl-P7VE347W.cjs.map} +1 -1
  101. package/dist/{impl-7RRE2GGO.cjs → impl-QOGUZMYD.cjs} +2 -2
  102. package/dist/{impl-7RRE2GGO.cjs.map → impl-QOGUZMYD.cjs.map} +1 -1
  103. package/dist/impl-U4GMJYRH.cjs +2 -0
  104. package/dist/{impl-M6YOD7LA.cjs.map → impl-U4GMJYRH.cjs.map} +1 -1
  105. package/dist/{impl-DVDXXRQC.cjs → impl-W75S6XUS.cjs} +2 -2
  106. package/dist/{impl-DVDXXRQC.cjs.map → impl-W75S6XUS.cjs.map} +1 -1
  107. package/dist/{impl-24WXRAZH.cjs → impl-WUHP3P5R.cjs} +2 -2
  108. package/dist/{impl-24WXRAZH.cjs.map → impl-WUHP3P5R.cjs.map} +1 -1
  109. package/dist/{impl-2QA5YMX7.cjs → impl-WWL2A2T2.cjs} +2 -2
  110. package/dist/{impl-2QA5YMX7.cjs.map → impl-WWL2A2T2.cjs.map} +1 -1
  111. package/dist/{impl-3NHKBP7U.cjs → impl-WWVVPFM7.cjs} +2 -2
  112. package/dist/{impl-3NHKBP7U.cjs.map → impl-WWVVPFM7.cjs.map} +1 -1
  113. package/dist/{impl-5T356QQ5.cjs → impl-X3NI5ITC.cjs} +2 -2
  114. package/dist/{impl-5T356QQ5.cjs.map → impl-X3NI5ITC.cjs.map} +1 -1
  115. package/dist/{impl-VUMK2QR4.cjs → impl-XMOEYUIG.cjs} +2 -2
  116. package/dist/{impl-VUMK2QR4.cjs.map → impl-XMOEYUIG.cjs.map} +1 -1
  117. package/dist/{impl-ONAOXMKU.cjs → impl-YGX4NQLZ.cjs} +2 -2
  118. package/dist/{impl-ONAOXMKU.cjs.map → impl-YGX4NQLZ.cjs.map} +1 -1
  119. package/dist/{impl-47P6B22N.cjs → impl-YOB7AAQJ.cjs} +2 -2
  120. package/dist/{impl-47P6B22N.cjs.map → impl-YOB7AAQJ.cjs.map} +1 -1
  121. package/dist/index.cjs +3 -3
  122. package/dist/index.cjs.map +1 -1
  123. package/dist/index.d.cts +9 -2
  124. package/package.json +1 -1
  125. package/dist/chunk-5UBGZNDC.cjs.map +0 -1
  126. package/dist/chunk-CP42F62X.cjs +0 -12
  127. package/dist/chunk-CP42F62X.cjs.map +0 -1
  128. package/dist/chunk-FE6CECES.cjs.map +0 -1
  129. package/dist/impl-EMD77BVT.cjs +0 -2
  130. package/dist/impl-M6YOD7LA.cjs +0 -2
package/README.md CHANGED
@@ -1934,6 +1934,15 @@ transcend consent pull-consent-preferences \
1934
1934
  --maxLookbackDays=30
1935
1935
  ```
1936
1936
 
1937
+ #### Large Exports
1938
+
1939
+ If you are exporting a large number of consent preferences (e.g. 100M+), this command will output a file that may be 50-100GB+ in size.
1940
+ If you need to transfer this data, you may want to leverage the following command to break the single CSV into multiple:
1941
+
1942
+ ```
1943
+ transcend admin chunk-csv --directory=./working/files --outputDir=./working/chunks
1944
+ ```
1945
+
1937
1946
  ### `transcend consent update-consent-manager`
1938
1947
 
1939
1948
  ```txt
@@ -2427,6 +2436,12 @@ transcend inventory pull --auth="$TRANSCEND_API_KEY" --resources=purposes
2427
2436
  transcend inventory pull --auth="$TRANSCEND_API_KEY" --resources=dataSubjects
2428
2437
  ```
2429
2438
 
2439
+ **Pull privacy center and internationalized messages (see [this example](./examples/privacy-center-and-messages.yml))**
2440
+
2441
+ ```sh
2442
+ transcend inventory pull --auth="$TRANSCEND_API_KEY" --resources=privacyCenters,messages
2443
+ ```
2444
+
2430
2445
  **Pull assessments and assessment templates**
2431
2446
 
2432
2447
  ```sh
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkTQEFJGW6cjs = require('../chunk-TQEFJGW6.cjs');require('../chunk-M7EKT75X.cjs');require('../chunk-UBVZKE7V.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkTQEFJGW6cjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkTQEFJGW6cjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
2
+ "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkHBI4MFHEcjs = require('../chunk-HBI4MFHE.cjs');require('../chunk-FQESEVCX.cjs');require('../chunk-THCW2SNW.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function e(){let o=process.argv.slice(3);_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.COMP_LINE, 'optionalAccess', _3 => _3.endsWith, 'call', _4 => _4(" ")])&&o.push(""),await _core.proposeCompletions.call(void 0, _chunkHBI4MFHEcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process));try{for(let{completion:r}of await _core.proposeCompletions.call(void 0, _chunkHBI4MFHEcjs.a,o,_chunkT462ONFXcjs.a.call(void 0, process)))process.stdout.write(`${r}
3
3
  `)}catch (e2){}}e();
4
4
  //# sourceMappingURL=bash-complete.cjs.map
package/dist/bin/cli.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkTQEFJGW6cjs = require('../chunk-TQEFJGW6.cjs');require('../chunk-M7EKT75X.cjs');require('../chunk-UBVZKE7V.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkTQEFJGW6cjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
2
+ "use strict";var _chunkT462ONFXcjs = require('../chunk-T462ONFX.cjs');var _chunkHBI4MFHEcjs = require('../chunk-HBI4MFHE.cjs');require('../chunk-FQESEVCX.cjs');require('../chunk-THCW2SNW.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');async function n(){await _core.run.call(void 0, _chunkHBI4MFHEcjs.a,process.argv.slice(2),_chunkT462ONFXcjs.a.call(void 0, process))}n();
3
3
  //# sourceMappingURL=cli.cjs.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkTQEFJGW6cjs = require('../chunk-TQEFJGW6.cjs');require('../chunk-M7EKT75X.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-UBVZKE7V.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkTQEFJGW6cjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkTQEFJGW6cjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkTQEFJGW6cjs.a.config.name} ${d.join(" ")}\``).join(`
2
+ "use strict"; function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkHBI4MFHEcjs = require('../chunk-HBI4MFHE.cjs');require('../chunk-FQESEVCX.cjs');var _chunkZUNVPK23cjs = require('../chunk-ZUNVPK23.cjs');require('../chunk-THCW2SNW.cjs');require('../chunk-Q7I37FJV.cjs');var _core = require('@stricli/core');var o={"tr-build-xdi-sync-endpoint":["consent","build-xdi-sync-endpoint"],"tr-consent-manager-service-json-to-yml":["inventory","consent-manager-service-json-to-yml"],"tr-consent-managers-to-business-entities":["inventory","consent-managers-to-business-entities"],"tr-cron-mark-identifiers-completed":["request","cron","mark-identifiers-completed"],"tr-cron-pull-identifiers":["request","cron","pull-identifiers"],"tr-derive-data-silos-from-data-flows":["inventory","derive-data-silos-from-data-flows"],"tr-derive-data-silos-from-data-flows-cross-instance":["inventory","derive-data-silos-from-data-flows-cross-instance"],"tr-discover-silos":["inventory","discover-silos"],"tr-generate-api-keys":["admin","generate-api-keys"],"tr-manual-enrichment-pull-identifiers":["request","preflight","pull-identifiers"],"tr-manual-enrichment-push-identifiers":["request","preflight","push-identifiers"],"tr-mark-request-data-silos-completed":["request","system","mark-request-data-silos-completed"],"tr-pull":["inventory","pull"],"tr-pull-consent-metrics":["consent","pull-consent-metrics"],"tr-pull-consent-preferences":["consent","pull-consent-preferences"],"tr-pull-datapoints":["inventory","pull-datapoints"],"tr-pull-pull-unstructured-discovery-files":["inventory","pull-unstructured-discovery-files"],"tr-push":["inventory","push"],"tr-request-approve":["request","approve"],"tr-request-cancel":["request","cancel"],"tr-request-download-files":["request","download-files"],"tr-request-enricher-restart":["request","enricher-restart"],"tr-request-export":["request","export"],"tr-request-mark-silent":["request","mark-silent"],"tr-request-notify-additional-time":["request","notify-additional-time"],"tr-request-reject-unverified-identifiers":["request","reject-unverified-identifiers"],"tr-request-restart":["request","restart"],"tr-request-upload":["request","upload"],"tr-retry-request-data-silos":["request","system","retry-request-data-silos"],"tr-scan-packages":["inventory","scan-packages"],"tr-skip-preflight-jobs":["request","skip-preflight-jobs"],"tr-skip-request-data-silos":["request","system","skip-request-data-silos"],"tr-sync-ot":["migration","sync-ot"],"tr-update-consent-manager":["consent","update-consent-manager"],"tr-upload-consent-preferences":["consent","upload-consent-preferences"],"tr-upload-cookies-from-csv":["consent","upload-cookies-from-csv"],"tr-upload-data-flows-from-csv":["consent","upload-data-flows-from-csv"],"tr-upload-preferences":["consent","upload-preferences"]};function p(t){return _optionalChain([_core.generateHelpTextForAllCommands.call(void 0, _chunkHBI4MFHEcjs.a), 'access', _ => _.find, 'call', _2 => _2(s=>s[0]===`${_chunkHBI4MFHEcjs.a.config.name} ${t.join(" ")}`), 'optionalAccess', _3 => _3[1]])}function i(t){_chunkZUNVPK23cjs.a.log("[DEPRECATION NOTICE]");let e=o[t];if(!e){let a=Object.entries(o).map(([l,d])=>`\`${l}\` -> \`${_chunkHBI4MFHEcjs.a.config.name} ${d.join(" ")}\``).join(`
3
3
  `);_chunkZUNVPK23cjs.a.log(`This command is deprecated as of v7.0.0. Here is a list of new commands, mapped to their legacy command names:
4
4
  ${a}`);return}_chunkZUNVPK23cjs.a.log(`\`${t}\` is deprecated as of v7.0.0.
5
- Use \`${_chunkTQEFJGW6cjs.a.config.name} ${e.join(" ")}\` instead.
5
+ Use \`${_chunkHBI4MFHEcjs.a.config.name} ${e.join(" ")}\` instead.
6
6
  `);let s=p(e);if(!s)throw new Error(`Failed to get help text for command: \`${e.join(" ")}\``);_chunkZUNVPK23cjs.a.log(s)}function m(){let e=_optionalChain([process, 'access', _4 => _4.argv, 'access', _5 => _5.at, 'call', _6 => _6(-1), 'optionalAccess', _7 => _7.split, 'call', _8 => _8("/"), 'access', _9 => _9.pop, 'call', _10 => _10(), 'optionalAccess', _11 => _11.trim, 'call', _12 => _12()]);if(e)i(e);else throw new Error("Deprecated command");process.exit(1)}m();
7
7
  //# sourceMappingURL=deprecated-command.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _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 }; }var _chunk5UBGZNDCcjs = require('./chunk-5UBGZNDC.cjs');var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkUBVZKE7Vcjs = require('./chunk-UBVZKE7V.cjs');var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function H({email:r,password:a,scopes:f,apiKeyTitle:t,parentOrganizationId:o,deleteExistingApiKey:l=!0,createNewApiKey:I=!0,transcendUrl:x=_chunkUBVZKE7Vcjs.r}){let s=await _chunkFE6CECEScjs.vc.call(void 0, x,{});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Logging in using email and password."));let{roles:d,loginCookie:k}=await _chunkFE6CECEScjs.Jd.call(void 0, s,{email:r,password:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully logged in and found ${d.length} role${d.length===1?"":"s"}!`));let P=o?d.filter(e=>e.organization.id===o||e.organization.parentOrganizationId===o):d;s.setHeaders({Cookie:k});let m=[],c=[];return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Generating API keys with title: ${t}, scopes: ${f.join(",")}.`)),await _bluebird.mapSeries.call(void 0, P,async e=>{try{await _chunkFE6CECEScjs.Kd.call(void 0, s,{roleId:e.id,email:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Checking if API key already exists in organization "${e.organization.name}" with title: "${t}".`));let[g]=await _chunkFE6CECEScjs.rd.call(void 0, s,[t]);if(g&&l)_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Deleting existing API key in "${e.organization.name}" with title: "${t}".`)),await _chunkFE6CECEScjs.Md.call(void 0, s,g.id),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully deleted API key in "${e.organization.name}" with title: "${t}".`));else if(g)throw new Error(`API key already exists with title: "${t}"`);if(I){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating API key in "${e.organization.name}" with title: "${t}".`));let{apiKey:K}=await _chunkFE6CECEScjs.Ld.call(void 0, s,{title:t,scopes:f});m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:K}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created API key in "${e.organization.name}" with title: "${t}".`))}else m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:""})}catch(g){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create API key in organization "${e.organization.name}"! - ${g.message}`)),c.push({organizationName:e.organization.name,organizationId:e.organization.id,error:g.message})}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created ${m.length} API key${m.length===1?"":"s"}`)),c.length>0&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create ${c.length} API key${c.length===1?"":"s"}!`)),{errors:c,apiKeys:m}}var _typeutils = require('@transcend-io/type-utils');var _iots = require('io-ts'); var S = _interopRequireWildcard(_iots);var _fs = require('fs');function T(r){return r||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY")),process.exit(1)),_fs.existsSync.call(void 0, r)?_typeutils.decodeCodec.call(void 0, S.array(_chunk5UBGZNDCcjs.ha),_fs.readFileSync.call(void 0, r,"utf-8")):r}function Z(r,a,f=!1){if(!_fs.existsSync.call(void 0, r))return[];let t=_fs.readdirSync.call(void 0, r).filter(o=>a?a.filter(l=>o.endsWith(l)).length:!0).filter(o=>o.indexOf(".")>0);return f?t.map(o=>o.replace(/\.[^/.]+$/,"")):t}var _path = require('path');function te(r){return _fs.readdirSync.call(void 0, r).filter(a=>_fs.statSync.call(void 0, _path.join.call(void 0, r,a)).isDirectory())}exports.a = H; exports.b = T; exports.c = Z; exports.d = te;
2
- //# sourceMappingURL=chunk-JKEVZFNY.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkECGHWDVPcjs = require('./chunk-ECGHWDVP.cjs');var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function H({email:r,password:a,scopes:f,apiKeyTitle:t,parentOrganizationId:o,deleteExistingApiKey:l=!0,createNewApiKey:I=!0,transcendUrl:x=_chunkTHCW2SNWcjs.r}){let s=await _chunkOPHHRNLHcjs.vc.call(void 0, x,{});_chunkZUNVPK23cjs.a.info(_colors2.default.magenta("Logging in using email and password."));let{roles:d,loginCookie:k}=await _chunkOPHHRNLHcjs.Jd.call(void 0, s,{email:r,password:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully logged in and found ${d.length} role${d.length===1?"":"s"}!`));let P=o?d.filter(e=>e.organization.id===o||e.organization.parentOrganizationId===o):d;s.setHeaders({Cookie:k});let m=[],c=[];return _chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Generating API keys with title: ${t}, scopes: ${f.join(",")}.`)),await _bluebird.mapSeries.call(void 0, P,async e=>{try{await _chunkOPHHRNLHcjs.Kd.call(void 0, s,{roleId:e.id,email:r}),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Checking if API key already exists in organization "${e.organization.name}" with title: "${t}".`));let[g]=await _chunkOPHHRNLHcjs.rd.call(void 0, s,[t]);if(g&&l)_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Deleting existing API key in "${e.organization.name}" with title: "${t}".`)),await _chunkOPHHRNLHcjs.Md.call(void 0, s,g.id),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully deleted API key in "${e.organization.name}" with title: "${t}".`));else if(g)throw new Error(`API key already exists with title: "${t}"`);if(I){_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Creating API key in "${e.organization.name}" with title: "${t}".`));let{apiKey:K}=await _chunkOPHHRNLHcjs.Ld.call(void 0, s,{title:t,scopes:f});m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:K}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created API key in "${e.organization.name}" with title: "${t}".`))}else m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:""})}catch(g){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create API key in organization "${e.organization.name}"! - ${g.message}`)),c.push({organizationName:e.organization.name,organizationId:e.organization.id,error:g.message})}}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully created ${m.length} API key${m.length===1?"":"s"}`)),c.length>0&&_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to create ${c.length} API key${c.length===1?"":"s"}!`)),{errors:c,apiKeys:m}}var _typeutils = require('@transcend-io/type-utils');var _iots = require('io-ts'); var S = _interopRequireWildcard(_iots);var _fs = require('fs');function T(r){return r||(_chunkZUNVPK23cjs.a.error(_colors2.default.red("A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY")),process.exit(1)),_fs.existsSync.call(void 0, r)?_typeutils.decodeCodec.call(void 0, S.array(_chunkECGHWDVPcjs.ha),_fs.readFileSync.call(void 0, r,"utf-8")):r}function Z(r,a,f=!1){if(!_fs.existsSync.call(void 0, r))return[];let t=_fs.readdirSync.call(void 0, r).filter(o=>a?a.filter(l=>o.endsWith(l)).length:!0).filter(o=>o.indexOf(".")>0);return f?t.map(o=>o.replace(/\.[^/.]+$/,"")):t}var _path = require('path');function te(r){return _fs.readdirSync.call(void 0, r).filter(a=>_fs.statSync.call(void 0, _path.join.call(void 0, r,a)).isDirectory())}exports.a = H; exports.b = T; exports.c = Z; exports.d = te;
2
+ //# sourceMappingURL=chunk-AD5RNQ4J.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-JKEVZFNY.cjs","../src/lib/api-keys/generateCrossAccountApiKeys.ts"],"names":["generateCrossAccountApiKeys","email","password","scopes","apiKeyTitle","parentOrganizationId","deleteExistingApiKey","createNewApiKey","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClientGeneric","logger","colors","roles","loginCookie","loginUser","filteredRoles","role","results","errors","mapSeries","assumeRole","apiKeyWithTitle","fetchAllApiKeys","deleteApiKey","apiKey","createApiKey","err"],"mappings":"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","file":"/home/runner/work/cli/cli/dist/chunk-JKEVZFNY.cjs","sourcesContent":[null,"import { mapSeries } from 'bluebird';\nimport {\n buildTranscendGraphQLClientGeneric,\n loginUser,\n createApiKey,\n fetchAllApiKeys,\n deleteApiKey,\n assumeRole,\n} from '../graphql';\nimport { ScopeName } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { StoredApiKey } from '../../codecs';\nimport { logger } from '../../logger';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nexport interface ApiKeyGenerateError {\n /** Name of instance */\n organizationName: string;\n /** Error */\n error: string;\n /** Organization ID API key is for */\n organizationId: string;\n}\n\n/**\n * Generate API keys across multiple transcend accounts\n *\n * @param options - Options\n * @returns Number of API keys created\n */\nexport async function generateCrossAccountApiKeys({\n email,\n password,\n scopes,\n apiKeyTitle,\n parentOrganizationId,\n deleteExistingApiKey = true,\n createNewApiKey = true,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** Email address of user generating API keys */\n email: string;\n /** Password of user generating API keys */\n password: string;\n /** Filter for organizations that match this parent organization ID */\n parentOrganizationId?: string;\n /** Title of the API create to create */\n apiKeyTitle: string;\n /** Title of the API create to create */\n scopes: ScopeName[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** When true delete existing API keys with that title, if set to false an API key exists with that title, an error is thrown */\n deleteExistingApiKey?: boolean;\n /** When true, generate new API keys, otherwise only will delete past API keys */\n createNewApiKey?: boolean;\n}): Promise<{\n /** Successfully generated */\n apiKeys: StoredApiKey[];\n /** Error results */\n errors: ApiKeyGenerateError[];\n}> {\n // Create GraphQL client\n const client = await buildTranscendGraphQLClientGeneric(transcendUrl, {});\n\n // Login the user\n logger.info(colors.magenta('Logging in using email and password.'));\n const { roles, loginCookie } = await loginUser(client, { email, password });\n logger.info(\n colors.green(\n `Successfully logged in and found ${roles.length} role${\n roles.length === 1 ? '' : 's'\n }!`,\n ),\n );\n\n // Filter down by parentOrganizationId\n const filteredRoles = parentOrganizationId\n ? roles.filter(\n (role) =>\n role.organization.id === parentOrganizationId ||\n role.organization.parentOrganizationId === parentOrganizationId,\n )\n : roles;\n\n // Save cookie to call route subsequent times\n client.setHeaders({\n Cookie: loginCookie,\n });\n\n // Save the resulting API keys\n const results: StoredApiKey[] = [];\n const errors: ApiKeyGenerateError[] = [];\n\n // Generate API keys\n logger.info(\n colors.magenta(\n `Generating API keys with title: ${apiKeyTitle}, scopes: ${scopes.join(\n ',',\n )}.`,\n ),\n );\n\n // Map over each role\n await mapSeries(filteredRoles, async (role) => {\n try {\n // Log into the other instance\n await assumeRole(client, { roleId: role.id, email });\n\n // Grab API keys with that title\n logger.info(\n colors.magenta(\n `Checking if API key already exists in organization \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n\n // Delete existing API key\n const [apiKeyWithTitle] = await fetchAllApiKeys(client, [apiKeyTitle]);\n if (apiKeyWithTitle && deleteExistingApiKey) {\n logger.info(\n colors.yellow(\n `Deleting existing API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n await deleteApiKey(client, apiKeyWithTitle.id);\n logger.info(\n colors.green(\n `Successfully deleted API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n } else if (apiKeyWithTitle) {\n // throw error if one exists but not configured to delete\n throw new Error(`API key already exists with title: \"${apiKeyTitle}\"`);\n }\n\n // Create the API key\n if (createNewApiKey) {\n logger.info(\n colors.magenta(\n `Creating API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n const { apiKey } = await createApiKey(client, {\n title: apiKeyTitle,\n scopes,\n });\n results.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n apiKey,\n });\n logger.info(\n colors.green(\n `Successfully created API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n } else {\n // Delete only\n results.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n apiKey: '',\n });\n }\n } catch (err) {\n logger.error(\n colors.red(\n `Failed to create API key in organization \"${role.organization.name}\"! - ${err.message}`,\n ),\n );\n errors.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n error: err.message,\n });\n }\n });\n logger.info(\n colors.green(\n `Successfully created ${results.length} API key${\n results.length === 1 ? '' : 's'\n }`,\n ),\n );\n\n if (errors.length > 0) {\n logger.error(\n colors.red(\n `Failed to create ${errors.length} API key${\n errors.length === 1 ? '' : 's'\n }!`,\n ),\n );\n }\n\n return { errors, apiKeys: results };\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-AD5RNQ4J.cjs","../src/lib/api-keys/generateCrossAccountApiKeys.ts"],"names":["generateCrossAccountApiKeys","email","password","scopes","apiKeyTitle","parentOrganizationId","deleteExistingApiKey","createNewApiKey","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClientGeneric","logger","colors","roles","loginCookie","loginUser","filteredRoles","role","results","errors","mapSeries","assumeRole","apiKeyWithTitle","fetchAllApiKeys","deleteApiKey","apiKey","createApiKey","err"],"mappings":"AAAA,mfAAyC,wDAAkF,wDAAyC,wDAAyC,oCCAnL,gFAUP,MAoBnB,SAAsBA,CAAAA,CAA4B,CAChD,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CACA,oBAAA,CAAAC,CAAAA,CAAuB,CAAA,CAAA,CACvB,eAAA,CAAAC,CAAAA,CAAkB,CAAA,CAAA,CAClB,YAAA,CAAAC,CAAAA,CAAeC,mBACjB,CAAA,CAsBG,CAED,IAAMC,CAAAA,CAAS,MAAMC,kCAAAA,CAAmCH,CAAc,CAAC,CAAC,CAAA,CAGxEI,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,sCAAsC,CAAC,CAAA,CAClE,GAAM,CAAE,KAAA,CAAAC,CAAAA,CAAO,WAAA,CAAAC,CAAY,CAAA,CAAI,MAAMC,kCAAAA,CAAUN,CAAQ,CAAE,KAAA,CAAAT,CAAAA,CAAO,QAAA,CAAAC,CAAS,CAAC,CAAA,CAC1EU,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,iCAAA,EAAoCC,CAAAA,CAAM,MAAM,CAAA,KAAA,EAC9CA,CAAAA,CAAM,MAAA,GAAW,CAAA,CAAI,EAAA,CAAK,GAC5B,CAAA,CAAA,CACF,CACF,CAAA,CAGA,IAAMG,CAAAA,CAAgBZ,CAAAA,CAClBS,CAAAA,CAAM,MAAA,CACHI,CAAAA,EACCA,CAAAA,CAAK,YAAA,CAAa,EAAA,GAAOb,CAAAA,EACzBa,CAAAA,CAAK,YAAA,CAAa,oBAAA,GAAyBb,CAC/C,CAAA,CACAS,CAAAA,CAGJJ,CAAAA,CAAO,UAAA,CAAW,CAChB,MAAA,CAAQK,CACV,CAAC,CAAA,CAGD,IAAMI,CAAAA,CAA0B,CAAC,CAAA,CAC3BC,CAAAA,CAAgC,CAAC,CAAA,CAGvC,OAAAR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,gCAAA,EAAmCT,CAAW,CAAA,UAAA,EAAaD,CAAAA,CAAO,IAAA,CAChE,GACF,CAAC,CAAA,CAAA,CACH,CACF,CAAA,CAGA,MAAMkB,iCAAAA,CAAUJ,CAAe,MAAOC,CAAAA,EAAS,CAC7C,GAAI,CAEF,MAAMI,kCAAAA,CAAWZ,CAAQ,CAAE,MAAA,CAAQQ,CAAAA,CAAK,EAAA,CAAI,KAAA,CAAAjB,CAAM,CAAC,CAAA,CAGnDW,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,oDAAA,EAAuDK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,eAAA,EAAkBd,CAAW,CAAA,EAAA,CAC5G,CACF,CAAA,CAGA,GAAM,CAACmB,CAAe,CAAA,CAAI,MAAMC,kCAAAA,CAAgBd,CAAQ,CAACN,CAAW,CAAC,CAAA,CACrE,EAAA,CAAImB,CAAAA,EAAmBjB,CAAAA,CACrBM,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,MAAA,CACL,CAAA,8BAAA,EAAiCK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,eAAA,EAAkBd,CAAW,CAAA,EAAA,CACtF,CACF,CAAA,CACA,MAAMqB,kCAAAA,CAAaf,CAAQa,CAAAA,CAAgB,EAAE,CAAA,CAC7CX,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,iCAAA,EAAoCK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,eAAA,EAAkBd,CAAW,CAAA,EAAA,CACzF,CACF,CAAA,CAAA,KAAA,EAAA,CACSmB,CAAAA,CAET,MAAM,IAAI,KAAA,CAAM,CAAA,oCAAA,EAAuCnB,CAAW,CAAA,CAAA,CAAG,CAAA,CAIvE,EAAA,CAAIG,CAAAA,CAAiB,CACnBK,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,qBAAA,EAAwBK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,eAAA,EAAkBd,CAAW,CAAA,EAAA,CAC7E,CACF,CAAA,CACA,GAAM,CAAE,MAAA,CAAAsB,CAAO,CAAA,CAAI,MAAMC,kCAAAA,CAAajB,CAAQ,CAC5C,KAAA,CAAON,CAAAA,CACP,MAAA,CAAAD,CACF,CAAC,CAAA,CACDgB,CAAAA,CAAQ,IAAA,CAAK,CACX,gBAAA,CAAkBD,CAAAA,CAAK,YAAA,CAAa,IAAA,CACpC,cAAA,CAAgBA,CAAAA,CAAK,YAAA,CAAa,EAAA,CAClC,MAAA,CAAAQ,CACF,CAAC,CAAA,CACDd,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,iCAAA,EAAoCK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,eAAA,EAAkBd,CAAW,CAAA,EAAA,CACzF,CACF,CACF,CAAA,KAEEe,CAAAA,CAAQ,IAAA,CAAK,CACX,gBAAA,CAAkBD,CAAAA,CAAK,YAAA,CAAa,IAAA,CACpC,cAAA,CAAgBA,CAAAA,CAAK,YAAA,CAAa,EAAA,CAClC,MAAA,CAAQ,EACV,CAAC,CAEL,CAAA,KAAA,CAASU,CAAAA,CAAK,CACZhB,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CACL,CAAA,0CAAA,EAA6CK,CAAAA,CAAK,YAAA,CAAa,IAAI,CAAA,KAAA,EAAQU,CAAAA,CAAI,OAAO,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-AD5RNQ4J.cjs","sourcesContent":[null,"import { mapSeries } from 'bluebird';\nimport {\n buildTranscendGraphQLClientGeneric,\n loginUser,\n createApiKey,\n fetchAllApiKeys,\n deleteApiKey,\n assumeRole,\n} from '../graphql';\nimport { ScopeName } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { StoredApiKey } from '../../codecs';\nimport { logger } from '../../logger';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\nexport interface ApiKeyGenerateError {\n /** Name of instance */\n organizationName: string;\n /** Error */\n error: string;\n /** Organization ID API key is for */\n organizationId: string;\n}\n\n/**\n * Generate API keys across multiple transcend accounts\n *\n * @param options - Options\n * @returns Number of API keys created\n */\nexport async function generateCrossAccountApiKeys({\n email,\n password,\n scopes,\n apiKeyTitle,\n parentOrganizationId,\n deleteExistingApiKey = true,\n createNewApiKey = true,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** Email address of user generating API keys */\n email: string;\n /** Password of user generating API keys */\n password: string;\n /** Filter for organizations that match this parent organization ID */\n parentOrganizationId?: string;\n /** Title of the API create to create */\n apiKeyTitle: string;\n /** Title of the API create to create */\n scopes: ScopeName[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** When true delete existing API keys with that title, if set to false an API key exists with that title, an error is thrown */\n deleteExistingApiKey?: boolean;\n /** When true, generate new API keys, otherwise only will delete past API keys */\n createNewApiKey?: boolean;\n}): Promise<{\n /** Successfully generated */\n apiKeys: StoredApiKey[];\n /** Error results */\n errors: ApiKeyGenerateError[];\n}> {\n // Create GraphQL client\n const client = await buildTranscendGraphQLClientGeneric(transcendUrl, {});\n\n // Login the user\n logger.info(colors.magenta('Logging in using email and password.'));\n const { roles, loginCookie } = await loginUser(client, { email, password });\n logger.info(\n colors.green(\n `Successfully logged in and found ${roles.length} role${\n roles.length === 1 ? '' : 's'\n }!`,\n ),\n );\n\n // Filter down by parentOrganizationId\n const filteredRoles = parentOrganizationId\n ? roles.filter(\n (role) =>\n role.organization.id === parentOrganizationId ||\n role.organization.parentOrganizationId === parentOrganizationId,\n )\n : roles;\n\n // Save cookie to call route subsequent times\n client.setHeaders({\n Cookie: loginCookie,\n });\n\n // Save the resulting API keys\n const results: StoredApiKey[] = [];\n const errors: ApiKeyGenerateError[] = [];\n\n // Generate API keys\n logger.info(\n colors.magenta(\n `Generating API keys with title: ${apiKeyTitle}, scopes: ${scopes.join(\n ',',\n )}.`,\n ),\n );\n\n // Map over each role\n await mapSeries(filteredRoles, async (role) => {\n try {\n // Log into the other instance\n await assumeRole(client, { roleId: role.id, email });\n\n // Grab API keys with that title\n logger.info(\n colors.magenta(\n `Checking if API key already exists in organization \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n\n // Delete existing API key\n const [apiKeyWithTitle] = await fetchAllApiKeys(client, [apiKeyTitle]);\n if (apiKeyWithTitle && deleteExistingApiKey) {\n logger.info(\n colors.yellow(\n `Deleting existing API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n await deleteApiKey(client, apiKeyWithTitle.id);\n logger.info(\n colors.green(\n `Successfully deleted API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n } else if (apiKeyWithTitle) {\n // throw error if one exists but not configured to delete\n throw new Error(`API key already exists with title: \"${apiKeyTitle}\"`);\n }\n\n // Create the API key\n if (createNewApiKey) {\n logger.info(\n colors.magenta(\n `Creating API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n const { apiKey } = await createApiKey(client, {\n title: apiKeyTitle,\n scopes,\n });\n results.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n apiKey,\n });\n logger.info(\n colors.green(\n `Successfully created API key in \"${role.organization.name}\" with title: \"${apiKeyTitle}\".`,\n ),\n );\n } else {\n // Delete only\n results.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n apiKey: '',\n });\n }\n } catch (err) {\n logger.error(\n colors.red(\n `Failed to create API key in organization \"${role.organization.name}\"! - ${err.message}`,\n ),\n );\n errors.push({\n organizationName: role.organization.name,\n organizationId: role.organization.id,\n error: err.message,\n });\n }\n });\n logger.info(\n colors.green(\n `Successfully created ${results.length} API key${\n results.length === 1 ? '' : 's'\n }`,\n ),\n );\n\n if (errors.length > 0) {\n logger.error(\n colors.red(\n `Failed to create ${errors.length} API key${\n errors.length === 1 ? '' : 's'\n }!`,\n ),\n );\n }\n\n return { errors, apiKeys: results };\n}\n"]}
@@ -1,3 +1,3 @@
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 }; }var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkUBVZKE7Vcjs = require('./chunk-UBVZKE7V.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function te({file:u,auth:s,sombraAuth:g,requestActions:f=[],concurrency:p=100,transcendUrl:n=_chunkUBVZKE7Vcjs.r}){let o=_chunkFE6CECEScjs.wc.call(void 0, n,s),e=await _chunkFE6CECEScjs.xc.call(void 0, n,s,g);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling manual enrichment requests, filtered for actions: ${f.join(",")}`));let d=await _chunkFE6CECEScjs.nd.call(void 0, o,{actions:f,statuses:[_privacytypes.RequestStatus.Enriching]}),i=[];await _bluebird.map.call(void 0, d,async t=>{let c=await _chunkFE6CECEScjs.hd.call(void 0, o,{requestId:t.id});if(c.filter(({status:m})=>m==="ACTION_REQUIRED")){let m=await _chunkFE6CECEScjs.kd.call(void 0, o,e,{requestId:t.id});i.push({...t,requestIdentifiers:m,requestEnrichers:c})}},{concurrency:p});let l=i.map(({attributeValues:t,requestIdentifiers:c,requestEnrichers:w,...m})=>({...m,...Object.entries(_chunkUBVZKE7Vcjs.d.call(void 0, c,"name")).reduce((I,[P,$])=>Object.assign(I,{[P]:$.map(({value:C})=>C).join(",")}),{}),...Object.entries(_chunkUBVZKE7Vcjs.d.call(void 0, t,"attributeKey.name")).reduce((I,[P,$])=>Object.assign(I,{[P]:$.map(({name:C})=>C).join(",")}),{})})),a=_chunkUBVZKE7Vcjs.j.call(void 0, l.map(t=>Object.keys(t)).flat());return await _chunkFE6CECEScjs.og.call(void 0, u,l,a),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${i.length} requests to file "${u}"`)),i}var _iots = require('io-ts'); var R = _interopRequireWildcard(_iots);var T="https://app.transcend.io/privacy-requests/incoming-requests/",F= exports.b =R.record(R.string,R.string);async function M(u,{id:s,...g},f,p){if(!s){let e=`Request ID must be provided to enricher request.${p?` Found error in row: ${p}`:""}`;throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(e)),new Error(e)}let n=s.toLowerCase(),o=Object.entries(g).reduce((e,[d,i])=>_chunkUBVZKE7Vcjs.j.call(void 0, _chunkFE6CECEScjs.oc.call(void 0, i)).length===0?e:Object.assign(e,{[d]:_chunkUBVZKE7Vcjs.j.call(void 0, _chunkFE6CECEScjs.oc.call(void 0, i)).map(a=>({value:d==="email"?a.toLowerCase():a}))}),{});try{return await u.post("v1/enrich-identifiers",{headers:{"x-transcend-request-id":n,"x-transcend-enricher-id":f},json:{enrichedIdentifiers:o}}).json(),_chunkZUNVPK23cjs.a.error(_colors2.default.green(`Successfully enriched request: ${T}${n}`)),!0}catch(e){if(typeof e.response.body=="string"&&e.response.body.includes("Cannot update a resolved RequestEnricher"))return _chunkZUNVPK23cjs.a.warn(_colors2.default.magenta(`Skipped enrichment for request: ${T}${n}, request is no longer in the enriching phase.`)),!1;throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to enricher identifiers for request with id: ${T}${n} - ${e.message} - ${e.response.body}`)),e}}async function ge({file:u,auth:s,sombraAuth:g,enricherId:f,markSilent:p,concurrency:n=100,transcendUrl:o=_chunkUBVZKE7Vcjs.r}){let e=await _chunkFE6CECEScjs.xc.call(void 0, o,s,g),d=_chunkFE6CECEScjs.wc.call(void 0, o,s);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${u}" from disk`));let i=_chunkFE6CECEScjs.rc.call(void 0, u,F);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Enriching "${i.length}" privacy requests.`));let l=0,a=0,t=0;if(await _bluebird.map.call(void 0, i,async(c,w)=>{try{p&&(await _chunkFE6CECEScjs.rg.call(void 0, d,_chunkFE6CECEScjs.Z,{input:{id:c.id,isSilent:!0}}),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Mark request as silent mode - ${c.id}`))),await M(e,c,f,w)?l+=1:a+=1}catch (e2){t+=1}},{concurrency:n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend!
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 }; }var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');var _privacytypes = require('@transcend-io/privacy-types');var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);async function te({file:u,auth:s,sombraAuth:g,requestActions:f=[],concurrency:p=100,transcendUrl:n=_chunkTHCW2SNWcjs.r}){let o=_chunkOPHHRNLHcjs.wc.call(void 0, n,s),e=await _chunkOPHHRNLHcjs.xc.call(void 0, n,s,g);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling manual enrichment requests, filtered for actions: ${f.join(",")}`));let d=await _chunkOPHHRNLHcjs.nd.call(void 0, o,{actions:f,statuses:[_privacytypes.RequestStatus.Enriching]}),i=[];await _bluebird.map.call(void 0, d,async t=>{let c=await _chunkOPHHRNLHcjs.hd.call(void 0, o,{requestId:t.id});if(c.filter(({status:m})=>m==="ACTION_REQUIRED")){let m=await _chunkOPHHRNLHcjs.kd.call(void 0, o,e,{requestId:t.id});i.push({...t,requestIdentifiers:m,requestEnrichers:c})}},{concurrency:p});let l=i.map(({attributeValues:t,requestIdentifiers:c,requestEnrichers:w,...m})=>({...m,...Object.entries(_chunkTHCW2SNWcjs.d.call(void 0, c,"name")).reduce((I,[P,$])=>Object.assign(I,{[P]:$.map(({value:C})=>C).join(",")}),{}),...Object.entries(_chunkTHCW2SNWcjs.d.call(void 0, t,"attributeKey.name")).reduce((I,[P,$])=>Object.assign(I,{[P]:$.map(({name:C})=>C).join(",")}),{})})),a=_chunkTHCW2SNWcjs.j.call(void 0, l.map(t=>Object.keys(t)).flat());return await _chunkOPHHRNLHcjs.pg.call(void 0, u,l,a),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${i.length} requests to file "${u}"`)),i}var _iots = require('io-ts'); var R = _interopRequireWildcard(_iots);var T="https://app.transcend.io/privacy-requests/incoming-requests/",F= exports.b =R.record(R.string,R.string);async function M(u,{id:s,...g},f,p){if(!s){let e=`Request ID must be provided to enricher request.${p?` Found error in row: ${p}`:""}`;throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(e)),new Error(e)}let n=s.toLowerCase(),o=Object.entries(g).reduce((e,[d,i])=>_chunkTHCW2SNWcjs.j.call(void 0, _chunkOPHHRNLHcjs.oc.call(void 0, i)).length===0?e:Object.assign(e,{[d]:_chunkTHCW2SNWcjs.j.call(void 0, _chunkOPHHRNLHcjs.oc.call(void 0, i)).map(a=>({value:d==="email"?a.toLowerCase():a}))}),{});try{return await u.post("v1/enrich-identifiers",{headers:{"x-transcend-request-id":n,"x-transcend-enricher-id":f},json:{enrichedIdentifiers:o}}).json(),_chunkZUNVPK23cjs.a.error(_colors2.default.green(`Successfully enriched request: ${T}${n}`)),!0}catch(e){if(typeof e.response.body=="string"&&e.response.body.includes("Cannot update a resolved RequestEnricher"))return _chunkZUNVPK23cjs.a.warn(_colors2.default.magenta(`Skipped enrichment for request: ${T}${n}, request is no longer in the enriching phase.`)),!1;throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`Failed to enricher identifiers for request with id: ${T}${n} - ${e.message} - ${e.response.body}`)),e}}async function ge({file:u,auth:s,sombraAuth:g,enricherId:f,markSilent:p,concurrency:n=100,transcendUrl:o=_chunkTHCW2SNWcjs.r}){let e=await _chunkOPHHRNLHcjs.xc.call(void 0, o,s,g),d=_chunkOPHHRNLHcjs.wc.call(void 0, o,s);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${u}" from disk`));let i=_chunkOPHHRNLHcjs.rc.call(void 0, u,F);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Enriching "${i.length}" privacy requests.`));let l=0,a=0,t=0;if(await _bluebird.map.call(void 0, i,async(c,w)=>{try{p&&(await _chunkOPHHRNLHcjs.sg.call(void 0, d,_chunkOPHHRNLHcjs.Z,{input:{id:c.id,isSilent:!0}}),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Mark request as silent mode - ${c.id}`))),await M(e,c,f,w)?l+=1:a+=1}catch (e2){t+=1}},{concurrency:n}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend!
2
2
  Success count: ${l}.`)),a>0&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Skipped count: ${a}.`)),t>0)throw _chunkZUNVPK23cjs.a.info(_colors2.default.red(`Error Count: ${t}.`)),new Error(`Failed to enrich: ${t} requests.`);return i.length}exports.a = te; exports.b = F; exports.c = M; exports.d = ge;
3
- //# sourceMappingURL=chunk-6GWHYOPM.cjs.map
3
+ //# sourceMappingURL=chunk-BL2UJW5C.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-6GWHYOPM.cjs","../src/lib/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.ts","../src/lib/manual-enrichment/pushManualEnrichmentIdentifiersFromCsv.ts"],"names":["pullManualEnrichmentIdentifiersToCsv","file","auth","sombraAuth","requestActions","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClient","sombra","createSombraGotInstance","logger","colors"],"mappings":"AAAA,mfAAgH,wDAAyC,wDAAuD,2DCAnK,oCACzB,gFACD,MA6BnB,SAAsBA,EAAAA,CAAqC,CACzD,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,CAAC,CAAA,CAClB,WAAA,CAAAC,CAAAA,CAAc,GAAA,CACd,YAAA,CAAAC,CAAAA,CAAeC,mBACjB,CAAA,CAa6C,CAE3C,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BH,CAAcJ,CAAI,CAAA,CACvDQ,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBL,CAAcJ,CAAAA,CAAMC,CAAU,CAAA,CAE3ES,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,0DAAA,EAA6DT,CAAAA,CAAe,IAAA,CAC1E,GACF,CAAC,CAAA,CAAA;ACuDP,gBAAA","file":"/home/runner/work/cli/cli/dist/chunk-6GWHYOPM.cjs","sourcesContent":[null,"import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { map } from 'bluebird';\nimport colors from 'colors';\nimport { groupBy, uniq } from 'lodash-es';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { writeCsv } from '../helpers/writeCsv';\nimport {\n PrivacyRequest,\n RequestEnricher,\n RequestIdentifier,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllRequestEnrichers,\n fetchAllRequestIdentifiers,\n fetchAllRequests,\n} from '../graphql';\nimport { logger } from '../../logger';\n\nexport interface PrivacyRequestWithIdentifiers extends PrivacyRequest {\n /** Request Enrichers */\n requestEnrichers: RequestEnricher[];\n /** Request Identifiers */\n requestIdentifiers: RequestIdentifier[];\n}\n\n/**\n * Pull the set of manual enrichment jobs to CSV\n *\n * @param options - Options\n * @returns List of requests with identifiers\n */\nexport async function pullManualEnrichmentIdentifiersToCsv({\n file,\n auth,\n sombraAuth,\n requestActions = [],\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** The request actions to fetch */\n requestActions?: RequestAction[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<PrivacyRequestWithIdentifiers[]> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n logger.info(\n colors.magenta(\n `Pulling manual enrichment requests, filtered for actions: ${requestActions.join(\n ',',\n )}`,\n ),\n );\n\n // Pull all privacy requests\n const allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n statuses: [RequestStatus.Enriching],\n });\n\n // Requests to save\n const savedRequests: PrivacyRequestWithIdentifiers[] = [];\n\n // Filter down requests to what is needed\n await map(\n allRequests,\n async (request) => {\n // Fetch enrichers\n const requestEnrichers = await fetchAllRequestEnrichers(client, {\n requestId: request.id,\n });\n\n // Check if manual enrichment exists for that request\n const hasManualEnrichment = requestEnrichers.filter(\n ({ status }) => status === 'ACTION_REQUIRED',\n );\n\n // Save request to queue\n if (hasManualEnrichment) {\n const requestIdentifiers = await fetchAllRequestIdentifiers(\n client,\n sombra,\n {\n requestId: request.id,\n },\n );\n savedRequests.push({\n ...request,\n requestIdentifiers,\n requestEnrichers,\n });\n }\n },\n {\n concurrency,\n },\n );\n\n const data = savedRequests.map(\n ({\n attributeValues,\n requestIdentifiers,\n requestEnrichers, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...request\n }) => ({\n ...request,\n // flatten identifiers\n ...Object.entries(groupBy(requestIdentifiers, 'name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ value }) => value).join(','),\n }),\n {},\n ),\n // flatten attributes\n ...Object.entries(groupBy(attributeValues, 'attributeKey.name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ name }) => name).join(','),\n }),\n {},\n ),\n }),\n );\n\n // Write out to CSV\n const headers = uniq(data.map((d) => Object.keys(d)).flat());\n await writeCsv(file, data, headers);\n\n logger.info(\n colors.green(\n `Successfully wrote ${savedRequests.length} requests to file \"${file}\"`,\n ),\n );\n\n return savedRequests;\n}\n","import colors from 'colors';\nimport { map } from 'bluebird';\nimport { logger } from '../../logger';\nimport {\n UPDATE_PRIVACY_REQUEST,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n makeGraphQLRequest,\n} from '../graphql';\nimport {\n enrichPrivacyRequest,\n EnrichPrivacyRequest,\n} from './enrichPrivacyRequest';\nimport { readCsv } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Push a CSV of enriched requests back into Transcend\n *\n * @param options - Options\n * @returns Number of items processed\n */\nexport async function pushManualEnrichmentIdentifiersFromCsv({\n file,\n auth,\n sombraAuth,\n enricherId,\n markSilent,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** ID of enricher being uploaded to */\n enricherId: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Mark requests in silent mode before enriching */\n markSilent?: boolean;\n}): Promise<number> {\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, EnrichPrivacyRequest);\n\n // Notify Transcend\n logger.info(\n colors.magenta(`Enriching \"${activeResults.length}\" privacy requests.`),\n );\n\n let successCount = 0;\n let skippedCount = 0;\n let errorCount = 0;\n\n await map(\n activeResults,\n async (request, index) => {\n try {\n // Mark requests in silent mode before a certain date\n if (markSilent) {\n await makeGraphQLRequest(client, UPDATE_PRIVACY_REQUEST, {\n input: {\n id: request.id,\n isSilent: true,\n },\n });\n\n logger.info(\n colors.magenta(`Mark request as silent mode - ${request.id}`),\n );\n }\n\n const result = await enrichPrivacyRequest(\n sombra,\n request,\n enricherId,\n index,\n );\n if (result) {\n successCount += 1;\n } else {\n skippedCount += 1;\n }\n } catch (err) {\n errorCount += 1;\n }\n },\n { concurrency },\n );\n\n logger.info(\n colors.green(\n `Successfully notified Transcend! \\n Success count: ${successCount}.`,\n ),\n );\n\n if (skippedCount > 0) {\n logger.info(colors.magenta(`Skipped count: ${skippedCount}.`));\n }\n\n if (errorCount > 0) {\n logger.info(colors.red(`Error Count: ${errorCount}.`));\n throw new Error(`Failed to enrich: ${errorCount} requests.`);\n }\n\n return activeResults.length;\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-BL2UJW5C.cjs","../src/lib/manual-enrichment/pullManualEnrichmentIdentifiersToCsv.ts","../src/lib/manual-enrichment/pushManualEnrichmentIdentifiersFromCsv.ts"],"names":["pullManualEnrichmentIdentifiersToCsv","file","auth","sombraAuth","requestActions","concurrency","transcendUrl","DEFAULT_TRANSCEND_API","client","buildTranscendGraphQLClient","sombra","createSombraGotInstance","logger","colors"],"mappings":"AAAA,mfAAgH,wDAAyC,wDAAuD,2DCAnK,oCACzB,gFACD,MA6BnB,SAAsBA,EAAAA,CAAqC,CACzD,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CAAiB,CAAC,CAAA,CAClB,WAAA,CAAAC,CAAAA,CAAc,GAAA,CACd,YAAA,CAAAC,CAAAA,CAAeC,mBACjB,CAAA,CAa6C,CAE3C,IAAMC,CAAAA,CAASC,kCAAAA,CAA4BH,CAAcJ,CAAI,CAAA,CACvDQ,CAAAA,CAAS,MAAMC,kCAAAA,CAAwBL,CAAcJ,CAAAA,CAAMC,CAAU,CAAA,CAE3ES,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,OAAA,CACL,CAAA,0DAAA,EAA6DT,CAAAA,CAAe,IAAA,CAC1E,GACF,CAAC,CAAA,CAAA;ACuDP,gBAAA","file":"/home/runner/work/cli/cli/dist/chunk-BL2UJW5C.cjs","sourcesContent":[null,"import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { map } from 'bluebird';\nimport colors from 'colors';\nimport { groupBy, uniq } from 'lodash-es';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport { writeCsv } from '../helpers/writeCsv';\nimport {\n PrivacyRequest,\n RequestEnricher,\n RequestIdentifier,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllRequestEnrichers,\n fetchAllRequestIdentifiers,\n fetchAllRequests,\n} from '../graphql';\nimport { logger } from '../../logger';\n\nexport interface PrivacyRequestWithIdentifiers extends PrivacyRequest {\n /** Request Enrichers */\n requestEnrichers: RequestEnricher[];\n /** Request Identifiers */\n requestIdentifiers: RequestIdentifier[];\n}\n\n/**\n * Pull the set of manual enrichment jobs to CSV\n *\n * @param options - Options\n * @returns List of requests with identifiers\n */\nexport async function pullManualEnrichmentIdentifiersToCsv({\n file,\n auth,\n sombraAuth,\n requestActions = [],\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** Sombra API key */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** The request actions to fetch */\n requestActions?: RequestAction[];\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<PrivacyRequestWithIdentifiers[]> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n logger.info(\n colors.magenta(\n `Pulling manual enrichment requests, filtered for actions: ${requestActions.join(\n ',',\n )}`,\n ),\n );\n\n // Pull all privacy requests\n const allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n statuses: [RequestStatus.Enriching],\n });\n\n // Requests to save\n const savedRequests: PrivacyRequestWithIdentifiers[] = [];\n\n // Filter down requests to what is needed\n await map(\n allRequests,\n async (request) => {\n // Fetch enrichers\n const requestEnrichers = await fetchAllRequestEnrichers(client, {\n requestId: request.id,\n });\n\n // Check if manual enrichment exists for that request\n const hasManualEnrichment = requestEnrichers.filter(\n ({ status }) => status === 'ACTION_REQUIRED',\n );\n\n // Save request to queue\n if (hasManualEnrichment) {\n const requestIdentifiers = await fetchAllRequestIdentifiers(\n client,\n sombra,\n {\n requestId: request.id,\n },\n );\n savedRequests.push({\n ...request,\n requestIdentifiers,\n requestEnrichers,\n });\n }\n },\n {\n concurrency,\n },\n );\n\n const data = savedRequests.map(\n ({\n attributeValues,\n requestIdentifiers,\n requestEnrichers, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...request\n }) => ({\n ...request,\n // flatten identifiers\n ...Object.entries(groupBy(requestIdentifiers, 'name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ value }) => value).join(','),\n }),\n {},\n ),\n // flatten attributes\n ...Object.entries(groupBy(attributeValues, 'attributeKey.name')).reduce(\n (acc, [key, values]) =>\n Object.assign(acc, {\n [key]: values.map(({ name }) => name).join(','),\n }),\n {},\n ),\n }),\n );\n\n // Write out to CSV\n const headers = uniq(data.map((d) => Object.keys(d)).flat());\n await writeCsv(file, data, headers);\n\n logger.info(\n colors.green(\n `Successfully wrote ${savedRequests.length} requests to file \"${file}\"`,\n ),\n );\n\n return savedRequests;\n}\n","import colors from 'colors';\nimport { map } from 'bluebird';\nimport { logger } from '../../logger';\nimport {\n UPDATE_PRIVACY_REQUEST,\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n makeGraphQLRequest,\n} from '../graphql';\nimport {\n enrichPrivacyRequest,\n EnrichPrivacyRequest,\n} from './enrichPrivacyRequest';\nimport { readCsv } from '../requests';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\n\n/**\n * Push a CSV of enriched requests back into Transcend\n *\n * @param options - Options\n * @returns Number of items processed\n */\nexport async function pushManualEnrichmentIdentifiersFromCsv({\n file,\n auth,\n sombraAuth,\n enricherId,\n markSilent,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** CSV file path */\n file: string;\n /** Transcend API key authentication */\n auth: string;\n /** ID of enricher being uploaded to */\n enricherId: string;\n /** Sombra API key authentication */\n sombraAuth?: string;\n /** Concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n /** Mark requests in silent mode before enriching */\n markSilent?: boolean;\n}): Promise<number> {\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Read from CSV\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, EnrichPrivacyRequest);\n\n // Notify Transcend\n logger.info(\n colors.magenta(`Enriching \"${activeResults.length}\" privacy requests.`),\n );\n\n let successCount = 0;\n let skippedCount = 0;\n let errorCount = 0;\n\n await map(\n activeResults,\n async (request, index) => {\n try {\n // Mark requests in silent mode before a certain date\n if (markSilent) {\n await makeGraphQLRequest(client, UPDATE_PRIVACY_REQUEST, {\n input: {\n id: request.id,\n isSilent: true,\n },\n });\n\n logger.info(\n colors.magenta(`Mark request as silent mode - ${request.id}`),\n );\n }\n\n const result = await enrichPrivacyRequest(\n sombra,\n request,\n enricherId,\n index,\n );\n if (result) {\n successCount += 1;\n } else {\n skippedCount += 1;\n }\n } catch (err) {\n errorCount += 1;\n }\n },\n { concurrency },\n );\n\n logger.info(\n colors.green(\n `Successfully notified Transcend! \\n Success count: ${successCount}.`,\n ),\n );\n\n if (skippedCount > 0) {\n logger.info(colors.magenta(`Skipped count: ${skippedCount}.`));\n }\n\n if (errorCount > 0) {\n logger.info(colors.red(`Error Count: ${errorCount}.`));\n throw new Error(`Failed to enrich: ${errorCount} requests.`);\n }\n\n return activeResults.length;\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkFE6CECEScjs = require('./chunk-FE6CECES.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkUBVZKE7Vcjs = require('./chunk-UBVZKE7V.cjs');var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var P = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(r,{dataSiloId:s,limit:c=100,offset:n=0,requestType:a}){try{let i=await r.get(`v1/data-silo/${s}/pending-requests/${a}`,{searchParams:{offset:n,limit:c}}).json(),{items:f}=_typeutils.decodeCodec.call(void 0, e.type({items:e.array(X)}),i);return f}catch(i){throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([i, 'optionalAccess', _4 => _4.message])}`)}}var L=P.type({nonce:P.string,identifier:P.string});async function B(r,{nonce:s,identifier:c}){try{return await r.put("v1/data-silo",{headers:{"x-transcend-nonce":s},json:{profiles:[{profileId:c}]}}),!0}catch(n){if(_optionalChain([n, 'access', _5 => _5.response, 'optionalAccess', _6 => _6.statusCode])===409)return!1;throw new Error(`Received an error from server: ${_optionalChain([n, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([n, 'optionalAccess', _9 => _9.message])}`)}}var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function ge({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=_chunkUBVZKE7Vcjs.r,sleepSeconds:f=10}){let y=await _chunkFE6CECEScjs.xc.call(void 0, i,c,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${r}" from disk`));let o=_chunkFE6CECEScjs.rc.call(void 0, r,L);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${o.length}" identifiers as completed.`));let C=new Date().getTime(),w=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0,u=0,l=0;w.start(o.length,0);let m=_chunkUBVZKE7Vcjs.b.call(void 0, o,a),I=m.length;await _bluebird.mapSeries.call(void 0, m,async($,S)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processing chunk ${S+1}/${I} (${_chunkUBVZKE7Vcjs.b.length} items)`)),await _bluebird.map.call(void 0, $,async h=>{try{await B(y,h)?d+=1:u+=1}catch(b){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error notifying Transcend for identifier "${h.identifier}" - ${_optionalChain([b, 'optionalAccess', _10 => _10.message])}`)),l+=1}w.update(d+u)}),f>0&&S<I-1&&(_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Sleeping for ${f}s before next chunk...`)),await new Promise(h=>{setTimeout(h,f*1e3)}))}),w.stop();let D=new Date().getTime()-C;if(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend for ${d} identifiers in "${D/1e3}" seconds!`)),u&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`There were ${u} identifiers that were not in a state to be updated.They likely have already been resolved.`)),l)throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`There were ${l} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return o.length}var _privacytypes = require('@transcend-io/privacy-types');async function Pe({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=_privacytypes.RequestDataSiloStatus.Resolved,transcendUrl:i=_chunkUBVZKE7Vcjs.r}){let f=_chunkFE6CECEScjs.wc.call(void 0, i,c),y=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${r.length}" requests as completed.`));let C=0;o.start(r.length,0),await _bluebird.map.call(void 0, r,async u=>{let l=await _chunkFE6CECEScjs.Gd.call(void 0, f,{requestId:u,dataSiloId:s});try{await _chunkFE6CECEScjs.rg.call(void 0, f,_chunkFE6CECEScjs.va,{requestDataSiloId:l.id,status:a})}catch(m){if(!m.message.includes("Client error: Request must be active:")&&!m.message.includes("Failed to find RequestDataSilo"))throw m}C+=1,o.update(C)},{concurrency:n}),o.stop();let d=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${d/1e3}" seconds!`)),r.length}async function _e({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=_chunkUBVZKE7Vcjs.r,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await _chunkFE6CECEScjs.xc.call(void 0, y,s,c),w=_chunkFE6CECEScjs.wc.call(void 0, y,s),d=0;o||(d=await _chunkFE6CECEScjs.Hd.call(void 0, w,{dataSiloId:r})),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling ${o?"all":d} outstanding request identifiers for data silo: "${r}" for requests of types "${n.join('", "')}"`));let u=new Date().getTime(),l=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=new Set,I=[],g=[];o||l.start(d,0),await _bluebird.mapSeries.call(void 0, n,async $=>{let S=0,h=!0;for(;h;){let b=await U(C,{dataSiloId:r,limit:a,offset:S,requestType:$}),k=b.map(A=>(m.add(A.requestId),{...A,action:$})),J=k.map(({attributes:A,...K})=>({...K,...A.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));I.push(...k),g.push(...J),g.length>=i&&(await f(g),g=[]),h=b.length===a,S+=a,o?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${b.length} outstanding identifiers for ${m.size} requests`)):l.update(m.size)}}),g.length>0&&await f(g),o||l.stop();let D=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${D/1e3}" seconds!`)),{identifiers:I}}exports.a = X; exports.b = U; exports.c = L; exports.d = B; exports.e = ge; exports.f = Pe; exports.g = _e;
2
- //# sourceMappingURL=chunk-BLSMEA5C.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkOPHHRNLHcjs = require('./chunk-OPHHRNLH.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');var _chunkTHCW2SNWcjs = require('./chunk-THCW2SNW.cjs');var _iots = require('io-ts'); var e = _interopRequireWildcard(_iots); var P = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var X=e.type({identifier:e.string,type:e.string,coreIdentifier:e.string,dataSiloId:e.string,requestId:e.string,nonce:e.string,requestCreatedAt:e.string,daysUntilOverdue:e.number,attributes:e.array(e.type({key:e.string,values:e.array(e.string)}))});async function U(r,{dataSiloId:s,limit:c=100,offset:n=0,requestType:a}){try{let i=await r.get(`v1/data-silo/${s}/pending-requests/${a}`,{searchParams:{offset:n,limit:c}}).json(),{items:f}=_typeutils.decodeCodec.call(void 0, e.type({items:e.array(X)}),i);return f}catch(i){throw new Error(`Received an error from server: ${_optionalChain([i, 'optionalAccess', _2 => _2.response, 'optionalAccess', _3 => _3.body])||_optionalChain([i, 'optionalAccess', _4 => _4.message])}`)}}var L=P.type({nonce:P.string,identifier:P.string});async function B(r,{nonce:s,identifier:c}){try{return await r.put("v1/data-silo",{headers:{"x-transcend-nonce":s},json:{profiles:[{profileId:c}]}}),!0}catch(n){if(_optionalChain([n, 'access', _5 => _5.response, 'optionalAccess', _6 => _6.statusCode])===409)return!1;throw new Error(`Received an error from server: ${_optionalChain([n, 'optionalAccess', _7 => _7.response, 'optionalAccess', _8 => _8.body])||_optionalChain([n, 'optionalAccess', _9 => _9.message])}`)}}var _bluebird = require('bluebird');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _cliprogress = require('cli-progress'); var _cliprogress2 = _interopRequireDefault(_cliprogress);async function ge({file:r,dataSiloId:s,auth:c,sombraAuth:n,concurrency:a=100,transcendUrl:i=_chunkTHCW2SNWcjs.r,sleepSeconds:f=10}){let y=await _chunkOPHHRNLHcjs.xc.call(void 0, i,c,n);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Reading "${r}" from disk`));let o=_chunkOPHHRNLHcjs.rc.call(void 0, r,L);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${o.length}" identifiers as completed.`));let C=new Date().getTime(),w=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),d=0,u=0,l=0;w.start(o.length,0);let m=_chunkTHCW2SNWcjs.b.call(void 0, o,a),I=m.length;await _bluebird.mapSeries.call(void 0, m,async($,S)=>{_chunkZUNVPK23cjs.a.info(_colors2.default.blue(`Processing chunk ${S+1}/${I} (${_chunkTHCW2SNWcjs.b.length} items)`)),await _bluebird.map.call(void 0, $,async h=>{try{await B(y,h)?d+=1:u+=1}catch(b){_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Error notifying Transcend for identifier "${h.identifier}" - ${_optionalChain([b, 'optionalAccess', _10 => _10.message])}`)),l+=1}w.update(d+u)}),f>0&&S<I-1&&(_chunkZUNVPK23cjs.a.info(_colors2.default.yellow(`Sleeping for ${f}s before next chunk...`)),await new Promise(h=>{setTimeout(h,f*1e3)}))}),w.stop();let D=new Date().getTime()-C;if(_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend for ${d} identifiers in "${D/1e3}" seconds!`)),u&&_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`There were ${u} identifiers that were not in a state to be updated.They likely have already been resolved.`)),l)throw _chunkZUNVPK23cjs.a.error(_colors2.default.red(`There were ${l} identifiers that failed to be updated. Please review the logs for more information.`)),new Error("Failed to update all identifiers");return o.length}var _privacytypes = require('@transcend-io/privacy-types');async function Pe({requestIds:r,dataSiloId:s,auth:c,concurrency:n=100,status:a=_privacytypes.RequestDataSiloStatus.Resolved,transcendUrl:i=_chunkTHCW2SNWcjs.r}){let f=_chunkOPHHRNLHcjs.wc.call(void 0, i,c),y=new Date().getTime(),o=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic);_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Notifying Transcend for data silo "${s}" marking "${r.length}" requests as completed.`));let C=0;o.start(r.length,0),await _bluebird.map.call(void 0, r,async u=>{let l=await _chunkOPHHRNLHcjs.Gd.call(void 0, f,{requestId:u,dataSiloId:s});try{await _chunkOPHHRNLHcjs.sg.call(void 0, f,_chunkOPHHRNLHcjs.va,{requestDataSiloId:l.id,status:a})}catch(m){if(!m.message.includes("Client error: Request must be active:")&&!m.message.includes("Failed to find RequestDataSilo"))throw m}C+=1,o.update(C)},{concurrency:n}),o.stop();let d=new Date().getTime()-y;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully notified Transcend in "${d/1e3}" seconds!`)),r.length}async function _e({dataSiloId:r,auth:s,sombraAuth:c,actions:n,apiPageSize:a=100,savePageSize:i=1e3,onSave:f,transcendUrl:y=_chunkTHCW2SNWcjs.r,skipRequestCount:o=!1}){if(i%a!==0)throw new Error(`savePageSize must be a multiple of apiPageSize. savePageSize: ${i}, apiPageSize: ${a}`);let C=await _chunkOPHHRNLHcjs.xc.call(void 0, y,s,c),w=_chunkOPHHRNLHcjs.wc.call(void 0, y,s),d=0;o||(d=await _chunkOPHHRNLHcjs.Hd.call(void 0, w,{dataSiloId:r})),_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulling ${o?"all":d} outstanding request identifiers for data silo: "${r}" for requests of types "${n.join('", "')}"`));let u=new Date().getTime(),l=new _cliprogress2.default.SingleBar({},_cliprogress2.default.Presets.shades_classic),m=new Set,I=[],g=[];o||l.start(d,0),await _bluebird.mapSeries.call(void 0, n,async $=>{let S=0,h=!0;for(;h;){let b=await U(C,{dataSiloId:r,limit:a,offset:S,requestType:$}),k=b.map(A=>(m.add(A.requestId),{...A,action:$})),J=k.map(({attributes:A,...K})=>({...K,...A.reduce((M,E)=>Object.assign(M,{[E.key]:E.values.join(",")}),{})}));I.push(...k),g.push(...J),g.length>=i&&(await f(g),g=[]),h=b.length===a,S+=a,o?_chunkZUNVPK23cjs.a.info(_colors2.default.magenta(`Pulled ${b.length} outstanding identifiers for ${m.size} requests`)):l.update(m.size)}}),g.length>0&&await f(g),o||l.stop();let D=new Date().getTime()-u;return _chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully pulled ${I.length} outstanding identifiers from ${m.size} requests in "${D/1e3}" seconds!`)),{identifiers:I}}exports.a = X; exports.b = U; exports.c = L; exports.d = B; exports.e = ge; exports.f = Pe; exports.g = _e;
2
+ //# sourceMappingURL=chunk-DZ5KTF7W.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-BLSMEA5C.cjs","../src/lib/cron/pullCronPageOfIdentifiers.ts"],"names":["CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response"],"mappings":"AAAA,u/BAAyF,wDAAyC,wDAAgD,6GCA/J,qDACS,IAIfA,CAAAA,CAAmB,CAAA,CAAA,IAAA,CAAK,CAEnC,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,cAAA,CAAkB,CAAA,CAAA,MAAA,CAElB,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,SAAA,CAAa,CAAA,CAAA,MAAA,CAEb,KAAA,CAAS,CAAA,CAAA,MAAA,CAET,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,UAAA,CAAc,CAAA,CAAA,KAAA,CACV,CAAA,CAAA,IAAA,CAAK,CACL,GAAA,CAAO,CAAA,CAAA,MAAA,CACP,MAAA,CAAU,CAAA,CAAA,KAAA,CAAQ,CAAA,CAAA,MAAM,CAC1B,CAAC,CACH,CACF,CAAC,CAAA,CAaD,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,GAAA,CACR,MAAA,CAAAC,CAAAA,CAAS,CAAA,CACT,WAAA,CAAAC,CACF,CAAA,CAU2B,CAC3B,GAAI,CAEF,IAAMC,CAAAA,CAAW,MAAML,CAAAA,CACpB,GAAA,CAAI,CAAA,aAAA,EAAgBC,CAAU,CAAA,kBAAA,EAAqBG,CAAW,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-BLSMEA5C.cjs","sourcesContent":[null,"import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\n\nexport const CronIdentifier = t.type({\n /** The identifier value */\n identifier: t.string,\n /** The type of identifier */\n type: t.string,\n /** The core identifier of the request */\n coreIdentifier: t.string,\n /** The ID of the underlying data silo */\n dataSiloId: t.string,\n /** The ID of the underlying request */\n requestId: t.string,\n /** The request nonce */\n nonce: t.string,\n /** The time the request was created */\n requestCreatedAt: t.string,\n /** The number of days until the request is overdue */\n daysUntilOverdue: t.number,\n /** Request attributes */\n attributes: t.array(\n t.type({\n key: t.string,\n values: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type CronIdentifier = t.TypeOf<typeof CronIdentifier>;\n\n/**\n * Pull a offset of identifiers for a cron job\n *\n * @see https://docs.transcend.io/docs/api-reference/GET/v1/data-silo/(id)/pending-requests/(type)\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns Successfully submitted request\n */\nexport async function pullCronPageOfIdentifiers(\n sombra: Got,\n {\n dataSiloId,\n limit = 100,\n offset = 0,\n requestType,\n }: {\n /** Data Silo ID */\n dataSiloId: string;\n /** Type of request */\n requestType: RequestAction;\n /** Number of identifiers to pull in */\n limit?: number;\n /** Page to pull in */\n offset?: number;\n },\n): Promise<CronIdentifier[]> {\n try {\n // Make the GraphQL request\n const response = await sombra\n .get(`v1/data-silo/${dataSiloId}/pending-requests/${requestType}`, {\n searchParams: {\n offset,\n limit,\n },\n })\n .json();\n\n const { items } = decodeCodec(\n t.type({\n items: t.array(CronIdentifier),\n }),\n response,\n );\n return items;\n } catch (err) {\n throw new Error(\n `Received an error from server: ${err?.response?.body || err?.message}`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/chunk-DZ5KTF7W.cjs","../src/lib/cron/pullCronPageOfIdentifiers.ts"],"names":["CronIdentifier","pullCronPageOfIdentifiers","sombra","dataSiloId","limit","offset","requestType","response"],"mappings":"AAAA,u/BAAyF,wDAAyC,wDAAgD,6GCA/J,qDACS,IAIfA,CAAAA,CAAmB,CAAA,CAAA,IAAA,CAAK,CAEnC,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,IAAA,CAAQ,CAAA,CAAA,MAAA,CAER,cAAA,CAAkB,CAAA,CAAA,MAAA,CAElB,UAAA,CAAc,CAAA,CAAA,MAAA,CAEd,SAAA,CAAa,CAAA,CAAA,MAAA,CAEb,KAAA,CAAS,CAAA,CAAA,MAAA,CAET,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,gBAAA,CAAoB,CAAA,CAAA,MAAA,CAEpB,UAAA,CAAc,CAAA,CAAA,KAAA,CACV,CAAA,CAAA,IAAA,CAAK,CACL,GAAA,CAAO,CAAA,CAAA,MAAA,CACP,MAAA,CAAU,CAAA,CAAA,KAAA,CAAQ,CAAA,CAAA,MAAM,CAC1B,CAAC,CACH,CACF,CAAC,CAAA,CAaD,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CACA,CACE,UAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,GAAA,CACR,MAAA,CAAAC,CAAAA,CAAS,CAAA,CACT,WAAA,CAAAC,CACF,CAAA,CAU2B,CAC3B,GAAI,CAEF,IAAMC,CAAAA,CAAW,MAAML,CAAAA,CACpB,GAAA,CAAI,CAAA,aAAA,EAAgBC,CAAU,CAAA,kBAAA,EAAqBG,CAAW,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/chunk-DZ5KTF7W.cjs","sourcesContent":[null,"import * as t from 'io-ts';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport type { Got } from 'got';\n\nexport const CronIdentifier = t.type({\n /** The identifier value */\n identifier: t.string,\n /** The type of identifier */\n type: t.string,\n /** The core identifier of the request */\n coreIdentifier: t.string,\n /** The ID of the underlying data silo */\n dataSiloId: t.string,\n /** The ID of the underlying request */\n requestId: t.string,\n /** The request nonce */\n nonce: t.string,\n /** The time the request was created */\n requestCreatedAt: t.string,\n /** The number of days until the request is overdue */\n daysUntilOverdue: t.number,\n /** Request attributes */\n attributes: t.array(\n t.type({\n key: t.string,\n values: t.array(t.string),\n }),\n ),\n});\n\n/** Type override */\nexport type CronIdentifier = t.TypeOf<typeof CronIdentifier>;\n\n/**\n * Pull a offset of identifiers for a cron job\n *\n * @see https://docs.transcend.io/docs/api-reference/GET/v1/data-silo/(id)/pending-requests/(type)\n * @param sombra - Sombra instance configured to make requests\n * @param options - Additional options\n * @returns Successfully submitted request\n */\nexport async function pullCronPageOfIdentifiers(\n sombra: Got,\n {\n dataSiloId,\n limit = 100,\n offset = 0,\n requestType,\n }: {\n /** Data Silo ID */\n dataSiloId: string;\n /** Type of request */\n requestType: RequestAction;\n /** Number of identifiers to pull in */\n limit?: number;\n /** Page to pull in */\n offset?: number;\n },\n): Promise<CronIdentifier[]> {\n try {\n // Make the GraphQL request\n const response = await sombra\n .get(`v1/data-silo/${dataSiloId}/pending-requests/${requestType}`, {\n searchParams: {\n offset,\n limit,\n },\n })\n .json();\n\n const { items } = decodeCodec(\n t.type({\n items: t.array(CronIdentifier),\n }),\n response,\n );\n return items;\n } catch (err) {\n throw new Error(\n `Received an error from server: ${err?.response?.body || err?.message}`,\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var _privacytypes = require('@transcend-io/privacy-types');var _airgapjstypes = require('@transcend-io/airgap.js-types');var _internationalization = require('@transcend-io/internationalization');var Tt=t.type({title:t.string}),C= exports.b =t.intersection([t.type({name:t.string,value:t.string}),t.partial({isSecret:t.boolean})]),Pt= exports.c =t.type({title:t.string}),At= exports.d =t.intersection([t.type({name:t.string,description:t.string}),t.partial({"sso-department":t.string,"sso-group":t.string,"sso-title":t.string,users:t.array(t.string),scopes:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.ScopeName))})]),Ot= exports.e =t.intersection([t.type({title:t.string,"output-identifiers":t.array(t.string)}),t.partial({description:t.string,url:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.EnricherType),"input-identifier":t.string,testRegex:t.string,lookerQueryTitle:t.string,expirationDuration:t.number,transitionRequestStatus:_typeutils.valuesOf.call(void 0, _privacytypes.PreflightRequestStatus),phoneNumbers:t.array(t.string),regionList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode})),"data-subjects":t.array(t.string),headers:t.array(C),"privacy-actions":t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction))})]),v= exports.f =t.intersection([t.type({purpose:_typeutils.valuesOf.call(void 0, _privacytypes.ProcessingPurpose)}),t.partial({name:t.string})]),p= exports.g =t.intersection([t.type({category:_typeutils.valuesOf.call(void 0, _privacytypes.DataCategoryType)}),t.partial({name:t.string})]),Ct= exports.h =t.intersection([t.type({category:p,status:_typeutils.valuesOf.call(void 0, _privacytypes.SubDataPointDataSubCategoryGuessStatus),confidence:t.number}),t.partial({classifierVersion:t.number})]),Ce= exports.i =t.intersection([t.type({category:p,status:_typeutils.valuesOf.call(void 0, _privacytypes.UnstructuredSubDataPointRecommendationStatus),confidence:t.number}),t.partial({classifierVersion:t.number})]),vt= exports.j =t.intersection([t.type({name:t.string}),t.partial({description:t.string,color:t.string})]),St= exports.k =t.intersection([t.type({name:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AttributeKeyType)}),t.partial({description:t.string,resources:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.AttributeSupportedResourceType)),values:t.array(vt)})]),r= exports.l =t.type({key:t.string,values:t.array(t.string)}),kt= exports.m =t.intersection([t.type({name:t.string,instructions:t.string,agentId:t.string,codeInterpreterEnabled:t.boolean,retrievalEnabled:t.boolean,"large-language-model":t.type({name:t.string,client:_typeutils.valuesOf.call(void 0, _privacytypes.LargeLanguageModelClient)})}),t.partial({description:t.string,prompt:t.string,owners:t.array(t.string),teams:t.array(t.string),"agent-functions":t.array(t.string),"agent-files":t.array(t.string)})]),Rt= exports.n =t.type({name:t.string,description:t.string,parameters:t.string}),wt= exports.o =t.intersection([t.type({name:t.string,fileId:t.string,size:t.number,purpose:_typeutils.valuesOf.call(void 0, _privacytypes.PromptFilePurpose)}),t.partial({description:t.string})]),ht= exports.p =t.intersection([t.type({title:t.string}),t.partial({description:t.string,dataProcessingAgreementLink:t.string,contactName:t.string,contactPhone:t.string,address:t.string,headquarterCountry:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),headquarterSubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),websiteUrl:t.string,businessEntity:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Dt= exports.q =t.intersection([t.type({name:t.string,category:_typeutils.valuesOf.call(void 0, _privacytypes.DataCategoryType)}),t.partial({description:t.string,regex:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Et= exports.r =t.intersection([t.type({name:t.string,purpose:_typeutils.valuesOf.call(void 0, _privacytypes.ProcessingPurpose)}),t.partial({description:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Nt= exports.s =t.type({title:t.string,content:t.string}),Mt= exports.t =t.type({title:t.string,content:t.string}),Lt= exports.u =t.type({title:t.string,description:t.string,prompts:t.array(t.string)}),qt= exports.v =t.intersection([t.type({key:t.string}),t.partial({title:t.string,description:t.union([t.string,t.null]),purposes:t.array(v),categories:t.array(p),"guessed-categories":t.array(Ct),"access-request-visibility-enabled":t.boolean,"erasure-request-redaction-enabled":t.boolean,attributes:t.array(r)})]),Ft= exports.w =t.intersection([t.type({key:t.string}),t.partial({path:t.array(t.string),title:t.string,description:t.string,"data-collection-tag":t.string,"privacy-action-queries":t.partial(_typeutils.applyEnum.call(void 0, _privacytypes.RequestActionObjectResolver,()=>t.string)),"privacy-actions":t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestActionObjectResolver)),fields:t.array(qt),owners:t.array(t.string),teams:t.array(t.string)})]),Vt= exports.x =t.partial({"notify-email-address":t.string,"send-frequency":t.number,"send-type":_typeutils.valuesOf.call(void 0, _privacytypes.PromptAVendorEmailSendType),"include-identifiers-attachment":t.boolean,"completion-link-type":_typeutils.valuesOf.call(void 0, _privacytypes.PromptAVendorEmailCompletionLinkType),"manual-work-retry-frequency":t.string}),Kt= exports.y =t.intersection([t.type({title:t.string}),t.partial({description:t.string,address:t.string,headquarterCountry:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),headquarterSubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),dataProtectionOfficerName:t.string,dataProtectionOfficerEmail:t.string,attributes:t.array(r),owners:t.array(t.string),teams:t.array(t.string)})]),u= exports.z =t.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)}),jt= exports.A =t.intersection([t.type({title:t.string}),t.partial({description:t.string,securityMeasureDetails:t.string,controllerships:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.Controllership)),storageRegions:t.array(u),transferRegions:t.array(u),retentionType:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionType),retentionPeriod:t.number,dataProtectionImpactAssessmentLink:t.string,dataProtectionImpactAssessmentStatus:_typeutils.valuesOf.call(void 0, _privacytypes.DataProtectionImpactAssessmentStatus),attributes:t.array(r),dataSiloTitles:t.array(t.string),dataSubjectTypes:t.array(t.string),teamNames:t.array(t.string),ownerEmails:t.array(t.string),processingSubPurposes:t.array(v),dataSubCategories:t.array(p),saaSCategories:t.array(t.string)})]),ve= exports.B =t.intersection([t.type({name:t.string,codePackageType:_typeutils.valuesOf.call(void 0, _privacytypes.CodePackageType)}),t.partial({description:t.string,repositoryUrl:t.string,catalogIntegrationName:t.string,documentationLinks:t.array(t.string),ownerEmails:t.array(t.string),teamNames:t.array(t.string)})]),Bt= exports.C =t.intersection([t.type({name:t.string}),t.partial({version:t.string,isDevDependency:t.boolean})]),Se= exports.D =t.intersection([t.type({name:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.CodePackageType),relativePath:t.string,repositoryName:t.string}),t.partial({description:t.string,softwareDevelopmentKits:t.array(Bt),teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),ke= exports.E =t.intersection([t.type({name:t.string,url:t.string}),t.partial({description:t.string,teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),Gt= exports.F =t.intersection([t.type({type:t.string}),t.partial({active:t.boolean,title:t.string,adminDashboardDefaultSilentMode:t.boolean,actions:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction))})]),Ut= exports.G =t.intersection([t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)}),t.partial({skipSecondaryIfNoFiles:t.boolean,skipDownloadableStep:t.boolean,requiresReview:t.boolean,waitingPeriod:t.number,regionDetectionMethod:_typeutils.valuesOf.call(void 0, _privacytypes.RegionDetectionMethod),regionList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode})),regionBlockList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode}))})]),Qt= exports.H =t.intersection([t.type({name:t.string,type:t.string}),t.partial({regex:t.string,selectOptions:t.array(t.string),privacyCenterVisibility:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),dataSubjects:t.array(t.string),isRequiredInForm:t.boolean,placeholder:t.string,displayTitle:t.string,displayDescription:t.string,displayOrder:t.number,isUniqueOnPreferenceStore:t.boolean})]),zt= exports.I =t.intersection([t.type({value:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope)}),t.partial({description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Ht= exports.J =t.intersection([t.type({name:t.string}),t.partial({isRegex:t.boolean,description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Wt= exports.K =t.intersection([t.type({name:t.string}),t.partial({displayName:t.string,regions:t.array(u),onConsentExpiry:_typeutils.valuesOf.call(void 0, _airgapjstypes.OnConsentExpiry),consentExpiry:t.number,operator:_typeutils.valuesOf.call(void 0, _privacytypes.RegionsOperator),displayPriority:t.number,viewState:_typeutils.valuesOf.call(void 0, _airgapjstypes.InitialViewState),purposes:t.array(t.type({trackingType:t.string})),optedOutPurposes:t.array(t.type({trackingType:t.string})),browserLanguages:t.array(_typeutils.valuesOf.call(void 0, _airgapjstypes.BrowserLanguage)),browserTimeZones:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.BrowserTimeZone))})]),Yt= exports.L =t.intersection([t.type({name:t.string}),t.partial({partition:t.string})]),Zt= exports.M =t.partial({version:t.string,bundleUrls:t.record(_typeutils.valuesOf.call(void 0, _privacytypes.ConsentBundleType),t.string),domains:t.array(t.string),partition:t.string,consentPrecedence:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentPrecedenceOption),unknownRequestPolicy:_typeutils.valuesOf.call(void 0, _privacytypes.UnknownRequestPolicy),unknownCookiePolicy:_typeutils.valuesOf.call(void 0, _privacytypes.UnknownRequestPolicy),syncEndpoint:t.string,telemetryPartitioning:_typeutils.valuesOf.call(void 0, _privacytypes.TelemetryPartitionStrategy),signedIabAgreement:_typeutils.valuesOf.call(void 0, _privacytypes.SignedIabAgreementOption),experiences:t.array(Wt),theme:t.partial({primaryColor:t.string,fontColor:t.string,privacyPolicy:t.string,prompt:t.number}),syncGroups:t.string}),Jt= exports.N =t.partial({isDisabled:t.boolean,showPrivacyRequestButton:t.boolean,showDataPractices:t.boolean,showPolicies:t.boolean,showTrackingTechnologies:t.boolean,showCookies:t.boolean,showDataFlows:t.boolean,showConsentManager:t.boolean,showManageYourPrivacy:t.boolean,showMarketingPreferences:t.boolean,locales:t.array(_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY)),defaultLocale:_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY),preferBrowserDefaultLocale:t.boolean,supportEmail:t.string,replyToEmail:t.string,useNoReplyEmailAddress:t.boolean,useCustomEmailDomain:t.boolean,transformAccessReportJsonToCsv:t.boolean,theme:t.partial({colors:t.partial(_typeutils.applyEnum.call(void 0, _privacytypes.ConfigurableColorPaletteColor,()=>t.string)),componentStyles:_privacytypes.PrivacyCenterComponentStyles,textStyles:_privacytypes.PrivacyCenterTextStyles})}),_t= exports.O =t.intersection([t.type({title:t.string}),t.partial({effectiveOn:t.string,disableEffectiveOn:t.boolean,content:t.string,disabledLocales:t.array(_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY))})]),Xt= exports.P =t.intersection([t.type({id:t.string}),t.partial({targetReactIntlId:t.string,defaultMessage:t.string,translations:t.partial(_typeutils.applyEnum.call(void 0, _internationalization.LOCALE_KEY,()=>t.string))})]),$t= exports.Q =t.intersection([t.type({title:t.string,integrationName:t.string}),t.partial({"outer-type":t.string,description:t.string,url:t.string,"api-key-title":t.string,headers:t.array(C),"data-subjects":t.array(t.string),"identity-keys":t.array(t.string),"deletion-dependencies":t.array(t.string),owners:t.array(t.string),teams:t.array(t.string),disabled:t.boolean,datapoints:t.array(Ft),"email-settings":Vt,country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:t.array(r),businessEntityTitles:t.array(t.string)})]),te= exports.R =t.intersection([t.type({title:t.string,productLine:_typeutils.valuesOf.call(void 0, _privacytypes.TranscendProduct)}),t.partial({description:t.string,hidden:t.boolean})]),ee= exports.S =t.intersection([t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.ActionItemCode),collections:t.array(t.string)}),t.partial({priority:_typeutils.valuesOf.call(void 0, _privacytypes.ActionItemPriorityOverride),customerExperienceActionItemId:t.string,dueDate:t.string,resolved:t.boolean,notes:t.string,link:t.string,users:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),S= exports.T =t.intersection([t.type({"depends-on-question-reference-id":t.string,"comparison-operator":_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)}),t.partial({"comparison-operands":t.array(t.string)})]),re= exports.U =t.recursion("AssessmentNestedRuleInput",w=>t.intersection([t.type({"logic-operator":_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),t.partial({rules:t.array(S),"nested-rules":t.array(w)})])),ne= exports.V =t.intersection([t.type({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction)}),t.partial({rule:S,"nested-rule":re})]),Re= exports.W =t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string}),se= exports.X =t.intersection([t.type({"comparison-operands":t.array(t.string),"comparison-operator":_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)}),t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string})]),ie= exports.Y =t.type({value:t.string}),oe= exports.Z =t.intersection([t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentQuestionType)}),t.partial({"sub-type":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentQuestionSubType),placeholder:t.string,description:t.string,"is-required":t.boolean,"reference-id":t.string,"display-logic":ne,"risk-logic":t.array(se),"risk-categories":t.array(t.string),"risk-framework":t.string,"answer-options":t.array(ie),"selected-answers":t.array(t.string),"allowed-mime-types":t.array(t.string),"allow-select-other":t.boolean,"sync-model":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentSyncModel),"sync-column":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentSyncColumn),"attribute-key":t.string,"require-risk-evaluation":t.boolean,"require-risk-matrix-evaluation":t.boolean})]),k= exports._ =t.intersection([t.type({title:t.string,questions:t.array(oe)}),t.partial({assignees:t.array(t.string),"external-assignees":t.array(t.string),status:t.string,"is-reviewed":t.boolean})]),R= exports.$ =t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionScheduleType),"duration-days":t.number,operand:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionScheduleOperation)}),ae= exports.aa =t.intersection([t.type({title:t.string}),t.partial({sections:t.array(k),description:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormTemplateStatus),source:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormTemplateSource),creator:t.string,locked:t.boolean,"parent-id":t.string,archived:t.boolean,"created-at":t.string,"attribute-keys":t.array(t.string),"retention-schedule":R,templates:t.array(t.string)})]),x= exports.ba =t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AttributeSupportedResourceType)}),pe= exports.ca =t.intersection([t.type({title:t.string,group:t.string}),t.partial({sections:t.array(k),creator:t.string,description:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormStatus),assignees:t.array(t.string),"external-assignees":t.array(t.string),reviewers:t.array(t.string),locked:t.boolean,archived:t.boolean,external:t.boolean,"title-is-internal":t.boolean,"due-date":t.string,"created-at":t.string,"assigned-at":t.string,"submitted-at":t.string,"approved-at":t.string,"rejected-at":t.string,resources:t.array(x),rows:t.array(x),"retention-schedule":R,attributes:t.array(r)})]),ye= exports.da =t.type({title:t.string,slug:t.string}),ue= exports.ea =t.intersection([t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.PreferenceTopicType),title:t.string,description:t.string}),t.partial({"default-configuration":t.string,"show-in-privacy-center":t.boolean,options:t.array(ye)})]),ce= exports.fa =t.intersection([t.type({trackingType:t.string,title:t.string,name:t.string}),t.partial({description:t.string,"is-active":t.boolean,configurable:t.boolean,"display-order":t.number,"show-in-privacy-center":t.boolean,"show-in-consent-manager":t.boolean,"preference-topics":t.array(ue),"auth-level":_typeutils.valuesOf.call(void 0, _privacytypes.PreferenceStoreAuthLevel),"opt-out-signals":t.array(_typeutils.valuesOf.call(void 0, _airgapjstypes.UserPrivacySignalEnum)),"default-consent":_typeutils.valuesOf.call(void 0, _privacytypes.DefaultConsentOption)})]),we= exports.ga =t.partial({"action-items":t.array(ee),"action-item-collections":t.array(te),"api-keys":t.array(Pt),teams:t.array(At),templates:t.array(Tt),enrichers:t.array(Ot),attributes:t.array(St),"business-entities":t.array(Kt),vendors:t.array(ht),"data-categories":t.array(Dt),"processing-purposes":t.array(Et),"data-subjects":t.array(Gt),actions:t.array(Ut),identifiers:t.array(Qt),"data-silos":t.array($t),"data-flows":t.array(zt),cookies:t.array(Ht),"consent-manager":Zt,prompts:t.array(Nt),"prompt-partials":t.array(Mt),"prompt-groups":t.array(Lt),agents:t.array(kt),"agent-functions":t.array(Rt),"agent-files":t.array(wt),"privacy-center":Jt,policies:t.array(_t),messages:t.array(Xt),partitions:t.array(Yt),"assessment-templates":t.array(ae),assessments:t.array(pe),"processing-activities":t.array(jt),purposes:t.array(ce)}),he= exports.ha =t.type({organizationName:t.string,apiKey:t.string,organizationId:t.string}),De= exports.ia =t.intersection([t.type({"Connections Made To":t.string,Type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope),Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus)}),t.record(t.string,t.string)]),Ee= exports.ja =t.intersection([t.type({Name:t.string,Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus)}),t.record(t.string,t.string)]),Ne= exports.ka =t.type({title:t.string,description:t.string,cookies:t.array(t.type({name:t.string,trackingPurposes:t.array(t.string)})),dataFlows:t.array(t.type({value:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope),trackingPurposes:t.array(t.string)}))}),Me= exports.la =_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.e),ge= exports.ma =_chunkLCDYXJN6cjs.a.call(void 0, {TRouteName:_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.f)}),Le=_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.f),le= exports.na =t.array(ge),me= exports.oa =_chunkLCDYXJN6cjs.b.call(void 0, {TEnabledRoutes:le}),qe= exports.pa =t.partial({enabledIntegrations:t.partial({openAI:me})}),Fe= exports.qa =t.partial({promptRunName:t.string,promptId:t.string,promptTitle:t.string,promptGroupId:t.string,promptGroupTitle:t.string,runByEmployeeEmail:t.string,applicationId:t.string,applicationName:t.string,codePackageName:t.string,repositoryName:t.string,applicationUserCoreIdentifier:t.string,applicationUserName:t.string,slackMessageTs:t.string,slackTeamId:t.string,slackChannelId:t.string,slackChannelName:t.string}),de=t.intersection([t.type({title:t.string}),t.partial({value:t.string})]),Ie=t.type({columns:t.array(de)}),Ve= exports.ra =t.partial({rows:t.array(Ie),json:t.string});exports.a = Tt; exports.b = C; exports.c = Pt; exports.d = At; exports.e = Ot; exports.f = v; exports.g = p; exports.h = Ct; exports.i = Ce; exports.j = vt; exports.k = St; exports.l = r; exports.m = kt; exports.n = Rt; exports.o = wt; exports.p = ht; exports.q = Dt; exports.r = Et; exports.s = Nt; exports.t = Mt; exports.u = Lt; exports.v = qt; exports.w = Ft; exports.x = Vt; exports.y = Kt; exports.z = u; exports.A = jt; exports.B = ve; exports.C = Bt; exports.D = Se; exports.E = ke; exports.F = Gt; exports.G = Ut; exports.H = Qt; exports.I = zt; exports.J = Ht; exports.K = Wt; exports.L = Yt; exports.M = Zt; exports.N = Jt; exports.O = _t; exports.P = Xt; exports.Q = $t; exports.R = te; exports.S = ee; exports.T = S; exports.U = re; exports.V = ne; exports.W = Re; exports.X = se; exports.Y = ie; exports.Z = oe; exports._ = k; exports.$ = R; exports.aa = ae; exports.ba = x; exports.ca = pe; exports.da = ye; exports.ea = ue; exports.fa = ce; exports.ga = we; exports.ha = he; exports.ia = De; exports.ja = Ee; exports.ka = Ne; exports.la = Me; exports.ma = ge; exports.na = le; exports.oa = me; exports.pa = qe; exports.qa = Fe; exports.ra = Ve;
2
- //# sourceMappingURL=chunk-5UBGZNDC.cjs.map
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkLCDYXJN6cjs = require('./chunk-LCDYXJN6.cjs');var _chunkQ7I37FJVcjs = require('./chunk-Q7I37FJV.cjs');var _iots = require('io-ts'); var t = _interopRequireWildcard(_iots);var _typeutils = require('@transcend-io/type-utils');var _privacytypes = require('@transcend-io/privacy-types');var _airgapjstypes = require('@transcend-io/airgap.js-types');var _internationalization = require('@transcend-io/internationalization');var Tt=t.type({title:t.string}),C= exports.b =t.intersection([t.type({name:t.string,value:t.string}),t.partial({isSecret:t.boolean})]),Pt= exports.c =t.type({title:t.string}),At= exports.d =t.intersection([t.type({name:t.string,description:t.string}),t.partial({"sso-department":t.string,"sso-group":t.string,"sso-title":t.string,users:t.array(t.string),scopes:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.ScopeName))})]),Ot= exports.e =t.intersection([t.type({title:t.string,"output-identifiers":t.array(t.string)}),t.partial({description:t.string,url:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.EnricherType),"input-identifier":t.string,testRegex:t.string,lookerQueryTitle:t.string,expirationDuration:t.number,transitionRequestStatus:_typeutils.valuesOf.call(void 0, _privacytypes.PreflightRequestStatus),phoneNumbers:t.array(t.string),regionList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode})),"data-subjects":t.array(t.string),headers:t.array(C),"privacy-actions":t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction))})]),v= exports.f =t.intersection([t.type({purpose:_typeutils.valuesOf.call(void 0, _privacytypes.ProcessingPurpose)}),t.partial({name:t.string})]),p= exports.g =t.intersection([t.type({category:_typeutils.valuesOf.call(void 0, _privacytypes.DataCategoryType)}),t.partial({name:t.string})]),Ct= exports.h =t.intersection([t.type({category:p,status:_typeutils.valuesOf.call(void 0, _privacytypes.SubDataPointDataSubCategoryGuessStatus),confidence:t.number}),t.partial({classifierVersion:t.number})]),Ce= exports.i =t.intersection([t.type({category:p,status:_typeutils.valuesOf.call(void 0, _privacytypes.UnstructuredSubDataPointRecommendationStatus),confidence:t.number}),t.partial({classifierVersion:t.number})]),vt= exports.j =t.intersection([t.type({name:t.string}),t.partial({description:t.string,color:t.string})]),St= exports.k =t.intersection([t.type({name:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AttributeKeyType)}),t.partial({description:t.string,resources:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.AttributeSupportedResourceType)),values:t.array(vt)})]),r= exports.l =t.type({key:t.string,values:t.array(t.string)}),kt= exports.m =t.intersection([t.type({name:t.string,instructions:t.string,agentId:t.string,codeInterpreterEnabled:t.boolean,retrievalEnabled:t.boolean,"large-language-model":t.type({name:t.string,client:_typeutils.valuesOf.call(void 0, _privacytypes.LargeLanguageModelClient)})}),t.partial({description:t.string,prompt:t.string,owners:t.array(t.string),teams:t.array(t.string),"agent-functions":t.array(t.string),"agent-files":t.array(t.string)})]),Rt= exports.n =t.type({name:t.string,description:t.string,parameters:t.string}),wt= exports.o =t.intersection([t.type({name:t.string,fileId:t.string,size:t.number,purpose:_typeutils.valuesOf.call(void 0, _privacytypes.PromptFilePurpose)}),t.partial({description:t.string})]),ht= exports.p =t.intersection([t.type({title:t.string}),t.partial({description:t.string,dataProcessingAgreementLink:t.string,contactName:t.string,contactPhone:t.string,address:t.string,headquarterCountry:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),headquarterSubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),websiteUrl:t.string,businessEntity:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Dt= exports.q =t.intersection([t.type({name:t.string,category:_typeutils.valuesOf.call(void 0, _privacytypes.DataCategoryType)}),t.partial({description:t.string,regex:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Et= exports.r =t.intersection([t.type({name:t.string,purpose:_typeutils.valuesOf.call(void 0, _privacytypes.ProcessingPurpose)}),t.partial({description:t.string,owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Nt= exports.s =t.type({title:t.string,content:t.string}),Mt= exports.t =t.type({title:t.string,content:t.string}),Lt= exports.u =t.type({title:t.string,description:t.string,prompts:t.array(t.string)}),qt= exports.v =t.intersection([t.type({key:t.string}),t.partial({title:t.string,description:t.union([t.string,t.null]),purposes:t.array(v),categories:t.array(p),"guessed-categories":t.array(Ct),"access-request-visibility-enabled":t.boolean,"erasure-request-redaction-enabled":t.boolean,attributes:t.array(r)})]),Ft= exports.w =t.intersection([t.type({key:t.string}),t.partial({path:t.array(t.string),title:t.string,description:t.string,"data-collection-tag":t.string,"privacy-action-queries":t.partial(_typeutils.applyEnum.call(void 0, _privacytypes.RequestActionObjectResolver,()=>t.string)),"privacy-actions":t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestActionObjectResolver)),fields:t.array(qt),owners:t.array(t.string),teams:t.array(t.string)})]),Vt= exports.x =t.partial({"notify-email-address":t.string,"send-frequency":t.number,"send-type":_typeutils.valuesOf.call(void 0, _privacytypes.PromptAVendorEmailSendType),"include-identifiers-attachment":t.boolean,"completion-link-type":_typeutils.valuesOf.call(void 0, _privacytypes.PromptAVendorEmailCompletionLinkType),"manual-work-retry-frequency":t.string}),Kt= exports.y =t.intersection([t.type({title:t.string}),t.partial({description:t.string,address:t.string,headquarterCountry:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),headquarterSubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),dataProtectionOfficerName:t.string,dataProtectionOfficerEmail:t.string,attributes:t.array(r),owners:t.array(t.string),teams:t.array(t.string)})]),u= exports.z =t.partial({country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode)}),jt= exports.A =t.intersection([t.type({title:t.string}),t.partial({description:t.string,securityMeasureDetails:t.string,controllerships:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.Controllership)),storageRegions:t.array(u),transferRegions:t.array(u),retentionType:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionType),retentionPeriod:t.number,dataProtectionImpactAssessmentLink:t.string,dataProtectionImpactAssessmentStatus:_typeutils.valuesOf.call(void 0, _privacytypes.DataProtectionImpactAssessmentStatus),attributes:t.array(r),dataSiloTitles:t.array(t.string),dataSubjectTypes:t.array(t.string),teamNames:t.array(t.string),ownerEmails:t.array(t.string),processingSubPurposes:t.array(v),dataSubCategories:t.array(p),saaSCategories:t.array(t.string)})]),ve= exports.B =t.intersection([t.type({name:t.string,codePackageType:_typeutils.valuesOf.call(void 0, _privacytypes.CodePackageType)}),t.partial({description:t.string,repositoryUrl:t.string,catalogIntegrationName:t.string,documentationLinks:t.array(t.string),ownerEmails:t.array(t.string),teamNames:t.array(t.string)})]),Bt= exports.C =t.intersection([t.type({name:t.string}),t.partial({version:t.string,isDevDependency:t.boolean})]),Se= exports.D =t.intersection([t.type({name:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.CodePackageType),relativePath:t.string,repositoryName:t.string}),t.partial({description:t.string,softwareDevelopmentKits:t.array(Bt),teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),ke= exports.E =t.intersection([t.type({name:t.string,url:t.string}),t.partial({description:t.string,teamNames:t.array(t.string),ownerEmails:t.array(t.string)})]),Gt= exports.F =t.intersection([t.type({type:t.string}),t.partial({active:t.boolean,title:t.string,adminDashboardDefaultSilentMode:t.boolean,actions:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction))})]),Ut= exports.G =t.intersection([t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)}),t.partial({skipSecondaryIfNoFiles:t.boolean,skipDownloadableStep:t.boolean,requiresReview:t.boolean,waitingPeriod:t.number,regionDetectionMethod:_typeutils.valuesOf.call(void 0, _privacytypes.RegionDetectionMethod),regionList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode})),regionBlockList:t.array(_typeutils.valuesOf.call(void 0, {..._privacytypes.IsoCountryCode,..._privacytypes.IsoCountrySubdivisionCode}))})]),Qt= exports.H =t.intersection([t.type({name:t.string,type:t.string}),t.partial({regex:t.string,selectOptions:t.array(t.string),privacyCenterVisibility:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.RequestAction)),dataSubjects:t.array(t.string),isRequiredInForm:t.boolean,placeholder:t.string,displayTitle:t.string,displayDescription:t.string,displayOrder:t.number,isUniqueOnPreferenceStore:t.boolean})]),zt= exports.I =t.intersection([t.type({value:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope)}),t.partial({description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Ht= exports.J =t.intersection([t.type({name:t.string}),t.partial({isRegex:t.boolean,description:t.string,trackingPurposes:t.array(t.string),service:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus),owners:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),Wt= exports.K =t.intersection([t.type({name:t.string}),t.partial({displayName:t.string,regions:t.array(u),onConsentExpiry:_typeutils.valuesOf.call(void 0, _airgapjstypes.OnConsentExpiry),consentExpiry:t.number,operator:_typeutils.valuesOf.call(void 0, _privacytypes.RegionsOperator),displayPriority:t.number,viewState:_typeutils.valuesOf.call(void 0, _airgapjstypes.InitialViewState),purposes:t.array(t.type({trackingType:t.string})),optedOutPurposes:t.array(t.type({trackingType:t.string})),browserLanguages:t.array(_typeutils.valuesOf.call(void 0, _airgapjstypes.BrowserLanguage)),browserTimeZones:t.array(_typeutils.valuesOf.call(void 0, _privacytypes.BrowserTimeZone))})]),Yt= exports.L =t.intersection([t.type({name:t.string}),t.partial({partition:t.string})]),Zt= exports.M =t.partial({version:t.string,bundleUrls:t.record(_typeutils.valuesOf.call(void 0, _privacytypes.ConsentBundleType),t.string),domains:t.array(t.string),partition:t.string,consentPrecedence:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentPrecedenceOption),unknownRequestPolicy:_typeutils.valuesOf.call(void 0, _privacytypes.UnknownRequestPolicy),unknownCookiePolicy:_typeutils.valuesOf.call(void 0, _privacytypes.UnknownRequestPolicy),syncEndpoint:t.string,telemetryPartitioning:_typeutils.valuesOf.call(void 0, _privacytypes.TelemetryPartitionStrategy),signedIabAgreement:_typeutils.valuesOf.call(void 0, _privacytypes.SignedIabAgreementOption),experiences:t.array(Wt),theme:t.partial({primaryColor:t.string,fontColor:t.string,privacyPolicy:t.string,prompt:t.number}),syncGroups:t.string}),Jt= exports.N =t.partial({isDisabled:t.boolean,showPrivacyRequestButton:t.boolean,showDataPractices:t.boolean,showPolicies:t.boolean,showTrackingTechnologies:t.boolean,showCookies:t.boolean,showDataFlows:t.boolean,showConsentManager:t.boolean,showManageYourPrivacy:t.boolean,showMarketingPreferences:t.boolean,locales:t.array(_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY)),defaultLocale:_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY),preferBrowserDefaultLocale:t.boolean,supportEmail:t.string,replyToEmail:t.string,useNoReplyEmailAddress:t.boolean,useCustomEmailDomain:t.boolean,transformAccessReportJsonToCsv:t.boolean,theme:t.partial({colors:t.partial(_typeutils.applyEnum.call(void 0, _privacytypes.ConfigurableColorPaletteColor,()=>t.string)),componentStyles:_privacytypes.PrivacyCenterComponentStyles,textStyles:_privacytypes.PrivacyCenterTextStyles})}),_t= exports.O =t.intersection([t.type({title:t.string}),t.partial({effectiveOn:t.string,disableEffectiveOn:t.boolean,content:t.string,disabledLocales:t.array(_typeutils.valuesOf.call(void 0, _internationalization.LOCALE_KEY))})]),Xt= exports.P =t.intersection([t.type({id:t.string}),t.partial({targetReactIntlId:t.string,description:t.string,defaultMessage:t.string,translations:t.partial(_typeutils.applyEnum.call(void 0, _internationalization.LOCALE_KEY,()=>t.string))})]),$t= exports.Q =t.intersection([t.type({title:t.string,integrationName:t.string}),t.partial({"outer-type":t.string,description:t.string,url:t.string,"api-key-title":t.string,headers:t.array(C),"data-subjects":t.array(t.string),"identity-keys":t.array(t.string),"deletion-dependencies":t.array(t.string),owners:t.array(t.string),teams:t.array(t.string),disabled:t.boolean,datapoints:t.array(Ft),"email-settings":Vt,country:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountryCode),countrySubDivision:_typeutils.valuesOf.call(void 0, _privacytypes.IsoCountrySubdivisionCode),attributes:t.array(r),businessEntityTitles:t.array(t.string)})]),te= exports.R =t.intersection([t.type({title:t.string,productLine:_typeutils.valuesOf.call(void 0, _privacytypes.TranscendProduct)}),t.partial({description:t.string,hidden:t.boolean})]),ee= exports.S =t.intersection([t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.ActionItemCode),collections:t.array(t.string)}),t.partial({priority:_typeutils.valuesOf.call(void 0, _privacytypes.ActionItemPriorityOverride),customerExperienceActionItemId:t.string,dueDate:t.string,resolved:t.boolean,notes:t.string,link:t.string,users:t.array(t.string),teams:t.array(t.string),attributes:t.array(r)})]),S= exports.T =t.intersection([t.type({"depends-on-question-reference-id":t.string,"comparison-operator":_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)}),t.partial({"comparison-operands":t.array(t.string)})]),re= exports.U =t.recursion("AssessmentNestedRuleInput",w=>t.intersection([t.type({"logic-operator":_typeutils.valuesOf.call(void 0, _privacytypes.LogicOperator)}),t.partial({rules:t.array(S),"nested-rules":t.array(w)})])),ne= exports.V =t.intersection([t.type({action:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentsDisplayLogicAction)}),t.partial({rule:S,"nested-rule":re})]),Re= exports.W =t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string}),se= exports.X =t.intersection([t.type({"comparison-operands":t.array(t.string),"comparison-operator":_typeutils.valuesOf.call(void 0, _privacytypes.ComparisonOperator)}),t.partial({"risk-level":t.string,"risk-matrix-column":t.string,"risk-matrix-row":t.string})]),ie= exports.Y =t.type({value:t.string}),oe= exports.Z =t.intersection([t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentQuestionType)}),t.partial({"sub-type":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentQuestionSubType),placeholder:t.string,description:t.string,"is-required":t.boolean,"reference-id":t.string,"display-logic":ne,"risk-logic":t.array(se),"risk-categories":t.array(t.string),"risk-framework":t.string,"answer-options":t.array(ie),"selected-answers":t.array(t.string),"allowed-mime-types":t.array(t.string),"allow-select-other":t.boolean,"sync-model":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentSyncModel),"sync-column":_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentSyncColumn),"attribute-key":t.string,"require-risk-evaluation":t.boolean,"require-risk-matrix-evaluation":t.boolean})]),k= exports._ =t.intersection([t.type({title:t.string,questions:t.array(oe)}),t.partial({assignees:t.array(t.string),"external-assignees":t.array(t.string),status:t.string,"is-reviewed":t.boolean})]),R= exports.$ =t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionScheduleType),"duration-days":t.number,operand:_typeutils.valuesOf.call(void 0, _privacytypes.RetentionScheduleOperation)}),ae= exports.aa =t.intersection([t.type({title:t.string}),t.partial({sections:t.array(k),description:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormTemplateStatus),source:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormTemplateSource),creator:t.string,locked:t.boolean,"parent-id":t.string,archived:t.boolean,"created-at":t.string,"attribute-keys":t.array(t.string),"retention-schedule":R,templates:t.array(t.string)})]),x= exports.ba =t.type({title:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.AttributeSupportedResourceType)}),pe= exports.ca =t.intersection([t.type({title:t.string,group:t.string}),t.partial({sections:t.array(k),creator:t.string,description:t.string,status:_typeutils.valuesOf.call(void 0, _privacytypes.AssessmentFormStatus),assignees:t.array(t.string),"external-assignees":t.array(t.string),reviewers:t.array(t.string),locked:t.boolean,archived:t.boolean,external:t.boolean,"title-is-internal":t.boolean,"due-date":t.string,"created-at":t.string,"assigned-at":t.string,"submitted-at":t.string,"approved-at":t.string,"rejected-at":t.string,resources:t.array(x),rows:t.array(x),"retention-schedule":R,attributes:t.array(r)})]),ye= exports.da =t.type({title:t.string,slug:t.string}),ue= exports.ea =t.intersection([t.type({type:_typeutils.valuesOf.call(void 0, _privacytypes.PreferenceTopicType),title:t.string,description:t.string}),t.partial({"default-configuration":t.string,"show-in-privacy-center":t.boolean,options:t.array(ye)})]),ce= exports.fa =t.intersection([t.type({trackingType:t.string,title:t.string,name:t.string}),t.partial({description:t.string,"is-active":t.boolean,configurable:t.boolean,"display-order":t.number,"show-in-privacy-center":t.boolean,"show-in-consent-manager":t.boolean,"preference-topics":t.array(ue),"auth-level":_typeutils.valuesOf.call(void 0, _privacytypes.PreferenceStoreAuthLevel),"opt-out-signals":t.array(_typeutils.valuesOf.call(void 0, _airgapjstypes.UserPrivacySignalEnum)),"default-consent":_typeutils.valuesOf.call(void 0, _privacytypes.DefaultConsentOption)})]),we= exports.ga =t.partial({"action-items":t.array(ee),"action-item-collections":t.array(te),"api-keys":t.array(Pt),teams:t.array(At),templates:t.array(Tt),enrichers:t.array(Ot),attributes:t.array(St),"business-entities":t.array(Kt),vendors:t.array(ht),"data-categories":t.array(Dt),"processing-purposes":t.array(Et),"data-subjects":t.array(Gt),actions:t.array(Ut),identifiers:t.array(Qt),"data-silos":t.array($t),"data-flows":t.array(zt),cookies:t.array(Ht),"consent-manager":Zt,prompts:t.array(Nt),"prompt-partials":t.array(Mt),"prompt-groups":t.array(Lt),agents:t.array(kt),"agent-functions":t.array(Rt),"agent-files":t.array(wt),"privacy-center":Jt,policies:t.array(_t),messages:t.array(Xt),partitions:t.array(Yt),"assessment-templates":t.array(ae),assessments:t.array(pe),"processing-activities":t.array(jt),purposes:t.array(ce)}),he= exports.ha =t.type({organizationName:t.string,apiKey:t.string,organizationId:t.string}),De= exports.ia =t.intersection([t.type({"Connections Made To":t.string,Type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope),Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus)}),t.record(t.string,t.string)]),Ee= exports.ja =t.intersection([t.type({Name:t.string,Purpose:t.string}),t.partial({Service:t.string,Notes:t.string,Owners:t.string,Teams:t.string,Status:_typeutils.valuesOf.call(void 0, _privacytypes.ConsentTrackerStatus)}),t.record(t.string,t.string)]),Ne= exports.ka =t.type({title:t.string,description:t.string,cookies:t.array(t.type({name:t.string,trackingPurposes:t.array(t.string)})),dataFlows:t.array(t.type({value:t.string,type:_typeutils.valuesOf.call(void 0, _privacytypes.DataFlowScope),trackingPurposes:t.array(t.string)}))}),Me= exports.la =_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.e),ge= exports.ma =_chunkLCDYXJN6cjs.a.call(void 0, {TRouteName:_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.f)}),Le=_typeutils.valuesOf.call(void 0, _chunkQ7I37FJVcjs.f),le= exports.na =t.array(ge),me= exports.oa =_chunkLCDYXJN6cjs.b.call(void 0, {TEnabledRoutes:le}),qe= exports.pa =t.partial({enabledIntegrations:t.partial({openAI:me})}),Fe= exports.qa =t.partial({promptRunName:t.string,promptId:t.string,promptTitle:t.string,promptGroupId:t.string,promptGroupTitle:t.string,runByEmployeeEmail:t.string,applicationId:t.string,applicationName:t.string,codePackageName:t.string,repositoryName:t.string,applicationUserCoreIdentifier:t.string,applicationUserName:t.string,slackMessageTs:t.string,slackTeamId:t.string,slackChannelId:t.string,slackChannelName:t.string}),de=t.intersection([t.type({title:t.string}),t.partial({value:t.string})]),Ie=t.type({columns:t.array(de)}),Ve= exports.ra =t.partial({rows:t.array(Ie),json:t.string});exports.a = Tt; exports.b = C; exports.c = Pt; exports.d = At; exports.e = Ot; exports.f = v; exports.g = p; exports.h = Ct; exports.i = Ce; exports.j = vt; exports.k = St; exports.l = r; exports.m = kt; exports.n = Rt; exports.o = wt; exports.p = ht; exports.q = Dt; exports.r = Et; exports.s = Nt; exports.t = Mt; exports.u = Lt; exports.v = qt; exports.w = Ft; exports.x = Vt; exports.y = Kt; exports.z = u; exports.A = jt; exports.B = ve; exports.C = Bt; exports.D = Se; exports.E = ke; exports.F = Gt; exports.G = Ut; exports.H = Qt; exports.I = zt; exports.J = Ht; exports.K = Wt; exports.L = Yt; exports.M = Zt; exports.N = Jt; exports.O = _t; exports.P = Xt; exports.Q = $t; exports.R = te; exports.S = ee; exports.T = S; exports.U = re; exports.V = ne; exports.W = Re; exports.X = se; exports.Y = ie; exports.Z = oe; exports._ = k; exports.$ = R; exports.aa = ae; exports.ba = x; exports.ca = pe; exports.da = ye; exports.ea = ue; exports.fa = ce; exports.ga = we; exports.ha = he; exports.ia = De; exports.ja = Ee; exports.ka = Ne; exports.la = Me; exports.ma = ge; exports.na = le; exports.oa = me; exports.pa = qe; exports.qa = Fe; exports.ra = Ve;
2
+ //# sourceMappingURL=chunk-ECGHWDVP.cjs.map