/** * Consent management — per-project consent type CRUD + audit history. * * GET /consent/projects/:idOrSlug/consent-types — list types * POST /consent/consent-types — create type * PATCH /consent/consent-types/:consentTypeId — update (projectId query) * DELETE /consent/consent-types/:consentTypeId — soft delete (projectId query) * POST /consent/consent-types/bulk-delete — bulk soft delete * GET /consent/projects/:idOrSlug/consent-history — audit trail * GET /consent/projects/:idOrSlug/consent-stats — grant/deny rates by type * * Update / delete require both `consentTypeId` (path) AND `projectId` * (query) because consent type rows live in per-project databases — * without the projectId the server cannot route the query. */ import type { Client } from './client.js'; export type ConsentCategory = 'necessary' | 'analytics' | 'marketing' | 'preferences' | 'functional'; export interface ConsentType { readonly id: string; readonly slug: string; readonly category: ConsentCategory; readonly name: string; readonly description: string; readonly required: boolean; readonly defaultEnabled: boolean; readonly sortOrder: number; readonly isActive: boolean; readonly createdAt: string; readonly updatedAt: string; } export declare const list: (client: Client, projectIdOrSlug: string) => Promise<{ consentTypes: readonly ConsentType[]; total: number; }>; export interface CreateInput { readonly projectId: string; readonly category: ConsentCategory; readonly slug: string; readonly name: string; readonly description: string; readonly required?: boolean; readonly defaultEnabled?: boolean; readonly sortOrder?: number; } export declare const create: (client: Client, input: CreateInput) => Promise; export interface UpdateInput { readonly category?: ConsentCategory; readonly slug?: string; readonly name?: string; readonly description?: string; readonly required?: boolean; readonly defaultEnabled?: boolean; readonly sortOrder?: number; readonly isActive?: boolean; } export declare const update: (client: Client, consentTypeId: string, projectId: string, input: UpdateInput) => Promise; declare const _delete: (client: Client, consentTypeId: string, projectId: string) => Promise<{ success: boolean; }>; export { _delete as delete }; export interface BulkDeleteInput { readonly projectId: string; readonly consentTypeIds: readonly string[]; } export interface BulkDeleteResult { readonly deleted: number; readonly errors?: readonly { readonly id: string; readonly error: string; }[]; } export declare const bulkDelete: (client: Client, input: BulkDeleteInput) => Promise; export interface ConsentHistoryEntry { readonly id: string; readonly userId: string | null; readonly anonymousId: string | null; readonly consentType: { readonly slug: string; readonly name: string; readonly category: ConsentCategory; }; readonly previousGranted: boolean | null; readonly newGranted: boolean; readonly source: string; readonly reason: string | null; readonly version: number | null; readonly createdAt: string; } export interface HistoryOptions { readonly userId?: string; readonly limit?: number; readonly offset?: number; } export interface HistoryResult { readonly history: readonly ConsentHistoryEntry[]; readonly total?: number; } export declare const history: (client: Client, projectIdOrSlug: string, options?: HistoryOptions) => Promise; export interface ConsentStatsEntry { readonly category: ConsentCategory; readonly slug: string; readonly name: string; readonly totalConsents: number; readonly granted: number; readonly denied: number; readonly grantRate: string; } export declare const stats: (client: Client, projectIdOrSlug: string) => Promise<{ stats: readonly ConsentStatsEntry[]; }>; //# sourceMappingURL=consent.d.ts.map