UNPKG

@a11ywatch/a11ywatch

Version:

A11yWatch lite sidecar for web accessibility automation.

41 lines (40 loc) 1.41 kB
import { scanWebsite } from "@a11ywatch/core/core/actions/accessibility/scan"; import { crawlMultiSite } from "@a11ywatch/core/core/actions/accessibility/crawl"; import { crawlMultiSiteWithEvent } from "@a11ywatch/core/core/utils"; export type Issues = { type: "error" | "warning" | "notice"; code?: string; typeCode?: number; message?: string; context?: string; selector?: string; runner?: string; }; export type IssuesInfo = { accessScoreAverage: number; possibleIssuesFixedByCdn: number; totalIssues: number; issuesFixedByCdn: number; errorCount: number; warningCount: number; noticeCount: number; pageCount: number; }; export type Results = { domain: string; url: string; issues: Issues[]; issuesInfo: IssuesInfo; }; declare const appReady: () => Promise<unknown>; declare const initApplication: () => Promise<unknown>; declare function scan(params: Parameters<typeof scanWebsite>[0]): Promise<import("@a11ywatch/core/core/models/response/types").ResponseModel>; declare function multiPageScan(params: Parameters<typeof crawlMultiSiteWithEvent>[0], cb?: (res: { data: Results; }) => void): Promise<{ data?: any[]; message: string; success?: boolean; }>; declare function crawlList(params: Parameters<typeof crawlMultiSite>[0]): Promise<any[]>; export { scan, multiPageScan, initApplication, crawlList, appReady };