UNPKG

@prismatic-io/embedded

Version:

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

34 lines (33 loc) 1.17 kB
import { Filters } from "./types/filters"; import { FontConfiguration } from "./types/fontConfiguration"; import { ScreenConfiguration } from "./types/screenConfiguration"; import { Theme } from "./types/theme"; import { 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;