import { AqQuery } from 'aql-builder'; /** * Base structures for common Spidergram queries. These fragments DO NOT return * complete result sets; instead, they should be used to create a new Query instance, * then filters and return values should be chained to create the desired output. */ export declare class QueryFragments { static get queries(): Record; /** * Returns a collection of Resources, each with the first URL request record that * led to the resource. * * @example Unfiltered return structure: * ``` * [{ * resource { * // The query's default document; if no document is specified in a * // filter, aggregate, or return property, it will look here. * ...page properties * }, * request { * ...request properties * }, * url { * ...original URL properties * }, * }] * ``` */ static pages_crawled: AqQuery; /** * Returns a collection of Resources with URLs for all inbound and outbound links. * * @example Unfiltered return structure: * ``` * [{ * resource { * // The query's default document; if no document is specified in a * // filter, aggregate, or return property, it will look here. * ...page properties, * outlinks [ * ...unique urls * ], * inlinks [ * ...unique urls * ], * }, * }] */ static pages_linked: AqQuery; /** * Returns a collection of UniqueUrls that *do not* have accompanying resource * entries in the crawl database. This can be a useful starting point for * grabbing specific sets of unvisited URLs for follow-up crawls. * * @example */ static urls_uncrawled: AqQuery; /** * Connects the UniqueURLs, ResondsWith, and Resources collections to count the * number of redirects that were encountered when retrieving a page. Only pages * that *were* redirected are returned by this query. * * The query connects three documents: * - requested: UniqueUrls, the default document if none is specified. * - request: RespondsWith, the relationship between a UniqueUrl and a Resource. * - received: Resource, information about the final destination page. * * @example Retrieve requests for example.com URLs that were redirected * ``` * const q = new Query(urls_redirected) * .filterBy('parsed.domain', 'example.com') * ``` * * @example Retrieve an array of all redirects for each URL * ``` * const q = new Query(urls_redirected) * .return({ name: 'requested_url', path: 'url') * .return({ name: 'redirect_list', document: 'request', path: 'redirects' }) * .return({ name: 'received_url', document: 'received', path: 'url' }) * ``` * * @example Retrieve redirect chains that ended in an error * ``` * const q = new Query(urls_redirected) * .filterBy({ document: 'received', path: 'code', eq: 200, negate: true }) * ``` */ static urls_redirected: AqQuery; } //# sourceMappingURL=query-fragments.d.ts.map