import { EditorAPI } from '../types/CommonTypes'; import { GradientUpdate, DocumentGradient } from '../types/GradientStyleTypes'; /** * The GradientStyleController is responsible for all communication regarding gradient styles. * Methods inside this controller can be called by `window.SDK.gradientStyle.{method-name}` */ export declare class GradientStyleController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method returns the list of gradients * @returns list of all gradients */ getAll: () => Promise>; /** * This method returns a gradient by id * @param id the id of a specific gradient * @returns gradient properties for given id */ getById: (id: string) => Promise>; /** * This method creates a new gradient * @returns the new created gradient id */ create: () => Promise>; /** * This method duplicates a gradient by the id * @param id the id of a specific gradient * @returns id of the duplicated gradient */ duplicate: (id: string) => Promise>; /** * This method changes positions of gradients * @param order the position of the gradients * @param ids the list of gradient IDs * @returns */ move: (order: number, ids: string[]) => Promise>; /** * This method renames a gradient * @param id the id of a specific gradient * @param newGradientName the new name of the gradient * @returns */ rename: (id: string, newGradientName: string) => Promise>; /** * This method updates a gradient * @param id the id of a specific gradient * @param newGradientProperties the new gradient properties * @returns */ update: (id: string, newGradientProperties: GradientUpdate) => Promise>; /** * This method removes a gradient * @param id the id of a specific gradient * @returns */ remove: (id: string) => Promise>; }