Interface BrandingMethods

interface BrandingMethods {
    getColor: (type: keyof BrandingConfigColors) => Promise<string>;
    getColors: () => Promise<BrandingConfigColors>;
    getHost: () => Promise<Partial<BrandingConfigHost>>;
    getLevel: () => Promise<number>;
    getUmbrella: () => Promise<Partial<BrandingConfigUmbrella>>;
    getVariables: () => Promise<Record<string, string>>;
    setColor: (
        args: { type: keyof BrandingConfigColors; value: string },
    ) => Promise<boolean>;
    setColors: (colors: BrandingConfigColors) => Promise<boolean>;
    setHost: (host: Partial<BrandingConfigHost>) => Promise<boolean>;
    setLevel: (level: number) => Promise<boolean>;
    setUmbrella: (
        umbrella: Partial<BrandingConfigUmbrella>,
    ) => Promise<boolean>;
}

Properties

getColor: (type: keyof BrandingConfigColors) => Promise<string>

Get a specific branding color

Type declaration

const color = await globalHeaderClient.branding.getColor('primary');
getColors: () => Promise<BrandingConfigColors>

Get the branding colors

Type declaration

const colors = await globalHeaderClient.branding.getColors();
getHost: () => Promise<Partial<BrandingConfigHost>>

Get the branding host configuration

Type declaration

const hostConfig = await globalHeaderClient.branding.getHost();
getLevel: () => Promise<number>

Get the branding level

Type declaration

    • (): Promise<number>
    • Returns Promise<number>

      The branding level

const level = await globalHeaderClient.branding.getLevel();
getUmbrella: () => Promise<Partial<BrandingConfigUmbrella>>

Get the branding umbrella configuration

Type declaration

const umbrellaConfig = await globalHeaderClient.branding.getUmbrella();
getVariables: () => Promise<Record<string, string>>

Get the branding variables

Type declaration

    • (): Promise<Record<string, string>>
    • Returns Promise<Record<string, string>>

      A record of CSS variable names and their values

const variables = await globalHeaderClient.branding.getVariables();
setColor: (
    args: { type: keyof BrandingConfigColors; value: string },
) => Promise<boolean>

Set a specific branding color

Type declaration

    • (args: { type: keyof BrandingConfigColors; value: string }): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      A boolean indicating the success of the operation

const success = await globalHeaderClient.branding.setColor({ type: 'primary', value: '#FF0000' });
setColors: (colors: BrandingConfigColors) => Promise<boolean>

Set the branding colors

Type declaration

const success = await globalHeaderClient.branding.setColors({ primary: '#000000', functional: '#FFFFFF' });
setHost: (host: Partial<BrandingConfigHost>) => Promise<boolean>

Set the branding host configuration

Type declaration

    • (host: Partial<BrandingConfigHost>): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      A boolean indicating the success of the operation

const success = await globalHeaderClient.branding.setHost({ label: 'My Host', href: 'https://example.com', logo: { src: 'logo.png', alt: 'Logo' } });
setLevel: (level: number) => Promise<boolean>

Set the branding level

Type declaration

    • (level: number): Promise<boolean>
    • Parameters

      • level: number

        The branding level to set

      Returns Promise<boolean>

      A boolean indicating the success of the operation

const success = await globalHeaderClient.branding.setLevel(2);
setUmbrella: (umbrella: Partial<BrandingConfigUmbrella>) => Promise<boolean>

Set the branding umbrella configuration

Type declaration

    • (umbrella: Partial<BrandingConfigUmbrella>): Promise<boolean>
    • Parameters

      Returns Promise<boolean>

      A boolean indicating the success of the operation

const success = await globalHeaderClient.branding.setUmbrella({ label: 'Umbrella', href: 'https://umbrella.com' });