import { ElementEventProps, PageEventProps } from '../workflows'; /** * The configuration of a trigger. * * @public */ export declare type TriggerConfig = TriggerEvents; /** * The different trigger events that are supported. * The properties of this object is dependent on the {@link @samelogic/samelogic-js#TriggerEventProps.event} property. * * @public * * @remarks * * When `event` is `ElementClick` or `ElementMouseOver`, the following properties are required:`{@link @samelogic/samelogic-js#ElementEventProps.cssSelector}` * * When `event` is `PageView`, the following properties are required:`{@link @samelogic/samelogic-js#PageEventProps.urlPattern}` * * See the references of each type for more details. * */ export declare type TriggerEvents = ElementEventProps | PageEventProps; /** * The properties of an event. * @public */ export interface TriggerEventProps { /** * The identifier of the trigger event for referencing event data published from the event. */ id?: string; /** * The event that determines what the rest of properties of this object should be. */ event: TriggerEventType; } /** * The type of event. This will determine what properties of {@link @samelogic/samelogic-js#TriggerEvents} are required. * * @public * * @remarks * * `ElementClick` refers to the click event on a DOM element, see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/click_event}. * * `ElementMouseOver` refers to the mouseover event on a DOM element, see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseover_event}. * note: This mouseover event will fire and bubble the event up the DOM, see {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/mouseenter_event} * * `PageView` matching occurs when the page is loaded or the url has changed. */ export declare type TriggerEventType = 'ElementClick' | 'ElementMouseOver' | 'PageView'; /** * Taken from: https://stackoverflow.com/a/53215240/400861 * * @internal */ export declare type LogicalOperator = 'AND' | 'OR'; /** * * * @internal */ export declare type TriggerEventConditions = TriggerEvents | LogicalOperator; //# sourceMappingURL=TriggerConfig.d.ts.map