Initial local backup snapshot
This commit is contained in:
commit
acd9e14ba5
367 changed files with 118038 additions and 0 deletions
36
shared/privacyCompliance.ts
Normal file
36
shared/privacyCompliance.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const DATA_PRIVACY_NOTICE_VERSION = "2026-06-11";
|
||||
|
||||
export const dataPrivacyConsentContextValues = [
|
||||
"register_account",
|
||||
"save_profile",
|
||||
"create_request",
|
||||
"update_request",
|
||||
] as const;
|
||||
|
||||
export type DataPrivacyConsentContext = (typeof dataPrivacyConsentContextValues)[number];
|
||||
|
||||
export const dataPrivacyConsentContextLabels: Record<DataPrivacyConsentContext, string> = {
|
||||
register_account: "Création de compte",
|
||||
save_profile: "Enregistrement de la fiche association",
|
||||
create_request: "Création d'une demande",
|
||||
update_request: "Mise à jour d'une demande",
|
||||
};
|
||||
|
||||
export const dataPrivacyConsentSchema = z.object({
|
||||
accepted: z.literal(true),
|
||||
version: z.string().min(1),
|
||||
context: z.enum(dataPrivacyConsentContextValues),
|
||||
});
|
||||
|
||||
export type DataPrivacyConsent = z.infer<typeof dataPrivacyConsentSchema>;
|
||||
|
||||
export function buildDataPrivacyConsent(context: DataPrivacyConsentContext): DataPrivacyConsent {
|
||||
return {
|
||||
accepted: true,
|
||||
version: DATA_PRIVACY_NOTICE_VERSION,
|
||||
context,
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue