Widget Configuration
The Mandaitor widget system allows tenants to configure how the delegation UI appears and behaves for their end users. Configuration is managed through the MandaitorConfigClient in the SDK.
Work in Progress
This guide is currently being written. Check back soon for the full content.
Overview
Widget configuration controls:
- Identity Providers: Which authentication methods are available (Auth0, Okta, EUDI Wallet, etc.).
- Taxonomy Libraries: Which industry taxonomies are loaded for action selection.
- Branding: Colors, logos, fonts, and consent text.
- Approval Workflows: Whether mandates require manual approval.
- Webhooks: Event notifications for mandate lifecycle changes.
Using the Config Client
import { MandaitorConfigClient } from "@mandaitor/sdk";
const configClient = new MandaitorConfigClient(
"https://api.mandaitor.io/v1",
cognitoJwtToken, // Cognito JWT for authentication
);
// Get current configuration
const config = await configClient.getWidgetConfig();
console.log(config.branding.primaryColor);
// Update branding
await configClient.updateWidgetConfig({
branding: {
primaryColor: "#FF6B00",
logoUrl: "https://example.com/logo.png",
companyName: "My Company",
},
});
Configuration Versioning
Every configuration update creates a new version. You can list previous versions and roll back if needed:
const versions = await configClient.listConfigVersions();
await configClient.rollbackConfig(versions[1].version);