ethyca-fides 2.58.1rc0__py2.py3-none-any.whl → 2.58.2b0__py2.py3-none-any.whl
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.
- {ethyca_fides-2.58.1rc0.dist-info → ethyca_fides-2.58.2b0.dist-info}/METADATA +1 -1
- {ethyca_fides-2.58.1rc0.dist-info → ethyca_fides-2.58.2b0.dist-info}/RECORD +159 -154
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/67d01c4e124e_add_reject_all_mechanism_to_privacy_.py +56 -0
- fides/api/alembic/migrations/versions/6e565c16dae1_add_tcf_publisher_restrictions.py +107 -0
- fides/api/api/deps.py +8 -2
- fides/api/cryptography/identity_salt.py +12 -13
- fides/api/custom_types.py +6 -1
- fides/api/db/base.py +5 -0
- fides/api/migrations/hash_migration_job.py +2 -2
- fides/api/models/attachment.py +80 -11
- fides/api/models/comment.py +45 -15
- fides/api/models/privacy_experience.py +42 -0
- fides/api/models/privacy_request/privacy_request.py +23 -6
- fides/api/models/tcf_publisher_restrictions.py +186 -0
- fides/api/schemas/connection_configuration/connection_config.py +30 -16
- fides/api/service/storage/s3.py +14 -1
- fides/api/task/graph_task.py +1 -1
- fides/service/error_handling/__init__.py +0 -0
- fides/service/error_handling/error_handler.py +202 -0
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{1150-035a721a04f4451e.js → 1150-2642cd9cdc8a52f6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-98cbf3789b9145c3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2397-ee53235fb21b5e97.js → 2397-0d1c289b788fcc11.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3412-da7ad82093c5b879.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3855-b6b7865dedd7bc2a.js → 3855-63495367531cb776.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-4e053c20d546f027.js → 3872-472bb47eb34d8fdb.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4060-8d165e1236ea521a.js → 4060-53a5c6347690a8fa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{4450-36234280bee624ff.js → 4450-f5e6eb9270f03bf0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5258-0658dc2274df6832.js → 5258-cf7b27ef51f38392.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5480-f49696df5e8ae500.js → 5480-52dc446be40725f5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-3ad50d21cdbc9209.js → 5487-8678d75ee1d1ef09.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5973-52aee296edc44f7e.js → 5973-88141f9b92f20e0a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6315-fa1519cdf080f42d.js → 6315-1adb10a8b98b4a13.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6372-ca9c12ac8902365b.js → 6372-e0bb9f8d07cc3b04.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6853-8941824350c3c1a8.js → 6853-8700d87c9e1f6940.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6954-3b887fb444f9228c.js → 6954-85a998d74391caaf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7453-39761c38da31257e.js → 7453-ef1887105c062d37.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7751-a8f31c062d4cb09d.js → 7751-a70fe0e5f67f5538.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-f9b948ebb186900f.js → 79-8e060d36d36c752c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{7980-4bd08957448dea32.js → 7980-72f745bff9fabcc9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-04bd7becea207cb1.js → 9046-742ad2bb5108d4c5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9767-1a23925d2cb27b51.js → 9767-06d9d54a452ec9f4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{main-24f422f93845a596.js → main-090643377c8254e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{main-app-94a0711202e08b15.js → main-app-59156a9331ac7bce.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-fc89ce7bed454c84.js → _app-d4f59c13cb550ff4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-d258f0c25fa020bf.js → add-systems-fac606150b65d494.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-c946b33b0322b8ad.js → privacy-experience-d6909fbd52309a89.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-ea57f9d6ad17e957.js → privacy-notices-e7acf6d9d30b1fd9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-788cf0e34829af46.js → reporting-100234c23a85d235.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-900004e402c31797.js → data-catalog-fffd4942be7760dd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-b66831fdafcdf67c.js → [systemId]-df8512ccd0ea9829.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-11b3ce9f61d9bfe9.js → activity-8aeded3289d61405.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-803c1b577ab17ae3.js → new-4d4a31d0186a4a5b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-fa743ddc7f89d76b.js → dataset-29317d18ce34adfe.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-bbe1ca2793798e6b.js → [id]-14c57e5069e9cccd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-abc17fef69cd951b.js → new-4e0057c72fac3a9e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-a78a73b65929853a.js → datastore-connection-60a01ede4d8b56fd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-bfaacdb55a5a6c9f.js → index-b70def65e264270e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-528c98747299d138.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-fe765154315782cf.js → [id]-1bdec4c3e51f5199.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{messaging-f5f7a8069909ef24.js → messaging-5e2687ab5ab10275.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-9f7eaad05e5b9292.js → storage-2914aade73dcaecc.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-d85c0d16ba09ba35.js → privacy-requests-dea4dd41db4d382b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/{datamap-afedc48ef4e7f858.js → datamap-0da40a92590792af.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-3ac1e5d3de5dd4a7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-52d030b1db2ca1b9.js → custom-fields-dfcd7a4b6aa773bd.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-a08693d0d1e10bc8.js → organization-0e0aa552f520f913.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-151571cff4e85894.js → test-datasets-1d83d5178b3eb216.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-abd68fc5ddde5482.js → systems-8490aaaee9d76a4a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-16b4d75c49276add.js → taxonomy-be1ffe267b1602e1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-78eaf933f755bfe8.js → [id]-c0378fd1a26a71da.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-6c9ad62479a7d03e.js → user-management-3ca3c687e72d1364.js} +1 -1
- fides/ui-build/static/admin/_next/static/{7Gn2YyMsVjWkBPSaVWEi9 → u9w7grMtLxEveFsXqNFab}/_buildManifest.js +1 -1
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/ant-poc.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3412-7ec8751b8182e1bf.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d4329043219fed9b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +0 -1
- {ethyca_fides-2.58.1rc0.dist-info → ethyca_fides-2.58.2b0.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.58.1rc0.dist-info → ethyca_fides-2.58.2b0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.58.1rc0.dist-info → ethyca_fides-2.58.2b0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.58.1rc0.dist-info → ethyca_fides-2.58.2b0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4723-0a3c5e2ce143a7d0.js → 4723-1dd1d16f404d56a2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5826-e5dcb4e68cfe6289.js → 5826-ef0aa43ffad83acc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-723cc3d4f5740ea6.js → configure-a4e636eecaba5324.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-fa42d8f18df44927.js → domain-records-72ec54ee8755a503.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-4f5a28226575c976.js → [id]-8aae66669bdc0883.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{7Gn2YyMsVjWkBPSaVWEi9 → u9w7grMtLxEveFsXqNFab}/_ssgManifest.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{49536:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(39461)}])},69e3:function(e,r,s){"use strict";var n=s(24246),t=s(77181),i=s(91507),o=s.n(i);r.Z=e=>{let{color:r,description:s,title:i,icon:a}=e;return(0,n.jsx)(t.xuv,{borderLeft:"9px solid ".concat(r),borderRadius:"6px",className:o().container,children:(0,n.jsxs)(t.V4A,{className:o().card,"data-testid":"tile-".concat(i),children:[(0,n.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[a,(0,n.jsx)(t.AntTypography.Title,{level:5,style:{marginBottom:1,textAlign:"left"},children:i})]}),(0,n.jsx)(t.AntTypography.Text,{style:{textAlign:"left"},children:s})]})})}},77213:function(e,r,s){"use strict";s.d(r,{Z:function(){return p}});var n=s(24246),t=s(77181),i=s(88038),o=s.n(i),a=s(86677);s(27378);var c=s(25980),l=s(90867),d=s(77830),u=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(t.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(t.xuv,{children:[(0,n.jsxs)(t.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(t.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(t.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,n.jsxs)(t.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:r,title:s,padded:i=!0,mainProps:d}=e,p=(0,c.hz)(),m=(0,a.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,f=!(p.flags.privacyRequestsConfiguration&&h),{data:x}=(0,l.JE)(void 0,{skip:f}),{data:g}=(0,l.PW)(void 0,{skip:f}),y=p.flags.privacyRequestsConfiguration&&(!x||!g)&&h;return(0,n.jsxs)(t.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(t.kCb,{as:"main",direction:"column",py:i?6:0,px:i?10:0,h:i?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,n.jsx)(u,{}):null,r]})]})}},39461:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return T}});var n,t,i=s(24246),o=s(77181),a=s(27378),c=s(77213),l=s(3124),d=s.n(l),u=s(25980),p=()=>{let{systemsCount:e}=(0,u.hz)(),r=e>0;return(0,i.jsx)(o.kCb,{background:d().FIDESUI_CORINTH,children:(0,i.jsxs)(o.kCb,{flexDir:"column",maxWidth:"600px",padding:"10",paddingBottom:"16",children:[r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome back!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"".concat(e," system").concat(e>1?"s":""," currently under management")}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Fides is currently managing privacy for ".concat(e," system").concat(e>1?"s":"",". From here you can continue adding and managing systems, process privacy requests or generate reports for your privacy compliance requirements.")})]}),!r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome to Fides!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"Start your privacy engineering journey today"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Step one in setting up your privacy engineering platform is adding the systems you need to manage. Use the links below to add and configure systems within Fides for data mapping and privacy request automation."})]})]})})},m=s(79894),h=s.n(m),f=s(16134),x=s(69e3),g=s(31793),y=s(77830),E=s(
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{49536:function(e,r,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(39461)}])},69e3:function(e,r,s){"use strict";var n=s(24246),t=s(77181),i=s(91507),o=s.n(i);r.Z=e=>{let{color:r,description:s,title:i,icon:a}=e;return(0,n.jsx)(t.xuv,{borderLeft:"9px solid ".concat(r),borderRadius:"6px",className:o().container,children:(0,n.jsxs)(t.V4A,{className:o().card,"data-testid":"tile-".concat(i),children:[(0,n.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[a,(0,n.jsx)(t.AntTypography.Title,{level:5,style:{marginBottom:1,textAlign:"left"},children:i})]}),(0,n.jsx)(t.AntTypography.Text,{style:{textAlign:"left"},children:s})]})})}},77213:function(e,r,s){"use strict";s.d(r,{Z:function(){return p}});var n=s(24246),t=s(77181),i=s(88038),o=s.n(i),a=s(86677);s(27378);var c=s(25980),l=s(90867),d=s(77830),u=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(t.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(t.xuv,{children:[(0,n.jsxs)(t.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(t.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(t.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,n.jsxs)(t.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:r,title:s,padded:i=!0,mainProps:d}=e,p=(0,c.hz)(),m=(0,a.useRouter)(),h="/privacy-requests"===m.pathname||"/datastore-connection"===m.pathname,f=!(p.flags.privacyRequestsConfiguration&&h),{data:x}=(0,l.JE)(void 0,{skip:f}),{data:g}=(0,l.PW)(void 0,{skip:f}),y=p.flags.privacyRequestsConfiguration&&(!x||!g)&&h;return(0,n.jsxs)(t.kCb,{"data-testid":s,direction:"column",h:"100vh",children:[(0,n.jsxs)(o(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(t.kCb,{as:"main",direction:"column",py:i?6:0,px:i?10:0,h:i?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[y?(0,n.jsx)(u,{}):null,r]})]})}},39461:function(e,r,s){"use strict";s.r(r),s.d(r,{default:function(){return T}});var n,t,i=s(24246),o=s(77181),a=s(27378),c=s(77213),l=s(3124),d=s.n(l),u=s(25980),p=()=>{let{systemsCount:e}=(0,u.hz)(),r=e>0;return(0,i.jsx)(o.kCb,{background:d().FIDESUI_CORINTH,children:(0,i.jsxs)(o.kCb,{flexDir:"column",maxWidth:"600px",padding:"10",paddingBottom:"16",children:[r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome back!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"".concat(e," system").concat(e>1?"s":""," currently under management")}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Fides is currently managing privacy for ".concat(e," system").concat(e>1?"s":"",". From here you can continue adding and managing systems, process privacy requests or generate reports for your privacy compliance requirements.")})]}),!r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.xvT,{fontSize:"3xl",fontWeight:"semibold",children:"Welcome to Fides!"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"lg",fontWeight:"semibold",children:"Start your privacy engineering journey today"}),(0,i.jsx)(o.xvT,{marginTop:"1",fontSize:"sm",children:"Step one in setting up your privacy engineering platform is adding the systems you need to manage. Use the links below to add and configure systems within Fides for data mapping and privacy request automation."})]})]})})},m=s(79894),h=s.n(m),f=s(16134),x=s(69e3),g=s(31793),y=s(77830),E=s(28120);(n=t||(t={}))[n.ADD_SYSTEMS=1]="ADD_SYSTEMS",n[n.VIEW_SYSTEMS=2]="VIEW_SYSTEMS",n[n.REVIEW_PRIVACY_REQUESTS=3]="REVIEW_PRIVACY_REQUESTS",n[n.VIEW_MAP=4]="VIEW_MAP",n[n.CONFIGURE_CONSENT=5]="CONFIGURE_CONSENT";let S=[{color:d().FIDESUI_SANDSTONE,description:"Explore the systems and data flow across your organization and create custom reports.",href:"".concat(y.oG),key:4,name:"View data map",sortOrder:0,title:"VM",requiresPlus:!0,requiresSystems:!0,scopes:[E.Sh.DATAMAP_READ]},{color:d().FIDESUI_OLIVE,description:"Add third party applications and databases to your data map.",href:"".concat(y.xo),key:1,name:"Add systems",sortOrder:1,title:"AS",scopes:[E.Sh.SYSTEM_CREATE]},{color:d().FIDESUI_TERRACOTTA,description:"Review system information for all systems in your organization.",href:"".concat(y.So),key:2,name:"View systems",sortOrder:2,title:"VS",scopes:[E.Sh.SYSTEM_READ],requiresSystems:!0},{color:d().FIDESUI_MINOS,description:"Review, approve and process privacy requests across your systems on behalf of your users.",href:"".concat(y.Jw),key:3,name:"Review privacy requests",sortOrder:4,title:"RP",scopes:[E.Sh.PRIVACY_REQUEST_REVIEW],requiresConnections:!0},{color:d().FIDESUI_NECTAR,description:"Manage privacy notices and experiences for all domains in your organization.",href:"".concat(y.zo),key:5,name:"Manage consent",sortOrder:5,title:"MC",scopes:[E.Sh.PRIVACY_NOTICE_READ],requiresPlus:!0}],v=e=>{let{config:r,userScopes:s,hasPlus:n=!1,flags:t}=e,i=r;i=n?i.filter(e=>!e.requiresOss):i.filter(e=>!e.requiresPlus);let o=[];i.forEach(e=>{0===e.scopes.length?o.push(e):e.scopes.filter(e=>s.includes(e)).length>0&&o.push(e)});let a=[];return o.forEach(e=>{e.requiresFlag?t[e.requiresFlag]&&a.push(e):a.push(e)}),a};var _=()=>{let{plus:e,flags:r}=(0,u.hz)(),s=(0,f.C)(g.uu),n=(0,a.useMemo)(()=>v({config:S,hasPlus:e,userScopes:s,flags:r}),[e,s,r]);return(0,i.jsx)(o.kCb,{paddingX:10,"data-testid":"home-content",children:(0,i.jsx)(o.MIq,{columns:{md:2,xl:3},spacing:"24px",children:n.sort((e,r)=>e.sortOrder>r.sortOrder?1:-1).map(e=>(0,i.jsx)(h(),{href:e.href,className:"flex",children:(0,i.jsx)(x.Z,{title:e.name,description:e.description,color:e.color})},e.key))})})},j=()=>(0,i.jsx)(c.Z,{title:"Home",padded:!1,children:(0,i.jsxs)(o.kCb,{direction:"column",gap:10,pb:6,children:[(0,i.jsx)(p,{}),(0,i.jsx)(_,{})]})}),T=()=>(0,i.jsx)(j,{})},91507:function(e){e.exports={container:"CalloutNavCard_container__DXPJb",card:"CalloutNavCard_card__q_XX6"}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=49536)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1500],{50697:function(e,a,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/integrations/[id]",function(){return i(20495)}])},67991:function(e,a,i){"use strict";i.d(a,{Od:function(){return l},QZ:function(){return t}});var n=i(27378);let t=e=>{let{items:a,selected:i,onChange:n}=e,t=a.every(e=>i.includes(e.id))&&!!a.length;return{allSelected:t,someSelected:a.some(e=>i.includes(e.id))&&!!a.length,handleToggleAll:()=>{t?n([]):n(a.map(e=>e.id))},handleToggleSelection:e=>{i.includes(e)?n(i.filter(a=>a!==e)):n([...i,e])}}},l=e=>{let{initialSelected:a,initialExcluded:i,initialAllSelected:t,itemCount:l}=e,[o,r]=(0,n.useState)(a),[s,d]=(0,n.useState)(i),[c,u]=(0,n.useState)(t||o.length===l),_=!!o.length||!!s.length;return{selected:o,excluded:s,allSelected:c,someSelected:_,handleToggleAll:()=>{c?(d([]),s.length||u(!1)):(r([]),u(!0))},handleToggleItemSelected:e=>{if(c)d(s.includes(e)?s.filter(a=>a!==e):[...s,e]);else{let a=o.includes(e)?o.filter(a=>a!==e):[...o,e];r(a),a.length===l&&u(!0)}}}}},90111:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{children:a,...i}=e;return(0,n.jsx)(t.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...i,children:a})}},8411:function(e,a,i){"use strict";i.d(a,{NA:function(){return l},Z8:function(){return t}});var n=i(28120);let t={[n._F.ER]:"Eritrea",[n._F.DJ]:"Djibouti",[n._F.MR]:"Mauritania",[n._F.NA]:"Namibia",[n._F.GH]:"Ghana",[n._F.SS]:"South Sudan",[n._F.SC]:"Seychelles",[n._F.IO]:"British Indian Ocean Territory",[n._F.GQ]:"Equatorial Guinea",[n._F.AO]:"Angola",[n._F.CG]:"Republic of the Congo",[n._F.BW]:"Botswana",[n._F.BI]:"Burundi",[n._F.DZ]:"Algeria",[n._F.TD]:"Chad",[n._F.NG]:"Nigeria",[n._F.TZ]:"Tanzania",[n._F.EH]:"Western Sahara",[n._F.SN]:"Senegal",[n._F.LR]:"Liberia",[n._F.ZA]:"South Africa",[n._F.CV]:"Cape Verde",[n._F.GM]:"Gambia",[n._F.SD]:"Sudan",[n._F.KM]:"Comoros",[n._F.SZ]:"Eswatini",[n._F.UG]:"Uganda",[n._F.MG]:"Madagascar",[n._F.RW]:"Rwanda",[n._F.CD]:"DR Congo",[n._F.CM]:"Cameroon",[n._F.SH]:"Saint Helena, Ascension and Tristan da Cunha",[n._F.TG]:"Togo",[n._F.MU]:"Mauritius",[n._F.NE]:"Niger",[n._F.BJ]:"Benin",[n._F.EG]:"Egypt",[n._F.LS]:"Lesotho",[n._F.ET]:"Ethiopia",[n._F.MA]:"Morocco",[n._F.YT]:"Mayotte",[n._F.BF]:"Burkina Faso",[n._F.RE]:"R\xe9union",[n._F.ST]:"S\xe3o Tom\xe9 and Pr\xedncipe",[n._F.CF]:"Central African Republic",[n._F.MZ]:"Mozambique",[n._F.MW]:"Malawi",[n._F.ML]:"Mali",[n._F.ZM]:"Zambia",[n._F.LY]:"Libya",[n._F.GW]:"Guinea-Bissau",[n._F.SO]:"Somalia",[n._F.KE]:"Kenya",[n._F.GN]:"Guinea",[n._F.ZW]:"Zimbabwe",[n._F.TN]:"Tunisia",[n._F.SL]:"Sierra Leone",[n._F.GA]:"Gabon",[n._F.CI]:"Ivory Coast",[n._F.JO]:"Jordan",[n._F.PK]:"Pakistan",[n._F.KP]:"North Korea",[n._F.MO]:"Macau",[n._F.AM]:"Armenia",[n._F.SY]:"Syria",[n._F.TJ]:"Tajikistan",[n._F.SA]:"Saudi Arabia",[n._F.KR]:"South Korea",[n._F.NP]:"Nepal",[n._F.PH]:"Philippines",[n._F.IQ]:"Iraq",[n._F.LB]:"Lebanon",[n._F.MN]:"Mongolia",[n._F.PS]:"Palestine",[n._F.YE]:"Yemen",[n._F.JP]:"Japan",[n._F.KZ]:"Kazakhstan",[n._F.LK]:"Sri Lanka",[n._F.MM]:"Myanmar",[n._F.KG]:"Kyrgyzstan",[n._F.CN]:"China",[n._F.AF]:"Afghanistan",[n._F.OM]:"Oman",[n._F.IN]:"India",[n._F.LA]:"Laos",[n._F.UZ]:"Uzbekistan",[n._F.MV]:"Maldives",[n._F.ID]:"Indonesia",[n._F.VN]:"Vietnam",[n._F.MY]:"Malaysia",[n._F.TW]:"Taiwan",[n._F.KH]:"Cambodia",[n._F.AE]:"United Arab Emirates",[n._F.HK]:"Hong Kong",[n._F.GE]:"Georgia",[n._F.BD]:"Bangladesh",[n._F.KW]:"Kuwait",[n._F.TM]:"Turkmenistan",[n._F.QA]:"Qatar",[n._F.BH]:"Bahrain",[n._F.BN]:"Brunei",[n._F.TH]:"Thailand",[n._F.BT]:"Bhutan",[n._F.SG]:"Singapore",[n._F.IL]:"Israel",[n._F.AZ]:"Azerbaijan",[n._F.TL]:"Timor-Leste",[n._F.IR]:"Iran",[n._F.TR]:"Turkey",[n._F.MK]:"North Macedonia",[n._F.IE]:"Ireland",[n._F.DK]:"Denmark",[n._F.SK]:"Slovakia",[n._F.MD]:"Moldova",[n._F.AX]:"\xc5land Islands",[n._F.PL]:"Poland",[n._F.BA]:"Bosnia and Herzegovina",[n._F.SM]:"San Marino",[n._F.CZ]:"Czechia",[n._F.EE]:"Estonia",[n._F.XK]:"Kosovo",[n._F.FO]:"Faroe Islands",[n._F.SJ]:"Svalbard and Jan Mayen",[n._F.GG]:"Guernsey",[n._F.FR]:"France",[n._F.NL]:"Netherlands",[n._F.FI]:"Finland",[n._F.PT]:"Portugal",[n._F.DE]:"Germany",[n._F.MT]:"Malta",[n._F.JE]:"Jersey",[n._F.IS]:"Iceland",[n._F.ES]:"Spain",[n._F.GI]:"Gibraltar",[n._F.NO]:"Norway",[n._F.CY]:"Cyprus",[n._F.RS]:"Serbia",[n._F.LT]:"Lithuania",[n._F.MC]:"Monaco",[n._F.LU]:"Luxembourg",[n._F.UA]:"Ukraine",[n._F.IM]:"Isle of Man",[n._F.RO]:"Romania",[n._F.BE]:"Belgium",[n._F.SE]:"Sweden",[n._F.ME]:"Montenegro",[n._F.LV]:"Latvia",[n._F.VA]:"Vatican City",[n._F.AT]:"Austria",[n._F.AL]:"Albania",[n._F.LI]:"Liechtenstein",[n._F.GR]:"Greece",[n._F.IT]:"Italy",[n._F.AD]:"Andorra",[n._F.GB]:"United Kingdom",[n._F.RU]:"Russia",[n._F.SI]:"Slovenia",[n._F.BY]:"Belarus",[n._F.CH]:"Switzerland",[n._F.HU]:"Hungary",[n._F.BG]:"Bulgaria",[n._F.HR]:"Croatia",[n._F.TC]:"Turks and Caicos Islands",[n._F.CW]:"Cura\xe7ao",[n._F.GP]:"Guadeloupe",[n._F.UM]:"United States Minor Outlying Islands",[n._F.GT]:"Guatemala",[n._F.PM]:"Saint Pierre and Miquelon",[n._F.BQ]:"Caribbean Netherlands",[n._F.GL]:"Greenland",[n._F.SX]:"Sint Maarten",[n._F.PA]:"Panama",[n._F.AW]:"Aruba",[n._F.MQ]:"Martinique",[n._F.AG]:"Antigua and Barbuda",[n._F.BM]:"Bermuda",[n._F.CU]:"Cuba",[n._F.GD]:"Grenada",[n._F.NI]:"Nicaragua",[n._F.LC]:"Saint Lucia",[n._F.KN]:"Saint Kitts and Nevis",[n._F.DO]:"Dominican Republic",[n._F.VC]:"Saint Vincent and the Grenadines",[n._F.BZ]:"Belize",[n._F.HT]:"Haiti",[n._F.JM]:"Jamaica",[n._F.BS]:"Bahamas",[n._F.MX]:"Mexico",[n._F.MF]:"Saint Martin",[n._F.SV]:"El Salvador",[n._F.BL]:"Saint Barth\xe9lemy",[n._F.AI]:"Anguilla",[n._F.MS]:"Montserrat",[n._F.VG]:"British Virgin Islands",[n._F.BB]:"Barbados",[n._F.HN]:"Honduras",[n._F.KY]:"Cayman Islands",[n._F.DM]:"Dominica",[n._F.TT]:"Trinidad and Tobago",[n._F.CR]:"Costa Rica",[n._F.SR]:"Suriname",[n._F.CX]:"Christmas Island",[n._F.WS]:"Samoa",[n._F.PF]:"French Polynesia",[n._F.AS]:"American Samoa",[n._F.NC]:"New Caledonia",[n._F.TK]:"Tokelau",[n._F.PW]:"Palau",[n._F.KI]:"Kiribati",[n._F.VU]:"Vanuatu",[n._F.PN]:"Pitcairn Islands",[n._F.CK]:"Cook Islands",[n._F.FJ]:"Fiji",[n._F.PG]:"Papua New Guinea",[n._F.MP]:"Northern Mariana Islands",[n._F.NU]:"Niue",[n._F.TV]:"Tuvalu",[n._F.NF]:"Norfolk Island",[n._F.TO]:"Tonga",[n._F.FM]:"Micronesia",[n._F.SB]:"Solomon Islands",[n._F.NR]:"Nauru",[n._F.WF]:"Wallis and Futuna",[n._F.GU]:"Guam",[n._F.AU]:"Australia",[n._F.NZ]:"New Zealand",[n._F.MH]:"Marshall Islands",[n._F.CC]:"Cocos (Keeling) Islands",[n._F.VE]:"Venezuela",[n._F.PY]:"Paraguay",[n._F.BR]:"Brazil",[n._F.CO]:"Colombia",[n._F.PE]:"Peru",[n._F.CL]:"Chile",[n._F.UY]:"Uruguay",[n._F.AR]:"Argentina",[n._F.GY]:"Guyana",[n._F.BO]:"Bolivia",[n._F.GF]:"French Guiana",[n._F.EC]:"Ecuador",[n._F.FK]:"Falkland Islands",[n._F.US_AL]:"Alabama",[n._F.US_AK]:"Alaska",[n._F.US_AZ]:"Arizona",[n._F.US_AR]:"Arkansas",[n._F.US_CA]:"California",[n._F.US_CO]:"Colorado",[n._F.US_CT]:"Connecticut",[n._F.US_DE]:"Delaware",[n._F.US_DC]:"District of Columbia (DC)",[n._F.US_FL]:"Florida",[n._F.US_GA]:"Georgia",[n._F.US_HI]:"Hawaii",[n._F.US_ID]:"Idaho",[n._F.US_IL]:"Illinois",[n._F.US_IN]:"Indiana",[n._F.US_IA]:"Iowa",[n._F.US_KS]:"Kansas",[n._F.US_KY]:"Kentucky",[n._F.US_LA]:"Louisiana",[n._F.US_ME]:"Maine",[n._F.US_MD]:"Maryland",[n._F.US_MA]:"Massachusetts",[n._F.US_MI]:"Michigan",[n._F.US_MN]:"Minnesota",[n._F.US_MS]:"Mississippi",[n._F.US_MO]:"Missouri",[n._F.US_MT]:"Montana",[n._F.US_NE]:"Nebraska",[n._F.US_NV]:"Nevada",[n._F.US_NH]:"New Hampshire",[n._F.US_NJ]:"New Jersey",[n._F.US_NM]:"New Mexico",[n._F.US_NY]:"New York",[n._F.US_NC]:"North Carolina",[n._F.US_ND]:"North Dakota",[n._F.US_OH]:"Ohio",[n._F.US_OK]:"Oklahoma",[n._F.US_OR]:"Oregon",[n._F.US_PA]:"Pennsylvania",[n._F.US_PR]:"Puerto Rico",[n._F.US_RI]:"Rhode Island",[n._F.US_SC]:"South Carolina",[n._F.US_SD]:"San Diego",[n._F.US_TN]:"Tennessee",[n._F.US_TX]:"Texas",[n._F.US_UT]:"Utah",[n._F.US_VA]:"Virginia",[n._F.US_VI]:"United States Virgin Islands",[n._F.US_VT]:"Vermon",[n._F.US_WA]:"Washington",[n._F.US_WV]:"West Virginia",[n._F.US_WI]:"Wisconsin",[n._F.US_WY]:"Wyoming",[n._F.CA_AB]:"Alberta",[n._F.CA_BC]:"British Columbia",[n._F.CA_MB]:"Manitoba",[n._F.CA_NB]:"New Brunswick",[n._F.CA_NL]:"Newfoundland and Labrador",[n._F.CA_NS]:"Nova Scotia",[n._F.CA_ON]:"Ontario",[n._F.CA_PE]:"Prince Edward Island",[n._F.CA_QC]:"Quebec",[n._F.CA_SK]:"Saskatchewan",[n._F.CA_NT]:"Northwest Territories",[n._F.CA_NU]:"Nunavut",[n._F.CA_YT]:"Yukon",[n._F.CA]:"Canada",[n._F.US]:"United States",[n._F.MEXICO_CENTRAL_AMERICA]:"Mexico and Central America",[n._F.CARIBBEAN]:"Caribbean",[n._F.EEA]:"European Economic Area (EEA)",[n._F.NON_EEA]:"Non European Economic Area"},l=new Map(Object.entries(t));Object.entries(t).map(e=>({value:e[0],label:e[1]}))},79494:function(e,a,i){"use strict";var n=i(24246),t=i(77181);a.Z=e=>{let{title:a,icon:i,type:l,...o}=e;return(0,n.jsx)(t.wpx,{size:"small",type:l,"data-testid":"action-".concat(a),icon:i,iconPosition:"start",...o,children:a})}},60325:function(e,a,i){"use strict";i.d(a,{DD:function(){return r},Go:function(){return s},TK:function(){return t},Uv:function(){return c},k1:function(){return l},y3:function(){return u}});var n=i(28120);let t=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected).map(e=>e.id))&&void 0!==a?a:[]},l=e=>{var a;return null!==(a=null==e?void 0:e.filter(e=>e.selected))&&void 0!==a?a:[]},o=[{language:n.eU.EN,is_default:!0,title:"Title",description:"Description",accept_button_label:"Accept",reject_button_label:"Reject",save_button_label:"Save",acknowledge_button_label:"OK",privacy_preferences_link_label:"Privacy Preferences"}],r={name:"",disabled:!1,dismissable:!0,allow_language_selection:!1,show_layer1_notices:!1,layer1_button_options:n.Of.OPT_IN_OPT_OUT,regions:[],translations:o,auto_detect_language:!0,auto_subdomain_cookie_deletion:!0},s=(e,a)=>{let i=a.find(a=>a.id===e.language);return i?i.name:e.language},d=e=>{var a,i,n,t,l,o,r,s,d;let{language:c,is_default:u,accept_button_label:_,reject_button_label:F}=e;return{language:c,is_default:u,accept_button_label:_,reject_button_label:F,title:e.title,description:e.description,acknowledge_button_label:null!==(a=e.acknowledge_button_label)&&void 0!==a?a:void 0,banner_title:null!==(i=e.banner_title)&&void 0!==i?i:void 0,banner_description:null!==(n=e.banner_description)&&void 0!==n?n:void 0,purpose_header:null!==(t=e.purpose_header)&&void 0!==t?t:void 0,privacy_policy_link_label:null!==(l=e.privacy_policy_link_label)&&void 0!==l?l:void 0,privacy_policy_url:null!==(o=e.privacy_policy_url)&&void 0!==o?o:void 0,privacy_preferences_link_label:null!==(r=e.privacy_preferences_link_label)&&void 0!==r?r:void 0,save_button_label:null!==(s=e.save_button_label)&&void 0!==s?s:void 0,modal_link_label:null!==(d=e.modal_link_label)&&void 0!==d?d:void 0}},c=e=>{let{created_at:a,updated_at:i,privacy_notices:n,origin:t,id:l,...o}=e;return{...o,privacy_notice_ids:n?n.map(e=>e.id):[],translations:e.translations?e.translations.map(e=>d(e)):[]}},u=e=>e===n.re.PRIVACY_CENTER?{title:{included:!0,required:!0},description:{included:!0,required:!0},save_button_label:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},modal_link_label:{included:!0}}:e===n.re.MODAL?{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0},modal_link_label:{included:!0}}:e===n.re.BANNER_AND_MODAL?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:e===n.re.TCF_OVERLAY?{title:{included:!0,required:!0},banner_title:{included:!0},description:{included:!0,required:!0},banner_description:{included:!0},purpose_header:{included:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}:{title:{included:!0,required:!0},description:{included:!0,required:!0},accept_button_label:{included:!0,required:!0},reject_button_label:{included:!0,required:!0},save_button_label:{included:!0,required:!0},acknowledge_button_label:{included:!0,required:!0},privacy_policy_link_label:{included:!0},privacy_policy_url:{included:!0},privacy_preferences_link_label:{included:!0,required:!0},modal_link_label:{included:!0}}},20495:function(e,a,i){"use strict";i.r(a),i.d(a,{default:function(){return eu}});var n=i(24246),t=i(77181),l=i(86677),o=i(7617),r=i(77213),s=i(77830),d=i(58754),c=i(94725),u=i(45216),_=i(7621),F=i(92222),m=i(59003),g=i(27378),p=i(18225);let b=(0,t.IUT)({displayName:"MonitorIcon",viewBox:"0 0 12 12",path:(0,n.jsx)("path",{d:"M1.33333 2.21875C1.15 2.21875 1 2.37344 1 2.5625V5.65625H3.66667C3.84167 5.65625 4.00417 5.75078 4.09583 5.90762L4.62708 6.8207L5.88542 4.22324C5.96667 4.05566 6.13125 3.94609 6.3125 3.93965C6.49375 3.9332 6.66667 4.02773 6.76042 4.18887L7.61458 5.65625H8.83333C9.11042 5.65625 9.33333 5.88613 9.33333 6.17188C9.33333 6.45762 9.11042 6.6875 8.83333 6.6875H7.33333C7.15833 6.6875 6.99583 6.59297 6.90417 6.43613L6.37292 5.52305L5.11458 8.12051C5.03333 8.28809 4.86875 8.39766 4.6875 8.4041C4.50625 8.41055 4.33333 8.31602 4.23958 8.15488L3.38542 6.6875H1V9.4375C1 9.62656 1.15 9.78125 1.33333 9.78125H10.6667C10.85 9.78125 11 9.62656 11 9.4375V2.5625C11 2.37344 10.85 2.21875 10.6667 2.21875H1.33333ZM0 2.5625C0 1.8041 0.597917 1.1875 1.33333 1.1875H10.6667C11.4021 1.1875 12 1.8041 12 2.5625V9.4375C12 10.1959 11.4021 10.8125 10.6667 10.8125H1.33333C0.597917 10.8125 0 10.1959 0 9.4375V2.5625Z",fill:"currentColor"})});var h=i(14481),x=i(72625),y=i(70675),v=i(812),S=e=>{let{defaultSuccessMsg:a,defaultErrorMsg:i}=e,n=(0,t.pmc)();return{toastResult:e=>{(0,v.D4)(e)?n({status:"error",description:(0,v.e$)(e.error,i)}):n({status:"success",description:a})}}},C=i(8133),f=i(46628),j=i(67991),k=i(91613);let M=(0,F.Cl)();var A=e=>{let{items:a,totalItemCount:i,selected:l,excluded:o,allSelected:r,someSelected:s,moreLoading:d,handleToggleSelection:c,handleToggleAll:u,onMoreClick:_}=e,b=a.map(e=>({id:e,isSelected:l.includes(e),isExcluded:o.includes(e)})),x=(0,g.useMemo)(()=>[M.display({id:"select",cell:e=>{let{row:a}=e;return(0,n.jsx)(h.k,{isChecked:a.original.isSelected||r&&!a.original.isExcluded,onChange:()=>c(a.original.id),dataTestId:"".concat(a.original.id,"-checkbox")})},header:()=>(0,n.jsx)(h.k,{isChecked:r,isIndeterminate:s,onChange:u,dataTestId:"select-all-checkbox"}),size:1}),M.accessor(e=>e.id,{id:"id",cell:e=>(0,n.jsx)(h.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(h.Rr,{value:"Scope",...e})})],[c,u,r,s]),y=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getRowId:e=>e.id,manualPagination:!0,data:b,columns:x,columnResizeMode:"onChange"});return(0,n.jsx)(t.kCb,{w:"full",direction:"column",maxH:"lg",children:(0,n.jsx)(h.ZK,{tableInstance:y,onRowClick:e=>c(e.id),footer:!!_&&(0,n.jsx)(h.vr,{totalColumns:2,children:(0,n.jsx)(t.kCb,{justify:"center",children:d?(0,n.jsx)(p.Z,{size:"xs"}):(0,n.jsxs)(t.kCb,{align:"center",children:[(0,n.jsxs)(t.xvT,{fontSize:"xs",mr:4,children:["Showing ",a.length," of ",i]}),(0,n.jsx)(t.wpx,{onClick:_,size:"small","data-testid":"load-more-btn",children:"Load more..."})]})})})})})};let T={items:[],total:1,page:1,size:50,pages:0};var N=(e,a)=>{let[i,n]=(0,g.useState)(2),{data:t,isLoading:l}=(0,y.oN)({page:1,size:25,connection_config_key:e}),o=(0,g.useRef)(l),{items:r,total:s}=null!=t?t:T,d=!!(null==t?void 0:t.pages)&&i>t.pages,[c,u]=(0,g.useState)(r);(0,g.useEffect)(()=>{o.current=l,u(r)},[l,r]),(0,g.useEffect)(()=>{let e=setTimeout(()=>{o.current&&a&&a()},5e3);return()=>clearTimeout(e)},[]);let[_,{isLoading:F,isFetching:m}]=(0,y.j3)(),p=F||m||l,b=async()=>{var a,t;if(d)return;let l=await _({connection_config_key:e,size:25,page:i+1});l.isError||(n(i+1),u([...c,...null!==(t=null===(a=l.data)||void 0===a?void 0:a.items)&&void 0!==t?t:[]]))};return{databases:c,totalDatabases:s,fetchMore:b,initialIsLoading:l,isLoading:p,reachedEnd:d}},w=e=>{var a;let{monitor:i,isEditing:l,isSubmitting:o,integrationKey:r,onSubmit:s,onClose:d}=e,c=(0,t.pmc)(),{databases:u,totalDatabases:_,fetchMore:F,reachedEnd:m,isLoading:g,initialIsLoading:b}=N(r,()=>{s({...i,databases:[]}),c({...f.MA,status:"info",description:"Loading resources is taking longer than expected. The monitor has been saved and is tracking all available resources. You can return later to limit its scope if needed"}),d()}),h=null!==(a=null==i?void 0:i.databases)&&void 0!==a?a:[],{selected:x,excluded:y,allSelected:v,someSelected:S,handleToggleItemSelected:C,handleToggleAll:M}=(0,j.Od)({initialSelected:h,initialExcluded:[],initialAllSelected:l&&!h.length,itemCount:_}),T=!v&&0===x.length;return b?(0,n.jsx)(p.Z,{my:12}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.kCb,{p:4,direction:"column",children:[(0,n.jsxs)(t.kCb,{direction:"row",mb:4,gap:1,align:"center",children:[(0,n.jsx)(t.xvT,{fontSize:"sm",children:"Select projects to monitor"}),(0,n.jsx)(k.Z,{label:"Selecting a project will monitor all current and future datasets within that project."})]}),(0,n.jsx)(A,{items:u,totalItemCount:_,selected:x,excluded:y,allSelected:v,someSelected:S,moreLoading:g,handleToggleSelection:C,handleToggleAll:M,onMoreClick:m?void 0:F})]}),(0,n.jsxs)("div",{className:"mt-4 flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:d,children:"Cancel"}),(0,n.jsx)(t.ua7,{label:"Select one or more projects to save",isDisabled:!T,children:(0,n.jsx)(t.wpx,{onClick:()=>{s({...i,excluded_databases:y,databases:v?[]:x})},loading:o,type:"primary","data-testid":"save-btn",disabled:T,children:"Save"})})]})]})},E=i(19508),U=i(96063),I=i(34090),R=i(55484),L=i(97181),q=i(40324),D=i(28120),O=e=>{var a,i;let{monitor:o,integrationOption:r,isSubmitting:s,databasesAvailable:d,onClose:c,onAdvance:u,onSubmit:_}=e,F=!!o,{query:m}=(0,l.useRouter)(),g=Array.isArray(m.id)?m.id[0]:m.id,p=R.Ry().shape({name:R.Z_().required().label("Name"),execution_frequency:R.Z_().nullable().label("Execution frequency"),execution_start_date:R.hT().nullable().label("Execution start date")}),b=(null==o?void 0:o.execution_start_date)?(0,E.D)(o.execution_start_date):Date.now(),h={name:null!==(a=null==o?void 0:o.name)&&void 0!==a?a:"",execution_start_date:(0,U.WU)(b,"yyyy-MM-dd'T'HH:mm"),execution_frequency:null!==(i=null==o?void 0:o.execution_frequency)&&void 0!==i?i:D.hV.MONTHLY},x=(0,v.MM)(D.hV);return(0,n.jsx)(I.J9,{initialValues:h,enableReinitialize:!0,onSubmit:e=>{let a=e.execution_frequency!==D.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:D.hV.NOT_SCHEDULED,execution_start_date:void 0},i=F?{...o,...a,name:e.name}:{...a,name:e.name,connection_config_key:g,classify_params:{num_samples:25,num_threads:1}};r.identifier===D.Rj.DYNAMODB&&(i.datasource_params={single_dataset:!1}),d?u(i):_(i)},validationSchema:p,children:e=>{let{values:a,isValid:i,resetForm:l}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.gCW,{alignItems:"start",spacing:6,mt:4,children:[(0,n.jsx)(q.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(L.d,{name:"execution_frequency",id:"execution_frequency",tooltip:"Interval to run the monitor automatically after the start date",options:x,label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(q.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===D.hV.NOT_SCHEDULED,id:"execution_start_date"}),(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{l(),c()},children:"Cancel"}),(0,n.jsx)(t.wpx,{htmlType:"submit",type:"primary",disabled:!i,loading:s,"data-testid":"next-btn",children:d?"Next":"Save"})]})]})})}})},B=i(90111),P=i(8411),G=i(3968),H=i(64781),V=i(60325);let Z=R.Ry().shape({name:R.Z_().required().label("Name"),execution_frequency:R.Z_().nullable().label("Execution frequency"),execution_start_date:R.hT().nullable().label("Execution start date"),datasource_params:R.Ry().shape({locations:R.IX().label("Locations"),exclude_domains:R.IX().label("Exclude domains"),sitemap_url:R.Z_().nullable().url().label("Sitemap URL")})});var K=e=>{var a,i,o;let{monitor:r,url:s,onClose:d,onSubmit:c}=e,{query:u}=(0,l.useRouter)(),_=Array.isArray(u.id)?u.id[0]:u.id,F=(null==r?void 0:r.execution_start_date)?(0,E.D)(r.execution_start_date):Date.now(),{data:m,isLoading:g}=(0,H.gT)(),p=[...(0,V.TK)(null!==(a=null==m?void 0:m.locations)&&void 0!==a?a:[]),...(0,V.TK)(null!==(i=null==m?void 0:m.location_groups)&&void 0!==i?i:[])].map(e=>({value:e,label:P.Z8[e]})),b={name:(null==r?void 0:r.name)||"",execution_frequency:(null==r?void 0:r.execution_frequency)||D.hV.MONTHLY,execution_start_date:(0,U.WU)(F,"yyyy-MM-dd'T'HH:mm"),url:s,connection_config_key:_,datasource_params:null!==(o=null==r?void 0:r.datasource_params)&&void 0!==o?o:{locations:[]}},h=async e=>{let a=e.execution_frequency!==D.hV.NOT_SCHEDULED?{execution_frequency:e.execution_frequency,execution_start_date:new Date(e.execution_start_date).toISOString()}:{execution_frequency:D.hV.NOT_SCHEDULED,execution_start_date:void 0};c({...r,...e,...a,key:(null==r?void 0:r.key)||(0,G.E)(e.name),classify_params:(null==r?void 0:r.classify_params)||{},datasource_params:e.datasource_params||{},connection_config_key:_})};return(0,n.jsxs)(t.jqI,{vertical:!0,className:"pt-4",children:[(0,n.jsx)(B.Z,{children:(0,n.jsx)(t.xvT,{fontSize:"sm",children:"This monitor allows you to simulate and verify user consent actions, such as 'accept,' 'reject,' or 'opt-out,' on consent experiences. For each detected activity, the monitor will record whether it occurred before or after the configured user actions, ensuring compliance with user consent choices."})}),(0,n.jsx)(I.J9,{initialValues:b,enableReinitialize:!0,onSubmit:h,validationSchema:Z,children:e=>{let{values:a,resetForm:i}=e;return(0,n.jsx)(I.l0,{children:(0,n.jsxs)(t.jqI,{vertical:!0,gap:"middle",children:[(0,n.jsx)(q.j0,{name:"name",id:"name",label:"Name",isRequired:!0,variant:"stacked"}),(0,n.jsx)(q.j0,{name:"datasource_params.sitemap_url",id:"sitemap_url",label:"Sitemap URL",variant:"stacked"}),(0,n.jsx)(L.d,{mode:"tags",name:"datasource_params.exclude_domains",placeholder:"Enter domains to exclude",id:"exclude_domains",label:"Exclude domains",options:[],open:!1,layout:"stacked"}),(0,n.jsx)(q.j0,{name:"url",id:"url",label:"URL",isRequired:!0,disabled:!0,variant:"stacked"}),(0,n.jsx)(L.d,{mode:"multiple",isRequired:!0,name:"datasource_params.locations",id:"locations",label:"Locations",loading:g,options:p,optionFilterProp:"label",tooltip:"Specify the region(s) to include in the scan. The monitor will scan the same URL across these locations to identify tracking technologies, such as cookies served by ad tech vendors.",layout:"stacked"}),(0,n.jsx)(L.d,{name:"execution_frequency",id:"execution_frequency",options:(0,v.MM)(D.hV),label:"Automatic execution frequency",layout:"stacked"}),(0,n.jsx)(q.YL,{name:"execution_start_date",label:"Automatic execution start time",disabled:a.execution_frequency===D.hV.NOT_SCHEDULED,id:"execution_start_date",tooltip:"Set the start time for the scan. For optimal performance and minimal disruption, schedule scans during periods of low traffic."}),(0,n.jsxs)(t.jqI,{className:"mt-2 justify-between",children:[(0,n.jsx)(t.wpx,{onClick:()=>{i(),d()},children:"Cancel"}),(0,n.jsx)(t.wpx,{type:"primary",htmlType:"submit","data-testid":"save-btn",children:"Save"})]})]})})}})]})},z=i(31883),W=e=>{let{isOpen:a,onClose:i,formStep:l,onAdvance:o,monitor:r,isEditing:s,integration:d,integrationOption:c}=e,[u,{isLoading:_}]=(0,y.Fy)(),{data:F}=(0,y.oN)({page:1,size:25,connection_config_key:d.key}),m=!!F&&!!F.total,g=(0,t.pmc)(),{toastResult:b}=S({defaultSuccessMsg:"Monitor ".concat(s?"updated":"created"," successfully"),defaultErrorMsg:"A problem occurred while ".concat(s?"updating":"creating"," this monitor")}),h=async e=>{let a;let n=setTimeout(()=>{a||(g({...f.MA,status:"info",description:"Saving this monitor is taking longer than expected. Fides will continue processing it in the background, and you can check back later to view the updates."}),i())},5e3);(a=await u(e))&&(clearTimeout(n),b(a),(0,z.D4)(a)||i())};return c.identifier===D.Rj.WEBSITE?(0,n.jsx)(C.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure website monitor",isOpen:a,onClose:i,children:(0,n.jsx)(K,{monitor:r,url:d.secrets.url,onClose:i,onSubmit:h})}):(0,n.jsxs)(C.Z,{title:(null==r?void 0:r.name)?"Configure ".concat(r.name):"Configure discovery monitor",isOpen:a,onClose:i,children:[0===l&&(0,n.jsx)(O,{monitor:r,onClose:i,onAdvance:o,onSubmit:h,isSubmitting:_,databasesAvailable:m,integrationOption:c}),1===l&&(r?(0,n.jsx)(w,{monitor:r,isEditing:s,isSubmitting:_,onSubmit:h,onClose:i,integrationKey:d.key}):(0,n.jsx)(p.Z,{}))]})},Y=i(58452),J=i(79494),Q=e=>{let{monitorId:a,onEditClick:i}=e,[l]=(0,y.Sb)(),{toastResult:o}=S({defaultErrorMsg:"A problem occurred deleting this monitor",defaultSuccessMsg:"Monitor deleted successfully"}),[r,{isLoading:s}]=(0,y.V9)(),{toastResult:d}=S({defaultErrorMsg:"A problem occurred initiating monitor execution",defaultSuccessMsg:"Monitor execution successfully started"}),c=async()=>{o(await l({monitor_config_id:a}))},{isOpen:u,onOpen:_,onClose:F}=(0,t.qY0)(),m=async()=>{d(await r({monitor_config_id:a}))};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y.Z,{isOpen:u,onClose:F,onConfirm:c,title:"Delete monitor",message:"Are you sure you want to delete this discovery monitor?",continueButtonText:"Delete",isCentered:!0}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(t.ua7,{label:"Edit",children:(0,n.jsx)(t.wpx,{onClick:i,size:"small",icon:(0,n.jsx)(t.dY8,{}),"data-testid":"edit-monitor-btn","aria-label":"Edit monitor"})}),(0,n.jsx)(t.ua7,{label:"Delete",children:(0,n.jsx)(t.wpx,{onClick:_,size:"small",icon:(0,n.jsx)(t.pJl,{}),"aria-label":"Delete monitor","data-testid":"delete-monitor-btn"})}),(0,n.jsx)(J.Z,{onClick:m,title:"Scan",loading:s})]})]})};let X=e=>{let{row:a,getValue:i}=e,[t]=(0,y.Fy)(),l=async e=>t({...a.original,enabled:e}),o=i();return(0,n.jsx)(x.S1,{enabled:o,onToggle:l,title:"Disabling monitor",message:"You are about to disable this monitor. If you continue, it will no longer scan automatically."})},$={items:[],total:0,page:1,size:50,pages:0},ee=(0,F.Cl)(),ea=e=>{let{onAddClick:a}=e;return(0,n.jsx)(t.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:(0,n.jsxs)(t.gCW,{children:[(0,n.jsx)(t.xvT,{fontSize:"md",fontWeight:"600",children:"No monitors"}),(0,n.jsx)(t.xvT,{fontSize:"sm",children:'You have not configured any data discovery monitors. Click "Add monitor" to configure data discovery now.'}),(0,n.jsx)(t.wpx,{onClick:a,type:"primary",children:"Add monitor"})]})})};var ei=e=>{let{integration:a,integrationOption:i}=e,{PAGE_SIZES:l,pageSize:o,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:_,endRange:v,pageIndex:S,setTotalPages:C}=(0,h.oi)(),{isLoading:f,isFetching:j,data:k}=(0,y.Fu)({page:S,size:o,connection_config_key:a.key}),M=(0,t.qY0)(),[A,T]=(0,g.useState)(void 0),[N,w]=(0,g.useState)(!1),[E,U]=(0,g.useState)(0),I=e=>{T(e),w(!0),M.onOpen()},R=null!=k?k:$,{items:L,total:q,pages:O}=(0,g.useMemo)(()=>R,[R]);(0,g.useEffect)(()=>{C(O)},[O,C]);let B=(0,g.useMemo)(()=>[ee.accessor(e=>e.name,{id:"name",cell:e=>(0,n.jsx)(h.G3,{value:e.getValue()}),header:e=>(0,n.jsx)(h.Rr,{value:"Name",...e})}),ee.accessor(e=>e.databases,{id:"projects",cell:e=>0===e.getValue().length?(0,n.jsx)(h.G3,{value:"All projects"}):(0,n.jsx)(h.WP,{suffix:"Projects",value:e.getValue(),...e,cellState:{isExpanded:!0}}),header:e=>(0,n.jsx)(h.Rr,{value:"Scope",...e})}),ee.accessor(e=>e.execution_frequency,{id:"frequency",cell:e=>{var a;return(0,n.jsx)(h.G3,{value:null!==(a=e.getValue())&&void 0!==a?a:"Not scheduled"})},header:e=>(0,n.jsx)(h.Rr,{value:"Scan frequency",...e})}),ee.accessor(e=>e.last_monitored,{id:"last_monitored",cell:e=>(0,n.jsx)(x.Cy,{time:e.getValue()}),header:e=>(0,n.jsx)(h.Rr,{value:"Last scan",...e})}),ee.accessor(e=>e.enabled,{id:"status",cell:X,header:e=>(0,n.jsx)(h.Rr,{value:"Status",...e}),size:0,meta:{disableRowClick:!0}}),ee.display({id:"action",cell:e=>(0,n.jsx)(Q,{onEditClick:()=>I(e.row.original),monitorId:e.row.original.key}),header:"Actions",meta:{disableRowClick:!0}})],[]),P=(0,m.b7)({getCoreRowModel:(0,F.sC)(),getGroupedRowModel:(0,F.qe)(),getExpandedRowModel:(0,F.rV)(),getRowId:e=>e.name,manualPagination:!0,data:L,columns:B,columnResizeMode:"onChange"});return f?(0,n.jsx)(p.Z,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.xvT,{maxW:"720px",mb:6,fontSize:"sm","data-testid":"monitor-description",children:(null==i?void 0:i.identifier)===D.Rj.WEBSITE?"Configure your website monitor to identify active ad tech vendors and tracking technologies across your site. This monitor will analyze selected pages for vendor activity, compliance with privacy requirements, and data collection practices. Set your preferences below to customize the monitor frequency and scan locations.":"A data discovery monitor observes configured systems for data model changes to proactively discover and classify data risks. Monitors can observe part or all of a project, dataset, table, or API for changes and each can be assigned to a different data steward."}),(0,n.jsxs)(h.Q$,{children:[(0,n.jsx)(t.LZC,{}),(0,n.jsx)(t.wpx,{onClick:M.onOpen,icon:(0,n.jsx)(b,{}),iconPosition:"end","data-testid":"add-monitor-btn",children:"Add monitor"}),(0,n.jsx)(W,{isOpen:M.isOpen,onClose:()=>{T(void 0),w(!1),U(0),M.onClose()},formStep:E,onAdvance:e=>{T(e),U(1)},monitor:A,isEditing:N,integration:a,integrationOption:i})]}),(0,n.jsx)(h.ZK,{tableInstance:P,onRowClick:I,emptyTableNotice:(0,n.jsx)(ea,{onAddClick:M.onOpen})}),(0,n.jsx)(h.s8,{totalRows:q||0,pageSizes:l,setPageSize:r,onPreviousPageClick:s,isPreviousPageDisabled:d||j,onNextPageClick:c,isNextPageDisabled:u||j,startRange:_,endRange:v})]})},en=i(41966),et=i(32885),el=e=>{let{integration:a}=e,{data:i}=(0,c.Eg)(a.key),{data:l}=(0,en.LH)({minimal:!0,connection_type:D.Rj.BIGQUERY}),[o,{isLoading:r}]=(0,et.Qd)(),s=(0,t.pmc)(),d=async()=>{try{var e,n,t,r,d;let c=null!==(t=null==i?void 0:null===(e=i.items)||void 0===e?void 0:e.map(e=>e.fides_key))&&void 0!==t?t:[],u=null!==(r=null==l?void 0:l.map(e=>e.fides_key))&&void 0!==r?r:[],_=c.length>0?c:u,F=await o({connectionKey:a.key,datasetIds:_}),m=null!==(d=null===(n=F.data)||void 0===n?void 0:n.succeeded.length)&&void 0!==d?d:0,g="Fides has begun syncing with DataHub. There ".concat(1===m?"is":"are"," ").concat(m," dataset").concat(1===m?"":"s"," queued for syncing.");s((0,f.t5)(g))}catch(e){s({title:"Error syncing datasets",description:"There was an error syncing your datasets with DataHub. Please try again.",status:"error",duration:5e3,isClosable:!0})}};return(0,n.jsxs)(t.gCW,{spacing:6,align:"stretch",children:[(0,n.jsxs)(t.gCW,{spacing:4,align:"stretch",children:[(0,n.jsx)(t.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-1",children:"If you're using DataHub for metadata management, select sync datasets to push data categories from Fides to your DataHub datasets."}),(0,n.jsxs)(t.xvT,{maxW:"720px",fontSize:"sm","data-testid":"scan-description-2",children:["Fides assigns data categories to datasets based on your privacy taxonomy. With this integration, those categories can be added as glossary terms to matching datasets in DataHub-keeping your labeling consistent across systems. To learn more about our DataHub integration, view our docs ",(0,n.jsx)(t.rUS,{href:"https://ethyca.com/docs/user-guides/integrations/saas-integrations/datahub",isExternal:!0,color:"blue.500",textDecoration:"underline",children:"here"}),"."]})]}),(0,n.jsx)(t.zxk,{colorScheme:"primary",onClick:d,"data-testid":"sync-button",width:"fit-content",isLoading:r,loadingText:"Syncing datasets...",children:"Sync Datasets"})]})},eo=i(15987),er=i(64176),es=e=>{let{isOpen:a,onClose:i,connection:t}=e,l=(0,er.Z)(t.connection_type);return(0,n.jsx)(C.Z,{title:"Manage integration secret",isOpen:a,onClose:i,children:(0,n.jsx)(eo.Z,{connection:t,connectionOption:l,onCancel:i})})},ed=i(41553),ec=i(75595),eu=()=>{var e,a;let{query:i}=(0,l.useRouter)(),F=Array.isArray(i.id)?i.id[0]:i.id,{data:m,isLoading:g}=(0,c.jA)(null!=F?F:""),p=(0,er.Z)(null==m?void 0:m.connection_type),{testConnection:b,isLoading:h,testData:x}=(0,u.Z)(m),{onOpen:y,isOpen:v,onClose:S}=(0,t.qY0)(),{overview:C,instructions:f}=(0,_.ZP)(null==m?void 0:m.connection_type),j=(0,l.useRouter)();m&&!_.jq.includes(m.connection_type)&&j.push(s.KH);let k=[{label:"Connection",content:(0,n.jsxs)(t.xuv,{maxW:"720px",children:[(0,n.jsxs)(t.kCb,{borderRadius:"md",outline:"1px solid",outlineColor:"gray.100",align:"center",p:3,children:[(0,n.jsx)(t.kCb,{flexDirection:"column",children:(0,n.jsx)(ed.Z,{testData:x})}),(0,n.jsx)(t.LZC,{}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)(t.wpx,{onClick:b,loading:h,"data-testid":"test-connection-btn",children:"Test connection"}),(0,n.jsx)(t.wpx,{onClick:y,"data-testid":"manage-btn",children:"Manage"})]})]}),(0,n.jsx)(es,{isOpen:v,onClose:S,connection:m}),C,f]})}];return(null==m?void 0:m.connection_type)===D.Rj.DATAHUB?k.push({label:"Data sync",content:(0,n.jsx)(el,{integration:m})}):k.push({label:"Data discovery",content:(0,n.jsx)(ei,{integration:m,integrationOption:p})}),(0,n.jsx)(r.Z,{title:"Integrations",children:(0,n.jsxs)(d.Z,{heading:"Integrations",breadcrumbItems:[{title:"All integrations",href:s.KH},{title:null!==(a=null!==(e=null==m?void 0:m.name)&&void 0!==e?e:null==m?void 0:m.key)&&void 0!==a?a:""}],children:[(0,n.jsx)(ec.Z,{integration:m,showDeleteButton:!0}),g?(0,n.jsx)(t.$jN,{}):!!m&&(0,n.jsx)(o.Z,{data:k,isLazy:!0})]})})}}},function(e){e.O(0,[8033,6060,2858,2866,9278,9255,4481,5973,2888,9774,179],function(){return e(e.s=50697)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return n(93299)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(24246),s=n(77181),l=n(88038),r=n.n(l),a=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,a.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:l=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,a.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(h.flags.privacyRequestsConfiguration&&p),{data:j}=(0,c.JE)(void 0,{skip:g}),{data:m}=(0,c.PW)(void 0,{skip:g}),f=h.flags.privacyRequestsConfiguration&&(!j||!m)&&p;return(0,i.jsxs)(s.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,i.jsx)(u,{}):null,t]})]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return l.D4},MM:function(){return h},Ot:function(){return c},c6:function(){return s},cj:function(){return p},e$:function(){return a},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return d}});var i,s,l=n(19043);let r="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:n}=e;return{status:n,message:a(e,t.message)}}return t},h=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=s||(s={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},93299:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i,s,l=n(24246),r=n(77181),a=n(86677),o=n(77213),c=n(77830),d=n(58754),u=n(99716),h=n(27378),x=n(21702);(i=s||(s={})).IN_PROCESSING="in_processing",i.PENDING="pending",i.COMPLETE="complete",i.ERROR="error",i.PAUSED="paused",i.RETRYING="retrying",i.SKIPPED="skipped";var p=n(88340);let g=e=>{switch(e){case s.SKIPPED:return"warning";case s.ERROR:default:return"error"}};var j=e=>{let{errorMessage:t,status:n=s.ERROR}=e;return(0,l.jsxs)(r.xuv,{height:"100%",id:"outer",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",paddingBottom:"8px",children:[(0,l.jsx)(r.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,l.jsx)(r.j8w,{color:g(n),children:n}),(0,l.jsx)(r.xuv,{padding:"0px",marginBottom:"3px",children:(0,l.jsx)(p.Z,{copyText:t})})]}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,l.jsx)(r.xvT,{children:t})})]})},m=n(16394),f=n(3124),v=n.n(f);let y=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}};var b=e=>{let{eventLogs:t,openErrorPanel:n}=e,i=null==t?void 0:t.map(e=>(0,l.jsxs)(r.Tr,{_hover:{backgroundColor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?v().FIDESUI_NEUTRAL_50:"unset"},onClick:()=>{(e.status===s.ERROR||e.status===s.SKIPPED&&e.message)&&n(e.message,e.status)},style:{cursor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?"pointer":"unset"},children:[(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,m.p6)(e.updated_at)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:y(e.action_type)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.collection_name})})]},e.updated_at));return(0,l.jsx)(r.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,l.jsx)(r.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,l.jsxs)(r.iA_,{size:"sm",id:"table",position:"relative",children:[(0,l.jsx)(r.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,l.jsx)(r.p3B,{id:"tableBody",children:i})]})})})},R=e=>{let{isOpen:t,onClose:n,currentLogs:i,isViewingError:a,errorMessage:o,currentStatus:c=s.ERROR,onCloseErrorPanel:d,onOpenErrorPanel:u}=e;return(0,l.jsxs)(r.dys,{isOpen:t,placement:"right",onClose:n,size:"full",autoFocus:!1,children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{style:{width:"50%"},children:[(0,l.jsx)(r.OXI,{style:{paddingBottom:"0px"},children:(0,l.jsxs)(r.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",children:[a&&(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:d}),(0,l.jsx)(r.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:a?"Event detail":"Event log"})]}),(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:n})]})}),(0,l.jsxs)(r.Ng0,{id:"drawerBody",overflow:"hidden",children:[i&&!a?(0,l.jsx)(b,{eventLogs:i,openErrorPanel:u}):null,a?(0,l.jsx)(j,{errorMessage:o,status:c}):null]})]})]})};let w=(e,t)=>{if(0===e.length)return!1;let n=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!n[0].collection_name)return n[0].status===t;let i={};return n.forEach(e=>{e.collection_name&&!i[e.collection_name]&&(i[e.collection_name]=e)}),Object.values(i).some(e=>e.status===t)},C=e=>w(e,s.ERROR),_=e=>w(e,s.SKIPPED),S=e=>C(e)?(0,l.jsx)(r.f9v,{}):_(e)?(0,l.jsx)(r.XXw,{}):(0,l.jsx)(r.StI,{});var k=e=>{let{entryKey:t,logs:n,isLast:i,onViewLog:s}=e;return(0,l.jsxs)(r.xuv,{children:[(0,l.jsxs)(r.kCb,{alignItems:"center",height:23,position:"relative",children:[(0,l.jsx)(r.xuv,{zIndex:1,children:S(n)}),!i&&(0,l.jsx)(r.xuv,{width:"2px",height:"63px",backgroundColor:"gray.700",position:"absolute",top:"16px",left:"6px",zIndex:0}),(0,l.jsx)(r.xvT,{color:"gray.600",fontWeight:"500",fontSize:"sm",ml:2,children:t})]}),(0,l.jsx)(r.xvT,{cursor:"pointer",color:"link.900",fontWeight:"500",fontSize:"sm",ml:6,mb:7,onClick:()=>s(),children:"View log"})]})},E=e=>{let{subjectRequest:t}=e,{isOpen:n,onOpen:i,onClose:a}=(0,r.qY0)(),[o,c]=(0,h.useState)([]),[d,u]=(0,h.useState)(""),[x,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[m,f]=(0,h.useState)(s.ERROR),{results:v}=t,y=v?Object.keys(v):[];(0,h.useEffect)(()=>{d&&v&&v[d]&&c(v[d])},[v,d]);let b=()=>{p(!1)},w=(e,t)=>{u(e),c(t),i()};return(0,l.jsxs)(r.xuv,{width:"100%",children:[v&&y.map((e,t)=>(0,l.jsx)(k,{entryKey:e,logs:v[e],isLast:t===y.length-1,onViewLog:()=>w(e,v[e])},e)),(0,l.jsx)(R,{isOpen:n,onClose:()=>{x&&b(),u(""),a()},currentLogs:o,isViewingError:x,errorMessage:g,currentStatus:m,onOpenErrorPanel:(e,t)=>{j(e),t&&f(t),p(!0)},onCloseErrorPanel:b})]})},T=n(14047),q=n(14207),A=n(90867),P=n(16134);let N=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var I=e=>{let{rules:t}=e,n=N(t).map(e=>(0,m.kC)(e)).map(e=>e);return(0,l.jsx)(r.AntTypography.Text,{children:n.join(" - ")})},O=n(34090),z=n(55484),D=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map((e,t)=>{let[n]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:n,name:n,children:e=>{let{field:i}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:n,w:"50%",children:n}),(0,l.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(n),ref:0===t?d:void 0,size:"sm"})]})}})},n)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})},U=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map(e=>{let[t]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:t,name:t,children:e=>{let{field:n}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,l.jsx)(r.XZJ,{...n,isChecked:!!n.value,onChange:n.onChange,name:t,id:t})]})}})},t)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})};let M=(e,t,n)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:D,uploadMutation:t,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:U,uploadMutation:n,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualErasureWebhookData}:null;var W=e=>{let{subjectRequest:t,onComplete:n}=e,i=(0,P.T)(),{errorAlert:s,successAlert:a}=(0,T.V)(),{handleError:o}=(0,T.H)(),[c,d]=(0,h.useState)([]),[u,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(!1),{data:m,isFetching:f,isLoading:v,isSuccess:y}=(0,q.W6)(),[b]=(0,A.w3)(),R=N(t.policy.rules),[w]=(0,A.nL)(),[C]=(0,A.UR)(),{ProcessingDetailComponent:_,uploadMutation:S,getUploadedWebhookDataEndpoint:k}=M(R,w,C),E=async()=>{try{p(!0),await b(t.id).unwrap(),a("Manual request has been received. Request now processing."),n()}catch(e){o(e)}finally{p(!1)}},I=async e=>{try{j(!0),await S(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[n,i]=e;t.fields[n]=i||""});let n=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(n),a("Manual input successfully saved!")}catch(e){o(e)}finally{j(!1)}};return((0,h.useEffect)(()=>(y&&m.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],n=null==m?void 0:m.map(e=>e.connection_config.key);null==n||n.every(n=>e.push(i(k.initiate({connection_key:n,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,n)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let n={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,i]=e;n.fields[t]=i||""}),t.push(n)}else s("An error occurred while loading manual input data for ".concat(m[n].connection_config.name))}),d(t)})})(),()=>{}),[m,c.length,i,s,y,t.id,k]),R.includes(x.Us.ACCESS)||R.includes(x.Us.ERASURE))?(0,l.jsxs)(r.gCW,{align:"stretch",spacing:8,children:[(0,l.jsx)(r.xuv,{children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,l.jsxs)(r.xuv,{children:[(f||v)&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),y&&m?(0,l.jsx)(r.xJi,{children:(0,l.jsxs)(r.iA_,{size:"sm",variant:"unstyled",children:[(0,l.jsx)(r.hrZ,{children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,l.jsx)(r.Th,{})]})}),(0,l.jsxs)(r.p3B,{children:[m.length>0&&m.map(e=>(0,l.jsxs)(r.Tr,{display:"block",children:[(0,l.jsx)(r.Td,{pl:"0",children:e.connection_config.key}),(0,l.jsx)(r.Td,{children:c.length>0?(0,l.jsx)(_,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:g,onSaveClick:I}):null})]},e.id)),0===m.length&&(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Td,{colSpan:3,pl:"0",children:(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,l.jsx)(r.$RU,{children:(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Th,{pl:"0px",children:(0,l.jsx)(r.wpx,{type:"primary",loading:u,onClick:E,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},L=n(8557),F=e=>{let{daysLeft:t,includeText:n,status:i}=e;if(!t||i===L.q.COMPLETE||i===L.q.CANCELED||i===L.q.DENIED||i===L.q.IDENTITY_UNVERIFIED)return(0,l.jsx)("span",{children:"-"});let s="";switch(!0){case t>=10:s="success";break;case t<10&&t>4:s="warning";break;case t<5:s="error"}return(0,l.jsx)(r.j8w,{color:s,children:n?"".concat(t," days left"):t})},B=n(25980);let V={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"alert",label:"Requires Input"}};var Y=e=>{let{status:t}=e;return(0,l.jsx)(r.j8w,{color:V[t].color,className:"justify-center","data-testid":"request-status-badge",children:V[t].label})},X=n(15709),Z=n.n(X),H=e=>{let{label:t,children:n}=e;return(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(Z().label),children:(0,l.jsxs)(r.AntTypography.Text,{children:[t,":"]})}),(0,l.jsx)("div",{className:"min-w-0 shrink grow ".concat(Z().value),"data-testid":"request-detail-value-".concat(t),children:n})]})},G=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:n}=t;return(0,l.jsx)("div",{className:"flex flex-col gap-2",children:n&&Object.keys(n).length>0&&Object.entries(n).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,n]=e;return(0,l.jsx)(H,{label:n.label,children:(0,l.jsx)(r.AntTypography.Text,{children:Array.isArray(n.value)?n.value.join(", "):n.value})},t)})})},J=e=>{let{subjectRequest:t}=e,{plus:n}=(0,B.hz)(),{id:i,status:s,policy:a,identity:o,identity_verified_at:c}=t;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsx)(r.AntTypography.Title,{level:2,children:"Request details"})}),(0,l.jsxs)(r.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,l.jsx)(H,{label:"Status",children:(0,l.jsx)(Y,{status:s})}),(0,l.jsx)(H,{label:"Time remaining",children:(0,l.jsx)(F,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,l.jsx)(H,{label:"Request type",children:(0,l.jsx)(I,{rules:a.rules})}),(0,l.jsx)(H,{label:"Source",children:n&&(0,l.jsx)(r.AntTypography.Text,{children:t.source||"-"})}),Object.entries(o).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:n="",label:i}]=e,s="".concat(n).concat(c?"":" (Unverified)");return(0,l.jsx)(H,{label:"Subject ".concat(i.toLocaleLowerCase()),children:(0,l.jsx)(r.esZ,{title:s,trigger:"click",children:(0,l.jsx)(r.AntTypography.Text,{ellipsis:!0,children:s})})},t)}),(0,l.jsx)(G,{subjectRequest:t})]}),(0,l.jsxs)(r.PPS,{layout:"vertical",children:[(0,l.jsx)(r.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,l.jsxs)(r.jqI,{gap:1,children:[(0,l.jsx)(r.uFc,{readOnly:!0,value:i,"data-testid":"request-detail-value-id"}),(0,l.jsx)(p.Z,{copyText:i,size:"small"})]})}),(0,l.jsx)(r.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,l.jsx)(r.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]})]})},K=e=>{var t;let{data:n}=e,i=(0,h.useMemo)(()=>({id:n.id,verbose:!0}),[n.id]),{data:s}=(0,u.QA)(i,{pollingInterval:n.status===x.q2.APPROVED||n.status===x.q2.IN_PROCESSING?2e3:0,skip:!n.id}),a=null!==(t=null==s?void 0:s.items[0])&&void 0!==t?t:n,o=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)(o?"manual-steps":"activity"),p=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,l.jsx)(E,{subjectRequest:a})},{key:"manual-steps",label:"Manual steps",children:(0,l.jsx)(W,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!o}],[o,a]);return(0,l.jsxs)("div",{className:"flex gap-8",children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.A5g,{items:p,activeKey:c,onChange:d})}),(0,l.jsx)("div",{className:"w-[432px]","data-testid":"privacy-request-details",children:(0,l.jsx)(J,{subjectRequest:a})})]})},$=n(57526),Q=n(66548),ee=n(45489),et=e=>{let{privacyRequest:t,action:n}=e,{handleApproveRequest:i,handleDenyRequest:s}=(0,ee.Z)({subjectRequest:t}),l=t.status===x.q2.PENDING,a=(0,r.qY0)(),o=async e=>{let{reason:t}=e,l=r.sYd.loading({content:"approve"===n?"Approving request...":"Denying request..."});"deny"===n&&await s(t),"approve"===n&&await i(),l()};return{showAction:l,closeModal:a.onClose,performAction:o,openConfirmationModal:a.onOpen,isModalOpen:a.isOpen}},en=n(812),ei=n(19904),es=e=>{var t,n,i;let{privacyRequest:s}=e,l=null===(n=(0,B.hz)())||void 0===n?void 0:null===(t=n.flags)||void 0===t?void 0:t.downloadAccessRequestResults,r=s.status===x.q2.COMPLETE,a=N(s.policy.rules).includes(x.Us.ACCESS),o=(0,ei.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:h}=(0,A.br)({privacy_request_id:s.id}),p=null!==(i=null==c?void 0:c.access_result_urls[0])&&void 0!==i?i:"",g=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,en.e$)(h,"Unable to resolve download URL"):g||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:l&&o&&a&&r,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!g}},el=e=>{let{privacyRequest:t}=e,{errorAlert:n,successAlert:i}=(0,T.V)(),s=t.status===x.q2.ERROR,[l]=(0,A.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=r.sYd.loading("Reprocessing privacy request...",0),s=await l(t);"error"in s?n((0,en.e$)(s.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):i("Privacy request is now being reprocessed."),e()},showReprocess:s}},er=e=>{let{privacyRequest:t}=e,{showDownloadResults:n,downloadResults:i,infoTooltip:s,isDisabled:a}=es({privacyRequest:t}),{isModalOpen:o,closeModal:c,performAction:d,openConfirmationModal:u,showAction:x}=et({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:m,showAction:f}=et({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:v,showReprocess:y}=el({privacyRequest:t}),b=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,l.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!x}),e.push({key:"deny",label:(0,l.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:m,disabled:!f}),e.push({key:"reprocess",label:(0,l.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:v,disabled:!y}),n&&e.push({key:"download",label:(0,l.jsx)(r.esZ,{title:a?s:null,placement:"bottom",children:(0,l.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:i,disabled:a}),e},[n,i,s,a,x,f,u,m,y,v]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.S0p,{menu:{items:b},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!b.length,size:"large",children:"Actions"})}),(0,l.jsx)($.Z,{isOpen:o,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,l.jsx)(Q.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},ea=()=>{let e=(0,a.useRouter)().query.id,{data:t,isLoading:n}=(0,u.QA)({id:e,verbose:!0},{skip:!e}),i=(null==t?void 0:t.items[0])||null;return(0,l.jsxs)(o.Z,{title:"Privacy Request - ".concat(e),children:[(0,l.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Request details"}],rightContent:!!i&&(0,l.jsx)(er,{privacyRequest:i})}),n&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),!n&&!i&&(0,l.jsx)(r.xvT,{children:"404 no privacy request found"}),!n&&i&&(0,l.jsx)(K,{data:i})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return l}});var i=n(76649);let s=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,i.Ln)({status:"number",data:{}},e),a=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>l(e,t),s=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class r{static narrow(e){return new r(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof r?e.NF:e instanceof Function?e:t=>i(e,t);return new r(e=>t(e)&&n(e))}}new r(e=>!0)}},function(e){e.O(0,[8433,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return n(93299)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(24246),s=n(77181),l=n(88038),r=n.n(l),a=n(86677);n(27378);var o=n(25980),c=n(90867),d=n(77830),u=()=>{let e=(0,a.useRouter)();return(0,i.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(s.xuv,{children:[(0,i.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(s.wpx,{onClick:()=>{e.push(d.fz)},children:"Configure"})]}),(0,i.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},h=e=>{let{children:t,title:n,padded:l=!0,mainProps:d}=e,h=(0,o.hz)(),x=(0,a.useRouter)(),p="/privacy-requests"===x.pathname||"/datastore-connection"===x.pathname,g=!(h.flags.privacyRequestsConfiguration&&p),{data:j}=(0,c.JE)(void 0,{skip:g}),{data:m}=(0,c.PW)(void 0,{skip:g}),f=h.flags.privacyRequestsConfiguration&&(!j||!m)&&p;return(0,i.jsxs)(s.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(s.kCb,{as:"main",direction:"column",py:l?6:0,px:l?10:0,h:l?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...d,children:[f?(0,i.jsx)(u,{}):null,t]})]})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return l.D4},MM:function(){return h},Ot:function(){return c},c6:function(){return s},cj:function(){return p},e$:function(){return a},fn:function(){return o},iC:function(){return x},nU:function(){return u},tB:function(){return d}});var i,s,l=n(19043);let r="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;if((0,l.Bw)(e)){if((0,l.hE)(e.data))return e.data.detail;if((0,l.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,l.Dy)(e.data)||404===e.status&&(0,l.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function d(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:r};if((0,l.oK)(e))return{status:e.originalStatus,message:e.data};if((0,l.Bw)(e)){let{status:n}=e;return{status:n,message:a(e,t.message)}}return t},h=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=s||(s={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let x={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},p=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},93299:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ea}});var i,s,l=n(24246),r=n(77181),a=n(86677),o=n(77213),c=n(77830),d=n(58754),u=n(99716),h=n(27378),x=n(28120);(i=s||(s={})).IN_PROCESSING="in_processing",i.PENDING="pending",i.COMPLETE="complete",i.ERROR="error",i.PAUSED="paused",i.RETRYING="retrying",i.SKIPPED="skipped";var p=n(88340);let g=e=>{switch(e){case s.SKIPPED:return"warning";case s.ERROR:default:return"error"}};var j=e=>{let{errorMessage:t,status:n=s.ERROR}=e;return(0,l.jsxs)(r.xuv,{height:"100%",id:"outer",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",paddingBottom:"8px",children:[(0,l.jsx)(r.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,l.jsx)(r.j8w,{color:g(n),children:n}),(0,l.jsx)(r.xuv,{padding:"0px",marginBottom:"3px",children:(0,l.jsx)(p.Z,{copyText:t})})]}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,l.jsx)(r.xvT,{children:t})})]})},m=n(16394),f=n(3124),v=n.n(f);let y=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}};var b=e=>{let{eventLogs:t,openErrorPanel:n}=e,i=null==t?void 0:t.map(e=>(0,l.jsxs)(r.Tr,{_hover:{backgroundColor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?v().FIDESUI_NEUTRAL_50:"unset"},onClick:()=>{(e.status===s.ERROR||e.status===s.SKIPPED&&e.message)&&n(e.message,e.status)},style:{cursor:e.status===s.ERROR||e.status===s.SKIPPED&&e.message?"pointer":"unset"},children:[(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,m.p6)(e.updated_at)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:y(e.action_type)})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),(0,l.jsx)(r.Td,{children:(0,l.jsx)(r.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.collection_name})})]},e.updated_at));return(0,l.jsx)(r.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,l.jsx)(r.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,l.jsxs)(r.iA_,{size:"sm",id:"table",position:"relative",children:[(0,l.jsx)(r.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),(0,l.jsx)(r.Th,{children:(0,l.jsx)(r.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,l.jsx)(r.p3B,{id:"tableBody",children:i})]})})})},R=e=>{let{isOpen:t,onClose:n,currentLogs:i,isViewingError:a,errorMessage:o,currentStatus:c=s.ERROR,onCloseErrorPanel:d,onOpenErrorPanel:u}=e;return(0,l.jsxs)(r.dys,{isOpen:t,placement:"right",onClose:n,size:"full",autoFocus:!1,children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{style:{width:"50%"},children:[(0,l.jsx)(r.OXI,{style:{paddingBottom:"0px"},children:(0,l.jsxs)(r.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,l.jsxs)(r.kCb,{alignItems:"center",children:[a&&(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:d}),(0,l.jsx)(r.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:a?"Event detail":"Event log"})]}),(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:n})]})}),(0,l.jsxs)(r.Ng0,{id:"drawerBody",overflow:"hidden",children:[i&&!a?(0,l.jsx)(b,{eventLogs:i,openErrorPanel:u}):null,a?(0,l.jsx)(j,{errorMessage:o,status:c}):null]})]})]})};let w=(e,t)=>{if(0===e.length)return!1;let n=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!n[0].collection_name)return n[0].status===t;let i={};return n.forEach(e=>{e.collection_name&&!i[e.collection_name]&&(i[e.collection_name]=e)}),Object.values(i).some(e=>e.status===t)},C=e=>w(e,s.ERROR),_=e=>w(e,s.SKIPPED),S=e=>C(e)?(0,l.jsx)(r.f9v,{}):_(e)?(0,l.jsx)(r.XXw,{}):(0,l.jsx)(r.StI,{});var k=e=>{let{entryKey:t,logs:n,isLast:i,onViewLog:s}=e;return(0,l.jsxs)(r.xuv,{children:[(0,l.jsxs)(r.kCb,{alignItems:"center",height:23,position:"relative",children:[(0,l.jsx)(r.xuv,{zIndex:1,children:S(n)}),!i&&(0,l.jsx)(r.xuv,{width:"2px",height:"63px",backgroundColor:"gray.700",position:"absolute",top:"16px",left:"6px",zIndex:0}),(0,l.jsx)(r.xvT,{color:"gray.600",fontWeight:"500",fontSize:"sm",ml:2,children:t})]}),(0,l.jsx)(r.xvT,{cursor:"pointer",color:"link.900",fontWeight:"500",fontSize:"sm",ml:6,mb:7,onClick:()=>s(),children:"View log"})]})},E=e=>{let{subjectRequest:t}=e,{isOpen:n,onOpen:i,onClose:a}=(0,r.qY0)(),[o,c]=(0,h.useState)([]),[d,u]=(0,h.useState)(""),[x,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[m,f]=(0,h.useState)(s.ERROR),{results:v}=t,y=v?Object.keys(v):[];(0,h.useEffect)(()=>{d&&v&&v[d]&&c(v[d])},[v,d]);let b=()=>{p(!1)},w=(e,t)=>{u(e),c(t),i()};return(0,l.jsxs)(r.xuv,{width:"100%",children:[v&&y.map((e,t)=>(0,l.jsx)(k,{entryKey:e,logs:v[e],isLast:t===y.length-1,onViewLog:()=>w(e,v[e])},e)),(0,l.jsx)(R,{isOpen:n,onClose:()=>{x&&b(),u(""),a()},currentLogs:o,isViewingError:x,errorMessage:g,currentStatus:m,onOpenErrorPanel:(e,t)=>{j(e),t&&f(t),p(!0)},onCloseErrorPanel:b})]})},T=n(14047),q=n(14207),A=n(90867),P=n(16134);let N=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var I=e=>{let{rules:t}=e,n=N(t).map(e=>(0,m.kC)(e)).map(e=>e);return(0,l.jsx)(r.AntTypography.Text,{children:n.join(" - ")})},O=n(34090),z=n(55484),D=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map((e,t)=>{let[n]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:n,name:n,children:e=>{let{field:i}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:n,w:"50%",children:n}),(0,l.jsx)(r.IIB,{...i,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(n),ref:0===t?d:void 0,size:"sm"})]})}})},n)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})},U=e=>{let{connectorName:t,data:n,isSubmitting:i=!1,onSaveClick:s}=e,{isOpen:a,onOpen:o,onClose:c}=(0,r.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{s({connection_key:n.connection_key,privacy_request_id:n.privacy_request_id,body:{...e}}),c()};return(0,l.jsxs)(l.Fragment,{children:[(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",children:"Review"}),!(null==n?void 0:n.checked)&&(0,l.jsx)(r.wpx,{onClick:o,size:"small",type:"primary",children:"Begin manual input"}),(0,l.jsx)(O.J9,{enableReinitialize:!0,initialValues:{...n.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:z.Ry().shape({}),children:e=>(0,l.jsxs)(r.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,l.jsx)(r.P1B,{}),(0,l.jsxs)(r.scA,{children:[(0,l.jsx)(r.cCv,{}),(0,l.jsxs)(r.OXI,{color:"gray.900",children:[(0,l.jsx)(r.xvT,{fontSize:"xl",mb:8,children:t}),(0,l.jsx)(r.izJ,{}),(0,l.jsx)(r.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,l.jsx)(r.xuv,{mt:"8px",children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,l.jsx)(r.Ng0,{children:(0,l.jsx)(O.l0,{id:"manual-detail-form",noValidate:!0,children:(0,l.jsx)(r.gCW,{align:"stretch",gap:"16px",children:Object.entries(n.fields).map(e=>{let[t]=e;return(0,l.jsx)(r.Ugi,{children:(0,l.jsx)(O.gN,{id:t,name:t,children:e=>{let{field:n}=e;return(0,l.jsxs)(r.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,l.jsx)(r.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,l.jsx)(r.XZJ,{...n,isChecked:!!n.value,onChange:n.onChange,name:t,id:t})]})}})},t)})})})}),(0,l.jsx)(r.zeN,{justifyContent:"flex-start",children:(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(r.wpx,{onClick:c,children:"Cancel"}),(0,l.jsx)(r.wpx,{form:"manual-detail-form",loading:i,htmlType:"submit",children:"Save"})]})})]})]})})]})};let M=(e,t,n)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:D,uploadMutation:t,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:U,uploadMutation:n,getUploadedWebhookDataEndpoint:A.$I.endpoints.getUploadedManualErasureWebhookData}:null;var W=e=>{let{subjectRequest:t,onComplete:n}=e,i=(0,P.T)(),{errorAlert:s,successAlert:a}=(0,T.V)(),{handleError:o}=(0,T.H)(),[c,d]=(0,h.useState)([]),[u,p]=(0,h.useState)(!1),[g,j]=(0,h.useState)(!1),{data:m,isFetching:f,isLoading:v,isSuccess:y}=(0,q.W6)(),[b]=(0,A.w3)(),R=N(t.policy.rules),[w]=(0,A.nL)(),[C]=(0,A.UR)(),{ProcessingDetailComponent:_,uploadMutation:S,getUploadedWebhookDataEndpoint:k}=M(R,w,C),E=async()=>{try{p(!0),await b(t.id).unwrap(),a("Manual request has been received. Request now processing."),n()}catch(e){o(e)}finally{p(!1)}},I=async e=>{try{j(!0),await S(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[n,i]=e;t.fields[n]=i||""});let n=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(n),a("Manual input successfully saved!")}catch(e){o(e)}finally{j(!1)}};return((0,h.useEffect)(()=>(y&&m.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],n=null==m?void 0:m.map(e=>e.connection_config.key);null==n||n.every(n=>e.push(i(k.initiate({connection_key:n,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,n)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let n={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,i]=e;n.fields[t]=i||""}),t.push(n)}else s("An error occurred while loading manual input data for ".concat(m[n].connection_config.name))}),d(t)})})(),()=>{}),[m,c.length,i,s,y,t.id,k]),R.includes(x.Us.ACCESS)||R.includes(x.Us.ERASURE))?(0,l.jsxs)(r.gCW,{align:"stretch",spacing:8,children:[(0,l.jsx)(r.xuv,{children:(0,l.jsx)(r.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,l.jsxs)(r.xuv,{children:[(f||v)&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),y&&m?(0,l.jsx)(r.xJi,{children:(0,l.jsxs)(r.iA_,{size:"sm",variant:"unstyled",children:[(0,l.jsx)(r.hrZ,{children:(0,l.jsxs)(r.Tr,{children:[(0,l.jsx)(r.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,l.jsx)(r.Th,{})]})}),(0,l.jsxs)(r.p3B,{children:[m.length>0&&m.map(e=>(0,l.jsxs)(r.Tr,{display:"block",children:[(0,l.jsx)(r.Td,{pl:"0",children:e.connection_config.key}),(0,l.jsx)(r.Td,{children:c.length>0?(0,l.jsx)(_,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:g,onSaveClick:I}):null})]},e.id)),0===m.length&&(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Td,{colSpan:3,pl:"0",children:(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,l.jsx)(r.$RU,{children:(0,l.jsx)(r.Tr,{children:(0,l.jsx)(r.Th,{pl:"0px",children:(0,l.jsx)(r.wpx,{type:"primary",loading:u,onClick:E,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},L=n(8557),F=e=>{let{daysLeft:t,includeText:n,status:i}=e;if(!t||i===L.q.COMPLETE||i===L.q.CANCELED||i===L.q.DENIED||i===L.q.IDENTITY_UNVERIFIED)return(0,l.jsx)("span",{children:"-"});let s="";switch(!0){case t>=10:s="success";break;case t<10&&t>4:s="warning";break;case t<5:s="error"}return(0,l.jsx)(r.j8w,{color:s,children:n?"".concat(t," days left"):t})},B=n(25980);let V={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"alert",label:"Requires Input"}};var Y=e=>{let{status:t}=e;return(0,l.jsx)(r.j8w,{color:V[t].color,className:"justify-center","data-testid":"request-status-badge",children:V[t].label})},X=n(15709),Z=n.n(X),H=e=>{let{label:t,children:n}=e;return(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(Z().label),children:(0,l.jsxs)(r.AntTypography.Text,{children:[t,":"]})}),(0,l.jsx)("div",{className:"min-w-0 shrink grow ".concat(Z().value),"data-testid":"request-detail-value-".concat(t),children:n})]})},G=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:n}=t;return(0,l.jsx)("div",{className:"flex flex-col gap-2",children:n&&Object.keys(n).length>0&&Object.entries(n).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,n]=e;return(0,l.jsx)(H,{label:n.label,children:(0,l.jsx)(r.AntTypography.Text,{children:Array.isArray(n.value)?n.value.join(", "):n.value})},t)})})},J=e=>{let{subjectRequest:t}=e,{plus:n}=(0,B.hz)(),{id:i,status:s,policy:a,identity:o,identity_verified_at:c}=t;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"mb-6",children:(0,l.jsx)(r.AntTypography.Title,{level:2,children:"Request details"})}),(0,l.jsxs)(r.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,l.jsx)(H,{label:"Status",children:(0,l.jsx)(Y,{status:s})}),(0,l.jsx)(H,{label:"Time remaining",children:(0,l.jsx)(F,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,l.jsx)(H,{label:"Request type",children:(0,l.jsx)(I,{rules:a.rules})}),(0,l.jsx)(H,{label:"Source",children:n&&(0,l.jsx)(r.AntTypography.Text,{children:t.source||"-"})}),Object.entries(o).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:n="",label:i}]=e,s="".concat(n).concat(c?"":" (Unverified)");return(0,l.jsx)(H,{label:"Subject ".concat(i.toLocaleLowerCase()),children:(0,l.jsx)(r.esZ,{title:s,trigger:"click",children:(0,l.jsx)(r.AntTypography.Text,{ellipsis:!0,children:s})})},t)}),(0,l.jsx)(G,{subjectRequest:t})]}),(0,l.jsxs)(r.PPS,{layout:"vertical",children:[(0,l.jsx)(r.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,l.jsxs)(r.jqI,{gap:1,children:[(0,l.jsx)(r.uFc,{readOnly:!0,value:i,"data-testid":"request-detail-value-id"}),(0,l.jsx)(p.Z,{copyText:i,size:"small"})]})}),(0,l.jsx)(r.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,l.jsx)(r.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]})]})},K=e=>{var t;let{data:n}=e,i=(0,h.useMemo)(()=>({id:n.id,verbose:!0}),[n.id]),{data:s}=(0,u.QA)(i,{pollingInterval:n.status===x.q2.APPROVED||n.status===x.q2.IN_PROCESSING?2e3:0,skip:!n.id}),a=null!==(t=null==s?void 0:s.items[0])&&void 0!==t?t:n,o=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)(o?"manual-steps":"activity"),p=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,l.jsx)(E,{subjectRequest:a})},{key:"manual-steps",label:"Manual steps",children:(0,l.jsx)(W,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!o}],[o,a]);return(0,l.jsxs)("div",{className:"flex gap-8",children:[(0,l.jsx)("div",{className:"flex-1",children:(0,l.jsx)(r.A5g,{items:p,activeKey:c,onChange:d})}),(0,l.jsx)("div",{className:"w-[432px]","data-testid":"privacy-request-details",children:(0,l.jsx)(J,{subjectRequest:a})})]})},$=n(57526),Q=n(66548),ee=n(45489),et=e=>{let{privacyRequest:t,action:n}=e,{handleApproveRequest:i,handleDenyRequest:s}=(0,ee.Z)({subjectRequest:t}),l=t.status===x.q2.PENDING,a=(0,r.qY0)(),o=async e=>{let{reason:t}=e,l=r.sYd.loading({content:"approve"===n?"Approving request...":"Denying request..."});"deny"===n&&await s(t),"approve"===n&&await i(),l()};return{showAction:l,closeModal:a.onClose,performAction:o,openConfirmationModal:a.onOpen,isModalOpen:a.isOpen}},en=n(812),ei=n(19904),es=e=>{var t,n,i;let{privacyRequest:s}=e,l=null===(n=(0,B.hz)())||void 0===n?void 0:null===(t=n.flags)||void 0===t?void 0:t.downloadAccessRequestResults,r=s.status===x.q2.COMPLETE,a=N(s.policy.rules).includes(x.Us.ACCESS),o=(0,ei.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:h}=(0,A.br)({privacy_request_id:s.id}),p=null!==(i=null==c?void 0:c.access_result_urls[0])&&void 0!==i?i:"",g=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,en.e$)(h,"Unable to resolve download URL"):g||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:l&&o&&a&&r,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!g}},el=e=>{let{privacyRequest:t}=e,{errorAlert:n,successAlert:i}=(0,T.V)(),s=t.status===x.q2.ERROR,[l]=(0,A.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=r.sYd.loading("Reprocessing privacy request...",0),s=await l(t);"error"in s?n((0,en.e$)(s.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):i("Privacy request is now being reprocessed."),e()},showReprocess:s}},er=e=>{let{privacyRequest:t}=e,{showDownloadResults:n,downloadResults:i,infoTooltip:s,isDisabled:a}=es({privacyRequest:t}),{isModalOpen:o,closeModal:c,performAction:d,openConfirmationModal:u,showAction:x}=et({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:m,showAction:f}=et({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:v,showReprocess:y}=el({privacyRequest:t}),b=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,l.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!x}),e.push({key:"deny",label:(0,l.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:m,disabled:!f}),e.push({key:"reprocess",label:(0,l.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:v,disabled:!y}),n&&e.push({key:"download",label:(0,l.jsx)(r.esZ,{title:a?s:null,placement:"bottom",children:(0,l.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:i,disabled:a}),e},[n,i,s,a,x,f,u,m,y,v]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.S0p,{menu:{items:b},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,l.jsx)(r.wpx,{icon:(0,l.jsx)(r.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!b.length,size:"large",children:"Actions"})}),(0,l.jsx)($.Z,{isOpen:o,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,l.jsx)(Q.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},ea=()=>{let e=(0,a.useRouter)().query.id,{data:t,isLoading:n}=(0,u.QA)({id:e,verbose:!0},{skip:!e}),i=(null==t?void 0:t.items[0])||null;return(0,l.jsxs)(o.Z,{title:"Privacy Request - ".concat(e),children:[(0,l.jsx)(d.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Request details"}],rightContent:!!i&&(0,l.jsx)(er,{privacyRequest:i})}),n&&(0,l.jsx)(r.M5Y,{children:(0,l.jsx)(r.$jN,{})}),!n&&!i&&(0,l.jsx)(r.xvT,{children:"404 no privacy request found"}),!n&&i&&(0,l.jsx)(K,{data:i})]})}},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return r},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return d},hE:function(){return a},oK:function(){return l}});var i=n(76649);let s=e=>"error"in e,l=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,r=e=>(0,i.Ln)({status:"number",data:{}},e),a=e=>(0,i.Ln)({detail:"string"},e),o=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),d=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>l(e,t),s=Symbol("SOME"),l=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>l(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>l(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>l(n,t[e]));class r{static narrow(e){return new r(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof r?e.NF:e instanceof Function?e:t=>i(e,t);return new r(e=>t(e)&&n(e))}}new r(e=>!0)}},function(e){e.O(0,[8433,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(61463)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(77181),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),c=i(90867),u=i(77830),d=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),g="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&g),{data:f}=(0,c.JE)(void 0,{skip:h}),{data:x}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!f||!x)&&g;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(77181),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:c,...u}=e;return(0,n.jsxs)("div",{...u,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.X6q,{className:i||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return s},cj:function(){return g},e$:function(){return a},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return u}});var n,s,r=i(19043);let l="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:a(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(77181);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var n=i(24246),s=i(77181),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=s.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),c)?a.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},7426:function(e,t,i){"use strict";i.d(t,{D2:function(){return m},L:function(){return a},U7:function(){return c},Yh:function(){return g},ak:function(){return o},km:function(){return l},tB:function(){return r}});var n=i(3228);let s=i(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:r,usePutConfigurationSettingsMutation:l,usePatchConfigurationSettingsMutation:a}=s,o=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{var n,s,r;let{data:l}=t,{data:a}=i;return{configSet:{cors_origins:(null==a?void 0:null===(n=a.security)||void 0===n?void 0:n.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origin_regex},apiSet:{cors_origins:(null==l?void 0:null===(r=l.security)||void 0===r?void 0:r.cors_origins)||[]}}}),c=()=>(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:i}=t;return i}),u={enabled:!1,cmp_api_required:!1},d=(e,t,i,n)=>{let s=i&&i[e],r=n&&n[e];return s&&r?{...n[e],...i[e]}:r?n[e]:s?{...i[e]}:t},m=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("gpp",u,n,s)}),p={tcf_publisher_country_code:null},g=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("plus_consent_settings",p,n,s)})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return l},qX:function(){return a},rE:function(){return r}});var n=i(21702);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},61463:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(77181),r=i(27378),l=i(812),a=i(14047),o=i(77213),c=i(77830),u=i(58754),d=i(7426),m=i(71784),p=i(90867),g=i(34090),h=i(40324),f=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,a.V)(),{handleError:r}=(0,a.H)(),[o]=(0,p.SU)(),c=t.service_type===m.qX.twilio_email||t.service_type===m.qX.mailgun,u=t.service_type===m.qX.twilio_text,d=async e=>{if(c){let t=await o({email:e.email});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}if(u){let t=await o({phone_number:e.phone});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{email:"",phone:""},onSubmit:d,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(g.l0,{children:[c?(0,n.jsx)(h.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,u?(0,n.jsx)(h.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},x=()=>{var e;let{successAlert:t}=(0,a.V)(),[i,o]=(0,r.useState)(""),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.mailgun}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let i=await d({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,l.D4)(i)?c(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let i=await x({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,l.D4)(i)?c(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},j={domain:null!==(e=null==u?void 0:u.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(f,{messagingDetails:u||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.twilio_email}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let t=await d({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,l.D4)(t)?c(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},v=async e=>{let t=await x({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,l.D4)(t)?c(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},j={email:null!==(e=null==u?void 0:u.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(f,{messagingDetails:u||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,o]=(0,r.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[u]=(0,p.iI)(),d=async i=>{let n=await u({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:m.qX.twilio_text});(0,l.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:d,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(h.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(h.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(h.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(h.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(f,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},j=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,g]=(0,r.useState)(""),[h]=(0,p.h9)(),[f]=(0,d.L)(),{data:j}=(0,p.JE)();(0,r.useEffect)(()=>{j&&g(null==j?void 0:j.service_type)},[j]);let _=async i=>{let{value:n}=i.target,s=await f({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,l.D4)(s))t(s.error);else if(n!==m.qX.twilio_text)g(n);else{let i=await h({service_type:m.qX.twilio_text});(0,l.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),g(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:_,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,n.jsx)(s.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,n.jsx)(s.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),i===m.qX.mailgun?(0,n.jsx)(x,{}):null,i===m.qX.twilio_email?(0,n.jsx)(y,{}):null,i===m.qX.twilio_text?(0,n.jsx)(v,{}):null]})]})},_=()=>(0,n.jsx)(j,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return u},hE:function(){return a},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),a=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8593],{13687:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/messaging",function(){return i(61463)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var n=i(24246),s=i(77181),r=i(88038),l=i.n(r),a=i(86677);i(27378);var o=i(25980),c=i(90867),u=i(77830),d=()=>{let e=(0,a.useRouter)();return(0,n.jsx)(s.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,n.jsxs)(s.xuv,{children:[(0,n.jsxs)(s.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,n.jsx)(s.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,n.jsx)(s.wpx,{onClick:()=>{e.push(u.fz)},children:"Configure"})]}),(0,n.jsxs)(s.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:r=!0,mainProps:u}=e,m=(0,o.hz)(),p=(0,a.useRouter)(),g="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,h=!(m.flags.privacyRequestsConfiguration&&g),{data:f}=(0,c.JE)(void 0,{skip:h}),{data:x}=(0,c.PW)(void 0,{skip:h}),y=m.flags.privacyRequestsConfiguration&&(!f||!x)&&g;return(0,n.jsxs)(s.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,n.jsxs)(l(),{children:[(0,n.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,n.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,n.jsxs)(s.kCb,{as:"main",direction:"column",py:r?6:0,px:r?10:0,h:r?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,n.jsx)(d,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var n=i(24246),s=i(77181),r=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:l=!0,children:a,rightContent:o,style:c,...u}=e;return(0,n.jsxs)("div",{...u,style:l?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,n.jsxs)(s.jqI,{justify:"space-between",children:["string"==typeof t?(0,n.jsx)(s.X6q,{className:i||a?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,o&&(0,n.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,n.jsx)(r.m,{className:a?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),a]})}},812:function(e,t,i){"use strict";i.d(t,{D4:function(){return r.D4},MM:function(){return m},Ot:function(){return c},c6:function(){return s},cj:function(){return g},e$:function(){return a},fn:function(){return o},iC:function(){return p},nU:function(){return d},tB:function(){return u}});var n,s,r=i(19043);let l="An unexpected error occurred. Please try again.",a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;if((0,r.Bw)(e)){if((0,r.hE)(e.data))return e.data.detail;if((0,r.cz)(e.data)){var i;let t=null===(i=e.data.detail)||void 0===i?void 0:i[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,r.Dy)(e.data)||404===e.status&&(0,r.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function o(e){return"object"==typeof e&&null!=e&&"status"in e}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:l};if((0,r.oK)(e))return{status:e.originalStatus,message:e.data};if((0,r.Bw)(e)){let{status:i}=e;return{status:i,message:a(e,t.message)}}return t},m=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(n=s||(s={})).GVL="gvl",n.AC="gacp",n.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},g=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,i){"use strict";i.d(t,{H:function(){return r},V:function(){return n.V}});var n=i(84306),s=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,s.Ot)(t)?i=t.data.detail:(0,s.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return r}});var n=i(24246),s=i(77181);let r=()=>{let e=(0,s.pmc)();return{errorAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)},successAlert:(t,i,r)=>{let l={...r,position:(null==r?void 0:r.position)||"top",render:e=>{let{onClose:r}=e;return(0,n.jsxs)(s.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,n.jsx)(s.zMQ,{}),(0,n.jsxs)(s.xuv,{children:[i&&(0,n.jsx)(s.CdC,{children:i}),(0,n.jsx)(s.XaZ,{children:t})]}),(0,n.jsx)(s.PZ7,{onClick:r,position:"relative",right:0,size:"sm",top:-1})]})}};(null==r?void 0:r.id)&&e.isActive(r.id)?e.update(r.id,l):e(l)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return c}});var n=i(24246),s=i(77181),r=i(79894),l=i.n(r),a=i(27378);let{Text:o}=s.AntTypography,c=e=>{let{items:t,...i}=e,r=(0,a.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let r=i===t.length-1,a={...e},c=a.onClick&&!a.href;return("string"==typeof a.title&&(a.title=(0,n.jsx)(o,{style:{color:"inherit",maxWidth:r?void 0:400},ellipsis:!r,children:a.title})),c)?a.title=(0,n.jsx)(s.wpx,{type:"text",size:"small",icon:a.icon,onClick:a.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:a.title}):(a.icon&&(a.title=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"anticon align-text-bottom",children:a.icon}),a.title]})),a.href&&a.title&&(a.title=(0,n.jsx)(l(),{href:a.href,className:"ant-breadcrumb-link",children:a.title}),delete a.href)),a}),[t]);return(0,n.jsx)(s.zrq,{items:r,...i})}},7426:function(e,t,i){"use strict";i.d(t,{D2:function(){return m},L:function(){return a},U7:function(){return c},Yh:function(){return g},ak:function(){return o},km:function(){return l},tB:function(){return r}});var n=i(3228);let s=i(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:r,usePutConfigurationSettingsMutation:l,usePatchConfigurationSettingsMutation:a}=s,o=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{var n,s,r;let{data:l}=t,{data:a}=i;return{configSet:{cors_origins:(null==a?void 0:null===(n=a.security)||void 0===n?void 0:n.cors_origins)||[],cors_origin_regex:null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origin_regex},apiSet:{cors_origins:(null==l?void 0:null===(r=l.security)||void 0===r?void 0:r.cors_origins)||[]}}}),c=()=>(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:i}=t;return i}),u={enabled:!1,cmp_api_required:!1},d=(e,t,i,n)=>{let s=i&&i[e],r=n&&n[e];return s&&r?{...n[e],...i[e]}:r?n[e]:s?{...i[e]}:t},m=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("gpp",u,n,s)}),p={tcf_publisher_country_code:null},g=(0,n.P1)([e=>e,s.endpoints.getConfigurationSettings.select({api_set:!0}),s.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,i)=>{let{data:n}=t,{data:s}=i;return d("plus_consent_settings",p,n,s)})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return o},I3:function(){return s},kN:function(){return l},qX:function(){return a},rE:function(){return r}});var n=i(28120);let s=[...new Map([[n.q2.APPROVED,"Approved"],[n.q2.CANCELED,"Canceled"],[n.q2.COMPLETE,"Completed"],[n.q2.DENIED,"Denied"],[n.q2.ERROR,"Error"],[n.q2.IN_PROCESSING,"In Progress"],[n.q2.PENDING,"New"],[n.q2.PAUSED,"Paused"],[n.q2.IDENTITY_UNVERIFIED,"Unverified"],[n.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),r=new Map([[n.Us.ACCESS,"Access"],[n.Us.ERASURE,"Erasure"],[n.Us.CONSENT,"Consent"],[n.Us.UPDATE,"Update"]]),l=[...r].map(e=>{let[t,i]=e;return{label:i,value:t}}),a={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},o={local:"local",s3:"s3"}},61463:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return _}});var n=i(24246),s=i(77181),r=i(27378),l=i(812),a=i(14047),o=i(77213),c=i(77830),u=i(58754),d=i(7426),m=i(71784),p=i(90867),g=i(34090),h=i(40324),f=e=>{let{messagingDetails:t}=e,{successAlert:i}=(0,a.V)(),{handleError:r}=(0,a.H)(),[o]=(0,p.SU)(),c=t.service_type===m.qX.twilio_email||t.service_type===m.qX.mailgun,u=t.service_type===m.qX.twilio_text,d=async e=>{if(c){let t=await o({email:e.email});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}if(u){let t=await o({phone_number:e.phone});(0,l.D4)(t)?r(t.error):i("Test message successfully sent.")}};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,mb:5,children:"Test connection"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{email:"",phone:""},onSubmit:d,children:e=>{let{isSubmitting:t,resetForm:i}=e;return(0,n.jsxs)(g.l0,{children:[c?(0,n.jsx)(h.j0,{name:"email",label:"Email",placeholder:"youremail@domain.com",isRequired:!0}):null,u?(0,n.jsx)(h.j0,{name:"phone",label:"Phone",placeholder:"+10000000000",isRequired:!0}):null,(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]})},x=()=>{var e;let{successAlert:t}=(0,a.V)(),[i,o]=(0,r.useState)(""),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.mailgun}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let i=await d({service_type:m.qX.mailgun,details:{is_eu_domain:"false",domain:e.domain}});(0,l.D4)(i)?c(i.error):(t("Mailgun email successfully updated. You can now enter your security key."),o("apiKey"))},v=async e=>{let i=await x({details:{mailgun_api_key:e.api_key},service_type:m.qX.mailgun});(0,l.D4)(i)?c(i.error):(t("Mailgun security key successfully updated."),o("testConnection"))},j={domain:null!==(e=null==u?void 0:u.details.domain)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Mailgun messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"domain",label:"Domain",placeholder:"Enter domain","data-testid":"option-twilio-domain",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{htmlType:"submit",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"apiKey"===i||"testConnection"===i?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:i,className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===i?(0,n.jsx)(f,{messagingDetails:u||{service_type:m.qX.mailgun}}):null]})},y=()=>{var e;let[t,i]=(0,r.useState)(""),{successAlert:o}=(0,a.V)(),{handleError:c}=(0,a.H)(),{data:u}=(0,p.S3)({type:m.qX.twilio_email}),[d]=(0,p.h9)(),[x]=(0,p.iI)(),y=async e=>{let t=await d({service_type:m.qX.twilio_email,details:{twilio_email_from:e.email}});(0,l.D4)(t)?c(t.error):(o("Twilio email successfully updated. You can now enter your security key."),i("configureTwilioEmailSecrets"))},v=async e=>{let t=await x({details:{twilio_api_key:e.api_key},service_type:m.qX.twilio_email});(0,l.D4)(t)?c(t.error):(o("Twilio email secrets successfully updated."),i("testConnection"))},j={email:null!==(e=null==u?void 0:u.details.twilio_email_from)&&void 0!==e?e:""};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio Email messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:j,onSubmit:y,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"email",label:"Email",placeholder:"Enter email",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"configureTwilioEmailSecrets"===t||"testConnection"===t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.izJ,{mt:10}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Security key"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{api_key:""},onSubmit:v,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsx)(s.Kqy,{mt:5,spacing:5,children:(0,n.jsx)(h.j0,{name:"api_key",label:"API key",type:"password",isRequired:!0})}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null,"testConnection"===t?(0,n.jsx)(f,{messagingDetails:u||{service_type:m.qX.twilio_email}}):null]})},v=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,o]=(0,r.useState)(""),{data:c}=(0,p.S3)({type:"twilio_text"}),[u]=(0,p.iI)(),d=async i=>{let n=await u({details:{twilio_account_sid:i.account_sid,twilio_auth_token:i.auth_token,twilio_messaging_service_sid:i.messaging_service_sid,twilio_sender_phone_number:i.phone},service_type:m.qX.twilio_text});(0,l.D4)(n)?t(n.error):(e("Twilio text secrets successfully updated."),o("testConnection"))};return(0,n.jsxs)(s.xuv,{children:[(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Twilio SMS messaging configuration"}),(0,n.jsx)(s.Kqy,{children:(0,n.jsx)(g.J9,{initialValues:{account_sid:"",auth_token:"",messaging_service_sid:"",phone:""},onSubmit:d,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,n.jsxs)(g.l0,{children:[(0,n.jsxs)(s.Kqy,{mt:5,spacing:5,children:[(0,n.jsx)(h.j0,{name:"account_sid",label:"Account SID",placeholder:"Enter account SID",isRequired:!0}),(0,n.jsx)(h.j0,{name:"auth_token",label:"Auth token",placeholder:"Enter auth token",type:"password",isRequired:!0}),(0,n.jsx)(h.j0,{name:"messaging_service_sid",label:"Messaging Service SID",placeholder:"Enter messaging service SID"}),(0,n.jsx)(h.j0,{name:"phone",label:"Phone Number",placeholder:"Enter phone number"})]}),(0,n.jsxs)(s.xuv,{mt:10,children:[(0,n.jsx)(s.wpx,{onClick:()=>i(),className:"mr-2",children:"Cancel"}),(0,n.jsx)(s.wpx,{disabled:t,htmlType:"submit",type:"primary","data-testid":"save-btn",children:"Save"})]})]})}})}),"testConnection"===i?(0,n.jsx)(f,{messagingDetails:c||{service_type:m.qX.twilio_text}}):null]})},j=()=>{let{successAlert:e}=(0,a.V)(),{handleError:t}=(0,a.H)(),[i,g]=(0,r.useState)(""),[h]=(0,p.h9)(),[f]=(0,d.L)(),{data:j}=(0,p.JE)();(0,r.useEffect)(()=>{j&&g(null==j?void 0:j.service_type)},[j]);let _=async i=>{let{value:n}=i.target,s=await f({notifications:{notification_service_type:n,send_request_completion_notification:!0,send_request_receipt_notification:!0,send_request_review_notification:!0},execution:{subject_identity_verification_required:!0}});if((0,l.D4)(s))t(s.error);else if(n!==m.qX.twilio_text)g(n);else{let i=await h({service_type:m.qX.twilio_text});(0,l.D4)(i)?t(i.error):(e("Messaging provider saved successfully."),g(n))}};return(0,n.jsxs)(o.Z,{title:"Configure Privacy Requests - Messaging",children:[(0,n.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:c.Jw},{title:"Configure requests",href:c.fz},{title:"Messaging"}]}),(0,n.jsx)(s.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure your messaging provider"}),(0,n.jsxs)(s.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,n.jsxs)(s.xuv,{children:["Fides requires a messsaging provider for sending processing notices to privacy request subjects, and allows for Subject Identity Verification in privacy requests. Please follow the"," ",(0,n.jsx)(s.xvT,{as:"span",color:"complimentary.500",children:"documentation"})," ","to setup a messaging service that Fides supports. Ensure you have completed the setup for the preferred messaging provider and have the details handy prior to the following steps."]}),(0,n.jsx)(s.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose service type to configure"}),(0,n.jsx)(s.y02.Group,{onChange:_,value:i,"data-testid":"privacy-requests-messaging-provider-selection",className:"p-3",children:(0,n.jsxs)(s.jqI,{children:[(0,n.jsx)(s.y02,{value:m.qX.mailgun,"data-testid":"option-mailgun",children:"Mailgun Email"},m.qX.mailgun),(0,n.jsx)(s.y02,{value:m.qX.twilio_email,"data-testid":"option-twilio-email",children:"Twilio Email"},m.qX.twilio_email),(0,n.jsx)(s.y02,{value:m.qX.twilio_text,"data-testid":"option-twilio-sms",children:"Twilio SMS"},m.qX.twilio_text)]})}),i===m.qX.mailgun?(0,n.jsx)(x,{}):null,i===m.qX.twilio_email?(0,n.jsx)(y,{}):null,i===m.qX.twilio_text?(0,n.jsx)(v,{}):null]})]})},_=()=>(0,n.jsx)(j,{})},19043:function(e,t,i){"use strict";i.d(t,{Bw:function(){return l},D4:function(){return s},Dy:function(){return o},XD:function(){return c},cz:function(){return u},hE:function(){return a},oK:function(){return r}});var n=i(76649);let s=e=>"error"in e,r=e=>(0,n.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,l=e=>(0,n.Ln)({status:"number",data:{}},e),a=e=>(0,n.Ln)({detail:"string"},e),o=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,n.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,n.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,i){"use strict";i.d(t,{Ln:function(){return n}});let n=(e,t)=>r(e,t),s=Symbol("SOME"),r=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?s in e?e.some(e=>r(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>r(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,i])=>r(i,t[e]));class l{static narrow(e){return new l(t=>n(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,i=e instanceof l?e.NF:e instanceof Function?e:t=>n(e,t);return new l(e=>t(e)&&i(e))}}new l(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=13687)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return n(49755)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(24246),r=n(77181),s=n(88038),a=n.n(s),o=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},g=e=>{let{children:t,title:n,padded:s=!0,mainProps:c}=e,g=(0,l.hz)(),p=(0,o.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,u.JE)(void 0,{skip:m}),{data:v}=(0,u.PW)(void 0,{skip:m}),x=g.flags.privacyRequestsConfiguration&&(!h||!v)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[x?(0,i.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:u,...c}=e;return(0,i.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var i=n(24246),r=n(77181),s=n(34090),a=n(27378),o=n(91613),l=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:g="inline",...p}=e,[f,m,{setValue:h}]=(0,s.U$)(t),v=!!(m.touched&&m.error),[x,y]=(0,a.useState)("");f.value||"tags"!==p.mode&&"multiple"!==p.mode||(f.value=[]),"tags"===p.mode&&"string"==typeof f.value&&(f.value=[f.value]);let j="tags"===p.mode?(e,t)=>e?e.value!==x||f.value.includes(x)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(x,'"'):void 0:p.optionRender||void 0,_=e=>{y(e),p.onSearch&&p.onSearch(e)},b=(e,t)=>{h(e),p.onChange&&p.onChange(e,t)};return"inline"===g?(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,...u,children:n}):null,(0,i.jsxs)(r.jqI,{align:"center",children:[(0,i.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(r.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]}),c?(0,i.jsx)(o.Z,{label:c}):null]})]})}):(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,c?(0,i.jsx)(o.Z,{label:c}):null]}),(0,i.jsx)(r.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return s.D4},MM:function(){return g},Ot:function(){return u},c6:function(){return r},cj:function(){return f},e$:function(){return o},fn:function(){return l},iC:function(){return p},nU:function(){return d},tB:function(){return c}});var i,r,s=n(19043);let a="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return s},V:function(){return i.V}});var i=n(84306),r=n(812);let s=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?n=t.data.detail:(0,r.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var i=n(24246),r=n(77181);let s=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,n,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var i=n(24246),r=n(77181),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,u=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},u=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),u)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return g},L:function(){return o},U7:function(){return u},Yh:function(){return f},ak:function(){return l},km:function(){return a},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:o}=r,l=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,s;let{data:a}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origins)||[]}}}),u=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),c={enabled:!1,cmp_api_required:!1},d=(e,t,n,i)=>{let r=n&&n[e],s=i&&i[e];return r&&s?{...i[e],...n[e]}:s?i[e]:r?{...n[e]}:t},g=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("gpp",c,i,r)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("plus_consent_settings",p,i,r)})},71784:function(e,t,n){"use strict";n.d(t,{DE:function(){return l},I3:function(){return r},kN:function(){return a},qX:function(){return o},rE:function(){return s}});var i=n(21702);let r=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In Progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,n]=e;return{label:n,value:t}}),s=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),a=[...s].map(e=>{let[t,n]=e;return{label:n,value:t}}),o={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},l={local:"local",s3:"s3"}},49755:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return y}});var i=n(24246),r=n(77181),s=n(27378),a=n(812),o=n(14047),l=n(77213),u=n(77830),c=n(58754),d=n(7426),g=n(71784),p=n(90867),f=n(34090),m=n(97181),h=n(40324),v=e=>{var t,n,l,u,c;let{storageDetails:d}=e,[v,x]=(0,s.useState)(""),[y]=(0,p.gC)(),[j]=(0,p.cf)(),{handleError:_}=(0,o.H)(),{successAlert:b}=(0,o.V)(),C={type:g.DE.s3,auth_method:null!==(l=null==d?void 0:null===(t=d.details)||void 0===t?void 0:t.auth_method)&&void 0!==l?l:"",bucket:null!==(u=null==d?void 0:null===(n=d.details)||void 0===n?void 0:n.bucket)&&void 0!==u?u:"",format:null!==(c=null==d?void 0:d.format)&&void 0!==c?c:""},S=async e=>{let t=await y({type:g.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(x(e.auth_method),b("S3 storage credentials successfully updated."))},q=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:g.DE.s3});(0,a.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,i.jsx)(r.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:C,onSubmit:S,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(r.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(m.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,i.jsx)(m.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,i.jsx)(h.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,i.jsx)(r.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(r.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.izJ,{mt:5}),(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,i.jsx)(r.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(r.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(h.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,i.jsx)(h.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,i.jsxs)(r.xuv,{mt:10,children:[(0,i.jsx)(r.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(r.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},x=()=>{let{successAlert:e}=(0,o.V)(),{handleError:t}=(0,o.H)(),[n,f]=(0,s.useState)(""),{data:m}=(0,p.PW)(),{data:h}=(0,p.Au)({type:n}),[x,{isLoading:y}]=(0,p.gC)(),[j]=(0,d.L)();(0,s.useEffect)(()=>{m&&f(m.type)},[m]);let _=async n=>{let{value:i}=n.target;if(i===g.DE.local){let n=await x({type:i,details:{},format:"json"});(0,a.D4)(n)?t(n.error):e("Configured storage details successfully.")}let r=await j({storage:{active_default_storage_type:i}});(0,a.D4)(r)?t(r.error):f(i)};return(0,i.jsxs)(l.Z,{title:"Configure Privacy Requests - Storage",children:[(0,i.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Configure requests",href:u.fz},{title:"Storage"}]}),(0,i.jsx)(r.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,i.jsxs)(r.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,i.jsx)(r.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,i.jsxs)(r.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,i.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"Local"})," ","and"," ",(0,i.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","storage methods."]}),(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,i.jsx)(r.y02.Group,{disabled:y,onChange:_,value:n,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,i.jsxs)(r.jqI,{children:[(0,i.jsx)(r.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,i.jsx)(r.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3")]})}),"s3"===n&&h?(0,i.jsx)(v,{storageDetails:h}):null]})]})},y=()=>(0,i.jsx)(x,{})},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return l},XD:function(){return u},cz:function(){return c},hE:function(){return o},oK:function(){return s}});var i=n(76649);let r=e=>"error"in e,s=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),l=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>s(n,t[e]));class a{static narrow(e){return new a(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>i(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return n(49755)}])},77213:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(24246),r=n(77181),s=n(88038),a=n.n(s),o=n(86677);n(27378);var l=n(25980),u=n(90867),c=n(77830),d=()=>{let e=(0,o.useRouter)();return(0,i.jsx)(r.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,i.jsxs)(r.xuv,{children:[(0,i.jsxs)(r.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,i.jsx)(r.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,i.jsx)(r.wpx,{onClick:()=>{e.push(c.fz)},children:"Configure"})]}),(0,i.jsxs)(r.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},g=e=>{let{children:t,title:n,padded:s=!0,mainProps:c}=e,g=(0,l.hz)(),p=(0,o.useRouter)(),f="/privacy-requests"===p.pathname||"/datastore-connection"===p.pathname,m=!(g.flags.privacyRequestsConfiguration&&f),{data:h}=(0,u.JE)(void 0,{skip:m}),{data:v}=(0,u.PW)(void 0,{skip:m}),x=g.flags.privacyRequestsConfiguration&&(!h||!v)&&f;return(0,i.jsxs)(r.kCb,{"data-testid":n,direction:"column",h:"100vh",children:[(0,i.jsxs)(a(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsxs)(r.kCb,{as:"main",direction:"column",py:s?6:0,px:s?10:0,h:s?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[x?(0,i.jsx)(d,{}):null,t]})]})}},58754:function(e,t,n){"use strict";var i=n(24246),r=n(77181),s=n(70788);t.Z=e=>{let{heading:t,breadcrumbItems:n,isSticky:a=!0,children:o,rightContent:l,style:u,...c}=e;return(0,i.jsxs)("div",{...c,style:a?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...u}:{paddingBottom:"24px",...u},children:[(0,i.jsxs)(r.jqI,{justify:"space-between",children:["string"==typeof t?(0,i.jsx)(r.X6q,{className:n||o?"pb-4":void 0,fontSize:"2xl","data-testid":"page-heading",children:t}):t,l&&(0,i.jsx)("div",{"data-testid":"page-header-right-content",children:l})]}),!!n&&(0,i.jsx)(s.m,{className:o?"pb-4":void 0,items:n,"data-testid":"page-breadcrumb"}),o]})}},97181:function(e,t,n){"use strict";n.d(t,{d:function(){return u}});var i=n(24246),r=n(77181),s=n(34090),a=n(27378),o=n(91613),l=n(40324);let u=e=>{let{name:t,label:n,labelProps:u,tooltip:c,isRequired:d,layout:g="inline",...p}=e,[f,m,{setValue:h}]=(0,s.U$)(t),v=!!(m.touched&&m.error),[x,y]=(0,a.useState)("");f.value||"tags"!==p.mode&&"multiple"!==p.mode||(f.value=[]),"tags"===p.mode&&"string"==typeof f.value&&(f.value=[f.value]);let j="tags"===p.mode?(e,t)=>e?e.value!==x||f.value.includes(x)?p.optionRender?p.optionRender(e,t):e.label:'Create "'.concat(x,'"'):void 0:p.optionRender||void 0,_=e=>{y(e),p.onSearch&&p.onSearch(e)},b=(e,t)=>{h(e),p.onChange&&p.onChange(e,t)};return"inline"===g?(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(r.rjZ,{templateColumns:n?"1fr 3fr":"1fr",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,...u,children:n}):null,(0,i.jsxs)(r.jqI,{align:"center",children:[(0,i.jsxs)(r.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(r.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]}),c?(0,i.jsx)(o.Z,{label:c}):null]})]})}):(0,i.jsx)(r.NIc,{isInvalid:v,isRequired:d,children:(0,i.jsxs)(r.gCW,{alignItems:"start",children:[(0,i.jsxs)(r.jqI,{align:"center",children:[n?(0,i.jsx)(l.__,{htmlFor:p.id||t,fontSize:"xs",my:0,mr:1,...u,children:n}):null,c?(0,i.jsx)(o.Z,{label:c}):null]}),(0,i.jsx)(r.WPr,{...f,id:p.id||t,"data-testid":"controlled-select-".concat(f.name),...p,optionRender:j,onSearch:"tags"===p.mode?_:void 0,onChange:b,value:f.value||void 0,status:v?"error":void 0}),(0,i.jsx)(l.Bc,{isInvalid:v,message:m.error,fieldName:f.name})]})})}},812:function(e,t,n){"use strict";n.d(t,{D4:function(){return s.D4},MM:function(){return g},Ot:function(){return u},c6:function(){return r},cj:function(){return f},e$:function(){return o},fn:function(){return l},iC:function(){return p},nU:function(){return d},tB:function(){return c}});var i,r,s=n(19043);let a="An unexpected error occurred. Please try again.",o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,s.Bw)(e)){if((0,s.hE)(e.data))return e.data.detail;if((0,s.cz)(e.data)){var n;let t=null===(n=e.data.detail)||void 0===n?void 0:n[0];return"".concat(null==t?void 0:t.msg,": ").concat(null==t?void 0:t.loc)}if(409===e.status&&(0,s.Dy)(e.data)||404===e.status&&(0,s.XD)(e.data))return"".concat(e.data.detail.error," (").concat(e.data.detail.fides_key,")")}return t};function l(e){return"object"==typeof e&&null!=e&&"status"in e}function u(e){return"object"==typeof e&&null!=e&&"data"in e&&"string"==typeof e.data.detail}function c(e){return"object"==typeof e&&null!=e&&"data"in e&&Array.isArray(e.data.detail)}let d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{status:500,message:a};if((0,s.oK)(e))return{status:e.originalStatus,message:e.data};if((0,s.Bw)(e)){let{status:n}=e;return{status:n,message:o(e,t.message)}}return t},g=e=>Object.entries(e).map(e=>({value:e[1],label:e[1]}));(i=r||(r={})).GVL="gvl",i.AC="gacp",i.COMPASS="compass";let p={gvl:{label:"GVL",fullName:"Global Vendor List"},gacp:{label:"AC",fullName:"Google Additional Consent List"},compass:{label:"",fullName:""}},f=e=>{let t=e.split(".")[0];return"gacp"===t?"gacp":"gvl"===t?"gvl":"compass"}},14047:function(e,t,n){"use strict";n.d(t,{H:function(){return s},V:function(){return i.V}});var i=n(84306),r=n(812);let s=()=>{let{errorAlert:e}=(0,i.V)();return{handleError:t=>{let n="An unexpected error occurred. Please try again.";(0,r.Ot)(t)?n=t.data.detail:(0,r.tB)(t)&&(n=t.data.detail[0].msg),e(n)}}}},84306:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var i=n(24246),r=n(77181);let s=()=>{let e=(0,r.pmc)();return{errorAlert:(t,n,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)},successAlert:(t,n,s)=>{let a={...s,position:(null==s?void 0:s.position)||"top",render:e=>{let{onClose:s}=e;return(0,i.jsxs)(r.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,i.jsx)(r.zMQ,{}),(0,i.jsxs)(r.xuv,{children:[n&&(0,i.jsx)(r.CdC,{children:n}),(0,i.jsx)(r.XaZ,{children:t})]}),(0,i.jsx)(r.PZ7,{onClick:s,position:"relative",right:0,size:"sm",top:-1})]})}};(null==s?void 0:s.id)&&e.isActive(s.id)?e.update(s.id,a):e(a)}}}},70788:function(e,t,n){"use strict";n.d(t,{m:function(){return u}});var i=n(24246),r=n(77181),s=n(79894),a=n.n(s),o=n(27378);let{Text:l}=r.AntTypography,u=e=>{let{items:t,...n}=e,s=(0,o.useMemo)(()=>null==t?void 0:t.map((e,n)=>{let s=n===t.length-1,o={...e},u=o.onClick&&!o.href;return("string"==typeof o.title&&(o.title=(0,i.jsx)(l,{style:{color:"inherit",maxWidth:s?void 0:400},ellipsis:!s,children:o.title})),u)?o.title=(0,i.jsx)(r.wpx,{type:"text",size:"small",icon:o.icon,onClick:o.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:o.title}):(o.icon&&(o.title=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"anticon align-text-bottom",children:o.icon}),o.title]})),o.href&&o.title&&(o.title=(0,i.jsx)(a(),{href:o.href,className:"ant-breadcrumb-link",children:o.title}),delete o.href)),o}),[t]);return(0,i.jsx)(r.zrq,{items:s,...n})}},7426:function(e,t,n){"use strict";n.d(t,{D2:function(){return g},L:function(){return o},U7:function(){return u},Yh:function(){return f},ak:function(){return l},km:function(){return a},tB:function(){return s}});var i=n(3228);let r=n(78780).u.injectEndpoints({endpoints:e=>({getConfigurationSettings:e.query({query:e=>{let{api_set:t}=e;return{url:"/config",method:"GET",params:{api_set:t}}},providesTags:["Configuration Settings"]}),putConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PUT",body:e}),invalidatesTags:["Configuration Settings"]}),patchConfigurationSettings:e.mutation({query:e=>({url:"/config",method:"PATCH",body:e}),invalidatesTags:["Configuration Settings","Privacy Notices"]})})}),{useGetConfigurationSettingsQuery:s,usePutConfigurationSettingsMutation:a,usePatchConfigurationSettingsMutation:o}=r,l=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{var i,r,s;let{data:a}=t,{data:o}=n;return{configSet:{cors_origins:(null==o?void 0:null===(i=o.security)||void 0===i?void 0:i.cors_origins)||[],cors_origin_regex:null==o?void 0:null===(r=o.security)||void 0===r?void 0:r.cors_origin_regex},apiSet:{cors_origins:(null==a?void 0:null===(s=a.security)||void 0===s?void 0:s.cors_origins)||[]}}}),u=()=>(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0})],(e,t)=>{let{data:n}=t;return n}),c={enabled:!1,cmp_api_required:!1},d=(e,t,n,i)=>{let r=n&&n[e],s=i&&i[e];return r&&s?{...i[e],...n[e]}:s?i[e]:r?{...n[e]}:t},g=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("gpp",c,i,r)}),p={tcf_publisher_country_code:null},f=(0,i.P1)([e=>e,r.endpoints.getConfigurationSettings.select({api_set:!0}),r.endpoints.getConfigurationSettings.select({api_set:!1})],(e,t,n)=>{let{data:i}=t,{data:r}=n;return d("plus_consent_settings",p,i,r)})},71784:function(e,t,n){"use strict";n.d(t,{DE:function(){return l},I3:function(){return r},kN:function(){return a},qX:function(){return o},rE:function(){return s}});var i=n(28120);let r=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In Progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"]])].map(e=>{let[t,n]=e;return{label:n,value:t}}),s=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),a=[...s].map(e=>{let[t,n]=e;return{label:n,value:t}}),o={mailgun:"mailgun",twilio_email:"twilio_email",twilio_text:"twilio_text"},l={local:"local",s3:"s3"}},49755:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return y}});var i=n(24246),r=n(77181),s=n(27378),a=n(812),o=n(14047),l=n(77213),u=n(77830),c=n(58754),d=n(7426),g=n(71784),p=n(90867),f=n(34090),m=n(97181),h=n(40324),v=e=>{var t,n,l,u,c;let{storageDetails:d}=e,[v,x]=(0,s.useState)(""),[y]=(0,p.gC)(),[j]=(0,p.cf)(),{handleError:_}=(0,o.H)(),{successAlert:b}=(0,o.V)(),C={type:g.DE.s3,auth_method:null!==(l=null==d?void 0:null===(t=d.details)||void 0===t?void 0:t.auth_method)&&void 0!==l?l:"",bucket:null!==(u=null==d?void 0:null===(n=d.details)||void 0===n?void 0:n.bucket)&&void 0!==u?u:"",format:null!==(c=null==d?void 0:d.format)&&void 0!==c?c:""},S=async e=>{let t=await y({type:g.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,a.D4)(t)?_(t.error):(x(e.auth_method),b("S3 storage credentials successfully updated."))},q=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:g.DE.s3});(0,a.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,i.jsx)(r.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:C,onSubmit:S,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(r.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(m.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,i.jsx)(m.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,i.jsx)(h.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,i.jsx)(r.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(r.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.izJ,{mt:5}),(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,i.jsx)(r.Kqy,{children:(0,i.jsx)(f.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:q,children:e=>{let{isSubmitting:t,handleReset:n}=e;return(0,i.jsxs)(f.l0,{children:[(0,i.jsxs)(r.Kqy,{mt:5,spacing:5,children:[(0,i.jsx)(h.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,i.jsx)(h.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,i.jsxs)(r.xuv,{mt:10,children:[(0,i.jsx)(r.wpx,{onClick:()=>n(),className:"mr-2 mt-5",children:"Cancel"}),(0,i.jsx)(r.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},x=()=>{let{successAlert:e}=(0,o.V)(),{handleError:t}=(0,o.H)(),[n,f]=(0,s.useState)(""),{data:m}=(0,p.PW)(),{data:h}=(0,p.Au)({type:n}),[x,{isLoading:y}]=(0,p.gC)(),[j]=(0,d.L)();(0,s.useEffect)(()=>{m&&f(m.type)},[m]);let _=async n=>{let{value:i}=n.target;if(i===g.DE.local){let n=await x({type:i,details:{},format:"json"});(0,a.D4)(n)?t(n.error):e("Configured storage details successfully.")}let r=await j({storage:{active_default_storage_type:i}});(0,a.D4)(r)?t(r.error):f(i)};return(0,i.jsxs)(l.Z,{title:"Configure Privacy Requests - Storage",children:[(0,i.jsx)(c.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Configure requests",href:u.fz},{title:"Storage"}]}),(0,i.jsx)(r.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,i.jsxs)(r.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,i.jsx)(r.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,i.jsxs)(r.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,i.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"Local"})," ","and"," ",(0,i.jsx)(r.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","storage methods."]}),(0,i.jsx)(r.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,i.jsx)(r.y02.Group,{disabled:y,onChange:_,value:n,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,i.jsxs)(r.jqI,{children:[(0,i.jsx)(r.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,i.jsx)(r.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3")]})}),"s3"===n&&h?(0,i.jsx)(v,{storageDetails:h}):null]})]})},y=()=>(0,i.jsx)(x,{})},19043:function(e,t,n){"use strict";n.d(t,{Bw:function(){return a},D4:function(){return r},Dy:function(){return l},XD:function(){return u},cz:function(){return c},hE:function(){return o},oK:function(){return s}});var i=n(76649);let r=e=>"error"in e,s=e=>(0,i.Ln)({status:"string"},e)&&"PARSING_ERROR"===e.status,a=e=>(0,i.Ln)({status:"number",data:{}},e),o=e=>(0,i.Ln)({detail:"string"},e),l=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),u=e=>(0,i.Ln)({detail:{error:"string",resource_type:"string",fides_key:"string"}},e),c=e=>(0,i.Ln)({detail:[{loc:["string","number"],msg:"string",type:"string"}]},e)},76649:function(e,t,n){"use strict";n.d(t,{Ln:function(){return i}});let i=(e,t)=>s(e,t),r=Symbol("SOME"),s=(e,t)=>"string"==typeof e?e===typeof t:Array.isArray(e)?r in e?e.some(e=>s(e,t)):!!Array.isArray(t)&&(0===e.length||t.every(t=>e.some(e=>s(e,t)))):"object"==typeof t&&null!==t&&Object.entries(e).every(([e,n])=>s(n,t[e]));class a{static narrow(e){return new a(t=>i(e,t))}constructor(e){this.NF=void 0,this.NF=e}satisfied(e){return this.NF(e)}build(e){return e}and(e){let t=this.NF,n=e instanceof a?e.NF:e instanceof Function?e:t=>i(e,t);return new a(e=>t(e)&&n(e))}}new a(e=>!0)}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
|