JA
ベータ版の翻訳

@core / consent

1.1.0 ▾
認証済みMIT
GitHub

GDPR クッキー同意:拒否と同意を同等に扱うバナー、カテゴリ、同意記録、ConsentGate、Consent Mode v2

コード9 ファイルコンテキスト約 743 トークンスキャン合格

.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 でログインしてください。

GitHub で続ける