1 | import { IRequestClient } from "@pnp/common";
|
2 | import { IQueryableData } from "./queryable.js";
|
3 |
|
4 |
|
5 |
|
6 | export interface IRequestContext<ReturnType> extends IQueryableData<ReturnType> {
|
7 | result?: ReturnType;
|
8 | clientFactory: () => IRequestClient;
|
9 | hasResult: boolean;
|
10 | isBatched: boolean;
|
11 | requestId: string;
|
12 | method: string;
|
13 | }
|
14 | export declare type PipelineMethod<ReturnType> = (c: IRequestContext<ReturnType>) => Promise<IRequestContext<ReturnType>>;
|
15 |
|
16 |
|
17 |
|
18 | export declare function setResult<T = any>(context: IRequestContext<T>, value: any): Promise<IRequestContext<T>>;
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | export declare function pipe<T = any>(context: IRequestContext<T>): Promise<T>;
|
25 |
|
26 |
|
27 |
|
28 | export declare function requestPipelineMethod(alwaysRun?: boolean): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
29 |
|
30 |
|
31 |
|
32 | export declare class PipelineMethods {
|
33 | |
34 |
|
35 |
|
36 | static logStart<T = any>(context: IRequestContext<T>): Promise<IRequestContext<T>>;
|
37 | |
38 |
|
39 |
|
40 | static caching<T = any>(context: IRequestContext<T>): Promise<IRequestContext<T>>;
|
41 | |
42 |
|
43 |
|
44 | static send<T = any>(context: IRequestContext<T>): Promise<IRequestContext<T>>;
|
45 | |
46 |
|
47 |
|
48 | static logEnd<T = any>(context: IRequestContext<T>): Promise<IRequestContext<T>>;
|
49 | }
|
50 | export declare function getDefaultPipeline(): (typeof PipelineMethods.logStart)[];
|
51 |
|
\ | No newline at end of file |