import { IFetchOptions } from "@pnp/common-commonjs"; import { Queryable, IInvokable, IRequestContext } from "@pnp/odata-commonjs"; export interface IGraphQueryableConstructor { new (baseUrl: string | IGraphQueryable, path?: string): T; } export declare const graphInvokableFactory: (f: any) => (baseUrl: string | IGraphQueryable, path?: string) => R & IInvokable; /** * Queryable Base Class * */ export declare class _GraphQueryable extends Queryable { /** * 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 | IGraphQueryable, path?: string); /** * 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; defaultAction(options?: IFetchOptions): Promise; get(options?: IFetchOptions): Promise; /** * Gets the full url with query information * */ toUrlAndQuery(): string; setEndpoint(endpoint: "beta" | "v1.0"): this; /** * 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 * @param includeQuery If true all of the query values will be copied to the cloned instance */ clone(factory: (...args: any[]) => T, additionalPath?: string, includeBatch?: boolean, includeQuery?: boolean): T; /** * Gets a parent for this instance as specified * * @param factory The contructor for the class to create */ protected getParent(factory: IGraphQueryableConstructor, baseUrl?: string | IGraphQueryable, path?: string): T; /** * Gets the current base url of this object (https://graph.microsoft.com/v1.0 or https://graph.microsoft.com/beta) */ protected getUrlBase(): string; } export interface IGraphQueryable extends _GraphQueryable { } export interface _GraphQueryable { (options?: Partial>): Promise; } export declare const GraphQueryable: (baseUrl: string | IGraphQueryable, path?: string) => IGraphQueryable & IInvokable; /** * 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; /** * Orders based on the supplied fields * * @param orderby The name of the field on which to sort * @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 */ get count(): this; } export interface IGraphQueryableCollection extends IInvokable, IGraphQueryable { /** * Retrieves the total count of matching resources */ count: this; /** * * @param filter The string representing the filter query */ filter(filter: string): this; /** * Orders based on the supplied fields * * @param orderby The name of the field on which to sort * @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; } export declare const GraphQueryableCollection: (baseUrl: string | IGraphQueryable, path?: string) => IGraphQueryableCollection & IInvokable; export declare class _GraphQueryableSearchableCollection extends _GraphQueryableCollection { /** * To request second and subsequent pages of Graph data */ search(query: string): this; } export interface IGraphQueryableSearchableCollection extends IInvokable, IGraphQueryable { search(query: string): this; } export declare const GraphQueryableSearchableCollection: (baseUrl: string | IGraphQueryable, path?: string) => IGraphQueryableSearchableCollection & IInvokable; /** * Represents an instance that can be selected * */ export declare class _GraphQueryableInstance extends _GraphQueryable { } export interface IGraphQueryableInstance extends IInvokable, IGraphQueryable { } export declare const GraphQueryableInstance: (baseUrl: string | IGraphQueryable, path?: string) => IGraphQueryableInstance & IInvokable; //# sourceMappingURL=graphqueryable.d.ts.map