Do not edit this file. It is a report generated by API Extractor.
// @public
export class ClientConfig implements PartialConfig {
constructor(partial: PartialConfig);
// Warning: (ae-unresolved-inheritdoc-base) The @inheritDoc tag needs a TSDoc declaration reference; signature matching is not supported yet
//
// (undocumented)
accessToken: string;
static DEBUG: boolean;
// (undocumented)
eventBinding: EventBinding;
// (undocumented)
iFrameConfig: IFrameConfig;
// (undocumented)
static readonly PROTECT_PROD_URL: URL;
// (undocumented)
static readonly PROTECT_TEST_URL: URL;
// Warning: (ae-unresolved-inheritdoc-base) The @inheritDoc tag needs a TSDoc declaration reference; signature matching is not supported yet
//
// (undocumented)
protectClientUrl: URL;
}
// @public
export enum ClientPage {
// (undocumented)
CAMPAIGN_ACTIVITY = "CAMPAIGN_ACTIVITY",
// (undocumented)
DASHBOARD = "DASHBOARD",
// (undocumented)
MONITORS = "MONITORS",
// (undocumented)
ORDER_DETAILS = "ORDER_DETAILS",
// (undocumented)
ORDER_RULES = "ORDER_RULES",
// (undocumented)
SUSPICIOUS_ORDERS = "SUSPICIOUS_ORDERS"
}
// Warning: (ae-internal-missing-underscore) The name "configureProtectLogger" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const configureProtectLogger: (options: ProtectClientErrorLogOptions, clientConfig: ClientConfig) => void;
// Warning: (ae-internal-missing-underscore) The name "createClient" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const createClient: (config: ClientConfig) => ProtectClient;
// @public
export type CrossDomainMessage = {
name: string;
data?: unknown;
};
// @public
export interface CustomWindow extends Window {
[LAST_PAGE_INFO_GLOBAL]?: ParentPageInfo;
// Warning: (ae-forgotten-export) The symbol "ResizerConfig" needs to be exported by the entry point index.d.ts
iFrameResizer?: ResizerConfig;
// Warning: (ae-forgotten-export) The symbol "ParentIFrame" needs to be exported by the entry point index.d.ts
parentIFrame?: ParentIFrame | undefined;
}
// @public
export type EventBinding = {
[evtName in EventName]: EventCallback;
};
// @public
export type EventCallback = (data: unknown) => Promise<unknown>;
// @public
export enum EventName {
// (undocumented)
LUDDITES_PROTECT_CLIENT_CONNECTED = "luddites-protect-client-connected",
// (undocumented)
ORDER_DETAIL_NAME_CLICK = "order-detail-name-click"
}
// Warning: (ae-internal-missing-underscore) The name "forTest" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const forTest: {
getPathForPage: (page: ClientPage, platformId: string) => string;
validatePage: (page?: ClientPage | undefined, platformId?: string | undefined) => ClientPage;
getIFrameUrl: (page: ClientPage, orderId: string, hideNavBar: boolean, config: ClientConfig) => string;
getHideNavBarDefault: (page: ClientPage) => boolean;
getHideNavBarSetting: (validatedPage: ClientPage, overrideHideNavBar?: boolean | undefined) => boolean;
};
// @public
export const getCurrentMinIframeHeight: (globalWindow: CustomWindow) => number;
// Warning: (ae-forgotten-export) The symbol "Logger" needs to be exported by the entry point index.d.ts
//
// @public
export const getLogger: (name: string) => Logger;
// @public
export const getLoggers: () => {
[name: string]: Logger;
};
// @public
export const IFRAME_PAGE_INFO_EVENT_NAME = "iframe-resize-page-info";
// @public
export interface IFrameConfig {
attachToId: string;
classNames: string[];
}
// @public
export function initIFrame(container: Element, globalWindow: CustomWindow): void;
// @public
export const LAST_PAGE_INFO_GLOBAL = "__latestIframePageInfo";
// @public
export enum LogLevel {
// (undocumented)
DEBUG = 1,
// (undocumented)
ERROR = 4,
// (undocumented)
INFO = 2,
// (undocumented)
WARN = 3
}
// @public
export interface ParentPageInfo {
documentHeight: number;
documentWidth: number;
iframeHeight: number;
iframeWidth: number;
offsetLeft: number;
offsetTop: number;
scrollLeft: number;
scrollTop: number;
windowHeight: number;
windowWidth: number;
}
// @public
export interface PartialConfig {
accessToken: string;
eventBinding?: Partial<EventBinding>;
iFrameConfig: {
attachToId: string;
classNames?: string[];
};
protectClientUrl?: URL;
}
// @public
export interface ProtectClient {
render(page?: ClientPage, platformId?: string, overrideHideNavBar?: boolean): Promise<void>;
trigger(eventName: EventName, data?: unknown): Promise<unknown>;
}
// @public
export interface ProtectClientErrorLogOptions {
includeStack: boolean;
level: LogLevel;
}
// Warning: (ae-internal-missing-underscore) The name "protectLogger" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const protectLogger: Logger;