syntax = "proto3"; import "google/protobuf/struct.proto"; // Accessibility and page metrics. service Pagemind { rpc Scan (ScanParams) returns (Web) {} // scan a page to get accessiblity issues. } // crawl page headers to set per request. message Headers { string key = 1; // key of the header. string value = 2; // value of the key. } /// the params to configure testing and output message ScanParams { uint32 userId = 1; // user identifier. string url = 2; // the page url to run tests on. repeated Headers pageHeaders = 3; // heads to include when running. bool pageInsights = 4; // Run lighthouse reports. bool mobile = 5; // Run as mobile view port. repeated string actions = 6; // List of actions to run on page. string ua = 7; // User agent to use for request. string standard = 8; // The WCAG standard to use WCAG2A, WCAG2AA, or WCAG2AAA. string hideElements = 9; // CSS selector to hide elements from testing, selectors can be comma separated. bool cv = 10; // can perform with Computer Vision. string pageSpeedApiKey = 11; // Google PageSpeed API key for request. string html = 12; // Raw HTML to verify. bool firefox = 13; // run in firefox browser. repeated string ignore = 14; // ignore list of rules. repeated string rules = 15; // list of rules to comply. repeated string runners = 16; // list of runners to use like axe, htmlcs, and a11y. } // meta details for the page to include extra supportive features. message IssueMeta { bool skipContentIncluded = 1; // add a skip content button onto the script if not found. } // info to use to gather all stats for the issues on the page. message IssuesInfo { int32 possibleIssuesFixedByCdn = 1; // possible issues that may be fixed using the cdn. int32 totalIssues = 2; // all of the page issues. int32 issuesFixedByCdn = 3; // how many issues that are fixed using the cdn. int32 errorCount = 4; // errors on the page. int32 warningCount = 5; // warnings on the page. int32 noticeCount = 6; // notices on the page that mainly used for info purposes. int32 accessScore = 7; // rough accessibility score. IssueMeta issueMeta = 8; // extra data on the issue. } // how fast the page loaded. message PageLoadTime { int32 duration = 1; // duration in ms. string durationFormated = 2; // durations formatted to a readable message. } // page model of all helpful insight message Page { string domain = 1; // the domain for the request [example.com]. string url = 2; // the url of the request with http or https PageLoadTime pageLoadTime = 3; // page load time. google.protobuf.Struct insight = 4; // the json details from lighthouse IssuesInfo issuesInfo = 5; // issues on the page. string lastScanDate = 6; // the date of the scan. } // the issue that occurred, either of type error, notice, warning in desc order. message Problem { string code = 1; // wcag error code. string type = 2; // warning, error, or notice. int32 typeCode = 3; // error code. string message = 4; // the issue with possible recommendations. string context = 5; // the element of the issue. string selector = 6; // the html selector. string runner = 7; // the runner type for the scan. int32 recurrence = 8; // how many times the issue appeared. } // the generic issues structure message Issues { string documentTitle = 1; // document page title. string pageUrl = 2; // the page url for the issue report. repeated Problem issues = 3; // all of the issues that occurred on the page. string domain = 4; // the domain of the page. } // fields that build that Website that is treated as a Page. message Web { Page webPage = 1; // the website information or stats. Issues issues = 2; // all of the issues that relate to the page. uint32 userId = 3; // the user that made the request. uint32 usage = 4; // uptime used for main user based events. }