import { FetchOptions } from "../net/utils"; import { ODataParser } from "../odata/core"; import { ODataQueryable } from "../odata/queryable"; import { RequestContext } from "../request/pipeline"; export interface GraphQueryableConstructor { new (baseUrl: string | GraphQueryable, path?: string): T; } /** * Queryable Base Class * */ export declare class GraphQueryable extends ODataQueryable { /** * Creates a new instance of the Queryable class * * @constructor * @param baseUrl A string or Queryable that should form the base part of the url * */ constructor(baseUrl: string | GraphQueryable, path?: string); /** * Creates a new instance of the supplied factory and extends this into that new instance * * @param factory constructor for the new queryable */ as(factory: GraphQueryableConstructor): T; /** * Gets the full url with query information * */ toUrlAndQuery(): string; /** * Gets a parent for this instance as specified * * @param factory The contructor for the class to create */ protected getParent(factory: GraphQueryableConstructor, baseUrl?: string | GraphQueryable, path?: string): T; /** * Clones this queryable into a new queryable instance of T * @param factory Constructor used to create the new instance * @param additionalPath Any additional path to include in the clone * @param includeBatch If true this instance's batch will be added to the cloned instance */ protected clone(factory: GraphQueryableConstructor, additionalPath?: string, includeBatch?: boolean): T; /** * Converts the current instance to a request context * * @param verb The request verb * @param options The set of supplied request options * @param parser The supplied ODataParser instance * @param pipeline Optional request processing pipeline */ protected toRequestContext(verb: string, options: FetchOptions, parser: ODataParser, pipeline?: Array<(c: RequestContext) => Promise>>): Promise>; } /** * Represents a REST collection which can be filtered, paged, and selected * */ export declare class GraphQueryableCollection extends GraphQueryable { /** * * @param filter The string representing the filter query */ filter(filter: string): this; /** * Choose which fields to return * * @param selects One or more fields to return */ select(...selects: string[]): this; /** * Expands fields such as lookups to get additional data * * @param expands The Fields for which to expand the values */ expand(...expands: string[]): this; /** * Orders based on the supplied fields ascending * * @param orderby The name of the field to sort on * @param ascending If false DESC is appended, otherwise ASC (default) */ orderBy(orderBy: string, ascending?: boolean): this; /** * Limits the query to only return the specified number of items * * @param top The query row limit */ top(top: number): this; /** * Skips a set number of items in the return set * * @param num Number of items to skip */ skip(num: number): this; /** * To request second and subsequent pages of Graph data */ skipToken(token: string): this; /** * Retrieves the total count of matching resources */ readonly count: this; } export declare class GraphQueryableSearchableCollection extends GraphQueryableCollection { /** * To request second and subsequent pages of Graph data */ search(query: string): this; } /** * Represents an instance that can be selected * */ export declare class GraphQueryableInstance extends GraphQueryable { /** * Choose which fields to return * * @param selects One or more fields to return */ select(...selects: string[]): this; /** * Expands fields such as lookups to get additional data * * @param expands The Fields for which to expand the values */ expand(...expands: string[]): this; }