UNPKG

1.72 kBTypeScriptView Raw
1import { TimelinePipe } from "@pnp/core";
2import { Queryable } from "@pnp/queryable";
3import { ISPQueryable } from "./spqueryable.js";
4declare module "./fi" {
5 interface SPFI {
6 /**
7 * Creates a batch behavior and associated execute function
8 *
9 */
10 batched(props?: ISPBatchProps): [SPFI, () => Promise<void>];
11 }
12}
13declare module "./webs/types" {
14 interface _Web {
15 /**
16 * Creates a batch behavior and associated execute function
17 *
18 */
19 batched(props?: ISPBatchProps): [IWeb, () => Promise<void>];
20 }
21}
22interface ISPBatchProps {
23 /**
24 * Controls the headers copied from the original request into the batched request, applied to all items
25 * default: /Accept|Content-Type|IF-Match/i
26 */
27 headersCopyPattern?: RegExp;
28}
29/**
30 * Creates a batched version of the supplied base, meaning that all chained fluent operations from the new base are part of the batch
31 *
32 * @param base The base from which to initialize the batch
33 * @param props Any properties used to initialize the batch functionality
34 * @returns A tuple of [behavior used to assign objects to the batch, the execute function used to resolve the batch requests]
35 */
36export declare function createBatch(base: ISPQueryable, props?: ISPBatchProps): [TimelinePipe, () => Promise<void>];
37/**
38 * Behavior that blocks batching for the request regardless of "method"
39 *
40 * This is used for requests to bypass batching methods. Example - Request Digest where we need to get a request-digest inside of a batch.
41 * @returns TimelinePipe
42 */
43export declare function BatchNever(): (instance: Queryable) => Queryable<any>;
44export {};
45//# sourceMappingURL=batching.d.ts.map
\No newline at end of file