UNPKG

@prismatic-io/embedded

Version:

Embed Prismatic's integration marketplace and workflow designer within your existing application.

34 lines (33 loc) 1.2 kB
import type { Filters } from "./types/filters"; import type { FontConfiguration } from "./types/fontConfiguration"; import type { ScreenConfiguration } from "./types/screenConfiguration"; import type { Theme } from "./types/theme"; import type { Translation } from "./types/translation"; export interface State { filters: Filters; initComplete: boolean; jwt: string; embeddedDesignerEnabled: boolean; prismaticUrl: string; screenConfiguration?: ScreenConfiguration; skipPreload?: boolean; theme?: Theme; fontConfiguration?: FontConfiguration; translation?: Translation; } export declare const ValidKeys: Set<string>; declare class StateService { private defaultState; private state; constructor(defaultState: State); getInitialState(): State; /** * A function that returns a copy of the current state. If a mutation is desired, you must call * `stateService.setState` afterwards to persist the updated copy. * @returns A deep copy of the state to prevent accidental mutations. */ getStateCopy(): State; setState(state: State): void; } declare const stateService: StateService; export default stateService;