import { type IWorkspaceStylingService } from "@gooddata/sdk-backend-spi"; import { type IColorPalette, type IColorPaletteDefinition, type IColorPaletteItem, type IColorPaletteMetadataObject, type ITheme, type IThemeDefinition, type IThemeMetadataObject, type ObjRef } from "@gooddata/sdk-model"; import { type TigerAuthenticatedCallGuard } from "../../../types/index.js"; export declare class TigerWorkspaceStyling implements IWorkspaceStylingService { private readonly authCall; readonly workspace: string; private settingsService; constructor(authCall: TigerAuthenticatedCallGuard, workspace: string); /** * Fetch the active styling object's content from a filtered single-object list and unwrap the first hit. * A missing object (or a failed fetch) yields `undefined` rather than throwing, so styling problems never * break the application. The caller selects the scope-specific endpoint, so there is no cross-scope * fallback here. */ private fetchActiveStyleContent; private resolveActiveStyleContent; /** * Resolve the active theme or color palette for the current user in this workspace. The resolved setting * may come from the user layer, which has no workspace: a reference this workspace cannot resolve falls * through to the setting resolved without the user layer, so it never masks the workspace's or the * organization's own one. */ private resolveActiveStyle; private colorPaletteFetcher; private themeFetcher; getColorPalette: () => Promise; getTheme: () => Promise; private getActiveSetting; getActiveTheme: () => Promise; setActiveTheme(themeRef: ObjRef): Promise; getActiveColorPalette: () => Promise; setActiveColorPalette(colorPaletteRef: ObjRef): Promise; clearActiveTheme(): Promise; clearActiveColorPalette(): Promise; /** * Request all themes defined on the workspace level. * * @returns promise of array of theme metadata objects */ getThemes(): Promise; getAvailableThemes(): Promise; /** * Create a new theme on the workspace level. * * @param theme - theme definition; a random id is generated when none is provided * @returns promise of the created theme metadata object */ createTheme(theme: IThemeDefinition): Promise; /** * Update an existing theme on the workspace level. Falls back to {@link createTheme} when the definition * carries no reference yet. * * @param theme - theme definition * @returns promise of the updated theme metadata object */ updateTheme(theme: IThemeDefinition): Promise; private parseThemeResult; /** * Delete a theme on the workspace level. * * @param themeRef - theme reference * @returns promise */ deleteTheme(themeRef: ObjRef): Promise; /** * Request all color palettes defined on the workspace level. Palettes with invalid content are filtered out. * * @returns promise of array of color palette metadata objects */ getColorPalettes(): Promise; getAvailableColorPalettes(): Promise; /** * Read one color palette by reference, wherever the workspace can see it. * * @remarks * Fetched by id rather than found in the listing above: that one asks for `origin: "NATIVE"`, * so it never holds a palette the workspace inherits from its parent. The scope comes from the * reference type, the same discriminator the active color palette setting carries. */ getColorPaletteByRef(colorPaletteRef: ObjRef): Promise; /** * Create a new color palette on the workspace level. * * @param colorPalette - color palette definition; a random id is generated when none is provided * @returns promise of the created color palette metadata object * @throws Error when the color palette content is not a valid palette */ createColorPalette(colorPalette: IColorPaletteDefinition): Promise; /** * Update an existing color palette on the workspace level. Falls back to {@link createColorPalette} when * the definition carries no reference yet. * * @param colorPalette - color palette definition * @returns promise of the updated color palette metadata object * @throws Error when the color palette content is not a valid palette */ updateColorPalette(colorPalette: IColorPaletteDefinition): Promise; /** * Delete a color palette on the workspace level. * * @param colorPaletteRef - color palette reference * @returns promise */ deleteColorPalette(colorPaletteRef: ObjRef): Promise; private parseColorPaletteResult; } //# sourceMappingURL=index.d.ts.map