@transcend-io/cli 9.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-keys-C7JLTDUZ.mjs → api-keys-CxvKdj2v.mjs} +2 -2
- package/dist/{api-keys-C7JLTDUZ.mjs.map → api-keys-CxvKdj2v.mjs.map} +1 -1
- package/dist/{app-Dti3qTxV.mjs → app-BKMxG7RO.mjs} +18 -18
- package/dist/{app-Dti3qTxV.mjs.map → app-BKMxG7RO.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/{code-scanning-3tLsE1W5.mjs → code-scanning-Cx1kpssH.mjs} +2 -2
- package/dist/{code-scanning-3tLsE1W5.mjs.map → code-scanning-Cx1kpssH.mjs.map} +1 -1
- package/dist/{command-BlHM1nCd.mjs → command-Bzyj3M2G.mjs} +2 -2
- package/dist/{command-BlHM1nCd.mjs.map → command-Bzyj3M2G.mjs.map} +1 -1
- package/dist/{consent-manager-BoaaMjRQ.mjs → consent-manager-c4bgQF1N.mjs} +2 -2
- package/dist/{consent-manager-BoaaMjRQ.mjs.map → consent-manager-c4bgQF1N.mjs.map} +1 -1
- package/dist/{constants-DdeeX81W.mjs → constants-CnLQtIBn.mjs} +2 -2
- package/dist/{constants-DdeeX81W.mjs.map → constants-CnLQtIBn.mjs.map} +1 -1
- package/dist/{cron-DOicA1l8.mjs → cron-BvxWyvDu.mjs} +2 -2
- package/dist/{cron-DOicA1l8.mjs.map → cron-BvxWyvDu.mjs.map} +1 -1
- package/dist/{data-inventory-OeEcogPl.mjs → data-inventory-CkS_kmus.mjs} +2 -2
- package/dist/{data-inventory-OeEcogPl.mjs.map → data-inventory-CkS_kmus.mjs.map} +1 -1
- package/dist/{impl-fESuqAH1.mjs → impl-8dOatHnF.mjs} +2 -2
- package/dist/{impl-fESuqAH1.mjs.map → impl-8dOatHnF.mjs.map} +1 -1
- package/dist/{impl-DzSmriDw.mjs → impl-Ah-1lwzr.mjs} +2 -2
- package/dist/{impl-DzSmriDw.mjs.map → impl-Ah-1lwzr.mjs.map} +1 -1
- package/dist/{impl-BI4zCNs0.mjs → impl-B5lTeRbn.mjs} +2 -2
- package/dist/{impl-BI4zCNs0.mjs.map → impl-B5lTeRbn.mjs.map} +1 -1
- package/dist/{impl-D2HalFgB2.mjs → impl-B6UhzQcY2.mjs} +2 -2
- package/dist/{impl-D2HalFgB2.mjs.map → impl-B6UhzQcY2.mjs.map} +1 -1
- package/dist/{impl-BvZai1Pf2.mjs → impl-BFf_CotE2.mjs} +2 -2
- package/dist/{impl-BvZai1Pf2.mjs.map → impl-BFf_CotE2.mjs.map} +1 -1
- package/dist/{impl-iwjvzA7a.mjs → impl-BGQ0EGS0.mjs} +2 -2
- package/dist/{impl-iwjvzA7a.mjs.map → impl-BGQ0EGS0.mjs.map} +1 -1
- package/dist/{impl-B8CoAX4t.mjs → impl-B__p3_wC.mjs} +2 -2
- package/dist/{impl-B8CoAX4t.mjs.map → impl-B__p3_wC.mjs.map} +1 -1
- package/dist/{impl-CaTnsoDi.mjs → impl-BcayRe6a.mjs} +2 -2
- package/dist/{impl-CaTnsoDi.mjs.map → impl-BcayRe6a.mjs.map} +1 -1
- package/dist/{impl-CTPHR7O62.mjs → impl-BkYKsEVG2.mjs} +2 -2
- package/dist/{impl-CTPHR7O62.mjs.map → impl-BkYKsEVG2.mjs.map} +1 -1
- package/dist/{impl-gYrR3kIh.mjs → impl-Bl2yVgh0.mjs} +2 -2
- package/dist/{impl-gYrR3kIh.mjs.map → impl-Bl2yVgh0.mjs.map} +1 -1
- package/dist/{impl-CoZhgLjC.mjs → impl-BmAMgEEM.mjs} +2 -2
- package/dist/{impl-CoZhgLjC.mjs.map → impl-BmAMgEEM.mjs.map} +1 -1
- package/dist/{impl-Bh04BLeU2.mjs → impl-BsttzxTN2.mjs} +2 -2
- package/dist/{impl-Bh04BLeU2.mjs.map → impl-BsttzxTN2.mjs.map} +1 -1
- package/dist/{impl--Ov8Om49.mjs → impl-BtnySmbi.mjs} +2 -2
- package/dist/{impl--Ov8Om49.mjs.map → impl-BtnySmbi.mjs.map} +1 -1
- package/dist/{impl-BraVBCrF2.mjs → impl-BwX-evfW2.mjs} +2 -2
- package/dist/{impl-BraVBCrF2.mjs.map → impl-BwX-evfW2.mjs.map} +1 -1
- package/dist/impl-C-wzeAib2.mjs +2 -0
- package/dist/{impl-BEzyqD_12.mjs.map → impl-C-wzeAib2.mjs.map} +1 -1
- package/dist/{impl-B40z0Aoz2.mjs → impl-C61PYfk12.mjs} +2 -2
- package/dist/{impl-B40z0Aoz2.mjs.map → impl-C61PYfk12.mjs.map} +1 -1
- package/dist/impl-CAuNpuF2.mjs +2 -0
- package/dist/impl-CAuNpuF2.mjs.map +1 -0
- package/dist/{impl-CvxsioT4.mjs → impl-CSKrBIuV.mjs} +2 -2
- package/dist/{impl-CvxsioT4.mjs.map → impl-CSKrBIuV.mjs.map} +1 -1
- package/dist/{impl-CIJ6P1GD.mjs → impl-CZP2l3Ds.mjs} +2 -2
- package/dist/{impl-CIJ6P1GD.mjs.map → impl-CZP2l3Ds.mjs.map} +1 -1
- package/dist/{impl-J-dQqTZJ2.mjs → impl-CiJ8hE5W2.mjs} +2 -2
- package/dist/{impl-J-dQqTZJ2.mjs.map → impl-CiJ8hE5W2.mjs.map} +1 -1
- package/dist/{impl-DP757pBT.mjs → impl-Cj3H-m2Z.mjs} +2 -2
- package/dist/{impl-DP757pBT.mjs.map → impl-Cj3H-m2Z.mjs.map} +1 -1
- package/dist/{impl-qiK6VF4F2.mjs → impl-Cm8pUfBU2.mjs} +2 -2
- package/dist/{impl-qiK6VF4F2.mjs.map → impl-Cm8pUfBU2.mjs.map} +1 -1
- package/dist/{impl-CNiEzL3_2.mjs → impl-CpzS9LVu2.mjs} +2 -2
- package/dist/{impl-CNiEzL3_2.mjs.map → impl-CpzS9LVu2.mjs.map} +1 -1
- package/dist/{impl-BpMKYqSR.mjs → impl-CwfamZ1c.mjs} +2 -2
- package/dist/{impl-BpMKYqSR.mjs.map → impl-CwfamZ1c.mjs.map} +1 -1
- package/dist/{impl-BDKBhSiG2.mjs → impl-D81et1Yb2.mjs} +2 -2
- package/dist/{impl-BDKBhSiG2.mjs.map → impl-D81et1Yb2.mjs.map} +1 -1
- package/dist/{impl-DgsWGnhH.mjs → impl-D92PTNk3.mjs} +2 -2
- package/dist/{impl-DgsWGnhH.mjs.map → impl-D92PTNk3.mjs.map} +1 -1
- package/dist/{impl-DVDN007x.mjs → impl-DTXDVeo6.mjs} +2 -2
- package/dist/{impl-DVDN007x.mjs.map → impl-DTXDVeo6.mjs.map} +1 -1
- package/dist/{impl-B0d5M861.mjs → impl-DWoysXup.mjs} +2 -2
- package/dist/{impl-B0d5M861.mjs.map → impl-DWoysXup.mjs.map} +1 -1
- package/dist/{impl-BhMd6_J22.mjs → impl-DX3JHZ4v2.mjs} +2 -2
- package/dist/{impl-BhMd6_J22.mjs.map → impl-DX3JHZ4v2.mjs.map} +1 -1
- package/dist/{impl-DfKI4fmI.mjs → impl-DhuUrzxQ.mjs} +2 -2
- package/dist/{impl-DfKI4fmI.mjs.map → impl-DhuUrzxQ.mjs.map} +1 -1
- package/dist/{impl-CiQeM677.mjs → impl-DqMYLKjU.mjs} +2 -2
- package/dist/{impl-CiQeM677.mjs.map → impl-DqMYLKjU.mjs.map} +1 -1
- package/dist/{impl-BiWrlucD.mjs → impl-DqQ6CIj0.mjs} +2 -2
- package/dist/{impl-BiWrlucD.mjs.map → impl-DqQ6CIj0.mjs.map} +1 -1
- package/dist/{impl-BJ9Ge6Wf2.mjs → impl-Duaq6iWI2.mjs} +2 -2
- package/dist/{impl-BJ9Ge6Wf2.mjs.map → impl-Duaq6iWI2.mjs.map} +1 -1
- package/dist/{impl-DOgLpdLw.mjs → impl-O5gz8qcm.mjs} +2 -2
- package/dist/{impl-DOgLpdLw.mjs.map → impl-O5gz8qcm.mjs.map} +1 -1
- package/dist/{impl-C73Uh2Ze.mjs → impl-PH0AoC7i.mjs} +2 -2
- package/dist/{impl-C73Uh2Ze.mjs.map → impl-PH0AoC7i.mjs.map} +1 -1
- package/dist/{impl-CU29SrJb2.mjs → impl-S8p6toVb2.mjs} +2 -2
- package/dist/{impl-CU29SrJb2.mjs.map → impl-S8p6toVb2.mjs.map} +1 -1
- package/dist/{impl-4BP7gY61.mjs → impl-X2MSb8Ij.mjs} +2 -2
- package/dist/{impl-4BP7gY61.mjs.map → impl-X2MSb8Ij.mjs.map} +1 -1
- package/dist/{impl-SxwaNC4m2.mjs → impl-bo95wZIU2.mjs} +2 -2
- package/dist/{impl-SxwaNC4m2.mjs.map → impl-bo95wZIU2.mjs.map} +1 -1
- package/dist/{impl-DFNq8PBe.mjs → impl-cfdCesro.mjs} +2 -2
- package/dist/{impl-DFNq8PBe.mjs.map → impl-cfdCesro.mjs.map} +1 -1
- package/dist/{impl-EhTHDCC1.mjs → impl-iZoXu4nV.mjs} +2 -2
- package/dist/{impl-EhTHDCC1.mjs.map → impl-iZoXu4nV.mjs.map} +1 -1
- package/dist/{impl-BPz3SpXo2.mjs → impl-lebl6Zek2.mjs} +2 -2
- package/dist/{impl-BPz3SpXo2.mjs.map → impl-lebl6Zek2.mjs.map} +1 -1
- package/dist/{impl-BvTvjK72.mjs → impl-p0YN9e2e.mjs} +2 -2
- package/dist/{impl-BvTvjK72.mjs.map → impl-p0YN9e2e.mjs.map} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{manual-enrichment-CYoZNBjO.mjs → manual-enrichment-B6lW5kAX.mjs} +2 -2
- package/dist/{manual-enrichment-CYoZNBjO.mjs.map → manual-enrichment-B6lW5kAX.mjs.map} +1 -1
- package/dist/{pooling-BkZAO1Zs.mjs → pooling-CazydwlD.mjs} +2 -2
- package/dist/{pooling-BkZAO1Zs.mjs.map → pooling-CazydwlD.mjs.map} +1 -1
- package/dist/{preference-management-BHj26bmE.mjs → preference-management-8gj7aSJB.mjs} +2 -2
- package/dist/{preference-management-BHj26bmE.mjs.map → preference-management-8gj7aSJB.mjs.map} +1 -1
- package/dist/{syncConfigurationToTranscend-wWSbGVrI.mjs → syncConfigurationToTranscend-VJd0PnaZ.mjs} +2 -2
- package/dist/{syncConfigurationToTranscend-wWSbGVrI.mjs.map → syncConfigurationToTranscend-VJd0PnaZ.mjs.map} +1 -1
- package/dist/{uploadConsents-nsjKy1I4.mjs → uploadConsents-C1S-BNzw.mjs} +2 -2
- package/dist/{uploadConsents-nsjKy1I4.mjs.map → uploadConsents-C1S-BNzw.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/impl-BEzyqD_12.mjs +0 -2
- package/dist/impl-nKY3m-Vx.mjs +0 -2
- package/dist/impl-nKY3m-Vx.mjs.map +0 -1
package/dist/{syncConfigurationToTranscend-wWSbGVrI.mjs → syncConfigurationToTranscend-VJd0PnaZ.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./enums-CyFTrzXY.mjs";import{a as t,h as n}from"./constants-
|
|
1
|
+
import{o as e}from"./enums-CyFTrzXY.mjs";import{a as t,h as n}from"./constants-CnLQtIBn.mjs";import{t as r}from"./logger-Bj782ZYD.mjs";import{ActionItemCode as i,AssessmentsDisplayLogicAction as a,AttributeKeyType as o,ComparisonOperator as s,CompletedRequestStatus as c,ConsentTrackerStatus as l,EnricherType as u,IdentifierType as d,IsoCountryCode as f,IsoCountrySubdivisionCode as p,LogicOperator as m,NORMALIZE_PHONE_NUMBER as h,RequestAction as g,RequestEnricherStatus as _,RequestOrigin as v,RequestStatus as y,RetentionType as b,TableEncryptionType as x}from"@transcend-io/privacy-types";import{chunk as S,difference as C,flatten as w,groupBy as T,keyBy as E,mapValues as D,sortBy as O,startCase as k,uniq as A,uniqBy as j}from"lodash-es";import{apply as M,applyEnum as N,decodeCodec as P,getEntries as F,getValues as ee,valuesOf as I}from"@transcend-io/type-utils";import{appendFileSync as te,createWriteStream as ne,existsSync as re,mkdirSync as ie,readFileSync as ae,readdirSync as oe,rmSync as se,statSync as ce,writeFileSync as le}from"node:fs";import{dirname as ue,join as L,parse as de,resolve as fe}from"node:path";import R from"colors";import*as z from"io-ts";import{InitialViewState as pe,OnConsentExpiry as me}from"@transcend-io/airgap.js-types";import{LOCALE_KEY as B}from"@transcend-io/internationalization";import he from"bluebird";import{GraphQLClient as ge,gql as V}from"graphql-request";import H from"inquirer";import _e from"inquirer-autocomplete-prompt";import ve from"fuzzysearch";import{parse as ye}from"csv-parse/sync";import be from"got";import xe from"semver";import U from"cli-progress";import{DateFromISOString as Se}from"io-ts-types";import{PersistedState as Ce}from"@transcend-io/persisted-state";import*as we from"fast-csv";const{map:W,mapSeries:G}=he,Te=V`
|
|
2
2
|
query TranscendCliDataPoints(
|
|
3
3
|
$filterBy: DataPointFiltersInput
|
|
4
4
|
$first: Int!
|
|
@@ -3007,4 +3007,4 @@ import{o as e}from"./enums-CyFTrzXY.mjs";import{a as t,h as n}from"./constants-D
|
|
|
3007
3007
|
`))}function lc(e,t){if(!t||t.length===0){le(e,``);return}le(e,`${t.map(sc).join(`,`)}\n`)}function uc(e,t,n){t.length&&te(e,`${t.map(e=>n.map(t=>{let n=e[t];return n==null?``:String(n)}).map(sc).join(`,`)).join(`
|
|
3008
3008
|
`)}\n`)}function dc(e,t){te(e,`\n${t.map(e=>Object.values(e)).map(e=>e.map(sc).join(`,`)).join(`
|
|
3009
3009
|
`)}`)}async function fc(e,t,n=!0){let r=ne(e);await new Promise((e,i)=>{try{let a=we.write(t,{headers:n,objectMode:!0}).on(`error`,i);r.on(`error`,i),r.on(`finish`,()=>e()),a.pipe(r)}catch(e){i(e)}})}function pc(e){let t=e.lastIndexOf(`.`);return{baseName:t===-1?e:e.substring(0,t),extension:t===-1?`.csv`:e.substring(t)}}function mc(e,t){let n={};for(let r of t)n[r]=e[r];return n}function hc(e){return new Promise(t=>{e.once(`drain`,t)})}async function gc(e,t,n=!0){let r;r=Array.isArray(n)?n:n===!0?t.length>0?Object.keys(t[0]):[]:!1;let i=ne(e),a=we.format({headers:r||void 0,objectMode:!0}),o=a.pipe(i),s=new Promise((e,t)=>{o.on(`finish`,()=>e()),o.on(`error`,t),a.on(`error`,t),i.on(`error`,t)});for(let e of t){let t=r?mc(e,r):e;a.write(t)||await hc(a)}return a.end(),await s,[e]}const _c=[`syntax error`,`got invalid value`,`Client error`,`cannot affect row a second time`,`GRAPHQL_VALIDATION_FAILED`];async function $(e,t,n,i,a=4){let o=0;for(;;)try{return await e.request(t,n,i)}catch(e){if(e.message.includes(`API key is invalid`)&&(r.error(R.red("API key is invalid. Please ensure that the key provided to `transcendAuth` has the proper scope and is not expired, and that `transcendUrl` corresponds to the correct backend for your organization.")),process.exit(1)),_c.some(t=>e.message.includes(t)))throw e;if(e.message.startsWith(`Client error: Too many requests`)){let t=e.response.headers?.get(`x-ratelimit-reset`),n=t?new Date(t).getTime()-new Date().getTime()+100:1e3*10;r.log(R.yellow(`DETECTED RATE LIMIT: ${e.message}. Sleeping for ${n}ms`)),await Hs(n)}if(o>=a)throw e;o+=1,r.log(R.yellow(`Retrying failed request (${o} / ${a}): ${e.message}`))}}async function vc(e){let t=[],n=0,r=!1;do{let{identifiers:{nodes:i}}=await $(e,Ue,{first:20,offset:n});t.push(...i),n+=20,r=i.length===20}while(r);return t.sort((e,t)=>e.name.localeCompare(t.name))}async function yc({enrichers:e=[],"data-silos":t=[],identifiers:n=[]},i,a=!1){let o=await vc(i),s=E(o,`name`),c=C(A([...w(e.map(e=>[e[`input-identifier`],...e[`output-identifiers`]])),...w(t.map(e=>e[`identity-keys`])),...n.map(({name:e})=>e)]).filter(e=>!!e),o.map(({name:e})=>e));if(c.length>0){r.info(R.magenta(`Creating ${c.length} new identifiers...`));let{newIdentifierTypes:e}=await $(i,We),t=e.map(({name:e})=>e);await G(c,async e=>{r.info(R.magenta(`Creating identifier ${e}...`));let{createIdentifier:n}=await $(i,Ge,{input:{name:e,type:t.includes(e)?e:`custom`,skipPublish:a}});r.info(R.green(`Created identifier ${e}!`)),s[e]=n.identifier})}return s}async function bc(e,t){let{createTeam:n}=await $(e,Zt,{input:{name:t.name,description:t.description,ssoTitle:t[`sso-title`],ssoDepartment:t[`sso-department`],ssoGroup:t[`sso-group`],scopes:t.scopes,userEmails:t.users}});return n.team}async function xc(e,t,n){let{updateTeam:r}=await $(e,Qt,{input:{id:n,name:t.name,description:t.description,ssoTitle:t[`sso-title`],ssoDepartment:t[`sso-department`],ssoGroup:t[`sso-group`],scopes:t.scopes,userEmails:t.users}});return r.team}async function Sc(e,t){r.info(R.magenta(`Syncing "${t.length}" teams...`));let n=!1,i=E(await Bi(e),`name`),a=t.filter(e=>!i[e.name]),o=t.filter(e=>!!i[e.name]);return await G(a,async t=>{try{let n=await bc(e,t);i[n.name]=n,r.info(R.green(`Successfully created team "${t.name}"!`))}catch(e){n=!0,r.info(R.red(`Failed to sync team "${t.name}"! - ${e.message}`))}}),await G(o,async t=>{try{let n=await xc(e,t,i[t.name].id);i[n.name]=n,r.info(R.green(`Successfully updated team "${t.name}"!`))}catch(e){n=!0,r.info(R.red(`Failed to sync team "${t.name}"! - ${e.message}`))}}),!n}async function Cc(e,t){let{createPromptPartial:{promptPartial:n}}=await $(e,Ut,{input:t});return r.info(R.green(`Successfully created prompt partial "${t.title}"!`)),n.id}async function wc(e,t){await $(e,Ht,{input:{promptPartials:t.map(([e,t])=>({...e,id:t}))}}),r.info(R.green(`Successfully updated ${t.length} prompt partials!`))}async function Tc(e,t,n=20){let i=!1;r.info(R.magenta(`Syncing "${t.length}" prompt partials...`));let a=E(await Qi(e),`title`),o=t.map(e=>[e,a[e.title]?.id]),s=o.filter(([,e])=>!e).map(([e])=>e);try{r.info(R.magenta(`Creating "${s.length}" new prompt partials...`)),await W(s,async t=>{await Cc(e,t)},{concurrency:n}),r.info(R.green(`Successfully synced ${s.length} prompt partials!`))}catch(e){i=!0,r.info(R.red(`Failed to create prompt partials! - ${e.message}`))}let c=o.filter(e=>!!e[1]);try{r.info(R.magenta(`Updating "${c.length}" prompt partials...`)),await wc(e,c),r.info(R.green(`Successfully updated "${c.length}" prompt partials!`))}catch(e){i=!0,r.info(R.red(`Failed to create prompt partials! - ${e.message}`))}return r.info(R.green(`Synced "${t.length}" prompt partials!`)),!i}async function Ec(e,t){let{createPromptGroup:{promptGroup:n}}=await $(e,Gt,{input:t});return r.info(R.green(`Successfully created prompt group "${t.title}"!`)),n.id}async function Dc(e,t){await $(e,Wt,{input:{promptGroups:t.map(([e,t])=>({...e,id:t}))}}),r.info(R.green(`Successfully updated ${t.length} prompt groups!`))}async function Oc(e,t,n=20){let i=!1;r.info(R.magenta(`Syncing "${t.length}" prompt groups...`));let a=await Zi(e),o=E(await $i(e),`title`),s=E(a,`title`),c=t.map(e=>[e,s[e.title]?.id]),l=c.filter(([,e])=>!e).map(([e])=>e);try{r.info(R.magenta(`Creating "${l.length}" new prompt groups...`)),await W(l,async t=>{await Ec(e,{...t,promptIds:t.prompts.map(e=>{let t=o[e];if(!t)throw Error(`Failed to find prompt with title: "${e}"`);return t.id})})},{concurrency:n}),r.info(R.green(`Successfully synced ${l.length} prompt groups!`))}catch(e){i=!0,r.info(R.red(`Failed to create prompt groups! - ${e.message}`))}let u=c.filter(e=>!!e[1]);try{r.info(R.magenta(`Updating "${u.length}" prompt groups...`)),await Dc(e,u.map(([{prompts:e,...t},n])=>[{...t,promptIds:e.map(e=>{let t=o[e];if(!t)throw Error(`Failed to find prompt with title: "${e}"`);return t.id})},n])),r.info(R.green(`Successfully updated "${u.length}" prompt groups!`))}catch(e){i=!0,r.info(R.red(`Failed to create prompt groups! - ${e.message}`))}return r.info(R.green(`Synced "${t.length}" prompt groups!`)),!i}async function kc(e,t,{pageSize:n=50,publishToPrivacyCenter:i=!0,classifyService:a=!1,deleteExtraAttributeValues:o=!1}){let s=!1;r.info(R.magenta(`Fetching data with page size ${n}...`));let{templates:c,attributes:l,actions:u,identifiers:d,"data-subjects":f,"business-entities":p,enrichers:m,cookies:h,"consent-manager":g,"data-silos":_,"data-flows":v,prompts:y,"prompt-groups":b,"prompt-partials":x,agents:S,"agent-functions":C,"agent-files":w,vendors:T,"data-categories":E,"processing-activities":D,"processing-purposes":O,"action-items":k,"action-item-collections":A,teams:j,"privacy-center":M,messages:N,policies:P,partitions:F}=e,[ee,I,te]=await Promise.all([m||d?yc(e,t,!i):{},_||f||m||D?Ji(e,t):{},_&&_.map(e=>e[`api-key-title`]||[]).reduce((e,t)=>e+t.length,0)>0?Wi(e,t):{}]);if(g){r.info(R.magenta(`Syncing consent manager...`));try{await wo(t,g),r.info(R.green(`Successfully synced consent manager!`))}catch(e){s=!0,r.info(R.red(`Failed to sync consent manager! - ${e.message}`))}}if(y){let e=await Jo(t,y);s||=!e}if(x){let e=await Tc(t,x);s||=!e}if(b){let e=await Oc(t,b);s||=!e}if(j){let e=await Sc(t,j);s||=!e}if(c&&(r.info(R.magenta(`Syncing "${c.length}" email templates...`)),await W(c,async e=>{r.info(R.magenta(`Syncing template "${e.title}"...`));try{await Oa(e,t),r.info(R.green(`Successfully synced template "${e.title}"!`))}catch(t){s=!0,r.info(R.red(`Failed to sync template "${e.title}"! - ${t.message}`))}},{concurrency:10}),r.info(R.green(`Synced "${c.length}" email templates!`))),p){let e=await so(t,p);s||=!e}if(T){let e=await Zo(t,T);s||=!e}if(E){let e=await ko(t,E);s||=!e}if(O){let e=await Go(t,O);s||=!e}if(F){let e=await Ma(t,F);s||=!e}if(S){let e=await ro(t,S);s||=!e}if(C){let e=await eo(t,C);s||=!e}if(w){let e=await Za(t,w);s||=!e}if(h){let e=await Eo(t,h);s||=!e}if(A){let e=await Ua(t,A);s||=!e}if(l){r.info(R.magenta(`Syncing "${l.length}" attributes...`));let e=await ui(t);await W(l,async n=>{let i=e.find(e=>e.name===n.name);r.info(R.magenta(`Syncing attribute "${n.name}"...`));try{await io(t,n,{existingAttribute:i,deleteExtraAttributeValues:o}),r.info(R.green(`Successfully synced attribute "${n.name}"!`))}catch(e){s=!0,r.info(R.red(`Failed to sync attribute "${n.name}"! - ${e.message}`))}},{concurrency:10}),r.info(R.green(`Synced "${l.length}" attributes!`))}if(k){let e=await Ja(t,k);s||=!e}if(m&&(r.info(R.magenta(`Syncing "${m.length}" enrichers...`)),await W(m,async e=>{r.info(R.magenta(`Syncing enricher "${e.title}"...`));try{await Ea(t,{enricher:e,identifierByName:ee,dataSubjectsByName:I}),r.info(R.green(`Successfully synced enricher "${e.title}"!`))}catch(t){s=!0,r.info(R.red(`Failed to sync enricher "${e.title}"! - ${t.message}`))}},{concurrency:10}),r.info(R.green(`Synced "${m.length}" enrichers!`))),d&&(r.info(R.magenta(`Syncing "${d.length}" identifiers...`)),await W(d,async e=>{let n=ee[e.name];if(!n)throw Error(`Failed to find identifier with name: ${e.type}. Should have been auto-created by cli.`);r.info(R.magenta(`Syncing identifier "${e.type}"...`));try{await Po(t,{identifier:e,dataSubjectsByName:I,identifierId:n.id,skipPublish:!i}),r.info(R.green(`Successfully synced identifier "${e.type}"!`))}catch(t){s=!0,r.info(R.red(`Failed to sync identifier "${e.type}"! - ${t.message}`))}},{concurrency:10}),r.info(R.green(`Synced "${d.length}" identifiers!`))),u){r.info(R.magenta(`Syncing "${u.length}" actions...`));let e=await $r(t);await W(u,async n=>{let a=e.find(e=>e.type===n.type);if(!a)throw Error(`Failed to find action with type: ${n.type}. Should have already existing in the organization.`);r.info(R.magenta(`Syncing action "${n.type}"...`));try{await Ba(t,{action:n,actionId:a.id,skipPublish:!i}),r.info(R.green(`Successfully synced action "${n.type}"!`))}catch(e){s=!0,r.info(R.red(`Failed to sync action "${n.type}"! - ${e.message}`))}},{concurrency:10}),r.info(R.green(`Synced "${u.length}" actions!`))}if(f){r.info(R.magenta(`Syncing "${f.length}" data subjects...`));let e=await qi(t);await W(f,async n=>{let a=e.find(e=>e.type===n.type);if(!a)throw Error(`Failed to find data subject with type: ${n.type}. Should have already existing in the organization.`);r.info(R.magenta(`Syncing data subject "${n.type}"...`));try{await No(t,{dataSubject:n,dataSubjectId:a.id,skipPublish:!i}),r.info(R.green(`Successfully synced data subject "${n.type}"!`))}catch(e){s=!0,r.info(R.red(`Failed to sync data subject "${n.type}"! - ${e.message}`))}},{concurrency:10}),r.info(R.green(`Synced "${f.length}" data subjects!`))}if(v){let e=await Mo(t,v,a);s||=!e}if(M){let e=await zo(t,M);s||=!e}if(N){let e=await Io(t,N);s||=!e}if(P){let e=await Ro(t,P);s||=!e}let ne=[];if(_){let{success:e,dataSiloTitleToId:r}=await Ca(_,t,{dataSubjectsByName:I,apiKeysByTitle:te,pageSize:n});_?.forEach(e=>{e[`deletion-dependencies`]&&ne.push([r[e.title],e[`deletion-dependencies`]])}),s||=!e}if(ne.length>0&&await wa(t,ne),D){let e=await Ho(t,D);s||=!e}return s}export{ds as $,tn as $a,rr as $i,Qi as $n,tt as $o,Qr as $r,to as $t,zs as A,Mn as Aa,wr as Ai,Sa as An,xt as Ao,xi as Ar,W as As,jo as At,Ds as B,hn as Ba,hr as Bi,ga as Bn,ht as Bo,gi as Br,yo as Bt,Ks as C,Tn as Ca,jr as Ci,Da as Cn,At as Co,Di as Cr,je as Cs,zo as Ct,Hs as D,In as Da,Or as Di,xa as Dn,kt as Do,Z as Dr,Oe as Ds,Fo as Dt,Us as E,Ln as Ea,Fr as Ei,Ea as En,Ot as Eo,wi as Er,De as Es,Io as Et,Ps as F,xn as Fa,yr as Fi,ha as Fn,Ct as Fo,mi as Fr,Oo as Ft,bs as G,fn as Ga,ur as Gi,oa as Gn,lt as Go,si as Gr,go as Gt,Ts as H,pn as Ha,pr as Hi,ua as Hn,ft as Ho,li as Hr,bo as Ht,Ns as I,Pn as Ia,vr as Ii,ma as In,_t as Io,fi as Ir,Eo as It,gs as J,ln as Ja,sr as Ji,ra as Jn,ot as Jo,ri as Jr,fo as Jt,vs as K,cn as Ka,dr as Ki,aa as Kn,ct as Ko,oi as Kr,uo as Kt,js as L,Sn as La,br as Li,pa as Ln,vt as Lo,hi as Lr,To as Lt,Is as M,zn as Ma,Sr as Mi,Ca as Mn,wt as Mo,yi as Mr,Ao as Mt,Ls as N,An as Na,xr as Ni,_a as Nn,bt as No,vi as Nr,Do as Nt,Vs as O,Fn as Oa,Dr as Oi,ya as On,Tt as Oo,Ci as Or,ke as Os,Po as Ot,Fs as P,kn as Pa,Cr as Pi,va as Pn,yt as Po,_i as Pr,ko as Pt,ps as Q,nn as Qa,nr as Qi,ea as Qn,et as Qo,$r as Qr,io as Qt,ks as R,un as Ra,gr as Ri,da as Rn,gt as Ro,pi as Rr,wo as Rt,qs as S,En as Sa,q as Si,Ma as Sn,jt as So,Oi as Sr,Me as Ss,Ho as St,Ws as T,Rn as Ta,K as Ti,Ta as Tn,Dt as To,Ti as Tr,Ee as Ts,Lo as Tt,Ss as U,_n as Ua,mr as Ui,ca as Un,ut as Uo,ci as Ur,ho as Ut,Es as V,dn as Va,fr as Vi,la as Vn,mt as Vo,di as Vr,xo as Vt,xs as W,gn as Wa,lr as Wi,sa as Wn,dt as Wo,ui as Wr,_o as Wt,ms as X,an as Xa,ar as Xi,ta as Xn,at as Xo,ti as Xr,so as Xt,hs as Y,on as Ya,cr as Yi,na as Yn,it as Yo,ni as Yr,ao as Yt,fs as Z,rn as Za,ir as Zi,$i as Zn,rt as Zo,ei as Zr,oo as Zt,nc as _,Hn as _a,Ar as _i,Ia as _n,Wt as _o,Ii as _r,Le as _s,Jo as _t,uc as a,Yn as aa,Y as ai,Ya as an,qt as ao,Gi as ar,qe as as,ns as at,Ys as b,jn as ba,Pr as bi,Na as bn,Pt as bo,Ai as br,Pe as bs,Go as bt,pc as c,Jn as ca,Wr as ci,Wa as cn,Jt as co,Wi as cr,Ge as cs,is as ct,gc as d,Kn as da,Vr as di,Va as dn,Ut as do,Bi as dr,Ke as ds,$o as dt,$n as ea,Zr as ei,ro as en,$t as eo,Zi as er,nt as es,us as et,$s as f,Un as fa,Hr as fi,Ua as fn,It as fo,Ri as fr,He as fs,Qo as ft,ac as g,On as ga,Lr as gi,La as gn,Bt as go,Pi as gr,Ve as gs,Ko as gt,oc as h,Vn as ha,Rr as hi,Ra as hn,Lt as ho,zi as hr,ze as hs,Xo as ht,$ as i,Zn as ia,qr as ii,$a as in,Qt as io,qi as ir,Je as is,ls as it,Rs as j,Nn as ja,Er as ji,wa as jn,St as jo,bi as jr,G as js,Mo as jt,Bs as k,Bn as ka,Tr as ki,ba as kn,Et as ko,Si as kr,Ae as ks,No as kt,fc as l,Wn as la,J as li,Ja as ln,Vt as lo,Hi as lr,Ue as ls,ts as lt,ec as m,wn as ma,zr as mi,Ba as mn,Rt as mo,Q as mr,Re as ms,Zo as mt,vc as n,er as na,Xr as ni,Qa as nn,Zt as no,Yi as nr,Ze as ns,ss as nt,dc as o,Xn as oa,Kr as oi,Za as on,Yt as oo,Ki as or,Xe as os,rs as ot,tc as p,yn as pa,Br as pi,Ha as pn,zt as po,Li as pr,Be as ps,Yo as pt,_s as q,sn as qa,or as qi,ia as qn,st as qo,ii as qr,po as qt,yc as r,tr as ra,Jr as ri,eo as rn,Xt as ro,Ji as rr,Qe as rs,cs as rt,lc as s,qn as sa,Gr as si,Xa as sn,Kt as so,Ui as sr,Ye as ss,as as st,kc as t,Qn as ta,Yr as ti,no as tn,en as to,Xi as tr,$e as ts,os as tt,cc as u,Gn as ua,Ur as ui,Ga as un,Gt as uo,Vi as ur,We as us,es as ut,ic as v,bn as va,kr as vi,Pa as vn,Ht as vo,Fi as vr,Ne as vs,qo as vt,Gs as w,Dn as wa,Mr as wi,Oa as wn,Mt as wo,Ei as wr,Te as ws,Ro as wt,Js as x,vn as xa,Ir as xi,ja as xn,Nt as xo,ki as xr,Ie as xs,Wo as xt,rc as y,Cn as ya,Nr as yi,Fa as yn,Ft as yo,ji as yr,Fe as ys,Uo as yt,Os as z,mn as za,_r as zi,fa as zn,pt as zo,X as zr,Co as zt};
|
|
3010
|
-
//# sourceMappingURL=syncConfigurationToTranscend-
|
|
3010
|
+
//# sourceMappingURL=syncConfigurationToTranscend-VJd0PnaZ.mjs.map
|