@transcend-io/cli 10.0.0 → 10.0.1

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 (203) hide show
  1. package/dist/{app-By_zDIkK.mjs → app-BfTrk2nc.mjs} +19 -19
  2. package/dist/{app-By_zDIkK.mjs.map → app-BfTrk2nc.mjs.map} +1 -1
  3. package/dist/{approvePrivacyRequests-1cguqGqq.mjs → approvePrivacyRequests-CWGZR2N6.mjs} +2 -2
  4. package/dist/{approvePrivacyRequests-1cguqGqq.mjs.map → approvePrivacyRequests-CWGZR2N6.mjs.map} +1 -1
  5. package/dist/bin/bash-complete.mjs +1 -1
  6. package/dist/bin/cli.mjs +1 -1
  7. package/dist/bin/deprecated-command.mjs +1 -1
  8. package/dist/{buildXdiSyncEndpoint-BMaMHO7Z.mjs → buildXdiSyncEndpoint-Cb-pvpak.mjs} +2 -2
  9. package/dist/{buildXdiSyncEndpoint-BMaMHO7Z.mjs.map → buildXdiSyncEndpoint-Cb-pvpak.mjs.map} +1 -1
  10. package/dist/{bulkRestartRequests-DEPSHov-.mjs → bulkRestartRequests-CKF_xpN0.mjs} +2 -2
  11. package/dist/{bulkRestartRequests-DEPSHov-.mjs.map → bulkRestartRequests-CKF_xpN0.mjs.map} +1 -1
  12. package/dist/{bulkRetryEnrichers-BLkcFKXC.mjs → bulkRetryEnrichers-B-Szmin-.mjs} +2 -2
  13. package/dist/{bulkRetryEnrichers-BLkcFKXC.mjs.map → bulkRetryEnrichers-B-Szmin-.mjs.map} +1 -1
  14. package/dist/{cancelPrivacyRequests-C8MZQvsq.mjs → cancelPrivacyRequests-DNiL13E_.mjs} +2 -2
  15. package/dist/{cancelPrivacyRequests-C8MZQvsq.mjs.map → cancelPrivacyRequests-DNiL13E_.mjs.map} +1 -1
  16. package/dist/{command-BUnCUxva.mjs → command-BXxoAjFo.mjs} +2 -2
  17. package/dist/{command-BUnCUxva.mjs.map → command-BXxoAjFo.mjs.map} +1 -1
  18. package/dist/{createExtraKeyHandler-C_0EVj10.mjs → createExtraKeyHandler-tubeaEjA.mjs} +2 -2
  19. package/dist/createExtraKeyHandler-tubeaEjA.mjs.map +1 -0
  20. package/dist/{createPreferenceAccessTokens-6WLr6z-l.mjs → createPreferenceAccessTokens-DqmFctn3.mjs} +2 -2
  21. package/dist/{createPreferenceAccessTokens-6WLr6z-l.mjs.map → createPreferenceAccessTokens-DqmFctn3.mjs.map} +1 -1
  22. package/dist/{createSombraGotInstance-CahOgD6V.mjs → createSombraGotInstance-D1Il9zUE.mjs} +2 -2
  23. package/dist/{createSombraGotInstance-CahOgD6V.mjs.map → createSombraGotInstance-D1Il9zUE.mjs.map} +1 -1
  24. package/dist/{downloadPrivacyRequestFiles-B2yduagB.mjs → downloadPrivacyRequestFiles-DlpgxqHF.mjs} +2 -2
  25. package/dist/{downloadPrivacyRequestFiles-B2yduagB.mjs.map → downloadPrivacyRequestFiles-DlpgxqHF.mjs.map} +1 -1
  26. package/dist/{fetchAllActions-C0l3wjQV.mjs → fetchAllActions-BJsPdnxy.mjs} +2 -2
  27. package/dist/{fetchAllActions-C0l3wjQV.mjs.map → fetchAllActions-BJsPdnxy.mjs.map} +1 -1
  28. package/dist/{fetchAllDataFlows-AQ9j_NRa.mjs → fetchAllDataFlows-D248lO6_.mjs} +2 -2
  29. package/dist/{fetchAllDataFlows-AQ9j_NRa.mjs.map → fetchAllDataFlows-D248lO6_.mjs.map} +1 -1
  30. package/dist/{fetchAllPreferenceTopics-Bn9PG-rO.mjs → fetchAllPreferenceTopics-ForE9GpZ.mjs} +2 -2
  31. package/dist/{fetchAllPreferenceTopics-Bn9PG-rO.mjs.map → fetchAllPreferenceTopics-ForE9GpZ.mjs.map} +1 -1
  32. package/dist/{fetchAllPurposes-CykSkZRY.mjs → fetchAllPurposes-ZdkO2fMp.mjs} +2 -2
  33. package/dist/{fetchAllPurposes-CykSkZRY.mjs.map → fetchAllPurposes-ZdkO2fMp.mjs.map} +1 -1
  34. package/dist/fetchAllPurposesAndPreferences-DD6OyA5t.mjs +2 -0
  35. package/dist/{fetchAllPurposesAndPreferences-Dog6N9L2.mjs.map → fetchAllPurposesAndPreferences-DD6OyA5t.mjs.map} +1 -1
  36. package/dist/{fetchAllRequestEnrichers-q34mRuE5.mjs → fetchAllRequestEnrichers-CK-kk5eg.mjs} +2 -2
  37. package/dist/{fetchAllRequestEnrichers-q34mRuE5.mjs.map → fetchAllRequestEnrichers-CK-kk5eg.mjs.map} +1 -1
  38. package/dist/{fetchAllRequestIdentifiers-YP-geTV4.mjs → fetchAllRequestIdentifiers-DrFFOt0m.mjs} +2 -2
  39. package/dist/{fetchAllRequestIdentifiers-YP-geTV4.mjs.map → fetchAllRequestIdentifiers-DrFFOt0m.mjs.map} +1 -1
  40. package/dist/{fetchAllRequests-DEPTEUbi.mjs → fetchAllRequests-DNQQsY4s.mjs} +2 -2
  41. package/dist/{fetchAllRequests-DEPTEUbi.mjs.map → fetchAllRequests-DNQQsY4s.mjs.map} +1 -1
  42. package/dist/{fetchApiKeys-DkBco7W0.mjs → fetchApiKeys-DjOr44xA.mjs} +2 -2
  43. package/dist/{fetchApiKeys-DkBco7W0.mjs.map → fetchApiKeys-DjOr44xA.mjs.map} +1 -1
  44. package/dist/{fetchCatalogs-CBk871k6.mjs → fetchCatalogs-BM4FCbcS.mjs} +2 -2
  45. package/dist/{fetchCatalogs-CBk871k6.mjs.map → fetchCatalogs-BM4FCbcS.mjs.map} +1 -1
  46. package/dist/{fetchConsentManagerId-DHDA5Py9.mjs → fetchConsentManagerId-CFkg3-RS.mjs} +2 -2
  47. package/dist/{fetchConsentManagerId-DHDA5Py9.mjs.map → fetchConsentManagerId-CFkg3-RS.mjs.map} +1 -1
  48. package/dist/{fetchIdentifiers-DjqjUnaw.mjs → fetchIdentifiers-pjQV4vUg.mjs} +2 -2
  49. package/dist/{fetchIdentifiers-DjqjUnaw.mjs.map → fetchIdentifiers-pjQV4vUg.mjs.map} +1 -1
  50. package/dist/{fetchRequestDataSilo-CF6XOTQ-.mjs → fetchRequestDataSilo-P4yA7Lyc.mjs} +2 -2
  51. package/dist/{fetchRequestDataSilo-CF6XOTQ-.mjs.map → fetchRequestDataSilo-P4yA7Lyc.mjs.map} +1 -1
  52. package/dist/{fetchRequestFilesForRequest-DrHGOdih.mjs → fetchRequestFilesForRequest-BbxrEKFK.mjs} +2 -2
  53. package/dist/{fetchRequestFilesForRequest-DrHGOdih.mjs.map → fetchRequestFilesForRequest-BbxrEKFK.mjs.map} +1 -1
  54. package/dist/{generateCrossAccountApiKeys-F11uqpc5.mjs → generateCrossAccountApiKeys-Bxc_dzMG.mjs} +2 -2
  55. package/dist/{generateCrossAccountApiKeys-F11uqpc5.mjs.map → generateCrossAccountApiKeys-Bxc_dzMG.mjs.map} +1 -1
  56. package/dist/{impl-0ooudQ_J2.mjs → impl-4ltdSmpl2.mjs} +2 -2
  57. package/dist/{impl-0ooudQ_J2.mjs.map → impl-4ltdSmpl2.mjs.map} +1 -1
  58. package/dist/{impl-BzupMfJi.mjs → impl-B19fH75P.mjs} +2 -2
  59. package/dist/{impl-BzupMfJi.mjs.map → impl-B19fH75P.mjs.map} +1 -1
  60. package/dist/{impl-CdoTu8TH.mjs → impl-BBMjv5YQ.mjs} +2 -2
  61. package/dist/{impl-CdoTu8TH.mjs.map → impl-BBMjv5YQ.mjs.map} +1 -1
  62. package/dist/{impl-Cwj9LeEI.mjs → impl-BKH3QRLi.mjs} +2 -2
  63. package/dist/{impl-Cwj9LeEI.mjs.map → impl-BKH3QRLi.mjs.map} +1 -1
  64. package/dist/{impl-KV3yZaHz2.mjs → impl-BOUm7wly2.mjs} +2 -2
  65. package/dist/{impl-KV3yZaHz2.mjs.map → impl-BOUm7wly2.mjs.map} +1 -1
  66. package/dist/{impl-r8tHyAHB.mjs → impl-BUC4ZelU.mjs} +2 -2
  67. package/dist/{impl-r8tHyAHB.mjs.map → impl-BUC4ZelU.mjs.map} +1 -1
  68. package/dist/{impl-dEQtD5uE.mjs → impl-BhTCp0kg.mjs} +2 -2
  69. package/dist/{impl-dEQtD5uE.mjs.map → impl-BhTCp0kg.mjs.map} +1 -1
  70. package/dist/{impl-f4UPMoS_2.mjs → impl-BlHU1bbJ2.mjs} +2 -2
  71. package/dist/{impl-f4UPMoS_2.mjs.map → impl-BlHU1bbJ2.mjs.map} +1 -1
  72. package/dist/{impl-CXK-D84c.mjs → impl-BwjguKHC.mjs} +2 -2
  73. package/dist/{impl-CXK-D84c.mjs.map → impl-BwjguKHC.mjs.map} +1 -1
  74. package/dist/{impl-VHp2K2bg.mjs → impl-C2o0eDzJ.mjs} +2 -2
  75. package/dist/{impl-VHp2K2bg.mjs.map → impl-C2o0eDzJ.mjs.map} +1 -1
  76. package/dist/{impl-2FbPcOv_2.mjs → impl-C8HKnjw82.mjs} +2 -2
  77. package/dist/{impl-2FbPcOv_2.mjs.map → impl-C8HKnjw82.mjs.map} +1 -1
  78. package/dist/{impl-CMX0qQr_2.mjs → impl-CCUsnhoW2.mjs} +2 -2
  79. package/dist/{impl-CMX0qQr_2.mjs.map → impl-CCUsnhoW2.mjs.map} +1 -1
  80. package/dist/{impl-B8iVBYdg.mjs → impl-CCc-wXqD.mjs} +2 -2
  81. package/dist/{impl-B8iVBYdg.mjs.map → impl-CCc-wXqD.mjs.map} +1 -1
  82. package/dist/{impl-ArGeiHuz.mjs → impl-CMmyv1cl.mjs} +2 -2
  83. package/dist/{impl-ArGeiHuz.mjs.map → impl-CMmyv1cl.mjs.map} +1 -1
  84. package/dist/{impl-1U4QBT_L.mjs → impl-CNez1OAw.mjs} +2 -2
  85. package/dist/impl-CNez1OAw.mjs.map +1 -0
  86. package/dist/{impl-DZnSlfwn2.mjs → impl-CNykdy3e2.mjs} +2 -2
  87. package/dist/{impl-DZnSlfwn2.mjs.map → impl-CNykdy3e2.mjs.map} +1 -1
  88. package/dist/{impl--Lmj1RHh2.mjs → impl-CSChmq_t2.mjs} +2 -2
  89. package/dist/{impl--Lmj1RHh2.mjs.map → impl-CSChmq_t2.mjs.map} +1 -1
  90. package/dist/{impl-dlRlTYAQ.mjs → impl-Ce9K4OCp.mjs} +2 -2
  91. package/dist/{impl-dlRlTYAQ.mjs.map → impl-Ce9K4OCp.mjs.map} +1 -1
  92. package/dist/{impl-CoLIqiH-2.mjs → impl-ChCqHkOc2.mjs} +2 -2
  93. package/dist/{impl-CoLIqiH-2.mjs.map → impl-ChCqHkOc2.mjs.map} +1 -1
  94. package/dist/{impl-DXWN22xV.mjs → impl-CqEwwWeD.mjs} +2 -2
  95. package/dist/{impl-DXWN22xV.mjs.map → impl-CqEwwWeD.mjs.map} +1 -1
  96. package/dist/{impl-CeLfAnyA2.mjs → impl-CqXFyvgV2.mjs} +2 -2
  97. package/dist/{impl-CeLfAnyA2.mjs.map → impl-CqXFyvgV2.mjs.map} +1 -1
  98. package/dist/{impl-ph0q6K3i.mjs → impl-CxLSJk2P.mjs} +2 -2
  99. package/dist/{impl-ph0q6K3i.mjs.map → impl-CxLSJk2P.mjs.map} +1 -1
  100. package/dist/{impl-DhIyASha.mjs → impl-CzU9WTiW.mjs} +2 -2
  101. package/dist/{impl-DhIyASha.mjs.map → impl-CzU9WTiW.mjs.map} +1 -1
  102. package/dist/{impl-BpUksm1b2.mjs → impl-D9NjIwEi2.mjs} +2 -2
  103. package/dist/{impl-BpUksm1b2.mjs.map → impl-D9NjIwEi2.mjs.map} +1 -1
  104. package/dist/{impl-BkyC7nnu.mjs → impl-DEWXA_QC.mjs} +2 -2
  105. package/dist/{impl-BkyC7nnu.mjs.map → impl-DEWXA_QC.mjs.map} +1 -1
  106. package/dist/{impl-DgyjJ8RY2.mjs → impl-DGiPB5Vq2.mjs} +2 -2
  107. package/dist/{impl-DgyjJ8RY2.mjs.map → impl-DGiPB5Vq2.mjs.map} +1 -1
  108. package/dist/{impl-CyJBbyuF.mjs → impl-DGuwD_qz.mjs} +2 -2
  109. package/dist/{impl-CyJBbyuF.mjs.map → impl-DGuwD_qz.mjs.map} +1 -1
  110. package/dist/{impl-D6nwGrO8.mjs → impl-DGzvE8aJ.mjs} +2 -2
  111. package/dist/{impl-D6nwGrO8.mjs.map → impl-DGzvE8aJ.mjs.map} +1 -1
  112. package/dist/{impl-Bc8Es_bT.mjs → impl-DTp9OQIZ.mjs} +2 -2
  113. package/dist/{impl-Bc8Es_bT.mjs.map → impl-DTp9OQIZ.mjs.map} +1 -1
  114. package/dist/{impl-DGRuk3AB.mjs → impl-DhscnXSw.mjs} +2 -2
  115. package/dist/{impl-DGRuk3AB.mjs.map → impl-DhscnXSw.mjs.map} +1 -1
  116. package/dist/{impl-BWjBYTQZ.mjs → impl-Dk7MdX-1.mjs} +2 -2
  117. package/dist/{impl-BWjBYTQZ.mjs.map → impl-Dk7MdX-1.mjs.map} +1 -1
  118. package/dist/{impl-Dny1LX9A.mjs → impl-DsNPvet4.mjs} +2 -2
  119. package/dist/{impl-Dny1LX9A.mjs.map → impl-DsNPvet4.mjs.map} +1 -1
  120. package/dist/{impl-DcC8_dCy.mjs → impl-DxUFb0vv.mjs} +2 -2
  121. package/dist/{impl-DcC8_dCy.mjs.map → impl-DxUFb0vv.mjs.map} +1 -1
  122. package/dist/{impl-y1I9Muyc2.mjs → impl-JThkrXiI2.mjs} +2 -2
  123. package/dist/{impl-y1I9Muyc2.mjs.map → impl-JThkrXiI2.mjs.map} +1 -1
  124. package/dist/{impl-Cq_RqK0_2.mjs → impl-KDuBh4bu2.mjs} +2 -2
  125. package/dist/{impl-Cq_RqK0_2.mjs.map → impl-KDuBh4bu2.mjs.map} +1 -1
  126. package/dist/{impl-C05tQHSq.mjs → impl-MpkLBntW.mjs} +2 -2
  127. package/dist/{impl-C05tQHSq.mjs.map → impl-MpkLBntW.mjs.map} +1 -1
  128. package/dist/{impl-Zr8uLP_n.mjs → impl-P_NDC3cX.mjs} +2 -2
  129. package/dist/{impl-Zr8uLP_n.mjs.map → impl-P_NDC3cX.mjs.map} +1 -1
  130. package/dist/{impl-D-ldjJzl2.mjs → impl-c7rUQYDc2.mjs} +2 -2
  131. package/dist/{impl-D-ldjJzl2.mjs.map → impl-c7rUQYDc2.mjs.map} +1 -1
  132. package/dist/{impl-G1brwI4o.mjs → impl-fqOKTw5J.mjs} +2 -2
  133. package/dist/{impl-G1brwI4o.mjs.map → impl-fqOKTw5J.mjs.map} +1 -1
  134. package/dist/{impl-Dfc_yQML2.mjs → impl-oiBTZqQS2.mjs} +2 -2
  135. package/dist/{impl-Dfc_yQML2.mjs.map → impl-oiBTZqQS2.mjs.map} +1 -1
  136. package/dist/{impl-CWHnw3oX.mjs → impl-tbGnvKFm.mjs} +2 -2
  137. package/dist/{impl-CWHnw3oX.mjs.map → impl-tbGnvKFm.mjs.map} +1 -1
  138. package/dist/index.d.mts +3397 -3397
  139. package/dist/index.mjs +1 -1
  140. package/dist/{makeGraphQLRequest-G078PsEL.mjs → makeGraphQLRequest-Cq26A_Lq.mjs} +2 -2
  141. package/dist/{makeGraphQLRequest-G078PsEL.mjs.map → makeGraphQLRequest-Cq26A_Lq.mjs.map} +1 -1
  142. package/dist/{markRequestDataSiloIdsCompleted-DmAz-R0M.mjs → markRequestDataSiloIdsCompleted-DzqJ5MNY.mjs} +2 -2
  143. package/dist/{markRequestDataSiloIdsCompleted-DmAz-R0M.mjs.map → markRequestDataSiloIdsCompleted-DzqJ5MNY.mjs.map} +1 -1
  144. package/dist/{markSilentPrivacyRequests-s7_aBROE.mjs → markSilentPrivacyRequests-BKQUu6Ep.mjs} +2 -2
  145. package/dist/{markSilentPrivacyRequests-s7_aBROE.mjs.map → markSilentPrivacyRequests-BKQUu6Ep.mjs.map} +1 -1
  146. package/dist/{mergeTranscendInputs-C64BJsse.mjs → mergeTranscendInputs-DGC4xUGu.mjs} +2 -2
  147. package/dist/{mergeTranscendInputs-C64BJsse.mjs.map → mergeTranscendInputs-DGC4xUGu.mjs.map} +1 -1
  148. package/dist/{notifyPrivacyRequestsAdditionalTime-BvXIXZYu.mjs → notifyPrivacyRequestsAdditionalTime-TEHAJe4C.mjs} +2 -2
  149. package/dist/{notifyPrivacyRequestsAdditionalTime-BvXIXZYu.mjs.map → notifyPrivacyRequestsAdditionalTime-TEHAJe4C.mjs.map} +1 -1
  150. package/dist/package-C4J38oR1.mjs +2 -0
  151. package/dist/package-C4J38oR1.mjs.map +1 -0
  152. package/dist/{pullAllDatapoints-DiMWp8a7.mjs → pullAllDatapoints-Cntwuzw7.mjs} +2 -2
  153. package/dist/{pullAllDatapoints-DiMWp8a7.mjs.map → pullAllDatapoints-Cntwuzw7.mjs.map} +1 -1
  154. package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-DgWgggQt.mjs → pullChunkedCustomSiloOutstandingIdentifiers-BT-GZpT1.mjs} +2 -2
  155. package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-DgWgggQt.mjs.map → pullChunkedCustomSiloOutstandingIdentifiers-BT-GZpT1.mjs.map} +1 -1
  156. package/dist/{pullConsentManagerMetrics-pFRPXTHJ.mjs → pullConsentManagerMetrics-FnhPEszu.mjs} +2 -2
  157. package/dist/{pullConsentManagerMetrics-pFRPXTHJ.mjs.map → pullConsentManagerMetrics-FnhPEszu.mjs.map} +1 -1
  158. package/dist/{pullManualEnrichmentIdentifiersToCsv-DA_4rIzW.mjs → pullManualEnrichmentIdentifiersToCsv-B_4REnga.mjs} +2 -2
  159. package/dist/{pullManualEnrichmentIdentifiersToCsv-DA_4rIzW.mjs.map → pullManualEnrichmentIdentifiersToCsv-B_4REnga.mjs.map} +1 -1
  160. package/dist/{pullTranscendConfiguration-D2cYlu6V.mjs → pullTranscendConfiguration-CqsgEf9A.mjs} +2 -2
  161. package/dist/{pullTranscendConfiguration-D2cYlu6V.mjs.map → pullTranscendConfiguration-CqsgEf9A.mjs.map} +1 -1
  162. package/dist/{pullUnstructuredSubDataPointRecommendations-C4aVhH-W.mjs → pullUnstructuredSubDataPointRecommendations-DZd2q6S2.mjs} +2 -2
  163. package/dist/{pullUnstructuredSubDataPointRecommendations-C4aVhH-W.mjs.map → pullUnstructuredSubDataPointRecommendations-DZd2q6S2.mjs.map} +1 -1
  164. package/dist/{pushCronIdentifiersFromCsv-C34TB9tG.mjs → pushCronIdentifiersFromCsv-D2saGR5i.mjs} +2 -2
  165. package/dist/{pushCronIdentifiersFromCsv-C34TB9tG.mjs.map → pushCronIdentifiersFromCsv-D2saGR5i.mjs.map} +1 -1
  166. package/dist/{pushManualEnrichmentIdentifiersFromCsv-CGS9E3Ft.mjs → pushManualEnrichmentIdentifiersFromCsv-DOvAzMyt.mjs} +2 -2
  167. package/dist/{pushManualEnrichmentIdentifiersFromCsv-CGS9E3Ft.mjs.map → pushManualEnrichmentIdentifiersFromCsv-DOvAzMyt.mjs.map} +1 -1
  168. package/dist/{removeUnverifiedRequestIdentifiers-pGGOFbfE.mjs → removeUnverifiedRequestIdentifiers-ChlwRmhd.mjs} +2 -2
  169. package/dist/{removeUnverifiedRequestIdentifiers-pGGOFbfE.mjs.map → removeUnverifiedRequestIdentifiers-ChlwRmhd.mjs.map} +1 -1
  170. package/dist/{retryRequestDataSilos-DXwN5uPw.mjs → retryRequestDataSilos-DnwXA1YZ.mjs} +2 -2
  171. package/dist/{retryRequestDataSilos-DXwN5uPw.mjs.map → retryRequestDataSilos-DnwXA1YZ.mjs.map} +1 -1
  172. package/dist/{skipPreflightJobs-BNQhuPZ8.mjs → skipPreflightJobs-jK5lNlmv.mjs} +2 -2
  173. package/dist/{skipPreflightJobs-BNQhuPZ8.mjs.map → skipPreflightJobs-jK5lNlmv.mjs.map} +1 -1
  174. package/dist/{skipRequestDataSilos-C39ji4lO.mjs → skipRequestDataSilos-DQGroOos.mjs} +2 -2
  175. package/dist/{skipRequestDataSilos-C39ji4lO.mjs.map → skipRequestDataSilos-DQGroOos.mjs.map} +1 -1
  176. package/dist/{streamPrivacyRequestsToCsv-C8lquiyd.mjs → streamPrivacyRequestsToCsv-BK07Bm-T.mjs} +2 -2
  177. package/dist/{streamPrivacyRequestsToCsv-C8lquiyd.mjs.map → streamPrivacyRequestsToCsv-BK07Bm-T.mjs.map} +1 -1
  178. package/dist/{syncCodePackages-BHgjfXCI.mjs → syncCodePackages-F-97FNjo.mjs} +2 -2
  179. package/dist/{syncCodePackages-BHgjfXCI.mjs.map → syncCodePackages-F-97FNjo.mjs.map} +1 -1
  180. package/dist/{syncCookies-CiLtxDFf.mjs → syncCookies-BxY36BeJ.mjs} +2 -2
  181. package/dist/{syncCookies-CiLtxDFf.mjs.map → syncCookies-BxY36BeJ.mjs.map} +1 -1
  182. package/dist/{syncDataFlows-DmBUs3G_.mjs → syncDataFlows-Cx5LZCen.mjs} +2 -2
  183. package/dist/{syncDataFlows-DmBUs3G_.mjs.map → syncDataFlows-Cx5LZCen.mjs.map} +1 -1
  184. package/dist/{syncTemplates-BNu1_dmW.mjs → syncTemplates-BrH7Yr0V.mjs} +2 -2
  185. package/dist/{syncTemplates-BNu1_dmW.mjs.map → syncTemplates-BrH7Yr0V.mjs.map} +1 -1
  186. package/dist/{updateConsentManagerVersionToLatest-BBMN94Hs.mjs → updateConsentManagerVersionToLatest-C221vAAw.mjs} +2 -2
  187. package/dist/{updateConsentManagerVersionToLatest-BBMN94Hs.mjs.map → updateConsentManagerVersionToLatest-C221vAAw.mjs.map} +1 -1
  188. package/dist/{uploadCookiesFromCsv-BKZx_E_2.mjs → uploadCookiesFromCsv-roHWekOP.mjs} +2 -2
  189. package/dist/{uploadCookiesFromCsv-BKZx_E_2.mjs.map → uploadCookiesFromCsv-roHWekOP.mjs.map} +1 -1
  190. package/dist/{uploadDataFlowsFromCsv-CJFVLvCJ.mjs → uploadDataFlowsFromCsv-DcTbrsv2.mjs} +2 -2
  191. package/dist/{uploadDataFlowsFromCsv-CJFVLvCJ.mjs.map → uploadDataFlowsFromCsv-DcTbrsv2.mjs.map} +1 -1
  192. package/dist/{uploadPrivacyRequestsFromCsv-BmP1JluQ.mjs → uploadPrivacyRequestsFromCsv-BUGTS-pY.mjs} +2 -2
  193. package/dist/{uploadPrivacyRequestsFromCsv-BmP1JluQ.mjs.map → uploadPrivacyRequestsFromCsv-BUGTS-pY.mjs.map} +1 -1
  194. package/dist/{uploadSiloDiscoveryResults-XpDp2u35.mjs → uploadSiloDiscoveryResults-D2fK92WR.mjs} +2 -2
  195. package/dist/{uploadSiloDiscoveryResults-XpDp2u35.mjs.map → uploadSiloDiscoveryResults-D2fK92WR.mjs.map} +1 -1
  196. package/dist/{withPreferenceRetry-Cb5S310L.mjs → withPreferenceRetry-xLMZyTq9.mjs} +2 -2
  197. package/dist/{withPreferenceRetry-Cb5S310L.mjs.map → withPreferenceRetry-xLMZyTq9.mjs.map} +1 -1
  198. package/package.json +7 -7
  199. package/dist/createExtraKeyHandler-C_0EVj10.mjs.map +0 -1
  200. package/dist/fetchAllPurposesAndPreferences-Dog6N9L2.mjs +0 -2
  201. package/dist/impl-1U4QBT_L.mjs.map +0 -1
  202. package/dist/package-BjNQxHlz.mjs +0 -2
  203. package/dist/package-BjNQxHlz.mjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"./enums-CyFTrzXY.mjs";import{n as o,t as s}from"./package-BjNQxHlz.mjs";import{a as c,c as l,d as u,f as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b}from"./constants-CeMiHaHx.mjs";import{t as x}from"./logger-B-LXIf3U.mjs";import{$ as S,A as ee,B as te,C as ne,D as re,E as ie,F as ae,G as oe,H as se,I as ce,J as le,K as ue,L as de,M as fe,N as pe,O as me,P as he,Q as ge,R as _e,S as ve,T as ye,U as be,V as xe,W as Se,X as Ce,Y as we,Z as Te,_ as Ee,_t as De,a as Oe,at as ke,b as Ae,bt as je,c as Me,ct as Ne,d as Pe,dt as Fe,et as Ie,f as Le,ft as Re,g as ze,gt as Be,h as Ve,ht as He,i as Ue,it as We,j as Ge,k as Ke,l as qe,lt as Je,m as Ye,mt as Xe,n as Ze,nt as Qe,o as $e,ot as et,p as tt,pt as nt,q as rt,r as it,rt as at,s as ot,st,t as ct,tt as lt,u as ut,ut as dt,v as ft,vt as pt,w as mt,x as ht,xt as gt,y as _t,yt as vt,z as yt}from"./codecs-BE3Wmoh8.mjs";import{a as bt,i as xt,n as St,r as Ct,t as wt}from"./readTranscendYaml-D-J1ilS0.mjs";import{n as Tt,t as C}from"./bluebird-CUitXgsY.mjs";import{a as Et,c as Dt,d as Ot,f as kt,i as At,l as jt,n as Mt,o as Nt,r as Pt,s as Ft,t as It,u as Lt}from"./dataSilo-DrFetFXw.mjs";import{n as Rt,t as zt}from"./pullUnstructuredSubDataPointRecommendations-C4aVhH-W.mjs";import{a as Bt,c as Vt,i as Ht,n as Ut,o as Wt,r as Gt,s as Kt,t as qt}from"./dataSubject-y_aXI0pa.mjs";import{n as Jt,r as Yt,t as Xt}from"./fetchCatalogs-CBk871k6.mjs";import{a as Zt,i as Qt,n as $t,o as en,r as tn,t as nn}from"./fetchIdentifiers-DjqjUnaw.mjs";import{_ as rn,a as an,c as on,d as sn,f as cn,g as ln,h as un,i as dn,l as fn,m as pn,n as mn,o as hn,p as gn,r as _n,s as vn,t as yn,u as bn,v as xn}from"./syncCodePackages-BHgjfXCI.mjs";import{a as Sn,i as Cn,n as wn,r as Tn,t as En}from"./fetchApiKeys-DkBco7W0.mjs";import{n as Dn,t as On}from"./createPreferenceAccessTokens-6WLr6z-l.mjs";import{i as kn,n as An,r as jn,t as Mn}from"./uploadSiloDiscoveryResults-XpDp2u35.mjs";import{i as Nn,n as Pn,r as Fn,t as In}from"./syncTemplates-BNu1_dmW.mjs";import{n as Ln,t as w}from"./createSombraGotInstance-CahOgD6V.mjs";import{a as Rn,c as zn,d as Bn,f as Vn,i as Hn,l as Un,m as Wn,n as Gn,o as Kn,p as qn,r as Jn,s as Yn,t as Xn,u as Zn}from"./uploadPrivacyRequestsFromCsv-BmP1JluQ.mjs";import{$ as Qn,A as $n,At as er,B as tr,Bt as nr,C as rr,Ct as ir,D as ar,Dt as or,E as sr,Et as cr,F as T,Ft as lr,G as ur,H as dr,Ht as fr,I as pr,It as mr,J as hr,K as gr,L as _r,Lt as vr,M as yr,Mt as br,N as E,Nt as xr,O as Sr,Ot as Cr,P as wr,Pt as Tr,Q as Er,R as Dr,Rt as Or,S as kr,St as Ar,T as jr,Tt as Mr,U as Nr,Ut as Pr,V as Fr,Vt as Ir,W as Lr,X as Rr,Y as zr,Z as Br,_ as Vr,_t as Hr,a as Ur,at as Wr,b as Gr,bt as Kr,c as qr,ct as Jr,d as Yr,dt as Xr,et as Zr,ft as Qr,g as $r,gt as ei,h as ti,ht as ni,i as ri,it as ii,j as ai,jt as oi,k as si,kt as ci,l as li,lt as ui,m as D,mt as di,n as fi,nt as pi,o as mi,ot as hi,p as gi,pt as _i,q as vi,r as yi,rt as bi,s as xi,st as Si,t as Ci,tt as wi,u as Ti,ut as Ei,v as Di,vt as Oi,w as ki,wt as Ai,x as ji,xt as O,y as Mi,yt as Ni,z as Pi,zt as Fi}from"./fetchAllActions-C0l3wjQV.mjs";import{a as Ii,i as Li,n as Ri,o as zi,r as Bi,t as Vi}from"./request-CAsR6CMY.mjs";import{i as Hi,n as Ui,r as Wi,t as Gi}from"./fetchAllRequestEnrichers-q34mRuE5.mjs";import{n as Ki,r as qi,t as Ji}from"./assessment-BDywVaGR.mjs";import{n as Yi,t as Xi}from"./fetchAllPurposes-CykSkZRY.mjs";import{n as Zi,t as Qi}from"./fetchAllPreferenceTopics-Bn9PG-rO.mjs";import{_ as $i,a as ea,c as ta,d as na,f as ra,g as ia,h as aa,i as oa,l as sa,m as ca,n as la,o as ua,p as da,r as fa,s as pa,t as ma,u as ha,v as ga,y as _a}from"./pullTranscendConfiguration-D2cYlu6V.mjs";import{i as va,n as ya,r as ba,t as xa}from"./RequestDataSilo-_Iv44M9u.mjs";import{i as Sa,n as Ca,r as wa,t as Ta}from"./removeUnverifiedRequestIdentifiers-pGGOFbfE.mjs";import{n as Ea,r as Da,t as Oa}from"./fetchRequestFilesForRequest-DrHGOdih.mjs";import{A as ka,C as Aa,D as ja,E as Ma,M as Na,O as Pa,S as Fa,T as Ia,_ as La,a as Ra,b as za,c as Ba,d as Va,f as Ha,g as Ua,h as Wa,i as Ga,j as Ka,k as qa,l as Ja,m as Ya,n as Xa,o as Za,p as Qa,r as $a,s as eo,t as to,u as no,v as ro,w as io,x as ao,y as oo}from"./fetchConsentManagerId-DHDA5Py9.mjs";import{a as so,c as co,i as lo,n as uo,o as fo,r as po,s as mo,t as ho}from"./generateCrossAccountApiKeys-F11uqpc5.mjs";import{i as go,n as k,r as A,t as _o}from"./fetchAllRequestIdentifiers-YP-geTV4.mjs";import{a as vo,c as yo,i as bo,l as xo,n as So,o as Co,r as wo,s as To,t as Eo,u as Do}from"./constants-lIvXgkdp.mjs";import{i as Oo,n as ko,r as Ao,t as jo}from"./parseAttributesFromString-CZStzJc0.mjs";import{t as Mo}from"./splitCsvToList-BRq_CIfd.mjs";import{t as No}from"./readCsv-CyOL7eCc.mjs";import{i as Po,n as j,r as M,t as N}from"./makeGraphQLRequest-G078PsEL.mjs";import{a as Fo,i as Io,n as Lo,r as Ro,t as zo}from"./uploadConsents-BbR7_sSt.mjs";import{n as Bo,r as Vo,t as Ho}from"./updateConsentManagerVersionToLatest-BBMN94Hs.mjs";import{t as Uo}from"./fetchAllDataFlows-AQ9j_NRa.mjs";import{t as Wo}from"./fetchAllPurposesAndPreferences-Dog6N9L2.mjs";import{i as Go,n as Ko,r as P,t as qo}from"./fetchAllRequests-DEPTEUbi.mjs";import{n as Jo,r as Yo,t as Xo}from"./fetchRequestDataSilo-CF6XOTQ-.mjs";import{i as Zo,n as Qo,r as $o,t as es}from"./pullChunkedCustomSiloOutstandingIdentifiers-DgWgggQt.mjs";import{n as ts,t as ns}from"./bulkRetryEnrichers-BLkcFKXC.mjs";import{A as rs,B as is,C as as,D as os,E as ss,F as cs,G as ls,H as us,I as ds,L as fs,M as ps,N as ms,O as hs,P as gs,R as _s,S as vs,T as ys,U as bs,V as xs,W as Ss,_ as Cs,a as ws,b as Ts,c as Es,d as Ds,f as Os,g as ks,h as As,i as js,j as Ms,k as Ns,l as Ps,m as Fs,n as Is,o as Ls,p as Rs,r as zs,s as Bs,t as Vs,u as Hs,v as Us,w as Ws,x as Gs,y as Ks,z as qs}from"./mergeTranscendInputs-C64BJsse.mjs";import{n as Js,t as Ys}from"./syncCookies-CiLtxDFf.mjs";import{n as Xs,r as Zs,t as Qs}from"./syncDataFlows-DmBUs3G_.mjs";import{t as $s}from"./markSilentPrivacyRequests-s7_aBROE.mjs";import{a as ec,i as tc,n as nc,o as rc,r as ic,t as ac}from"./downloadPrivacyRequestFiles-B2yduagB.mjs";import{n as oc,r as sc,t as cc}from"./extractClientError-DPjv09EH.mjs";import{t as lc}from"./approvePrivacyRequests-1cguqGqq.mjs";import{t as uc}from"./notifyPrivacyRequestsAdditionalTime-BvXIXZYu.mjs";import{t as dc}from"./cancelPrivacyRequests-C8MZQvsq.mjs";import{n as fc,t as pc}from"./bulkRestartRequests-DEPSHov-.mjs";import{t as mc}from"./skipPreflightJobs-BNQhuPZ8.mjs";import{t as hc}from"./retryRequestDataSilos-DXwN5uPw.mjs";import{n as F,t as gc}from"./streamPrivacyRequestsToCsv-C8lquiyd.mjs";import{t as _c}from"./skipRequestDataSilos-C39ji4lO.mjs";import{n as vc,r as yc,t as bc}from"./inquirer-BgNcicZ4.mjs";import{t as I}from"./extractErrorMessage-CPnTsT1S.mjs";import{t as xc}from"./RateCounter-DFL_mnk2.mjs";import{n as Sc,t as Cc}from"./parquetToCsvOneFile-DZVKXrjn.mjs";import{a as wc,c as Tc,i as Ec,n as Dc,o as Oc,r as kc,s as Ac,t as jc}from"./time-Bl_c3W8U.mjs";import{a as Mc,i as Nc,n as Pc,o as Fc,r as Ic,s as Lc,t as Rc}from"./writeCsv-B51ulrVl.mjs";import{t as zc}from"./uploadDataFlowsFromCsv-CJFVLvCJ.mjs";import{t as Bc}from"./uploadCookiesFromCsv-BKZx_E_2.mjs";import{t as Vc}from"./pullConsentManagerMetrics-pFRPXTHJ.mjs";import{n as Hc,r as Uc,t as Wc}from"./buildXdiSyncEndpoint-BMaMHO7Z.mjs";import{t as Gc}from"./consentManagersToBusinessEntities-BDgOFga7.mjs";import{n as Kc,r as qc,t as Jc}from"./pushCronIdentifiersFromCsv-C34TB9tG.mjs";import{t as Yc}from"./markRequestDataSiloIdsCompleted-DmAz-R0M.mjs";import{t as Xc}from"./validateTranscendAuth-1W1IylqE.mjs";import{t as Zc}from"./listFiles-qzyQMaYH.mjs";import{t as Qc}from"./pullAllDatapoints-DiMWp8a7.mjs";import{t as $c}from"./pullManualEnrichmentIdentifiersToCsv-DA_4rIzW.mjs";import{n as el,r as tl,t as nl}from"./pushManualEnrichmentIdentifiersFromCsv-CGS9E3Ft.mjs";import{ChatCompletionRole as L,PromptRunProductArea as R,PromptStatus as z,QueueStatus as B}from"@transcend-io/privacy-types";import{chunk as rl,difference as il,groupBy as al,keyBy as V,uniq as ol}from"lodash-es";import{apply as sl,decodeCodec as H,getValues as cl}from"@transcend-io/type-utils";import{readFileSync as ll,readdirSync as ul,statSync as dl}from"node:fs";import{join as fl}from"node:path";import U from"colors";import{gql as W}from"graphql-request";import{createHandlebarsWithHelpers as G}from"@transcend-io/handlebars-utils";import{execSync as K}from"child_process";import pl from"fast-glob";const q=W`
1
+ import{a as e,i as t,n,o as r,r as i,t as a}from"./enums-CyFTrzXY.mjs";import{n as o,t as s}from"./package-C4J38oR1.mjs";import{a as c,c as l,d as u,f as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b}from"./constants-CeMiHaHx.mjs";import{t as x}from"./logger-B-LXIf3U.mjs";import{$ as S,A as ee,B as te,C as ne,D as re,E as ie,F as ae,G as oe,H as se,I as ce,J as le,K as ue,L as de,M as fe,N as pe,O as me,P as he,Q as ge,R as _e,S as ve,T as ye,U as be,V as xe,W as Se,X as Ce,Y as we,Z as Te,_ as Ee,_t as De,a as Oe,at as ke,b as Ae,bt as je,c as Me,ct as Ne,d as Pe,dt as Fe,et as Ie,f as Le,ft as Re,g as ze,gt as Be,h as Ve,ht as He,i as Ue,it as We,j as Ge,k as Ke,l as qe,lt as Je,m as Ye,mt as Xe,n as Ze,nt as Qe,o as $e,ot as et,p as tt,pt as nt,q as rt,r as it,rt as at,s as ot,st,t as ct,tt as lt,u as ut,ut as dt,v as ft,vt as pt,w as mt,x as ht,xt as gt,y as _t,yt as vt,z as yt}from"./codecs-BE3Wmoh8.mjs";import{a as bt,i as xt,n as St,r as Ct,t as wt}from"./readTranscendYaml-D-J1ilS0.mjs";import{n as Tt,t as C}from"./bluebird-CUitXgsY.mjs";import{a as Et,c as Dt,d as Ot,f as kt,i as At,l as jt,n as Mt,o as Nt,r as Pt,s as Ft,t as It,u as Lt}from"./dataSilo-DrFetFXw.mjs";import{n as Rt,t as zt}from"./pullUnstructuredSubDataPointRecommendations-DZd2q6S2.mjs";import{a as Bt,c as Vt,i as Ht,n as Ut,o as Wt,r as Gt,s as Kt,t as qt}from"./dataSubject-y_aXI0pa.mjs";import{n as Jt,r as Yt,t as Xt}from"./fetchCatalogs-BM4FCbcS.mjs";import{a as Zt,i as Qt,n as $t,o as en,r as tn,t as nn}from"./fetchIdentifiers-pjQV4vUg.mjs";import{_ as rn,a as an,c as on,d as sn,f as cn,g as ln,h as un,i as dn,l as fn,m as pn,n as mn,o as hn,p as gn,r as _n,s as vn,t as yn,u as bn,v as xn}from"./syncCodePackages-F-97FNjo.mjs";import{a as Sn,i as Cn,n as wn,r as Tn,t as En}from"./fetchApiKeys-DjOr44xA.mjs";import{n as Dn,t as On}from"./createPreferenceAccessTokens-DqmFctn3.mjs";import{i as kn,n as An,r as jn,t as Mn}from"./uploadSiloDiscoveryResults-D2fK92WR.mjs";import{i as Nn,n as Pn,r as Fn,t as In}from"./syncTemplates-BrH7Yr0V.mjs";import{n as Ln,t as w}from"./createSombraGotInstance-D1Il9zUE.mjs";import{a as Rn,c as zn,d as Bn,f as Vn,i as Hn,l as Un,m as Wn,n as Gn,o as Kn,p as qn,r as Jn,s as Yn,t as Xn,u as Zn}from"./uploadPrivacyRequestsFromCsv-BUGTS-pY.mjs";import{$ as Qn,A as $n,At as er,B as tr,Bt as nr,C as rr,Ct as ir,D as ar,Dt as or,E as sr,Et as cr,F as T,Ft as lr,G as ur,H as dr,Ht as fr,I as pr,It as mr,J as hr,K as gr,L as _r,Lt as vr,M as yr,Mt as br,N as E,Nt as xr,O as Sr,Ot as Cr,P as wr,Pt as Tr,Q as Er,R as Dr,Rt as Or,S as kr,St as Ar,T as jr,Tt as Mr,U as Nr,Ut as Pr,V as Fr,Vt as Ir,W as Lr,X as Rr,Y as zr,Z as Br,_ as Vr,_t as Hr,a as Ur,at as Wr,b as Gr,bt as Kr,c as qr,ct as Jr,d as Yr,dt as Xr,et as Zr,ft as Qr,g as $r,gt as ei,h as ti,ht as ni,i as ri,it as ii,j as ai,jt as oi,k as si,kt as ci,l as li,lt as ui,m as D,mt as di,n as fi,nt as pi,o as mi,ot as hi,p as gi,pt as _i,q as vi,r as yi,rt as bi,s as xi,st as Si,t as Ci,tt as wi,u as Ti,ut as Ei,v as Di,vt as Oi,w as ki,wt as Ai,x as ji,xt as O,y as Mi,yt as Ni,z as Pi,zt as Fi}from"./fetchAllActions-BJsPdnxy.mjs";import{a as Ii,i as Li,n as Ri,o as zi,r as Bi,t as Vi}from"./request-CAsR6CMY.mjs";import{i as Hi,n as Ui,r as Wi,t as Gi}from"./fetchAllRequestEnrichers-CK-kk5eg.mjs";import{n as Ki,r as qi,t as Ji}from"./assessment-BDywVaGR.mjs";import{n as Yi,t as Xi}from"./fetchAllPurposes-ZdkO2fMp.mjs";import{n as Zi,t as Qi}from"./fetchAllPreferenceTopics-ForE9GpZ.mjs";import{_ as $i,a as ea,c as ta,d as na,f as ra,g as ia,h as aa,i as oa,l as sa,m as ca,n as la,o as ua,p as da,r as fa,s as pa,t as ma,u as ha,v as ga,y as _a}from"./pullTranscendConfiguration-CqsgEf9A.mjs";import{i as va,n as ya,r as ba,t as xa}from"./RequestDataSilo-_Iv44M9u.mjs";import{i as Sa,n as Ca,r as wa,t as Ta}from"./removeUnverifiedRequestIdentifiers-ChlwRmhd.mjs";import{n as Ea,r as Da,t as Oa}from"./fetchRequestFilesForRequest-BbxrEKFK.mjs";import{A as ka,C as Aa,D as ja,E as Ma,M as Na,O as Pa,S as Fa,T as Ia,_ as La,a as Ra,b as za,c as Ba,d as Va,f as Ha,g as Ua,h as Wa,i as Ga,j as Ka,k as qa,l as Ja,m as Ya,n as Xa,o as Za,p as Qa,r as $a,s as eo,t as to,u as no,v as ro,w as io,x as ao,y as oo}from"./fetchConsentManagerId-CFkg3-RS.mjs";import{a as so,c as co,i as lo,n as uo,o as fo,r as po,s as mo,t as ho}from"./generateCrossAccountApiKeys-Bxc_dzMG.mjs";import{i as go,n as k,r as A,t as _o}from"./fetchAllRequestIdentifiers-DrFFOt0m.mjs";import{a as vo,c as yo,i as bo,l as xo,n as So,o as Co,r as wo,s as To,t as Eo,u as Do}from"./constants-lIvXgkdp.mjs";import{i as Oo,n as ko,r as Ao,t as jo}from"./parseAttributesFromString-CZStzJc0.mjs";import{t as Mo}from"./splitCsvToList-BRq_CIfd.mjs";import{t as No}from"./readCsv-CyOL7eCc.mjs";import{i as Po,n as j,r as M,t as N}from"./makeGraphQLRequest-Cq26A_Lq.mjs";import{a as Fo,i as Io,n as Lo,r as Ro,t as zo}from"./uploadConsents-BbR7_sSt.mjs";import{n as Bo,r as Vo,t as Ho}from"./updateConsentManagerVersionToLatest-C221vAAw.mjs";import{t as Uo}from"./fetchAllDataFlows-D248lO6_.mjs";import{t as Wo}from"./fetchAllPurposesAndPreferences-DD6OyA5t.mjs";import{i as Go,n as Ko,r as P,t as qo}from"./fetchAllRequests-DNQQsY4s.mjs";import{n as Jo,r as Yo,t as Xo}from"./fetchRequestDataSilo-P4yA7Lyc.mjs";import{i as Zo,n as Qo,r as $o,t as es}from"./pullChunkedCustomSiloOutstandingIdentifiers-BT-GZpT1.mjs";import{n as ts,t as ns}from"./bulkRetryEnrichers-B-Szmin-.mjs";import{A as rs,B as is,C as as,D as os,E as ss,F as cs,G as ls,H as us,I as ds,L as fs,M as ps,N as ms,O as hs,P as gs,R as _s,S as vs,T as ys,U as bs,V as xs,W as Ss,_ as Cs,a as ws,b as Ts,c as Es,d as Ds,f as Os,g as ks,h as As,i as js,j as Ms,k as Ns,l as Ps,m as Fs,n as Is,o as Ls,p as Rs,r as zs,s as Bs,t as Vs,u as Hs,v as Us,w as Ws,x as Gs,y as Ks,z as qs}from"./mergeTranscendInputs-DGC4xUGu.mjs";import{n as Js,t as Ys}from"./syncCookies-BxY36BeJ.mjs";import{n as Xs,r as Zs,t as Qs}from"./syncDataFlows-Cx5LZCen.mjs";import{t as $s}from"./markSilentPrivacyRequests-BKQUu6Ep.mjs";import{a as ec,i as tc,n as nc,o as rc,r as ic,t as ac}from"./downloadPrivacyRequestFiles-DlpgxqHF.mjs";import{n as oc,r as sc,t as cc}from"./extractClientError-DPjv09EH.mjs";import{t as lc}from"./approvePrivacyRequests-CWGZR2N6.mjs";import{t as uc}from"./notifyPrivacyRequestsAdditionalTime-TEHAJe4C.mjs";import{t as dc}from"./cancelPrivacyRequests-DNiL13E_.mjs";import{n as fc,t as pc}from"./bulkRestartRequests-CKF_xpN0.mjs";import{t as mc}from"./skipPreflightJobs-jK5lNlmv.mjs";import{t as hc}from"./retryRequestDataSilos-DnwXA1YZ.mjs";import{n as F,t as gc}from"./streamPrivacyRequestsToCsv-BK07Bm-T.mjs";import{t as _c}from"./skipRequestDataSilos-DQGroOos.mjs";import{n as vc,r as yc,t as bc}from"./inquirer-BgNcicZ4.mjs";import{t as I}from"./extractErrorMessage-CPnTsT1S.mjs";import{t as xc}from"./RateCounter-DFL_mnk2.mjs";import{n as Sc,t as Cc}from"./parquetToCsvOneFile-DZVKXrjn.mjs";import{a as wc,c as Tc,i as Ec,n as Dc,o as Oc,r as kc,s as Ac,t as jc}from"./time-Bl_c3W8U.mjs";import{a as Mc,i as Nc,n as Pc,o as Fc,r as Ic,s as Lc,t as Rc}from"./writeCsv-B51ulrVl.mjs";import{t as zc}from"./uploadDataFlowsFromCsv-DcTbrsv2.mjs";import{t as Bc}from"./uploadCookiesFromCsv-roHWekOP.mjs";import{t as Vc}from"./pullConsentManagerMetrics-FnhPEszu.mjs";import{n as Hc,r as Uc,t as Wc}from"./buildXdiSyncEndpoint-Cb-pvpak.mjs";import{t as Gc}from"./consentManagersToBusinessEntities-BDgOFga7.mjs";import{n as Kc,r as qc,t as Jc}from"./pushCronIdentifiersFromCsv-D2saGR5i.mjs";import{t as Yc}from"./markRequestDataSiloIdsCompleted-DzqJ5MNY.mjs";import{t as Xc}from"./validateTranscendAuth-1W1IylqE.mjs";import{t as Zc}from"./listFiles-qzyQMaYH.mjs";import{t as Qc}from"./pullAllDatapoints-Cntwuzw7.mjs";import{t as $c}from"./pullManualEnrichmentIdentifiersToCsv-B_4REnga.mjs";import{n as el,r as tl,t as nl}from"./pushManualEnrichmentIdentifiersFromCsv-DOvAzMyt.mjs";import{ChatCompletionRole as L,PromptRunProductArea as R,PromptStatus as z,QueueStatus as B}from"@transcend-io/privacy-types";import{chunk as rl,difference as il,groupBy as al,keyBy as V,uniq as ol}from"lodash-es";import{apply as sl,decodeCodec as H,getValues as cl}from"@transcend-io/type-utils";import{readFileSync as ll,readdirSync as ul,statSync as dl}from"node:fs";import{join as fl}from"node:path";import U from"colors";import{gql as W}from"graphql-request";import{createHandlebarsWithHelpers as G}from"@transcend-io/handlebars-utils";import{execSync as K}from"child_process";import pl from"fast-glob";const q=W`
2
2
  query TranscendCliPromptThreads(
3
3
  $first: Int!
4
4
  $offset: Int!
@@ -1,2 +1,2 @@
1
- import{n as e}from"./package-BjNQxHlz.mjs";import{t}from"./logger-B-LXIf3U.mjs";import n from"colors";import{GraphQLClient as r}from"graphql-request";function i(t,n){return new r(`${t}/graphql`,{headers:{...n,version:e}})}function a(e,t){return i(e,{Authorization:`Bearer ${t}`})}function o(e){return new Promise(t=>{setTimeout(()=>t(e),e)})}const s=[`syntax error`,`got invalid value`,`Client error`,`cannot affect row a second time`,`GRAPHQL_VALIDATION_FAILED`];async function c(e,r,i,a,c=4){let l=0;for(;;)try{return await e.request(r,i,a)}catch(e){if(e.message.includes(`API key is invalid`)&&(t.error(n.red("API key is invalid. Please ensure that the key provided to `transcendAuth` has the proper scope and is not expired, and that `transcendUrl` corresponds to the correct backend for your organization.")),process.exit(1)),s.some(t=>e.message.includes(t)))throw e;if(e.message.startsWith(`Client error: Too many requests`)){let r=e.response.headers?.get(`x-ratelimit-reset`),i=r?new Date(r).getTime()-new Date().getTime()+100:1e3*10;t.log(n.yellow(`DETECTED RATE LIMIT: ${e.message}. Sleeping for ${i}ms`)),await o(i)}if(l>=c)throw e;l+=1,t.log(n.yellow(`Retrying failed request (${l} / ${c}): ${e.message}`))}}export{i,o as n,a as r,c as t};
2
- //# sourceMappingURL=makeGraphQLRequest-G078PsEL.mjs.map
1
+ import{n as e}from"./package-C4J38oR1.mjs";import{t}from"./logger-B-LXIf3U.mjs";import n from"colors";import{GraphQLClient as r}from"graphql-request";function i(t,n){return new r(`${t}/graphql`,{headers:{...n,version:e}})}function a(e,t){return i(e,{Authorization:`Bearer ${t}`})}function o(e){return new Promise(t=>{setTimeout(()=>t(e),e)})}const s=[`syntax error`,`got invalid value`,`Client error`,`cannot affect row a second time`,`GRAPHQL_VALIDATION_FAILED`];async function c(e,r,i,a,c=4){let l=0;for(;;)try{return await e.request(r,i,a)}catch(e){if(e.message.includes(`API key is invalid`)&&(t.error(n.red("API key is invalid. Please ensure that the key provided to `transcendAuth` has the proper scope and is not expired, and that `transcendUrl` corresponds to the correct backend for your organization.")),process.exit(1)),s.some(t=>e.message.includes(t)))throw e;if(e.message.startsWith(`Client error: Too many requests`)){let r=e.response.headers?.get(`x-ratelimit-reset`),i=r?new Date(r).getTime()-new Date().getTime()+100:1e3*10;t.log(n.yellow(`DETECTED RATE LIMIT: ${e.message}. Sleeping for ${i}ms`)),await o(i)}if(l>=c)throw e;l+=1,t.log(n.yellow(`Retrying failed request (${l} / ${c}): ${e.message}`))}}export{i,o as n,a as r,c as t};
2
+ //# sourceMappingURL=makeGraphQLRequest-Cq26A_Lq.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"makeGraphQLRequest-G078PsEL.mjs","names":[],"sources":["../src/lib/graphql/buildTranscendGraphQLClient.ts","../src/lib/helpers/sleepPromise.ts","../src/lib/graphql/makeGraphQLRequest.ts"],"sourcesContent":["import { GraphQLClient } from 'graphql-request';\n\nimport { version } from '../../../package.json';\n\n/**\n * Create a GraphQL client\n *\n * @param transcendUrl - Transcend API URL\n * @param headers - Request headers to include in each request\n * @returns GraphQL client\n */\nexport function buildTranscendGraphQLClientGeneric(\n transcendUrl: string,\n headers: Record<string, string>,\n): GraphQLClient {\n // Create a GraphQL client\n return new GraphQLClient(`${transcendUrl}/graphql`, {\n headers: {\n ...headers,\n version,\n },\n });\n}\n\n/**\n * Create a GraphQL client capable of submitting requests with an API key\n *\n * @param transcendUrl - Transcend API URL\n * @param auth - API key to authenticate to API\n * @returns GraphQL client\n */\nexport function buildTranscendGraphQLClient(transcendUrl: string, auth: string): GraphQLClient {\n return buildTranscendGraphQLClientGeneric(transcendUrl, {\n Authorization: `Bearer ${auth}`,\n });\n}\n","/**\n * Sleep in a promise\n *\n * @param sleepTime - The time to sleep in milliseconds.\n * @returns Resolves promise\n */\nexport function sleepPromise(sleepTime: number): Promise<number> {\n return new Promise((resolve) => {\n setTimeout(() => resolve(sleepTime), sleepTime);\n });\n}\n","import colors from 'colors';\nimport type { GraphQLClient, RequestDocument, Variables } from 'graphql-request';\n\nimport { logger } from '../../logger.js';\nimport { sleepPromise } from '../helpers/index.js';\n\nconst MAX_RETRIES = 4;\n\nconst KNOWN_ERRORS = [\n 'syntax error',\n 'got invalid value',\n 'Client error',\n 'cannot affect row a second time',\n 'GRAPHQL_VALIDATION_FAILED',\n];\n\n/**\n * Make a GraphQL request with retries\n *\n * @param client - GraphQL client\n * @param document - document\n * @param variables - Variable\n * @param requestHeaders - Headers\n * @param maxRequests - Max number of requests\n * @returns Response\n */\nexport async function makeGraphQLRequest<T, V extends Variables = Variables>(\n client: GraphQLClient,\n document: RequestDocument,\n variables?: V,\n requestHeaders?: Record<string, string> | string[][] | Headers,\n maxRequests = MAX_RETRIES,\n): Promise<T> {\n let retryCount = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n try {\n const result = await client.request(document, variables, requestHeaders);\n return result as T;\n } catch (err) {\n if (err.message.includes('API key is invalid')) {\n logger.error(\n colors.red(\n 'API key is invalid. ' +\n 'Please ensure that the key provided to `transcendAuth` has the proper scope and is not expired, ' +\n 'and that `transcendUrl` corresponds to the correct backend for your organization.',\n ),\n );\n process.exit(1);\n }\n\n if (KNOWN_ERRORS.some((msg) => err.message.includes(msg))) {\n throw err;\n }\n\n // wait for rate limit to resolve\n if (err.message.startsWith('Client error: Too many requests')) {\n const rateLimitResetAt = err.response.headers?.get('x-ratelimit-reset');\n const sleepTime = rateLimitResetAt\n ? new Date(rateLimitResetAt).getTime() - new Date().getTime() + 100\n : 1000 * 10;\n logger.log(\n colors.yellow(`DETECTED RATE LIMIT: ${err.message}. Sleeping for ${sleepTime}ms`),\n );\n\n await sleepPromise(sleepTime);\n }\n\n if (retryCount >= maxRequests) {\n throw err;\n }\n retryCount += 1;\n logger.log(\n colors.yellow(`Retrying failed request (${retryCount} / ${maxRequests}): ${err.message}`),\n );\n }\n }\n}\n"],"mappings":"sJAWA,SAAgB,EACd,EACA,EACe,CAEf,OAAO,IAAI,EAAc,GAAG,EAAa,UAAW,CAClD,QAAS,CACP,GAAG,EACH,UACD,CACF,CAAC,CAUJ,SAAgB,EAA4B,EAAsB,EAA6B,CAC7F,OAAO,EAAmC,EAAc,CACtD,cAAe,UAAU,IAC1B,CAAC,CC5BJ,SAAgB,EAAa,EAAoC,CAC/D,OAAO,IAAI,QAAS,GAAY,CAC9B,eAAiB,EAAQ,EAAU,CAAE,EAAU,EAC/C,CCHJ,MAEM,EAAe,CACnB,eACA,oBACA,eACA,kCACA,4BACD,CAYD,eAAsB,EACpB,EACA,EACA,EACA,EACA,EAAc,EACF,CACZ,IAAI,EAAa,EAEjB,OACE,GAAI,CAEF,OADe,MAAM,EAAO,QAAQ,EAAU,EAAW,EAAe,OAEjE,EAAK,CAYZ,GAXI,EAAI,QAAQ,SAAS,qBAAqB,GAC5C,EAAO,MACL,EAAO,IACL,wMAGD,CACF,CACD,QAAQ,KAAK,EAAE,EAGb,EAAa,KAAM,GAAQ,EAAI,QAAQ,SAAS,EAAI,CAAC,CACvD,MAAM,EAIR,GAAI,EAAI,QAAQ,WAAW,kCAAkC,CAAE,CAC7D,IAAM,EAAmB,EAAI,SAAS,SAAS,IAAI,oBAAoB,CACjE,EAAY,EACd,IAAI,KAAK,EAAiB,CAAC,SAAS,CAAG,IAAI,MAAM,CAAC,SAAS,CAAG,IAC9D,IAAO,GACX,EAAO,IACL,EAAO,OAAO,wBAAwB,EAAI,QAAQ,iBAAiB,EAAU,IAAI,CAClF,CAED,MAAM,EAAa,EAAU,CAG/B,GAAI,GAAc,EAChB,MAAM,EAER,GAAc,EACd,EAAO,IACL,EAAO,OAAO,4BAA4B,EAAW,KAAK,EAAY,KAAK,EAAI,UAAU,CAC1F"}
1
+ {"version":3,"file":"makeGraphQLRequest-Cq26A_Lq.mjs","names":[],"sources":["../src/lib/graphql/buildTranscendGraphQLClient.ts","../src/lib/helpers/sleepPromise.ts","../src/lib/graphql/makeGraphQLRequest.ts"],"sourcesContent":["import { GraphQLClient } from 'graphql-request';\n\nimport { version } from '../../../package.json';\n\n/**\n * Create a GraphQL client\n *\n * @param transcendUrl - Transcend API URL\n * @param headers - Request headers to include in each request\n * @returns GraphQL client\n */\nexport function buildTranscendGraphQLClientGeneric(\n transcendUrl: string,\n headers: Record<string, string>,\n): GraphQLClient {\n // Create a GraphQL client\n return new GraphQLClient(`${transcendUrl}/graphql`, {\n headers: {\n ...headers,\n version,\n },\n });\n}\n\n/**\n * Create a GraphQL client capable of submitting requests with an API key\n *\n * @param transcendUrl - Transcend API URL\n * @param auth - API key to authenticate to API\n * @returns GraphQL client\n */\nexport function buildTranscendGraphQLClient(transcendUrl: string, auth: string): GraphQLClient {\n return buildTranscendGraphQLClientGeneric(transcendUrl, {\n Authorization: `Bearer ${auth}`,\n });\n}\n","/**\n * Sleep in a promise\n *\n * @param sleepTime - The time to sleep in milliseconds.\n * @returns Resolves promise\n */\nexport function sleepPromise(sleepTime: number): Promise<number> {\n return new Promise((resolve) => {\n setTimeout(() => resolve(sleepTime), sleepTime);\n });\n}\n","import colors from 'colors';\nimport type { GraphQLClient, RequestDocument, Variables } from 'graphql-request';\n\nimport { logger } from '../../logger.js';\nimport { sleepPromise } from '../helpers/index.js';\n\nconst MAX_RETRIES = 4;\n\nconst KNOWN_ERRORS = [\n 'syntax error',\n 'got invalid value',\n 'Client error',\n 'cannot affect row a second time',\n 'GRAPHQL_VALIDATION_FAILED',\n];\n\n/**\n * Make a GraphQL request with retries\n *\n * @param client - GraphQL client\n * @param document - document\n * @param variables - Variable\n * @param requestHeaders - Headers\n * @param maxRequests - Max number of requests\n * @returns Response\n */\nexport async function makeGraphQLRequest<T, V extends Variables = Variables>(\n client: GraphQLClient,\n document: RequestDocument,\n variables?: V,\n requestHeaders?: Record<string, string> | string[][] | Headers,\n maxRequests = MAX_RETRIES,\n): Promise<T> {\n let retryCount = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n try {\n const result = await client.request(document, variables, requestHeaders);\n return result as T;\n } catch (err) {\n if (err.message.includes('API key is invalid')) {\n logger.error(\n colors.red(\n 'API key is invalid. ' +\n 'Please ensure that the key provided to `transcendAuth` has the proper scope and is not expired, ' +\n 'and that `transcendUrl` corresponds to the correct backend for your organization.',\n ),\n );\n process.exit(1);\n }\n\n if (KNOWN_ERRORS.some((msg) => err.message.includes(msg))) {\n throw err;\n }\n\n // wait for rate limit to resolve\n if (err.message.startsWith('Client error: Too many requests')) {\n const rateLimitResetAt = err.response.headers?.get('x-ratelimit-reset');\n const sleepTime = rateLimitResetAt\n ? new Date(rateLimitResetAt).getTime() - new Date().getTime() + 100\n : 1000 * 10;\n logger.log(\n colors.yellow(`DETECTED RATE LIMIT: ${err.message}. Sleeping for ${sleepTime}ms`),\n );\n\n await sleepPromise(sleepTime);\n }\n\n if (retryCount >= maxRequests) {\n throw err;\n }\n retryCount += 1;\n logger.log(\n colors.yellow(`Retrying failed request (${retryCount} / ${maxRequests}): ${err.message}`),\n );\n }\n }\n}\n"],"mappings":"sJAWA,SAAgB,EACd,EACA,EACe,CAEf,OAAO,IAAI,EAAc,GAAG,EAAa,UAAW,CAClD,QAAS,CACP,GAAG,EACH,UACD,CACF,CAAC,CAUJ,SAAgB,EAA4B,EAAsB,EAA6B,CAC7F,OAAO,EAAmC,EAAc,CACtD,cAAe,UAAU,IAC1B,CAAC,CC5BJ,SAAgB,EAAa,EAAoC,CAC/D,OAAO,IAAI,QAAS,GAAY,CAC9B,eAAiB,EAAQ,EAAU,CAAE,EAAU,EAC/C,CCHJ,MAEM,EAAe,CACnB,eACA,oBACA,eACA,kCACA,4BACD,CAYD,eAAsB,EACpB,EACA,EACA,EACA,EACA,EAAc,EACF,CACZ,IAAI,EAAa,EAEjB,OACE,GAAI,CAEF,OADe,MAAM,EAAO,QAAQ,EAAU,EAAW,EAAe,OAEjE,EAAK,CAYZ,GAXI,EAAI,QAAQ,SAAS,qBAAqB,GAC5C,EAAO,MACL,EAAO,IACL,wMAGD,CACF,CACD,QAAQ,KAAK,EAAE,EAGb,EAAa,KAAM,GAAQ,EAAI,QAAQ,SAAS,EAAI,CAAC,CACvD,MAAM,EAIR,GAAI,EAAI,QAAQ,WAAW,kCAAkC,CAAE,CAC7D,IAAM,EAAmB,EAAI,SAAS,SAAS,IAAI,oBAAoB,CACjE,EAAY,EACd,IAAI,KAAK,EAAiB,CAAC,SAAS,CAAG,IAAI,MAAM,CAAC,SAAS,CAAG,IAC9D,IAAO,GACX,EAAO,IACL,EAAO,OAAO,wBAAwB,EAAI,QAAQ,iBAAiB,EAAU,IAAI,CAClF,CAED,MAAM,EAAa,EAAU,CAG/B,GAAI,GAAc,EAChB,MAAM,EAER,GAAc,EACd,EAAO,IACL,EAAO,OAAO,4BAA4B,EAAW,KAAK,EAAY,KAAK,EAAI,UAAU,CAC1F"}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./constants-CeMiHaHx.mjs";import{t}from"./logger-B-LXIf3U.mjs";import{t as n}from"./bluebird-CUitXgsY.mjs";import{t as r}from"./RequestDataSilo-_Iv44M9u.mjs";import{r as i,t as a}from"./makeGraphQLRequest-G078PsEL.mjs";import{t as o}from"./fetchRequestDataSilo-CF6XOTQ-.mjs";import{RequestDataSiloStatus as s}from"@transcend-io/privacy-types";import c from"colors";import l from"cli-progress";async function u({requestIds:u,dataSiloId:d,auth:f,concurrency:p=100,status:m=s.Resolved,transcendUrl:h=e}){let g=i(h,f),_=new Date().getTime(),v=new l.SingleBar({},l.Presets.shades_classic);t.info(c.magenta(`Notifying Transcend for data silo "${d}" marking "${u.length}" requests as completed.`));let y=0;v.start(u.length,0),await n(u,async e=>{let t=await o(g,{requestId:e,dataSiloId:d});try{await a(g,r,{requestDataSiloId:t.id,status:m})}catch(e){if(!e.message.includes(`Client error: Request must be active:`)&&!e.message.includes(`Failed to find RequestDataSilo`))throw e}y+=1,v.update(y)},{concurrency:p}),v.stop();let b=new Date().getTime()-_;return t.info(c.green(`Successfully notified Transcend in "${b/1e3}" seconds!`)),u.length}export{u as t};
2
- //# sourceMappingURL=markRequestDataSiloIdsCompleted-DmAz-R0M.mjs.map
1
+ import{a as e}from"./constants-CeMiHaHx.mjs";import{t}from"./logger-B-LXIf3U.mjs";import{t as n}from"./bluebird-CUitXgsY.mjs";import{t as r}from"./RequestDataSilo-_Iv44M9u.mjs";import{r as i,t as a}from"./makeGraphQLRequest-Cq26A_Lq.mjs";import{t as o}from"./fetchRequestDataSilo-P4yA7Lyc.mjs";import{RequestDataSiloStatus as s}from"@transcend-io/privacy-types";import c from"colors";import l from"cli-progress";async function u({requestIds:u,dataSiloId:d,auth:f,concurrency:p=100,status:m=s.Resolved,transcendUrl:h=e}){let g=i(h,f),_=new Date().getTime(),v=new l.SingleBar({},l.Presets.shades_classic);t.info(c.magenta(`Notifying Transcend for data silo "${d}" marking "${u.length}" requests as completed.`));let y=0;v.start(u.length,0),await n(u,async e=>{let t=await o(g,{requestId:e,dataSiloId:d});try{await a(g,r,{requestDataSiloId:t.id,status:m})}catch(e){if(!e.message.includes(`Client error: Request must be active:`)&&!e.message.includes(`Failed to find RequestDataSilo`))throw e}y+=1,v.update(y)},{concurrency:p}),v.stop();let b=new Date().getTime()-_;return t.info(c.green(`Successfully notified Transcend in "${b/1e3}" seconds!`)),u.length}export{u as t};
2
+ //# sourceMappingURL=markRequestDataSiloIdsCompleted-DzqJ5MNY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"markRequestDataSiloIdsCompleted-DmAz-R0M.mjs","names":[],"sources":["../src/lib/cron/markRequestDataSiloIdsCompleted.ts"],"sourcesContent":["import { RequestDataSiloStatus } from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.js';\nimport { map } from '../bluebird.js';\nimport {\n CHANGE_REQUEST_DATA_SILO_STATUS,\n fetchRequestDataSilo,\n makeGraphQLRequest,\n buildTranscendGraphQLClient,\n} from '../graphql/index.js';\n\n/**\n * Given a CSV of Request IDs, mark associated RequestDataSilos as completed\n *\n * @param options - Options\n * @returns Number of items marked as completed\n */\nexport async function markRequestDataSiloIdsCompleted({\n requestIds,\n dataSiloId,\n auth,\n concurrency = 100,\n status = RequestDataSiloStatus.Resolved,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** The list of request ids to mark as completed */\n requestIds: string[];\n /** Transcend API key authentication */\n auth: string;\n /** Data Silo ID to pull down jobs for */\n dataSiloId: string;\n /** Status to update requests to */\n status?: RequestDataSiloStatus;\n /** Upload concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<number> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);\n\n // Notify Transcend\n logger.info(\n colors.magenta(\n `Notifying Transcend for data silo \"${dataSiloId}\" marking \"${requestIds.length}\" requests as completed.`,\n ),\n );\n\n let total = 0;\n progressBar.start(requestIds.length, 0);\n await map(\n requestIds,\n async (requestId) => {\n const requestDataSilo = await fetchRequestDataSilo(client, {\n requestId,\n dataSiloId,\n });\n\n try {\n await makeGraphQLRequest<{\n /** Whether we successfully uploaded the results */\n success: boolean;\n }>(client, CHANGE_REQUEST_DATA_SILO_STATUS, {\n requestDataSiloId: requestDataSilo.id,\n status,\n });\n } catch (err) {\n if (\n !err.message.includes('Client error: Request must be active:') &&\n !err.message.includes('Failed to find RequestDataSilo')\n ) {\n throw err;\n }\n }\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(colors.green(`Successfully notified Transcend in \"${totalTime / 1000}\" seconds!`));\n return requestIds.length;\n}\n"],"mappings":"4ZAoBA,eAAsB,EAAgC,CACpD,aACA,aACA,OACA,cAAc,IACd,SAAS,EAAsB,SAC/B,eAAe,GAcG,CAElB,IAAM,EAAS,EAA4B,EAAc,EAAK,CAGxD,EAAK,IAAI,MAAM,CAAC,SAAS,CAEzB,EAAc,IAAI,EAAY,UAAU,EAAE,CAAE,EAAY,QAAQ,eAAe,CAGrF,EAAO,KACL,EAAO,QACL,sCAAsC,EAAW,aAAa,EAAW,OAAO,0BACjF,CACF,CAED,IAAI,EAAQ,EACZ,EAAY,MAAM,EAAW,OAAQ,EAAE,CACvC,MAAM,EACJ,EACA,KAAO,IAAc,CACnB,IAAM,EAAkB,MAAM,EAAqB,EAAQ,CACzD,YACA,aACD,CAAC,CAEF,GAAI,CACF,MAAM,EAGH,EAAQ,EAAiC,CAC1C,kBAAmB,EAAgB,GACnC,SACD,CAAC,OACK,EAAK,CACZ,GACE,CAAC,EAAI,QAAQ,SAAS,wCAAwC,EAC9D,CAAC,EAAI,QAAQ,SAAS,iCAAiC,CAEvD,MAAM,EAIV,GAAS,EACT,EAAY,OAAO,EAAM,EAE3B,CAAE,cAAa,CAChB,CAED,EAAY,MAAM,CAElB,IAAM,EADK,IAAI,MAAM,CAAC,SAAS,CACR,EAGvB,OADA,EAAO,KAAK,EAAO,MAAM,uCAAuC,EAAY,IAAK,YAAY,CAAC,CACvF,EAAW"}
1
+ {"version":3,"file":"markRequestDataSiloIdsCompleted-DzqJ5MNY.mjs","names":[],"sources":["../src/lib/cron/markRequestDataSiloIdsCompleted.ts"],"sourcesContent":["import { RequestDataSiloStatus } from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.js';\nimport { map } from '../bluebird.js';\nimport {\n CHANGE_REQUEST_DATA_SILO_STATUS,\n fetchRequestDataSilo,\n makeGraphQLRequest,\n buildTranscendGraphQLClient,\n} from '../graphql/index.js';\n\n/**\n * Given a CSV of Request IDs, mark associated RequestDataSilos as completed\n *\n * @param options - Options\n * @returns Number of items marked as completed\n */\nexport async function markRequestDataSiloIdsCompleted({\n requestIds,\n dataSiloId,\n auth,\n concurrency = 100,\n status = RequestDataSiloStatus.Resolved,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** The list of request ids to mark as completed */\n requestIds: string[];\n /** Transcend API key authentication */\n auth: string;\n /** Data Silo ID to pull down jobs for */\n dataSiloId: string;\n /** Status to update requests to */\n status?: RequestDataSiloStatus;\n /** Upload concurrency */\n concurrency?: number;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<number> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);\n\n // Notify Transcend\n logger.info(\n colors.magenta(\n `Notifying Transcend for data silo \"${dataSiloId}\" marking \"${requestIds.length}\" requests as completed.`,\n ),\n );\n\n let total = 0;\n progressBar.start(requestIds.length, 0);\n await map(\n requestIds,\n async (requestId) => {\n const requestDataSilo = await fetchRequestDataSilo(client, {\n requestId,\n dataSiloId,\n });\n\n try {\n await makeGraphQLRequest<{\n /** Whether we successfully uploaded the results */\n success: boolean;\n }>(client, CHANGE_REQUEST_DATA_SILO_STATUS, {\n requestDataSiloId: requestDataSilo.id,\n status,\n });\n } catch (err) {\n if (\n !err.message.includes('Client error: Request must be active:') &&\n !err.message.includes('Failed to find RequestDataSilo')\n ) {\n throw err;\n }\n }\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(colors.green(`Successfully notified Transcend in \"${totalTime / 1000}\" seconds!`));\n return requestIds.length;\n}\n"],"mappings":"4ZAoBA,eAAsB,EAAgC,CACpD,aACA,aACA,OACA,cAAc,IACd,SAAS,EAAsB,SAC/B,eAAe,GAcG,CAElB,IAAM,EAAS,EAA4B,EAAc,EAAK,CAGxD,EAAK,IAAI,MAAM,CAAC,SAAS,CAEzB,EAAc,IAAI,EAAY,UAAU,EAAE,CAAE,EAAY,QAAQ,eAAe,CAGrF,EAAO,KACL,EAAO,QACL,sCAAsC,EAAW,aAAa,EAAW,OAAO,0BACjF,CACF,CAED,IAAI,EAAQ,EACZ,EAAY,MAAM,EAAW,OAAQ,EAAE,CACvC,MAAM,EACJ,EACA,KAAO,IAAc,CACnB,IAAM,EAAkB,MAAM,EAAqB,EAAQ,CACzD,YACA,aACD,CAAC,CAEF,GAAI,CACF,MAAM,EAGH,EAAQ,EAAiC,CAC1C,kBAAmB,EAAgB,GACnC,SACD,CAAC,OACK,EAAK,CACZ,GACE,CAAC,EAAI,QAAQ,SAAS,wCAAwC,EAC9D,CAAC,EAAI,QAAQ,SAAS,iCAAiC,CAEvD,MAAM,EAIV,GAAS,EACT,EAAY,OAAO,EAAM,EAE3B,CAAE,cAAa,CAChB,CAED,EAAY,MAAM,CAElB,IAAM,EADK,IAAI,MAAM,CAAC,SAAS,CACR,EAGvB,OADA,EAAO,KAAK,EAAO,MAAM,uCAAuC,EAAY,IAAK,YAAY,CAAC,CACvF,EAAW"}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./constants-CeMiHaHx.mjs";import{t}from"./logger-B-LXIf3U.mjs";import{t as n}from"./bluebird-CUitXgsY.mjs";import{o as r}from"./request-CAsR6CMY.mjs";import{r as i,t as a}from"./makeGraphQLRequest-G078PsEL.mjs";import{r as o}from"./fetchAllRequests-DEPTEUbi.mjs";import{RequestStatus as s}from"@transcend-io/privacy-types";import c from"colors";import l from"cli-progress";async function u({requestActions:u,auth:d,requestIds:f,statuses:p=[s.Compiling,s.RequestMade,s.Delayed,s.Approving,s.Secondary,s.Enriching,s.Waiting,s.SecondaryApproving],createdAtAfter:m,createdAtBefore:h,updatedAtBefore:g,updatedAtAfter:_,concurrency:v=100,transcendUrl:y=e}){let b=i(y,d),x=new Date().getTime(),S=new l.SingleBar({},l.Presets.shades_classic),C=await o(b,{actions:u,statuses:p,createdAtBefore:h,createdAtAfter:m,updatedAtBefore:g,updatedAtAfter:_,isSilent:!1,requestIds:f});t.info(c.magenta(`Marking "${C.length}" as silent mode.`));let w=0;S.start(C.length,0),await n(C,async e=>{await a(b,r,{input:{id:e.id,isSilent:!0}}),w+=1,S.update(w)},{concurrency:v}),S.stop();let T=new Date().getTime()-x;return t.info(c.green(`Successfully marked ${w} requests as silent mode in "${T/1e3}" seconds!`)),C.length}export{u as t};
2
- //# sourceMappingURL=markSilentPrivacyRequests-s7_aBROE.mjs.map
1
+ import{a as e}from"./constants-CeMiHaHx.mjs";import{t}from"./logger-B-LXIf3U.mjs";import{t as n}from"./bluebird-CUitXgsY.mjs";import{o as r}from"./request-CAsR6CMY.mjs";import{r as i,t as a}from"./makeGraphQLRequest-Cq26A_Lq.mjs";import{r as o}from"./fetchAllRequests-DNQQsY4s.mjs";import{RequestStatus as s}from"@transcend-io/privacy-types";import c from"colors";import l from"cli-progress";async function u({requestActions:u,auth:d,requestIds:f,statuses:p=[s.Compiling,s.RequestMade,s.Delayed,s.Approving,s.Secondary,s.Enriching,s.Waiting,s.SecondaryApproving],createdAtAfter:m,createdAtBefore:h,updatedAtBefore:g,updatedAtAfter:_,concurrency:v=100,transcendUrl:y=e}){let b=i(y,d),x=new Date().getTime(),S=new l.SingleBar({},l.Presets.shades_classic),C=await o(b,{actions:u,statuses:p,createdAtBefore:h,createdAtAfter:m,updatedAtBefore:g,updatedAtAfter:_,isSilent:!1,requestIds:f});t.info(c.magenta(`Marking "${C.length}" as silent mode.`));let w=0;S.start(C.length,0),await n(C,async e=>{await a(b,r,{input:{id:e.id,isSilent:!0}}),w+=1,S.update(w)},{concurrency:v}),S.stop();let T=new Date().getTime()-x;return t.info(c.green(`Successfully marked ${w} requests as silent mode in "${T/1e3}" seconds!`)),C.length}export{u as t};
2
+ //# sourceMappingURL=markSilentPrivacyRequests-BKQUu6Ep.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"markSilentPrivacyRequests-s7_aBROE.mjs","names":[],"sources":["../src/lib/requests/markSilentPrivacyRequests.ts"],"sourcesContent":["import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.js';\nimport { map } from '../bluebird.js';\nimport {\n UPDATE_PRIVACY_REQUEST,\n fetchAllRequests,\n makeGraphQLRequest,\n buildTranscendGraphQLClient,\n} from '../graphql/index.js';\n\n/**\n * Mark a set of privacy requests to be in silent mode\n *\n * @param options - Options\n * @returns The number of requests marked silent\n */\nexport async function markSilentPrivacyRequests({\n requestActions,\n auth,\n requestIds,\n statuses = [\n RequestStatus.Compiling,\n RequestStatus.RequestMade,\n RequestStatus.Delayed,\n RequestStatus.Approving,\n RequestStatus.Secondary,\n RequestStatus.Enriching,\n RequestStatus.Waiting,\n RequestStatus.SecondaryApproving,\n ],\n createdAtAfter,\n createdAtBefore,\n updatedAtBefore,\n updatedAtAfter,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** The request actions that should be restarted */\n requestActions: RequestAction[];\n /** Transcend API key authentication */\n auth: string;\n /** Concurrency limit for approving */\n concurrency?: number;\n /** The request statuses to mark silent */\n statuses?: RequestStatus[];\n /** The set of privacy requests to mark silent */\n requestIds?: string[];\n /** Filter for requests created before this date */\n createdAtBefore?: Date;\n /** Filter for requests created after this date */\n createdAtAfter?: Date;\n /** Filter for requests updated before this date */\n updatedAtBefore?: Date;\n /** Filter for requests updated after this date */\n updatedAtAfter?: Date;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<number> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);\n\n // Pull in the requests\n const allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n statuses,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n isSilent: false,\n requestIds,\n });\n\n // Notify Transcend\n logger.info(colors.magenta(`Marking \"${allRequests.length}\" as silent mode.`));\n\n let total = 0;\n progressBar.start(allRequests.length, 0);\n await map(\n allRequests,\n async (requestToMarkSilent) => {\n await makeGraphQLRequest(client, UPDATE_PRIVACY_REQUEST, {\n input: {\n id: requestToMarkSilent.id,\n isSilent: true,\n },\n });\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully marked ${total} requests as silent mode in \"${totalTime / 1000}\" seconds!`,\n ),\n );\n return allRequests.length;\n}\n"],"mappings":"wYAoBA,eAAsB,EAA0B,CAC9C,iBACA,OACA,aACA,WAAW,CACT,EAAc,UACd,EAAc,YACd,EAAc,QACd,EAAc,UACd,EAAc,UACd,EAAc,UACd,EAAc,QACd,EAAc,mBACf,CACD,iBACA,kBACA,kBACA,iBACA,cAAc,IACd,eAAe,GAsBG,CAElB,IAAM,EAAS,EAA4B,EAAc,EAAK,CAGxD,EAAK,IAAI,MAAM,CAAC,SAAS,CAEzB,EAAc,IAAI,EAAY,UAAU,EAAE,CAAE,EAAY,QAAQ,eAAe,CAG/E,EAAc,MAAM,EAAiB,EAAQ,CACjD,QAAS,EACT,WACA,kBACA,iBACA,kBACA,iBACA,SAAU,GACV,aACD,CAAC,CAGF,EAAO,KAAK,EAAO,QAAQ,YAAY,EAAY,OAAO,mBAAmB,CAAC,CAE9E,IAAI,EAAQ,EACZ,EAAY,MAAM,EAAY,OAAQ,EAAE,CACxC,MAAM,EACJ,EACA,KAAO,IAAwB,CAC7B,MAAM,EAAmB,EAAQ,EAAwB,CACvD,MAAO,CACL,GAAI,EAAoB,GACxB,SAAU,GACX,CACF,CAAC,CAEF,GAAS,EACT,EAAY,OAAO,EAAM,EAE3B,CAAE,cAAa,CAChB,CAED,EAAY,MAAM,CAElB,IAAM,EADK,IAAI,MAAM,CAAC,SAAS,CACR,EAOvB,OALA,EAAO,KACL,EAAO,MACL,uBAAuB,EAAM,+BAA+B,EAAY,IAAK,YAC9E,CACF,CACM,EAAY"}
1
+ {"version":3,"file":"markSilentPrivacyRequests-BKQUu6Ep.mjs","names":[],"sources":["../src/lib/requests/markSilentPrivacyRequests.ts"],"sourcesContent":["import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.js';\nimport { map } from '../bluebird.js';\nimport {\n UPDATE_PRIVACY_REQUEST,\n fetchAllRequests,\n makeGraphQLRequest,\n buildTranscendGraphQLClient,\n} from '../graphql/index.js';\n\n/**\n * Mark a set of privacy requests to be in silent mode\n *\n * @param options - Options\n * @returns The number of requests marked silent\n */\nexport async function markSilentPrivacyRequests({\n requestActions,\n auth,\n requestIds,\n statuses = [\n RequestStatus.Compiling,\n RequestStatus.RequestMade,\n RequestStatus.Delayed,\n RequestStatus.Approving,\n RequestStatus.Secondary,\n RequestStatus.Enriching,\n RequestStatus.Waiting,\n RequestStatus.SecondaryApproving,\n ],\n createdAtAfter,\n createdAtBefore,\n updatedAtBefore,\n updatedAtAfter,\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** The request actions that should be restarted */\n requestActions: RequestAction[];\n /** Transcend API key authentication */\n auth: string;\n /** Concurrency limit for approving */\n concurrency?: number;\n /** The request statuses to mark silent */\n statuses?: RequestStatus[];\n /** The set of privacy requests to mark silent */\n requestIds?: string[];\n /** Filter for requests created before this date */\n createdAtBefore?: Date;\n /** Filter for requests created after this date */\n createdAtAfter?: Date;\n /** Filter for requests updated before this date */\n updatedAtBefore?: Date;\n /** Filter for requests updated after this date */\n updatedAtAfter?: Date;\n /** API URL for Transcend backend */\n transcendUrl?: string;\n}): Promise<number> {\n // Find all requests made before createdAt that are in a removing data state\n const client = buildTranscendGraphQLClient(transcendUrl, auth);\n\n // Time duration\n const t0 = new Date().getTime();\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);\n\n // Pull in the requests\n const allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n statuses,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n isSilent: false,\n requestIds,\n });\n\n // Notify Transcend\n logger.info(colors.magenta(`Marking \"${allRequests.length}\" as silent mode.`));\n\n let total = 0;\n progressBar.start(allRequests.length, 0);\n await map(\n allRequests,\n async (requestToMarkSilent) => {\n await makeGraphQLRequest(client, UPDATE_PRIVACY_REQUEST, {\n input: {\n id: requestToMarkSilent.id,\n isSilent: true,\n },\n });\n\n total += 1;\n progressBar.update(total);\n },\n { concurrency },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Successfully marked ${total} requests as silent mode in \"${totalTime / 1000}\" seconds!`,\n ),\n );\n return allRequests.length;\n}\n"],"mappings":"wYAoBA,eAAsB,EAA0B,CAC9C,iBACA,OACA,aACA,WAAW,CACT,EAAc,UACd,EAAc,YACd,EAAc,QACd,EAAc,UACd,EAAc,UACd,EAAc,UACd,EAAc,QACd,EAAc,mBACf,CACD,iBACA,kBACA,kBACA,iBACA,cAAc,IACd,eAAe,GAsBG,CAElB,IAAM,EAAS,EAA4B,EAAc,EAAK,CAGxD,EAAK,IAAI,MAAM,CAAC,SAAS,CAEzB,EAAc,IAAI,EAAY,UAAU,EAAE,CAAE,EAAY,QAAQ,eAAe,CAG/E,EAAc,MAAM,EAAiB,EAAQ,CACjD,QAAS,EACT,WACA,kBACA,iBACA,kBACA,iBACA,SAAU,GACV,aACD,CAAC,CAGF,EAAO,KAAK,EAAO,QAAQ,YAAY,EAAY,OAAO,mBAAmB,CAAC,CAE9E,IAAI,EAAQ,EACZ,EAAY,MAAM,EAAY,OAAQ,EAAE,CACxC,MAAM,EACJ,EACA,KAAO,IAAwB,CAC7B,MAAM,EAAmB,EAAQ,EAAwB,CACvD,MAAO,CACL,GAAI,EAAoB,GACxB,SAAU,GACX,CACF,CAAC,CAEF,GAAS,EACT,EAAY,OAAO,EAAM,EAE3B,CAAE,cAAa,CAChB,CAED,EAAY,MAAM,CAElB,IAAM,EADK,IAAI,MAAM,CAAC,SAAS,CACR,EAOvB,OALA,EAAO,KACL,EAAO,MACL,uBAAuB,EAAM,+BAA+B,EAAY,IAAK,YAC9E,CACF,CACM,EAAY"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"./logger-B-LXIf3U.mjs";import{n as t,t as n}from"./bluebird-CUitXgsY.mjs";import{i as r,r as i}from"./dataSubject-y_aXI0pa.mjs";import{n as a,o}from"./fetchIdentifiers-DjqjUnaw.mjs";import{n as s}from"./fetchApiKeys-DkBco7W0.mjs";import{n as c}from"./syncTemplates-BNu1_dmW.mjs";import{$ as l,At as u,B as d,C as f,Ct as p,Dt as m,E as h,Et as g,F as _,G as v,H as y,I as b,K as x,L as S,Lt as C,M as ee,Mt as w,N as T,O as E,P as D,Rt as O,S as k,St as A,T as j,U as M,Ut as N,Vt as P,X as F,Z as I,a as te,b as ne,bt as L,ct as R,d as re,et as z,f as B,ft as V,g as H,h as U,ht as ie,jt as ae,k as oe,kt as se,mt as ce,n as le,nt as ue,p as de,q as fe,r as pe,rt as me,st as he,t as ge,u as _e,ut as ve,vt as ye,w as be,wt as xe,x as Se,y as Ce,yt as we,z as Te,zt as Ee}from"./fetchAllActions-C0l3wjQV.mjs";import{t as De}from"./fetchAllPurposes-CykSkZRY.mjs";import{C as Oe,D as ke,E as Ae,S as je,T as Me,a as Ne,b as Pe,d as Fe,i as Ie,j as Le,k as Re,u as ze,w as Be,x as Ve}from"./fetchConsentManagerId-DHDA5Py9.mjs";import{t as W}from"./makeGraphQLRequest-G078PsEL.mjs";import{t as He}from"./syncCookies-CiLtxDFf.mjs";import{n as Ue}from"./syncDataFlows-DmBUs3G_.mjs";import{IsoCountryCode as We,IsoCountrySubdivisionCode as Ge}from"@transcend-io/privacy-types";import{chunk as G,difference as Ke,groupBy as qe,keyBy as K,uniq as Je}from"lodash-es";import{getEntries as Ye}from"@transcend-io/type-utils";import q from"colors";import{InitialViewState as Xe,OnConsentExpiry as Ze}from"@transcend-io/airgap.js-types";const Qe=[...Object.values(We),...Object.values(Ge)];async function J(e,{action:t,actionId:n,skipPublish:r=!1}){await W(e,V,{input:{id:n,skipSecondaryIfNoFiles:t.skipSecondaryIfNoFiles,skipDownloadableStep:t.skipDownloadableStep,requiresReview:t.requiresReview,waitingPeriod:t.waitingPeriod,skipPublish:r,regionList:t.regionBlockList?Ke(Qe,t.regionBlockList):t.regionList,regionDetectionMethod:t.regionDetectionMethod}})}async function Y(e,t){let{createActionItemCollection:n}=await W(e,xe,{input:{title:t.title,description:t.description||``,hidden:t.hidden||!1,productLine:t.productLine}});return n.created}async function X(e,t,n){await W(e,g,{input:{id:n,title:t.title,description:t.description,hidden:t.hidden,productLine:t.productLine}})}async function Z(n,r){let i=!1;e.info(q.magenta(`Syncing "${r.length}" action item collections...`));let a=K(await B(n),`title`);return await t(r.filter(e=>!a[e.title]),async t=>{try{await Y(n,t),e.info(q.green(`Successfully created action item collection "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to create action item collection "${t.title}"! - ${n.message}`))}}),await t(r.map(e=>[e,a[e.title]?.id]).filter(e=>!!e[1]),async([t,r])=>{try{await X(n,t,r),e.info(q.green(`Successfully synced action item collection "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync action item collection "${t.title}"! - ${n.message}`))}}),!i}async function Q(e,n,r,i={}){await t(G(n,100),async t=>{await W(e,R,{input:t.map(e=>({title:e.title,type:e.type,priorityOverride:e.priority,dueDate:e.dueDate,customerExperienceActionItemId:e.customerExperienceActionItemId,resolved:e.resolved,notes:e.notes,link:e.link,assigneesUserEmails:e.users,assigneesTeamNames:e.teams,...(e.attributes,{}),collectionIds:e.collections.map(e=>r[e].id)}))})})}async function $e(e,t,n,r={}){let i=e=>{let t=r[e];if(!t)throw Error(`Attribute key "${e}" does not exist!`);return t.id};await W(e,ve,{input:{ids:[n],title:t.title,priorityOverride:t.priority,dueDate:t.dueDate,resolved:t.resolved,customerExperienceActionItemId:t.customerExperienceActionItemId,notes:t.notes,link:t.link,assigneesUserEmails:t.users,assigneesTeamNames:t.teams,...t.attributes?{attributes:t.attributes.map(({key:e,values:t})=>({attributeKeyId:i(e),attributeValueNames:t}))}:{}}})}function et({title:e,collections:t}){return`${e}-${t.map(e=>e.title).sort().join(`-`)}`}function tt({title:e,collections:t}){return`${e}-${t.sort().join(`-`)}`}async function nt(n,r){let i=!1;e.info(q.magenta(`Syncing "${r.length}" actionItems...`));let a=r.some(e=>e.attributes&&e.attributes.length>0),[o,s,c]=await Promise.all([b(n),B(n),a?ee(n):[]]),l=K(s,`title`),u=K(o,et),d=K(c,`name`),f=K(o.filter(e=>!!e.customerExperienceActionItemIds),({customerExperienceActionItemIds:e})=>e[0]),p=Je(r.map(e=>e.collections).flat()).filter(e=>!l[e]);if(p.length>0)return e.info(q.red(`Missing action item collections: "${p.join(`", "`)}" - please create them first!`)),!1;let m=r.filter(e=>!u[tt(e)]&&!f[e.customerExperienceActionItemId]);if(m.length>0)try{e.info(q.magenta(`Creating "${m.length}" actionItems...`)),await Q(n,m,l,d),e.info(q.green(`Successfully created "${m.length}" actionItems!`))}catch(t){i=!0,e.info(q.red(`Failed to create action items! - ${t.message}`))}return await t(r.map(e=>[e,u[tt(e)]?.id||f[e.customerExperienceActionItemId]?.id]).filter(e=>!!e[1]),async([t,r])=>{try{await $e(n,t,r,d),e.info(q.green(`Successfully synced action item "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync action item "${t.title}"! - ${n.message}`))}}),!i}async function rt(e,t){let{createAgentFile:n}=await W(e,l,{input:{name:t.name,description:t.description,fileId:t.fileId,size:t.size,purpose:t.purpose,fileUploadedAt:new Date,agentIds:[]}});return n.agentFile}async function it(e,t){await W(e,z,{input:{agentFiles:t.map(([e,t])=>({id:t,name:e.name,description:e.description,fileId:e.fileId,size:e.size,purpose:e.purpose}))}})}async function at(n,r){e.info(q.magenta(`Syncing "${r.length}" agent files...`));let i=!1,a=K(await _(n),`name`);await t(r.filter(e=>!a[e.name]),async t=>{try{let r=await rt(n,t);a[r.name]=r,e.info(q.green(`Successfully synced agent file "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync agent file "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" agent files!`)),await it(n,r.map(e=>[e,a[e.name].id])),e.info(q.green(`Successfully synced "${r.length}" agent files!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" agent files! - ${t.message}`))}return!i}async function ot(e,t){let{createAgentFunction:n}=await W(e,F,{input:{name:t.name,description:t.description,parameters:t.parameters,agentIds:[]}});return n.agentFunction}async function st(e,t){await W(e,I,{input:{agentFunctions:t.map(([e,t])=>({id:t,name:e.name,description:e.description,parameters:e.parameters}))}})}async function ct(n,r){e.info(q.magenta(`Syncing "${r.length}" agent functions...`));let i=!1,a=K(await D(n),`name`);await t(r.filter(e=>!a[e.name]),async t=>{try{let r=await ot(n,t);a[r.name]=r,e.info(q.green(`Successfully synced agent function "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync agent function "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" agent functions!`)),await st(n,r.map(e=>[e,a[e.name].id])),e.info(q.green(`Successfully synced "${r.length}" agent functions!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" agent functions! - ${t.message}`))}return!i}async function lt(e,t){let{createAgent:n}=await W(e,ue,{input:{name:t.name,description:t.description,codeInterpreterEnabled:t.codeInterpreterEnabled,retrievalEnabled:t.retrievalEnabled,promptTitle:t.prompt,largeLanguageModelName:t[`large-language-model`].name,largeLanguageModelClient:t[`large-language-model`].client}});return n.agent}async function ut(e,t){await W(e,me,{input:{agents:t.map(([e,t])=>({id:t,name:e.name,description:e.description,codeInterpreterEnabled:e.codeInterpreterEnabled,retrievalEnabled:e.retrievalEnabled}))}})}async function dt(n,r){e.info(q.magenta(`Syncing "${r.length}" agents...`));let i=!1,a=K(await T(n),`name`);await t(r.filter(e=>!a[e.name]),async t=>{try{let r=await lt(n,t);a[r.name]=r,e.info(q.green(`Successfully synced agent "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync agent "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" agents!`)),await ut(n,r.map(e=>[e,a[e.name].id])),e.info(q.green(`Successfully synced "${r.length}" agents!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" agents ! - ${t.message}`))}return!i}async function ft(t,r,{existingAttribute:i,deleteExtraAttributeValues:a}){let o={name:r.name,enabledOn:r.resources},s;if(i)await W(t,A,{attributeKeyId:i.id,description:i.isCustom?r.description:void 0,...o}),s=i.id;else{let{createAttributeKey:{attributeKey:e}}=await W(t,ye,{type:r.type,description:r.description,...o});s=e.id}let c=K(i?.values||[],`name`),{existingValues:l=[],newValues:u=[]}=qe(r.values||[],e=>c[e.name]?`existingValues`:`newValues`),d=Ke((i?.values||[]).map(({name:e})=>e),(r.values||[]).map(({name:e})=>e));u.length>0&&(await W(t,we,{input:u.map(({name:e,...t})=>({name:e,attributeKeyId:s,...t}))}),e.info(q.green(`Created ${u.length} attribute values`))),l.length>0&&(await W(t,p,{input:l.map(({name:e,...t})=>({id:c[e].id,name:e,description:c[e].description,color:c[e].color,...t,attributeKeyId:s}))}),e.info(q.green(`Updated ${l.length} attribute values`))),d.length>0&&a&&(await n(d,async e=>{await W(t,L,{id:c[e].id})},{concurrency:10}),e.info(q.green(`Deleted ${d.length} attribute values`)))}async function pt(e,t){let{createBusinessEntity:n}=await W(e,ce,{input:{title:t.title,description:t.description,address:t.address,headquarterCountry:t.headquarterCountry,headquarterSubDivision:t.headquarterSubDivision,dataProtectionOfficerName:t.dataProtectionOfficerName,dataProtectionOfficerEmail:t.dataProtectionOfficerEmail,attributes:t.attributes,teamNames:t.teams,ownerEmails:t.owners}});return n.businessEntity}async function mt(e,n){await t(G(n,100),async t=>{await W(e,ie,{input:t.map(([e,t])=>({id:t,title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProtectionOfficerName:e.dataProtectionOfficerName,dataProtectionOfficerEmail:e.dataProtectionOfficerEmail,attributes:e.attributes,teamNames:e.teams,ownerEmails:e.owners}))})})}async function ht(n,r){e.info(q.magenta(`Syncing "${r.length}" business entities...`));let i=!1,a=K(await oe(n),`title`);await t(r.filter(e=>!a[e.title]),async t=>{try{let r=await pt(n,t);a[r.title]=r,e.info(q.green(`Successfully synced business entity "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync business entity "${t.title}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" business entities!`)),await mt(n,r.map(e=>[e,a[e.title].id])),e.info(q.green(`Successfully synced "${r.length}" business entities!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" business entities ! - ${t.message}`))}return!i}const gt=`https://app.transcend.io/consent-manager/regional-experiences/purposes`;async function _t(t,r){let i=K(await Ie(t),`name`),a=K(await De(t),`trackingType`);await n(r,async(n,r)=>{let o=n.purposes?.map((e,t)=>{let n=a[e.trackingType];if(!n)throw Error(`Invalid purpose trackingType provided at consentManager.experiences[${r}].purposes[${t}]: ${e.trackingType}. See list of valid purposes ${gt}`);return n.id}),s=n.optedOutPurposes?.map((e,t)=>{let n=a[e.trackingType];if(!n)throw Error(`Invalid purpose trackingType provided at consentManager.experiences[${r}].optedOutPurposes[${t}]: ${e.trackingType}. See list of valid purposes ${gt}`);return n.id}),c=i[n.name];c?(await W(t,Be,{input:{id:c.id,name:n.displayName,regions:n.regions,operator:n.operator,onConsentExpiry:n.onConsentExpiry,consentExpiry:n.consentExpiry,displayPriority:n.displayPriority===c.displayPriority?void 0:n.displayPriority,viewState:n.viewState,purposes:o,optedOutPurposes:s,browserLanguages:n.browserLanguages,browserTimeZones:n.browserTimeZones}}),e.info(q.green(`Successfully synced consent experience "${n.name}"!`))):(await W(t,ze,{input:{name:n.name,displayName:n.displayName,regions:n.regions,operator:n.operator,onConsentExpiry:n.onConsentExpiry||Ze.Prompt,consentExpiry:n.consentExpiry,displayPriority:n.displayPriority,viewState:n.viewState||Xe.Hidden,purposes:o||[],optedOutPurposes:s||[],browserLanguages:n.browserLanguages,browserTimeZones:n.browserTimeZones}}),e.info(q.green(`Successfully created consent experience "${n.name}"!`)))},{concurrency:10})}async function vt(e,t){let n;try{n=await Ne(e,1)}catch(r){if(r.message.includes(`AirgapBundle not found`)){let r=await h(e),{createConsentManager:i}=await W(e,Fe,{domains:t.domains,privacyCenterId:r});n=i.consentManager.id}else throw r}if(t.domains&&await W(e,Me,{domains:t.domains,airgapBundleId:n}),t.partition){let r=(await le(e)).find(e=>e.name===t.partition);if(!r)throw Error(`Partition "${t.partition}" not found. Please create the partition first.`);await W(e,Ae,{partitionId:r.id,airgapBundleId:n})}t.version&&await W(e,Re,{airgapBundleId:n,version:t.version}),t.signedIabAgreement&&await W(e,Le,{input:{id:n,...t.signedIabAgreement?{signedIabAgreement:t.signedIabAgreement}:{}}}),t.unknownRequestPolicy&&await W(e,Oe,{input:{id:n,unknownRequestPolicy:t.unknownRequestPolicy}}),t.unknownRequestPolicy&&await W(e,je,{input:{id:n,unknownCookiePolicy:t.unknownCookiePolicy}}),t.telemetryPartitioning&&await W(e,Ve,{input:{id:n,strategy:t.telemetryPartitioning}}),t.consentPrecedence&&await W(e,Pe,{input:{id:n,consentPrecedence:t.consentPrecedence}}),t.experiences&&await _t(e,t.experiences),t.theme&&await W(e,ke,{input:{airgapBundleId:n,...t.theme}})}async function yt(e,t){let{createDataCategory:n}=await W(e,M,{input:{name:t.name,category:t.category,description:t.description}});return n.dataCategory}async function bt(e,t){await W(e,v,{input:{dataSubCategories:t.map(([e,t])=>({id:t,description:e.description,attributes:e.attributes}))}})}async function xt(n,r){e.info(q.magenta(`Syncing "${r.length}" data categories...`));let i=!1,a=K(await E(n),({name:e,category:t})=>`${e}:${t}`);await t(r.filter(e=>!a[`${e.name}:${e.category}`]),async t=>{try{let r=await yt(n,t);a[`${r.name}:${r.category}`]=r,e.info(q.green(`Successfully synced data category "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync data category "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" data categories!`)),await bt(n,r.map(e=>[e,a[`${e.name}:${e.category}`].id])),e.info(q.green(`Successfully synced "${r.length}" data categories!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" data categories ! - ${t.message}`))}return!i}async function St(e,{dataSubject:t,dataSubjectId:n,skipPublish:a=!1}){await W(e,r,{input:{id:n,title:t.title,adminDashboardDefaultSilentMode:t.adminDashboardDefaultSilentMode,actions:t.actions,skipPublish:a&&t.active===void 0}}),typeof t.active==`boolean`&&await W(e,i,{input:{id:n,active:t.active,skipPublish:a}})}async function Ct(e,{identifier:t,dataSubjectsByName:n,identifierId:r,skipPublish:i=!1}){await W(e,o,{input:{id:r,selectOptions:t.selectOptions,isRequiredInForm:t.isRequiredInForm,regex:t.regex,placeholder:t.placeholder,displayTitle:t.displayTitle,displayDescription:t.displayDescription,displayOrder:t.displayOrder,isUniqueOnPreferenceStore:t.isUniqueOnPreferenceStore,privacyCenterVisibility:t.privacyCenterVisibility,dataSubjectIds:t.dataSubjects?t.dataSubjects.map(e=>n[e].id):void 0,skipPublish:i}})}async function wt(e,n){await t(G(n,100),async t=>{await W(e,P,{messages:t.map(e=>({...e.id.includes(`.`)?{}:{id:e.id},defaultMessage:e.defaultMessage,targetReactIntlId:e.targetReactIntlId,translations:e.translations?Object.entries(e.translations).map(([e,t])=>({locale:e,value:t})):void 0}))})})}async function Tt(t,n){let r=!1;e.info(q.magenta(`Syncing "${n.length}" messages...`));let i=n.filter(e=>n.filter(t=>e.id===t.id).length>1);if(i.length>0)throw Error(`Failed to upload messages as there were non-unique entries found: ${i.map(({id:e})=>e).join(`,`)}`);try{e.info(q.magenta(`Upserting "${n.length}" new messages...`)),await wt(t,n),e.info(q.green(`Successfully synced ${n.length} messages!`))}catch(t){r=!0,e.info(q.red(`Failed to create messages! - ${t.message}`))}return!r}async function $(e,n){let r=await h(e);await t(G(n,100),async t=>{await W(e,N,{privacyCenterId:r,policies:t.map(([e,t])=>({id:t,title:e.title,disableEffectiveOn:e.disableEffectiveOn,disabledLocales:e.disabledLocales,...e.effectiveOn||e.content?{version:{...e.effectiveOn?{effectiveOn:e.effectiveOn}:{},...e.content?{content:{defaultMessage:e.content}}:{}}}:{}}))})})}async function Et(t,n){let r=!1;e.info(q.magenta(`Syncing "${n.length}" policies...`));let i=n.filter(e=>n.filter(t=>e.title===t.title).length>1);if(i.length>0)throw Error(`Failed to upload policies as there were non-unique entries found: ${i.map(({title:e})=>e).join(`,`)}`);let a=K(await j(t),({title:e})=>e.defaultMessage);try{e.info(q.magenta(`Upserting "${n.length}" new policies...`)),await $(t,n.map(e=>[e,a[e.title]?.id])),e.info(q.green(`Successfully synced ${n.length} policies!`))}catch(t){r=!0,e.info(q.red(`Failed to create policies! - ${t.message}`))}return!r}async function Dt(t,n){let r=!1;e.info(q.magenta(`Syncing privacy center...`));let i=await h(t);try{await W(t,he,{input:{privacyCenterId:i,transformAccessReportJsonToCsv:n.transformAccessReportJsonToCsv,useCustomEmailDomain:n.useCustomEmailDomain,useNoReplyEmailAddress:n.useNoReplyEmailAddress,replyToEmail:n.replyToEmail,supportEmail:n.supportEmail,preferBrowserDefaultLocale:n.preferBrowserDefaultLocale,defaultLocale:n.defaultLocale,locales:n.locales,showMarketingPreferences:n.showMarketingPreferences,showManageYourPrivacy:n.showManageYourPrivacy,showPolicies:n.showPolicies,showConsentManager:n.showConsentManager,showDataFlows:n.showDataFlows,showCookies:n.showCookies,showTrackingTechnologies:n.showTrackingTechnologies,showPrivacyRequestButton:n.showPrivacyRequestButton,isDisabled:n.isDisabled,...n.theme?{colorPalette:n.theme.colors,componentStyles:n.theme.componentStyles,textStyles:n.theme.textStyles}:{}}}),e.info(q.green(`Successfully synced privacy center!`))}catch(t){r=!0,e.info(q.red(`Failed to create privacy center! - ${t.message}`))}return!r}async function Ot(e,t){let{createProcessingActivity:n}=await W(e,S,{input:{title:t.title,description:t.description}});return n.processingActivity}async function kt(e,t){let n=t.filter(([,e])=>e===void 0).map(([{title:e}])=>e);if(n.length>0)throw Error(`The following ${n.length} processing activities do not exist and thus can't be updated: "${n.join(`", "`)}"`);await W(e,Te,{input:{processingActivities:t.map(([{processingSubPurposes:e,dataSubCategories:t,saaSCategories:n,...r},i])=>({dataSubCategoryInputs:t?.map(({category:e,name:t})=>({category:e,name:t??``})),processingPurposeSubCategoryInputs:e?.map(({purpose:e,name:t})=>({purpose:e,name:t??`Other`})),saaSCategoryTitles:n,...r,id:i}))}})}async function At(n,r){let i=!1;e.info(q.magenta(`Syncing "${r.length}" processing activities...`));let a=K(await be(n),`title`),o=r.filter(e=>!a[e.title]);o.length>0&&e.info(q.magenta(`Creating "${o.length}" new processing activities...`)),await t(o,async t=>{try{let r=await Ot(n,t);a[r.title]=r,e.info(q.green(`Successfully created processing activity "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to create processing activity "${t.title}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" processing activities!`)),await kt(n,r.map(e=>[e,a[e.title]?.id])),e.info(q.green(`Successfully synced "${r.length}" processingActivities!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" processingActivities! - ${t.message}`))}return!i}async function jt(e,t){let{createProcessingPurposeSubCategory:n}=await W(e,d,{input:{name:t.name,purpose:t.purpose,description:t.description}});return n.processingPurposeSubCategory}async function Mt(e,t){await W(e,y,{input:{processingPurposeSubCategories:t.map(([e,t])=>({id:t,description:e.description,attributes:e.attributes}))}})}async function Nt(n,r){e.info(q.magenta(`Syncing "${r.length}" processing purposes...`));let i=!1,a=K(await f(n),({name:e,purpose:t})=>`${e}:${t}`);await t(r.filter(e=>!a[`${e.name}:${e.purpose}`]),async t=>{try{let r=await jt(n,t);a[`${r.name}:${r.purpose}`]=r,e.info(q.green(`Successfully synced processing purpose "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync processing purpose "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" processing purposes!`)),await Mt(n,r.map(e=>[e,a[`${e.name}:${e.purpose}`].id])),e.info(q.green(`Successfully synced "${r.length}" processing purposes!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" processing purposes ! - ${t.message}`))}return!i}async function Pt(t,n){let{createPrompt:{prompt:r}}=await W(t,u,{input:n});return e.info(q.green(`Successfully created prompt "${n.title}"!`)),r.id}async function Ft(t,n){await W(t,C,{input:{prompts:n.map(([e,t])=>({...e,id:t}))}}),e.info(q.green(`Successfully updated ${n.length} prompts!`))}async function It(t,r,i=20){let a=!1;e.info(q.magenta(`Syncing "${r.length}" prompts...`));let o=K(await de(t),`title`),s=r.map(e=>[e,o[e.title]?.id]),c=s.filter(([,e])=>!e).map(([e])=>e);try{e.info(q.magenta(`Creating "${c.length}" new prompts...`)),await n(c,async e=>{await Pt(t,e)},{concurrency:i}),e.info(q.green(`Successfully synced ${c.length} prompts!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompts! - ${t.message}`))}let l=s.filter(e=>!!e[1]);try{e.info(q.magenta(`Updating "${l.length}" prompts...`)),await Ft(t,l),e.info(q.green(`Successfully updated "${l.length}" prompts!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompts! - ${t.message}`))}return e.info(q.green(`Synced "${r.length}" prompts!`)),!a}async function Lt(e,t){let{createVendor:n}=await W(e,x,{input:{title:t.title,description:t.description,address:t.address,headquarterCountry:t.headquarterCountry,headquarterSubDivision:t.headquarterSubDivision,dataProcessingAgreementLink:t.dataProcessingAgreementLink,contactName:t.contactName,contactPhone:t.contactPhone,websiteUrl:t.websiteUrl}});return n.vendor}async function Rt(e,t){await W(e,fe,{input:{vendors:t.map(([e,t])=>({id:t,title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProcessingAgreementLink:e.dataProcessingAgreementLink,contactName:e.contactName,contactPhone:e.contactPhone,websiteUrl:e.websiteUrl,attributes:e.attributes}))}})}async function zt(n,r){e.info(q.magenta(`Syncing "${r.length}" vendors...`));let i=!1,a=K(await Se(n),`title`);await t(r.filter(e=>!a[e.title]),async t=>{try{let r=await Lt(n,t);a[r.title]=r,e.info(q.green(`Successfully synced vendor "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync vendor "${t.title}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" vendors!`)),await Rt(n,r.map(e=>[e,a[e.title].id])),e.info(q.green(`Successfully synced "${r.length}" vendors!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" vendors ! - ${t.message}`))}return!i}function Bt(e){let t=e.split(`,`).filter(e=>!!e),n={};return t.forEach(e=>{let[t,r]=e.split(`:`);if(!t||!r)throw Error(`Invalid variable: ${e}. Expected format: key:value`);n[t]=r}),n}async function Vt(t,n){let{createPromptGroup:{promptGroup:r}}=await W(t,ae,{input:n});return e.info(q.green(`Successfully created prompt group "${n.title}"!`)),r.id}async function Ht(t,n){await W(t,O,{input:{promptGroups:n.map(([e,t])=>({...e,id:t}))}}),e.info(q.green(`Successfully updated ${n.length} prompt groups!`))}async function Ut(t,r,i=20){let a=!1;e.info(q.magenta(`Syncing "${r.length}" prompt groups...`));let o=await H(t),s=K(await de(t),`title`),c=K(o,`title`),l=r.map(e=>[e,c[e.title]?.id]),u=l.filter(([,e])=>!e).map(([e])=>e);try{e.info(q.magenta(`Creating "${u.length}" new prompt groups...`)),await n(u,async e=>{await Vt(t,{...e,promptIds:e.prompts.map(e=>{let t=s[e];if(!t)throw Error(`Failed to find prompt with title: "${e}"`);return t.id})})},{concurrency:i}),e.info(q.green(`Successfully synced ${u.length} prompt groups!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt groups! - ${t.message}`))}let d=l.filter(e=>!!e[1]);try{e.info(q.magenta(`Updating "${d.length}" prompt groups...`)),await Ht(t,d.map(([{prompts:e,...t},n])=>[{...t,promptIds:e.map(e=>{let t=s[e];if(!t)throw Error(`Failed to find prompt with title: "${e}"`);return t.id})},n])),e.info(q.green(`Successfully updated "${d.length}" prompt groups!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt groups! - ${t.message}`))}return e.info(q.green(`Synced "${r.length}" prompt groups!`)),!a}async function Wt(t,n){let{createPromptPartial:{promptPartial:r}}=await W(t,w,{input:n});return e.info(q.green(`Successfully created prompt partial "${n.title}"!`)),r.id}async function Gt(t,n){await W(t,Ee,{input:{promptPartials:n.map(([e,t])=>({...e,id:t}))}}),e.info(q.green(`Successfully updated ${n.length} prompt partials!`))}async function Kt(t,r,i=20){let a=!1;e.info(q.magenta(`Syncing "${r.length}" prompt partials...`));let o=K(await U(t),`title`),s=r.map(e=>[e,o[e.title]?.id]),c=s.filter(([,e])=>!e).map(([e])=>e);try{e.info(q.magenta(`Creating "${c.length}" new prompt partials...`)),await n(c,async e=>{await Wt(t,e)},{concurrency:i}),e.info(q.green(`Successfully synced ${c.length} prompt partials!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt partials! - ${t.message}`))}let l=s.filter(e=>!!e[1]);try{e.info(q.magenta(`Updating "${l.length}" prompt partials...`)),await Gt(t,l),e.info(q.green(`Successfully updated "${l.length}" prompt partials!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt partials! - ${t.message}`))}return e.info(q.green(`Synced "${r.length}" prompt partials!`)),!a}async function qt(e,t){let{createTeam:n}=await W(e,m,{input:{name:t.name,description:t.description,ssoTitle:t[`sso-title`],ssoDepartment:t[`sso-department`],ssoGroup:t[`sso-group`],scopes:t.scopes,userEmails:t.users}});return n.team}async function Jt(e,t,n){let{updateTeam:r}=await W(e,se,{input:{id:n,name:t.name,description:t.description,ssoTitle:t[`sso-title`],ssoDepartment:t[`sso-department`],ssoGroup:t[`sso-group`],scopes:t.scopes,userEmails:t.users}});return r.team}async function Yt(n,r){e.info(q.magenta(`Syncing "${r.length}" teams...`));let i=!1,a=K(await k(n),`name`),o=r.filter(e=>!a[e.name]),s=r.filter(e=>!!a[e.name]);return await t(o,async t=>{try{let r=await qt(n,t);a[r.name]=r,e.info(q.green(`Successfully created team "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync team "${t.name}"! - ${n.message}`))}}),await t(s,async t=>{try{let r=await Jt(n,t,a[t.name].id);a[r.name]=r,e.info(q.green(`Successfully updated team "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync team "${t.name}"! - ${n.message}`))}}),!i}async function Xt(t,r,{pageSize:i=50,publishToPrivacyCenter:o=!0,classifyService:l=!1,deleteExtraAttributeValues:u=!1}){let d=!1;e.info(q.magenta(`Fetching data with page size ${i}...`));let{templates:f,attributes:p,actions:m,identifiers:h,"data-subjects":g,"business-entities":_,enrichers:v,cookies:y,"consent-manager":b,"data-silos":x,"data-flows":S,prompts:C,"prompt-groups":w,"prompt-partials":T,agents:E,"agent-functions":D,"agent-files":O,vendors:k,"data-categories":A,"processing-activities":j,"processing-purposes":M,"action-items":N,"action-item-collections":P,teams:F,"privacy-center":I,messages:L,policies:R,partitions:z}=t,[B,V,H]=await Promise.all([v||h?a(t,r,!o):{},x||g||v||j?Ce(t,r):{},x&&x.map(e=>e[`api-key-title`]||[]).reduce((e,t)=>e+t.length,0)>0?s(t,r):{}]);if(b){e.info(q.magenta(`Syncing consent manager...`));try{await vt(r,b),e.info(q.green(`Successfully synced consent manager!`))}catch(t){d=!0,e.info(q.red(`Failed to sync consent manager! - ${t.message}`))}}if(C){let e=await It(r,C);d||=!e}if(T){let e=await Kt(r,T);d||=!e}if(w){let e=await Ut(r,w);d||=!e}if(F){let e=await Yt(r,F);d||=!e}if(f&&(e.info(q.magenta(`Syncing "${f.length}" email templates...`)),await n(f,async t=>{e.info(q.magenta(`Syncing template "${t.title}"...`));try{await c(t,r),e.info(q.green(`Successfully synced template "${t.title}"!`))}catch(n){d=!0,e.info(q.red(`Failed to sync template "${t.title}"! - ${n.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${f.length}" email templates!`))),_){let e=await ht(r,_);d||=!e}if(k){let e=await zt(r,k);d||=!e}if(A){let e=await xt(r,A);d||=!e}if(M){let e=await Nt(r,M);d||=!e}if(z){let e=await pe(r,z);d||=!e}if(E){let e=await dt(r,E);d||=!e}if(D){let e=await ct(r,D);d||=!e}if(O){let e=await at(r,O);d||=!e}if(y){let e=await He(r,y);d||=!e}if(P){let e=await Z(r,P);d||=!e}if(p){e.info(q.magenta(`Syncing "${p.length}" attributes...`));let t=await ee(r);await n(p,async n=>{let i=t.find(e=>e.name===n.name);e.info(q.magenta(`Syncing attribute "${n.name}"...`));try{await ft(r,n,{existingAttribute:i,deleteExtraAttributeValues:u}),e.info(q.green(`Successfully synced attribute "${n.name}"!`))}catch(t){d=!0,e.info(q.red(`Failed to sync attribute "${n.name}"! - ${t.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${p.length}" attributes!`))}if(N){let e=await nt(r,N);d||=!e}if(v&&(e.info(q.magenta(`Syncing "${v.length}" enrichers...`)),await n(v,async t=>{e.info(q.magenta(`Syncing enricher "${t.title}"...`));try{await te(r,{enricher:t,identifierByName:B,dataSubjectsByName:V}),e.info(q.green(`Successfully synced enricher "${t.title}"!`))}catch(n){d=!0,e.info(q.red(`Failed to sync enricher "${t.title}"! - ${n.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${v.length}" enrichers!`))),h&&(e.info(q.magenta(`Syncing "${h.length}" identifiers...`)),await n(h,async t=>{let n=B[t.name];if(!n)throw Error(`Failed to find identifier with name: ${t.type}. Should have been auto-created by cli.`);e.info(q.magenta(`Syncing identifier "${t.type}"...`));try{await Ct(r,{identifier:t,dataSubjectsByName:V,identifierId:n.id,skipPublish:!o}),e.info(q.green(`Successfully synced identifier "${t.type}"!`))}catch(n){d=!0,e.info(q.red(`Failed to sync identifier "${t.type}"! - ${n.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${h.length}" identifiers!`))),m){e.info(q.magenta(`Syncing "${m.length}" actions...`));let t=await ge(r);await n(m,async n=>{let i=t.find(e=>e.type===n.type);if(!i)throw Error(`Failed to find action with type: ${n.type}. Should have already existing in the organization.`);e.info(q.magenta(`Syncing action "${n.type}"...`));try{await J(r,{action:n,actionId:i.id,skipPublish:!o}),e.info(q.green(`Successfully synced action "${n.type}"!`))}catch(t){d=!0,e.info(q.red(`Failed to sync action "${n.type}"! - ${t.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${m.length}" actions!`))}if(g){e.info(q.magenta(`Syncing "${g.length}" data subjects...`));let t=await ne(r);await n(g,async n=>{let i=t.find(e=>e.type===n.type);if(!i)throw Error(`Failed to find data subject with type: ${n.type}. Should have already existing in the organization.`);e.info(q.magenta(`Syncing data subject "${n.type}"...`));try{await St(r,{dataSubject:n,dataSubjectId:i.id,skipPublish:!o}),e.info(q.green(`Successfully synced data subject "${n.type}"!`))}catch(t){d=!0,e.info(q.red(`Failed to sync data subject "${n.type}"! - ${t.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${g.length}" data subjects!`))}if(S){let e=await Ue(r,S,l);d||=!e}if(I){let e=await Dt(r,I);d||=!e}if(L){let e=await Tt(r,L);d||=!e}if(R){let e=await Et(r,R);d||=!e}let U=[];if(x){let{success:e,dataSiloTitleToId:t}=await re(x,r,{dataSubjectsByName:V,apiKeysByTitle:H,pageSize:i});x?.forEach(e=>{e[`deletion-dependencies`]&&U.push([t[e.title],e[`deletion-dependencies`]])}),d||=!e}if(U.length>0&&await _e(r,U),j){let e=await At(r,j);d||=!e}return d}function Zt(e,...t){let n=JSON.parse(JSON.stringify(e));return t.forEach(e=>{Ye(e).forEach(([e,t])=>{n[e]===void 0?n[e]=t:Array.isArray(t)?n[e]=[...n[e],...t]:n[e]=t})}),n}export{lt as A,nt as B,bt as C,ht as D,pt as E,st as F,J as G,Y as H,rt as I,at as L,ut as M,ot as N,mt as O,ct as P,it as R,xt as S,_t as T,Z as U,$e as V,X as W,Tt as _,zt as a,St as b,It as c,Nt as d,Mt as f,$ as g,Et as h,Lt as i,dt as j,ft as k,Ft as l,Dt as m,Xt as n,Rt as o,At as p,Bt as r,Pt as s,Zt as t,jt as u,wt as v,vt as w,yt as x,Ct as y,Q as z};
2
- //# sourceMappingURL=mergeTranscendInputs-C64BJsse.mjs.map
1
+ import{t as e}from"./logger-B-LXIf3U.mjs";import{n as t,t as n}from"./bluebird-CUitXgsY.mjs";import{i as r,r as i}from"./dataSubject-y_aXI0pa.mjs";import{n as a,o}from"./fetchIdentifiers-pjQV4vUg.mjs";import{n as s}from"./fetchApiKeys-DjOr44xA.mjs";import{n as c}from"./syncTemplates-BrH7Yr0V.mjs";import{$ as l,At as u,B as d,C as f,Ct as p,Dt as m,E as h,Et as g,F as _,G as v,H as y,I as b,K as x,L as S,Lt as C,M as ee,Mt as w,N as T,O as E,P as D,Rt as O,S as k,St as A,T as j,U as M,Ut as N,Vt as P,X as F,Z as I,a as te,b as ne,bt as L,ct as R,d as re,et as z,f as B,ft as V,g as H,h as U,ht as ie,jt as ae,k as oe,kt as se,mt as ce,n as le,nt as ue,p as de,q as fe,r as pe,rt as me,st as he,t as ge,u as _e,ut as ve,vt as ye,w as be,wt as xe,x as Se,y as Ce,yt as we,z as Te,zt as Ee}from"./fetchAllActions-BJsPdnxy.mjs";import{t as De}from"./fetchAllPurposes-ZdkO2fMp.mjs";import{C as Oe,D as ke,E as Ae,S as je,T as Me,a as Ne,b as Pe,d as Fe,i as Ie,j as Le,k as Re,u as ze,w as Be,x as Ve}from"./fetchConsentManagerId-CFkg3-RS.mjs";import{t as W}from"./makeGraphQLRequest-Cq26A_Lq.mjs";import{t as He}from"./syncCookies-BxY36BeJ.mjs";import{n as Ue}from"./syncDataFlows-Cx5LZCen.mjs";import{IsoCountryCode as We,IsoCountrySubdivisionCode as Ge}from"@transcend-io/privacy-types";import{chunk as G,difference as Ke,groupBy as qe,keyBy as K,uniq as Je}from"lodash-es";import{getEntries as Ye}from"@transcend-io/type-utils";import q from"colors";import{InitialViewState as Xe,OnConsentExpiry as Ze}from"@transcend-io/airgap.js-types";const Qe=[...Object.values(We),...Object.values(Ge)];async function J(e,{action:t,actionId:n,skipPublish:r=!1}){await W(e,V,{input:{id:n,skipSecondaryIfNoFiles:t.skipSecondaryIfNoFiles,skipDownloadableStep:t.skipDownloadableStep,requiresReview:t.requiresReview,waitingPeriod:t.waitingPeriod,skipPublish:r,regionList:t.regionBlockList?Ke(Qe,t.regionBlockList):t.regionList,regionDetectionMethod:t.regionDetectionMethod}})}async function Y(e,t){let{createActionItemCollection:n}=await W(e,xe,{input:{title:t.title,description:t.description||``,hidden:t.hidden||!1,productLine:t.productLine}});return n.created}async function X(e,t,n){await W(e,g,{input:{id:n,title:t.title,description:t.description,hidden:t.hidden,productLine:t.productLine}})}async function Z(n,r){let i=!1;e.info(q.magenta(`Syncing "${r.length}" action item collections...`));let a=K(await B(n),`title`);return await t(r.filter(e=>!a[e.title]),async t=>{try{await Y(n,t),e.info(q.green(`Successfully created action item collection "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to create action item collection "${t.title}"! - ${n.message}`))}}),await t(r.map(e=>[e,a[e.title]?.id]).filter(e=>!!e[1]),async([t,r])=>{try{await X(n,t,r),e.info(q.green(`Successfully synced action item collection "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync action item collection "${t.title}"! - ${n.message}`))}}),!i}async function Q(e,n,r,i={}){await t(G(n,100),async t=>{await W(e,R,{input:t.map(e=>({title:e.title,type:e.type,priorityOverride:e.priority,dueDate:e.dueDate,customerExperienceActionItemId:e.customerExperienceActionItemId,resolved:e.resolved,notes:e.notes,link:e.link,assigneesUserEmails:e.users,assigneesTeamNames:e.teams,...(e.attributes,{}),collectionIds:e.collections.map(e=>r[e].id)}))})})}async function $e(e,t,n,r={}){let i=e=>{let t=r[e];if(!t)throw Error(`Attribute key "${e}" does not exist!`);return t.id};await W(e,ve,{input:{ids:[n],title:t.title,priorityOverride:t.priority,dueDate:t.dueDate,resolved:t.resolved,customerExperienceActionItemId:t.customerExperienceActionItemId,notes:t.notes,link:t.link,assigneesUserEmails:t.users,assigneesTeamNames:t.teams,...t.attributes?{attributes:t.attributes.map(({key:e,values:t})=>({attributeKeyId:i(e),attributeValueNames:t}))}:{}}})}function et({title:e,collections:t}){return`${e}-${t.map(e=>e.title).sort().join(`-`)}`}function tt({title:e,collections:t}){return`${e}-${t.sort().join(`-`)}`}async function nt(n,r){let i=!1;e.info(q.magenta(`Syncing "${r.length}" actionItems...`));let a=r.some(e=>e.attributes&&e.attributes.length>0),[o,s,c]=await Promise.all([b(n),B(n),a?ee(n):[]]),l=K(s,`title`),u=K(o,et),d=K(c,`name`),f=K(o.filter(e=>!!e.customerExperienceActionItemIds),({customerExperienceActionItemIds:e})=>e[0]),p=Je(r.map(e=>e.collections).flat()).filter(e=>!l[e]);if(p.length>0)return e.info(q.red(`Missing action item collections: "${p.join(`", "`)}" - please create them first!`)),!1;let m=r.filter(e=>!u[tt(e)]&&!f[e.customerExperienceActionItemId]);if(m.length>0)try{e.info(q.magenta(`Creating "${m.length}" actionItems...`)),await Q(n,m,l,d),e.info(q.green(`Successfully created "${m.length}" actionItems!`))}catch(t){i=!0,e.info(q.red(`Failed to create action items! - ${t.message}`))}return await t(r.map(e=>[e,u[tt(e)]?.id||f[e.customerExperienceActionItemId]?.id]).filter(e=>!!e[1]),async([t,r])=>{try{await $e(n,t,r,d),e.info(q.green(`Successfully synced action item "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync action item "${t.title}"! - ${n.message}`))}}),!i}async function rt(e,t){let{createAgentFile:n}=await W(e,l,{input:{name:t.name,description:t.description,fileId:t.fileId,size:t.size,purpose:t.purpose,fileUploadedAt:new Date,agentIds:[]}});return n.agentFile}async function it(e,t){await W(e,z,{input:{agentFiles:t.map(([e,t])=>({id:t,name:e.name,description:e.description,fileId:e.fileId,size:e.size,purpose:e.purpose}))}})}async function at(n,r){e.info(q.magenta(`Syncing "${r.length}" agent files...`));let i=!1,a=K(await _(n),`name`);await t(r.filter(e=>!a[e.name]),async t=>{try{let r=await rt(n,t);a[r.name]=r,e.info(q.green(`Successfully synced agent file "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync agent file "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" agent files!`)),await it(n,r.map(e=>[e,a[e.name].id])),e.info(q.green(`Successfully synced "${r.length}" agent files!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" agent files! - ${t.message}`))}return!i}async function ot(e,t){let{createAgentFunction:n}=await W(e,F,{input:{name:t.name,description:t.description,parameters:t.parameters,agentIds:[]}});return n.agentFunction}async function st(e,t){await W(e,I,{input:{agentFunctions:t.map(([e,t])=>({id:t,name:e.name,description:e.description,parameters:e.parameters}))}})}async function ct(n,r){e.info(q.magenta(`Syncing "${r.length}" agent functions...`));let i=!1,a=K(await D(n),`name`);await t(r.filter(e=>!a[e.name]),async t=>{try{let r=await ot(n,t);a[r.name]=r,e.info(q.green(`Successfully synced agent function "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync agent function "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" agent functions!`)),await st(n,r.map(e=>[e,a[e.name].id])),e.info(q.green(`Successfully synced "${r.length}" agent functions!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" agent functions! - ${t.message}`))}return!i}async function lt(e,t){let{createAgent:n}=await W(e,ue,{input:{name:t.name,description:t.description,codeInterpreterEnabled:t.codeInterpreterEnabled,retrievalEnabled:t.retrievalEnabled,promptTitle:t.prompt,largeLanguageModelName:t[`large-language-model`].name,largeLanguageModelClient:t[`large-language-model`].client}});return n.agent}async function ut(e,t){await W(e,me,{input:{agents:t.map(([e,t])=>({id:t,name:e.name,description:e.description,codeInterpreterEnabled:e.codeInterpreterEnabled,retrievalEnabled:e.retrievalEnabled}))}})}async function dt(n,r){e.info(q.magenta(`Syncing "${r.length}" agents...`));let i=!1,a=K(await T(n),`name`);await t(r.filter(e=>!a[e.name]),async t=>{try{let r=await lt(n,t);a[r.name]=r,e.info(q.green(`Successfully synced agent "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync agent "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" agents!`)),await ut(n,r.map(e=>[e,a[e.name].id])),e.info(q.green(`Successfully synced "${r.length}" agents!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" agents ! - ${t.message}`))}return!i}async function ft(t,r,{existingAttribute:i,deleteExtraAttributeValues:a}){let o={name:r.name,enabledOn:r.resources},s;if(i)await W(t,A,{attributeKeyId:i.id,description:i.isCustom?r.description:void 0,...o}),s=i.id;else{let{createAttributeKey:{attributeKey:e}}=await W(t,ye,{type:r.type,description:r.description,...o});s=e.id}let c=K(i?.values||[],`name`),{existingValues:l=[],newValues:u=[]}=qe(r.values||[],e=>c[e.name]?`existingValues`:`newValues`),d=Ke((i?.values||[]).map(({name:e})=>e),(r.values||[]).map(({name:e})=>e));u.length>0&&(await W(t,we,{input:u.map(({name:e,...t})=>({name:e,attributeKeyId:s,...t}))}),e.info(q.green(`Created ${u.length} attribute values`))),l.length>0&&(await W(t,p,{input:l.map(({name:e,...t})=>({id:c[e].id,name:e,description:c[e].description,color:c[e].color,...t,attributeKeyId:s}))}),e.info(q.green(`Updated ${l.length} attribute values`))),d.length>0&&a&&(await n(d,async e=>{await W(t,L,{id:c[e].id})},{concurrency:10}),e.info(q.green(`Deleted ${d.length} attribute values`)))}async function pt(e,t){let{createBusinessEntity:n}=await W(e,ce,{input:{title:t.title,description:t.description,address:t.address,headquarterCountry:t.headquarterCountry,headquarterSubDivision:t.headquarterSubDivision,dataProtectionOfficerName:t.dataProtectionOfficerName,dataProtectionOfficerEmail:t.dataProtectionOfficerEmail,attributes:t.attributes,teamNames:t.teams,ownerEmails:t.owners}});return n.businessEntity}async function mt(e,n){await t(G(n,100),async t=>{await W(e,ie,{input:t.map(([e,t])=>({id:t,title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProtectionOfficerName:e.dataProtectionOfficerName,dataProtectionOfficerEmail:e.dataProtectionOfficerEmail,attributes:e.attributes,teamNames:e.teams,ownerEmails:e.owners}))})})}async function ht(n,r){e.info(q.magenta(`Syncing "${r.length}" business entities...`));let i=!1,a=K(await oe(n),`title`);await t(r.filter(e=>!a[e.title]),async t=>{try{let r=await pt(n,t);a[r.title]=r,e.info(q.green(`Successfully synced business entity "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync business entity "${t.title}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" business entities!`)),await mt(n,r.map(e=>[e,a[e.title].id])),e.info(q.green(`Successfully synced "${r.length}" business entities!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" business entities ! - ${t.message}`))}return!i}const gt=`https://app.transcend.io/consent-manager/regional-experiences/purposes`;async function _t(t,r){let i=K(await Ie(t),`name`),a=K(await De(t),`trackingType`);await n(r,async(n,r)=>{let o=n.purposes?.map((e,t)=>{let n=a[e.trackingType];if(!n)throw Error(`Invalid purpose trackingType provided at consentManager.experiences[${r}].purposes[${t}]: ${e.trackingType}. See list of valid purposes ${gt}`);return n.id}),s=n.optedOutPurposes?.map((e,t)=>{let n=a[e.trackingType];if(!n)throw Error(`Invalid purpose trackingType provided at consentManager.experiences[${r}].optedOutPurposes[${t}]: ${e.trackingType}. See list of valid purposes ${gt}`);return n.id}),c=i[n.name];c?(await W(t,Be,{input:{id:c.id,name:n.displayName,regions:n.regions,operator:n.operator,onConsentExpiry:n.onConsentExpiry,consentExpiry:n.consentExpiry,displayPriority:n.displayPriority===c.displayPriority?void 0:n.displayPriority,viewState:n.viewState,purposes:o,optedOutPurposes:s,browserLanguages:n.browserLanguages,browserTimeZones:n.browserTimeZones}}),e.info(q.green(`Successfully synced consent experience "${n.name}"!`))):(await W(t,ze,{input:{name:n.name,displayName:n.displayName,regions:n.regions,operator:n.operator,onConsentExpiry:n.onConsentExpiry||Ze.Prompt,consentExpiry:n.consentExpiry,displayPriority:n.displayPriority,viewState:n.viewState||Xe.Hidden,purposes:o||[],optedOutPurposes:s||[],browserLanguages:n.browserLanguages,browserTimeZones:n.browserTimeZones}}),e.info(q.green(`Successfully created consent experience "${n.name}"!`)))},{concurrency:10})}async function vt(e,t){let n;try{n=await Ne(e,1)}catch(r){if(r.message.includes(`AirgapBundle not found`)){let r=await h(e),{createConsentManager:i}=await W(e,Fe,{domains:t.domains,privacyCenterId:r});n=i.consentManager.id}else throw r}if(t.domains&&await W(e,Me,{domains:t.domains,airgapBundleId:n}),t.partition){let r=(await le(e)).find(e=>e.name===t.partition);if(!r)throw Error(`Partition "${t.partition}" not found. Please create the partition first.`);await W(e,Ae,{partitionId:r.id,airgapBundleId:n})}t.version&&await W(e,Re,{airgapBundleId:n,version:t.version}),t.signedIabAgreement&&await W(e,Le,{input:{id:n,...t.signedIabAgreement?{signedIabAgreement:t.signedIabAgreement}:{}}}),t.unknownRequestPolicy&&await W(e,Oe,{input:{id:n,unknownRequestPolicy:t.unknownRequestPolicy}}),t.unknownRequestPolicy&&await W(e,je,{input:{id:n,unknownCookiePolicy:t.unknownCookiePolicy}}),t.telemetryPartitioning&&await W(e,Ve,{input:{id:n,strategy:t.telemetryPartitioning}}),t.consentPrecedence&&await W(e,Pe,{input:{id:n,consentPrecedence:t.consentPrecedence}}),t.experiences&&await _t(e,t.experiences),t.theme&&await W(e,ke,{input:{airgapBundleId:n,...t.theme}})}async function yt(e,t){let{createDataCategory:n}=await W(e,M,{input:{name:t.name,category:t.category,description:t.description}});return n.dataCategory}async function bt(e,t){await W(e,v,{input:{dataSubCategories:t.map(([e,t])=>({id:t,description:e.description,attributes:e.attributes}))}})}async function xt(n,r){e.info(q.magenta(`Syncing "${r.length}" data categories...`));let i=!1,a=K(await E(n),({name:e,category:t})=>`${e}:${t}`);await t(r.filter(e=>!a[`${e.name}:${e.category}`]),async t=>{try{let r=await yt(n,t);a[`${r.name}:${r.category}`]=r,e.info(q.green(`Successfully synced data category "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync data category "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" data categories!`)),await bt(n,r.map(e=>[e,a[`${e.name}:${e.category}`].id])),e.info(q.green(`Successfully synced "${r.length}" data categories!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" data categories ! - ${t.message}`))}return!i}async function St(e,{dataSubject:t,dataSubjectId:n,skipPublish:a=!1}){await W(e,r,{input:{id:n,title:t.title,adminDashboardDefaultSilentMode:t.adminDashboardDefaultSilentMode,actions:t.actions,skipPublish:a&&t.active===void 0}}),typeof t.active==`boolean`&&await W(e,i,{input:{id:n,active:t.active,skipPublish:a}})}async function Ct(e,{identifier:t,dataSubjectsByName:n,identifierId:r,skipPublish:i=!1}){await W(e,o,{input:{id:r,selectOptions:t.selectOptions,isRequiredInForm:t.isRequiredInForm,regex:t.regex,placeholder:t.placeholder,displayTitle:t.displayTitle,displayDescription:t.displayDescription,displayOrder:t.displayOrder,isUniqueOnPreferenceStore:t.isUniqueOnPreferenceStore,privacyCenterVisibility:t.privacyCenterVisibility,dataSubjectIds:t.dataSubjects?t.dataSubjects.map(e=>n[e].id):void 0,skipPublish:i}})}async function wt(e,n){await t(G(n,100),async t=>{await W(e,P,{messages:t.map(e=>({...e.id.includes(`.`)?{}:{id:e.id},defaultMessage:e.defaultMessage,targetReactIntlId:e.targetReactIntlId,translations:e.translations?Object.entries(e.translations).map(([e,t])=>({locale:e,value:t})):void 0}))})})}async function Tt(t,n){let r=!1;e.info(q.magenta(`Syncing "${n.length}" messages...`));let i=n.filter(e=>n.filter(t=>e.id===t.id).length>1);if(i.length>0)throw Error(`Failed to upload messages as there were non-unique entries found: ${i.map(({id:e})=>e).join(`,`)}`);try{e.info(q.magenta(`Upserting "${n.length}" new messages...`)),await wt(t,n),e.info(q.green(`Successfully synced ${n.length} messages!`))}catch(t){r=!0,e.info(q.red(`Failed to create messages! - ${t.message}`))}return!r}async function $(e,n){let r=await h(e);await t(G(n,100),async t=>{await W(e,N,{privacyCenterId:r,policies:t.map(([e,t])=>({id:t,title:e.title,disableEffectiveOn:e.disableEffectiveOn,disabledLocales:e.disabledLocales,...e.effectiveOn||e.content?{version:{...e.effectiveOn?{effectiveOn:e.effectiveOn}:{},...e.content?{content:{defaultMessage:e.content}}:{}}}:{}}))})})}async function Et(t,n){let r=!1;e.info(q.magenta(`Syncing "${n.length}" policies...`));let i=n.filter(e=>n.filter(t=>e.title===t.title).length>1);if(i.length>0)throw Error(`Failed to upload policies as there were non-unique entries found: ${i.map(({title:e})=>e).join(`,`)}`);let a=K(await j(t),({title:e})=>e.defaultMessage);try{e.info(q.magenta(`Upserting "${n.length}" new policies...`)),await $(t,n.map(e=>[e,a[e.title]?.id])),e.info(q.green(`Successfully synced ${n.length} policies!`))}catch(t){r=!0,e.info(q.red(`Failed to create policies! - ${t.message}`))}return!r}async function Dt(t,n){let r=!1;e.info(q.magenta(`Syncing privacy center...`));let i=await h(t);try{await W(t,he,{input:{privacyCenterId:i,transformAccessReportJsonToCsv:n.transformAccessReportJsonToCsv,useCustomEmailDomain:n.useCustomEmailDomain,useNoReplyEmailAddress:n.useNoReplyEmailAddress,replyToEmail:n.replyToEmail,supportEmail:n.supportEmail,preferBrowserDefaultLocale:n.preferBrowserDefaultLocale,defaultLocale:n.defaultLocale,locales:n.locales,showMarketingPreferences:n.showMarketingPreferences,showManageYourPrivacy:n.showManageYourPrivacy,showPolicies:n.showPolicies,showConsentManager:n.showConsentManager,showDataFlows:n.showDataFlows,showCookies:n.showCookies,showTrackingTechnologies:n.showTrackingTechnologies,showPrivacyRequestButton:n.showPrivacyRequestButton,isDisabled:n.isDisabled,...n.theme?{colorPalette:n.theme.colors,componentStyles:n.theme.componentStyles,textStyles:n.theme.textStyles}:{}}}),e.info(q.green(`Successfully synced privacy center!`))}catch(t){r=!0,e.info(q.red(`Failed to create privacy center! - ${t.message}`))}return!r}async function Ot(e,t){let{createProcessingActivity:n}=await W(e,S,{input:{title:t.title,description:t.description}});return n.processingActivity}async function kt(e,t){let n=t.filter(([,e])=>e===void 0).map(([{title:e}])=>e);if(n.length>0)throw Error(`The following ${n.length} processing activities do not exist and thus can't be updated: "${n.join(`", "`)}"`);await W(e,Te,{input:{processingActivities:t.map(([{processingSubPurposes:e,dataSubCategories:t,saaSCategories:n,...r},i])=>({dataSubCategoryInputs:t?.map(({category:e,name:t})=>({category:e,name:t??``})),processingPurposeSubCategoryInputs:e?.map(({purpose:e,name:t})=>({purpose:e,name:t??`Other`})),saaSCategoryTitles:n,...r,id:i}))}})}async function At(n,r){let i=!1;e.info(q.magenta(`Syncing "${r.length}" processing activities...`));let a=K(await be(n),`title`),o=r.filter(e=>!a[e.title]);o.length>0&&e.info(q.magenta(`Creating "${o.length}" new processing activities...`)),await t(o,async t=>{try{let r=await Ot(n,t);a[r.title]=r,e.info(q.green(`Successfully created processing activity "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to create processing activity "${t.title}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" processing activities!`)),await kt(n,r.map(e=>[e,a[e.title]?.id])),e.info(q.green(`Successfully synced "${r.length}" processingActivities!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" processingActivities! - ${t.message}`))}return!i}async function jt(e,t){let{createProcessingPurposeSubCategory:n}=await W(e,d,{input:{name:t.name,purpose:t.purpose,description:t.description}});return n.processingPurposeSubCategory}async function Mt(e,t){await W(e,y,{input:{processingPurposeSubCategories:t.map(([e,t])=>({id:t,description:e.description,attributes:e.attributes}))}})}async function Nt(n,r){e.info(q.magenta(`Syncing "${r.length}" processing purposes...`));let i=!1,a=K(await f(n),({name:e,purpose:t})=>`${e}:${t}`);await t(r.filter(e=>!a[`${e.name}:${e.purpose}`]),async t=>{try{let r=await jt(n,t);a[`${r.name}:${r.purpose}`]=r,e.info(q.green(`Successfully synced processing purpose "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync processing purpose "${t.name}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" processing purposes!`)),await Mt(n,r.map(e=>[e,a[`${e.name}:${e.purpose}`].id])),e.info(q.green(`Successfully synced "${r.length}" processing purposes!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" processing purposes ! - ${t.message}`))}return!i}async function Pt(t,n){let{createPrompt:{prompt:r}}=await W(t,u,{input:n});return e.info(q.green(`Successfully created prompt "${n.title}"!`)),r.id}async function Ft(t,n){await W(t,C,{input:{prompts:n.map(([e,t])=>({...e,id:t}))}}),e.info(q.green(`Successfully updated ${n.length} prompts!`))}async function It(t,r,i=20){let a=!1;e.info(q.magenta(`Syncing "${r.length}" prompts...`));let o=K(await de(t),`title`),s=r.map(e=>[e,o[e.title]?.id]),c=s.filter(([,e])=>!e).map(([e])=>e);try{e.info(q.magenta(`Creating "${c.length}" new prompts...`)),await n(c,async e=>{await Pt(t,e)},{concurrency:i}),e.info(q.green(`Successfully synced ${c.length} prompts!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompts! - ${t.message}`))}let l=s.filter(e=>!!e[1]);try{e.info(q.magenta(`Updating "${l.length}" prompts...`)),await Ft(t,l),e.info(q.green(`Successfully updated "${l.length}" prompts!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompts! - ${t.message}`))}return e.info(q.green(`Synced "${r.length}" prompts!`)),!a}async function Lt(e,t){let{createVendor:n}=await W(e,x,{input:{title:t.title,description:t.description,address:t.address,headquarterCountry:t.headquarterCountry,headquarterSubDivision:t.headquarterSubDivision,dataProcessingAgreementLink:t.dataProcessingAgreementLink,contactName:t.contactName,contactPhone:t.contactPhone,websiteUrl:t.websiteUrl}});return n.vendor}async function Rt(e,t){await W(e,fe,{input:{vendors:t.map(([e,t])=>({id:t,title:e.title,description:e.description,address:e.address,headquarterCountry:e.headquarterCountry,headquarterSubDivision:e.headquarterSubDivision,dataProcessingAgreementLink:e.dataProcessingAgreementLink,contactName:e.contactName,contactPhone:e.contactPhone,websiteUrl:e.websiteUrl,attributes:e.attributes}))}})}async function zt(n,r){e.info(q.magenta(`Syncing "${r.length}" vendors...`));let i=!1,a=K(await Se(n),`title`);await t(r.filter(e=>!a[e.title]),async t=>{try{let r=await Lt(n,t);a[r.title]=r,e.info(q.green(`Successfully synced vendor "${t.title}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync vendor "${t.title}"! - ${n.message}`))}});try{e.info(q.magenta(`Updating "${r.length}" vendors!`)),await Rt(n,r.map(e=>[e,a[e.title].id])),e.info(q.green(`Successfully synced "${r.length}" vendors!`))}catch(t){i=!0,e.info(q.red(`Failed to sync "${r.length}" vendors ! - ${t.message}`))}return!i}function Bt(e){let t=e.split(`,`).filter(e=>!!e),n={};return t.forEach(e=>{let[t,r]=e.split(`:`);if(!t||!r)throw Error(`Invalid variable: ${e}. Expected format: key:value`);n[t]=r}),n}async function Vt(t,n){let{createPromptGroup:{promptGroup:r}}=await W(t,ae,{input:n});return e.info(q.green(`Successfully created prompt group "${n.title}"!`)),r.id}async function Ht(t,n){await W(t,O,{input:{promptGroups:n.map(([e,t])=>({...e,id:t}))}}),e.info(q.green(`Successfully updated ${n.length} prompt groups!`))}async function Ut(t,r,i=20){let a=!1;e.info(q.magenta(`Syncing "${r.length}" prompt groups...`));let o=await H(t),s=K(await de(t),`title`),c=K(o,`title`),l=r.map(e=>[e,c[e.title]?.id]),u=l.filter(([,e])=>!e).map(([e])=>e);try{e.info(q.magenta(`Creating "${u.length}" new prompt groups...`)),await n(u,async e=>{await Vt(t,{...e,promptIds:e.prompts.map(e=>{let t=s[e];if(!t)throw Error(`Failed to find prompt with title: "${e}"`);return t.id})})},{concurrency:i}),e.info(q.green(`Successfully synced ${u.length} prompt groups!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt groups! - ${t.message}`))}let d=l.filter(e=>!!e[1]);try{e.info(q.magenta(`Updating "${d.length}" prompt groups...`)),await Ht(t,d.map(([{prompts:e,...t},n])=>[{...t,promptIds:e.map(e=>{let t=s[e];if(!t)throw Error(`Failed to find prompt with title: "${e}"`);return t.id})},n])),e.info(q.green(`Successfully updated "${d.length}" prompt groups!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt groups! - ${t.message}`))}return e.info(q.green(`Synced "${r.length}" prompt groups!`)),!a}async function Wt(t,n){let{createPromptPartial:{promptPartial:r}}=await W(t,w,{input:n});return e.info(q.green(`Successfully created prompt partial "${n.title}"!`)),r.id}async function Gt(t,n){await W(t,Ee,{input:{promptPartials:n.map(([e,t])=>({...e,id:t}))}}),e.info(q.green(`Successfully updated ${n.length} prompt partials!`))}async function Kt(t,r,i=20){let a=!1;e.info(q.magenta(`Syncing "${r.length}" prompt partials...`));let o=K(await U(t),`title`),s=r.map(e=>[e,o[e.title]?.id]),c=s.filter(([,e])=>!e).map(([e])=>e);try{e.info(q.magenta(`Creating "${c.length}" new prompt partials...`)),await n(c,async e=>{await Wt(t,e)},{concurrency:i}),e.info(q.green(`Successfully synced ${c.length} prompt partials!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt partials! - ${t.message}`))}let l=s.filter(e=>!!e[1]);try{e.info(q.magenta(`Updating "${l.length}" prompt partials...`)),await Gt(t,l),e.info(q.green(`Successfully updated "${l.length}" prompt partials!`))}catch(t){a=!0,e.info(q.red(`Failed to create prompt partials! - ${t.message}`))}return e.info(q.green(`Synced "${r.length}" prompt partials!`)),!a}async function qt(e,t){let{createTeam:n}=await W(e,m,{input:{name:t.name,description:t.description,ssoTitle:t[`sso-title`],ssoDepartment:t[`sso-department`],ssoGroup:t[`sso-group`],scopes:t.scopes,userEmails:t.users}});return n.team}async function Jt(e,t,n){let{updateTeam:r}=await W(e,se,{input:{id:n,name:t.name,description:t.description,ssoTitle:t[`sso-title`],ssoDepartment:t[`sso-department`],ssoGroup:t[`sso-group`],scopes:t.scopes,userEmails:t.users}});return r.team}async function Yt(n,r){e.info(q.magenta(`Syncing "${r.length}" teams...`));let i=!1,a=K(await k(n),`name`),o=r.filter(e=>!a[e.name]),s=r.filter(e=>!!a[e.name]);return await t(o,async t=>{try{let r=await qt(n,t);a[r.name]=r,e.info(q.green(`Successfully created team "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync team "${t.name}"! - ${n.message}`))}}),await t(s,async t=>{try{let r=await Jt(n,t,a[t.name].id);a[r.name]=r,e.info(q.green(`Successfully updated team "${t.name}"!`))}catch(n){i=!0,e.info(q.red(`Failed to sync team "${t.name}"! - ${n.message}`))}}),!i}async function Xt(t,r,{pageSize:i=50,publishToPrivacyCenter:o=!0,classifyService:l=!1,deleteExtraAttributeValues:u=!1}){let d=!1;e.info(q.magenta(`Fetching data with page size ${i}...`));let{templates:f,attributes:p,actions:m,identifiers:h,"data-subjects":g,"business-entities":_,enrichers:v,cookies:y,"consent-manager":b,"data-silos":x,"data-flows":S,prompts:C,"prompt-groups":w,"prompt-partials":T,agents:E,"agent-functions":D,"agent-files":O,vendors:k,"data-categories":A,"processing-activities":j,"processing-purposes":M,"action-items":N,"action-item-collections":P,teams:F,"privacy-center":I,messages:L,policies:R,partitions:z}=t,[B,V,H]=await Promise.all([v||h?a(t,r,!o):{},x||g||v||j?Ce(t,r):{},x&&x.map(e=>e[`api-key-title`]||[]).reduce((e,t)=>e+t.length,0)>0?s(t,r):{}]);if(b){e.info(q.magenta(`Syncing consent manager...`));try{await vt(r,b),e.info(q.green(`Successfully synced consent manager!`))}catch(t){d=!0,e.info(q.red(`Failed to sync consent manager! - ${t.message}`))}}if(C){let e=await It(r,C);d||=!e}if(T){let e=await Kt(r,T);d||=!e}if(w){let e=await Ut(r,w);d||=!e}if(F){let e=await Yt(r,F);d||=!e}if(f&&(e.info(q.magenta(`Syncing "${f.length}" email templates...`)),await n(f,async t=>{e.info(q.magenta(`Syncing template "${t.title}"...`));try{await c(t,r),e.info(q.green(`Successfully synced template "${t.title}"!`))}catch(n){d=!0,e.info(q.red(`Failed to sync template "${t.title}"! - ${n.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${f.length}" email templates!`))),_){let e=await ht(r,_);d||=!e}if(k){let e=await zt(r,k);d||=!e}if(A){let e=await xt(r,A);d||=!e}if(M){let e=await Nt(r,M);d||=!e}if(z){let e=await pe(r,z);d||=!e}if(E){let e=await dt(r,E);d||=!e}if(D){let e=await ct(r,D);d||=!e}if(O){let e=await at(r,O);d||=!e}if(y){let e=await He(r,y);d||=!e}if(P){let e=await Z(r,P);d||=!e}if(p){e.info(q.magenta(`Syncing "${p.length}" attributes...`));let t=await ee(r);await n(p,async n=>{let i=t.find(e=>e.name===n.name);e.info(q.magenta(`Syncing attribute "${n.name}"...`));try{await ft(r,n,{existingAttribute:i,deleteExtraAttributeValues:u}),e.info(q.green(`Successfully synced attribute "${n.name}"!`))}catch(t){d=!0,e.info(q.red(`Failed to sync attribute "${n.name}"! - ${t.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${p.length}" attributes!`))}if(N){let e=await nt(r,N);d||=!e}if(v&&(e.info(q.magenta(`Syncing "${v.length}" enrichers...`)),await n(v,async t=>{e.info(q.magenta(`Syncing enricher "${t.title}"...`));try{await te(r,{enricher:t,identifierByName:B,dataSubjectsByName:V}),e.info(q.green(`Successfully synced enricher "${t.title}"!`))}catch(n){d=!0,e.info(q.red(`Failed to sync enricher "${t.title}"! - ${n.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${v.length}" enrichers!`))),h&&(e.info(q.magenta(`Syncing "${h.length}" identifiers...`)),await n(h,async t=>{let n=B[t.name];if(!n)throw Error(`Failed to find identifier with name: ${t.type}. Should have been auto-created by cli.`);e.info(q.magenta(`Syncing identifier "${t.type}"...`));try{await Ct(r,{identifier:t,dataSubjectsByName:V,identifierId:n.id,skipPublish:!o}),e.info(q.green(`Successfully synced identifier "${t.type}"!`))}catch(n){d=!0,e.info(q.red(`Failed to sync identifier "${t.type}"! - ${n.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${h.length}" identifiers!`))),m){e.info(q.magenta(`Syncing "${m.length}" actions...`));let t=await ge(r);await n(m,async n=>{let i=t.find(e=>e.type===n.type);if(!i)throw Error(`Failed to find action with type: ${n.type}. Should have already existing in the organization.`);e.info(q.magenta(`Syncing action "${n.type}"...`));try{await J(r,{action:n,actionId:i.id,skipPublish:!o}),e.info(q.green(`Successfully synced action "${n.type}"!`))}catch(t){d=!0,e.info(q.red(`Failed to sync action "${n.type}"! - ${t.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${m.length}" actions!`))}if(g){e.info(q.magenta(`Syncing "${g.length}" data subjects...`));let t=await ne(r);await n(g,async n=>{let i=t.find(e=>e.type===n.type);if(!i)throw Error(`Failed to find data subject with type: ${n.type}. Should have already existing in the organization.`);e.info(q.magenta(`Syncing data subject "${n.type}"...`));try{await St(r,{dataSubject:n,dataSubjectId:i.id,skipPublish:!o}),e.info(q.green(`Successfully synced data subject "${n.type}"!`))}catch(t){d=!0,e.info(q.red(`Failed to sync data subject "${n.type}"! - ${t.message}`))}},{concurrency:10}),e.info(q.green(`Synced "${g.length}" data subjects!`))}if(S){let e=await Ue(r,S,l);d||=!e}if(I){let e=await Dt(r,I);d||=!e}if(L){let e=await Tt(r,L);d||=!e}if(R){let e=await Et(r,R);d||=!e}let U=[];if(x){let{success:e,dataSiloTitleToId:t}=await re(x,r,{dataSubjectsByName:V,apiKeysByTitle:H,pageSize:i});x?.forEach(e=>{e[`deletion-dependencies`]&&U.push([t[e.title],e[`deletion-dependencies`]])}),d||=!e}if(U.length>0&&await _e(r,U),j){let e=await At(r,j);d||=!e}return d}function Zt(e,...t){let n=JSON.parse(JSON.stringify(e));return t.forEach(e=>{Ye(e).forEach(([e,t])=>{n[e]===void 0?n[e]=t:Array.isArray(t)?n[e]=[...n[e],...t]:n[e]=t})}),n}export{lt as A,nt as B,bt as C,ht as D,pt as E,st as F,J as G,Y as H,rt as I,at as L,ut as M,ot as N,mt as O,ct as P,it as R,xt as S,_t as T,Z as U,$e as V,X as W,Tt as _,zt as a,St as b,It as c,Nt as d,Mt as f,$ as g,Et as h,Lt as i,dt as j,ft as k,Ft as l,Dt as m,Xt as n,Rt as o,At as p,Bt as r,Pt as s,Zt as t,jt as u,wt as v,vt as w,yt as x,Ct as y,Q as z};
2
+ //# sourceMappingURL=mergeTranscendInputs-DGC4xUGu.mjs.map