DE
Beta-Übersetzung

@core / consent

1.1.0 ▾
verifiziertMIT
GitHub

DSGVO-Cookie-Einwilligung: Banner mit gleichwertigem Ablehnen, Kategorien, Nachweis, ConsentGate und Consent Mode v2

Code9 DateienKontext~743 TokensPrüfung bestanden

Der genaue Baum, der nach .genpmignore eingebunden wird. Gepinnt an

src/lib/consent/schema.tsschreibgeschützt · 37d6a8f
// Tablas de @core/consent. Las recoge drizzle-kit vía src/lib/db/drizzle.config.ts.
import { index, jsonb, pgTable, text, timestamp } from 'drizzle-orm/pg-core';
import { primaryId } from '../db/index.ts';

/** Prueba del consentimiento (RGPD art. 7.1): qué se eligió, con qué versión de la política y cuándo. Sin IP. */
export const consentRecords = pgTable(
  'consent_records',
  {
    id: primaryId('cns'),
    /** Id aleatorio del navegador (en la cookie); no identifica a la persona. */
    subjectId: text('subject_id').notNull(),
    choices: jsonb('choices').$type<Record<string, boolean>>().notNull(),
    policyVersion: text('policy_version').notNull(),
    /** `banner`, `preferences`, `withdraw`. */
    action: text('action').notNull(),
    createdAt: timestamp('created_at', { withTimezone: true, mode: 'date' }).notNull().defaultNow(),
  },
  (t) => [index('consent_records_subject_idx').on(t.subjectId, t.createdAt)],
);

@core/consent melden

Melde dich mit GitHub an, um ein Paket zu melden.