import { IFetchOptions } from "@pnp/common-commonjs"; import { Queryable, IInvokable, IRequestContext } from "@pnp/odata-commonjs"; import { SPBatch } from "./batch.js"; export interface ISharePointQueryableConstructor { new (baseUrl: string | ISharePointQueryable, path?: string): T; } export declare type ISPInvokableFactory = (baseUrl: string | ISharePointQueryable, path?: string) => R & IInvokable; export declare const spInvokableFactory: (f: any) => ISPInvokableFactory; /** * SharePointQueryable Base Class * */ export declare class _SharePointQueryable extends Queryable { protected _forceCaching: boolean; /** * Creates a new instance of the SharePointQueryable class * * @constructor * @param baseUrl A string or SharePointQueryable that should form the base part of the url * */ constructor(baseUrl: string | ISharePointQueryable, path?: string); /** * Gets the full url with query information */ toUrlAndQuery(): string; /** * Choose which fields to return * * @param selects One or more fields to return */ select(...selects: string[]): this; get(options?: IFetchOptions): Promise; /** * Expands fields such as lookups to get additional data * * @param expands The Fields for which to expand the values */ expand(...expands: string[]): this; /** * Clones this SharePointQueryable into a new SharePointQueryable 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; /** * The default action for this object (unless overridden spGet) * * @param options optional request options */ defaultAction(options?: IFetchOptions): Promise; /** * Gets a parent for this instance as specified * * @param factory The contructor for the class to create */ protected getParent(factory: ISPInvokableFactory, baseUrl?: string | ISharePointQueryable, path?: string, batch?: SPBatch): T; } export interface ISharePointQueryable extends _SharePointQueryable { } export interface _SharePointQueryable { (options?: Partial>): Promise; } export declare const SharePointQueryable: ISPInvokableFactory>; /** * Represents a REST collection which can be filtered, paged, and selected * */ export declare class _SharePointQueryableCollection extends _SharePointQueryable { /** * 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 ISharePointQueryableCollection extends _SharePointQueryableCollection { } export declare const SharePointQueryableCollection: ISPInvokableFactory>; /** * Represents an instance that can be selected * */ export declare class _SharePointQueryableInstance extends _SharePointQueryable { /** * Curries the update function into the common pieces * * @param type * @param mapper */ protected _update(type: string, mapper: (data: any, props: Props) => Return): (props: Props) => Promise; } export interface ISharePointQueryableInstance extends _SharePointQueryableInstance { } export declare const SharePointQueryableInstance: ISPInvokableFactory>; /** * Adds the a delete method to the tagged class taking no parameters and calling spPostDelete */ export declare function deleteable(t: string): (this: ISharePointQueryable) => Promise; export interface IDeleteable { /** * Delete this instance */ delete(): Promise; } export declare function deleteableWithETag(t: string): (this: ISharePointQueryable, 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=sharepointqueryable.d.ts.map