@transcend-io/cli 10.21.0 → 10.22.0
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 +88 -76
- package/dist/{app-D29TqW_A.mjs → app-k7HdVTDP.mjs} +18 -18
- package/dist/{app-D29TqW_A.mjs.map → app-k7HdVTDP.mjs.map} +1 -1
- package/dist/{approvePrivacyRequests-BjjUp-hw.mjs → approvePrivacyRequests-ChRsPJuq.mjs} +2 -2
- package/dist/{approvePrivacyRequests-BjjUp-hw.mjs.map → approvePrivacyRequests-ChRsPJuq.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-2xaj8FoK.mjs → buildExamples-DVJjTfkL.mjs} +2 -2
- package/dist/{buildExamples-2xaj8FoK.mjs.map → buildExamples-DVJjTfkL.mjs.map} +1 -1
- package/dist/{buildXdiSyncEndpoint-ozQ3T4Hj.mjs → buildXdiSyncEndpoint-CsT_eIC0.mjs} +2 -2
- package/dist/{buildXdiSyncEndpoint-ozQ3T4Hj.mjs.map → buildXdiSyncEndpoint-CsT_eIC0.mjs.map} +1 -1
- package/dist/{bulkRestartRequests-c29oH5GC.mjs → bulkRestartRequests-D_rkhYHP.mjs} +2 -2
- package/dist/{bulkRestartRequests-c29oH5GC.mjs.map → bulkRestartRequests-D_rkhYHP.mjs.map} +1 -1
- package/dist/{bulkRetryEnrichers-i3oFHWx-.mjs → bulkRetryEnrichers-B7Y2L-9j.mjs} +2 -2
- package/dist/{bulkRetryEnrichers-i3oFHWx-.mjs.map → bulkRetryEnrichers-B7Y2L-9j.mjs.map} +1 -1
- package/dist/{cancelPrivacyRequests-B4IzmRWC.mjs → cancelPrivacyRequests-DQ0FGpFC.mjs} +2 -2
- package/dist/{cancelPrivacyRequests-B4IzmRWC.mjs.map → cancelPrivacyRequests-DQ0FGpFC.mjs.map} +1 -1
- package/dist/codecs-_SjJhduF.mjs +2 -0
- package/dist/codecs-_SjJhduF.mjs.map +1 -0
- package/dist/{command-DOo9vOei.mjs → command-Br4qaCbe.mjs} +2 -2
- package/dist/{command-DOo9vOei.mjs.map → command-Br4qaCbe.mjs.map} +1 -1
- package/dist/constants-CL4uZK_i.mjs +2 -0
- package/dist/constants-CL4uZK_i.mjs.map +1 -0
- package/dist/{createExtraKeyHandler-JtWqC00U.mjs → createExtraKeyHandler-Dmf3seLV.mjs} +2 -2
- package/dist/{createExtraKeyHandler-JtWqC00U.mjs.map → createExtraKeyHandler-Dmf3seLV.mjs.map} +1 -1
- package/dist/{downloadPrivacyRequestFiles-CIxwRWnH.mjs → downloadPrivacyRequestFiles-DZWJnqvZ.mjs} +2 -2
- package/dist/{downloadPrivacyRequestFiles-CIxwRWnH.mjs.map → downloadPrivacyRequestFiles-DZWJnqvZ.mjs.map} +1 -1
- package/dist/{enums-D53y231X.mjs → enums-BymyVyqr.mjs} +2 -2
- package/dist/enums-BymyVyqr.mjs.map +1 -0
- package/dist/{generateCrossAccountApiKeys-qw686-vX.mjs → generateCrossAccountApiKeys-BB_mGI0h.mjs} +2 -2
- package/dist/{generateCrossAccountApiKeys-qw686-vX.mjs.map → generateCrossAccountApiKeys-BB_mGI0h.mjs.map} +1 -1
- package/dist/{impl-C5jWisyQ.mjs → impl-B1-zg8Ki.mjs} +2 -2
- package/dist/{impl-C5jWisyQ.mjs.map → impl-B1-zg8Ki.mjs.map} +1 -1
- package/dist/{impl-ChV4laNE.mjs → impl-BFxef_1i.mjs} +2 -2
- package/dist/{impl-ChV4laNE.mjs.map → impl-BFxef_1i.mjs.map} +1 -1
- package/dist/{impl-C6wTDCex2.mjs → impl-Bf0GGQao2.mjs} +2 -2
- package/dist/{impl-C6wTDCex2.mjs.map → impl-Bf0GGQao2.mjs.map} +1 -1
- package/dist/{impl-CrpWDfKW.mjs → impl-BvoC7ufZ.mjs} +2 -2
- package/dist/{impl-CrpWDfKW.mjs.map → impl-BvoC7ufZ.mjs.map} +1 -1
- package/dist/{impl-u1q93_tK.mjs → impl-By84G6p2.mjs} +2 -2
- package/dist/{impl-u1q93_tK.mjs.map → impl-By84G6p2.mjs.map} +1 -1
- package/dist/{impl-BCTorB3_.mjs → impl-C515J-j7.mjs} +2 -2
- package/dist/{impl-BCTorB3_.mjs.map → impl-C515J-j7.mjs.map} +1 -1
- package/dist/{impl-DNwwq1Nh.mjs → impl-C66R8UJ9.mjs} +2 -2
- package/dist/{impl-DNwwq1Nh.mjs.map → impl-C66R8UJ9.mjs.map} +1 -1
- package/dist/{impl-CW6TFAzt2.mjs → impl-CDF30pp32.mjs} +2 -2
- package/dist/{impl-CW6TFAzt2.mjs.map → impl-CDF30pp32.mjs.map} +1 -1
- package/dist/{impl-CZfS7Ydy.mjs → impl-CF8ThZ09.mjs} +2 -2
- package/dist/{impl-CZfS7Ydy.mjs.map → impl-CF8ThZ09.mjs.map} +1 -1
- package/dist/{impl-BDPtNJLp.mjs → impl-CHhCpncv.mjs} +2 -2
- package/dist/{impl-BDPtNJLp.mjs.map → impl-CHhCpncv.mjs.map} +1 -1
- package/dist/{impl-BcHxVhtN.mjs → impl-CKFy8off.mjs} +2 -2
- package/dist/{impl-BcHxVhtN.mjs.map → impl-CKFy8off.mjs.map} +1 -1
- package/dist/{impl-Dl7w91bL.mjs → impl-CNqAOFaW.mjs} +2 -2
- package/dist/{impl-Dl7w91bL.mjs.map → impl-CNqAOFaW.mjs.map} +1 -1
- package/dist/{impl-DE9OHpyc.mjs → impl-CWx3bY5-.mjs} +2 -2
- package/dist/{impl-DE9OHpyc.mjs.map → impl-CWx3bY5-.mjs.map} +1 -1
- package/dist/{impl-DMQEmlVb.mjs → impl-CaLW2sGU.mjs} +2 -2
- package/dist/{impl-DMQEmlVb.mjs.map → impl-CaLW2sGU.mjs.map} +1 -1
- package/dist/{impl-BHibMDBv.mjs → impl-CbqDzZgA.mjs} +2 -2
- package/dist/{impl-BHibMDBv.mjs.map → impl-CbqDzZgA.mjs.map} +1 -1
- package/dist/{impl-CWd25f8p.mjs → impl-ChIESsn-.mjs} +2 -2
- package/dist/{impl-CWd25f8p.mjs.map → impl-ChIESsn-.mjs.map} +1 -1
- package/dist/{impl-DBV_D1ii.mjs → impl-CiEmNCR6.mjs} +2 -2
- package/dist/{impl-DBV_D1ii.mjs.map → impl-CiEmNCR6.mjs.map} +1 -1
- package/dist/{impl-DWvfhn-62.mjs → impl-CkcUmrRl2.mjs} +2 -2
- package/dist/{impl-DWvfhn-62.mjs.map → impl-CkcUmrRl2.mjs.map} +1 -1
- package/dist/{impl-v1WWFSFZ.mjs → impl-D18E8wLJ.mjs} +2 -2
- package/dist/{impl-v1WWFSFZ.mjs.map → impl-D18E8wLJ.mjs.map} +1 -1
- package/dist/{impl-DUI3qGsC2.mjs → impl-D1L6r4sY2.mjs} +2 -2
- package/dist/{impl-DUI3qGsC2.mjs.map → impl-D1L6r4sY2.mjs.map} +1 -1
- package/dist/{impl-CK9A4BvD.mjs → impl-D4DM4YMs.mjs} +2 -2
- package/dist/{impl-CK9A4BvD.mjs.map → impl-D4DM4YMs.mjs.map} +1 -1
- package/dist/{impl-zECFyZrU.mjs → impl-DLQT5on0.mjs} +2 -2
- package/dist/{impl-zECFyZrU.mjs.map → impl-DLQT5on0.mjs.map} +1 -1
- package/dist/{impl-DF374hZ52.mjs → impl-DW8CteEk2.mjs} +2 -2
- package/dist/{impl-DF374hZ52.mjs.map → impl-DW8CteEk2.mjs.map} +1 -1
- package/dist/{impl-D2LX8clq2.mjs → impl-DaABRwZH2.mjs} +2 -2
- package/dist/{impl-D2LX8clq2.mjs.map → impl-DaABRwZH2.mjs.map} +1 -1
- package/dist/{impl-CwOPj70B.mjs → impl-DczWZLXU.mjs} +2 -2
- package/dist/{impl-CwOPj70B.mjs.map → impl-DczWZLXU.mjs.map} +1 -1
- package/dist/{impl-CiDSQd1n.mjs → impl-Dlq4QBj3.mjs} +2 -2
- package/dist/{impl-CiDSQd1n.mjs.map → impl-Dlq4QBj3.mjs.map} +1 -1
- package/dist/{impl-JxprJNni.mjs → impl-DopV2WpH.mjs} +2 -2
- package/dist/{impl-JxprJNni.mjs.map → impl-DopV2WpH.mjs.map} +1 -1
- package/dist/{impl-BaDKnY6X.mjs → impl-DwotW3m_.mjs} +2 -2
- package/dist/{impl-BaDKnY6X.mjs.map → impl-DwotW3m_.mjs.map} +1 -1
- package/dist/{impl-hY30kWpN.mjs → impl-DysGumGV.mjs} +2 -2
- package/dist/{impl-hY30kWpN.mjs.map → impl-DysGumGV.mjs.map} +1 -1
- package/dist/{impl-D2KU3B7g.mjs → impl-HrUgz4tG.mjs} +2 -2
- package/dist/{impl-D2KU3B7g.mjs.map → impl-HrUgz4tG.mjs.map} +1 -1
- package/dist/{impl-CrVGqakz2.mjs → impl-L9xPwNwz2.mjs} +2 -2
- package/dist/{impl-CrVGqakz2.mjs.map → impl-L9xPwNwz2.mjs.map} +1 -1
- package/dist/{impl-DI5BZJRL.mjs → impl-c0YrAaxs.mjs} +2 -2
- package/dist/{impl-DI5BZJRL.mjs.map → impl-c0YrAaxs.mjs.map} +1 -1
- package/dist/{impl-DH049g3W.mjs → impl-h_KDIeo4.mjs} +2 -2
- package/dist/{impl-DH049g3W.mjs.map → impl-h_KDIeo4.mjs.map} +1 -1
- package/dist/{impl-CSMzpKv5.mjs → impl-jNQ05KT3.mjs} +2 -2
- package/dist/{impl-CSMzpKv5.mjs.map → impl-jNQ05KT3.mjs.map} +1 -1
- package/dist/{impl-DFZBjY6J2.mjs → impl-lJzO6Szh2.mjs} +2 -2
- package/dist/{impl-DFZBjY6J2.mjs.map → impl-lJzO6Szh2.mjs.map} +1 -1
- package/dist/{impl-Bhd63d2E.mjs → impl-nePMEJkH.mjs} +2 -2
- package/dist/{impl-Bhd63d2E.mjs.map → impl-nePMEJkH.mjs.map} +1 -1
- package/dist/{impl-2wy1Bi1C2.mjs → impl-rbZRyuXb2.mjs} +2 -2
- package/dist/{impl-2wy1Bi1C2.mjs.map → impl-rbZRyuXb2.mjs.map} +1 -1
- package/dist/{impl-BV9t4j6E.mjs → impl-spb5yfh5.mjs} +2 -2
- package/dist/{impl-BV9t4j6E.mjs.map → impl-spb5yfh5.mjs.map} +1 -1
- package/dist/{impl-B4MaLZAd2.mjs → impl-vUFXZXCy2.mjs} +2 -2
- package/dist/{impl-B4MaLZAd2.mjs.map → impl-vUFXZXCy2.mjs.map} +1 -1
- package/dist/index.d.mts +137 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{markRequestDataSiloIdsCompleted-C7R1YENn.mjs → markRequestDataSiloIdsCompleted-rPtNCOCl.mjs} +2 -2
- package/dist/{markRequestDataSiloIdsCompleted-C7R1YENn.mjs.map → markRequestDataSiloIdsCompleted-rPtNCOCl.mjs.map} +1 -1
- package/dist/{markSilentPrivacyRequests-D9swsyuo.mjs → markSilentPrivacyRequests-L6fxUodG.mjs} +2 -2
- package/dist/{markSilentPrivacyRequests-D9swsyuo.mjs.map → markSilentPrivacyRequests-L6fxUodG.mjs.map} +1 -1
- package/dist/{notifyPrivacyRequestsAdditionalTime-CpDSAOaZ.mjs → notifyPrivacyRequestsAdditionalTime-DjzVbnND.mjs} +2 -2
- package/dist/{notifyPrivacyRequestsAdditionalTime-CpDSAOaZ.mjs.map → notifyPrivacyRequestsAdditionalTime-DjzVbnND.mjs.map} +1 -1
- package/dist/parseVariablesFromString-CfXnITrG.mjs +3 -0
- package/dist/parseVariablesFromString-CfXnITrG.mjs.map +1 -0
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-nJdP5Lhb.mjs → pullChunkedCustomSiloOutstandingIdentifiers-qZCnzDXQ.mjs} +2 -2
- package/dist/{pullChunkedCustomSiloOutstandingIdentifiers-nJdP5Lhb.mjs.map → pullChunkedCustomSiloOutstandingIdentifiers-qZCnzDXQ.mjs.map} +1 -1
- package/dist/{pullManualEnrichmentIdentifiersToCsv-CvS65fmI.mjs → pullManualEnrichmentIdentifiersToCsv-Bg1P8r4K.mjs} +2 -2
- package/dist/{pullManualEnrichmentIdentifiersToCsv-CvS65fmI.mjs.map → pullManualEnrichmentIdentifiersToCsv-Bg1P8r4K.mjs.map} +1 -1
- package/dist/pullTranscendConfiguration-BPkc-b3x.mjs +58 -0
- package/dist/pullTranscendConfiguration-BPkc-b3x.mjs.map +1 -0
- package/dist/{pushCronIdentifiersFromCsv-BEPg03aD.mjs → pushCronIdentifiersFromCsv-BJ_6eT7L.mjs} +2 -2
- package/dist/{pushCronIdentifiersFromCsv-BEPg03aD.mjs.map → pushCronIdentifiersFromCsv-BJ_6eT7L.mjs.map} +1 -1
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-B0jKrYOZ.mjs → pushManualEnrichmentIdentifiersFromCsv-raZJbDoH.mjs} +2 -2
- package/dist/{pushManualEnrichmentIdentifiersFromCsv-B0jKrYOZ.mjs.map → pushManualEnrichmentIdentifiersFromCsv-raZJbDoH.mjs.map} +1 -1
- package/dist/{readTranscendYaml-D-k8P4v1.mjs → readTranscendYaml-B1FLjET0.mjs} +2 -2
- package/dist/{readTranscendYaml-D-k8P4v1.mjs.map → readTranscendYaml-B1FLjET0.mjs.map} +1 -1
- package/dist/{removeUnverifiedRequestIdentifiers-BIchFbPB.mjs → removeUnverifiedRequestIdentifiers-D4BS0YLI.mjs} +2 -2
- package/dist/{removeUnverifiedRequestIdentifiers-BIchFbPB.mjs.map → removeUnverifiedRequestIdentifiers-D4BS0YLI.mjs.map} +1 -1
- package/dist/{retryRequestDataSilos-DUfHyF_U.mjs → retryRequestDataSilos-CBxZHU59.mjs} +2 -2
- package/dist/{retryRequestDataSilos-DUfHyF_U.mjs.map → retryRequestDataSilos-CBxZHU59.mjs.map} +1 -1
- package/dist/{skipPreflightJobs-DaFjvih9.mjs → skipPreflightJobs-mqhLTi0f.mjs} +2 -2
- package/dist/{skipPreflightJobs-DaFjvih9.mjs.map → skipPreflightJobs-mqhLTi0f.mjs.map} +1 -1
- package/dist/{skipRequestDataSilos-DYE2aYYS.mjs → skipRequestDataSilos-8cK7x9K9.mjs} +2 -2
- package/dist/{skipRequestDataSilos-DYE2aYYS.mjs.map → skipRequestDataSilos-8cK7x9K9.mjs.map} +1 -1
- package/dist/{streamPrivacyRequestsToCsv-DakIlTv0.mjs → streamPrivacyRequestsToCsv-CaueBxWE.mjs} +2 -2
- package/dist/{streamPrivacyRequestsToCsv-DakIlTv0.mjs.map → streamPrivacyRequestsToCsv-CaueBxWE.mjs.map} +1 -1
- package/dist/{updateConsentManagerVersionToLatest-BzAN1bBC.mjs → updateConsentManagerVersionToLatest-59LfKBYK.mjs} +2 -2
- package/dist/{updateConsentManagerVersionToLatest-BzAN1bBC.mjs.map → updateConsentManagerVersionToLatest-59LfKBYK.mjs.map} +1 -1
- package/dist/{uploadConsents-CAAkg4cf.mjs → uploadConsents-CbPsjJ6G.mjs} +2 -2
- package/dist/{uploadConsents-CAAkg4cf.mjs.map → uploadConsents-CbPsjJ6G.mjs.map} +1 -1
- package/dist/{uploadCookiesFromCsv-DP3LBhMG.mjs → uploadCookiesFromCsv-DhDzLqvx.mjs} +2 -2
- package/dist/{uploadCookiesFromCsv-DP3LBhMG.mjs.map → uploadCookiesFromCsv-DhDzLqvx.mjs.map} +1 -1
- package/dist/{uploadDataFlowsFromCsv-C--ho0_f.mjs → uploadDataFlowsFromCsv-Ca4JrvEd.mjs} +2 -2
- package/dist/{uploadDataFlowsFromCsv-C--ho0_f.mjs.map → uploadDataFlowsFromCsv-Ca4JrvEd.mjs.map} +1 -1
- package/dist/{uploadPrivacyRequestsFromCsv-CLklOZOl.mjs → uploadPrivacyRequestsFromCsv-CprxpH-W.mjs} +2 -2
- package/dist/{uploadPrivacyRequestsFromCsv-CLklOZOl.mjs.map → uploadPrivacyRequestsFromCsv-CprxpH-W.mjs.map} +1 -1
- package/dist/{validateTranscendAuth-CIPn35zS.mjs → validateTranscendAuth-D14jsB5C.mjs} +2 -2
- package/dist/{validateTranscendAuth-CIPn35zS.mjs.map → validateTranscendAuth-D14jsB5C.mjs.map} +1 -1
- package/package.json +4 -4
- package/dist/codecs-CbOFsh1R.mjs +0 -2
- package/dist/codecs-CbOFsh1R.mjs.map +0 -1
- package/dist/constants-BesTSxZW.mjs +0 -2
- package/dist/constants-BesTSxZW.mjs.map +0 -1
- package/dist/enums-D53y231X.mjs.map +0 -1
- package/dist/parseVariablesFromString-CHcigVIK.mjs +0 -3
- package/dist/parseVariablesFromString-CHcigVIK.mjs.map +0 -1
- package/dist/pullTranscendConfiguration-Cdg8JEii.mjs +0 -58
- package/dist/pullTranscendConfiguration-Cdg8JEii.mjs.map +0 -1
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import"./enums-D53y231X.mjs";import{t as e}from"./logger-B-LXIf3U.mjs";import{ActionItemCode as t,ConsentTrackerStatus as n,PreferenceTopicType as r,RequestAction as i,RetentionType as a,WorkflowConfigType as o}from"@transcend-io/privacy-types";import{flatten as s,groupBy as c,keyBy as l,mapValues as u}from"lodash-es";import d from"colors";import{ASSESSMENT_SECTION_FIELDS as f,convertToDataSubjectAllowlist as p,fetchAllActionItemCollections as m,fetchAllActionItems as h,fetchAllActions as g,fetchAllAgentFiles as _,fetchAllAgentFunctions as v,fetchAllAgents as y,fetchAllAssessments as b,fetchAllAttributes as x,fetchAllBusinessEntities as S,fetchAllCookies as C,fetchAllDataCategories as w,fetchAllDataFlows as T,fetchAllDataSubjects as E,fetchAllEnrichers as D,fetchAllIdentifiers as ee,fetchAllMessages as te,fetchAllPolicies as ne,fetchAllPreferenceOptionValues as re,fetchAllPrivacyCenters as ie,fetchAllProcessingActivities as ae,fetchAllProcessingPurposes as oe,fetchAllPromptGroups as se,fetchAllPromptPartials as ce,fetchAllPrompts as le,fetchAllPurposesAndPreferences as ue,fetchAllSiloDiscoveryResults as de,fetchAllTeams as fe,fetchAllTemplates as pe,fetchAllVendors as me,fetchAllWorkflowConfigs as he,fetchApiKeys as ge,fetchConsentManager as _e,fetchConsentManagerExperiences as ve,fetchConsentManagerTheme as ye,fetchConsentThemes as be,fetchConsentVariants as xe,fetchEnrichedDataSilos as Se,fetchPartitions as Ce,formatAttributeValues as O,formatRegions as k,makeGraphQLRequest as A,parseAssessmentDisplayLogic as j,parseAssessmentRiskLogic as M,workflowConfigMatchKey as we}from"@transcend-io/sdk";import{gql as N}from"graphql-request";const P=N`
|
|
2
|
-
query TranscendCliAssessmentTemplates(
|
|
3
|
-
$first: Int!
|
|
4
|
-
$offset: Int!
|
|
5
|
-
$filterBy: AssessmentFormTemplateFiltersInput
|
|
6
|
-
) {
|
|
7
|
-
assessmentFormTemplates(
|
|
8
|
-
first: $first
|
|
9
|
-
offset: $offset
|
|
10
|
-
filterBy: $filterBy
|
|
11
|
-
) {
|
|
12
|
-
nodes {
|
|
13
|
-
id
|
|
14
|
-
creator {
|
|
15
|
-
id
|
|
16
|
-
email
|
|
17
|
-
name
|
|
18
|
-
}
|
|
19
|
-
lastEditor {
|
|
20
|
-
id
|
|
21
|
-
email
|
|
22
|
-
name
|
|
23
|
-
}
|
|
24
|
-
title
|
|
25
|
-
description
|
|
26
|
-
status
|
|
27
|
-
source
|
|
28
|
-
parentId
|
|
29
|
-
isLocked
|
|
30
|
-
isArchived
|
|
31
|
-
createdAt
|
|
32
|
-
updatedAt
|
|
33
|
-
retentionSchedule {
|
|
34
|
-
id
|
|
35
|
-
type
|
|
36
|
-
durationDays
|
|
37
|
-
operation
|
|
38
|
-
createdAt
|
|
39
|
-
updatedAt
|
|
40
|
-
}
|
|
41
|
-
assessmentEmailSet {
|
|
42
|
-
id
|
|
43
|
-
title
|
|
44
|
-
description
|
|
45
|
-
isDefault
|
|
46
|
-
templates {
|
|
47
|
-
id
|
|
48
|
-
title
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
sections {
|
|
52
|
-
${f}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`;async function F(t){let n=[],r=0,i=!1;do{let{assessmentFormTemplates:{nodes:a}}=await A(t,P,{variables:{first:20,offset:r},logger:e});n.push(...a),r+=20,i=a.length===20}while(i);return n.sort((e,t)=>e.title.localeCompare(t.title))}const I=[`dataSilos`,`enrichers`,`templates`,`apiKeys`];async function L(f,{dataSiloIds:A,integrationNames:N,debug:P,resources:L=I,pageSize:R,skipDatapoints:Te,includeGuessedCategories:z,skipSubDatapoints:Ee,trackerStatuses:B=Object.values(n)}){if(A.length>0&&N.length>0)throw Error(`Only 1 of integrationNames OR dataSiloIds can be provided`);e.info(d.magenta(`Fetching data with page size ${R}...`));let[V,De,H,U,W,G,K,q,Oe,J,ke,Ae,Y,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,X,$e,et]=await Promise.all([L.includes(`dataSilos`)||L.includes(`dataSubjects`)?E(f,{logger:e}):[],L.includes(`apiKeys`)?ge(f,{fetchAll:!0,logger:e}):[],L.includes(`dataSilos`)?Se(f,{ids:A,integrationNames:N,pageSize:R,debug:P,includeGuessedCategories:z,skipDatapoints:Te,skipSubDatapoints:Ee,logger:e}):[],L.includes(`enrichers`)?D(f,{logger:e}):[],L.includes(`dataFlows`)?[...B.includes(n.Live)?await T(f,{logger:e,filterBy:{status:n.Live}}):[],...B.includes(n.NeedsReview)?await T(f,{logger:e,filterBy:{status:n.NeedsReview}}):[]]:[],L.includes(`cookies`)?[...B.includes(n.Live)?await C(f,{logger:e,filterBy:{status:n.Live}}):[],...B.includes(n.NeedsReview)?await C(f,{logger:e,filterBy:{status:n.NeedsReview}}):[]]:[],L.includes(`customFields`)?x(f,{logger:e}):[],L.includes(`templates`)?pe(f,{logger:e}):[],L.includes(`identifiers`)?ee(f,{logger:e}):[],L.includes(`actions`)?g(f,{logger:e}):[],L.includes(`businessEntities`)?S(f,{logger:e}):[],L.includes(`processingActivities`)?ae(f,{logger:e}):[],L.includes(`consentManager`)?_e(f,{logger:e}):void 0,L.includes(`consentManager`)?ve(f,{logger:e}):[],L.includes(`consentManager`)?xe(f,{logger:e}):[],L.includes(`consentManager`)?be(f,{logger:e}):[],L.includes(`prompts`)?le(f,{logger:e}):[],L.includes(`promptPartials`)?ce(f,{logger:e}):[],L.includes(`promptGroups`)?se(f,{logger:e}):[],L.includes(`agents`)?y(f,{logger:e}):[],L.includes(`agentFunctions`)?v(f,{logger:e}):[],L.includes(`agentFiles`)?_(f,{logger:e}):[],L.includes(`vendors`)?me(f,{logger:e}):[],L.includes(`dataCategories`)?w(f,{logger:e}):[],L.includes(`processingPurposes`)?oe(f,{logger:e}):[],L.includes(`actionItems`)?h(f,{logger:e,filterBy:{type:[t.Onboarding]}}):[],L.includes(`actionItemCollections`)?m(f,{logger:e}):[],L.includes(`teams`)?fe(f,{logger:e}):[],L.includes(`policies`)?ne(f,{logger:e}):[],L.includes(`privacyCenters`)?ie(f,{logger:e}):[],L.includes(`messages`)?te(f,{logger:e}):[],L.includes(`partitions`)?Ce(f,{logger:e}):[],L.includes(`assessments`)?b(f,{logger:e}):[],L.includes(`assessmentTemplates`)?F(f):[],L.includes(`purposes`)?ue(f,{logger:e}):[],L.includes(`workflowConfigs`)?he(f,{logger:e,workflowConfigType:o.DSR}):[],L.includes(`preferenceOptions`)?re(f,{logger:e}):[],L.includes(`systemDiscovery`)?de(f,{logger:e}):[]]),Z=L.includes(`consentManager`)&&Y?await ye(f,{logger:e,filterBy:{airgapBundleId:Y.id}}):void 0,Q={},tt=s(H.map(([{apiKeys:e}])=>e.map(({title:e})=>e))),$=Object.values(De).filter(({title:e})=>L.includes(`apiKeys`)?!0:tt.includes(e));if($.length>0&&L.includes(`apiKeys`)&&(Q[`api-keys`]=$.map(({title:e})=>({title:e}))),Ye.length>0&&L.includes(`partitions`)&&(Q.partitions=Ye.map(({name:e,partition:t})=>({name:e,partition:t}))),Y&&L.includes(`consentManager`)&&(Q[`consent-manager`]={bundleUrls:{TEST:Y.testBundleURL,PRODUCTION:Y.bundleURL},domains:Y.configuration.domains||void 0,partition:Y.configuration.partition||void 0,consentPrecedence:Y.configuration.consentPrecedence||void 0,unknownRequestPolicy:Y.configuration.unknownRequestPolicy||void 0,unknownCookiePolicy:Y.configuration.unknownCookiePolicy||void 0,syncEndpoint:Y.configuration.syncEndpoint||void 0,telemetryPartitioning:Y.configuration.telemetryPartitioning||void 0,signedIabAgreement:Y.configuration.signedIabAgreement||void 0,syncGroups:Y.configuration.syncGroups||void 0,theme:Z?{primaryColor:Z.primaryColor||void 0,fontColor:Z.fontColor||void 0,privacyPolicy:Z.privacyPolicy||void 0,prompt:Z.prompt}:void 0,experiences:je.map(e=>({name:e.name,displayName:e.displayName||void 0,regions:e.regions.map(e=>({countrySubDivision:e.countrySubDivision||void 0,country:e.country||void 0})),onConsentExpiry:e.onConsentExpiry,consentExpiry:e.consentExpiry,operator:e.operator,displayPriority:e.displayPriority,viewState:e.viewState,purposes:e.purposes.map(e=>({trackingType:e.trackingType})),optedOutPurposes:e.optedOutPurposes.map(e=>({trackingType:e.trackingType})),browserLanguages:e.browserLanguages,browserTimeZones:e.browserTimeZones,consentUiVariantSlug:e.consentUiVariant?.slug})),consentVariants:Me.map(e=>({id:e.id,name:e.name,slug:e.slug,description:e.description,configuration:JSON.stringify(e.configuration),locales:e.locales,status:e.status,userFlow:e.userFlow,themeSlug:e.theme?.slug})),consentThemes:Ne.map(e=>({id:e.id,name:e.name,slug:e.slug,configuration:JSON.stringify(e.configuration)}))}),Xe.length>0&&L.includes(`assessments`)&&(Q.assessments=Xe.map(({title:e,assessmentGroup:t,sections:n,creator:r,description:i,status:a,assignees:o,externalAssignees:s,reviewers:c,isLocked:l,isArchived:u,isExternallyCreated:d,dueDate:f,createdAt:p,assignedAt:m,submittedAt:h,approvedAt:g,rejectedAt:_,titleIsInternal:v,retentionSchedule:y,attributeValues:b,resources:x,syncedRows:S})=>({title:e,group:t.title,sections:n.map(({title:e,status:t,questions:n,assignees:r,isReviewed:i,externalAssignees:a})=>({title:e,status:t,questions:n.map(({title:e,type:t,subType:n,placeholder:r,description:i,isRequired:a,referenceId:o,displayLogic:s,riskLogic:c,riskCategories:l,riskFramework:u,answerOptions:d,selectedAnswers:f,allowedMimeTypes:p,allowSelectOther:m,syncModel:h,syncColumn:g,attributeKey:_,requireRiskEvaluation:v,requireRiskMatrixEvaluation:y})=>{let b=s?j(s):void 0;return{title:e,type:t,"sub-type":n,placeholder:r,description:i,"is-required":a,"reference-id":o,"display-logic":b&&Object.keys(b).length>0?{action:b.action,rule:b.rule?{"depends-on-question-reference-id":b.rule.dependsOnQuestionReferenceId,"comparison-operator":b.rule.comparisonOperator,"comparison-operands":`comparisonOperands`in b.rule?b.rule.comparisonOperands:void 0}:void 0,"nested-rule":b.nestedRule?{"logic-operator":b.nestedRule.logicOperator,rules:(b.nestedRule.rules||[]).map(e=>({"depends-on-question-reference-id":e.dependsOnQuestionReferenceId,"comparison-operator":e.comparisonOperator,"comparison-operands":`comparisonOperands`in e?e.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":c.map(e=>{let t=M(e);return{"risk-level":t.riskAssignment?.riskLevelId,"comparison-operands":t.comparisonOperands,"comparison-operator":t.comparisonOperator}}),"risk-categories":l.map(({title:e})=>e),"risk-framework":u?.title,"answer-options":d.map(({value:e})=>({value:e})),"selected-answers":f.map(({value:e})=>e),"allowed-mime-types":p,"allow-select-other":m,"sync-model":h||void 0,"sync-column":g||void 0,"attribute-key":_?.name,"require-risk-evaluation":v,"require-risk-matrix-evaluation":y}}),assignees:r.map(({email:e})=>e),"external-assignees":a.map(({email:e})=>e),"is-reviewed":i})),creator:r?.email,description:i,status:a,assignees:o.map(({email:e})=>e),"external-assignees":s.map(({email:e})=>e),reviewers:c.map(({email:e})=>e),locked:l,archived:u,external:d,"title-is-internal":v,"due-date":f||void 0,"created-at":p||void 0,"assigned-at":m||void 0,"submitted-at":h||void 0,"approved-at":g||void 0,"rejected-at":_||void 0,"retention-schedule":y?{type:y.type,"duration-days":y.durationDays,operand:y.operation}:void 0,attributes:b!==void 0&&b.length>0?O(b):void 0,resources:x.map(({resourceType:e,title:t,name:n,category:r,type:i,purpose:a})=>({type:e,title:r?`${r} - ${n}`:a?`${a} - ${n}`:t||n||i||``})),rows:S.map(({resourceType:e,title:t,name:n,category:r,type:i,purpose:a})=>({type:e,title:r?`${r} - ${n}`:a?`${a} - ${n}`:t||n||i||``}))}))),Ze.length>0&&L.includes(`assessmentTemplates`)&&(Q[`assessment-templates`]=Ze.map(({title:e,description:t,sections:n,status:r,source:i,creator:a,isLocked:o,isArchived:s,createdAt:c,retentionSchedule:l})=>({title:e,description:t,sections:n.map(({title:e,questions:t})=>({title:e,questions:t.map(({title:e,type:t,subType:n,placeholder:r,description:i,isRequired:a,referenceId:o,displayLogic:s,riskLogic:c,riskCategories:l,riskFramework:u,answerOptions:d,allowedMimeTypes:f,allowSelectOther:p,syncModel:m,syncColumn:h,attributeKey:g,requireRiskEvaluation:_,requireRiskMatrixEvaluation:v})=>{let y=s?j(s):void 0;return{title:e,type:t,"sub-type":n,placeholder:r,description:i,"is-required":a,"reference-id":o,"display-logic":y&&Object.keys(y).length>0?{action:y.action,rule:y.rule?{"depends-on-question-reference-id":y.rule.dependsOnQuestionReferenceId,"comparison-operator":y.rule.comparisonOperator,"comparison-operands":`comparisonOperands`in y.rule?y.rule.comparisonOperands:void 0}:void 0,"nested-rule":y.nestedRule?{"logic-operator":y.nestedRule.logicOperator,rules:(y.nestedRule.rules||[]).map(e=>({"depends-on-question-reference-id":e.dependsOnQuestionReferenceId,"comparison-operator":e.comparisonOperator,"comparison-operands":`comparisonOperands`in e?e.comparisonOperands:void 0}))}:void 0}:void 0,"risk-logic":c.map(e=>{let t=M(e);return{"risk-level":t.riskAssignment?.riskLevelId,"risk-matrix-row":t.riskAssignment?.riskMatrixRowId,"risk-matrix-column":t.riskAssignment?.riskMatrixColumnId,"comparison-operands":t.comparisonOperands,"comparison-operator":t.comparisonOperator}}),"risk-categories":l.map(({title:e})=>e),"risk-framework":u?.title,"answer-options":d.map(({value:e})=>({value:e})),"allowed-mime-types":f,"allow-select-other":p,"sync-model":m||void 0,"sync-column":h||void 0,"attribute-key":g?.name,"require-risk-evaluation":_,"require-risk-matrix-evaluation":v}})})),status:r,source:i,creator:a?.email,locked:o,archived:s,"created-at":c||void 0,"retention-schedule":l?{type:l.type,"duration-days":l.durationDays,operand:l.operation}:void 0}))),et.length>0&&L.includes(`systemDiscovery`)&&(Q[`system-discovery`]=et.map(({title:e,resourceId:t,suggestedCatalog:{title:n},plugin:{dataSilo:{title:r}},country:i,countrySubDivision:a,plaintextContext:o,containsSensitiveData:s,status:c})=>({title:e,resourceId:t,suggestedCatalog:n,plugin:r,country:i||void 0,countrySubDivision:a||void 0,plaintextContext:o,containsSensitiveData:s,status:c}))),Pe.length>0&&L.includes(`prompts`)&&(Q.prompts=Pe.map(({title:e,content:t})=>({title:e,content:t}))),Fe.length>0&&L.includes(`promptPartials`)&&(Q[`prompt-partials`]=Fe.map(({title:e,content:t})=>({title:e,content:t}))),Ie.length>0&&L.includes(`promptGroups`)&&(Q[`prompt-groups`]=Ie.map(({title:e,description:t,prompts:n})=>({title:e,description:t,prompts:n.map(({title:e})=>e)}))),Ge.length>0&&L.includes(`teams`)&&(Q.teams=Ge.map(({name:e,description:t,ssoDepartment:n,ssoGroup:r,ssoTitle:i,users:a,scopes:o,parentTeam:s})=>({name:e,description:t,"sso-department":n||void 0,"sso-group":r||void 0,"sso-title":i||void 0,"parent-team-name":s?.name,users:a.map(({email:e})=>e),scopes:o.map(({name:e})=>e)}))),V.length>0&&L.includes(`dataSubjects`)&&(Q[`data-subjects`]=V.map(({type:e,title:t,active:n,adminDashboardDefaultSilentMode:r,actions:i})=>({type:e,title:t?.defaultMessage,active:n,adminDashboardDefaultSilentMode:r,actions:i.map(({type:e})=>e)}))),Ke.length>0&&(Q.policies=Ke.map(({title:e,versions:t,disabledLocales:n})=>({title:e?.defaultMessage,content:t?.[0]?.content?.defaultMessage,disabledLocales:n}))),Je.length>0&&(Q.messages=Je.map(({id:e,defaultMessage:t,targetReactIntlId:n,description:r,translations:i})=>({id:e,defaultMessage:t,description:r,targetReactIntlId:n||void 0,translations:i.reduce((e,{locale:t,value:n})=>Object.assign(e,{[t]:n}),{})}))),qe.length>0){let e=qe[0];Q[`privacy-center`]={isDisabled:e.isDisabled,showPrivacyRequestButton:e.showPrivacyRequestButton,showPolicies:e.showPolicies,showTrackingTechnologies:e.showTrackingTechnologies,showCookies:e.showCookies,showDataFlows:e.showDataFlows,showConsentManager:e.showConsentManager,showManageYourPrivacy:e.showManageYourPrivacy,showMarketingPreferences:e.showMarketingPreferences,locales:e.locales,defaultLocale:e.defaultLocale,preferBrowserDefaultLocale:e.preferBrowserDefaultLocale,supportEmail:e.supportEmail||void 0,replyToEmail:e.replyToEmail||void 0,useNoReplyEmailAddress:e.useNoReplyEmailAddress,useCustomEmailDomain:e.useCustomEmailDomain,transformAccessReportJsonToCsv:e.transformAccessReportJsonToCsv,home:e.home||void 0,expandSideMenuByDefault:e.expandSideMenuByDefault,workflowsCustomFieldsRequired:e.workflowsCustomFieldsRequired,footerLayout:e.footerLayout,...e.childOrganizations.length>0?{displayedChildOrganizationUris:e.childOrganizations.map(e=>e.uri)}:{},...e.footerLinks.length>0?{footerLinks:[...e.footerLinks].sort((e,t)=>e.displayOrder-t.displayOrder).map(e=>({title:e.title.defaultMessage,...e.url?{url:e.url}:{},...e.iconOnly?{iconOnly:e.iconOnly}:{}}))}:{},theme:e.theme}}if(ke.length>0&&L.includes(`businessEntities`)&&(Q[`business-entities`]=ke.map(({title:e,description:t,address:n,headquarterCountry:r,headquarterSubDivision:i,dataProtectionOfficerName:a,dataProtectionOfficerEmail:o,attributeValues:s})=>({title:e,description:t||void 0,address:n||void 0,headquarterCountry:r||void 0,headquarterSubDivision:i||void 0,dataProtectionOfficerName:a||void 0,dataProtectionOfficerEmail:o||void 0,attributes:s!==void 0&&s.length>0?O(s):void 0}))),Ae.length>0&&L.includes(`processingActivities`)&&(Q[`processing-activities`]=Ae.map(({title:e,description:t,securityMeasureDetails:n,controllerships:r,storageRegions:i,transferRegions:o,retentionType:s,retentionPeriod:c,dataProtectionImpactAssessmentLink:l,dataProtectionImpactAssessmentStatus:u,attributeValues:d,dataSilos:f,dataSubjects:p,teams:m,owners:h,processingPurposeSubCategories:g,dataSubCategories:_,saaSCategories:v})=>({title:e,description:t,securityMeasureDetails:n??void 0,controllerships:r.length>0?r:void 0,storageRegions:i.length>0?k(i):void 0,transferRegions:o.length>0?k(o):void 0,retentionType:s,retentionPeriod:s===a.StatedPeriod?c:void 0,dataProtectionImpactAssessmentLink:l??void 0,dataProtectionImpactAssessmentStatus:u,attributes:d!==void 0&&d.length>0?O(d):void 0,dataSiloTitles:f.length>0?f.map(({title:e})=>e):void 0,dataSubjectTypes:p.length>0?p.map(({type:e})=>e):void 0,teamNames:m.length>0?m.map(({name:e})=>e):void 0,ownerEmails:h.length>0?h.map(({email:e})=>e):void 0,processingSubPurposes:g.length>0?g.map(({name:e,purpose:t})=>({purpose:t,...e?{name:e}:{}})):void 0,dataSubCategories:_.length>0?_.map(({name:e,category:t})=>({category:t,...e?{name:e}:{}})):void 0,saaSCategories:v.length>0?v.map(({title:e})=>e):void 0}))),J.length>0&&L.includes(`actions`)&&(Q.actions=J.map(({type:e,skipSecondaryIfNoFiles:t,skipDownloadableStep:n,requiresReview:r,regionList:a,regionDetectionMethod:o,waitingPeriod:s})=>({type:e,...e===i.Erasure?{skipSecondaryIfNoFiles:t,skipDownloadableStep:n}:{},requiresReview:r,waitingPeriod:s,regionDetectionMethod:o,regionList:a.length>0?a:void 0}))),Oe.length>0&&L.includes(`identifiers`)&&(Q.identifiers=Oe.map(({name:e,type:t,regex:n,selectOptions:r,privacyCenterVisibility:i,isRequiredInForm:a,placeholder:o,displayTitle:s,dataSubjects:c,displayDescription:l,displayOrder:u,isUniqueOnPreferenceStore:d})=>({name:e,type:t,regex:n,selectOptions:r.length>0?r:void 0,privacyCenterVisibility:i.length>0?i:void 0,isRequiredInForm:a,placeholder:o||void 0,dataSubjects:c.length>0?c.map(({type:e})=>e):void 0,displayTitle:s?.defaultMessage,displayDescription:l?.defaultMessage,displayOrder:u,isUniqueOnPreferenceStore:d}))),Le.length>0&&L.includes(`agents`)&&(Q.agents=Le.map(({name:e,agentId:t,description:n,instructions:r,codeInterpreterEnabled:i,retrievalEnabled:a,prompt:o,largeLanguageModel:s,teams:c,owners:l,agentFunctions:u,agentFiles:d})=>({name:e,agentId:t,description:n||void 0,instructions:r,codeInterpreterEnabled:i,retrievalEnabled:a,prompt:o?.title,"large-language-model":{name:s.name,client:s.client},teams:c&&c.length>0?c.map(({name:e})=>e):void 0,owners:l&&l.length>0?l.map(({email:e})=>e):void 0,"agent-functions":u&&u.length>0?u.map(({name:e})=>e):void 0,"agent-files":d&&d.length>0?d.map(({name:e})=>e):void 0}))),Ue.length>0&&L.includes(`actionItems`)&&(Q[`action-items`]=Ue.map(({teams:e,users:t,customerExperienceActionItemIds:[n],dueDate:r,priority:i,resolved:a,collections:o,notes:s,link:c,title:l,type:u,attributeValues:d})=>({teams:e.map(({name:e})=>e),users:t.map(({email:e})=>e),dueDate:r||void 0,title:l,notes:s,customerExperienceActionItemId:n,collections:o.map(({title:e})=>e),link:c,priority:i||void 0,resolved:a,type:u,attributes:d!==void 0&&d.length>0?O(d):void 0}))),We.length>0&&L.includes(`actionItemCollections`)&&(Q[`action-item-collections`]=We.map(({title:e,description:t,hidden:n,productLine:r})=>({title:e,description:t||void 0,hidden:n,productLine:r}))),Re.length>0&&L.includes(`agentFunctions`)&&(Q[`agent-functions`]=Re.map(({name:e,description:t,parameters:n})=>({name:e,description:t,parameters:JSON.stringify(n)}))),ze.length>0&&L.includes(`agentFiles`)&&(Q[`agent-files`]=ze.map(({name:e,description:t,fileId:n,size:r,purpose:i})=>({name:e,description:t,fileId:n,size:r,purpose:i}))),Be.length>0&&L.includes(`vendors`)&&(Q.vendors=Be.map(({title:e,description:t,dataProcessingAgreementLink:n,contactName:r,contactPhone:i,address:a,headquarterCountry:o,headquarterSubDivision:s,websiteUrl:c,businessEntity:l,teams:u,owners:d,attributeValues:f})=>({title:e,description:t||void 0,dataProcessingAgreementLink:n||void 0,contactName:r||void 0,contactPhone:i||void 0,address:a||void 0,headquarterCountry:o||void 0,headquarterSubDivision:s||void 0,websiteUrl:c||void 0,businessEntity:l?.title,teams:u&&u.length>0?u.map(({name:e})=>e):void 0,owners:d&&d.length>0?d.map(({email:e})=>e):void 0,attributes:f!==void 0&&f.length>0?O(f):void 0}))),Ve.length>0&&L.includes(`dataCategories`)&&(Q[`data-categories`]=Ve.map(({name:e,category:t,description:n,regex:r,owners:i,teams:a,attributeValues:o})=>({name:e,category:t,description:n||void 0,regex:r||void 0,owners:i&&i.length>0?i.map(({email:e})=>e):void 0,teams:a&&a.length>0?a.map(({name:e})=>e):void 0,attributes:o!==void 0&&o.length>0?O(o):void 0}))),He.length>0&&L.includes(`processingPurposes`)&&(Q[`processing-purposes`]=He.map(({name:e,purpose:t,description:n,owners:r,teams:i,attributeValues:a})=>({name:e,purpose:t,description:n||void 0,owners:r&&r.length>0?r.map(({email:e})=>e):void 0,teams:i&&i.length>0?i.map(({name:e})=>e):void 0,attributes:a!==void 0&&a.length>0?O(a):void 0}))),W.length>0&&L.includes(`dataFlows`)&&(Q[`data-flows`]=W.map(({value:e,type:t,description:n,trackingType:r,service:i,status:a,owners:o,teams:s,attributeValues:c})=>({value:e,type:t,description:n||void 0,trackingPurposes:r,status:a,service:i?.integrationName,owners:o.map(({email:e})=>e),teams:s.map(({name:e})=>e),attributes:c!==void 0&&c.length>0?O(c):void 0}))),G.length>0&&L.includes(`cookies`)&&(Q.cookies=G.map(({name:e,isRegex:t,description:n,trackingPurposes:r,service:i,status:a,owners:o,teams:s,attributeValues:c})=>({name:e,isRegex:t,description:n||void 0,trackingPurposes:r,status:a,service:i?.integrationName,owners:o.map(({email:e})=>e),teams:s.map(({name:e})=>e),attributes:c!==void 0&&c.length>0?O(c):void 0}))),K.length>0&&L.includes(`customFields`)&&(Q.attributes=K.map(({description:e,name:t,type:n,values:r,enabledOn:i=[]})=>({description:e||void 0,resources:i,name:t,type:n,values:r.map(({name:e,color:t,description:n})=>({name:e,color:t||void 0,description:n}))}))),Qe.length>0&&(Q.purposes=Qe.map(({name:e,description:t,trackingType:n,defaultConsent:i,configurable:a,showInConsentManager:o,isActive:s,displayOrder:c,optOutSignals:l,authLevel:u,topics:d,showInPrivacyCenter:f,title:p})=>({name:e,title:p,description:t||void 0,trackingType:n,"default-consent":i,configurable:a,"show-in-consent-manager":o,"show-in-privacy-center":f,"is-active":s,"display-order":c,"opt-out-signals":l.length>0?l:void 0,"auth-level":u||void 0,"preference-topics":d.map(({slug:e,title:t,type:n,color:i,displayDescription:a,defaultConfiguration:o,showInPrivacyCenter:s,preferenceOptionValues:c})=>({slug:e,title:t.defaultMessage,type:n,color:i,description:a.defaultMessage,"default-configuration":o,"show-in-privacy-center":s,options:n===r.Boolean?[]:c.map(({title:e,slug:t})=>({title:e.defaultMessage,slug:t}))}))}))),X.length>0&&L.includes(`workflowConfigs`)){let t=X.map(e=>({title:e.title.defaultMessage,"action-type":e.action.type,...e.internalName?{"internal-name":e.internalName}:{},...e.subtitle?{subtitle:e.subtitle.defaultMessage}:{},...e.description?{description:e.description.defaultMessage}:{},...e.subject?{"data-subject-type":e.subject.type}:{},visibility:e.workflowConfigVisibility,type:e.workflowConfigType,...e.collectDataSubjectRegions?{"collect-data-subject-regions":e.collectDataSubjectRegions}:{},...e.regionList.length>0?{"region-list":e.regionList}:{},...e.expiryTime&&e.expiryTime.length>0?{"expiry-time":e.expiryTime}:{},...e.WorkflowConfigAttributeKeys&&e.WorkflowConfigAttributeKeys.length>0?{"attribute-keys":e.WorkflowConfigAttributeKeys.map(({attributeKey:e})=>e.name)}:{}})),n=c(X,we);for(let t of Object.values(n))if(t.length>1){let n=t[0];e.warn(`Found "${t.length}" workflow configs with the same title, action-type, data-subject-type, and region-list for "${n.title.defaultMessage}" (${n.action.type}). Push will fail until they are disambiguated (for example with unique internal names).`)}t.length>0&&(Q[`workflow-configs`]=t)}if($e.length>0&&L.includes(`preferenceOptions`)&&(Q[`preference-options`]=$e.map(({slug:e,title:t})=>({slug:e,title:t.defaultMessage}))),A.length===0&&q.length>0&&L.includes(`templates`)&&(Q.templates=q.map(({title:e})=>({title:e}))),U.length>0&&L.includes(`enrichers`)&&(Q.enrichers=U.map(({title:e,url:t,type:n,inputIdentifier:r,identifiers:a,actions:o,testRegex:s,dataSubjects:c,expirationDuration:l,lookerQueryTitle:u,transitionRequestStatus:d,phoneNumbers:f,regionList:p})=>({title:e,url:t||void 0,type:n,"input-identifier":r?.name,"output-identifiers":a.map(({name:e})=>e),"privacy-actions":Object.values(i).length===o.length?void 0:o,testRegex:s||void 0,lookerQueryTitle:u||void 0,expirationDuration:parseInt(l,10),transitionRequestStatus:d||void 0,phoneNumbers:f&&f.length>0?f:void 0,regionList:p&&p.length>0?p:void 0,"data-subjects":c.map(({type:e})=>e)}))),H.length>0&&L.includes(`dataSilos`)){let e=l(V,`type`);Q[`data-silos`]=H.map(([{title:t,description:n,url:r,type:i,outerType:a,apiKeys:o,notifyEmailAddress:s,identifiers:c,dependentDataSilos:d,owners:f,country:m,countrySubDivision:h,teams:g,subjectBlocklist:_,isLive:v,promptAVendorEmailSendFrequency:y,promptAVendorEmailSendType:b,promptAVendorEmailIncludeIdentifiersAttachment:x,promptAVendorEmailCompletionLinkType:S,manualWorkRetryFrequency:C,catalog:w,attributeValues:T,discoveredBy:E,businessEntities:D,sombra:ee},te])=>({title:t,description:n,integrationName:i,"outer-type":a||void 0,url:r||void 0,"api-key-title":o[0]?.title,"sombra-id":ee?.id||void 0,"identity-keys":c.filter(({isConnected:e})=>e).map(({name:e})=>e),...d.length>0?{"deletion-dependencies":d.map(({title:e})=>e)}:{},...f.length>0?{owners:f.map(({email:e})=>e)}:{},...g.length>0?{teams:g.map(({name:e})=>e)}:{},...E.length>0?{discoveredBy:E.map(({title:e})=>e)}:{},...D.length>0?{businessEntities:D.map(({title:e})=>e)}:{},country:m||void 0,countrySubDivision:h||void 0,disabled:!v,"data-subjects":_.length>0?p(_.map(({type:e})=>e),e):void 0,...w.hasAvcFunctionality?{"email-settings":{"notify-email-address":s||void 0,"send-frequency":y,"send-type":b,"include-identifiers-attachment":x,"completion-link-type":S,"manual-work-retry-frequency":C}}:{},attributes:T!==void 0&&T.length>0?O(T):void 0,datapoints:te.map(e=>({key:e.name,title:e.title?.defaultMessage,description:e.description?.defaultMessage,owners:e.owners.map(({email:e})=>e),teams:e.teams.map(({name:e})=>e),...e.path.length>0?{path:e.path}:{},...e.dataCollection?.title?{"data-collection-tag":e.dataCollection.title.defaultMessage}:{},...e.dbIntegrationQueries.length>0?{"privacy-action-queries":u(l(e.dbIntegrationQueries,`requestType`),e=>e.suggestedQuery||e.query||void 0)}:{},...e.subDataPoints.length>0?{fields:e.subDataPoints.map(e=>({key:e.name,description:e.description,purposes:e.purposes,categories:e.categories,...z&&e.pendingCategoryGuesses?{"guessed-categories":e.pendingCategoryGuesses.filter(e=>e.status===`PENDING`).map(e=>({category:{name:e.category.name,category:e.category.category},status:e.status,confidence:e.confidence,classifierVersion:e.classifierVersion||void 0}))}:{},"access-request-visibility-enabled":e.accessRequestVisibilityEnabled,"erasure-request-redaction-enabled":e.erasureRequestRedactionEnabled,attributes:e.attributeValues!==void 0&&e.attributeValues.length>0?O(e.attributeValues):void 0})).sort((e,t)=>e.key.localeCompare(t.key))}:{},"privacy-actions":e.actionSettings.filter(({active:e})=>e).map(({type:e})=>e)})).sort((e,t)=>[...e.path??[],e.key].join(`.`).localeCompare([...t.path??[],t.key].join(`.`)))}))}return Q}export{P as i,L as n,F as r,I as t};
|
|
58
|
-
//# sourceMappingURL=pullTranscendConfiguration-Cdg8JEii.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pullTranscendConfiguration-Cdg8JEii.mjs","names":[],"sources":["../src/lib/graphql/gqls/assessmentTemplate.ts","../src/lib/graphql/fetchAllAssessmentTemplates.ts","../src/lib/graphql/pullTranscendConfiguration.ts"],"sourcesContent":["import { ASSESSMENT_SECTION_FIELDS } from '@transcend-io/sdk';\nimport { gql } from 'graphql-request';\n\n// TODO: https://transcend.height.app/T-27909 - enable optimizations\n// isExportCsv: true\n// useMaster: false\n// orderBy: [\n// { field: createdAt, direction: ASC }\n// { field: name, direction: ASC }\n// ]\nexport const ASSESSMENT_TEMPLATES = gql`\n query TranscendCliAssessmentTemplates(\n $first: Int!\n $offset: Int!\n $filterBy: AssessmentFormTemplateFiltersInput\n ) {\n assessmentFormTemplates(\n first: $first\n offset: $offset\n filterBy: $filterBy\n ) {\n nodes {\n id\n creator {\n id\n email\n name\n }\n lastEditor {\n id\n email\n name\n }\n title\n description\n status\n source\n parentId\n isLocked\n isArchived\n createdAt\n updatedAt\n retentionSchedule {\n id\n type\n durationDays\n operation\n createdAt\n updatedAt\n }\n assessmentEmailSet {\n id\n title\n description\n isDefault\n templates {\n id\n title\n }\n }\n sections {\n ${ASSESSMENT_SECTION_FIELDS}\n }\n }\n }\n }\n`;\n","import {\n AssessmentFormTemplateSource,\n AssessmentFormTemplateStatus,\n} from '@transcend-io/privacy-types';\nimport {\n makeGraphQLRequest,\n type AssessmentSection,\n type RetentionSchedule,\n type UserPreview,\n} from '@transcend-io/sdk';\nimport { GraphQLClient } from 'graphql-request';\n\nimport { logger } from '../../logger.js';\nimport { ASSESSMENT_TEMPLATES } from './gqls/index.js';\n\n/**\n * Represents an assessment template with various properties and metadata.\n */\nexport interface AssessmentTemplate {\n /** The ID of the assessment template */\n id: string;\n /** The user who created the assessment template */\n creator: UserPreview;\n /** The user who last edited the assessment template */\n lastEditor: UserPreview;\n /** The title of the assessment template */\n title: string;\n /** The description of the assessment template */\n description: string;\n /** The current status of the assessment template */\n status: AssessmentFormTemplateStatus;\n /** The source fo the form template */\n source: AssessmentFormTemplateSource;\n /** ID of parent template */\n parentId: string;\n /** Indicates if the assessment template is locked */\n isLocked: boolean;\n /** Indicates if the assessment template is archived */\n isArchived: boolean;\n /** The date when the assessment template was created */\n createdAt: string;\n /** The date when the assessment template was last updated */\n updatedAt: string;\n /** The retention schedule of the assessment template */\n retentionSchedule?: RetentionSchedule;\n /** The sections of the assessment template */\n sections: AssessmentSection[];\n}\n\nconst PAGE_SIZE = 20;\n\n/**\n * Fetch all assessment templates in the organization\n *\n * @param client - GraphQL client\n * @returns All assessment templates in the organization\n */\nexport async function fetchAllAssessmentTemplates(\n client: GraphQLClient,\n): Promise<AssessmentTemplate[]> {\n const assessmentTemplates: AssessmentTemplate[] = [];\n let offset = 0;\n\n let shouldContinue = false;\n do {\n const {\n assessmentFormTemplates: { nodes },\n } = await makeGraphQLRequest<{\n /** Templates */\n assessmentFormTemplates: {\n /** Nodes */\n nodes: AssessmentTemplate[];\n };\n }>(client, ASSESSMENT_TEMPLATES, {\n variables: { first: PAGE_SIZE, offset },\n logger,\n });\n assessmentTemplates.push(...nodes);\n offset += PAGE_SIZE;\n shouldContinue = nodes.length === PAGE_SIZE;\n } while (shouldContinue);\n\n return assessmentTemplates.sort((a, b) => a.title.localeCompare(b.title));\n}\n","import { LocaleValue } from '@transcend-io/internationalization';\nimport {\n RequestAction,\n ConsentTrackerStatus,\n ActionItemCode,\n RetentionType,\n PreferenceTopicType,\n WorkflowConfigType,\n type ConsentThemeInput,\n type ConsentVariantInput,\n} from '@transcend-io/privacy-types';\nimport {\n fetchAllActionItemCollections,\n fetchAllActionItems,\n fetchAllActions,\n fetchAllAgentFiles,\n fetchAllAgentFunctions,\n fetchAllAgents,\n fetchAllAssessments,\n fetchAllAttributes,\n fetchAllBusinessEntities,\n fetchAllCookies,\n fetchAllDataCategories,\n fetchAllDataFlows,\n fetchAllPolicies,\n fetchAllPrivacyCenters,\n fetchAllProcessingPurposes,\n fetchAllSiloDiscoveryResults,\n fetchAllTemplates,\n fetchConsentManager,\n fetchConsentManagerExperiences,\n fetchConsentVariants,\n fetchConsentThemes,\n fetchConsentManagerTheme,\n fetchAllEnrichers,\n fetchAllIdentifiers,\n fetchAllMessages,\n fetchAllPromptGroups,\n fetchAllPromptPartials,\n fetchAllProcessingActivities,\n fetchAllPrompts,\n fetchAllPurposesAndPreferences,\n fetchAllWorkflowConfigs,\n fetchAllPreferenceOptionValues,\n fetchPartitions,\n fetchAllTeams,\n fetchAllVendors,\n fetchApiKeys,\n formatAttributeValues,\n formatRegions,\n parseAssessmentDisplayLogic,\n parseAssessmentRiskLogic,\n convertToDataSubjectAllowlist,\n fetchAllDataSubjects,\n fetchEnrichedDataSilos,\n workflowConfigMatchKey,\n type AssessmentRule,\n} from '@transcend-io/sdk';\nimport colors from 'colors';\nimport { GraphQLClient } from 'graphql-request';\nimport { flatten, groupBy, keyBy, mapValues } from 'lodash-es';\n\n/* eslint-disable max-lines */\nimport {\n TranscendInput,\n ApiKeyInput,\n DataSiloInput,\n AttributeInput,\n ActionInput,\n IdentifierInput,\n BusinessEntityInput,\n EnricherInput,\n PromptGroupInput,\n DataFlowInput,\n PromptPartialInput,\n DataSubjectInput,\n CookieInput,\n PromptInput,\n DatapointInput,\n FieldInput,\n ProcessingPurposeInput,\n ProcessingActivityInput,\n DataCategoryInput,\n VendorInput,\n AgentFileInput,\n AgentFunctionInput,\n AgentInput,\n PolicyInput,\n IntlMessageInput,\n ActionItemInput,\n TeamInput,\n ActionItemCollectionInput,\n AssessmentInput,\n AssessmentTemplateInput,\n AssessmentSectionInput,\n AssessmentSectionQuestionInput,\n RiskLogicInput,\n ConsentPurpose,\n WorkflowConfigInput,\n ConsentPreferenceTopic,\n ConsentPreferenceTopicOptionValue,\n type SiloDiscoveryResultInput,\n} from '../../codecs.js';\nimport { TranscendPullResource } from '../../enums.js';\nimport { logger } from '../../logger.js';\nimport { fetchAllAssessmentTemplates } from './fetchAllAssessmentTemplates.js';\n\nexport const DEFAULT_TRANSCEND_PULL_RESOURCES = [\n TranscendPullResource.DataSilos,\n TranscendPullResource.Enrichers,\n TranscendPullResource.Templates,\n TranscendPullResource.ApiKeys,\n];\n\nexport interface TranscendPullConfigurationInput {\n /** Page size */\n pageSize: number;\n /** Enable debug logs */\n debug: boolean;\n /** The data silo IDs to sync. If empty list, pull all. */\n dataSiloIds: string[];\n /** Resources to pull in */\n resources?: TranscendPullResource[];\n /** The data silo types to sync.If empty list, pull all. */\n integrationNames: string[];\n /** The tracker statuses to pull */\n trackerStatuses?: ConsentTrackerStatus[];\n /** Skip fetching of datapoints */\n skipDatapoints?: boolean;\n /** Skip fetching of subdatapoints */\n skipSubDatapoints?: boolean;\n /** When true, metadata around guessed data categories should be included */\n includeGuessedCategories?: boolean;\n}\n\n/**\n * Pull a yaml configuration from Transcend\n *\n * @param client - GraphQL client\n * @param dataSiloIds - The data silos to sync. If empty list, pull all.\n * @returns The configuration\n */\nexport async function pullTranscendConfiguration(\n client: GraphQLClient,\n {\n dataSiloIds,\n integrationNames,\n debug,\n resources = DEFAULT_TRANSCEND_PULL_RESOURCES,\n pageSize,\n skipDatapoints,\n includeGuessedCategories,\n skipSubDatapoints,\n trackerStatuses = Object.values(ConsentTrackerStatus),\n }: TranscendPullConfigurationInput,\n): Promise<TranscendInput> {\n if (dataSiloIds.length > 0 && integrationNames.length > 0) {\n throw new Error('Only 1 of integrationNames OR dataSiloIds can be provided');\n }\n\n logger.info(colors.magenta(`Fetching data with page size ${pageSize}...`));\n\n // Fetch all data, but only conditional fetch data that is requested\n const [\n dataSubjects,\n apiKeyTitleMap,\n dataSilos,\n enrichers,\n dataFlows,\n cookies,\n attributes,\n templates,\n identifiers,\n actions,\n businessEntities,\n processingActivities,\n consentManager,\n consentManagerExperiences,\n consentVariants,\n consentThemes,\n prompts,\n promptPartials,\n promptGroups,\n agents,\n agentFunctions,\n agentFiles,\n vendors,\n dataCategories,\n processingPurposes,\n actionItems,\n actionItemCollections,\n teams,\n policies,\n privacyCenters,\n messages,\n partitions,\n assessments,\n assessmentTemplates,\n purposes,\n workflowConfigs,\n preferenceOptionValues,\n siloDiscoveryResults,\n ] = await Promise.all([\n // Grab all data subjects in the organization\n resources.includes(TranscendPullResource.DataSilos) ||\n resources.includes(TranscendPullResource.DataSubjects)\n ? fetchAllDataSubjects(client, { logger })\n : [],\n // Grab API keys\n resources.includes(TranscendPullResource.ApiKeys)\n ? fetchApiKeys(client, { fetchAll: true, logger })\n : [],\n // Fetch the data silos\n resources.includes(TranscendPullResource.DataSilos)\n ? fetchEnrichedDataSilos(client, {\n ids: dataSiloIds,\n integrationNames,\n pageSize,\n debug,\n includeGuessedCategories,\n skipDatapoints,\n skipSubDatapoints,\n logger,\n })\n : [],\n // Fetch enrichers\n resources.includes(TranscendPullResource.Enrichers)\n ? fetchAllEnrichers(client, { logger })\n : [],\n // Fetch data flows\n resources.includes(TranscendPullResource.DataFlows)\n ? [\n ...(trackerStatuses.includes(ConsentTrackerStatus.Live)\n ? await fetchAllDataFlows(client, {\n logger,\n filterBy: { status: ConsentTrackerStatus.Live },\n })\n : []),\n ...(trackerStatuses.includes(ConsentTrackerStatus.NeedsReview)\n ? await fetchAllDataFlows(client, {\n logger,\n filterBy: { status: ConsentTrackerStatus.NeedsReview },\n })\n : []),\n ]\n : [],\n // Fetch data flows\n resources.includes(TranscendPullResource.Cookies)\n ? [\n ...(trackerStatuses.includes(ConsentTrackerStatus.Live)\n ? await fetchAllCookies(client, {\n logger,\n filterBy: { status: ConsentTrackerStatus.Live },\n })\n : []),\n ...(trackerStatuses.includes(ConsentTrackerStatus.NeedsReview)\n ? await fetchAllCookies(client, {\n logger,\n filterBy: { status: ConsentTrackerStatus.NeedsReview },\n })\n : []),\n ]\n : [],\n // Fetch attributes\n resources.includes(TranscendPullResource.Attributes)\n ? fetchAllAttributes(client, { logger })\n : [],\n // Fetch email templates\n resources.includes(TranscendPullResource.Templates)\n ? fetchAllTemplates(client, { logger })\n : [],\n // Fetch identifiers\n resources.includes(TranscendPullResource.Identifiers)\n ? fetchAllIdentifiers(client, { logger })\n : [],\n // Fetch actions\n resources.includes(TranscendPullResource.Actions) ? fetchAllActions(client, { logger }) : [],\n // Fetch business entities\n resources.includes(TranscendPullResource.BusinessEntities)\n ? fetchAllBusinessEntities(client, { logger })\n : [],\n // Fetch processing activities\n resources.includes(TranscendPullResource.ProcessingActivities)\n ? fetchAllProcessingActivities(client, { logger })\n : [],\n // Fetch consent manager\n resources.includes(TranscendPullResource.ConsentManager)\n ? fetchConsentManager(client, { logger })\n : undefined,\n // Fetch consent manager experiences\n resources.includes(TranscendPullResource.ConsentManager)\n ? fetchConsentManagerExperiences(client, { logger })\n : [],\n // Fetch consent manager consent variants\n resources.includes(TranscendPullResource.ConsentManager)\n ? fetchConsentVariants(client, { logger })\n : [],\n // Fetch consent manager consent themes\n resources.includes(TranscendPullResource.ConsentManager)\n ? fetchConsentThemes(client, { logger })\n : [],\n // Fetch prompts\n resources.includes(TranscendPullResource.Prompts) ? fetchAllPrompts(client, { logger }) : [],\n // Fetch promptPartials\n resources.includes(TranscendPullResource.PromptPartials)\n ? fetchAllPromptPartials(client, { logger })\n : [],\n // Fetch promptGroups\n resources.includes(TranscendPullResource.PromptGroups)\n ? fetchAllPromptGroups(client, { logger })\n : [],\n // Fetch agents\n resources.includes(TranscendPullResource.Agents) ? fetchAllAgents(client, { logger }) : [],\n // Fetch agentFunctions\n resources.includes(TranscendPullResource.AgentFunctions)\n ? fetchAllAgentFunctions(client, { logger })\n : [],\n // Fetch agentFiles\n resources.includes(TranscendPullResource.AgentFiles)\n ? fetchAllAgentFiles(client, { logger })\n : [],\n // Fetch vendors\n resources.includes(TranscendPullResource.Vendors) ? fetchAllVendors(client, { logger }) : [],\n // Fetch dataCategories\n resources.includes(TranscendPullResource.DataCategories)\n ? fetchAllDataCategories(client, { logger })\n : [],\n // Fetch dataCategories\n resources.includes(TranscendPullResource.ProcessingPurposes)\n ? fetchAllProcessingPurposes(client, { logger })\n : [],\n // Fetch actionItems\n resources.includes(TranscendPullResource.ActionItems)\n ? fetchAllActionItems(client, {\n logger,\n filterBy: { type: [ActionItemCode.Onboarding] },\n })\n : [],\n // Fetch actionItemCollections\n resources.includes(TranscendPullResource.ActionItemCollections)\n ? fetchAllActionItemCollections(client, { logger })\n : [],\n // Fetch teams\n resources.includes(TranscendPullResource.Teams) ? fetchAllTeams(client, { logger }) : [],\n // Fetch policies\n resources.includes(TranscendPullResource.Policies) ? fetchAllPolicies(client, { logger }) : [],\n // Fetch privacy centers\n resources.includes(TranscendPullResource.PrivacyCenters)\n ? fetchAllPrivacyCenters(client, { logger })\n : [],\n // Fetch messages\n resources.includes(TranscendPullResource.Messages) ? fetchAllMessages(client, { logger }) : [],\n // Fetch partitions\n resources.includes(TranscendPullResource.Partitions) ? fetchPartitions(client, { logger }) : [],\n // Fetch assessments\n resources.includes(TranscendPullResource.Assessments)\n ? fetchAllAssessments(client, { logger })\n : [],\n // Fetch assessmentTemplates\n resources.includes(TranscendPullResource.AssessmentTemplates)\n ? fetchAllAssessmentTemplates(client)\n : [],\n // Fetch purpose and preferences\n resources.includes(TranscendPullResource.Purposes)\n ? fetchAllPurposesAndPreferences(client, { logger })\n : [],\n resources.includes(TranscendPullResource.WorkflowConfigs)\n ? fetchAllWorkflowConfigs(client, {\n logger,\n workflowConfigType: WorkflowConfigType.DSR,\n })\n : [],\n resources.includes(TranscendPullResource.PreferenceOptions)\n ? fetchAllPreferenceOptionValues(client, { logger })\n : [],\n // Fetch silo discovery results\n resources.includes(TranscendPullResource.SystemDiscovery)\n ? fetchAllSiloDiscoveryResults(client, { logger })\n : [],\n ]);\n\n const consentManagerTheme =\n resources.includes(TranscendPullResource.ConsentManager) && consentManager\n ? await fetchConsentManagerTheme(client, {\n logger,\n filterBy: { airgapBundleId: consentManager.id },\n })\n : undefined;\n\n const result: TranscendInput = {};\n\n // Save API keys\n const apiKeyTitles = flatten(dataSilos.map(([{ apiKeys }]) => apiKeys.map(({ title }) => title)));\n const relevantApiKeys = Object.values(apiKeyTitleMap).filter(({ title }) =>\n resources.includes(TranscendPullResource.ApiKeys) ? true : apiKeyTitles.includes(title),\n );\n if (relevantApiKeys.length > 0 && resources.includes(TranscendPullResource.ApiKeys)) {\n result['api-keys'] = relevantApiKeys.map(\n ({ title }): ApiKeyInput => ({\n title,\n }),\n );\n }\n\n // Save Partitions\n if (partitions.length > 0 && resources.includes(TranscendPullResource.Partitions)) {\n result.partitions = partitions.map(({ name, partition }) => ({\n name,\n partition,\n }));\n }\n\n // Save Consent Manager\n if (consentManager && resources.includes(TranscendPullResource.ConsentManager)) {\n result['consent-manager'] = {\n bundleUrls: {\n TEST: consentManager.testBundleURL,\n PRODUCTION: consentManager.bundleURL,\n },\n domains: consentManager.configuration.domains || undefined,\n partition: consentManager.configuration.partition || undefined,\n consentPrecedence: consentManager.configuration.consentPrecedence || undefined,\n unknownRequestPolicy: consentManager.configuration.unknownRequestPolicy || undefined,\n unknownCookiePolicy: consentManager.configuration.unknownCookiePolicy || undefined,\n syncEndpoint: consentManager.configuration.syncEndpoint || undefined,\n telemetryPartitioning: consentManager.configuration.telemetryPartitioning || undefined,\n signedIabAgreement: consentManager.configuration.signedIabAgreement || undefined,\n // TODO: https://transcend.height.app/T-23919 - reconsider simpler yml shape\n syncGroups: consentManager.configuration.syncGroups || undefined,\n theme: !consentManagerTheme\n ? undefined\n : {\n primaryColor: consentManagerTheme.primaryColor || undefined,\n fontColor: consentManagerTheme.fontColor || undefined,\n privacyPolicy: consentManagerTheme.privacyPolicy || undefined,\n prompt: consentManagerTheme.prompt,\n },\n experiences: consentManagerExperiences.map((experience) => ({\n name: experience.name,\n displayName: experience.displayName || undefined,\n regions: experience.regions.map((region) => ({\n countrySubDivision: region.countrySubDivision || undefined,\n country: region.country || undefined,\n })),\n onConsentExpiry: experience.onConsentExpiry,\n consentExpiry: experience.consentExpiry,\n operator: experience.operator,\n displayPriority: experience.displayPriority,\n viewState: experience.viewState,\n purposes: experience.purposes.map((purpose) => ({\n trackingType: purpose.trackingType,\n })),\n optedOutPurposes: experience.optedOutPurposes.map((purpose) => ({\n trackingType: purpose.trackingType,\n })),\n browserLanguages: experience.browserLanguages,\n browserTimeZones: experience.browserTimeZones,\n consentUiVariantSlug: experience.consentUiVariant?.slug,\n })),\n consentVariants: consentVariants.map(\n (variant): ConsentVariantInput => ({\n id: variant.id,\n name: variant.name,\n slug: variant.slug,\n description: variant.description,\n configuration: JSON.stringify(variant.configuration),\n locales: variant.locales as LocaleValue[],\n status: variant.status,\n userFlow: variant.userFlow,\n themeSlug: variant.theme?.slug,\n }),\n ),\n consentThemes: consentThemes.map(\n (theme): ConsentThemeInput => ({\n id: theme.id,\n name: theme.name,\n slug: theme.slug,\n configuration: JSON.stringify(theme.configuration),\n }),\n ),\n };\n }\n\n // Save assessments\n if (assessments.length > 0 && resources.includes(TranscendPullResource.Assessments)) {\n result.assessments = assessments.map(\n ({\n title,\n assessmentGroup,\n sections,\n creator,\n description,\n status,\n assignees,\n externalAssignees,\n reviewers,\n isLocked,\n isArchived,\n isExternallyCreated,\n dueDate,\n createdAt,\n assignedAt,\n submittedAt,\n approvedAt,\n rejectedAt,\n titleIsInternal,\n retentionSchedule,\n attributeValues,\n resources,\n syncedRows,\n }): AssessmentInput => ({\n title,\n group: assessmentGroup.title,\n sections: sections.map(\n ({\n title,\n status,\n questions,\n assignees,\n isReviewed,\n externalAssignees,\n }): AssessmentSectionInput => ({\n title,\n status,\n questions: questions.map(\n ({\n title,\n type,\n subType,\n placeholder,\n description,\n isRequired,\n referenceId,\n displayLogic,\n riskLogic,\n riskCategories,\n riskFramework,\n answerOptions,\n selectedAnswers,\n allowedMimeTypes,\n allowSelectOther,\n syncModel,\n syncColumn,\n attributeKey,\n requireRiskEvaluation,\n requireRiskMatrixEvaluation,\n }): AssessmentSectionQuestionInput => {\n const displayLogicParsed = displayLogic\n ? parseAssessmentDisplayLogic(displayLogic)\n : undefined;\n return {\n title,\n type,\n 'sub-type': subType,\n placeholder,\n description,\n 'is-required': isRequired,\n 'reference-id': referenceId,\n 'display-logic':\n displayLogicParsed && Object.keys(displayLogicParsed).length > 0\n ? {\n action: displayLogicParsed.action!,\n rule: displayLogicParsed.rule\n ? {\n 'depends-on-question-reference-id':\n displayLogicParsed.rule.dependsOnQuestionReferenceId,\n 'comparison-operator': displayLogicParsed.rule.comparisonOperator,\n 'comparison-operands':\n // Safely access property with a check\n 'comparisonOperands' in displayLogicParsed.rule\n ? displayLogicParsed.rule.comparisonOperands\n : undefined,\n }\n : undefined,\n 'nested-rule': displayLogicParsed.nestedRule\n ? {\n 'logic-operator': displayLogicParsed.nestedRule.logicOperator,\n rules: (displayLogicParsed.nestedRule.rules || []).map(\n (rule: AssessmentRule) => ({\n 'depends-on-question-reference-id':\n rule.dependsOnQuestionReferenceId,\n 'comparison-operator': rule.comparisonOperator,\n 'comparison-operands':\n // Safely access property on the nested rule\n 'comparisonOperands' in rule\n ? rule.comparisonOperands\n : undefined,\n }),\n ),\n }\n : undefined,\n }\n : undefined,\n 'risk-logic': riskLogic.map((logic): RiskLogicInput => {\n const parsed = parseAssessmentRiskLogic(logic);\n return {\n 'risk-level': parsed.riskAssignment?.riskLevelId,\n 'comparison-operands': parsed.comparisonOperands,\n 'comparison-operator': parsed.comparisonOperator,\n };\n }),\n 'risk-categories': riskCategories.map(({ title }) => title),\n 'risk-framework': riskFramework?.title,\n 'answer-options': answerOptions.map(({ value }) => ({\n value,\n })),\n 'selected-answers': selectedAnswers.map(({ value }) => value),\n 'allowed-mime-types': allowedMimeTypes,\n 'allow-select-other': allowSelectOther,\n 'sync-model': syncModel || undefined,\n 'sync-column': syncColumn || undefined,\n 'attribute-key': attributeKey?.name,\n 'require-risk-evaluation': requireRiskEvaluation,\n 'require-risk-matrix-evaluation': requireRiskMatrixEvaluation,\n };\n },\n ),\n assignees: assignees.map(({ email }) => email),\n 'external-assignees': externalAssignees.map(({ email }) => email),\n 'is-reviewed': isReviewed,\n }),\n ),\n creator: creator?.email,\n description,\n status,\n assignees: assignees.map(({ email }) => email),\n 'external-assignees': externalAssignees.map(({ email }) => email),\n reviewers: reviewers.map(({ email }) => email),\n locked: isLocked,\n archived: isArchived,\n external: isExternallyCreated,\n 'title-is-internal': titleIsInternal,\n 'due-date': dueDate || undefined,\n 'created-at': createdAt || undefined,\n 'assigned-at': assignedAt || undefined,\n 'submitted-at': submittedAt || undefined,\n 'approved-at': approvedAt || undefined,\n 'rejected-at': rejectedAt || undefined,\n 'retention-schedule': retentionSchedule\n ? {\n type: retentionSchedule.type,\n 'duration-days': retentionSchedule.durationDays,\n operand: retentionSchedule.operation,\n }\n : undefined,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n resources: resources.map(({ resourceType, title, name, category, type, purpose }) => ({\n type: resourceType,\n title: category\n ? `${category} - ${name}`\n : purpose\n ? `${purpose} - ${name}`\n : title || name || type || '',\n })),\n rows: syncedRows.map(({ resourceType, title, name, category, type, purpose }) => ({\n type: resourceType,\n title: category\n ? `${category} - ${name}`\n : purpose\n ? `${purpose} - ${name}`\n : title || name || type || '',\n })),\n }),\n );\n }\n\n // Save assessmentTemplates\n if (\n assessmentTemplates.length > 0 &&\n resources.includes(TranscendPullResource.AssessmentTemplates)\n ) {\n result['assessment-templates'] = assessmentTemplates.map(\n ({\n title,\n description,\n sections,\n status,\n source,\n creator,\n isLocked,\n isArchived,\n createdAt,\n retentionSchedule,\n }): AssessmentTemplateInput => ({\n title,\n description,\n sections: sections.map(\n ({ title, questions }): AssessmentSectionInput => ({\n title,\n questions: questions.map(\n ({\n title,\n type,\n subType,\n placeholder,\n description,\n isRequired,\n referenceId,\n displayLogic,\n riskLogic,\n riskCategories,\n riskFramework,\n answerOptions,\n allowedMimeTypes,\n allowSelectOther,\n syncModel,\n syncColumn,\n attributeKey,\n requireRiskEvaluation,\n requireRiskMatrixEvaluation,\n }): AssessmentSectionQuestionInput => {\n const displayLogicParsed = displayLogic\n ? parseAssessmentDisplayLogic(displayLogic)\n : undefined;\n return {\n title,\n type,\n 'sub-type': subType,\n placeholder,\n description,\n 'is-required': isRequired,\n 'reference-id': referenceId,\n 'display-logic':\n displayLogicParsed && Object.keys(displayLogicParsed).length > 0\n ? {\n action: displayLogicParsed.action!,\n rule: displayLogicParsed.rule\n ? {\n 'depends-on-question-reference-id':\n displayLogicParsed.rule.dependsOnQuestionReferenceId,\n 'comparison-operator': displayLogicParsed.rule.comparisonOperator,\n 'comparison-operands':\n // Safely access property with a check\n 'comparisonOperands' in displayLogicParsed.rule\n ? displayLogicParsed.rule.comparisonOperands\n : undefined,\n }\n : undefined,\n 'nested-rule': displayLogicParsed.nestedRule\n ? {\n 'logic-operator': displayLogicParsed.nestedRule.logicOperator,\n rules: (displayLogicParsed.nestedRule.rules || []).map(\n (rule: AssessmentRule) => ({\n 'depends-on-question-reference-id':\n rule.dependsOnQuestionReferenceId,\n 'comparison-operator': rule.comparisonOperator,\n 'comparison-operands':\n // Safely access property on the nested rule\n 'comparisonOperands' in rule\n ? rule.comparisonOperands\n : undefined,\n }),\n ),\n }\n : undefined,\n }\n : undefined,\n 'risk-logic': riskLogic.map((logic): RiskLogicInput => {\n const parsed = parseAssessmentRiskLogic(logic);\n return {\n 'risk-level': parsed.riskAssignment?.riskLevelId,\n 'risk-matrix-row': parsed.riskAssignment?.riskMatrixRowId,\n 'risk-matrix-column': parsed.riskAssignment?.riskMatrixColumnId,\n 'comparison-operands': parsed.comparisonOperands,\n 'comparison-operator': parsed.comparisonOperator,\n };\n }),\n 'risk-categories': riskCategories.map(({ title }) => title),\n 'risk-framework': riskFramework?.title,\n 'answer-options': answerOptions.map(({ value }) => ({\n value,\n })),\n 'allowed-mime-types': allowedMimeTypes,\n 'allow-select-other': allowSelectOther,\n 'sync-model': syncModel || undefined,\n 'sync-column': syncColumn || undefined,\n 'attribute-key': attributeKey?.name,\n 'require-risk-evaluation': requireRiskEvaluation,\n 'require-risk-matrix-evaluation': requireRiskMatrixEvaluation,\n };\n },\n ),\n }),\n ),\n status,\n source,\n creator: creator?.email,\n locked: isLocked,\n archived: isArchived,\n 'created-at': createdAt || undefined,\n 'retention-schedule': retentionSchedule\n ? {\n type: retentionSchedule.type,\n 'duration-days': retentionSchedule.durationDays,\n operand: retentionSchedule.operation,\n }\n : undefined,\n }),\n );\n }\n\n // Save Silo Discovery Results\n if (\n siloDiscoveryResults.length > 0 &&\n resources.includes(TranscendPullResource.SystemDiscovery)\n ) {\n result['system-discovery'] = siloDiscoveryResults.map(\n ({\n title,\n resourceId,\n suggestedCatalog: { title: suggestedCatalogTitle },\n plugin: {\n dataSilo: { title: dataSiloTitle },\n },\n country,\n countrySubDivision,\n plaintextContext,\n containsSensitiveData,\n status,\n }): SiloDiscoveryResultInput => ({\n title,\n resourceId,\n suggestedCatalog: suggestedCatalogTitle,\n plugin: dataSiloTitle,\n country: country || undefined,\n countrySubDivision: countrySubDivision || undefined,\n plaintextContext,\n containsSensitiveData,\n status,\n }),\n );\n }\n\n // Save prompts\n if (prompts.length > 0 && resources.includes(TranscendPullResource.Prompts)) {\n result.prompts = prompts.map(\n ({ title, content }): PromptInput => ({\n title,\n content,\n }),\n );\n }\n\n // Save promptPartials\n if (promptPartials.length > 0 && resources.includes(TranscendPullResource.PromptPartials)) {\n result['prompt-partials'] = promptPartials.map(\n ({ title, content }): PromptPartialInput => ({\n title,\n content,\n }),\n );\n }\n\n // Save promptGroups\n if (promptGroups.length > 0 && resources.includes(TranscendPullResource.PromptGroups)) {\n result['prompt-groups'] = promptGroups.map(\n ({ title, description, prompts }): PromptGroupInput => ({\n title,\n description,\n prompts: prompts.map(({ title }) => title),\n }),\n );\n }\n\n // Save teams\n if (teams.length > 0 && resources.includes(TranscendPullResource.Teams)) {\n result.teams = teams.map(\n ({\n name,\n description,\n ssoDepartment,\n ssoGroup,\n ssoTitle,\n users,\n scopes,\n parentTeam,\n }): TeamInput => ({\n name,\n description,\n 'sso-department': ssoDepartment || undefined,\n 'sso-group': ssoGroup || undefined,\n 'sso-title': ssoTitle || undefined,\n 'parent-team-name': parentTeam?.name,\n users: users.map(({ email }) => email),\n scopes: scopes.map(({ name }) => name),\n }),\n );\n }\n\n // Save Data Subjects\n if (dataSubjects.length > 0 && resources.includes(TranscendPullResource.DataSubjects)) {\n result['data-subjects'] = dataSubjects.map(\n ({ type, title, active, adminDashboardDefaultSilentMode, actions }): DataSubjectInput => ({\n type,\n title: title?.defaultMessage,\n active,\n adminDashboardDefaultSilentMode,\n actions: actions.map(({ type }) => type),\n }),\n );\n }\n\n // Save privacy policies\n if (policies.length > 0) {\n result.policies = policies.map(\n ({ title, versions, disabledLocales }): PolicyInput => ({\n title: title?.defaultMessage,\n content: versions?.[0]?.content?.defaultMessage,\n disabledLocales,\n }),\n );\n }\n\n // Save messages\n if (messages.length > 0) {\n result.messages = messages.map(\n ({ id, defaultMessage, targetReactIntlId, description, translations }): IntlMessageInput => ({\n id,\n defaultMessage,\n description,\n targetReactIntlId: targetReactIntlId || undefined,\n translations: translations.reduce(\n (acc, { locale, value }) => Object.assign(acc, { [locale]: value }),\n {} as Record<LocaleValue, string>,\n ),\n }),\n );\n }\n\n // Save privacy center\n if (privacyCenters.length > 0) {\n const privacyCenter = privacyCenters[0];\n result['privacy-center'] = {\n isDisabled: privacyCenter.isDisabled,\n showPrivacyRequestButton: privacyCenter.showPrivacyRequestButton,\n showPolicies: privacyCenter.showPolicies,\n showTrackingTechnologies: privacyCenter.showTrackingTechnologies,\n showCookies: privacyCenter.showCookies,\n showDataFlows: privacyCenter.showDataFlows,\n showConsentManager: privacyCenter.showConsentManager,\n showManageYourPrivacy: privacyCenter.showManageYourPrivacy,\n showMarketingPreferences: privacyCenter.showMarketingPreferences,\n locales: privacyCenter.locales,\n defaultLocale: privacyCenter.defaultLocale,\n preferBrowserDefaultLocale: privacyCenter.preferBrowserDefaultLocale,\n supportEmail: privacyCenter.supportEmail || undefined,\n replyToEmail: privacyCenter.replyToEmail || undefined,\n useNoReplyEmailAddress: privacyCenter.useNoReplyEmailAddress,\n useCustomEmailDomain: privacyCenter.useCustomEmailDomain,\n transformAccessReportJsonToCsv: privacyCenter.transformAccessReportJsonToCsv,\n home: privacyCenter.home || undefined,\n expandSideMenuByDefault: privacyCenter.expandSideMenuByDefault,\n workflowsCustomFieldsRequired: privacyCenter.workflowsCustomFieldsRequired,\n footerLayout: privacyCenter.footerLayout,\n ...(privacyCenter.childOrganizations.length > 0\n ? {\n displayedChildOrganizationUris: privacyCenter.childOrganizations.map(\n (child) => child.uri,\n ),\n }\n : {}),\n ...(privacyCenter.footerLinks.length > 0\n ? {\n footerLinks: [...privacyCenter.footerLinks]\n .sort((a, b) => a.displayOrder - b.displayOrder)\n .map((link) => ({\n title: link.title.defaultMessage,\n ...(link.url ? { url: link.url } : {}),\n ...(link.iconOnly ? { iconOnly: link.iconOnly } : {}),\n })),\n }\n : {}),\n theme: privacyCenter.theme,\n };\n }\n\n // Save business entities\n if (businessEntities.length > 0 && resources.includes(TranscendPullResource.BusinessEntities)) {\n result['business-entities'] = businessEntities.map(\n ({\n title,\n description,\n address,\n headquarterCountry,\n headquarterSubDivision,\n dataProtectionOfficerName,\n dataProtectionOfficerEmail,\n attributeValues,\n }): BusinessEntityInput => ({\n title,\n description: description || undefined,\n address: address || undefined,\n headquarterCountry: headquarterCountry || undefined,\n headquarterSubDivision: headquarterSubDivision || undefined,\n dataProtectionOfficerName: dataProtectionOfficerName || undefined,\n dataProtectionOfficerEmail: dataProtectionOfficerEmail || undefined,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save processing activities\n if (\n processingActivities.length > 0 &&\n resources.includes(TranscendPullResource.ProcessingActivities)\n ) {\n result['processing-activities'] = processingActivities.map(\n ({\n title,\n description,\n securityMeasureDetails,\n controllerships,\n storageRegions,\n transferRegions,\n retentionType,\n retentionPeriod,\n dataProtectionImpactAssessmentLink,\n dataProtectionImpactAssessmentStatus,\n attributeValues,\n dataSilos,\n dataSubjects,\n teams,\n owners,\n processingPurposeSubCategories,\n dataSubCategories,\n saaSCategories,\n }): ProcessingActivityInput => ({\n title,\n description,\n securityMeasureDetails: securityMeasureDetails ?? undefined,\n controllerships: controllerships.length > 0 ? controllerships : undefined,\n storageRegions: storageRegions.length > 0 ? formatRegions(storageRegions) : undefined,\n transferRegions: transferRegions.length > 0 ? formatRegions(transferRegions) : undefined,\n retentionType,\n retentionPeriod: retentionType === RetentionType.StatedPeriod ? retentionPeriod : undefined,\n dataProtectionImpactAssessmentLink: dataProtectionImpactAssessmentLink ?? undefined,\n dataProtectionImpactAssessmentStatus,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n dataSiloTitles: dataSilos.length > 0 ? dataSilos.map(({ title }) => title) : undefined,\n dataSubjectTypes:\n dataSubjects.length > 0 ? dataSubjects.map(({ type }) => type) : undefined,\n teamNames: teams.length > 0 ? teams.map(({ name }) => name) : undefined,\n ownerEmails: owners.length > 0 ? owners.map(({ email }) => email) : undefined,\n processingSubPurposes:\n processingPurposeSubCategories.length > 0\n ? processingPurposeSubCategories.map(({ name, purpose }) => ({\n purpose,\n ...(name ? { name } : {}),\n }))\n : undefined,\n dataSubCategories:\n dataSubCategories.length > 0\n ? dataSubCategories.map(({ name, category }) => ({\n category,\n ...(name ? { name } : {}),\n }))\n : undefined,\n saaSCategories:\n saaSCategories.length > 0 ? saaSCategories.map(({ title }) => title) : undefined,\n }),\n );\n }\n\n // Save Actions\n if (actions.length > 0 && resources.includes(TranscendPullResource.Actions)) {\n result.actions = actions.map(\n ({\n type,\n skipSecondaryIfNoFiles,\n skipDownloadableStep,\n requiresReview,\n regionList,\n regionDetectionMethod,\n waitingPeriod,\n }): ActionInput => ({\n type,\n ...(type === RequestAction.Erasure\n ? {\n skipSecondaryIfNoFiles,\n skipDownloadableStep,\n }\n : {}),\n requiresReview,\n waitingPeriod,\n regionDetectionMethod,\n regionList: regionList.length > 0 ? regionList : undefined,\n }),\n );\n }\n\n // Save identifiers\n if (identifiers.length > 0 && resources.includes(TranscendPullResource.Identifiers)) {\n result.identifiers = identifiers.map(\n ({\n name,\n type,\n regex,\n selectOptions,\n privacyCenterVisibility,\n isRequiredInForm,\n placeholder,\n displayTitle,\n dataSubjects,\n displayDescription,\n displayOrder,\n isUniqueOnPreferenceStore,\n }): IdentifierInput => ({\n name,\n type,\n regex,\n selectOptions: selectOptions.length > 0 ? selectOptions : undefined,\n privacyCenterVisibility:\n privacyCenterVisibility.length > 0 ? privacyCenterVisibility : undefined,\n isRequiredInForm,\n placeholder: placeholder || undefined,\n dataSubjects: dataSubjects.length > 0 ? dataSubjects.map(({ type }) => type) : undefined,\n displayTitle: displayTitle?.defaultMessage,\n displayDescription: displayDescription?.defaultMessage,\n displayOrder,\n isUniqueOnPreferenceStore,\n }),\n );\n }\n\n // Save agents\n if (agents.length > 0 && resources.includes(TranscendPullResource.Agents)) {\n result.agents = agents.map(\n ({\n name,\n agentId,\n description,\n instructions,\n codeInterpreterEnabled,\n retrievalEnabled,\n prompt,\n largeLanguageModel,\n teams,\n owners,\n agentFunctions,\n agentFiles,\n }): AgentInput => ({\n name,\n agentId,\n description: description || undefined,\n instructions,\n codeInterpreterEnabled,\n retrievalEnabled,\n prompt: prompt?.title,\n 'large-language-model': {\n name: largeLanguageModel.name,\n client: largeLanguageModel.client,\n },\n teams: teams && teams.length > 0 ? teams.map(({ name }) => name) : undefined,\n owners: owners && owners.length > 0 ? owners.map(({ email }) => email) : undefined,\n 'agent-functions':\n agentFunctions && agentFunctions.length > 0\n ? agentFunctions.map(({ name }) => name)\n : undefined,\n 'agent-files':\n agentFiles && agentFiles.length > 0 ? agentFiles.map(({ name }) => name) : undefined,\n }),\n );\n }\n\n // Save action items\n if (actionItems.length > 0 && resources.includes(TranscendPullResource.ActionItems)) {\n result['action-items'] = actionItems.map(\n ({\n teams,\n users,\n customerExperienceActionItemIds: [customerExperienceActionItemId],\n dueDate,\n priority,\n resolved,\n collections,\n notes,\n link,\n title,\n type,\n attributeValues,\n }): ActionItemInput => ({\n teams: teams.map(({ name }) => name),\n users: users.map(({ email }) => email),\n dueDate: dueDate || undefined,\n title,\n notes,\n customerExperienceActionItemId,\n collections: collections.map(({ title }) => title),\n link,\n priority: priority || undefined,\n resolved,\n type,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save action item collections\n if (\n actionItemCollections.length > 0 &&\n resources.includes(TranscendPullResource.ActionItemCollections)\n ) {\n result['action-item-collections'] = actionItemCollections.map(\n ({ title, description, hidden, productLine }): ActionItemCollectionInput => ({\n title,\n description: description || undefined,\n hidden,\n productLine,\n }),\n );\n }\n\n // Save agent functions\n if (agentFunctions.length > 0 && resources.includes(TranscendPullResource.AgentFunctions)) {\n result['agent-functions'] = agentFunctions.map(\n ({ name, description, parameters }): AgentFunctionInput => ({\n name,\n description,\n parameters: JSON.stringify(parameters),\n }),\n );\n }\n\n // Save agent files\n if (agentFiles.length > 0 && resources.includes(TranscendPullResource.AgentFiles)) {\n result['agent-files'] = agentFiles.map(\n ({ name, description, fileId, size, purpose }): AgentFileInput => ({\n name,\n description,\n fileId,\n size,\n purpose,\n }),\n );\n }\n\n // Save vendors\n if (vendors.length > 0 && resources.includes(TranscendPullResource.Vendors)) {\n result.vendors = vendors.map(\n ({\n title,\n description,\n dataProcessingAgreementLink,\n contactName,\n contactPhone,\n address,\n headquarterCountry,\n headquarterSubDivision,\n websiteUrl,\n businessEntity,\n teams,\n owners,\n attributeValues,\n }): VendorInput => ({\n title,\n description: description || undefined,\n dataProcessingAgreementLink: dataProcessingAgreementLink || undefined,\n contactName: contactName || undefined,\n contactPhone: contactPhone || undefined,\n address: address || undefined,\n headquarterCountry: headquarterCountry || undefined,\n headquarterSubDivision: headquarterSubDivision || undefined,\n websiteUrl: websiteUrl || undefined,\n businessEntity: businessEntity?.title,\n teams: teams && teams.length > 0 ? teams.map(({ name }) => name) : undefined,\n owners: owners && owners.length > 0 ? owners.map(({ email }) => email) : undefined,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save data categories\n if (dataCategories.length > 0 && resources.includes(TranscendPullResource.DataCategories)) {\n result['data-categories'] = dataCategories.map(\n ({\n name,\n category,\n description,\n regex,\n owners,\n teams,\n attributeValues,\n }): DataCategoryInput => ({\n name,\n category,\n description: description || undefined,\n regex: regex || undefined,\n owners: owners && owners.length > 0 ? owners.map(({ email }) => email) : undefined,\n teams: teams && teams.length > 0 ? teams.map(({ name }) => name) : undefined,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save processing purposes\n if (\n processingPurposes.length > 0 &&\n resources.includes(TranscendPullResource.ProcessingPurposes)\n ) {\n result['processing-purposes'] = processingPurposes.map(\n ({ name, purpose, description, owners, teams, attributeValues }): ProcessingPurposeInput => ({\n name,\n purpose,\n description: description || undefined,\n owners: owners && owners.length > 0 ? owners.map(({ email }) => email) : undefined,\n teams: teams && teams.length > 0 ? teams.map(({ name }) => name) : undefined,\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save data flows\n if (dataFlows.length > 0 && resources.includes(TranscendPullResource.DataFlows)) {\n result['data-flows'] = dataFlows.map(\n ({\n value,\n type,\n description,\n trackingType,\n service,\n status,\n owners,\n teams,\n attributeValues,\n }): DataFlowInput => ({\n value,\n type,\n description: description || undefined,\n trackingPurposes: trackingType,\n status,\n service: service?.integrationName,\n owners: owners.map(({ email }) => email),\n teams: teams.map(({ name }) => name),\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save cookies\n if (cookies.length > 0 && resources.includes(TranscendPullResource.Cookies)) {\n result.cookies = cookies.map(\n ({\n name,\n isRegex,\n description,\n trackingPurposes,\n service,\n status,\n owners,\n teams,\n attributeValues,\n }): CookieInput => ({\n name,\n isRegex,\n description: description || undefined,\n trackingPurposes,\n status,\n service: service?.integrationName,\n owners: owners.map(({ email }) => email),\n teams: teams.map(({ name }) => name),\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n }),\n );\n }\n\n // Save attributes\n if (attributes.length > 0 && resources.includes(TranscendPullResource.Attributes)) {\n result.attributes = attributes.map(\n ({ description, name, type, values, enabledOn = [] }): AttributeInput => ({\n description: description || undefined,\n resources: enabledOn,\n name,\n type,\n values: values.map(({ name, color, description }) => ({\n name,\n color: color || undefined,\n description,\n })),\n }),\n );\n }\n\n // save purposes\n if (purposes.length > 0) {\n result.purposes = purposes.map(\n ({\n name,\n description,\n trackingType,\n defaultConsent,\n configurable,\n showInConsentManager,\n isActive,\n displayOrder,\n optOutSignals,\n authLevel,\n topics,\n showInPrivacyCenter,\n title,\n }): ConsentPurpose => ({\n name,\n title,\n description: description || undefined,\n trackingType,\n 'default-consent': defaultConsent,\n configurable,\n 'show-in-consent-manager': showInConsentManager,\n 'show-in-privacy-center': showInPrivacyCenter,\n 'is-active': isActive,\n 'display-order': displayOrder,\n 'opt-out-signals': optOutSignals.length > 0 ? optOutSignals : undefined,\n 'auth-level': authLevel || undefined,\n 'preference-topics': topics.map(\n ({\n slug,\n title,\n type,\n color,\n displayDescription,\n defaultConfiguration,\n showInPrivacyCenter,\n preferenceOptionValues,\n }): ConsentPreferenceTopic => ({\n slug,\n title: title.defaultMessage,\n type,\n color,\n description: displayDescription.defaultMessage,\n 'default-configuration': defaultConfiguration,\n 'show-in-privacy-center': showInPrivacyCenter,\n options:\n type === PreferenceTopicType.Boolean\n ? []\n : preferenceOptionValues.map(({ title, slug }) => ({\n title: title.defaultMessage,\n slug,\n })),\n }),\n ),\n }),\n );\n }\n\n if (workflowConfigs.length > 0 && resources.includes(TranscendPullResource.WorkflowConfigs)) {\n const pulledWorkflowConfigs = workflowConfigs.map(\n (config): WorkflowConfigInput => ({\n title: config.title.defaultMessage,\n 'action-type': config.action.type,\n ...(config.internalName ? { 'internal-name': config.internalName } : {}),\n ...(config.subtitle ? { subtitle: config.subtitle.defaultMessage } : {}),\n ...(config.description ? { description: config.description.defaultMessage } : {}),\n ...(config.subject ? { 'data-subject-type': config.subject.type } : {}),\n visibility: config.workflowConfigVisibility,\n type: config.workflowConfigType,\n ...(config.collectDataSubjectRegions\n ? {\n 'collect-data-subject-regions': config.collectDataSubjectRegions,\n }\n : {}),\n ...(config.regionList.length > 0 ? { 'region-list': config.regionList } : {}),\n ...(config.expiryTime && config.expiryTime.length > 0\n ? { 'expiry-time': config.expiryTime }\n : {}),\n ...(config.WorkflowConfigAttributeKeys && config.WorkflowConfigAttributeKeys.length > 0\n ? {\n 'attribute-keys': config.WorkflowConfigAttributeKeys.map(\n ({ attributeKey }) => attributeKey.name,\n ),\n }\n : {}),\n }),\n );\n // TODO: https://linear.app/transcend/issue/WAL-10312 - remove once internalName is unique in DB\n const configsByMatchKey = groupBy(workflowConfigs, workflowConfigMatchKey);\n for (const configs of Object.values(configsByMatchKey)) {\n if (configs.length > 1) {\n const sample = configs[0];\n logger.warn(\n `Found \"${configs.length}\" workflow configs with the same title, action-type, ` +\n `data-subject-type, and region-list for \"${sample.title.defaultMessage}\" ` +\n `(${sample.action.type}). Push will fail until they are disambiguated ` +\n '(for example with unique internal names).',\n );\n }\n }\n if (pulledWorkflowConfigs.length > 0) {\n result['workflow-configs'] = pulledWorkflowConfigs;\n }\n }\n\n if (\n preferenceOptionValues.length > 0 &&\n resources.includes(TranscendPullResource.PreferenceOptions)\n ) {\n result['preference-options'] = preferenceOptionValues.map(\n ({ slug, title }): ConsentPreferenceTopicOptionValue => ({\n slug,\n title: title.defaultMessage,\n }),\n );\n }\n\n // save email templates\n if (\n dataSiloIds.length === 0 &&\n templates.length > 0 &&\n resources.includes(TranscendPullResource.Templates)\n ) {\n result.templates = templates.map(({ title }) => ({ title }));\n }\n\n // Save enrichers\n if (enrichers.length > 0 && resources.includes(TranscendPullResource.Enrichers)) {\n result.enrichers = enrichers.map(\n ({\n title,\n url,\n type,\n inputIdentifier,\n identifiers,\n actions,\n testRegex,\n dataSubjects,\n expirationDuration,\n lookerQueryTitle,\n transitionRequestStatus,\n phoneNumbers,\n regionList,\n }): EnricherInput => ({\n title,\n url: url || undefined,\n type,\n 'input-identifier': inputIdentifier?.name,\n 'output-identifiers': identifiers.map(({ name }) => name),\n 'privacy-actions':\n Object.values(RequestAction).length === actions.length ? undefined : actions,\n testRegex: testRegex || undefined,\n lookerQueryTitle: lookerQueryTitle || undefined,\n expirationDuration: parseInt(expirationDuration, 10),\n transitionRequestStatus: transitionRequestStatus || undefined,\n phoneNumbers: phoneNumbers && phoneNumbers.length > 0 ? phoneNumbers : undefined,\n regionList: regionList && regionList.length > 0 ? regionList : undefined,\n 'data-subjects': dataSubjects.map(({ type }) => type),\n }),\n );\n }\n\n // Save data silos\n if (dataSilos.length > 0 && resources.includes(TranscendPullResource.DataSilos)) {\n const indexedDataSubjects = keyBy(dataSubjects, 'type');\n result['data-silos'] = dataSilos.map(\n ([\n {\n title,\n description,\n url,\n type,\n outerType,\n apiKeys,\n notifyEmailAddress,\n identifiers,\n dependentDataSilos,\n owners,\n country,\n countrySubDivision,\n teams,\n subjectBlocklist,\n isLive,\n promptAVendorEmailSendFrequency,\n promptAVendorEmailSendType,\n promptAVendorEmailIncludeIdentifiersAttachment,\n promptAVendorEmailCompletionLinkType,\n manualWorkRetryFrequency,\n catalog,\n attributeValues,\n discoveredBy,\n businessEntities,\n sombra,\n },\n dataPoints,\n ]): DataSiloInput => ({\n title,\n description,\n integrationName: type,\n 'outer-type': outerType || undefined,\n url: url || undefined,\n 'api-key-title': apiKeys[0]?.title,\n 'sombra-id': sombra?.id || undefined,\n 'identity-keys': identifiers\n .filter(({ isConnected }) => isConnected)\n .map(({ name }) => name),\n ...(dependentDataSilos.length > 0\n ? {\n 'deletion-dependencies': dependentDataSilos.map(({ title }) => title),\n }\n : {}),\n ...(owners.length > 0 ? { owners: owners.map(({ email }) => email) } : {}),\n ...(teams.length > 0 ? { teams: teams.map(({ name }) => name) } : {}),\n ...(discoveredBy.length > 0\n ? { discoveredBy: discoveredBy.map(({ title }) => title) }\n : {}),\n ...(businessEntities.length > 0\n ? {\n businessEntities: businessEntities.map(({ title }) => title),\n }\n : {}),\n country: country || undefined,\n countrySubDivision: countrySubDivision || undefined,\n disabled: !isLive,\n 'data-subjects':\n subjectBlocklist.length > 0\n ? convertToDataSubjectAllowlist(\n subjectBlocklist.map(({ type }) => type),\n indexedDataSubjects,\n )\n : undefined,\n ...(catalog.hasAvcFunctionality\n ? {\n 'email-settings': {\n 'notify-email-address': notifyEmailAddress || undefined,\n 'send-frequency': promptAVendorEmailSendFrequency,\n 'send-type': promptAVendorEmailSendType,\n 'include-identifiers-attachment': promptAVendorEmailIncludeIdentifiersAttachment,\n 'completion-link-type': promptAVendorEmailCompletionLinkType,\n 'manual-work-retry-frequency': manualWorkRetryFrequency,\n },\n }\n : {}),\n attributes:\n attributeValues !== undefined && attributeValues.length > 0\n ? formatAttributeValues(attributeValues)\n : undefined,\n\n datapoints: dataPoints\n .map(\n (dataPoint): DatapointInput => ({\n key: dataPoint.name,\n title: dataPoint.title?.defaultMessage,\n description: dataPoint.description?.defaultMessage,\n owners: dataPoint.owners.map(({ email }) => email),\n teams: dataPoint.teams.map(({ name }) => name),\n ...(dataPoint.path.length > 0 ? { path: dataPoint.path } : {}),\n ...(dataPoint.dataCollection?.title\n ? {\n 'data-collection-tag': dataPoint.dataCollection.title.defaultMessage,\n }\n : {}),\n ...(dataPoint.dbIntegrationQueries.length > 0\n ? {\n 'privacy-action-queries': mapValues(\n keyBy(dataPoint.dbIntegrationQueries, 'requestType'),\n (databaseIntegrationQuery) =>\n databaseIntegrationQuery.suggestedQuery ||\n databaseIntegrationQuery.query ||\n undefined,\n ),\n }\n : {}),\n ...(dataPoint.subDataPoints.length > 0\n ? {\n fields: dataPoint.subDataPoints\n .map(\n (field): FieldInput => ({\n key: field.name,\n description: field.description,\n purposes: field.purposes,\n categories: field.categories,\n ...(includeGuessedCategories && field.pendingCategoryGuesses\n ? {\n 'guessed-categories': field.pendingCategoryGuesses\n .filter((guess) => guess.status === 'PENDING')\n .map((guess) => ({\n category: {\n name: guess.category.name,\n category: guess.category.category,\n },\n status: guess.status,\n confidence: guess.confidence,\n classifierVersion: guess.classifierVersion || undefined,\n })),\n }\n : {}),\n 'access-request-visibility-enabled': field.accessRequestVisibilityEnabled,\n 'erasure-request-redaction-enabled': field.erasureRequestRedactionEnabled,\n attributes:\n field.attributeValues !== undefined && field.attributeValues.length > 0\n ? formatAttributeValues(field.attributeValues)\n : undefined,\n }),\n )\n .sort((a, b) => a.key.localeCompare(b.key)),\n }\n : {}),\n 'privacy-actions': dataPoint.actionSettings\n .filter(({ active }) => active)\n .map(({ type }) => type),\n }),\n )\n .sort((a, b) =>\n [...(a.path ?? []), a.key]\n .join('.')\n .localeCompare([...(b.path ?? []), b.key].join('.')),\n ),\n }),\n );\n }\n return result;\n}\n/* eslint-enable max-lines */\n"],"mappings":"4nDAUA,MAAa,EAAuB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAmD3B,EAA0B;;;;;ECJtC,eAAsB,EACpB,EAC+B,CAC/B,IAAM,EAA4C,EAAE,CAChD,EAAS,EAET,EAAiB,GACrB,EAAG,CACD,GAAM,CACJ,wBAAyB,CAAE,UACzB,MAAM,EAMP,EAAQ,EAAsB,CAC/B,UAAW,CAAE,MAAO,GAAW,SAAQ,CACvC,SACD,CAAC,CACF,EAAoB,KAAK,GAAG,EAAM,CAClC,GAAU,GACV,EAAiB,EAAM,SAAW,SAC3B,GAET,OAAO,EAAoB,MAAM,EAAG,IAAM,EAAE,MAAM,cAAc,EAAE,MAAM,CAAC,CCyB3E,MAAa,EAAmC,+CAK/C,CA8BD,eAAsB,EACpB,EACA,CACE,cACA,mBACA,QACA,YAAY,EACZ,WACA,kBACA,2BAC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