```
#### 5.1.4 API-Methoden
```typescript
// Consent-Status prüfen
const hasAnalytics = consent.hasConsent('analytics');
const hasVendor = consent.hasVendorConsent('google-analytics');
// Consent programmatisch setzen
await consent.setConsent({
essential: true,
functional: true,
analytics: false,
marketing: false,
social: false,
});
// Alle Einwilligungen widerrufen
await consent.revokeAll();
// Banner erneut anzeigen
consent.showBanner();
// Einstellungs-Modal öffnen
consent.showSettings();
// Consent-Objekt abrufen
const currentConsent = consent.getConsent();
// {
// categories: { essential: true, analytics: false, ... },
// vendors: { 'google-analytics': false, ... },
// timestamp: '2026-02-04T12:00:00Z',
// version: '1.0.0',
// consentId: 'cns_abc123',
// }
// Consent exportieren (für Nutzeranfragen)
const exportData = consent.exportConsent();
// JSON mit allen historischen Consents
// Event-Listener
consent.on('change', (newConsent) => { ... });
consent.on('vendor:enable', (vendorId) => { ... });
consent.on('vendor:disable', (vendorId) => { ... });
```
#### 5.1.5 Framework-Integrationen
**React:**
```tsx
import { ConsentProvider, useConsent, ConsentBanner } from '@breakpilot/consent-sdk/react';
function App() {
return (