import { IFetchOptions, IConfigOptions, IRequestClient, ITypedHash, Runtime } from "@pnp/common"; import { ICachingOptions } from "./caching.js"; import { Batch } from "./batch.js"; import { PipelineMethod } from "./pipeline.js"; import { IODataParser } from "./parsers.js"; export declare function cloneQueryableData(source: Partial): Partial; export interface IQueryableData { batch: Batch | null; batchIndex: number; batchDependency: () => void | null; cachingOptions: ICachingOptions | null; cloneParentCacheOptions: ICachingOptions | null; cloneParentWasCaching: boolean; query: Map; options: IFetchOptions | null; url: string; parentUrl: string; useCaching: boolean; pipes?: PipelineMethod[]; parser?: IODataParser; clientFactory?: () => IRequestClient; method?: string; } export interface IQueryable { data: Partial>; query: Map; append(pathPart: string): void; inBatch(batch: Batch): this; addBatchDependency(): () => void; toUrlAndQuery(): string; toUrl(): string; concat(pathPart: string): this; configure(options: IConfigOptions): this; configureFrom(o: IQueryable): this; usingCaching(options?: ICachingOptions): this; usingParser(parser: IODataParser): this; withPipeline(pipeline: PipelineMethod[]): this; defaultAction(options?: IFetchOptions): Promise; getRuntime(): Runtime; setRuntime(runtime: Runtime): this; setRuntime(cloneGlobal: boolean, additionalConfig?: ITypedHash): this; } export declare abstract class Queryable implements IQueryable { private _data; private _runtime; constructor(dataSeed?: Partial>); get data(): Partial>; set data(value: Partial>); getRuntime(): Runtime; setRuntime(runtime: Runtime): this; setRuntime(cloneGlobal: boolean, additionalConfig?: ITypedHash): this; /** * Gets the full url with query information * */ abstract toUrlAndQuery(): string; /** * The default action for this */ abstract defaultAction(options?: IFetchOptions): Promise; /** * Gets the current url * */ toUrl(): string; /** * Directly concatenates the supplied string to the current url, not normalizing "/" chars * * @param pathPart The string to concatenate to the url */ concat(pathPart: string): this; /** * Provides access to the query builder for this url * */ get query(): Map; /** * Sets custom options for current object and all derived objects accessible via chaining * * @param options custom options */ configure(options: IConfigOptions): this; /** * Configures this instance from the configure options of the supplied instance * * @param o Instance from which options should be taken */ configureFrom(o: IQueryable): this; /** * Enables caching for this request * * @param options Defines the options used when caching this request */ usingCaching(options?: string | ICachingOptions): this; usingParser(parser: IODataParser): this; /** * Allows you to set a request specific processing pipeline * * @param pipeline The set of methods, in order, to execute a given request */ withPipeline(pipeline: PipelineMethod[]): this; /** * Appends the given string and normalizes "/" chars * * @param pathPart The string to append */ append(pathPart: string): void; /** * Adds this query to the supplied batch * * @example * ``` * * let b = pnp.sp.createBatch(); * pnp.sp.web.inBatch(b).get().then(...); * b.execute().then(...) * ``` */ inBatch(batch: Batch): this; /** * Blocks a batch call from occuring, MUST be cleared by calling the returned function */ addBatchDependency(): () => void; /** * Indicates if the current query has a batch associated * */ protected get hasBatch(): boolean; /** * The batch currently associated with this query or null * */ protected get batch(): Batch | null; /** * Gets the parent url used when creating this instance * */ protected get parentUrl(): string; /** * Clones this instance's data to target * * @param target Instance to which data is written * @param settings [Optional] Settings controlling how clone is applied */ protected cloneTo>(target: T, settings?: { includeBatch?: boolean; includeQuery?: boolean; }): T; } //# sourceMappingURL=queryable.d.ts.map