import { IInvokable, Queryable } from "@pnp/queryable"; export declare type SPInit = string | ISPQueryable | [ISPQueryable, string]; export interface ISPConstructor { new (base: SPInit, path?: string): T; } export declare type ISPInvokableFactory = (base: SPInit, path?: string) => R & IInvokable; export declare const spInvokableFactory: >(f: any) => ISPInvokableFactory; /** * SharePointQueryable Base Class * */ export declare class _SPQueryable extends Queryable { protected parentUrl: string; /** * Creates a new instance of the SharePointQueryable class * * @constructor * @param base A string or SharePointQueryable that should form the base part of the url * */ constructor(base: SPInit, path?: string); /** * Gets the full url with query information */ toRequestUrl(): 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; /** * Gets a parent for this instance as specified * * @param factory The contructor for the class to create */ protected getParent(factory: ISPInvokableFactory, path?: string, base?: string): T; } export interface ISPQueryable extends _SPQueryable { } export declare const SPQueryable: ISPInvokableFactory>; /** * Represents a REST collection which can be filtered, paged, and selected * */ export declare class _SPCollection extends _SPQueryable { /** * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported) * * @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; /** * Skips the specified number of items * * @param skip The number of items to skip */ skip(skip: number): this; /** * Limits the query to only return the specified number of items * * @param top The query row limit */ top(top: number): this; } export interface ISPCollection extends _SPCollection { } export declare const SPCollection: ISPInvokableFactory>; /** * Represents an instance that can be selected * */ export declare class _SPInstance extends _SPQueryable { } export interface ISPInstance extends _SPInstance { } export declare const SPInstance: ISPInvokableFactory>; /** * Adds the a delete method to the tagged class taking no parameters and calling spPostDelete */ export declare function deleteable(): (this: ISPQueryable) => Promise; export interface IDeleteable { /** * Delete this instance */ delete(): Promise; } export declare function deleteableWithETag(): (this: ISPQueryable, eTag?: string) => Promise; export interface IDeleteableWithETag { /** * Delete this instance * * @param eTag Value used in the IF-Match header, by default "*" */ delete(eTag?: string): Promise; } //# sourceMappingURL=spqueryable.d.ts.map