@transcend-io/cli 12.0.0 → 12.1.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.
- package/README.md +162 -149
- package/dist/{app-CR3U95JW.mjs → app-BAx2hvcN.mjs} +20 -18
- package/dist/app-BAx2hvcN.mjs.map +1 -0
- package/dist/{approvePrivacyRequests-BDG82nlp.mjs → approvePrivacyRequests-B-4o7QMG.mjs} +2 -2
- package/dist/{approvePrivacyRequests-BDG82nlp.mjs.map → approvePrivacyRequests-B-4o7QMG.mjs.map} +1 -1
- package/dist/bin/bash-complete.mjs +1 -1
- package/dist/bin/cli.mjs +1 -1
- package/dist/bin/deprecated-command.mjs +1 -1
- package/dist/buildExamples-kR5_7dkU.mjs +2 -0
- package/dist/buildExamples-kR5_7dkU.mjs.map +1 -0
- package/dist/{buildXdiSyncEndpoint-FExEagKc.mjs → buildXdiSyncEndpoint-BSYwJ2vc.mjs} +2 -2
- package/dist/{buildXdiSyncEndpoint-FExEagKc.mjs.map → buildXdiSyncEndpoint-BSYwJ2vc.mjs.map} +1 -1
- package/dist/{bulkRestartRequests-OKwKXc52.mjs → bulkRestartRequests-DhOfMz0S.mjs} +2 -2
- package/dist/{bulkRestartRequests-OKwKXc52.mjs.map → bulkRestartRequests-DhOfMz0S.mjs.map} +1 -1
- package/dist/{bulkRetryEnrichers-Dl-n8AFF.mjs → bulkRetryEnrichers-Cj94ftnY.mjs} +2 -2
- package/dist/{bulkRetryEnrichers-Dl-n8AFF.mjs.map → bulkRetryEnrichers-Cj94ftnY.mjs.map} +1 -1
- package/dist/{cancelPrivacyRequests-BIgX5SDz.mjs → cancelPrivacyRequests-DgAhfcmg.mjs} +2 -2
- package/dist/{cancelPrivacyRequests-BIgX5SDz.mjs.map → cancelPrivacyRequests-DgAhfcmg.mjs.map} +1 -1
- package/dist/{command-X7lkPELf.mjs → command-gwG8sQwM.mjs} +2 -2
- package/dist/{command-X7lkPELf.mjs.map → command-gwG8sQwM.mjs.map} +1 -1
- package/dist/{constants-BRsj50Nb.mjs → constants-BCmVqlrM.mjs} +2 -2
- package/dist/{constants-BRsj50Nb.mjs.map → constants-BCmVqlrM.mjs.map} +1 -1
- package/dist/constants-DlH2vWm_.mjs +2 -0
- package/dist/constants-DlH2vWm_.mjs.map +1 -0
- package/dist/{createPoolingCommandUi-CyPZ3GqN.mjs → createPoolingCommandUi-ByyTeJx5.mjs} +2 -2
- package/dist/{createPoolingCommandUi-CyPZ3GqN.mjs.map → createPoolingCommandUi-ByyTeJx5.mjs.map} +1 -1
- package/dist/{downloadPrivacyRequestFiles-EBySRnvd.mjs → downloadPrivacyRequestFiles-yiE6NzXz.mjs} +2 -2
- package/dist/{downloadPrivacyRequestFiles-EBySRnvd.mjs.map → downloadPrivacyRequestFiles-yiE6NzXz.mjs.map} +1 -1
- package/dist/{extractClientError-DUJxHv07.mjs → extractClientError-BQgmnp3e.mjs} +2 -2
- package/dist/{extractClientError-DUJxHv07.mjs.map → extractClientError-BQgmnp3e.mjs.map} +1 -1
- package/dist/{fuzzyMatchColumns-2NmQqCZI.mjs → fuzzyMatchColumns-D18n9Beu.mjs} +2 -2
- package/dist/{fuzzyMatchColumns-2NmQqCZI.mjs.map → fuzzyMatchColumns-D18n9Beu.mjs.map} +1 -1
- package/dist/{generateCrossAccountApiKeys-pWTrIUE6.mjs → generateCrossAccountApiKeys-CoSsZwSz.mjs} +2 -2
- package/dist/{generateCrossAccountApiKeys-pWTrIUE6.mjs.map → generateCrossAccountApiKeys-CoSsZwSz.mjs.map} +1 -1
- package/dist/{impl-Dr_l_SLd.mjs → impl-4WoLxjdU.mjs} +2 -2
- package/dist/{impl-Dr_l_SLd.mjs.map → impl-4WoLxjdU.mjs.map} +1 -1
- package/dist/{impl-D1f9mJL_.mjs → impl-BCP4X_zk.mjs} +2 -2
- package/dist/{impl-D1f9mJL_.mjs.map → impl-BCP4X_zk.mjs.map} +1 -1
- package/dist/{impl-DXbxO2VJ.mjs → impl-BFSZEQ2s.mjs} +2 -2
- package/dist/{impl-DXbxO2VJ.mjs.map → impl-BFSZEQ2s.mjs.map} +1 -1
- package/dist/{impl-BdTxFv63.mjs → impl-BJnxahnW.mjs} +2 -2
- package/dist/{impl-BdTxFv63.mjs.map → impl-BJnxahnW.mjs.map} +1 -1
- package/dist/{impl-iD6Fknfe.mjs → impl-BKKBmXv4.mjs} +2 -2
- package/dist/{impl-iD6Fknfe.mjs.map → impl-BKKBmXv4.mjs.map} +1 -1
- package/dist/{impl-DtpgD_as.mjs → impl-BM2SWSKF.mjs} +2 -2
- package/dist/{impl-DtpgD_as.mjs.map → impl-BM2SWSKF.mjs.map} +1 -1
- package/dist/{impl-CrdqsTUy.mjs → impl-BMX6B40F.mjs} +2 -2
- package/dist/{impl-CrdqsTUy.mjs.map → impl-BMX6B40F.mjs.map} +1 -1
- package/dist/{impl-7rdGuHOC.mjs → impl-BRCAL4RM.mjs} +2 -2
- package/dist/{impl-7rdGuHOC.mjs.map → impl-BRCAL4RM.mjs.map} +1 -1
- package/dist/{impl-DxQ9yj3H.mjs → impl-BaGN4J-w.mjs} +2 -2
- package/dist/{impl-DxQ9yj3H.mjs.map → impl-BaGN4J-w.mjs.map} +1 -1
- package/dist/impl-Bf2Qli6c2.mjs +421 -0
- package/dist/{impl-DQcgEx7V2.mjs.map → impl-Bf2Qli6c2.mjs.map} +1 -1
- package/dist/{impl-DJcNhpbx.mjs → impl-BrdCuU0I.mjs} +2 -2
- package/dist/{impl-DJcNhpbx.mjs.map → impl-BrdCuU0I.mjs.map} +1 -1
- package/dist/{impl-Cxprr2hw.mjs → impl-C0R2azuF.mjs} +2 -2
- package/dist/{impl-Cxprr2hw.mjs.map → impl-C0R2azuF.mjs.map} +1 -1
- package/dist/{impl-B7l4bLG5.mjs → impl-C1hh_5On.mjs} +2 -2
- package/dist/{impl-B7l4bLG5.mjs.map → impl-C1hh_5On.mjs.map} +1 -1
- package/dist/{impl-Do2TNA3-.mjs → impl-C1vn0Y7f.mjs} +2 -2
- package/dist/{impl-Do2TNA3-.mjs.map → impl-C1vn0Y7f.mjs.map} +1 -1
- package/dist/impl-C36c5NfN.mjs +2 -0
- package/dist/impl-C36c5NfN.mjs.map +1 -0
- package/dist/{impl-DcL-8NEa2.mjs → impl-C54oUOeM2.mjs} +2 -2
- package/dist/{impl-DcL-8NEa2.mjs.map → impl-C54oUOeM2.mjs.map} +1 -1
- package/dist/{impl-HUfaARep.mjs → impl-CKg5Xu-r.mjs} +2 -2
- package/dist/{impl-HUfaARep.mjs.map → impl-CKg5Xu-r.mjs.map} +1 -1
- package/dist/{impl-B440iuvL.mjs → impl-ClhMRgQZ.mjs} +3 -3
- package/dist/{impl-B440iuvL.mjs.map → impl-ClhMRgQZ.mjs.map} +1 -1
- package/dist/{impl-BWPPVXG3.mjs → impl-CoqCyj7e.mjs} +3 -3
- package/dist/{impl-BWPPVXG3.mjs.map → impl-CoqCyj7e.mjs.map} +1 -1
- package/dist/impl-CuDZY6y7.mjs +2 -0
- package/dist/impl-CuDZY6y7.mjs.map +1 -0
- package/dist/{impl-DQG1pMzD2.mjs → impl-Cvyc-iTI2.mjs} +2 -2
- package/dist/{impl-DQG1pMzD2.mjs.map → impl-Cvyc-iTI2.mjs.map} +1 -1
- package/dist/impl-CwBa15M42.mjs +3 -0
- package/dist/impl-CwBa15M42.mjs.map +1 -0
- package/dist/{impl-BLQDgwxL.mjs → impl-CxpGBeJ0.mjs} +2 -2
- package/dist/{impl-BLQDgwxL.mjs.map → impl-CxpGBeJ0.mjs.map} +1 -1
- package/dist/{impl-CWP6AXSb.mjs → impl-CyDdvH5a.mjs} +2 -2
- package/dist/{impl-CWP6AXSb.mjs.map → impl-CyDdvH5a.mjs.map} +1 -1
- package/dist/{impl-vmLq6HCI.mjs → impl-D0cf-epj.mjs} +2 -2
- package/dist/{impl-vmLq6HCI.mjs.map → impl-D0cf-epj.mjs.map} +1 -1
- package/dist/{impl-CieztjdM.mjs → impl-D3gqip90.mjs} +2 -2
- package/dist/{impl-CieztjdM.mjs.map → impl-D3gqip90.mjs.map} +1 -1
- package/dist/{impl-wBcVYHlA.mjs → impl-D8YS5Bge.mjs} +2 -2
- package/dist/{impl-wBcVYHlA.mjs.map → impl-D8YS5Bge.mjs.map} +1 -1
- package/dist/{impl-1SsreZWo.mjs → impl-DCF3CF3O.mjs} +2 -2
- package/dist/{impl-1SsreZWo.mjs.map → impl-DCF3CF3O.mjs.map} +1 -1
- package/dist/impl-DE_cRfz52.mjs +2 -0
- package/dist/impl-DE_cRfz52.mjs.map +1 -0
- package/dist/impl-DG-041kN.mjs +3 -0
- package/dist/impl-DG-041kN.mjs.map +1 -0
- package/dist/{impl-B2ZXtnpX.mjs → impl-DNRA5i0w.mjs} +2 -2
- package/dist/{impl-B2ZXtnpX.mjs.map → impl-DNRA5i0w.mjs.map} +1 -1
- package/dist/{impl-Ds-gQfdc.mjs → impl-DSPxdc-T.mjs} +2 -2
- package/dist/{impl-Ds-gQfdc.mjs.map → impl-DSPxdc-T.mjs.map} +1 -1
- package/dist/{impl-FerHBNJx2.mjs → impl-DbddBTRj2.mjs} +2 -2
- package/dist/{impl-FerHBNJx2.mjs.map → impl-DbddBTRj2.mjs.map} +1 -1
- package/dist/{impl-eeS2lVi5.mjs → impl-DdUe8ClA.mjs} +2 -2
- package/dist/{impl-eeS2lVi5.mjs.map → impl-DdUe8ClA.mjs.map} +1 -1
- package/dist/{impl-CudSYx-g.mjs → impl-Dl8xSx8K.mjs} +2 -2
- package/dist/{impl-CudSYx-g.mjs.map → impl-Dl8xSx8K.mjs.map} +1 -1
- package/dist/{impl-DRKPx_I9.mjs → impl-DqnzZv43.mjs} +2 -2
- package/dist/{impl-DRKPx_I9.mjs.map → impl-DqnzZv43.mjs.map} +1 -1
- package/dist/{impl-D-a5xGld.mjs → impl-DrlfmH8g.mjs} +3 -3
- package/dist/{impl-D-a5xGld.mjs.map → impl-DrlfmH8g.mjs.map} +1 -1
- package/dist/{impl-DTadLabu.mjs → impl-F2lRJEqw.mjs} +2 -2
- package/dist/{impl-DTadLabu.mjs.map → impl-F2lRJEqw.mjs.map} +1 -1
- package/dist/{impl-CU38kdj8.mjs → impl-LDY2dgtc.mjs} +2 -2
- package/dist/{impl-CU38kdj8.mjs.map → impl-LDY2dgtc.mjs.map} +1 -1
- package/dist/{impl-C_Ifcb00.mjs → impl-OXGlZyUo.mjs} +2 -2
- package/dist/{impl-C_Ifcb00.mjs.map → impl-OXGlZyUo.mjs.map} +1 -1
- package/dist/{impl-Cb42aI60.mjs → impl-WJBuS_0m.mjs} +2 -2
- package/dist/{impl-Cb42aI60.mjs.map → impl-WJBuS_0m.mjs.map} +1 -1
- package/dist/{impl-DqHEIzpj.mjs → impl-agm4lpyq.mjs} +5 -5
- package/dist/{impl-DqHEIzpj.mjs.map → impl-agm4lpyq.mjs.map} +1 -1
- package/dist/impl-defjX-97.mjs +3 -0
- package/dist/impl-defjX-97.mjs.map +1 -0
- package/dist/{impl-DtnYcktN.mjs → impl-f59q7WnK.mjs} +2 -2
- package/dist/{impl-DtnYcktN.mjs.map → impl-f59q7WnK.mjs.map} +1 -1
- package/dist/{impl-DiwxYcux.mjs → impl-pA1b-G6B.mjs} +2 -2
- package/dist/{impl-DiwxYcux.mjs.map → impl-pA1b-G6B.mjs.map} +1 -1
- package/dist/{impl-D1UogVAq.mjs → impl-tYHONQMu.mjs} +2 -2
- package/dist/{impl-D1UogVAq.mjs.map → impl-tYHONQMu.mjs.map} +1 -1
- package/dist/{impl-CspH2ZWx.mjs → impl-u1nIo2-E.mjs} +2 -2
- package/dist/{impl-CspH2ZWx.mjs.map → impl-u1nIo2-E.mjs.map} +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{inquirer-BU5IpgA8.mjs → inquirer-jzIQWAvq.mjs} +2 -2
- package/dist/{inquirer-BU5IpgA8.mjs.map → inquirer-jzIQWAvq.mjs.map} +1 -1
- package/dist/{markRequestDataSiloIdsCompleted-BYNMCkhy.mjs → markRequestDataSiloIdsCompleted-B-Dgme2r.mjs} +2 -2
- package/dist/{markRequestDataSiloIdsCompleted-BYNMCkhy.mjs.map → markRequestDataSiloIdsCompleted-B-Dgme2r.mjs.map} +1 -1
- package/dist/{markSilentPrivacyRequests-gKYivzH1.mjs → markSilentPrivacyRequests-CPU4Q2lF.mjs} +2 -2
- package/dist/{markSilentPrivacyRequests-gKYivzH1.mjs.map → markSilentPrivacyRequests-CPU4Q2lF.mjs.map} +1 -1
- package/dist/{mergeTranscendInputs-D1CvxQu0.mjs → mergeTranscendInputs-B7WjxYMN.mjs} +3 -3
- package/dist/{mergeTranscendInputs-D1CvxQu0.mjs.map → mergeTranscendInputs-B7WjxYMN.mjs.map} +1 -1
- package/dist/{notifyPrivacyRequestsAdditionalTime-DbERhQ1Q.mjs → notifyPrivacyRequestsAdditionalTime-BWsm5Y5K.mjs} +2 -2
- package/dist/{notifyPrivacyRequestsAdditionalTime-DbERhQ1Q.mjs.map → notifyPrivacyRequestsAdditionalTime-BWsm5Y5K.mjs.map} +1 -1
- package/dist/{policy-bundle-manifest-BZnBMZQq.mjs → policy-bundle-manifest-BDey6EBs.mjs} +3 -3
- package/dist/{policy-bundle-manifest-BZnBMZQq.mjs.map → policy-bundle-manifest-BDey6EBs.mjs.map} +1 -1
- package/dist/{policy-project-discovery-C29UxWwt.mjs → policy-project-discovery-DV5PnFJq.mjs} +71 -68
- package/dist/policy-project-discovery-DV5PnFJq.mjs.map +1 -0
- package/dist/policy-scaffold-config-DtRELUZx.mjs +76 -0
- package/dist/policy-scaffold-config-DtRELUZx.mjs.map +1 -0
- package/dist/printResult-Dmwv78e7.mjs +33 -0
- package/dist/printResult-Dmwv78e7.mjs.map +1 -0
- package/dist/{pullAllDatapoints-Bm-Orhse.mjs → pullAllDatapoints-CNqQSSmF.mjs} +3 -3
- package/dist/{pullAllDatapoints-Bm-Orhse.mjs.map → pullAllDatapoints-CNqQSSmF.mjs.map} +1 -1
- package/dist/pullChunkedCustomSiloOutstandingIdentifiers-BaHp-jxs.mjs +2 -0
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-DTGQOw--.mjs.map → pullChunkedCustomSiloOutstandingIdentifiers-BaHp-jxs.mjs.map} +1 -1
- package/dist/{pullManualEnrichmentIdentifiersToCsv-DMC5CQtE.mjs → pullManualEnrichmentIdentifiersToCsv-CiEFIvl_.mjs} +2 -2
- package/dist/{pullManualEnrichmentIdentifiersToCsv-DMC5CQtE.mjs.map → pullManualEnrichmentIdentifiersToCsv-CiEFIvl_.mjs.map} +1 -1
- package/dist/{pushCronIdentifiersFromCsv-DhS2z8IG.mjs → pushCronIdentifiersFromCsv-DeS78zyp.mjs} +2 -2
- package/dist/{pushCronIdentifiersFromCsv-DhS2z8IG.mjs.map → pushCronIdentifiersFromCsv-DeS78zyp.mjs.map} +1 -1
- package/dist/pushManualEnrichmentIdentifiersFromCsv-B3iVwuvs.mjs +2 -0
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-BTJGOmdU.mjs.map → pushManualEnrichmentIdentifiersFromCsv-B3iVwuvs.mjs.map} +1 -1
- package/dist/{removeUnverifiedRequestIdentifiers-BkAcUZZN.mjs → removeUnverifiedRequestIdentifiers-qS5A_eRZ.mjs} +2 -2
- package/dist/{removeUnverifiedRequestIdentifiers-BkAcUZZN.mjs.map → removeUnverifiedRequestIdentifiers-qS5A_eRZ.mjs.map} +1 -1
- package/dist/resolveBundleIdByName-BPrMkU0w.mjs +2 -0
- package/dist/resolveBundleIdByName-BPrMkU0w.mjs.map +1 -0
- package/dist/resolvePolicyBundleVersion-BrVz4LKN.mjs +2 -0
- package/dist/resolvePolicyBundleVersion-BrVz4LKN.mjs.map +1 -0
- package/dist/{retryRequestDataSilos-BoPmcB8-.mjs → retryRequestDataSilos-Cxaka-kA.mjs} +2 -2
- package/dist/{retryRequestDataSilos-BoPmcB8-.mjs.map → retryRequestDataSilos-Cxaka-kA.mjs.map} +1 -1
- package/dist/{skipPreflightJobs-DkBdYw-r.mjs → skipPreflightJobs-FdIm_Imj.mjs} +2 -2
- package/dist/{skipPreflightJobs-DkBdYw-r.mjs.map → skipPreflightJobs-FdIm_Imj.mjs.map} +1 -1
- package/dist/{skipRequestDataSilos-BRFiokix.mjs → skipRequestDataSilos-MTbj-OfW.mjs} +2 -2
- package/dist/{skipRequestDataSilos-BRFiokix.mjs.map → skipRequestDataSilos-MTbj-OfW.mjs.map} +1 -1
- package/dist/{streamPrivacyRequestsToCsv-Bt-H5J-y.mjs → streamPrivacyRequestsToCsv-BVzYSXNY.mjs} +2 -2
- package/dist/{streamPrivacyRequestsToCsv-Bt-H5J-y.mjs.map → streamPrivacyRequestsToCsv-BVzYSXNY.mjs.map} +1 -1
- package/dist/{syncCodePackages-CPkEukDm.mjs → syncCodePackages-DJnrcX5l.mjs} +2 -2
- package/dist/{syncCodePackages-CPkEukDm.mjs.map → syncCodePackages-DJnrcX5l.mjs.map} +1 -1
- package/dist/updateConsentManagerVersionToLatest-Udi7Iazb.mjs +2 -0
- package/dist/{updateConsentManagerVersionToLatest-DWblAwus.mjs.map → updateConsentManagerVersionToLatest-Udi7Iazb.mjs.map} +1 -1
- package/dist/{uploadConsents-D7Vg8ZRW.mjs → uploadConsents-w7FE65Zg.mjs} +2 -2
- package/dist/{uploadConsents-D7Vg8ZRW.mjs.map → uploadConsents-w7FE65Zg.mjs.map} +1 -1
- package/dist/uploadPrivacyRequestsFromCsv-B__QsguT.mjs +2 -0
- package/dist/uploadPrivacyRequestsFromCsv-B__QsguT.mjs.map +1 -0
- package/package.json +5 -5
- package/dist/app-CR3U95JW.mjs.map +0 -1
- package/dist/buildExamples-B6BdW0FD.mjs +0 -2
- package/dist/buildExamples-B6BdW0FD.mjs.map +0 -1
- package/dist/constants-qvGk0wlN.mjs +0 -2
- package/dist/constants-qvGk0wlN.mjs.map +0 -1
- package/dist/impl-BqTMPbwc2.mjs +0 -2
- package/dist/impl-BqTMPbwc2.mjs.map +0 -1
- package/dist/impl-CAoIp9Nl2.mjs +0 -3
- package/dist/impl-CAoIp9Nl2.mjs.map +0 -1
- package/dist/impl-Cee7Q1Ne.mjs +0 -2
- package/dist/impl-Cee7Q1Ne.mjs.map +0 -1
- package/dist/impl-DQcgEx7V2.mjs +0 -298
- package/dist/impl-DezV3QMo.mjs +0 -3
- package/dist/impl-DezV3QMo.mjs.map +0 -1
- package/dist/impl-btKJ1-VJ.mjs +0 -3
- package/dist/impl-btKJ1-VJ.mjs.map +0 -1
- package/dist/impl-ijoNwhGI.mjs +0 -2
- package/dist/impl-ijoNwhGI.mjs.map +0 -1
- package/dist/policy-project-discovery-C29UxWwt.mjs.map +0 -1
- package/dist/policy-scaffold-config-BUKAyPad.mjs +0 -76
- package/dist/policy-scaffold-config-BUKAyPad.mjs.map +0 -1
- package/dist/printResult-C2K9ODeE.mjs +0 -33
- package/dist/printResult-C2K9ODeE.mjs.map +0 -1
- package/dist/pullChunkedCustomSiloOutstandingIdentifiers-DTGQOw--.mjs +0 -2
- package/dist/pushManualEnrichmentIdentifiersFromCsv-BTJGOmdU.mjs +0 -2
- package/dist/resolveBundleIdByName-Dm_o5_bg.mjs +0 -2
- package/dist/resolveBundleIdByName-Dm_o5_bg.mjs.map +0 -1
- package/dist/resolvePolicyBundleVersion-DRUwe7fA.mjs +0 -2
- package/dist/resolvePolicyBundleVersion-DRUwe7fA.mjs.map +0 -1
- package/dist/updateConsentManagerVersionToLatest-DWblAwus.mjs +0 -2
- package/dist/uploadPrivacyRequestsFromCsv-B_hQwIn6.mjs +0 -2
- package/dist/uploadPrivacyRequestsFromCsv-B_hQwIn6.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./enums-OiLcZ26O.mjs";import{a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y}from"./constants-
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./enums-OiLcZ26O.mjs";import{a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y}from"./constants-BCmVqlrM.mjs";import{t as b}from"./logger-CPu6zbyQ.mjs";import{$ as x,A as S,B as ee,C as te,D as C,E as ne,F as re,G as ie,H as ae,I as oe,J as se,K as ce,L as le,M as ue,N as w,O as de,P as fe,Q as T,R as E,S as D,T as O,U as k,V as A,W as j,X as M,Y as N,Z as P,_ as F,a as I,at as L,b as R,c as z,ct as B,d as V,dt as pe,et as me,f as he,ft as ge,g as _e,gt as ve,h as ye,ht as be,i as xe,it as Se,j as Ce,k as we,l as Te,lt as Ee,m as De,mt as Oe,n as ke,nt as Ae,o as je,ot as Me,p as Ne,pt as Pe,q as Fe,r as Ie,rt as Le,s as Re,st as ze,t as Be,tt as Ve,u as He,ut as Ue,v as We,w as Ge,x as Ke,y as qe,z as Je}from"./codecs-CfcaFoZR.mjs";import{a as Ye,i as Xe,n as Ze,o as Qe,r as $e,s as et,t as tt}from"./readTranscendYaml-BfqQbPiT.mjs";import{i as nt,n as rt,r as it,t as at}from"./mergeTranscendInputs-B7WjxYMN.mjs";import{a as ot,c as st,i as ct,l as lt,n as ut,o as dt,r as ft,s as pt,t as mt,u as ht}from"./constants-DlH2vWm_.mjs";import{n as gt,t as _t}from"./fuzzyMatchColumns-D18n9Beu.mjs";import{a as vt,c as yt,d as bt,f as xt,i as St,l as Ct,n as wt,o as Tt,r as Et,s as Dt,t as Ot,u as kt}from"./uploadPrivacyRequestsFromCsv-B__QsguT.mjs";import{n as At,t as jt}from"./parseAttributesFromString-C5hJMRvt.mjs";import{n as H,t as Mt}from"./readCsv-DNcJ_UfU.mjs";import{n as Nt,t as Pt}from"./pullUnstructuredSubDataPointRecommendations-Ci4AOxyH.mjs";import{a as Ft,i as It,n as Lt,o as Rt,r as zt,t as Bt}from"./request-BpKyN9Xm.mjs";import{i as Vt,n as Ht,r as Ut,t as Wt}from"./pullTranscendConfiguration-CDUDqxpm.mjs";import{i as Gt,n as Kt,r as U,t as qt}from"./fetchAllRequests-BI0tFl_a.mjs";import{a as Jt,i as Yt,n as Xt,r as Zt,t as Qt}from"./pullChunkedCustomSiloOutstandingIdentifiers-BaHp-jxs.mjs";import{n as $t,r as en,t as tn}from"./syncCodePackages-DJnrcX5l.mjs";import{t as nn}from"./markSilentPrivacyRequests-CPU4Q2lF.mjs";import{a as rn,i as an,n as on,o as sn,r as cn,t as ln}from"./downloadPrivacyRequestFiles-yiE6NzXz.mjs";import{n as un,r as dn,t as fn}from"./extractClientError-BQgmnp3e.mjs";import{t as pn}from"./approvePrivacyRequests-B-4o7QMG.mjs";import{t as mn}from"./notifyPrivacyRequestsAdditionalTime-BWsm5Y5K.mjs";import{t as hn}from"./cancelPrivacyRequests-DgAhfcmg.mjs";import{n as gn,t as _n}from"./bulkRestartRequests-DhOfMz0S.mjs";import{t as vn}from"./skipPreflightJobs-FdIm_Imj.mjs";import{t as yn}from"./bulkRetryEnrichers-Cj94ftnY.mjs";import{t as bn}from"./retryRequestDataSilos-Cxaka-kA.mjs";import{n as W,r as G,t as xn}from"./streamPrivacyRequestsToCsv-BVzYSXNY.mjs";import{n as Sn,r as Cn,t as wn}from"./inquirer-jzIQWAvq.mjs";import{t as Tn}from"./parseVariablesFromString-6TYW65LF.mjs";import{t as En}from"./collectParquetFilesOrExit-CbNQ9CJc.mjs";import{t as Dn}from"./collectCsvFilesOrExit-BindZ0dF.mjs";import{t as On}from"./parquetToCsvOneFile-DtbCFm08.mjs";import{a as kn,i as An,n as jn,o as Mn,r as Nn,s as Pn,t as Fn}from"./writeCsv-CNZrq3zU.mjs";import{t as In}from"./skipRequestDataSilos-MTbj-OfW.mjs";import{t as Ln}from"./removeUnverifiedRequestIdentifiers-qS5A_eRZ.mjs";import{t as Rn}from"./updateConsentManagerVersionToLatest-Udi7Iazb.mjs";import{n as K,t as q}from"./mapConsentCsvRowsToInputs-CkLfxaIf.mjs";import{t as zn}from"./pullConsentManagerMetrics-DKCkfbCB.mjs";import{n as Bn,r as Vn,t as Hn}from"./buildXdiSyncEndpoint-BSYwJ2vc.mjs";import{t as Un}from"./consentManagersToBusinessEntities-DG0_eby5.mjs";import{i as Wn,n as Gn,r as Kn,t as qn}from"./uploadConsents-w7FE65Zg.mjs";import{n as Jn,r as Yn,t as Xn}from"./pushCronIdentifiersFromCsv-DeS78zyp.mjs";import{t as Zn}from"./markRequestDataSiloIdsCompleted-B-Dgme2r.mjs";import{t as Qn}from"./generateCrossAccountApiKeys-CoSsZwSz.mjs";import{t as $n}from"./validateTranscendAuth-D-dDINof.mjs";import{n as er,t as tr}from"./listFiles-DDGCBdtx.mjs";import{t as nr}from"./pullAllDatapoints-CNqQSSmF.mjs";import{t as rr}from"./pullManualEnrichmentIdentifiersToCsv-CiEFIvl_.mjs";import{n as ir,r as ar,t as or}from"./pushManualEnrichmentIdentifiersFromCsv-B3iVwuvs.mjs";import{chunk as sr,difference as cr}from"lodash-es";import{join as lr}from"node:path";import J from"colors";import{readFileSync as ur,readdirSync as dr,statSync as Y}from"node:fs";import{map as X,mapSeries as fr}from"@transcend-io/utils";import pr from"fast-glob";import{UPDATE_OR_CREATE_COOKIES as mr,buildTranscendGraphQLClient as Z,createSombraGotInstance as hr,fetchAllRequestIdentifiers as gr,fetchConsentManagerId as _r,makeGraphQLRequest as vr,syncCookies as yr,syncDataFlows as br,validateSombraVersion as xr}from"@transcend-io/sdk";import{execSync as Q}from"child_process";async function $(e,t){let n=await _r(e,{logger:b});await fr(sr(t,100),async t=>{await vr(e,mr,{variables:{airgapBundleId:n,cookies:t.map(e=>({name:e.name,trackingPurposes:e.trackingPurposes&&e.trackingPurposes.length>0?e.trackingPurposes:void 0,description:e.description,service:e.service,status:e.status,attributes:e.attributes,isRegex:e.isRegex}))},logger:b})})}async function Sr(e,t){let n=!1;b.info(J.magenta(`Syncing "${t.length}" cookies...`));let r=t.filter(e=>t.filter(t=>e.name===t.name&&e.isRegex===t.isRegex).length>1);if(r.length>0)throw Error(`Failed to upload cookies as there were non-unique entries found: ${r.map(({name:e})=>e).join(`,`)}`);try{b.info(J.magenta(`Upserting "${t.length}" new cookies...`)),await $(e,t),b.info(J.green(`Successfully synced ${t.length} cookies!`))}catch(e){n=!0,b.error(J.red(`Failed to create cookies! - ${e.message}`))}return!n}async function Cr({auth:e,sombraAuth:t,actions:n=[],statuses:r=[],identifierSearch:a,pageLimit:o=100,concurrency:s=1,transcendUrl:c=i,createdAtBefore:l,skipRequestIdentifiers:u=!1,createdAtAfter:d,updatedAtBefore:f,updatedAtAfter:p,isTest:m}){let h=Z(c,e),g=await hr(c,e,{logger:b,sombraApiKey:t,sombraUrl:process.env.SOMBRA_URL}),_=``;l&&(_+=` before ${l.toISOString()}`),d&&(_+=`${_?`, and`:``} after ${d.toISOString()}`),b.info(J.magenta(`${n.length>0?`Pulling requests of type "${n.join(`" , "`)}"`:`Pulling all requests`}${_}`));let v=s>1&&d&&l,y=v?W(d,l,s):[{createdAtAfter:d,createdAtBefore:l}];v&&b.info(J.magenta(`Splitting date range into ${s} parallel chunks`));let x=(await X(y,e=>U(h,{actions:n,text:a,statuses:r,createdAtBefore:e.createdAtBefore,createdAtAfter:e.createdAtAfter,updatedAtBefore:f,updatedAtAfter:p,isTest:m}),{concurrency:v?s:1})).flat();u||await xr(h,{logger:b});let S=u?x.map(e=>({...e,requestIdentifiers:[]})):await X(x,async e=>{let t=await gr(h,g,{filterBy:{requestId:e.id},skipSombraCheck:!0,logger:b});return{...e,requestIdentifiers:t}},{concurrency:o});return b.info(J.magenta(`Pulled ${S.length} requests`)),{requestsWithRequestIdentifiers:S,requestsFormattedForCsv:S.map(G)}}function wr(e,t=ur){try{return e?t(e,`utf8`):``}catch{return``}}async function Tr({auth:e,trackerStatus:t,file:n,classifyService:r=!1,transcendUrl:a=i}){let o=Z(a,e);b.info(J.magenta(`Reading "${n}" from disk`)),await br(o,K(H(n,w),t),{classifyService:r,logger:b})||(b.error(J.red(`Encountered error(s) syncing data flows from CSV, see logs above for more info. `)),process.exit(1))}async function Er({auth:e,trackerStatus:t,file:n,transcendUrl:r=i}){let a=Z(r,e);b.info(J.magenta(`Reading "${n}" from disk`)),await yr(a,q(H(n,C),t),{logger:b})||(b.error(J.red(`Encountered error(s) syncing cookies from CSV, see logs above for more info. `)),process.exit(1))}function Dr(e){return dr(e).filter(t=>Y(lr(e,t)).isDirectory())}function Or(e){return e.replace(/(https?:\/\/[^\s]+)/g,`<link-omitted>`)}function kr(e){return Object.entries(e).reduce((e,[t,n])=>n!=null&&n!==``&&!(Array.isArray(n)&&n.length===0)&&!(typeof n==`object`&&Object.keys(n).length===0)?Object.assign(e,{[t]:n}):e,{})}function Ar({baseBranch:e,rootDirectory:t,githubRepo:n,excludedGlob:r=[],fileBlockList:i=[]}){Q(`git fetch origin ${e}`);let a=Q(`git ls-remote ${n} "refs/heads/${e}" | cut -f 1`,{encoding:`utf-8`}).split(`
|
|
2
2
|
`)[0],o=Q(`git rev-parse HEAD`,{encoding:`utf-8`}).split(`
|
|
3
3
|
`)[0];if(!a||!o)throw Error(`FAILED TO FIND COMMIT RANGE`);let s=cr(Q(`git fetch && git diff --name-only "${e||a}...${o}" -- ${t}`,{encoding:`utf-8`}).split(`
|
|
4
|
-
`).filter(e=>e),i),c=r.length>0?
|
|
4
|
+
`).filter(e=>e),i),c=r.length>0?pr.sync(s,{ignore:r}):s,l={};return c.forEach(e=>{l[e]=Q(`git show ${o}:${e}`,{encoding:`utf-8`})}),{changedFiles:s,fileDiffs:l,repoName:n.split(`/`).pop().split(`.`)[0],commit:o}}export{v as ADMIN_DASH,p as ADMIN_DASH_DATAPOINTS,g as ADMIN_DASH_INTEGRATIONS,Bt as APPROVE_PRIVACY_REQUEST,Vt as ASSESSMENT_TEMPLATES,Be as ActionInput,ke as ActionItemCollectionInput,Ie as ActionItemInput,xe as ApiKeyInput,I as AssessmentAnswerOptionInput,je as AssessmentDisplayLogicInput,Re as AssessmentInput,z as AssessmentNestedRuleInput,Te as AssessmentResourceInput,He as AssessmentRetentionScheduleInput,V as AssessmentRuleInput,he as AssessmentSectionInput,Ne as AssessmentSectionQuestionInput,De as AssessmentTemplateInput,St as AttestedExtraIdentifiers,ye as AttributeInput,_e as AttributePreview,F as AttributeValueInput,mt as BLANK,ut as BULK_APPLY,We as BusinessEntityInput,Lt as CANCEL_PRIVACY_REQUEST,ft as CAN_APPLY_IN_BULK,ct as CachedFileState,ot as CachedRequestState,qe as CodePackageInput,R as CodePackageSdk,dt as ColumnName,Ke as ConsentManageExperienceInput,D as ConsentManagerInput,te as ConsentManagerServiceMetadata,Ge as ConsentPreferenceTopic,O as ConsentPreferenceTopicOptionValue,ne as ConsentPurpose,C as CookieCsvInput,de as CookieInput,Xt as CronIdentifier,Jn as CronIdentifierPush,Zt as CronPartition,u as DEBUG,i as DEFAULT_TRANSCEND_API,m as DEFAULT_TRANSCEND_API_KEY,_ as DEFAULT_TRANSCEND_CONSENT_API,Wt as DEFAULT_TRANSCEND_PULL_RESOURCES,we as DataCategoryGuessInput,S as DataCategoryInput,Ce as DataCategoryPreviewInput,ue as DataCategoryRecommendationInput,w as DataFlowCsvInput,fe as DataFlowInput,re as DataSiloInput,oe as DataSubjectInput,le as DatapointInput,E as DeletionDependencies,Je as DeletionDependency,ee as DeletionDependencyInput,A as DeletionDependencyReset,Nt as ENTRY_COUNT,ir as EnrichPrivacyRequest,ae as EnricherInput,k as FieldInput,pt as IDENTIFIER_BLOCK_LIST,Hn as IP_ADDRESS_REGEX,st as IS_REQUIRED,j as IdentifierInput,ie as ImportOnetrustAssessmentsInput,cn as IntlMessage,ce as IntlMessageInput,lt as NONE,zt as NOTIFY_ADDITIONAL_TIME,r as OneTrustFileFormat,t as OneTrustPullResource,n as OneTrustPullSource,jt as ParsedAttributeInput,Fe as PartitionInput,se as PolicyInput,N as PreferenceWorkflowConfigInput,M as PreferenceWorkflowConfigPurposeInput,P as PreflightInput,T as PrivacyCenterInput,qt as PrivacyRequest,vt as PrivacyRequestInput,un as PrivacyRequestResponse,x as ProcessingActivityInput,me as ProcessingPurposeInput,Ve as ProcessingPurposePreviewInput,Ae as PromptAVendorEmailSettings,qn as PurposeMap,It as REQUESTS,Ft as REQUESTS_COUNT,a as RETRYABLE_BATCH_STATUSES,Le as RegionInput,Se as RepositoryInput,an as RequestFileMetadata,rn as RequestFileMetadataResponse,Kt as RequestPurposeTrigger,L as RiskAssignmentInput,Me as RiskLogicInput,d as SCOPES_BY_TITLE,y as SCOPE_TITLES,ze as SiloDiscoveryResultInput,B as SoftwareDevelopmentKitInput,Ee as StoredApiKey,ht as SuccessfulRequest,o as TR_PULL_RESOURCE_SCOPE_MAP,s as TR_PUSH_RESOURCE_SCOPE_MAP,h as TR_YML_RESOURCE_TO_FIELD_NAME,Ue as TeamInput,pe as TemplateInput,ge as TranscendInput,e as TranscendPullResource,Rt as UPDATE_PRIVACY_REQUEST,Gn as USP_STRING_REGEX,tt as VARIABLE_PARAMETERS_NAME,Ze as VARIABLE_PARAMETERS_REGEXP,Pe as VendorInput,Oe as WebhookHeader,be as WorkflowConfigInput,Fn as appendCsvRowsOrdered,jn as appendCsvSync,pn as approvePrivacyRequests,Bn as buildXdiSyncEndpoint,_n as bulkRestartRequests,yn as bulkRetryEnrichers,hn as cancelPrivacyRequests,Dn as collectCsvFilesOrExit,En as collectParquetFilesOrExit,Un as consentManagersToBusinessEntities,tn as createCodePackage,Wn as createConsentToken,l as description,Vn as domainToHost,ln as downloadPrivacyRequestFiles,ar as enrichPrivacyRequest,nt as ensureAllDataSubjectsExist,fn as extractClientError,Ut as fetchAllAssessmentTemplates,U as fetchAllRequests,Jt as fetchRequestDataSiloActiveCount,Gt as fetchRequestsTotalCount,tr as filterFileNames,kr as filterNullishValuesFromObject,kt as filterRows,G as formatRequestForCsv,_t as fuzzyMatchColumns,gt as fuzzySearch,Qn as generateCrossAccountApiKeys,sn as getFileMetadataForPrivacyRequests,Ar as getGitFilesThatChanged,bt as getUniqueValuesForColumn,Nn as initCsvFile,wn as inquirerAutoComplete,Sn as inquirerConfirmBoolean,Cn as inquirerConfirmText,Dr as listDirectories,er as listFiles,wt as mapColumnsToAttributes,Et as mapColumnsToIdentifiers,q as mapCookieCsvRowsToInputs,Ct as mapCsvColumnsToApi,Tt as mapCsvRowsToRequestInputs,K as mapDataFlowCsvRowsToInputs,xt as mapEnumValues,yt as mapRequestEnumValues,Yn as markCronIdentifierCompleted,Zn as markRequestDataSiloIdsCompleted,nn as markSilentPrivacyRequests,at as mergeTranscendInputs,f as name,Dt as normalizeIdentifierValue,ve as normalizeTranscendInput,mn as notifyPrivacyRequestsAdditionalTime,On as parquetToCsvOneFile,At as parseAttributesFromString,Mt as parseCsv,An as parseFilePath,$e as parseTranscendYaml,Tn as parseVariablesFromString,nr as pullAllDatapoints,Qt as pullChunkedCustomSiloOutstandingIdentifiers,zn as pullConsentManagerMetrics,Yt as pullCronPageOfIdentifiers,rr as pullManualEnrichmentIdentifiersToCsv,Cr as pullPrivacyRequests,Ht as pullTranscendConfiguration,Pt as pullUnstructuredSubDataPointRecommendations,Xn as pushCronIdentifiersFromCsv,or as pushManualEnrichmentIdentifiersFromCsv,H as readCsv,wr as readSafe,Xe as readTranscendYaml,Or as removeLinks,Ln as removeUnverifiedRequestIdentifiers,Ye as replaceVariablesInYaml,gn as restartPrivacyRequest,bn as retryRequestDataSilos,Qe as serializeTranscendYaml,vn as skipPreflightJobs,In as skipRequestDataSilos,W as splitDateRange,on as streamPrivacyRequestFiles,xn as streamPrivacyRequestsToCsv,dn as submitPrivacyRequest,$t as syncCodePackages,rt as syncConfigurationToTranscend,Sr as syncCookies,it as syncDataSilos,en as updateCodePackages,Rn as updateConsentManagerVersionToLatest,$ as updateOrCreateCookies,Kn as uploadConsents,Er as uploadCookiesFromCsv,Tr as uploadDataFlowsFromCsv,Ot as uploadPrivacyRequestsFromCsv,$n as validateTranscendAuth,c as version,kn as writeCsv,Mn as writeCsvSync,Pn as writeLargeCsv,et as writeTranscendYaml};
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e}from"./fuzzyMatchColumns-
|
|
2
|
-
//# sourceMappingURL=inquirer-
|
|
1
|
+
import{n as e}from"./fuzzyMatchColumns-D18n9Beu.mjs";import t from"inquirer";import n from"inquirer-autocomplete-prompt";async function r({message:e}){let{response:n}=await t.prompt([{name:`response`,message:e,type:`confirm`}]);return n}async function i({message:e}){let{response:n}=await t.prompt([{name:`response`,message:e,type:`text`,validate:e=>e.trim().length>0}]);return n}async function a({defaultValue:r,values:i,message:a}){t.registerPrompt(`autocomplete`,n);let{response:o}=await t.prompt([{name:`response`,message:a,type:`autocomplete`,default:r,source:(t,n)=>n?i.filter(t=>typeof t==`string`&&e(n,t)):i}]);return o}export{r as n,i as r,a as t};
|
|
2
|
+
//# sourceMappingURL=inquirer-jzIQWAvq.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inquirer-
|
|
1
|
+
{"version":3,"file":"inquirer-jzIQWAvq.mjs","names":[],"sources":["../src/lib/helpers/inquirer.ts"],"sourcesContent":["import { ObjByString } from '@transcend-io/type-utils';\nimport inquirer from 'inquirer';\nimport autoCompletePrompt from 'inquirer-autocomplete-prompt';\n\nimport { fuzzySearch } from '../requests/index.js';\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmBoolean({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<boolean> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: boolean;\n }>([\n {\n name: 'response',\n message,\n type: 'confirm',\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer confirm text\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerConfirmText({\n message,\n}: {\n /** Message */\n message: string;\n}): Promise<string> {\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'text',\n validate: (x) => x.trim().length > 0,\n },\n ]);\n return response;\n}\n\n/**\n * Inquirer auto complete\n *\n * @param options - Options\n * @returns The response\n */\nexport async function inquirerAutoComplete({\n defaultValue,\n values,\n message,\n}: {\n /** Default value */\n defaultValue?: string;\n /** Message */\n message: string;\n /** Values to select */\n values: string[];\n}): Promise<string> {\n inquirer.registerPrompt('autocomplete', autoCompletePrompt);\n const { response } = await inquirer.prompt<{\n /** confirmation */\n response: string;\n }>([\n {\n name: 'response',\n message,\n type: 'autocomplete',\n default: defaultValue,\n source: (answersSoFar: ObjByString, input: string) =>\n !input ? values : values.filter((x) => typeof x === 'string' && fuzzySearch(input, x)),\n },\n ]);\n return response;\n}\n"],"mappings":"yHAYA,eAAsB,EAAuB,CAC3C,WAImB,CACnB,GAAM,CAAE,YAAa,MAAM,EAAS,OAGjC,CACD,CACE,KAAM,WACN,UACA,KAAM,UACP,CACF,CAAC,CACF,OAAO,EAST,eAAsB,EAAoB,CACxC,WAIkB,CAClB,GAAM,CAAE,YAAa,MAAM,EAAS,OAGjC,CACD,CACE,KAAM,WACN,UACA,KAAM,OACN,SAAW,GAAM,EAAE,MAAM,CAAC,OAAS,EACpC,CACF,CAAC,CACF,OAAO,EAST,eAAsB,EAAqB,CACzC,eACA,SACA,WAQkB,CAClB,EAAS,eAAe,eAAgB,EAAmB,CAC3D,GAAM,CAAE,YAAa,MAAM,EAAS,OAGjC,CACD,CACE,KAAM,WACN,UACA,KAAM,eACN,QAAS,EACT,QAAS,EAA2B,IACjC,EAAiB,EAAO,OAAQ,GAAM,OAAO,GAAM,UAAY,EAAY,EAAO,EAAE,CAAC,CAA7E,EACZ,CACF,CAAC,CACF,OAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./constants-
|
|
2
|
-
//# sourceMappingURL=markRequestDataSiloIdsCompleted-
|
|
1
|
+
import{a as e}from"./constants-BCmVqlrM.mjs";import{t}from"./logger-CPu6zbyQ.mjs";import{RequestDataSiloStatus as n}from"@transcend-io/privacy-types";import r from"colors";import{map as i}from"@transcend-io/utils";import{CHANGE_REQUEST_DATA_SILO_STATUS as a,buildTranscendGraphQLClient as o,fetchRequestDataSilo as s,makeGraphQLRequest as c}from"@transcend-io/sdk";import l from"cli-progress";async function u({requestIds:u,dataSiloId:d,auth:f,concurrency:p=100,status:m=n.Resolved,transcendUrl:h=e}){let g=o(h,f),_=new Date().getTime(),v=new l.SingleBar({},l.Presets.shades_classic);t.info(r.magenta(`Notifying Transcend for data silo "${d}" marking "${u.length}" requests as completed.`));let y=0;v.start(u.length,0),await i(u,async e=>{let n=await s(g,{logger:t,filterBy:{requestId:e,dataSiloId:d}});try{await c(g,a,{variables:{requestDataSiloId:n.id,status:m},logger:t})}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(r.green(`Successfully notified Transcend in "${b/1e3}" seconds!`)),u.length}export{u as t};
|
|
2
|
+
//# sourceMappingURL=markRequestDataSiloIdsCompleted-B-Dgme2r.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markRequestDataSiloIdsCompleted-
|
|
1
|
+
{"version":3,"file":"markRequestDataSiloIdsCompleted-B-Dgme2r.mjs","names":[],"sources":["../src/lib/cron/markRequestDataSiloIdsCompleted.ts"],"sourcesContent":["import { RequestDataSiloStatus } from '@transcend-io/privacy-types';\nimport {\n buildTranscendGraphQLClient,\n makeGraphQLRequest,\n CHANGE_REQUEST_DATA_SILO_STATUS,\n fetchRequestDataSilo,\n} from '@transcend-io/sdk';\nimport { map } from '@transcend-io/utils';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.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 logger,\n filterBy: { requestId, 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 variables: {\n requestDataSiloId: requestDataSilo.id,\n status,\n },\n logger,\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":"yYAoBA,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,SACA,SAAU,CAAE,YAAW,aAAY,CACpC,CAAC,CAEF,GAAI,CACF,MAAM,EAGH,EAAQ,EAAiC,CAC1C,UAAW,CACT,kBAAmB,EAAgB,GACnC,SACD,CACD,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,SACF,CAAG,EAGvB,OADA,EAAO,KAAK,EAAO,MAAM,uCAAuC,EAAY,IAAK,YAAY,CAAC,CACvF,EAAW"}
|
package/dist/{markSilentPrivacyRequests-gKYivzH1.mjs → markSilentPrivacyRequests-CPU4Q2lF.mjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./constants-
|
|
2
|
-
//# sourceMappingURL=markSilentPrivacyRequests-
|
|
1
|
+
import{a as e}from"./constants-BCmVqlrM.mjs";import{t}from"./logger-CPu6zbyQ.mjs";import{o as n}from"./request-BpKyN9Xm.mjs";import{r}from"./fetchAllRequests-BI0tFl_a.mjs";import{RequestStatus as i}from"@transcend-io/privacy-types";import a from"colors";import{map as o}from"@transcend-io/utils";import{buildTranscendGraphQLClient as s,makeGraphQLRequest as c}from"@transcend-io/sdk";import l from"cli-progress";async function u({requestActions:u,auth:d,requestIds:f,statuses:p=[i.Compiling,i.RequestMade,i.Delayed,i.Approving,i.Secondary,i.Enriching,i.Waiting,i.SecondaryApproving],createdAtAfter:m,createdAtBefore:h,updatedAtBefore:g,updatedAtAfter:_,concurrency:v=100,transcendUrl:y=e}){let b=s(y,d),x=new Date().getTime(),S=new l.SingleBar({},l.Presets.shades_classic),C=await r(b,{actions:u,statuses:p,createdAtBefore:h,createdAtAfter:m,updatedAtBefore:g,updatedAtAfter:_,isSilent:!1,requestIds:f});t.info(a.magenta(`Marking "${C.length}" as silent mode.`));let w=0;S.start(C.length,0),await o(C,async e=>{await c(b,n,{variables:{input:{id:e.id,isSilent:!0}},logger:t}),w+=1,S.update(w)},{concurrency:v}),S.stop();let T=new Date().getTime()-x;return t.info(a.green(`Successfully marked ${w} requests as silent mode in "${T/1e3}" seconds!`)),C.length}export{u as t};
|
|
2
|
+
//# sourceMappingURL=markSilentPrivacyRequests-CPU4Q2lF.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markSilentPrivacyRequests-
|
|
1
|
+
{"version":3,"file":"markSilentPrivacyRequests-CPU4Q2lF.mjs","names":[],"sources":["../src/lib/requests/markSilentPrivacyRequests.ts"],"sourcesContent":["import { RequestAction, RequestStatus } from '@transcend-io/privacy-types';\nimport { buildTranscendGraphQLClient, makeGraphQLRequest } from '@transcend-io/sdk';\nimport { map } from '@transcend-io/utils';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.js';\nimport { UPDATE_PRIVACY_REQUEST, fetchAllRequests } 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 variables: {\n input: {\n id: requestToMarkSilent.id,\n isSilent: true,\n },\n },\n logger,\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":"4ZAgBA,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,UAAW,CACT,MAAO,CACL,GAAI,EAAoB,GACxB,SAAU,GACX,CACF,CACD,SACD,CAAC,CAEF,GAAS,EACT,EAAY,OAAO,EAAM,EAE3B,CAAE,cAAa,CAChB,CAED,EAAY,MAAM,CAElB,IAAM,EADK,IAAI,MAAM,CAAC,SACF,CAAG,EAOvB,OALA,EAAO,KACL,EAAO,MACL,uBAAuB,EAAM,+BAA+B,EAAY,IAAK,YAC9E,CACF,CACM,EAAY"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as e}from"./logger-CPu6zbyQ.mjs";import{gt as t}from"./codecs-CfcaFoZR.mjs";import{chunk as n,difference as r,flatten as i,keyBy as a,uniq as o}from"lodash-es";import s from"colors";import{
|
|
2
|
-
`)}`)),
|
|
3
|
-
//# sourceMappingURL=mergeTranscendInputs-
|
|
1
|
+
import{t as e}from"./logger-CPu6zbyQ.mjs";import{gt as t}from"./codecs-CfcaFoZR.mjs";import{chunk as n,difference as r,flatten as i,keyBy as a,uniq as o}from"lodash-es";import s from"colors";import{map as c,mapSeries as l}from"@transcend-io/utils";import{apply as u,getEntries as d}from"@transcend-io/type-utils";import{CREATE_DATA_SILOS as f,UPDATE_DATA_SILOS as p,UPDATE_OR_CREATE_DATA_POINT as m,convertToDataSubjectBlockList as h,createDataSubject as g,fetchAllActions as _,fetchAllAttributes as v,fetchAllDataSilos as y,fetchAllDataSubjects as b,fetchApiKeys as x,fetchIdentifiersAndCreateMissing as S,makeGraphQLRequest as C,syncAction as w,syncActionItemCollections as T,syncActionItems as E,syncAttribute as D,syncBusinessEntities as ee,syncConsentManager as te,syncConsentWorkflowTriggers as ne,syncCookies as re,syncDataCategories as ie,syncDataFlows as ae,syncDataSiloDependencies as oe,syncDataSubject as se,syncEnricher as ce,syncIdentifier as le,syncIntlMessages as ue,syncPartitions as de,syncPolicies as fe,syncPreferenceOptionValues as pe,syncPreferenceTopics as me,syncPrivacyCenter as he,syncProcessingActivities as ge,syncProcessingPurposes as _e,syncPurposes as ve,syncTeams as ye,syncTemplate as be,syncVendors as xe,syncWorkflowConfigs as Se}from"@transcend-io/sdk";import O from"cli-progress";const k=/^[A-Za-z]+$/;function Ce(e){let t=[],n=(e,n)=>{k.test(e)||t.push(`${n}: slug "${e}" is invalid — slugs must contain only alphabetical letters (A-Z, a-z). Topic slugs are normalized to PascalCase server-side, so YAML slugs should already be PascalCase or matching will break on subsequent pulls.`)};for(let t of e[`preference-options`]??[])n(t.slug,`preference-options`);for(let t of e.purposes??[])for(let e of t[`preference-topics`]??[]){n(e.slug,`purposes (topic "${e.title}")`);for(let t of e.options??[])n(t.slug,`purposes (topic "${e.title}" option "${t.title}")`)}return t}async function A({"data-silos":t=[],"data-subjects":n=[],"processing-activities":c=[],preflights:l=[]},u,d=!1){let f=o([...i(t.map(e=>e[`data-subjects`]||[])||[]),...i(c.map(({dataSubjectTypes:e})=>e??[])??[]),...i(l.map(e=>e[`data-subjects`]||[])||[]),...n.map(e=>e.type)]);if(f.length===0&&!d)return{};let p=await b(u,{logger:e}),m=a(p,`type`),h=r(f,p.map(({type:e})=>e));if(h.length>0){e.info(s.magenta(`Creating ${h.length} new data subjects...`));for(let t of h){e.info(s.magenta(`Creating data subject ${t}...`));let n=await g(u,{input:t,logger:e});e.info(s.green(`Created data subject ${t}!`)),m[t]=n}}return m}function we(e,t){if(e.length===0)return[];if(typeof e[0]==`string`)return[{titles:o(e)}];let n,r=[],i=new Set,a=(e,n)=>{if(i.has(e))throw Error(`Data silo "${t}" has multiple deletion-dependencies entries for workflow "${e}". Combine them into a single entry.`);i.add(e),r.push({workflowConfigInternalName:e,...n})};return e.forEach(e=>{if(`reset-to-global`in e&&`titles`in e)throw Error(`Data silo "${t}" has a deletion-dependencies entry for workflow "${e.workflow}" that sets both "reset-to-global" and "titles". Use "titles: []" to override the global configuration with no dependencies, or "reset-to-global: true" to fall back to the global configuration.`);if(`reset-to-global`in e){a(e.workflow,{resetToGlobal:!0});return}if(e.workflow){a(e.workflow,{titles:e.titles});return}if(n!==void 0)throw Error(`Data silo "${t}" has multiple global deletion-dependencies entries. Combine them into a single \`{ titles: [...] }\` entry.`);n=e.titles}),[...n===void 0?[]:[{titles:o(n)}],...r]}async function j(t,r,{pageSize:i,dataSubjectsByName:o,apiKeysByTitle:d}){let g=!1,_=new Date().getTime();e.info(s.magenta(`Syncing "${t.length}" data silos...`));let v=a(await y(r,{titles:t.map(({title:e})=>e),pageSize:i,logger:e}),`title`),b=t.filter(({title:e})=>!v[e]);b.length>0&&(e.info(s.magenta(`Creating "${b.length}" data silos that did not exist...`)),await l(n(b,20),async t=>{let{createDataSilos:{dataSilos:n}}=await C(r,f,{variables:{input:t.map(e=>({name:e[`outer-type`]||e.integrationName,title:e.title,country:e.country,countrySubDivision:e.countrySubDivision,sombraId:e[`sombra-id`]}))},logger:e});n.forEach(e=>{v[e.title]=e})}),e.info(s.green(`Successfully created "${b.length}" data silos!`)));let x=n(t,20);await l(x,async(t,n)=>{e.info(s.magenta(`[Batch ${n+1}/${x.length}] Syncing "${t.length}" data silos`)),await C(r,p,{variables:{input:{dataSilos:t.map(e=>({id:v[e.title].id,country:e.country,countrySubDivision:e.countrySubDivision,url:e.url,headers:e.headers,description:e.description,identifiers:e[`identity-keys`],isLive:!e.disabled,ownerEmails:e.owners,teamNames:e.teams,dependedOnDataSilos:e[`deletion-dependencies`]?void 0:[{titles:[]}],apiKeyId:e[`api-key-title`]?d[e[`api-key-title`]].id:void 0,dataSubjectBlockListIds:e[`data-subjects`]?h(e[`data-subjects`],o):void 0,attributes:e.attributes,businessEntityTitles:e.businessEntityTitles,sombraId:e[`sombra-id`],notifyEmailAddress:e[`email-settings`]?.[`notify-email-address`],promptAVendorEmailSendFrequency:e[`email-settings`]?.[`send-frequency`],promptAVendorEmailSendType:e[`email-settings`]?.[`send-type`],promptAVendorEmailIncludeIdentifiersAttachment:e[`email-settings`]?.[`include-identifiers-attachment`],promptAVendorEmailCompletionLinkType:e[`email-settings`]?.[`completion-link-type`],manualWorkRetryFrequency:e[`email-settings`]?.[`manual-work-retry-frequency`]}))}},logger:e}),e.info(s.green(`[Batch ${n+1}/${x.length}] Synced "${t.length}" data silos!`))});let S=new O.SingleBar({},O.Presets.shades_classic),w=t.filter(({datapoints:e=[]})=>e.length>0),T=t.map(({datapoints:e=[]})=>e.length).reduce((e,t)=>e+t,0);e.info(s.magenta(`Syncing "${T}" datapoints from "${w.length}" data silos...`)),S.start(T,0);let E=0;await c(w,async({datapoints:t,title:n})=>{t&&await l(t,async t=>{let i=t.fields?t.fields.map(({key:e,description:t,categories:n,purposes:r,attributes:i,...a})=>({name:e,description:t,categories:n?n.map(e=>({...e,name:e.name||`Other`})):void 0,purposes:r?r.map(e=>({...e,name:e.name||`Other`})):void 0,attributes:i,accessRequestVisibilityEnabled:a[`access-request-visibility-enabled`],erasureRequestRedactionEnabled:a[`erasure-request-redaction-enabled`]})):void 0,a={dataSiloId:v[n].id,path:t.path,name:t.key,title:t.title,description:t.description,...t.owners?{ownerEmails:t.owners}:{},...t.teams?{teamNames:t.teams}:{},...t[`data-collection-tag`]?{dataCollectionTag:t[`data-collection-tag`]}:{},querySuggestions:t[`privacy-action-queries`]?Object.entries(t[`privacy-action-queries`]).map(([e,t])=>({requestType:e,suggestedQuery:t})):void 0,enabledActions:t[`privacy-actions`]||[],subDataPoints:i},o=(a.subDataPoints||[]).map(({name:e})=>e),c=o.filter((e,t)=>o.indexOf(e)!==t);if(c.length>0)e.info(s.red(`\nCannot update datapoint "${t.key}" as it has duplicate sub-datapoints with the same name: \n${c.join(`
|
|
2
|
+
`)}`)),g=!0;else try{await C(r,m,{variables:a,logger:e})}catch(r){e.info(s.red(`\nFailed to update datapoint "${t.key}" for data silo "${n}"! - \n${r.message}`)),g=!0}E+=1,S.update(E)})},{concurrency:10}),S.stop();let D=new Date().getTime()-_;return e.info(s.green(`Synced "${t.length}" data silos and "${T}" datapoints in "${D/1e3}" seconds!`)),{success:!g,dataSiloTitleToId:u(v,({id:e})=>e)}}async function M(n,r,{pageSize:i=50,publishToPrivacyCenter:a=!0,classifyService:o=!1,deleteExtraAttributeValues:l=!1,logger:u,warnings:d=[]}){let f=t(n),p=u??e,m=[],h=!1,g=(e,t,n)=>{m.push({resource:e,item:n,message:t}),h=!0};p.info(s.magenta(`Fetching data with page size ${i}...`));let{templates:y,attributes:C,actions:O,identifiers:k,"data-subjects":M,"business-entities":N,preflights:P,cookies:F,"consent-manager":I,"data-silos":L,"data-flows":R,vendors:z,"data-categories":B,"processing-activities":V,"processing-purposes":H,"action-items":U,"action-item-collections":W,teams:G,"privacy-center":K,messages:q,policies:J,partitions:Y,"preference-workflow-configs":Te,"workflow-configs":Ee}=f,De=f[`preference-options`],X=f.purposes,Oe=Ce(f);if(Oe.length>0){for(let e of Oe)g(`preference-slugs`,e);return{success:!1,errors:m,warnings:d.length>0?d:void 0}}let[Z,Q,ke]=await Promise.all([P||k?S(r,{input:f,skipPublish:!a,logger:e}):{},L||M||P||V?A(f,r):{},L&&L.map(e=>e[`api-key-title`]||[]).reduce((e,t)=>e+t.length,0)>0?x(r,{apiKeyInputs:f,logger:e}):{}]);if(Te?.length&&(await ne(r,Te,{logger:p,pageSize:i})||g(`preference-workflow-configs`,`Failed to sync preference workflow configs`)),Ee?.length&&(await Se(r,Ee,{logger:p})||g(`workflow-configs`,`Failed to sync workflow configs`)),De?.length&&(await pe(r,De,{logger:p})||g(`preference-options`,`Failed to sync preference option values`)),X?.length){let{success:e,purposeIdByTrackingType:t}=await ve(r,X,{logger:p});e||g(`purposes`,`Failed to sync one or more purposes`);let n=X.flatMap(e=>(e[`preference-topics`]??[]).map(t=>({...t,"tracking-type":e.trackingType})));n.length>0&&(await me(r,n,{logger:p,purposeIdByTrackingType:t})||g(`preference-topics`,`Failed to sync one or more preference topics`))}if(I){p.info(s.magenta(`Syncing consent manager...`));try{await te(r,I,{logger:p}),p.info(s.green(`Successfully synced consent manager!`))}catch(e){g(`consent-manager`,e.message),p.error(s.red(`Failed to sync consent manager! - ${e.message}`))}}if(G){let t=await ye(r,G,{logger:e});h||=!t}if(y&&(e.info(s.magenta(`Syncing "${y.length}" email templates...`)),await c(y,async t=>{e.info(s.magenta(`Syncing template "${t.title}"...`));try{await be(r,t,{logger:e}),e.info(s.green(`Successfully synced template "${t.title}"!`))}catch(n){h=!0,e.error(s.red(`Failed to sync template "${t.title}"! - ${n.message}`))}},{concurrency:10}),e.info(s.green(`Synced "${y.length}" email templates!`))),N){let t=await ee(r,N,{logger:e});h||=!t}if(z){let t=await xe(r,z,{logger:e});h||=!t}if(B){let t=await ie(r,B,{logger:e});h||=!t}if(H){let t=await _e(r,H,{logger:e});h||=!t}if(Y){let t=await de(r,Y,{logger:e});h||=!t}if(F){let t=await re(r,F,{logger:e});h||=!t}if(W){let t=await T(r,W,{logger:e});h||=!t}if(C){e.info(s.magenta(`Syncing "${C.length}" attributes...`));let t=await v(r,{logger:e});await c(C,async n=>{let i=t.find(e=>e.name===n.name);e.info(s.magenta(`Syncing attribute "${n.name}"...`));try{await D(r,n,{existingAttribute:i,deleteExtraAttributeValues:l,logger:e}),e.info(s.green(`Successfully synced attribute "${n.name}"!`))}catch(t){h=!0,e.error(s.red(`Failed to sync attribute "${n.name}"! - ${t.message}`))}},{concurrency:10}),e.info(s.green(`Synced "${C.length}" attributes!`))}if(U){let t=await E(r,U,{logger:e});h||=!t}if(P&&(e.info(s.magenta(`Syncing "${P.length}" preflight checks...`)),await c(P,async t=>{e.info(s.magenta(`Syncing preflight check "${t.title}"...`));try{await ce(r,{input:t,identifierByName:Z,dataSubjectsByName:Q,logger:e}),e.info(s.green(`Successfully synced preflight check "${t.title}"!`))}catch(n){h=!0,e.error(s.red(`Failed to sync preflight check "${t.title}"! - ${n.message}`))}},{concurrency:10}),e.info(s.green(`Synced "${P.length}" preflight checks!`))),k&&(e.info(s.magenta(`Syncing "${k.length}" identifiers...`)),await c(k,async t=>{let n=Z[t.name];if(!n)throw Error(`Failed to find identifier with name: ${t.type}. Should have been auto-created by cli.`);e.info(s.magenta(`Syncing identifier "${t.type}"...`));try{await le(r,{input:t,dataSubjectsByName:Q,identifierId:n.id,skipPublish:!a,logger:e}),e.info(s.green(`Successfully synced identifier "${t.type}"!`))}catch(n){h=!0,e.info(s.red(`Failed to sync identifier "${t.type}"! - ${n.message}`))}},{concurrency:10}),e.info(s.green(`Synced "${k.length}" identifiers!`))),O){e.info(s.magenta(`Syncing "${O.length}" actions...`));let t=await _(r,{logger:e});await c(O,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(s.magenta(`Syncing action "${n.type}"...`));try{await w(r,{action:n,actionId:i.id,skipPublish:!a},{logger:e}),e.info(s.green(`Successfully synced action "${n.type}"!`))}catch(t){h=!0,e.error(s.red(`Failed to sync action "${n.type}"! - ${t.message}`))}},{concurrency:10}),e.info(s.green(`Synced "${O.length}" actions!`))}if(M){e.info(s.magenta(`Syncing "${M.length}" data subjects...`));let t=await b(r,{logger:e});await c(M,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(s.magenta(`Syncing data subject "${n.type}"...`));try{await se(r,{input:n,dataSubjectId:i.id,skipPublish:!a,logger:e}),e.info(s.green(`Successfully synced data subject "${n.type}"!`))}catch(t){h=!0;let r=n.supportsAuthorizedAgent!==void 0&&/authorized.agent/i.test(t.message)?` (enable the Authorized Agents feature for this organization before setting "supportsAuthorizedAgent")`:``;e.info(s.red(`Failed to sync data subject "${n.type}"! - ${t.message}${r}`))}},{concurrency:10}),e.info(s.green(`Synced "${M.length}" data subjects!`))}if(R){let t=await ae(r,R,{classifyService:o,logger:e});h||=!t}if(K)try{await he(r,K,{logger:e,skipPublish:!a})||g(`privacy-center`,`Failed to sync privacy center`)}catch(e){g(`privacy-center`,e.message)}if(q){let t=await ue(r,q,{logger:e});h||=!t}if(J){let t=await fe(r,J,{logger:e});h||=!t}let $=[];if(L){let{success:e,dataSiloTitleToId:t}=await j(L,r,{dataSubjectsByName:Q,apiKeysByTitle:ke,pageSize:i});L?.forEach(e=>{let n=e[`deletion-dependencies`];if(n)try{$.push([t[e.title],we(n,e.title)])}catch(t){g(`data-silos`,t.message,e.title),p.error(s.red(t.message))}}),h||=!e}if($.length>0){let t=await oe(r,{input:$,logger:e});h||=!t}if(V){let t=await ge(r,V,{logger:e});h||=!t}return{success:!h,errors:m,warnings:d.length>0?d:void 0}}function N(e,...n){let r=JSON.parse(JSON.stringify(e));return n.forEach(e=>{d(e).forEach(([e,t])=>{r[e]===void 0?r[e]=t:Array.isArray(t)?r[e]=[...r[e],...t]:r[e]=t})}),t(r)}export{A as i,M as n,j as r,N as t};
|
|
3
|
+
//# sourceMappingURL=mergeTranscendInputs-B7WjxYMN.mjs.map
|
package/dist/{mergeTranscendInputs-D1CvxQu0.mjs.map → mergeTranscendInputs-B7WjxYMN.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeTranscendInputs-D1CvxQu0.mjs","names":[],"sources":["../src/lib/preference-management/validatePreferenceManagementSlugs.ts","../src/lib/graphql/ensureAllDataSubjectsExist.ts","../src/lib/graphql/normalizeDeletionDependencies.ts","../src/lib/graphql/syncDataSilos.ts","../src/lib/graphql/syncConfigurationToTranscend.ts","../src/lib/mergeTranscendInputs.ts"],"sourcesContent":["import type { TranscendInput } from '../../codecs.js';\n\n/** Slugs for preference topics and option values must be alphabetical letters only. */\nexport const PREFERENCE_SLUG_REGEX = /^[A-Za-z]+$/;\n\n/**\n * Validate preference topic and option value slugs before push.\n *\n * @param input - Parsed transcend.yml input\n * @returns List of validation error messages (empty when valid)\n */\nexport function validatePreferenceManagementSlugs(input: TranscendInput): string[] {\n const errors: string[] = [];\n\n const validateSlug = (slug: string, context: string): void => {\n if (!PREFERENCE_SLUG_REGEX.test(slug)) {\n errors.push(\n `${context}: slug \"${slug}\" is invalid — slugs must contain only alphabetical letters (A-Z, a-z). ` +\n 'Topic slugs are normalized to PascalCase server-side, so YAML slugs should already be PascalCase ' +\n 'or matching will break on subsequent pulls.',\n );\n }\n };\n\n for (const option of input['preference-options'] ?? []) {\n validateSlug(option.slug, 'preference-options');\n }\n\n for (const purpose of input.purposes ?? []) {\n for (const topic of purpose['preference-topics'] ?? []) {\n validateSlug(topic.slug, `purposes (topic \"${topic.title}\")`);\n for (const option of topic.options ?? []) {\n validateSlug(option.slug, `purposes (topic \"${topic.title}\" option \"${option.title}\")`);\n }\n }\n }\n\n return errors;\n}\n","import { createDataSubject, fetchAllDataSubjects, type DataSubject } from '@transcend-io/sdk';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport { keyBy, flatten, uniq, difference } from 'lodash-es';\n\nimport { TranscendInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\n\n/**\n * Fetch all of the data subjects in the organization\n *\n * @param input - Input to fetch\n * @param client - GraphQL client\n * @param fetchAll - When true, always fetch all subjects\n * @returns The list of data subjects\n */\nexport async function ensureAllDataSubjectsExist(\n {\n 'data-silos': dataSilos = [],\n 'data-subjects': dataSubjects = [],\n 'processing-activities': processingActivities = [],\n preflights = [],\n }: TranscendInput,\n client: GraphQLClient,\n fetchAll = false,\n): Promise<{ [type in string]: DataSubject }> {\n const expectedDataSubjects = uniq([\n ...flatten(dataSilos.map((silo) => silo['data-subjects'] || []) || []),\n ...flatten(processingActivities.map(({ dataSubjectTypes }) => dataSubjectTypes ?? []) ?? []),\n ...flatten(preflights.map((preflight) => preflight['data-subjects'] || []) || []),\n ...dataSubjects.map((subject) => subject.type),\n ]);\n if (expectedDataSubjects.length === 0 && !fetchAll) {\n return {};\n }\n\n const internalSubjects = await fetchAllDataSubjects(client, { logger });\n const dataSubjectByName = keyBy(internalSubjects, 'type');\n\n const missingDataSubjects = difference(\n expectedDataSubjects,\n internalSubjects.map(({ type }) => type),\n );\n\n if (missingDataSubjects.length > 0) {\n logger.info(colors.magenta(`Creating ${missingDataSubjects.length} new data subjects...`));\n for (const dataSubjectType of missingDataSubjects) {\n logger.info(colors.magenta(`Creating data subject ${dataSubjectType}...`));\n const created = await createDataSubject(client, { input: dataSubjectType, logger });\n logger.info(colors.green(`Created data subject ${dataSubjectType}!`));\n dataSubjectByName[dataSubjectType] = created;\n }\n }\n\n return dataSubjectByName;\n}\n","import type { DependedOnDataSiloInput } from '@transcend-io/sdk';\nimport { uniq } from 'lodash-es';\n\nimport type { DeletionDependencies, DeletionDependencyInput } from '../../codecs.js';\n\n/**\n * Convert the `deletion-dependencies` entries for a single data silo into the\n * `dependedOnDataSilos` input accepted by the `updateDataSilos` mutation.\n *\n * A list of titles becomes a single global entry. A list of objects may declare\n * at most one global configuration (`{ titles }`) plus per-workflow overrides;\n * workflows that are absent from the list are left untouched.\n *\n * @param dependencies - The `deletion-dependencies` entries from transcend.yml\n * @param dataSiloTitle - Title of the data silo being synced, used in error messages\n * @returns The dependency entries to send to the API\n */\nexport function normalizeDeletionDependencies(\n dependencies: DeletionDependencies,\n dataSiloTitle: string,\n): DependedOnDataSiloInput[] {\n if (dependencies.length === 0) {\n return [];\n }\n\n // Legacy / no-overrides form: a flat list of data silo titles\n if (typeof dependencies[0] === 'string') {\n return [{ titles: uniq(dependencies as string[]) }];\n }\n\n let globalTitles: string[] | undefined;\n const workflowOverrides: DependedOnDataSiloInput[] = [];\n const seenWorkflows = new Set<string>();\n\n /**\n * Record an override for a single workflow, rejecting duplicates before the API does\n * so that the error names the data silo\n *\n * @param workflow - Internal name of the workflow being overridden\n * @param override - Titles or reset flag to send for that workflow\n */\n const addWorkflowOverride = (\n workflow: string,\n override: Omit<DependedOnDataSiloInput, 'workflowConfigInternalName'>,\n ): void => {\n if (seenWorkflows.has(workflow)) {\n throw new Error(\n `Data silo \"${dataSiloTitle}\" has multiple deletion-dependencies entries for workflow ` +\n `\"${workflow}\". Combine them into a single entry.`,\n );\n }\n seenWorkflows.add(workflow);\n workflowOverrides.push({ workflowConfigInternalName: workflow, ...override });\n };\n\n (dependencies as DeletionDependencyInput[]).forEach((dependency) => {\n // io-ts codecs allow extra properties, so this combination decodes cleanly\n // even though the two halves contradict each other\n if ('reset-to-global' in dependency && 'titles' in dependency) {\n throw new Error(\n `Data silo \"${dataSiloTitle}\" has a deletion-dependencies entry for workflow ` +\n `\"${dependency.workflow}\" that sets both \"reset-to-global\" and \"titles\". ` +\n 'Use \"titles: []\" to override the global configuration with no dependencies, ' +\n 'or \"reset-to-global: true\" to fall back to the global configuration.',\n );\n }\n\n if ('reset-to-global' in dependency) {\n addWorkflowOverride(dependency.workflow, { resetToGlobal: true });\n return;\n }\n\n if (dependency.workflow) {\n addWorkflowOverride(dependency.workflow, { titles: dependency.titles });\n return;\n }\n\n if (globalTitles !== undefined) {\n throw new Error(\n `Data silo \"${dataSiloTitle}\" has multiple global deletion-dependencies entries. ` +\n 'Combine them into a single `{ titles: [...] }` entry.',\n );\n }\n globalTitles = dependency.titles;\n });\n\n return [\n ...(globalTitles !== undefined ? [{ titles: uniq(globalTitles) }] : []),\n ...workflowOverrides,\n ];\n}\n","import {\n makeGraphQLRequest,\n ApiKey,\n convertToDataSubjectBlockList,\n type DataSubject,\n fetchAllDataSilos,\n type DataSilo,\n CREATE_DATA_SILOS,\n UPDATE_DATA_SILOS,\n UPDATE_OR_CREATE_DATA_POINT,\n} from '@transcend-io/sdk';\nimport { apply } from '@transcend-io/type-utils';\nimport { mapSeries, map } from '@transcend-io/utils';\n/* eslint-disable max-lines */\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport { chunk, keyBy } from 'lodash-es';\n\nimport { DataSiloInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\n\nconst BATCH_SILOS_LIMIT = 20;\n\n/**\n * Sync a data silo configuration\n *\n * @param dataSilos - Data silos to sync\n * @param client - GraphQL client\n * @param options - Options\n * @returns Data silo info\n */\nexport async function syncDataSilos(\n dataSilos: DataSiloInput[],\n client: GraphQLClient,\n {\n pageSize,\n dataSubjectsByName,\n apiKeysByTitle,\n }: {\n /** Page size */\n pageSize: number;\n /** The data subjects in the organization */\n dataSubjectsByName: { [type in string]: DataSubject };\n /** API key title to API key */\n apiKeysByTitle: { [title in string]: ApiKey };\n },\n): Promise<{\n /** Whether successfully updated */\n success: boolean;\n /** A mapping between data silo title to data silo ID */\n dataSiloTitleToId: { [k in string]: string };\n}> {\n let encounteredError = false;\n\n // Time duration\n const t0 = new Date().getTime();\n logger.info(colors.magenta(`Syncing \"${dataSilos.length}\" data silos...`));\n\n // Determine the set of data silos that already exist\n const existingDataSilos = await fetchAllDataSilos(client, {\n titles: dataSilos.map(({ title }) => title),\n pageSize,\n logger,\n });\n\n // Create a mapping of title -> existing silo, if it exists\n const existingDataSiloByTitle = keyBy<Pick<DataSilo, 'id' | 'title'>>(existingDataSilos, 'title');\n\n // Create new silos that do not exist\n const newDataSiloInputs = dataSilos.filter(({ title }) => !existingDataSiloByTitle[title]);\n if (newDataSiloInputs.length > 0) {\n logger.info(\n colors.magenta(`Creating \"${newDataSiloInputs.length}\" data silos that did not exist...`),\n );\n\n // Batch the creation\n const chunked = chunk(newDataSiloInputs, BATCH_SILOS_LIMIT);\n await mapSeries(chunked, async (dependencyUpdateChunk) => {\n const {\n createDataSilos: { dataSilos },\n } = await makeGraphQLRequest<{\n /** Mutation result */\n createDataSilos: {\n /** New data silos */\n dataSilos: Pick<DataSilo, 'id' | 'title'>[];\n };\n }>(client, CREATE_DATA_SILOS, {\n variables: {\n input: dependencyUpdateChunk.map((input) => ({\n name: input['outer-type'] || input.integrationName,\n title: input.title,\n country: input.country,\n countrySubDivision: input.countrySubDivision,\n sombraId: input['sombra-id'],\n })),\n },\n logger,\n });\n\n // save mapping of title and id\n dataSilos.forEach((silo) => {\n existingDataSiloByTitle[silo.title] = silo;\n });\n });\n\n logger.info(colors.green(`Successfully created \"${newDataSiloInputs.length}\" data silos!`));\n }\n\n // Batch the updates\n const chunkedUpdates = chunk(dataSilos, BATCH_SILOS_LIMIT);\n await mapSeries(chunkedUpdates, async (dataSiloUpdateChunk, ind) => {\n logger.info(\n colors.magenta(\n `[Batch ${ind + 1}/${chunkedUpdates.length}] Syncing \"${\n dataSiloUpdateChunk.length\n }\" data silos`,\n ),\n );\n await makeGraphQLRequest<{\n /** Mutation result */\n updateDataSilos: {\n /** New data silos */\n dataSilos: Pick<DataSilo, 'id' | 'title'>[];\n };\n }>(client, UPDATE_DATA_SILOS, {\n variables: {\n input: {\n dataSilos: dataSiloUpdateChunk.map((input) => ({\n id: existingDataSiloByTitle[input.title].id,\n country: input.country,\n countrySubDivision: input.countrySubDivision,\n url: input.url,\n headers: input.headers,\n description: input.description,\n identifiers: input['identity-keys'],\n isLive: !input.disabled,\n ownerEmails: input.owners,\n teamNames: input.teams,\n // clear out the global config if not specified, otherwise the update needs to be\n // applied after all data silos are created\n dependedOnDataSilos: input['deletion-dependencies'] ? undefined : [{ titles: [] }],\n apiKeyId: input['api-key-title']\n ? apiKeysByTitle[input['api-key-title']].id\n : undefined,\n dataSubjectBlockListIds: input['data-subjects']\n ? convertToDataSubjectBlockList(input['data-subjects'], dataSubjectsByName)\n : undefined,\n attributes: input.attributes,\n businessEntityTitles: input.businessEntityTitles,\n sombraId: input['sombra-id'],\n // AVC settings\n notifyEmailAddress: input['email-settings']?.['notify-email-address'],\n promptAVendorEmailSendFrequency: input['email-settings']?.['send-frequency'],\n promptAVendorEmailSendType: input['email-settings']?.['send-type'],\n promptAVendorEmailIncludeIdentifiersAttachment:\n input['email-settings']?.['include-identifiers-attachment'],\n promptAVendorEmailCompletionLinkType: input['email-settings']?.['completion-link-type'],\n manualWorkRetryFrequency: input['email-settings']?.['manual-work-retry-frequency'],\n })),\n },\n },\n logger,\n });\n logger.info(\n colors.green(\n `[Batch ${ind + 1}/${chunkedUpdates.length}] Synced \"${\n dataSiloUpdateChunk.length\n }\" data silos!`,\n ),\n );\n });\n\n // Sync datapoints\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);\n const dataSilosWithDataPoints = dataSilos.filter(({ datapoints = [] }) => datapoints.length > 0);\n const totalDataPoints = dataSilos\n .map(({ datapoints = [] }) => datapoints.length)\n .reduce((acc, count) => acc + count, 0);\n logger.info(\n colors.magenta(\n `Syncing \"${totalDataPoints}\" datapoints from \"${dataSilosWithDataPoints.length}\" data silos...`,\n ),\n );\n progressBar.start(totalDataPoints, 0);\n let total = 0;\n\n await map(\n dataSilosWithDataPoints,\n async ({ datapoints, title }) => {\n if (datapoints) {\n await mapSeries(datapoints, async (datapoint) => {\n const fields = datapoint.fields\n ? datapoint.fields.map(\n ({ key, description, categories, purposes, attributes, ...rest }) =>\n // TODO: Support setting title separately from the 'key/name'\n ({\n name: key,\n description,\n categories: !categories\n ? undefined\n : categories.map((category) => ({\n ...category,\n name: category.name || 'Other',\n })),\n purposes: !purposes\n ? undefined\n : purposes.map((purpose) => ({\n ...purpose,\n name: purpose.name || 'Other',\n })),\n attributes,\n accessRequestVisibilityEnabled: rest['access-request-visibility-enabled'],\n erasureRequestRedactionEnabled: rest['erasure-request-redaction-enabled'],\n }),\n )\n : undefined;\n\n const payload = {\n dataSiloId: existingDataSiloByTitle[title].id,\n path: datapoint.path,\n name: datapoint.key,\n title: datapoint.title,\n description: datapoint.description,\n ...(datapoint.owners\n ? {\n ownerEmails: datapoint.owners,\n }\n : {}),\n ...(datapoint.teams\n ? {\n teamNames: datapoint.teams,\n }\n : {}),\n ...(datapoint['data-collection-tag']\n ? { dataCollectionTag: datapoint['data-collection-tag'] }\n : {}),\n querySuggestions: !datapoint['privacy-action-queries']\n ? undefined\n : Object.entries(datapoint['privacy-action-queries']).map(([key, value]) => ({\n requestType: key,\n suggestedQuery: value,\n })),\n enabledActions: datapoint['privacy-actions'] || [], // clear out when not specified\n subDataPoints: fields,\n };\n\n // Ensure no duplicate sub-datapoints are provided\n const subDataPointsToUpdate = (payload.subDataPoints || []).map(({ name }) => name);\n const duplicateDataPoints = subDataPointsToUpdate.filter(\n (name, index) => subDataPointsToUpdate.indexOf(name) !== index,\n );\n if (duplicateDataPoints.length > 0) {\n logger.info(\n colors.red(\n `\\nCannot update datapoint \"${\n datapoint.key\n }\" as it has duplicate sub-datapoints with the same name: \\n${duplicateDataPoints.join(\n '\\n',\n )}`,\n ),\n );\n encounteredError = true;\n } else {\n try {\n await makeGraphQLRequest(client, UPDATE_OR_CREATE_DATA_POINT, {\n variables: payload,\n logger,\n });\n } catch (err) {\n logger.info(\n colors.red(\n `\\nFailed to update datapoint \"${datapoint.key}\" for data silo \"${title}\"! - \\n${err.message}`,\n ),\n );\n encounteredError = true;\n }\n }\n total += 1;\n progressBar.update(total);\n });\n }\n },\n {\n concurrency: 10,\n },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Synced \"${dataSilos.length}\" data silos and \"${totalDataPoints}\" datapoints in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n return {\n success: !encounteredError,\n dataSiloTitleToId: apply(existingDataSiloByTitle, ({ id }) => id),\n };\n}\n/* eslint-enable max-lines */\n","import {\n fetchAllActions,\n fetchAllAttributes,\n fetchAllDataSubjects,\n fetchApiKeys,\n fetchIdentifiersAndCreateMissing,\n syncAction,\n syncActionItemCollections,\n syncActionItems,\n syncAttribute,\n syncBusinessEntities,\n syncDataCategories,\n syncConsentManager,\n syncCookies,\n syncDataFlows,\n syncDataSubject,\n syncDataSiloDependencies,\n syncEnricher,\n syncIdentifier,\n syncIntlMessages,\n syncPartitions,\n syncPolicies,\n syncPrivacyCenter,\n syncProcessingActivities,\n syncProcessingPurposes,\n syncConsentWorkflowTriggers,\n syncWorkflowConfigs,\n syncPreferenceOptionValues,\n syncPurposes,\n syncPreferenceTopics,\n syncTeams,\n syncTemplate,\n syncVendors,\n type DependedOnDataSiloInput,\n type Identifier,\n} from '@transcend-io/sdk';\nimport { map, type Logger, type SyncError, type SyncResult } from '@transcend-io/utils';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\n\n/* eslint-disable max-lines */\nimport { TranscendInput, normalizeTranscendInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\nimport { validatePreferenceManagementSlugs } from '../preference-management/validatePreferenceManagementSlugs.js';\nimport { ensureAllDataSubjectsExist } from './ensureAllDataSubjectsExist.js';\nimport { normalizeDeletionDependencies } from './normalizeDeletionDependencies.js';\nimport { syncDataSilos } from './syncDataSilos.js';\n\nconst CONCURRENCY = 10;\n\n/**\n * Sync the yaml input back to Transcend using the GraphQL APIs\n *\n * @param input - The yml input\n * @param client - GraphQL client\n * @param pageSize - Page size\n * @returns Structured sync result with per-resource errors\n */\nexport async function syncConfigurationToTranscend(\n rawInput: TranscendInput,\n client: GraphQLClient,\n {\n pageSize = 50,\n // TODO: https://transcend.height.app/T-23779\n publishToPrivacyCenter = true,\n classifyService = false,\n deleteExtraAttributeValues = false,\n logger: syncLogger,\n warnings = [],\n }: {\n /** Page size */\n pageSize?: number;\n /** When true, skip publishing to privacy center */\n publishToPrivacyCenter?: boolean;\n /** When true, delete any attributes being synced up */\n deleteExtraAttributeValues?: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Optional logger (e.g. collecting logger for MCP debug responses) */\n logger?: Logger;\n /** Non-fatal warnings to include in the result */\n warnings?: string[];\n },\n): Promise<SyncResult> {\n const input = normalizeTranscendInput(rawInput);\n const activeLogger = syncLogger ?? logger;\n const errors: SyncError[] = [];\n let encounteredError = false;\n\n const recordError = (resource: string, message: string, item?: string): void => {\n errors.push({ resource, item, message });\n encounteredError = true;\n };\n\n activeLogger.info(colors.magenta(`Fetching data with page size ${pageSize}...`));\n\n const {\n templates,\n attributes,\n actions,\n identifiers,\n 'data-subjects': dataSubjects,\n 'business-entities': businessEntities,\n preflights,\n cookies,\n 'consent-manager': consentManager,\n 'data-silos': dataSilos,\n 'data-flows': dataFlows,\n vendors,\n 'data-categories': dataCategories,\n 'processing-activities': processingActivities,\n 'processing-purposes': processingPurposes,\n 'action-items': actionItems,\n 'action-item-collections': actionItemCollections,\n teams,\n 'privacy-center': privacyCenter,\n messages,\n policies,\n partitions,\n 'preference-workflow-configs': preferenceWorkflowConfigs,\n 'workflow-configs': workflowConfigs,\n } = input;\n\n const preferenceOptions = input['preference-options'];\n const purposes = input.purposes;\n\n const preferenceSlugErrors = validatePreferenceManagementSlugs(input);\n if (preferenceSlugErrors.length > 0) {\n for (const message of preferenceSlugErrors) {\n recordError('preference-slugs', message);\n }\n return {\n success: false,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n };\n }\n\n const [identifierByName, dataSubjectsByName, apiKeyTitleMap] = await Promise.all([\n // Ensure all identifiers are created and create a map from name -> identifier.id\n preflights || identifiers\n ? fetchIdentifiersAndCreateMissing(client, {\n input,\n skipPublish: !publishToPrivacyCenter,\n logger,\n })\n : ({} as { [k in string]: Identifier }),\n // Grab all data subjects in the organization\n dataSilos || dataSubjects || preflights || processingActivities\n ? ensureAllDataSubjectsExist(input, client)\n : {},\n // Grab API keys\n dataSilos &&\n dataSilos\n .map((dataSilo) => dataSilo['api-key-title'] || [])\n .reduce((acc, lst) => acc + lst.length, 0) > 0\n ? fetchApiKeys(client, { apiKeyInputs: input, logger })\n : {},\n ]);\n\n if (preferenceWorkflowConfigs?.length) {\n const preferenceWorkflowConfigsSuccess = await syncConsentWorkflowTriggers(\n client,\n preferenceWorkflowConfigs,\n {\n logger: activeLogger,\n pageSize,\n },\n );\n if (!preferenceWorkflowConfigsSuccess) {\n recordError('preference-workflow-configs', 'Failed to sync preference workflow configs');\n }\n }\n\n if (workflowConfigs?.length) {\n const workflowConfigsSuccess = await syncWorkflowConfigs(client, workflowConfigs, {\n logger: activeLogger,\n });\n if (!workflowConfigsSuccess) {\n recordError('workflow-configs', 'Failed to sync workflow configs');\n }\n }\n\n if (preferenceOptions?.length) {\n const preferenceOptionsSuccess = await syncPreferenceOptionValues(client, preferenceOptions, {\n logger: activeLogger,\n });\n if (!preferenceOptionsSuccess) {\n recordError('preference-options', 'Failed to sync preference option values');\n }\n }\n\n // Sync consent purposes and their nested preference topics.\n // Order matters: option values (above) exist first, then purposes, then topics\n // (which link to their purpose by ID and to option values by slug).\n if (purposes?.length) {\n const { success: purposesSuccess, purposeIdByTrackingType } = await syncPurposes(\n client,\n purposes,\n { logger: activeLogger },\n );\n if (!purposesSuccess) {\n recordError('purposes', 'Failed to sync one or more purposes');\n }\n\n const topics = purposes.flatMap((purpose) =>\n (purpose['preference-topics'] ?? []).map((topic) => ({\n ...topic,\n 'tracking-type': purpose.trackingType,\n })),\n );\n if (topics.length > 0) {\n const topicsSuccess = await syncPreferenceTopics(client, topics, {\n logger: activeLogger,\n purposeIdByTrackingType,\n });\n if (!topicsSuccess) {\n recordError('preference-topics', 'Failed to sync one or more preference topics');\n }\n }\n }\n\n // Sync consent manager\n if (consentManager) {\n activeLogger.info(colors.magenta('Syncing consent manager...'));\n try {\n await syncConsentManager(client, consentManager, { logger: activeLogger });\n activeLogger.info(colors.green('Successfully synced consent manager!'));\n } catch (err) {\n recordError('consent-manager', (err as Error).message);\n activeLogger.error(colors.red(`Failed to sync consent manager! - ${(err as Error).message}`));\n }\n }\n\n if (teams) {\n const teamsSuccess = await syncTeams(client, teams, { logger });\n encounteredError = encounteredError || !teamsSuccess;\n }\n\n // Sync email templates\n if (templates) {\n logger.info(colors.magenta(`Syncing \"${templates.length}\" email templates...`));\n await map(\n templates,\n async (template) => {\n logger.info(colors.magenta(`Syncing template \"${template.title}\"...`));\n try {\n await syncTemplate(client, template, { logger });\n logger.info(colors.green(`Successfully synced template \"${template.title}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(colors.red(`Failed to sync template \"${template.title}\"! - ${err.message}`));\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${templates.length}\" email templates!`));\n }\n\n // Sync business entities\n if (businessEntities) {\n const businessEntitySuccess = await syncBusinessEntities(client, businessEntities, { logger });\n encounteredError = encounteredError || !businessEntitySuccess;\n }\n\n // Sync vendors\n if (vendors) {\n const vendorsSuccess = await syncVendors(client, vendors, { logger });\n encounteredError = encounteredError || !vendorsSuccess;\n }\n\n // Sync data categories\n if (dataCategories) {\n const dataCategoriesSuccess = await syncDataCategories(client, dataCategories, { logger });\n encounteredError = encounteredError || !dataCategoriesSuccess;\n }\n\n // Sync processing purposes\n if (processingPurposes) {\n const processingPurposesSuccess = await syncProcessingPurposes(client, processingPurposes, {\n logger,\n });\n encounteredError = encounteredError || !processingPurposesSuccess;\n }\n\n // Sync partitions\n if (partitions) {\n const partitionsSuccess = await syncPartitions(client, partitions, { logger });\n encounteredError = encounteredError || !partitionsSuccess;\n }\n\n // Sync cookies\n if (cookies) {\n const cookiesSuccess = await syncCookies(client, cookies, { logger });\n encounteredError = encounteredError || !cookiesSuccess;\n }\n\n // Sync action item collections\n if (actionItemCollections) {\n const actionItemCollectionsSuccess = await syncActionItemCollections(\n client,\n actionItemCollections,\n { logger },\n );\n encounteredError = encounteredError || !actionItemCollectionsSuccess;\n }\n\n // Sync attributes\n if (attributes) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${attributes.length}\" attributes...`));\n const existingAttributes = await fetchAllAttributes(client, { logger });\n await map(\n attributes,\n async (attribute) => {\n const existing = existingAttributes.find((attr) => attr.name === attribute.name);\n\n logger.info(colors.magenta(`Syncing attribute \"${attribute.name}\"...`));\n try {\n await syncAttribute(client, attribute, {\n existingAttribute: existing,\n deleteExtraAttributeValues,\n logger,\n });\n logger.info(colors.green(`Successfully synced attribute \"${attribute.name}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(\n colors.red(`Failed to sync attribute \"${attribute.name}\"! - ${err.message}`),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${attributes.length}\" attributes!`));\n }\n\n // Sync action items\n if (actionItems) {\n const actionItemsSuccess = await syncActionItems(client, actionItems, { logger });\n encounteredError = encounteredError || !actionItemsSuccess;\n }\n\n // Sync preflight checks\n if (preflights) {\n logger.info(colors.magenta(`Syncing \"${preflights.length}\" preflight checks...`));\n await map(\n preflights,\n async (preflight) => {\n logger.info(colors.magenta(`Syncing preflight check \"${preflight.title}\"...`));\n try {\n await syncEnricher(client, {\n input: preflight,\n identifierByName,\n dataSubjectsByName,\n logger,\n });\n logger.info(colors.green(`Successfully synced preflight check \"${preflight.title}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(\n colors.red(`Failed to sync preflight check \"${preflight.title}\"! - ${err.message}`),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${preflights.length}\" preflight checks!`));\n }\n\n // Sync identifiers\n if (identifiers) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${identifiers.length}\" identifiers...`));\n await map(\n identifiers,\n async (identifier) => {\n const existing = identifierByName[identifier.name];\n if (!existing) {\n throw new Error(\n `Failed to find identifier with name: ${identifier.type}. Should have been auto-created by cli.`,\n );\n }\n\n logger.info(colors.magenta(`Syncing identifier \"${identifier.type}\"...`));\n try {\n await syncIdentifier(client, {\n input: identifier,\n dataSubjectsByName,\n identifierId: existing.id,\n skipPublish: !publishToPrivacyCenter,\n logger,\n });\n logger.info(colors.green(`Successfully synced identifier \"${identifier.type}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.info(\n colors.red(`Failed to sync identifier \"${identifier.type}\"! - ${err.message}`),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${identifiers.length}\" identifiers!`));\n }\n\n // Sync actions\n if (actions) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${actions.length}\" actions...`));\n const existingActions = await fetchAllActions(client, { logger });\n await map(\n actions,\n async (action) => {\n const existing = existingActions.find((act) => act.type === action.type);\n if (!existing) {\n throw new Error(\n `Failed to find action with type: ${action.type}. Should have already existing in the organization.`,\n );\n }\n\n logger.info(colors.magenta(`Syncing action \"${action.type}\"...`));\n try {\n await syncAction(\n client,\n {\n action,\n actionId: existing.id,\n skipPublish: !publishToPrivacyCenter,\n },\n { logger },\n );\n logger.info(colors.green(`Successfully synced action \"${action.type}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(colors.red(`Failed to sync action \"${action.type}\"! - ${err.message}`));\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${actions.length}\" actions!`));\n }\n\n // Sync data subjects\n if (dataSubjects) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${dataSubjects.length}\" data subjects...`));\n const existingDataSubjects = await fetchAllDataSubjects(client, { logger });\n await map(\n dataSubjects,\n async (dataSubject) => {\n const existing = existingDataSubjects.find((subj) => subj.type === dataSubject.type);\n if (!existing) {\n throw new Error(\n `Failed to find data subject with type: ${dataSubject.type}. Should have already existing in the organization.`,\n );\n }\n\n logger.info(colors.magenta(`Syncing data subject \"${dataSubject.type}\"...`));\n try {\n await syncDataSubject(client, {\n input: dataSubject,\n dataSubjectId: existing.id,\n skipPublish: !publishToPrivacyCenter,\n logger,\n });\n logger.info(colors.green(`Successfully synced data subject \"${dataSubject.type}\"!`));\n } catch (err) {\n encounteredError = true;\n // supportsAuthorizedAgent is gated on the Authorized Agents feature being\n // enabled for the organization; surface a clearer hint than the raw API error\n const hint =\n dataSubject.supportsAuthorizedAgent !== undefined &&\n /authorized.agent/i.test(err.message)\n ? ' (enable the Authorized Agents feature for this organization before setting \"supportsAuthorizedAgent\")'\n : '';\n logger.info(\n colors.red(\n `Failed to sync data subject \"${dataSubject.type}\"! - ${err.message}${hint}`,\n ),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${dataSubjects.length}\" data subjects!`));\n }\n\n // Sync data flows\n if (dataFlows) {\n const syncedDataFlows = await syncDataFlows(client, dataFlows, { classifyService, logger });\n encounteredError = encounteredError || !syncedDataFlows;\n }\n\n // Sync privacy center\n if (privacyCenter) {\n try {\n const privacyCenterSuccess = await syncPrivacyCenter(client, privacyCenter, {\n logger,\n skipPublish: !publishToPrivacyCenter,\n });\n if (!privacyCenterSuccess) {\n recordError('privacy-center', 'Failed to sync privacy center');\n }\n } catch (err) {\n recordError('privacy-center', (err as Error).message);\n }\n }\n\n // Sync messages\n if (messages) {\n const messagesSuccess = await syncIntlMessages(client, messages, { logger });\n encounteredError = encounteredError || !messagesSuccess;\n }\n\n // Sync policies\n if (policies) {\n const policiesSuccess = await syncPolicies(client, policies, { logger });\n encounteredError = encounteredError || !policiesSuccess;\n }\n\n // Store dependency updates\n const dependencyUpdates: [string, DependedOnDataSiloInput[]][] = [];\n // Sync data silos\n if (dataSilos) {\n const { success, dataSiloTitleToId } = await syncDataSilos(dataSilos, client, {\n dataSubjectsByName,\n apiKeysByTitle: apiKeyTitleMap,\n pageSize,\n });\n dataSilos?.forEach((dataSilo) => {\n // Queue up dependency update\n const dependencies = dataSilo['deletion-dependencies'];\n if (dependencies) {\n try {\n dependencyUpdates.push([\n dataSiloTitleToId[dataSilo.title],\n normalizeDeletionDependencies(dependencies, dataSilo.title),\n ]);\n } catch (err) {\n recordError('data-silos', (err as Error).message, dataSilo.title);\n activeLogger.error(colors.red((err as Error).message));\n }\n }\n });\n encounteredError = encounteredError || !success;\n }\n\n // Dependencies updated at the end after all data silos are created\n if (dependencyUpdates.length > 0) {\n const dependenciesSuccess = await syncDataSiloDependencies(client, {\n input: dependencyUpdates,\n logger,\n });\n encounteredError = encounteredError || !dependenciesSuccess;\n }\n\n // Update processing activities\n if (processingActivities) {\n const processingActivitySuccess = await syncProcessingActivities(client, processingActivities, {\n logger,\n });\n encounteredError = encounteredError || !processingActivitySuccess;\n }\n\n if (publishToPrivacyCenter) {\n // TODO: https://transcend.height.app/T-23779\n }\n\n return {\n success: !encounteredError,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n };\n}\n/* eslint-enable max-lines */\n","import { getEntries } from '@transcend-io/type-utils';\n\nimport { normalizeTranscendInput, TranscendInput } from '../codecs.js';\n\n/**\n * Combine a set of TranscendInput yaml files into a single yaml\n *\n * @param base - Base input\n * @param inputs - The list of inputs\n * @returns Merged input\n */\nexport function mergeTranscendInputs(\n base: TranscendInput,\n ...inputs: TranscendInput[]\n): TranscendInput {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const cloned: any = JSON.parse(JSON.stringify(base));\n inputs.forEach((input) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntries(input).forEach(([key, value]: [any, any]) => {\n if (cloned[key] === undefined) {\n cloned[key] = value;\n } else if (Array.isArray(value)) {\n cloned[key] = [...cloned[key], ...value];\n } else {\n cloned[key] = value;\n }\n });\n });\n return normalizeTranscendInput(cloned);\n}\n"],"mappings":"qyCAGA,MAAa,EAAwB,cAQrC,SAAgB,GAAkC,EAAiC,CACjF,IAAM,EAAmB,EAAE,CAErB,GAAgB,EAAc,IAA0B,CACvD,EAAsB,KAAK,EAAK,EACnC,EAAO,KACL,GAAG,EAAQ,UAAU,EAAK,sNAG3B,EAIL,IA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M,GAAa,EAAQ,EAAU,CAAE,SAAQ,CAAC,CACxE,IAAuC,CAAC,EAI1C,IAAM,EAA2D,EAAE,CAEnE,GAAI,EAAW,CACb,GAAM,CAAE,UAAS,qBAAsB,MAAM,EAAc,EAAW,EAAQ,CAC5E,qBACA,eAAgB,GAChB,WACD,CAAC,CACF,GAAW,QAAS,GAAa,CAE/B,IAAM,EAAe,EAAS,yBAC9B,GAAI,EACF,GAAI,CACF,EAAkB,KAAK,CACrB,EAAkB,EAAS,OAC3B,GAA8B,EAAc,EAAS,MAAM,CAC5D,CAAC,OACK,EAAK,CACZ,EAAY,aAAe,EAAc,QAAS,EAAS,MAAM,CACjE,EAAa,MAAM,EAAO,IAAK,EAAc,QAAQ,CAAC,GAG1D,CACF,IAAuC,CAAC,EAI1C,GAAI,EAAkB,OAAS,EAAG,CAChC,IAAM,EAAsB,MAAM,GAAyB,EAAQ,CACjE,MAAO,EACP,SACD,CAAC,CACF,IAAuC,CAAC,EAI1C,GAAI,EAAsB,CACxB,IAAM,EAA4B,MAAM,GAAyB,EAAQ,EAAsB,CAC7F,SACD,CAAC,CACF,IAAuC,CAAC,EAO1C,MAAO,CACL,QAAS,CAAC,EACV,SACA,SAAU,EAAS,OAAS,EAAI,EAAW,IAAA,GAC5C,CC9jBH,SAAgB,EACd,EACA,GAAG,EACa,CAEhB,IAAM,EAAc,KAAK,MAAM,KAAK,UAAU,EAAK,CAAC,CAapD,OAZA,EAAO,QAAS,GAAU,CAExB,EAAW,EAAM,CAAC,SAAS,CAAC,EAAK,KAAuB,CAClD,EAAO,KAAS,IAAA,GAClB,EAAO,GAAO,EACL,MAAM,QAAQ,EAAM,CAC7B,EAAO,GAAO,CAAC,GAAG,EAAO,GAAM,GAAG,EAAM,CAExC,EAAO,GAAO,GAEhB,EACF,CACK,EAAwB,EAAO"}
|
|
1
|
+
{"version":3,"file":"mergeTranscendInputs-B7WjxYMN.mjs","names":[],"sources":["../src/lib/preference-management/validatePreferenceManagementSlugs.ts","../src/lib/graphql/ensureAllDataSubjectsExist.ts","../src/lib/graphql/normalizeDeletionDependencies.ts","../src/lib/graphql/syncDataSilos.ts","../src/lib/graphql/syncConfigurationToTranscend.ts","../src/lib/mergeTranscendInputs.ts"],"sourcesContent":["import type { TranscendInput } from '../../codecs.js';\n\n/** Slugs for preference topics and option values must be alphabetical letters only. */\nexport const PREFERENCE_SLUG_REGEX = /^[A-Za-z]+$/;\n\n/**\n * Validate preference topic and option value slugs before push.\n *\n * @param input - Parsed transcend.yml input\n * @returns List of validation error messages (empty when valid)\n */\nexport function validatePreferenceManagementSlugs(input: TranscendInput): string[] {\n const errors: string[] = [];\n\n const validateSlug = (slug: string, context: string): void => {\n if (!PREFERENCE_SLUG_REGEX.test(slug)) {\n errors.push(\n `${context}: slug \"${slug}\" is invalid — slugs must contain only alphabetical letters (A-Z, a-z). ` +\n 'Topic slugs are normalized to PascalCase server-side, so YAML slugs should already be PascalCase ' +\n 'or matching will break on subsequent pulls.',\n );\n }\n };\n\n for (const option of input['preference-options'] ?? []) {\n validateSlug(option.slug, 'preference-options');\n }\n\n for (const purpose of input.purposes ?? []) {\n for (const topic of purpose['preference-topics'] ?? []) {\n validateSlug(topic.slug, `purposes (topic \"${topic.title}\")`);\n for (const option of topic.options ?? []) {\n validateSlug(option.slug, `purposes (topic \"${topic.title}\" option \"${option.title}\")`);\n }\n }\n }\n\n return errors;\n}\n","import { createDataSubject, fetchAllDataSubjects, type DataSubject } from '@transcend-io/sdk';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport { keyBy, flatten, uniq, difference } from 'lodash-es';\n\nimport { TranscendInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\n\n/**\n * Fetch all of the data subjects in the organization\n *\n * @param input - Input to fetch\n * @param client - GraphQL client\n * @param fetchAll - When true, always fetch all subjects\n * @returns The list of data subjects\n */\nexport async function ensureAllDataSubjectsExist(\n {\n 'data-silos': dataSilos = [],\n 'data-subjects': dataSubjects = [],\n 'processing-activities': processingActivities = [],\n preflights = [],\n }: TranscendInput,\n client: GraphQLClient,\n fetchAll = false,\n): Promise<{ [type in string]: DataSubject }> {\n const expectedDataSubjects = uniq([\n ...flatten(dataSilos.map((silo) => silo['data-subjects'] || []) || []),\n ...flatten(processingActivities.map(({ dataSubjectTypes }) => dataSubjectTypes ?? []) ?? []),\n ...flatten(preflights.map((preflight) => preflight['data-subjects'] || []) || []),\n ...dataSubjects.map((subject) => subject.type),\n ]);\n if (expectedDataSubjects.length === 0 && !fetchAll) {\n return {};\n }\n\n const internalSubjects = await fetchAllDataSubjects(client, { logger });\n const dataSubjectByName = keyBy(internalSubjects, 'type');\n\n const missingDataSubjects = difference(\n expectedDataSubjects,\n internalSubjects.map(({ type }) => type),\n );\n\n if (missingDataSubjects.length > 0) {\n logger.info(colors.magenta(`Creating ${missingDataSubjects.length} new data subjects...`));\n for (const dataSubjectType of missingDataSubjects) {\n logger.info(colors.magenta(`Creating data subject ${dataSubjectType}...`));\n const created = await createDataSubject(client, { input: dataSubjectType, logger });\n logger.info(colors.green(`Created data subject ${dataSubjectType}!`));\n dataSubjectByName[dataSubjectType] = created;\n }\n }\n\n return dataSubjectByName;\n}\n","import type { DependedOnDataSiloInput } from '@transcend-io/sdk';\nimport { uniq } from 'lodash-es';\n\nimport type { DeletionDependencies, DeletionDependencyInput } from '../../codecs.js';\n\n/**\n * Convert the `deletion-dependencies` entries for a single data silo into the\n * `dependedOnDataSilos` input accepted by the `updateDataSilos` mutation.\n *\n * A list of titles becomes a single global entry. A list of objects may declare\n * at most one global configuration (`{ titles }`) plus per-workflow overrides;\n * workflows that are absent from the list are left untouched.\n *\n * @param dependencies - The `deletion-dependencies` entries from transcend.yml\n * @param dataSiloTitle - Title of the data silo being synced, used in error messages\n * @returns The dependency entries to send to the API\n */\nexport function normalizeDeletionDependencies(\n dependencies: DeletionDependencies,\n dataSiloTitle: string,\n): DependedOnDataSiloInput[] {\n if (dependencies.length === 0) {\n return [];\n }\n\n // Legacy / no-overrides form: a flat list of data silo titles\n if (typeof dependencies[0] === 'string') {\n return [{ titles: uniq(dependencies as string[]) }];\n }\n\n let globalTitles: string[] | undefined;\n const workflowOverrides: DependedOnDataSiloInput[] = [];\n const seenWorkflows = new Set<string>();\n\n /**\n * Record an override for a single workflow, rejecting duplicates before the API does\n * so that the error names the data silo\n *\n * @param workflow - Internal name of the workflow being overridden\n * @param override - Titles or reset flag to send for that workflow\n */\n const addWorkflowOverride = (\n workflow: string,\n override: Omit<DependedOnDataSiloInput, 'workflowConfigInternalName'>,\n ): void => {\n if (seenWorkflows.has(workflow)) {\n throw new Error(\n `Data silo \"${dataSiloTitle}\" has multiple deletion-dependencies entries for workflow ` +\n `\"${workflow}\". Combine them into a single entry.`,\n );\n }\n seenWorkflows.add(workflow);\n workflowOverrides.push({ workflowConfigInternalName: workflow, ...override });\n };\n\n (dependencies as DeletionDependencyInput[]).forEach((dependency) => {\n // io-ts codecs allow extra properties, so this combination decodes cleanly\n // even though the two halves contradict each other\n if ('reset-to-global' in dependency && 'titles' in dependency) {\n throw new Error(\n `Data silo \"${dataSiloTitle}\" has a deletion-dependencies entry for workflow ` +\n `\"${dependency.workflow}\" that sets both \"reset-to-global\" and \"titles\". ` +\n 'Use \"titles: []\" to override the global configuration with no dependencies, ' +\n 'or \"reset-to-global: true\" to fall back to the global configuration.',\n );\n }\n\n if ('reset-to-global' in dependency) {\n addWorkflowOverride(dependency.workflow, { resetToGlobal: true });\n return;\n }\n\n if (dependency.workflow) {\n addWorkflowOverride(dependency.workflow, { titles: dependency.titles });\n return;\n }\n\n if (globalTitles !== undefined) {\n throw new Error(\n `Data silo \"${dataSiloTitle}\" has multiple global deletion-dependencies entries. ` +\n 'Combine them into a single `{ titles: [...] }` entry.',\n );\n }\n globalTitles = dependency.titles;\n });\n\n return [\n ...(globalTitles !== undefined ? [{ titles: uniq(globalTitles) }] : []),\n ...workflowOverrides,\n ];\n}\n","import {\n makeGraphQLRequest,\n ApiKey,\n convertToDataSubjectBlockList,\n type DataSubject,\n fetchAllDataSilos,\n type DataSilo,\n CREATE_DATA_SILOS,\n UPDATE_DATA_SILOS,\n UPDATE_OR_CREATE_DATA_POINT,\n} from '@transcend-io/sdk';\nimport { apply } from '@transcend-io/type-utils';\nimport { mapSeries, map } from '@transcend-io/utils';\n/* eslint-disable max-lines */\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport { chunk, keyBy } from 'lodash-es';\n\nimport { DataSiloInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\n\nconst BATCH_SILOS_LIMIT = 20;\n\n/**\n * Sync a data silo configuration\n *\n * @param dataSilos - Data silos to sync\n * @param client - GraphQL client\n * @param options - Options\n * @returns Data silo info\n */\nexport async function syncDataSilos(\n dataSilos: DataSiloInput[],\n client: GraphQLClient,\n {\n pageSize,\n dataSubjectsByName,\n apiKeysByTitle,\n }: {\n /** Page size */\n pageSize: number;\n /** The data subjects in the organization */\n dataSubjectsByName: { [type in string]: DataSubject };\n /** API key title to API key */\n apiKeysByTitle: { [title in string]: ApiKey };\n },\n): Promise<{\n /** Whether successfully updated */\n success: boolean;\n /** A mapping between data silo title to data silo ID */\n dataSiloTitleToId: { [k in string]: string };\n}> {\n let encounteredError = false;\n\n // Time duration\n const t0 = new Date().getTime();\n logger.info(colors.magenta(`Syncing \"${dataSilos.length}\" data silos...`));\n\n // Determine the set of data silos that already exist\n const existingDataSilos = await fetchAllDataSilos(client, {\n titles: dataSilos.map(({ title }) => title),\n pageSize,\n logger,\n });\n\n // Create a mapping of title -> existing silo, if it exists\n const existingDataSiloByTitle = keyBy<Pick<DataSilo, 'id' | 'title'>>(existingDataSilos, 'title');\n\n // Create new silos that do not exist\n const newDataSiloInputs = dataSilos.filter(({ title }) => !existingDataSiloByTitle[title]);\n if (newDataSiloInputs.length > 0) {\n logger.info(\n colors.magenta(`Creating \"${newDataSiloInputs.length}\" data silos that did not exist...`),\n );\n\n // Batch the creation\n const chunked = chunk(newDataSiloInputs, BATCH_SILOS_LIMIT);\n await mapSeries(chunked, async (dependencyUpdateChunk) => {\n const {\n createDataSilos: { dataSilos },\n } = await makeGraphQLRequest<{\n /** Mutation result */\n createDataSilos: {\n /** New data silos */\n dataSilos: Pick<DataSilo, 'id' | 'title'>[];\n };\n }>(client, CREATE_DATA_SILOS, {\n variables: {\n input: dependencyUpdateChunk.map((input) => ({\n name: input['outer-type'] || input.integrationName,\n title: input.title,\n country: input.country,\n countrySubDivision: input.countrySubDivision,\n sombraId: input['sombra-id'],\n })),\n },\n logger,\n });\n\n // save mapping of title and id\n dataSilos.forEach((silo) => {\n existingDataSiloByTitle[silo.title] = silo;\n });\n });\n\n logger.info(colors.green(`Successfully created \"${newDataSiloInputs.length}\" data silos!`));\n }\n\n // Batch the updates\n const chunkedUpdates = chunk(dataSilos, BATCH_SILOS_LIMIT);\n await mapSeries(chunkedUpdates, async (dataSiloUpdateChunk, ind) => {\n logger.info(\n colors.magenta(\n `[Batch ${ind + 1}/${chunkedUpdates.length}] Syncing \"${\n dataSiloUpdateChunk.length\n }\" data silos`,\n ),\n );\n await makeGraphQLRequest<{\n /** Mutation result */\n updateDataSilos: {\n /** New data silos */\n dataSilos: Pick<DataSilo, 'id' | 'title'>[];\n };\n }>(client, UPDATE_DATA_SILOS, {\n variables: {\n input: {\n dataSilos: dataSiloUpdateChunk.map((input) => ({\n id: existingDataSiloByTitle[input.title].id,\n country: input.country,\n countrySubDivision: input.countrySubDivision,\n url: input.url,\n headers: input.headers,\n description: input.description,\n identifiers: input['identity-keys'],\n isLive: !input.disabled,\n ownerEmails: input.owners,\n teamNames: input.teams,\n // clear out the global config if not specified, otherwise the update needs to be\n // applied after all data silos are created\n dependedOnDataSilos: input['deletion-dependencies'] ? undefined : [{ titles: [] }],\n apiKeyId: input['api-key-title']\n ? apiKeysByTitle[input['api-key-title']].id\n : undefined,\n dataSubjectBlockListIds: input['data-subjects']\n ? convertToDataSubjectBlockList(input['data-subjects'], dataSubjectsByName)\n : undefined,\n attributes: input.attributes,\n businessEntityTitles: input.businessEntityTitles,\n sombraId: input['sombra-id'],\n // AVC settings\n notifyEmailAddress: input['email-settings']?.['notify-email-address'],\n promptAVendorEmailSendFrequency: input['email-settings']?.['send-frequency'],\n promptAVendorEmailSendType: input['email-settings']?.['send-type'],\n promptAVendorEmailIncludeIdentifiersAttachment:\n input['email-settings']?.['include-identifiers-attachment'],\n promptAVendorEmailCompletionLinkType: input['email-settings']?.['completion-link-type'],\n manualWorkRetryFrequency: input['email-settings']?.['manual-work-retry-frequency'],\n })),\n },\n },\n logger,\n });\n logger.info(\n colors.green(\n `[Batch ${ind + 1}/${chunkedUpdates.length}] Synced \"${\n dataSiloUpdateChunk.length\n }\" data silos!`,\n ),\n );\n });\n\n // Sync datapoints\n\n // create a new progress bar instance and use shades_classic theme\n const progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);\n const dataSilosWithDataPoints = dataSilos.filter(({ datapoints = [] }) => datapoints.length > 0);\n const totalDataPoints = dataSilos\n .map(({ datapoints = [] }) => datapoints.length)\n .reduce((acc, count) => acc + count, 0);\n logger.info(\n colors.magenta(\n `Syncing \"${totalDataPoints}\" datapoints from \"${dataSilosWithDataPoints.length}\" data silos...`,\n ),\n );\n progressBar.start(totalDataPoints, 0);\n let total = 0;\n\n await map(\n dataSilosWithDataPoints,\n async ({ datapoints, title }) => {\n if (datapoints) {\n await mapSeries(datapoints, async (datapoint) => {\n const fields = datapoint.fields\n ? datapoint.fields.map(\n ({ key, description, categories, purposes, attributes, ...rest }) =>\n // TODO: Support setting title separately from the 'key/name'\n ({\n name: key,\n description,\n categories: !categories\n ? undefined\n : categories.map((category) => ({\n ...category,\n name: category.name || 'Other',\n })),\n purposes: !purposes\n ? undefined\n : purposes.map((purpose) => ({\n ...purpose,\n name: purpose.name || 'Other',\n })),\n attributes,\n accessRequestVisibilityEnabled: rest['access-request-visibility-enabled'],\n erasureRequestRedactionEnabled: rest['erasure-request-redaction-enabled'],\n }),\n )\n : undefined;\n\n const payload = {\n dataSiloId: existingDataSiloByTitle[title].id,\n path: datapoint.path,\n name: datapoint.key,\n title: datapoint.title,\n description: datapoint.description,\n ...(datapoint.owners\n ? {\n ownerEmails: datapoint.owners,\n }\n : {}),\n ...(datapoint.teams\n ? {\n teamNames: datapoint.teams,\n }\n : {}),\n ...(datapoint['data-collection-tag']\n ? { dataCollectionTag: datapoint['data-collection-tag'] }\n : {}),\n querySuggestions: !datapoint['privacy-action-queries']\n ? undefined\n : Object.entries(datapoint['privacy-action-queries']).map(([key, value]) => ({\n requestType: key,\n suggestedQuery: value,\n })),\n enabledActions: datapoint['privacy-actions'] || [], // clear out when not specified\n subDataPoints: fields,\n };\n\n // Ensure no duplicate sub-datapoints are provided\n const subDataPointsToUpdate = (payload.subDataPoints || []).map(({ name }) => name);\n const duplicateDataPoints = subDataPointsToUpdate.filter(\n (name, index) => subDataPointsToUpdate.indexOf(name) !== index,\n );\n if (duplicateDataPoints.length > 0) {\n logger.info(\n colors.red(\n `\\nCannot update datapoint \"${\n datapoint.key\n }\" as it has duplicate sub-datapoints with the same name: \\n${duplicateDataPoints.join(\n '\\n',\n )}`,\n ),\n );\n encounteredError = true;\n } else {\n try {\n await makeGraphQLRequest(client, UPDATE_OR_CREATE_DATA_POINT, {\n variables: payload,\n logger,\n });\n } catch (err) {\n logger.info(\n colors.red(\n `\\nFailed to update datapoint \"${datapoint.key}\" for data silo \"${title}\"! - \\n${err.message}`,\n ),\n );\n encounteredError = true;\n }\n }\n total += 1;\n progressBar.update(total);\n });\n }\n },\n {\n concurrency: 10,\n },\n );\n\n progressBar.stop();\n const t1 = new Date().getTime();\n const totalTime = t1 - t0;\n\n logger.info(\n colors.green(\n `Synced \"${dataSilos.length}\" data silos and \"${totalDataPoints}\" datapoints in \"${\n totalTime / 1000\n }\" seconds!`,\n ),\n );\n return {\n success: !encounteredError,\n dataSiloTitleToId: apply(existingDataSiloByTitle, ({ id }) => id),\n };\n}\n/* eslint-enable max-lines */\n","import {\n fetchAllActions,\n fetchAllAttributes,\n fetchAllDataSubjects,\n fetchApiKeys,\n fetchIdentifiersAndCreateMissing,\n syncAction,\n syncActionItemCollections,\n syncActionItems,\n syncAttribute,\n syncBusinessEntities,\n syncDataCategories,\n syncConsentManager,\n syncCookies,\n syncDataFlows,\n syncDataSubject,\n syncDataSiloDependencies,\n syncEnricher,\n syncIdentifier,\n syncIntlMessages,\n syncPartitions,\n syncPolicies,\n syncPrivacyCenter,\n syncProcessingActivities,\n syncProcessingPurposes,\n syncConsentWorkflowTriggers,\n syncWorkflowConfigs,\n syncPreferenceOptionValues,\n syncPurposes,\n syncPreferenceTopics,\n syncTeams,\n syncTemplate,\n syncVendors,\n type DependedOnDataSiloInput,\n type Identifier,\n} from '@transcend-io/sdk';\nimport { map, type Logger, type SyncError, type SyncResult } from '@transcend-io/utils';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\n\n/* eslint-disable max-lines */\nimport { TranscendInput, normalizeTranscendInput } from '../../codecs.js';\nimport { logger } from '../../logger.js';\nimport { validatePreferenceManagementSlugs } from '../preference-management/validatePreferenceManagementSlugs.js';\nimport { ensureAllDataSubjectsExist } from './ensureAllDataSubjectsExist.js';\nimport { normalizeDeletionDependencies } from './normalizeDeletionDependencies.js';\nimport { syncDataSilos } from './syncDataSilos.js';\n\nconst CONCURRENCY = 10;\n\n/**\n * Sync the yaml input back to Transcend using the GraphQL APIs\n *\n * @param input - The yml input\n * @param client - GraphQL client\n * @param pageSize - Page size\n * @returns Structured sync result with per-resource errors\n */\nexport async function syncConfigurationToTranscend(\n rawInput: TranscendInput,\n client: GraphQLClient,\n {\n pageSize = 50,\n // TODO: https://transcend.height.app/T-23779\n publishToPrivacyCenter = true,\n classifyService = false,\n deleteExtraAttributeValues = false,\n logger: syncLogger,\n warnings = [],\n }: {\n /** Page size */\n pageSize?: number;\n /** When true, skip publishing to privacy center */\n publishToPrivacyCenter?: boolean;\n /** When true, delete any attributes being synced up */\n deleteExtraAttributeValues?: boolean;\n /** classify data flow service if missing */\n classifyService?: boolean;\n /** Optional logger (e.g. collecting logger for MCP debug responses) */\n logger?: Logger;\n /** Non-fatal warnings to include in the result */\n warnings?: string[];\n },\n): Promise<SyncResult> {\n const input = normalizeTranscendInput(rawInput);\n const activeLogger = syncLogger ?? logger;\n const errors: SyncError[] = [];\n let encounteredError = false;\n\n const recordError = (resource: string, message: string, item?: string): void => {\n errors.push({ resource, item, message });\n encounteredError = true;\n };\n\n activeLogger.info(colors.magenta(`Fetching data with page size ${pageSize}...`));\n\n const {\n templates,\n attributes,\n actions,\n identifiers,\n 'data-subjects': dataSubjects,\n 'business-entities': businessEntities,\n preflights,\n cookies,\n 'consent-manager': consentManager,\n 'data-silos': dataSilos,\n 'data-flows': dataFlows,\n vendors,\n 'data-categories': dataCategories,\n 'processing-activities': processingActivities,\n 'processing-purposes': processingPurposes,\n 'action-items': actionItems,\n 'action-item-collections': actionItemCollections,\n teams,\n 'privacy-center': privacyCenter,\n messages,\n policies,\n partitions,\n 'preference-workflow-configs': preferenceWorkflowConfigs,\n 'workflow-configs': workflowConfigs,\n } = input;\n\n const preferenceOptions = input['preference-options'];\n const purposes = input.purposes;\n\n const preferenceSlugErrors = validatePreferenceManagementSlugs(input);\n if (preferenceSlugErrors.length > 0) {\n for (const message of preferenceSlugErrors) {\n recordError('preference-slugs', message);\n }\n return {\n success: false,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n };\n }\n\n const [identifierByName, dataSubjectsByName, apiKeyTitleMap] = await Promise.all([\n // Ensure all identifiers are created and create a map from name -> identifier.id\n preflights || identifiers\n ? fetchIdentifiersAndCreateMissing(client, {\n input,\n skipPublish: !publishToPrivacyCenter,\n logger,\n })\n : ({} as { [k in string]: Identifier }),\n // Grab all data subjects in the organization\n dataSilos || dataSubjects || preflights || processingActivities\n ? ensureAllDataSubjectsExist(input, client)\n : {},\n // Grab API keys\n dataSilos &&\n dataSilos\n .map((dataSilo) => dataSilo['api-key-title'] || [])\n .reduce((acc, lst) => acc + lst.length, 0) > 0\n ? fetchApiKeys(client, { apiKeyInputs: input, logger })\n : {},\n ]);\n\n if (preferenceWorkflowConfigs?.length) {\n const preferenceWorkflowConfigsSuccess = await syncConsentWorkflowTriggers(\n client,\n preferenceWorkflowConfigs,\n {\n logger: activeLogger,\n pageSize,\n },\n );\n if (!preferenceWorkflowConfigsSuccess) {\n recordError('preference-workflow-configs', 'Failed to sync preference workflow configs');\n }\n }\n\n if (workflowConfigs?.length) {\n const workflowConfigsSuccess = await syncWorkflowConfigs(client, workflowConfigs, {\n logger: activeLogger,\n });\n if (!workflowConfigsSuccess) {\n recordError('workflow-configs', 'Failed to sync workflow configs');\n }\n }\n\n if (preferenceOptions?.length) {\n const preferenceOptionsSuccess = await syncPreferenceOptionValues(client, preferenceOptions, {\n logger: activeLogger,\n });\n if (!preferenceOptionsSuccess) {\n recordError('preference-options', 'Failed to sync preference option values');\n }\n }\n\n // Sync consent purposes and their nested preference topics.\n // Order matters: option values (above) exist first, then purposes, then topics\n // (which link to their purpose by ID and to option values by slug).\n if (purposes?.length) {\n const { success: purposesSuccess, purposeIdByTrackingType } = await syncPurposes(\n client,\n purposes,\n { logger: activeLogger },\n );\n if (!purposesSuccess) {\n recordError('purposes', 'Failed to sync one or more purposes');\n }\n\n const topics = purposes.flatMap((purpose) =>\n (purpose['preference-topics'] ?? []).map((topic) => ({\n ...topic,\n 'tracking-type': purpose.trackingType,\n })),\n );\n if (topics.length > 0) {\n const topicsSuccess = await syncPreferenceTopics(client, topics, {\n logger: activeLogger,\n purposeIdByTrackingType,\n });\n if (!topicsSuccess) {\n recordError('preference-topics', 'Failed to sync one or more preference topics');\n }\n }\n }\n\n // Sync consent manager\n if (consentManager) {\n activeLogger.info(colors.magenta('Syncing consent manager...'));\n try {\n await syncConsentManager(client, consentManager, { logger: activeLogger });\n activeLogger.info(colors.green('Successfully synced consent manager!'));\n } catch (err) {\n recordError('consent-manager', (err as Error).message);\n activeLogger.error(colors.red(`Failed to sync consent manager! - ${(err as Error).message}`));\n }\n }\n\n if (teams) {\n const teamsSuccess = await syncTeams(client, teams, { logger });\n encounteredError = encounteredError || !teamsSuccess;\n }\n\n // Sync email templates\n if (templates) {\n logger.info(colors.magenta(`Syncing \"${templates.length}\" email templates...`));\n await map(\n templates,\n async (template) => {\n logger.info(colors.magenta(`Syncing template \"${template.title}\"...`));\n try {\n await syncTemplate(client, template, { logger });\n logger.info(colors.green(`Successfully synced template \"${template.title}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(colors.red(`Failed to sync template \"${template.title}\"! - ${err.message}`));\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${templates.length}\" email templates!`));\n }\n\n // Sync business entities\n if (businessEntities) {\n const businessEntitySuccess = await syncBusinessEntities(client, businessEntities, { logger });\n encounteredError = encounteredError || !businessEntitySuccess;\n }\n\n // Sync vendors\n if (vendors) {\n const vendorsSuccess = await syncVendors(client, vendors, { logger });\n encounteredError = encounteredError || !vendorsSuccess;\n }\n\n // Sync data categories\n if (dataCategories) {\n const dataCategoriesSuccess = await syncDataCategories(client, dataCategories, { logger });\n encounteredError = encounteredError || !dataCategoriesSuccess;\n }\n\n // Sync processing purposes\n if (processingPurposes) {\n const processingPurposesSuccess = await syncProcessingPurposes(client, processingPurposes, {\n logger,\n });\n encounteredError = encounteredError || !processingPurposesSuccess;\n }\n\n // Sync partitions\n if (partitions) {\n const partitionsSuccess = await syncPartitions(client, partitions, { logger });\n encounteredError = encounteredError || !partitionsSuccess;\n }\n\n // Sync cookies\n if (cookies) {\n const cookiesSuccess = await syncCookies(client, cookies, { logger });\n encounteredError = encounteredError || !cookiesSuccess;\n }\n\n // Sync action item collections\n if (actionItemCollections) {\n const actionItemCollectionsSuccess = await syncActionItemCollections(\n client,\n actionItemCollections,\n { logger },\n );\n encounteredError = encounteredError || !actionItemCollectionsSuccess;\n }\n\n // Sync attributes\n if (attributes) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${attributes.length}\" attributes...`));\n const existingAttributes = await fetchAllAttributes(client, { logger });\n await map(\n attributes,\n async (attribute) => {\n const existing = existingAttributes.find((attr) => attr.name === attribute.name);\n\n logger.info(colors.magenta(`Syncing attribute \"${attribute.name}\"...`));\n try {\n await syncAttribute(client, attribute, {\n existingAttribute: existing,\n deleteExtraAttributeValues,\n logger,\n });\n logger.info(colors.green(`Successfully synced attribute \"${attribute.name}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(\n colors.red(`Failed to sync attribute \"${attribute.name}\"! - ${err.message}`),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${attributes.length}\" attributes!`));\n }\n\n // Sync action items\n if (actionItems) {\n const actionItemsSuccess = await syncActionItems(client, actionItems, { logger });\n encounteredError = encounteredError || !actionItemsSuccess;\n }\n\n // Sync preflight checks\n if (preflights) {\n logger.info(colors.magenta(`Syncing \"${preflights.length}\" preflight checks...`));\n await map(\n preflights,\n async (preflight) => {\n logger.info(colors.magenta(`Syncing preflight check \"${preflight.title}\"...`));\n try {\n await syncEnricher(client, {\n input: preflight,\n identifierByName,\n dataSubjectsByName,\n logger,\n });\n logger.info(colors.green(`Successfully synced preflight check \"${preflight.title}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(\n colors.red(`Failed to sync preflight check \"${preflight.title}\"! - ${err.message}`),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${preflights.length}\" preflight checks!`));\n }\n\n // Sync identifiers\n if (identifiers) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${identifiers.length}\" identifiers...`));\n await map(\n identifiers,\n async (identifier) => {\n const existing = identifierByName[identifier.name];\n if (!existing) {\n throw new Error(\n `Failed to find identifier with name: ${identifier.type}. Should have been auto-created by cli.`,\n );\n }\n\n logger.info(colors.magenta(`Syncing identifier \"${identifier.type}\"...`));\n try {\n await syncIdentifier(client, {\n input: identifier,\n dataSubjectsByName,\n identifierId: existing.id,\n skipPublish: !publishToPrivacyCenter,\n logger,\n });\n logger.info(colors.green(`Successfully synced identifier \"${identifier.type}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.info(\n colors.red(`Failed to sync identifier \"${identifier.type}\"! - ${err.message}`),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${identifiers.length}\" identifiers!`));\n }\n\n // Sync actions\n if (actions) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${actions.length}\" actions...`));\n const existingActions = await fetchAllActions(client, { logger });\n await map(\n actions,\n async (action) => {\n const existing = existingActions.find((act) => act.type === action.type);\n if (!existing) {\n throw new Error(\n `Failed to find action with type: ${action.type}. Should have already existing in the organization.`,\n );\n }\n\n logger.info(colors.magenta(`Syncing action \"${action.type}\"...`));\n try {\n await syncAction(\n client,\n {\n action,\n actionId: existing.id,\n skipPublish: !publishToPrivacyCenter,\n },\n { logger },\n );\n logger.info(colors.green(`Successfully synced action \"${action.type}\"!`));\n } catch (err) {\n encounteredError = true;\n logger.error(colors.red(`Failed to sync action \"${action.type}\"! - ${err.message}`));\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${actions.length}\" actions!`));\n }\n\n // Sync data subjects\n if (dataSubjects) {\n // Fetch existing\n logger.info(colors.magenta(`Syncing \"${dataSubjects.length}\" data subjects...`));\n const existingDataSubjects = await fetchAllDataSubjects(client, { logger });\n await map(\n dataSubjects,\n async (dataSubject) => {\n const existing = existingDataSubjects.find((subj) => subj.type === dataSubject.type);\n if (!existing) {\n throw new Error(\n `Failed to find data subject with type: ${dataSubject.type}. Should have already existing in the organization.`,\n );\n }\n\n logger.info(colors.magenta(`Syncing data subject \"${dataSubject.type}\"...`));\n try {\n await syncDataSubject(client, {\n input: dataSubject,\n dataSubjectId: existing.id,\n skipPublish: !publishToPrivacyCenter,\n logger,\n });\n logger.info(colors.green(`Successfully synced data subject \"${dataSubject.type}\"!`));\n } catch (err) {\n encounteredError = true;\n // supportsAuthorizedAgent is gated on the Authorized Agents feature being\n // enabled for the organization; surface a clearer hint than the raw API error\n const hint =\n dataSubject.supportsAuthorizedAgent !== undefined &&\n /authorized.agent/i.test(err.message)\n ? ' (enable the Authorized Agents feature for this organization before setting \"supportsAuthorizedAgent\")'\n : '';\n logger.info(\n colors.red(\n `Failed to sync data subject \"${dataSubject.type}\"! - ${err.message}${hint}`,\n ),\n );\n }\n },\n {\n concurrency: CONCURRENCY,\n },\n );\n logger.info(colors.green(`Synced \"${dataSubjects.length}\" data subjects!`));\n }\n\n // Sync data flows\n if (dataFlows) {\n const syncedDataFlows = await syncDataFlows(client, dataFlows, { classifyService, logger });\n encounteredError = encounteredError || !syncedDataFlows;\n }\n\n // Sync privacy center\n if (privacyCenter) {\n try {\n const privacyCenterSuccess = await syncPrivacyCenter(client, privacyCenter, {\n logger,\n skipPublish: !publishToPrivacyCenter,\n });\n if (!privacyCenterSuccess) {\n recordError('privacy-center', 'Failed to sync privacy center');\n }\n } catch (err) {\n recordError('privacy-center', (err as Error).message);\n }\n }\n\n // Sync messages\n if (messages) {\n const messagesSuccess = await syncIntlMessages(client, messages, { logger });\n encounteredError = encounteredError || !messagesSuccess;\n }\n\n // Sync policies\n if (policies) {\n const policiesSuccess = await syncPolicies(client, policies, { logger });\n encounteredError = encounteredError || !policiesSuccess;\n }\n\n // Store dependency updates\n const dependencyUpdates: [string, DependedOnDataSiloInput[]][] = [];\n // Sync data silos\n if (dataSilos) {\n const { success, dataSiloTitleToId } = await syncDataSilos(dataSilos, client, {\n dataSubjectsByName,\n apiKeysByTitle: apiKeyTitleMap,\n pageSize,\n });\n dataSilos?.forEach((dataSilo) => {\n // Queue up dependency update\n const dependencies = dataSilo['deletion-dependencies'];\n if (dependencies) {\n try {\n dependencyUpdates.push([\n dataSiloTitleToId[dataSilo.title],\n normalizeDeletionDependencies(dependencies, dataSilo.title),\n ]);\n } catch (err) {\n recordError('data-silos', (err as Error).message, dataSilo.title);\n activeLogger.error(colors.red((err as Error).message));\n }\n }\n });\n encounteredError = encounteredError || !success;\n }\n\n // Dependencies updated at the end after all data silos are created\n if (dependencyUpdates.length > 0) {\n const dependenciesSuccess = await syncDataSiloDependencies(client, {\n input: dependencyUpdates,\n logger,\n });\n encounteredError = encounteredError || !dependenciesSuccess;\n }\n\n // Update processing activities\n if (processingActivities) {\n const processingActivitySuccess = await syncProcessingActivities(client, processingActivities, {\n logger,\n });\n encounteredError = encounteredError || !processingActivitySuccess;\n }\n\n if (publishToPrivacyCenter) {\n // TODO: https://transcend.height.app/T-23779\n }\n\n return {\n success: !encounteredError,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n };\n}\n/* eslint-enable max-lines */\n","import { getEntries } from '@transcend-io/type-utils';\n\nimport { normalizeTranscendInput, TranscendInput } from '../codecs.js';\n\n/**\n * Combine a set of TranscendInput yaml files into a single yaml\n *\n * @param base - Base input\n * @param inputs - The list of inputs\n * @returns Merged input\n */\nexport function mergeTranscendInputs(\n base: TranscendInput,\n ...inputs: TranscendInput[]\n): TranscendInput {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const cloned: any = JSON.parse(JSON.stringify(base));\n inputs.forEach((input) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getEntries(input).forEach(([key, value]: [any, any]) => {\n if (cloned[key] === undefined) {\n cloned[key] = value;\n } else if (Array.isArray(value)) {\n cloned[key] = [...cloned[key], ...value];\n } else {\n cloned[key] = value;\n }\n });\n });\n return normalizeTranscendInput(cloned);\n}\n"],"mappings":"qyCAGA,MAAa,EAAwB,cAQrC,SAAgB,GAAkC,EAAiC,CACjF,IAAM,EAAmB,EAAE,CAErB,GAAgB,EAAc,IAA0B,CACvD,EAAsB,KAAK,EAAK,EACnC,EAAO,KACL,GAAG,EAAQ,UAAU,EAAK,sNAG3B,EAIL,IAAK,IAAM,KAAU,EAAM,uBAAyB,EAAE,CACpD,EAAa,EAAO,KAAM,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EAI1C,IAAM,EAA2D,EAAE,CAEnE,GAAI,EAAW,CACb,GAAM,CAAE,UAAS,qBAAsB,MAAM,EAAc,EAAW,EAAQ,CAC5E,qBACA,eAAgB,GAChB,WACD,CAAC,CACF,GAAW,QAAS,GAAa,CAE/B,IAAM,EAAe,EAAS,yBAC9B,GAAI,EACF,GAAI,CACF,EAAkB,KAAK,CACrB,EAAkB,EAAS,OAC3B,GAA8B,EAAc,EAAS,MAAM,CAC5D,CAAC,OACK,EAAK,CACZ,EAAY,aAAe,EAAc,QAAS,EAAS,MAAM,CACjE,EAAa,MAAM,EAAO,IAAK,EAAc,QAAQ,CAAC,GAG1D,CACF,IAAuC,CAAC,EAI1C,GAAI,EAAkB,OAAS,EAAG,CAChC,IAAM,EAAsB,MAAM,GAAyB,EAAQ,CACjE,MAAO,EACP,SACD,CAAC,CACF,IAAuC,CAAC,EAI1C,GAAI,EAAsB,CACxB,IAAM,EAA4B,MAAM,GAAyB,EAAQ,EAAsB,CAC7F,SACD,CAAC,CACF,IAAuC,CAAC,EAO1C,MAAO,CACL,QAAS,CAAC,EACV,SACA,SAAU,EAAS,OAAS,EAAI,EAAW,IAAA,GAC5C,CC9jBH,SAAgB,EACd,EACA,GAAG,EACa,CAEhB,IAAM,EAAc,KAAK,MAAM,KAAK,UAAU,EAAK,CAAC,CAapD,OAZA,EAAO,QAAS,GAAU,CAExB,EAAW,EAAM,CAAC,SAAS,CAAC,EAAK,KAAuB,CAClD,EAAO,KAAS,IAAA,GAClB,EAAO,GAAO,EACL,MAAM,QAAQ,EAAM,CAC7B,EAAO,GAAO,CAAC,GAAG,EAAO,GAAM,GAAG,EAAM,CAExC,EAAO,GAAO,GAEhB,EACF,CACK,EAAwB,EAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./constants-
|
|
2
|
-
//# sourceMappingURL=notifyPrivacyRequestsAdditionalTime-
|
|
1
|
+
import{a as e}from"./constants-BCmVqlrM.mjs";import{t}from"./logger-CPu6zbyQ.mjs";import{r as n}from"./request-BpKyN9Xm.mjs";import{r}from"./fetchAllRequests-BI0tFl_a.mjs";import{RequestAction as i}from"@transcend-io/privacy-types";import a from"colors";import{map as o}from"@transcend-io/utils";import{buildTranscendGraphQLClient as s,fetchAllTemplates as c,makeGraphQLRequest as l}from"@transcend-io/sdk";import u from"cli-progress";async function d({requestActions:d=Object.values(i),auth:f,requestIds:p,createdAtBefore:m,days:h=45,daysLeft:g=10,createdAtAfter:_,updatedAtBefore:v,updatedAtAfter:y,emailTemplate:b=`Additional Time Needed`,concurrency:x=100,transcendUrl:S=e}){let C=s(S,f),w=new Date().getTime(),T=new u.SingleBar({},u.Presets.shades_classic),E=(await c(C,{logger:t,filterBy:{title:b}})).find(e=>e.title===b);if(!E)throw Error(`Failed to find a template with title: "${b}"`);let D=await r(C,{actions:d,createdAtBefore:m,createdAtAfter:_,updatedAtBefore:v,updatedAtAfter:y,isSilent:!1,isClosed:!1,requestIds:p});D=D.filter(e=>typeof e.daysRemaining==`number`&&e.daysRemaining<g),t.info(a.magenta(`Notifying "${D.length}" that more time is needed.`));let O=0;T.start(D.length,0),await o(D,async e=>{await l(C,n,{variables:{input:{requestId:e.id,template:E.template.defaultMessage,subject:E.subject.defaultMessage,additionalTime:h}},logger:t}),O+=1,T.update(O)},{concurrency:x}),T.stop();let k=new Date().getTime()-w;return t.info(a.green(`Successfully marked ${O} requests as silent mode in "${k/1e3}" seconds!`)),D.length}export{d as t};
|
|
2
|
+
//# sourceMappingURL=notifyPrivacyRequestsAdditionalTime-BWsm5Y5K.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifyPrivacyRequestsAdditionalTime-
|
|
1
|
+
{"version":3,"file":"notifyPrivacyRequestsAdditionalTime-BWsm5Y5K.mjs","names":[],"sources":["../src/lib/requests/notifyPrivacyRequestsAdditionalTime.ts"],"sourcesContent":["import { RequestAction } from '@transcend-io/privacy-types';\nimport {\n buildTranscendGraphQLClient,\n fetchAllTemplates,\n makeGraphQLRequest,\n} from '@transcend-io/sdk';\nimport { map } from '@transcend-io/utils';\nimport cliProgress from 'cli-progress';\nimport colors from 'colors';\n\nimport { DEFAULT_TRANSCEND_API } from '../../constants.js';\nimport { logger } from '../../logger.js';\nimport { NOTIFY_ADDITIONAL_TIME, fetchAllRequests } from '../graphql/index.js';\n\n/**\n * Mark a set of privacy requests to be in silent mode.\n * Note requests in silent mode are ignored\n *\n * @param options - Options\n * @returns The number of requests marked silent\n */\nexport async function notifyPrivacyRequestsAdditionalTime({\n requestActions = Object.values(RequestAction),\n auth,\n requestIds,\n createdAtBefore,\n days = 45,\n daysLeft = 10,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n emailTemplate = 'Additional Time Needed',\n concurrency = 100,\n transcendUrl = DEFAULT_TRANSCEND_API,\n}: {\n /** The request actions that should be restarted */\n requestActions?: RequestAction[];\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 /** Email template */\n emailTemplate?: string;\n /** Transcend API key authentication */\n auth: string;\n /** Number of days to extend request by */\n days?: number;\n /**\n * Only notify requests that have less than this number of days until they are considered expired.\n * This allows for re-running the command without notifying the same users multiple times\n */\n daysLeft?: number;\n /** Concurrency limit for approving */\n concurrency?: number;\n /** The set of privacy requests to notify */\n requestIds?: string[];\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 // Grab the template with that title\n const matchingTemplates = await fetchAllTemplates(client, {\n logger,\n filterBy: { title: emailTemplate },\n });\n const exactTemplateMatch = matchingTemplates.find((template) => template.title === emailTemplate);\n if (!exactTemplateMatch) {\n throw new Error(`Failed to find a template with title: \"${emailTemplate}\"`);\n }\n\n // Pull in the requests\n let allRequests = await fetchAllRequests(client, {\n actions: requestActions,\n createdAtBefore,\n createdAtAfter,\n updatedAtBefore,\n updatedAtAfter,\n isSilent: false,\n isClosed: false,\n requestIds,\n });\n\n // Filter requests by daysLeft\n allRequests = allRequests.filter(\n (request) => typeof request.daysRemaining === 'number' && request.daysRemaining < daysLeft,\n );\n\n // Notify Transcend\n logger.info(colors.magenta(`Notifying \"${allRequests.length}\" that more time is needed.`));\n\n let total = 0;\n progressBar.start(allRequests.length, 0);\n await map(\n allRequests,\n async (requestToNotify) => {\n await makeGraphQLRequest(client, NOTIFY_ADDITIONAL_TIME, {\n variables: {\n input: {\n requestId: requestToNotify.id,\n template: exactTemplateMatch.template.defaultMessage,\n subject: exactTemplateMatch.subject.defaultMessage,\n additionalTime: days,\n },\n },\n logger,\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":"mbAqBA,eAAsB,EAAoC,CACxD,iBAAiB,OAAO,OAAO,EAAc,CAC7C,OACA,aACA,kBACA,OAAO,GACP,WAAW,GACX,iBACA,kBACA,iBACA,gBAAgB,yBAChB,cAAc,IACd,eAAe,GA6BG,CAElB,IAAM,EAAS,EAA4B,EAAc,EAAK,CAGxD,EAAK,IAAI,MAAM,CAAC,SAAS,CAEzB,EAAc,IAAI,EAAY,UAAU,EAAE,CAAE,EAAY,QAAQ,eAAe,CAO/E,GAAqB,MAJK,EAAkB,EAAQ,CACxD,SACA,SAAU,CAAE,MAAO,EAAe,CACnC,CAAC,EAC2C,KAAM,GAAa,EAAS,QAAU,EAAc,CACjG,GAAI,CAAC,EACH,MAAU,MAAM,0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