1 | import { IInvokable, Queryable } from "@pnp/queryable";
|
2 | export declare type SPInit = string | ISPQueryable | [ISPQueryable, string];
|
3 | export interface ISPConstructor<T extends ISPQueryable = ISPQueryable> {
|
4 | new (base: SPInit, path?: string): T;
|
5 | }
|
6 | export declare type ISPInvokableFactory<R extends ISPQueryable> = (base: SPInit, path?: string) => R & IInvokable;
|
7 | export declare const spInvokableFactory: <R extends ISPQueryable<any>>(f: any) => ISPInvokableFactory<R>;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | export declare class _SPQueryable<GetType = any> extends Queryable<GetType> {
|
13 | protected parentUrl: string;
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | constructor(base: SPInit, path?: string);
|
22 | /**
|
23 | * Gets the full url with query information
|
24 | */
|
25 | toRequestUrl(): string;
|
26 | /**
|
27 | * Choose which fields to return
|
28 | *
|
29 | * @param selects One or more fields to return
|
30 | */
|
31 | select(...selects: string[]): this;
|
32 | /**
|
33 | * Expands fields such as lookups to get additional data
|
34 | *
|
35 | * @param expands The Fields for which to expand the values
|
36 | */
|
37 | expand(...expands: string[]): this;
|
38 | /**
|
39 | * Gets a parent for this instance as specified
|
40 | *
|
41 | * @param factory The contructor for the class to create
|
42 | */
|
43 | protected getParent<T extends ISPQueryable>(factory: ISPInvokableFactory<any>, path?: string, base?: string): T;
|
44 | }
|
45 | export interface ISPQueryable<GetType = any> extends _SPQueryable<GetType> {
|
46 | }
|
47 | export declare const SPQueryable: ISPInvokableFactory<ISPQueryable<any>>;
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | export declare class _SPCollection<GetType = any[]> extends _SPQueryable<GetType> {
|
53 | |
54 |
|
55 |
|
56 |
|
57 |
|
58 | filter(filter: string): this;
|
59 | |
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | orderBy(orderBy: string, ascending?: boolean): this;
|
66 | |
67 |
|
68 |
|
69 |
|
70 |
|
71 | skip(skip: number): this;
|
72 | |
73 |
|
74 |
|
75 |
|
76 |
|
77 | top(top: number): this;
|
78 | }
|
79 | export interface ISPCollection<GetType = any[]> extends _SPCollection<GetType> {
|
80 | }
|
81 | export declare const SPCollection: ISPInvokableFactory<ISPCollection<any[]>>;
|
82 |
|
83 |
|
84 |
|
85 |
|
86 | export declare class _SPInstance<GetType = any> extends _SPQueryable<GetType> {
|
87 | }
|
88 | export interface ISPInstance<GetType = any> extends _SPInstance<GetType> {
|
89 | }
|
90 | export declare const SPInstance: ISPInvokableFactory<ISPInstance<any>>;
|
91 |
|
92 |
|
93 |
|
94 | export declare function deleteable(): (this: ISPQueryable) => Promise<void>;
|
95 | export interface IDeleteable {
|
96 | |
97 |
|
98 |
|
99 | delete(): Promise<void>;
|
100 | }
|
101 | export declare function deleteableWithETag(): (this: ISPQueryable, eTag?: string) => Promise<void>;
|
102 | export interface IDeleteableWithETag {
|
103 | |
104 |
|
105 |
|
106 |
|
107 |
|
108 | delete(eTag?: string): Promise<void>;
|
109 | }
|
110 |
|
\ | No newline at end of file |