// @requirements REQ-PRODUCT-STORAGE-EXCEPTIONS // @requirements REQ-UK-EXCEPTIONS export function storageExceptionExampleConfig(base){ const c=structuredClone(base);c.site.id='juniper-storage-exceptions';const template=c.purposes[0]; c.purposes=[['improvement','Service improvement','Keep a local total of the sample interactions below.'],['appearance','Reading layout','Remember the spacing selected for the reading sample.'],['recommendations','Recommendations','Run an optional recommendation preview after consent.']].map(([id,name,description])=>({...structuredClone(template),id,name,description,dataCategories:['Local sample state'],legalBasis:'Draft example: review the declared device-access exception and any separate processing basis before use.',retention:'Until this feature is turned off or browser storage is cleared.',collection:{source:'direct',description:'An interaction with the controls on this page.',required:false,consequences:'The related sample feature stays off.'}})); c.services=c.purposes.map(p=>({id:p.id+'-service',name:p.name,provider:'Juniper Notes',location:'This browser',purposeIds:[p.id],processingActivities:[]})); c.storage=c.purposes.map(p=>({id:p.id+'-storage',name:'juniper-exception-'+p.id,type:'localStorage',serviceId:p.id+'-service',duration:'Until turned off or browser clearing',classification:p.id==='recommendations'?'optional':'exception',...(p.id==='recommendations'?{}:{exceptionId:p.id})})); c.scopeGuards={version:1,revision:'sample-assessment-1',site:{children:'absent',sensitiveData:'absent',highRiskProfiling:'absent',regulatedSector:'absent'}}; c.consent={purposes:[{id:'recommendations',scope:'sample-1'}],services:[{id:'recommendations-service',scope:'sample-1'}],grantLifetimeDays:30,refusalLifetimeDays:180,dismissalMinutes:20}; c.purposes.push({...structuredClone(template),id:'settings-memory',name:'Remember settings',description:'Remember the objection settings and optional cookie choice in this browser.',dataCategories:['Feature IDs','Objection state','Declaration digests and revisions','Optional consent preference and expiry'],retention:'Objection settings until browser clearing. Optional grants 30 days; refusals 180 days.',legalBasis:'Host review of preference storage is required.',collection:{source:'direct',description:'Your settings in this browser.',required:false,consequences:'Features stay off when saved settings cannot be confirmed.'}}); c.services.push({id:'settings-memory',name:'Settings memory',provider:'Juniper Notes',location:'This browser',purposeIds:['settings-memory']}); c.storage.push({id:'objection-memory',name:'notabenda-storage-exceptions-v1',type:'indexedDB',serviceId:'settings-memory',classification:'necessary',duration:'Until browser clearing',necessityReason:'Retains an explicit setting or objection; this draft classification needs host review.'},{id:'consent-memory',name:'notabenda:choices:v1:'+c.site.id,type:'localStorage',serviceId:'settings-memory',classification:'necessary',duration:'30 days for grants; 180 days for refusals',necessityReason:'Remembers the optional recommendations choice; this draft classification needs host review.'}); c.storageExceptions={schemaVersion:1,applicability:'host-assessed-uk-pecr',preferenceRetention:'until-cleared',preferenceNotice:'Your settings stay in this browser until you clear its storage. Switching a feature off removes its sample markers; the setting is kept so it can be respected next time.',information:{label:'Read the storage policy',href:'/storage-exceptions/cookies'},entries:[ {id:'improvement',revision:1,serviceIds:['improvement-service'],purposeIds:['improvement'],storageIds:['improvement-storage'],title:'Service improvement',description:'A local count of sample interactions. No visitor identifier or event history is recorded.',profile:'uk-pecr-statistical',reviewStatus:'draft',conditions:{informationSocietyService:true,soleImprovementStatistics:true,aggregateNonIdentifyingResults:true,noIndividualDecisions:true,deleteIndividualDataAfterAggregation:true,noAutomaticallyEmittedSignals:true,thirdPartyUse:'none',noOtherUseOrLinking:true}}, {id:'appearance',revision:1,serviceIds:['appearance-service'],purposeIds:['appearance'],storageIds:['appearance-storage'],title:'Reading layout',description:'Remember comfortable or compact spacing for the sample below.',profile:'uk-pecr-appearance',reviewStatus:'draft',conditions:{informationSocietyService:true,soleAppearanceOrFunctionality:true,noBehaviouralContentSelection:true,onlyNecessaryPersonalData:true}} ]}; for(const [kind,doc] of Object.entries(c.documents))doc.route='/storage-exceptions/'+kind; return c; }