ZH
测试版翻译

@core / consent

1.1.0 ▾
已验证MIT
GitHub

GDPR Cookie 同意:拒绝与接受同等显著的横幅、分类、同意记录、ConsentGate 和 Consent Mode v2

代码9 个文件上下文约 743 个 token扫描通过

应用 .genpmignore 后将被注入的确切目录树。固定于

src/lib/consent/schema.ts只读 · 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

使用 GitHub 登录后才能举报包。