@transcend-io/cli 8.37.0 → 8.37.2

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 (138) hide show
  1. package/README.md +35 -19
  2. package/dist/{api-keys-eh_rPCV_.cjs → api-keys-Bvt2HbSv.cjs} +2 -2
  3. package/dist/{api-keys-eh_rPCV_.cjs.map → api-keys-Bvt2HbSv.cjs.map} +1 -1
  4. package/dist/{app-D0ewaGAn.cjs → app-CdWFyBYu.cjs} +18 -18
  5. package/dist/app-CdWFyBYu.cjs.map +1 -0
  6. package/dist/bin/bash-complete.cjs +1 -1
  7. package/dist/bin/cli.cjs +1 -1
  8. package/dist/bin/deprecated-command.cjs +1 -1
  9. package/dist/{code-scanning-BB6Ncuzh.cjs → code-scanning-BZzwKEfY.cjs} +2 -2
  10. package/dist/{code-scanning-BB6Ncuzh.cjs.map → code-scanning-BZzwKEfY.cjs.map} +1 -1
  11. package/dist/{command-BUkTNNIa.cjs → command-DNcjQs8y.cjs} +2 -2
  12. package/dist/{command-BUkTNNIa.cjs.map → command-DNcjQs8y.cjs.map} +1 -1
  13. package/dist/{consent-manager-Df8gw2Qh.cjs → consent-manager-oip5m3XC.cjs} +2 -2
  14. package/dist/{consent-manager-Df8gw2Qh.cjs.map → consent-manager-oip5m3XC.cjs.map} +1 -1
  15. package/dist/{constants-7qBywLgI.cjs → constants-K6pQQtc7.cjs} +2 -2
  16. package/dist/{constants-7qBywLgI.cjs.map → constants-K6pQQtc7.cjs.map} +1 -1
  17. package/dist/{cron-BhfbISdy.cjs → cron-lijiEqFA.cjs} +2 -2
  18. package/dist/{cron-BhfbISdy.cjs.map → cron-lijiEqFA.cjs.map} +1 -1
  19. package/dist/{data-inventory-D36n1YAJ.cjs → data-inventory-BKAQGjFN.cjs} +2 -2
  20. package/dist/{data-inventory-D36n1YAJ.cjs.map → data-inventory-BKAQGjFN.cjs.map} +1 -1
  21. package/dist/{dataFlowsToDataSilos-BLNhWeOw.cjs → dataFlowsToDataSilos-CnvG2jqy.cjs} +2 -2
  22. package/dist/{dataFlowsToDataSilos-BLNhWeOw.cjs.map → dataFlowsToDataSilos-CnvG2jqy.cjs.map} +1 -1
  23. package/dist/{impl-BNEgHNz7.cjs → impl-1-1sg4WF.cjs} +2 -2
  24. package/dist/{impl-BNEgHNz7.cjs.map → impl-1-1sg4WF.cjs.map} +1 -1
  25. package/dist/{impl-CdXk78ar.cjs → impl-57HOh2c3.cjs} +2 -2
  26. package/dist/{impl-CdXk78ar.cjs.map → impl-57HOh2c3.cjs.map} +1 -1
  27. package/dist/{impl-BC1mCUl1.cjs → impl-58WnFNmn.cjs} +2 -2
  28. package/dist/{impl-BC1mCUl1.cjs.map → impl-58WnFNmn.cjs.map} +1 -1
  29. package/dist/impl-B4OVz7FC.cjs +2 -0
  30. package/dist/impl-B4OVz7FC.cjs.map +1 -0
  31. package/dist/{impl-5AfPlpzA.cjs → impl-BFRrE04X.cjs} +2 -2
  32. package/dist/{impl-5AfPlpzA.cjs.map → impl-BFRrE04X.cjs.map} +1 -1
  33. package/dist/{impl-DxDGyjMI.cjs → impl-BSS_avMv.cjs} +2 -2
  34. package/dist/{impl-DxDGyjMI.cjs.map → impl-BSS_avMv.cjs.map} +1 -1
  35. package/dist/{impl-DEULjxRp.cjs → impl-BVmw0mE4.cjs} +2 -2
  36. package/dist/{impl-DEULjxRp.cjs.map → impl-BVmw0mE4.cjs.map} +1 -1
  37. package/dist/{impl-IQ7JOZxt.cjs → impl-Bf_hLViY.cjs} +2 -2
  38. package/dist/{impl-IQ7JOZxt.cjs.map → impl-Bf_hLViY.cjs.map} +1 -1
  39. package/dist/{impl-47WGWxyj.cjs → impl-BkEg-Nm6.cjs} +2 -2
  40. package/dist/{impl-47WGWxyj.cjs.map → impl-BkEg-Nm6.cjs.map} +1 -1
  41. package/dist/{impl-DDHduv-X.cjs → impl-Bmln6D88.cjs} +2 -2
  42. package/dist/{impl-DDHduv-X.cjs.map → impl-Bmln6D88.cjs.map} +1 -1
  43. package/dist/impl-BqIqzp40.cjs +2 -0
  44. package/dist/impl-BqIqzp40.cjs.map +1 -0
  45. package/dist/{impl-DVCUGrVY.cjs → impl-BszlCtcR.cjs} +2 -2
  46. package/dist/{impl-DVCUGrVY.cjs.map → impl-BszlCtcR.cjs.map} +1 -1
  47. package/dist/impl-BtuKKdl3.cjs +2 -0
  48. package/dist/impl-BtuKKdl3.cjs.map +1 -0
  49. package/dist/{impl-DI3lTLCy.cjs → impl-C2e4xVvX.cjs} +2 -2
  50. package/dist/{impl-DI3lTLCy.cjs.map → impl-C2e4xVvX.cjs.map} +1 -1
  51. package/dist/impl-C65nk0G8.cjs +2 -0
  52. package/dist/impl-C65nk0G8.cjs.map +1 -0
  53. package/dist/{impl-DHUnZ-Qx.cjs → impl-CCdxbRmg.cjs} +2 -2
  54. package/dist/{impl-DHUnZ-Qx.cjs.map → impl-CCdxbRmg.cjs.map} +1 -1
  55. package/dist/{impl-Dxgw6Xfk.cjs → impl-CMwmo2vR.cjs} +2 -2
  56. package/dist/{impl-Dxgw6Xfk.cjs.map → impl-CMwmo2vR.cjs.map} +1 -1
  57. package/dist/impl-Cb64HwGx.cjs +2 -0
  58. package/dist/impl-Cb64HwGx.cjs.map +1 -0
  59. package/dist/{impl-4NCrJ_Y6.cjs → impl-CdfA8kxo.cjs} +2 -2
  60. package/dist/{impl-4NCrJ_Y6.cjs.map → impl-CdfA8kxo.cjs.map} +1 -1
  61. package/dist/{impl-DlB56v12.cjs → impl-CkfOZzpI.cjs} +2 -2
  62. package/dist/{impl-DlB56v12.cjs.map → impl-CkfOZzpI.cjs.map} +1 -1
  63. package/dist/{impl-bgI-lF8x.cjs → impl-ClujxTb8.cjs} +2 -2
  64. package/dist/{impl-bgI-lF8x.cjs.map → impl-ClujxTb8.cjs.map} +1 -1
  65. package/dist/{impl-orpaJd8b.cjs → impl-D-IWtHQi.cjs} +2 -2
  66. package/dist/{impl-orpaJd8b.cjs.map → impl-D-IWtHQi.cjs.map} +1 -1
  67. package/dist/{impl-DQTfX_qq.cjs → impl-D9-ZQmJB.cjs} +2 -2
  68. package/dist/{impl-DQTfX_qq.cjs.map → impl-D9-ZQmJB.cjs.map} +1 -1
  69. package/dist/{impl-Du1Ty4JE.cjs → impl-DGel0ZLe.cjs} +2 -2
  70. package/dist/{impl-Du1Ty4JE.cjs.map → impl-DGel0ZLe.cjs.map} +1 -1
  71. package/dist/{impl-BPq8EyHn.cjs → impl-DL2j8g1C.cjs} +2 -2
  72. package/dist/{impl-BPq8EyHn.cjs.map → impl-DL2j8g1C.cjs.map} +1 -1
  73. package/dist/{impl-CkkD_smS.cjs → impl-DSNgFKP_.cjs} +2 -2
  74. package/dist/{impl-CkkD_smS.cjs.map → impl-DSNgFKP_.cjs.map} +1 -1
  75. package/dist/{impl-CfsKuglq.cjs → impl-DU85U1jO.cjs} +2 -2
  76. package/dist/{impl-CfsKuglq.cjs.map → impl-DU85U1jO.cjs.map} +1 -1
  77. package/dist/{impl-DS2IlxS3.cjs → impl-DV5f54rm.cjs} +2 -2
  78. package/dist/{impl-DS2IlxS3.cjs.map → impl-DV5f54rm.cjs.map} +1 -1
  79. package/dist/impl-DXKJH0AZ.cjs +2 -0
  80. package/dist/impl-DXKJH0AZ.cjs.map +1 -0
  81. package/dist/{impl-BfN9XMNM.cjs → impl-DbxzDk8h.cjs} +2 -2
  82. package/dist/{impl-BfN9XMNM.cjs.map → impl-DbxzDk8h.cjs.map} +1 -1
  83. package/dist/{impl-CVsXgVaf.cjs → impl-DhnCAbU-.cjs} +2 -2
  84. package/dist/{impl-CVsXgVaf.cjs.map → impl-DhnCAbU-.cjs.map} +1 -1
  85. package/dist/{impl-BxOeeF35.cjs → impl-Dj2fTDNO.cjs} +2 -2
  86. package/dist/{impl-BxOeeF35.cjs.map → impl-Dj2fTDNO.cjs.map} +1 -1
  87. package/dist/{impl-C1IjDv1N.cjs → impl-KAorCmlT.cjs} +2 -2
  88. package/dist/{impl-C1IjDv1N.cjs.map → impl-KAorCmlT.cjs.map} +1 -1
  89. package/dist/{impl-Bv2mYf1w.cjs → impl-LMp29vxd.cjs} +2 -2
  90. package/dist/{impl-Bv2mYf1w.cjs.map → impl-LMp29vxd.cjs.map} +1 -1
  91. package/dist/{impl-feFIqpBO.cjs → impl-MrsSr72p.cjs} +2 -2
  92. package/dist/{impl-feFIqpBO.cjs.map → impl-MrsSr72p.cjs.map} +1 -1
  93. package/dist/{impl-Boa1Uuzk.cjs → impl-SZp3iTUp.cjs} +2 -2
  94. package/dist/{impl-Boa1Uuzk.cjs.map → impl-SZp3iTUp.cjs.map} +1 -1
  95. package/dist/{impl-8Basu9U-.cjs → impl-W6jE_UV0.cjs} +2 -2
  96. package/dist/{impl-8Basu9U-.cjs.map → impl-W6jE_UV0.cjs.map} +1 -1
  97. package/dist/{impl-Cotrjytz.cjs → impl-XwC7A99P.cjs} +2 -2
  98. package/dist/{impl-Cotrjytz.cjs.map → impl-XwC7A99P.cjs.map} +1 -1
  99. package/dist/{impl-DKMxd5Wy.cjs → impl-ebVxRYAc.cjs} +2 -2
  100. package/dist/{impl-DKMxd5Wy.cjs.map → impl-ebVxRYAc.cjs.map} +1 -1
  101. package/dist/impl-k61p_VQY.cjs +2 -0
  102. package/dist/impl-k61p_VQY.cjs.map +1 -0
  103. package/dist/impl-kMebV10f.cjs +2 -0
  104. package/dist/impl-kMebV10f.cjs.map +1 -0
  105. package/dist/{impl--PmMYd1g.cjs → impl-oYFKp06U.cjs} +2 -2
  106. package/dist/{impl--PmMYd1g.cjs.map → impl-oYFKp06U.cjs.map} +1 -1
  107. package/dist/index.cjs +1 -1
  108. package/dist/index.d.cts +74 -11
  109. package/dist/{manual-enrichment-CzRiIFev.cjs → manual-enrichment-C6h9gjY1.cjs} +2 -2
  110. package/dist/{manual-enrichment-CzRiIFev.cjs.map → manual-enrichment-C6h9gjY1.cjs.map} +1 -1
  111. package/dist/{pooling-BJAPXDiq.cjs → pooling-DLEGcLtt.cjs} +5 -5
  112. package/dist/pooling-DLEGcLtt.cjs.map +1 -0
  113. package/dist/{preference-management-DV6NIcXt.cjs → preference-management-B36PQuMK.cjs} +2 -2
  114. package/dist/{preference-management-DV6NIcXt.cjs.map → preference-management-B36PQuMK.cjs.map} +1 -1
  115. package/dist/{syncConfigurationToTranscend-Bd0ZTIm1.cjs → syncConfigurationToTranscend-DKliAJhK.cjs} +12 -6
  116. package/dist/syncConfigurationToTranscend-DKliAJhK.cjs.map +1 -0
  117. package/dist/{uploadConsents-XYRco1_L.cjs → uploadConsents-MtgCk8B0.cjs} +2 -2
  118. package/dist/{uploadConsents-XYRco1_L.cjs.map → uploadConsents-MtgCk8B0.cjs.map} +1 -1
  119. package/package.json +1 -1
  120. package/dist/app-D0ewaGAn.cjs.map +0 -1
  121. package/dist/impl--CgaKM4x.cjs +0 -2
  122. package/dist/impl--CgaKM4x.cjs.map +0 -1
  123. package/dist/impl-ByQI5s4b.cjs +0 -2
  124. package/dist/impl-ByQI5s4b.cjs.map +0 -1
  125. package/dist/impl-Crhm9eFe.cjs +0 -2
  126. package/dist/impl-Crhm9eFe.cjs.map +0 -1
  127. package/dist/impl-D2P_gDE8.cjs +0 -2
  128. package/dist/impl-D2P_gDE8.cjs.map +0 -1
  129. package/dist/impl-DNDs3FFG.cjs +0 -2
  130. package/dist/impl-DNDs3FFG.cjs.map +0 -1
  131. package/dist/impl-DZbi3AkB.cjs +0 -2
  132. package/dist/impl-DZbi3AkB.cjs.map +0 -1
  133. package/dist/impl-DcMkDhXY.cjs +0 -2
  134. package/dist/impl-DcMkDhXY.cjs.map +0 -1
  135. package/dist/impl-xUzH7vUF.cjs +0 -2
  136. package/dist/impl-xUzH7vUF.cjs.map +0 -1
  137. package/dist/pooling-BJAPXDiq.cjs.map +0 -1
  138. package/dist/syncConfigurationToTranscend-Bd0ZTIm1.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"impl-C1IjDv1N.cjs","names":["parseFilePath","writeLargeCsv","uniq","pullChunkedCustomSiloOutstandingIdentifiers"],"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 pullChunkedCustomSiloOutstandingIdentifiers,\n} from '../../../../lib/cron';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\nimport { parseFilePath, writeLargeCsv } from '../../../../lib/helpers';\n\nexport interface 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 this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const { baseName, extension } = parseFilePath(file);\n let fileCount = 0;\n\n const onSave = async (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 await writeLargeCsv(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":"+XAyBA,eAAsB,EAEpB,CACE,OACA,eACA,OACA,aACA,aACA,UACA,YACA,mBACA,aAEa,CACX,GACF,EAAA,EAAO,KACL,EAAA,QAAO,OACL,wEACD,CACF,EAID,OAAO,MAAM,EAAU,EACvB,GAAa,GACb,EAAY,IAAc,KAE1B,EAAA,EAAO,MACL,EAAA,QAAO,IACL,wBAAwB,EAAU,sDAAsD,EAAU,GACnG,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAGtB,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,GAAM,CAAE,WAAU,aAAcA,EAAAA,EAAc,EAAK,CAC/C,EAAY,EAsBhB,MAAMG,EAAAA,EAA4C,CAChD,eACA,YAAa,EACb,aAAc,EACd,OAxBa,KAAO,IAAmD,CACvE,IAAM,EAAmB,GAAG,EAAS,GAAG,IAAY,IAepD,OAdA,EAAA,EAAO,KACL,EAAA,QAAO,KACL,UAAU,EAAM,OAAO,wBAAwB,EAAiB,GACjE,CACF,CAGD,MAAMF,EAAAA,EAAc,EAAkB,EADtBC,EAAAA,GAAK,EAAM,IAAK,GAAM,OAAO,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CACR,CACrD,EAAA,EAAO,KACL,EAAA,QAAO,MACL,sBAAsB,EAAM,OAAO,wBAAwB,EAAiB,GAC7E,CACF,CACD,GAAa,EACN,QAAQ,SAAS,EASxB,UACA,OACA,aACA,aACA,mBACD,CAAC"}
1
+ {"version":3,"file":"impl-KAorCmlT.cjs","names":["parseFilePath","writeLargeCsv","uniq","pullChunkedCustomSiloOutstandingIdentifiers"],"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 pullChunkedCustomSiloOutstandingIdentifiers,\n} from '../../../../lib/cron';\nimport { RequestAction } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\nimport { parseFilePath, writeLargeCsv } from '../../../../lib/helpers';\n\nexport interface 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 this.process.exit(1);\n }\n\n doneInputValidation(this.process.exit);\n\n const { baseName, extension } = parseFilePath(file);\n let fileCount = 0;\n\n const onSave = async (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 await writeLargeCsv(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":"+XAyBA,eAAsB,EAEpB,CACE,OACA,eACA,OACA,aACA,aACA,UACA,YACA,mBACA,aAEa,CACX,GACF,EAAA,EAAO,KACL,EAAA,QAAO,OACL,wEACD,CACF,EAID,OAAO,MAAM,EAAU,EACvB,GAAa,GACb,EAAY,IAAc,KAE1B,EAAA,EAAO,MACL,EAAA,QAAO,IACL,wBAAwB,EAAU,sDAAsD,EAAU,GACnG,CACF,CACD,KAAK,QAAQ,KAAK,EAAE,EAGtB,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,GAAM,CAAE,WAAU,aAAcA,EAAAA,EAAc,EAAK,CAC/C,EAAY,EAsBhB,MAAMG,EAAAA,EAA4C,CAChD,eACA,YAAa,EACb,aAAc,EACd,OAxBa,KAAO,IAAmD,CACvE,IAAM,EAAmB,GAAG,EAAS,GAAG,IAAY,IAepD,OAdA,EAAA,EAAO,KACL,EAAA,QAAO,KACL,UAAU,EAAM,OAAO,wBAAwB,EAAiB,GACjE,CACF,CAGD,MAAMF,EAAAA,EAAc,EAAkB,EADtBC,EAAAA,GAAK,EAAM,IAAK,GAAM,OAAO,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CACR,CACrD,EAAA,EAAO,KACL,EAAA,QAAO,MACL,sBAAsB,EAAM,OAAO,wBAAwB,EAAiB,GAC7E,CACF,CACD,GAAa,EACN,QAAQ,SAAS,EASxB,UACA,OACA,aACA,aACA,mBACD,CAAC"}
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-7qBywLgI.cjs`);const t=require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`);require(`./enums-BZulhPFa.cjs`);const n=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const r=require(`./consent-manager-Df8gw2Qh.cjs`);require(`./uploadConsents-XYRco1_L.cjs`);const i=require(`./api-keys-eh_rPCV_.cjs`),a=require(`./done-input-validation-DGckEJ5a.cjs`);let o=require(`@transcend-io/privacy-types`),s=require(`colors`);s=e.t(s);async function c({auth:e,bundleTypes:c=[o.ConsentBundleType.Production,o.ConsentBundleType.Test],deploy:l,transcendUrl:u}){a.t(this.process.exit);let d=await i.r(e);typeof d==`string`?(await r.c({deploy:l,transcendUrl:u,auth:d,bundleTypes:c}),n.t.info(s.default.green(`Successfully updated Consent Manager!`))):(await t.Es(d,async e=>{n.t.info(s.default.magenta(`Updating Consent Manager for organization "${e.organizationName}"...`)),await r.c({deploy:l,transcendUrl:u,auth:e.apiKey,bundleTypes:c}),n.t.info(s.default.green(`Successfully updated Consent Manager for organization "${e.organizationName}"!`))}),n.t.info(s.default.green(`Successfully updated Consent Managers!`)))}exports.updateConsentManager=c;
2
- //# sourceMappingURL=impl-Bv2mYf1w.cjs.map
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-K6pQQtc7.cjs`);const t=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`);require(`./enums-BZulhPFa.cjs`);const n=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const r=require(`./consent-manager-oip5m3XC.cjs`);require(`./uploadConsents-MtgCk8B0.cjs`);const i=require(`./api-keys-Bvt2HbSv.cjs`),a=require(`./done-input-validation-DGckEJ5a.cjs`);let o=require(`@transcend-io/privacy-types`),s=require(`colors`);s=e.t(s);async function c({auth:e,bundleTypes:c=[o.ConsentBundleType.Production,o.ConsentBundleType.Test],deploy:l,transcendUrl:u}){a.t(this.process.exit);let d=await i.r(e);typeof d==`string`?(await r.c({deploy:l,transcendUrl:u,auth:d,bundleTypes:c}),n.t.info(s.default.green(`Successfully updated Consent Manager!`))):(await t.Es(d,async e=>{n.t.info(s.default.magenta(`Updating Consent Manager for organization "${e.organizationName}"...`)),await r.c({deploy:l,transcendUrl:u,auth:e.apiKey,bundleTypes:c}),n.t.info(s.default.green(`Successfully updated Consent Manager for organization "${e.organizationName}"!`))}),n.t.info(s.default.green(`Successfully updated Consent Managers!`)))}exports.updateConsentManager=c;
2
+ //# sourceMappingURL=impl-LMp29vxd.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl-Bv2mYf1w.cjs","names":["ConsentBundleType","validateTranscendAuth","updateConsentManagerVersionToLatest","mapSeries"],"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';\n\nimport { logger } from '../../../logger';\nimport { updateConsentManagerVersionToLatest } from '../../../lib/consent-manager';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // 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":"wiBAiBA,eAAsB,EAEpB,CACE,OACA,cAAc,CAACA,EAAAA,kBAAkB,WAAYA,EAAAA,kBAAkB,KAAK,CACpE,SACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAGtC,IAAM,EAAe,MAAMC,EAAAA,EAAsB,EAAK,CAGlD,OAAO,GAAiB,UAE1B,MAAMC,EAAAA,EAAoC,CACxC,SACA,eACA,KAAM,EACN,cACD,CAAC,CACF,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,wCAAwC,CAAC,GAElE,MAAMC,EAAAA,GAAU,EAAc,KAAO,IAAW,CAC9C,EAAA,EAAO,KACL,EAAA,QAAO,QACL,8CAA8C,EAAO,iBAAiB,MACvE,CACF,CAED,MAAMD,EAAAA,EAAoC,CACxC,SACA,eACA,KAAM,EAAO,OACb,cACD,CAAC,CAEF,EAAA,EAAO,KACL,EAAA,QAAO,MACL,0DAA0D,EAAO,iBAAiB,IACnF,CACF,EACD,CACF,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,yCAAyC,CAAC"}
1
+ {"version":3,"file":"impl-LMp29vxd.cjs","names":["ConsentBundleType","validateTranscendAuth","updateConsentManagerVersionToLatest","mapSeries"],"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';\n\nimport { logger } from '../../../logger';\nimport { updateConsentManagerVersionToLatest } from '../../../lib/consent-manager';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // 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":"wiBAiBA,eAAsB,EAEpB,CACE,OACA,cAAc,CAACA,EAAAA,kBAAkB,WAAYA,EAAAA,kBAAkB,KAAK,CACpE,SACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAGtC,IAAM,EAAe,MAAMC,EAAAA,EAAsB,EAAK,CAGlD,OAAO,GAAiB,UAE1B,MAAMC,EAAAA,EAAoC,CACxC,SACA,eACA,KAAM,EACN,cACD,CAAC,CACF,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,wCAAwC,CAAC,GAElE,MAAMC,EAAAA,GAAU,EAAc,KAAO,IAAW,CAC9C,EAAA,EAAO,KACL,EAAA,QAAO,QACL,8CAA8C,EAAO,iBAAiB,MACvE,CACF,CAED,MAAMD,EAAAA,EAAoC,CACxC,SACA,eACA,KAAM,EAAO,OACb,cACD,CAAC,CAEF,EAAA,EAAO,KACL,EAAA,QAAO,MACL,0DAA0D,EAAO,iBAAiB,IACnF,CACF,EACD,CACF,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,yCAAyC,CAAC"}
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-7qBywLgI.cjs`),require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`),require(`./enums-BZulhPFa.cjs`);const t=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const n=require(`./consent-manager-Df8gw2Qh.cjs`);require(`./uploadConsents-XYRco1_L.cjs`);const r=require(`./api-keys-eh_rPCV_.cjs`),i=require(`./done-input-validation-DGckEJ5a.cjs`);let a=require(`node:fs`),o=require(`colors`);o=e.t(o);async function s({auth:e,xdiLocation:s,file:c,removeIpAddresses:l,domainBlockList:u,xdiAllowedCommands:d,transcendUrl:f}){i.t(this.process.exit);let{syncGroups:p,html:m}=await n.r(await r.r(e),{xdiLocation:s,transcendUrl:f,removeIpAddresses:l,domainBlockList:u.length>0?u:void 0,xdiAllowedCommands:d});t.t.info(o.default.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(p,null,2)}`)),(0,a.writeFileSync)(c,m),t.t.info(o.default.green(`Wrote configuration to file "${c}"!`))}exports.buildXdiSyncEndpoint=s;
2
- //# sourceMappingURL=impl-feFIqpBO.cjs.map
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-K6pQQtc7.cjs`),require(`./syncConfigurationToTranscend-DKliAJhK.cjs`),require(`./enums-BZulhPFa.cjs`);const t=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const n=require(`./consent-manager-oip5m3XC.cjs`);require(`./uploadConsents-MtgCk8B0.cjs`);const r=require(`./api-keys-Bvt2HbSv.cjs`),i=require(`./done-input-validation-DGckEJ5a.cjs`);let a=require(`node:fs`),o=require(`colors`);o=e.t(o);async function s({auth:e,xdiLocation:s,file:c,removeIpAddresses:l,domainBlockList:u,xdiAllowedCommands:d,transcendUrl:f}){i.t(this.process.exit);let{syncGroups:p,html:m}=await n.r(await r.r(e),{xdiLocation:s,transcendUrl:f,removeIpAddresses:l,domainBlockList:u.length>0?u:void 0,xdiAllowedCommands:d});t.t.info(o.default.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(p,null,2)}`)),(0,a.writeFileSync)(c,m),t.t.info(o.default.green(`Wrote configuration to file "${c}"!`))}exports.buildXdiSyncEndpoint=s;
2
+ //# sourceMappingURL=impl-MrsSr72p.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl-feFIqpBO.cjs","names":["buildXdiSyncEndpointHelper","validateTranscendAuth"],"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 'node:fs';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // 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":"4gBAkBA,eAAsB,EAEpB,CACE,OACA,cACA,OACA,oBACA,kBACA,qBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAMtC,GAAM,CAAE,aAAY,QAAS,MAAMA,EAAAA,EAHd,MAAMC,EAAAA,EAAsB,EAAK,CAGsB,CAC1E,cACA,eACA,oBACA,gBAAiB,EAAgB,OAAS,EAAI,EAAkB,IAAA,GAChE,qBACD,CAAC,CAGF,EAAA,EAAO,KACL,EAAA,QAAO,MACL,2DAA2D,KAAK,UAC9D,EACA,KACA,EACD,GACF,CACF,EAGD,EAAA,EAAA,eAAc,EAAM,EAAK,CACzB,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,gCAAgC,EAAK,IAAI,CAAC"}
1
+ {"version":3,"file":"impl-MrsSr72p.cjs","names":["buildXdiSyncEndpointHelper","validateTranscendAuth"],"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 'node:fs';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // 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":"4gBAkBA,eAAsB,EAEpB,CACE,OACA,cACA,OACA,oBACA,kBACA,qBACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAMtC,GAAM,CAAE,aAAY,QAAS,MAAMA,EAAAA,EAHd,MAAMC,EAAAA,EAAsB,EAAK,CAGsB,CAC1E,cACA,eACA,oBACA,gBAAiB,EAAgB,OAAS,EAAI,EAAkB,IAAA,GAChE,qBACD,CAAC,CAGF,EAAA,EAAO,KACL,EAAA,QAAO,MACL,2DAA2D,KAAK,UAC9D,EACA,KACA,EACD,GACF,CACF,EAGD,EAAA,EAAA,eAAc,EAAM,EAAK,CACzB,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,gCAAgC,EAAK,IAAI,CAAC"}
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./constants-7qBywLgI.cjs`),n=require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`);require(`./enums-BZulhPFa.cjs`);const r=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const i=require(`./readTranscendYaml-Cycz6RxW.cjs`),a=require(`./mergeTranscendInputs-BIBCYbug.cjs`),o=require(`./api-keys-eh_rPCV_.cjs`),s=require(`./done-input-validation-DGckEJ5a.cjs`);let c=require(`node:fs`),l=require(`node:path`),u=require(`colors`);u=e.t(u);async function d({transcendUrl:e,auth:t,pageSize:i,publishToPrivacyCenter:a,contents:o,deleteExtraAttributeValues:s=!1,classifyService:c=!1}){let l=n.ti(e,t);try{return!await n.t(o,l,{pageSize:i,publishToPrivacyCenter:a,classifyService:c,deleteExtraAttributeValues:s})}catch(e){return r.t.error(u.default.red(`An unexpected error occurred syncing the schema: ${e.message}`)),!1}}async function f({file:e=`./transcend.yml`,transcendUrl:f,auth:p,variables:m,pageSize:h,publishToPrivacyCenter:g,classifyService:_,deleteExtraAttributeValues:v}){s.t(this.process.exit);let y=await o.r(p),b=n.A(m),x;if(x=Array.isArray(y)&&(0,c.lstatSync)(e).isDirectory()?o.n(e).map(t=>(0,l.join)(e,t)):e.split(`,`),x.length<1)throw Error(`No file specified!`);let S=x.map(e=>{(0,c.existsSync)(e)?r.t.info(u.default.magenta(`Reading file "${e}"...`)):(r.t.error(u.default.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),this.process.exit(1));try{let t=i.r(e,b);return r.t.info(u.default.green(`Successfully read in "${e}"`)),{content:t,name:e.split(`/`).pop().replace(`.yml`,``)}}catch(e){r.t.error(u.default.red(`The shape of your yaml file is invalid with the following errors: ${e.message}`)),this.process.exit(1)}});if(typeof y==`string`){let[e,...n]=S.map(({content:e})=>e);await d({transcendUrl:f,auth:y,contents:a.t(e,...n),publishToPrivacyCenter:g,deleteExtraAttributeValues:v,pageSize:h,classifyService:!!_})||(r.t.info(u.default.red(`Sync encountered errors. View output above for more information, or check out ${t.r}`)),this.process.exit(1))}else{if(S.length!==1&&S.length!==y.length)throw 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 ${y.length} API key${y.length===1?``:`s`}`);let e=[];await n.Es(y,async(t,n)=>{let i=`[${n+1}/${y.length}][${t.organizationName}] `;r.t.info(u.default.magenta(`~~~\n\n${i}Attempting to push configuration...\n\n~~~`));let a=S.length===1?S[0].content:S.find(e=>e.name===t.organizationName)?.content;if(!a){r.t.error(u.default.red(`${i}Failed to find transcend.yml file for organization: "${t.organizationName}".`)),e.push(t.organizationName);return}await d({transcendUrl:f,auth:t.apiKey,contents:a,pageSize:h,publishToPrivacyCenter:g,deleteExtraAttributeValues:v,classifyService:_})?r.t.info(u.default.green(`${i}Successfully pushed configuration!`)):(r.t.error(u.default.red(`${i}Failed to sync configuration.`)),e.push(t.organizationName))}),e.length>0&&(r.t.info(u.default.red(`Sync encountered errors for "${e.join(`,`)}". View output above for more information, or check out ${t.r}`)),this.process.exit(1))}r.t.info(u.default.green(`Successfully synced yaml file to Transcend! View at ${t.r}`))}exports.push=f;
2
- //# sourceMappingURL=impl-Boa1Uuzk.cjs.map
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./constants-K6pQQtc7.cjs`),n=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`);require(`./enums-BZulhPFa.cjs`);const r=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const i=require(`./readTranscendYaml-Cycz6RxW.cjs`),a=require(`./mergeTranscendInputs-BIBCYbug.cjs`),o=require(`./api-keys-Bvt2HbSv.cjs`),s=require(`./done-input-validation-DGckEJ5a.cjs`);let c=require(`node:fs`),l=require(`node:path`),u=require(`colors`);u=e.t(u);async function d({transcendUrl:e,auth:t,pageSize:i,publishToPrivacyCenter:a,contents:o,deleteExtraAttributeValues:s=!1,classifyService:c=!1}){let l=n.ti(e,t);try{return!await n.t(o,l,{pageSize:i,publishToPrivacyCenter:a,classifyService:c,deleteExtraAttributeValues:s})}catch(e){return r.t.error(u.default.red(`An unexpected error occurred syncing the schema: ${e.message}`)),!1}}async function f({file:e=`./transcend.yml`,transcendUrl:f,auth:p,variables:m,pageSize:h,publishToPrivacyCenter:g,classifyService:_,deleteExtraAttributeValues:v}){s.t(this.process.exit);let y=await o.r(p),b=n.A(m),x;if(x=Array.isArray(y)&&(0,c.lstatSync)(e).isDirectory()?o.n(e).map(t=>(0,l.join)(e,t)):e.split(`,`),x.length<1)throw Error(`No file specified!`);let S=x.map(e=>{(0,c.existsSync)(e)?r.t.info(u.default.magenta(`Reading file "${e}"...`)):(r.t.error(u.default.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),this.process.exit(1));try{let t=i.r(e,b);return r.t.info(u.default.green(`Successfully read in "${e}"`)),{content:t,name:e.split(`/`).pop().replace(`.yml`,``)}}catch(e){r.t.error(u.default.red(`The shape of your yaml file is invalid with the following errors: ${e.message}`)),this.process.exit(1)}});if(typeof y==`string`){let[e,...n]=S.map(({content:e})=>e);await d({transcendUrl:f,auth:y,contents:a.t(e,...n),publishToPrivacyCenter:g,deleteExtraAttributeValues:v,pageSize:h,classifyService:!!_})||(r.t.info(u.default.red(`Sync encountered errors. View output above for more information, or check out ${t.r}`)),this.process.exit(1))}else{if(S.length!==1&&S.length!==y.length)throw 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 ${y.length} API key${y.length===1?``:`s`}`);let e=[];await n.Es(y,async(t,n)=>{let i=`[${n+1}/${y.length}][${t.organizationName}] `;r.t.info(u.default.magenta(`~~~\n\n${i}Attempting to push configuration...\n\n~~~`));let a=S.length===1?S[0].content:S.find(e=>e.name===t.organizationName)?.content;if(!a){r.t.error(u.default.red(`${i}Failed to find transcend.yml file for organization: "${t.organizationName}".`)),e.push(t.organizationName);return}await d({transcendUrl:f,auth:t.apiKey,contents:a,pageSize:h,publishToPrivacyCenter:g,deleteExtraAttributeValues:v,classifyService:_})?r.t.info(u.default.green(`${i}Successfully pushed configuration!`)):(r.t.error(u.default.red(`${i}Failed to sync configuration.`)),e.push(t.organizationName))}),e.length>0&&(r.t.info(u.default.red(`Sync encountered errors for "${e.join(`,`)}". View output above for more information, or check out ${t.r}`)),this.process.exit(1))}r.t.info(u.default.green(`Successfully synced yaml file to Transcend! View at ${t.r}`))}exports.push=f;
2
+ //# sourceMappingURL=impl-SZp3iTUp.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl-Boa1Uuzk.cjs","names":["buildTranscendGraphQLClient","syncConfigurationToTranscend","validateTranscendAuth","parseVariablesFromString","listFiles","readTranscendYaml","mergeTranscendInputs","ADMIN_DASH_INTEGRATIONS","mapSeries"],"sources":["../src/commands/inventory/push/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from '../../../lib/bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"impl-SZp3iTUp.cjs","names":["buildTranscendGraphQLClient","syncConfigurationToTranscend","validateTranscendAuth","parseVariablesFromString","listFiles","readTranscendYaml","mergeTranscendInputs","ADMIN_DASH_INTEGRATIONS","mapSeries"],"sources":["../src/commands/inventory/push/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\n\nimport { logger } from '../../../logger';\nimport { mapSeries } from '../../../lib/bluebird';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { readTranscendYaml } from '../../../lib/readTranscendYaml';\nimport colors from 'colors';\nimport {\n buildTranscendGraphQLClient,\n syncConfigurationToTranscend,\n} from '../../../lib/graphql';\n\nimport { ADMIN_DASH_INTEGRATIONS } from '../../../constants';\nimport { TranscendInput } from '../../../codecs';\nimport { validateTranscendAuth, listFiles } from '../../../lib/api-keys';\nimport { mergeTranscendInputs } from '../../../lib/mergeTranscendInputs';\nimport { parseVariablesFromString } from '../../../lib/helpers/parseVariablesFromString';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\n/**\n * Sync configuration to Transcend\n *\n * @param options - Options\n * @returns True if synced successfully, false if error occurs\n */\nasync function syncConfiguration({\n transcendUrl,\n auth,\n pageSize,\n publishToPrivacyCenter,\n contents,\n deleteExtraAttributeValues = false,\n classifyService = false,\n}: {\n /** Transcend YAML */\n contents: TranscendInput;\n /** Transcend URL */\n transcendUrl: string;\n /** API key */\n auth: string;\n /** Page size */\n pageSize: number;\n /** Skip privacy center publish step */\n publishToPrivacyCenter: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Delete attributes when syncing */\n deleteExtraAttributeValues?: boolean;\n}): Promise<boolean> {\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Sync to Transcend\n try {\n const encounteredError = await syncConfigurationToTranscend(\n contents,\n client,\n {\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n },\n );\n return !encounteredError;\n } catch (err) {\n logger.error(\n colors.red(\n `An unexpected error occurred syncing the schema: ${err.message}`,\n ),\n );\n return false;\n }\n}\n\nexport interface PushCommandFlags {\n auth: string;\n file: string;\n transcendUrl: string;\n pageSize: number;\n variables: string;\n publishToPrivacyCenter: boolean;\n classifyService: boolean;\n deleteExtraAttributeValues: boolean;\n}\n\nexport async function push(\n this: LocalContext,\n {\n file = './transcend.yml',\n transcendUrl,\n auth,\n variables,\n pageSize,\n publishToPrivacyCenter,\n classifyService,\n deleteExtraAttributeValues,\n }: PushCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Parse authentication as API key or path to list of API keys\n const apiKeyOrList = await validateTranscendAuth(auth);\n\n // Parse out the variables\n const vars = parseVariablesFromString(variables);\n\n // check if we are being passed a list of API keys and a list of files\n let fileList: string[];\n if (Array.isArray(apiKeyOrList) && lstatSync(file).isDirectory()) {\n fileList = listFiles(file).map((filePath) => join(file, filePath));\n } else {\n fileList = file.split(',');\n }\n\n // Ensure at least one file is parsed\n if (fileList.length < 1) {\n throw new Error('No file specified!');\n }\n\n // eslint-disable-next-line array-callback-return,consistent-return\n const transcendInputs = fileList.map((filePath) => {\n // Ensure yaml file exists on disk\n if (!existsSync(filePath)) {\n logger.error(\n colors.red(\n `The file path does not exist on disk: ${filePath}. You can specify the filepath using --file=./examples/transcend.yml`,\n ),\n );\n this.process.exit(1);\n } else {\n logger.info(colors.magenta(`Reading file \"${filePath}\"...`));\n }\n\n try {\n // Read in the yaml file and validate it's shape\n const newContents = readTranscendYaml(filePath, vars);\n logger.info(colors.green(`Successfully read in \"${filePath}\"`));\n return {\n content: newContents,\n name: filePath.split('/').pop()!.replace('.yml', ''),\n };\n } catch (err) {\n logger.error(\n colors.red(\n `The shape of your yaml file is invalid with the following errors: ${err.message}`,\n ),\n );\n this.process.exit(1);\n }\n });\n\n // process a single API key\n if (typeof apiKeyOrList === 'string') {\n // if passed multiple inputs, merge them together\n const [base, ...rest] = transcendInputs.map(({ content }) => content);\n const contents = mergeTranscendInputs(base, ...rest);\n\n // sync the configuration\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKeyOrList,\n contents,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n pageSize,\n classifyService: !!classifyService,\n });\n\n // exist with error code\n if (!success) {\n logger.info(\n colors.red(\n `Sync encountered errors. View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n } else {\n // if passed multiple inputs, expect them to be one per instance\n if (\n transcendInputs.length !== 1 &&\n transcendInputs.length !== apiKeyOrList.length\n ) {\n throw new Error(\n 'Expected list of yml files to be equal to the list of API keys.' +\n `Got ${transcendInputs.length} YML file${\n transcendInputs.length === 1 ? '' : 's'\n } and ${apiKeyOrList.length} API key${\n apiKeyOrList.length === 1 ? '' : 's'\n }`,\n );\n }\n\n const encounteredErrors: string[] = [];\n await mapSeries(apiKeyOrList, async (apiKey, ind) => {\n const prefix = `[${ind + 1}/${apiKeyOrList.length}][${\n apiKey.organizationName\n }] `;\n logger.info(\n colors.magenta(\n `~~~\\n\\n${prefix}Attempting to push configuration...\\n\\n~~~`,\n ),\n );\n\n // use the merged contents if 1 yml passed, else use the contents that map to that organization\n const useContents =\n transcendInputs.length === 1\n ? transcendInputs[0].content\n : transcendInputs.find(\n (input) => input.name === apiKey.organizationName,\n )?.content;\n\n // Throw error if cannot find a yml file matching that organization name\n if (!useContents) {\n logger.error(\n colors.red(\n `${prefix}Failed to find transcend.yml file for organization: \"${apiKey.organizationName}\".`,\n ),\n );\n encounteredErrors.push(apiKey.organizationName);\n return;\n }\n\n const success = await syncConfiguration({\n transcendUrl,\n auth: apiKey.apiKey,\n contents: useContents,\n pageSize,\n publishToPrivacyCenter,\n deleteExtraAttributeValues,\n classifyService,\n });\n\n if (success) {\n logger.info(\n colors.green(`${prefix}Successfully pushed configuration!`),\n );\n } else {\n logger.error(colors.red(`${prefix}Failed to sync configuration.`));\n encounteredErrors.push(apiKey.organizationName);\n }\n });\n\n if (encounteredErrors.length > 0) {\n logger.info(\n colors.red(\n `Sync encountered errors for \"${encounteredErrors.join(\n ',',\n )}\". View output above for more information, or check out ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n\n this.process.exit(1);\n }\n }\n\n // Indicate success\n logger.info(\n colors.green(\n `Successfully synced yaml file to Transcend! View at ${ADMIN_DASH_INTEGRATIONS}`,\n ),\n );\n}\n"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- require(`./constants-7qBywLgI.cjs`),require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`),require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const e=require(`./manual-enrichment-CzRiIFev.cjs`),t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,transcendUrl:r,file:i,concurrency:a,actions:o,sombraAuth:s}){t.t(this.process.exit),await e.i({file:i,transcendUrl:r,concurrency:a,requestActions:o,auth:n,sombraAuth:s})}exports.pullIdentifiers=n;
2
- //# sourceMappingURL=impl-8Basu9U-.cjs.map
1
+ require(`./constants-K6pQQtc7.cjs`),require(`./syncConfigurationToTranscend-DKliAJhK.cjs`),require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const e=require(`./manual-enrichment-C6h9gjY1.cjs`),t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,transcendUrl:r,file:i,concurrency:a,actions:o,sombraAuth:s}){t.t(this.process.exit),await e.i({file:i,transcendUrl:r,concurrency:a,requestActions:o,auth:n,sombraAuth:s})}exports.pullIdentifiers=n;
2
+ //# sourceMappingURL=impl-W6jE_UV0.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl-8Basu9U-.cjs","names":["pullManualEnrichmentIdentifiersToCsv"],"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';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"],"mappings":"mTAcA,eAAsB,EAEpB,CACE,OACA,eACA,OACA,cACA,UACA,cAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAqC,CACzC,OACA,eACA,cACA,eAAgB,EAChB,OACA,aACD,CAAC"}
1
+ {"version":3,"file":"impl-W6jE_UV0.cjs","names":["pullManualEnrichmentIdentifiersToCsv"],"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';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface 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 doneInputValidation(this.process.exit);\n\n await pullManualEnrichmentIdentifiersToCsv({\n file,\n transcendUrl,\n concurrency,\n requestActions: actions,\n auth,\n sombraAuth,\n });\n}\n"],"mappings":"mTAcA,eAAsB,EAEpB,CACE,OACA,eACA,OACA,cACA,UACA,cAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAqC,CACzC,OACA,eACA,cACA,eAAgB,EAChB,OACA,aACD,CAAC"}
@@ -1,2 +1,2 @@
1
- require(`./constants-7qBywLgI.cjs`);const e=require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,dataSiloId:r,status:i,statuses:a,transcendUrl:o}){t.t(this.process.exit),await e.F({transcendUrl:o,auth:n,status:i,dataSiloId:r,requestStatuses:a})}exports.skipRequestDataSilos=n;
2
- //# sourceMappingURL=impl-Cotrjytz.cjs.map
1
+ require(`./constants-K6pQQtc7.cjs`);const e=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,dataSiloId:r,status:i,statuses:a,transcendUrl:o}){t.t(this.process.exit),await e.F({transcendUrl:o,auth:n,status:i,dataSiloId:r,requestStatuses:a})}exports.skipRequestDataSilos=n;
2
+ //# sourceMappingURL=impl-XwC7A99P.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl-Cotrjytz.cjs","names":["skipRequestDataSilosHelper"],"sources":["../src/commands/request/system/skip-request-data-silos/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['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 doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"],"mappings":"6QAkBA,eAAsB,EAEpB,CACE,OACA,aACA,SACA,WACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAA2B,CAC/B,eACA,OACA,SACA,aACA,gBAAiB,EAClB,CAAC"}
1
+ {"version":3,"file":"impl-XwC7A99P.cjs","names":["skipRequestDataSilosHelper"],"sources":["../src/commands/request/system/skip-request-data-silos/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../../context';\nimport type {\n RequestDataSiloStatus,\n RequestStatus,\n} from '@transcend-io/privacy-types';\nimport { skipRequestDataSilos as skipRequestDataSilosHelper } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nexport interface SkipRequestDataSilosCommandFlags {\n auth: string;\n dataSiloId: string;\n transcendUrl: string;\n statuses: RequestStatus[];\n status:\n | (typeof RequestDataSiloStatus)['Skipped']\n | (typeof RequestDataSiloStatus)['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 doneInputValidation(this.process.exit);\n\n await skipRequestDataSilosHelper({\n transcendUrl,\n auth,\n status,\n dataSiloId,\n requestStatuses: statuses,\n });\n}\n"],"mappings":"6QAkBA,eAAsB,EAEpB,CACE,OACA,aACA,SACA,WACA,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAA2B,CAC/B,eACA,OACA,SACA,aACA,gBAAiB,EAClB,CAAC"}
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-7qBywLgI.cjs`);const t=require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`);require(`./enums-BZulhPFa.cjs`);const n=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const r=require(`./done-input-validation-DGckEJ5a.cjs`),i=require(`./preference-management-DV6NIcXt.cjs`);let a=require(`colors`);a=e.t(a);const o=[`userId`,`timestamp`,`partition`,`decryptionStatus`,`updatedAt`,`usp`,`gpp`,`tcf`,`airgapVersion`,`metadata`,`metadataTimestamp`];async function s({auth:e,partition:s,sombraAuth:c,file:l,transcendUrl:u,timestampBefore:d,timestampAfter:f,updatedBefore:p,updatedAfter:m,identifiers:h=[],concurrency:g,shouldChunk:_,windowConcurrency:v,maxChunks:y,exportIdentifiersWithDelimiter:b,maxLookbackDays:x}){r.t(this.process.exit);let S=await t.ei(u,e,c),C=t.ti(u,e),w=h.map(e=>{if(!e.includes(`:`))return{name:`email`,value:e};let[t,n]=e.split(`:`);return{name:t,value:n}}),T={...d?{timestampBefore:d.toISOString()}:{},...f?{timestampAfter:f.toISOString()}:{},...m||p?{system:{...p?{updatedBefore:p.toISOString()}:{},...m?{updatedAfter:m.toISOString()}:{}}}:{},...w.length>0?{identifiers:w}:{}};n.t.info(`Fetching consent preferences from partition ${s}, using mode=${_?`chunked-stream`:`paged-stream`}...`),n.t.info(a.default.magenta(`Preparing CSV at: ${l}`));let[E,D]=await Promise.all([t._r(C),t.n(C)]),O=D.map(e=>e.name),k=Array.from(new Set(E.flatMap(e=>e.topics?.map(t=>`${e.trackingType}_${t.slug}`)??[]))).sort((e,t)=>e.localeCompare(t)),A=Array.from(new Set(E.map(e=>e.trackingType))).sort((e,t)=>e.localeCompare(t)),j=[...o,...O,...A,...k],M=null,N=!1,P=e=>{if(!e||e.length===0)return;let n=e.map(e=>i.i(e,b));if(!N){let e=Object.keys(n[0]??{}),r=new Set;M=[...j,...e].filter(e=>e===void 0||r.has(e)?!1:(r.add(e),!0)),t.s(l,M),N=!0}t.a(l,n,M)};if(_){await i.r(S,{partition:s,filterBy:T,limit:g,windowConcurrency:v,maxChunks:y,maxLookbackDays:x,onItems:e=>P(e)}),n.t.info(a.default.green(`Finished writing CSV to ${l}`));return}await i.n(S,{partition:s,filterBy:T,limit:g,onItems:e=>P(e)}),n.t.info(a.default.green(`Finished writing CSV to ${l}`))}exports.pullConsentPreferences=s;
2
- //# sourceMappingURL=impl-DKMxd5Wy.cjs.map
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-K6pQQtc7.cjs`);const t=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`);require(`./enums-BZulhPFa.cjs`);const n=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const r=require(`./done-input-validation-DGckEJ5a.cjs`),i=require(`./preference-management-B36PQuMK.cjs`);let a=require(`colors`);a=e.t(a);const o=[`userId`,`timestamp`,`partition`,`decryptionStatus`,`updatedAt`,`usp`,`gpp`,`tcf`,`airgapVersion`,`metadata`,`metadataTimestamp`];async function s({auth:e,partition:s,sombraAuth:c,file:l,transcendUrl:u,timestampBefore:d,timestampAfter:f,updatedBefore:p,updatedAfter:m,identifiers:h=[],concurrency:g,shouldChunk:_,windowConcurrency:v,maxChunks:y,exportIdentifiersWithDelimiter:b,maxLookbackDays:x}){r.t(this.process.exit);let S=await t.ei(u,e,c),C=t.ti(u,e),w=h.map(e=>{if(!e.includes(`:`))return{name:`email`,value:e};let[t,n]=e.split(`:`);return{name:t,value:n}}),T={...d?{timestampBefore:d.toISOString()}:{},...f?{timestampAfter:f.toISOString()}:{},...m||p?{system:{...p?{updatedBefore:p.toISOString()}:{},...m?{updatedAfter:m.toISOString()}:{}}}:{},...w.length>0?{identifiers:w}:{}};n.t.info(`Fetching consent preferences from partition ${s}, using mode=${_?`chunked-stream`:`paged-stream`}...`),n.t.info(a.default.magenta(`Preparing CSV at: ${l}`));let[E,D]=await Promise.all([t._r(C),t.n(C)]),O=D.map(e=>e.name),k=Array.from(new Set(E.flatMap(e=>e.topics?.map(t=>`${e.trackingType}_${t.slug}`)??[]))).sort((e,t)=>e.localeCompare(t)),A=Array.from(new Set(E.map(e=>e.trackingType))).sort((e,t)=>e.localeCompare(t)),j=[...o,...O,...A,...k],M=null,N=!1,P=e=>{if(!e||e.length===0)return;let n=e.map(e=>i.i(e,b));if(!N){let e=Object.keys(n[0]??{}),r=new Set;M=[...j,...e].filter(e=>e===void 0||r.has(e)?!1:(r.add(e),!0)),t.s(l,M),N=!0}t.a(l,n,M)};if(_){await i.r(S,{partition:s,filterBy:T,limit:g,windowConcurrency:v,maxChunks:y,maxLookbackDays:x,onItems:e=>P(e)}),n.t.info(a.default.green(`Finished writing CSV to ${l}`));return}await i.n(S,{partition:s,filterBy:T,limit:g,onItems:e=>P(e)}),n.t.info(a.default.green(`Finished writing CSV to ${l}`))}exports.pullConsentPreferences=s;
2
+ //# sourceMappingURL=impl-ebVxRYAc.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl-DKMxd5Wy.cjs","names":["createSombraGotInstance","buildTranscendGraphQLClient","fetchAllPurposesAndPreferences","fetchAllIdentifiers","transformPreferenceRecordToCsv","fetchConsentPreferencesChunked","fetchConsentPreferences"],"sources":["../src/commands/consent/pull-consent-preferences/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport {\n fetchConsentPreferences,\n fetchConsentPreferencesChunked,\n transformPreferenceRecordToCsv,\n type PreferenceIdentifier,\n} from '../../../lib/preference-management';\nimport {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllIdentifiers,\n fetchAllPurposesAndPreferences,\n} from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { logger } from '../../../logger';\nimport { initCsvFile, appendCsvRowsOrdered } from '../../../lib/helpers';\nimport type { PreferenceQueryResponseItem } from '@transcend-io/privacy-types';\n\n// Known “core” columns your transformer usually produces up front.\n// Leave this list conservative; we’ll still union with transformer keys.\nconst CORE_COLS = [\n 'userId',\n 'timestamp',\n 'partition',\n 'decryptionStatus',\n 'updatedAt',\n 'usp',\n 'gpp',\n 'tcf',\n 'airgapVersion',\n 'metadata',\n 'metadataTimestamp',\n];\n\nexport interface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n exportIdentifiersWithDelimiter: string;\n timestampAfter?: Date;\n updatedBefore?: Date;\n updatedAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n shouldChunk: boolean;\n windowConcurrency: number;\n maxChunks: number;\n maxLookbackDays: 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 updatedBefore,\n updatedAfter,\n identifiers = [],\n concurrency,\n shouldChunk,\n windowConcurrency,\n maxChunks,\n exportIdentifiersWithDelimiter,\n maxLookbackDays,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Identifiers are key:value, parse to PreferenceIdentifier[]\n const parsedIdentifiers = identifiers.map(\n (identifier): PreferenceIdentifier => {\n if (!identifier.includes(':')) {\n return {\n name: 'email',\n value: identifier,\n };\n }\n const [name, value] = identifier.split(':');\n return { name, value };\n },\n );\n\n // Build filter\n const filterBy = {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter ? { timestampAfter: timestampAfter.toISOString() } : {}),\n ...(updatedAfter || updatedBefore\n ? {\n system: {\n ...(updatedBefore\n ? { updatedBefore: updatedBefore.toISOString() }\n : {}),\n ...(updatedAfter\n ? { updatedAfter: updatedAfter.toISOString() }\n : {}),\n },\n }\n : {}),\n ...(parsedIdentifiers.length > 0 ? { identifiers: parsedIdentifiers } : {}),\n };\n\n logger.info(\n `Fetching consent preferences from partition ${partition}, using mode=${\n shouldChunk ? 'chunked-stream' : 'paged-stream'\n }...`,\n );\n\n logger.info(colors.magenta(`Preparing CSV at: ${file}`));\n\n // Fetch full sets (purposes+topics, identifiers) to ensure header completeness\n const [purposesWithTopics, allIdentifiers] = await Promise.all([\n fetchAllPurposesAndPreferences(client),\n fetchAllIdentifiers(client),\n ]);\n\n // Identifier columns: exactly the identifier names\n const identifierCols = allIdentifiers.map((i) => i.name);\n\n // Preference topic columns: topic names (de-duped)\n const topicCols = Array.from(\n new Set(\n purposesWithTopics.flatMap(\n (p) => p.topics?.map((t) => `${p.trackingType}_${t.slug}`) ?? [],\n ),\n ),\n ).sort((a, b) => a.localeCompare(b));\n\n // Some setups also want a per-purpose boolean column (e.g., “Email”, “Sms”).\n // If your transformer includes those, list them here, derived from purposes:\n const purposeCols = Array.from(\n new Set(purposesWithTopics.map((p) => p.trackingType)),\n ).sort((a, b) => a.localeCompare(b));\n\n // Build the complete header skeleton.\n // We’ll still union with the first transformed row’s keys to be safe.\n const completeHeadersList = [\n ...CORE_COLS,\n ...identifierCols,\n ...purposeCols,\n ...topicCols,\n ];\n\n // Lazily initialize CSV header order from the first transformed row.\n let headerOrder: string[] | null = null;\n let wroteHeader = false;\n const writeRows = (items: PreferenceQueryResponseItem[]): void => {\n if (!items || items.length === 0) return;\n const rows = items.map((row) =>\n transformPreferenceRecordToCsv(row, exportIdentifiersWithDelimiter),\n );\n if (!wroteHeader) {\n const firstKeys = Object.keys(rows[0] ?? {});\n const seen = new Set<string>();\n headerOrder = [...completeHeadersList, ...firstKeys].filter((k) => {\n if (k === undefined) return false;\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n initCsvFile(file, headerOrder);\n wroteHeader = true;\n }\n appendCsvRowsOrdered(file, rows, headerOrder!);\n };\n\n if (shouldChunk) {\n // Stream via chunked fetcher with page callback\n await fetchConsentPreferencesChunked(sombra, {\n partition,\n filterBy,\n limit: concurrency,\n windowConcurrency,\n maxChunks,\n maxLookbackDays,\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n return;\n }\n\n // Non-chunked path: still stream page-by-page via onItems (no in-memory accumulation)\n await fetchConsentPreferences(sombra, {\n partition,\n filterBy,\n limit: concurrency, // page size (API max 50 enforced internally)\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"impl-ebVxRYAc.cjs","names":["createSombraGotInstance","buildTranscendGraphQLClient","fetchAllPurposesAndPreferences","fetchAllIdentifiers","transformPreferenceRecordToCsv","fetchConsentPreferencesChunked","fetchConsentPreferences"],"sources":["../src/commands/consent/pull-consent-preferences/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport colors from 'colors';\n\nimport {\n fetchConsentPreferences,\n fetchConsentPreferencesChunked,\n transformPreferenceRecordToCsv,\n type PreferenceIdentifier,\n} from '../../../lib/preference-management';\nimport {\n buildTranscendGraphQLClient,\n createSombraGotInstance,\n fetchAllIdentifiers,\n fetchAllPurposesAndPreferences,\n} from '../../../lib/graphql';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\nimport { logger } from '../../../logger';\nimport { initCsvFile, appendCsvRowsOrdered } from '../../../lib/helpers';\nimport type { PreferenceQueryResponseItem } from '@transcend-io/privacy-types';\n\n// Known “core” columns your transformer usually produces up front.\n// Leave this list conservative; we’ll still union with transformer keys.\nconst CORE_COLS = [\n 'userId',\n 'timestamp',\n 'partition',\n 'decryptionStatus',\n 'updatedAt',\n 'usp',\n 'gpp',\n 'tcf',\n 'airgapVersion',\n 'metadata',\n 'metadataTimestamp',\n];\n\nexport interface PullConsentPreferencesCommandFlags {\n auth: string;\n partition: string;\n sombraAuth?: string;\n file: string;\n transcendUrl: string;\n timestampBefore?: Date;\n exportIdentifiersWithDelimiter: string;\n timestampAfter?: Date;\n updatedBefore?: Date;\n updatedAfter?: Date;\n identifiers?: string[];\n concurrency: number;\n shouldChunk: boolean;\n windowConcurrency: number;\n maxChunks: number;\n maxLookbackDays: 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 updatedBefore,\n updatedAfter,\n identifiers = [],\n concurrency,\n shouldChunk,\n windowConcurrency,\n maxChunks,\n exportIdentifiersWithDelimiter,\n maxLookbackDays,\n }: PullConsentPreferencesCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n // Create sombra instance to communicate with\n const sombra = await createSombraGotInstance(transcendUrl, auth, sombraAuth);\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Identifiers are key:value, parse to PreferenceIdentifier[]\n const parsedIdentifiers = identifiers.map(\n (identifier): PreferenceIdentifier => {\n if (!identifier.includes(':')) {\n return {\n name: 'email',\n value: identifier,\n };\n }\n const [name, value] = identifier.split(':');\n return { name, value };\n },\n );\n\n // Build filter\n const filterBy = {\n ...(timestampBefore\n ? { timestampBefore: timestampBefore.toISOString() }\n : {}),\n ...(timestampAfter ? { timestampAfter: timestampAfter.toISOString() } : {}),\n ...(updatedAfter || updatedBefore\n ? {\n system: {\n ...(updatedBefore\n ? { updatedBefore: updatedBefore.toISOString() }\n : {}),\n ...(updatedAfter\n ? { updatedAfter: updatedAfter.toISOString() }\n : {}),\n },\n }\n : {}),\n ...(parsedIdentifiers.length > 0 ? { identifiers: parsedIdentifiers } : {}),\n };\n\n logger.info(\n `Fetching consent preferences from partition ${partition}, using mode=${\n shouldChunk ? 'chunked-stream' : 'paged-stream'\n }...`,\n );\n\n logger.info(colors.magenta(`Preparing CSV at: ${file}`));\n\n // Fetch full sets (purposes+topics, identifiers) to ensure header completeness\n const [purposesWithTopics, allIdentifiers] = await Promise.all([\n fetchAllPurposesAndPreferences(client),\n fetchAllIdentifiers(client),\n ]);\n\n // Identifier columns: exactly the identifier names\n const identifierCols = allIdentifiers.map((i) => i.name);\n\n // Preference topic columns: topic names (de-duped)\n const topicCols = Array.from(\n new Set(\n purposesWithTopics.flatMap(\n (p) => p.topics?.map((t) => `${p.trackingType}_${t.slug}`) ?? [],\n ),\n ),\n ).sort((a, b) => a.localeCompare(b));\n\n // Some setups also want a per-purpose boolean column (e.g., “Email”, “Sms”).\n // If your transformer includes those, list them here, derived from purposes:\n const purposeCols = Array.from(\n new Set(purposesWithTopics.map((p) => p.trackingType)),\n ).sort((a, b) => a.localeCompare(b));\n\n // Build the complete header skeleton.\n // We’ll still union with the first transformed row’s keys to be safe.\n const completeHeadersList = [\n ...CORE_COLS,\n ...identifierCols,\n ...purposeCols,\n ...topicCols,\n ];\n\n // Lazily initialize CSV header order from the first transformed row.\n let headerOrder: string[] | null = null;\n let wroteHeader = false;\n const writeRows = (items: PreferenceQueryResponseItem[]): void => {\n if (!items || items.length === 0) return;\n const rows = items.map((row) =>\n transformPreferenceRecordToCsv(row, exportIdentifiersWithDelimiter),\n );\n if (!wroteHeader) {\n const firstKeys = Object.keys(rows[0] ?? {});\n const seen = new Set<string>();\n headerOrder = [...completeHeadersList, ...firstKeys].filter((k) => {\n if (k === undefined) return false;\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n initCsvFile(file, headerOrder);\n wroteHeader = true;\n }\n appendCsvRowsOrdered(file, rows, headerOrder!);\n };\n\n if (shouldChunk) {\n // Stream via chunked fetcher with page callback\n await fetchConsentPreferencesChunked(sombra, {\n partition,\n filterBy,\n limit: concurrency,\n windowConcurrency,\n maxChunks,\n maxLookbackDays,\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n return;\n }\n\n // Non-chunked path: still stream page-by-page via onItems (no in-memory accumulation)\n await fetchConsentPreferences(sombra, {\n partition,\n filterBy,\n limit: concurrency, // page size (API max 50 enforced internally)\n onItems: (items) => writeRows(items),\n });\n\n logger.info(colors.green(`Finished writing CSV to ${file}`));\n}\n"],"mappings":"gZAsBA,MAAM,EAAY,CAChB,SACA,YACA,YACA,mBACA,YACA,MACA,MACA,MACA,gBACA,WACA,oBACD,CAqBD,eAAsB,EAEpB,CACE,OACA,YACA,aACA,OACA,eACA,kBACA,iBACA,gBACA,eACA,cAAc,EAAE,CAChB,cACA,cACA,oBACA,YACA,iCACA,mBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAGtC,IAAM,EAAS,MAAMA,EAAAA,GAAwB,EAAc,EAAM,EAAW,CACtE,EAASC,EAAAA,GAA4B,EAAc,EAAK,CAGxD,EAAoB,EAAY,IACnC,GAAqC,CACpC,GAAI,CAAC,EAAW,SAAS,IAAI,CAC3B,MAAO,CACL,KAAM,QACN,MAAO,EACR,CAEH,GAAM,CAAC,EAAM,GAAS,EAAW,MAAM,IAAI,CAC3C,MAAO,CAAE,OAAM,QAAO,EAEzB,CAGK,EAAW,CACf,GAAI,EACA,CAAE,gBAAiB,EAAgB,aAAa,CAAE,CAClD,EAAE,CACN,GAAI,EAAiB,CAAE,eAAgB,EAAe,aAAa,CAAE,CAAG,EAAE,CAC1E,GAAI,GAAgB,EAChB,CACE,OAAQ,CACN,GAAI,EACA,CAAE,cAAe,EAAc,aAAa,CAAE,CAC9C,EAAE,CACN,GAAI,EACA,CAAE,aAAc,EAAa,aAAa,CAAE,CAC5C,EAAE,CACP,CACF,CACD,EAAE,CACN,GAAI,EAAkB,OAAS,EAAI,CAAE,YAAa,EAAmB,CAAG,EAAE,CAC3E,CAED,EAAA,EAAO,KACL,+CAA+C,EAAU,eACvD,EAAc,iBAAmB,eAClC,KACF,CAED,EAAA,EAAO,KAAK,EAAA,QAAO,QAAQ,qBAAqB,IAAO,CAAC,CAGxD,GAAM,CAAC,EAAoB,GAAkB,MAAM,QAAQ,IAAI,CAC7DC,EAAAA,GAA+B,EAAO,CACtCC,EAAAA,EAAoB,EAAO,CAC5B,CAAC,CAGI,EAAiB,EAAe,IAAK,GAAM,EAAE,KAAK,CAGlD,EAAY,MAAM,KACtB,IAAI,IACF,EAAmB,QAChB,GAAM,EAAE,QAAQ,IAAK,GAAM,GAAG,EAAE,aAAa,GAAG,EAAE,OAAO,EAAI,EAAE,CACjE,CACF,CACF,CAAC,MAAM,EAAG,IAAM,EAAE,cAAc,EAAE,CAAC,CAI9B,EAAc,MAAM,KACxB,IAAI,IAAI,EAAmB,IAAK,GAAM,EAAE,aAAa,CAAC,CACvD,CAAC,MAAM,EAAG,IAAM,EAAE,cAAc,EAAE,CAAC,CAI9B,EAAsB,CAC1B,GAAG,EACH,GAAG,EACH,GAAG,EACH,GAAG,EACJ,CAGG,EAA+B,KAC/B,EAAc,GACZ,EAAa,GAA+C,CAChE,GAAI,CAAC,GAAS,EAAM,SAAW,EAAG,OAClC,IAAM,EAAO,EAAM,IAAK,GACtBC,EAAAA,EAA+B,EAAK,EAA+B,CACpE,CACD,GAAI,CAAC,EAAa,CAChB,IAAM,EAAY,OAAO,KAAK,EAAK,IAAM,EAAE,CAAC,CACtC,EAAO,IAAI,IACjB,EAAc,CAAC,GAAG,EAAqB,GAAG,EAAU,CAAC,OAAQ,GACvD,IAAM,IAAA,IACN,EAAK,IAAI,EAAE,CAAS,IACxB,EAAK,IAAI,EAAE,CACJ,IACP,CACF,EAAA,EAAY,EAAM,EAAY,CAC9B,EAAc,GAEhB,EAAA,EAAqB,EAAM,EAAM,EAAa,EAGhD,GAAI,EAAa,CAEf,MAAMC,EAAAA,EAA+B,EAAQ,CAC3C,YACA,WACA,MAAO,EACP,oBACA,YACA,kBACA,QAAU,GAAU,EAAU,EAAM,CACrC,CAAC,CAEF,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,2BAA2B,IAAO,CAAC,CAC5D,OAIF,MAAMC,EAAAA,EAAwB,EAAQ,CACpC,YACA,WACA,MAAO,EACP,QAAU,GAAU,EAAU,EAAM,CACrC,CAAC,CAEF,EAAA,EAAO,KAAK,EAAA,QAAO,MAAM,2BAA2B,IAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ require(`./constants-K6pQQtc7.cjs`);const e=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,actions:r,origins:i,silentModeBefore:a,createdAtBefore:o,createdAtAfter:s,updatedAtBefore:c,updatedAtAfter:l,transcendUrl:u,concurrency:d}){t.t(this.process.exit),await e.J({transcendUrl:u,requestActions:r,auth:n,requestOrigins:i,concurrency:d,silentModeBefore:a,createdAtBefore:o,createdAtAfter:s,updatedAtBefore:c,updatedAtAfter:l})}exports.approve=n;
2
+ //# sourceMappingURL=impl-k61p_VQY.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impl-k61p_VQY.cjs","names":["approvePrivacyRequests"],"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';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ApproveCommandFlags {\n auth: string;\n actions: RequestAction[];\n origins?: RequestOrigin[];\n silentModeBefore?: Date;\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n updatedAtBefore?: Date;\n updatedAtAfter?: 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 updatedAtBefore,\n updatedAtAfter,\n transcendUrl,\n concurrency,\n }: ApproveCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await approvePrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestOrigins: origins,\n concurrency,\n silentModeBefore,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n });\n}\n"],"mappings":"6QAmBA,eAAsB,EAEpB,CACE,OACA,UACA,UACA,mBACA,kBACA,iBACA,kBACA,iBACA,eACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,EAAuB,CAC3B,eACA,eAAgB,EAChB,OACA,eAAgB,EAChB,cACA,mBACA,kBACA,iBACA,kBACA,iBACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ require(`./constants-K6pQQtc7.cjs`);const e=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`);require(`./enums-BZulhPFa.cjs`),require(`./logger-DQwEYtSS.cjs`),require(`./buildAIIntegrationType-BwuCYR-o.cjs`);const t=require(`./done-input-validation-DGckEJ5a.cjs`);async function n({auth:n,transcendUrl:r,actions:i,statuses:a,requestIds:o,createdAtBefore:s,createdAtAfter:c,updatedAtBefore:l,updatedAtAfter:u,concurrency:d}){t.t(this.process.exit),await e.lt({transcendUrl:r,requestActions:i,auth:n,requestIds:o,statuses:a,concurrency:d,createdAtBefore:s,createdAtAfter:c,updatedAtBefore:l,updatedAtAfter:u})}exports.markSilent=n;
2
+ //# sourceMappingURL=impl-kMebV10f.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impl-kMebV10f.cjs","names":["markSilentPrivacyRequests"],"sources":["../src/commands/request/mark-silent/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport { markSilentPrivacyRequests } from '../../../lib/requests';\nimport type { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface MarkSilentCommandFlags {\n auth: string;\n actions: RequestAction[];\n statuses?: RequestStatus[];\n requestIds?: string[];\n createdAtBefore?: Date;\n createdAtAfter?: Date;\n updatedAtBefore?: Date;\n updatedAtAfter?: Date;\n transcendUrl: string;\n concurrency: number;\n}\n\nexport async function markSilent(\n this: LocalContext,\n {\n auth,\n transcendUrl,\n actions,\n statuses,\n requestIds,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n concurrency,\n }: MarkSilentCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await markSilentPrivacyRequests({\n transcendUrl,\n requestActions: actions,\n auth,\n requestIds,\n statuses,\n concurrency,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n });\n}\n"],"mappings":"6QAkBA,eAAsB,EAEpB,CACE,OACA,eACA,UACA,WACA,aACA,kBACA,iBACA,kBACA,iBACA,eAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,CAEtC,MAAMA,EAAAA,GAA0B,CAC9B,eACA,eAAgB,EAChB,OACA,aACA,WACA,cACA,kBACA,iBACA,kBACA,iBACD,CAAC"}
@@ -1,2 +1,2 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-7qBywLgI.cjs`);const t=require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`),n=require(`./dataFlowsToDataSilos-BLNhWeOw.cjs`);require(`./enums-BZulhPFa.cjs`);const r=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const i=require(`./readTranscendYaml-Cycz6RxW.cjs`),a=require(`./api-keys-eh_rPCV_.cjs`),o=require(`./done-input-validation-DGckEJ5a.cjs`);let s=require(`node:fs`),c=require(`node:path`),l=require(`colors`);l=e.t(l);async function u({auth:e,dataFlowsYmlFolder:u,output:d,ignoreYmls:f=[],transcendUrl:p}){o.t(this.process.exit),(!(0,s.existsSync)(u)||!(0,s.lstatSync)(u).isDirectory())&&(r.t.error(l.default.red(`Folder does not exist: "${u}"`)),this.process.exit(1));let m=f.map(e=>e.split(`.`)[0]),h=a.n(u).map(e=>{let{"data-flows":t=[]}=i.r((0,c.join)(u,e)),{adTechDataSilos:r,siteTechDataSilos:a}=n.t(t,{serviceToSupportedIntegration:x,serviceToTitle:b});return{adTechDataSilos:r,siteTechDataSilos:a,organizationName:e.split(`.`)[0]}}),g={};h.forEach(({adTechDataSilos:e,siteTechDataSilos:t,organizationName:n})=>{[...e,...t].forEach(e=>{let t=e[`outer-type`]||e.integrationName;g[t]||(g[t]=[]),g[t].push(n),g[t]=[...new Set(g[t])]})});let _=[...new Set(h.map(({adTechDataSilos:e})=>e.map(e=>e[`outer-type`]||e.integrationName)).flat())],v=t.js([...new Set(h.map(({siteTechDataSilos:e})=>e.map(e=>e[`outer-type`]||e.integrationName)).flat())],_),y={};h.forEach(({adTechDataSilos:e,siteTechDataSilos:t})=>{[...e,...t].forEach(e=>{let t=e[`outer-type`]||e.integrationName,n=e.attributes?.find(e=>e.key===`Found On Domain`);y[t]||(y[t]=[]),y[t].push(...n?.values||[]),y[t]=[...new Set(y[t])]})});let{serviceToTitle:b,serviceToSupportedIntegration:x}=await t.ir(t.ti(p,e)),S=[..._,...v].map(e=>({title:b[e],...x[e]?{integrationName:e}:{integrationName:`promptAPerson`,"outer-type":e},attributes:[{key:`Tech Type`,values:[`Ad Tech`]},{key:`Business Units`,values:t.js(g[e]||[],m)},{key:`Found On Domain`,values:y[e]||[]}]}));r.t.log(`Total Services: ${S.length}`),r.t.log(`Ad Tech Services: ${_.length}`),r.t.log(`Site Tech Services: ${v.length}`),i.a(d,{"data-silos":S})}exports.deriveDataSilosFromDataFlowsCrossInstance=u;
2
- //# sourceMappingURL=impl--PmMYd1g.cjs.map
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`);require(`./constants-K6pQQtc7.cjs`);const t=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`),n=require(`./dataFlowsToDataSilos-CnvG2jqy.cjs`);require(`./enums-BZulhPFa.cjs`);const r=require(`./logger-DQwEYtSS.cjs`);require(`./buildAIIntegrationType-BwuCYR-o.cjs`),require(`./codecs-Bvmb8o9R.cjs`);const i=require(`./readTranscendYaml-Cycz6RxW.cjs`),a=require(`./api-keys-Bvt2HbSv.cjs`),o=require(`./done-input-validation-DGckEJ5a.cjs`);let s=require(`node:fs`),c=require(`node:path`),l=require(`colors`);l=e.t(l);async function u({auth:e,dataFlowsYmlFolder:u,output:d,ignoreYmls:f=[],transcendUrl:p}){o.t(this.process.exit),(!(0,s.existsSync)(u)||!(0,s.lstatSync)(u).isDirectory())&&(r.t.error(l.default.red(`Folder does not exist: "${u}"`)),this.process.exit(1));let m=f.map(e=>e.split(`.`)[0]),h=a.n(u).map(e=>{let{"data-flows":t=[]}=i.r((0,c.join)(u,e)),{adTechDataSilos:r,siteTechDataSilos:a}=n.t(t,{serviceToSupportedIntegration:x,serviceToTitle:b});return{adTechDataSilos:r,siteTechDataSilos:a,organizationName:e.split(`.`)[0]}}),g={};h.forEach(({adTechDataSilos:e,siteTechDataSilos:t,organizationName:n})=>{[...e,...t].forEach(e=>{let t=e[`outer-type`]||e.integrationName;g[t]||(g[t]=[]),g[t].push(n),g[t]=[...new Set(g[t])]})});let _=[...new Set(h.map(({adTechDataSilos:e})=>e.map(e=>e[`outer-type`]||e.integrationName)).flat())],v=t.js([...new Set(h.map(({siteTechDataSilos:e})=>e.map(e=>e[`outer-type`]||e.integrationName)).flat())],_),y={};h.forEach(({adTechDataSilos:e,siteTechDataSilos:t})=>{[...e,...t].forEach(e=>{let t=e[`outer-type`]||e.integrationName,n=e.attributes?.find(e=>e.key===`Found On Domain`);y[t]||(y[t]=[]),y[t].push(...n?.values||[]),y[t]=[...new Set(y[t])]})});let{serviceToTitle:b,serviceToSupportedIntegration:x}=await t.ir(t.ti(p,e)),S=[..._,...v].map(e=>({title:b[e],...x[e]?{integrationName:e}:{integrationName:`promptAPerson`,"outer-type":e},attributes:[{key:`Tech Type`,values:[`Ad Tech`]},{key:`Business Units`,values:t.js(g[e]||[],m)},{key:`Found On Domain`,values:y[e]||[]}]}));r.t.log(`Total Services: ${S.length}`),r.t.log(`Ad Tech Services: ${_.length}`),r.t.log(`Site Tech Services: ${v.length}`),i.a(d,{"data-silos":S})}exports.deriveDataSilosFromDataFlowsCrossInstance=u;
2
+ //# sourceMappingURL=impl-oYFKp06U.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"impl--PmMYd1g.cjs","names":["listFiles","readTranscendYaml","dataFlowsToDataSilos","difference","fetchAndIndexCatalogs","buildTranscendGraphQLClient"],"sources":["../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\nimport { difference } from 'lodash-es';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n output: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlowsCrossInstance(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n output,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\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 this.process.exit(1);\n }\n\n // Ignore the data flows in these yml files\n const instancesToIgnore = ignoreYmls.map((x) => x.split('.')[0]);\n\n // Map over each data flow yml file and convert to data silo configurations\n const dataSiloInputs = listFiles(dataFlowsYmlFolder).map((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 return {\n adTechDataSilos,\n siteTechDataSilos,\n organizationName: directory.split('.')[0],\n };\n });\n\n // Mapping from service name to instances that have that service\n const serviceToInstance: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(\n ({ adTechDataSilos, siteTechDataSilos, organizationName }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n // create mapping to instance\n if (!serviceToInstance[service]) {\n serviceToInstance[service] = [];\n }\n serviceToInstance[service]!.push(organizationName);\n serviceToInstance[service] = [...new Set(serviceToInstance[service])];\n });\n },\n );\n\n // List of ad tech integrations\n const adTechIntegrations = [\n ...new Set(\n dataSiloInputs\n .map(({ adTechDataSilos }) =>\n adTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ];\n\n // List of site tech integrations\n const siteTechIntegrations = difference(\n [\n ...new Set(\n dataSiloInputs\n .map(({ siteTechDataSilos }) =>\n siteTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ],\n adTechIntegrations,\n );\n\n // Mapping from service name to list of\n const serviceToFoundOnDomain: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(({ adTechDataSilos, siteTechDataSilos }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n const foundOnDomain = dataSilo.attributes?.find(\n (attr) => attr.key === 'Found On Domain',\n );\n // create mapping to instance\n if (!serviceToFoundOnDomain[service]) {\n serviceToFoundOnDomain[service] = [];\n }\n serviceToFoundOnDomain[service]!.push(...(foundOnDomain?.values || []));\n serviceToFoundOnDomain[service] = [\n ...new Set(serviceToFoundOnDomain[service]),\n ];\n });\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 // construct the aggregated data silo inputs\n const dataSilos = [...adTechIntegrations, ...siteTechIntegrations].map(\n (service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', 'outer-type': service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Ad Tech'],\n },\n {\n key: 'Business Units',\n values: difference(\n serviceToInstance[service] || [],\n instancesToIgnore,\n ),\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }),\n );\n\n // Log output\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechIntegrations.length}`);\n logger.log(`Site Tech Services: ${siteTechIntegrations.length}`);\n\n // Write to yaml\n writeTranscendYaml(output, {\n 'data-silos': dataSilos,\n });\n}\n"],"mappings":"+iBA2BA,eAAsB,EAEpB,CACE,OACA,qBACA,SACA,aAAa,EAAE,CACf,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,EAIpC,EAAA,EAAA,EAAA,YAAY,EAAmB,EAC/B,EAAA,EAAA,EAAA,WAAW,EAAmB,CAAC,aAAa,IAE5C,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC1E,KAAK,QAAQ,KAAK,EAAE,EAItB,IAAM,EAAoB,EAAW,IAAK,GAAM,EAAE,MAAM,IAAI,CAAC,GAAG,CAG1D,EAAiBA,EAAAA,EAAU,EAAmB,CAAC,IAAK,GAAc,CAEtE,GAAM,CAAE,aAAc,EAAY,EAAE,EAAKC,EAAAA,GAAAA,EAAAA,EAAAA,MAClC,EAAoB,EAAU,CACpC,CAGK,CAAE,kBAAiB,qBAAsBC,EAAAA,EAC7C,EACA,CACE,gCACA,iBACD,CACF,CAED,MAAO,CACL,kBACA,oBACA,iBAAkB,EAAU,MAAM,IAAI,CAAC,GACxC,EACD,CAGI,EAAiD,EAAE,CACzD,EAAe,SACZ,CAAE,kBAAiB,oBAAmB,sBAAuB,CACvC,CAAC,GAAG,EAAiB,GAAG,EAAkB,CAClD,QAAS,GAAa,CACjC,IAAM,EAAU,EAAS,eAAiB,EAAS,gBAE9C,EAAkB,KACrB,EAAkB,GAAW,EAAE,EAEjC,EAAkB,GAAU,KAAK,EAAiB,CAClD,EAAkB,GAAW,CAAC,GAAG,IAAI,IAAI,EAAkB,GAAS,CAAC,EACrE,EAEL,CAGD,IAAM,EAAqB,CACzB,GAAG,IAAI,IACL,EACG,KAAK,CAAE,qBACN,EAAgB,IACb,GAAS,EAAK,eAAiB,EAAK,gBACtC,CACF,CACA,MAAM,CACV,CACF,CAGK,EAAuBC,EAAAA,GAC3B,CACE,GAAG,IAAI,IACL,EACG,KAAK,CAAE,uBACN,EAAkB,IACf,GAAS,EAAK,eAAiB,EAAK,gBACtC,CACF,CACA,MAAM,CACV,CACF,CACD,EACD,CAGK,EAAsD,EAAE,CAC9D,EAAe,SAAS,CAAE,kBAAiB,uBAAwB,CAC5C,CAAC,GAAG,EAAiB,GAAG,EAAkB,CAClD,QAAS,GAAa,CACjC,IAAM,EAAU,EAAS,eAAiB,EAAS,gBAC7C,EAAgB,EAAS,YAAY,KACxC,GAAS,EAAK,MAAQ,kBACxB,CAEI,EAAuB,KAC1B,EAAuB,GAAW,EAAE,EAEtC,EAAuB,GAAU,KAAK,GAAI,GAAe,QAAU,EAAE,CAAE,CACvE,EAAuB,GAAW,CAChC,GAAG,IAAI,IAAI,EAAuB,GAAS,CAC5C,EACD,EACF,CAIF,GAAM,CAAE,iBAAgB,iCACtB,MAAMC,EAAAA,GAFOC,EAAAA,GAA4B,EAAc,EAAK,CAEzB,CAG/B,EAAY,CAAC,GAAG,EAAoB,GAAG,EAAqB,CAAC,IAChE,IAAa,CACZ,MAAO,EAAe,GACtB,GAAI,EAA8B,GAC9B,CAAE,gBAAiB,EAAS,CAC5B,CAAE,gBAAiB,gBAAiB,aAAc,EAAS,CAC/D,WAAY,CACV,CACE,IAAK,YACL,OAAQ,CAAC,UAAU,CACpB,CACD,CACE,IAAK,iBACL,OAAQF,EAAAA,GACN,EAAkB,IAAY,EAAE,CAChC,EACD,CACF,CACD,CACE,IAAK,kBACL,OAAQ,EAAuB,IAAY,EAAE,CAC9C,CACF,CACF,EACF,CAGD,EAAA,EAAO,IAAI,mBAAmB,EAAU,SAAS,CACjD,EAAA,EAAO,IAAI,qBAAqB,EAAmB,SAAS,CAC5D,EAAA,EAAO,IAAI,uBAAuB,EAAqB,SAAS,CAGhE,EAAA,EAAmB,EAAQ,CACzB,aAAc,EACf,CAAC"}
1
+ {"version":3,"file":"impl-oYFKp06U.cjs","names":["listFiles","readTranscendYaml","dataFlowsToDataSilos","difference","fetchAndIndexCatalogs","buildTranscendGraphQLClient"],"sources":["../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"sourcesContent":["import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from 'node:path';\nimport { difference } from 'lodash-es';\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { dataFlowsToDataSilos } from '../../../lib/consent-manager/dataFlowsToDataSilos';\nimport { DataFlowInput } from '../../../codecs';\nimport { existsSync, lstatSync } from 'node:fs';\nimport { listFiles } from '../../../lib/api-keys';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags {\n auth: string;\n dataFlowsYmlFolder: string;\n output: string;\n ignoreYmls?: string[];\n transcendUrl: string;\n}\n\nexport async function deriveDataSilosFromDataFlowsCrossInstance(\n this: LocalContext,\n {\n auth,\n dataFlowsYmlFolder,\n output,\n ignoreYmls = [],\n transcendUrl,\n }: DeriveDataSilosFromDataFlowsCrossInstanceCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\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 this.process.exit(1);\n }\n\n // Ignore the data flows in these yml files\n const instancesToIgnore = ignoreYmls.map((x) => x.split('.')[0]);\n\n // Map over each data flow yml file and convert to data silo configurations\n const dataSiloInputs = listFiles(dataFlowsYmlFolder).map((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 return {\n adTechDataSilos,\n siteTechDataSilos,\n organizationName: directory.split('.')[0],\n };\n });\n\n // Mapping from service name to instances that have that service\n const serviceToInstance: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(\n ({ adTechDataSilos, siteTechDataSilos, organizationName }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n // create mapping to instance\n if (!serviceToInstance[service]) {\n serviceToInstance[service] = [];\n }\n serviceToInstance[service]!.push(organizationName);\n serviceToInstance[service] = [...new Set(serviceToInstance[service])];\n });\n },\n );\n\n // List of ad tech integrations\n const adTechIntegrations = [\n ...new Set(\n dataSiloInputs\n .map(({ adTechDataSilos }) =>\n adTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ];\n\n // List of site tech integrations\n const siteTechIntegrations = difference(\n [\n ...new Set(\n dataSiloInputs\n .map(({ siteTechDataSilos }) =>\n siteTechDataSilos.map(\n (silo) => silo['outer-type'] || silo.integrationName,\n ),\n )\n .flat(),\n ),\n ],\n adTechIntegrations,\n );\n\n // Mapping from service name to list of\n const serviceToFoundOnDomain: { [k in string]: string[] } = {};\n dataSiloInputs.forEach(({ adTechDataSilos, siteTechDataSilos }) => {\n const allDataSilos = [...adTechDataSilos, ...siteTechDataSilos];\n allDataSilos.forEach((dataSilo) => {\n const service = dataSilo['outer-type'] || dataSilo.integrationName;\n const foundOnDomain = dataSilo.attributes?.find(\n (attr) => attr.key === 'Found On Domain',\n );\n // create mapping to instance\n if (!serviceToFoundOnDomain[service]) {\n serviceToFoundOnDomain[service] = [];\n }\n serviceToFoundOnDomain[service]!.push(...(foundOnDomain?.values || []));\n serviceToFoundOnDomain[service] = [\n ...new Set(serviceToFoundOnDomain[service]),\n ];\n });\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 // construct the aggregated data silo inputs\n const dataSilos = [...adTechIntegrations, ...siteTechIntegrations].map(\n (service) => ({\n title: serviceToTitle[service],\n ...(serviceToSupportedIntegration[service]\n ? { integrationName: service }\n : { integrationName: 'promptAPerson', 'outer-type': service }),\n attributes: [\n {\n key: 'Tech Type',\n values: ['Ad Tech'],\n },\n {\n key: 'Business Units',\n values: difference(\n serviceToInstance[service] || [],\n instancesToIgnore,\n ),\n },\n {\n key: 'Found On Domain',\n values: serviceToFoundOnDomain[service] || [],\n },\n ],\n }),\n );\n\n // Log output\n logger.log(`Total Services: ${dataSilos.length}`);\n logger.log(`Ad Tech Services: ${adTechIntegrations.length}`);\n logger.log(`Site Tech Services: ${siteTechIntegrations.length}`);\n\n // Write to yaml\n writeTranscendYaml(output, {\n 'data-silos': dataSilos,\n });\n}\n"],"mappings":"+iBA2BA,eAAsB,EAEpB,CACE,OACA,qBACA,SACA,aAAa,EAAE,CACf,gBAEa,CACf,EAAA,EAAoB,KAAK,QAAQ,KAAK,EAIpC,EAAA,EAAA,EAAA,YAAY,EAAmB,EAC/B,EAAA,EAAA,EAAA,WAAW,EAAmB,CAAC,aAAa,IAE5C,EAAA,EAAO,MAAM,EAAA,QAAO,IAAI,2BAA2B,EAAmB,GAAG,CAAC,CAC1E,KAAK,QAAQ,KAAK,EAAE,EAItB,IAAM,EAAoB,EAAW,IAAK,GAAM,EAAE,MAAM,IAAI,CAAC,GAAG,CAG1D,EAAiBA,EAAAA,EAAU,EAAmB,CAAC,IAAK,GAAc,CAEtE,GAAM,CAAE,aAAc,EAAY,EAAE,EAAKC,EAAAA,GAAAA,EAAAA,EAAAA,MAClC,EAAoB,EAAU,CACpC,CAGK,CAAE,kBAAiB,qBAAsBC,EAAAA,EAC7C,EACA,CACE,gCACA,iBACD,CACF,CAED,MAAO,CACL,kBACA,oBACA,iBAAkB,EAAU,MAAM,IAAI,CAAC,GACxC,EACD,CAGI,EAAiD,EAAE,CACzD,EAAe,SACZ,CAAE,kBAAiB,oBAAmB,sBAAuB,CACvC,CAAC,GAAG,EAAiB,GAAG,EAAkB,CAClD,QAAS,GAAa,CACjC,IAAM,EAAU,EAAS,eAAiB,EAAS,gBAE9C,EAAkB,KACrB,EAAkB,GAAW,EAAE,EAEjC,EAAkB,GAAU,KAAK,EAAiB,CAClD,EAAkB,GAAW,CAAC,GAAG,IAAI,IAAI,EAAkB,GAAS,CAAC,EACrE,EAEL,CAGD,IAAM,EAAqB,CACzB,GAAG,IAAI,IACL,EACG,KAAK,CAAE,qBACN,EAAgB,IACb,GAAS,EAAK,eAAiB,EAAK,gBACtC,CACF,CACA,MAAM,CACV,CACF,CAGK,EAAuBC,EAAAA,GAC3B,CACE,GAAG,IAAI,IACL,EACG,KAAK,CAAE,uBACN,EAAkB,IACf,GAAS,EAAK,eAAiB,EAAK,gBACtC,CACF,CACA,MAAM,CACV,CACF,CACD,EACD,CAGK,EAAsD,EAAE,CAC9D,EAAe,SAAS,CAAE,kBAAiB,uBAAwB,CAC5C,CAAC,GAAG,EAAiB,GAAG,EAAkB,CAClD,QAAS,GAAa,CACjC,IAAM,EAAU,EAAS,eAAiB,EAAS,gBAC7C,EAAgB,EAAS,YAAY,KACxC,GAAS,EAAK,MAAQ,kBACxB,CAEI,EAAuB,KAC1B,EAAuB,GAAW,EAAE,EAEtC,EAAuB,GAAU,KAAK,GAAI,GAAe,QAAU,EAAE,CAAE,CACvE,EAAuB,GAAW,CAChC,GAAG,IAAI,IAAI,EAAuB,GAAS,CAC5C,EACD,EACF,CAIF,GAAM,CAAE,iBAAgB,iCACtB,MAAMC,EAAAA,GAFOC,EAAAA,GAA4B,EAAc,EAAK,CAEzB,CAG/B,EAAY,CAAC,GAAG,EAAoB,GAAG,EAAqB,CAAC,IAChE,IAAa,CACZ,MAAO,EAAe,GACtB,GAAI,EAA8B,GAC9B,CAAE,gBAAiB,EAAS,CAC5B,CAAE,gBAAiB,gBAAiB,aAAc,EAAS,CAC/D,WAAY,CACV,CACE,IAAK,YACL,OAAQ,CAAC,UAAU,CACpB,CACD,CACE,IAAK,iBACL,OAAQF,EAAAA,GACN,EAAkB,IAAY,EAAE,CAChC,EACD,CACF,CACD,CACE,IAAK,kBACL,OAAQ,EAAuB,IAAY,EAAE,CAC9C,CACF,CACF,EACF,CAGD,EAAA,EAAO,IAAI,mBAAmB,EAAU,SAAS,CACjD,EAAA,EAAO,IAAI,qBAAqB,EAAmB,SAAS,CAC5D,EAAA,EAAO,IAAI,uBAAuB,EAAqB,SAAS,CAGhE,EAAA,EAAmB,EAAQ,CACzB,aAAc,EACf,CAAC"}
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./constants-7qBywLgI.cjs`),n=require(`./syncConfigurationToTranscend-Bd0ZTIm1.cjs`),r=require(`./enums-BZulhPFa.cjs`);require(`./logger-DQwEYtSS.cjs`);const i=require(`./buildAIIntegrationType-BwuCYR-o.cjs`),a=require(`./codecs-Bvmb8o9R.cjs`),o=require(`./readTranscendYaml-Cycz6RxW.cjs`),s=require(`./mergeTranscendInputs-BIBCYbug.cjs`),c=require(`./consent-manager-Df8gw2Qh.cjs`),l=require(`./uploadConsents-XYRco1_L.cjs`),u=require(`./cron-BhfbISdy.cjs`),d=require(`./api-keys-eh_rPCV_.cjs`),f=require(`./data-inventory-D36n1YAJ.cjs`),p=require(`./manual-enrichment-CzRiIFev.cjs`);let m=require(`@transcend-io/privacy-types`),h=require(`@transcend-io/type-utils`),g=require(`@transcend-io/handlebars-utils`),_=require(`fast-glob`);_=e.t(_);let v=require(`child_process`);const y=20;async function b(e){let t=[],r=0,i=!1;do{let{largeLanguageModels:{nodes:a}}=await n.i(e,n.Ki,{first:20,offset:r});t.push(...a),r+=20,i=a.length===20}while(i);return t.sort((e,t)=>e.name.localeCompare(t.name))}function x(e){return RegExp(`<${e}>([\\s\\S]+?)<\\/${e}>`)}function S(e){return e}const C=e=>{try{return JSON.parse(e)}catch{return e}};var w=class{prompts;handlebarsOptions;promptContentMap;largeLanguageModels=[];agentsByName={};agentsByAgentId={};graphQLClient;defaultVariables;variables;handlebars;transcendApiKey;transcendUrl;requireApproval;cacheDuration;lastUpdatedAt;constructor({prompts:e,handlebarsOptions:r={},transcendUrl:i=t.a,transcendApiKey:a,requireApproval:o=!0,cacheDuration:s,defaultVariables:c={}}){this.prompts=e,this.transcendUrl=i,this.transcendApiKey=a,this.variables=c,this.defaultVariables=c,this.graphQLClient=n.ti(i,typeof a==`object`?a.release():a),this.requireApproval=o,this.cacheDuration=s,this.handlebarsOptions=r,this.handlebars=(0,g.createHandlebarsWithHelpers)(r)}async fetchPromptsAndMetadata(){let e=(0,h.getValues)(this.prompts),r=e.map(({id:e})=>e).filter(e=>!!e),i=e.map(({title:e})=>e).filter(e=>!!e),a=n.Ds(e.map(({agentNames:e})=>e||[]).flat()),[o,s,c]=await Promise.all([n.Xn(this.graphQLClient,{promptIds:r,promptTitles:i}),b(this.graphQLClient),n.Gr(this.graphQLClient,{names:a})]);this.agentsByName=t.g(c,`name`),this.agentsByAgentId=t.g(c,`agentId`),this.largeLanguageModels=s.filter(e=>e.isTranscendHosted===!1);let l=t.g(o.prompts,`title`),u=t.g(o.prompts,`id`);return this.variables={...o.calculatedVariables.reduce((e,t)=>Object.assign(e,{[t.name]:t.data?JSON.parse(t.data):t.data}),{}),...this.defaultVariables},this.handlebars=(0,g.createHandlebarsWithHelpers)({...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(e=>({name:e.slug,content:e.content}))]}),this.promptContentMap=(0,h.apply)(this.prompts,({id:e,title:t})=>{let n=e?u[e]:t?l[t]:void 0;if(!n)throw Error(`Failed to find prompt with title: "${t}" and id: "${e}"`);return n}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let t=this.agentsByName[e];if(t)return t;let[r]=await n.Gr(this.graphQLClient,{names:[e]});if(r)return this.agentsByName[r.name]=r,this.agentsByAgentId[r.agentId]=r,r}async getPromptThreadBySlackTs(e){let[t]=await n.Jn(this.graphQLClient,{slackMessageTs:[e]});return t}async getAgentsByName(e){if(e.length<1)throw Error(`Expected at least one name to be provided`);let{hasCache:t=[],missingCache:r=[]}=n.As(e,e=>this.agentsByName[e]?`hasCache`:`missingCache`),i=t.map(e=>this.agentsByName[e]);if(r.length===0)return i;let a=n.Ns(r,50),o=[];return await n.Es(a,async e=>{let t=await n.Gr(this.graphQLClient,{names:e});t.forEach(e=>{this.agentsByName[e.name]=e,this.agentsByAgentId[e.agentId]=e}),o.push(...t)}),[...i,...o]}getAgentFiles(e){return n.qr(this.graphQLClient,e)}getLargeLanguageModel(e){let t=this.largeLanguageModels.find(t=>typeof e==`string`?t.id===e:t.name===e.name&&t.client===e.client);if(!t)throw Error(`Failed to find model matching: ${typeof e==`string`?e:JSON.stringify(e)}`);return t}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:t}=this;if(!t)throw Error(`Expected this.promptContentMap to be defined`);let n=t[e];if(!n)throw Error(`Expected this.promptContentMap[${e}] to be defined`);return n}async compilePrompt(e,t){let n=await this.getPromptDefinition(e),r=this.prompts[e];if(!r)throw Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&n.status!==m.PromptStatus.Approved)throw Error(`Assessment "${n.title}" cannot be used because its in status: "${n.status}"`);if(n.status===m.PromptStatus.Rejected)throw Error(`Assessment "${n.title}" cannot be used because it's in status: "${n.status}"`);return(0,h.decodeCodec)(r.paramCodec,t),this.handlebars.compile(n.content)({currentDate:new Date().toISOString(),...this.variables,...t})}parseAiResponse(e,t){let n=this.prompts[e];if(!n)throw Error(`Expected this.prompts[${e}] to be defined`);let r=n.extractFromTag&&(x(n.extractFromTag).exec(t)||[])[1]||t;return(0,h.decodeCodec)(n.outputCodec,C(r),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:t,...r}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let i=r.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw Error(`Expected this.promptContentMap to be defined`);let a=this.promptContentMap[e];if(!a)throw Error(`Expected this.prompts[${e}] to be defined`);if(r.promptRunMessages.length===0)throw Error(`promptRunMessages is expected to have length > 0`);if(r.promptRunMessages[0].role!==m.ChatCompletionRole.System)throw Error(`promptRunMessages[0].role is expected to be = ${m.ChatCompletionRole.System}`);if(r.promptRunMessages[r.promptRunMessages.length-1].role!==m.ChatCompletionRole.Assistant)throw Error(`promptRunMessages[${r.promptRunMessages.length-1}].role is expected to be = ${m.ChatCompletionRole.Assistant}`);let o=r.promptRunMessages[r.promptRunMessages.length-1].content,s;try{s=this.parseAiResponse(e,o)}catch(e){throw await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,error:e.message,status:m.QueueStatus.Error,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))}),e}let c=await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,status:m.QueueStatus.Resolved,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))});return{result:s,promptRunId:c,promptRunUrl:`https://app.transcend.io/prompts/runs/${c}`}}async reportPromptRunError(e,{largeLanguageModel:t,...r}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let i=r.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw Error(`Expected this.promptContentMap to be defined`);let a=this.promptContentMap[e];if(!a)throw Error(`Expected this.prompts[${e}] to be defined`);if(r.promptRunMessages.length===0)throw Error(`promptRunMessages is expected to have length > 0`);if(r.promptRunMessages[0].role!==m.ChatCompletionRole.System)throw Error(`promptRunMessages[0].role is expected to be = ${m.ChatCompletionRole.System}`);let o=await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,status:m.QueueStatus.Error,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))});return{promptRunId:o,promptRunUrl:`https://app.transcend.io/prompts/runs/${o}`}}};function T(e){return e.replace(/(https?:\/\/[^\s]+)/g,`<link-omitted>`)}function E(e){return Object.entries(e).reduce((e,[t,n])=>n!=null&&n!==``&&!(Array.isArray(n)&&n.length===0)&&!(typeof n==`object`&&Object.keys(n).length===0)?Object.assign(e,{[t]:n}):e,{})}function D({baseBranch:e,rootDirectory:t,githubRepo:r,excludedGlob:i=[],fileBlockList:a=[]}){(0,v.execSync)(`git fetch origin ${e}`);let o=(0,v.execSync)(`git ls-remote ${r} "refs/heads/${e}" | cut -f 1`,{encoding:`utf-8`}).split(`
1
+ const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./constants-K6pQQtc7.cjs`),n=require(`./syncConfigurationToTranscend-DKliAJhK.cjs`),r=require(`./enums-BZulhPFa.cjs`);require(`./logger-DQwEYtSS.cjs`);const i=require(`./buildAIIntegrationType-BwuCYR-o.cjs`),a=require(`./codecs-Bvmb8o9R.cjs`),o=require(`./readTranscendYaml-Cycz6RxW.cjs`),s=require(`./mergeTranscendInputs-BIBCYbug.cjs`),c=require(`./consent-manager-oip5m3XC.cjs`),l=require(`./uploadConsents-MtgCk8B0.cjs`),u=require(`./cron-lijiEqFA.cjs`),d=require(`./api-keys-Bvt2HbSv.cjs`),f=require(`./data-inventory-BKAQGjFN.cjs`),p=require(`./manual-enrichment-C6h9gjY1.cjs`);let m=require(`@transcend-io/privacy-types`),h=require(`@transcend-io/type-utils`),g=require(`@transcend-io/handlebars-utils`),_=require(`fast-glob`);_=e.t(_);let v=require(`child_process`);const y=20;async function b(e){let t=[],r=0,i=!1;do{let{largeLanguageModels:{nodes:a}}=await n.i(e,n.Ki,{first:20,offset:r});t.push(...a),r+=20,i=a.length===20}while(i);return t.sort((e,t)=>e.name.localeCompare(t.name))}function x(e){return RegExp(`<${e}>([\\s\\S]+?)<\\/${e}>`)}function S(e){return e}const C=e=>{try{return JSON.parse(e)}catch{return e}};var w=class{prompts;handlebarsOptions;promptContentMap;largeLanguageModels=[];agentsByName={};agentsByAgentId={};graphQLClient;defaultVariables;variables;handlebars;transcendApiKey;transcendUrl;requireApproval;cacheDuration;lastUpdatedAt;constructor({prompts:e,handlebarsOptions:r={},transcendUrl:i=t.a,transcendApiKey:a,requireApproval:o=!0,cacheDuration:s,defaultVariables:c={}}){this.prompts=e,this.transcendUrl=i,this.transcendApiKey=a,this.variables=c,this.defaultVariables=c,this.graphQLClient=n.ti(i,typeof a==`object`?a.release():a),this.requireApproval=o,this.cacheDuration=s,this.handlebarsOptions=r,this.handlebars=(0,g.createHandlebarsWithHelpers)(r)}async fetchPromptsAndMetadata(){let e=(0,h.getValues)(this.prompts),r=e.map(({id:e})=>e).filter(e=>!!e),i=e.map(({title:e})=>e).filter(e=>!!e),a=n.Ds(e.map(({agentNames:e})=>e||[]).flat()),[o,s,c]=await Promise.all([n.Xn(this.graphQLClient,{promptIds:r,promptTitles:i}),b(this.graphQLClient),n.Gr(this.graphQLClient,{names:a})]);this.agentsByName=t.g(c,`name`),this.agentsByAgentId=t.g(c,`agentId`),this.largeLanguageModels=s.filter(e=>e.isTranscendHosted===!1);let l=t.g(o.prompts,`title`),u=t.g(o.prompts,`id`);return this.variables={...o.calculatedVariables.reduce((e,t)=>Object.assign(e,{[t.name]:t.data?JSON.parse(t.data):t.data}),{}),...this.defaultVariables},this.handlebars=(0,g.createHandlebarsWithHelpers)({...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(e=>({name:e.slug,content:e.content}))]}),this.promptContentMap=(0,h.apply)(this.prompts,({id:e,title:t})=>{let n=e?u[e]:t?l[t]:void 0;if(!n)throw Error(`Failed to find prompt with title: "${t}" and id: "${e}"`);return n}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let t=this.agentsByName[e];if(t)return t;let[r]=await n.Gr(this.graphQLClient,{names:[e]});if(r)return this.agentsByName[r.name]=r,this.agentsByAgentId[r.agentId]=r,r}async getPromptThreadBySlackTs(e){let[t]=await n.Jn(this.graphQLClient,{slackMessageTs:[e]});return t}async getAgentsByName(e){if(e.length<1)throw Error(`Expected at least one name to be provided`);let{hasCache:t=[],missingCache:r=[]}=n.As(e,e=>this.agentsByName[e]?`hasCache`:`missingCache`),i=t.map(e=>this.agentsByName[e]);if(r.length===0)return i;let a=n.Ns(r,50),o=[];return await n.Es(a,async e=>{let t=await n.Gr(this.graphQLClient,{names:e});t.forEach(e=>{this.agentsByName[e.name]=e,this.agentsByAgentId[e.agentId]=e}),o.push(...t)}),[...i,...o]}getAgentFiles(e){return n.qr(this.graphQLClient,e)}getLargeLanguageModel(e){let t=this.largeLanguageModels.find(t=>typeof e==`string`?t.id===e:t.name===e.name&&t.client===e.client);if(!t)throw Error(`Failed to find model matching: ${typeof e==`string`?e:JSON.stringify(e)}`);return t}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:t}=this;if(!t)throw Error(`Expected this.promptContentMap to be defined`);let n=t[e];if(!n)throw Error(`Expected this.promptContentMap[${e}] to be defined`);return n}async compilePrompt(e,t){let n=await this.getPromptDefinition(e),r=this.prompts[e];if(!r)throw Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&n.status!==m.PromptStatus.Approved)throw Error(`Assessment "${n.title}" cannot be used because its in status: "${n.status}"`);if(n.status===m.PromptStatus.Rejected)throw Error(`Assessment "${n.title}" cannot be used because it's in status: "${n.status}"`);return(0,h.decodeCodec)(r.paramCodec,t),this.handlebars.compile(n.content)({currentDate:new Date().toISOString(),...this.variables,...t})}parseAiResponse(e,t){let n=this.prompts[e];if(!n)throw Error(`Expected this.prompts[${e}] to be defined`);let r=n.extractFromTag&&(x(n.extractFromTag).exec(t)||[])[1]||t;return(0,h.decodeCodec)(n.outputCodec,C(r),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:t,...r}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let i=r.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw Error(`Expected this.promptContentMap to be defined`);let a=this.promptContentMap[e];if(!a)throw Error(`Expected this.prompts[${e}] to be defined`);if(r.promptRunMessages.length===0)throw Error(`promptRunMessages is expected to have length > 0`);if(r.promptRunMessages[0].role!==m.ChatCompletionRole.System)throw Error(`promptRunMessages[0].role is expected to be = ${m.ChatCompletionRole.System}`);if(r.promptRunMessages[r.promptRunMessages.length-1].role!==m.ChatCompletionRole.Assistant)throw Error(`promptRunMessages[${r.promptRunMessages.length-1}].role is expected to be = ${m.ChatCompletionRole.Assistant}`);let o=r.promptRunMessages[r.promptRunMessages.length-1].content,s;try{s=this.parseAiResponse(e,o)}catch(e){throw await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,error:e.message,status:m.QueueStatus.Error,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))}),e}let c=await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,status:m.QueueStatus.Resolved,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))});return{result:s,promptRunId:c,promptRunUrl:`https://app.transcend.io/prompts/runs/${c}`}}async reportPromptRunError(e,{largeLanguageModel:t,...r}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let i=r.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw Error(`Expected this.promptContentMap to be defined`);let a=this.promptContentMap[e];if(!a)throw Error(`Expected this.prompts[${e}] to be defined`);if(r.promptRunMessages.length===0)throw Error(`promptRunMessages is expected to have length > 0`);if(r.promptRunMessages[0].role!==m.ChatCompletionRole.System)throw Error(`promptRunMessages[0].role is expected to be = ${m.ChatCompletionRole.System}`);let o=await n.hn(this.graphQLClient,{productArea:m.PromptRunProductArea.PromptManager,...r,name:i,status:m.QueueStatus.Error,...typeof t==`string`?{largeLanguageModelId:t}:{largeLanguageModelName:t.name,largeLanguageModelClient:t.client},promptId:a.id,promptRunMessages:r.promptRunMessages.map((e,t)=>({...e,...t===0?{template:a.content}:{}}))});return{promptRunId:o,promptRunUrl:`https://app.transcend.io/prompts/runs/${o}`}}};function T(e){return e.replace(/(https?:\/\/[^\s]+)/g,`<link-omitted>`)}function E(e){return Object.entries(e).reduce((e,[t,n])=>n!=null&&n!==``&&!(Array.isArray(n)&&n.length===0)&&!(typeof n==`object`&&Object.keys(n).length===0)?Object.assign(e,{[t]:n}):e,{})}function D({baseBranch:e,rootDirectory:t,githubRepo:r,excludedGlob:i=[],fileBlockList:a=[]}){(0,v.execSync)(`git fetch origin ${e}`);let o=(0,v.execSync)(`git ls-remote ${r} "refs/heads/${e}" | cut -f 1`,{encoding:`utf-8`}).split(`
2
2
  `)[0],s=(0,v.execSync)(`git rev-parse HEAD`,{encoding:`utf-8`}).split(`
3
3
  `)[0];if(!o||!s)throw Error(`FAILED TO FIND COMMIT RANGE`);let c=n.js((0,v.execSync)(`git fetch && git diff --name-only "${e||o}...${s}" -- ${t}`,{encoding:`utf-8`}).split(`
4
4
  `).filter(e=>e),a),l=i.length>0?_.default.sync(c,{ignore:i}):c,u={};return l.forEach(e=>{u[e]=(0,v.execSync)(`git show ${s}:${e}`,{encoding:`utf-8`})}),{changedFiles:c,fileDiffs:u,repoName:r.split(`/`).pop().split(`.`)[0],commit:s}}exports.ACTIONS=n.ra,exports.ADD_MESSAGES_TO_PROMPT_RUN=n.Ga,exports.ADD_SILO_DISCOVERY_RESULTS=n.Wo,exports.ADMIN_DASH=t.t,exports.ADMIN_DASH_DATAPOINTS=t.n,exports.ADMIN_DASH_INTEGRATIONS=t.r,exports.AGENTS=n.Ui,exports.AGENT_FILES=n.Bi,exports.AGENT_FUNCTIONS=n.Li,exports.API_KEYS=n.qo,exports.APPROVE_PRIVACY_REQUEST=n.Eo,exports.ASSESSMENTS=n.vo,exports.ASSESSMENT_SECTION_FIELDS=n.yo,exports.ASSESSMENT_TEMPLATES=n.ho,exports.ASSUME_ROLE=n.qi,exports.ATTRIBUTES=n.Pa,exports.ATTRIBUTE_KEYS_REQUESTS=n.Bo,exports.ATTRIBUTE_VALUES=n.Fa,exports.ActionInput=a.t,exports.ActionItemCollectionInput=a.n,exports.ActionItemInput=a.r,exports.AgentFileInput=a.i,exports.AgentFunctionInput=a.a,exports.AgentInput=a.o,exports.ApiKeyInput=a.s,exports.AssessmentAction=n.Nn,exports.AssessmentAnswerOptionInput=a.c,exports.AssessmentDisplayLogicInput=a.l,exports.AssessmentInput=a.u,exports.AssessmentNestedRule=n.Pn,exports.AssessmentNestedRuleInput=a.d,exports.AssessmentResourceInput=a.f,exports.AssessmentRetentionScheduleInput=a.p,exports.AssessmentRiskLogic=n.jn,exports.AssessmentRule=n.Fn,exports.AssessmentRuleInput=a.m,exports.AssessmentRuleWithOperands=n.In,exports.AssessmentRuleWithoutOperands=n.Ln,exports.AssessmentSectionInput=a.h,exports.AssessmentSectionQuestionInput=a.g,exports.AssessmentTemplateInput=a._,exports.AttestedExtraIdentifiers=n.rt,exports.AttributeInput=a.v,exports.AttributePreview=a.y,exports.AttributeValueInput=a.b,exports.BLANK=n.pi,exports.BULK_APPLY=n.mi,exports.BULK_REQUEST_FILES=n.qa,exports.BUSINESS_ENTITIES=n.aa,exports.BusinessEntityInput=a.x,exports.CANCEL_PRIVACY_REQUEST=n.Do,exports.CAN_APPLY_IN_BULK=n.hi,exports.CATALOGS=n.ss,exports.CHANGE_REQUEST_DATA_SILO_STATUS=n.to,exports.CODE_PACKAGES=n.Po,exports.CONSENT_MANAGER_ANALYTICS_DATA=n.ca,exports.CONSENT_PARTITIONS=n.la,exports.COOKIES=n.ua,exports.CREATE_ACTION_ITEMS=n.ea,exports.CREATE_ACTION_ITEM_COLLECTION=n.Ha,exports.CREATE_AGENT=n.Wi,exports.CREATE_AGENT_FILE=n.Vi,exports.CREATE_AGENT_FUNCTION=n.Ri,exports.CREATE_API_KEY=n.Jo,exports.CREATE_ATTRIBUTE=n.Ia,exports.CREATE_ATTRIBUTE_VALUES=n.La,exports.CREATE_BUSINESS_ENTITY=n.oa,exports.CREATE_CODE_PACKAGE=n.Fo,exports.CREATE_CONSENT_EXPERIENCE=n.da,exports.CREATE_CONSENT_MANAGER=n.fa,exports.CREATE_CONSENT_PARTITION=n.pa,exports.CREATE_DATA_FLOWS=n.ma,exports.CREATE_DATA_SILOS=n.fs,exports.CREATE_DATA_SUBJECT=n.$o,exports.CREATE_DATA_SUB_CATEGORY=n.ji,exports.CREATE_ENRICHER=n.cs,exports.CREATE_IDENTIFIER=n.rs,exports.CREATE_PREFERENCE_ACCESS_TOKENS=n.Ko,exports.CREATE_PROCESSING_ACTIVITY=n.Ti,exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY=n.Oi,exports.CREATE_PROMPT=n.ao,exports.CREATE_PROMPT_GROUP=n.oo,exports.CREATE_PROMPT_PARTIAL=n.so,exports.CREATE_REPOSITORY=n.Xo,exports.CREATE_SOFTWARE_DEVELOPMENT_KIT=n.Lo,exports.CREATE_TEAM=n.Qa,exports.CREATE_TEMPLATE=n.Ho,exports.CREATE_VENDOR=n.Pi,exports.CachedFileState=n.gi,exports.CachedRequestState=n._i,exports.CodePackageInput=a.S,exports.CodePackageSdk=a.C,exports.ColumnName=n.vi,exports.ConsentManageExperienceInput=a.w,exports.ConsentManagerInput=a.T,exports.ConsentManagerMetricBin=n.jr,exports.ConsentManagerServiceMetadata=a.E,exports.ConsentPreferenceTopic=a.D,exports.ConsentPreferenceTopicOptionValue=a.O,exports.ConsentPurpose=a.k,exports.CookieCsvInput=a.A,exports.CookieInput=a.j,exports.CronIdentifier=u.o,exports.CronIdentifierPush=u.i,exports.DATAPOINT_EXPORT=n.vs,exports.DATA_FLOWS=n.ha,exports.DATA_POINTS=n.ys,exports.DATA_POINT_COUNT=n.bs,exports.DATA_SILOS=n.ps,exports.DATA_SILOS_ENRICHED=n.ms,exports.DATA_SILO_EXPORT=n.hs,exports.DATA_SUBJECTS=n.es,exports.DATA_SUB_CATEGORIES=n.Mi,exports.DAY_MS=n.f,exports.DEBUG=t.i,exports.DEFAULT_TRANSCEND_API=t.a,exports.DEFAULT_TRANSCEND_CONSENT_API=t.o,exports.DEFAULT_TRANSCEND_PULL_RESOURCES=n.gn,exports.DELETE_API_KEY=n.Yo,exports.DELETE_ATTRIBUTE_VALUE=n.Ra,exports.DEPLOYED_PRIVACY_CENTER_URL=n.Xi,exports.DEPLOY_CONSENT_MANAGER=n.ga,exports.DETERMINE_LOGIN_METHOD=n.Ji,exports.DataCategoryGuessInput=a.M,exports.DataCategoryInput=a.N,exports.DataCategoryPreviewInput=a.P,exports.DataCategoryRecommendationInput=a.F,exports.DataFlowCsvInput=a.I,exports.DataFlowInput=a.L,exports.DataSiloInput=a.R,exports.DataSubjectInput=a.z,exports.DatapointInput=a.B,exports.ENABLED_PLUGINS=n.Go,exports.ENRICHERS=n.ls,exports.ENTRY_COUNT=n._s,exports.EXPERIENCES=n._a,exports.EnrichPrivacyRequest=p.n,exports.EnricherInput=a.V,exports.FETCH_CONSENT_MANAGER=n.va,exports.FETCH_CONSENT_MANAGER_ID=n.ya,exports.FETCH_CONSENT_MANAGER_THEME=n.ba,exports.FETCH_PRIVACY_CENTER_ID=n.Zi,exports.FIVE_MIN_MS=n.p,exports.FieldInput=a.H,exports.GLOBAL_ACTION_ITEMS=n.ta,exports.GLOBAL_ACTION_ITEM_COLLECTIONS=n.Ua,exports.HOUR_MS=n.m,exports.IDENTIFIERS=n.is,exports.IDENTIFIER_BLOCK_LIST=n.yi,exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS=n.bo,exports.INITIALIZER=n.us,exports.IP_ADDRESS_REGEX=c.n,exports.IS_REQUIRED=n.bi,exports.IdentifierInput=a.U,exports.ImportOnetrustAssessmentsInput=a.W,exports.IntlMessage=n.$,exports.IntlMessageInput=a.G,exports.LARGE_LANGUAGE_MODELS=n.Ki,exports.LOGIN=n.Yi,exports.MESSAGES=n.wo,exports.NEW_IDENTIFIER_TYPES=n.as,exports.NONE=n.xi,exports.NOTIFY_ADDITIONAL_TIME=n.Oo,exports.ORGANIZATION=n.Vo,exports.OneTrustFileFormat=r.t,exports.OneTrustPullResource=r.n,exports.OneTrustPullSource=r.r,exports.OpenAIEnabledRoute=a.K,exports.OpenAIEnabledRoutes=a.q,exports.OpenAIIntegration=a.J,exports.OpenAIRouteName=r.i,exports.POLICIES=n.jo,exports.PREFERENCE_TOPICS=n.go,exports.PRIVACY_CENTER=n.Qi,exports.PROCESSING_ACTIVITIES=n.Ei,exports.PROCESSING_PURPOSE_SUB_CATEGORIES=n.ki,exports.PROMPTS=n.co,exports.PROMPTS_WITH_VARIABLES=n.lo,exports.PROMPT_GROUPS=n.uo,exports.PROMPT_PARTIALS=n.do,exports.PROMPT_THREADS=n.No,exports.PURPOSES=n._o,exports.ParsedAttributeInput=n.si,exports.PartitionInput=a.Y,exports.PathfinderPolicy=a.X,exports.PathfinderPolicyName=r.a,exports.PathfinderPolicyNameC=a.Z,exports.PathfinderPromptRunMetadata=a.Q,exports.PolicyInput=a.$,exports.PrivacyCenterInput=a.et,exports.PrivacyRequest=n.ur,exports.PrivacyRequestInput=n.it,exports.PrivacyRequestResponse=n.Y,exports.ProcessingActivityInput=a.tt,exports.ProcessingPurposeInput=a.nt,exports.ProcessingPurposePreviewInput=a.rt,exports.PromptAVendorEmailSettings=a.it,exports.PromptGroupInput=a.at,exports.PromptInput=a.ot,exports.PromptPartialInput=a.st,exports.PurposeMap=l.t,exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT=n.no,exports.REMOVE_REQUEST_IDENTIFIERS=n.Xa,exports.REPORT_PROMPT_RUN=n.Ka,exports.REPOSITORIES=n.Zo,exports.REQUESTS=n.ko,exports.REQUEST_DATA_SILOS=n.ro,exports.REQUEST_ENRICHERS=n.xo,exports.REQUEST_FILES=n.Ja,exports.REQUEST_IDENTIFIERS=n.Za,exports.RETRYABLE_BATCH_STATUSES=t.s,exports.RETRY_REQUEST_DATA_SILO=n.io,exports.RETRY_REQUEST_ENRICHER=n.So,exports.RateCounter=n.C,exports.RegionInput=a.ct,exports.RepositoryInput=a.lt,exports.RequestFileMetadata=n.et,exports.RequestFileMetadataResponse=n.tt,exports.RequestIdentifiersResponse=n.pr,exports.RequestPurposeTrigger=n.dr,exports.RiskAssignmentInput=a.ut,exports.RiskLogicInput=a.dt,exports.SCOPES_BY_TITLE=t.c,exports.SCOPE_TITLES=t.l,exports.SET_RESOURCE_ATTRIBUTES=n.za,exports.SILO_DISCOVERY_RESULTS=n.Ci,exports.SKIP_REQUEST_ENRICHER=n.Co,exports.SOFTWARE_DEVELOPMENT_KITS=n.Ro,exports.SOMBRA_VERSION=n.wi,exports.SUB_DATA_POINTS=n.xs,exports.SUB_DATA_POINTS_COUNT=n.Ss,exports.SUB_DATA_POINTS_WITH_GUESSES=n.Cs,exports.SYNC_ATTRIBUTE_TYPES=n.Rr,exports.SiloDiscoveryResultInput=a.ft,exports.SoftwareDevelopmentKitInput=a.pt,exports.StoredApiKey=a.mt,exports.SuccessfulRequest=n.Si,exports.TEAMS=n.$a,exports.TEMPLATES=n.Uo,exports.TOGGLE_CONSENT_PRECEDENCE=n.xa,exports.TOGGLE_DATA_SUBJECT=n.ts,exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY=n.Sa,exports.TOGGLE_UNKNOWN_COOKIE_POLICY=n.Ca,exports.TOGGLE_UNKNOWN_REQUEST_POLICY=n.wa,exports.TR_PULL_RESOURCE_SCOPE_MAP=t.u,exports.TR_PUSH_RESOURCE_SCOPE_MAP=t.d,exports.TR_YML_RESOURCE_TO_FIELD_NAME=t.f,exports.TeamInput=a.ht,exports.TemplateInput=a.gt,exports.TranscendInput=a._t,exports.TranscendPromptManager=w,exports.TranscendPullResource=r.o,exports.UPDATE_ACTION=n.ia,exports.UPDATE_ACTION_ITEMS=n.na,exports.UPDATE_ACTION_ITEM_COLLECTION=n.Wa,exports.UPDATE_AGENTS=n.Gi,exports.UPDATE_AGENT_FILES=n.Hi,exports.UPDATE_AGENT_FUNCTIONS=n.zi,exports.UPDATE_ATTRIBUTE=n.Ba,exports.UPDATE_ATTRIBUTE_VALUES=n.Va,exports.UPDATE_BUSINESS_ENTITIES=n.sa,exports.UPDATE_CODE_PACKAGES=n.Io,exports.UPDATE_CONSENT_EXPERIENCE=n.Ta,exports.UPDATE_CONSENT_MANAGER_DOMAINS=n.Ea,exports.UPDATE_CONSENT_MANAGER_PARTITION=n.Da,exports.UPDATE_CONSENT_MANAGER_THEME=n.Oa,exports.UPDATE_CONSENT_MANAGER_TO_LATEST=n.ka,exports.UPDATE_CONSENT_MANAGER_VERSION=n.Aa,exports.UPDATE_DATA_FLOWS=n.ja,exports.UPDATE_DATA_SILOS=n.gs,exports.UPDATE_DATA_SUBJECT=n.ns,exports.UPDATE_DATA_SUB_CATEGORIES=n.Ni,exports.UPDATE_ENRICHER=n.ds,exports.UPDATE_IDENTIFIER=n.os,exports.UPDATE_INTL_MESSAGES=n.To,exports.UPDATE_LOAD_OPTIONS=n.Ma,exports.UPDATE_OR_CREATE_COOKIES=n.Na,exports.UPDATE_OR_CREATE_DATA_POINT=n.ws,exports.UPDATE_POLICIES=n.Mo,exports.UPDATE_PRIVACY_CENTER=n.$i,exports.UPDATE_PRIVACY_REQUEST=n.Ao,exports.UPDATE_PROCESSING_ACTIVITIES=n.Di,exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES=n.Ai,exports.UPDATE_PROMPTS=n.fo,exports.UPDATE_PROMPT_GROUPS=n.po,exports.UPDATE_PROMPT_PARTIALS=n.mo,exports.UPDATE_REPOSITORIES=n.Qo,exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS=n.zo,exports.UPDATE_TEAM=n.eo,exports.UPDATE_VENDORS=n.Fi,exports.USERS=n.Ya,exports.USP_STRING_REGEX=l.n,exports.VARIABLE_PARAMETERS_NAME=o.t,exports.VARIABLE_PARAMETERS_REGEXP=o.n,exports.VENDORS=n.Ii,exports.VendorInput=a.vt,exports.WebhookHeader=a.yt,exports.addDaysUtc=n.h,exports.addMessagesToPromptRun=n.ri,exports.addMs=n.g,exports.appendCsvRowsOrdered=n.a,exports.appendCsvSync=n.o,exports.approvePrivacyRequests=n.J,exports.assumeRole=n.Vn,exports.buildAIIntegrationType=i.t,exports.buildEnabledRouteType=i.n,exports.buildTranscendGraphQLClient=n.ti,exports.buildTranscendGraphQLClientGeneric=n.ni,exports.buildXdiSyncEndpoint=c.r,exports.bulkRestartRequests=n.B,exports.bulkRetryEnrichers=n.R,exports.cancelPrivacyRequests=n.G,exports.clampPageSize=n._,exports.collectParquetFilesOrExit=n.x,exports.consentManagersToBusinessEntities=c.t,exports.convertToDataSubjectAllowlist=n.$n,exports.convertToDataSubjectBlockList=n.er,exports.createActionItemCollection=n.ln,exports.createActionItems=n.on,exports.createAgent=n.Zt,exports.createAgentFile=n.rn,exports.createAgentFunction=n.en,exports.createApiKey=n.zn,exports.createBusinessEntity=n.qt,exports.createCodePackage=n.Rt,exports.createConsentToken=l.i,exports.createDataCategory=n.jt,exports.createDataFlows=n.Ot,exports.createPreferenceAccessTokens=n.Hr,exports.createProcessingPurpose=n._t,exports.createPrompt=n.mt,exports.createRegexForTag=x,exports.createRepository=n.Vt,exports.createSoftwareDevelopmentKit=n.Wt,exports.createSombraGotInstance=n.ei,exports.createTranscendConsentGotInstance=n.$r,exports.createVendor=n.dt,exports.defineTranscendPrompts=S,exports.deleteApiKey=n.Bn,exports.deployConsentManager=n.Zr,Object.defineProperty(exports,`description`,{enumerable:!0,get:function(){return t.m}}),exports.domainToHost=c.i,exports.downloadPrivacyRequestFiles=n.Z,exports.enrichPrivacyRequest=p.r,exports.ensureAllDataSubjectsExist=n.tr,exports.extractClientError=n.U,exports.extractErrorMessage=n.O,exports.fetchActiveSiloDiscoPlugin=n.Xr,exports.fetchAllActionItems=n.Yr,exports.fetchAllActions=n.Jr,exports.fetchAllAgentFiles=n.qr,exports.fetchAllAgentFunctions=n.Kr,exports.fetchAllAgents=n.Gr,exports.fetchAllApiKeys=n.ar,exports.fetchAllAssessmentTemplates=n.Ur,exports.fetchAllAssessments=n.Wr,exports.fetchAllAttributeValues=n.zr,exports.fetchAllAttributes=n.Br,exports.fetchAllBusinessEntities=n.Lr,exports.fetchAllCatalogs=n.rr,exports.fetchAllCookies=n.Ar,exports.fetchAllDataCategories=n.kr,exports.fetchAllDataFlows=n.Or,exports.fetchAllDataPoints=n.Tn,exports.fetchAllDataSilos=n.En,exports.fetchAllDataSubjects=n.nr,exports.fetchAllEnrichers=n.Cn,exports.fetchAllIdentifiers=n.n,exports.fetchAllMessages=n.Dr,exports.fetchAllPolicies=n.wr,exports.fetchAllPreferenceTopics=n.Sr,exports.fetchAllPrivacyCenters=n.xr,exports.fetchAllProcessingActivities=n.br,exports.fetchAllProcessingPurposes=n.yr,exports.fetchAllPromptGroups=n.Qn,exports.fetchAllPromptPartials=n.Zn,exports.fetchAllPromptThreads=n.Jn,exports.fetchAllPrompts=n.Yn,exports.fetchAllPurposes=n.vr,exports.fetchAllPurposesAndPreferences=n._r,exports.fetchAllRequestAttributeKeys=n.Vr,exports.fetchAllRequestEnrichers=n.gr,exports.fetchAllRequestIdentifierMetadata=n.hr,exports.fetchAllRequestIdentifiers=n.mr,exports.fetchAllRequests=n.fr,exports.fetchAllSiloDiscoveryResults=n.vn,exports.fetchAllSubDataPoints=n.Dn,exports.fetchAllTeams=n.lr,exports.fetchAllTemplates=n.xn,exports.fetchAllUsers=n.cr,exports.fetchAllVendors=n.sr,exports.fetchAndIndexCatalogs=n.ir,exports.fetchApiKeys=n.or,exports.fetchConsentManager=n.Mr,exports.fetchConsentManagerAnalyticsData=n.Nr,exports.fetchConsentManagerExperiences=n.Pr,exports.fetchConsentManagerId=n.Fr,exports.fetchConsentManagerTheme=n.Ir,exports.fetchEnrichedDataSilos=n.On,exports.fetchIdentifiersAndCreateMissing=n.r,exports.fetchPartitions=n.yn,exports.fetchPrivacyCenterId=n.Tr,exports.fetchPrivacyCenterUrl=n.Er,exports.fetchPromptsWithVariables=n.Xn,exports.fetchRequestDataSilo=n.Gn,exports.fetchRequestDataSiloActiveCount=n.Wn,exports.fetchRequestDataSilos=n.Kn,exports.fetchRequestDataSilosCount=n.qn,exports.fetchRequestFilesForRequest=n.Un,exports.filterNullishValuesFromObject=E,exports.filterRows=n.ii,exports.formatAttributeValues=n.Cr,exports.fuzzyMatchColumns=n.di,exports.fuzzySearch=n.fi,exports.generateCrossAccountApiKeys=d.i,exports.getErrorStatus=n.k,exports.getFileMetadataForPrivacyRequests=n.nt,exports.getGitFilesThatChanged=D,exports.getUniqueValuesForColumn=n.ai,exports.initCsvFile=n.s,exports.inquirerAutoComplete=n.j,exports.inquirerConfirmBoolean=n.M,exports.inquirerConfirmText=n.N,exports.limitRecords=n.w,exports.listDirectories=d.t,exports.listFiles=d.n,exports.loginUser=n.Hn,exports.makeGraphQLRequest=n.i,exports.mapColumnsToAttributes=n.W,exports.mapColumnsToIdentifiers=n.K,exports.mapCsvColumnsToApi=n.ct,exports.mapCsvRowsToRequestInputs=n.at,exports.mapEnumValues=n.ui,exports.mapRequestEnumValues=n.st,exports.markCronIdentifierCompleted=u.a,exports.markRequestDataSiloIdsCompleted=u.n,exports.markSilentPrivacyRequests=n.lt,exports.mergeTranscendInputs=s.t,exports.name=t.p,exports.normalizeIdentifierValue=n.ot,exports.notifyPrivacyRequestsAdditionalTime=n.q,exports.parquetToCsvOneFile=n.b,exports.parseAssessmentDisplayLogic=n.Rn,exports.parseAssessmentRiskLogic=n.Mn,exports.parseAttributesFromString=n.ci,exports.parseFilePath=n.c,exports.parseVariablesFromString=n.A,exports.pullAllDatapoints=f.n,exports.pullChunkedCustomSiloOutstandingIdentifiers=u.t,exports.pullConsentManagerMetrics=c.a,exports.pullCronPageOfIdentifiers=u.s,exports.pullManualEnrichmentIdentifiersToCsv=p.i,exports.pullPrivacyRequests=n.I,exports.pullTranscendConfiguration=n._n,exports.pullUnstructuredSubDataPointRecommendations=f.t,exports.pushCronIdentifiersFromCsv=u.r,exports.pushManualEnrichmentIdentifiersFromCsv=p.t,exports.readCsv=n.oi,exports.readSafe=n.S,exports.readTranscendYaml=o.r,exports.removeLinks=T,exports.removeUnverifiedRequestIdentifiers=n.P,exports.replaceVariablesInYaml=o.i,exports.reportPromptRun=n.hn,exports.restartPrivacyRequest=n.V,exports.retryRequestDataSilos=n.L,exports.retryRequestEnricher=n.mn,exports.retrySamePromise=n.T,exports.setResourceAttributes=n.pn,exports.skipPreflightJobs=n.z,exports.skipRequestDataSilos=n.F,exports.sleepPromise=n.D,exports.splitCsvToList=n.li,exports.splitInHalf=n.E,exports.startOfHour=n.v,exports.startOfUtcDay=n.y,exports.streamPrivacyRequestFiles=n.Q,exports.submitPrivacyRequest=n.X,exports.syncAction=n.fn,exports.syncActionItemCollections=n.un,exports.syncActionItems=n.sn,exports.syncAgentFiles=n.in,exports.syncAgentFunctions=n.tn,exports.syncAgents=n.Qt,exports.syncAttribute=n.Xt,exports.syncBusinessEntities=n.Jt,exports.syncCodePackages=n.zt,exports.syncConfigurationToTranscend=n.t,exports.syncConsentManager=n.It,exports.syncConsentManagerExperiences=n.Lt,exports.syncCookies=n.Pt,exports.syncDataCategories=n.Mt,exports.syncDataFlows=n.kt,exports.syncDataSiloDependencies=n.kn,exports.syncDataSilos=n.An,exports.syncDataSubject=n.Dt,exports.syncEnricher=n.wn,exports.syncIdentifier=n.Et,exports.syncIntlMessages=n.wt,exports.syncPartitions=n.bn,exports.syncPolicies=n.St,exports.syncPrivacyCenter=n.xt,exports.syncProcessingActivities=n.bt,exports.syncProcessingPurposes=n.vt,exports.syncPrompts=n.ht,exports.syncRepositories=n.Ht,exports.syncSoftwareDevelopmentKits=n.Gt,exports.syncTemplate=n.Sn,exports.syncVendors=n.ft,exports.updateActionItem=n.cn,exports.updateActionItemCollection=n.dn,exports.updateAgentFiles=n.an,exports.updateAgentFunctions=n.nn,exports.updateAgents=n.$t,exports.updateBusinessEntities=n.Yt,exports.updateCodePackages=n.Bt,exports.updateConsentManagerToLatest=n.Qr,exports.updateConsentManagerVersionToLatest=c.c,exports.updateDataCategories=n.Nt,exports.updateDataFlows=n.At,exports.updateIntlMessages=n.Tt,exports.updateOrCreateCookies=n.Ft,exports.updatePolicies=n.Ct,exports.updateProcessingPurposes=n.yt,exports.updatePrompts=n.gt,exports.updateRepositories=n.Ut,exports.updateSoftwareDevelopmentKits=n.Kt,exports.updateVendors=n.pt,exports.uploadConsents=l.r,exports.uploadCookiesFromCsv=c.o,exports.uploadDataFlowsFromCsv=c.s,exports.uploadPrivacyRequestsFromCsv=n.H,exports.uploadSiloDiscoveryResults=n.ut,exports.validateTranscendAuth=d.r,Object.defineProperty(exports,`version`,{enumerable:!0,get:function(){return t.h}}),exports.writeCsv=n.l,exports.writeCsvSync=n.u,exports.writeLargeCsv=n.d,exports.writeTranscendYaml=o.a;