import { EditorAPI, Id } from '../types/CommonTypes'; import { CharacterStyle, CharacterStyleUpdate } from '../types/CharacterStyleTypes'; /** * The CharacterStyleController is responsible for all communication regarding character styles. * Methods inside this controller can be called by `window.SDK.characterStyle.{method-name}` */ export declare class CharacterStyleController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method returns the list of character styles * @returns list of all character styles */ getAll: () => Promise>; /** * This method returns a character style by the id * @param characterStyleId the id of a specific character style * @returns character style for given id */ getById: (characterStyleId: Id) => Promise>; /** * This method creates a new character style * @returns the id of new character style */ create: () => Promise>; /** * This method updates a character style by the id and provided properties * @param characterStyleId the id of a specific character style * @param characterStyle the new character style properties * @returns */ update: (characterStyleId: Id, characterStyle: CharacterStyleUpdate) => Promise>; /** * This method removes a character style by the id * @param characterStyleId the id of a specific character style * @returns */ remove: (characterStyleId: Id) => Promise>; /** * This method duplicates a character style by the id * @param characterStyleId the id of a specific character style * @returns id of the duplicated character style */ duplicate: (characterStyleId: Id) => Promise>; /** * This method renames a character style by the id * @param characterStyleId the id of a specific character style * @param characterStyleName the new name of the character style * @returns */ rename: (characterStyleId: Id, characterStyleName: string) => Promise>; /** * This method changes positions of character styles * @param order the position of the character styles * @param ids the list of character style ids * @returns */ move: (order: number, ids: Id[]) => Promise>; }