@transcend-io/cli 7.0.0-alpha.2 → 7.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/bin/bash-complete.js +3 -0
  2. package/dist/bin/cli.js +2 -0
  3. package/dist/bin/deprecated-command.js +6 -0
  4. package/dist/chunk-2U7DMWVM.js +11 -0
  5. package/dist/chunk-36OYCQAH.js +1 -0
  6. package/dist/chunk-4AH7KIGL.js +5 -0
  7. package/dist/chunk-AHYJJKNA.js +1 -0
  8. package/dist/chunk-APA5PR4U.js +1 -0
  9. package/dist/chunk-BHDQRYCC.js +1 -0
  10. package/dist/chunk-DDYFIYCC.js +74 -0
  11. package/dist/chunk-HMF46LB7.js +1 -0
  12. package/dist/chunk-IX57OTFV.js +2 -0
  13. package/dist/chunk-J2A7ZQZK.js +1 -0
  14. package/dist/chunk-LB26GOGN.js +3 -0
  15. package/dist/chunk-OERYFLN2.js +1 -0
  16. package/dist/chunk-PC5LFPCL.js +1 -0
  17. package/dist/chunk-QPPYCG3K.js +1 -0
  18. package/dist/chunk-QQRMUEM7.js +3 -0
  19. package/dist/chunk-RIVSSQAD.js +3 -0
  20. package/dist/chunk-SNE53JL2.js +2830 -0
  21. package/dist/chunk-T2PLXAEM.js +1 -0
  22. package/dist/chunk-UJC7455L.js +48 -0
  23. package/dist/chunk-VH4PAOVV.js +1 -0
  24. package/dist/chunk-W6GUOMVP.js +1 -0
  25. package/dist/chunk-ZB5DNAF3.js +1 -0
  26. package/dist/impl-23A44LMH.js +1 -0
  27. package/dist/impl-3O7U2A5Z.js +1 -0
  28. package/dist/impl-57MM7K6S.js +5 -0
  29. package/dist/impl-5JQWZE22.js +1 -0
  30. package/dist/impl-6TW2ZJGW.js +1 -0
  31. package/dist/impl-AQRJP63X.js +1 -0
  32. package/dist/impl-BT4YFJXD.js +1 -0
  33. package/dist/impl-BUGOJ622.js +1 -0
  34. package/dist/impl-CQWNM6M6.js +1 -0
  35. package/dist/impl-FQ4JY3PM.js +1 -0
  36. package/dist/impl-FTOWS4LT.js +1 -0
  37. package/dist/impl-GTNPTYRN.js +1 -0
  38. package/dist/impl-GURN665S.js +1 -0
  39. package/dist/impl-HI7GPKJS.js +3 -0
  40. package/dist/impl-IIR7UIYH.js +1 -0
  41. package/dist/impl-IRPIOI7A.js +1 -0
  42. package/dist/impl-JD3GTCZX.js +1 -0
  43. package/dist/impl-JMDCSKFW.js +11 -0
  44. package/dist/impl-L7FPB5XK.js +1 -0
  45. package/dist/impl-LEORLG3G.js +1 -0
  46. package/dist/impl-LQ4FGFCT.js +1 -0
  47. package/dist/impl-LR3KH6HF.js +1 -0
  48. package/dist/impl-MSPLKNAC.js +1 -0
  49. package/dist/impl-NCQGE4HN.js +1 -0
  50. package/dist/impl-P36LWMYL.js +6 -0
  51. package/dist/impl-PIVVUTJ5.js +1 -0
  52. package/dist/impl-R4TN5WE6.js +8 -0
  53. package/dist/impl-SE4W22MX.js +1 -0
  54. package/dist/impl-TOCVOZ7D.js +1 -0
  55. package/dist/impl-TWDD35U4.js +1 -0
  56. package/dist/impl-UAO73YJW.js +1 -0
  57. package/dist/impl-UAP5BU4W.js +1 -0
  58. package/dist/impl-V2POCVEM.js +1 -0
  59. package/dist/impl-VSIEMKCJ.js +1 -0
  60. package/dist/impl-WWUVCY2C.js +5 -0
  61. package/dist/impl-YUZJV3RL.js +5 -0
  62. package/dist/impl-Z4MBWRSS.js +1 -0
  63. package/dist/impl-ZZTFBASI.js +1 -0
  64. package/dist/index.js +4 -0
  65. package/package.json +51 -53
  66. package/dist/bin/bash-complete.mjs +0 -3
  67. package/dist/bin/cli.mjs +0 -2
  68. package/dist/bin/deprecated-command.mjs +0 -6
  69. package/dist/chunk-BMTAHJH3.mjs +0 -48
  70. package/dist/chunk-DWNKFQ7U.mjs +0 -1
  71. package/dist/chunk-N4KHG2LT.mjs +0 -3
  72. package/dist/chunk-WVOQBBD4.mjs +0 -1
  73. package/dist/impl-2SXC6DB5.mjs +0 -1
  74. package/dist/impl-3WS4KAXC.mjs +0 -1
  75. package/dist/impl-573JHF5Q.mjs +0 -1
  76. package/dist/impl-5G2VT3GE.mjs +0 -1
  77. package/dist/impl-5M2JICLA.mjs +0 -1
  78. package/dist/impl-6HCHXNYK.mjs +0 -1
  79. package/dist/impl-6HYSKLJA.mjs +0 -1
  80. package/dist/impl-6ZEB6Z2K.mjs +0 -1
  81. package/dist/impl-7R553APD.mjs +0 -1
  82. package/dist/impl-7YBBGEJS.mjs +0 -1
  83. package/dist/impl-AE4WVFKM.mjs +0 -1
  84. package/dist/impl-BUP5GVYQ.mjs +0 -1
  85. package/dist/impl-DDSJFH7O.mjs +0 -1
  86. package/dist/impl-EAWZEQHP.mjs +0 -1
  87. package/dist/impl-EBN6UN6B.mjs +0 -1
  88. package/dist/impl-F3GN5QBQ.mjs +0 -1
  89. package/dist/impl-F7EIWKOK.mjs +0 -1
  90. package/dist/impl-GOITDIYO.mjs +0 -1
  91. package/dist/impl-GWDASXMF.mjs +0 -1
  92. package/dist/impl-I2HNOFXK.mjs +0 -1
  93. package/dist/impl-J6TM5I2T.mjs +0 -1
  94. package/dist/impl-JKKLZIWW.mjs +0 -1
  95. package/dist/impl-L32NAFWG.mjs +0 -1
  96. package/dist/impl-LTXXHRJN.mjs +0 -1
  97. package/dist/impl-NFGCPTZ6.mjs +0 -1
  98. package/dist/impl-NFKMASFN.mjs +0 -1
  99. package/dist/impl-OCKVP3CG.mjs +0 -1
  100. package/dist/impl-ORZO5DKU.mjs +0 -1
  101. package/dist/impl-TMYFQHHJ.mjs +0 -1
  102. package/dist/impl-TN3TNFJ3.mjs +0 -1
  103. package/dist/impl-TY543E6H.mjs +0 -1
  104. package/dist/impl-U5YMWF3E.mjs +0 -1
  105. package/dist/impl-V26VW5PW.mjs +0 -1
  106. package/dist/impl-V75HSG53.mjs +0 -1
  107. package/dist/impl-VTEL3Q42.mjs +0 -1
  108. package/dist/impl-WJX6QJZG.mjs +0 -1
  109. package/dist/impl-YF6RKW6X.mjs +0 -1
  110. package/dist/impl-ZHAW5DO6.mjs +0 -1
  111. package/dist/index.mjs +0 -2923
  112. /package/dist/{chunk-BGXZA4EM.mjs → chunk-EZCJGIOS.js} +0 -0
  113. /package/dist/{chunk-CG4A43HM.mjs → chunk-XMGVDVM2.js} +0 -0
@@ -0,0 +1 @@
1
+ function o(s){let e=s.split(",").filter(r=>!!r),t={};return e.forEach(r=>{let[i,n]=r.split(":");if(!i||!n)throw new Error(`Invalid variable: ${r}. Expected format: key:value`);t[i]=n}),t}export{o as a};
@@ -0,0 +1,48 @@
1
+ import{a as o,b as n,c as g,d as a,e as t,f as r,g as s,j as k}from"./chunk-RIVSSQAD.js";import{a as i}from"./chunk-APA5PR4U.js";import{a as h,b}from"./chunk-BHDQRYCC.js";import{b as m,c as f}from"./chunk-EZCJGIOS.js";import{buildInstallCommand as ur,buildUninstallCommand as cr}from"@stricli/auto-complete";import{buildApplication as pr,buildRouteMap as mr}from"@stricli/core";import{buildRouteMap as ye}from"@stricli/core";import{buildCommand as ke}from"@stricli/core";var y=ke({loader:async()=>{let{generateApiKeys:e}=await import("./impl-57MM7K6S.js");return e},parameters:{flags:{email:{kind:"parsed",parse:String,brief:"The email address that you use to log into Transcend"},password:{kind:"parsed",parse:String,brief:"The password for your account login"},apiKeyTitle:{kind:"parsed",parse:String,brief:"The title of the API key being generated or destroyed"},file:{kind:"parsed",parse:String,brief:"The file where API keys should be written to"},scopes:{kind:"parsed",parse:String,variadic:",",brief:"The list of scopes that should be given to the API key"},deleteExistingApiKey:{kind:"boolean",brief:"When true, if an API key exists with the specified apiKeyTitle, the existing API key is deleted",default:!0},createNewApiKey:{kind:"boolean",brief:"When true, new API keys will be created. Set to false if you simply want to delete all API keys with a title",default:!0},parentOrganizationId:{kind:"parsed",parse:o,brief:"Filter for only a specific organization by ID, returning all child accounts associated with that organization",optional:!0},transcendUrl:r()}},docs:{brief:"Generate API keys",fullDescription:`This command allows for creating API keys across multiple Transcend instances. This is useful for customers that are managing many Transcend instances and need to regularly create, cycle or delete API keys across all of their instances.
2
+
3
+ Unlike the other commands that rely on API key authentication, this command relies upon username/password authentication. This command will spit out the API keys into a JSON file, and that JSON file can be used in subsequent cli commands.
4
+
5
+ Authentication requires your email and password for the Transcend account. This command will only generate API keys for Transcend instances where you have the permission to "Manage API Keys".`}});var S=ye({routes:{"generate-api-keys":y},docs:{brief:"Admin commands"}});import{buildRouteMap as Le}from"@stricli/core";import{buildCommand as Se}from"@stricli/core";import{ScopeName as we}from"@transcend-io/privacy-types";var w=Se({loader:async()=>{let{buildXdiSyncEndpoint:e}=await import("./impl-6TW2ZJGW.js");return e},parameters:{flags:{auth:t({scopes:[we.ViewConsentManager]}),xdiLocation:{kind:"parsed",parse:String,brief:"The location of the XDI that will be loaded by the generated sync endpoint"},file:{kind:"parsed",parse:String,brief:"The HTML file path where the sync endpoint should be written",default:"./sync-endpoint.html"},removeIpAddresses:{kind:"boolean",brief:"When true, remove IP addresses from the domain list",default:!0},domainBlockList:{kind:"parsed",parse:g,brief:"The set of domains that should be excluded from the sync endpoint. Comma-separated list.",default:"localhost"},xdiAllowedCommands:{kind:"parsed",parse:String,brief:"The allowed set of XDI commands",default:"ConsentManager:Sync"},transcendUrl:r()}},docs:{brief:"Build XDI sync endpoint",fullDescription:"This command allows for building of the XDI Sync Endpoint across a set of Transcend accounts."}});import{buildCommand as ve}from"@stricli/core";var v=ve({loader:async()=>{let{consentManagerServiceJsonToYml:e}=await import("./impl-AQRJP63X.js");return e},parameters:{flags:{file:{kind:"parsed",parse:String,brief:"Path to the services.json file, output of await airgap.getMetadata()",default:"./services.json"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml to write to",default:"./transcend.yml"}}},docs:{brief:"Convert consent manager service JSON to YML",fullDescription:"Import the services from an airgap.js file into a Transcend instance."}});import{buildCommand as Ce}from"@stricli/core";var C=Ce({loader:async()=>{let{consentManagersToBusinessEntities:e}=await import("./impl-3O7U2A5Z.js");return e},parameters:{flags:{consentManagerYmlFolder:{kind:"parsed",parse:String,brief:"Path to the folder of Consent Manager transcend.yml files to combine"},output:{kind:"parsed",parse:String,brief:"Path to the output transcend.yml with business entity configuration",default:"./combined-business-entities.yml"}}},docs:{brief:"Convert consent managers to business entities",fullDescription:"This command allows for converting a folder or Consent Manager transcend.yml files into a single transcend.yml file where each consent manager configuration is a Business Entity in the data inventory."}});import{buildCommand as Te}from"@stricli/core";import{ScopeName as qe}from"@transcend-io/privacy-types";var T=Te({loader:async()=>{let{pullConsentMetrics:e}=await import("./impl-R4TN5WE6.js");return e},parameters:{flags:{auth:t({scopes:[qe.ViewConsentManager]}),start:{kind:"parsed",parse:a,brief:"The start date to pull metrics from"},end:{kind:"parsed",parse:a,brief:"The end date to pull metrics until",optional:!0},folder:{kind:"parsed",parse:String,brief:"The folder to save metrics to",default:"./consent-metrics/"},bin:{kind:"parsed",parse:String,brief:"The bin metric when pulling data (1h or 1d)",default:"1d"},transcendUrl:r()}},docs:{brief:"Pull consent metrics",fullDescription:"This command allows for pulling consent manager metrics for a Transcend account, or a set of Transcend accounts."}});import{buildCommand as Pe,numberParser as Ae}from"@stricli/core";import{ScopeName as De}from"@transcend-io/privacy-types";var q=Pe({loader:async()=>{let{pullConsentPreferences:e}=await import("./impl-L7FPB5XK.js");return e},parameters:{flags:{auth:t({scopes:[De.ViewManagedConsentDatabaseAdminApi]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:s(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file to save preferences to",default:"./preferences.csv"},transcendUrl:r(),timestampBefore:{kind:"parsed",parse:a,brief:"Filter for consents updated this time",optional:!0},timestampAfter:{kind:"parsed",parse:a,brief:"Filter for consents updated after this time",optional:!0},identifiers:{kind:"parsed",parse:String,variadic:",",brief:"Filter for specific identifiers",optional:!0},concurrency:{kind:"parsed",parse:Ae,brief:"The concurrency to use when downloading consents in parallel",default:"100"}}},docs:{brief:"Pull consent preferences",fullDescription:"This command allows for pull of consent preferences from the Managed Consent Database."}});import{buildCommand as Re}from"@stricli/core";import{ConsentBundleType as Ie,ScopeName as Ue}from"@transcend-io/privacy-types";var P=Re({loader:async()=>{let{updateConsentManager:e}=await import("./impl-LR3KH6HF.js");return e},parameters:{flags:{auth:t({scopes:[Ue.ManageConsentManagerDeveloperSettings]}),bundleTypes:{kind:"enum",values:Object.values(Ie),brief:"The bundle types to deploy. Defaults to PRODUCTION,TEST.",variadic:","},deploy:{kind:"boolean",brief:"When true, deploy the Consent Manager after updating the version",default:!1},transcendUrl:r()}},docs:{brief:"Update consent manager",fullDescription:"This command allows for updating Consent Manager to latest version. The consent manager bundle can also be deployed using this command."}});import{buildCommand as xe,numberParser as Me}from"@stricli/core";var A=xe({loader:async()=>{let{uploadConsentPreferences:e}=await import("./impl-GTNPTYRN.js");return e},parameters:{flags:{base64EncryptionKey:{kind:"parsed",parse:String,brief:"The encryption key used to encrypt the userId"},base64SigningKey:{kind:"parsed",parse:String,brief:"The signing key used to prove authentication of consent request"},partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},file:{kind:"parsed",parse:String,brief:"The file to pull consent preferences from",default:"./preferences.csv"},consentUrl:{kind:"parsed",parse:n,brief:"URL of the Transcend Consent backend. Use https://consent.us.transcend.io for US hosting",default:"https://consent.transcend.io"},concurrency:{kind:"parsed",parse:Me,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Upload consent preferences",fullDescription:"This command allows for updating of consent preferences to the Managed Consent Database."}});import{buildCommand as Oe}from"@stricli/core";import{ConsentTrackerStatus as Ve,ScopeName as Fe}from"@transcend-io/privacy-types";var D=Oe({loader:async()=>{let{uploadCookiesFromCsv:e}=await import("./impl-IRPIOI7A.js");return e},parameters:{flags:{auth:t({scopes:[Fe.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(Ve),brief:"The status of the cookies you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./cookies.csv"},transcendUrl:r()}},docs:{brief:"Upload cookies from CSV",fullDescription:"This command allows for uploading cookies from CSV."}});import{buildCommand as Ne}from"@stricli/core";import{ConsentTrackerStatus as je,ScopeName as Ee}from"@transcend-io/privacy-types";var R=Ne({loader:async()=>{let{uploadDataFlowsFromCsv:e}=await import("./impl-23A44LMH.js");return e},parameters:{flags:{auth:t({scopes:[Ee.ManageDataFlow]}),trackerStatus:{kind:"enum",values:Object.values(je),brief:"The status of the data flows you will upload."},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to upload",default:"./data-flows.csv"},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},transcendUrl:r()}},docs:{brief:"Upload data flows from CSV",fullDescription:"This command allows for uploading of data flows from CSV."}});import{buildCommand as Be,numberParser as We}from"@stricli/core";import{ScopeName as d}from"@transcend-io/privacy-types";var I=Be({loader:async()=>{let{uploadPreferences:e}=await import("./impl-JMDCSKFW.js");return e},parameters:{flags:{auth:t({scopes:[d.ManageStoredPreferences,d.ViewManagedConsentDatabaseAdminApi,d.ViewPreferenceStoreSettings]}),partition:{kind:"parsed",parse:String,brief:"The partition key to download consent preferences to"},sombraAuth:s(),consentUrl:{kind:"parsed",parse:n,brief:"URL of the Transcend backend. Use https://consent.us.transcend.io for US hosting",default:"https://consent.transcend.io"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file to load preferences from",optional:!0},directory:{kind:"parsed",parse:String,brief:"Path to the directory of CSV files to load preferences from",optional:!0},dryRun:{kind:"boolean",brief:"Whether to do a dry run only - will write results to receiptFilepath without updating Transcend",default:!1},skipExistingRecordCheck:{kind:"boolean",brief:"Whether to skip the check for existing records. SHOULD ONLY BE USED FOR INITIAL UPLOAD",default:!1},receiptFileDir:{kind:"parsed",parse:String,brief:"Directory path where the response receipts should be saved",default:"./receipts"},skipWorkflowTriggers:{kind:"boolean",brief:"Whether to skip workflow triggers when uploading to preference store",default:!1},forceTriggerWorkflows:{kind:"boolean",brief:"Whether to force trigger workflows for existing consent records",default:!1},skipConflictUpdates:{kind:"boolean",brief:"Whether to skip uploading of any records where the preference store and file have a hard conflict",default:!1},isSilent:{kind:"boolean",brief:"Whether to skip sending emails in workflows",default:!0},attributes:{kind:"parsed",parse:String,brief:"Attributes to add to any DSR request if created. Comma-separated list of key:value pairs.",default:"Tags:transcend-cli,Source:transcend-cli"},receiptFilepath:{kind:"parsed",parse:String,brief:"Store resulting, continuing where left off",default:"./preference-management-upload-receipts.json"},concurrency:{kind:"parsed",parse:We,brief:"The concurrency to use when uploading in parallel",default:"10"}}},docs:{brief:"Upload preferences",fullDescription:"This command allows for updating of preference management data to your Transcend Preference Store."}});var U=Le({routes:{"build-xdi-sync-endpoint":w,"pull-consent-metrics":T,"pull-consent-preferences":q,"update-consent-manager":P,"upload-consent-preferences":A,"upload-cookies-from-csv":D,"upload-data-flows-from-csv":R,"upload-preferences":I,"consent-manager-service-json-to-yml":v,"consent-managers-to-business-entities":C},docs:{brief:"Consent commands"}});import{buildRouteMap as at}from"@stricli/core";import{buildCommand as Ye}from"@stricli/core";var x=Ye({loader:async()=>{let{deriveDataSilosFromDataFlowsCrossInstance:e}=await import("./impl-BT4YFJXD.js");return e},parameters:{flags:{auth:t({scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},output:{kind:"parsed",parse:String,brief:"The output transcend.yml file containing the data silo configurations",default:"./transcend.yml"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:r()}},docs:{brief:"Derive data silos from data flows cross instance",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to a single transcend.yml configurations of all related data silos."}});import{buildCommand as Ge}from"@stricli/core";var M=Ge({loader:async()=>{let{deriveDataSilosFromDataFlows:e}=await import("./impl-TOCVOZ7D.js");return e},parameters:{flags:{auth:t({scopes:[]}),dataFlowsYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data flow yml files"},dataSilosYmlFolder:{kind:"parsed",parse:String,brief:"The folder that contains data silo yml files"},ignoreYmls:{kind:"parsed",parse:String,variadic:",",brief:"The set of yml files that should be skipped when uploading",optional:!0},transcendUrl:r()}},docs:{brief:"Derive data silos from data flows",fullDescription:"Given a folder of data flow transcend.yml configurations, convert those configurations to set of data silo transcend.yml configurations."}});import{buildCommand as Ke}from"@stricli/core";import{ScopeName as Je}from"@transcend-io/privacy-types";var O=Ke({loader:async()=>{let{discoverSilos:e}=await import("./impl-HI7GPKJS.js");return e},parameters:{flags:{scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan"},dataSiloId:{kind:"parsed",parse:o,brief:"The UUID of the corresponding data silo"},auth:t({scopes:[Je.ManageAssignedDataInventory],requiresSiloScope:!0}),fileGlobs:{kind:"parsed",parse:String,brief:"You can pass a glob syntax pattern(s) to specify additional file paths to scan. Comma-separated list of globs.",default:""},ignoreDirs:{kind:"parsed",parse:String,brief:"Comma-separated list of directories to ignore.",default:""},transcendUrl:r()}},docs:{brief:"Discover silos",fullDescription:"Transcend can help scan dependency management files to help detect new data silos where you may be storing user personal data."}});import{buildCommand as _e}from"@stricli/core";import{DataCategoryType as ze,ScopeName as $e}from"@transcend-io/privacy-types";var V=_e({loader:async()=>{let{pullDatapoints:e}=await import("./impl-LEORLG3G.js");return e},parameters:{flags:{auth:t({scopes:[$e.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./datapoints.csv"},transcendUrl:r(),dataSiloIds:{kind:"parsed",parse:String,variadic:",",brief:"List of data silo IDs to filter by",optional:!0},includeAttributes:{kind:"boolean",brief:"Whether to include attributes in the output",default:!1},includeGuessedCategories:{kind:"boolean",brief:"Whether to include guessed categories in the output",default:!1},parentCategories:{kind:"enum",values:Object.values(ze),brief:"List of parent categories to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of subcategories to filter by",variadic:",",optional:!0}}},docs:{brief:"Pull datapoints",fullDescription:"This command allows for pulling your Data Inventory -> Datapoints into a CSV."}});import{buildCommand as Xe}from"@stricli/core";import{ScopeName as He,UnstructuredSubDataPointRecommendationStatus as Qe}from"@transcend-io/privacy-types";var F=Xe({loader:async()=>{let{pullUnstructuredDiscoveryFiles:e}=await import("./impl-ZZTFBASI.js");return e},parameters:{flags:{auth:t({scopes:[He.ViewDataInventory]}),file:{kind:"parsed",parse:String,brief:"The file to save datapoints to",default:"./unstructured-discovery-files.csv"},transcendUrl:r(),dataSiloIds:{kind:"parsed",parse:String,brief:"List of data silo IDs to filter by",variadic:",",optional:!0},subCategories:{kind:"parsed",parse:String,brief:"List of data categories to filter by",variadic:",",optional:!0},status:{kind:"enum",values:Object.values(Qe),brief:"List of classification statuses to filter by",variadic:",",optional:!0},includeEncryptedSnippets:{kind:"boolean",brief:"Whether to include encrypted snippets of the entries classified",default:!1}}},docs:{brief:"Pull unstructured discovery files",fullDescription:"This command allows for pulling Unstructured Discovery into a CSV."}});import{buildCommand as Ze,numberParser as et}from"@stricli/core";var N=Ze({loader:async()=>{let{push:e}=await import("./impl-WWUVCY2C.js");return e},parameters:{flags:{auth:t({scopes:"Varies"}),file:{kind:"parsed",parse:String,brief:"Path to the YAML file to push from",default:"./transcend.yml"},transcendUrl:r(),pageSize:{kind:"parsed",parse:et,brief:"The page size to use when paginating over the API",default:"50"},variables:{kind:"parsed",parse:String,brief:"The variables to template into the YAML file when pushing configuration. Comma-separated list of key:value pairs.",default:""},publishToPrivacyCenter:{kind:"boolean",brief:"When true, publish the configuration to the Privacy Center",default:!1},classifyService:{kind:"boolean",brief:"When true, automatically assign the service for a data flow based on the domain that is specified",default:!1},deleteExtraAttributeValues:{kind:"boolean",brief:"When true and syncing attributes, delete any extra attributes instead of just upserting",default:!1}}},docs:{brief:"Push configuration to Transcend",fullDescription:"Given a transcend.yml file, sync the contents up to your connected services view."}});import{buildCommand as tt}from"@stricli/core";import{ScopeName as rt}from"@transcend-io/privacy-types";var j=tt({loader:async()=>{let{scanPackages:e}=await import("./impl-V2POCVEM.js");return e},parameters:{flags:{auth:t({scopes:[rt.ManageCodeScanning]}),scanPath:{kind:"parsed",parse:String,brief:"File path in the project to scan",default:"./"},ignoreDirs:{kind:"parsed",parse:String,variadic:",",brief:"List of directories to ignore in scan",optional:!0},repositoryName:{kind:"parsed",parse:String,brief:"Name of the git repository that the package should be tied to",optional:!0},transcendUrl:r()}},docs:{brief:"Scan packages",fullDescription:"Transcend can scan your codebase to inventory your code packages and dependencies."}});var E=at({routes:{pull:k,push:N,"scan-packages":j,"discover-silos":O,"pull-datapoints":V,"pull-unstructured-discovery-files":F,"derive-data-silos-from-data-flows":M,"derive-data-silos-from-data-flows-cross-instance":x},docs:{brief:"Inventory commands"}});import{buildRouteMap as it}from"@stricli/core";import{buildCommand as st}from"@stricli/core";import{ScopeName as ot}from"@transcend-io/privacy-types";var B=st({loader:async()=>{let{syncOt:e}=await import("./impl-P36LWMYL.js");return e},parameters:{flags:{hostname:{kind:"parsed",parse:String,brief:"The domain of the OneTrust environment from which to pull the resource",optional:!0},oneTrustAuth:{kind:"parsed",parse:String,brief:"The OAuth access token with the scopes necessary to access the OneTrust Public APIs",optional:!0},source:{kind:"enum",values:Object.values(f),brief:"Whether to read the assessments from OneTrust or from a file",default:"oneTrust"},transcendAuth:{...t({scopes:[ot.ManageAssessments]}),optional:!0},transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the file to pull the resource into. Must be a json file!",optional:!0},resource:{kind:"enum",values:Object.values(m),brief:"The resource to pull from OneTrust. For now, only assessments is supported",default:"assessments"},dryRun:{kind:"boolean",brief:"Whether to export the resource to a file rather than sync to Transcend",default:!1},debug:{kind:"boolean",brief:"Whether to print detailed logs in case of error",default:!1}}},docs:{brief:"Sync OneTrust data",fullDescription:`Pulls resources from a OneTrust and syncs them to a Transcend instance. For now, it only supports retrieving OneTrust Assessments.
6
+
7
+ This command can be helpful if you are looking to:
8
+ - Pull resources from your OneTrust account.
9
+ - Migrate your resources from your OneTrust account to Transcend.
10
+
11
+ OneTrust authentication requires an OAuth Token with scope for accessing the assessment endpoints.
12
+ If syncing the resources to Transcend, you will also need to generate an API key on the Transcend Admin Dashboard.`}});var W=it({routes:{"sync-ot":B},docs:{brief:"Migration commands"}});import{buildRouteMap as lr}from"@stricli/core";import{buildCommand as nt,numberParser as dt}from"@stricli/core";import{RequestAction as lt,RequestOrigin as ut,ScopeName as l}from"@transcend-io/privacy-types";var L=nt({loader:async()=>{let{approve:e}=await import("./impl-FTOWS4LT.js");return e},parameters:{flags:{auth:t({scopes:[l.RequestApproval,l.ViewRequests,l.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(lt),variadic:",",brief:"The request actions to approve"},origins:{kind:"enum",values:Object.values(ut),variadic:",",brief:"The request origins to approve",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Any requests made before this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Approve requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Approve requests that were submitted after this time",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:dt,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk approve a set of privacy requests",fullDescription:"Bulk approve a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});import{buildCommand as ct,numberParser as pt}from"@stricli/core";import{RequestAction as mt,RequestStatus as ft,ScopeName as Y}from"@transcend-io/privacy-types";var G=ct({loader:async()=>{let{cancel:e}=await import("./impl-PIVVUTJ5.js");return e},parameters:{flags:{auth:t({scopes:[Y.ViewRequests,Y.RequestApproval]}),actions:{kind:"enum",values:Object.values(mt),variadic:",",brief:"The request actions to cancel"},statuses:{kind:"enum",values:Object.values(ft),variadic:",",brief:"The request statuses to cancel. Comma-separated list.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to cancel",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Any requests made before this date should be marked as silent mode for canceling to skip email sending",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Cancel requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Cancel requests that were submitted after this time",optional:!0},cancellationTitle:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests upon cancelation",default:"Request Canceled"},transcendUrl:r(),concurrency:{kind:"parsed",parse:pt,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk cancel a set of privacy requests",fullDescription:"Bulk cancel a set of privacy requests from the DSR Automation -> Incoming Requests tab."}});import{buildRouteMap as kt}from"@stricli/core";import{buildCommand as ht}from"@stricli/core";var K=ht({loader:async()=>{let{markIdentifiersCompleted:e}=await import("./impl-NCQGE4HN.js");return e},parameters:{flags:{auth:t({scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:o,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:r(),sombraAuth:s()}},docs:{brief:"Mark identifiers as completed after processing.",fullDescription:`This command takes the output of tr-cron-pull-identifiers and notifies Transcend that all of the requests in the CSV have been processed.
13
+ This is used in the workflow like:
14
+
15
+ 1. Pull identifiers to CSV:
16
+ ${i} request cron pull-identifiers --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --actions=ERASURE --file=./outstanding-requests.csv
17
+ 2. Run your process to operate on that CSV of requests.
18
+ 3. Notify Transcend of completion
19
+ ${i} request cron mark-identifiers-completed --auth=$TRANSCEND_API_KEY --dataSiloId=70810f2e-cf90-43f6-9776-901a5950599f --file=./outstanding-requests.csv
20
+
21
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});import{buildCommand as bt,numberParser as J}from"@stricli/core";import{RequestAction as gt}from"@transcend-io/privacy-types";var _=bt({loader:async()=>{let{pullIdentifiers:e}=await import("./impl-LQ4FGFCT.js");return e},parameters:{flags:{auth:t({scopes:[],requiresSiloScope:!0}),dataSiloId:{kind:"parsed",parse:o,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(gt),variadic:",",brief:"The request actions to restart"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./cron-identifiers.csv"},transcendUrl:r(),sombraAuth:s(),pageLimit:{kind:"parsed",parse:J,brief:"The page limit to use when pulling in pages of identifiers",default:"100"},skipRequestCount:{kind:"boolean",brief:"Whether to skip the count of all outstanding requests. This is required to render the progress bar, but can take a long time to run if you have a large number of outstanding requests to process. In that case, we recommend setting skipRequestCount=true so that you can still proceed with fetching the identifiers",default:!1},chunkSize:{kind:"parsed",parse:J,brief:"Maximum number of rows per CSV file. For large datasets, the output will be automatically split into multiple files to avoid file system size limits. Each file will contain at most this many rows",default:"100000"}}},docs:{brief:"Pull identifiers of outstanding requests for a data silo to a CSV.",fullDescription:`If you are using the cron job integration, you can run this command to pull the outstanding identifiers for the data silo to a CSV.
22
+
23
+ For large datasets, the output will be automatically split into multiple CSV files to avoid file system size limits. Use the --chunkSize parameter to control the maximum number of rows per file.
24
+
25
+ Read more at https://docs.transcend.io/docs/integrations/cron-job-integration.`}});var z=kt({routes:{"pull-identifiers":_,"mark-identifiers-completed":K},docs:{brief:"Cron commands"}});import{buildCommand as yt,numberParser as St}from"@stricli/core";import{RequestStatus as wt,ScopeName as u}from"@transcend-io/privacy-types";var $=yt({loader:async()=>{let{downloadFiles:e}=await import("./impl-JD3GTCZX.js");return e},parameters:{flags:{auth:t({scopes:[u.ViewRequestCompilation,u.ViewRequests,u.RequestApproval]}),sombraAuth:s(),concurrency:{kind:"parsed",parse:St,brief:"The concurrency to use when downloading requests in parallel",default:"10"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to download",optional:!0},statuses:{kind:"enum",values:Object.values(wt),variadic:",",brief:"The request statuses to download. Comma-separated list. Defaults to APPROVING,DOWNLOADABLE.",optional:!0},folderPath:{kind:"parsed",parse:String,brief:"The folder to download files to",default:"./dsr-files"},createdAtBefore:{kind:"parsed",parse:a,brief:"Download requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Download requests that were submitted after this time",optional:!0},approveAfterDownload:{kind:"boolean",brief:"If the request is in status=APPROVING, approve the request after its downloaded",default:!1},transcendUrl:r()}},docs:{brief:"Download the files associated with a Data Subject Access Request (DSAR)",fullDescription:"Download the files associated with a Data Subject Access Request (DSAR) from DSR Automation -> Incoming Requests tab."}});import{buildCommand as vt,numberParser as Ct}from"@stricli/core";import{RequestAction as Tt,RequestEnricherStatus as qt,ScopeName as Pt}from"@transcend-io/privacy-types";var X=vt({loader:async()=>{let{enricherRestart:e}=await import("./impl-FQ4JY3PM.js");return e},parameters:{flags:{auth:t({scopes:[Pt.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:String,brief:"The ID of the enricher to restart"},actions:{kind:"enum",values:Object.values(Tt),variadic:",",brief:"The request action to restart",optional:!0},requestEnricherStatuses:{kind:"enum",values:Object.values(qt),variadic:",",brief:"The request enricher statuses to restart",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:Ct,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Restart requests that were submitted after this time",optional:!0}}},docs:{brief:"Bulk restart a particular enricher across a series of DSRs",fullDescription:`Bulk restart a particular enricher across a series of DSRs.
26
+
27
+ The API key needs the following scopes:
28
+ - Manage Request Compilation`}});import{buildCommand as At,numberParser as H}from"@stricli/core";import{RequestAction as Dt,RequestStatus as Rt,ScopeName as Q}from"@transcend-io/privacy-types";var Z=At({loader:async()=>{let{_export:e}=await import("./impl-TWDD35U4.js");return e},parameters:{flags:{auth:t({scopes:[Q.ViewRequests,Q.ViewRequestCompilation]}),sombraAuth:s(),actions:{kind:"enum",values:Object.values(Dt),variadic:",",brief:"The request actions to export",optional:!0},statuses:{kind:"enum",values:Object.values(Rt),variadic:",",brief:"The request statuses to export",optional:!0},transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./transcend-request-export.csv"},concurrency:{kind:"parsed",parse:H,brief:"The concurrency to use when uploading requests in parallel",default:"100"},createdAtBefore:{kind:"parsed",parse:a,brief:"Pull requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Pull requests that were submitted after this time",optional:!0},showTests:{kind:"boolean",brief:"Filter for test requests or production requests - when not provided, pulls both",optional:!0},pageLimit:{kind:"parsed",parse:H,brief:"The page limit to use when pulling in pages of requests",default:"100"}}},docs:{brief:"Export privacy requests and request identifiers to a CSV file",fullDescription:"Export privacy requests and request identifiers to a CSV file."}});import{buildCommand as It,numberParser as Ut}from"@stricli/core";import{RequestAction as xt,RequestStatus as Mt,ScopeName as Ot}from"@transcend-io/privacy-types";var ee=It({loader:async()=>{let{markSilent:e}=await import("./impl-VSIEMKCJ.js");return e},parameters:{flags:{auth:t({scopes:[Ot.ManageRequestCompilation]}),actions:{kind:"enum",values:Object.values(xt),variadic:",",brief:"The request actions to mark silent"},statuses:{kind:"enum",values:Object.values(Mt),variadic:",",brief:"The request statuses to mark silent. Comma-separated list. Defaults to REQUEST_MADE,WAITING,ENRICHING,COMPILING,DELAYED,APPROVING,SECONDARY,SECONDARY_APPROVING.",optional:!0},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to mark silent",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Mark silent requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Mark silent requests that were submitted after this time",optional:!0},transcendUrl:r(),concurrency:{kind:"parsed",parse:Ut,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk update a set of privacy requests to be in silent mode",fullDescription:"Bulk update a set of privacy requests from the DSR Automation -> Incoming Requests tab to be in silent mode."}});import{buildCommand as Vt,numberParser as c}from"@stricli/core";import{RequestAction as Ft,ScopeName as te}from"@transcend-io/privacy-types";var re=Vt({loader:async()=>{let{notifyAdditionalTime:e}=await import("./impl-UAP5BU4W.js");return e},parameters:{flags:{auth:t({scopes:[te.ViewRequests,te.RequestApproval]}),createdAtBefore:{kind:"parsed",parse:a,brief:"Notify requests that are open but submitted before this time"},createdAtAfter:{kind:"parsed",parse:a,brief:"Notify requests that are open but submitted after this time",optional:!0},actions:{kind:"enum",values:Object.values(Ft),variadic:",",brief:"The request actions to notify",optional:!0},daysLeft:{kind:"parsed",parse:c,brief:"Only notify requests that have less than this number of days until they are considered expired",default:"10"},days:{kind:"parsed",parse:c,brief:"The number of days to adjust the expiration of the request to",default:"45"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to notify",optional:!0},emailTemplate:{kind:"parsed",parse:String,brief:"The title of the email template that should be sent to the requests",default:"Additional Time Needed"},transcendUrl:r(),concurrency:{kind:"parsed",parse:c,brief:"The concurrency to use when uploading requests in parallel",default:"50"}}},docs:{brief:"Bulk notify a set of privacy requests that more time is needed",fullDescription:"Bulk notify a set of privacy requests from the DSR Automation -> Incoming Requests tab that more time is needed to complete the request. Note any request in silent mode will not be emailed."}});import{buildRouteMap as Lt}from"@stricli/core";import{buildCommand as Nt,numberParser as jt}from"@stricli/core";import{RequestAction as Et,ScopeName as ae}from"@transcend-io/privacy-types";var se=Nt({loader:async()=>{let{pullIdentifiers:e}=await import("./impl-5JQWZE22.js");return e},parameters:{flags:{auth:t({scopes:[ae.ViewRequests,ae.ViewRequestCompilation]}),sombraAuth:s(),transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},actions:{kind:"enum",values:Object.values(Et),variadic:",",brief:"The request actions to pull for",optional:!0},concurrency:{kind:"parsed",parse:jt,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Pull identifiers for manual enrichment",fullDescription:`This command pulls down the set of privacy requests that are currently pending manual enrichment.
29
+
30
+ This is useful for the following workflow:
31
+
32
+ 1. Pull identifiers to CSV:
33
+ ${i} request preflight pull-identifiers --file=./enrichment-requests.csv
34
+ 2. Fill out the CSV with additional identifiers
35
+ 3. Push updated back to Transcend
36
+ ${i} request preflight push-identifiers --file=./enrichment-requests.csv`}});import{buildCommand as Bt,numberParser as Wt}from"@stricli/core";import{ScopeName as oe}from"@transcend-io/privacy-types";var ie=Bt({loader:async()=>{let{pushIdentifiers:e}=await import("./impl-BUGOJ622.js");return e},parameters:{flags:{auth:t({scopes:[oe.ManageRequestIdentities,oe.ManageRequestCompilation]}),enricherId:{kind:"parsed",parse:o,brief:"The ID of the Request Enricher to upload to"},sombraAuth:s(),transcendUrl:r(),file:{kind:"parsed",parse:String,brief:"Path to the CSV file where requests will be written to",default:"./manual-enrichment-identifiers.csv"},markSilent:{kind:"boolean",brief:"When true, set requests into silent mode before enriching",default:!1},concurrency:{kind:"parsed",parse:Wt,brief:"The concurrency to use when uploading requests in parallel",default:"100"}}},docs:{brief:"Push identifiers for manual enrichment",fullDescription:`This command push up a set of identifiers for a set of requests pending manual enrichment.
37
+
38
+ This is useful for the following workflow:
39
+
40
+ 1. Pull identifiers to CSV:
41
+ ${i} request preflight pull-identifiers --file=./enrichment-requests.csv
42
+ 2. Fill out the CSV with additional identifiers
43
+ 3. Push updated back to Transcend
44
+ ${i} request preflight push-identifiers --file=./enrichment-requests.csv`}});var ne=Lt({routes:{"pull-identifiers":se,"push-identifiers":ie},docs:{brief:"Preflight commands"}});import{buildCommand as Yt}from"@stricli/core";import{RequestAction as Gt,ScopeName as Kt}from"@transcend-io/privacy-types";var de=Yt({loader:async()=>{let{rejectUnverifiedIdentifiers:e}=await import("./impl-CQWNM6M6.js");return e},parameters:{flags:{auth:t({scopes:[Kt.ManageRequestCompilation]}),identifierNames:{kind:"parsed",parse:String,variadic:",",brief:"The names of identifiers to clear out"},actions:{kind:"enum",values:Object.values(Gt),variadic:",",brief:"The request action to restart",optional:!0},transcendUrl:r()}},docs:{brief:"Bulk clear out any request identifiers that are unverified",fullDescription:"Bulk clear out any request identifiers that are unverified."}});import{buildCommand as Jt,numberParser as _t}from"@stricli/core";import{RequestAction as zt,RequestStatus as $t,ScopeName as le}from"@transcend-io/privacy-types";var ue=Jt({loader:async()=>{let{restart:e}=await import("./impl-UAO73YJW.js");return e},parameters:{flags:{auth:t({scopes:[le.MakeDataSubjectRequest,le.ViewRequestCompilation]}),actions:{kind:"enum",values:Object.values(zt),variadic:",",brief:"The request actions to restart"},statuses:{kind:"enum",values:Object.values($t),variadic:",",brief:"The request statuses to restart"},transcendUrl:r(),requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:s(),concurrency:{kind:"parsed",parse:_t,brief:"The concurrency to use when uploading requests in parallel",default:"15"},requestIds:{kind:"parsed",parse:String,variadic:",",brief:"Specify the specific request IDs to restart",optional:!0},emailIsVerified:{kind:"boolean",brief:"Indicate whether the primary email address is verified. Set to false to send a verification email",default:!0},createdAt:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before a specific date",optional:!0},silentModeBefore:{kind:"parsed",parse:a,brief:"Requests older than this date should be marked as silent mode",optional:!0},createdAtBefore:{kind:"parsed",parse:a,brief:"Restart requests that were submitted before this time",optional:!0},createdAtAfter:{kind:"parsed",parse:a,brief:"Restart requests that were submitted after this time",optional:!0},sendEmailReceipt:{kind:"boolean",brief:"Send email receipts to the restarted requests",default:!1},copyIdentifiers:{kind:"boolean",brief:"Copy over all enriched identifiers from the initial request",default:!1},skipWaitingPeriod:{kind:"boolean",brief:"Skip queued state of request and go straight to compiling",default:!1}}},docs:{brief:"Bulk update a set of privacy requests based on a set of request filters",fullDescription:"Bulk update a set of privacy requests based on a set of request filters."}});import{buildCommand as Xt}from"@stricli/core";import{ScopeName as Ht}from"@transcend-io/privacy-types";var ce=Xt({loader:async()=>{let{skipPreflightJobs:e}=await import("./impl-IIR7UIYH.js");return e},parameters:{flags:{auth:t({scopes:[Ht.ManageRequestCompilation]}),enricherIds:{kind:"parsed",parse:String,variadic:",",brief:"The ID of the enrichers to skip privacy request jobs for"},transcendUrl:r()}},docs:{brief:"Skip preflight jobs",fullDescription:"This command allows for bulk skipping preflight checks."}});import{buildRouteMap as ir}from"@stricli/core";import{buildCommand as Qt}from"@stricli/core";import{ScopeName as Zt}from"@transcend-io/privacy-types";var pe=Qt({loader:async()=>{let{markRequestDataSilosCompleted:e}=await import("./impl-MSPLKNAC.js");return e},parameters:{flags:{auth:t({scopes:[Zt.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:o,brief:"The ID of the data silo to pull in"},file:{kind:"parsed",parse:String,brief:"Path to the CSV file where identifiers will be written to",default:"./request-identifiers.csv"},transcendUrl:r()}},docs:{brief:"Mark request data silos as completed",fullDescription:`This command takes in a CSV of Request IDs as well as a Data Silo ID and marks all associated privacy request jobs as completed.
45
+ This command is useful with the "Bulk Response" UI. The CSV is expected to have 1 column named "Request Id".`}});import{buildCommand as er}from"@stricli/core";import{RequestAction as tr,ScopeName as rr}from"@transcend-io/privacy-types";var me=er({loader:async()=>{let{retryRequestDataSilos:e}=await import("./impl-GURN665S.js");return e},parameters:{flags:{auth:t({scopes:[rr.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:o,brief:"The ID of the data silo to pull in"},actions:{kind:"enum",values:Object.values(tr),variadic:",",brief:"The request actions to restart"},transcendUrl:r()}},docs:{brief:"Retry request data silos",fullDescription:'This command allows for bulk restarting a set of data silos jobs for open privacy requests. This is equivalent to clicking the "Wipe and Retry" button for a particular data silo across a set of privacy requests.'}});import{buildCommand as ar}from"@stricli/core";import{RequestStatus as sr,ScopeName as or}from"@transcend-io/privacy-types";var fe=ar({loader:async()=>{let{skipRequestDataSilos:e}=await import("./impl-SE4W22MX.js");return e},parameters:{flags:{auth:t({scopes:[or.ManageRequestCompilation]}),dataSiloId:{kind:"parsed",parse:o,brief:"The ID of the data silo to skip privacy request jobs for"},transcendUrl:r(),statuses:{kind:"enum",values:Object.values(sr),variadic:",",brief:"The request statuses to skip"},status:{kind:"enum",values:["SKIPPED","RESOLVED"],brief:"The status to set the request data silo job to",default:"SKIPPED"}}},docs:{brief:"Skip request data silos",fullDescription:"This command allows for bulk skipping all open privacy request jobs for a particular data silo. This command is useful if you want to disable a data silo and then clear out any active privacy requests that are still queued up for that data silo."}});var he=ir({routes:{"mark-request-data-silos-completed":pe,"retry-request-data-silos":me,"skip-request-data-silos":fe},docs:{brief:"System commands"}});import{buildCommand as nr,numberParser as dr}from"@stricli/core";import{ScopeName as p}from"@transcend-io/privacy-types";var be=nr({loader:async()=>{let{upload:e}=await import("./impl-Z4MBWRSS.js");return e},parameters:{flags:{auth:t({scopes:[p.MakeDataSubjectRequest,p.ViewRequestIdentitySettings,p.ViewGlobalAttributes]}),file:{kind:"parsed",parse:String,brief:"Path to the CSV file of requests to upload",default:"./requests.csv"},transcendUrl:r(),cacheFilepath:{kind:"parsed",parse:String,brief:"The path to the JSON file encoding the metadata used to map the CSV shape to Transcend API",default:"./transcend-privacy-requests-cache.json"},requestReceiptFolder:{kind:"parsed",parse:String,brief:"The path to the folder where receipts of each upload are stored",default:"./privacy-request-upload-receipts"},sombraAuth:s(),concurrency:{kind:"parsed",parse:dr,brief:"The concurrency to use when uploading requests in parallel",default:"50"},attributes:{kind:"parsed",parse:String,brief:"Tag all of the requests with the following attributes. Format: key1:value1;value2,key2:value3;value4",default:"Tags:transcend-cli"},isTest:{kind:"boolean",brief:"Flag whether the requests being uploaded are test requests or regular requests",default:!1},isSilent:{kind:"boolean",brief:"Flag whether the requests being uploaded should be submitted in silent mode",default:!0},skipSendingReceipt:{kind:"boolean",brief:"Flag whether to skip sending of the receipt email",default:!1},emailIsVerified:{kind:"boolean",brief:"Indicate whether the email address being uploaded is pre-verified. Set to false to send a verification email",default:!0},skipFilterStep:{kind:"boolean",brief:"When true, skip the interactive step to filter down the CSV",default:!1},dryRun:{kind:"boolean",brief:"When true, perform a dry run of the upload instead of calling the API to submit the requests",default:!1},debug:{kind:"boolean",brief:"Debug logging",default:!1},defaultPhoneCountryCode:{kind:"parsed",parse:String,brief:"When uploading phone numbers, if the phone number is missing a country code, assume this country code",default:"1"}}},docs:{brief:"Upload a set of requests from a CSV",fullDescription:`If you need to upload a set of requests from a CSV, you can run this command.
46
+ This command uses inquirer to prompt the user to map the shape of the CSV to the shape of the Transcend API. There is no requirement for the shape of the incoming CSV, as the script will handle the mapping process.
47
+
48
+ The script will also produce a JSON cache file, that allows for the mappings to be preserved between runs.`}});var ge=lr({routes:{approve:L,upload:be,"download-files":$,cancel:G,restart:ue,"notify-additional-time":re,"mark-silent":ee,"enricher-restart":X,"reject-unverified-identifiers":de,export:Z,"skip-preflight-jobs":ce,system:he,preflight:ne,cron:z},docs:{brief:"All commands related to DSR requests"}});var fr=mr({routes:{request:ge,consent:U,inventory:E,admin:S,migration:W,install:ur("@transcend-io/transcend",{bash:"__@transcend-io/cli_bash_complete"}),uninstall:cr("@transcend-io/transcend",{bash:!0})},docs:{brief:h,hideRoute:{install:!0,uninstall:!0}}}),Ai=pr(fr,{name:i,versionInfo:{currentVersion:b}});export{Ai as a};
@@ -0,0 +1 @@
1
+ import{Fe as h,Ge as z,Ie as $,Je as w,a as y,oe as u,zc as A}from"./chunk-SNE53JL2.js";import{e as S}from"./chunk-APA5PR4U.js";import{fa as p}from"./chunk-HMF46LB7.js";import{a as i}from"./chunk-OERYFLN2.js";import n from"colors";async function H({email:r,password:a,scopes:f,apiKeyTitle:t,parentOrganizationId:o,deleteExistingApiKey:l=!0,createNewApiKey:x=!0,transcendUrl:k=S}){let s=await u(k,{});i.info(n.magenta("Logging in using email and password."));let{roles:d,loginCookie:P}=await h(s,{email:r,password:a});i.info(n.green(`Successfully logged in and found ${d.length} role${d.length===1?"":"s"}!`));let K=o?d.filter(e=>e.organization.id===o||e.organization.parentOrganizationId===o):d;s.setHeaders({Cookie:P});let m=[],c=[];return i.info(n.magenta(`Generating API keys with title: ${t}, scopes: ${f.join(",")}.`)),await y(K,async e=>{try{await z(s,{roleId:e.id,email:r}),i.info(n.magenta(`Checking if API key already exists in organization "${e.organization.name}" with title: "${t}".`));let[g]=await A(s,[t]);if(g&&l)i.info(n.yellow(`Deleting existing API key in "${e.organization.name}" with title: "${t}".`)),await w(s,g.id),i.info(n.green(`Successfully deleted API key in "${e.organization.name}" with title: "${t}".`));else if(g)throw new Error(`API key already exists with title: "${t}"`);if(x){i.info(n.magenta(`Creating API key in "${e.organization.name}" with title: "${t}".`));let{apiKey:N}=await $(s,{title:t,scopes:f});m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:N}),i.info(n.green(`Successfully created API key in "${e.organization.name}" with title: "${t}".`))}else m.push({organizationName:e.organization.name,organizationId:e.organization.id,apiKey:""})}catch(g){i.error(n.red(`Failed to create API key in organization "${e.organization.name}"! - ${g.message}`)),c.push({organizationName:e.organization.name,organizationId:e.organization.id,error:g.message})}}),i.info(n.green(`Successfully created ${m.length} API key${m.length===1?"":"s"}`)),c.length>0&&i.error(n.red(`Failed to create ${c.length} API key${c.length===1?"":"s"}!`)),{errors:c,apiKeys:m}}import{decodeCodec as C}from"@transcend-io/type-utils";import E from"colors";import*as I from"io-ts";import{existsSync as G,readFileSync as D}from"fs";function T(r){return r||(i.error(E.red("A Transcend API key must be provided. You can specify using --auth=$TRANSCEND_API_KEY")),process.exit(1)),G(r)?C(I.array(p),D(r,"utf-8")):r}import{existsSync as F,readdirSync as b}from"fs";function Z(r,a,f=!1){if(!F(r))return[];let t=b(r).filter(o=>a?a.filter(l=>o.endsWith(l)).length:!0).filter(o=>o.indexOf(".")>0);return f?t.map(o=>o.replace(/\.[^/.]+$/,"")):t}import{readdirSync as R,statSync as _}from"fs";import{join as L}from"path";function te(r){return R(r).filter(a=>_(L(r,a)).isDirectory())}export{H as a,T as b,Z as c,te as d};
@@ -0,0 +1 @@
1
+ import{e as o}from"./chunk-EZCJGIOS.js";import*as e from"io-ts";import{valuesOf as a}from"@transcend-io/type-utils";var d=({TRouteName:t})=>e.type({routeName:t,enabledPolicies:e.array(a(o))});import*as r from"io-ts";var l=({TEnabledRoutes:t})=>r.type({enabledRoutes:t});export{d as a,l as b};
@@ -0,0 +1 @@
1
+ import{union as c}from"lodash-es";function f(l,{adTechPurposes:p=["SaleOfInfo"],serviceToTitle:s,serviceToSupportedIntegration:r}){let e=[],i=[],n={};l.forEach(t=>{let{service:a,attributes:h=[]}=t;if(!a||a==="internalService")return;let u=h.find(o=>o.key==="Found on Domain");u&&(n[a]||(n[a]=[]),n[a].push(...u.values.map(o=>o.replace("https://","").replace("http://",""))),n[a]=[...new Set(n[a])]),c(t.trackingPurposes,p).length>0?(i.push(a),e.includes(a)&&(e=e.filter(o=>o!==a))):i.includes(a)||e.push(a)});let m=[...new Set(i)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Found On Domain",values:n[t]||[]}]}));return{siteTechDataSilos:[...new Set(e)].map(t=>({title:s[t],...r[t]?{integrationName:t}:{integrationName:"promptAPerson",outerType:t},attributes:[{key:"Tech Type",values:["Site Tech"]},{key:"Found On Domain",values:n[t]||[]}]})),adTechDataSilos:m}}export{f as a};
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function n({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e}){await a({auth:o,trackerStatus:t,file:r,classifyService:s,transcendUrl:e})}export{n as uploadDataFlowsFromCsv};
@@ -0,0 +1 @@
1
+ import{h as a}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import{c as m}from"./chunk-VH4PAOVV.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{d as o,e as r}from"./chunk-QQRMUEM7.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as t}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{join as u}from"path";import c from"colors";import{existsSync as g,lstatSync as l}from"fs";function b({consentManagerYmlFolder:s,output:n}){(!g(s)||!l(s).isDirectory())&&(t.error(c.red(`Folder does not exist: "${s}"`)),process.exit(1));let p=m(s).map(i=>{let{"consent-manager":f}=o(u(s,i));return{name:i,input:f}}),e=a(p);r(n,{"business-entities":e}),t.info(c.green(`Successfully wrote ${e.length} business entities to file "${n}"`))}export{b as consentManagersToBusinessEntities};
@@ -0,0 +1,5 @@
1
+ import{a}from"./chunk-VH4PAOVV.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import x from"colors";import{writeFileSync as A}from"fs";import{TRANSCEND_SCOPES as E}from"@transcend-io/privacy-types";import{keyBy as K}from"lodash-es";var i=K(Object.entries(E).map(([t,o])=>({...o,name:t})),"title"),N=Object.keys(i);async function P({email:t,password:o,apiKeyTitle:p,file:c,scopes:m,deleteExistingApiKey:l,createNewApiKey:g,parentOrganizationId:f,transcendUrl:y}){let r=m.map(e=>e.trim()),s=r.filter(e=>!i[e]);s.length>0&&(n.error(x.red(`Failed to parse scopes:"${s.join(",")}".
2
+ Expected one of:
3
+ ${N.join(`
4
+ `)}`)),process.exit(1));let S=r.map(e=>i[e].name),{errors:d,apiKeys:C}=await a({transcendUrl:y,password:o,email:t,parentOrganizationId:f,deleteExistingApiKey:l,createNewApiKey:g,apiKeyTitle:p,scopes:S});A(c,`${JSON.stringify(C,null,2)}
5
+ `),d.length>0&&process.exit(1)}export{P as generateApiKeys};
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-IX57OTFV.js";import"./chunk-4AH7KIGL.js";import"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function c({auth:n,transcendUrl:e,file:i,concurrency:r,actions:o,sombraAuth:s}){await t({file:i,transcendUrl:e,concurrency:r,requestActions:o,auth:n,sombraAuth:s})}export{c as pullIdentifiers};
@@ -0,0 +1 @@
1
+ import{g as t}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import{b as r}from"./chunk-VH4PAOVV.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import e from"colors";import{writeFileSync as g}from"fs";async function C({auth:d,xdiLocation:s,file:i,removeIpAddresses:c,domainBlockList:o,xdiAllowedCommands:l,transcendUrl:a}){let m=await r(d),{syncGroups:p,html:f}=await t(m,{xdiLocation:s,transcendUrl:a,removeIpAddresses:c,domainBlockList:o.length>0?o:void 0,xdiAllowedCommands:l});n.info(e.green(`Successfully constructed sync endpoint for sync groups: ${JSON.stringify(p,null,2)}`)),g(i,f),n.info(e.green(`Wrote configuration to file "${i}"!`))}export{C as buildXdiSyncEndpoint};
@@ -0,0 +1 @@
1
+ import{e as c}from"./chunk-QQRMUEM7.js";import{ia as i}from"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import*as p from"io-ts";import m from"colors";import{existsSync as u,readFileSync as g}from"fs";import{decodeCodec as d}from"@transcend-io/type-utils";import{ConsentTrackerStatus as l,DataFlowScope as C}from"@transcend-io/privacy-types";function P({file:e,output:n}){u(e)||(a.error(m.red(`File does not exist: --file="${e}"`)),process.exit(1));let f=d(p.array(i),g(e,"utf-8")),t=[],r=[];f.forEach(s=>{s.dataFlows.filter(({type:o})=>o!==C.CSP).forEach(o=>{t.push({value:o.value,type:o.type,status:l.Live,trackingPurposes:o.trackingPurposes})}),s.cookies.forEach(o=>{r.push({name:o.name,status:l.Live,trackingPurposes:o.trackingPurposes})})}),c(n,{"data-flows":t,cookies:r}),a.info(m.green(`Successfully wrote ${t.length} data flows and ${r.length} cookies to file "${n}"`))}export{P as consentManagerServiceJsonToYml};
@@ -0,0 +1 @@
1
+ import{a as w}from"./chunk-ZB5DNAF3.js";import{c as y}from"./chunk-VH4PAOVV.js";import{ne as S,pe as T}from"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{d as D,e as h}from"./chunk-QQRMUEM7.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as c}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{join as O}from"path";import{difference as v}from"lodash-es";import I from"colors";import{existsSync as $,lstatSync as b}from"fs";async function Q({auth:F,dataFlowsYmlFolder:a,output:x,ignoreYmls:C=[],transcendUrl:k}){a||(c.error(I.red("Missing required arg: --dataFlowsYmlFolder=./working/data-flows/")),process.exit(1)),(!$(a)||!b(a).isDirectory())&&(c.error(I.red(`Folder does not exist: "${a}"`)),process.exit(1));let N=C.map(t=>t.split(".")[0]),l=y(a).map(t=>{let{"data-flows":o=[]}=D(O(a,t)),{adTechDataSilos:m,siteTechDataSilos:r}=w(o,{serviceToSupportedIntegration:u,serviceToTitle:f});return{adTechDataSilos:m,siteTechDataSilos:r,organizationName:t.split(".")[0]}}),s={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o,organizationName:m})=>{[...t,...o].forEach(e=>{let n=e["outer-type"]||e.integrationName;s[n]||(s[n]=[]),s[n].push(m),s[n]=[...new Set(s[n])]})});let p=[...new Set(l.map(({adTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],g=v([...new Set(l.map(({siteTechDataSilos:t})=>t.map(o=>o["outer-type"]||o.integrationName)).flat())],p),i={};l.forEach(({adTechDataSilos:t,siteTechDataSilos:o})=>{[...t,...o].forEach(r=>{let e=r["outer-type"]||r.integrationName,n=r.attributes?.find(E=>E.key==="Found On Domain");i[e]||(i[e]=[]),i[e].push(...n?.values||[]),i[e]=[...new Set(i[e])]})});let A=T(k,F),{serviceToTitle:f,serviceToSupportedIntegration:u}=await S(A),d=[...p,...g].map(t=>({title:f[t],...u[t]?{integrationName:t}:{integrationName:"promptAPerson","outer-type":t},attributes:[{key:"Tech Type",values:["Ad Tech"]},{key:"Business Units",values:v(s[t]||[],N)},{key:"Found On Domain",values:i[t]||[]}]}));c.log(`Total Services: ${d.length}`),c.log(`Ad Tech Services: ${p.length}`),c.log(`Site Tech Services: ${g.length}`),h(x,{"data-silos":d})}export{Q as deriveDataSilosFromDataFlowsCrossInstance};
@@ -0,0 +1 @@
1
+ import{d as n}from"./chunk-IX57OTFV.js";import"./chunk-4AH7KIGL.js";import"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function c({auth:t,transcendUrl:r,file:e,enricherId:i,concurrency:s,markSilent:o,sombraAuth:a}){await n({file:e,transcendUrl:r,enricherId:i,concurrency:s,markSilent:o,auth:t,sombraAuth:a})}export{c as pushIdentifiers};
@@ -0,0 +1 @@
1
+ import{W as e}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function s({auth:t,transcendUrl:i,identifierNames:n,actions:r=[]}){await e({requestActions:r,transcendUrl:i,auth:t,identifierNames:n})}export{s as rejectUnverifiedIdentifiers};
@@ -0,0 +1 @@
1
+ import{S as r}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function m({auth:n,enricherId:s,actions:i,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e,createdAtAfter:t,concurrency:o,transcendUrl:u}){await r({auth:n,enricherId:s,requestActions:i,requestEnricherStatuses:a,requestIds:c,createdAtBefore:e?new Date(e):void 0,createdAtAfter:t?new Date(t):void 0,concurrency:o,transcendUrl:u})}export{m as enricherRestart};
@@ -0,0 +1 @@
1
+ import{I as e}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function m({auth:t,actions:r,origins:o,silentModeBefore:i,createdAtBefore:n,createdAtAfter:a,transcendUrl:s,concurrency:c}){await e({transcendUrl:s,requestActions:r,auth:t,requestOrigins:o,concurrency:c,silentModeBefore:i,createdAtBefore:n,createdAtAfter:a})}export{m as approve};
@@ -0,0 +1 @@
1
+ import{b as n,f as r}from"./chunk-QPPYCG3K.js";import{q as e}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function d({base64EncryptionKey:o,base64SigningKey:t,partition:s,file:i,consentUrl:a,concurrency:c}){let m=e(i,n);await r({base64EncryptionKey:o,base64SigningKey:t,preferences:m,partition:s,concurrency:c,transcendUrl:a})}export{d as uploadConsentPreferences};
@@ -0,0 +1 @@
1
+ import{T as t}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function i({auth:e,dataSiloId:a,actions:o,transcendUrl:s}){await t({requestActions:o,transcendUrl:s,auth:e,dataSiloId:a})}export{i as retryRequestDataSilos};
@@ -0,0 +1,3 @@
1
+ import{a as D}from"./chunk-LB26GOGN.js";import"./chunk-VH4PAOVV.js";import{Od as u,le as S,pe as y}from"./chunk-SNE53JL2.js";import{b as h}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as r}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{stringify as C}from"query-string";import w from"colors";import v from"fast-glob";async function m({scanPath:t,fileGlobs:e,ignoreDirs:g,config:p}){let{ignoreDirs:f,supportedFiles:s,scanFunction:a}=p,n=e===""?s:s.concat(e.split(",")),l=[...g.split(","),...f].filter(o=>o.length>0);try{let o=await v(`${t}/**/${n.join("|")}`,{ignore:l.map(i=>`${t}/**/${i}`),unique:!0,onlyFiles:!0});r.info(`Scanning: ${o.length} files`);let $=o.map(i=>a(i)).flat().map(i=>i.softwareDevelopmentKits||[]).flat(),d=[...new Set($.map(i=>i.name))];return r.info(`Found: ${d.length} unique dependencies`),d.map(i=>({name:i,resourceId:`${t}/**/${i}`,useStrictClassifier:!0}))}catch(o){throw new Error(`Error scanning globs ${m} with error: ${o}`)}}async function k({scanPath:t,dataSiloId:e,auth:g,fileGlobs:p,ignoreDirs:f,transcendUrl:s}){let a=y(s,g),n=await u(a,e),l=D[n.dataSilo.type];l||(r.error(w.red(`This plugin "${n.dataSilo.type}" is not supported for offline silo discovery.`)),process.exit(1));let o=await m({scanPath:t,fileGlobs:p,ignoreDirs:f,config:l});await S(a,n.id,o);let c=new URL(h);c.pathname="/data-map/data-inventory/silo-discovery/triage",c.search=C({filters:JSON.stringify({pluginIds:[n.id]})}),r.info(w.green(`Scan found ${o.length} potential data silos at ${t}! View at '${c.href}'
2
+
3
+ NOTE: it may take 2-3 minutes for scan results to appear in the UI.`))}export{k as discoverSilos};
@@ -0,0 +1 @@
1
+ import{R as t}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function e({auth:i,transcendUrl:o,enricherIds:r}){await t({transcendUrl:o,auth:i,enricherIds:r})}export{e as skipPreflightJobs};
@@ -0,0 +1 @@
1
+ import{c as o}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function i({auth:t,trackerStatus:r,file:s,transcendUrl:a}){await o({auth:t,trackerStatus:r,file:s,transcendUrl:a})}export{i as uploadCookiesFromCsv};
@@ -0,0 +1 @@
1
+ import{F as t}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{RequestStatus as e}from"@transcend-io/privacy-types";async function f({auth:o,transcendUrl:a,folderPath:r,requestIds:n,statuses:s=[e.Approving,e.Downloadable],concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c}){await t({transcendUrl:a,auth:o,folderPath:r,requestIds:n,statuses:s,concurrency:i,createdAtBefore:l,createdAtAfter:d,approveAfterDownload:c})}export{f as downloadFiles};
@@ -0,0 +1,11 @@
1
+ import{a as Q}from"./chunk-36OYCQAH.js";import"./chunk-T2PLXAEM.js";import{n as F,p as X,q as Z}from"./chunk-PC5LFPCL.js";import{Qc as H,_d as ee,a as A,b as V,pe as te,qe as re}from"./chunk-SNE53JL2.js";import{f as oe}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-W6GUOMVP.js";import{a as l}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import v from"colors";import k from"colors";import{chunk as Qe}from"lodash-es";import ye from"cli-progress";import{PersistedState as Ge}from"@transcend-io/persisted-state";import{keyBy as De}from"lodash-es";import*as x from"io-ts";import de from"colors";import{PreferenceQueryResponseItem as Ue}from"@transcend-io/privacy-types";import ne from"colors";import se from"cli-progress";import{chunk as ke}from"lodash-es";import{decodeCodec as Re}from"@transcend-io/type-utils";import*as T from"io-ts";var Me=T.intersection([T.type({nodes:T.array(Ue)}),T.partial({cursor:T.string})]),Ve=["ENOTFOUND","ETIMEDOUT","504 Gateway Time-out","Task timed out after"];async function ie(m,{identifiers:n,partitionKey:h,skipLogging:d=!1}){let s=[],u=ke(n,100),i=new Date().getTime(),t=new se.SingleBar({},se.Presets.shades_classic);d||t.start(n.length,0);let c=0;await V(u,async e=>{let a=0,g=3;for(;a<g;)try{let p=await m.post(`v1/preferences/${h}/query`,{json:{filter:{identifiers:e},limit:e.length}}).json(),w=Re(Me,p);s.push(...w.nodes),c+=e.length,t.update(c);break}catch(p){a+=1;let w=p?.response?.body||p?.message||"";if(a>=g||!Ve.some(P=>w.includes(P)))throw new Error(`Received an error from server after ${a} attempts: ${w}`);l.warn(ne.yellow(`[RETRYING FAILED REQUEST - Attempt ${a}] Failed to fetch ${e.length} user preferences from partition ${h}: ${w}`))}},{concurrency:40}),t.stop();let r=new Date().getTime()-i;return d||l.info(ne.green(`Completed download in "${r/1e3}" seconds.`)),s}import{PreferenceTopicType as G}from"@transcend-io/privacy-types";import{apply as Fe}from"@transcend-io/type-utils";function D({row:m,columnToPurposeName:n,purposeSlugs:h,preferenceTopics:d}){let s={};return Object.entries(n).forEach(([u,{purpose:i,preference:t,valueMapping:c}])=>{if(!h.includes(i))throw new Error(`Invalid purpose slug: ${i}, expected: ${h.join(", ")}`);if(t){let f=d.find(g=>g.slug===t&&g.purpose.trackingType===i);if(!f){let g=d.filter(p=>p.purpose.trackingType===i).map(p=>p.slug);throw new Error(`Invalid preference slug: ${t} for purpose: ${i}. Allowed preference slugs for purpose are: ${g.join(",")}`)}s[i]||(s[i]={preferences:[]}),s[i].preferences||(s[i].preferences=[]);let r=m[u],e=c[r],a=typeof e=="string"&&e.trim()||null;switch(f.type){case G.Boolean:if(typeof e!="boolean")throw new Error(`Invalid value for boolean preference: ${t}, expected boolean, got: ${r}`);s[i].preferences.push({topic:t,choice:{booleanValue:e}});break;case G.Select:if(typeof e!="string"&&e!==null)throw new Error(`Invalid value for select preference: ${t}, expected string or null, got: ${r}`);if(a&&!f.preferenceOptionValues.map(({slug:g})=>g).includes(a))throw new Error(`Invalid value for select preference: ${t}, expected one of: ${f.preferenceOptionValues.map(({slug:g})=>g).join(", ")}, got: ${r}`);s[i].preferences.push({topic:t,choice:{selectValue:a}});break;case G.MultiSelect:if(typeof r!="string")throw new Error(`Invalid value for multi select preference: ${t}, expected string, got: ${r}`);s[i].preferences.push({topic:t,choice:{selectValues:F(r).map(g=>{let p=c[g];if(typeof p!="string")throw new Error(`Invalid value for multi select preference: ${t}, expected one of: ${f.preferenceOptionValues.map(({slug:w})=>w).join(", ")}, got: ${g}`);return p}).sort((g,p)=>g.localeCompare(p))}});break;default:throw new Error(`Unknown preference type: ${f.type}`)}}else s[i]?s[i].enabled=c[m[u]]===!0:s[i]={enabled:c[m[u]]===!0}}),Fe(s,(u,i)=>{if(typeof u.enabled!="boolean")throw new Error(`No mapping provided for purpose.enabled=true/false value: ${i}`);return{...u,enabled:u.enabled}})}import{uniq as Se,difference as Ee}from"lodash-es";import ae from"colors";import Ie from"inquirer";var q="[NONE]";async function pe(m,n){let h=Se(m.map(s=>Object.keys(s)).flat()),d=Ee(h,[...n.identifierColumn?[n.identifierColumn]:[],...Object.keys(n.columnToPurposeName)]);if(!n.timestampColum){let{timestampName:s}=await Ie.prompt([{name:"timestampName",message:"Choose the column that will be used as the timestamp of last preference update",type:"list",default:d.find(u=>u.toLowerCase().includes("date"))||d.find(u=>u.toLowerCase().includes("time"))||d[0],choices:[...d,q]}]);n.timestampColum=s}if(l.info(ae.magenta(`Using timestamp column "${n.timestampColum}"`)),n.timestampColum!==q){let s=m.map((u,i)=>u[n.timestampColum]?null:[i]).filter(u=>!!u).flat();if(s.length>0)throw new Error(`The timestamp column "${n.timestampColum}" is missing a value for the following rows: ${s.join(`
2
+ `)}`);l.info(ae.magenta(`The timestamp column "${n.timestampColum}" is present for all row`))}return n}import{uniq as Ne,groupBy as Oe,difference as xe}from"lodash-es";import N from"colors";import je from"inquirer";async function le(m,n){let h=Ne(m.map(t=>Object.keys(t)).flat()),d=xe(h,[...n.identifierColumn?[n.identifierColumn]:[],...Object.keys(n.columnToPurposeName)]);if(!n.identifierColumn){let{identifierName:t}=await je.prompt([{name:"identifierName",message:"Choose the column that will be used as the identifier to upload consent preferences by",type:"list",default:d.find(c=>c.toLowerCase().includes("email"))||d[0],choices:d}]);n.identifierColumn=t}l.info(N.magenta(`Using identifier column "${n.identifierColumn}"`));let s=m.map((t,c)=>t[n.identifierColumn]?null:[c]).filter(t=>!!t).flat();if(s.length>0){let t=`The identifier column "${n.identifierColumn}" is missing a value for the following rows: ${s.join(", ")}`;if(l.warn(N.yellow(t)),!await Q({message:"Would you like to skip rows missing an identifier?"}))throw new Error(t);let f=m.length;m=m.filter(r=>r[n.identifierColumn]),l.info(N.yellow(`Skipped ${f-m.length} rows missing an identifier`))}l.info(N.magenta(`The identifier column "${n.identifierColumn}" is present for all rows`));let u=Oe(m,n.identifierColumn),i=Object.entries(u).filter(([,t])=>t.length>1);if(i.length>0){let t=`The identifier column "${n.identifierColumn}" has duplicate values for the following rows: ${i.slice(0,10).map(([f,r])=>`${f} (${r.length})`).join(`
3
+ `)}`;if(l.warn(N.yellow(t)),!await Q({message:"Would you like to automatically take the latest update?"}))throw new Error(t);m=Object.entries(u).map(([,f])=>f.sort((e,a)=>new Date(a[n.timestampColum]).getTime()-new Date(e[n.timestampColum]).getTime())[0]).filter(f=>f)}return{currentState:n,preferences:m}}import{uniq as ce,difference as Ae}from"lodash-es";import W from"colors";import O from"inquirer";import{PreferenceTopicType as _}from"@transcend-io/privacy-types";async function fe(m,n,{purposeSlugs:h,preferenceTopics:d,forceTriggerWorkflows:s}){let u=ce(m.map(c=>Object.keys(c)).flat()),i=Ae(u,[...n.identifierColumn?[n.identifierColumn]:[],...n.timestampColum?[n.timestampColum]:[]]);if(i.length===0){if(s)return n;throw new Error("No other columns to process")}let t=[...h,...d.map(c=>`${c.purpose.trackingType}->${c.slug}`)];return await A(i,async c=>{let f=ce(m.map(e=>e[c])),r=n.columnToPurposeName[c];if(r)l.info(W.magenta(`Column "${c}" is associated with purpose "${r.purpose}"`));else{let{purposeName:e}=await O.prompt([{name:"purposeName",message:`Choose the purpose that column ${c} is associated with`,type:"list",default:t.find(p=>p.startsWith(h[0])),choices:t}]),[a,g]=e.split("->");r={purpose:a,preference:g||null,valueMapping:{}}}await A(f,async e=>{if(r.valueMapping[e]!==void 0){l.info(W.magenta(`Value "${e}" is associated with purpose value "${r.valueMapping[e]}"`));return}if(r.preference===null){let{purposeValue:a}=await O.prompt([{name:"purposeValue",message:`Choose the purpose value for value "${e}" associated with purpose "${r.purpose}"`,type:"confirm",default:e!=="false"}]);r.valueMapping[e]=a}if(r.preference!==null){let a=d.find(p=>p.slug===r.preference);if(!a){l.error(W.red(`Preference topic "${r.preference}" not found`));return}let g=a.preferenceOptionValues.map(({slug:p})=>p);if(a.type===_.Boolean){let{preferenceValue:p}=await O.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${e}" associated with purpose "${r.purpose}"`,type:"confirm",default:e!=="false"}]);r.valueMapping[e]=p;return}if(a.type===_.Select){let{preferenceValue:p}=await O.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${e}" associated with purpose "${r.purpose}"`,type:"list",choices:g,default:g.find(w=>w===e)}]);r.valueMapping[e]=p;return}if(a.type===_.MultiSelect){let p=F(e);await A(p,async w=>{if(r.valueMapping[w]!==void 0)return;let{preferenceValue:P}=await O.prompt([{name:"preferenceValue",message:`Choose the preference value for "${a.slug}" value "${w}" associated with purpose "${r.purpose}"`,type:"list",choices:g,default:g.find(y=>y===w)}]);r.valueMapping[w]=P});return}throw new Error(`Unknown preference topic type: ${a.type}`)}}),n.columnToPurposeName[c]=r}),n}import{PreferenceTopicType as K}from"@transcend-io/privacy-types";function me({currentConsentRecord:m,pendingUpdates:n,preferenceTopics:h}){return Object.entries(n).every(([d,{preferences:s=[],enabled:u}])=>{let i=m.purposes.find(c=>c.purpose===d);return!!i&&i.enabled===u?s.every(({topic:c,choice:f})=>i.preferences&&i.preferences.find(r=>{if(r.topic!==c)return!1;let e=h.find(a=>a.slug===c&&a.purpose.trackingType===d);if(!e)throw new Error(`Could not find preference topic for ${c}`);switch(e.type){case K.Boolean:return r.choice.booleanValue===f.booleanValue;case K.Select:return r.choice.selectValue===f.selectValue;case K.MultiSelect:let a=(r.choice.selectValues||[]).sort(),g=(f.selectValues||[]).sort();return a.length===g.length&&a.every((p,w)=>p===g[w]);default:throw new Error(`Unknown preference topic type: ${e.type}`)}})):!1})}import{PreferenceTopicType as Y}from"@transcend-io/privacy-types";function ue({currentConsentRecord:m,pendingUpdates:n,preferenceTopics:h}){return!!Object.entries(n).find(([d,{preferences:s=[],enabled:u}])=>{let i=m.purposes.find(t=>t.purpose===d);return i?i.enabled!==u?!0:!!s.find(({topic:t,choice:c})=>{let f=(i.preferences||[]).find(e=>e.topic===t);if(!f)return!1;let r=h.find(e=>e.slug===t&&e.purpose.trackingType===d);if(!r)throw new Error(`Could not find preference topic for ${t}`);switch(r.type){case Y.Boolean:return f.choice.booleanValue!==c.booleanValue;case Y.Select:return f.choice.selectValue!==c.selectValue;case Y.MultiSelect:let e=(f.choice.selectValues||[]).sort(),a=(c.selectValues||[]).sort();return e.length!==a.length||!e.every((g,p)=>g===a[p]);default:throw new Error(`Unknown preference topic type: ${r.type}`)}}):!1})}async function ge({file:m,sombra:n,purposeSlugs:h,preferenceTopics:d,partitionKey:s,skipExistingRecordCheck:u,forceTriggerWorkflows:i},t){let c=new Date().getTime(),f=t.getValue("fileMetadata");l.info(de.magenta(`Reading in file: "${m}"`));let r=Z(m,x.record(x.string,x.string)),e={columnToPurposeName:{},pendingSafeUpdates:{},pendingConflictUpdates:{},skippedUpdates:{},...f[m]||{},lastFetchedAt:new Date().toISOString()};e=await pe(r,e),f[m]=e,await t.setValue(f,"fileMetadata");let a=await le(r,e);e=a.currentState,r=a.preferences,f[m]=e,await t.setValue(f,"fileMetadata"),e=await fe(r,e,{preferenceTopics:d,purposeSlugs:h,forceTriggerWorkflows:i}),f[m]=e,await t.setValue(f,"fileMetadata");let g=r.map(y=>y[e.identifierColumn]),p=u?[]:await ie(n,{identifiers:g.map(y=>({value:y})),partitionKey:s}),w=De(p,"userId");e.pendingConflictUpdates={},e.pendingSafeUpdates={},e.skippedUpdates={},r.forEach(y=>{let C=y[e.identifierColumn],S=D({row:y,columnToPurposeName:e.columnToPurposeName,preferenceTopics:d,purposeSlugs:h}),U=w[C];if(i&&!U)throw new Error(`No existing consent record found for user with id: ${C}.
4
+ When 'forceTriggerWorkflows' is set all the user identifiers should contain a consent record`);if(U&&me({currentConsentRecord:U,pendingUpdates:S,preferenceTopics:d})&&!i){e.skippedUpdates[C]=y;return}if(U&&ue({currentConsentRecord:U,pendingUpdates:S,preferenceTopics:d})){e.pendingConflictUpdates[C]={row:y,record:U};return}e.pendingSafeUpdates[C]=y}),f[m]=e,await t.setValue(f,"fileMetadata");let P=new Date().getTime();l.info(de.green(`Successfully pre-processed file: "${m}" in ${(P-c)/1e3}s`))}import{PreferenceQueryResponseItem as qe,PreferenceUpdateItem as we}from"@transcend-io/privacy-types";import*as o from"io-ts";var Be=o.type({purpose:o.string,preference:o.union([o.string,o.null]),valueMapping:o.record(o.string,o.union([o.string,o.boolean,o.null]))}),Le=o.intersection([o.type({columnToPurposeName:o.record(o.string,Be),lastFetchedAt:o.string,pendingSafeUpdates:o.record(o.string,o.record(o.string,o.string)),pendingConflictUpdates:o.record(o.string,o.type({record:qe,row:o.record(o.string,o.string)})),skippedUpdates:o.record(o.string,o.record(o.string,o.string))}),o.partial({identifierColumn:o.string,timestampColum:o.string})]),he=o.type({fileMetadata:o.record(o.string,Le),failingUpdates:o.record(o.string,o.type({uploadedAt:o.string,error:o.string,update:we})),pendingUpdates:o.record(o.string,we)});import{apply as We}from"@transcend-io/type-utils";async function Pe({auth:m,sombraAuth:n,receiptFilepath:h,file:d,partition:s,isSilent:u=!0,dryRun:i=!1,skipWorkflowTriggers:t=!1,skipConflictUpdates:c=!1,skipExistingRecordCheck:f=!1,attributes:r=[],transcendUrl:e=oe,forceTriggerWorkflows:a=!1}){let g=X(r),p=new Ge(h,he,{fileMetadata:{},failingUpdates:{},pendingUpdates:{}}),w=p.getValue("failingUpdates"),P=p.getValue("pendingUpdates"),y=p.getValue("fileMetadata");l.info(k.magenta(`Restored cache, there are:
5
+ ${Object.values(w).length} failing requests to be retried
6
+ ${Object.values(P).length} pending requests to be processed
7
+ The following files are stored in cache and will be used:
8
+ ${Object.keys(y).map(b=>b).join(`
9
+ `)}
10
+ The following file will be processed: ${d}
11
+ `));let C=te(e,m),[S,U,J]=await Promise.all([re(e,m,n),a?Promise.resolve([]):H(C),a?Promise.resolve([]):ee(C)]);await ge({file:d,purposeSlugs:U.map(b=>b.trackingType),preferenceTopics:J,sombra:S,partitionKey:s,skipExistingRecordCheck:f,forceTriggerWorkflows:a},p);let E={};y=p.getValue("fileMetadata");let R=y[d];if(l.info(k.magenta(`Found ${Object.entries(R.pendingSafeUpdates).length} safe updates in ${d}`)),l.info(k.magenta(`Found ${Object.entries(R.pendingConflictUpdates).length} conflict updates in ${d}`)),l.info(k.magenta(`Found ${Object.entries(R.skippedUpdates).length} skipped updates in ${d}`)),Object.entries({...R.pendingSafeUpdates,...c?{}:We(R.pendingConflictUpdates,({row:b})=>b)}).forEach(([b,$])=>{let j=R.timestampColum===q?new Date:new Date($[R.timestampColum]),M=D({row:$,columnToPurposeName:R.columnToPurposeName,preferenceTopics:J,purposeSlugs:U.map(I=>I.trackingType)});E[b]={userId:b,partition:s,timestamp:j.toISOString(),purposes:Object.entries(M).map(([I,ve])=>({...ve,purpose:I,workflowSettings:{attributes:g,isSilent:u,skipWorkflowTrigger:t}}))}}),await p.setValue(E,"pendingUpdates"),await p.setValue({},"failingUpdates"),i){l.info(k.green(`Dry run complete, exiting. ${Object.values(E).length} pending updates. Check file: ${h}`));return}l.info(k.magenta(`Uploading ${Object.values(E).length} preferences to partition: ${s}`));let Ce=new Date().getTime(),B=new ye.SingleBar({},ye.Presets.shades_classic),z=0,L=Object.entries(E),$e=Qe(L,t?100:10);B.start(L.length,0),await V($e,async b=>{try{await S.put("v1/preferences",{json:{records:b.map(([,$])=>$),skipWorkflowTriggers:t,forceTriggerWorkflows:a}}).json()}catch($){try{let M=JSON.parse($?.response?.body||"{}");M.error&&l.error(k.red(`Error: ${M.error}`))}catch{}l.error(k.red(`Failed to upload ${b.length} user preferences to partition ${s}: ${$?.response?.body||$?.message}`));let j=p.getValue("failingUpdates");b.forEach(([M,I])=>{j[M]={uploadedAt:new Date().toISOString(),update:I,error:$?.response?.body||$?.message||"Unknown error"}}),await p.setValue(j,"failingUpdates")}z+=b.length,B.update(z)},{concurrency:40}),B.stop();let Te=new Date().getTime()-Ce;l.info(k.green(`Successfully uploaded ${L.length} user preferences to partition ${s} in "${Te/1e3}" seconds!`))}import{readdirSync as _e}from"fs";import{basename as Ke,join as be}from"path";async function Sr({auth:m,partition:n,sombraAuth:h,consentUrl:d,file:s="",directory:u,dryRun:i,skipExistingRecordCheck:t,receiptFileDir:c,skipWorkflowTriggers:f,forceTriggerWorkflows:r,skipConflictUpdates:e,isSilent:a,attributes:g,concurrency:p}){u&&s&&(l.error(v.red("Cannot provide both a directory and a file. Please provide only one.")),process.exit(1)),!s&&!u&&(l.error(v.red("A file or directory must be provided. Please provide one using --file=./preferences.csv or --directory=./preferences")),process.exit(1));let w=[];if(u)try{let y=_e(u).filter(C=>C.endsWith(".csv"));y.length===0&&(l.error(v.red(`No CSV files found in directory: ${u}`)),process.exit(1)),w.push(...y.map(C=>be(u,C)))}catch(P){l.error(v.red(`Failed to read directory: ${u}`)),l.error(v.red(P.message)),process.exit(1)}else try{s.endsWith(".csv")||(l.error(v.red("File must be a CSV file")),process.exit(1)),w.push(s)}catch(P){l.error(v.red(`Failed to access file: ${s}`)),l.error(v.red(P.message)),process.exit(1)}l.info(v.green(`Processing ${w.length} consent preferences files for partition: ${n}`)),l.debug(`Files to process: ${w.join(", ")}`),t&&l.info(v.bgYellow(`Skipping existing record check: ${t}`)),await V(w,async P=>{let y=Ke(P).replace(".csv","");await Pe({receiptFilepath:be(c,`${y}-receipts.json`),auth:m,sombraAuth:h,file:P,partition:n,transcendUrl:d,skipConflictUpdates:e,skipWorkflowTriggers:f,skipExistingRecordCheck:t,isSilent:a,dryRun:i,attributes:F(g),forceTriggerWorkflows:r})},{concurrency:p})}export{Sr as uploadPreferences};
@@ -0,0 +1 @@
1
+ import"./chunk-J2A7ZQZK.js";import{c as i}from"./chunk-4AH7KIGL.js";import{j as s}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import{qe as o}from"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function h({auth:a,partition:m,sombraAuth:c,file:p,transcendUrl:f,timestampBefore:e,timestampAfter:r,identifiers:n=[],concurrency:l}){let g=await o(f,a,c),u=await s(g,{partition:m,filterBy:{...e?{timestampBefore:e.toISOString()}:{},...r?{timestampAfter:r.toISOString()}:{},...n.length>0?{identifiers:n}:{}},limit:l});i(p,u.map(t=>({...t,purposes:JSON.stringify(t.purposes),...t.purposes})))}export{h as pullConsentPreferences};
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-DDYFIYCC.js";import"./chunk-J2A7ZQZK.js";import{c as m}from"./chunk-4AH7KIGL.js";import"./chunk-PC5LFPCL.js";import{pe as c}from"./chunk-SNE53JL2.js";import{d as g}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{a as r}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{uniq as A,groupBy as G}from"lodash-es";import n from"colors";async function k({auth:p,file:a,transcendUrl:d,dataSiloIds:u,includeAttributes:y,includeGuessedCategories:C,parentCategories:f,subCategories:D=[]}){try{let o=c(d,p),P=await l(o,{dataSiloIds:u,includeGuessedCategories:C,parentCategories:f,includeAttributes:y,subCategories:D});r.info(n.magenta(`Writing datapoints to file "${a}"...`));let s=[],b=P.map(e=>{let i={"Property ID":e.id,"Data Silo":e.dataSilo.title,Object:e.dataPoint.name,"Object Path":e.dataPoint.path.join("."),Property:e.name,"Property Description":e.description,"Data Categories":e.categories.map(t=>`${t.category}:${t.name}`).join(", "),"Guessed Category":e.pendingCategoryGuesses?.[0]?`${e.pendingCategoryGuesses[0].category.category}:${e.pendingCategoryGuesses[0].category.name}`:"","Processing Purposes":e.purposes.map(t=>`${t.purpose}:${t.name}`).join(", "),...Object.entries(G(e.attributeValues||[],({attributeKey:t})=>t.name)).reduce((t,[$,h])=>(t[$]=h.map(j=>j.name).join(","),t),{})};return s=A([...s,...Object.keys(i)]),i});m(a,b,s)}catch(o){r.error(n.red(`An error occurred syncing the datapoints: ${o.message}`)),process.exit(1)}r.info(n.green(`Successfully synced datapoints to disk at ${a}! View at ${g}`))}export{k as pullDatapoints};
@@ -0,0 +1 @@
1
+ import{c as l}from"./chunk-J2A7ZQZK.js";import{d as a}from"./chunk-4AH7KIGL.js";import"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{a as e}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import i from"colors";import{uniq as w}from"lodash-es";async function q({file:r,transcendUrl:f,auth:m,sombraAuth:c,dataSiloId:u,actions:g,pageLimit:d,skipRequestCount:s,chunkSize:p}){s&&e.info(i.yellow("Skipping request count as requested. This may help speed up the call."));let{identifiersFormattedForCsv:t}=await l({transcendUrl:f,pageLimit:d,actions:g,auth:m,sombraAuth:c,dataSiloId:u,skipRequestCount:s}),h=w(t.map(n=>Object.keys(n)).flat()),o=await a(r,t,h,p);o.length===1?e.info(i.green(`Successfully wrote ${t.length} identifiers to file "${r}"`)):(e.info(i.green(`Successfully wrote ${t.length} identifiers to ${o.length} files:`)),o.forEach(n=>{e.info(i.green(` - ${n}`))}))}export{q as pullIdentifiers};
@@ -0,0 +1 @@
1
+ import{a as t}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import{b as m}from"./chunk-VH4PAOVV.js";import{a as g}from"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import a from"colors";import{ConsentBundleType as p}from"@transcend-io/privacy-types";async function M({auth:f,bundleTypes:r=[p.Production,p.Test],deploy:i,transcendUrl:s}){let e=await m(f);typeof e=="string"?(await t({deploy:i,transcendUrl:s,auth:e,bundleTypes:r}),n.info(a.green("Successfully updated Consent Manager!"))):(await g(e,async o=>{n.info(a.magenta(`Updating Consent Manager for organization "${o.organizationName}"...`)),await t({deploy:i,transcendUrl:s,auth:o.apiKey,bundleTypes:r}),n.info(a.green(`Successfully updated Consent Manager for organization "${o.organizationName}"!`))}),n.info(a.green("Successfully updated Consent Managers!")))}export{M as updateConsentManager};
@@ -0,0 +1 @@
1
+ import{g as s}from"./chunk-J2A7ZQZK.js";import"./chunk-4AH7KIGL.js";import{q as a}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import l from"colors";import*as t from"io-ts";var p=t.type({"Request Id":t.string});async function R({auth:r,dataSiloId:i,file:e,transcendUrl:m}){o.info(l.magenta(`Reading "${e}" from disk`));let n=a(e,p);await s({requestIds:n.map(d=>d["Request Id"]),transcendUrl:m,auth:r,dataSiloId:i})}export{R as markRequestDataSilosCompleted};
@@ -0,0 +1 @@
1
+ import{f as t}from"./chunk-J2A7ZQZK.js";import"./chunk-4AH7KIGL.js";import"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function s({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n}){await t({file:e,transcendUrl:r,auth:i,sombraAuth:o,dataSiloId:n})}export{s as markIdentifiersCompleted};
@@ -0,0 +1,6 @@
1
+ import{_b as L,a as N,b as R,ha as _,pe as D}from"./chunk-SNE53JL2.js";import"./chunk-BHDQRYCC.js";import{a}from"./chunk-OERYFLN2.js";import{b as U}from"./chunk-EZCJGIOS.js";import he from"colors";import X from"got";var Q=({hostname:t,auth:e})=>X.extend({prefixUrl:`https://${t}`,headers:{accept:"application/json","content-type":"application/json",authorization:`Bearer ${e}`}});import Re from"colors";import xe from"yargs-parser";var Ge=Object.values(U);import te from"colors";import j from"fs";var w=({assessment:t,index:e,total:s,wrap:r=!0})=>{let n="";(e===0||r)&&(n=`[
2
+ `);let m=JSON.stringify(t),o=s&&e<s-1&&!r?",":"";return n=`${n+m+o}
3
+ `,(s&&e===s-1||r)&&(n+=`
4
+ ]`),n};var B=({file:t,assessment:e,index:s,total:r})=>{a.info(te.magenta(`Writing enriched assessment ${s+1} of ${r} to file "${t}"...`)),s===0?j.writeFileSync(t,w({assessment:e,index:s,total:r,wrap:!1})):j.appendFileSync(t,w({assessment:e,index:s,total:r,wrap:!1}))};import P from"colors";import{decodeCodec as re}from"@transcend-io/type-utils";import{OneTrustGetListOfAssessmentsResponse as ne}from"@transcend-io/privacy-types";var q=async({oneTrust:t})=>{let e=0,s=1,r=0,n=[];for(;e<s;){let{body:m}=await t.get(`api/assessment/v2/assessments?page=${e}&size=2000`),{page:o,content:u}=re(ne,m);n.push(...u??[]),e===0&&(s=o?.totalPages??0,r=o?.totalElements??0),e+=1,a.info(`Fetched ${n.length} of ${r} assessments.`)}return n};import{decodeCodec as oe}from"@transcend-io/type-utils";import{OneTrustGetAssessmentResponse as ie}from"@transcend-io/privacy-types";var J=async({oneTrust:t,assessmentId:e})=>{let{body:s}=await t.get(`api/assessment/v2/assessments/${e}/export?ExcludeSkippedQuestions=false`);return oe(ie,s)};import{decodeCodec as ae}from"@transcend-io/type-utils";import{OneTrustGetRiskResponse as me}from"@transcend-io/privacy-types";var K=async({oneTrust:t,riskId:e})=>{let{body:s}=await t.get(`api/risk/v2/risks/${e}`);return ae(me,s)};import{decodeCodec as ce}from"@transcend-io/type-utils";import{OneTrustGetUserResponse as ue}from"@transcend-io/privacy-types";var b=async({oneTrust:t,userId:e})=>{let{body:s}=await t.get(`api/scim/v2/Users/${e}`);return ce(ue,s)};import{uniq as pe}from"lodash-es";import{keyBy as I}from"lodash-es";var W=({assessment:t,assessmentDetails:e,riskDetails:s,creatorDetails:r,approversDetails:n,respondentsDetails:m})=>{let o=I(s,"id"),{sections:u,createdBy:h,...g}=e,O=u.map(i=>{let{questions:A,...$}=i,x=A.map(E=>{let{risks:C,...G}=E,v=(C??[]).map(y=>{let S=o[y.riskId];return{...y,...S,level:y.level,impactLevel:y.impactLevel??0}});return{...G,risks:v}});return{...$,questions:x}}),p={...h,active:r?.active??!1,userType:r?.userType??"Internal",emails:r?.emails??[],title:r?.title??null,givenName:r?.name.givenName??null,familyName:r?.name.familyName??null},d=I(n,"id"),l=e.approvers.flatMap(i=>d[i.id]?[{...i,approver:{...i.approver,active:d[i.id].active,userType:d[i.id].userType,emails:d[i.id].emails,title:d[i.id].title,givenName:d[i.id].name.givenName??null,familyName:d[i.id].name.familyName??null}}]:[]),T=I(m,"id"),F=e.respondents.filter(i=>!i.name.includes("@")).flatMap(i=>T[i.id]?[{...i,active:T[i.id].active,userType:T[i.id].userType,emails:T[i.id].emails,title:T[i.id].title,givenName:T[i.id].name.givenName??null,familyName:T[i.id].name.familyName??null}]:[]);return{...t,...g,approvers:l,respondents:F,createdBy:p,sections:O}};import H from"colors";var k=async({transcend:t,assessment:e,total:s,index:r})=>{a.info(H.magenta(`Writing enriched assessment ${r+1} ${s?`of ${s} `:" "}to Transcend...`));let m={json:w({assessment:e,index:r,total:s})};try{await L(t,_,{input:m})}catch{a.error(H.red(`Failed to sync assessment ${r+1} ${s?`of ${s} `:" "}to Transcend.
5
+ Assessment Title: ${e.name}. Template Title: ${e.template.name}
6
+ `))}};var z=async({oneTrust:t,file:e,dryRun:s,transcend:r})=>{a.info("Getting list of all assessments from OneTrust...");let n=await q({oneTrust:t}),m={},o=5,u=Array.from({length:Math.ceil(n.length/o)},(h,g)=>n.slice(g*o,(g+1)*o));await N(u,async(h,g)=>{let O=[];await R(h,async(p,d)=>{let l=o*g+d+1;a.info(`[assessment ${l} of ${n.length}]: fetching details...`);let{templateName:T,assessmentId:F}=p,i=await J({oneTrust:t,assessmentId:F}),A=i.createdBy.id,$=m[A];if(!$){a.info(`[assessment ${l} of ${n.length}]: fetching creator...`);try{$=await b({oneTrust:t,userId:A}),m[A]=$}catch{a.warn(P.yellow(`[assessment ${l} of ${n.length}]: failed to fetch form creator. creatorId: ${A}. Assessment Title: ${p.name}. Template Title: ${T}`))}}let{approvers:x}=i,E=[];x.length>0&&(a.info(`[assessment ${l} of ${n.length}]: fetching approvers...`),E=await R(x.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch{return a.warn(P.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a form approver. approverId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let{respondents:C}=i,G=C.filter(c=>!c.name.includes("@")),v=[];G.length>0&&(a.info(`[assessment ${l} of ${n.length}]: fetching respondents...`),v=await R(G.map(({id:c})=>c),async c=>{try{let f=m[c];return f||(f=await b({oneTrust:t,userId:c}),m[c]=f),[f]}catch{return a.warn(P.yellow(`[assessment ${l} of ${n.length}]: failed to fetch a respondent. respondentId: ${c}. Assessment Title: ${p.name}. Template Title: ${T}`)),[]}},{concurrency:5}));let y=[],S=pe(i.sections.flatMap(c=>c.questions.flatMap(f=>(f.risks??[]).flatMap(Z=>Z.riskId))));S.length>0&&(a.info(`[assessment ${l} of ${n.length}]: fetching risks...`),y=await R(S,c=>K({oneTrust:t,riskId:c}),{concurrency:5}));let V=W({assessment:p,assessmentDetails:i,riskDetails:y,creatorDetails:$,approversDetails:E.flat(),respondentsDetails:v.flat()});O.push(V)},{concurrency:o}),await N(O,async(p,d)=>{let l=g*o+d;s&&e?B({assessment:p,index:l,total:n.length,file:e}):r&&await k({assessment:p,transcend:r,total:n.length,index:l})})})};import{decodeCodec as le}from"@transcend-io/type-utils";import M from"colors";import fe from"JSONStream";import{createReadStream as de}from"fs";import{OneTrustEnrichedAssessment as Te}from"@transcend-io/privacy-types";var Y=({transcend:t,file:e})=>(a.info(`Getting list of all assessments from file ${e}...`),new Promise((s,r)=>{let n=de(e,{encoding:"utf-8",highWaterMark:65536}),m=fe.parse("*"),o=0;n.pipe(m),m.on("data",async u=>{try{m.pause();let h=le(Te,u);await k({assessment:h,transcend:t,index:o}),o+=1,m.resume()}catch(h){a.error(M.red(`Failed to parse the assessment ${o} from file '${e}': ${h.message}.`))}}),m.on("end",()=>{a.info(`Finished processing ${o} assessments from file ${e}`),s()}),m.on("error",u=>{a.error(M.red(`Error parsing file '${e}': ${u.message}`)),r(u)}),n.on("error",u=>{a.error(M.red(`Error reading file '${e}': ${u.message}`)),r(u)})}));async function _s({hostname:t,oneTrustAuth:e,source:s,transcendAuth:r,transcendUrl:n,resource:m,file:o,dryRun:u,debug:h}){if(!u&&!r)throw new Error('Must specify a "transcendAuth" parameter to sync resources to Transcend. e.g. --transcendAuth=${TRANSCEND_API_KEY}');if(u&&!o)throw new Error('Must set a "file" parameter when "dryRun" is "true". e.g. --file=./oneTrustAssessments.json');if(o){let p=o.split(".");if(p.length<2)throw new Error('The "file" parameter has an invalid format. Expected a path with extensions. e.g. --file=./pathToFile.json.');if(p.at(-1)!=="json")throw new Error(`Expected the format of the "file" parameters '${o}' to be 'json', but got '${p.at(-1)}'.`)}if(s==="oneTrust"){if(!t)throw new Error('Missing required parameter "hostname". e.g. --hostname=customer.my.onetrust.com');if(!e)throw new Error('Missing required parameter "oneTrustAuth". e.g. --oneTrustAuth=$ONE_TRUST_AUTH_TOKEN')}else{if(!o)throw new Error('Must specify a "file" parameter to read the OneTrust assessments from. e.g. --source=./oneTrustAssessments.json');if(u)throw new Error('Cannot read and write to a file simultaneously. Emit the "source" parameter or set it to oneTrust if "dryRun" is enabled.')}let g=t&&e?Q({hostname:t,auth:e}):void 0,O=n&&r?D(n,r):void 0;try{m==="assessments"&&(s==="oneTrust"&&g?await z({oneTrust:g,file:o,dryRun:u,...O&&{transcend:O}}):s==="file"&&o&&O&&await Y({file:o,transcend:O}))}catch(p){throw new Error(`An error occurred syncing the resource ${m} from OneTrust: ${h?p.stack:p.message}`)}a.info(he.green(`Successfully synced OneTrust ${m} to ${u?`disk at "${o}"`:"Transcend"}!`))}export{_s as syncOt};
@@ -0,0 +1 @@
1
+ import{L as a}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function m({auth:s,actions:o,statuses:r=[],requestIds:c,silentModeBefore:e,createdAtBefore:t,createdAtAfter:n,cancellationTitle:i,transcendUrl:u,concurrency:d}){await a({transcendUrl:u,requestActions:o,auth:s,cancellationTitle:i,requestIds:c,statuses:r,concurrency:d,silentModeBefore:e?new Date(e):void 0,createdAtBefore:t?new Date(t):void 0,createdAtAfter:n?new Date(n):void 0})}export{m as cancel};
@@ -0,0 +1,8 @@
1
+ import"./chunk-J2A7ZQZK.js";import{c as v}from"./chunk-4AH7KIGL.js";import{d as b}from"./chunk-2U7DMWVM.js";import"./chunk-QPPYCG3K.js";import"./chunk-PC5LFPCL.js";import{b as O}from"./chunk-VH4PAOVV.js";import{a as M,pe as x,sc as S}from"./chunk-SNE53JL2.js";import{c as y}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as t}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import e from"colors";import{join as w}from"path";import E,{existsSync as j,mkdirSync as T}from"fs";async function q({auth:A,start:C,end:f,folder:r,bin:l,transcendUrl:N}){let m=await O(A);E.existsSync(r)&&!E.lstatSync(r).isDirectory()&&(t.error(e.red('The provided argument "folder" was passed a file. expected: folder="./consent-metrics/"')),process.exit(1));let g=l;Object.values(S).includes(g)||(t.error(e.red(`Failed to parse argument "bin" with value "${l}"
2
+ Expected one of:
3
+ ${Object.values(S).join(`
4
+ `)}`)),process.exit(1));let i=new Date(C),o=f?new Date(f):new Date;if(Number.isNaN(i.getTime())&&(t.error(e.red(`Start date provided is invalid date. Got --start="${C}" expected --start="01/01/2023"`)),process.exit(1)),Number.isNaN(o.getTime())&&(t.error(e.red(`End date provided is invalid date. Got --end="${f}" expected --end="01/01/2023"`)),process.exit(1)),i>o&&(t.error(e.red(`Got a start date "${i.toISOString()}" that was larger than the end date "${o.toISOString()}". Start date must be before end date.`)),process.exit(1)),j(r)||T(r),t.info(e.magenta(`Pulling consent metrics from start=${i.toString()} to end=${o.toISOString()} with bin size "${l}"`)),typeof m=="string"){try{let n=x(N,m),s=await b(n,{bin:g,start:i,end:o});Object.entries(s).forEach(([p,c])=>{c.forEach(({points:u,name:d})=>{let a=w(r,`${p}_${d}.csv`);t.info(e.magenta(`Writing configuration to file "${a}"...`)),v(a,u.map(({key:$,value:h})=>({timestamp:$,value:h})))})})}catch(n){t.error(e.red(`An error occurred syncing the schema: ${n.message}`)),process.exit(1)}t.info(e.green(`Successfully synced consent metrics to disk in folder "${r}"! View at ${y}`))}else{let n=[];await M(m,async(s,p)=>{let c=`[${p+1}/${m.length}][${s.organizationName}] `;t.info(e.magenta(`~~~
5
+
6
+ ${c}Attempting to pull consent metrics...
7
+
8
+ ~~~`));let u=x(N,s.apiKey);try{let d=await b(u,{bin:g,start:i,end:o}),a=w(r,s.organizationName);j(a)||T(a),Object.entries(d).forEach(([$,h])=>{h.forEach(({points:I,name:F})=>{let D=w(a,`${$}_${F}.csv`);t.info(e.magenta(`Writing configuration to file "${D}"...`)),v(D,I.map(({key:G,value:z})=>({timestamp:G,value:z})))})}),t.info(e.green(`${c}Successfully pulled configuration!`))}catch{t.error(e.red(`${c}Failed to sync configuration.`)),n.push(s.organizationName)}}),n.length>0&&(t.info(e.red(`Sync encountered errors for "${n.join(",")}". View output above for more information, or check out ${y}`)),process.exit(1))}}export{q as pullConsentMetrics};
@@ -0,0 +1 @@
1
+ import{V as t}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function n({auth:s,dataSiloId:a,status:e,statuses:i,transcendUrl:o}){await t({transcendUrl:o,auth:s,status:e,dataSiloId:a,requestStatuses:i})}export{n as skipRequestDataSilos};
@@ -0,0 +1 @@
1
+ import{a as p}from"./chunk-ZB5DNAF3.js";import{c as d}from"./chunk-VH4PAOVV.js";import{ne as m,pe as g}from"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{d as c,e as l}from"./chunk-QQRMUEM7.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{join as f}from"path";import e from"colors";import{existsSync as D,lstatSync as h}from"fs";async function M({auth:x,dataFlowsYmlFolder:r,dataSilosYmlFolder:t,ignoreYmls:S=[],transcendUrl:T}){r||(o.error(e.red("Missing required arg: --dataFlowsYmlFolder=./working/data-flows/")),process.exit(1)),(!D(r)||!h(r).isDirectory())&&(o.error(e.red(`Folder does not exist: "${r}"`)),process.exit(1)),t||(o.error(e.red("Missing required arg: --dataSilosYmlFolder=./working/data-silos/")),process.exit(1)),(!D(t)||!h(t).isDirectory())&&(o.error(e.red(`Folder does not exist: "${t}"`)),process.exit(1));let w=g(T,x),{serviceToTitle:u,serviceToSupportedIntegration:v}=await m(w);d(r).forEach(i=>{let{"data-flows":F=[]}=c(f(r,i)),{adTechDataSilos:s,siteTechDataSilos:a}=p(F,{serviceToSupportedIntegration:v,serviceToTitle:u}),n=[...s,...a];o.log(`Total Services: ${n.length}`),o.log(`Ad Tech Services: ${s.length}`),o.log(`Site Tech Services: ${a.length}`),l(f(t,i),{"data-silos":S.includes(i)?[]:n})})}export{M as deriveDataSilosFromDataFlows};
@@ -0,0 +1 @@
1
+ import"./chunk-J2A7ZQZK.js";import{c as s}from"./chunk-4AH7KIGL.js";import{U as r}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import y from"colors";import{uniq as q}from"lodash-es";async function v({auth:n,transcendUrl:a,file:e,pageLimit:i,actions:m,sombraAuth:c,statuses:u,createdAtBefore:p,createdAtAfter:f,showTests:l}){let{requestsFormattedForCsv:t}=await r({transcendUrl:a,pageLimit:i,actions:m,statuses:u,auth:n,sombraAuth:c,createdAtBefore:p,createdAtAfter:f,isTest:l}),g=q(t.map(d=>Object.keys(d)).flat());s(e,t,g),o.info(y.green(`Successfully wrote ${t.length} requests to file "${e}"`))}export{v as _export};
@@ -0,0 +1 @@
1
+ import{Q as e}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function A({auth:t,requestReceiptFolder:s,sombraAuth:r,actions:a,statuses:o,requestIds:i,createdAt:n,emailIsVerified:c,silentModeBefore:u,sendEmailReceipt:d,copyIdentifiers:m,skipWaitingPeriod:l,createdAtBefore:p,createdAtAfter:f,concurrency:R,transcendUrl:q}){await e({requestReceiptFolder:s,auth:t,sombraAuth:r,requestActions:a,requestStatuses:o,requestIds:i,createdAt:n,emailIsVerified:c,silentModeBefore:u,sendEmailReceipt:d,copyIdentifiers:m,skipWaitingPeriod:l,createdAtBefore:p,createdAtAfter:f,concurrency:R,transcendUrl:q})}export{A as restart};
@@ -0,0 +1 @@
1
+ import{J as t}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function f({auth:e,transcendUrl:i,createdAtBefore:n,createdAtAfter:o,actions:r,daysLeft:a,days:s,requestIds:m,emailTemplate:c,concurrency:d}){await t({transcendUrl:i,requestActions:r,auth:e,emailTemplate:c,days:s,daysLeft:a,requestIds:m,concurrency:d,createdAtBefore:n,createdAtAfter:o})}export{f as notifyAdditionalTime};
@@ -0,0 +1 @@
1
+ import{b as p}from"./chunk-LB26GOGN.js";import"./chunk-VH4PAOVV.js";import{ke as c,pe as m}from"./chunk-SNE53JL2.js";import{b as g}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as r}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import n from"colors";import{execSync as k}from"child_process";var l='A repository name must be provided. You can specify using --repositoryName=$REPO_NAME or by ensuring the command "git config --get remote.origin.url" returns the name of the repository';async function S({auth:d,scanPath:o,ignoreDirs:f,repositoryName:u,transcendUrl:y}){let e=u;if(!e)try{let t=k(`cd ${o} && git config --get remote.origin.url`).toString("utf-8").trim();[e]=t.includes("https:")?t.split("/").slice(3).join("/").split("."):(t.split(":").pop()||"").split("."),e||(r.error(n.red(l)),process.exit(1))}catch(a){r.error(n.red(`${l} - Got error: ${a.message}`)),process.exit(1)}let h=m(y,d),i=await p({scanPath:o,ignoreDirs:f,repositoryName:e});await c(h,i);let s=new URL(g);s.pathname="/code-scanning/code-packages",r.info(n.green(`Scan found ${i.length} packages at ${o}! View results at '${s.href}'`))}export{S as scanPackages};
@@ -0,0 +1 @@
1
+ import{t}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function u({auth:e,transcendUrl:r,actions:a,statuses:n,requestIds:s,createdAtBefore:o,createdAtAfter:i,concurrency:c}){await t({transcendUrl:r,requestActions:a,auth:e,requestIds:s,statuses:n,concurrency:c,createdAtBefore:o,createdAtAfter:i})}export{u as markSilent};
@@ -0,0 +1,5 @@
1
+ import{a as S}from"./chunk-AHYJJKNA.js";import{a as A}from"./chunk-T2PLXAEM.js";import{b as v,c as C}from"./chunk-VH4PAOVV.js";import{Nd as x,a as w,pe as T}from"./chunk-SNE53JL2.js";import{c as d}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{d as b}from"./chunk-QQRMUEM7.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as n}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import{existsSync as z,lstatSync as F}from"fs";import{join as L}from"path";import o from"colors";async function I({transcendUrl:i,auth:c,pageSize:h,publishToPrivacyCenter:y,contents:l,deleteExtraAttributeValues:m=!1,classifyService:f=!1}){let u=T(i,c);try{return!await x(l,u,{pageSize:h,publishToPrivacyCenter:y,classifyService:f,deleteExtraAttributeValues:m})}catch(t){return n.error(o.red(`An unexpected error occurred syncing the schema: ${t.message}`)),!1}}async function H({file:i="./transcend.yml",transcendUrl:c,auth:h,variables:y,pageSize:l,publishToPrivacyCenter:m,classifyService:f,deleteExtraAttributeValues:u}){let t=await v(h),N=A(y),p;if(Array.isArray(t)&&F(i).isDirectory()?p=C(i).map(e=>L(i,e)):p=i.split(","),p.length<1)throw new Error("No file specified!");let s=p.map(e=>{z(e)?n.info(o.magenta(`Reading file "${e}"...`)):(n.error(o.red(`The file path does not exist on disk: ${e}. You can specify the filepath using --file=./examples/transcend.yml`)),process.exit(1));try{let r=b(e,N);return n.info(o.green(`Successfully read in "${e}"`)),{content:r,name:e.split("/").pop().replace(".yml","")}}catch(r){n.error(o.red(`The shape of your yaml file is invalid with the following errors: ${r.message}`)),process.exit(1)}});if(typeof t=="string"){let[e,...r]=s.map(({content:g})=>g),$=S(e,...r);await I({transcendUrl:c,auth:t,contents:$,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,pageSize:l,classifyService:!!f})||(n.info(o.red(`Sync encountered errors. View output above for more information, or check out ${d}`)),process.exit(1))}else{if(s.length!==1&&s.length!==t.length)throw new Error(`Expected list of yml files to be equal to the list of API keys.Got ${s.length} YML file${s.length===1?"":"s"} and ${t.length} API key${t.length===1?"":"s"}`);let e=[];await w(t,async(r,$)=>{let a=`[${$+1}/${t.length}][${r.organizationName}] `;n.info(o.magenta(`~~~
2
+
3
+ ${a}Attempting to push configuration...
4
+
5
+ ~~~`));let g=s.length===1?s[0].content:s.find(E=>E.name===r.organizationName)?.content;if(!g){n.error(o.red(`${a}Failed to find transcend.yml file for organization: "${r.organizationName}".`)),e.push(r.organizationName);return}await I({transcendUrl:c,auth:r.apiKey,contents:g,pageSize:l,publishToPrivacyCenter:m,deleteExtraAttributeValues:u,classifyService:f})?n.info(o.green(`${a}Successfully pushed configuration!`)):(n.error(o.red(`${a}Failed to sync configuration.`)),e.push(r.organizationName))}),e.length>0&&(n.info(o.red(`Sync encountered errors for "${e.join(",")}". View output above for more information, or check out ${d}`)),process.exit(1))}n.info(o.green(`Successfully synced yaml file to Transcend! View at ${d}`))}export{H as push};
@@ -0,0 +1,5 @@
1
+ import{h as N,i as x}from"./chunk-RIVSSQAD.js";import{b as E}from"./chunk-VH4PAOVV.js";import{a as w,be as m,pe as f}from"./chunk-SNE53JL2.js";import{c as g}from"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{e as l}from"./chunk-QQRMUEM7.js";import"./chunk-HMF46LB7.js";import"./chunk-W6GUOMVP.js";import{a as o}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import n from"colors";import{join as _}from"path";import b from"fs";async function V({auth:L,resources:u=N,file:e,transcendUrl:p,dataSiloIds:d=[],integrationNames:T=[],trackerStatuses:y=x,pageSize:S,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,debug:a}){let i=await E(L);if(typeof i=="string"){try{let r=f(p,i),t=await m(r,{dataSiloIds:d,integrationNames:T,resources:u,pageSize:S,debug:a,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:y});o.info(n.magenta(`Writing configuration to file "${e}"...`)),l(e,t)}catch(r){o.error(n.red(`An error occurred syncing the schema: ${a?r.stack:r.message}`)),process.exit(1)}o.info(n.green(`Successfully synced yaml file to disk at ${e}! View at ${g}`))}else{if(!b.lstatSync(e).isDirectory())throw new Error("File is expected to be a folder when passing in a list of API keys to pull from. e.g. --file=./working/");let r=[];await w(i,async(t,P)=>{let s=`[${P+1}/${i.length}][${t.organizationName}] `;o.info(n.magenta(`~~~
2
+
3
+ ${s}Attempting to pull configuration...
4
+
5
+ ~~~`));let R=f(p,t.apiKey);try{let c=await m(R,{dataSiloIds:d,integrationNames:T,resources:u,pageSize:S,debug:a,skipDatapoints:h,skipSubDatapoints:$,includeGuessedCategories:A,trackerStatuses:y}),C=_(e,`${t.organizationName}.yml`);o.info(n.magenta(`Writing configuration to file "${C}"...`)),l(C,c),o.info(n.green(`${s}Successfully pulled configuration!`))}catch(c){o.error(n.red(`${s}Failed to sync configuration. - ${c.message}`)),r.push(t.organizationName)}}),r.length>0&&(o.info(n.red(`Sync encountered errors for "${r.join(",")}". View output above for more information, or check out ${g}`)),process.exit(1))}}export{V as pull};
@@ -0,0 +1 @@
1
+ import{O as t,n as e}from"./chunk-PC5LFPCL.js";import"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";async function y({auth:o,file:i,transcendUrl:n,cacheFilepath:a,requestReceiptFolder:r,sombraAuth:s,concurrency:l,attributes:c,isTest:d,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,skipFilterStep:b,dryRun:g,debug:C,defaultPhoneCountryCode:f}){await t({cacheFilepath:a,requestReceiptFolder:r,file:i,auth:o,sombraAuth:s,concurrency:l,transcendUrl:n,defaultPhoneCountryCode:f,attributes:e(c),debug:C,skipFilterStep:b,isSilent:p,skipSendingReceipt:u,emailIsVerified:m,isTest:d,dryRun:g})}export{y as upload};
@@ -0,0 +1 @@
1
+ import{b as d}from"./chunk-DDYFIYCC.js";import"./chunk-J2A7ZQZK.js";import{c as u}from"./chunk-4AH7KIGL.js";import"./chunk-PC5LFPCL.js";import{pe as c}from"./chunk-SNE53JL2.js";import"./chunk-APA5PR4U.js";import"./chunk-BHDQRYCC.js";import{a as e}from"./chunk-OERYFLN2.js";import"./chunk-EZCJGIOS.js";import i from"colors";import{uniq as b}from"lodash-es";async function x({auth:l,file:s,transcendUrl:m,dataSiloIds:f,subCategories:p,status:g,includeEncryptedSnippets:a}){try{let o=c(m,l),C=await d(o,{dataSiloIds:f,subCategories:p,status:g,includeEncryptedSnippets:a});e.info(i.magenta(`Writing unstructured discovery files to file "${s}"...`));let r=[],S=C.map(t=>{let n={"Entry ID":t.id,"Data Silo ID":t.dataSiloId,"Object Path ID":t.scannedObjectPathId,"Object ID":t.scannedObjectId,...a?{Entry:t.name,"Context Snippet":t.contextSnippet}:{},"Data Category":`${t.dataSubCategory.category}:${t.dataSubCategory.name}`,"Classification Status":t.status,"Confidence Score":t.confidence,"Classification Method":t.classificationMethod,"Classifier Version":t.classifierVersion};return r=b([...r,...Object.keys(n)]),n});u(s,S,r)}catch(o){e.error(i.red(`An error occurred syncing the unstructured discovery files: ${o.message}`)),process.exit(1)}e.info(i.green(`Successfully synced unstructured discovery files to disk at ${s}!`))}export{x as pullUnstructuredDiscoveryFiles};
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import{a as Gi,b as Ui,c as ji,d as Hi}from"./chunk-IX57OTFV.js";import{a as Fi,b as Qi}from"./chunk-DDYFIYCC.js";import{a as ta}from"./chunk-AHYJJKNA.js";import{a as bi,b as wi,c as Ri,d as Ei,e as Ii,f as Oi,g as Di}from"./chunk-J2A7ZQZK.js";import{a as Ci,b as Mi,c as Li,d as Ni}from"./chunk-4AH7KIGL.js";import{a as Ti,b as Ai,c as yi}from"./chunk-36OYCQAH.js";import{a as xi}from"./chunk-T2PLXAEM.js";import{a as si,b as oi,c as ai,d as pi,e as ii,f as mi,g as ci,h as gi,i as li,j as ui}from"./chunk-2U7DMWVM.js";import{a as di,d as hi,e as fi,f as Pi}from"./chunk-QPPYCG3K.js";import{A as kp,B as Bp,C as Fp,D as Qp,E as Gp,F as Up,G as jp,H as Hp,I as Vp,J as qp,K as vp,L as _p,M as zp,N as Jp,O as Wp,P as Zp,Q as Kp,R as Xp,S as Yp,T as ti,U as ei,V as ri,W as ni,a as ea,b as ra,c as na,d as sa,e as oa,f as aa,g as pa,h as ia,i as ma,j as ca,k as ga,l as da,m as la,n as ua,o as ha,p as fa,q as Pa,r as Ta,s as Aa,t as Np,u as Ep,v as Ip,w as Op,x as Dp,y as $p,z as Sp}from"./chunk-PC5LFPCL.js";import{a as $i,b as Si,c as ki,d as Bi}from"./chunk-VH4PAOVV.js";import{$ as fr,$a as Pn,$b as hs,$c as ho,$d as $a,A as Ve,Aa as Vr,Ab as qn,Ac as Hs,Ad as Uo,Ae as ap,B as qe,Ba as qr,Bb as vn,Bc as Vs,Bd as jo,Be as pp,C as ve,Ca as vr,Cb as _n,Cc as R,Cd as Ho,Ce as ip,D as _e,Da as _r,Db as zn,Dc as qs,Dd as Vo,De as mp,E as ze,Ea as zr,Eb as Jn,Ec as vs,Ed as qo,Ee as cp,F as Je,Fa as Jr,Fb as Wn,Fc as _s,Fd as vo,Fe as gp,G as We,Ga as Wr,Gb as b,Gc as zs,Gd as _o,Ge as dp,H as Ze,Ha as Zr,Hb as Zn,Hc as Js,Hd as zo,He as lp,I as Ke,Ia as Kr,Ib as Kn,Ic as Ws,Id as Jo,Ie as up,J as Xe,Ja as Xr,Jb as Xn,Jc as Zs,Jd as Wo,Je as hp,K as Ye,Ka as Yr,Kb as Yn,Kc as Ks,Kd as Zo,Ke as fp,L as tr,La as tn,Lb as ts,Lc as Xs,Ld as Ko,Le as Pp,M as er,Ma as en,Mb as es,Mc as Ys,Md as Xo,Me as Tp,N as rr,Na as rn,Nb as rs,Nc as to,Nd as Yo,Ne as f,O as nr,Oa as nn,Ob as ns,Oc as eo,Od as ya,Oe as Ap,P as sr,Pa as sn,Pb as ss,Pc as ro,Pd as xa,Q as or,Qa as on,Qb as os,Qc as no,Qd as ba,R as ar,Ra as an,Rb as as,Rc as so,Rd as wa,S as pr,Sa as pn,Sb as ps,Sc as oo,Sd as Ra,T as ir,Ta as mn,Tb as is,Tc as ao,Td as Ca,U as mr,Ua as cn,Ub as ms,Uc as po,Ud as Ma,V as cr,Va as gn,Vb as cs,Vc as io,Vd as La,W as gr,Wa as dn,Wb as gs,Wc as mo,Wd as Na,X as dr,Xa as ln,Xb as ds,Xc as co,Xd as Ea,Y as lr,Ya as un,Yb as ls,Yc as go,Yd as Ia,Z as ur,Za as hn,Zb as us,Zc as lo,Zd as Oa,_ as hr,_a as fn,_b as w,_c as uo,_d as Da,a as x,aa as Pr,ab as Tn,ac as fs,ad as fo,ae as Sa,ba as Tr,bb as An,bc as Ps,bd as Po,be as ka,c as Ae,ca as Ar,cb as yn,cc as Ts,cd as To,ce as Ba,d as ye,da as yr,db as xn,dc as As,dd as Ao,de as Fa,e as xe,ea as xr,eb as bn,ec as ys,ed as yo,ee as Qa,f as be,fa as br,fb as wn,fc as xs,fd as xo,fe as Ga,g as we,ga as wr,gb as Rn,gc as bs,gd as bo,ge as Ua,h as Re,ha as Rr,hb as Cn,hc as ws,hd as wo,he as ja,i as Ce,ia as Cr,ib as Mn,ic as Rs,id as h,ie as Ha,j as Me,ja as Mr,jb as Ln,jc as Cs,jd as Ro,je as Va,k as Le,ka as Lr,kb as Nn,kc as Ms,kd as Co,ke as qa,l as Ne,la as Nr,lb as En,lc as Ls,ld as Mo,le as va,m as Ee,ma as Er,mb as In,mc as Ns,md as Lo,me as _a,n as Ie,na as Ir,nb as On,nc as Es,nd as No,ne as za,o as Oe,oa as Or,ob as Dn,oc as Is,od as Eo,oe as Za,p as De,pa as Dr,pb as $n,pc as Os,pd as Io,pe as M,q as $e,qa as $r,qb as Sn,qc as Ds,qd as Oo,qe as Ka,r as Se,ra as Sr,rb as kn,rc as $s,rd as Do,re as Xa,s as ke,sa as kr,sb as Bn,sc as Ss,sd as $o,se as Ya,t as Be,ta as Br,tb as Fn,tc as ks,td as So,te as L,u as Fe,ua as Fr,ub as Qn,uc as Bs,ud as ko,ue as tp,v as Qe,va as Qr,vb as Gn,vc as Fs,vd as Bo,ve as ep,w as Ge,wa as Gr,wb as Un,wc as Qs,wd as Fo,we as rp,x as Ue,xa as Ur,xb as jn,xc as Gs,xd as C,xe as np,y as je,ya as jr,yb as Hn,yc as Us,yd as Qo,ye as sp,z as He,za as Hr,zb as Vn,zc as js,zd as Go,ze as op}from"./chunk-SNE53JL2.js";import{a as yp,b as xp,c as bp,d as wp,e as N,f as Rp,g as Cp,h as Mp,i as Lp}from"./chunk-APA5PR4U.js";import{a as Ja,b as Wa}from"./chunk-BHDQRYCC.js";import{a as ue,b as he,c as fe,d as Pe,e as Te}from"./chunk-QQRMUEM7.js";import{$ as Kt,A as Rt,B as Ct,C as Mt,D as Lt,E as Nt,F as Et,G as It,H as Ot,I as Dt,J as $t,K as St,L as kt,M as Bt,N as Ft,O as Qt,P as Gt,Q as Ut,R as jt,S as Ht,T as Vt,U as qt,V as vt,W as _t,X as zt,Y as Jt,Z as Wt,_ as Zt,a as X,aa as Xt,b as Y,ba as Yt,c as tt,ca as te,d as et,da as ee,e as rt,ea as re,f as nt,fa as ne,g as st,ga as se,h as ot,ha as oe,i as at,ia as ae,j as pt,ja as pe,k as it,ka as ie,l as mt,la as me,m as ct,ma as ce,n as gt,na as ge,o as dt,oa as de,p as lt,pa as le,q as ut,r as ht,s as ft,t as Pt,u as Tt,v as At,w as yt,x as xt,y as bt,z as wt}from"./chunk-HMF46LB7.js";import{a as Z,b as K}from"./chunk-W6GUOMVP.js";import"./chunk-OERYFLN2.js";import{a as q,b as v,c as _,d as z,e as J,f as W}from"./chunk-EZCJGIOS.js";import{apply as k,decodeCodec as I,getValues as B}from"@transcend-io/type-utils";import{createHandlebarsWithHelpers as O}from"@transcend-io/handlebars-utils";import{PromptStatus as D,ChatCompletionRole as l,PromptRunProductArea as A,QueueStatus as y}from"@transcend-io/privacy-types";var T=20;async function E(a){let e=[],r=0,t=!1;do{let{largeLanguageModels:{nodes:s}}=await w(a,b,{first:T,offset:r});e.push(...s),r+=T,t=s.length===T}while(t);return e.sort((s,o)=>s.name.localeCompare(o.name))}import{groupBy as F,keyBy as P,uniq as Q,chunk as G}from"lodash-es";function U(a){return new RegExp(`<${a}>([\\s\\S]+?)<\\/${a}>`)}function um(a){return a}var j=a=>{try{return JSON.parse(a)}catch{return a}},$=class{prompts;handlebarsOptions;promptContentMap;largeLanguageModels=[];agentsByName={};agentsByAgentId={};graphQLClient;defaultVariables;variables;handlebars;transcendApiKey;transcendUrl;requireApproval;cacheDuration;lastUpdatedAt;constructor({prompts:e,handlebarsOptions:r={},transcendUrl:t=N,transcendApiKey:s,requireApproval:o=!0,cacheDuration:i,defaultVariables:p={}}){this.prompts=e,this.transcendUrl=t,this.transcendApiKey=s,this.variables=p,this.defaultVariables=p,this.graphQLClient=M(t,typeof s=="object"?s.release():s),this.requireApproval=o,this.cacheDuration=i,this.handlebarsOptions=r,this.handlebars=O(r)}async fetchPromptsAndMetadata(){let e=B(this.prompts),r=e.map(({id:n})=>n).filter(n=>!!n),t=e.map(({title:n})=>n).filter(n=>!!n),s=Q(e.map(({agentNames:n})=>n||[]).flat()),[o,i,p]=await Promise.all([R(this.graphQLClient,{promptIds:r,promptTitles:t}),E(this.graphQLClient),h(this.graphQLClient,{names:s})]);this.agentsByName=P(p,"name"),this.agentsByAgentId=P(p,"agentId"),this.largeLanguageModels=i.filter(n=>n.isTranscendHosted===!1);let m=P(o.prompts,"title"),c=P(o.prompts,"id");return this.variables={...o.calculatedVariables.reduce((n,g)=>Object.assign(n,{[g.name]:g.data?JSON.parse(g.data):g.data}),{}),...this.defaultVariables},this.handlebars=O({...this.handlebarsOptions,templates:[...this.handlebarsOptions.templates||[],...o.promptPartials.map(n=>({name:n.slug,content:n.content}))]}),this.promptContentMap=k(this.prompts,({id:n,title:g})=>{let d=n?c[n]:g?m[g]:void 0;if(!d)throw new Error(`Failed to find prompt with title: "${g}" and id: "${n}"`);return d}),this.lastUpdatedAt=new Date,o}async getAgentByName(e){let r=this.agentsByName[e];if(r)return r;let[t]=await h(this.graphQLClient,{names:[e]});if(t)return this.agentsByName[t.name]=t,this.agentsByAgentId[t.agentId]=t,t}async getPromptThreadBySlackTs(e){let[r]=await L(this.graphQLClient,{slackMessageTs:[e]});return r}async getAgentsByName(e){if(e.length<1)throw new Error("Expected at least one name to be provided");let{hasCache:r=[],missingCache:t=[]}=F(e,p=>this.agentsByName[p]?"hasCache":"missingCache"),s=r.map(p=>this.agentsByName[p]);if(t.length===0)return s;let o=G(t,50),i=[];return await x(o,async p=>{let m=await h(this.graphQLClient,{names:p});m.forEach(c=>{this.agentsByName[c.name]=c,this.agentsByAgentId[c.agentId]=c}),i.push(...m)}),[...s,...i]}getAgentFiles(e){return C(this.graphQLClient,e)}getLargeLanguageModel(e){let r=this.largeLanguageModels.find(t=>typeof e=="string"?t.id===e:t.name===e.name&&t.client===e.client);if(!r)throw new Error(`Failed to find model matching: ${typeof e=="string"?e:JSON.stringify(e)}`);return r}async getPromptDefinition(e){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let{promptContentMap:r}=this;if(!r)throw new Error("Expected this.promptContentMap to be defined");let t=r[e];if(!t)throw new Error(`Expected this.promptContentMap[${e}] to be defined`);return t}async compilePrompt(e,r){let t=await this.getPromptDefinition(e),s=this.prompts[e];if(!s)throw new Error(`Expected this.prompts[${e}] to be defined`);if(this.requireApproval&&t.status!==D.Approved)throw new Error(`Assessment "${t.title}" cannot be used because its in status: "${t.status}"`);if(t.status===D.Rejected)throw new Error(`Assessment "${t.title}" cannot be used because it's in status: "${t.status}"`);return I(s.paramCodec,r),this.handlebars.compile(t.content)({currentDate:new Date().toISOString(),...this.variables,...r})}parseAiResponse(e,r){let t=this.prompts[e];if(!t)throw new Error(`Expected this.prompts[${e}] to be defined`);let s=t.extractFromTag&&(U(t.extractFromTag).exec(r)||[])[1]||r;return I(t.outputCodec,j(s),!1)}async reportAndParsePromptRun(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==l.System)throw new Error(`promptRunMessages[0].role is expected to be = ${l.System}`);if(t.promptRunMessages[t.promptRunMessages.length-1].role!==l.Assistant)throw new Error(`promptRunMessages[${t.promptRunMessages.length-1}].role is expected to be = ${l.Assistant}`);let i=t.promptRunMessages[t.promptRunMessages.length-1].content,p;try{p=this.parseAiResponse(e,i)}catch(c){throw await f(this.graphQLClient,{productArea:A.PromptManager,...t,name:s,error:c.message,status:y.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((n,g)=>({...n,...g===0?{template:o.content}:{}}))}),c}let m=await f(this.graphQLClient,{productArea:A.PromptManager,...t,name:s,status:y.Resolved,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((c,n)=>({...c,...n===0?{template:o.content}:{}}))});return{result:p,promptRunId:m,promptRunUrl:`https://app.transcend.io/prompts/runs/${m}`}}async reportPromptRunError(e,{largeLanguageModel:r,...t}){(!this.lastUpdatedAt||this.cacheDuration===0||this.cacheDuration&&Date.now()-this.lastUpdatedAt.getTime()>this.cacheDuration)&&await this.fetchPromptsAndMetadata();let s=t.name||`@transcend-io/cli-prompt-run-${new Date().toISOString()}`;if(!this.promptContentMap)throw new Error("Expected this.promptContentMap to be defined");let o=this.promptContentMap[e];if(!o)throw new Error(`Expected this.prompts[${e}] to be defined`);if(t.promptRunMessages.length===0)throw new Error("promptRunMessages is expected to have length > 0");if(t.promptRunMessages[0].role!==l.System)throw new Error(`promptRunMessages[0].role is expected to be = ${l.System}`);let i=await f(this.graphQLClient,{productArea:A.PromptManager,...t,name:s,status:y.Error,...typeof r=="string"?{largeLanguageModelId:r}:{largeLanguageModelName:r.name,largeLanguageModelClient:r.client},promptId:o.id,promptRunMessages:t.promptRunMessages.map((p,m)=>({...p,...m===0?{template:o.content}:{}}))});return{promptRunId:i,promptRunUrl:`https://app.transcend.io/prompts/runs/${i}`}}};function fm(a){let e=/(https?:\/\/[^\s]+)/g;return a.replace(e,"<link-omitted>")}function Tm(a){return Object.entries(a).reduce((e,[r,t])=>t!=null&&t!==""&&!(Array.isArray(t)&&t.length===0)&&!(typeof t=="object"&&Object.keys(t).length===0)?Object.assign(e,{[r]:t}):e,{})}import{difference as H}from"lodash-es";import V from"fast-glob";import{execSync as u}from"child_process";function wm({baseBranch:a,rootDirectory:e,githubRepo:r,excludedGlob:t=[],fileBlockList:s=[]}){u(`git fetch origin ${a}`);let o=u(`git ls-remote ${r} "refs/heads/${a}" | cut -f 1`,{encoding:"utf-8"}).split(`
2
+ `)[0],i=u("git rev-parse HEAD",{encoding:"utf-8"}).split(`
3
+ `)[0];if(!o||!i)throw new Error("FAILED TO FIND COMMIT RANGE");let p=u(`git fetch && git diff --name-only "${a||o}...${i}" -- ${e}`,{encoding:"utf-8"}),m=H(p.split(`
4
+ `).filter(d=>d),s),c=t.length>0?V.sync(m,{ignore:t}):m,n={};c.forEach(d=>{let S=u(`git show ${i}:${d}`,{encoding:"utf-8"});n[d]=S});let g=r.split("/").pop().split(".")[0];return{changedFiles:m,fileDiffs:n,repoName:g,commit:i}}export{Qn as ACTIONS,Zr as ADD_MESSAGES_TO_PROMPT_RUN,Ke as ADD_SILO_DISCOVERY_RESULTS,xp as ADMIN_DASH,wp as ADMIN_DASH_DATAPOINTS,bp as ADMIN_DASH_INTEGRATIONS,Zn as AGENTS,Yn as AGENT_FILES,rs as AGENT_FUNCTIONS,Je as API_KEYS,lr as APPROVE_PRIVACY_REQUEST,wr as ASSESSMENTS,br as ASSESSMENT_SECTION_FIELDS,Lr as ASSESSMENT_TEMPLATES,Wn as ASSUME_ROLE,tn as ATTRIBUTES,rr as ATTRIBUTE_KEYS_REQUESTS,sn as ATTRIBUTE_VALUES,Nt as ActionInput,Gt as ActionItemCollectionInput,Ut as ActionItemInput,dt as AgentFileInput,gt as AgentFunctionInput,ct as AgentInput,tt as ApiKeyInput,Na as AssessmentAction,_t as AssessmentAnswerOptionInput,Vt as AssessmentDisplayLogicInput,Xt as AssessmentInput,La as AssessmentNestedRule,Ht as AssessmentNestedRuleInput,Kt as AssessmentResourceInput,Wt as AssessmentRetentionScheduleInput,Ia as AssessmentRiskLogic,Ma as AssessmentRule,jt as AssessmentRuleInput,Jt as AssessmentSectionInput,zt as AssessmentSectionQuestionInput,Zt as AssessmentTemplateInput,Op as AttestedExtraIdentifiers,it as AttributeInput,mt as AttributePreview,pt as AttributeValueInput,na as BLANK,ra as BULK_APPLY,kn as BUSINESS_ENTITIES,bt as BusinessEntityInput,ur as CANCEL_PRIVACY_REQUEST,pa as CAN_APPLY_IN_BULK,Be as CATALOGS,Gr as CHANGE_REQUEST_DATA_SILO_STATUS,ar as CODE_PACKAGES,Sn as CONSENT_MANAGER_ANALYTICS_DATA,cn as CONSENT_PARTITIONS,hn as COOKIES,Hn as CREATE_ACTION_ITEMS,Xr as CREATE_ACTION_ITEM_COLLECTION,Kn as CREATE_AGENT,ts as CREATE_AGENT_FILE,ns as CREATE_AGENT_FUNCTION,We as CREATE_API_KEY,on as CREATE_ATTRIBUTE,en as CREATE_ATTRIBUTE_VALUES,Bn as CREATE_BUSINESS_ENTITY,ir as CREATE_CODE_PACKAGE,Dn as CREATE_CONSENT_EXPERIENCE,An as CREATE_CONSENT_MANAGER,$n as CREATE_CONSENT_PARTITION,gn as CREATE_DATA_FLOWS,Oe as CREATE_DATA_SILOS,He as CREATE_DATA_SUBJECT,ms as CREATE_DATA_SUB_CATEGORY,Se as CREATE_ENRICHER,Ge as CREATE_IDENTIFIER,ds as CREATE_PROCESSING_PURPOSE_SUB_CATEGORY,$r as CREATE_PROMPT,Fr as CREATE_PROMPT_GROUP,kr as CREATE_PROMPT_PARTIAL,ze as CREATE_REPOSITORY,or as CREATE_SOFTWARE_DEVELOPMENT_KIT,Vr as CREATE_TEAM,tr as CREATE_TEMPLATE,as as CREATE_VENDOR,ia as CachedFileState,ca as CachedRequestState,Ct as CodePackageInput,Rt as CodePackageSdk,oa as ColumnName,Dt as ConsentManageExperienceInput,St as ConsentManagerInput,Ss as ConsentManagerMetricBin,ae as ConsentManagerServiceMetadata,li as ConsentPreferenceResponse,te as ConsentPreferenceTopic,Yt as ConsentPreferenceTopicOptionValue,ee as ConsentPurpose,oe as CookieCsvInput,Ot as CookieInput,bi as CronIdentifier,Ei as CronIdentifierPush,Ce as DATAPOINT_EXPORT,un as DATA_FLOWS,Ae as DATA_POINTS,ye as DATA_POINT_COUNT,Le as DATA_SILOS,Ee as DATA_SILOS_ENRICHED,Ne as DATA_SILO_EXPORT,je as DATA_SUBJECTS,is as DATA_SUB_CATEGORIES,N as DEFAULT_TRANSCEND_API,Rp as DEFAULT_TRANSCEND_CONSENT_API,Sa as DEFAULT_TRANSCEND_PULL_RESOURCES,Ze as DELETE_API_KEY,nn as DELETE_ATTRIBUTE_VALUE,qn as DEPLOYED_PRIVACY_CENTER_URL,bn as DEPLOY_CONSENT_MANAGER,zn as DETERMINE_LOGIN_METHOD,ot as DataCategoryGuessInput,ut as DataCategoryInput,st as DataCategoryPreviewInput,at as DataCategoryRecommendationInput,se as DataFlowCsvInput,It as DataFlowInput,Qt as DataSiloInput,Lt as DataSubjectInput,yt as DatapointInput,Xe as ENABLED_PLUGINS,De as ENRICHERS,Me as ENTRY_COUNT,mn as EXPERIENCES,Ui as EnrichPrivacyRequest,rt as EnricherInput,Pn as FETCH_CONSENT_MANAGER,fn as FETCH_CONSENT_MANAGER_ID,Tn as FETCH_CONSENT_MANAGER_THEME,Vn as FETCH_PRIVACY_CENTER_ID,At as FieldInput,Un as GLOBAL_ACTION_ITEMS,Kr as GLOBAL_ACTION_ITEM_COLLECTIONS,Fe as IDENTIFIERS,sa as IDENTIFIER_BLOCK_LIST,Rr as IMPORT_ONE_TRUST_ASSESSMENT_FORMS,$e as INITIALIZER,mi as IP_ADDRESS_REGEX,aa as IS_REQUIRED,Et as IdentifierInput,le as ImportOnetrustAssessmentsInput,kp as IntlMessage,Ft as IntlMessageInput,b as LARGE_LANGUAGE_MODELS,Jn as LOGIN,Pr as MESSAGES,Qe as NEW_IDENTIFIER_TYPES,ea as NONE,fr as NOTIFY_ADDITIONAL_TIME,er as ORGANIZATION,q as OneTrustFileFormat,v as OneTrustPullResource,_ as OneTrustPullSource,ie as OpenAIEnabledRoute,me as OpenAIEnabledRoutes,ce as OpenAIIntegration,W as OpenAIRouteName,cr as POLICIES,Mr as PREFERENCE_TOPICS,vn as PRIVACY_CENTER,gs as PROCESSING_PURPOSE_SUB_CATEGORIES,Nr as PROMPTS,Or as PROMPTS_WITH_VARIABLES,Ir as PROMPT_GROUPS,Er as PROMPT_PARTIALS,mr as PROMPT_THREADS,Cr as PURPOSES,ha as ParsedAttributeInput,$t as PartitionInput,ge as PathfinderPolicy,J as PathfinderPolicyName,pe as PathfinderPolicyNameC,de as PathfinderPromptRunMetadata,Bt as PolicyInput,kt as PrivacyCenterInput,np as PrivacyRequest,Dp as PrivacyRequestInput,jp as PrivacyRequestResponse,ht as ProcessingPurposeInput,nt as ProcessingPurposePreviewInput,xt as PromptAVendorEmailSettings,Tt as PromptGroupInput,ft as PromptInput,Pt as PromptPartialInput,fi as PurposeMap,jr as REDUCED_REQUESTS_FOR_DATA_SILO_COUNT,vr as REMOVE_REQUEST_IDENTIFIERS,Wr as REPORT_PROMPT_RUN,ve as REPOSITORIES,dr as REQUESTS,Qr as REQUEST_DATA_SILOS,Ar as REQUEST_ENRICHERS,Jr as REQUEST_FILES,_r as REQUEST_IDENTIFIERS,Ur as RETRY_REQUEST_DATA_SILO,yr as RETRY_REQUEST_ENRICHER,Mt as RepositoryInput,Bp as RequestFileMetadata,Fp as RequestFileMetadataResponse,op as RequestIdentifiersResponse,qt as RiskAssignmentInput,vt as RiskLogicInput,pn as SET_RESOURCE_ATTRIBUTES,xr as SKIP_REQUEST_ENRICHER,nr as SOFTWARE_DEVELOPMENT_KITS,us as SOMBRA_VERSION,xe as SUB_DATA_POINTS,be as SUB_DATA_POINTS_COUNT,we as SUB_DATA_POINTS_WITH_GUESSES,po as SYNC_ATTRIBUTE_TYPES,wt as SoftwareDevelopmentKitInput,ne as StoredApiKey,ma as SuccessfulRequest,Hr as TEAMS,Ye as TEMPLATES,En as TOGGLE_CONSENT_PRECEDENCE,qe as TOGGLE_DATA_SUBJECT,Nn as TOGGLE_TELEMETRY_PARTITION_STRATEGY,Ln as TOGGLE_UNKNOWN_COOKIE_POLICY,Mn as TOGGLE_UNKNOWN_REQUEST_POLICY,Mp as TR_PULL_RESOURCE_SCOPE_MAP,Cp as TR_PUSH_RESOURCE_SCOPE_MAP,Lp as TR_YML_RESOURCE_TO_FIELD_NAME,et as TeamInput,X as TemplateInput,re as TranscendInput,$ as TranscendPromptManager,z as TranscendPullResource,Gn as UPDATE_ACTION,jn as UPDATE_ACTION_ITEMS,Yr as UPDATE_ACTION_ITEM_COLLECTION,Xn as UPDATE_AGENTS,es as UPDATE_AGENT_FILES,ss as UPDATE_AGENT_FUNCTIONS,an as UPDATE_ATTRIBUTE,rn as UPDATE_ATTRIBUTE_VALUES,Fn as UPDATE_BUSINESS_ENTITIES,pr as UPDATE_CODE_PACKAGES,On as UPDATE_CONSENT_EXPERIENCE,wn as UPDATE_CONSENT_MANAGER_DOMAINS,Rn as UPDATE_CONSENT_MANAGER_PARTITION,In as UPDATE_CONSENT_MANAGER_THEME,xn as UPDATE_CONSENT_MANAGER_TO_LATEST,yn as UPDATE_CONSENT_MANAGER_VERSION,dn as UPDATE_DATA_FLOWS,Ie as UPDATE_DATA_SILOS,Ve as UPDATE_DATA_SUBJECT,cs as UPDATE_DATA_SUB_CATEGORIES,ke as UPDATE_ENRICHER,Ue as UPDATE_IDENTIFIER,Tr as UPDATE_INTL_MESSAGES,ln as UPDATE_OR_CREATE_COOKIES,Re as UPDATE_OR_CREATE_DATA_POINT,gr as UPDATE_POLICIES,_n as UPDATE_PRIVACY_CENTER,hr as UPDATE_PRIVACY_REQUEST,ls as UPDATE_PROCESSING_PURPOSE_SUB_CATEGORIES,Dr as UPDATE_PROMPTS,Br as UPDATE_PROMPT_GROUPS,Sr as UPDATE_PROMPT_PARTIALS,_e as UPDATE_REPOSITORIES,sr as UPDATE_SOFTWARE_DEVELOPMENT_KITS,qr as UPDATE_TEAM,Cn as UPDATE_TOGGLE_USP_API,ps as UPDATE_VENDORS,zr as USERS,hi as USP_STRING_REGEX,he as VARIABLE_PARAMETERS_NAME,ue as VARIABLE_PARAMETERS_REGEXP,os as VENDORS,lt as VendorInput,Y as WebhookHeader,Ap as addMessagesToPromptRun,Mi as appendCsvSync,Vp as approvePrivacyRequests,dp as assumeRole,K as buildAIIntegrationType,Z as buildEnabledRouteType,M as buildTranscendGraphQLClient,Za as buildTranscendGraphQLClientGeneric,ci as buildXdiSyncEndpoint,Kp as bulkRestartRequests,Yp as bulkRetryEnrichers,_p as cancelPrivacyRequests,gi as consentManagersToBusinessEntities,Rs as convertToDataSubjectAllowlist,ws as convertToDataSubjectBlockList,Lo as createActionItemCollection,Oo as createActionItems,Ro as createAgent,Qo as createAgentFile,ko as createAgentFunction,up as createApiKey,co as createBusinessEntity,Ha as createCodePackage,di as createConsentToken,_o as createDataCategory,fo as createDataFlows,Zo as createProcessingPurpose,qs as createPrompt,U as createRegexForTag,Ga as createRepository,Ba as createSoftwareDevelopmentKit,Ka as createSombraGotInstance,cp as createTranscendConsentGotInstance,Ho as createVendor,um as defineTranscendPrompts,hp as deleteApiKey,Pp as deployConsentManager,Ja as description,ii as domainToHost,Up as downloadPrivacyRequestFiles,ji as enrichPrivacyRequest,bs as ensureAllDataSubjectsExist,Jp as extractClientError,ya as fetchActiveSiloDiscoPlugin,Io as fetchAllActionItems,xo as fetchAllActions,C as fetchAllAgentFiles,So as fetchAllAgentFunctions,h as fetchAllAgents,js as fetchAllApiKeys,Ca as fetchAllAssessmentTemplates,Ra as fetchAllAssessments,ao as fetchAllAttributeValues,io as fetchAllAttributes,mo as fetchAllBusinessEntities,_a as fetchAllCatalogs,wa as fetchAllCookies,vo as fetchAllDataCategories,uo as fetchAllDataFlows,Ls as fetchAllDataPoints,Cs as fetchAllDataSilos,xs as fetchAllDataSubjects,Ts as fetchAllEnrichers,hs as fetchAllIdentifiers,ba as fetchAllMessages,Ws as fetchAllPolicies,Da as fetchAllPreferenceTopics,xa as fetchAllPrivacyCenters,Wo as fetchAllProcessingPurposes,wo as fetchAllPromptGroups,bo as fetchAllPromptPartials,L as fetchAllPromptThreads,Vs as fetchAllPrompts,no as fetchAllPurposes,$a as fetchAllPurposesAndPreferences,rp as fetchAllRequestAttributeKeys,pp as fetchAllRequestEnrichers,tp as fetchAllRequestIdentifierMetadata,ap as fetchAllRequestIdentifiers,sp as fetchAllRequests,Ms as fetchAllSubDataPoints,Gs as fetchAllTeams,Ao as fetchAllTemplates,lp as fetchAllUsers,jo as fetchAllVendors,za as fetchAndIndexCatalogs,Hs as fetchApiKeys,Os as fetchConsentManager,ks as fetchConsentManagerAnalyticsData,$s as fetchConsentManagerExperiences,Ds as fetchConsentManagerId,Bs as fetchConsentManagerTheme,ui as fetchConsentPreferences,Ns as fetchEnrichedDataSilos,fs as fetchIdentifiersAndCreateMissing,eo as fetchPartitions,Js as fetchPrivacyCenterId,zs as fetchPrivacyCenterUrl,R as fetchPromptsWithVariables,mp as fetchRequestDataSilo,ep as fetchRequestDataSiloActiveCount,ip as fetchRequestDataSilos,fp as fetchRequestFilesForRequest,Tm as filterNullishValuesFromObject,Aa as filterRows,da as fuzzyMatchColumns,ga as fuzzySearch,$i as generateCrossAccountApiKeys,Qp as getFileMetadataForPrivacyRequests,wm as getGitFilesThatChanged,Ta as getUniqueValuesForColumn,yi as inquirerAutoComplete,Ti as inquirerConfirmBoolean,Ai as inquirerConfirmText,Bi as listDirectories,ki as listFiles,gp as loginUser,w as makeGraphQLRequest,zp as mapColumnsToAttributes,vp as mapColumnsToIdentifiers,Ep as mapCsvColumnsToApi,Sp as mapCsvRowsToRequestInputs,la as mapEnumValues,Ip as mapRequestEnumValues,Ii as markCronIdentifierCompleted,Di as markRequestDataSiloIdsCompleted,Np as markSilentPrivacyRequests,ta as mergeTranscendInputs,yp as name,$p as normalizeIdentifierValue,qp as notifyPrivacyRequestsAdditionalTime,Ea as parseAssessmentDisplayLogic,Oa as parseAssessmentRiskLogic,fa as parseAttributesFromString,xi as parseVariablesFromString,Fi as pullAllDatapoints,pi as pullConsentManagerMetrics,wi as pullCronPageOfIdentifiers,Ri as pullCustomSiloOutstandingIdentifiers,Gi as pullManualEnrichmentIdentifiersToCsv,ei as pullPrivacyRequests,ka as pullTranscendConfiguration,Qi as pullUnstructuredSubDataPointRecommendations,Oi as pushCronIdentifiersFromCsv,Hi as pushManualEnrichmentIdentifiersFromCsv,Pa as readCsv,Pe as readTranscendYaml,fm as removeLinks,ni as removeUnverifiedRequestIdentifiers,fe as replaceVariablesInYaml,f as reportPromptRun,Zp as restartPrivacyRequest,ti as retryRequestDataSilos,Ya as retryRequestEnricher,Xa as setResourceAttributes,Xp as skipPreflightJobs,ri as skipRequestDataSilos,ua as splitCsvToList,Gp as streamPrivacyRequestFiles,Hp as submitPrivacyRequest,To as syncAction,Eo as syncActionItemCollections,$o as syncActionItems,Uo as syncAgentFiles,Fo as syncAgentFunctions,Mo as syncAgents,ys as syncAttribute,lo as syncBusinessEntities,qa as syncCodePackages,Yo as syncConfigurationToTranscend,oo as syncConsentManager,so as syncConsentManagerExperiences,Qs as syncCookies,Jo as syncDataCategories,Po as syncDataFlows,Is as syncDataSiloDependencies,Es as syncDataSilos,Us as syncDataSubject,As as syncEnricher,Ps as syncIdentifier,Ys as syncIntlMessages,ro as syncPartitions,Ks as syncPolicies,to as syncPrivacyCenter,Xo as syncProcessingPurposes,_s as syncPrompts,ja as syncRepositories,Qa as syncSoftwareDevelopmentKits,yo as syncTemplate,qo as syncVendors,Do as updateActionItem,No as updateActionItemCollection,Go as updateAgentFiles,Bo as updateAgentFunctions,Co as updateAgents,go as updateBusinessEntities,Va as updateCodePackages,Tp as updateConsentManagerToLatest,si as updateConsentManagerVersionToLatest,zo as updateDataCategories,ho as updateDataFlows,Xs as updateIntlMessages,Fs as updateOrCreateCookies,Zs as updatePolicies,Ko as updateProcessingPurposes,vs as updatePrompts,Ua as updateRepositories,Fa as updateSoftwareDevelopmentKits,Vo as updateVendors,Pi as uploadConsents,ai as uploadCookiesFromCsv,oi as uploadDataFlowsFromCsv,Wp as uploadPrivacyRequestsFromCsv,va as uploadSiloDiscoveryResults,Si as validateTranscendAuth,Wa as version,Li as writeCsv,Ci as writeCsvSync,Ni as writeLargeCsv,Te as writeTranscendYaml};