import { ApplicationScope } from '../../types/application/index.js'; import { NotificationPosition } from './notification.js'; import { WidgetTypes } from './widget.js'; export type SelectedStateVarProps = { id: string; name: string; scope?: ApplicationScope; }; export type SelectedEventProps = { id: string; name: string; scope?: ApplicationScope; }; type SelectedWidgetProps = { id: string; name: string; type: WidgetTypes; }; type SelectedTimerProps = { id: string; name: string; scope: ApplicationScope; }; export declare enum TriggerStepType { RUN_JS = "runJs", RUN_APIS = "executeApi", CANCEL_APIS = "cancelApi", NAVIGATE_TO = "navigateTo", NAVIGATE_TO_APP = "navigateToApp", NAVIGATE_TO_ROUTE = "navigateToRoute", SET_QUERY_PARAMS = "setQueryParams", CONTROL_SLIDEOUT = "controlSlideout", CONTROL_MODAL = "controlModal", CONTROL_TIMER = "controlTimer", RESET_COMPONENT = "resetComponent", RESET_STATE_VAR = "resetStateVar", SET_STATE_VAR = "setStateVar", SET_COMPONENT_PROPERTY = "setComponentProperty", SHOW_ALERT = "showAlert", SET_PROFILE = "setProfile", TRIGGER_EVENT = "triggerEvent", RUN_SUPERBLOCKS_OPTIMIZED_APIS = "optimizedPageLoadApis" } type TypeOptions = 'info' | 'success' | 'warning' | 'error' | 'default'; export type ValidStepDef = { id: string; type: TriggerStepType.RUN_APIS; apiNames: string[]; onSuccess: MultiStepDef; onError: MultiStepDef; } | { id: string; type: TriggerStepType.RUN_SUPERBLOCKS_OPTIMIZED_APIS; } | { id: string; type: TriggerStepType.CANCEL_APIS; apiNames: string[]; onCancel?: MultiStepDef; } | { id: string; type: TriggerStepType.RUN_JS; code?: string; } | { id: string; type: TriggerStepType.NAVIGATE_TO; url: string; newWindow: boolean; replaceHistory?: boolean; arguments: string; } | { id: string; type: TriggerStepType.NAVIGATE_TO_APP; targetApp: { name: string; id: string; url: string; }; queryParams: string; newWindowApp: boolean; } | { id: string; type: TriggerStepType.NAVIGATE_TO_ROUTE; routeId: string; routePathDescriptor: string; routeParams?: Record; queryParams?: string; keepQueryParams?: boolean; newWindow: boolean; } | { id: string; type: TriggerStepType.SET_QUERY_PARAMS; queryParams?: string; keepQueryParams?: boolean; } | { id: string; type: TriggerStepType.CONTROL_SLIDEOUT; name: string; direction: 'open' | 'close'; } | { id: string; type: TriggerStepType.CONTROL_MODAL; name: string; direction: 'open' | 'close'; } | { id: string; type: TriggerStepType.CONTROL_TIMER; name: string; command: 'start' | 'stop' | 'toggle'; state?: SelectedTimerProps; } | { id: string; type: TriggerStepType.SET_STATE_VAR; state: SelectedStateVarProps; value: string; } | { id: string; type: TriggerStepType.RESET_STATE_VAR; state: SelectedStateVarProps; } | { id: string; type: TriggerStepType.RESET_COMPONENT; widget: SelectedWidgetProps; propertyName: string; resetChildren: boolean; } | { id: string; type: TriggerStepType.SHOW_ALERT; message: string; style: TypeOptions; alertDuration?: number; alertPosition?: NotificationPosition; } | { id: string; type: TriggerStepType.SET_COMPONENT_PROPERTY; widget: SelectedWidgetProps; propertyName: string; propertyValue: string; } | { id: string; type: TriggerStepType.SET_PROFILE; profileId: string; profileAction: 'set' | 'unset'; } | { id: string; type: TriggerStepType.TRIGGER_EVENT; event: SelectedEventProps; eventPayload: Record; }; export type StepDef = { id: string; } | ValidStepDef; export type MultiStepDef = StepDef[]; export type ValidMultiStepDef = ValidStepDef[]; export type EventArg = { id: string; name: string; }; export type EventDefinition = { id: string; name: string; arguments: EventArg[]; onTrigger: MultiStepDef; }; export type EventDefinitionLoose = Omit & { onTrigger: unknown[]; }; export declare function isValidStepDef(step: unknown): step is ValidStepDef; export declare function isValidMultiStepDef(steps: unknown[]): steps is ValidMultiStepDef; export {}; //# sourceMappingURL=event.d.ts.map