import { default as SDK } from '..'; import { BrandKitMedia, BrandKit, APIBrandKit } from '../types/BrandKitTypes'; import { EditorAPI, Id } from '../types/CommonTypes'; /** * The BrandKitController is responsible for all communication regarding Brand Kits. * Methods inside this controller can be called by `window.SDK.brandKit.{method-name}` */ export declare class BrandKitController { #private; /** * @ignore */ private sdk; /** * @ignore */ constructor(editorAPI: EditorAPI, sdk: SDK); /** * This method returns the current brand kit id. * @returns current brand kit id */ getId: () => Promise>; /** * This method returns the current brand kit version. * @returns current brand kit version */ getVersion: () => Promise>; /** * This method returns the current brand kit name. * @returns current brand kit name */ getName: () => Promise>; /** * This method renames the brand kit. * @param newName - The new name for the brand kit * @returns */ rename: (newName: string) => Promise>; /** * This method updates both the brand kit id and version. * @param id - The new brand kit id * @param version - The new brand kit version * @returns */ updateIdAndVersion: (id: string, version: string) => Promise>; /** * @experimental This method returns the local brand kit * @returns brand kit with all assigned resources */ get: () => Promise>; /** * This method returns all media items in the brand kit * @returns list of media items in the brand kit */ getAllMedia: () => Promise>; /** * This method adds a media item to the brand kit * @param name - The name of the media item * @param remoteConnectorId - The remote connector ID * @param assetId - The asset ID of the media item * @returns */ addMedia: (name: string, remoteConnectorId: Id, assetId: string) => Promise>; /** * This method updates an existing media item in the brand kit * @param name - The name of the media item to update * @param remoteConnectorId - The new remote connector ID * @param assetId - The new asset ID * @returns */ updateMedia: (name: string, remoteConnectorId: Id, assetId: string) => Promise>; /** * This method renames an existing media item in the brand kit * @param name - The name of the media item to rename * @param newName - The new name for the media item * @returns */ renameMedia: (name: string, newName: string) => Promise>; /** * This method removes a media item from the brand kit * @param name - The name of the media item to remove * @returns */ removeMedia: (name: string) => Promise>; /** * @experimental This method replaces the full brand kit and all related resources assigned to it * @param apiBrandKit the brand kit from the environment api * @returns the local brand kit */ set: (apiBrandKit: APIBrandKit) => Promise>; /** * @experimental This method syncs brand kit items and structure in place without replacing the existing brand kit * @param apiBrandKit the brand kit from the environment api * @returns boolean indicating whether the brand kit changed after the sync attempt */ sync: (apiBrandKit: APIBrandKit) => Promise>; /** * This method returns the value indicating whether the brand kit auto-sync is enabled or not * It is up to the integrator to implement this auto-sync functionality, this method only is an indication if it should be done or not. * @returns boolean indicating sync status */ isAutoSync: () => Promise>; /** * This method enables or disables brand kit auto-sync * @param enableAutoSync boolean indicating auto-sync status * @returns boolean indicating the result of the operation */ enableAutoSync: (enableAutoSync: boolean) => Promise>; /** * Switches the active brand kit theme. * @param themeName - Theme name * @returns */ switchTheme: (themeName: string) => Promise>; }