syntax = "proto3"; import "google/protobuf/struct.proto"; package apicore; // Core API. service CoreService { rpc Scan (CrawlParams) returns (ReportResponse) {} // non stream scanning allowing for full track up time for keep alive cost. rpc Crawl (CrawlParams) returns (stream ReportResponse) {} // stream the scan request and simply return. } // params to send when scanning pages. message CrawlParams { string url = 1; // the url base of the crawl. string authorization = 2; // the authorization token. bool tld = 3; // include all TLDs. bool subdomains = 4; // include all subdomains. bool pageInsights = 5; // run page insights across scans. bool norobo = 6; // do not respect robots.txt string html = 7; // raw HTML to verify bool sitemap = 8; // extend crawl with sitemap. } // crawl page headers to set per request. message Headers { string key = 1; // key of the header. string value = 2; // value of the key. } // meta details for the page to include extra supportive features. message IssueMeta { bool skipContentIncluded = 1; // skip content button found. } // info to use to gather all stats for the issues on the page. message IssueInfo { 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. string color = 3; // color indicator for the message. } // the issue that occurred, either of type error, notice, warning in desc order. message Issue { 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. } // fields that build that Website that is treated as a Page. message Page { string domain = 1; // the domain for the request [example.com]. string url = 2; // the url of the request with http or https bool cdnConnected = 3; // is the cdn for accessibility fixes connected on the page. PageLoadTime pageLoadTime = 4; // page load time. google.protobuf.Struct insight = 5; // the json details from lighthouse IssueInfo issuesInfo = 6; // issues on the page. string lastScanDate = 7; // the last date of the scan. repeated Issue issues = 8; // all of the issues that relate to the page. uint32 userId = 9; // the user that made the request. } // send streamed response message ReportResponse { Page data = 1; // the web results. }