@transcend-io/cli 7.0.2 → 7.0.3

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 (214) hide show
  1. package/README.md +1816 -158
  2. package/dist/bin/bash-complete.cjs +1 -1
  3. package/dist/bin/cli.cjs +1 -1
  4. package/dist/bin/deprecated-command.cjs +2 -2
  5. package/dist/{chunk-XHS3FR6L.cjs → chunk-2DLJ3BDD.cjs} +2 -2
  6. package/dist/{chunk-XHS3FR6L.cjs.map → chunk-2DLJ3BDD.cjs.map} +1 -1
  7. package/dist/chunk-3L4DLV6F.cjs +3 -0
  8. package/dist/chunk-3L4DLV6F.cjs.map +1 -0
  9. package/dist/chunk-6VV64JQD.cjs +2 -0
  10. package/dist/chunk-6VV64JQD.cjs.map +1 -0
  11. package/dist/chunk-A57ZB6XS.cjs +113 -0
  12. package/dist/chunk-A57ZB6XS.cjs.map +1 -0
  13. package/dist/chunk-DFOLIGJP.cjs +2 -0
  14. package/dist/chunk-DFOLIGJP.cjs.map +1 -0
  15. package/dist/chunk-DM7WURT2.cjs +2 -0
  16. package/dist/chunk-DM7WURT2.cjs.map +1 -0
  17. package/dist/{chunk-W5T3VHKD.cjs → chunk-GF4AD4KW.cjs} +2 -2
  18. package/dist/{chunk-W5T3VHKD.cjs.map → chunk-GF4AD4KW.cjs.map} +1 -1
  19. package/dist/chunk-JQ7LX2L3.cjs +12 -0
  20. package/dist/chunk-JQ7LX2L3.cjs.map +1 -0
  21. package/dist/{chunk-QXKWSBYR.cjs → chunk-LD6RM4JJ.cjs} +2 -2
  22. package/dist/{chunk-QXKWSBYR.cjs.map → chunk-LD6RM4JJ.cjs.map} +1 -1
  23. package/dist/{chunk-WAYG2MDL.cjs → chunk-MYCE3NIE.cjs} +2 -2
  24. package/dist/{chunk-WAYG2MDL.cjs.map → chunk-MYCE3NIE.cjs.map} +1 -1
  25. package/dist/{chunk-U6G3J6VJ.cjs → chunk-S27CXPPN.cjs} +2 -2
  26. package/dist/{chunk-U6G3J6VJ.cjs.map → chunk-S27CXPPN.cjs.map} +1 -1
  27. package/dist/chunk-T66BMKXU.cjs +2830 -0
  28. package/dist/chunk-T66BMKXU.cjs.map +1 -0
  29. package/dist/chunk-UM5F6R4I.cjs +15 -0
  30. package/dist/chunk-UM5F6R4I.cjs.map +1 -0
  31. package/dist/chunk-VBCQ7F34.cjs +75 -0
  32. package/dist/chunk-VBCQ7F34.cjs.map +1 -0
  33. package/dist/chunk-WKCTKYN4.cjs +2 -0
  34. package/dist/chunk-WKCTKYN4.cjs.map +1 -0
  35. package/dist/chunk-WLVJQVRU.cjs +2 -0
  36. package/dist/{chunk-VFP6EKTE.cjs.map → chunk-WLVJQVRU.cjs.map} +1 -1
  37. package/dist/impl-24MFRX5R.cjs +2 -0
  38. package/dist/impl-24MFRX5R.cjs.map +1 -0
  39. package/dist/impl-2FABITOO.cjs +2 -0
  40. package/dist/impl-2FABITOO.cjs.map +1 -0
  41. package/dist/impl-2WTVQZVH.cjs +4 -0
  42. package/dist/impl-2WTVQZVH.cjs.map +1 -0
  43. package/dist/impl-45GI5GBX.cjs +2 -0
  44. package/dist/impl-45GI5GBX.cjs.map +1 -0
  45. package/dist/impl-4CKKKZSW.cjs +2 -0
  46. package/dist/impl-4CKKKZSW.cjs.map +1 -0
  47. package/dist/impl-4GWAH2JR.cjs +2 -0
  48. package/dist/impl-4GWAH2JR.cjs.map +1 -0
  49. package/dist/impl-4JIOV3X6.cjs +2 -0
  50. package/dist/impl-4JIOV3X6.cjs.map +1 -0
  51. package/dist/impl-52VR3GDJ.cjs +2 -0
  52. package/dist/impl-52VR3GDJ.cjs.map +1 -0
  53. package/dist/impl-5R7QQLXX.cjs +2 -0
  54. package/dist/impl-5R7QQLXX.cjs.map +1 -0
  55. package/dist/impl-6WSGLEVR.cjs +2 -0
  56. package/dist/impl-6WSGLEVR.cjs.map +1 -0
  57. package/dist/impl-7TE6HP4S.cjs +2 -0
  58. package/dist/impl-7TE6HP4S.cjs.map +1 -0
  59. package/dist/impl-BJNS6ODX.cjs +2 -0
  60. package/dist/impl-BJNS6ODX.cjs.map +1 -0
  61. package/dist/impl-CEZKH3XW.cjs +2 -0
  62. package/dist/impl-CEZKH3XW.cjs.map +1 -0
  63. package/dist/impl-CTN3RH3H.cjs +2 -0
  64. package/dist/impl-CTN3RH3H.cjs.map +1 -0
  65. package/dist/impl-DNQUVLSW.cjs +6 -0
  66. package/dist/impl-DNQUVLSW.cjs.map +1 -0
  67. package/dist/impl-EHZWLIEN.cjs +2 -0
  68. package/dist/impl-EHZWLIEN.cjs.map +1 -0
  69. package/dist/impl-EJWCZU32.cjs +2 -0
  70. package/dist/impl-EJWCZU32.cjs.map +1 -0
  71. package/dist/impl-HBRGW4FK.cjs +2 -0
  72. package/dist/impl-HBRGW4FK.cjs.map +1 -0
  73. package/dist/impl-I7IZGNDD.cjs +2 -0
  74. package/dist/impl-I7IZGNDD.cjs.map +1 -0
  75. package/dist/impl-IVH7T3MG.cjs +2 -0
  76. package/dist/impl-IVH7T3MG.cjs.map +1 -0
  77. package/dist/impl-KCK7ESJ2.cjs +2 -0
  78. package/dist/impl-KCK7ESJ2.cjs.map +1 -0
  79. package/dist/impl-KHC6VQQ3.cjs +12 -0
  80. package/dist/impl-KHC6VQQ3.cjs.map +1 -0
  81. package/dist/impl-LAY6PG5S.cjs +2 -0
  82. package/dist/impl-LAY6PG5S.cjs.map +1 -0
  83. package/dist/impl-LEPYMCRL.cjs +3 -0
  84. package/dist/impl-LEPYMCRL.cjs.map +1 -0
  85. package/dist/impl-LGMUBZ3P.cjs +9 -0
  86. package/dist/impl-LGMUBZ3P.cjs.map +1 -0
  87. package/dist/impl-O72S3ARJ.cjs +2 -0
  88. package/dist/impl-O72S3ARJ.cjs.map +1 -0
  89. package/dist/impl-OIRM2C3D.cjs +7 -0
  90. package/dist/{impl-JH4KIP5U.cjs.map → impl-OIRM2C3D.cjs.map} +1 -1
  91. package/dist/impl-OOVHRMYF.cjs +2 -0
  92. package/dist/impl-OOVHRMYF.cjs.map +1 -0
  93. package/dist/impl-OUBX3UFM.cjs +2 -0
  94. package/dist/impl-OUBX3UFM.cjs.map +1 -0
  95. package/dist/impl-P64XABL2.cjs +2 -0
  96. package/dist/impl-P64XABL2.cjs.map +1 -0
  97. package/dist/impl-PBCOYUN3.cjs +2 -0
  98. package/dist/impl-PBCOYUN3.cjs.map +1 -0
  99. package/dist/impl-RBCLAU3L.cjs +6 -0
  100. package/dist/impl-RBCLAU3L.cjs.map +1 -0
  101. package/dist/impl-S4J44FBI.cjs +2 -0
  102. package/dist/impl-S4J44FBI.cjs.map +1 -0
  103. package/dist/impl-TIOK6UX4.cjs +2 -0
  104. package/dist/impl-TIOK6UX4.cjs.map +1 -0
  105. package/dist/impl-TSBZWYSU.cjs +2 -0
  106. package/dist/impl-TSBZWYSU.cjs.map +1 -0
  107. package/dist/impl-U5LM6TOR.cjs +2 -0
  108. package/dist/impl-U5LM6TOR.cjs.map +1 -0
  109. package/dist/impl-U7KRGFYL.cjs +2 -0
  110. package/dist/impl-U7KRGFYL.cjs.map +1 -0
  111. package/dist/impl-XSP2L4A3.cjs +2 -0
  112. package/dist/impl-XSP2L4A3.cjs.map +1 -0
  113. package/dist/impl-YST7YAME.cjs +2 -0
  114. package/dist/impl-YST7YAME.cjs.map +1 -0
  115. package/dist/index.cjs +3 -3
  116. package/dist/index.cjs.map +1 -1
  117. package/dist/index.d.cts +11 -3
  118. package/package.json +2 -1
  119. package/dist/chunk-25UGE4YY.cjs +0 -12
  120. package/dist/chunk-25UGE4YY.cjs.map +0 -1
  121. package/dist/chunk-EG4L6YAJ.cjs +0 -2
  122. package/dist/chunk-EG4L6YAJ.cjs.map +0 -1
  123. package/dist/chunk-FPTEK7BG.cjs +0 -2
  124. package/dist/chunk-FPTEK7BG.cjs.map +0 -1
  125. package/dist/chunk-HAOVN3XO.cjs +0 -75
  126. package/dist/chunk-HAOVN3XO.cjs.map +0 -1
  127. package/dist/chunk-KWG56BUX.cjs +0 -2
  128. package/dist/chunk-KWG56BUX.cjs.map +0 -1
  129. package/dist/chunk-NOF6QHE4.cjs +0 -2843
  130. package/dist/chunk-NOF6QHE4.cjs.map +0 -1
  131. package/dist/chunk-QY37PK62.cjs +0 -94
  132. package/dist/chunk-QY37PK62.cjs.map +0 -1
  133. package/dist/chunk-SHV6R64J.cjs +0 -2
  134. package/dist/chunk-SHV6R64J.cjs.map +0 -1
  135. package/dist/chunk-VFP6EKTE.cjs +0 -2
  136. package/dist/chunk-XBHJO2OX.cjs +0 -3
  137. package/dist/chunk-XBHJO2OX.cjs.map +0 -1
  138. package/dist/impl-2DZFILID.cjs +0 -2
  139. package/dist/impl-2DZFILID.cjs.map +0 -1
  140. package/dist/impl-3CTVL4TA.cjs +0 -2
  141. package/dist/impl-3CTVL4TA.cjs.map +0 -1
  142. package/dist/impl-3IN6AV44.cjs +0 -9
  143. package/dist/impl-3IN6AV44.cjs.map +0 -1
  144. package/dist/impl-3PSE2WEI.cjs +0 -2
  145. package/dist/impl-3PSE2WEI.cjs.map +0 -1
  146. package/dist/impl-4XMTTFXK.cjs +0 -2
  147. package/dist/impl-4XMTTFXK.cjs.map +0 -1
  148. package/dist/impl-5L4G73JT.cjs +0 -2
  149. package/dist/impl-5L4G73JT.cjs.map +0 -1
  150. package/dist/impl-6NO74W36.cjs +0 -2
  151. package/dist/impl-6NO74W36.cjs.map +0 -1
  152. package/dist/impl-6TJRZGRQ.cjs +0 -2
  153. package/dist/impl-6TJRZGRQ.cjs.map +0 -1
  154. package/dist/impl-7FHT7P3V.cjs +0 -2
  155. package/dist/impl-7FHT7P3V.cjs.map +0 -1
  156. package/dist/impl-7KOXTJKC.cjs +0 -2
  157. package/dist/impl-7KOXTJKC.cjs.map +0 -1
  158. package/dist/impl-BESS7RG2.cjs +0 -2
  159. package/dist/impl-BESS7RG2.cjs.map +0 -1
  160. package/dist/impl-COCUOYKI.cjs +0 -2
  161. package/dist/impl-COCUOYKI.cjs.map +0 -1
  162. package/dist/impl-ELOMI7JW.cjs +0 -6
  163. package/dist/impl-ELOMI7JW.cjs.map +0 -1
  164. package/dist/impl-EUJEQGOT.cjs +0 -2
  165. package/dist/impl-EUJEQGOT.cjs.map +0 -1
  166. package/dist/impl-F3OOKCK6.cjs +0 -2
  167. package/dist/impl-F3OOKCK6.cjs.map +0 -1
  168. package/dist/impl-GH42XS6I.cjs +0 -2
  169. package/dist/impl-GH42XS6I.cjs.map +0 -1
  170. package/dist/impl-GSD2LS72.cjs +0 -2
  171. package/dist/impl-GSD2LS72.cjs.map +0 -1
  172. package/dist/impl-IIP3SXEB.cjs +0 -6
  173. package/dist/impl-IIP3SXEB.cjs.map +0 -1
  174. package/dist/impl-JD4LU2UP.cjs +0 -4
  175. package/dist/impl-JD4LU2UP.cjs.map +0 -1
  176. package/dist/impl-JH4KIP5U.cjs +0 -7
  177. package/dist/impl-JVXU24DF.cjs +0 -2
  178. package/dist/impl-JVXU24DF.cjs.map +0 -1
  179. package/dist/impl-KO4JL735.cjs +0 -2
  180. package/dist/impl-KO4JL735.cjs.map +0 -1
  181. package/dist/impl-L464FWQF.cjs +0 -2
  182. package/dist/impl-L464FWQF.cjs.map +0 -1
  183. package/dist/impl-LH2NCUFY.cjs +0 -2
  184. package/dist/impl-LH2NCUFY.cjs.map +0 -1
  185. package/dist/impl-LTL4WYPE.cjs +0 -2
  186. package/dist/impl-LTL4WYPE.cjs.map +0 -1
  187. package/dist/impl-MHML3KTM.cjs +0 -2
  188. package/dist/impl-MHML3KTM.cjs.map +0 -1
  189. package/dist/impl-NKUI2BXG.cjs +0 -2
  190. package/dist/impl-NKUI2BXG.cjs.map +0 -1
  191. package/dist/impl-NXTGH73U.cjs +0 -2
  192. package/dist/impl-NXTGH73U.cjs.map +0 -1
  193. package/dist/impl-OAPUUSOI.cjs +0 -2
  194. package/dist/impl-OAPUUSOI.cjs.map +0 -1
  195. package/dist/impl-OCJDYVIR.cjs +0 -2
  196. package/dist/impl-OCJDYVIR.cjs.map +0 -1
  197. package/dist/impl-PDWZ4O5W.cjs +0 -2
  198. package/dist/impl-PDWZ4O5W.cjs.map +0 -1
  199. package/dist/impl-Q2MH6BDT.cjs +0 -2
  200. package/dist/impl-Q2MH6BDT.cjs.map +0 -1
  201. package/dist/impl-QV42ZSX6.cjs +0 -6
  202. package/dist/impl-QV42ZSX6.cjs.map +0 -1
  203. package/dist/impl-TEQOCEBB.cjs +0 -2
  204. package/dist/impl-TEQOCEBB.cjs.map +0 -1
  205. package/dist/impl-TXQ4XVDC.cjs +0 -12
  206. package/dist/impl-TXQ4XVDC.cjs.map +0 -1
  207. package/dist/impl-U744VBLW.cjs +0 -2
  208. package/dist/impl-U744VBLW.cjs.map +0 -1
  209. package/dist/impl-VEGPS7VZ.cjs +0 -2
  210. package/dist/impl-VEGPS7VZ.cjs.map +0 -1
  211. package/dist/impl-XBEBGY37.cjs +0 -2
  212. package/dist/impl-XBEBGY37.cjs.map +0 -1
  213. package/dist/impl-Y3YSZDVF.cjs +0 -2
  214. package/dist/impl-Y3YSZDVF.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-TSBZWYSU.cjs","../src/commands/request/system/mark-request-data-silos-completed/impl.ts"],"names":["RequestIdRow","markRequestDataSilosCompleted","auth","dataSiloId","file","transcendUrl","doneInputValidation","logger","colors","activeResults","readCsv","markRequestDataSiloIdsCompleted","request"],"mappings":"AAAA,mfAAwC,gCAA6B,wDAAyC,wDAAyC,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCCjS,qEACA,IAObA,CAAAA,CAAiB,CAAA,CAAA,IAAA,CAAK,CAC1B,YAAA,CAAgB,CAAA,CAAA,MAClB,CAAC,CAAA,CASD,MAAA,SAAsBC,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErCC,mBAAAA,CAAO,IAAA,CAAKC,gBAAAA,CAAO,OAAA,CAAQ,CAAA,SAAA,EAAYJ,CAAI,CAAA,WAAA,CAAa,CAAC,CAAA,CACzD,IAAMK,CAAAA,CAAgBC,iCAAAA,CAAQN,CAAMJ,CAAY,CAAA,CAEhD,MAAMW,iCAAAA,CACJ,UAAA,CAAYF,CAAAA,CAAc,GAAA,CAAKG,CAAAA,EAAYA,CAAAA,CAAQ,YAAY,CAAC,CAAA,CAChE,YAAA,CAAAP,CAAAA,CACA,IAAA,CAAAH,CAAAA,CACA,UAAA,CAAAC,CACF,CAAC,CACH,CAAA,0CAAA","file":"/home/runner/work/cli/cli/dist/impl-TSBZWYSU.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../../context';\nimport colors from 'colors';\nimport * as t from 'io-ts';\n\nimport { logger } from '../../../../logger';\nimport { markRequestDataSiloIdsCompleted } from '../../../../lib/cron';\nimport { readCsv } from '../../../../lib/requests';\nimport { doneInputValidation } from '../../../../lib/cli/done-input-validation';\n\nconst RequestIdRow = t.type({\n 'Request Id': t.string,\n});\n\nexport interface MarkRequestDataSilosCompletedCommandFlags {\n auth: string;\n dataSiloId: string;\n file: string;\n transcendUrl: string;\n}\n\nexport async function markRequestDataSilosCompleted(\n this: LocalContext,\n {\n auth,\n dataSiloId,\n file,\n transcendUrl,\n }: MarkRequestDataSilosCompletedCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n logger.info(colors.magenta(`Reading \"${file}\" from disk`));\n const activeResults = readCsv(file, RequestIdRow);\n\n await markRequestDataSiloIdsCompleted({\n requestIds: activeResults.map((request) => request['Request Id']),\n transcendUrl,\n auth,\n dataSiloId,\n });\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkL7NHDBBNcjs = require('./chunk-L7NHDBBN.cjs');var _chunkMYCE3NIEcjs = require('./chunk-MYCE3NIE.cjs');var _chunkJQ7LX2L3cjs = require('./chunk-JQ7LX2L3.cjs');require('./chunk-LD6RM4JJ.cjs');require('./chunk-DFOLIGJP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZD2HOHJI.cjs');require('./chunk-SAEKBZGF.cjs');require('./chunk-T66BMKXU.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DM7WURT2.cjs');require('./chunk-UM5F6R4I.cjs');require('./chunk-BY7W4UQF.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');function M({consentManagerYmlFolder:s,output:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, s)||!_fs.lstatSync.call(void 0, s).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${s}"`)),this.process.exit(1));let f=_chunkMYCE3NIEcjs.c.call(void 0, s).map(i=>{let{"consent-manager":u}=_chunkL7NHDBBNcjs.d.call(void 0, _path.join.call(void 0, s,i));return{name:i,input:u}}),e=_chunkJQ7LX2L3cjs.h.call(void 0, f);_chunkL7NHDBBNcjs.e.call(void 0, n,{"business-entities":e}),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}exports.consentManagersToBusinessEntities = M;
2
+ //# sourceMappingURL=impl-U5LM6TOR.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-U5LM6TOR.cjs","../src/commands/inventory/consent-managers-to-business-entities/impl.ts"],"names":["consentManagersToBusinessEntities","consentManagerYmlFolder","output","doneInputValidation","existsSync","lstatSync","logger","colors","inputs","listFiles","directory","consentManager","readTranscendYaml","join","businessEntities","writeTranscendYaml"],"mappings":"AAAA,iOAA+C,wDAAyC,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,4BCOta,gFAEF,wBAEmB,SAQtBA,CAAAA,CAEd,CACE,uBAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CACF,CAAA,CACM,CACNC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAAA,CAInC,CAACC,4BAAAA,CAAkC,CAAA,EACnC,CAACC,2BAAAA,CAAiC,CAAA,CAAE,WAAA,CAAY,CAAA,CAAA,EAAA,CAEhDC,mBAAAA,CAAO,KAAA,CACLC,gBAAAA,CAAO,GAAA,CAAI,CAAA,wBAAA,EAA2BN,CAAuB,CAAA,CAAA,CAAG,CAClE,CAAA,CACA,IAAA,CAAK,OAAA,CAAQ,IAAA,CAAK,CAAC,CAAA,CAAA,CAIrB,IAAMO,CAAAA,CAASC,iCAAAA,CAAiC,CAAA,CAAE,GAAA,CAAKC,CAAAA,EAAc,CACnE,GAAM,CAAE,iBAAA,CAAmBC,CAAe,CAAA,CAAIC,iCAAAA,wBAC5CC,CAAKZ,CAAyBS,CAAS,CACzC,CAAA,CACA,MAAO,CAAE,IAAA,CAAMA,CAAAA,CAAW,KAAA,CAAOC,CAAe,CAClD,CAAC,CAAA,CAGKG,CAAAA,CAAmBd,iCAAAA,CAA8C,CAAA,CAGvEe,iCAAAA,CAAmBb,CAAQ,CACzB,mBAAA,CAAqBY,CACvB,CAAC,CAAA,CAEDR,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,mBAAA,EAAsBO,CAAAA,CAAiB,MAAM,CAAA,4BAAA,EAA+BZ,CAAM,CAAA,CAAA,CACpF,CACF,CACF,CAAA,8CAAA","file":"/home/runner/work/cli/cli/dist/impl-U5LM6TOR.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { listFiles } from '../../../lib/api-keys';\nimport { consentManagersToBusinessEntities as consentManagersToBusinessEntitiesHelper } from '../../../lib/consent-manager';\nimport {\n readTranscendYaml,\n writeTranscendYaml,\n} from '../../../lib/readTranscendYaml';\nimport { join } from 'path';\n\nimport colors from 'colors';\nimport { logger } from '../../../logger';\nimport { existsSync, lstatSync } from 'fs';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface ConsentManagersToBusinessEntitiesCommandFlags {\n consentManagerYmlFolder: string;\n output: string;\n}\n\nexport function consentManagersToBusinessEntities(\n this: LocalContext,\n {\n consentManagerYmlFolder,\n output,\n }: ConsentManagersToBusinessEntitiesCommandFlags,\n): void {\n doneInputValidation(this.process.exit);\n\n // Ensure folder is passed\n if (\n !existsSync(consentManagerYmlFolder) ||\n !lstatSync(consentManagerYmlFolder).isDirectory()\n ) {\n logger.error(\n colors.red(`Folder does not exist: \"${consentManagerYmlFolder}\"`),\n );\n this.process.exit(1);\n }\n\n // Read in each consent manager configuration\n const inputs = listFiles(consentManagerYmlFolder).map((directory) => {\n const { 'consent-manager': consentManager } = readTranscendYaml(\n join(consentManagerYmlFolder, directory),\n );\n return { name: directory, input: consentManager };\n });\n\n // Convert to business entities\n const businessEntities = consentManagersToBusinessEntitiesHelper(inputs);\n\n // write to disk\n writeTranscendYaml(output, {\n 'business-entities': businessEntities,\n });\n\n logger.info(\n colors.green(\n `Successfully wrote ${businessEntities.length} business entities to file \"${output}\"`,\n ),\n );\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJQ7LX2L3cjs = require('./chunk-JQ7LX2L3.cjs');require('./chunk-LD6RM4JJ.cjs');require('./chunk-DFOLIGJP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZD2HOHJI.cjs');require('./chunk-SAEKBZGF.cjs');require('./chunk-T66BMKXU.cjs');require('./chunk-ZUNVPK23.cjs');require('./chunk-DM7WURT2.cjs');require('./chunk-UM5F6R4I.cjs');require('./chunk-BY7W4UQF.cjs');async function m({auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),await _chunkJQ7LX2L3cjs.b.call(void 0, {auth:a,trackerStatus:r,file:s,classifyService:e,transcendUrl:n})}exports.uploadDataFlowsFromCsv = m;
2
+ //# sourceMappingURL=impl-U7KRGFYL.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-U7KRGFYL.cjs","../src/commands/consent/upload-data-flows-from-csv/impl.ts"],"names":["uploadDataFlowsFromCsv","auth","trackerStatus","file","classifyService","transcendUrl","doneInputValidation"],"mappings":"AAAA,iIAAwC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,gCAA6B,MCatV,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAErC,MAAMN,iCAAAA,CACJ,IAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAC,CACH,CAAA,mCAAA","file":"/home/runner/work/cli/cli/dist/impl-U7KRGFYL.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { uploadDataFlowsFromCsv as uploadDataFlowsFromCsvHelper } from '../../../lib/consent-manager';\nimport { ConsentTrackerStatus } from '@transcend-io/privacy-types';\nimport { doneInputValidation } from '../../../lib/cli/done-input-validation';\n\nexport interface UploadDataFlowsFromCsvCommandFlags {\n auth: string;\n trackerStatus: ConsentTrackerStatus;\n file: string;\n classifyService: boolean;\n transcendUrl: string;\n}\n\nexport async function uploadDataFlowsFromCsv(\n this: LocalContext,\n {\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n }: UploadDataFlowsFromCsvCommandFlags,\n): Promise<void> {\n doneInputValidation(this.process.exit);\n\n await uploadDataFlowsFromCsvHelper({\n auth,\n trackerStatus,\n file,\n classifyService,\n transcendUrl,\n });\n}\n"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMYCE3NIEcjs = require('./chunk-MYCE3NIE.cjs');var _chunkJQ7LX2L3cjs = require('./chunk-JQ7LX2L3.cjs');require('./chunk-LD6RM4JJ.cjs');require('./chunk-DFOLIGJP.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZD2HOHJI.cjs');require('./chunk-SAEKBZGF.cjs');require('./chunk-T66BMKXU.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DM7WURT2.cjs');require('./chunk-UM5F6R4I.cjs');require('./chunk-BY7W4UQF.cjs');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function L({auth:d,xdiLocation:c,file:o,removeIpAddresses:l,domainBlockList:i,xdiAllowedCommands:a,transcendUrl:m}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit);let p=await _chunkMYCE3NIEcjs.b.call(void 0, d),{syncGroups:f,html:u}=await _chunkJQ7LX2L3cjs.g.call(void 0, p,{xdiLocation:c,transcendUrl:m,removeIpAddresses:l,domainBlockList:i.length>0?i:void 0,xdiAllowedCommands:a});_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(f,null,2)}`)),_fs.writeFileSync.call(void 0, o,u),_chunkZUNVPK23cjs.a.info(_colors2.default.green(`Wrote configuration to file "${o}"!`))}exports.buildXdiSyncEndpoint = L;
2
+ //# sourceMappingURL=impl-XSP2L4A3.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-XSP2L4A3.cjs","../src/commands/consent/build-xdi-sync-endpoint/impl.ts"],"names":["buildXdiSyncEndpoint","auth","xdiLocation","file","removeIpAddresses","domainBlockList","xdiAllowedCommands","transcendUrl","doneInputValidation","apiKeyOrList","validateTranscendAuth","syncGroups","html","logger","colors"],"mappings":"AAAA,iOAAwC,wDAAyC,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,wDAAyC,gCAA6B,gCAA6B,gCAA6B,gFCExX,wBACW,MAe9B,SAAsBA,CAAAA,CAEpB,CACE,IAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,iBAAA,CAAAC,CAAAA,CACA,eAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CACF,CAAA,CACe,CACfC,iCAAAA,IAAoB,CAAK,OAAA,CAAQ,IAAI,CAAA,CAGrC,IAAMC,CAAAA,CAAe,MAAMC,iCAAAA,CAA0B,CAAA,CAG/C,CAAE,UAAA,CAAAC,CAAAA,CAAY,IAAA,CAAAC,CAAK,CAAA,CAAI,MAAMZ,iCAAAA,CAA2BS,CAAc,CAC1E,WAAA,CAAAP,CAAAA,CACA,YAAA,CAAAK,CAAAA,CACA,iBAAA,CAAAH,CAAAA,CACA,eAAA,CAAiBC,CAAAA,CAAgB,MAAA,CAAS,CAAA,CAAIA,CAAAA,CAAkB,KAAA,CAAA,CAChE,kBAAA,CAAAC,CACF,CAAC,CAAA,CAGDO,mBAAAA,CAAO,IAAA,CACLC,gBAAAA,CAAO,KAAA,CACL,CAAA,wDAAA,EAA2D,IAAA,CAAK,SAAA,CAC9DH,CAAAA,CACA,IAAA,CACA,CACF,CAAC,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-XSP2L4A3.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport { logger } from '../../../logger';\nimport colors from 'colors';\nimport { writeFileSync } from 'fs';\nimport { validateTranscendAuth } from '../../../lib/api-keys';\nimport { buildXdiSyncEndpoint as buildXdiSyncEndpointHelper } from '../../../lib/consent-manager';\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"]}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkWLVJQVRUcjs = require('./chunk-WLVJQVRU.cjs');var _chunkL7NHDBBNcjs = require('./chunk-L7NHDBBN.cjs');var _chunkMYCE3NIEcjs = require('./chunk-MYCE3NIE.cjs');var _chunkWKCTKYN4cjs = require('./chunk-WKCTKYN4.cjs');require('./chunk-ZD2HOHJI.cjs');require('./chunk-SAEKBZGF.cjs');var _chunkT66BMKXUcjs = require('./chunk-T66BMKXU.cjs');var _chunkZUNVPK23cjs = require('./chunk-ZUNVPK23.cjs');require('./chunk-DM7WURT2.cjs');var _chunkUM5F6R4Icjs = require('./chunk-UM5F6R4I.cjs');require('./chunk-BY7W4UQF.cjs');var _path = require('path');var _colors = require('colors'); var _colors2 = _interopRequireDefault(_colors);var _fs = require('fs');async function J({auth:F,dataFlowsYmlFolder:r,output:x,ignoreYmls:C=[],transcendUrl:N}){_chunkWKCTKYN4cjs.a.call(void 0, this.process.exit),(!_fs.existsSync.call(void 0, r)||!_fs.lstatSync.call(void 0, r).isDirectory())&&(_chunkZUNVPK23cjs.a.error(_colors2.default.red(`Folder does not exist: "${r}"`)),this.process.exit(1));let k=C.map(t=>t.split(".")[0]),l=_chunkMYCE3NIEcjs.c.call(void 0, r).map(t=>{let{"data-flows":o=[]}=_chunkL7NHDBBNcjs.d.call(void 0, _path.join.call(void 0, r,t)),{adTechDataSilos:m,siteTechDataSilos:i}=_chunkWLVJQVRUcjs.a.call(void 0, o,{serviceToSupportedIntegration:d,serviceToTitle:u});return{adTechDataSilos:m,siteTechDataSilos:i,organizationName:t.split(".")[0]}}),a={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o,organizationName:m})=>{[...t,...o].forEach(e=>{let n=e["outer-type"]||e.integrationName;a[n]||(a[n]=[]),a[n].push(m),a[n]=[...new Set(a[n])]})});let p=[...new Set(l.map(({adTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],f=_chunkUM5F6R4Icjs.c.call(void 0, [...new Set(l.map(({siteTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],p),s={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o})=>{[...t,...o].forEach(i=>{let e=i["outer-type"]||i.integrationName,n=_optionalChain([i, 'access', _ => _.attributes, 'optionalAccess', _2 => _2.find, 'call', _3 => _3(E=>E.key==="Found On Domain")]);s[e]||(s[e]=[]),s[e].push(..._optionalChain([n, 'optionalAccess', _4 => _4.values])||[]),s[e]=[...new Set(s[e])]})});let A=_chunkT66BMKXUcjs.pe.call(void 0, N,F),{serviceToTitle:u,serviceToSupportedIntegration:d}=await _chunkT66BMKXUcjs.ne.call(void 0, A),h=[...p,...f].map(t=>({title:u[t],...d[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Business Units",values:_chunkUM5F6R4Icjs.c.call(void 0, a[t]||[],k)},{key:"Found On Domain",values:s[t]||[]}]}));_chunkZUNVPK23cjs.a.log(`Total Services: ${h.length}`),_chunkZUNVPK23cjs.a.log(`Ad Tech Services: ${p.length}`),_chunkZUNVPK23cjs.a.log(`Site Tech Services: ${f.length}`),_chunkL7NHDBBNcjs.e.call(void 0, x,{"data-silos":h})}exports.deriveDataSilosFromDataFlowsCrossInstance = J;
2
+ //# sourceMappingURL=impl-YST7YAME.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/impl-YST7YAME.cjs","../src/commands/inventory/derive-data-silos-from-data-flows-cross-instance/impl.ts"],"names":["deriveDataSilosFromDataFlowsCrossInstance","auth","dataFlowsYmlFolder","output","ignoreYmls","transcendUrl","doneInputValidation","existsSync","lstatSync","logger","colors","instancesToIgnore","x","dataSiloInputs","listFiles","directory","dataFlows","readTranscendYaml","join","adTechDataSilos","siteTechDataSilos","dataFlowsToDataSilos","serviceToSupportedIntegration","serviceToTitle","serviceToInstance","organizationName","dataSilo","service","adTechIntegrations","silo","siteTechIntegrations","dif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AC7B,GAAIL,CAAAA,CAA8BK,CAAO,CAAA,CACrC,CAAE,eAAA,CAAiBA,CAAQ,CAAA,CAC3B,CAAE,eAAA,CAAiB,eAAA,CAAiB,YAAA,CAAcA,CAAQ,CAAA,CAC9D,UAAA,CAAY,CACV,CACE,GAAA,CAAK,WAAA,CACL,MAAA,CAAQ,CAAC,SAAS,CACpB,CAAA,CACA,CACE,GAAA,CAAK,gBAAA,CACL,MAAA,CAAQI,iCAAAA,CACNP,CAAkBG,CAAO,CAAA,EAAK,CAAC,CAAA,CAC/BhB,CACF,CACF,CAAA,CACA,CACE,GAAA,CAAK,iBAAA,CACL,MAAA,CAAQqB,CAAAA,CAAuBL,CAAO,CAAA,EAAK,CAAC,CAC9C,CACF,CACF,CAAA,CACF,CAAA,CAGAlB,mBAAAA,CAAO,GAAA,CAAI,CAAA,gBAAA,EAAmB6B,CAAAA,CAAU,MAAM,CAAA,CAAA","file":"/home/runner/work/cli/cli/dist/impl-YST7YAME.cjs","sourcesContent":[null,"import type { LocalContext } from '../../../context';\nimport {\n fetchAndIndexCatalogs,\n buildTranscendGraphQLClient,\n} from '../../../lib/graphql';\nimport { join } from '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 '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"]}
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunkXBHJO2OXcjs = require('./chunk-XBHJO2OX.cjs');var _chunkHAOVN3XOcjs = require('./chunk-HAOVN3XO.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkU6G3J6VJcjs = require('./chunk-U6G3J6VJ.cjs');var _chunkTD7ADMVOcjs = require('./chunk-TD7ADMVO.cjs');var _chunkL7NHDBBNcjs = require('./chunk-L7NHDBBN.cjs');var _chunkWAYG2MDLcjs = require('./chunk-WAYG2MDL.cjs');var _chunkKWG56BUXcjs = require('./chunk-KWG56BUX.cjs');var _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');var _chunk25UGE4YYcjs = require('./chunk-25UGE4YY.cjs');var _chunkQXKWSBYRcjs = require('./chunk-QXKWSBYR.cjs');var _chunkSHV6R64Jcjs = require('./chunk-SHV6R64J.cjs');var _chunkZD2HOHJIcjs = require('./chunk-ZD2HOHJI.cjs');var _chunkSAEKBZGFcjs = require('./chunk-SAEKBZGF.cjs');var _chunkNOF6QHE4cjs = require('./chunk-NOF6QHE4.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkEG4L6YAJcjs = require('./chunk-EG4L6YAJ.cjs');var _chunkFPTEK7BGcjs = require('./chunk-FPTEK7BG.cjs');var _chunkBY7W4UQFcjs = require('./chunk-BY7W4UQF.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function $(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunkNOF6QHE4cjs.gc.call(void 0, a,_chunkNOF6QHE4cjs.Gb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function hm(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},F= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkEG4L6YAJcjs.e,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunkNOF6QHE4cjs.xe.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkNOF6QHE4cjs.fc.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunkNOF6QHE4cjs.Kc.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),$(this.graphQLClient),_chunkNOF6QHE4cjs.qd.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkNOF6QHE4cjs.bc.call(void 0, p,"name"),this.agentsByAgentId=_chunkNOF6QHE4cjs.bc.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkNOF6QHE4cjs.bc.call(void 0, o.prompts,"title"),c=_chunkNOF6QHE4cjs.bc.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunkNOF6QHE4cjs.qd.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunkNOF6QHE4cjs.Be.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkNOF6QHE4cjs.ac.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkNOF6QHE4cjs._b.call(void 0, t,50),i=[];return await _chunkNOF6QHE4cjs.a.call(void 0, o,async p=>{let m=await _chunkNOF6QHE4cjs.qd.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunkNOF6QHE4cjs.Fd.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunkNOF6QHE4cjs.Ve.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunkNOF6QHE4cjs.Ve.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunkNOF6QHE4cjs.Ve.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function Pm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Am(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function Rm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class;var _chunk3L4DLV6Fcjs = require('./chunk-3L4DLV6F.cjs');var _chunkVBCQ7F34cjs = require('./chunk-VBCQ7F34.cjs');var _chunkIBTP5OXEcjs = require('./chunk-IBTP5OXE.cjs');var _chunkS27CXPPNcjs = require('./chunk-S27CXPPN.cjs');var _chunkTD7ADMVOcjs = require('./chunk-TD7ADMVO.cjs');var _chunkL7NHDBBNcjs = require('./chunk-L7NHDBBN.cjs');var _chunkMYCE3NIEcjs = require('./chunk-MYCE3NIE.cjs');var _chunk6VV64JQDcjs = require('./chunk-6VV64JQD.cjs');var _chunkZVK4HIDFcjs = require('./chunk-ZVK4HIDF.cjs');var _chunkJQ7LX2L3cjs = require('./chunk-JQ7LX2L3.cjs');var _chunkLD6RM4JJcjs = require('./chunk-LD6RM4JJ.cjs');var _chunkDFOLIGJPcjs = require('./chunk-DFOLIGJP.cjs');var _chunkZD2HOHJIcjs = require('./chunk-ZD2HOHJI.cjs');var _chunkSAEKBZGFcjs = require('./chunk-SAEKBZGF.cjs');var _chunkT66BMKXUcjs = require('./chunk-T66BMKXU.cjs');require('./chunk-ZUNVPK23.cjs');var _chunkDM7WURT2cjs = require('./chunk-DM7WURT2.cjs');var _chunkUM5F6R4Icjs = require('./chunk-UM5F6R4I.cjs');var _chunkBY7W4UQFcjs = require('./chunk-BY7W4UQF.cjs');var _typeutils = require('@transcend-io/type-utils');var _handlebarsutils = require('@transcend-io/handlebars-utils');var _privacytypes = require('@transcend-io/privacy-types');var T=20;async function $(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await _chunkT66BMKXUcjs._b.call(void 0, a,_chunkT66BMKXUcjs.Gb,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}function j(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function Pm(a){return a}var H=a=>{try{return JSON.parse(a)}catch (e2){return a}},F= exports.TranscendPromptManager = (_class =class{__init() {this.largeLanguageModels=[]}__init2() {this.agentsByName={}}__init3() {this.agentsByAgentId={}}constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=_chunkDM7WURT2cjs.e,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=_chunkT66BMKXUcjs.pe.call(void 0, t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, r)}async fetchPromptsAndMetadata(){let e=_typeutils.getValues.call(void 0, this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=_chunkUM5F6R4Icjs.j.call(void 0, e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([_chunkT66BMKXUcjs.Cc.call(void 0, this.graphQLClient,{promptIds:r,promptTitles:t}),$(this.graphQLClient),_chunkT66BMKXUcjs.id.call(void 0, this.graphQLClient,{names:s})]);this.agentsByName=_chunkUM5F6R4Icjs.e.call(void 0, p,"name"),this.agentsByAgentId=_chunkUM5F6R4Icjs.e.call(void 0, p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=_chunkUM5F6R4Icjs.e.call(void 0, o.prompts,"title"),c=_chunkUM5F6R4Icjs.e.call(void 0, o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=_handlebarsutils.createHandlebarsWithHelpers.call(void 0, {...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=_typeutils.apply.call(void 0, this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await _chunkT66BMKXUcjs.id.call(void 0, this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await _chunkT66BMKXUcjs.te.call(void 0, this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=_chunkUM5F6R4Icjs.d.call(void 0, e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=_chunkUM5F6R4Icjs.b.call(void 0, t,50),i=[];return await _chunkT66BMKXUcjs.a.call(void 0, o,async p=>{let m=await _chunkT66BMKXUcjs.id.call(void 0, this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return _chunkT66BMKXUcjs.xd.call(void 0, this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==_privacytypes.PromptStatus.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===_privacytypes.PromptStatus.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return _typeutils.decodeCodec.call(void 0, s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(j(t.extractFromTag).exec(r)||[])[1]||r;return _typeutils.decodeCodec.call(void 0, t.outputCodec,H(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==_privacytypes.ChatCompletionRole.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${_privacytypes.ChatCompletionRole.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await _chunkT66BMKXUcjs.Ne.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,error:c.message,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await _chunkT66BMKXUcjs.Ne.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==_privacytypes.ChatCompletionRole.System)throw new Error(`promptRunMessages[0].role is expected to be = ${_privacytypes.ChatCompletionRole.System}`);let i=await _chunkT66BMKXUcjs.Ne.call(void 0, this.graphQLClient,{productArea:_privacytypes.PromptRunProductArea.PromptManager,...t,name:s,status:_privacytypes.QueueStatus.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}}, _class);function Am(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function xm(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);var _child_process = require('child_process');function Mm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){_child_process.execSync.call(void 0, `git fetch origin ${a}`);let o=_child_process.execSync.call(void 0, `git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
2
2
  `)[0],i=_child_process.execSync.call(void 0, "git rev-parse HEAD",{encoding:"utf-8"}).split(`
3
- `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkNOF6QHE4cjs.$b.call(void 0, p.split(`
4
- `).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let Q=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=Q});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunkNOF6QHE4cjs.ub; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunkNOF6QHE4cjs.Ha; exports.ADD_SILO_DISCOVERY_RESULTS = _chunkNOF6QHE4cjs.I; exports.ADMIN_DASH = _chunkEG4L6YAJcjs.b; exports.ADMIN_DASH_DATAPOINTS = _chunkEG4L6YAJcjs.d; exports.ADMIN_DASH_INTEGRATIONS = _chunkEG4L6YAJcjs.c; exports.AGENTS = _chunkNOF6QHE4cjs.Hb; exports.AGENT_FILES = _chunkNOF6QHE4cjs.Kb; exports.AGENT_FUNCTIONS = _chunkNOF6QHE4cjs.Nb; exports.API_KEYS = _chunkNOF6QHE4cjs.F; exports.APPROVE_PRIVACY_REQUEST = _chunkNOF6QHE4cjs.Y; exports.ASSESSMENTS = _chunkNOF6QHE4cjs.ga; exports.ASSESSMENT_SECTION_FIELDS = _chunkNOF6QHE4cjs.fa; exports.ASSESSMENT_TEMPLATES = _chunkNOF6QHE4cjs.ka; exports.ASSUME_ROLE = _chunkNOF6QHE4cjs.Fb; exports.ATTRIBUTES = _chunkNOF6QHE4cjs.La; exports.ATTRIBUTE_KEYS_REQUESTS = _chunkNOF6QHE4cjs.N; exports.ATTRIBUTE_VALUES = _chunkNOF6QHE4cjs.Pa; exports.ActionInput = _chunkZD2HOHJIcjs.E; exports.ActionItemCollectionInput = _chunkZD2HOHJIcjs.P; exports.ActionItemInput = _chunkZD2HOHJIcjs.Q; exports.AgentFileInput = _chunkZD2HOHJIcjs.o; exports.AgentFunctionInput = _chunkZD2HOHJIcjs.n; exports.AgentInput = _chunkZD2HOHJIcjs.m; exports.ApiKeyInput = _chunkZD2HOHJIcjs.c; exports.AssessmentAction = _chunkNOF6QHE4cjs.ce; exports.AssessmentAnswerOptionInput = _chunkZD2HOHJIcjs.W; exports.AssessmentDisplayLogicInput = _chunkZD2HOHJIcjs.T; exports.AssessmentInput = _chunkZD2HOHJIcjs.aa; exports.AssessmentNestedRule = _chunkNOF6QHE4cjs.be; exports.AssessmentNestedRuleInput = _chunkZD2HOHJIcjs.S; exports.AssessmentResourceInput = _chunkZD2HOHJIcjs.$; exports.AssessmentRetentionScheduleInput = _chunkZD2HOHJIcjs.Z; exports.AssessmentRiskLogic = _chunkNOF6QHE4cjs.ee; exports.AssessmentRule = _chunkNOF6QHE4cjs.ae; exports.AssessmentRuleInput = _chunkZD2HOHJIcjs.R; exports.AssessmentSectionInput = _chunkZD2HOHJIcjs.Y; exports.AssessmentSectionQuestionInput = _chunkZD2HOHJIcjs.X; exports.AssessmentTemplateInput = _chunkZD2HOHJIcjs._; exports.AttestedExtraIdentifiers = _chunkSHV6R64Jcjs.w; exports.AttributeInput = _chunkZD2HOHJIcjs.k; exports.AttributePreview = _chunkZD2HOHJIcjs.l; exports.AttributeValueInput = _chunkZD2HOHJIcjs.j; exports.BLANK = _chunkSHV6R64Jcjs.c; exports.BULK_APPLY = _chunkSHV6R64Jcjs.b; exports.BUSINESS_ENTITIES = _chunkNOF6QHE4cjs.rb; exports.BusinessEntityInput = _chunkZD2HOHJIcjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunkNOF6QHE4cjs.Z; exports.CAN_APPLY_IN_BULK = _chunkSHV6R64Jcjs.g; exports.CATALOGS = _chunkNOF6QHE4cjs.t; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunkNOF6QHE4cjs.wa; exports.CODE_PACKAGES = _chunkNOF6QHE4cjs.R; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunkNOF6QHE4cjs.qb; exports.CONSENT_PARTITIONS = _chunkNOF6QHE4cjs.Ua; exports.COOKIES = _chunkNOF6QHE4cjs.Za; exports.CREATE_ACTION_ITEMS = _chunkNOF6QHE4cjs.yb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunkNOF6QHE4cjs.Ja; exports.CREATE_AGENT = _chunkNOF6QHE4cjs.Ib; exports.CREATE_AGENT_FILE = _chunkNOF6QHE4cjs.Lb; exports.CREATE_AGENT_FUNCTION = _chunkNOF6QHE4cjs.Ob; exports.CREATE_API_KEY = _chunkNOF6QHE4cjs.G; exports.CREATE_ATTRIBUTE = _chunkNOF6QHE4cjs.Qa; exports.CREATE_ATTRIBUTE_VALUES = _chunkNOF6QHE4cjs.Ma; exports.CREATE_BUSINESS_ENTITY = _chunkNOF6QHE4cjs.sb; exports.CREATE_CODE_PACKAGE = _chunkNOF6QHE4cjs.T; exports.CREATE_CONSENT_EXPERIENCE = _chunkNOF6QHE4cjs.ob; exports.CREATE_CONSENT_MANAGER = _chunkNOF6QHE4cjs.bb; exports.CREATE_CONSENT_PARTITION = _chunkNOF6QHE4cjs.pb; exports.CREATE_DATA_FLOWS = _chunkNOF6QHE4cjs.Va; exports.CREATE_DATA_SILOS = _chunkNOF6QHE4cjs.o; exports.CREATE_DATA_SUBJECT = _chunkNOF6QHE4cjs.z; exports.CREATE_DATA_SUB_CATEGORY = _chunkNOF6QHE4cjs.Ub; exports.CREATE_ENRICHER = _chunkNOF6QHE4cjs.r; exports.CREATE_IDENTIFIER = _chunkNOF6QHE4cjs.w; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunkNOF6QHE4cjs.Xb; exports.CREATE_PROMPT = _chunkNOF6QHE4cjs.qa; exports.CREATE_PROMPT_GROUP = _chunkNOF6QHE4cjs.ua; exports.CREATE_PROMPT_PARTIAL = _chunkNOF6QHE4cjs.sa; exports.CREATE_REPOSITORY = _chunkNOF6QHE4cjs.E; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunkNOF6QHE4cjs.Q; exports.CREATE_TEAM = _chunkNOF6QHE4cjs.Aa; exports.CREATE_TEMPLATE = _chunkNOF6QHE4cjs.L; exports.CREATE_VENDOR = _chunkNOF6QHE4cjs.Rb; exports.CachedFileState = _chunkSHV6R64Jcjs.h; exports.CachedRequestState = _chunkSHV6R64Jcjs.j; exports.CodePackageInput = _chunkZD2HOHJIcjs.B; exports.CodePackageSdk = _chunkZD2HOHJIcjs.A; exports.ColumnName = _chunkSHV6R64Jcjs.e; exports.ConsentManageExperienceInput = _chunkZD2HOHJIcjs.I; exports.ConsentManagerInput = _chunkZD2HOHJIcjs.K; exports.ConsentManagerMetricBin = _chunkNOF6QHE4cjs.Ac; exports.ConsentManagerServiceMetadata = _chunkZD2HOHJIcjs.ia; exports.ConsentPreferenceResponse = _chunk25UGE4YYcjs.i; exports.ConsentPreferenceTopic = _chunkZD2HOHJIcjs.ca; exports.ConsentPreferenceTopicOptionValue = _chunkZD2HOHJIcjs.ba; exports.ConsentPurpose = _chunkZD2HOHJIcjs.da; exports.CookieCsvInput = _chunkZD2HOHJIcjs.ha; exports.CookieInput = _chunkZD2HOHJIcjs.H; exports.CronIdentifier = _chunkKWG56BUXcjs.a; exports.CronIdentifierPush = _chunkKWG56BUXcjs.c; exports.DATAPOINT_EXPORT = _chunkNOF6QHE4cjs.i; exports.DATA_FLOWS = _chunkNOF6QHE4cjs.Ya; exports.DATA_POINTS = _chunkNOF6QHE4cjs.c; exports.DATA_POINT_COUNT = _chunkNOF6QHE4cjs.d; exports.DATA_SILOS = _chunkNOF6QHE4cjs.k; exports.DATA_SILOS_ENRICHED = _chunkNOF6QHE4cjs.m; exports.DATA_SILO_EXPORT = _chunkNOF6QHE4cjs.l; exports.DATA_SUBJECTS = _chunkNOF6QHE4cjs.y; exports.DATA_SUB_CATEGORIES = _chunkNOF6QHE4cjs.Tb; exports.DEFAULT_TRANSCEND_API = _chunkEG4L6YAJcjs.e; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkEG4L6YAJcjs.f; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunkNOF6QHE4cjs.ie; exports.DELETE_API_KEY = _chunkNOF6QHE4cjs.H; exports.DELETE_ATTRIBUTE_VALUE = _chunkNOF6QHE4cjs.Oa; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunkNOF6QHE4cjs.Ab; exports.DEPLOY_CONSENT_MANAGER = _chunkNOF6QHE4cjs.eb; exports.DETERMINE_LOGIN_METHOD = _chunkNOF6QHE4cjs.Db; exports.DataCategoryGuessInput = _chunkZD2HOHJIcjs.h; exports.DataCategoryInput = _chunkZD2HOHJIcjs.q; exports.DataCategoryPreviewInput = _chunkZD2HOHJIcjs.g; exports.DataCategoryRecommendationInput = _chunkZD2HOHJIcjs.i; exports.DataFlowCsvInput = _chunkZD2HOHJIcjs.ga; exports.DataFlowInput = _chunkZD2HOHJIcjs.G; exports.DataSiloInput = _chunkZD2HOHJIcjs.O; exports.DataSubjectInput = _chunkZD2HOHJIcjs.D; exports.DatapointInput = _chunkZD2HOHJIcjs.w; exports.ENABLED_PLUGINS = _chunkNOF6QHE4cjs.J; exports.ENRICHERS = _chunkNOF6QHE4cjs.p; exports.ENTRY_COUNT = _chunkNOF6QHE4cjs.j; exports.EXPERIENCES = _chunkNOF6QHE4cjs.Ta; exports.EnrichPrivacyRequest = _chunkXBHJO2OXcjs.b; exports.EnricherInput = _chunkZD2HOHJIcjs.e; exports.FETCH_CONSENT_MANAGER = _chunkNOF6QHE4cjs.$a; exports.FETCH_CONSENT_MANAGER_ID = _chunkNOF6QHE4cjs._a; exports.FETCH_CONSENT_MANAGER_THEME = _chunkNOF6QHE4cjs.ab; exports.FETCH_PRIVACY_CENTER_ID = _chunkNOF6QHE4cjs.zb; exports.FieldInput = _chunkZD2HOHJIcjs.v; exports.GLOBAL_ACTION_ITEMS = _chunkNOF6QHE4cjs.wb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunkNOF6QHE4cjs.Ia; exports.IDENTIFIERS = _chunkNOF6QHE4cjs.u; exports.IDENTIFIER_BLOCK_LIST = _chunkSHV6R64Jcjs.d; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunkNOF6QHE4cjs.ha; exports.INITIALIZER = _chunkNOF6QHE4cjs.q; exports.IP_ADDRESS_REGEX = _chunk25UGE4YYcjs.f; exports.IS_REQUIRED = _chunkSHV6R64Jcjs.f; exports.IdentifierInput = _chunkZD2HOHJIcjs.F; exports.ImportOnetrustAssessmentsInput = _chunkZD2HOHJIcjs.pa; exports.IntlMessage = _chunkSHV6R64Jcjs.A; exports.IntlMessageInput = _chunkZD2HOHJIcjs.N; exports.LARGE_LANGUAGE_MODELS = _chunkNOF6QHE4cjs.Gb; exports.LOGIN = _chunkNOF6QHE4cjs.Eb; exports.MESSAGES = _chunkNOF6QHE4cjs.aa; exports.NEW_IDENTIFIER_TYPES = _chunkNOF6QHE4cjs.v; exports.NONE = _chunkSHV6R64Jcjs.a; exports.NOTIFY_ADDITIONAL_TIME = _chunkNOF6QHE4cjs.$; exports.ORGANIZATION = _chunkNOF6QHE4cjs.M; exports.OneTrustFileFormat = _chunkBY7W4UQFcjs.a; exports.OneTrustPullResource = _chunkBY7W4UQFcjs.b; exports.OneTrustPullSource = _chunkBY7W4UQFcjs.c; exports.OpenAIEnabledRoute = _chunkZD2HOHJIcjs.ka; exports.OpenAIEnabledRoutes = _chunkZD2HOHJIcjs.la; exports.OpenAIIntegration = _chunkZD2HOHJIcjs.ma; exports.OpenAIRouteName = _chunkBY7W4UQFcjs.f; exports.POLICIES = _chunkNOF6QHE4cjs.V; exports.PREFERENCE_TOPICS = _chunkNOF6QHE4cjs.ja; exports.PRIVACY_CENTER = _chunkNOF6QHE4cjs.Bb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkNOF6QHE4cjs.Wb; exports.PROMPTS = _chunkNOF6QHE4cjs.la; exports.PROMPTS_WITH_VARIABLES = _chunkNOF6QHE4cjs.oa; exports.PROMPT_GROUPS = _chunkNOF6QHE4cjs.na; exports.PROMPT_PARTIALS = _chunkNOF6QHE4cjs.ma; exports.PROMPT_THREADS = _chunkNOF6QHE4cjs.U; exports.PURPOSES = _chunkNOF6QHE4cjs.ia; exports.ParsedAttributeInput = _chunkSHV6R64Jcjs.o; exports.PartitionInput = _chunkZD2HOHJIcjs.J; exports.PathfinderPolicy = _chunkZD2HOHJIcjs.na; exports.PathfinderPolicyName = _chunkBY7W4UQFcjs.e; exports.PathfinderPolicyNameC = _chunkZD2HOHJIcjs.ja; exports.PathfinderPromptRunMetadata = _chunkZD2HOHJIcjs.oa; exports.PolicyInput = _chunkZD2HOHJIcjs.M; exports.PrivacyCenterInput = _chunkZD2HOHJIcjs.L; exports.PrivacyRequest = _chunkNOF6QHE4cjs.Fe; exports.PrivacyRequestInput = _chunkSHV6R64Jcjs.x; exports.PrivacyRequestResponse = _chunkSHV6R64Jcjs.G; exports.ProcessingPurposeInput = _chunkZD2HOHJIcjs.r; exports.ProcessingPurposePreviewInput = _chunkZD2HOHJIcjs.f; exports.PromptAVendorEmailSettings = _chunkZD2HOHJIcjs.x; exports.PromptGroupInput = _chunkZD2HOHJIcjs.u; exports.PromptInput = _chunkZD2HOHJIcjs.s; exports.PromptPartialInput = _chunkZD2HOHJIcjs.t; exports.PurposeMap = _chunkQXKWSBYRcjs.e; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunkNOF6QHE4cjs.ya; exports.REMOVE_REQUEST_IDENTIFIERS = _chunkNOF6QHE4cjs.Ca; exports.REPORT_PROMPT_RUN = _chunkNOF6QHE4cjs.Ga; exports.REPOSITORIES = _chunkNOF6QHE4cjs.C; exports.REQUESTS = _chunkNOF6QHE4cjs.X; exports.REQUEST_DATA_SILOS = _chunkNOF6QHE4cjs.va; exports.REQUEST_ENRICHERS = _chunkNOF6QHE4cjs.ca; exports.REQUEST_FILES = _chunkNOF6QHE4cjs.Fa; exports.REQUEST_IDENTIFIERS = _chunkNOF6QHE4cjs.Da; exports.RETRY_REQUEST_DATA_SILO = _chunkNOF6QHE4cjs.xa; exports.RETRY_REQUEST_ENRICHER = _chunkNOF6QHE4cjs.da; exports.RepositoryInput = _chunkZD2HOHJIcjs.C; exports.RequestFileMetadata = _chunkSHV6R64Jcjs.B; exports.RequestFileMetadataResponse = _chunkSHV6R64Jcjs.C; exports.RequestIdentifiersResponse = _chunkNOF6QHE4cjs.He; exports.RiskAssignmentInput = _chunkZD2HOHJIcjs.U; exports.RiskLogicInput = _chunkZD2HOHJIcjs.V; exports.SET_RESOURCE_ATTRIBUTES = _chunkNOF6QHE4cjs.Sa; exports.SKIP_REQUEST_ENRICHER = _chunkNOF6QHE4cjs.ea; exports.SOFTWARE_DEVELOPMENT_KITS = _chunkNOF6QHE4cjs.O; exports.SOMBRA_VERSION = _chunkNOF6QHE4cjs.Zb; exports.SUB_DATA_POINTS = _chunkNOF6QHE4cjs.e; exports.SUB_DATA_POINTS_COUNT = _chunkNOF6QHE4cjs.f; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunkNOF6QHE4cjs.g; exports.SYNC_ATTRIBUTE_TYPES = _chunkNOF6QHE4cjs.ad; exports.SoftwareDevelopmentKitInput = _chunkZD2HOHJIcjs.z; exports.StoredApiKey = _chunkZD2HOHJIcjs.fa; exports.SuccessfulRequest = _chunkSHV6R64Jcjs.i; exports.TEAMS = _chunkNOF6QHE4cjs.za; exports.TEMPLATES = _chunkNOF6QHE4cjs.K; exports.TOGGLE_CONSENT_PRECEDENCE = _chunkNOF6QHE4cjs.lb; exports.TOGGLE_DATA_SUBJECT = _chunkNOF6QHE4cjs.B; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunkNOF6QHE4cjs.kb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunkNOF6QHE4cjs.jb; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunkNOF6QHE4cjs.ib; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkEG4L6YAJcjs.h; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkEG4L6YAJcjs.g; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkEG4L6YAJcjs.i; exports.TeamInput = _chunkZD2HOHJIcjs.d; exports.TemplateInput = _chunkZD2HOHJIcjs.a; exports.TranscendInput = _chunkZD2HOHJIcjs.ea; exports.TranscendPromptManager = F; exports.TranscendPullResource = _chunkBY7W4UQFcjs.d; exports.UPDATE_ACTION = _chunkNOF6QHE4cjs.vb; exports.UPDATE_ACTION_ITEMS = _chunkNOF6QHE4cjs.xb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunkNOF6QHE4cjs.Ka; exports.UPDATE_AGENTS = _chunkNOF6QHE4cjs.Jb; exports.UPDATE_AGENT_FILES = _chunkNOF6QHE4cjs.Mb; exports.UPDATE_AGENT_FUNCTIONS = _chunkNOF6QHE4cjs.Pb; exports.UPDATE_ATTRIBUTE = _chunkNOF6QHE4cjs.Ra; exports.UPDATE_ATTRIBUTE_VALUES = _chunkNOF6QHE4cjs.Na; exports.UPDATE_BUSINESS_ENTITIES = _chunkNOF6QHE4cjs.tb; exports.UPDATE_CODE_PACKAGES = _chunkNOF6QHE4cjs.S; exports.UPDATE_CONSENT_EXPERIENCE = _chunkNOF6QHE4cjs.nb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunkNOF6QHE4cjs.fb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunkNOF6QHE4cjs.gb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunkNOF6QHE4cjs.mb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunkNOF6QHE4cjs.db; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunkNOF6QHE4cjs.cb; exports.UPDATE_DATA_FLOWS = _chunkNOF6QHE4cjs.Wa; exports.UPDATE_DATA_SILOS = _chunkNOF6QHE4cjs.n; exports.UPDATE_DATA_SUBJECT = _chunkNOF6QHE4cjs.A; exports.UPDATE_DATA_SUB_CATEGORIES = _chunkNOF6QHE4cjs.Vb; exports.UPDATE_ENRICHER = _chunkNOF6QHE4cjs.s; exports.UPDATE_IDENTIFIER = _chunkNOF6QHE4cjs.x; exports.UPDATE_INTL_MESSAGES = _chunkNOF6QHE4cjs.ba; exports.UPDATE_LOAD_OPTIONS = _chunkNOF6QHE4cjs.hb; exports.UPDATE_OR_CREATE_COOKIES = _chunkNOF6QHE4cjs.Xa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunkNOF6QHE4cjs.h; exports.UPDATE_POLICIES = _chunkNOF6QHE4cjs.W; exports.UPDATE_PRIVACY_CENTER = _chunkNOF6QHE4cjs.Cb; exports.UPDATE_PRIVACY_REQUEST = _chunkNOF6QHE4cjs._; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkNOF6QHE4cjs.Yb; exports.UPDATE_PROMPTS = _chunkNOF6QHE4cjs.pa; exports.UPDATE_PROMPT_GROUPS = _chunkNOF6QHE4cjs.ta; exports.UPDATE_PROMPT_PARTIALS = _chunkNOF6QHE4cjs.ra; exports.UPDATE_REPOSITORIES = _chunkNOF6QHE4cjs.D; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunkNOF6QHE4cjs.P; exports.UPDATE_TEAM = _chunkNOF6QHE4cjs.Ba; exports.UPDATE_VENDORS = _chunkNOF6QHE4cjs.Sb; exports.USERS = _chunkNOF6QHE4cjs.Ea; exports.USP_STRING_REGEX = _chunkQXKWSBYRcjs.d; exports.VARIABLE_PARAMETERS_NAME = _chunkL7NHDBBNcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkL7NHDBBNcjs.a; exports.VENDORS = _chunkNOF6QHE4cjs.Qb; exports.VendorInput = _chunkZD2HOHJIcjs.p; exports.WebhookHeader = _chunkZD2HOHJIcjs.b; exports.addMessagesToPromptRun = _chunkNOF6QHE4cjs.We; exports.appendCsvSync = _chunkZVK4HIDFcjs.b; exports.approvePrivacyRequests = _chunkSHV6R64Jcjs.I; exports.assumeRole = _chunkNOF6QHE4cjs.Oe; exports.buildAIIntegrationType = _chunkSAEKBZGFcjs.b; exports.buildEnabledRouteType = _chunkSAEKBZGFcjs.a; exports.buildTranscendGraphQLClient = _chunkNOF6QHE4cjs.xe; exports.buildTranscendGraphQLClientGeneric = _chunkNOF6QHE4cjs.we; exports.buildXdiSyncEndpoint = _chunk25UGE4YYcjs.g; exports.bulkRestartRequests = _chunkSHV6R64Jcjs.Q; exports.bulkRetryEnrichers = _chunkSHV6R64Jcjs.S; exports.cancelPrivacyRequests = _chunkSHV6R64Jcjs.L; exports.consentManagersToBusinessEntities = _chunk25UGE4YYcjs.h; exports.convertToDataSubjectAllowlist = _chunkNOF6QHE4cjs.qc; exports.convertToDataSubjectBlockList = _chunkNOF6QHE4cjs.pc; exports.createActionItemCollection = _chunkNOF6QHE4cjs.ud; exports.createActionItems = _chunkNOF6QHE4cjs.yd; exports.createAgent = _chunkNOF6QHE4cjs.rd; exports.createAgentFile = _chunkNOF6QHE4cjs.Gd; exports.createAgentFunction = _chunkNOF6QHE4cjs.Cd; exports.createApiKey = _chunkNOF6QHE4cjs.Qe; exports.createBusinessEntity = _chunkNOF6QHE4cjs.dd; exports.createCodePackage = _chunkNOF6QHE4cjs.qe; exports.createConsentToken = _chunkQXKWSBYRcjs.a; exports.createDataCategory = _chunkNOF6QHE4cjs.Od; exports.createDataFlows = _chunkNOF6QHE4cjs.id; exports.createProcessingPurpose = _chunkNOF6QHE4cjs.Sd; exports.createPrompt = _chunkNOF6QHE4cjs.Lc; exports.createRegexForTag = j; exports.createRepository = _chunkNOF6QHE4cjs.ne; exports.createSoftwareDevelopmentKit = _chunkNOF6QHE4cjs.ke; exports.createSombraGotInstance = _chunkNOF6QHE4cjs.ye; exports.createTranscendConsentGotInstance = _chunkNOF6QHE4cjs.Me; exports.createVendor = _chunkNOF6QHE4cjs.Kd; exports.defineTranscendPrompts = hm; exports.deleteApiKey = _chunkNOF6QHE4cjs.Re; exports.deployConsentManager = _chunkNOF6QHE4cjs.Te; exports.description = _chunkFPTEK7BGcjs.a; exports.domainToHost = _chunk25UGE4YYcjs.e; exports.downloadPrivacyRequestFiles = _chunkSHV6R64Jcjs.F; exports.enrichPrivacyRequest = _chunkXBHJO2OXcjs.c; exports.ensureAllDataSubjectsExist = _chunkNOF6QHE4cjs.oc; exports.extractClientError = _chunkSHV6R64Jcjs.N; exports.fetchActiveSiloDiscoPlugin = _chunkNOF6QHE4cjs.Wd; exports.fetchAllActionItems = _chunkNOF6QHE4cjs.xd; exports.fetchAllActions = _chunkNOF6QHE4cjs.nd; exports.fetchAllAgentFiles = _chunkNOF6QHE4cjs.Fd; exports.fetchAllAgentFunctions = _chunkNOF6QHE4cjs.Bd; exports.fetchAllAgents = _chunkNOF6QHE4cjs.qd; exports.fetchAllApiKeys = _chunkNOF6QHE4cjs.Hc; exports.fetchAllAssessmentTemplates = _chunkNOF6QHE4cjs.$d; exports.fetchAllAssessments = _chunkNOF6QHE4cjs._d; exports.fetchAllAttributeValues = _chunkNOF6QHE4cjs.$c; exports.fetchAllAttributes = _chunkNOF6QHE4cjs.bd; exports.fetchAllBusinessEntities = _chunkNOF6QHE4cjs.cd; exports.fetchAllCatalogs = _chunkNOF6QHE4cjs.ue; exports.fetchAllCookies = _chunkNOF6QHE4cjs.Zd; exports.fetchAllDataCategories = _chunkNOF6QHE4cjs.Nd; exports.fetchAllDataFlows = _chunkNOF6QHE4cjs.gd; exports.fetchAllDataPoints = _chunkNOF6QHE4cjs.tc; exports.fetchAllDataSilos = _chunkNOF6QHE4cjs.rc; exports.fetchAllDataSubjects = _chunkNOF6QHE4cjs.nc; exports.fetchAllEnrichers = _chunkNOF6QHE4cjs.kc; exports.fetchAllIdentifiers = _chunkNOF6QHE4cjs.hc; exports.fetchAllMessages = _chunkNOF6QHE4cjs.Yd; exports.fetchAllPolicies = _chunkNOF6QHE4cjs.Qc; exports.fetchAllPreferenceTopics = _chunkNOF6QHE4cjs.ge; exports.fetchAllPrivacyCenters = _chunkNOF6QHE4cjs.Xd; exports.fetchAllProcessingPurposes = _chunkNOF6QHE4cjs.Rd; exports.fetchAllPromptGroups = _chunkNOF6QHE4cjs.pd; exports.fetchAllPromptPartials = _chunkNOF6QHE4cjs.od; exports.fetchAllPromptThreads = _chunkNOF6QHE4cjs.Be; exports.fetchAllPrompts = _chunkNOF6QHE4cjs.Jc; exports.fetchAllPurposes = _chunkNOF6QHE4cjs.Yc; exports.fetchAllPurposesAndPreferences = _chunkNOF6QHE4cjs.he; exports.fetchAllRequestAttributeKeys = _chunkNOF6QHE4cjs.Ee; exports.fetchAllRequestEnrichers = _chunkNOF6QHE4cjs.Je; exports.fetchAllRequestIdentifierMetadata = _chunkNOF6QHE4cjs.Ce; exports.fetchAllRequestIdentifiers = _chunkNOF6QHE4cjs.Ie; exports.fetchAllRequests = _chunkNOF6QHE4cjs.Ge; exports.fetchAllSubDataPoints = _chunkNOF6QHE4cjs.sc; exports.fetchAllTeams = _chunkNOF6QHE4cjs.Fc; exports.fetchAllTemplates = _chunkNOF6QHE4cjs.ld; exports.fetchAllUsers = _chunkNOF6QHE4cjs.Pe; exports.fetchAllVendors = _chunkNOF6QHE4cjs.Jd; exports.fetchAndIndexCatalogs = _chunkNOF6QHE4cjs.ve; exports.fetchApiKeys = _chunkNOF6QHE4cjs.Ic; exports.fetchConsentManager = _chunkNOF6QHE4cjs.xc; exports.fetchConsentManagerAnalyticsData = _chunkNOF6QHE4cjs.Bc; exports.fetchConsentManagerExperiences = _chunkNOF6QHE4cjs.zc; exports.fetchConsentManagerId = _chunkNOF6QHE4cjs.yc; exports.fetchConsentManagerTheme = _chunkNOF6QHE4cjs.Cc; exports.fetchConsentPreferences = _chunk25UGE4YYcjs.j; exports.fetchEnrichedDataSilos = _chunkNOF6QHE4cjs.uc; exports.fetchIdentifiersAndCreateMissing = _chunkNOF6QHE4cjs.ic; exports.fetchPartitions = _chunkNOF6QHE4cjs.Wc; exports.fetchPrivacyCenterId = _chunkNOF6QHE4cjs.Pc; exports.fetchPrivacyCenterUrl = _chunkNOF6QHE4cjs.Oc; exports.fetchPromptsWithVariables = _chunkNOF6QHE4cjs.Kc; exports.fetchRequestDataSilo = _chunkNOF6QHE4cjs.Le; exports.fetchRequestDataSiloActiveCount = _chunkNOF6QHE4cjs.De; exports.fetchRequestDataSilos = _chunkNOF6QHE4cjs.Ke; exports.fetchRequestFilesForRequest = _chunkNOF6QHE4cjs.Se; exports.filterNullishValuesFromObject = Am; exports.filterRows = _chunkSHV6R64Jcjs.s; exports.fuzzyMatchColumns = _chunkSHV6R64Jcjs.l; exports.fuzzySearch = _chunkSHV6R64Jcjs.k; exports.generateCrossAccountApiKeys = _chunkWAYG2MDLcjs.a; exports.getFileMetadataForPrivacyRequests = _chunkSHV6R64Jcjs.D; exports.getGitFilesThatChanged = Rm; exports.getUniqueValuesForColumn = _chunkSHV6R64Jcjs.r; exports.inquirerAutoComplete = _chunkU6G3J6VJcjs.c; exports.inquirerConfirmBoolean = _chunkU6G3J6VJcjs.a; exports.inquirerConfirmText = _chunkU6G3J6VJcjs.b; exports.listDirectories = _chunkWAYG2MDLcjs.d; exports.listFiles = _chunkWAYG2MDLcjs.c; exports.loginUser = _chunkNOF6QHE4cjs.Ne; exports.makeGraphQLRequest = _chunkNOF6QHE4cjs.gc; exports.mapColumnsToAttributes = _chunkSHV6R64Jcjs.M; exports.mapColumnsToIdentifiers = _chunkSHV6R64Jcjs.K; exports.mapCsvColumnsToApi = _chunkSHV6R64Jcjs.u; exports.mapCsvRowsToRequestInputs = _chunkSHV6R64Jcjs.z; exports.mapEnumValues = _chunkSHV6R64Jcjs.m; exports.mapRequestEnumValues = _chunkSHV6R64Jcjs.v; exports.markCronIdentifierCompleted = _chunkKWG56BUXcjs.d; exports.markRequestDataSiloIdsCompleted = _chunkKWG56BUXcjs.f; exports.markSilentPrivacyRequests = _chunkSHV6R64Jcjs.t; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkEG4L6YAJcjs.a; exports.normalizeIdentifierValue = _chunkSHV6R64Jcjs.y; exports.notifyPrivacyRequestsAdditionalTime = _chunkSHV6R64Jcjs.J; exports.parseAssessmentDisplayLogic = _chunkNOF6QHE4cjs.de; exports.parseAssessmentRiskLogic = _chunkNOF6QHE4cjs.fe; exports.parseAttributesFromString = _chunkSHV6R64Jcjs.p; exports.parseFilePath = _chunkZVK4HIDFcjs.d; exports.parseVariablesFromString = _chunkTD7ADMVOcjs.a; exports.pullAllDatapoints = _chunkHAOVN3XOcjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunkKWG56BUXcjs.g; exports.pullConsentManagerMetrics = _chunk25UGE4YYcjs.d; exports.pullCronPageOfIdentifiers = _chunkKWG56BUXcjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunkXBHJO2OXcjs.a; exports.pullPrivacyRequests = _chunkSHV6R64Jcjs.U; exports.pullTranscendConfiguration = _chunkNOF6QHE4cjs.je; exports.pullUnstructuredSubDataPointRecommendations = _chunkHAOVN3XOcjs.b; exports.pushCronIdentifiersFromCsv = _chunkKWG56BUXcjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunkXBHJO2OXcjs.d; exports.readCsv = _chunkSHV6R64Jcjs.q; exports.readTranscendYaml = _chunkL7NHDBBNcjs.d; exports.removeLinks = Pm; exports.removeUnverifiedRequestIdentifiers = _chunkSHV6R64Jcjs.W; exports.replaceVariablesInYaml = _chunkL7NHDBBNcjs.c; exports.reportPromptRun = _chunkNOF6QHE4cjs.Ve; exports.restartPrivacyRequest = _chunkSHV6R64Jcjs.P; exports.retryRequestDataSilos = _chunkSHV6R64Jcjs.T; exports.retryRequestEnricher = _chunkNOF6QHE4cjs.Ae; exports.setResourceAttributes = _chunkNOF6QHE4cjs.ze; exports.skipPreflightJobs = _chunkSHV6R64Jcjs.R; exports.skipRequestDataSilos = _chunkSHV6R64Jcjs.V; exports.splitCsvToList = _chunkSHV6R64Jcjs.n; exports.streamPrivacyRequestFiles = _chunkSHV6R64Jcjs.E; exports.submitPrivacyRequest = _chunkSHV6R64Jcjs.H; exports.syncAction = _chunkNOF6QHE4cjs.kd; exports.syncActionItemCollections = _chunkNOF6QHE4cjs.wd; exports.syncActionItems = _chunkNOF6QHE4cjs.Ad; exports.syncAgentFiles = _chunkNOF6QHE4cjs.Id; exports.syncAgentFunctions = _chunkNOF6QHE4cjs.Ed; exports.syncAgents = _chunkNOF6QHE4cjs.td; exports.syncAttribute = _chunkNOF6QHE4cjs.mc; exports.syncBusinessEntities = _chunkNOF6QHE4cjs.fd; exports.syncCodePackages = _chunkNOF6QHE4cjs.se; exports.syncConfigurationToTranscend = _chunkNOF6QHE4cjs.Vd; exports.syncConsentManager = _chunkNOF6QHE4cjs._c; exports.syncConsentManagerExperiences = _chunkNOF6QHE4cjs.Zc; exports.syncCookies = _chunkNOF6QHE4cjs.Ec; exports.syncDataCategories = _chunkNOF6QHE4cjs.Qd; exports.syncDataFlows = _chunkNOF6QHE4cjs.jd; exports.syncDataSiloDependencies = _chunkNOF6QHE4cjs.wc; exports.syncDataSilos = _chunkNOF6QHE4cjs.vc; exports.syncDataSubject = _chunkNOF6QHE4cjs.Gc; exports.syncEnricher = _chunkNOF6QHE4cjs.lc; exports.syncIdentifier = _chunkNOF6QHE4cjs.jc; exports.syncIntlMessages = _chunkNOF6QHE4cjs.Uc; exports.syncPartitions = _chunkNOF6QHE4cjs.Xc; exports.syncPolicies = _chunkNOF6QHE4cjs.Sc; exports.syncPrivacyCenter = _chunkNOF6QHE4cjs.Vc; exports.syncProcessingPurposes = _chunkNOF6QHE4cjs.Ud; exports.syncPrompts = _chunkNOF6QHE4cjs.Nc; exports.syncRepositories = _chunkNOF6QHE4cjs.pe; exports.syncSoftwareDevelopmentKits = _chunkNOF6QHE4cjs.me; exports.syncTemplate = _chunkNOF6QHE4cjs.md; exports.syncVendors = _chunkNOF6QHE4cjs.Md; exports.updateActionItem = _chunkNOF6QHE4cjs.zd; exports.updateActionItemCollection = _chunkNOF6QHE4cjs.vd; exports.updateAgentFiles = _chunkNOF6QHE4cjs.Hd; exports.updateAgentFunctions = _chunkNOF6QHE4cjs.Dd; exports.updateAgents = _chunkNOF6QHE4cjs.sd; exports.updateBusinessEntities = _chunkNOF6QHE4cjs.ed; exports.updateCodePackages = _chunkNOF6QHE4cjs.re; exports.updateConsentManagerToLatest = _chunkNOF6QHE4cjs.Ue; exports.updateConsentManagerVersionToLatest = _chunk25UGE4YYcjs.a; exports.updateDataCategories = _chunkNOF6QHE4cjs.Pd; exports.updateDataFlows = _chunkNOF6QHE4cjs.hd; exports.updateIntlMessages = _chunkNOF6QHE4cjs.Tc; exports.updateOrCreateCookies = _chunkNOF6QHE4cjs.Dc; exports.updatePolicies = _chunkNOF6QHE4cjs.Rc; exports.updateProcessingPurposes = _chunkNOF6QHE4cjs.Td; exports.updatePrompts = _chunkNOF6QHE4cjs.Mc; exports.updateRepositories = _chunkNOF6QHE4cjs.oe; exports.updateSoftwareDevelopmentKits = _chunkNOF6QHE4cjs.le; exports.updateVendors = _chunkNOF6QHE4cjs.Ld; exports.uploadConsents = _chunkQXKWSBYRcjs.f; exports.uploadCookiesFromCsv = _chunk25UGE4YYcjs.c; exports.uploadDataFlowsFromCsv = _chunk25UGE4YYcjs.b; exports.uploadPrivacyRequestsFromCsv = _chunkSHV6R64Jcjs.O; exports.uploadSiloDiscoveryResults = _chunkNOF6QHE4cjs.te; exports.validateTranscendAuth = _chunkWAYG2MDLcjs.b; exports.version = _chunkFPTEK7BGcjs.b; exports.writeCsv = _chunkZVK4HIDFcjs.c; exports.writeCsvSync = _chunkZVK4HIDFcjs.a; exports.writeLargeCsv = _chunkZVK4HIDFcjs.e; exports.writeTranscendYaml = _chunkL7NHDBBNcjs.e;
3
+ `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=_child_process.execSync.call(void 0, `git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=_chunkUM5F6R4Icjs.c.call(void 0, p.split(`
4
+ `).filter(d=>d),s),c=t.length>0?_fastglob2.default.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let Q=_child_process.execSync.call(void 0, `git show ${i}:${d}`,{encoding:"utf-8"});n[d]=Q});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}exports.ACTIONS = _chunkT66BMKXUcjs.ub; exports.ADD_MESSAGES_TO_PROMPT_RUN = _chunkT66BMKXUcjs.Ha; exports.ADD_SILO_DISCOVERY_RESULTS = _chunkT66BMKXUcjs.I; exports.ADMIN_DASH = _chunkDM7WURT2cjs.b; exports.ADMIN_DASH_DATAPOINTS = _chunkDM7WURT2cjs.d; exports.ADMIN_DASH_INTEGRATIONS = _chunkDM7WURT2cjs.c; exports.AGENTS = _chunkT66BMKXUcjs.Hb; exports.AGENT_FILES = _chunkT66BMKXUcjs.Kb; exports.AGENT_FUNCTIONS = _chunkT66BMKXUcjs.Nb; exports.API_KEYS = _chunkT66BMKXUcjs.F; exports.APPROVE_PRIVACY_REQUEST = _chunkT66BMKXUcjs.Y; exports.ASSESSMENTS = _chunkT66BMKXUcjs.ga; exports.ASSESSMENT_SECTION_FIELDS = _chunkT66BMKXUcjs.fa; exports.ASSESSMENT_TEMPLATES = _chunkT66BMKXUcjs.ka; exports.ASSUME_ROLE = _chunkT66BMKXUcjs.Fb; exports.ATTRIBUTES = _chunkT66BMKXUcjs.La; exports.ATTRIBUTE_KEYS_REQUESTS = _chunkT66BMKXUcjs.N; exports.ATTRIBUTE_VALUES = _chunkT66BMKXUcjs.Pa; exports.ActionInput = _chunkZD2HOHJIcjs.E; exports.ActionItemCollectionInput = _chunkZD2HOHJIcjs.P; exports.ActionItemInput = _chunkZD2HOHJIcjs.Q; exports.AgentFileInput = _chunkZD2HOHJIcjs.o; exports.AgentFunctionInput = _chunkZD2HOHJIcjs.n; exports.AgentInput = _chunkZD2HOHJIcjs.m; exports.ApiKeyInput = _chunkZD2HOHJIcjs.c; exports.AssessmentAction = _chunkT66BMKXUcjs.Wd; exports.AssessmentAnswerOptionInput = _chunkZD2HOHJIcjs.W; exports.AssessmentDisplayLogicInput = _chunkZD2HOHJIcjs.T; exports.AssessmentInput = _chunkZD2HOHJIcjs.aa; exports.AssessmentNestedRule = _chunkT66BMKXUcjs.Vd; exports.AssessmentNestedRuleInput = _chunkZD2HOHJIcjs.S; exports.AssessmentResourceInput = _chunkZD2HOHJIcjs.$; exports.AssessmentRetentionScheduleInput = _chunkZD2HOHJIcjs.Z; exports.AssessmentRiskLogic = _chunkT66BMKXUcjs.Yd; exports.AssessmentRule = _chunkT66BMKXUcjs.Ud; exports.AssessmentRuleInput = _chunkZD2HOHJIcjs.R; exports.AssessmentSectionInput = _chunkZD2HOHJIcjs.Y; exports.AssessmentSectionQuestionInput = _chunkZD2HOHJIcjs.X; exports.AssessmentTemplateInput = _chunkZD2HOHJIcjs._; exports.AttestedExtraIdentifiers = _chunkDFOLIGJPcjs.w; exports.AttributeInput = _chunkZD2HOHJIcjs.k; exports.AttributePreview = _chunkZD2HOHJIcjs.l; exports.AttributeValueInput = _chunkZD2HOHJIcjs.j; exports.BLANK = _chunkDFOLIGJPcjs.c; exports.BULK_APPLY = _chunkDFOLIGJPcjs.b; exports.BUSINESS_ENTITIES = _chunkT66BMKXUcjs.rb; exports.BusinessEntityInput = _chunkZD2HOHJIcjs.y; exports.CANCEL_PRIVACY_REQUEST = _chunkT66BMKXUcjs.Z; exports.CAN_APPLY_IN_BULK = _chunkDFOLIGJPcjs.g; exports.CATALOGS = _chunkT66BMKXUcjs.t; exports.CHANGE_REQUEST_DATA_SILO_STATUS = _chunkT66BMKXUcjs.wa; exports.CODE_PACKAGES = _chunkT66BMKXUcjs.R; exports.CONSENT_MANAGER_ANALYTICS_DATA = _chunkT66BMKXUcjs.qb; exports.CONSENT_PARTITIONS = _chunkT66BMKXUcjs.Ua; exports.COOKIES = _chunkT66BMKXUcjs.Za; exports.CREATE_ACTION_ITEMS = _chunkT66BMKXUcjs.yb; exports.CREATE_ACTION_ITEM_COLLECTION = _chunkT66BMKXUcjs.Ja; exports.CREATE_AGENT = _chunkT66BMKXUcjs.Ib; exports.CREATE_AGENT_FILE = _chunkT66BMKXUcjs.Lb; exports.CREATE_AGENT_FUNCTION = _chunkT66BMKXUcjs.Ob; exports.CREATE_API_KEY = _chunkT66BMKXUcjs.G; exports.CREATE_ATTRIBUTE = _chunkT66BMKXUcjs.Qa; exports.CREATE_ATTRIBUTE_VALUES = _chunkT66BMKXUcjs.Ma; exports.CREATE_BUSINESS_ENTITY = _chunkT66BMKXUcjs.sb; exports.CREATE_CODE_PACKAGE = _chunkT66BMKXUcjs.T; exports.CREATE_CONSENT_EXPERIENCE = _chunkT66BMKXUcjs.ob; exports.CREATE_CONSENT_MANAGER = _chunkT66BMKXUcjs.bb; exports.CREATE_CONSENT_PARTITION = _chunkT66BMKXUcjs.pb; exports.CREATE_DATA_FLOWS = _chunkT66BMKXUcjs.Va; exports.CREATE_DATA_SILOS = _chunkT66BMKXUcjs.o; exports.CREATE_DATA_SUBJECT = _chunkT66BMKXUcjs.z; exports.CREATE_DATA_SUB_CATEGORY = _chunkT66BMKXUcjs.Ub; exports.CREATE_ENRICHER = _chunkT66BMKXUcjs.r; exports.CREATE_IDENTIFIER = _chunkT66BMKXUcjs.w; exports.CREATE_PROCESSING_PURPOSE_SUB_CATEGORY = _chunkT66BMKXUcjs.Xb; exports.CREATE_PROMPT = _chunkT66BMKXUcjs.qa; exports.CREATE_PROMPT_GROUP = _chunkT66BMKXUcjs.ua; exports.CREATE_PROMPT_PARTIAL = _chunkT66BMKXUcjs.sa; exports.CREATE_REPOSITORY = _chunkT66BMKXUcjs.E; exports.CREATE_SOFTWARE_DEVELOPMENT_KIT = _chunkT66BMKXUcjs.Q; exports.CREATE_TEAM = _chunkT66BMKXUcjs.Aa; exports.CREATE_TEMPLATE = _chunkT66BMKXUcjs.L; exports.CREATE_VENDOR = _chunkT66BMKXUcjs.Rb; exports.CachedFileState = _chunkDFOLIGJPcjs.h; exports.CachedRequestState = _chunkDFOLIGJPcjs.j; exports.CodePackageInput = _chunkZD2HOHJIcjs.B; exports.CodePackageSdk = _chunkZD2HOHJIcjs.A; exports.ColumnName = _chunkDFOLIGJPcjs.e; exports.ConsentManageExperienceInput = _chunkZD2HOHJIcjs.I; exports.ConsentManagerInput = _chunkZD2HOHJIcjs.K; exports.ConsentManagerMetricBin = _chunkT66BMKXUcjs.sc; exports.ConsentManagerServiceMetadata = _chunkZD2HOHJIcjs.ia; exports.ConsentPreferenceResponse = _chunkJQ7LX2L3cjs.i; exports.ConsentPreferenceTopic = _chunkZD2HOHJIcjs.ca; exports.ConsentPreferenceTopicOptionValue = _chunkZD2HOHJIcjs.ba; exports.ConsentPurpose = _chunkZD2HOHJIcjs.da; exports.CookieCsvInput = _chunkZD2HOHJIcjs.ha; exports.CookieInput = _chunkZD2HOHJIcjs.H; exports.CronIdentifier = _chunk6VV64JQDcjs.a; exports.CronIdentifierPush = _chunk6VV64JQDcjs.c; exports.DATAPOINT_EXPORT = _chunkT66BMKXUcjs.i; exports.DATA_FLOWS = _chunkT66BMKXUcjs.Ya; exports.DATA_POINTS = _chunkT66BMKXUcjs.c; exports.DATA_POINT_COUNT = _chunkT66BMKXUcjs.d; exports.DATA_SILOS = _chunkT66BMKXUcjs.k; exports.DATA_SILOS_ENRICHED = _chunkT66BMKXUcjs.m; exports.DATA_SILO_EXPORT = _chunkT66BMKXUcjs.l; exports.DATA_SUBJECTS = _chunkT66BMKXUcjs.y; exports.DATA_SUB_CATEGORIES = _chunkT66BMKXUcjs.Tb; exports.DEFAULT_TRANSCEND_API = _chunkDM7WURT2cjs.e; exports.DEFAULT_TRANSCEND_CONSENT_API = _chunkDM7WURT2cjs.f; exports.DEFAULT_TRANSCEND_PULL_RESOURCES = _chunkT66BMKXUcjs.ae; exports.DELETE_API_KEY = _chunkT66BMKXUcjs.H; exports.DELETE_ATTRIBUTE_VALUE = _chunkT66BMKXUcjs.Oa; exports.DEPLOYED_PRIVACY_CENTER_URL = _chunkT66BMKXUcjs.Ab; exports.DEPLOY_CONSENT_MANAGER = _chunkT66BMKXUcjs.eb; exports.DETERMINE_LOGIN_METHOD = _chunkT66BMKXUcjs.Db; exports.DataCategoryGuessInput = _chunkZD2HOHJIcjs.h; exports.DataCategoryInput = _chunkZD2HOHJIcjs.q; exports.DataCategoryPreviewInput = _chunkZD2HOHJIcjs.g; exports.DataCategoryRecommendationInput = _chunkZD2HOHJIcjs.i; exports.DataFlowCsvInput = _chunkZD2HOHJIcjs.ga; exports.DataFlowInput = _chunkZD2HOHJIcjs.G; exports.DataSiloInput = _chunkZD2HOHJIcjs.O; exports.DataSubjectInput = _chunkZD2HOHJIcjs.D; exports.DatapointInput = _chunkZD2HOHJIcjs.w; exports.ENABLED_PLUGINS = _chunkT66BMKXUcjs.J; exports.ENRICHERS = _chunkT66BMKXUcjs.p; exports.ENTRY_COUNT = _chunkT66BMKXUcjs.j; exports.EXPERIENCES = _chunkT66BMKXUcjs.Ta; exports.EnrichPrivacyRequest = _chunk3L4DLV6Fcjs.b; exports.EnricherInput = _chunkZD2HOHJIcjs.e; exports.FETCH_CONSENT_MANAGER = _chunkT66BMKXUcjs.$a; exports.FETCH_CONSENT_MANAGER_ID = _chunkT66BMKXUcjs._a; exports.FETCH_CONSENT_MANAGER_THEME = _chunkT66BMKXUcjs.ab; exports.FETCH_PRIVACY_CENTER_ID = _chunkT66BMKXUcjs.zb; exports.FieldInput = _chunkZD2HOHJIcjs.v; exports.GLOBAL_ACTION_ITEMS = _chunkT66BMKXUcjs.wb; exports.GLOBAL_ACTION_ITEM_COLLECTIONS = _chunkT66BMKXUcjs.Ia; exports.IDENTIFIERS = _chunkT66BMKXUcjs.u; exports.IDENTIFIER_BLOCK_LIST = _chunkDFOLIGJPcjs.d; exports.IMPORT_ONE_TRUST_ASSESSMENT_FORMS = _chunkT66BMKXUcjs.ha; exports.INITIALIZER = _chunkT66BMKXUcjs.q; exports.IP_ADDRESS_REGEX = _chunkJQ7LX2L3cjs.f; exports.IS_REQUIRED = _chunkDFOLIGJPcjs.f; exports.IdentifierInput = _chunkZD2HOHJIcjs.F; exports.ImportOnetrustAssessmentsInput = _chunkZD2HOHJIcjs.pa; exports.IntlMessage = _chunkDFOLIGJPcjs.A; exports.IntlMessageInput = _chunkZD2HOHJIcjs.N; exports.LARGE_LANGUAGE_MODELS = _chunkT66BMKXUcjs.Gb; exports.LOGIN = _chunkT66BMKXUcjs.Eb; exports.MESSAGES = _chunkT66BMKXUcjs.aa; exports.NEW_IDENTIFIER_TYPES = _chunkT66BMKXUcjs.v; exports.NONE = _chunkDFOLIGJPcjs.a; exports.NOTIFY_ADDITIONAL_TIME = _chunkT66BMKXUcjs.$; exports.ORGANIZATION = _chunkT66BMKXUcjs.M; exports.OneTrustFileFormat = _chunkBY7W4UQFcjs.a; exports.OneTrustPullResource = _chunkBY7W4UQFcjs.b; exports.OneTrustPullSource = _chunkBY7W4UQFcjs.c; exports.OpenAIEnabledRoute = _chunkZD2HOHJIcjs.ka; exports.OpenAIEnabledRoutes = _chunkZD2HOHJIcjs.la; exports.OpenAIIntegration = _chunkZD2HOHJIcjs.ma; exports.OpenAIRouteName = _chunkBY7W4UQFcjs.f; exports.POLICIES = _chunkT66BMKXUcjs.V; exports.PREFERENCE_TOPICS = _chunkT66BMKXUcjs.ja; exports.PRIVACY_CENTER = _chunkT66BMKXUcjs.Bb; exports.PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkT66BMKXUcjs.Wb; exports.PROMPTS = _chunkT66BMKXUcjs.la; exports.PROMPTS_WITH_VARIABLES = _chunkT66BMKXUcjs.oa; exports.PROMPT_GROUPS = _chunkT66BMKXUcjs.na; exports.PROMPT_PARTIALS = _chunkT66BMKXUcjs.ma; exports.PROMPT_THREADS = _chunkT66BMKXUcjs.U; exports.PURPOSES = _chunkT66BMKXUcjs.ia; exports.ParsedAttributeInput = _chunkDFOLIGJPcjs.o; exports.PartitionInput = _chunkZD2HOHJIcjs.J; exports.PathfinderPolicy = _chunkZD2HOHJIcjs.na; exports.PathfinderPolicyName = _chunkBY7W4UQFcjs.e; exports.PathfinderPolicyNameC = _chunkZD2HOHJIcjs.ja; exports.PathfinderPromptRunMetadata = _chunkZD2HOHJIcjs.oa; exports.PolicyInput = _chunkZD2HOHJIcjs.M; exports.PrivacyCenterInput = _chunkZD2HOHJIcjs.L; exports.PrivacyRequest = _chunkT66BMKXUcjs.xe; exports.PrivacyRequestInput = _chunkDFOLIGJPcjs.x; exports.PrivacyRequestResponse = _chunkDFOLIGJPcjs.G; exports.ProcessingPurposeInput = _chunkZD2HOHJIcjs.r; exports.ProcessingPurposePreviewInput = _chunkZD2HOHJIcjs.f; exports.PromptAVendorEmailSettings = _chunkZD2HOHJIcjs.x; exports.PromptGroupInput = _chunkZD2HOHJIcjs.u; exports.PromptInput = _chunkZD2HOHJIcjs.s; exports.PromptPartialInput = _chunkZD2HOHJIcjs.t; exports.PurposeMap = _chunkLD6RM4JJcjs.e; exports.REDUCED_REQUESTS_FOR_DATA_SILO_COUNT = _chunkT66BMKXUcjs.ya; exports.REMOVE_REQUEST_IDENTIFIERS = _chunkT66BMKXUcjs.Ca; exports.REPORT_PROMPT_RUN = _chunkT66BMKXUcjs.Ga; exports.REPOSITORIES = _chunkT66BMKXUcjs.C; exports.REQUESTS = _chunkT66BMKXUcjs.X; exports.REQUEST_DATA_SILOS = _chunkT66BMKXUcjs.va; exports.REQUEST_ENRICHERS = _chunkT66BMKXUcjs.ca; exports.REQUEST_FILES = _chunkT66BMKXUcjs.Fa; exports.REQUEST_IDENTIFIERS = _chunkT66BMKXUcjs.Da; exports.RETRY_REQUEST_DATA_SILO = _chunkT66BMKXUcjs.xa; exports.RETRY_REQUEST_ENRICHER = _chunkT66BMKXUcjs.da; exports.RepositoryInput = _chunkZD2HOHJIcjs.C; exports.RequestFileMetadata = _chunkDFOLIGJPcjs.B; exports.RequestFileMetadataResponse = _chunkDFOLIGJPcjs.C; exports.RequestIdentifiersResponse = _chunkT66BMKXUcjs.ze; exports.RiskAssignmentInput = _chunkZD2HOHJIcjs.U; exports.RiskLogicInput = _chunkZD2HOHJIcjs.V; exports.SCOPES_BY_TITLE = _chunkDM7WURT2cjs.j; exports.SCOPE_TITLES = _chunkDM7WURT2cjs.k; exports.SET_RESOURCE_ATTRIBUTES = _chunkT66BMKXUcjs.Sa; exports.SKIP_REQUEST_ENRICHER = _chunkT66BMKXUcjs.ea; exports.SOFTWARE_DEVELOPMENT_KITS = _chunkT66BMKXUcjs.O; exports.SOMBRA_VERSION = _chunkT66BMKXUcjs.Zb; exports.SUB_DATA_POINTS = _chunkT66BMKXUcjs.e; exports.SUB_DATA_POINTS_COUNT = _chunkT66BMKXUcjs.f; exports.SUB_DATA_POINTS_WITH_GUESSES = _chunkT66BMKXUcjs.g; exports.SYNC_ATTRIBUTE_TYPES = _chunkT66BMKXUcjs.Uc; exports.SoftwareDevelopmentKitInput = _chunkZD2HOHJIcjs.z; exports.StoredApiKey = _chunkZD2HOHJIcjs.fa; exports.SuccessfulRequest = _chunkDFOLIGJPcjs.i; exports.TEAMS = _chunkT66BMKXUcjs.za; exports.TEMPLATES = _chunkT66BMKXUcjs.K; exports.TOGGLE_CONSENT_PRECEDENCE = _chunkT66BMKXUcjs.lb; exports.TOGGLE_DATA_SUBJECT = _chunkT66BMKXUcjs.B; exports.TOGGLE_TELEMETRY_PARTITION_STRATEGY = _chunkT66BMKXUcjs.kb; exports.TOGGLE_UNKNOWN_COOKIE_POLICY = _chunkT66BMKXUcjs.jb; exports.TOGGLE_UNKNOWN_REQUEST_POLICY = _chunkT66BMKXUcjs.ib; exports.TR_PULL_RESOURCE_SCOPE_MAP = _chunkDM7WURT2cjs.h; exports.TR_PUSH_RESOURCE_SCOPE_MAP = _chunkDM7WURT2cjs.g; exports.TR_YML_RESOURCE_TO_FIELD_NAME = _chunkDM7WURT2cjs.i; exports.TeamInput = _chunkZD2HOHJIcjs.d; exports.TemplateInput = _chunkZD2HOHJIcjs.a; exports.TranscendInput = _chunkZD2HOHJIcjs.ea; exports.TranscendPromptManager = F; exports.TranscendPullResource = _chunkBY7W4UQFcjs.d; exports.UPDATE_ACTION = _chunkT66BMKXUcjs.vb; exports.UPDATE_ACTION_ITEMS = _chunkT66BMKXUcjs.xb; exports.UPDATE_ACTION_ITEM_COLLECTION = _chunkT66BMKXUcjs.Ka; exports.UPDATE_AGENTS = _chunkT66BMKXUcjs.Jb; exports.UPDATE_AGENT_FILES = _chunkT66BMKXUcjs.Mb; exports.UPDATE_AGENT_FUNCTIONS = _chunkT66BMKXUcjs.Pb; exports.UPDATE_ATTRIBUTE = _chunkT66BMKXUcjs.Ra; exports.UPDATE_ATTRIBUTE_VALUES = _chunkT66BMKXUcjs.Na; exports.UPDATE_BUSINESS_ENTITIES = _chunkT66BMKXUcjs.tb; exports.UPDATE_CODE_PACKAGES = _chunkT66BMKXUcjs.S; exports.UPDATE_CONSENT_EXPERIENCE = _chunkT66BMKXUcjs.nb; exports.UPDATE_CONSENT_MANAGER_DOMAINS = _chunkT66BMKXUcjs.fb; exports.UPDATE_CONSENT_MANAGER_PARTITION = _chunkT66BMKXUcjs.gb; exports.UPDATE_CONSENT_MANAGER_THEME = _chunkT66BMKXUcjs.mb; exports.UPDATE_CONSENT_MANAGER_TO_LATEST = _chunkT66BMKXUcjs.db; exports.UPDATE_CONSENT_MANAGER_VERSION = _chunkT66BMKXUcjs.cb; exports.UPDATE_DATA_FLOWS = _chunkT66BMKXUcjs.Wa; exports.UPDATE_DATA_SILOS = _chunkT66BMKXUcjs.n; exports.UPDATE_DATA_SUBJECT = _chunkT66BMKXUcjs.A; exports.UPDATE_DATA_SUB_CATEGORIES = _chunkT66BMKXUcjs.Vb; exports.UPDATE_ENRICHER = _chunkT66BMKXUcjs.s; exports.UPDATE_IDENTIFIER = _chunkT66BMKXUcjs.x; exports.UPDATE_INTL_MESSAGES = _chunkT66BMKXUcjs.ba; exports.UPDATE_LOAD_OPTIONS = _chunkT66BMKXUcjs.hb; exports.UPDATE_OR_CREATE_COOKIES = _chunkT66BMKXUcjs.Xa; exports.UPDATE_OR_CREATE_DATA_POINT = _chunkT66BMKXUcjs.h; exports.UPDATE_POLICIES = _chunkT66BMKXUcjs.W; exports.UPDATE_PRIVACY_CENTER = _chunkT66BMKXUcjs.Cb; exports.UPDATE_PRIVACY_REQUEST = _chunkT66BMKXUcjs._; exports.UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES = _chunkT66BMKXUcjs.Yb; exports.UPDATE_PROMPTS = _chunkT66BMKXUcjs.pa; exports.UPDATE_PROMPT_GROUPS = _chunkT66BMKXUcjs.ta; exports.UPDATE_PROMPT_PARTIALS = _chunkT66BMKXUcjs.ra; exports.UPDATE_REPOSITORIES = _chunkT66BMKXUcjs.D; exports.UPDATE_SOFTWARE_DEVELOPMENT_KITS = _chunkT66BMKXUcjs.P; exports.UPDATE_TEAM = _chunkT66BMKXUcjs.Ba; exports.UPDATE_VENDORS = _chunkT66BMKXUcjs.Sb; exports.USERS = _chunkT66BMKXUcjs.Ea; exports.USP_STRING_REGEX = _chunkLD6RM4JJcjs.d; exports.VARIABLE_PARAMETERS_NAME = _chunkL7NHDBBNcjs.b; exports.VARIABLE_PARAMETERS_REGEXP = _chunkL7NHDBBNcjs.a; exports.VENDORS = _chunkT66BMKXUcjs.Qb; exports.VendorInput = _chunkZD2HOHJIcjs.p; exports.WebhookHeader = _chunkZD2HOHJIcjs.b; exports.addMessagesToPromptRun = _chunkT66BMKXUcjs.Oe; exports.appendCsvSync = _chunkZVK4HIDFcjs.b; exports.approvePrivacyRequests = _chunkDFOLIGJPcjs.I; exports.assumeRole = _chunkT66BMKXUcjs.Ge; exports.buildAIIntegrationType = _chunkSAEKBZGFcjs.b; exports.buildEnabledRouteType = _chunkSAEKBZGFcjs.a; exports.buildTranscendGraphQLClient = _chunkT66BMKXUcjs.pe; exports.buildTranscendGraphQLClientGeneric = _chunkT66BMKXUcjs.oe; exports.buildXdiSyncEndpoint = _chunkJQ7LX2L3cjs.g; exports.bulkRestartRequests = _chunkDFOLIGJPcjs.Q; exports.bulkRetryEnrichers = _chunkDFOLIGJPcjs.S; exports.cancelPrivacyRequests = _chunkDFOLIGJPcjs.L; exports.consentManagersToBusinessEntities = _chunkJQ7LX2L3cjs.h; exports.convertToDataSubjectAllowlist = _chunkT66BMKXUcjs.ic; exports.convertToDataSubjectBlockList = _chunkT66BMKXUcjs.hc; exports.createActionItemCollection = _chunkT66BMKXUcjs.md; exports.createActionItems = _chunkT66BMKXUcjs.qd; exports.createAgent = _chunkT66BMKXUcjs.jd; exports.createAgentFile = _chunkT66BMKXUcjs.yd; exports.createAgentFunction = _chunkT66BMKXUcjs.ud; exports.createApiKey = _chunkT66BMKXUcjs.Ie; exports.createBusinessEntity = _chunkT66BMKXUcjs.Xc; exports.createCodePackage = _chunkT66BMKXUcjs.ie; exports.createConsentToken = _chunkLD6RM4JJcjs.a; exports.createDataCategory = _chunkT66BMKXUcjs.Gd; exports.createDataFlows = _chunkT66BMKXUcjs.ad; exports.createProcessingPurpose = _chunkT66BMKXUcjs.Kd; exports.createPrompt = _chunkT66BMKXUcjs.Dc; exports.createRegexForTag = j; exports.createRepository = _chunkT66BMKXUcjs.fe; exports.createSoftwareDevelopmentKit = _chunkT66BMKXUcjs.ce; exports.createSombraGotInstance = _chunkT66BMKXUcjs.qe; exports.createTranscendConsentGotInstance = _chunkT66BMKXUcjs.Ee; exports.createVendor = _chunkT66BMKXUcjs.Cd; exports.defineTranscendPrompts = Pm; exports.deleteApiKey = _chunkT66BMKXUcjs.Je; exports.deployConsentManager = _chunkT66BMKXUcjs.Le; exports.description = _chunkUM5F6R4Icjs.l; exports.domainToHost = _chunkJQ7LX2L3cjs.e; exports.downloadPrivacyRequestFiles = _chunkDFOLIGJPcjs.F; exports.enrichPrivacyRequest = _chunk3L4DLV6Fcjs.c; exports.ensureAllDataSubjectsExist = _chunkT66BMKXUcjs.gc; exports.extractClientError = _chunkDFOLIGJPcjs.N; exports.fetchActiveSiloDiscoPlugin = _chunkT66BMKXUcjs.Od; exports.fetchAllActionItems = _chunkT66BMKXUcjs.pd; exports.fetchAllActions = _chunkT66BMKXUcjs.fd; exports.fetchAllAgentFiles = _chunkT66BMKXUcjs.xd; exports.fetchAllAgentFunctions = _chunkT66BMKXUcjs.td; exports.fetchAllAgents = _chunkT66BMKXUcjs.id; exports.fetchAllApiKeys = _chunkT66BMKXUcjs.zc; exports.fetchAllAssessmentTemplates = _chunkT66BMKXUcjs.Td; exports.fetchAllAssessments = _chunkT66BMKXUcjs.Sd; exports.fetchAllAttributeValues = _chunkT66BMKXUcjs.Tc; exports.fetchAllAttributes = _chunkT66BMKXUcjs.Vc; exports.fetchAllBusinessEntities = _chunkT66BMKXUcjs.Wc; exports.fetchAllCatalogs = _chunkT66BMKXUcjs.me; exports.fetchAllCookies = _chunkT66BMKXUcjs.Rd; exports.fetchAllDataCategories = _chunkT66BMKXUcjs.Fd; exports.fetchAllDataFlows = _chunkT66BMKXUcjs._c; exports.fetchAllDataPoints = _chunkT66BMKXUcjs.lc; exports.fetchAllDataSilos = _chunkT66BMKXUcjs.jc; exports.fetchAllDataSubjects = _chunkT66BMKXUcjs.fc; exports.fetchAllEnrichers = _chunkT66BMKXUcjs.cc; exports.fetchAllIdentifiers = _chunkT66BMKXUcjs.$b; exports.fetchAllMessages = _chunkT66BMKXUcjs.Qd; exports.fetchAllPolicies = _chunkT66BMKXUcjs.Ic; exports.fetchAllPreferenceTopics = _chunkT66BMKXUcjs._d; exports.fetchAllPrivacyCenters = _chunkT66BMKXUcjs.Pd; exports.fetchAllProcessingPurposes = _chunkT66BMKXUcjs.Jd; exports.fetchAllPromptGroups = _chunkT66BMKXUcjs.hd; exports.fetchAllPromptPartials = _chunkT66BMKXUcjs.gd; exports.fetchAllPromptThreads = _chunkT66BMKXUcjs.te; exports.fetchAllPrompts = _chunkT66BMKXUcjs.Bc; exports.fetchAllPurposes = _chunkT66BMKXUcjs.Qc; exports.fetchAllPurposesAndPreferences = _chunkT66BMKXUcjs.$d; exports.fetchAllRequestAttributeKeys = _chunkT66BMKXUcjs.we; exports.fetchAllRequestEnrichers = _chunkT66BMKXUcjs.Be; exports.fetchAllRequestIdentifierMetadata = _chunkT66BMKXUcjs.ue; exports.fetchAllRequestIdentifiers = _chunkT66BMKXUcjs.Ae; exports.fetchAllRequests = _chunkT66BMKXUcjs.ye; exports.fetchAllSubDataPoints = _chunkT66BMKXUcjs.kc; exports.fetchAllTeams = _chunkT66BMKXUcjs.xc; exports.fetchAllTemplates = _chunkT66BMKXUcjs.dd; exports.fetchAllUsers = _chunkT66BMKXUcjs.He; exports.fetchAllVendors = _chunkT66BMKXUcjs.Bd; exports.fetchAndIndexCatalogs = _chunkT66BMKXUcjs.ne; exports.fetchApiKeys = _chunkT66BMKXUcjs.Ac; exports.fetchConsentManager = _chunkT66BMKXUcjs.pc; exports.fetchConsentManagerAnalyticsData = _chunkT66BMKXUcjs.tc; exports.fetchConsentManagerExperiences = _chunkT66BMKXUcjs.rc; exports.fetchConsentManagerId = _chunkT66BMKXUcjs.qc; exports.fetchConsentManagerTheme = _chunkT66BMKXUcjs.uc; exports.fetchConsentPreferences = _chunkJQ7LX2L3cjs.j; exports.fetchEnrichedDataSilos = _chunkT66BMKXUcjs.mc; exports.fetchIdentifiersAndCreateMissing = _chunkT66BMKXUcjs.ac; exports.fetchPartitions = _chunkT66BMKXUcjs.Oc; exports.fetchPrivacyCenterId = _chunkT66BMKXUcjs.Hc; exports.fetchPrivacyCenterUrl = _chunkT66BMKXUcjs.Gc; exports.fetchPromptsWithVariables = _chunkT66BMKXUcjs.Cc; exports.fetchRequestDataSilo = _chunkT66BMKXUcjs.De; exports.fetchRequestDataSiloActiveCount = _chunkT66BMKXUcjs.ve; exports.fetchRequestDataSilos = _chunkT66BMKXUcjs.Ce; exports.fetchRequestFilesForRequest = _chunkT66BMKXUcjs.Ke; exports.filterNullishValuesFromObject = xm; exports.filterRows = _chunkDFOLIGJPcjs.s; exports.fuzzyMatchColumns = _chunkDFOLIGJPcjs.l; exports.fuzzySearch = _chunkDFOLIGJPcjs.k; exports.generateCrossAccountApiKeys = _chunkMYCE3NIEcjs.a; exports.getFileMetadataForPrivacyRequests = _chunkDFOLIGJPcjs.D; exports.getGitFilesThatChanged = Mm; exports.getUniqueValuesForColumn = _chunkDFOLIGJPcjs.r; exports.inquirerAutoComplete = _chunkS27CXPPNcjs.c; exports.inquirerConfirmBoolean = _chunkS27CXPPNcjs.a; exports.inquirerConfirmText = _chunkS27CXPPNcjs.b; exports.listDirectories = _chunkMYCE3NIEcjs.d; exports.listFiles = _chunkMYCE3NIEcjs.c; exports.loginUser = _chunkT66BMKXUcjs.Fe; exports.makeGraphQLRequest = _chunkT66BMKXUcjs._b; exports.mapColumnsToAttributes = _chunkDFOLIGJPcjs.M; exports.mapColumnsToIdentifiers = _chunkDFOLIGJPcjs.K; exports.mapCsvColumnsToApi = _chunkDFOLIGJPcjs.u; exports.mapCsvRowsToRequestInputs = _chunkDFOLIGJPcjs.z; exports.mapEnumValues = _chunkDFOLIGJPcjs.m; exports.mapRequestEnumValues = _chunkDFOLIGJPcjs.v; exports.markCronIdentifierCompleted = _chunk6VV64JQDcjs.d; exports.markRequestDataSiloIdsCompleted = _chunk6VV64JQDcjs.f; exports.markSilentPrivacyRequests = _chunkDFOLIGJPcjs.t; exports.mergeTranscendInputs = _chunkIBTP5OXEcjs.a; exports.name = _chunkDM7WURT2cjs.a; exports.normalizeIdentifierValue = _chunkDFOLIGJPcjs.y; exports.notifyPrivacyRequestsAdditionalTime = _chunkDFOLIGJPcjs.J; exports.parseAssessmentDisplayLogic = _chunkT66BMKXUcjs.Xd; exports.parseAssessmentRiskLogic = _chunkT66BMKXUcjs.Zd; exports.parseAttributesFromString = _chunkDFOLIGJPcjs.p; exports.parseFilePath = _chunkZVK4HIDFcjs.d; exports.parseVariablesFromString = _chunkTD7ADMVOcjs.a; exports.pullAllDatapoints = _chunkVBCQ7F34cjs.a; exports.pullChunkedCustomSiloOutstandingIdentifiers = _chunk6VV64JQDcjs.g; exports.pullConsentManagerMetrics = _chunkJQ7LX2L3cjs.d; exports.pullCronPageOfIdentifiers = _chunk6VV64JQDcjs.b; exports.pullManualEnrichmentIdentifiersToCsv = _chunk3L4DLV6Fcjs.a; exports.pullPrivacyRequests = _chunkDFOLIGJPcjs.U; exports.pullTranscendConfiguration = _chunkT66BMKXUcjs.be; exports.pullUnstructuredSubDataPointRecommendations = _chunkVBCQ7F34cjs.b; exports.pushCronIdentifiersFromCsv = _chunk6VV64JQDcjs.e; exports.pushManualEnrichmentIdentifiersFromCsv = _chunk3L4DLV6Fcjs.d; exports.readCsv = _chunkDFOLIGJPcjs.q; exports.readTranscendYaml = _chunkL7NHDBBNcjs.d; exports.removeLinks = Am; exports.removeUnverifiedRequestIdentifiers = _chunkDFOLIGJPcjs.W; exports.replaceVariablesInYaml = _chunkL7NHDBBNcjs.c; exports.reportPromptRun = _chunkT66BMKXUcjs.Ne; exports.restartPrivacyRequest = _chunkDFOLIGJPcjs.P; exports.retryRequestDataSilos = _chunkDFOLIGJPcjs.T; exports.retryRequestEnricher = _chunkT66BMKXUcjs.se; exports.setResourceAttributes = _chunkT66BMKXUcjs.re; exports.skipPreflightJobs = _chunkDFOLIGJPcjs.R; exports.skipRequestDataSilos = _chunkDFOLIGJPcjs.V; exports.splitCsvToList = _chunkDFOLIGJPcjs.n; exports.streamPrivacyRequestFiles = _chunkDFOLIGJPcjs.E; exports.submitPrivacyRequest = _chunkDFOLIGJPcjs.H; exports.syncAction = _chunkT66BMKXUcjs.cd; exports.syncActionItemCollections = _chunkT66BMKXUcjs.od; exports.syncActionItems = _chunkT66BMKXUcjs.sd; exports.syncAgentFiles = _chunkT66BMKXUcjs.Ad; exports.syncAgentFunctions = _chunkT66BMKXUcjs.wd; exports.syncAgents = _chunkT66BMKXUcjs.ld; exports.syncAttribute = _chunkT66BMKXUcjs.ec; exports.syncBusinessEntities = _chunkT66BMKXUcjs.Zc; exports.syncCodePackages = _chunkT66BMKXUcjs.ke; exports.syncConfigurationToTranscend = _chunkT66BMKXUcjs.Nd; exports.syncConsentManager = _chunkT66BMKXUcjs.Sc; exports.syncConsentManagerExperiences = _chunkT66BMKXUcjs.Rc; exports.syncCookies = _chunkT66BMKXUcjs.wc; exports.syncDataCategories = _chunkT66BMKXUcjs.Id; exports.syncDataFlows = _chunkT66BMKXUcjs.bd; exports.syncDataSiloDependencies = _chunkT66BMKXUcjs.oc; exports.syncDataSilos = _chunkT66BMKXUcjs.nc; exports.syncDataSubject = _chunkT66BMKXUcjs.yc; exports.syncEnricher = _chunkT66BMKXUcjs.dc; exports.syncIdentifier = _chunkT66BMKXUcjs.bc; exports.syncIntlMessages = _chunkT66BMKXUcjs.Mc; exports.syncPartitions = _chunkT66BMKXUcjs.Pc; exports.syncPolicies = _chunkT66BMKXUcjs.Kc; exports.syncPrivacyCenter = _chunkT66BMKXUcjs.Nc; exports.syncProcessingPurposes = _chunkT66BMKXUcjs.Md; exports.syncPrompts = _chunkT66BMKXUcjs.Fc; exports.syncRepositories = _chunkT66BMKXUcjs.he; exports.syncSoftwareDevelopmentKits = _chunkT66BMKXUcjs.ee; exports.syncTemplate = _chunkT66BMKXUcjs.ed; exports.syncVendors = _chunkT66BMKXUcjs.Ed; exports.updateActionItem = _chunkT66BMKXUcjs.rd; exports.updateActionItemCollection = _chunkT66BMKXUcjs.nd; exports.updateAgentFiles = _chunkT66BMKXUcjs.zd; exports.updateAgentFunctions = _chunkT66BMKXUcjs.vd; exports.updateAgents = _chunkT66BMKXUcjs.kd; exports.updateBusinessEntities = _chunkT66BMKXUcjs.Yc; exports.updateCodePackages = _chunkT66BMKXUcjs.je; exports.updateConsentManagerToLatest = _chunkT66BMKXUcjs.Me; exports.updateConsentManagerVersionToLatest = _chunkJQ7LX2L3cjs.a; exports.updateDataCategories = _chunkT66BMKXUcjs.Hd; exports.updateDataFlows = _chunkT66BMKXUcjs.$c; exports.updateIntlMessages = _chunkT66BMKXUcjs.Lc; exports.updateOrCreateCookies = _chunkT66BMKXUcjs.vc; exports.updatePolicies = _chunkT66BMKXUcjs.Jc; exports.updateProcessingPurposes = _chunkT66BMKXUcjs.Ld; exports.updatePrompts = _chunkT66BMKXUcjs.Ec; exports.updateRepositories = _chunkT66BMKXUcjs.ge; exports.updateSoftwareDevelopmentKits = _chunkT66BMKXUcjs.de; exports.updateVendors = _chunkT66BMKXUcjs.Dd; exports.uploadConsents = _chunkLD6RM4JJcjs.f; exports.uploadCookiesFromCsv = _chunkJQ7LX2L3cjs.c; exports.uploadDataFlowsFromCsv = _chunkJQ7LX2L3cjs.b; exports.uploadPrivacyRequestsFromCsv = _chunkDFOLIGJPcjs.O; exports.uploadSiloDiscoveryResults = _chunkT66BMKXUcjs.le; exports.validateTranscendAuth = _chunkMYCE3NIEcjs.b; exports.version = _chunkUM5F6R4Icjs.m; exports.writeCsv = _chunkZVK4HIDFcjs.c; exports.writeCsvSync = _chunkZVK4HIDFcjs.a; exports.writeLargeCsv = _chunkZVK4HIDFcjs.e; exports.writeTranscendYaml = _chunkL7NHDBBNcjs.e;
5
5
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/cli/cli/dist/index.cjs","../src/lib/ai/TranscendPromptManager.ts","../src/lib/graphql/fetchLargeLanguageModels.ts","../src/lib/ai/getGitFilesThatChanged.ts"],"names":["PAGE_SIZE","fetchAllLargeLanguageModels","client","largeLanguageModels","offset","shouldContinue","nodes","makeGraphQLRequest","LARGE_LANGUAGE_MODELS","a","b","createRegexForTag","tagName","defineTranscendPrompts","prompts","jsonParseSafe","obj","TranscendPromptManager","handlebarsOptions","transcendUrl","DEFAULT_TRANSCEND_API","transcendApiKey","requireApproval","cacheDuration","defaultVariables","buildTranscendGraphQLClient","createHandlebarsWithHelpers","promptDefinitions","getValues","promptIds","id","x","promptTitles","title","agentNames","uniq_default","response","agents","fetchPromptsWithVariables","fetchAllAgents","keyBy_default","model","promptByTitle","promptById","acc","v","partial","apply","result","name","agent","remoteAgent","ts","thread","fetchAllPromptThreads","names","hasCache","missingCache","groupBy_default","cachedAgents","chunkedNames","chunk_default","remoteAgents","mapSeries","chunkedName","pageOfAgents","filterBy","fetchAllAgentFiles","largeLanguageModel","matching"],"mappings":"AAAA,6OAAiE,wDAAkD,wDAA0C,wDAA0D,wDAA0C,wDAA0E,wDAAkE,wDAA0F,wDAA0E,wDAAkH,wDAAkE,wDAA0a,wDAAgmB,wDAAgD,wDAAkvF,gCAA6B,wDAAyG,wDAAkD,wDAA4E,qDCO9wJ,iEAkBA,2DAaA,ICtBDA,CAAAA,CAAY,EAAA,CAQlB,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CAC+B,CAC/B,IAAMC,CAAAA,CAA4C,CAAC,CAAA,CAC/CC,CAAAA,CAAS,CAAA,CAGTC,CAAAA,CAAiB,CAAA,CAAA,CACrB,EAAG,CAC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CAAK,aAAA,CAAeD,CAAQ,CACxD,CAQA,qBAAA,CACEE,CAAAA,CACoB,CACpB,IAAMC,CAAAA,CAAW,IAAA,CAAK,mBAAA,CAAoB,IAAA,CAAM5B,CAAAA,EAC9C,OAAO2B,CAAAA,EAAuB,QAAA,CAC1B3B,CAAAA,CAAM,EAAA,GAAO2B,CAAAA,CACb3B,CAAAA,CAAM,IAAA,GAAS2B,CAAAA,CAAmB,IAAA,EAClC3B,CAAAA,CAAM,MAAA,GAAW2B,CAAAA,CAAmB,MAC1C,CAAA,CACA,EAAA,CAAI,CAACC,CAAAA,CACH,MAAM,IAAI,KAAA,CACR,CAAA,+BAAA,EACE,OAAOD,CAAAA,EAAuB,QAAA,CAC1BA,CAAAA,CACA,IAAA,CAAK,SAAA,CAAUA,CAAkB,CACvC,CAAA,CAAA;AE1ZG;AAiBI;AA4Bf","file":"/home/runner/work/cli/cli/dist/index.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport {\n Optionalize,\n Requirize,\n apply,\n decodeCodec,\n getValues,\n} from '@transcend-io/type-utils';\nimport type { Handlebars } from '@transcend-io/handlebars-utils';\nimport { Secret } from '@transcend-io/secret-value';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport {\n Agent,\n AgentFile,\n AgentFileFilterBy,\n ReportPromptRunInput,\n buildTranscendGraphQLClient,\n fetchAllAgentFiles,\n fetchAllAgents,\n reportPromptRun,\n} from '../graphql';\nimport {\n HandlebarsInput,\n createHandlebarsWithHelpers,\n} from '@transcend-io/handlebars-utils';\nimport {\n TranscendPromptTemplated,\n TranscendPromptsAndVariables,\n fetchPromptsWithVariables,\n} from '../graphql/fetchPrompts';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n PromptStatus,\n ChatCompletionRole,\n PromptRunProductArea,\n QueueStatus,\n LargeLanguageModelClient,\n} from '@transcend-io/privacy-types';\nimport {\n LargeLanguageModel,\n fetchAllLargeLanguageModels,\n} from '../graphql/fetchLargeLanguageModels';\nimport { groupBy, keyBy, uniq, chunk } from 'lodash-es';\nimport { mapSeries } from '../bluebird-replace';\nimport {\n PromptThread,\n fetchAllPromptThreads,\n} from '../graphql/fetchPromptThreads';\n\n/**\n * An LLM Prompt definition\n */\nexport type TranscendPrompt<\n TInputParams extends t.Any,\n TOutputCodec extends t.Any,\n> = (\n | {\n /** ID of the prompt */\n id: string;\n /** Title of the prompt */\n title?: string;\n }\n | {\n /** ID of the prompt */\n id?: string;\n /** Title of the prompt */\n title: string;\n }\n) & {\n /** The names of the agents that should be loaded along with the prompt */\n agentNames?: string[];\n /** Codec to validate runtime input shape */\n paramCodec: TInputParams;\n /** Codec to validate output response */\n outputCodec: TOutputCodec;\n /**\n * If the output that needs to be parsed is returned within a tag\n * e.g. <tag> or <json> - this is the name of the tag\n */\n extractFromTag?: string;\n};\n\nexport interface PromptRunResult {\n /** The ID of the prompt run created on Transcend */\n promptRunId: string;\n /** The URL of the prompt run on Transcend */\n promptRunUrl: string;\n}\n\n/**\n * Create a regex to extract data from a tag\n *\n * Input:\n * \"here is some data <tag>Data</tag>...\"\n *\n * @param tagName - Name of tag\n * @returns Data within the tag\n */\nexport function createRegexForTag(tagName: string): RegExp {\n return new RegExp(`<${tagName}>([\\\\s\\\\S]+?)<\\\\/${tagName}>`);\n}\n\n/**\n * Helper function to declare prompts\n *\n * @param prompts - Prompt config\n * @returns Prompts as identity function - but type enforced\n */\nexport function defineTranscendPrompts<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n>(prompts: TPrompts): TPrompts {\n return prompts;\n}\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptParamType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['paramCodec']>;\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptResponseType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n\n/**\n * Input for reporting a prompt run\n */\nexport interface ReportPromptRunOptions\n extends Optionalize<\n Omit<ReportPromptRunInput, 'status' | 'promptId' | 'largeLanguageModelId'>,\n 'name' | 'productArea'\n > {\n /** The large language model being run. Either the ID of the LLM or the client/name pairing */\n largeLanguageModel:\n | string\n | {\n /** Name of client */\n client: LargeLanguageModelClient;\n /** Name of the model */\n name: string;\n };\n}\n\nconst jsonParseSafe = (obj: string): unknown => {\n try {\n return JSON.parse(obj);\n } catch (e) {\n return obj;\n }\n};\n\n/**\n * A class that is capable of loading and insert variables into prompts from\n * Transcend's Prompt Manager\n */\nexport class TranscendPromptManager<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n> {\n /** Prompt definitions */\n public prompts: TPrompts;\n\n /** Options for configuring handlebars */\n public handlebarsOptions!: HandlebarsInput;\n\n /** Prompt name -> content map, populated by call to Transcend API */\n public promptContentMap?: { [k in TPromptNames]: TranscendPromptTemplated };\n\n /** The large language models that are registered to this organization for reporting */\n public largeLanguageModels: LargeLanguageModel[] = [];\n\n /** The agent definitions registered to this organization */\n private agentsByName: { [name in string]: Agent } = {};\n\n /** The agent definitions registered to this organization */\n private agentsByAgentId: { [id in string]: Agent } = {};\n\n /** The GraphQL client that can be used to call Transcend */\n public graphQLClient: GraphQLClient;\n\n /** The set of variables to expose in handlebars context specified at class initiation */\n public defaultVariables: { [k in string]: unknown };\n\n /**\n * The set of variables to expose in handlebars context,\n * merges defaults with calculated variables from the inventory\n */\n public variables: { [k in string]: unknown };\n\n /** Handlebars compiler */\n public handlebars: typeof Handlebars;\n\n /** The Transcend API key */\n public transcendApiKey: string | Secret<string>;\n\n /** API of Transcend to call */\n public transcendUrl: string;\n\n /** When true, throw an error if the prompt is not approved */\n public requireApproval: boolean;\n\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n public cacheDuration?: number;\n\n /**\n * The last time the metadata was fetched\n */\n public lastUpdatedAt?: Date;\n\n /**\n * Constructor\n *\n * @param options - Options\n */\n constructor({\n prompts,\n handlebarsOptions = {},\n transcendUrl = DEFAULT_TRANSCEND_API,\n transcendApiKey,\n requireApproval = true,\n cacheDuration,\n defaultVariables = {},\n }: {\n /** Prompt definitions to load */\n prompts: TPrompts;\n /** Options for configuring handlebars */\n handlebarsOptions?: HandlebarsInput;\n /** The Transcend API key */\n transcendApiKey: string | Secret<string>;\n /** API of Transcend to call */\n transcendUrl?: string;\n /** When true, throw an error if the prompt is not approved */\n requireApproval?: boolean;\n /** The set of variables to expose in handlebars context specified at class initiation */\n defaultVariables?: { [k in string]: unknown };\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n cacheDuration?: number;\n }) {\n this.prompts = prompts;\n this.transcendUrl = transcendUrl;\n this.transcendApiKey = transcendApiKey;\n this.variables = defaultVariables;\n this.defaultVariables = defaultVariables;\n this.graphQLClient = buildTranscendGraphQLClient(\n transcendUrl,\n typeof transcendApiKey === 'object'\n ? transcendApiKey.release()\n : transcendApiKey,\n );\n this.requireApproval = requireApproval;\n this.cacheDuration = cacheDuration;\n this.handlebarsOptions = handlebarsOptions;\n this.handlebars = createHandlebarsWithHelpers(handlebarsOptions);\n }\n\n /**\n * Fetch prompt metadata from Transcend and cache to the class definition\n *\n * @returns A function that can be used to call the prompt\n */\n async fetchPromptsAndMetadata(): Promise<TranscendPromptsAndVariables> {\n // Determine what to fetch\n const promptDefinitions = getValues(this.prompts) as TranscendPrompt<\n t.Any,\n t.Any\n >[];\n const promptIds = promptDefinitions\n .map(({ id }) => id)\n .filter((x): x is string => !!x);\n const promptTitles = promptDefinitions\n .map(({ title }) => title)\n .filter((x): x is string => !!x);\n const agentNames = uniq(\n promptDefinitions.map(({ agentNames }) => agentNames || []).flat(),\n );\n\n // Fetch prompts and data\n const [response, largeLanguageModels, agents] = await Promise.all([\n fetchPromptsWithVariables(this.graphQLClient, {\n promptIds,\n promptTitles,\n }),\n fetchAllLargeLanguageModels(this.graphQLClient),\n fetchAllAgents(this.graphQLClient, { names: agentNames }),\n ]);\n this.agentsByName = keyBy(agents, 'name');\n this.agentsByAgentId = keyBy(agents, 'agentId');\n this.largeLanguageModels = largeLanguageModels.filter(\n (model) => model.isTranscendHosted === false,\n );\n\n // Lookup prompts by id/title\n const promptByTitle = keyBy(response.prompts, 'title');\n const promptById = keyBy(response.prompts, 'id');\n\n // Update variables\n this.variables = {\n ...response.calculatedVariables.reduce(\n (acc, v) =>\n Object.assign(acc, {\n [v.name]: v.data ? JSON.parse(v.data) : v.data,\n }),\n {},\n ),\n ...this.defaultVariables,\n };\n\n // Update partials\n this.handlebars = createHandlebarsWithHelpers({\n ...this.handlebarsOptions,\n templates: [\n ...(this.handlebarsOptions.templates || []),\n ...response.promptPartials.map((partial) => ({\n name: partial.slug,\n content: partial.content,\n })),\n ],\n });\n\n // Create mapping from prompt to content\n this.promptContentMap = apply(this.prompts, ({ id, title }) => {\n const result = id\n ? promptById[id]\n : title\n ? promptByTitle[title]\n : undefined;\n if (!result) {\n throw new Error(\n `Failed to find prompt with title: \"${title}\" and id: \"${id}\"`,\n );\n }\n return result;\n });\n\n // For cache\n this.lastUpdatedAt = new Date();\n\n return response;\n }\n\n /**\n * Get an agent definition by name\n *\n * @param name - Name of the agent to grab\n * @returns Large language model configuration\n */\n async getAgentByName(name: string): Promise<Agent | undefined> {\n const agent = this.agentsByName[name];\n if (agent) {\n return agent;\n }\n const [remoteAgent] = await fetchAllAgents(this.graphQLClient, {\n names: [name],\n });\n if (!remoteAgent) {\n return undefined;\n }\n this.agentsByName[remoteAgent.name] = remoteAgent;\n this.agentsByAgentId[remoteAgent.agentId] = remoteAgent;\n return remoteAgent;\n }\n\n /**\n * Get a prompt thread by ts\n *\n * @param ts - the slack message timestamp to look up thread for\n * @returns Large language model configuration\n */\n async getPromptThreadBySlackTs(\n ts: string,\n ): Promise<PromptThread | undefined> {\n const [thread] = await fetchAllPromptThreads(this.graphQLClient, {\n slackMessageTs: [ts],\n });\n return thread;\n }\n\n /**\n * Get a list of agent definitions by name.\n * Pulls from cache and may return less agents\n * than requested if some are not found\n *\n * @param names - Names of agents to fetch\n * @returns The agents that were found matching the names\n */\n async getAgentsByName(names: string[]): Promise<Agent[]> {\n if (names.length < 1) {\n throw new Error('Expected at least one name to be provided');\n }\n const { hasCache = [], missingCache = [] } = groupBy(names, (name) =>\n this.agentsByName[name] ? 'hasCache' : 'missingCache',\n );\n const cachedAgents = hasCache.map((name) => this.agentsByName[name]);\n if (missingCache.length === 0) {\n return cachedAgents;\n }\n const chunkedNames = chunk(missingCache, 50);\n const remoteAgents: Agent[] = [];\n await mapSeries(chunkedNames, async (chunkedName) => {\n const pageOfAgents = await fetchAllAgents(this.graphQLClient, {\n names: chunkedName,\n });\n pageOfAgents.forEach((agent) => {\n this.agentsByName[agent.name] = agent;\n this.agentsByAgentId[agent.agentId] = agent;\n });\n remoteAgents.push(...pageOfAgents);\n });\n return [...cachedAgents, ...remoteAgents];\n }\n\n /**\n * Fetch metadata on agent files\n *\n * @param filterBy - Filter by parameters\n * @returns The files found matching the filter\n */\n getAgentFiles(filterBy: AgentFileFilterBy): Promise<AgentFile[]> {\n return fetchAllAgentFiles(this.graphQLClient, filterBy);\n }\n\n /**\n * Look up the large language model to report on\n *\n * @param largeLanguageModel - Input\n * @returns Large language model configuration\n */\n getLargeLanguageModel(\n largeLanguageModel: ReportPromptRunOptions['largeLanguageModel'],\n ): LargeLanguageModel {\n const matching = this.largeLanguageModels.find((model) =>\n typeof largeLanguageModel === 'string'\n ? model.id === largeLanguageModel\n : model.name === largeLanguageModel.name &&\n model.client === largeLanguageModel.client,\n );\n if (!matching) {\n throw new Error(\n `Failed to find model matching: ${\n typeof largeLanguageModel === 'string'\n ? largeLanguageModel\n : JSON.stringify(largeLanguageModel)\n }`,\n );\n }\n return matching;\n }\n\n /**\n * Get a prompt definition by name\n *\n * @param promptName - Prompt to compile\n * @returns Parsed content\n */\n async getPromptDefinition<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n ): Promise<TranscendPromptTemplated> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n // Lookup prompt\n const { promptContentMap } = this;\n if (!promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n const promptTemplate = promptContentMap[promptName];\n if (!promptTemplate) {\n throw new Error(\n `Expected this.promptContentMap[${promptName}] to be defined`,\n );\n }\n return promptTemplate;\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to compile\n * @param params - Runtime parameters\n * @returns Parsed content\n */\n async compilePrompt<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n params: t.TypeOf<TPrompts[TPromptName]['paramCodec']>,\n ): Promise<string> {\n // Grab the prompt\n const promptTemplate = await this.getPromptDefinition(promptName);\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure prompt is approved\n if (\n this.requireApproval &&\n promptTemplate.status !== PromptStatus.Approved\n ) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because its in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // If prompt is rejected, throw error\n if (promptTemplate.status === PromptStatus.Rejected) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because it's in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // Validate params\n decodeCodec(promptInput.paramCodec, params);\n\n // Compile prompt and template\n return this.handlebars.compile(promptTemplate.content)({\n // template in currentDate by default\n currentDate: new Date().toISOString(),\n ...this.variables,\n ...params,\n });\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to parse\n * @param response - AI response as string\n * @returns Parsed content\n */\n parseAiResponse<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n response: string,\n ): t.TypeOf<TPrompts[TPromptName]['outputCodec']> {\n // Look up prompt info\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Extract from tag if needed\n const extracted = promptInput.extractFromTag\n ? (createRegexForTag(promptInput.extractFromTag).exec(response) ||\n [])[1] || response\n : response;\n\n // Parse via codec\n return decodeCodec(\n promptInput.outputCodec,\n jsonParseSafe(extracted),\n false,\n );\n }\n\n /**\n * Parse the AI response and report back to Transcend\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportAndParsePromptRun<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n { largeLanguageModel, ...options }: ReportPromptRunOptions,\n ): Promise<\n PromptRunResult & {\n /** Resulting prompt run */\n result: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n }\n > {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n if (\n options.promptRunMessages[options.promptRunMessages.length - 1].role !==\n ChatCompletionRole.Assistant\n ) {\n throw new Error(\n `promptRunMessages[${\n options.promptRunMessages.length - 1\n }].role is expected to be = ${ChatCompletionRole.Assistant}`,\n );\n }\n const response =\n options.promptRunMessages[options.promptRunMessages.length - 1].content;\n\n let parsed: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n try {\n // Parse the response\n parsed = this.parseAiResponse(promptName, response);\n } catch (err) {\n await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n error: err.message,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n throw err;\n }\n\n // report successful run\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Resolved,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n result: parsed,\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n\n /**\n * Report an error for a particular prompt\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportPromptRunError<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n {\n largeLanguageModel,\n ...options\n }: Requirize<ReportPromptRunOptions, 'error'>,\n ): Promise<PromptRunResult> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n}\n/* eslint-enable max-lines */\n","import { GraphQLClient } from 'graphql-request';\nimport { LargeLanguageModelClient } from '@transcend-io/privacy-types';\nimport { LARGE_LANGUAGE_MODELS } from './gqls';\nimport { makeGraphQLRequest } from './makeGraphQLRequest';\n\nexport interface LargeLanguageModel {\n /** ID of prompts */\n id: string;\n /** The name of the large language model. */\n name: string;\n /** The content of the prompt template. */\n client: LargeLanguageModelClient;\n /** Whether hosted by Transcend or not */\n isTranscendHosted: boolean;\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all LargeLanguageModels in the organization\n *\n * @param client - GraphQL client\n * @returns All LargeLanguageModels in the organization\n */\nexport async function fetchAllLargeLanguageModels(\n client: GraphQLClient,\n): Promise<LargeLanguageModel[]> {\n const largeLanguageModels: LargeLanguageModel[] = [];\n let offset = 0;\n\n // Whether to continue looping\n let shouldContinue = false;\n do {\n const {\n largeLanguageModels: { nodes },\n } = await makeGraphQLRequest<{\n /** LargeLanguageModels */\n largeLanguageModels: {\n /** List */\n nodes: LargeLanguageModel[];\n };\n }>(client, LARGE_LANGUAGE_MODELS, {\n first: PAGE_SIZE,\n offset,\n });\n largeLanguageModels.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return largeLanguageModels.sort((a, b) => a.name.localeCompare(b.name));\n}\n","import { difference } from 'lodash-es';\nimport fastGlob from 'fast-glob';\nimport { execSync } from 'child_process';\n\n/**\n * Function thats gets the git files that have changed\n * and returns the code\n *\n * @param options - Options\n * @returns Changes files and diffs\n */\nexport function getGitFilesThatChanged({\n baseBranch,\n rootDirectory,\n githubRepo,\n excludedGlob = [],\n fileBlockList = [],\n}: {\n /** Base branch */\n baseBranch: string;\n /** Github repo name */\n githubRepo: string;\n /** Root directory */\n rootDirectory: string;\n /** A glob that excludes files */\n excludedGlob?: string[];\n /** Block list of files to not process */\n fileBlockList?: string[];\n}): {\n /** The list of files that changed */\n changedFiles: string[];\n /** Github repo name */\n repoName: string;\n /** Current commit */\n commit: string;\n /** File diffs */\n fileDiffs: { [k in string]: string };\n} {\n // Pull base branch\n execSync(`git fetch origin ${baseBranch}`);\n\n // Latest commit on base branch. If we are on the base branch, we take the prior commit\n const latestBasedCommit = execSync(\n `git ls-remote ${githubRepo} \"refs/heads/${baseBranch}\" | cut -f 1`,\n { encoding: 'utf-8' },\n ).split('\\n')[0];\n\n // This commit\n const latestThisCommit = execSync('git rev-parse HEAD', {\n encoding: 'utf-8',\n }).split('\\n')[0];\n\n // Ensure commits are present\n if (!latestBasedCommit || !latestThisCommit) {\n throw new Error('FAILED TO FIND COMMIT RANGE');\n }\n\n // Get the diff between the given branch and base branch\n const diff = execSync(\n `git fetch && git diff --name-only \"${\n baseBranch || latestBasedCommit\n }...${latestThisCommit}\" -- ${rootDirectory}`,\n { encoding: 'utf-8' },\n );\n\n // Filter out block list\n const changedFiles = difference(\n diff.split('\\n').filter((f) => f),\n fileBlockList,\n );\n\n // Filter out globs\n const filteredChanges =\n excludedGlob.length > 0\n ? fastGlob.sync(changedFiles, { ignore: excludedGlob })\n : changedFiles;\n\n // Get the contents of only the changed files\n const fileDiffs: { [k in string]: string } = {};\n filteredChanges.forEach((file) => {\n const contents = execSync(`git show ${latestThisCommit}:${file}`, {\n encoding: 'utf-8',\n });\n fileDiffs[file] = contents;\n });\n\n // Pull the github repo name\n const repoName = githubRepo.split('/').pop()!.split('.')[0];\n\n return {\n changedFiles,\n fileDiffs,\n repoName,\n commit: latestThisCommit,\n };\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/cli/cli/dist/index.cjs","../src/lib/ai/TranscendPromptManager.ts","../src/lib/graphql/fetchLargeLanguageModels.ts","../src/lib/ai/getGitFilesThatChanged.ts"],"names":["PAGE_SIZE","fetchAllLargeLanguageModels","client","largeLanguageModels","offset","shouldContinue","nodes","makeGraphQLRequest","LARGE_LANGUAGE_MODELS","a","b","createRegexForTag","tagName","defineTranscendPrompts","prompts","jsonParseSafe","obj","TranscendPromptManager","handlebarsOptions","transcendUrl","DEFAULT_TRANSCEND_API","transcendApiKey","requireApproval","cacheDuration","defaultVariables","buildTranscendGraphQLClient","createHandlebarsWithHelpers","promptDefinitions","getValues","promptIds","id","x","promptTitles","title","agentNames","uniq_default","response","agents","fetchPromptsWithVariables","fetchAllAgents","keyBy_default","model","promptByTitle","promptById","acc","v","partial","apply","result","name","agent","remoteAgent","ts","thread","fetchAllPromptThreads","names","hasCache","missingCache","groupBy_default","cachedAgents","chunkedNames","chunk_default","remoteAgents","mapSeries","chunkedName","pageOfAgents","filterBy","fetchAllAgentFiles","largeLanguageModel","matching"],"mappings":"AAAA,6OAAiE,wDAAkD,wDAA0C,wDAA0D,wDAA0C,wDAA0E,wDAAkE,wDAA0F,wDAA0E,wDAAkH,wDAAkE,wDAA0a,wDAAgmB,wDAAgD,wDAA0sF,gCAA6B,wDAAyH,wDAAqF,wDAA4E,qDCOzxJ,iEAkBA,2DAaA,ICtBDA,CAAAA,CAAY,EAAA,CAQlB,MAAA,SAAsBC,CAAAA,CACpBC,CAAAA,CAC+B,CAC/B,IAAMC,CAAAA,CAA4C,CAAC,CAAA,CAC/CC,CAAAA,CAAS,CAAA,CAGTC,CAAAA,CAAiB,CAAA,CAAA,CACrB,EAAG,CACD,GAAM,CACJ,mBAAA,CAAqB,CAAE,KAAA,CAAAC,CAAM,CAC/B,CAAA,CAAI,MAAMC,kCAAAA,CAMPL,CAAQM,oBAAAA,CAAuB,CAChC,KAAA,CAAOR,CAAAA,CACP,MAAA,CAAAI,CACF,CAAC,CAAA,CACDD,CAAAA,CAAoB,IAAA,CAAK,GAAGG,CAAK,CAAA,CACjCF,CAAAA,EAAUJ,CAAAA,CACVK,CAAAA,CAAiBC,CAAAA,CAAM,MAAA,GAAWN,CACpC,CAAA,KAAA,CAASK,CAAAA,CAAAA,CAET,OAAOF,CAAAA,CAAoB,IAAA,CAAK,CAACM,CAAAA,CAAGC,CAAAA,CAAAA,EAAMD,CAAAA,CAAE,IAAA,CAAK,aAAA,CAAcC,CAAAA,CAAE,IAAI,CAAC,CACxE,CDgDO,SAASC,CAAAA,CAAkBC,CAAAA,CAAyB,CACzD,OAAO,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cli/dist/index.cjs","sourcesContent":[null,"/* eslint-disable max-lines */\nimport {\n Optionalize,\n Requirize,\n apply,\n decodeCodec,\n getValues,\n} from '@transcend-io/type-utils';\nimport type { Handlebars } from '@transcend-io/handlebars-utils';\nimport { Secret } from '@transcend-io/secret-value';\nimport * as t from 'io-ts';\nimport { DEFAULT_TRANSCEND_API } from '../../constants';\nimport {\n Agent,\n AgentFile,\n AgentFileFilterBy,\n ReportPromptRunInput,\n buildTranscendGraphQLClient,\n fetchAllAgentFiles,\n fetchAllAgents,\n reportPromptRun,\n} from '../graphql';\nimport {\n HandlebarsInput,\n createHandlebarsWithHelpers,\n} from '@transcend-io/handlebars-utils';\nimport {\n TranscendPromptTemplated,\n TranscendPromptsAndVariables,\n fetchPromptsWithVariables,\n} from '../graphql/fetchPrompts';\nimport { GraphQLClient } from 'graphql-request';\nimport {\n PromptStatus,\n ChatCompletionRole,\n PromptRunProductArea,\n QueueStatus,\n LargeLanguageModelClient,\n} from '@transcend-io/privacy-types';\nimport {\n LargeLanguageModel,\n fetchAllLargeLanguageModels,\n} from '../graphql/fetchLargeLanguageModels';\nimport { groupBy, keyBy, uniq, chunk } from 'lodash-es';\nimport { mapSeries } from '../bluebird-replace';\nimport {\n PromptThread,\n fetchAllPromptThreads,\n} from '../graphql/fetchPromptThreads';\n\n/**\n * An LLM Prompt definition\n */\nexport type TranscendPrompt<\n TInputParams extends t.Any,\n TOutputCodec extends t.Any,\n> = (\n | {\n /** ID of the prompt */\n id: string;\n /** Title of the prompt */\n title?: string;\n }\n | {\n /** ID of the prompt */\n id?: string;\n /** Title of the prompt */\n title: string;\n }\n) & {\n /** The names of the agents that should be loaded along with the prompt */\n agentNames?: string[];\n /** Codec to validate runtime input shape */\n paramCodec: TInputParams;\n /** Codec to validate output response */\n outputCodec: TOutputCodec;\n /**\n * If the output that needs to be parsed is returned within a tag\n * e.g. <tag> or <json> - this is the name of the tag\n */\n extractFromTag?: string;\n};\n\nexport interface PromptRunResult {\n /** The ID of the prompt run created on Transcend */\n promptRunId: string;\n /** The URL of the prompt run on Transcend */\n promptRunUrl: string;\n}\n\n/**\n * Create a regex to extract data from a tag\n *\n * Input:\n * \"here is some data <tag>Data</tag>...\"\n *\n * @param tagName - Name of tag\n * @returns Data within the tag\n */\nexport function createRegexForTag(tagName: string): RegExp {\n return new RegExp(`<${tagName}>([\\\\s\\\\S]+?)<\\\\/${tagName}>`);\n}\n\n/**\n * Helper function to declare prompts\n *\n * @param prompts - Prompt config\n * @returns Prompts as identity function - but type enforced\n */\nexport function defineTranscendPrompts<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n>(prompts: TPrompts): TPrompts {\n return prompts;\n}\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptParamType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['paramCodec']>;\n\n/**\n * Helper to get the type of the parameter for a given prompt\n */\nexport type GetPromptResponseType<\n TPromptName extends keyof TPrompts,\n TPrompts extends { [k in TPromptName]: TranscendPrompt<t.Any, t.Any> },\n> = t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n\n/**\n * Input for reporting a prompt run\n */\nexport interface ReportPromptRunOptions\n extends Optionalize<\n Omit<ReportPromptRunInput, 'status' | 'promptId' | 'largeLanguageModelId'>,\n 'name' | 'productArea'\n > {\n /** The large language model being run. Either the ID of the LLM or the client/name pairing */\n largeLanguageModel:\n | string\n | {\n /** Name of client */\n client: LargeLanguageModelClient;\n /** Name of the model */\n name: string;\n };\n}\n\nconst jsonParseSafe = (obj: string): unknown => {\n try {\n return JSON.parse(obj);\n } catch (e) {\n return obj;\n }\n};\n\n/**\n * A class that is capable of loading and insert variables into prompts from\n * Transcend's Prompt Manager\n */\nexport class TranscendPromptManager<\n TPromptNames extends string,\n TPrompts extends { [k in TPromptNames]: TranscendPrompt<t.Any, t.Any> },\n> {\n /** Prompt definitions */\n public prompts: TPrompts;\n\n /** Options for configuring handlebars */\n public handlebarsOptions!: HandlebarsInput;\n\n /** Prompt name -> content map, populated by call to Transcend API */\n public promptContentMap?: { [k in TPromptNames]: TranscendPromptTemplated };\n\n /** The large language models that are registered to this organization for reporting */\n public largeLanguageModels: LargeLanguageModel[] = [];\n\n /** The agent definitions registered to this organization */\n private agentsByName: { [name in string]: Agent } = {};\n\n /** The agent definitions registered to this organization */\n private agentsByAgentId: { [id in string]: Agent } = {};\n\n /** The GraphQL client that can be used to call Transcend */\n public graphQLClient: GraphQLClient;\n\n /** The set of variables to expose in handlebars context specified at class initiation */\n public defaultVariables: { [k in string]: unknown };\n\n /**\n * The set of variables to expose in handlebars context,\n * merges defaults with calculated variables from the inventory\n */\n public variables: { [k in string]: unknown };\n\n /** Handlebars compiler */\n public handlebars: typeof Handlebars;\n\n /** The Transcend API key */\n public transcendApiKey: string | Secret<string>;\n\n /** API of Transcend to call */\n public transcendUrl: string;\n\n /** When true, throw an error if the prompt is not approved */\n public requireApproval: boolean;\n\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n public cacheDuration?: number;\n\n /**\n * The last time the metadata was fetched\n */\n public lastUpdatedAt?: Date;\n\n /**\n * Constructor\n *\n * @param options - Options\n */\n constructor({\n prompts,\n handlebarsOptions = {},\n transcendUrl = DEFAULT_TRANSCEND_API,\n transcendApiKey,\n requireApproval = true,\n cacheDuration,\n defaultVariables = {},\n }: {\n /** Prompt definitions to load */\n prompts: TPrompts;\n /** Options for configuring handlebars */\n handlebarsOptions?: HandlebarsInput;\n /** The Transcend API key */\n transcendApiKey: string | Secret<string>;\n /** API of Transcend to call */\n transcendUrl?: string;\n /** When true, throw an error if the prompt is not approved */\n requireApproval?: boolean;\n /** The set of variables to expose in handlebars context specified at class initiation */\n defaultVariables?: { [k in string]: unknown };\n /**\n * The cache duration in ms for how long prompts and associated metadata should be cached\n * When undefined - prompts are cached indefinitely unless explicitly re-requested\n * When 0, prompts and metadata are fetched every time (not recommended)\n * Setting this to be an hour is a good rate that optimizes for performance and keeping up to date\n */\n cacheDuration?: number;\n }) {\n this.prompts = prompts;\n this.transcendUrl = transcendUrl;\n this.transcendApiKey = transcendApiKey;\n this.variables = defaultVariables;\n this.defaultVariables = defaultVariables;\n this.graphQLClient = buildTranscendGraphQLClient(\n transcendUrl,\n typeof transcendApiKey === 'object'\n ? transcendApiKey.release()\n : transcendApiKey,\n );\n this.requireApproval = requireApproval;\n this.cacheDuration = cacheDuration;\n this.handlebarsOptions = handlebarsOptions;\n this.handlebars = createHandlebarsWithHelpers(handlebarsOptions);\n }\n\n /**\n * Fetch prompt metadata from Transcend and cache to the class definition\n *\n * @returns A function that can be used to call the prompt\n */\n async fetchPromptsAndMetadata(): Promise<TranscendPromptsAndVariables> {\n // Determine what to fetch\n const promptDefinitions = getValues(this.prompts) as TranscendPrompt<\n t.Any,\n t.Any\n >[];\n const promptIds = promptDefinitions\n .map(({ id }) => id)\n .filter((x): x is string => !!x);\n const promptTitles = promptDefinitions\n .map(({ title }) => title)\n .filter((x): x is string => !!x);\n const agentNames = uniq(\n promptDefinitions.map(({ agentNames }) => agentNames || []).flat(),\n );\n\n // Fetch prompts and data\n const [response, largeLanguageModels, agents] = await Promise.all([\n fetchPromptsWithVariables(this.graphQLClient, {\n promptIds,\n promptTitles,\n }),\n fetchAllLargeLanguageModels(this.graphQLClient),\n fetchAllAgents(this.graphQLClient, { names: agentNames }),\n ]);\n this.agentsByName = keyBy(agents, 'name');\n this.agentsByAgentId = keyBy(agents, 'agentId');\n this.largeLanguageModels = largeLanguageModels.filter(\n (model) => model.isTranscendHosted === false,\n );\n\n // Lookup prompts by id/title\n const promptByTitle = keyBy(response.prompts, 'title');\n const promptById = keyBy(response.prompts, 'id');\n\n // Update variables\n this.variables = {\n ...response.calculatedVariables.reduce(\n (acc, v) =>\n Object.assign(acc, {\n [v.name]: v.data ? JSON.parse(v.data) : v.data,\n }),\n {},\n ),\n ...this.defaultVariables,\n };\n\n // Update partials\n this.handlebars = createHandlebarsWithHelpers({\n ...this.handlebarsOptions,\n templates: [\n ...(this.handlebarsOptions.templates || []),\n ...response.promptPartials.map((partial) => ({\n name: partial.slug,\n content: partial.content,\n })),\n ],\n });\n\n // Create mapping from prompt to content\n this.promptContentMap = apply(this.prompts, ({ id, title }) => {\n const result = id\n ? promptById[id]\n : title\n ? promptByTitle[title]\n : undefined;\n if (!result) {\n throw new Error(\n `Failed to find prompt with title: \"${title}\" and id: \"${id}\"`,\n );\n }\n return result;\n });\n\n // For cache\n this.lastUpdatedAt = new Date();\n\n return response;\n }\n\n /**\n * Get an agent definition by name\n *\n * @param name - Name of the agent to grab\n * @returns Large language model configuration\n */\n async getAgentByName(name: string): Promise<Agent | undefined> {\n const agent = this.agentsByName[name];\n if (agent) {\n return agent;\n }\n const [remoteAgent] = await fetchAllAgents(this.graphQLClient, {\n names: [name],\n });\n if (!remoteAgent) {\n return undefined;\n }\n this.agentsByName[remoteAgent.name] = remoteAgent;\n this.agentsByAgentId[remoteAgent.agentId] = remoteAgent;\n return remoteAgent;\n }\n\n /**\n * Get a prompt thread by ts\n *\n * @param ts - the slack message timestamp to look up thread for\n * @returns Large language model configuration\n */\n async getPromptThreadBySlackTs(\n ts: string,\n ): Promise<PromptThread | undefined> {\n const [thread] = await fetchAllPromptThreads(this.graphQLClient, {\n slackMessageTs: [ts],\n });\n return thread;\n }\n\n /**\n * Get a list of agent definitions by name.\n * Pulls from cache and may return less agents\n * than requested if some are not found\n *\n * @param names - Names of agents to fetch\n * @returns The agents that were found matching the names\n */\n async getAgentsByName(names: string[]): Promise<Agent[]> {\n if (names.length < 1) {\n throw new Error('Expected at least one name to be provided');\n }\n const { hasCache = [], missingCache = [] } = groupBy(names, (name) =>\n this.agentsByName[name] ? 'hasCache' : 'missingCache',\n );\n const cachedAgents = hasCache.map((name) => this.agentsByName[name]);\n if (missingCache.length === 0) {\n return cachedAgents;\n }\n const chunkedNames = chunk(missingCache, 50);\n const remoteAgents: Agent[] = [];\n await mapSeries(chunkedNames, async (chunkedName) => {\n const pageOfAgents = await fetchAllAgents(this.graphQLClient, {\n names: chunkedName,\n });\n pageOfAgents.forEach((agent) => {\n this.agentsByName[agent.name] = agent;\n this.agentsByAgentId[agent.agentId] = agent;\n });\n remoteAgents.push(...pageOfAgents);\n });\n return [...cachedAgents, ...remoteAgents];\n }\n\n /**\n * Fetch metadata on agent files\n *\n * @param filterBy - Filter by parameters\n * @returns The files found matching the filter\n */\n getAgentFiles(filterBy: AgentFileFilterBy): Promise<AgentFile[]> {\n return fetchAllAgentFiles(this.graphQLClient, filterBy);\n }\n\n /**\n * Look up the large language model to report on\n *\n * @param largeLanguageModel - Input\n * @returns Large language model configuration\n */\n getLargeLanguageModel(\n largeLanguageModel: ReportPromptRunOptions['largeLanguageModel'],\n ): LargeLanguageModel {\n const matching = this.largeLanguageModels.find((model) =>\n typeof largeLanguageModel === 'string'\n ? model.id === largeLanguageModel\n : model.name === largeLanguageModel.name &&\n model.client === largeLanguageModel.client,\n );\n if (!matching) {\n throw new Error(\n `Failed to find model matching: ${\n typeof largeLanguageModel === 'string'\n ? largeLanguageModel\n : JSON.stringify(largeLanguageModel)\n }`,\n );\n }\n return matching;\n }\n\n /**\n * Get a prompt definition by name\n *\n * @param promptName - Prompt to compile\n * @returns Parsed content\n */\n async getPromptDefinition<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n ): Promise<TranscendPromptTemplated> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n // Lookup prompt\n const { promptContentMap } = this;\n if (!promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n const promptTemplate = promptContentMap[promptName];\n if (!promptTemplate) {\n throw new Error(\n `Expected this.promptContentMap[${promptName}] to be defined`,\n );\n }\n return promptTemplate;\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to compile\n * @param params - Runtime parameters\n * @returns Parsed content\n */\n async compilePrompt<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n params: t.TypeOf<TPrompts[TPromptName]['paramCodec']>,\n ): Promise<string> {\n // Grab the prompt\n const promptTemplate = await this.getPromptDefinition(promptName);\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure prompt is approved\n if (\n this.requireApproval &&\n promptTemplate.status !== PromptStatus.Approved\n ) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because its in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // If prompt is rejected, throw error\n if (promptTemplate.status === PromptStatus.Rejected) {\n throw new Error(\n `Assessment \"${promptTemplate.title}\" cannot be used because it's in status: \"${promptTemplate.status}\"`,\n );\n }\n\n // Validate params\n decodeCodec(promptInput.paramCodec, params);\n\n // Compile prompt and template\n return this.handlebars.compile(promptTemplate.content)({\n // template in currentDate by default\n currentDate: new Date().toISOString(),\n ...this.variables,\n ...params,\n });\n }\n\n /**\n * Validate the shape of the response from AI\n *\n * @param promptName - Prompt to parse\n * @param response - AI response as string\n * @returns Parsed content\n */\n parseAiResponse<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n response: string,\n ): t.TypeOf<TPrompts[TPromptName]['outputCodec']> {\n // Look up prompt info\n const promptInput = this.prompts[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Extract from tag if needed\n const extracted = promptInput.extractFromTag\n ? (createRegexForTag(promptInput.extractFromTag).exec(response) ||\n [])[1] || response\n : response;\n\n // Parse via codec\n return decodeCodec(\n promptInput.outputCodec,\n jsonParseSafe(extracted),\n false,\n );\n }\n\n /**\n * Parse the AI response and report back to Transcend\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportAndParsePromptRun<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n { largeLanguageModel, ...options }: ReportPromptRunOptions,\n ): Promise<\n PromptRunResult & {\n /** Resulting prompt run */\n result: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n }\n > {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n if (\n options.promptRunMessages[options.promptRunMessages.length - 1].role !==\n ChatCompletionRole.Assistant\n ) {\n throw new Error(\n `promptRunMessages[${\n options.promptRunMessages.length - 1\n }].role is expected to be = ${ChatCompletionRole.Assistant}`,\n );\n }\n const response =\n options.promptRunMessages[options.promptRunMessages.length - 1].content;\n\n let parsed: t.TypeOf<TPrompts[TPromptName]['outputCodec']>;\n try {\n // Parse the response\n parsed = this.parseAiResponse(promptName, response);\n } catch (err) {\n await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n error: err.message,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n throw err;\n }\n\n // report successful run\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Resolved,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n result: parsed,\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n\n /**\n * Report an error for a particular prompt\n *\n * @param promptName - Prompt to parse\n * @param options - Options for reporting\n * @returns Parsed content\n */\n async reportPromptRunError<TPromptName extends TPromptNames>(\n promptName: TPromptName,\n {\n largeLanguageModel,\n ...options\n }: Requirize<ReportPromptRunOptions, 'error'>,\n ): Promise<PromptRunResult> {\n // Determine if prompts need to be fetched\n if (\n // never been fetched\n !this.lastUpdatedAt ||\n // fetch every run\n this.cacheDuration === 0 ||\n // If cache duration met\n (this.cacheDuration &&\n Date.now() - this.lastUpdatedAt.getTime() > this.cacheDuration)\n ) {\n await this.fetchPromptsAndMetadata();\n }\n\n const name =\n options.name ||\n `@transcend-io/cli-prompt-run-${new Date().toISOString()}`;\n\n if (!this.promptContentMap) {\n throw new Error('Expected this.promptContentMap to be defined');\n }\n // Look up prompt info\n const promptInput = this.promptContentMap[promptName];\n if (!promptInput) {\n throw new Error(`Expected this.prompts[${promptName}] to be defined`);\n }\n\n // Ensure the first message in `promptRunMessages` is of type=system\n if (options.promptRunMessages.length === 0) {\n throw new Error('promptRunMessages is expected to have length > 0');\n }\n if (options.promptRunMessages[0].role !== ChatCompletionRole.System) {\n throw new Error(\n `promptRunMessages[0].role is expected to be = ${ChatCompletionRole.System}`,\n );\n }\n\n const promptRunId = await reportPromptRun(this.graphQLClient, {\n productArea: PromptRunProductArea.PromptManager,\n ...options,\n name,\n status: QueueStatus.Error,\n ...(typeof largeLanguageModel === 'string'\n ? { largeLanguageModelId: largeLanguageModel }\n : {\n largeLanguageModelName: largeLanguageModel.name,\n largeLanguageModelClient: largeLanguageModel.client,\n }),\n promptId: promptInput.id,\n promptRunMessages: options.promptRunMessages.map((message, ind) => ({\n ...message,\n ...(ind === 0 ? { template: promptInput.content } : {}),\n })),\n });\n\n return {\n promptRunId,\n promptRunUrl: `https://app.transcend.io/prompts/runs/${promptRunId}`,\n };\n }\n}\n/* eslint-enable max-lines */\n","import { GraphQLClient } from 'graphql-request';\nimport { LargeLanguageModelClient } from '@transcend-io/privacy-types';\nimport { LARGE_LANGUAGE_MODELS } from './gqls';\nimport { makeGraphQLRequest } from './makeGraphQLRequest';\n\nexport interface LargeLanguageModel {\n /** ID of prompts */\n id: string;\n /** The name of the large language model. */\n name: string;\n /** The content of the prompt template. */\n client: LargeLanguageModelClient;\n /** Whether hosted by Transcend or not */\n isTranscendHosted: boolean;\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all LargeLanguageModels in the organization\n *\n * @param client - GraphQL client\n * @returns All LargeLanguageModels in the organization\n */\nexport async function fetchAllLargeLanguageModels(\n client: GraphQLClient,\n): Promise<LargeLanguageModel[]> {\n const largeLanguageModels: LargeLanguageModel[] = [];\n let offset = 0;\n\n // Whether to continue looping\n let shouldContinue = false;\n do {\n const {\n largeLanguageModels: { nodes },\n } = await makeGraphQLRequest<{\n /** LargeLanguageModels */\n largeLanguageModels: {\n /** List */\n nodes: LargeLanguageModel[];\n };\n }>(client, LARGE_LANGUAGE_MODELS, {\n first: PAGE_SIZE,\n offset,\n });\n largeLanguageModels.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return largeLanguageModels.sort((a, b) => a.name.localeCompare(b.name));\n}\n","import { difference } from 'lodash-es';\nimport fastGlob from 'fast-glob';\nimport { execSync } from 'child_process';\n\n/**\n * Function thats gets the git files that have changed\n * and returns the code\n *\n * @param options - Options\n * @returns Changes files and diffs\n */\nexport function getGitFilesThatChanged({\n baseBranch,\n rootDirectory,\n githubRepo,\n excludedGlob = [],\n fileBlockList = [],\n}: {\n /** Base branch */\n baseBranch: string;\n /** Github repo name */\n githubRepo: string;\n /** Root directory */\n rootDirectory: string;\n /** A glob that excludes files */\n excludedGlob?: string[];\n /** Block list of files to not process */\n fileBlockList?: string[];\n}): {\n /** The list of files that changed */\n changedFiles: string[];\n /** Github repo name */\n repoName: string;\n /** Current commit */\n commit: string;\n /** File diffs */\n fileDiffs: { [k in string]: string };\n} {\n // Pull base branch\n execSync(`git fetch origin ${baseBranch}`);\n\n // Latest commit on base branch. If we are on the base branch, we take the prior commit\n const latestBasedCommit = execSync(\n `git ls-remote ${githubRepo} \"refs/heads/${baseBranch}\" | cut -f 1`,\n { encoding: 'utf-8' },\n ).split('\\n')[0];\n\n // This commit\n const latestThisCommit = execSync('git rev-parse HEAD', {\n encoding: 'utf-8',\n }).split('\\n')[0];\n\n // Ensure commits are present\n if (!latestBasedCommit || !latestThisCommit) {\n throw new Error('FAILED TO FIND COMMIT RANGE');\n }\n\n // Get the diff between the given branch and base branch\n const diff = execSync(\n `git fetch && git diff --name-only \"${\n baseBranch || latestBasedCommit\n }...${latestThisCommit}\" -- ${rootDirectory}`,\n { encoding: 'utf-8' },\n );\n\n // Filter out block list\n const changedFiles = difference(\n diff.split('\\n').filter((f) => f),\n fileBlockList,\n );\n\n // Filter out globs\n const filteredChanges =\n excludedGlob.length > 0\n ? fastGlob.sync(changedFiles, { ignore: excludedGlob })\n : changedFiles;\n\n // Get the contents of only the changed files\n const fileDiffs: { [k in string]: string } = {};\n filteredChanges.forEach((file) => {\n const contents = execSync(`git show ${latestThisCommit}:${file}`, {\n encoding: 'utf-8',\n });\n fileDiffs[file] = contents;\n });\n\n // Pull the github repo name\n const repoName = githubRepo.split('/').pop()!.split('.')[0];\n\n return {\n changedFiles,\n fileDiffs,\n repoName,\n commit: latestThisCommit,\n };\n}\n"]}
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as t from 'io-ts';
2
- import { LogicOperator, RequestAction, RequestStatus, RequestActionObjectResolver, IdentifierType, ConsentTrackerStatus, CodePackageType, SubDataPointDataSubCategoryGuessStatus, ConfidenceLabel, IsoCountryCode, IsoCountrySubdivisionCode, PromptAVendorEmailSendType, PromptAVendorEmailCompletionLinkType, EnricherType, PreflightRequestStatus, DefaultConsentOption, PreferenceStoreAuthLevel, PreferenceTopicType, AttributeSupportedResourceType, RetentionScheduleType, RetentionScheduleOperation, AssessmentQuestionType, AssessmentQuestionSubType, AssessmentSyncModel, AssessmentSyncColumn, AssessmentFormStatus, DataCategoryType, ProcessingPurpose, AssessmentFormTemplateStatus, AssessmentFormTemplateSource, PrivacyCenterThemePartial, RequestOrigin, RequestEnricherStatus, RequestDataSiloStatus, AttributeKeyType, DataFlowScope, ConsentTrackerSource, TranscendProduct, ActionItemPriorityOverride, ActionItemCode, ConsentPrecedenceOption, UnknownRequestPolicy, TelemetryPartitionStrategy, SignedIabAgreementOption, RegionsOperator, BrowserTimeZone, RegionDetectionMethod, ScopeName, PromptStatus, PromptResponseFormat, ConsentBundleType, PromptRunProductArea, ChatCompletionRole, QueueStatus, LargeLanguageModelClient, PromptFilePurpose, UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';
2
+ import { LogicOperator, RequestAction, RequestStatus, RequestActionObjectResolver, IdentifierType, ConsentTrackerStatus, CodePackageType, SubDataPointDataSubCategoryGuessStatus, ConfidenceLabel, IsoCountryCode, IsoCountrySubdivisionCode, PromptAVendorEmailSendType, PromptAVendorEmailCompletionLinkType, EnricherType, PreflightRequestStatus, DefaultConsentOption, PreferenceStoreAuthLevel, PreferenceTopicType, AttributeSupportedResourceType, RetentionScheduleType, RetentionScheduleOperation, AssessmentQuestionType, AssessmentQuestionSubType, AssessmentSyncModel, AssessmentSyncColumn, AssessmentFormStatus, DataCategoryType, ProcessingPurpose, AssessmentFormTemplateStatus, AssessmentFormTemplateSource, PrivacyCenterThemePartial, RequestOrigin, RequestEnricherStatus, RequestDataSiloStatus, AttributeKeyType, DataFlowScope, ConsentTrackerSource, TranscendProduct, ActionItemPriorityOverride, ActionItemCode, ConsentPrecedenceOption, UnknownRequestPolicy, TelemetryPartitionStrategy, SignedIabAgreementOption, RegionsOperator, BrowserTimeZone, RegionDetectionMethod, ScopeName, PromptStatus, PromptResponseFormat, ConsentBundleType, PromptRunProductArea, ChatCompletionRole, QueueStatus, LargeLanguageModelClient, PromptFilePurpose, ScopeDefinition, UnstructuredSubDataPointRecommendationStatus } from '@transcend-io/privacy-types';
3
3
  import { ObjByString, Optionalize, Requirize } from '@transcend-io/type-utils';
4
4
  import { GraphQLClient, Variables, RequestDocument } from 'graphql-request';
5
5
  import inquirer from 'inquirer';
@@ -116494,8 +116494,11 @@ declare function removeUnverifiedRequestIdentifiers({ requestActions, identifier
116494
116494
  }): Promise<number>;
116495
116495
 
116496
116496
  var description = "A command line interface for programmatic operations across Transcend.";
116497
- var version = "7.0.2";
116497
+ var version = "7.0.3";
116498
116498
 
116499
+ /**
116500
+ * The name of the main binary for the CLI
116501
+ */
116499
116502
  declare const name = "transcend";
116500
116503
  declare const ADMIN_DASH = "https://app.transcend.io";
116501
116504
  declare const ADMIN_DASH_INTEGRATIONS = "https://app.transcend.io/infrastructure/integrations";
@@ -116523,6 +116526,11 @@ declare const TR_PULL_RESOURCE_SCOPE_MAP: {
116523
116526
  [k in TranscendPullResource]: ScopeName[];
116524
116527
  };
116525
116528
  declare const TR_YML_RESOURCE_TO_FIELD_NAME: Record<TranscendPullResource, keyof TranscendInput>;
116529
+ declare const SCOPES_BY_TITLE: Record<string, ScopeDefinition & {
116530
+ /** The camelCased name which identifies the scope */
116531
+ name: ScopeName;
116532
+ }>;
116533
+ declare const SCOPE_TITLES: string[];
116526
116534
 
116527
116535
  /**
116528
116536
  * Update the consent manager to latest version
@@ -117643,4 +117651,4 @@ type EnrichPrivacyRequest = t.TypeOf<typeof EnrichPrivacyRequest>;
117643
117651
  */
117644
117652
  declare function enrichPrivacyRequest(sombra: Got, { id: rawId, ...rest }: EnrichPrivacyRequest, enricherId: string, index?: number): Promise<boolean>;
117645
117653
 
117646
- export { ACTIONS, ADD_MESSAGES_TO_PROMPT_RUN, ADD_SILO_DISCOVERY_RESULTS, ADMIN_DASH, ADMIN_DASH_DATAPOINTS, ADMIN_DASH_INTEGRATIONS, AGENTS, AGENT_FILES, AGENT_FUNCTIONS, type AIIntegrationC, API_KEYS, APPROVE_PRIVACY_REQUEST, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ASSESSMENT_TEMPLATES, ASSUME_ROLE, ATTRIBUTES, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUES, type Action, ActionInput, type ActionItem, ActionItemCollectionInput, ActionItemInput, type ActionItemRaw, type AddMessagesToPromptRunInput, type Agent, type AgentFile, type AgentFileFilterBy, AgentFileInput, type AgentFunction, AgentFunctionInput, AgentInput, type ApiKey, type ApiKeyGenerateError, ApiKeyInput, type Assessment, AssessmentAction, type AssessmentAnswer, type AssessmentAnswerOption, AssessmentAnswerOptionInput, type AssessmentComment, AssessmentDisplayLogicInput, type AssessmentGroup, AssessmentInput, AssessmentNestedRule, AssessmentNestedRuleInput, type AssessmentPreviousSubmission, type AssessmentQuestion, type AssessmentResource, AssessmentResourceInput, AssessmentRetentionScheduleInput, AssessmentRiskLogic, AssessmentRule, AssessmentRuleInput, type AssessmentSection, AssessmentSectionInput, AssessmentSectionQuestionInput, type AssessmentTemplate, AssessmentTemplateInput, AttestedExtraIdentifiers, type Attribute, AttributeInput, type AttributeKey, type AttributeNameMap, AttributePreview, type AttributeValue, AttributeValueInput, BLANK, BULK_APPLY, BUSINESS_ENTITIES, type BusinessEntity, BusinessEntityInput, CANCEL_PRIVACY_REQUEST, CAN_APPLY_IN_BULK, CATALOGS, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, CREATE_ACTION_ITEMS, CREATE_ACTION_ITEM_COLLECTION, CREATE_AGENT, CREATE_AGENT_FILE, CREATE_AGENT_FUNCTION, CREATE_API_KEY, CREATE_ATTRIBUTE, CREATE_ATTRIBUTE_VALUES, CREATE_BUSINESS_ENTITY, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_DATA_SUB_CATEGORY, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, CREATE_PROMPT, CREATE_PROMPT_GROUP, CREATE_PROMPT_PARTIAL, CREATE_REPOSITORY, CREATE_SOFTWARE_DEVELOPMENT_KIT, CREATE_TEAM, CREATE_TEMPLATE, CREATE_VENDOR, CachedFileState, CachedRequestState, type Catalog, CodePackageInput, CodePackageSdk, ColumnName, type ColumnNameMap, type ConsentExperience, ConsentManageExperienceInput, type ConsentManager, ConsentManagerInput, type ConsentManagerMetric, ConsentManagerMetricBin, ConsentManagerServiceMetadata, type ConsentManagerTheme, ConsentPreferenceResponse, ConsentPreferenceTopic, ConsentPreferenceTopicOptionValue, ConsentPurpose, type Cookie, CookieCsvInput, CookieInput, type CreatedApiKey, CronIdentifier, CronIdentifierPush, type CronIdentifierWithAction, type CsvFormattedIdentifier, DATAPOINT_EXPORT, DATA_FLOWS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DATA_SUB_CATEGORIES, DEFAULT_TRANSCEND_API, DEFAULT_TRANSCEND_CONSENT_API, DEFAULT_TRANSCEND_PULL_RESOURCES, DELETE_API_KEY, DELETE_ATTRIBUTE_VALUE, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DETERMINE_LOGIN_METHOD, DataCategoryGuessInput, DataCategoryInput, DataCategoryPreviewInput, DataCategoryRecommendationInput, type DataFlow, DataFlowCsvInput, DataFlowInput, type DataPointCsvPreview, type DataSilo, type DataSiloAttributeValue, type DataSiloCsvPreview, type DataSiloEnriched, DataSiloInput, type DataSubCategory, type DataSubject, DataSubjectInput, type DatapointFilterOptions, DatapointInput, ENABLED_PLUGINS, ENRICHERS, ENTRY_COUNT, EXPERIENCES, type EnabledRouteC, type EnabledRoutesC, EnrichPrivacyRequest, type Enricher, EnricherInput, type ExportedPrivacyRequest, type ExternalUser, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_PRIVACY_CENTER_ID, FieldInput, GLOBAL_ACTION_ITEMS, GLOBAL_ACTION_ITEM_COLLECTIONS, type GetPromptParamType, type GetPromptResponseType, IDENTIFIERS, IDENTIFIER_BLOCK_LIST, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IP_ADDRESS_REGEX, IS_REQUIRED, type Identifier, IdentifierInput, type IdentifierNameMap, ImportOnetrustAssessmentsInput, type IndexedCatalogs, type Initializer, IntlMessage, IntlMessageInput, LARGE_LANGUAGE_MODELS, LOGIN, MESSAGES, type Message, NEW_IDENTIFIER_TYPES, NONE, NOTIFY_ADDITIONAL_TIME, ORGANIZATION, OneTrustFileFormat, OneTrustPullResource, OneTrustPullSource, OpenAIEnabledRoute, OpenAIEnabledRoutes, OpenAIIntegration, OpenAIRouteName, type OrganizationPreview, POLICIES, PREFERENCE_TOPICS, PRIVACY_CENTER, PROCESSING_PURPOSE_SUB_CATEGORIES, PROMPTS, PROMPTS_WITH_VARIABLES, PROMPT_GROUPS, PROMPT_PARTIALS, PROMPT_THREADS, PURPOSES, ParsedAttributeInput, PartitionInput, PathfinderPolicy, PathfinderPolicyName, PathfinderPolicyNameC, PathfinderPromptRunMetadata, type Plugin, type PluginResponse, type Policy, PolicyInput, type PreferenceTopic, type PrivacyCenter, PrivacyCenterInput, PrivacyRequest, PrivacyRequestInput, PrivacyRequestResponse, type PrivacyRequestWithIdentifiers, ProcessingPurposeInput, ProcessingPurposePreviewInput, type ProcessingPurposeSubCategory, type Prompt, PromptAVendorEmailSettings, type PromptCalculatedVariable, type PromptGroup, PromptGroupInput, PromptInput, type PromptPartial, PromptPartialInput, type PromptRunResult, type PromptRuntimeVariable, type PromptThread, type Purpose, PurposeMap, type PurposeWithPreferences, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REPORT_PROMPT_RUN, REPOSITORIES, REQUESTS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, type ReportPromptRunInput, type ReportPromptRunOptions, RepositoryInput, type RequestDataSilo, type RequestEnricher, type RequestFile, RequestFileMetadata, RequestFileMetadataResponse, RequestIdentifier, type RequestIdentifierMetadata, RequestIdentifiersResponse, type RetentionSchedule, RiskAssignmentInput, type RiskCategory, type RiskFramework, type RiskLevel, RiskLogicInput, type RiskMatrix, type RiskMatrixColumn, type RiskMatrixRow, SET_RESOURCE_ATTRIBUTES, SKIP_REQUEST_ENRICHER, SOFTWARE_DEVELOPMENT_KITS, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SoftwareDevelopmentKitInput, StoredApiKey, type SubDataPoint, type SubDataPointCsvPreview, SuccessfulRequest, TEAMS, TEMPLATES, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, type Team, TeamInput, type Template, TemplateInput, TranscendInput, type TranscendPartition, type TranscendPrompt, TranscendPromptManager, type TranscendPromptPartialTemplated, type TranscendPromptTemplated, type TranscendPromptsAndVariables, type TranscendPullConfigurationInput, TranscendPullResource, UPDATE_ACTION, UPDATE_ACTION_ITEMS, UPDATE_ACTION_ITEM_COLLECTION, UPDATE_AGENTS, UPDATE_AGENT_FILES, UPDATE_AGENT_FUNCTIONS, UPDATE_ATTRIBUTE, UPDATE_ATTRIBUTE_VALUES, UPDATE_BUSINESS_ENTITIES, UPDATE_CODE_PACKAGES, UPDATE_CONSENT_EXPERIENCE, UPDATE_CONSENT_MANAGER_DOMAINS, UPDATE_CONSENT_MANAGER_PARTITION, UPDATE_CONSENT_MANAGER_THEME, UPDATE_CONSENT_MANAGER_TO_LATEST, UPDATE_CONSENT_MANAGER_VERSION, UPDATE_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_DATA_SUB_CATEGORIES, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_INTL_MESSAGES, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PRIVACY_REQUEST, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, UPDATE_PROMPTS, UPDATE_PROMPT_GROUPS, UPDATE_PROMPT_PARTIALS, UPDATE_REPOSITORIES, UPDATE_SOFTWARE_DEVELOPMENT_KITS, UPDATE_TEAM, UPDATE_VENDORS, USERS, USP_STRING_REGEX, type User, type UserPreview, type UserRole, VARIABLE_PARAMETERS_NAME, VARIABLE_PARAMETERS_REGEXP, VENDORS, type Vendor, VendorInput, WebhookHeader, type XdiSyncGroups, addMessagesToPromptRun, appendCsvSync, approvePrivacyRequests, assumeRole, buildAIIntegrationType, buildEnabledRouteType, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildXdiSyncEndpoint, bulkRestartRequests, bulkRetryEnrichers, cancelPrivacyRequests, consentManagersToBusinessEntities, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createCodePackage, createConsentToken, createDataCategory, createDataFlows, createProcessingPurpose, createPrompt, createRegexForTag, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTranscendConsentGotInstance, createVendor, defineTranscendPrompts, deleteApiKey, deployConsentManager, description, domainToHost, downloadPrivacyRequestFiles, enrichPrivacyRequest, ensureAllDataSubjectsExist, extractClientError, fetchActiveSiloDiscoPlugin, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessmentTemplates, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllRequests, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchConsentPreferences, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSiloActiveCount, fetchRequestDataSilos, fetchRequestFilesForRequest, filterNullishValuesFromObject, filterRows, fuzzyMatchColumns, fuzzySearch, generateCrossAccountApiKeys, getFileMetadataForPrivacyRequests, getGitFilesThatChanged, getUniqueValuesForColumn, inquirerAutoComplete, inquirerConfirmBoolean, inquirerConfirmText, listDirectories, listFiles, loginUser, makeGraphQLRequest, mapColumnsToAttributes, mapColumnsToIdentifiers, mapCsvColumnsToApi, mapCsvRowsToRequestInputs, mapEnumValues, mapRequestEnumValues, markCronIdentifierCompleted, markRequestDataSiloIdsCompleted, markSilentPrivacyRequests, mergeTranscendInputs, name, normalizeIdentifierValue, notifyPrivacyRequestsAdditionalTime, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parseAttributesFromString, parseFilePath, parseVariablesFromString, pullAllDatapoints, pullChunkedCustomSiloOutstandingIdentifiers, pullConsentManagerMetrics, pullCronPageOfIdentifiers, pullManualEnrichmentIdentifiersToCsv, pullPrivacyRequests, pullTranscendConfiguration, pullUnstructuredSubDataPointRecommendations, pushCronIdentifiersFromCsv, pushManualEnrichmentIdentifiersFromCsv, readCsv, readTranscendYaml, removeLinks, removeUnverifiedRequestIdentifiers, replaceVariablesInYaml, reportPromptRun, restartPrivacyRequest, retryRequestDataSilos, retryRequestEnricher, setResourceAttributes, skipPreflightJobs, skipRequestDataSilos, splitCsvToList, streamPrivacyRequestFiles, submitPrivacyRequest, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncCodePackages, syncConfigurationToTranscend, syncConsentManager, syncConsentManagerExperiences, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSilos, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingPurposes, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTemplate, syncVendors, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateCodePackages, updateConsentManagerToLatest, updateConsentManagerVersionToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateVendors, uploadConsents, uploadCookiesFromCsv, uploadDataFlowsFromCsv, uploadPrivacyRequestsFromCsv, uploadSiloDiscoveryResults, validateTranscendAuth, version, writeCsv, writeCsvSync, writeLargeCsv, writeTranscendYaml };
117654
+ export { ACTIONS, ADD_MESSAGES_TO_PROMPT_RUN, ADD_SILO_DISCOVERY_RESULTS, ADMIN_DASH, ADMIN_DASH_DATAPOINTS, ADMIN_DASH_INTEGRATIONS, AGENTS, AGENT_FILES, AGENT_FUNCTIONS, type AIIntegrationC, API_KEYS, APPROVE_PRIVACY_REQUEST, ASSESSMENTS, ASSESSMENT_SECTION_FIELDS, ASSESSMENT_TEMPLATES, ASSUME_ROLE, ATTRIBUTES, ATTRIBUTE_KEYS_REQUESTS, ATTRIBUTE_VALUES, type Action, ActionInput, type ActionItem, ActionItemCollectionInput, ActionItemInput, type ActionItemRaw, type AddMessagesToPromptRunInput, type Agent, type AgentFile, type AgentFileFilterBy, AgentFileInput, type AgentFunction, AgentFunctionInput, AgentInput, type ApiKey, type ApiKeyGenerateError, ApiKeyInput, type Assessment, AssessmentAction, type AssessmentAnswer, type AssessmentAnswerOption, AssessmentAnswerOptionInput, type AssessmentComment, AssessmentDisplayLogicInput, type AssessmentGroup, AssessmentInput, AssessmentNestedRule, AssessmentNestedRuleInput, type AssessmentPreviousSubmission, type AssessmentQuestion, type AssessmentResource, AssessmentResourceInput, AssessmentRetentionScheduleInput, AssessmentRiskLogic, AssessmentRule, AssessmentRuleInput, type AssessmentSection, AssessmentSectionInput, AssessmentSectionQuestionInput, type AssessmentTemplate, AssessmentTemplateInput, AttestedExtraIdentifiers, type Attribute, AttributeInput, type AttributeKey, type AttributeNameMap, AttributePreview, type AttributeValue, AttributeValueInput, BLANK, BULK_APPLY, BUSINESS_ENTITIES, type BusinessEntity, BusinessEntityInput, CANCEL_PRIVACY_REQUEST, CAN_APPLY_IN_BULK, CATALOGS, CHANGE_REQUEST_DATA_SILO_STATUS, CODE_PACKAGES, CONSENT_MANAGER_ANALYTICS_DATA, CONSENT_PARTITIONS, COOKIES, CREATE_ACTION_ITEMS, CREATE_ACTION_ITEM_COLLECTION, CREATE_AGENT, CREATE_AGENT_FILE, CREATE_AGENT_FUNCTION, CREATE_API_KEY, CREATE_ATTRIBUTE, CREATE_ATTRIBUTE_VALUES, CREATE_BUSINESS_ENTITY, CREATE_CODE_PACKAGE, CREATE_CONSENT_EXPERIENCE, CREATE_CONSENT_MANAGER, CREATE_CONSENT_PARTITION, CREATE_DATA_FLOWS, CREATE_DATA_SILOS, CREATE_DATA_SUBJECT, CREATE_DATA_SUB_CATEGORY, CREATE_ENRICHER, CREATE_IDENTIFIER, CREATE_PROCESSING_PURPOSE_SUB_CATEGORY, CREATE_PROMPT, CREATE_PROMPT_GROUP, CREATE_PROMPT_PARTIAL, CREATE_REPOSITORY, CREATE_SOFTWARE_DEVELOPMENT_KIT, CREATE_TEAM, CREATE_TEMPLATE, CREATE_VENDOR, CachedFileState, CachedRequestState, type Catalog, CodePackageInput, CodePackageSdk, ColumnName, type ColumnNameMap, type ConsentExperience, ConsentManageExperienceInput, type ConsentManager, ConsentManagerInput, type ConsentManagerMetric, ConsentManagerMetricBin, ConsentManagerServiceMetadata, type ConsentManagerTheme, ConsentPreferenceResponse, ConsentPreferenceTopic, ConsentPreferenceTopicOptionValue, ConsentPurpose, type Cookie, CookieCsvInput, CookieInput, type CreatedApiKey, CronIdentifier, CronIdentifierPush, type CronIdentifierWithAction, type CsvFormattedIdentifier, DATAPOINT_EXPORT, DATA_FLOWS, DATA_POINTS, DATA_POINT_COUNT, DATA_SILOS, DATA_SILOS_ENRICHED, DATA_SILO_EXPORT, DATA_SUBJECTS, DATA_SUB_CATEGORIES, DEFAULT_TRANSCEND_API, DEFAULT_TRANSCEND_CONSENT_API, DEFAULT_TRANSCEND_PULL_RESOURCES, DELETE_API_KEY, DELETE_ATTRIBUTE_VALUE, DEPLOYED_PRIVACY_CENTER_URL, DEPLOY_CONSENT_MANAGER, DETERMINE_LOGIN_METHOD, DataCategoryGuessInput, DataCategoryInput, DataCategoryPreviewInput, DataCategoryRecommendationInput, type DataFlow, DataFlowCsvInput, DataFlowInput, type DataPointCsvPreview, type DataSilo, type DataSiloAttributeValue, type DataSiloCsvPreview, type DataSiloEnriched, DataSiloInput, type DataSubCategory, type DataSubject, DataSubjectInput, type DatapointFilterOptions, DatapointInput, ENABLED_PLUGINS, ENRICHERS, ENTRY_COUNT, EXPERIENCES, type EnabledRouteC, type EnabledRoutesC, EnrichPrivacyRequest, type Enricher, EnricherInput, type ExportedPrivacyRequest, type ExternalUser, FETCH_CONSENT_MANAGER, FETCH_CONSENT_MANAGER_ID, FETCH_CONSENT_MANAGER_THEME, FETCH_PRIVACY_CENTER_ID, FieldInput, GLOBAL_ACTION_ITEMS, GLOBAL_ACTION_ITEM_COLLECTIONS, type GetPromptParamType, type GetPromptResponseType, IDENTIFIERS, IDENTIFIER_BLOCK_LIST, IMPORT_ONE_TRUST_ASSESSMENT_FORMS, INITIALIZER, IP_ADDRESS_REGEX, IS_REQUIRED, type Identifier, IdentifierInput, type IdentifierNameMap, ImportOnetrustAssessmentsInput, type IndexedCatalogs, type Initializer, IntlMessage, IntlMessageInput, LARGE_LANGUAGE_MODELS, LOGIN, MESSAGES, type Message, NEW_IDENTIFIER_TYPES, NONE, NOTIFY_ADDITIONAL_TIME, ORGANIZATION, OneTrustFileFormat, OneTrustPullResource, OneTrustPullSource, OpenAIEnabledRoute, OpenAIEnabledRoutes, OpenAIIntegration, OpenAIRouteName, type OrganizationPreview, POLICIES, PREFERENCE_TOPICS, PRIVACY_CENTER, PROCESSING_PURPOSE_SUB_CATEGORIES, PROMPTS, PROMPTS_WITH_VARIABLES, PROMPT_GROUPS, PROMPT_PARTIALS, PROMPT_THREADS, PURPOSES, ParsedAttributeInput, PartitionInput, PathfinderPolicy, PathfinderPolicyName, PathfinderPolicyNameC, PathfinderPromptRunMetadata, type Plugin, type PluginResponse, type Policy, PolicyInput, type PreferenceTopic, type PrivacyCenter, PrivacyCenterInput, PrivacyRequest, PrivacyRequestInput, PrivacyRequestResponse, type PrivacyRequestWithIdentifiers, ProcessingPurposeInput, ProcessingPurposePreviewInput, type ProcessingPurposeSubCategory, type Prompt, PromptAVendorEmailSettings, type PromptCalculatedVariable, type PromptGroup, PromptGroupInput, PromptInput, type PromptPartial, PromptPartialInput, type PromptRunResult, type PromptRuntimeVariable, type PromptThread, type Purpose, PurposeMap, type PurposeWithPreferences, REDUCED_REQUESTS_FOR_DATA_SILO_COUNT, REMOVE_REQUEST_IDENTIFIERS, REPORT_PROMPT_RUN, REPOSITORIES, REQUESTS, REQUEST_DATA_SILOS, REQUEST_ENRICHERS, REQUEST_FILES, REQUEST_IDENTIFIERS, RETRY_REQUEST_DATA_SILO, RETRY_REQUEST_ENRICHER, type ReportPromptRunInput, type ReportPromptRunOptions, RepositoryInput, type RequestDataSilo, type RequestEnricher, type RequestFile, RequestFileMetadata, RequestFileMetadataResponse, RequestIdentifier, type RequestIdentifierMetadata, RequestIdentifiersResponse, type RetentionSchedule, RiskAssignmentInput, type RiskCategory, type RiskFramework, type RiskLevel, RiskLogicInput, type RiskMatrix, type RiskMatrixColumn, type RiskMatrixRow, SCOPES_BY_TITLE, SCOPE_TITLES, SET_RESOURCE_ATTRIBUTES, SKIP_REQUEST_ENRICHER, SOFTWARE_DEVELOPMENT_KITS, SOMBRA_VERSION, SUB_DATA_POINTS, SUB_DATA_POINTS_COUNT, SUB_DATA_POINTS_WITH_GUESSES, SYNC_ATTRIBUTE_TYPES, SoftwareDevelopmentKitInput, StoredApiKey, type SubDataPoint, type SubDataPointCsvPreview, SuccessfulRequest, TEAMS, TEMPLATES, TOGGLE_CONSENT_PRECEDENCE, TOGGLE_DATA_SUBJECT, TOGGLE_TELEMETRY_PARTITION_STRATEGY, TOGGLE_UNKNOWN_COOKIE_POLICY, TOGGLE_UNKNOWN_REQUEST_POLICY, TR_PULL_RESOURCE_SCOPE_MAP, TR_PUSH_RESOURCE_SCOPE_MAP, TR_YML_RESOURCE_TO_FIELD_NAME, type Team, TeamInput, type Template, TemplateInput, TranscendInput, type TranscendPartition, type TranscendPrompt, TranscendPromptManager, type TranscendPromptPartialTemplated, type TranscendPromptTemplated, type TranscendPromptsAndVariables, type TranscendPullConfigurationInput, TranscendPullResource, UPDATE_ACTION, UPDATE_ACTION_ITEMS, UPDATE_ACTION_ITEM_COLLECTION, UPDATE_AGENTS, UPDATE_AGENT_FILES, UPDATE_AGENT_FUNCTIONS, UPDATE_ATTRIBUTE, UPDATE_ATTRIBUTE_VALUES, UPDATE_BUSINESS_ENTITIES, UPDATE_CODE_PACKAGES, UPDATE_CONSENT_EXPERIENCE, UPDATE_CONSENT_MANAGER_DOMAINS, UPDATE_CONSENT_MANAGER_PARTITION, UPDATE_CONSENT_MANAGER_THEME, UPDATE_CONSENT_MANAGER_TO_LATEST, UPDATE_CONSENT_MANAGER_VERSION, UPDATE_DATA_FLOWS, UPDATE_DATA_SILOS, UPDATE_DATA_SUBJECT, UPDATE_DATA_SUB_CATEGORIES, UPDATE_ENRICHER, UPDATE_IDENTIFIER, UPDATE_INTL_MESSAGES, UPDATE_LOAD_OPTIONS, UPDATE_OR_CREATE_COOKIES, UPDATE_OR_CREATE_DATA_POINT, UPDATE_POLICIES, UPDATE_PRIVACY_CENTER, UPDATE_PRIVACY_REQUEST, UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES, UPDATE_PROMPTS, UPDATE_PROMPT_GROUPS, UPDATE_PROMPT_PARTIALS, UPDATE_REPOSITORIES, UPDATE_SOFTWARE_DEVELOPMENT_KITS, UPDATE_TEAM, UPDATE_VENDORS, USERS, USP_STRING_REGEX, type User, type UserPreview, type UserRole, VARIABLE_PARAMETERS_NAME, VARIABLE_PARAMETERS_REGEXP, VENDORS, type Vendor, VendorInput, WebhookHeader, type XdiSyncGroups, addMessagesToPromptRun, appendCsvSync, approvePrivacyRequests, assumeRole, buildAIIntegrationType, buildEnabledRouteType, buildTranscendGraphQLClient, buildTranscendGraphQLClientGeneric, buildXdiSyncEndpoint, bulkRestartRequests, bulkRetryEnrichers, cancelPrivacyRequests, consentManagersToBusinessEntities, convertToDataSubjectAllowlist, convertToDataSubjectBlockList, createActionItemCollection, createActionItems, createAgent, createAgentFile, createAgentFunction, createApiKey, createBusinessEntity, createCodePackage, createConsentToken, createDataCategory, createDataFlows, createProcessingPurpose, createPrompt, createRegexForTag, createRepository, createSoftwareDevelopmentKit, createSombraGotInstance, createTranscendConsentGotInstance, createVendor, defineTranscendPrompts, deleteApiKey, deployConsentManager, description, domainToHost, downloadPrivacyRequestFiles, enrichPrivacyRequest, ensureAllDataSubjectsExist, extractClientError, fetchActiveSiloDiscoPlugin, fetchAllActionItems, fetchAllActions, fetchAllAgentFiles, fetchAllAgentFunctions, fetchAllAgents, fetchAllApiKeys, fetchAllAssessmentTemplates, fetchAllAssessments, fetchAllAttributeValues, fetchAllAttributes, fetchAllBusinessEntities, fetchAllCatalogs, fetchAllCookies, fetchAllDataCategories, fetchAllDataFlows, fetchAllDataPoints, fetchAllDataSilos, fetchAllDataSubjects, fetchAllEnrichers, fetchAllIdentifiers, fetchAllMessages, fetchAllPolicies, fetchAllPreferenceTopics, fetchAllPrivacyCenters, fetchAllProcessingPurposes, fetchAllPromptGroups, fetchAllPromptPartials, fetchAllPromptThreads, fetchAllPrompts, fetchAllPurposes, fetchAllPurposesAndPreferences, fetchAllRequestAttributeKeys, fetchAllRequestEnrichers, fetchAllRequestIdentifierMetadata, fetchAllRequestIdentifiers, fetchAllRequests, fetchAllSubDataPoints, fetchAllTeams, fetchAllTemplates, fetchAllUsers, fetchAllVendors, fetchAndIndexCatalogs, fetchApiKeys, fetchConsentManager, fetchConsentManagerAnalyticsData, fetchConsentManagerExperiences, fetchConsentManagerId, fetchConsentManagerTheme, fetchConsentPreferences, fetchEnrichedDataSilos, fetchIdentifiersAndCreateMissing, fetchPartitions, fetchPrivacyCenterId, fetchPrivacyCenterUrl, fetchPromptsWithVariables, fetchRequestDataSilo, fetchRequestDataSiloActiveCount, fetchRequestDataSilos, fetchRequestFilesForRequest, filterNullishValuesFromObject, filterRows, fuzzyMatchColumns, fuzzySearch, generateCrossAccountApiKeys, getFileMetadataForPrivacyRequests, getGitFilesThatChanged, getUniqueValuesForColumn, inquirerAutoComplete, inquirerConfirmBoolean, inquirerConfirmText, listDirectories, listFiles, loginUser, makeGraphQLRequest, mapColumnsToAttributes, mapColumnsToIdentifiers, mapCsvColumnsToApi, mapCsvRowsToRequestInputs, mapEnumValues, mapRequestEnumValues, markCronIdentifierCompleted, markRequestDataSiloIdsCompleted, markSilentPrivacyRequests, mergeTranscendInputs, name, normalizeIdentifierValue, notifyPrivacyRequestsAdditionalTime, parseAssessmentDisplayLogic, parseAssessmentRiskLogic, parseAttributesFromString, parseFilePath, parseVariablesFromString, pullAllDatapoints, pullChunkedCustomSiloOutstandingIdentifiers, pullConsentManagerMetrics, pullCronPageOfIdentifiers, pullManualEnrichmentIdentifiersToCsv, pullPrivacyRequests, pullTranscendConfiguration, pullUnstructuredSubDataPointRecommendations, pushCronIdentifiersFromCsv, pushManualEnrichmentIdentifiersFromCsv, readCsv, readTranscendYaml, removeLinks, removeUnverifiedRequestIdentifiers, replaceVariablesInYaml, reportPromptRun, restartPrivacyRequest, retryRequestDataSilos, retryRequestEnricher, setResourceAttributes, skipPreflightJobs, skipRequestDataSilos, splitCsvToList, streamPrivacyRequestFiles, submitPrivacyRequest, syncAction, syncActionItemCollections, syncActionItems, syncAgentFiles, syncAgentFunctions, syncAgents, syncAttribute, syncBusinessEntities, syncCodePackages, syncConfigurationToTranscend, syncConsentManager, syncConsentManagerExperiences, syncCookies, syncDataCategories, syncDataFlows, syncDataSiloDependencies, syncDataSilos, syncDataSubject, syncEnricher, syncIdentifier, syncIntlMessages, syncPartitions, syncPolicies, syncPrivacyCenter, syncProcessingPurposes, syncPrompts, syncRepositories, syncSoftwareDevelopmentKits, syncTemplate, syncVendors, updateActionItem, updateActionItemCollection, updateAgentFiles, updateAgentFunctions, updateAgents, updateBusinessEntities, updateCodePackages, updateConsentManagerToLatest, updateConsentManagerVersionToLatest, updateDataCategories, updateDataFlows, updateIntlMessages, updateOrCreateCookies, updatePolicies, updateProcessingPurposes, updatePrompts, updateRepositories, updateSoftwareDevelopmentKits, updateVendors, uploadConsents, uploadCookiesFromCsv, uploadDataFlowsFromCsv, uploadPrivacyRequestsFromCsv, uploadSiloDiscoveryResults, validateTranscendAuth, version, writeCsv, writeCsvSync, writeLargeCsv, writeTranscendYaml };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Transcend Inc.",
3
3
  "name": "@transcend-io/cli",
4
4
  "description": "A command line interface for programmatic operations across Transcend.",
5
- "version": "7.0.2",
5
+ "version": "7.0.3",
6
6
  "homepage": "https://github.com/transcend-io/cli",
7
7
  "repository": {
8
8
  "type": "git",
@@ -143,6 +143,7 @@
143
143
  "fdir": "^6.4.6",
144
144
  "prettier": "^2.8.7",
145
145
  "publint": "^0.3.12",
146
+ "shellcheck": "^3.1.0",
146
147
  "tsup": "^8.5.0",
147
148
  "tsx": "^4.20.3",
148
149
  "typescript": "^5.0.4",