/** * Branding Resource * * Provides methods for managing visual branding/theming configuration. * Branding can be configured at system-wide level (default) or per-tenant. * * Public endpoints (get) require no authentication. * Admin endpoints (update, delete) require JWT with admin role. */ import type { HttpClient } from '../http/client'; import type { BrandingConfig, UpdateBrandingData } from '../types/branding'; export declare class BrandingResource { private http; constructor(http: HttpClient); /** * Get branding configuration * * PUBLIC ENDPOINT - No authentication required. * Used by public-facing pages (QR code pages, etc.) * * Falls back to system default if tenant-specific branding doesn't exist. * * @param tenantId - Optional tenant ID. If omitted, returns system default. * @returns Branding configuration * * @example * ```typescript * // Get system default branding * const branding = await client.branding.get(); * * // Get tenant-specific branding (falls back to default if not found) * const tenantBranding = await client.branding.get('tenant_123'); * * console.log(`Company: ${branding.companyName}`); * console.log(`Primary color: ${branding.primaryColor}`); * ``` */ get(tenantId?: string): Promise; /** * Update branding configuration * * ADMIN ONLY - Requires JWT authentication with admin role. * * Creates or updates branding configuration. Can update: * - System default (tenantId: null/undefined) * - Tenant-specific branding (tenantId: "tenant_123") * * @param data - Branding configuration data (all fields optional) * @returns Updated branding configuration * @throws {AuthError} If not authenticated or not admin * @throws {ValidationError} If validation fails * * @example * ```typescript * // Update system default branding * const branding = await client.branding.update({ * companyName: 'Acme Corporation', * primaryColor: '#FF5733', * secondaryColor: '#C70039', * logoUrl: 'https://cdn.example.com/logo.png', * headerMessage: 'Connect your WhatsApp to Acme' * }); * ``` * * @example * ```typescript * // Update tenant-specific branding * const tenantBranding = await client.branding.update({ * tenantId: 'tenant_123', * companyName: 'Acme - Premium', * primaryColor: '#00B4D8', * customCss: '.qr-container { border-radius: 20px; }' * }); * ``` */ update(data: UpdateBrandingData): Promise; /** * Delete tenant-specific branding * * ADMIN ONLY - Requires JWT authentication with admin role. * * Removes custom branding for a specific tenant. * After deletion, the tenant will use the system default branding. * * NOTE: Cannot delete system default branding (tenantId: null). * * @param tenantId - Tenant ID * @throws {AuthError} If not authenticated or not admin * @throws {NotFoundError} If tenant branding not found * * @example * ```typescript * // Remove custom branding for tenant (will use system default) * await client.branding.delete('tenant_123'); * console.log('Tenant branding deleted, using system default'); * ``` */ delete(tenantId: string): Promise; } //# sourceMappingURL=branding.d.ts.map