@transcend-io/cli 7.0.0-alpha.1 → 7.0.0-alpha.11

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 (186) hide show
  1. package/README.md +1007 -2565
  2. package/dist/bin/bash-complete.d.ts +1 -0
  3. package/dist/bin/bash-complete.js +4 -0
  4. package/dist/bin/bash-complete.js.map +1 -0
  5. package/dist/bin/cli.d.ts +1 -0
  6. package/dist/bin/cli.js +3 -0
  7. package/dist/bin/cli.js.map +1 -0
  8. package/dist/bin/deprecated-command.d.ts +1 -0
  9. package/dist/bin/deprecated-command.js +7 -0
  10. package/dist/bin/deprecated-command.js.map +1 -0
  11. package/dist/chunk-347UQP43.js +2 -0
  12. package/dist/chunk-347UQP43.js.map +1 -0
  13. package/dist/chunk-43JWXG77.js +2 -0
  14. package/dist/chunk-43JWXG77.js.map +1 -0
  15. package/dist/chunk-4GLITB3Y.js +2 -0
  16. package/dist/chunk-4GLITB3Y.js.map +1 -0
  17. package/dist/chunk-6WKTY4YQ.js +4 -0
  18. package/dist/chunk-6WKTY4YQ.js.map +1 -0
  19. package/dist/{chunk-CG4A43HM.mjs → chunk-72U6ETHG.js} +1 -0
  20. package/dist/chunk-72U6ETHG.js.map +1 -0
  21. package/dist/chunk-AB4DHWRB.js +2 -0
  22. package/dist/chunk-AB4DHWRB.js.map +1 -0
  23. package/dist/{chunk-BGXZA4EM.mjs → chunk-ARVEJERC.js} +1 -0
  24. package/dist/chunk-ARVEJERC.js.map +1 -0
  25. package/dist/chunk-CBAHSBSW.js +2 -0
  26. package/dist/chunk-CBAHSBSW.js.map +1 -0
  27. package/dist/chunk-FSJPJZNH.js +2 -0
  28. package/dist/chunk-FSJPJZNH.js.map +1 -0
  29. package/dist/chunk-GD7WEHDA.js +9 -0
  30. package/dist/chunk-GD7WEHDA.js.map +1 -0
  31. package/dist/chunk-GSXHJEKW.js +75 -0
  32. package/dist/chunk-GSXHJEKW.js.map +1 -0
  33. package/dist/chunk-HGLIJXXG.js +3 -0
  34. package/dist/chunk-HGLIJXXG.js.map +1 -0
  35. package/dist/chunk-JXPGBZXN.js +94 -0
  36. package/dist/chunk-JXPGBZXN.js.map +1 -0
  37. package/dist/chunk-L5ULN3IT.js +2 -0
  38. package/dist/chunk-L5ULN3IT.js.map +1 -0
  39. package/dist/chunk-L7ZIX4SU.js +2 -0
  40. package/dist/chunk-L7ZIX4SU.js.map +1 -0
  41. package/dist/chunk-LAYHULHH.js +2 -0
  42. package/dist/chunk-LAYHULHH.js.map +1 -0
  43. package/dist/chunk-MA4JWWRO.js +6 -0
  44. package/dist/chunk-MA4JWWRO.js.map +1 -0
  45. package/dist/chunk-OEB7WG3G.js +4 -0
  46. package/dist/chunk-OEB7WG3G.js.map +1 -0
  47. package/dist/chunk-R6QTIUFA.js +2 -0
  48. package/dist/chunk-R6QTIUFA.js.map +1 -0
  49. package/dist/chunk-TR32ZRNC.js +2 -0
  50. package/dist/chunk-TR32ZRNC.js.map +1 -0
  51. package/dist/chunk-UK7OFHQR.js +12 -0
  52. package/dist/chunk-UK7OFHQR.js.map +1 -0
  53. package/dist/chunk-UUBO75GS.js +2 -0
  54. package/dist/chunk-UUBO75GS.js.map +1 -0
  55. package/dist/chunk-WEQUQAB7.js +2831 -0
  56. package/dist/chunk-WEQUQAB7.js.map +1 -0
  57. package/dist/chunk-XWOTEZCO.js +2 -0
  58. package/dist/chunk-XWOTEZCO.js.map +1 -0
  59. package/dist/impl-2TCAWTV7.js +2 -0
  60. package/dist/impl-2TCAWTV7.js.map +1 -0
  61. package/dist/impl-42N5BEEM.js +6 -0
  62. package/dist/impl-42N5BEEM.js.map +1 -0
  63. package/dist/impl-4CRAE4V6.js +2 -0
  64. package/dist/impl-4CRAE4V6.js.map +1 -0
  65. package/dist/impl-5N4IKF4U.js +2 -0
  66. package/dist/impl-5N4IKF4U.js.map +1 -0
  67. package/dist/impl-5NAYXPAC.js +2 -0
  68. package/dist/impl-5NAYXPAC.js.map +1 -0
  69. package/dist/impl-5YV7K446.js +2 -0
  70. package/dist/impl-5YV7K446.js.map +1 -0
  71. package/dist/impl-645HDE5S.js +2 -0
  72. package/dist/impl-645HDE5S.js.map +1 -0
  73. package/dist/impl-7DL7ZS4K.js +9 -0
  74. package/dist/impl-7DL7ZS4K.js.map +1 -0
  75. package/dist/impl-7JFWBWQZ.js +2 -0
  76. package/dist/impl-7JFWBWQZ.js.map +1 -0
  77. package/dist/impl-B4WDU4OW.js +2 -0
  78. package/dist/impl-B4WDU4OW.js.map +1 -0
  79. package/dist/impl-B5C37V2L.js +2 -0
  80. package/dist/impl-B5C37V2L.js.map +1 -0
  81. package/dist/impl-BWZUWHVF.js +2 -0
  82. package/dist/impl-BWZUWHVF.js.map +1 -0
  83. package/dist/impl-D47U6GWY.js +2 -0
  84. package/dist/impl-D47U6GWY.js.map +1 -0
  85. package/dist/impl-FAOTDDQ5.js +2 -0
  86. package/dist/impl-FAOTDDQ5.js.map +1 -0
  87. package/dist/impl-FYAEBZIM.js +2 -0
  88. package/dist/impl-FYAEBZIM.js.map +1 -0
  89. package/dist/impl-GGEEIOQF.js +2 -0
  90. package/dist/impl-GGEEIOQF.js.map +1 -0
  91. package/dist/impl-IAKEYWMV.js +2 -0
  92. package/dist/impl-IAKEYWMV.js.map +1 -0
  93. package/dist/impl-IFLVVVBT.js +2 -0
  94. package/dist/impl-IFLVVVBT.js.map +1 -0
  95. package/dist/impl-JFHF7SF7.js +2 -0
  96. package/dist/impl-JFHF7SF7.js.map +1 -0
  97. package/dist/impl-JPOE7MKX.js +2 -0
  98. package/dist/impl-JPOE7MKX.js.map +1 -0
  99. package/dist/impl-KRV7L5SP.js +2 -0
  100. package/dist/impl-KRV7L5SP.js.map +1 -0
  101. package/dist/impl-MGARGP2M.js +2 -0
  102. package/dist/impl-MGARGP2M.js.map +1 -0
  103. package/dist/impl-N3R63BI4.js +2 -0
  104. package/dist/impl-N3R63BI4.js.map +1 -0
  105. package/dist/impl-NCWU4WVO.js +2 -0
  106. package/dist/impl-NCWU4WVO.js.map +1 -0
  107. package/dist/impl-NE4OGF7U.js +2 -0
  108. package/dist/impl-NE4OGF7U.js.map +1 -0
  109. package/dist/impl-NNBY4R6T.js +2 -0
  110. package/dist/impl-NNBY4R6T.js.map +1 -0
  111. package/dist/impl-PERB6GYW.js +6 -0
  112. package/dist/impl-PERB6GYW.js.map +1 -0
  113. package/dist/impl-QSO5YEU5.js +2 -0
  114. package/dist/impl-QSO5YEU5.js.map +1 -0
  115. package/dist/impl-R3SREBHK.js +2 -0
  116. package/dist/impl-R3SREBHK.js.map +1 -0
  117. package/dist/impl-RCQ2XX63.js +2 -0
  118. package/dist/impl-RCQ2XX63.js.map +1 -0
  119. package/dist/impl-TKRPL6CJ.js +12 -0
  120. package/dist/impl-TKRPL6CJ.js.map +1 -0
  121. package/dist/impl-TMKWWJKO.js +2 -0
  122. package/dist/impl-TMKWWJKO.js.map +1 -0
  123. package/dist/impl-TOLP53IM.js +2 -0
  124. package/dist/impl-TOLP53IM.js.map +1 -0
  125. package/dist/impl-VDNSV4OU.js +6 -0
  126. package/dist/impl-VDNSV4OU.js.map +1 -0
  127. package/dist/impl-VUKRE7OK.js +2 -0
  128. package/dist/impl-VUKRE7OK.js.map +1 -0
  129. package/dist/impl-XGFKUJGX.js +7 -0
  130. package/dist/impl-XGFKUJGX.js.map +1 -0
  131. package/dist/impl-Z4G3R4DW.js +4 -0
  132. package/dist/impl-Z4G3R4DW.js.map +1 -0
  133. package/dist/impl-ZN4EG5UY.js +2 -0
  134. package/dist/impl-ZN4EG5UY.js.map +1 -0
  135. package/dist/impl-ZX6PDQW6.js +2 -0
  136. package/dist/impl-ZX6PDQW6.js.map +1 -0
  137. package/dist/index.d.ts +117643 -0
  138. package/dist/index.js +5 -0
  139. package/dist/index.js.map +1 -0
  140. package/package.json +57 -54
  141. package/dist/bin/bash-complete.mjs +0 -3
  142. package/dist/bin/cli.mjs +0 -2
  143. package/dist/bin/deprecated-command.mjs +0 -6
  144. package/dist/chunk-BWXKSYTY.mjs +0 -1
  145. package/dist/chunk-N4KHG2LT.mjs +0 -3
  146. package/dist/chunk-RTBRALWU.mjs +0 -48
  147. package/dist/chunk-WVOQBBD4.mjs +0 -1
  148. package/dist/impl-2SXC6DB5.mjs +0 -1
  149. package/dist/impl-3WS4KAXC.mjs +0 -1
  150. package/dist/impl-573JHF5Q.mjs +0 -1
  151. package/dist/impl-5G2VT3GE.mjs +0 -1
  152. package/dist/impl-5M2JICLA.mjs +0 -1
  153. package/dist/impl-6HCHXNYK.mjs +0 -1
  154. package/dist/impl-6HYSKLJA.mjs +0 -1
  155. package/dist/impl-6ZEB6Z2K.mjs +0 -1
  156. package/dist/impl-7R553APD.mjs +0 -1
  157. package/dist/impl-7YBBGEJS.mjs +0 -1
  158. package/dist/impl-AE4WVFKM.mjs +0 -1
  159. package/dist/impl-BUP5GVYQ.mjs +0 -1
  160. package/dist/impl-DDSJFH7O.mjs +0 -1
  161. package/dist/impl-EAWZEQHP.mjs +0 -1
  162. package/dist/impl-EBN6UN6B.mjs +0 -1
  163. package/dist/impl-F3GN5QBQ.mjs +0 -1
  164. package/dist/impl-F7EIWKOK.mjs +0 -1
  165. package/dist/impl-GOITDIYO.mjs +0 -1
  166. package/dist/impl-GWDASXMF.mjs +0 -1
  167. package/dist/impl-I2HNOFXK.mjs +0 -1
  168. package/dist/impl-J6TM5I2T.mjs +0 -1
  169. package/dist/impl-JKKLZIWW.mjs +0 -1
  170. package/dist/impl-L32NAFWG.mjs +0 -1
  171. package/dist/impl-LTXXHRJN.mjs +0 -1
  172. package/dist/impl-NFGCPTZ6.mjs +0 -1
  173. package/dist/impl-NFKMASFN.mjs +0 -1
  174. package/dist/impl-OCKVP3CG.mjs +0 -1
  175. package/dist/impl-ORZO5DKU.mjs +0 -1
  176. package/dist/impl-TMYFQHHJ.mjs +0 -1
  177. package/dist/impl-TN3TNFJ3.mjs +0 -1
  178. package/dist/impl-TY543E6H.mjs +0 -1
  179. package/dist/impl-U5YMWF3E.mjs +0 -1
  180. package/dist/impl-V26VW5PW.mjs +0 -1
  181. package/dist/impl-V75HSG53.mjs +0 -1
  182. package/dist/impl-VTEL3Q42.mjs +0 -1
  183. package/dist/impl-WJX6QJZG.mjs +0 -1
  184. package/dist/impl-YF6RKW6X.mjs +0 -1
  185. package/dist/impl-ZHAW5DO6.mjs +0 -1
  186. package/dist/index.mjs +0 -2923
@@ -0,0 +1,2 @@
1
+ var s="A command line interface for programmatic operations across Transcend.",i="7.0.0-alpha.11";export{s as a,i as b};
2
+ //# sourceMappingURL=chunk-XWOTEZCO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../package.json"],"sourcesContent":["{\n \"author\": \"Transcend Inc.\",\n \"name\": \"@transcend-io/cli\",\n \"description\": \"A command line interface for programmatic operations across Transcend.\",\n \"version\": \"7.0.0-alpha.11\",\n \"homepage\": \"https://github.com/transcend-io/cli\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/transcend-io/cli.git\"\n },\n \"type\": \"module\",\n \"license\": \"UNLICENSED\",\n \"main\": \"dist/index.js\",\n \"bin\": {\n \"@transcend-io/transcend\": \"dist/bin/cli.js\",\n \"__cli_bash_complete\": \"dist/bin/bash-complete.js\",\n \"__tr-build-xdi-sync-endpoint\": \"dist/bin/deprecated-command.js\",\n \"__tr-consent-manager-service-json-to-yml\": \"dist/bin/deprecated-command.js\",\n \"__tr-consent-managers-to-business-entities\": \"dist/bin/deprecated-command.js\",\n \"__tr-cron-mark-identifiers-completed\": \"dist/bin/deprecated-command.js\",\n \"__tr-cron-pull-identifiers\": \"dist/bin/deprecated-command.js\",\n \"__tr-cron-pull-profiles\": \"dist/bin/deprecated-command.js\",\n \"__tr-derive-data-silos-from-data-flows\": \"dist/bin/deprecated-command.js\",\n \"__tr-derive-data-silos-from-data-flows-cross-instance\": \"dist/bin/deprecated-command.js\",\n \"__tr-discover-silos\": \"dist/bin/deprecated-command.js\",\n \"__tr-generate-api-keys\": \"dist/bin/deprecated-command.js\",\n \"__tr-manual-enrichment-pull-identifiers\": \"dist/bin/deprecated-command.js\",\n \"__tr-manual-enrichment-push-identifiers\": \"dist/bin/deprecated-command.js\",\n \"__tr-mark-request-data-silos-completed\": \"dist/bin/deprecated-command.js\",\n \"__tr-pull\": \"dist/bin/deprecated-command.js\",\n \"__tr-pull-consent-metrics\": \"dist/bin/deprecated-command.js\",\n \"__tr-pull-consent-preferences\": \"dist/bin/deprecated-command.js\",\n \"__tr-pull-datapoints\": \"dist/bin/deprecated-command.js\",\n \"__tr-pull-unstructured-discovery-files\": \"dist/bin/deprecated-command.js\",\n \"__tr-push\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-approve\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-cancel\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-download-files\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-enricher-restart\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-export\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-mark-silent\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-notify-additional-time\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-reject-unverified-identifiers\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-restart\": \"dist/bin/deprecated-command.js\",\n \"__tr-request-upload\": \"dist/bin/deprecated-command.js\",\n \"__tr-retry-request-data-silos\": \"dist/bin/deprecated-command.js\",\n \"__tr-scan-packages\": \"dist/bin/deprecated-command.js\",\n \"__tr-skip-request-data-silos\": \"dist/bin/deprecated-command.js\",\n \"__tr-sync-ot\": \"dist/bin/deprecated-command.js\",\n \"__tr-update-consent-manager\": \"dist/bin/deprecated-command.js\",\n \"__tr-upload-consent-preferences\": \"dist/bin/deprecated-command.js\",\n \"__tr-upload-cookies-from-csv\": \"dist/bin/deprecated-command.js\",\n \"__tr-upload-data-flows-from-csv\": \"dist/bin/deprecated-command.js\",\n \"__tr-upload-preferences\": \"dist/bin/deprecated-command.js\"\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"start\": \"./dist/bin/cli.js\",\n \"prebuild\": \"tsc -p tsconfig.json\",\n \"build\": \"tsup\",\n \"build:watch\": \"tsup --watch\",\n \"prepublishOnly\": \"pnpm lint && pnpm build && pnpm test && pnpm publint\",\n \"lint\": \"pnpm run --parallel --aggregate-output \\\"/^lint:*/\\\"\",\n \"lint:prettier\": \"prettier --check . --log-level warn\",\n \"lint:types\": \"tsc --noEmit\",\n \"lint:eslint\": \"eslint .\",\n \"format\": \"prettier --write .\",\n \"test\": \"vitest run\",\n \"script:transcend-json-schema\": \"tsx scripts/buildTranscendJsonSchema.ts && prettier ./transcend-yml-schema-*.json --write\",\n \"script:pathfinder-json-schema\": \"tsx scripts/buildPathfinderJsonSchema.ts && prettier ./pathfinder-policy-yml-schema.json --write\",\n \"script:build-readme-docs\": \"tsx scripts/buildReadmeDocs.ts\"\n },\n \"tsup\": {\n \"entry\": [\n \"src/bin/cli.ts\",\n \"src/bin/bash-complete.ts\",\n \"src/bin/deprecated-command.ts\",\n \"src/index.ts\"\n ],\n \"format\": [\n \"esm\"\n ],\n \"sourcemap\": true,\n \"dts\": true,\n \"tsconfig\": \"tsconfig.json\",\n \"clean\": true,\n \"splitting\": true,\n \"minify\": true\n },\n \"dependencies\": {\n \"@stricli/auto-complete\": \"^1.2.0\",\n \"@stricli/core\": \"^1.2.0\",\n \"@transcend-io/airgap.js-types\": \"^12.12.1\",\n \"@transcend-io/handlebars-utils\": \"^1.1.0\",\n \"@transcend-io/internationalization\": \"^1.6.0\",\n \"@transcend-io/persisted-state\": \"^1.0.4\",\n \"@transcend-io/privacy-types\": \"^4.124.1\",\n \"@transcend-io/secret-value\": \"^1.2.0\",\n \"@transcend-io/type-utils\": \"^1.8.0\",\n \"JSONStream\": \"^1.3.5\",\n \"cli-progress\": \"^3.11.2\",\n \"colors\": \"^1.4.0\",\n \"csv-parse\": \"^5.6.0\",\n \"fast-csv\": \"^4.3.6\",\n \"fast-glob\": \"^3.2.12\",\n \"fp-ts\": \"^2.16.1\",\n \"fuzzysearch\": \"^1.0.3\",\n \"global-agent\": \"^3.0.0\",\n \"got\": \"^11.8.5\",\n \"graphql-request\": \"^5.0.0\",\n \"inquirer\": \"=7.3.3\",\n \"inquirer-autocomplete-prompt\": \"=1.3.0\",\n \"io-ts\": \"^2.2.21\",\n \"io-ts-types\": \"^0.5.16\",\n \"js-yaml\": \"^4.1.0\",\n \"jsonwebtoken\": \"^9.0.2\",\n \"lodash-es\": \"^4.17.21\",\n \"query-string\": \"=7.0.0\",\n \"semver\": \"^7.6.0\",\n \"undici\": \"^5.22.1\",\n \"yargs-parser\": \"^21.1.1\"\n },\n \"devDependencies\": {\n \"@types/JSONStream\": \"npm:@types/jsonstream@^0.8.33\",\n \"@types/cli-progress\": \"^3.11.0\",\n \"@types/colors\": \"^1.2.1\",\n \"@types/fuzzysearch\": \"^1.0.0\",\n \"@types/global-agent\": \"^2.1.1\",\n \"@types/inquirer\": \"^7.3.1\",\n \"@types/inquirer-autocomplete-prompt\": \"^3.0.0\",\n \"@types/js-yaml\": \"^4.0.5\",\n \"@types/json-schema\": \"^7.0.15\",\n \"@types/jsonwebtoken\": \"^9\",\n \"@types/lodash-es\": \"^4.17.12\",\n \"@types/node\": \"^18.15.11\",\n \"@types/semver\": \"^7\",\n \"@types/yargs-parser\": \"^21.0.0\",\n \"@typescript-eslint/eslint-plugin\": \"^5.58.0\",\n \"@typescript-eslint/parser\": \"^5.58.0\",\n \"depcheck\": \"^1.4.3\",\n \"doctoc\": \"^2.2.1\",\n \"eslint\": \"^8.38.0\",\n \"eslint-config-airbnb-base\": \"^15.0.0\",\n \"eslint-import-resolver-typescript\": \"^3.5.5\",\n \"eslint-plugin-eslint-comments\": \"^3.2.0\",\n \"eslint-plugin-import\": \"2.27.5\",\n \"eslint-plugin-jsdoc\": \"^41.1.1\",\n \"fdir\": \"^6.4.6\",\n \"prettier\": \"^2.8.7\",\n \"publint\": \"^0.3.12\",\n \"tsup\": \"^8.5.0\",\n \"tsx\": \"^4.20.3\",\n \"typescript\": \"^5.0.4\",\n \"vite-tsconfig-paths\": \"^5.1.4\",\n \"vitest\": \"^3.2.4\"\n },\n \"packageManager\": \"pnpm@10.12.4+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184\"\n}\n"],"mappings":"AAGE,IAAAA,EAAe,yEACfC,EAAW","names":["description","version"]}
@@ -0,0 +1,2 @@
1
+ import{d as n}from"./chunk-HGLIJXXG.js";import"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function c({auth:t,transcendUrl:r,file:e,enricherId:i,concurrency:s,markSilent:o,sombraAuth:a}){await n({file:e,transcendUrl:r,enricherId:i,concurrency:s,markSilent:o,auth:t,sombraAuth:a})}export{c as pushIdentifiers};
2
+ //# sourceMappingURL=impl-2TCAWTV7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/preflight/push-identifiers/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { pushManualEnrichmentIdentifiersFromCsv } from '@/lib/manual-enrichment';\n\ninterface PushIdentifiersCommandFlags {\n auth: string;\n enricherId: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n markSilent: boolean;\n concurrency: number;\n}\n\nexport async function pushIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n enricherId,\n concurrency,\n markSilent,\n sombraAuth,\n }: PushIdentifiersCommandFlags,\n): Promise<void> {\n await pushManualEnrichmentIdentifiersFromCsv({\n file,\n transcendUrl,\n enricherId,\n concurrency,\n markSilent,\n auth,\n sombraAuth,\n });\n}\n"],"mappings":"4OAaA,eAAsBA,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,KAAAC,EACA,WAAAC,EACA,YAAAC,EACA,WAAAC,EACA,WAAAC,CACF,EACe,CACf,MAAMC,EAAuC,CAC3C,KAAAL,EACA,aAAAD,EACA,WAAAE,EACA,YAAAC,EACA,WAAAC,EACA,KAAAL,EACA,WAAAM,CACF,CAAC,CACH","names":["pushIdentifiers","auth","transcendUrl","file","enricherId","concurrency","markSilent","sombraAuth","pushManualEnrichmentIdentifiersFromCsv"]}
@@ -0,0 +1,6 @@
1
+ import{e as l}from"./chunk-OEB7WG3G.js";import{h as R,i as b}from"./chunk-GD7WEHDA.js";import{b as N}from"./chunk-R6QTIUFA.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{a as P,be as m,pe as u}from"./chunk-WEQUQAB7.js";import{a as o}from"./chunk-43JWXG77.js";import{c as f}from"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import{d as E}from"./chunk-ARVEJERC.js";import n from"colors";import{join as k}from"path";import D from"fs";async function M({auth:x,resources:g=R,file:t,transcendUrl:p,dataSiloIds:d=[],integrationNames:T=[],trackerStatuses:y=b,pageSize:S,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,debug:a}){let i=await N(x),C=g.includes("all")?Object.values(E):g;if(typeof i=="string"){try{let r=u(p,i),e=await m(r,{dataSiloIds:d,integrationNames:T,resources:C,pageSize:S,debug:a,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:y});o.info(n.magenta(`Writing configuration to file "${t}"...`)),l(t,e)}catch(r){o.error(n.red(`An error occurred syncing the schema: ${a?r.stack:r.message}`)),process.exit(1)}o.info(n.green(`Successfully synced yaml file to disk at ${t}! View at ${f}`))}else{if(!D.lstatSync(t).isDirectory())throw new Error("File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/");let r=[];await P(i,async(e,L)=>{let s=`[${L+1}/${i.length}][${e.organizationName}] `;o.info(n.magenta(`~~~
2
+
3
+ ${s}Attempting to pull configuration...
4
+
5
+ ~~~`));let _=u(p,e.apiKey);try{let c=await m(_,{dataSiloIds:d,integrationNames:T,resources:C,pageSize:S,debug:a,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:y}),w=k(t,`${e.organizationName}.yml`);o.info(n.magenta(`Writing configuration to file "${w}"...`)),l(w,c),o.info(n.green(`${s}Successfully pulled configuration!`))}catch(c){o.error(n.red(`${s}Failed to sync configuration. - ${c.message}`)),r.push(e.organizationName)}}),r.length>0&&(o.info(n.red(`Sync encountered errors for "${r.join(",")}". View output above for more information, or check out ${f}`)),process.exit(1))}}export{M as pull};
6
+ //# sourceMappingURL=impl-42N5BEEM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/pull/impl.ts"],"sourcesContent":["import { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport type { LocalContext } from '@/context';\nimport { TranscendPullResource } from '@/enums';\nimport {\n DEFAULT_CONSENT_TRACKER_STATUSES,\n DEFAULT_TRANSCEND_PULL_RESOURCES,\n} from './command';\n\nimport { logger } from '@/logger';\nimport colors from 'colors';\nimport { mapSeries } from '@/lib/bluebird-replace';\nimport { join } from 'path';\nimport fs from 'fs';\nimport {\n buildTranscendGraphQLClient,\n pullTranscendConfiguration,\n} from '@/lib/graphql';\n\nimport { writeTranscendYaml } from '@/lib/readTranscendYaml';\nimport { ADMIN_DASH_INTEGRATIONS } from '@/constants';\nimport { validateTranscendAuth } from '@/lib/api-keys';\n\ninterface PullCommandFlags {\n auth: string;\n resources?: (TranscendPullResource | 'all')[];\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n integrationNames?: string[];\n trackerStatuses?: ConsentTrackerStatus[];\n pageSize: number;\n skipDatapoints: boolean;\n skipSubDatapoints: boolean;\n includeGuessedCategories: boolean;\n debug: boolean;\n}\n\nexport async function pull(\n this: LocalContext,\n {\n auth,\n resources = DEFAULT_TRANSCEND_PULL_RESOURCES,\n file,\n transcendUrl,\n dataSiloIds = [],\n integrationNames = [],\n trackerStatuses = DEFAULT_CONSENT_TRACKER_STATUSES,\n pageSize,\n skipDatapoints,\n skipSubDatapoints,\n includeGuessedCategories,\n debug,\n }: PullCommandFlags,\n): Promise<void> {\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n const resourcesToPull: TranscendPullResource[] = resources.includes('all')\n ? Object.values(TranscendPullResource)\n : (resources as TranscendPullResource[]);\n\n // Sync to Disk\n if (typeof apiKeyOrList === 'string') {\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKeyOrList);\n\n const configuration = await pullTranscendConfiguration(client, {\n dataSiloIds,\n integrationNames,\n resources: resourcesToPull,\n pageSize,\n debug,\n skipDatapoints,\n skipSubDatapoints,\n includeGuessedCategories,\n trackerStatuses,\n });\n\n logger.info(colors.magenta(`Writing configuration to file \"${file}\"...`));\n writeTranscendYaml(file, configuration);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the schema: ${\n debug ? err.stack : err.message\n }`,\n ),\n );\n process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to disk at ${file}! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n } else {\n if (!fs.lstatSync(file).isDirectory()) {\n throw new Error(\n 'File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/',\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to pull configuration...\\n\\n~~~`,\n ),\n );\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKey.apiKey);\n\n try {\n const configuration = await pullTranscendConfiguration(client, {\n dataSiloIds,\n integrationNames,\n resources: resourcesToPull,\n pageSize,\n debug,\n skipDatapoints,\n skipSubDatapoints,\n includeGuessedCategories,\n trackerStatuses,\n });\n\n const filePath = join(file, `${apiKey.organizationName}.yml`);\n logger.info(\n colors.magenta(`Writing configuration to file \"${filePath}\"...`),\n );\n writeTranscendYaml(filePath, configuration);\n\n logger.info(\n colors.green(`${prefix}Successfully pulled configuration!`),\n );\n } catch (err) {\n logger.error(\n colors.red(`${prefix}Failed to sync configuration. - ${err.message}`),\n );\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n process.exit(1);\n }\n }\n}\n"],"mappings":"mYASA,OAAOA,MAAY,SAEnB,OAAS,QAAAC,MAAY,OACrB,OAAOC,MAAQ,KAyBf,eAAsBC,EAEpB,CACE,KAAAC,EACA,UAAAC,EAAYC,EACZ,KAAAC,EACA,aAAAC,EACA,YAAAC,EAAc,CAAC,EACf,iBAAAC,EAAmB,CAAC,EACpB,gBAAAC,EAAkBC,EAClB,SAAAC,EACA,eAAAC,EACA,kBAAAC,EACA,yBAAAC,EACA,MAAAC,CACF,EACe,CAEf,IAAMC,EAAe,MAAMC,EAAsBf,CAAI,EAE/CgB,EAA2Cf,EAAU,SAAS,KAAK,EACrE,OAAO,OAAOgB,CAAqB,EAClChB,EAGL,GAAI,OAAOa,GAAiB,SAAU,CACpC,GAAI,CAEF,IAAMI,EAASC,EAA4Bf,EAAcU,CAAY,EAE/DM,EAAgB,MAAMC,EAA2BH,EAAQ,CAC7D,YAAAb,EACA,iBAAAC,EACA,UAAWU,EACX,SAAAP,EACA,MAAAI,EACA,eAAAH,EACA,kBAAAC,EACA,yBAAAC,EACA,gBAAAL,CACF,CAAC,EAEDe,EAAO,KAAKC,EAAO,QAAQ,kCAAkCpB,CAAI,MAAM,CAAC,EACxEqB,EAAmBrB,EAAMiB,CAAa,CACxC,OAASK,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AC,EAElB,CACF","names":["colors","join","fs","pull","auth","resources","DEFAULT_TRANSCEND_PULL_RESOURCES","file","transcendUrl","dataSiloIds","integrationNames","trackerStatuses","DEFAULT_CONSENT_TRACKER_STATUSES","pageSize","skipDatapoints","skipSubDatapoints","includeGuessedCategories","debug","apiKeyOrList","validateTranscendAuth","resourcesToPull","TranscendPullResource","client","buildTranscendGraphQLClient","configuration","pullTranscendConfiguration","logger","colors","writeTranscendYaml","err","ADMIN_DASH_INTEGRATIONS","fs","encounteredErrors","mapSeries","apiKey","ind","prefix","filePath","join"]}
@@ -0,0 +1,2 @@
1
+ import{S as r}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function m({auth:n,enricherId:s,actions:i,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e,createdAtAfter:t,concurrency:o,transcendUrl:u}){await r({auth:n,enricherId:s,requestActions:i,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e?new Date(e):void 0,createdAtAfter:t?new Date(t):void 0,concurrency:o,transcendUrl:u})}export{m as enricherRestart};
2
+ //# sourceMappingURL=impl-4CRAE4V6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/enricher-restart/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { bulkRetryEnrichers } from '@/lib/requests';\nimport type {\n RequestAction,\n RequestEnricherStatus,\n} from '@transcend-io/privacy-types';\n\ninterface EnricherRestartCommandFlags {\n auth: string;\n enricherId: string;\n actions?: RequestAction[];\n requestEnricherStatuses?: RequestEnricherStatus[];\n transcendUrl: string;\n concurrency: number;\n requestIds?: string[];\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n}\n\nexport async function enricherRestart(\n this: LocalContext,\n {\n auth,\n enricherId,\n actions,\n requestEnricherStatuses,\n requestIds,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: EnricherRestartCommandFlags,\n): Promise<void> {\n await bulkRetryEnrichers({\n auth,\n enricherId,\n requestActions: actions,\n requestEnricherStatuses,\n requestIds,\n createdAtBefore: createdAtBefore ? new Date(createdAtBefore) : undefined,\n createdAtAfter: createdAtAfter ? new Date(createdAtAfter) : undefined,\n concurrency,\n transcendUrl,\n });\n}\n"],"mappings":"oLAmBA,eAAsBA,EAEpB,CACE,KAAAC,EACA,WAAAC,EACA,QAAAC,EACA,wBAAAC,EACA,WAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,aAAAC,CACF,EACe,CACf,MAAMC,EAAmB,CACvB,KAAAT,EACA,WAAAC,EACA,eAAgBC,EAChB,wBAAAC,EACA,WAAAC,EACA,gBAAiBC,EAAkB,IAAI,KAAKA,CAAe,EAAI,OAC/D,eAAgBC,EAAiB,IAAI,KAAKA,CAAc,EAAI,OAC5D,YAAAC,EACA,aAAAC,CACF,CAAC,CACH","names":["enricherRestart","auth","enricherId","actions","requestEnricherStatuses","requestIds","createdAtBefore","createdAtAfter","concurrency","transcendUrl","bulkRetryEnrichers"]}
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-HGLIJXXG.js";import"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function c({auth:n,transcendUrl:e,file:i,concurrency:r,actions:o,sombraAuth:s}){await t({file:i,transcendUrl:e,concurrency:r,requestActions:o,auth:n,sombraAuth:s})}export{c as pullIdentifiers};
2
+ //# sourceMappingURL=impl-5N4IKF4U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/preflight/pull-identifiers/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { pullManualEnrichmentIdentifiersToCsv } from '@/lib/manual-enrichment';\nimport type { RequestAction } from '@transcend-io/privacy-types';\n\ninterface PullIdentifiersCommandFlags {\n auth: string;\n sombraAuth?: string;\n transcendUrl: string;\n file: string;\n actions?: RequestAction[];\n concurrency: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n concurrency,\n actions,\n sombraAuth,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"],"mappings":"4OAaA,eAAsBA,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,KAAAC,EACA,YAAAC,EACA,QAAAC,EACA,WAAAC,CACF,EACe,CACf,MAAMC,EAAqC,CACzC,KAAAJ,EACA,aAAAD,EACA,YAAAE,EACA,eAAgBC,EAChB,KAAAJ,EACA,WAAAK,CACF,CAAC,CACH","names":["pullIdentifiers","auth","transcendUrl","file","concurrency","actions","sombraAuth","pullManualEnrichmentIdentifiersToCsv"]}
@@ -0,0 +1,2 @@
1
+ import{b as r}from"./chunk-R6QTIUFA.js";import{g as t}from"./chunk-UK7OFHQR.js";import"./chunk-FSJPJZNH.js";import"./chunk-TR32ZRNC.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import"./chunk-WEQUQAB7.js";import{a as n}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import e from"colors";import{writeFileSync as g}from"fs";async function C({auth:d,xdiLocation:s,file:i,removeIpAddresses:c,domainBlockList:o,xdiAllowedCommands:l,transcendUrl:a}){let m=await r(d),{syncGroups:p,html:f}=await t(m,{xdiLocation:s,transcendUrl:a,removeIpAddresses:c,domainBlockList:o.length>0?o:void 0,xdiAllowedCommands:l});n.info(e.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(p,null,2)}`)),g(i,f),n.info(e.green(`Wrote configuration to file "${i}"!`))}export{C as buildXdiSyncEndpoint};
2
+ //# sourceMappingURL=impl-5NAYXPAC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/build-xdi-sync-endpoint/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { logger } from '@/logger';\nimport colors from 'colors';\nimport { writeFileSync } from 'fs';\nimport { validateTranscendAuth } from '@/lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '@/lib/consent-manager';\n\ninterface BuildXdiSyncEndpointCommandFlags {\n auth: string;\n xdiLocation: string;\n file: string;\n removeIpAddresses: boolean;\n domainBlockList: string[];\n xdiAllowedCommands: string;\n transcendUrl: string;\n}\n\nexport async function buildXdiSyncEndpoint(\n this: LocalContext,\n {\n auth,\n xdiLocation,\n file,\n removeIpAddresses,\n domainBlockList,\n xdiAllowedCommands,\n transcendUrl,\n }: BuildXdiSyncEndpointCommandFlags,\n): Promise<void> {\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Build the sync endpoint\n const { syncGroups, html } = await buildXdiSyncEndpointHelper(apiKeyOrList, {\n xdiLocation,\n transcendUrl,\n removeIpAddresses,\n domainBlockList: domainBlockList.length > 0 ? domainBlockList : undefined,\n xdiAllowedCommands,\n });\n\n // Log success\n logger.info(\n colors.green(\n `Successfully constructed sync endpoint for sync groups: ${JSON.stringify(\n syncGroups,\n null,\n 2,\n )}`,\n ),\n );\n\n // Write to disk\n writeFileSync(file, html);\n logger.info(colors.green(`Wrote configuration to file \"${file}\"!`));\n}\n"],"mappings":"wVAEA,OAAOA,MAAY,SACnB,OAAS,iBAAAC,MAAqB,KAc9B,eAAsBC,EAEpB,CACE,KAAAC,EACA,YAAAC,EACA,KAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,aAAAC,CACF,EACe,CAEf,IAAMC,EAAe,MAAMC,EAAsBR,CAAI,EAG/C,CAAE,WAAAS,EAAY,KAAAC,CAAK,EAAI,MAAMX,EAA2BQ,EAAc,CAC1E,YAAAN,EACA,aAAAK,EACA,kBAAAH,EACA,gBAAiBC,EAAgB,OAAS,EAAIA,EAAkB,OAChE,mBAAAC,CACF,CAAC,EAGDM,EAAO,KACLC,EAAO,MACL,2DAA2D,KAAK,UAC9DH,EACA,KACA,CACF,CAAC,EACH,CACF,EAGAI,EAAcX,EAAMQ,CAAI,EACxBC,EAAO,KAAKC,EAAO,MAAM,gCAAgCV,CAAI,IAAI,CAAC,CACpE","names":["colors","writeFileSync","buildXdiSyncEndpoint","auth","xdiLocation","file","removeIpAddresses","domainBlockList","xdiAllowedCommands","transcendUrl","apiKeyOrList","validateTranscendAuth","syncGroups","html","logger","colors","writeFileSync"]}
@@ -0,0 +1,2 @@
1
+ import{e as c}from"./chunk-OEB7WG3G.js";import{ia as i}from"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{a}from"./chunk-43JWXG77.js";import"./chunk-ARVEJERC.js";import*as p from"io-ts";import m from"colors";import{existsSync as u,readFileSync as g}from"fs";import{decodeCodec as d}from"@transcend-io/type-utils";import{ConsentTrackerStatus as l,DataFlowScope as C}from"@transcend-io/privacy-types";function P({file:e,output:n}){u(e)||(a.error(m.red(`File does not exist: --file="${e}"`)),process.exit(1));let f=d(p.array(i),g(e,"utf-8")),t=[],r=[];f.forEach(s=>{s.dataFlows.filter(({type:o})=>o!==C.CSP).forEach(o=>{t.push({value:o.value,type:o.type,status:l.Live,trackingPurposes:o.trackingPurposes})}),s.cookies.forEach(o=>{r.push({name:o.name,status:l.Live,trackingPurposes:o.trackingPurposes})})}),c(n,{"data-flows":t,cookies:r}),a.info(m.green(`Successfully wrote ${t.length} data flows and ${r.length} cookies to file "${n}"`))}export{P as consentManagerServiceJsonToYml};
2
+ //# sourceMappingURL=impl-5YV7K446.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/consent-manager-service-json-to-yml/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport * as t from 'io-ts';\nimport { writeTranscendYaml } from '@/lib/readTranscendYaml';\nimport colors from 'colors';\nimport { logger } from '@/logger';\nimport { existsSync, readFileSync } from 'fs';\nimport { decodeCodec } from '@transcend-io/type-utils';\nimport {\n ConsentManagerServiceMetadata,\n CookieInput,\n DataFlowInput,\n} from '@/codecs';\nimport {\n ConsentTrackerStatus,\n DataFlowScope,\n} from '@transcend-io/privacy-types';\n\ninterface ConsentManagerServiceJsonToYmlCommandFlags {\n file: string;\n output: string;\n}\n\nexport function consentManagerServiceJsonToYml(\n this: LocalContext,\n { file, output }: ConsentManagerServiceJsonToYmlCommandFlags,\n): void {\n // Ensure files exist\n if (!existsSync(file)) {\n logger.error(colors.red(`File does not exist: --file=\"${file}\"`));\n process.exit(1);\n }\n\n // Read in each consent manager configuration\n const services = decodeCodec(\n t.array(ConsentManagerServiceMetadata),\n readFileSync(file, 'utf-8'),\n );\n\n // Create data flows and cookie configurations\n const dataFlows: DataFlowInput[] = [];\n const cookies: CookieInput[] = [];\n services.forEach((service) => {\n service.dataFlows\n .filter(({ type }) => type !== DataFlowScope.CSP)\n .forEach((dataFlow) => {\n dataFlows.push({\n value: dataFlow.value,\n type: dataFlow.type,\n status: ConsentTrackerStatus.Live,\n trackingPurposes: dataFlow.trackingPurposes,\n });\n });\n\n service.cookies.forEach((cookie) => {\n cookies.push({\n name: cookie.name,\n status: ConsentTrackerStatus.Live,\n trackingPurposes: cookie.trackingPurposes,\n });\n });\n });\n\n // write to disk\n writeTranscendYaml(output, {\n 'data-flows': dataFlows,\n cookies,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${dataFlows.length} data flows and ${cookies.length} cookies to file \"${output}\"`,\n ),\n );\n}\n"],"mappings":"4KACA,UAAYA,MAAO,QAEnB,OAAOC,MAAY,SAEnB,OAAS,cAAAC,EAAY,gBAAAC,MAAoB,KACzC,OAAS,eAAAC,MAAmB,2BAM5B,OACE,wBAAAC,EACA,iBAAAC,MACK,8BAOA,SAASC,EAEd,CAAE,KAAAC,EAAM,OAAAC,CAAO,EACT,CAEDC,EAAWF,CAAI,IAClBG,EAAO,MAAMC,EAAO,IAAI,gCAAgCJ,CAAI,GAAG,CAAC,EAChE,QAAQ,KAAK,CAAC,GAIhB,IAAMK,EAAWC,EACb,QAAMC,CAA6B,EACrCC,EAAaR,EAAM,OAAO,CAC5B,EAGMS,EAA6B,CAAC,EAC9BC,EAAyB,CAAC,EAChCL,EAAS,QAASM,GAAY,CAC5BA,EAAQ,UACL,OAAO,CAAC,CAAE,KAAAC,CAAK,IAAMA,IAASd,EAAc,GAAG,EAC/C,QAASe,GAAa,CACrBJ,EAAU,KAAK,CACb,MAAOI,EAAS,MAChB,KAAMA,EAAS,KACf,OAAQhB,EAAqB,KAC7B,iBAAkBgB,EAAS,gBAC7B,CAAC,CACH,CAAC,EAEHF,EAAQ,QAAQ,QAASG,GAAW,CAClCJ,EAAQ,KAAK,CACX,KAAMI,EAAO,KACb,OAAQjB,EAAqB,KAC7B,iBAAkBiB,EAAO,gBAC3B,CAAC,CACH,CAAC,CACH,CAAC,EAGDC,EAAmBd,EAAQ,CACzB,aAAcQ,EACd,QAAAC,CACF,CAAC,EAEDP,EAAO,KACLC,EAAO,MACL,sBAAsBK,EAAU,MAAM,mBAAmBC,EAAQ,MAAM,qBAAqBT,CAAM,GACpG,CACF,CACF","names":["t","colors","existsSync","readFileSync","decodeCodec","ConsentTrackerStatus","DataFlowScope","consentManagerServiceJsonToYml","file","output","existsSync","logger","colors","services","decodeCodec","ConsentManagerServiceMetadata","readFileSync","dataFlows","cookies","service","type","dataFlow","cookie","writeTranscendYaml"]}
@@ -0,0 +1,2 @@
1
+ import{c as o}from"./chunk-UK7OFHQR.js";import"./chunk-FSJPJZNH.js";import"./chunk-TR32ZRNC.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function i({auth:t,trackerStatus:r,file:s,transcendUrl:a}){await o({auth:t,trackerStatus:r,file:s,transcendUrl:a})}export{i as uploadCookiesFromCsv};
2
+ //# sourceMappingURL=impl-645HDE5S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/upload-cookies-from-csv/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { uploadCookiesFromCsv as uploadCookiesFromCsvHelper } from '@/lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\n\ninterface UploadCookiesFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n transcendUrl: string;\n}\n\nexport async function uploadCookiesFromCsv(\n this: LocalContext,\n { auth, trackerStatus, file, transcendUrl }: UploadCookiesFromCsvCommandFlags,\n): Promise<void> {\n // Upload cookies\n await uploadCookiesFromCsvHelper({\n auth,\n trackerStatus,\n file,\n transcendUrl,\n });\n}\n"],"mappings":"oSAWA,eAAsBA,EAEpB,CAAE,KAAAC,EAAM,cAAAC,EAAe,KAAAC,EAAM,aAAAC,CAAa,EAC3B,CAEf,MAAMJ,EAA2B,CAC/B,KAAAC,EACA,cAAAC,EACA,KAAAC,EACA,aAAAC,CACF,CAAC,CACH","names":["uploadCookiesFromCsv","auth","trackerStatus","file","transcendUrl"]}
@@ -0,0 +1,9 @@
1
+ import{b as O}from"./chunk-R6QTIUFA.js";import"./chunk-UUBO75GS.js";import{c as v}from"./chunk-MA4JWWRO.js";import{d as b}from"./chunk-UK7OFHQR.js";import"./chunk-FSJPJZNH.js";import"./chunk-TR32ZRNC.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{a as M,pe as x,sc as S}from"./chunk-WEQUQAB7.js";import{a as t}from"./chunk-43JWXG77.js";import{c as y}from"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import e from"colors";import{join as w}from"path";import E,{existsSync as j,mkdirSync as T}from"fs";async function q({auth:A,start:C,end:f,folder:r,bin:l,transcendUrl:N}){let m=await O(A);E.existsSync(r)&&!E.lstatSync(r).isDirectory()&&(t.error(e.red('The provided argument "folder" was passed a file. expected: folder="./consent-metrics/"')),process.exit(1));let g=l;Object.values(S).includes(g)||(t.error(e.red(`Failed to parse argument "bin" with value "${l}"
2
+ Expected one of:
3
+ ${Object.values(S).join(`
4
+ `)}`)),process.exit(1));let i=new Date(C),o=f?new Date(f):new Date;if(Number.isNaN(i.getTime())&&(t.error(e.red(`Start date provided is invalid date. Got --start="${C}" expected --start="01/01/2023"`)),process.exit(1)),Number.isNaN(o.getTime())&&(t.error(e.red(`End date provided is invalid date. Got --end="${f}" expected --end="01/01/2023"`)),process.exit(1)),i>o&&(t.error(e.red(`Got a start date "${i.toISOString()}" that was larger than the end date "${o.toISOString()}". Start date must be before end date.`)),process.exit(1)),j(r)||T(r),t.info(e.magenta(`Pulling consent metrics from start=${i.toString()} to end=${o.toISOString()} with bin size "${l}"`)),typeof m=="string"){try{let n=x(N,m),s=await b(n,{bin:g,start:i,end:o});Object.entries(s).forEach(([p,c])=>{c.forEach(({points:u,name:d})=>{let a=w(r,`${p}_${d}.csv`);t.info(e.magenta(`Writing configuration to file "${a}"...`)),v(a,u.map(({key:$,value:h})=>({timestamp:$,value:h})))})})}catch(n){t.error(e.red(`An error occurred syncing the schema: ${n.message}`)),process.exit(1)}t.info(e.green(`Successfully synced consent metrics to disk in folder "${r}"! View at ${y}`))}else{let n=[];await M(m,async(s,p)=>{let c=`[${p+1}/${m.length}][${s.organizationName}] `;t.info(e.magenta(`~~~
5
+
6
+ ${c}Attempting to pull consent metrics...
7
+
8
+ ~~~`));let u=x(N,s.apiKey);try{let d=await b(u,{bin:g,start:i,end:o}),a=w(r,s.organizationName);j(a)||T(a),Object.entries(d).forEach(([$,h])=>{h.forEach(({points:I,name:F})=>{let D=w(a,`${$}_${F}.csv`);t.info(e.magenta(`Writing configuration to file "${D}"...`)),v(D,I.map(({key:G,value:z})=>({timestamp:G,value:z})))})}),t.info(e.green(`${c}Successfully pulled configuration!`))}catch{t.error(e.red(`${c}Failed to sync configuration.`)),n.push(s.organizationName)}}),n.length>0&&(t.info(e.red(`Sync encountered errors for "${n.join(",")}". View output above for more information, or check out ${y}`)),process.exit(1))}}export{q as pullConsentMetrics};
9
+ //# sourceMappingURL=impl-7DL7ZS4K.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/pull-consent-metrics/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { logger } from '@/logger';\nimport colors from 'colors';\nimport { mapSeries } from '@/lib/bluebird-replace';\nimport { join } from 'path';\nimport fs, { existsSync, mkdirSync } from 'fs';\nimport {\n buildTranscendGraphQLClient,\n ConsentManagerMetricBin,\n} from '@/lib/graphql';\nimport { validateTranscendAuth } from '@/lib/api-keys';\nimport { ADMIN_DASH_INTEGRATIONS } from '@/constants';\nimport { pullConsentManagerMetrics } from '@/lib/consent-manager';\nimport { writeCsv } from '@/lib/cron';\n\ninterface PullConsentMetricsCommandFlags {\n auth: string;\n start: Date;\n end?: Date;\n folder: string;\n bin: string;\n transcendUrl: string;\n}\n\nexport async function pullConsentMetrics(\n this: LocalContext,\n {\n auth,\n start,\n end,\n folder,\n bin,\n transcendUrl,\n }: PullConsentMetricsCommandFlags,\n): Promise<void> {\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Ensure folder either does not exist or is not a file\n if (fs.existsSync(folder) && !fs.lstatSync(folder).isDirectory()) {\n logger.error(\n colors.red(\n 'The provided argument \"folder\" was passed a file. expected: folder=\"./consent-metrics/\"',\n ),\n );\n process.exit(1);\n }\n\n // Validate bin\n const parsedBin = bin as ConsentManagerMetricBin;\n if (!Object.values(ConsentManagerMetricBin).includes(parsedBin)) {\n logger.error(\n colors.red(\n `Failed to parse argument \"bin\" with value \"${bin}\"\\n` +\n `Expected one of: \\n${Object.values(ConsentManagerMetricBin).join(\n '\\n',\n )}`,\n ),\n );\n process.exit(1);\n }\n\n // Parse the dates\n const startDate = new Date(start);\n const endDate = end ? new Date(end) : new Date();\n if (Number.isNaN(startDate.getTime())) {\n logger.error(\n colors.red(\n `Start date provided is invalid date. Got --start=\"${start}\" expected --start=\"01/01/2023\"`,\n ),\n );\n process.exit(1);\n }\n if (Number.isNaN(endDate.getTime())) {\n logger.error(\n colors.red(\n `End date provided is invalid date. Got --end=\"${end}\" expected --end=\"01/01/2023\"`,\n ),\n );\n process.exit(1);\n }\n if (startDate > endDate) {\n logger.error(\n colors.red(\n `Got a start date \"${startDate.toISOString()}\" that was larger than the end date \"${endDate.toISOString()}\". ` +\n 'Start date must be before end date.',\n ),\n );\n process.exit(1);\n }\n\n // Create the folder if it does not exist\n if (!existsSync(folder)) {\n mkdirSync(folder);\n }\n\n logger.info(\n colors.magenta(\n `Pulling consent metrics from start=${startDate.toString()} to end=${endDate.toISOString()} with bin size \"${bin}\"`,\n ),\n );\n\n // Sync to Disk\n if (typeof apiKeyOrList === 'string') {\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKeyOrList);\n\n // Pull the metrics\n const configuration = await pullConsentManagerMetrics(client, {\n bin: parsedBin,\n start: startDate,\n end: endDate,\n });\n\n // Write to file\n Object.entries(configuration).forEach(([metricName, metrics]) => {\n metrics.forEach(({ points, name }) => {\n const file = join(folder, `${metricName}_${name}.csv`);\n logger.info(\n colors.magenta(`Writing configuration to file \"${file}\"...`),\n );\n writeCsv(\n file,\n points.map(({ key, value }) => ({\n timestamp: key,\n value,\n })),\n );\n });\n });\n } catch (err) {\n logger.error(\n colors.red(`An error occurred syncing the schema: ${err.message}`),\n );\n process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced consent metrics to disk in folder \"${folder}\"! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n } else {\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to pull consent metrics...\\n\\n~~~`,\n ),\n );\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, apiKey.apiKey);\n\n try {\n const configuration = await pullConsentManagerMetrics(client, {\n bin: parsedBin,\n start: startDate,\n end: endDate,\n });\n\n // ensure folder exists for that organization\n const subFolder = join(folder, apiKey.organizationName);\n if (!existsSync(subFolder)) {\n mkdirSync(subFolder);\n }\n\n // Write to file\n Object.entries(configuration).forEach(([metricName, metrics]) => {\n metrics.forEach(({ points, name }) => {\n const file = join(subFolder, `${metricName}_${name}.csv`);\n logger.info(\n colors.magenta(`Writing configuration to file \"${file}\"...`),\n );\n writeCsv(\n file,\n points.map(({ key, value }) => ({\n timestamp: key,\n value,\n })),\n );\n });\n });\n\n logger.info(\n colors.green(`${prefix}Successfully pulled configuration!`),\n );\n } catch (err) {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n process.exit(1);\n }\n }\n}\n"],"mappings":"ocAEA,OAAOA,MAAY,SAEnB,OAAS,QAAAC,MAAY,OACrB,OAAOC,GAAM,cAAAC,EAAY,aAAAC,MAAiB,KAmB1C,eAAsBC,EAEpB,CACE,KAAAC,EACA,MAAAC,EACA,IAAAC,EACA,OAAAC,EACA,IAAAC,EACA,aAAAC,CACF,EACe,CAEf,IAAMC,EAAe,MAAMC,EAAsBP,CAAI,EAGjDQ,EAAG,WAAWL,CAAM,GAAK,CAACK,EAAG,UAAUL,CAAM,EAAE,YAAY,IAC7DM,EAAO,MACLC,EAAO,IACL,yFACF,CACF,EACA,QAAQ,KAAK,CAAC,GAIhB,IAAMC,EAA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AAC,CACF,EAAE,CACJ,CACF,CAAC,CACH,CAAC,EAEDpB,EAAO,KACLC,EAAO,MAAM,GAAG0B,CAAM,oCAAoC,CAC5D,CACF,MAAc,CACZ3B,EAAO,MAAMC,EAAO,IAAI,GAAG0B,CAAM,+BAA+B,CAAC,EACjEJ,EAAkB,KAAKE,EAAO,gBAAgB,CAChD,CACF,CAAC,EAEGF,EAAkB,OAAS,IAC7BvB,EAAO,KACLC,EAAO,IACL,gCAAgCsB,EAAkB,KAChD,GACF,CAAC,2DAA2DD,CAAuB,EACrF,CACF,EAEA,QAAQ,KAAK,CAAC,EAElB,CACF","names":["colors","join","fs","existsSync","mkdirSync","pullConsentMetrics","auth","start","end","folder","bin","transcendUrl","apiKeyOrList","validateTranscendAuth","fs","logger","colors","parsedBin","ConsentManagerMetricBin","startDate","endDate","existsSync","mkdirSync","client","buildTranscendGraphQLClient","configuration","pullConsentManagerMetrics","metricName","metrics","points","name","file","join","writeCsv","key","value","err","ADMIN_DASH_INTEGRATIONS","encounteredErrors","mapSeries","apiKey","ind","prefix","subFolder"]}
@@ -0,0 +1,2 @@
1
+ import"./chunk-UUBO75GS.js";import{c as i}from"./chunk-MA4JWWRO.js";import{j as s}from"./chunk-UK7OFHQR.js";import"./chunk-FSJPJZNH.js";import"./chunk-TR32ZRNC.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{qe as o}from"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function h({auth:a,partition:m,sombraAuth:c,file:p,transcendUrl:f,timestampBefore:e,timestampAfter:r,identifiers:n=[],concurrency:l}){let g=await o(f,a,c),u=await s(g,{partition:m,filterBy:{...e?{timestampBefore:e.toISOString()}:{},...r?{timestampAfter:r.toISOString()}:{},...n.length>0?{identifiers:n}:{}},limit:l});i(p,u.map(t=>({...t,purposes:JSON.stringify(t.purposes),...t.purposes})))}export{h as pullConsentPreferences};
2
+ //# sourceMappingURL=impl-7JFWBWQZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/pull-consent-preferences/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\n\nimport { fetchConsentPreferences } from '@/lib/consent-manager';\nimport { writeCsv } from '@/lib/cron';\nimport { createSombraGotInstance } from '@/lib/graphql';\n\ninterface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n timestampAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n}\n\nexport async function pullConsentPreferences(\n this: LocalContext,\n {\n auth,\n partition,\n sombraAuth,\n file,\n transcendUrl,\n timestampBefore,\n timestampAfter,\n identifiers = [],\n concurrency,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n\n // Fetch preferences\n const preferences = await fetchConsentPreferences(sombra, {\n partition,\n filterBy: {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter\n ? { timestampAfter: timestampAfter.toISOString() }\n : {}),\n ...(identifiers.length > 0 ? { identifiers } : {}),\n },\n limit: concurrency,\n });\n\n // Write to disk\n writeCsv(\n file,\n preferences.map((pref) => ({\n ...pref,\n purposes: JSON.stringify(pref.purposes),\n ...pref.purposes,\n })),\n );\n}\n"],"mappings":"qXAkBA,eAAsBA,EAEpB,CACE,KAAAC,EACA,UAAAC,EACA,WAAAC,EACA,KAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,YAAAC,EAAc,CAAC,EACf,YAAAC,CACF,EACe,CAEf,IAAMC,EAAS,MAAMC,EAAwBN,EAAcJ,EAAME,CAAU,EAGrES,EAAc,MAAMC,EAAwBH,EAAQ,CACxD,UAAAR,EACA,SAAU,CACR,GAAII,EACA,CAAE,gBAAiBA,EAAgB,YAAY,CAAE,EACjD,CAAC,EACL,GAAIC,EACA,CAAE,eAAgBA,EAAe,YAAY,CAAE,EAC/C,CAAC,EACL,GAAIC,EAAY,OAAS,EAAI,CAAE,YAAAA,CAAY,EAAI,CAAC,CAClD,EACA,MAAOC,CACT,CAAC,EAGDK,EACEV,EACAQ,EAAY,IAAKG,IAAU,CACzB,GAAGA,EACH,SAAU,KAAK,UAAUA,EAAK,QAAQ,EACtC,GAAGA,EAAK,QACV,EAAE,CACJ,CACF","names":["pullConsentPreferences","auth","partition","sombraAuth","file","transcendUrl","timestampBefore","timestampAfter","identifiers","concurrency","sombra","createSombraGotInstance","preferences","fetchConsentPreferences","writeCsv","pref"]}
@@ -0,0 +1,2 @@
1
+ import{b as n,f as r}from"./chunk-FSJPJZNH.js";import{q as e}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function d({base64EncryptionKey:o,base64SigningKey:t,partition:s,file:i,consentUrl:a,concurrency:c}){let m=e(i,n);await r({base64EncryptionKey:o,base64SigningKey:t,preferences:m,partition:s,concurrency:c,transcendUrl:a})}export{d as uploadConsentPreferences};
2
+ //# sourceMappingURL=impl-B4WDU4OW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/upload-consent-preferences/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\n\nimport { uploadConsents } from '@/lib/consent-manager/uploadConsents';\nimport { ConsentPreferenceUpload } from '@/lib/consent-manager/types';\nimport { readCsv } from '@/lib/requests';\n\ninterface UploadConsentPreferencesCommandFlags {\n base64EncryptionKey: string;\n base64SigningKey: string;\n partition: string;\n file: string;\n consentUrl: string;\n concurrency: number;\n}\n\nexport async function uploadConsentPreferences(\n this: LocalContext,\n {\n base64EncryptionKey,\n base64SigningKey,\n partition,\n file,\n consentUrl,\n concurrency,\n }: UploadConsentPreferencesCommandFlags,\n): Promise<void> {\n // Load in preferences from csv\n const preferences = readCsv(file, ConsentPreferenceUpload);\n\n // Upload cookies\n await uploadConsents({\n base64EncryptionKey,\n base64SigningKey,\n preferences,\n partition,\n concurrency,\n transcendUrl: consentUrl,\n });\n}\n"],"mappings":"mOAeA,eAAsBA,EAEpB,CACE,oBAAAC,EACA,iBAAAC,EACA,UAAAC,EACA,KAAAC,EACA,WAAAC,EACA,YAAAC,CACF,EACe,CAEf,IAAMC,EAAcC,EAAQJ,EAAMK,CAAuB,EAGzD,MAAMC,EAAe,CACnB,oBAAAT,EACA,iBAAAC,EACA,YAAAK,EACA,UAAAJ,EACA,YAAAG,EACA,aAAcD,CAChB,CAAC,CACH","names":["uploadConsentPreferences","base64EncryptionKey","base64SigningKey","partition","file","consentUrl","concurrency","preferences","readCsv","ConsentPreferenceUpload","uploadConsents"]}
@@ -0,0 +1,2 @@
1
+ import{b as d}from"./chunk-GSXHJEKW.js";import"./chunk-UUBO75GS.js";import{c as u}from"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import{pe as c}from"./chunk-WEQUQAB7.js";import{a as e}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import i from"colors";import{uniq as b}from"lodash-es";async function x({auth:l,file:s,transcendUrl:m,dataSiloIds:f,subCategories:p,status:g,includeEncryptedSnippets:a}){try{let o=c(m,l),C=await d(o,{dataSiloIds:f,subCategories:p,status:g,includeEncryptedSnippets:a});e.info(i.magenta(`Writing unstructured discovery files to file "${s}"...`));let r=[],S=C.map(t=>{let n={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...a?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return r=b([...r,...Object.keys(n)]),n});u(s,S,r)}catch(o){e.error(i.red(`An error occurred syncing the unstructured discovery files: ${o.message}`)),process.exit(1)}e.info(i.green(`Successfully synced unstructured discovery files to disk at ${s}!`))}export{x as pullUnstructuredDiscoveryFiles};
2
+ //# sourceMappingURL=impl-B5C37V2L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/pull-unstructured-discovery-files/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport type { UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { writeCsv } from '@/lib/cron';\nimport { pullUnstructuredSubDataPointRecommendations } from '@/lib/data-inventory';\nimport { buildTranscendGraphQLClient } from '@/lib/graphql';\nimport { logger } from '@/logger';\n\ninterface PullUnstructuredDiscoveryFilesCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n subCategories?: string[];\n status?: UnstructuredSubDataPointRecommendationStatus[];\n includeEncryptedSnippets: boolean;\n}\n\nexport async function pullUnstructuredDiscoveryFiles(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n subCategories,\n status,\n includeEncryptedSnippets,\n }: PullUnstructuredDiscoveryFilesCommandFlags,\n): Promise<void> {\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const entries = await pullUnstructuredSubDataPointRecommendations(client, {\n dataSiloIds,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n status,\n includeEncryptedSnippets,\n });\n\n logger.info(\n colors.magenta(\n `Writing unstructured discovery files to file \"${file}\"...`,\n ),\n );\n let headers: string[] = [];\n const inputs = entries.map((entry) => {\n const result = {\n 'Entry ID': entry.id,\n 'Data Silo ID': entry.dataSiloId,\n 'Object Path ID': entry.scannedObjectPathId,\n 'Object ID': entry.scannedObjectId,\n ...(includeEncryptedSnippets\n ? { Entry: entry.name, 'Context Snippet': entry.contextSnippet }\n : {}),\n 'Data Category': `${entry.dataSubCategory.category}:${entry.dataSubCategory.name}`,\n 'Classification Status': entry.status,\n 'Confidence Score': entry.confidence,\n 'Classification Method': entry.classificationMethod,\n 'Classifier Version': entry.classifierVersion,\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n writeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(\n `An error occurred syncing the unstructured discovery files: ${err.message}`,\n ),\n );\n process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced unstructured discovery files to disk at ${file}!`,\n ),\n );\n}\n"],"mappings":"6SAEA,OAAOA,MAAY,SACnB,OAAS,QAAAC,MAAY,YAgBrB,eAAsBC,EAEpB,CACE,KAAAC,EACA,KAAAC,EACA,aAAAC,EACA,YAAAC,EACA,cAAAC,EACA,OAAAC,EACA,yBAAAC,CACF,EACe,CACf,GAAI,CAEF,IAAMC,EAASC,EAA4BN,EAAcF,CAAI,EAEvDS,EAAU,MAAMC,EAA4CH,EAAQ,CACxE,YAAAJ,EACA,cAAAC,EACA,OAAAC,EACA,yBAAAC,CACF,CAAC,EAEDK,EAAO,KACLC,EAAO,QACL,iDAAiDX,CAAI,MACvD,CACF,EACA,IAAIY,EAAoB,CAAC,EACnBC,EAASL,EAAQ,IAAKM,GAAU,CACpC,IAAMC,EAAS,CACb,WAAYD,EAAM,GAClB,eAAgBA,EAAM,WACtB,iBAAkBA,EAAM,oBACxB,YAAaA,EAAM,gBACnB,GAAIT,EACA,CAAE,MAAOS,EAAM,KAAM,kBAAmBA,EAAM,cAAe,EAC7D,CAAC,EACL,gBAAiB,GAAGA,EAAM,gBAAgB,QAAQ,IAAIA,EAAM,gBAAgB,IAAI,GAChF,wBAAyBA,EAAM,OAC/B,mBAAoBA,EAAM,WAC1B,wBAAyBA,EAAM,qBAC/B,qBAAsBA,EAAM,iBAC9B,EACA,OAAAF,EAAUI,EAAK,CAAC,GAAGJ,EAAS,GAAG,OAAO,KAAKG,CAAM,CAAC,CAAC,EAC5CA,CACT,CAAC,EACDE,EAASjB,EAAMa,EAAQD,CAAO,CAChC,OAASM,EAAK,CACZR,EAAO,MACLC,EAAO,IACL,+DAA+DO,EAAI,OAAO,EAC5E,CACF,EACA,QAAQ,KAAK,CAAC,CAChB,CAGAR,EAAO,KACLC,EAAO,MACL,+DAA+DX,CAAI,GACrE,CACF,CACF","names":["colors","uniq","pullUnstructuredDiscoveryFiles","auth","file","transcendUrl","dataSiloIds","subCategories","status","includeEncryptedSnippets","client","buildTranscendGraphQLClient","entries","pullUnstructuredSubDataPointRecommendations","logger","colors","headers","inputs","entry","result","uniq","writeCsv","err"]}
@@ -0,0 +1,2 @@
1
+ import{Q as e}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function A({auth:t,requestReceiptFolder:s,sombraAuth:r,actions:a,statuses:o,requestIds:i,createdAt:n,emailIsVerified:c,silentModeBefore:u,sendEmailReceipt:d,copyIdentifiers:m,skipWaitingPeriod:l,createdAtBefore:p,createdAtAfter:f,concurrency:R,transcendUrl:q}){await e({requestReceiptFolder:s,auth:t,sombraAuth:r,requestActions:a,requestStatuses:o,requestIds:i,createdAt:n,emailIsVerified:c,silentModeBefore:u,sendEmailReceipt:d,copyIdentifiers:m,skipWaitingPeriod:l,createdAtBefore:p,createdAtAfter:f,concurrency:R,transcendUrl:q})}export{A as restart};
2
+ //# sourceMappingURL=impl-BWZUWHVF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/restart/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { bulkRestartRequests } from '@/lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\n\ninterface RestartCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses: RequestStatus[];\n transcendUrl: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n emailIsVerified: boolean;\n createdAt?: Date;\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n sendEmailReceipt: boolean;\n copyIdentifiers: boolean;\n skipWaitingPeriod: boolean;\n}\n\nexport async function restart(\n this: LocalContext,\n {\n auth,\n requestReceiptFolder,\n sombraAuth,\n actions,\n statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n }: RestartCommandFlags,\n): Promise<void> {\n await bulkRestartRequests({\n requestReceiptFolder,\n auth,\n sombraAuth,\n requestActions: actions,\n requestStatuses: statuses,\n requestIds,\n createdAt,\n emailIsVerified,\n silentModeBefore,\n sendEmailReceipt,\n copyIdentifiers,\n skipWaitingPeriod,\n createdAtBefore,\n createdAtAfter,\n concurrency,\n transcendUrl,\n });\n}\n"],"mappings":"oLAuBA,eAAsBA,EAEpB,CACE,KAAAC,EACA,qBAAAC,EACA,WAAAC,EACA,QAAAC,EACA,SAAAC,EACA,WAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,aAAAC,CACF,EACe,CACf,MAAMC,EAAoB,CACxB,qBAAAf,EACA,KAAAD,EACA,WAAAE,EACA,eAAgBC,EAChB,gBAAiBC,EACjB,WAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,YAAAC,EACA,aAAAC,CACF,CAAC,CACH","names":["restart","auth","requestReceiptFolder","sombraAuth","actions","statuses","requestIds","createdAt","emailIsVerified","silentModeBefore","sendEmailReceipt","copyIdentifiers","skipWaitingPeriod","createdAtBefore","createdAtAfter","concurrency","transcendUrl","bulkRestartRequests"]}
@@ -0,0 +1,2 @@
1
+ import{f as s}from"./chunk-UUBO75GS.js";import"./chunk-MA4JWWRO.js";import{q as a}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import{a as o}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import l from"colors";import*as t from"io-ts";var p=t.type({"Request Id":t.string});async function R({auth:r,dataSiloId:i,file:e,transcendUrl:m}){o.info(l.magenta(`Reading "${e}" from disk`));let n=a(e,p);await s({requestIds:n.map(d=>d["Request Id"]),transcendUrl:m,auth:r,dataSiloId:i})}export{R as markRequestDataSilosCompleted};
2
+ //# sourceMappingURL=impl-D47U6GWY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/system/mark-request-data-silos-completed/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport colors from 'colors';\nimport * as t from 'io-ts';\n\nimport { logger } from '@/logger';\nimport { markRequestDataSiloIdsCompleted } from '@/lib/cron';\nimport { readCsv } from '@/lib/requests';\n\nconst RequestIdRow = t.type({\n 'Request Id': t.string,\n});\n\ninterface MarkRequestDataSilosCompletedCommandFlags {\n auth: string;\n dataSiloId: string;\n file: string;\n transcendUrl: string;\n}\n\nexport async function markRequestDataSilosCompleted(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n file,\n transcendUrl,\n }: MarkRequestDataSilosCompletedCommandFlags,\n): Promise<void> {\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, RequestIdRow);\n\n await markRequestDataSiloIdsCompleted({\n requestIds: activeResults.map((request) => request['Request Id']),\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"],"mappings":"oQACA,OAAOA,MAAY,SACnB,UAAY,MAAO,QAMnB,IAAMC,EAAiB,OAAK,CAC1B,aAAgB,QAClB,CAAC,EASD,eAAsBC,EAEpB,CACE,KAAAC,EACA,WAAAC,EACA,KAAAC,EACA,aAAAC,CACF,EACe,CACfC,EAAO,KAAKC,EAAO,QAAQ,YAAYH,CAAI,aAAa,CAAC,EACzD,IAAMI,EAAgBC,EAAQL,EAAMJ,CAAY,EAEhD,MAAMU,EAAgC,CACpC,WAAYF,EAAc,IAAKG,GAAYA,EAAQ,YAAY,CAAC,EAChE,aAAAN,EACA,KAAAH,EACA,WAAAC,CACF,CAAC,CACH","names":["colors","RequestIdRow","markRequestDataSilosCompleted","auth","dataSiloId","file","transcendUrl","logger","colors","activeResults","readCsv","markRequestDataSiloIdsCompleted","request"]}
@@ -0,0 +1,2 @@
1
+ import{I as e}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function m({auth:t,actions:r,origins:o,silentModeBefore:i,createdAtBefore:n,createdAtAfter:a,transcendUrl:s,concurrency:c}){await e({transcendUrl:s,requestActions:r,auth:t,requestOrigins:o,concurrency:c,silentModeBefore:i,createdAtBefore:n,createdAtAfter:a})}export{m as approve};
2
+ //# sourceMappingURL=impl-FAOTDDQ5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/approve/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\n\nimport { RequestAction, RequestOrigin } from '@transcend-io/privacy-types';\nimport { approvePrivacyRequests } from '@/lib/requests';\n\ninterface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function approve(\n this: LocalContext,\n {\n auth,\n actions,\n origins,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n });\n}\n"],"mappings":"oLAgBA,eAAsBA,EAEpB,CACE,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,aAAAC,EACA,YAAAC,CACF,EACe,CACf,MAAMC,EAAuB,CAC3B,aAAAF,EACA,eAAgBL,EAChB,KAAAD,EACA,eAAgBE,EAChB,YAAAK,EACA,iBAAAJ,EACA,gBAAAC,EACA,eAAAC,CACF,CAAC,CACH","names":["approve","auth","actions","origins","silentModeBefore","createdAtBefore","createdAtAfter","transcendUrl","concurrency","approvePrivacyRequests"]}
@@ -0,0 +1,2 @@
1
+ import{b as p}from"./chunk-6WKTY4YQ.js";import"./chunk-R6QTIUFA.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{ke as c,pe as m}from"./chunk-WEQUQAB7.js";import{a as r}from"./chunk-43JWXG77.js";import{b as g}from"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import n from"colors";import{execSync as k}from"child_process";var l='A repository name must be provided. You can specify using --repositoryName=$REPO_NAME or by ensuring the command "git config --get remote.origin.url" returns the name of the repository';async function S({auth:d,scanPath:o,ignoreDirs:f,repositoryName:u,transcendUrl:y}){let e=u;if(!e)try{let t=k(`cd ${o} && git config --get remote.origin.url`).toString("utf-8").trim();[e]=t.includes("https:")?t.split("/").slice(3).join("/").split("."):(t.split(":").pop()||"").split("."),e||(r.error(n.red(l)),process.exit(1))}catch(a){r.error(n.red(`${l} - Got error: ${a.message}`)),process.exit(1)}let h=m(y,d),i=await p({scanPath:o,ignoreDirs:f,repositoryName:e});await c(h,i);let s=new URL(g);s.pathname="/code-scanning/code-packages",r.info(n.green(`Scan found ${i.length} packages at ${o}! View results at '${s.href}'`))}export{S as scanPackages};
2
+ //# sourceMappingURL=impl-FYAEBZIM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/scan-packages/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { logger } from '@/logger';\nimport colors from 'colors';\nimport { ADMIN_DASH } from '@/constants';\nimport { findCodePackagesInFolder } from '@/lib/code-scanning';\nimport { buildTranscendGraphQLClient, syncCodePackages } from '@/lib/graphql';\nimport { execSync } from 'child_process';\n\nconst REPO_ERROR =\n 'A repository name must be provided. ' +\n 'You can specify using --repositoryName=$REPO_NAME or by ensuring the ' +\n 'command \"git config --get remote.origin.url\" returns the name of the repository';\n\ninterface ScanPackagesCommandFlags {\n auth: string;\n scanPath: string;\n ignoreDirs?: string[];\n repositoryName?: string;\n transcendUrl: string;\n}\n\nexport async function scanPackages(\n this: LocalContext,\n {\n auth,\n scanPath,\n ignoreDirs,\n repositoryName,\n transcendUrl,\n }: ScanPackagesCommandFlags,\n): Promise<void> {\n // Ensure repository name is specified\n let gitRepositoryName = repositoryName;\n if (!gitRepositoryName) {\n try {\n const name = execSync(\n `cd ${scanPath} && git config --get remote.origin.url`,\n );\n // Trim and parse the URL\n const url = name.toString('utf-8').trim();\n [gitRepositoryName] = !url.includes('https:')\n ? (url.split(':').pop() || '').split('.')\n : url.split('/').slice(3).join('/').split('.');\n if (!gitRepositoryName) {\n logger.error(colors.red(REPO_ERROR));\n process.exit(1);\n }\n } catch (err) {\n logger.error(colors.red(`${REPO_ERROR} - Got error: ${err.message}`));\n process.exit(1);\n }\n }\n\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Scan the codebase to discovery packages\n const results = await findCodePackagesInFolder({\n scanPath,\n ignoreDirs,\n repositoryName: gitRepositoryName,\n });\n\n // Report scan to Transcend\n await syncCodePackages(client, results);\n\n const newUrl = new URL(ADMIN_DASH);\n newUrl.pathname = '/code-scanning/code-packages';\n\n // Indicate success\n logger.info(\n colors.green(\n `Scan found ${results.length} packages at ${scanPath}! ` +\n `View results at '${newUrl.href}'`,\n ),\n );\n}\n"],"mappings":"qTAEA,OAAOA,MAAY,SAInB,OAAS,YAAAC,MAAgB,gBAEzB,IAAMC,EACJ,2LAYF,eAAsBC,EAEpB,CACE,KAAAC,EACA,SAAAC,EACA,WAAAC,EACA,eAAAC,EACA,aAAAC,CACF,EACe,CAEf,IAAIC,EAAoBF,EACxB,GAAI,CAACE,EACH,GAAI,CAKF,IAAMC,EAJOT,EACX,MAAMI,CAAQ,wCAChB,EAEiB,SAAS,OAAO,EAAE,KAAK,EACxC,CAACI,CAAiB,EAAKC,EAAI,SAAS,QAAQ,EAExCA,EAAI,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,GAAG,GAD1CA,EAAI,MAAM,GAAG,EAAE,IAAI,GAAK,IAAI,MAAM,GAAG,EAErCD,IACHE,EAAO,MAAMC,EAAO,IAAIV,CAAU,CAAC,EACnC,QAAQ,KAAK,CAAC,EAElB,OAASW,EAAK,CACZF,EAAO,MAAMC,EAAO,IAAI,GAAGV,CAAU,iBAAiBW,EAAI,OAAO,EAAE,CAAC,EACpE,QAAQ,KAAK,CAAC,CAChB,CAIF,IAAMC,EAASC,EAA4BP,EAAcJ,CAAI,EAGvDY,EAAU,MAAMC,EAAyB,CAC7C,SAAAZ,EACA,WAAAC,EACA,eAAgBG,CAClB,CAAC,EAGD,MAAMS,EAAiBJ,EAAQE,CAAO,EAEtC,IAAMG,EAAS,IAAI,IAAIC,CAAU,EACjCD,EAAO,SAAW,+BAGlBR,EAAO,KACLC,EAAO,MACL,cAAcI,EAAQ,MAAM,gBAAgBX,CAAQ,sBAC9Bc,EAAO,IAAI,GACnC,CACF,CACF","names":["colors","execSync","REPO_ERROR","scanPackages","auth","scanPath","ignoreDirs","repositoryName","transcendUrl","gitRepositoryName","url","logger","colors","err","client","buildTranscendGraphQLClient","results","findCodePackagesInFolder","syncCodePackages","newUrl","ADMIN_DASH"]}
@@ -0,0 +1,2 @@
1
+ import"./chunk-UUBO75GS.js";import{c as s}from"./chunk-MA4JWWRO.js";import{U as r}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import{a as o}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import y from"colors";import{uniq as q}from"lodash-es";async function v({auth:n,transcendUrl:a,file:e,pageLimit:i,actions:m,sombraAuth:c,statuses:u,createdAtBefore:p,createdAtAfter:f,showTests:l}){let{requestsFormattedForCsv:t}=await r({transcendUrl:a,pageLimit:i,actions:m,statuses:u,auth:n,sombraAuth:c,createdAtBefore:p,createdAtAfter:f,isTest:l}),g=q(t.map(d=>Object.keys(d)).flat());s(e,t,g),o.info(y.green(`Successfully wrote ${t.length} requests to file "${e}"`))}export{v as _export};
2
+ //# sourceMappingURL=impl-GGEEIOQF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/export/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport colors from 'colors';\n\nimport { logger } from '@/logger';\nimport { uniq } from 'lodash-es';\nimport { pullPrivacyRequests } from '@/lib/requests';\nimport { writeCsv } from '@/lib/cron';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\n\ninterface ExportCommandFlags {\n auth: string;\n sombraAuth?: string;\n actions?: RequestAction[];\n statuses?: RequestStatus[];\n transcendUrl: string;\n file: string;\n concurrency: number;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n showTests?: boolean;\n pageLimit: number;\n}\n\n// `export` is a reserved keyword, so we need to prefix it with an underscore\n// eslint-disable-next-line no-underscore-dangle\nexport async function _export(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n file,\n pageLimit,\n actions,\n sombraAuth,\n statuses,\n createdAtBefore,\n createdAtAfter,\n showTests,\n }: ExportCommandFlags,\n): Promise<void> {\n const { requestsFormattedForCsv } = await pullPrivacyRequests({\n transcendUrl,\n pageLimit,\n actions,\n statuses,\n auth,\n sombraAuth,\n createdAtBefore,\n createdAtAfter,\n isTest: showTests,\n });\n\n // Write to CSV\n const headers = uniq(\n requestsFormattedForCsv.map((d) => Object.keys(d)).flat(),\n );\n writeCsv(file, requestsFormattedForCsv, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${requestsFormattedForCsv.length} requests to file \"${file}\"`,\n ),\n );\n}\n"],"mappings":"oQACA,OAAOA,MAAY,SAGnB,OAAS,QAAAC,MAAY,YAqBrB,eAAsBC,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,KAAAC,EACA,UAAAC,EACA,QAAAC,EACA,WAAAC,EACA,SAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,UAAAC,CACF,EACe,CACf,GAAM,CAAE,wBAAAC,CAAwB,EAAI,MAAMC,EAAoB,CAC5D,aAAAV,EACA,UAAAE,EACA,QAAAC,EACA,SAAAE,EACA,KAAAN,EACA,WAAAK,EACA,gBAAAE,EACA,eAAAC,EACA,OAAQC,CACV,CAAC,EAGKG,EAAUC,EACdH,EAAwB,IAAK,GAAM,OAAO,KAAK,CAAC,CAAC,EAAE,KAAK,CAC1D,EACAI,EAASZ,EAAMQ,EAAyBE,CAAO,EAC/CG,EAAO,KACLC,EAAO,MACL,sBAAsBN,EAAwB,MAAM,sBAAsBR,CAAI,GAChF,CACF,CACF","names":["colors","uniq","_export","auth","transcendUrl","file","pageLimit","actions","sombraAuth","statuses","createdAtBefore","createdAtAfter","showTests","requestsFormattedForCsv","pullPrivacyRequests","headers","uniq","writeCsv","logger","colors"]}
@@ -0,0 +1,2 @@
1
+ import{a as p}from"./chunk-CBAHSBSW.js";import{d as c,e as l}from"./chunk-OEB7WG3G.js";import{c as d}from"./chunk-R6QTIUFA.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{ne as m,pe as g}from"./chunk-WEQUQAB7.js";import{a as o}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import{join as f}from"path";import e from"colors";import{existsSync as D,lstatSync as h}from"fs";async function M({auth:x,dataFlowsYmlFolder:r,dataSilosYmlFolder:t,ignoreYmls:S=[],transcendUrl:T}){r||(o.error(e.red("Missing required arg: --dataFlowsYmlFolder=./working/data-flows/")),process.exit(1)),(!D(r)||!h(r).isDirectory())&&(o.error(e.red(`Folder does not exist: "${r}"`)),process.exit(1)),t||(o.error(e.red("Missing required arg: --dataSilosYmlFolder=./working/data-silos/")),process.exit(1)),(!D(t)||!h(t).isDirectory())&&(o.error(e.red(`Folder does not exist: "${t}"`)),process.exit(1));let w=g(T,x),{serviceToTitle:u,serviceToSupportedIntegration:v}=await m(w);d(r).forEach(i=>{let{"data-flows":F=[]}=c(f(r,i)),{adTechDataSilos:s,siteTechDataSilos:a}=p(F,{serviceToSupportedIntegration:v,serviceToTitle:u}),n=[...s,...a];o.log(`Total Services: ${n.length}`),o.log(`Ad Tech Services: ${s.length}`),o.log(`Site Tech Services: ${a.length}`),l(f(t,i),{"data-silos":S.includes(i)?[]:n})})}export{M as deriveDataSilosFromDataFlows};
2
+ //# sourceMappingURL=impl-IAKEYWMV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/derive-data-silos-from-data-flows/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '@/lib/graphql';\nimport { join } from 'path';\nimport colors from 'colors';\nimport { logger } from '@/logger';\nimport { dataFlowsToDataSilos } from '@/lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '@/codecs';\nimport { existsSync, lstatSync } from 'fs';\nimport { listFiles } from '@/lib/api-keys';\nimport { readTranscendYaml, writeTranscendYaml } from '@/lib/readTranscendYaml';\n\ninterface DeriveDataSilosFromDataFlowsCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n dataSilosYmlFolder: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlows(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n dataSilosYmlFolder,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCommandFlags,\n): Promise<void> {\n // Ensure folder is passed to dataFlowsYmlFolder\n if (!dataFlowsYmlFolder) {\n logger.error(\n colors.red(\n 'Missing required arg: --dataFlowsYmlFolder=./working/data-flows/',\n ),\n );\n process.exit(1);\n }\n\n // Ensure folder is passed\n if (\n !existsSync(dataFlowsYmlFolder) ||\n !lstatSync(dataFlowsYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataFlowsYmlFolder}\"`));\n process.exit(1);\n }\n\n // Ensure folder is passed to dataSilosYmlFolder\n if (!dataSilosYmlFolder) {\n logger.error(\n colors.red(\n 'Missing required arg: --dataSilosYmlFolder=./working/data-silos/',\n ),\n );\n process.exit(1);\n }\n\n // Ensure folder is passed\n if (\n !existsSync(dataSilosYmlFolder) ||\n !lstatSync(dataSilosYmlFolder).isDirectory()\n ) {\n logger.error(colors.red(`Folder does not exist: \"${dataSilosYmlFolder}\"`));\n process.exit(1);\n }\n\n // Fetch all integrations in the catalog\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { serviceToTitle, serviceToSupportedIntegration } =\n await fetchAndIndexCatalogs(client);\n\n // List of each data flow yml file\n listFiles(dataFlowsYmlFolder).forEach((directory) => {\n // read in the data flows for a specific instance\n const { 'data-flows': dataFlows = [] } = readTranscendYaml(\n join(dataFlowsYmlFolder, directory),\n );\n\n // map the data flows to data silos\n const { adTechDataSilos, siteTechDataSilos } = dataFlowsToDataSilos(\n dataFlows as DataFlowInput[],\n {\n serviceToSupportedIntegration,\n serviceToTitle,\n },\n );\n\n // combine and write to yml file\n const dataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechDataSilos.length}`);\n logger.log(`Site Tech Services: ${siteTechDataSilos.length}`);\n writeTranscendYaml(join(dataSilosYmlFolder, directory), {\n 'data-silos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AE,EAC5DG,EAAmBL,EAAKhB,EAAoBa,CAAS,EAAG,CACtD,aAAcZ,EAAW,SAASY,CAAS,EAAI,CAAC,EAAIO,CACtD,CAAC,CACH,CAAC,CACH","names":["join","colors","existsSync","lstatSync","deriveDataSilosFromDataFlows","auth","dataFlowsYmlFolder","dataSilosYmlFolder","ignoreYmls","transcendUrl","logger","colors","existsSync","lstatSync","client","buildTranscendGraphQLClient","serviceToTitle","serviceToSupportedIntegration","fetchAndIndexCatalogs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","dataSilos","writeTranscendYaml"]}
@@ -0,0 +1,2 @@
1
+ import{b as a}from"./chunk-UK7OFHQR.js";import"./chunk-FSJPJZNH.js";import"./chunk-TR32ZRNC.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function n({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e}){await a({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e})}export{n as uploadDataFlowsFromCsv};
2
+ //# sourceMappingURL=impl-IFLVVVBT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { uploadDataFlowsFromCsv as uploadDataFlowsFromCsvHelper } from '@/lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\n\ninterface UploadDataFlowsFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n classifyService: boolean;\n transcendUrl: string;\n}\n\nexport async function uploadDataFlowsFromCsv(\n this: LocalContext,\n {\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n }: UploadDataFlowsFromCsvCommandFlags,\n): Promise<void> {\n await uploadDataFlowsFromCsvHelper({\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n });\n}\n"],"mappings":"oSAYA,eAAsBA,EAEpB,CACE,KAAAC,EACA,cAAAC,EACA,KAAAC,EACA,gBAAAC,EACA,aAAAC,CACF,EACe,CACf,MAAML,EAA6B,CACjC,KAAAC,EACA,cAAAC,EACA,KAAAC,EACA,gBAAAC,EACA,aAAAC,CACF,CAAC,CACH","names":["uploadDataFlowsFromCsv","auth","trackerStatus","file","classifyService","transcendUrl"]}
@@ -0,0 +1,2 @@
1
+ import{R as t}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function e({auth:i,transcendUrl:o,enricherIds:r}){await t({transcendUrl:o,auth:i,enricherIds:r})}export{e as skipPreflightJobs};
2
+ //# sourceMappingURL=impl-JFHF7SF7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/skip-preflight-jobs/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { skipPreflightJobs as skipPreflightJobsHelper } from '@/lib/requests';\n\ninterface SkipPreflightJobsCommandFlags {\n auth: string;\n enricherIds: string[];\n transcendUrl: string;\n}\n\nexport async function skipPreflightJobs(\n this: LocalContext,\n { auth, transcendUrl, enricherIds }: SkipPreflightJobsCommandFlags,\n): Promise<void> {\n await skipPreflightJobsHelper({\n transcendUrl,\n auth,\n enricherIds,\n });\n}\n"],"mappings":"oLASA,eAAsBA,EAEpB,CAAE,KAAAC,EAAM,aAAAC,EAAc,YAAAC,CAAY,EACnB,CACf,MAAMH,EAAwB,CAC5B,aAAAE,EACA,KAAAD,EACA,YAAAE,CACF,CAAC,CACH","names":["skipPreflightJobs","auth","transcendUrl","enricherIds"]}
@@ -0,0 +1,2 @@
1
+ import{b as m}from"./chunk-R6QTIUFA.js";import{a as t}from"./chunk-UK7OFHQR.js";import"./chunk-FSJPJZNH.js";import"./chunk-TR32ZRNC.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{a as g}from"./chunk-WEQUQAB7.js";import{a as n}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import a from"colors";import{ConsentBundleType as p}from"@transcend-io/privacy-types";async function M({auth:f,bundleTypes:r=[p.Production,p.Test],deploy:i,transcendUrl:s}){let e=await m(f);typeof e=="string"?(await t({deploy:i,transcendUrl:s,auth:e,bundleTypes:r}),n.info(a.green("Successfully updated Consent Manager!"))):(await g(e,async o=>{n.info(a.magenta(`Updating Consent Manager for organization "${o.organizationName}"...`)),await t({deploy:i,transcendUrl:s,auth:o.apiKey,bundleTypes:r}),n.info(a.green(`Successfully updated Consent Manager for organization "${o.organizationName}"!`))}),n.info(a.green("Successfully updated Consent Managers!")))}export{M as updateConsentManager};
2
+ //# sourceMappingURL=impl-JPOE7MKX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/consent/update-consent-manager/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport colors from 'colors';\nimport { ConsentBundleType } from '@transcend-io/privacy-types';\nimport { mapSeries } from '@/lib/bluebird-replace';\n\nimport { logger } from '@/logger';\nimport { updateConsentManagerVersionToLatest } from '@/lib/consent-manager';\nimport { validateTranscendAuth } from '@/lib/api-keys';\n\ninterface UpdateConsentManagerCommandFlags {\n auth: string;\n bundleTypes: ConsentBundleType[];\n deploy: boolean;\n transcendUrl: string;\n}\n\nexport async function updateConsentManager(\n this: LocalContext,\n {\n auth,\n bundleTypes = [ConsentBundleType.Production, ConsentBundleType.Test],\n deploy,\n transcendUrl,\n }: UpdateConsentManagerCommandFlags,\n): Promise<void> {\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Handle single update\n if (typeof apiKeyOrList === 'string') {\n // Update consent manager\n await updateConsentManagerVersionToLatest({\n deploy,\n transcendUrl,\n auth: apiKeyOrList,\n bundleTypes,\n });\n logger.info(colors.green('Successfully updated Consent Manager!'));\n } else {\n await mapSeries(apiKeyOrList, async (apiKey) => {\n logger.info(\n colors.magenta(\n `Updating Consent Manager for organization \"${apiKey.organizationName}\"...`,\n ),\n );\n\n await updateConsentManagerVersionToLatest({\n deploy,\n transcendUrl,\n auth: apiKey.apiKey,\n bundleTypes,\n });\n\n logger.info(\n colors.green(\n `Successfully updated Consent Manager for organization \"${apiKey.organizationName}\"!`,\n ),\n );\n });\n logger.info(colors.green('Successfully updated Consent Managers!'));\n }\n}\n"],"mappings":"oWACA,OAAOA,MAAY,SACnB,OAAS,qBAAAC,MAAyB,8BAclC,eAAsBC,EAEpB,CACE,KAAAC,EACA,YAAAC,EAAc,CAACC,EAAkB,WAAYA,EAAkB,IAAI,EACnE,OAAAC,EACA,aAAAC,CACF,EACe,CAEf,IAAMC,EAAe,MAAMC,EAAsBN,CAAI,EAGjD,OAAOK,GAAiB,UAE1B,MAAME,EAAoC,CACxC,OAAAJ,EACA,aAAAC,EACA,KAAMC,EACN,YAAAJ,CACF,CAAC,EACDO,EAAO,KAAKC,EAAO,MAAM,uCAAuC,CAAC,IAEjE,MAAMC,EAAUL,EAAc,MAAOM,GAAW,CAC9CH,EAAO,KACLC,EAAO,QACL,8CAA8CE,EAAO,gBAAgB,MACvE,CACF,EAEA,MAAMJ,EAAoC,CACxC,OAAAJ,EACA,aAAAC,EACA,KAAMO,EAAO,OACb,YAAAV,CACF,CAAC,EAEDO,EAAO,KACLC,EAAO,MACL,0DAA0DE,EAAO,gBAAgB,IACnF,CACF,CACF,CAAC,EACDH,EAAO,KAAKC,EAAO,MAAM,wCAAwC,CAAC,EAEtE","names":["colors","ConsentBundleType","updateConsentManager","auth","bundleTypes","ConsentBundleType","deploy","transcendUrl","apiKeyOrList","validateTranscendAuth","updateConsentManagerVersionToLatest","logger","colors","mapSeries","apiKey"]}
@@ -0,0 +1,2 @@
1
+ import{g as f}from"./chunk-UUBO75GS.js";import{c as l,d as m}from"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import{a as t}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import o from"colors";import{uniq as P}from"lodash-es";async function N({file:d,transcendUrl:u,auth:p,sombraAuth:g,dataSiloId:c,actions:v,pageLimit:r,skipRequestCount:n,chunkSize:e}){n&&t.info(o.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(e)||e<=0||e%r!==0)&&(t.error(o.red(`Invalid chunk size: "${e}". Must be a positive integer that is a multiple of ${r}.`)),process.exit(1));let{baseName:b,extension:C}=m(d),a=0;await f({transcendUrl:u,apiPageSize:r,savePageSize:e,onSave:i=>{let s=`${b}-${a}${C}`;t.info(o.blue(`Saving ${i.length} identifiers to file "${s}"`));let $=P(i.map(I=>Object.keys(I)).flat());return l(s,i,$),t.info(o.green(`Successfully wrote ${i.length} identifiers to file "${s}"`)),a+=1,Promise.resolve()},actions:v,auth:p,sombraAuth:g,dataSiloId:c,skipRequestCount:n})}export{N as pullIdentifiers};
2
+ //# sourceMappingURL=impl-KRV7L5SP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/cron/pull-identifiers/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport colors from 'colors';\n\nimport { logger } from '@/logger';\nimport { uniq } from 'lodash-es';\nimport {\n CsvFormattedIdentifier,\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n} from '@/lib/cron';\nimport { RequestAction } from '@transcend-io/privacy-types';\n\ninterface PullIdentifiersCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n actions: RequestAction[];\n pageLimit: number;\n skipRequestCount: boolean;\n chunkSize: number;\n}\n\nexport async function pullIdentifiers(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n actions,\n pageLimit,\n skipRequestCount,\n chunkSize,\n }: PullIdentifiersCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n process.exit(1);\n }\n\n const { baseName, extension } = parseFilePath(file);\n let fileCount = 0;\n\n const onSave = (chunk: CsvFormattedIdentifier[]): Promise<void> => {\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n logger.info(\n colors.blue(\n `Saving ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n\n const headers = uniq(chunk.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileName, chunk, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunk.length} identifiers to file \"${numberedFileName}\"`,\n ),\n );\n fileCount += 1;\n return Promise.resolve();\n };\n\n // Pull down outstanding identifiers\n await pullChunkedCustomSiloOutstandingIdentifiers({\n transcendUrl,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n actions,\n auth,\n sombraAuth,\n dataSiloId,\n skipRequestCount,\n });\n}\n"],"mappings":"2QACA,OAAOA,MAAY,SAGnB,OAAS,QAAAC,MAAY,YAqBrB,eAAsBC,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,KAAAC,EACA,WAAAC,EACA,WAAAC,EACA,QAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,UAAAC,CACF,EACe,CACXD,GACFE,EAAO,KACLC,EAAO,OACL,uEACF,CACF,GAIA,OAAO,MAAMF,CAAS,GACtBA,GAAa,GACbA,EAAYF,IAAc,KAE1BG,EAAO,MACLC,EAAO,IACL,wBAAwBF,CAAS,uDAAuDF,CAAS,GACnG,CACF,EACA,QAAQ,KAAK,CAAC,GAGhB,GAAM,CAAE,SAAAK,EAAU,UAAAC,CAAU,EAAIC,EAAcb,CAAI,EAC9Cc,EAAY,EAsBhB,MAAMC,EAA4C,CAChD,aAAAd,EACA,YAAaK,EACb,aAAcE,EACd,OAxBcQ,GAAmD,CACjE,IAAMC,EAAmB,GAAGN,CAAQ,IAAIG,CAAS,GAAGF,CAAS,GAC7DH,EAAO,KACLC,EAAO,KACL,UAAUM,EAAM,MAAM,yBAAyBC,CAAgB,GACjE,CACF,EAEA,IAAMC,EAAUC,EAAKH,EAAM,IAAKI,GAAM,OAAO,KAAKA,CAAC,CAAC,EAAE,KAAK,CAAC,EAC5D,OAAAC,EAASJ,EAAkBD,EAAOE,CAAO,EACzCT,EAAO,KACLC,EAAO,MACL,sBAAsBM,EAAM,MAAM,yBAAyBC,CAAgB,GAC7E,CACF,EACAH,GAAa,EACN,QAAQ,QAAQ,CACzB,EAQE,QAAAT,EACA,KAAAH,EACA,WAAAC,EACA,WAAAC,EACA,iBAAAG,CACF,CAAC,CACH","names":["colors","uniq","pullIdentifiers","file","transcendUrl","auth","sombraAuth","dataSiloId","actions","pageLimit","skipRequestCount","chunkSize","logger","colors","baseName","extension","parseFilePath","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunk","numberedFileName","headers","uniq","d","writeCsv"]}
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-GSXHJEKW.js";import"./chunk-UUBO75GS.js";import{c as m}from"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import{pe as c}from"./chunk-WEQUQAB7.js";import{a as r}from"./chunk-43JWXG77.js";import{d as g}from"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import{uniq as A,groupBy as G}from"lodash-es";import n from"colors";async function k({auth:p,file:a,transcendUrl:d,dataSiloIds:u,includeAttributes:y,includeGuessedCategories:C,parentCategories:f,subCategories:D=[]}){try{let o=c(d,p),P=await l(o,{dataSiloIds:u,includeGuessedCategories:C,parentCategories:f,includeAttributes:y,subCategories:D});r.info(n.magenta(`Writing datapoints to file "${a}"...`));let s=[],b=P.map(e=>{let i={"Property ID":e.id,"Data Silo":e.dataSilo.title,Object:e.dataPoint.name,"Object Path":e.dataPoint.path.join("."),Property:e.name,"Property Description":e.description,"Data Categories":e.categories.map(t=>`${t.category}:${t.name}`).join(", "),"Guessed Category":e.pendingCategoryGuesses?.[0]?`${e.pendingCategoryGuesses[0].category.category}:${e.pendingCategoryGuesses[0].category.name}`:"","Processing Purposes":e.purposes.map(t=>`${t.purpose}:${t.name}`).join(", "),...Object.entries(G(e.attributeValues||[],({attributeKey:t})=>t.name)).reduce((t,[$,h])=>(t[$]=h.map(j=>j.name).join(","),t),{})};return s=A([...s,...Object.keys(i)]),i});m(a,b,s)}catch(o){r.error(n.red(`An error occurred syncing the datapoints: ${o.message}`)),process.exit(1)}r.info(n.green(`Successfully synced datapoints to disk at ${a}! View at ${g}`))}export{k as pullDatapoints};
2
+ //# sourceMappingURL=impl-MGARGP2M.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/pull-datapoints/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { uniq, groupBy } from 'lodash-es';\n\nimport { logger } from '@/logger';\nimport colors from 'colors';\nimport { buildTranscendGraphQLClient } from '@/lib/graphql';\nimport { ADMIN_DASH_DATAPOINTS } from '@/constants';\nimport { pullAllDatapoints } from '@/lib/data-inventory';\nimport { writeCsv } from '@/lib/cron';\nimport { DataCategoryType } from '@transcend-io/privacy-types';\n\ninterface PullDatapointsCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n dataSiloIds?: string[];\n includeAttributes: boolean;\n includeGuessedCategories: boolean;\n parentCategories?: DataCategoryType[];\n subCategories?: string[];\n}\n\nexport async function pullDatapoints(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n dataSiloIds,\n includeAttributes,\n includeGuessedCategories,\n parentCategories,\n subCategories = [],\n }: PullDatapointsCommandFlags,\n): Promise<void> {\n try {\n // Create a GraphQL client\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n const dataPoints = await pullAllDatapoints(client, {\n dataSiloIds,\n includeGuessedCategories,\n parentCategories,\n includeAttributes,\n subCategories, // TODO: https://transcend.height.app/T-40482 - do by name not ID\n });\n\n logger.info(colors.magenta(`Writing datapoints to file \"${file}\"...`));\n let headers: string[] = [];\n const inputs = dataPoints.map((point) => {\n const result = {\n 'Property ID': point.id,\n 'Data Silo': point.dataSilo.title,\n Object: point.dataPoint.name,\n 'Object Path': point.dataPoint.path.join('.'),\n Property: point.name,\n 'Property Description': point.description,\n 'Data Categories': point.categories\n .map((category) => `${category.category}:${category.name}`)\n .join(', '),\n 'Guessed Category': point.pendingCategoryGuesses?.[0]\n ? `${point.pendingCategoryGuesses![0]!.category.category}:${\n point.pendingCategoryGuesses![0]!.category.name\n }`\n : '',\n 'Processing Purposes': point.purposes\n .map((purpose) => `${purpose.purpose}:${purpose.name}`)\n .join(', '),\n ...Object.entries(\n groupBy(\n point.attributeValues || [],\n ({ attributeKey }) => attributeKey.name,\n ),\n ).reduce((acc, [key, values]) => {\n acc[key] = values.map((value) => value.name).join(',');\n return acc;\n }, {} as Record<string, string>),\n };\n headers = uniq([...headers, ...Object.keys(result)]);\n return result;\n });\n writeCsv(file, inputs, headers);\n } catch (err) {\n logger.error(\n colors.red(`An error occurred syncing the datapoints: ${err.message}`),\n );\n process.exit(1);\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced datapoints to disk at ${file}! View at ${ADMIN_DASH_DATAPOINTS}`,\n ),\n );\n}\n"],"mappings":"yTACA,OAAS,QAAAA,EAAM,WAAAC,MAAe,YAG9B,OAAOC,MAAY,SAkBnB,eAAsBC,EAEpB,CACE,KAAAC,EACA,KAAAC,EACA,aAAAC,EACA,YAAAC,EACA,kBAAAC,EACA,yBAAAC,EACA,iBAAAC,EACA,cAAAC,EAA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O,CAChC,OAASc,EAAK,CACZhB,EAAO,MACLC,EAAO,IAAI,6CAA6Ce,EAAI,OAAO,EAAE,CACvE,EACA,QAAQ,KAAK,CAAC,CAChB,CAGAhB,EAAO,KACLC,EAAO,MACL,6CAA6CZ,CAAI,aAAa4B,CAAqB,EACrF,CACF,CACF","names":["uniq","groupBy","colors","pullDatapoints","auth","file","transcendUrl","dataSiloIds","includeAttributes","includeGuessedCategories","parentCategories","subCategories","client","buildTranscendGraphQLClient","dataPoints","pullAllDatapoints","logger","colors","headers","inputs","point","result","category","purpose","groupBy","attributeKey","acc","key","values","value","uniq","writeCsv","err","ADMIN_DASH_DATAPOINTS"]}
@@ -0,0 +1,2 @@
1
+ import{g as w}from"./chunk-UUBO75GS.js";import{c as d,d as c}from"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import{Ke as v,b as h,pe as q}from"./chunk-WEQUQAB7.js";import{a as t}from"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import i from"colors";import{uniq as u}from"lodash-es";async function W({file:n,fileTarget:a,transcendUrl:m,auth:p,sombraAuth:P,cronDataSiloId:S,targetDataSiloId:F,actions:x,skipRequestCount:g,pageLimit:l,chunkSize:s}){g&&t.info(i.yellow("Skipping request count as requested. This may help speed up the call.")),(Number.isNaN(s)||s<=0||s%l!==0)&&(t.error(i.red(`Invalid chunk size: "${s}". Must be a positive integer that is a multiple of ${l}.`)),process.exit(1));let N=q(m,p),{baseName:R,extension:T}=c(n),{baseName:j,extension:O}=c(a),$=0,b=0,f=0;await w({dataSiloId:S,auth:p,sombraAuth:P,actions:x,apiPageSize:l,savePageSize:s,onSave:async o=>{$+=o.length;let A=o.map(e=>e.requestId),D=u(A),y=await h(D,async e=>(await v(N,{requestId:e,dataSiloId:F})).map(({fileName:C,remoteId:I})=>{if(!I)throw new Error(`Failed to find remoteId for ${C} request: ${e}`);return{RecordId:I,Object:C.replace(".json","").split("/").pop()?.replace(" Information",""),Comment:"Customer data deletion request submitted via transcend.io"}}),{concurrency:10});b+=y.flat().length;let L=u(o.map(e=>Object.keys(e)).flat()),E=`${R}-${f}${T}`,G=`${j}-${f}${O}`;d(E,o,L),t.info(i.green(`Successfully wrote ${o.length} identifiers to file "${n}"`));let r=y.flat(),M=u(r.map(e=>Object.keys(e)).flat());d(G,r,M),t.info(i.green(`Successfully wrote ${r.length} identifiers to file "${a}"`)),t.info(i.blue(`Processed chunk of ${o.length} identifiers, found ${r.length} target identifiers`)),f+=1},transcendUrl:m,skipRequestCount:g}),t.info(i.green(`Successfully wrote ${$} identifiers to file "${n}"`)),t.info(i.green(`Successfully wrote ${b} identifiers to file "${a}"`))}export{W as pullProfiles};
2
+ //# sourceMappingURL=impl-N3R63BI4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/cron/pull-profiles/impl.ts"],"sourcesContent":["import type { RequestAction } from '@transcend-io/privacy-types';\nimport { logger } from '@/logger';\nimport colors from 'colors';\nimport { uniq } from 'lodash-es';\nimport { map } from '@/lib/bluebird-replace';\nimport {\n buildTranscendGraphQLClient,\n fetchRequestFilesForRequest,\n} from '@/lib/graphql';\nimport type { LocalContext } from '@/context';\nimport {\n parseFilePath,\n pullChunkedCustomSiloOutstandingIdentifiers,\n writeCsv,\n type CsvFormattedIdentifier,\n} from '@/lib/cron';\n\ninterface PullProfilesCommandFlags {\n file: string;\n fileTarget: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n cronDataSiloId: string;\n targetDataSiloId: string;\n actions: RequestAction[];\n skipRequestCount: boolean;\n pageLimit: number;\n chunkSize: number;\n}\n\nexport async function pullProfiles(\n this: LocalContext,\n {\n file,\n fileTarget,\n transcendUrl,\n auth,\n sombraAuth,\n cronDataSiloId,\n targetDataSiloId,\n actions,\n skipRequestCount,\n pageLimit,\n chunkSize,\n }: PullProfilesCommandFlags,\n): Promise<void> {\n if (skipRequestCount) {\n logger.info(\n colors.yellow(\n 'Skipping request count as requested. This may help speed up the call.',\n ),\n );\n }\n\n if (\n Number.isNaN(chunkSize) ||\n chunkSize <= 0 ||\n chunkSize % pageLimit !== 0\n ) {\n logger.error(\n colors.red(\n `Invalid chunk size: \"${chunkSize}\". Must be a positive integer that is a multiple of ${pageLimit}.`,\n ),\n );\n process.exit(1);\n }\n\n // Create GraphQL client to connect to Transcend backend\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n const { baseName, extension } = parseFilePath(file);\n const { baseName: baseNameTarget, extension: extensionTarget } =\n parseFilePath(fileTarget);\n\n let allIdentifiersCount = 0;\n let allTargetIdentifiersCount = 0;\n let fileCount = 0;\n // Create onSave callback to handle chunked processing\n const onSave = async (chunk: CsvFormattedIdentifier[]): Promise<void> => {\n // Add to all identifiers\n allIdentifiersCount += chunk.length;\n\n // Get unique request IDs from this chunk\n const requestIds = chunk.map((d) => d.requestId as string);\n const uniqueRequestIds = uniq(requestIds);\n\n // Pull down target identifiers for this chunk\n const results = await map(\n uniqueRequestIds,\n async (requestId) => {\n const results = await fetchRequestFilesForRequest(client, {\n requestId,\n dataSiloId: targetDataSiloId,\n });\n return results.map(({ fileName, remoteId }) => {\n if (!remoteId) {\n throw new Error(\n `Failed to find remoteId for ${fileName} request: ${requestId}`,\n );\n }\n return {\n RecordId: remoteId,\n Object: fileName\n .replace('.json', '')\n .split('/')\n .pop()\n ?.replace(' Information', ''),\n Comment:\n 'Customer data deletion request submitted via transcend.io',\n };\n });\n },\n {\n concurrency: 10,\n },\n );\n\n allTargetIdentifiersCount += results.flat().length;\n\n // Write the identifiers and target identifiers to CSV\n const headers = uniq(chunk.map((d) => Object.keys(d)).flat());\n const numberedFileName = `${baseName}-${fileCount}${extension}`;\n const numberedFileNameTarget = `${baseNameTarget}-${fileCount}${extensionTarget}`;\n writeCsv(numberedFileName, chunk, headers);\n logger.info(\n colors.green(\n `Successfully wrote ${chunk.length} identifiers to file \"${file}\"`,\n ),\n );\n\n const targetIdentifiers = results.flat();\n const headers2 = uniq(targetIdentifiers.map((d) => Object.keys(d)).flat());\n writeCsv(numberedFileNameTarget, targetIdentifiers, headers2);\n logger.info(\n colors.green(\n `Successfully wrote ${targetIdentifiers.length} identifiers to file \"${fileTarget}\"`,\n ),\n );\n\n logger.info(\n colors.blue(\n `Processed chunk of ${chunk.length} identifiers, found ${targetIdentifiers.length} target identifiers`,\n ),\n );\n fileCount += 1;\n };\n\n // Pull down outstanding identifiers using the new chunked function\n await pullChunkedCustomSiloOutstandingIdentifiers({\n dataSiloId: cronDataSiloId,\n auth,\n sombraAuth,\n actions,\n apiPageSize: pageLimit,\n savePageSize: chunkSize,\n onSave,\n transcendUrl,\n skipRequestCount,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${allIdentifiersCount} identifiers to file \"${file}\"`,\n ),\n );\n logger.info(\n colors.green(\n `Successfully wrote ${allTargetIdentifiersCount} identifiers to file \"${fileTarget}\"`,\n ),\n );\n}\n"],"mappings":"uSAEA,OAAOA,MAAY,SACnB,OAAS,QAAAC,MAAY,YA4BrB,eAAsBC,EAEpB,CACE,KAAAC,EACA,WAAAC,EACA,aAAAC,EACA,KAAAC,EACA,WAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,QAAAC,EACA,iBAAAC,EACA,UAAAC,EACA,UAAAC,CACF,EACe,CACXF,GACFG,EAAO,KACLC,EAAO,OACL,uEACF,CACF,GAIA,OAAO,MAAMF,CAAS,GACtBA,GAAa,GACbA,EAAYD,IAAc,KAE1BE,EAAO,MACLC,EAAO,IACL,wBAAwBF,CAAS,uDAAuDD,CAAS,GACnG,CACF,EACA,QAAQ,KAAK,CAAC,GAIhB,IAAMI,EAASC,EAA4BZ,EAAcC,CAAI,EACvD,CAAE,SAAAY,EAAU,UAAAC,CAAU,EAAIC,EAAcjB,CAAI,EAC5C,CAAE,SAAUkB,EAAgB,UAAWC,CAAgB,EAC3DF,EAAchB,CAAU,EAEtBmB,EAAsB,EACtBC,EAA4B,EAC5BC,EAAY,EAwEhB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AU,GACnF,CACF,EAEAU,EAAO,KACLC,EAAO,KACL,sBAAsBY,EAAM,MAAM,uBAAuBe,EAAkB,MAAM,qBACnF,CACF,EACAjB,GAAa,CACf,EAWE,aAAApB,EACA,iBAAAM,CACF,CAAC,EAEDG,EAAO,KACLC,EAAO,MACL,sBAAsBQ,CAAmB,yBAAyBpB,CAAI,GACxE,CACF,EACAW,EAAO,KACLC,EAAO,MACL,sBAAsBS,CAAyB,yBAAyBpB,CAAU,GACpF,CACF,CACF","names":["colors","uniq","pullProfiles","file","fileTarget","transcendUrl","auth","sombraAuth","cronDataSiloId","targetDataSiloId","actions","skipRequestCount","pageLimit","chunkSize","logger","colors","client","buildTranscendGraphQLClient","baseName","extension","parseFilePath","baseNameTarget","extensionTarget","allIdentifiersCount","allTargetIdentifiersCount","fileCount","pullChunkedCustomSiloOutstandingIdentifiers","chunk","requestIds","d","uniqueRequestIds","uniq","results","map","requestId","fetchRequestFilesForRequest","fileName","remoteId","headers","numberedFileName","numberedFileNameTarget","writeCsv","targetIdentifiers","headers2"]}
@@ -0,0 +1,2 @@
1
+ import{T as t}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function i({auth:e,dataSiloId:a,actions:o,transcendUrl:s}){await t({requestActions:o,transcendUrl:s,auth:e,dataSiloId:a})}export{i as retryRequestDataSilos};
2
+ //# sourceMappingURL=impl-NCWU4WVO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/system/retry-request-data-silos/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport type { RequestAction } from '@transcend-io/privacy-types';\nimport { retryRequestDataSilos as retryRequestDataSilosHelper } from '@/lib/requests';\n\ninterface RetryRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n actions: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function retryRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n actions,\n transcendUrl,\n }: RetryRequestDataSilosCommandFlags,\n): Promise<void> {\n await retryRequestDataSilosHelper({\n requestActions: actions,\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"],"mappings":"oLAWA,eAAsBA,EAEpB,CACE,KAAAC,EACA,WAAAC,EACA,QAAAC,EACA,aAAAC,CACF,EACe,CACf,MAAMJ,EAA4B,CAChC,eAAgBG,EAChB,aAAAC,EACA,KAAAH,EACA,WAAAC,CACF,CAAC,CACH","names":["retryRequestDataSilos","auth","dataSiloId","actions","transcendUrl"]}
@@ -0,0 +1,2 @@
1
+ import{F as t}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import{RequestStatus as e}from"@transcend-io/privacy-types";async function f({auth:o,transcendUrl:a,folderPath:r,requestIds:n,statuses:s=[e.Approving,e.Downloadable],concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c}){await t({transcendUrl:a,auth:o,folderPath:r,requestIds:n,statuses:s,concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c})}export{f as downloadFiles};
2
+ //# sourceMappingURL=impl-NE4OGF7U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/download-files/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { downloadPrivacyRequestFiles } from '@/lib/requests';\nimport { RequestStatus } from '@transcend-io/privacy-types';\n\ninterface DownloadFilesCommandFlags {\n auth: string;\n sombraAuth?: string;\n concurrency: number;\n requestIds?: string[];\n statuses?: RequestStatus[];\n folderPath: string;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n approveAfterDownload: boolean;\n transcendUrl: string;\n}\n\nexport async function downloadFiles(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n folderPath,\n requestIds,\n statuses = [RequestStatus.Approving, RequestStatus.Downloadable],\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n }: DownloadFilesCommandFlags,\n): Promise<void> {\n await downloadPrivacyRequestFiles({\n transcendUrl,\n auth,\n folderPath,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n approveAfterDownload,\n });\n}\n"],"mappings":"oLAEA,OAAS,iBAAAA,MAAqB,8BAe9B,eAAsBC,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,WAAAC,EACA,WAAAC,EACA,SAAAC,EAAW,CAACN,EAAc,UAAWA,EAAc,YAAY,EAC/D,YAAAO,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,CACF,EACe,CACf,MAAMC,EAA4B,CAChC,aAAAR,EACA,KAAAD,EACA,WAAAE,EACA,WAAAC,EACA,SAAAC,EACA,YAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,CACF,CAAC,CACH","names":["RequestStatus","downloadFiles","auth","transcendUrl","folderPath","requestIds","statuses","concurrency","createdAtBefore","createdAtAfter","approveAfterDownload","downloadPrivacyRequestFiles"]}
@@ -0,0 +1,2 @@
1
+ import{O as t,n as e}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function y({auth:o,file:i,transcendUrl:n,cacheFilepath:a,requestReceiptFolder:r,sombraAuth:s,concurrency:l,attributes:c,isTest:d,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,skipFilterStep:b,dryRun:g,debug:C,defaultPhoneCountryCode:f}){await t({cacheFilepath:a,requestReceiptFolder:r,file:i,auth:o,sombraAuth:s,concurrency:l,transcendUrl:n,defaultPhoneCountryCode:f,attributes:e(c),debug:C,skipFilterStep:b,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,isTest:d,dryRun:g})}export{y as upload};
2
+ //# sourceMappingURL=impl-NNBY4R6T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/upload/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { splitCsvToList, uploadPrivacyRequestsFromCsv } from '@/lib/requests';\n\ninterface UploadCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n cacheFilepath: string;\n requestReceiptFolder: string;\n sombraAuth?: string;\n concurrency: number;\n attributes: string;\n isTest: boolean;\n isSilent: boolean;\n skipSendingReceipt: boolean;\n emailIsVerified: boolean;\n skipFilterStep: boolean;\n dryRun: boolean;\n debug: boolean;\n defaultPhoneCountryCode: string;\n}\n\nexport async function upload(\n this: LocalContext,\n {\n auth,\n file,\n transcendUrl,\n cacheFilepath,\n requestReceiptFolder,\n sombraAuth,\n concurrency,\n attributes,\n isTest,\n isSilent,\n skipSendingReceipt,\n emailIsVerified,\n skipFilterStep,\n dryRun,\n debug,\n defaultPhoneCountryCode,\n }: UploadCommandFlags,\n): Promise<void> {\n await uploadPrivacyRequestsFromCsv({\n cacheFilepath,\n requestReceiptFolder,\n file,\n auth,\n sombraAuth,\n concurrency,\n transcendUrl,\n defaultPhoneCountryCode,\n attributes: splitCsvToList(attributes),\n debug,\n skipFilterStep,\n isSilent,\n skipSendingReceipt,\n emailIsVerified,\n isTest,\n dryRun,\n });\n}\n"],"mappings":"2LAsBA,eAAsBA,EAEpB,CACE,KAAAC,EACA,KAAAC,EACA,aAAAC,EACA,cAAAC,EACA,qBAAAC,EACA,WAAAC,EACA,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,SAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,OAAAC,EACA,MAAAC,EACA,wBAAAC,CACF,EACe,CACf,MAAMC,EAA6B,CACjC,cAAAb,EACA,qBAAAC,EACA,KAAAH,EACA,KAAAD,EACA,WAAAK,EACA,YAAAC,EACA,aAAAJ,EACA,wBAAAa,EACA,WAAYE,EAAeV,CAAU,EACrC,MAAAO,EACA,eAAAF,EACA,SAAAH,EACA,mBAAAC,EACA,gBAAAC,EACA,OAAAH,EACA,OAAAK,CACF,CAAC,CACH","names":["upload","auth","file","transcendUrl","cacheFilepath","requestReceiptFolder","sombraAuth","concurrency","attributes","isTest","isSilent","skipSendingReceipt","emailIsVerified","skipFilterStep","dryRun","debug","defaultPhoneCountryCode","uploadPrivacyRequestsFromCsv","splitCsvToList"]}
@@ -0,0 +1,6 @@
1
+ import{a as S}from"./chunk-L7ZIX4SU.js";import{a as A}from"./chunk-4GLITB3Y.js";import{d as b}from"./chunk-OEB7WG3G.js";import{b as v,c as C}from"./chunk-R6QTIUFA.js";import"./chunk-LAYHULHH.js";import"./chunk-347UQP43.js";import{Nd as x,a as w,pe as T}from"./chunk-WEQUQAB7.js";import{a as n}from"./chunk-43JWXG77.js";import{c as d}from"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";import{existsSync as z,lstatSync as F}from"fs";import{join as L}from"path";import o from"colors";async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=T(i,c);try{return!await x(l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(t){return n.error(o.red(`An unexpected error occurred syncing the schema: ${t.message}`)),!1}}async function H({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){let t=await v(h),N=A(y),p;if(Array.isArray(t)&&F(i).isDirectory()?p=C(i).map(e=>L(i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{z(e)?n.info(o.magenta(`Reading file "${e}"...`)):(n.error(o.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),process.exit(1));try{let r=b(e,N);return n.info(o.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){n.error(o.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),process.exit(1)}});if(typeof t=="string"){let[e,...r]=s.map(({content:g})=>g),$=S(e,...r);await I({transcendUrl:c,auth:t,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(n.info(o.red(`Sync encountered errors. View output above for more information, or check out ${d}`)),process.exit(1))}else{if(s.length!==1&&s.length!==t.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${t.length} API key${t.length===1?"":"s"}`);let e=[];await w(t,async(r,$)=>{let a=`[${$+1}/${t.length}][${r.organizationName}] `;n.info(o.magenta(`~~~
2
+
3
+ ${a}Attempting to push configuration...
4
+
5
+ ~~~`));let g=s.length===1?s[0].content:s.find(E=>E.name===r.organizationName)?.content;if(!g){n.error(o.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:g,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?n.info(o.green(`${a}Successfully pushed configuration!`)):(n.error(o.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(n.info(o.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${d}`)),process.exit(1))}n.info(o.green(`Successfully synced yaml file to Transcend! View at ${d}`))}export{H as push};
6
+ //# sourceMappingURL=impl-PERB6GYW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/inventory/push/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\n\nimport { logger } from '@/logger';\nimport { mapSeries } from '@/lib/bluebird-replace';\nimport { existsSync, lstatSync } from 'fs';\nimport { join } from 'path';\nimport { readTranscendYaml } from '@/lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '@/lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '@/constants';\nimport { TranscendInput } from '@/codecs';\nimport { validateTranscendAuth, listFiles } from '@/lib/api-keys';\nimport { mergeTranscendInputs } from '@/lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '@/lib/helpers/parseVariablesFromString';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\ninterface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\n): Promise<void> {\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n process.exit(1);\n }\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"],"mappings":"+ZAIA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OAErB,OAAOC,MAAY,SAkBnB,eAAeC,EAAkB,CAC/B,aAAAC,EACA,KAAAC,EACA,SAAAC,EACA,uBAAAC,EACA,SAAAC,EACA,2BAAAC,EAA6B,GAC7B,gBAAAC,EAAkB,EACpB,EAeqB,CACnB,IAAMC,EAASC,EAA4BR,EAAcC,CAAI,EAG7D,GAAI,CAWF,MAA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LC,EAAO,MAAM,GAAG0B,CAAM,oCAAoC,CAC5D,GAEA3B,EAAO,MAAMC,EAAO,IAAI,GAAG0B,CAAM,+BAA+B,CAAC,EACjEJ,EAAkB,KAAKE,EAAO,gBAAgB,EAElD,CAAC,EAEGF,EAAkB,OAAS,IAC7BvB,EAAO,KACLC,EAAO,IACL,gCAAgCsB,EAAkB,KAChD,GACF,CAAC,2DAA2DD,CAAuB,EACrF,CACF,EAEA,QAAQ,KAAK,CAAC,EAElB,CAGAtB,EAAO,KACLC,EAAO,MACL,uDAAuDqB,CAAuB,EAChF,CACF,CACF","names":["existsSync","lstatSync","join","colors","syncConfiguration","transcendUrl","auth","pageSize","publishToPrivacyCenter","contents","deleteExtraAttributeValues","classifyService","client","buildTranscendGraphQLClient","syncConfigurationToTranscend","err","logger","colors","push","file","variables","apiKeyOrList","validateTranscendAuth","vars","parseVariablesFromString","fileList","lstatSync","listFiles","filePath","join","transcendInputs","existsSync","newContents","readTranscendYaml","base","rest","content","mergeTranscendInputs","ADMIN_DASH_INTEGRATIONS","encounteredErrors","mapSeries","apiKey","ind","prefix","useContents","input"]}
@@ -0,0 +1,2 @@
1
+ import{W as e}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function s({auth:t,transcendUrl:i,identifierNames:n,actions:r=[]}){await e({requestActions:r,transcendUrl:i,auth:t,identifierNames:n})}export{s as rejectUnverifiedIdentifiers};
2
+ //# sourceMappingURL=impl-QSO5YEU5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/reject-unverified-identifiers/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { removeUnverifiedRequestIdentifiers } from '@/lib/requests';\nimport type { RequestAction } from '@transcend-io/privacy-types';\n\ninterface RejectUnverifiedIdentifiersCommandFlags {\n auth: string;\n identifierNames: string[];\n actions?: RequestAction[];\n transcendUrl: string;\n}\n\nexport async function rejectUnverifiedIdentifiers(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n identifierNames,\n actions = [],\n }: RejectUnverifiedIdentifiersCommandFlags,\n): Promise<void> {\n await removeUnverifiedRequestIdentifiers({\n requestActions: actions,\n transcendUrl,\n auth,\n identifierNames,\n });\n}\n"],"mappings":"oLAWA,eAAsBA,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,QAAAC,EAAU,CAAC,CACb,EACe,CACf,MAAMC,EAAmC,CACvC,eAAgBD,EAChB,aAAAF,EACA,KAAAD,EACA,gBAAAE,CACF,CAAC,CACH","names":["rejectUnverifiedIdentifiers","auth","transcendUrl","identifierNames","actions","removeUnverifiedRequestIdentifiers"]}
@@ -0,0 +1,2 @@
1
+ import{V as t}from"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function n({auth:s,dataSiloId:a,status:e,statuses:i,transcendUrl:o}){await t({transcendUrl:o,auth:s,status:e,dataSiloId:a,requestStatuses:i})}export{n as skipRequestDataSilos};
2
+ //# sourceMappingURL=impl-R3SREBHK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/system/skip-request-data-silos/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport type { RequestStatus } from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '@/lib/requests';\n\ninterface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status: 'SKIPPED' | 'RESOLVED';\n}\n\nexport async function skipRequestDataSilos(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n status,\n statuses,\n transcendUrl,\n }: SkipRequestDataSilosCommandFlags,\n): Promise<void> {\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"],"mappings":"oLAYA,eAAsBA,EAEpB,CACE,KAAAC,EACA,WAAAC,EACA,OAAAC,EACA,SAAAC,EACA,aAAAC,CACF,EACe,CACf,MAAML,EAA2B,CAC/B,aAAAK,EACA,KAAAJ,EACA,OAAAE,EACA,WAAAD,EACA,gBAAiBE,CACnB,CAAC,CACH","names":["skipRequestDataSilos","auth","dataSiloId","status","statuses","transcendUrl"]}
@@ -0,0 +1,2 @@
1
+ import{e as t}from"./chunk-UUBO75GS.js";import"./chunk-MA4JWWRO.js";import"./chunk-TR32ZRNC.js";import"./chunk-WEQUQAB7.js";import"./chunk-43JWXG77.js";import"./chunk-L5ULN3IT.js";import"./chunk-XWOTEZCO.js";import"./chunk-ARVEJERC.js";async function s({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n}){await t({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n})}export{s as markIdentifiersCompleted};
2
+ //# sourceMappingURL=impl-RCQ2XX63.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/commands/request/cron/mark-identifiers-completed/impl.ts"],"sourcesContent":["import type { LocalContext } from '@/context';\nimport { pushCronIdentifiersFromCsv } from '@/lib/cron';\n\ninterface MarkIdentifiersCompletedCommandFlags {\n file: string;\n transcendUrl: string;\n auth: string;\n sombraAuth?: string;\n dataSiloId: string;\n}\n\nexport async function markIdentifiersCompleted(\n this: LocalContext,\n {\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n }: MarkIdentifiersCompletedCommandFlags,\n): Promise<void> {\n await pushCronIdentifiersFromCsv({\n file,\n transcendUrl,\n auth,\n sombraAuth,\n dataSiloId,\n });\n}\n"],"mappings":"4OAWA,eAAsBA,EAEpB,CACE,KAAAC,EACA,aAAAC,EACA,KAAAC,EACA,WAAAC,EACA,WAAAC,CACF,EACe,CACf,MAAMC,EAA2B,CAC/B,KAAAL,EACA,aAAAC,EACA,KAAAC,EACA,WAAAC,EACA,WAAAC,CACF,CAAC,CACH","names":["markIdentifiersCompleted","file","transcendUrl","auth","sombraAuth","dataSiloId","pushCronIdentifiersFromCsv"]}