@pnp/graph 2.7.0 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +25 -25
- package/attachments/conversations.d.ts +9 -9
- package/attachments/conversations.js +4 -4
- package/attachments/index.d.ts +2 -2
- package/attachments/index.js +2 -2
- package/attachments/types.d.ts +26 -26
- package/attachments/types.js +46 -46
- package/batch.d.ts +17 -17
- package/batch.js +176 -176
- package/calendars/funcs.d.ts +36 -24
- package/calendars/funcs.d.ts.map +1 -1
- package/calendars/funcs.js +43 -29
- package/calendars/funcs.js.map +1 -1
- package/calendars/groups.d.ts +13 -13
- package/calendars/groups.js +5 -5
- package/calendars/index.d.ts +4 -4
- package/calendars/index.js +3 -3
- package/calendars/types.d.ts +52 -51
- package/calendars/types.d.ts.map +1 -1
- package/calendars/types.js +98 -96
- package/calendars/types.js.map +1 -1
- package/calendars/users.d.ts +22 -22
- package/calendars/users.js +9 -9
- package/cloud-communications/index.d.ts +8 -8
- package/cloud-communications/index.js +14 -14
- package/cloud-communications/types.d.ts +21 -21
- package/cloud-communications/types.js +46 -46
- package/cloud-communications/users.d.ts +9 -9
- package/cloud-communications/users.js +4 -4
- package/contacts/index.d.ts +2 -2
- package/contacts/index.js +2 -2
- package/contacts/types.d.ts +75 -75
- package/contacts/types.js +145 -145
- package/contacts/users.d.ts +11 -11
- package/contacts/users.js +5 -5
- package/conversations/groups.d.ts +13 -13
- package/conversations/groups.js +6 -6
- package/conversations/index.d.ts +2 -2
- package/conversations/index.js +2 -2
- package/conversations/types.d.ts +103 -103
- package/conversations/types.js +173 -173
- package/decorators.d.ts +103 -103
- package/decorators.js +138 -138
- package/directory-objects/index.d.ts +7 -7
- package/directory-objects/index.js +13 -13
- package/directory-objects/types.d.ts +67 -67
- package/directory-objects/types.js +96 -96
- package/graphhttpclient.d.ts +13 -13
- package/graphhttpclient.js +95 -95
- package/graphlibconfig.d.ts +21 -21
- package/graphlibconfig.js +19 -19
- package/graphqueryable.d.ts +156 -156
- package/graphqueryable.d.ts.map +1 -1
- package/graphqueryable.js +247 -237
- package/graphqueryable.js.map +1 -1
- package/groups/index.d.ts +7 -7
- package/groups/index.js +13 -13
- package/groups/types.d.ts +81 -81
- package/groups/types.d.ts.map +1 -1
- package/groups/types.js +137 -137
- package/groups/types.js.map +1 -1
- package/index.d.ts +8 -8
- package/index.js +7 -7
- package/insights/index.d.ts +2 -2
- package/insights/index.js +2 -2
- package/insights/types.d.ts +76 -76
- package/insights/types.js +162 -162
- package/insights/users.d.ts +9 -9
- package/insights/users.js +4 -4
- package/invitations/index.d.ts +7 -7
- package/invitations/index.js +13 -13
- package/invitations/types.d.ts +25 -25
- package/invitations/types.js +44 -44
- package/members/groups.d.ts +11 -11
- package/members/groups.js +5 -5
- package/members/index.d.ts +2 -2
- package/members/index.js +2 -2
- package/members/types.d.ts +31 -31
- package/members/types.js +49 -49
- package/messages/index.d.ts +2 -2
- package/messages/index.js +2 -2
- package/messages/types.d.ts +43 -43
- package/messages/types.d.ts.map +1 -1
- package/messages/types.js +77 -77
- package/messages/types.js.map +1 -1
- package/messages/users.d.ts +15 -15
- package/messages/users.js +10 -10
- package/onedrive/index.d.ts +2 -2
- package/onedrive/index.js +2 -2
- package/onedrive/types.d.ts +95 -87
- package/onedrive/types.d.ts.map +1 -1
- package/onedrive/types.js +241 -192
- package/onedrive/types.js.map +1 -1
- package/onedrive/users.d.ts +11 -11
- package/onedrive/users.js +5 -5
- package/onenote/index.d.ts +2 -2
- package/onenote/index.js +2 -2
- package/onenote/types.d.ts +76 -76
- package/onenote/types.js +149 -149
- package/onenote/users.d.ts +9 -9
- package/onenote/users.js +4 -4
- package/operations.d.ts +8 -8
- package/operations.js +41 -41
- package/outlook/index.d.ts +2 -2
- package/outlook/index.js +2 -2
- package/outlook/types.d.ts +40 -40
- package/outlook/types.js +76 -76
- package/outlook/users.d.ts +9 -9
- package/outlook/users.js +4 -4
- package/package.json +5 -5
- package/photos/groups.d.ts +9 -9
- package/photos/groups.js +4 -4
- package/photos/index.d.ts +3 -3
- package/photos/index.js +3 -3
- package/photos/types.d.ts +21 -21
- package/photos/types.js +37 -37
- package/photos/users.d.ts +9 -9
- package/photos/users.js +4 -4
- package/planner/groups.d.ts +9 -9
- package/planner/groups.js +4 -4
- package/planner/index.d.ts +9 -9
- package/planner/index.js +15 -15
- package/planner/types.d.ts +117 -117
- package/planner/types.js +291 -291
- package/planner/users.d.ts +9 -9
- package/planner/users.js +4 -4
- package/presets/all.d.ts +38 -38
- package/presets/all.js +38 -38
- package/readme.md +21 -21
- package/rest.d.ts +30 -30
- package/rest.js +57 -57
- package/search/index.d.ts +7 -7
- package/search/index.js +18 -18
- package/search/types.d.ts +16 -16
- package/search/types.js +23 -23
- package/sites/group.d.ts +9 -9
- package/sites/group.js +4 -4
- package/sites/index.d.ts +2 -2
- package/sites/index.js +2 -2
- package/sites/types.d.ts +23 -23
- package/sites/types.js +47 -47
- package/subscriptions/index.d.ts +7 -7
- package/subscriptions/index.js +13 -13
- package/subscriptions/types.d.ts +37 -37
- package/subscriptions/types.js +72 -72
- package/teams/index.d.ts +19 -19
- package/teams/index.js +35 -35
- package/teams/types.d.ts +112 -111
- package/teams/types.d.ts.map +1 -1
- package/teams/types.js +261 -254
- package/teams/types.js.map +1 -1
- package/teams/users.d.ts +9 -9
- package/teams/users.js +4 -4
- package/types.d.ts +9 -9
- package/types.js +19 -19
- package/users/index.d.ts +8 -8
- package/users/index.js +23 -23
- package/users/types.d.ts +35 -35
- package/users/types.d.ts.map +1 -1
- package/users/types.js +82 -82
- package/users/types.js.map +1 -1
- package/utils/toabsoluteurl.d.ts +7 -7
- package/utils/toabsoluteurl.js +48 -48
- package/utils/type.d.ts +3 -3
- package/utils/type.js +3 -3
package/presets/all.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import "../attachments/index.js";
|
|
2
|
-
import "../calendars/index.js";
|
|
3
|
-
import "../contacts/index.js";
|
|
4
|
-
import "../conversations/index.js";
|
|
5
|
-
import "../directory-objects/index.js";
|
|
6
|
-
import "../groups/index.js";
|
|
7
|
-
import "../insights/index.js";
|
|
8
|
-
import "../invitations/index.js";
|
|
9
|
-
import "../members/index.js";
|
|
10
|
-
import "../messages/index.js";
|
|
11
|
-
import "../onedrive/index.js";
|
|
12
|
-
import "../onenote/index.js";
|
|
13
|
-
import "../outlook/index.js";
|
|
14
|
-
import "../photos/index.js";
|
|
15
|
-
import "../planner/index.js";
|
|
16
|
-
import "../search/index.js";
|
|
17
|
-
import "../subscriptions/index.js";
|
|
18
|
-
import "../teams/index.js";
|
|
19
|
-
import "../users/index.js";
|
|
20
|
-
export * from "../attachments/index.js";
|
|
21
|
-
export * from "../calendars/index.js";
|
|
22
|
-
export * from "../contacts/index.js";
|
|
23
|
-
export * from "../conversations/index.js";
|
|
24
|
-
export * from "../directory-objects/index.js";
|
|
25
|
-
export * from "../groups/index.js";
|
|
26
|
-
export * from "../insights/index.js";
|
|
27
|
-
export * from "../invitations/index.js";
|
|
28
|
-
export * from "../members/index.js";
|
|
29
|
-
export * from "../messages/index.js";
|
|
30
|
-
export * from "../onedrive/index.js";
|
|
31
|
-
export * from "../onenote/index.js";
|
|
32
|
-
export * from "../photos/index.js";
|
|
33
|
-
export * from "../planner/index.js";
|
|
34
|
-
export * from "../search/index.js";
|
|
35
|
-
export * from "../subscriptions/index.js";
|
|
36
|
-
export * from "../teams/index.js";
|
|
37
|
-
export * from "../users/index.js";
|
|
38
|
-
export * from "../index.js";
|
|
1
|
+
import "../attachments/index.js";
|
|
2
|
+
import "../calendars/index.js";
|
|
3
|
+
import "../contacts/index.js";
|
|
4
|
+
import "../conversations/index.js";
|
|
5
|
+
import "../directory-objects/index.js";
|
|
6
|
+
import "../groups/index.js";
|
|
7
|
+
import "../insights/index.js";
|
|
8
|
+
import "../invitations/index.js";
|
|
9
|
+
import "../members/index.js";
|
|
10
|
+
import "../messages/index.js";
|
|
11
|
+
import "../onedrive/index.js";
|
|
12
|
+
import "../onenote/index.js";
|
|
13
|
+
import "../outlook/index.js";
|
|
14
|
+
import "../photos/index.js";
|
|
15
|
+
import "../planner/index.js";
|
|
16
|
+
import "../search/index.js";
|
|
17
|
+
import "../subscriptions/index.js";
|
|
18
|
+
import "../teams/index.js";
|
|
19
|
+
import "../users/index.js";
|
|
20
|
+
export * from "../attachments/index.js";
|
|
21
|
+
export * from "../calendars/index.js";
|
|
22
|
+
export * from "../contacts/index.js";
|
|
23
|
+
export * from "../conversations/index.js";
|
|
24
|
+
export * from "../directory-objects/index.js";
|
|
25
|
+
export * from "../groups/index.js";
|
|
26
|
+
export * from "../insights/index.js";
|
|
27
|
+
export * from "../invitations/index.js";
|
|
28
|
+
export * from "../members/index.js";
|
|
29
|
+
export * from "../messages/index.js";
|
|
30
|
+
export * from "../onedrive/index.js";
|
|
31
|
+
export * from "../onenote/index.js";
|
|
32
|
+
export * from "../photos/index.js";
|
|
33
|
+
export * from "../planner/index.js";
|
|
34
|
+
export * from "../search/index.js";
|
|
35
|
+
export * from "../subscriptions/index.js";
|
|
36
|
+
export * from "../teams/index.js";
|
|
37
|
+
export * from "../users/index.js";
|
|
38
|
+
export * from "../index.js";
|
|
39
39
|
//# sourceMappingURL=all.d.ts.map
|
package/presets/all.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import "../attachments/index.js";
|
|
2
|
-
import "../calendars/index.js";
|
|
3
|
-
import "../contacts/index.js";
|
|
4
|
-
import "../conversations/index.js";
|
|
5
|
-
import "../directory-objects/index.js";
|
|
6
|
-
import "../groups/index.js";
|
|
7
|
-
import "../insights/index.js";
|
|
8
|
-
import "../invitations/index.js";
|
|
9
|
-
import "../members/index.js";
|
|
10
|
-
import "../messages/index.js";
|
|
11
|
-
import "../onedrive/index.js";
|
|
12
|
-
import "../onenote/index.js";
|
|
13
|
-
import "../outlook/index.js";
|
|
14
|
-
import "../photos/index.js";
|
|
15
|
-
import "../planner/index.js";
|
|
16
|
-
import "../search/index.js";
|
|
17
|
-
import "../subscriptions/index.js";
|
|
18
|
-
import "../teams/index.js";
|
|
19
|
-
import "../users/index.js";
|
|
20
|
-
export * from "../attachments/index.js";
|
|
21
|
-
export * from "../calendars/index.js";
|
|
22
|
-
export * from "../contacts/index.js";
|
|
23
|
-
export * from "../conversations/index.js";
|
|
24
|
-
export * from "../directory-objects/index.js";
|
|
25
|
-
export * from "../groups/index.js";
|
|
26
|
-
export * from "../insights/index.js";
|
|
27
|
-
export * from "../invitations/index.js";
|
|
28
|
-
export * from "../members/index.js";
|
|
29
|
-
export * from "../messages/index.js";
|
|
30
|
-
export * from "../onedrive/index.js";
|
|
31
|
-
export * from "../onenote/index.js";
|
|
32
|
-
export * from "../photos/index.js";
|
|
33
|
-
export * from "../planner/index.js";
|
|
34
|
-
export * from "../search/index.js";
|
|
35
|
-
export * from "../subscriptions/index.js";
|
|
36
|
-
export * from "../teams/index.js";
|
|
37
|
-
export * from "../users/index.js";
|
|
38
|
-
export * from "../index.js";
|
|
1
|
+
import "../attachments/index.js";
|
|
2
|
+
import "../calendars/index.js";
|
|
3
|
+
import "../contacts/index.js";
|
|
4
|
+
import "../conversations/index.js";
|
|
5
|
+
import "../directory-objects/index.js";
|
|
6
|
+
import "../groups/index.js";
|
|
7
|
+
import "../insights/index.js";
|
|
8
|
+
import "../invitations/index.js";
|
|
9
|
+
import "../members/index.js";
|
|
10
|
+
import "../messages/index.js";
|
|
11
|
+
import "../onedrive/index.js";
|
|
12
|
+
import "../onenote/index.js";
|
|
13
|
+
import "../outlook/index.js";
|
|
14
|
+
import "../photos/index.js";
|
|
15
|
+
import "../planner/index.js";
|
|
16
|
+
import "../search/index.js";
|
|
17
|
+
import "../subscriptions/index.js";
|
|
18
|
+
import "../teams/index.js";
|
|
19
|
+
import "../users/index.js";
|
|
20
|
+
export * from "../attachments/index.js";
|
|
21
|
+
export * from "../calendars/index.js";
|
|
22
|
+
export * from "../contacts/index.js";
|
|
23
|
+
export * from "../conversations/index.js";
|
|
24
|
+
export * from "../directory-objects/index.js";
|
|
25
|
+
export * from "../groups/index.js";
|
|
26
|
+
export * from "../insights/index.js";
|
|
27
|
+
export * from "../invitations/index.js";
|
|
28
|
+
export * from "../members/index.js";
|
|
29
|
+
export * from "../messages/index.js";
|
|
30
|
+
export * from "../onedrive/index.js";
|
|
31
|
+
export * from "../onenote/index.js";
|
|
32
|
+
export * from "../photos/index.js";
|
|
33
|
+
export * from "../planner/index.js";
|
|
34
|
+
export * from "../search/index.js";
|
|
35
|
+
export * from "../subscriptions/index.js";
|
|
36
|
+
export * from "../teams/index.js";
|
|
37
|
+
export * from "../users/index.js";
|
|
38
|
+
export * from "../index.js";
|
|
39
39
|
//# sourceMappingURL=all.js.map
|
package/readme.md
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
The SharePoint Patterns and Practices client side libraries were created to help enable developers to do their best work, without worrying about the exact
|
|
4
|
-
REST api details. Built with feedback from the community they represent a way to simplify your day-to-day dev cycle while relying on tested and proven
|
|
5
|
-
patterns.
|
|
6
|
-
|
|
7
|
-
Please use [http://aka.ms/sppnp](http://aka.ms/sppnp) for the latest updates around the whole *SharePoint Patterns and Practices (PnP) initiative*.
|
|
8
|
-
|
|
9
|
-
## Source & Docs
|
|
10
|
-
|
|
11
|
-
This code is managed within the [main pnp repo](https://github.com/pnp/pnp), please report issues and submit pull requests there.
|
|
12
|
-
|
|
13
|
-
Please see the public site for [package documentation](https://pnp.github.io/pnpjs/).
|
|
14
|
-
|
|
15
|
-
### Code of Conduct
|
|
16
|
-
|
|
17
|
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
18
|
-
|
|
19
|
-
### "Sharing is Caring"
|
|
20
|
-
|
|
21
|
-
### Disclaimer
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
The SharePoint Patterns and Practices client side libraries were created to help enable developers to do their best work, without worrying about the exact
|
|
4
|
+
REST api details. Built with feedback from the community they represent a way to simplify your day-to-day dev cycle while relying on tested and proven
|
|
5
|
+
patterns.
|
|
6
|
+
|
|
7
|
+
Please use [http://aka.ms/sppnp](http://aka.ms/sppnp) for the latest updates around the whole *SharePoint Patterns and Practices (PnP) initiative*.
|
|
8
|
+
|
|
9
|
+
## Source & Docs
|
|
10
|
+
|
|
11
|
+
This code is managed within the [main pnp repo](https://github.com/pnp/pnp), please report issues and submit pull requests there.
|
|
12
|
+
|
|
13
|
+
Please see the public site for [package documentation](https://pnp.github.io/pnpjs/).
|
|
14
|
+
|
|
15
|
+
### Code of Conduct
|
|
16
|
+
|
|
17
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
|
18
|
+
|
|
19
|
+
### "Sharing is Caring"
|
|
20
|
+
|
|
21
|
+
### Disclaimer
|
|
22
22
|
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
|
package/rest.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { IGraphConfiguration } from "./graphlibconfig.js";
|
|
2
|
-
import { GraphBatch } from "./batch.js";
|
|
3
|
-
import { Runtime, IConfigOptions, ISPFXContext, ITypedHash } from "@pnp/common";
|
|
4
|
-
export declare class GraphRest {
|
|
5
|
-
private _options;
|
|
6
|
-
private _baseUrl;
|
|
7
|
-
private _runtime;
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new instance of the SPRest class
|
|
10
|
-
*
|
|
11
|
-
* @param options Additional options
|
|
12
|
-
* @param baseUrl A string that should form the base part of the url
|
|
13
|
-
*/
|
|
14
|
-
constructor(_options?: IConfigOptions, _baseUrl?: "v1.0" | "beta", _runtime?: Runtime);
|
|
15
|
-
createBatch(): GraphBatch;
|
|
16
|
-
setup(config: IGraphConfiguration | ISPFXContext): void;
|
|
17
|
-
createIsolated<T = ITypedHash<any>>(init?: Partial<IGraphIsolatedInit<T>>): Promise<GraphRest>;
|
|
18
|
-
protected childConfigHook<T>(callback: ({ options: IConfigOptions, baseUrl: string, runtime: Runtime }: {
|
|
19
|
-
options: any;
|
|
20
|
-
baseUrl: any;
|
|
21
|
-
runtime: any;
|
|
22
|
-
}) => T): T;
|
|
23
|
-
}
|
|
24
|
-
export interface IGraphIsolatedInit<T> {
|
|
25
|
-
cloneGlobal: boolean;
|
|
26
|
-
config: T;
|
|
27
|
-
options: IConfigOptions;
|
|
28
|
-
baseUrl: "v1.0" | "beta";
|
|
29
|
-
}
|
|
30
|
-
export declare const graph: GraphRest;
|
|
1
|
+
import { IGraphConfiguration } from "./graphlibconfig.js";
|
|
2
|
+
import { GraphBatch } from "./batch.js";
|
|
3
|
+
import { Runtime, IConfigOptions, ISPFXContext, ITypedHash } from "@pnp/common";
|
|
4
|
+
export declare class GraphRest {
|
|
5
|
+
private _options;
|
|
6
|
+
private _baseUrl;
|
|
7
|
+
private _runtime;
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new instance of the SPRest class
|
|
10
|
+
*
|
|
11
|
+
* @param options Additional options
|
|
12
|
+
* @param baseUrl A string that should form the base part of the url
|
|
13
|
+
*/
|
|
14
|
+
constructor(_options?: IConfigOptions, _baseUrl?: "v1.0" | "beta", _runtime?: Runtime);
|
|
15
|
+
createBatch(): GraphBatch;
|
|
16
|
+
setup(config: IGraphConfiguration | ISPFXContext): void;
|
|
17
|
+
createIsolated<T = ITypedHash<any>>(init?: Partial<IGraphIsolatedInit<T>>): Promise<GraphRest>;
|
|
18
|
+
protected childConfigHook<T>(callback: ({ options: IConfigOptions, baseUrl: string, runtime: Runtime }: {
|
|
19
|
+
options: any;
|
|
20
|
+
baseUrl: any;
|
|
21
|
+
runtime: any;
|
|
22
|
+
}) => T): T;
|
|
23
|
+
}
|
|
24
|
+
export interface IGraphIsolatedInit<T> {
|
|
25
|
+
cloneGlobal: boolean;
|
|
26
|
+
config: T;
|
|
27
|
+
options: IConfigOptions;
|
|
28
|
+
baseUrl: "v1.0" | "beta";
|
|
29
|
+
}
|
|
30
|
+
export declare const graph: GraphRest;
|
|
31
31
|
//# sourceMappingURL=rest.d.ts.map
|
package/rest.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { __awaiter, __generator } from "tslib";
|
|
2
|
-
import { setup as _setup, } from "./graphlibconfig.js";
|
|
3
|
-
import { GraphBatch } from "./batch.js";
|
|
4
|
-
import { Runtime, DefaultRuntime } from "@pnp/common";
|
|
5
|
-
var GraphRest = /** @class */ (function () {
|
|
6
|
-
/**
|
|
7
|
-
* Creates a new instance of the SPRest class
|
|
8
|
-
*
|
|
9
|
-
* @param options Additional options
|
|
10
|
-
* @param baseUrl A string that should form the base part of the url
|
|
11
|
-
*/
|
|
12
|
-
function GraphRest(_options, _baseUrl, _runtime) {
|
|
13
|
-
if (_options === void 0) { _options = {}; }
|
|
14
|
-
if (_baseUrl === void 0) { _baseUrl = "v1.0"; }
|
|
15
|
-
if (_runtime === void 0) { _runtime = DefaultRuntime; }
|
|
16
|
-
this._options = _options;
|
|
17
|
-
this._baseUrl = _baseUrl;
|
|
18
|
-
this._runtime = _runtime;
|
|
19
|
-
}
|
|
20
|
-
GraphRest.prototype.createBatch = function () {
|
|
21
|
-
return new GraphBatch().setRuntime(this._runtime);
|
|
22
|
-
};
|
|
23
|
-
GraphRest.prototype.setup = function (config) {
|
|
24
|
-
if (config.pageContext) {
|
|
25
|
-
_setup({
|
|
26
|
-
spfxContext: config,
|
|
27
|
-
}, this._runtime);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
_setup(config, this._runtime);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
GraphRest.prototype.createIsolated = function (init) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
35
|
-
var baseUrl, cloneGlobal, options, config, runtime;
|
|
36
|
-
return __generator(this, function (_a) {
|
|
37
|
-
// merge our defaults
|
|
38
|
-
init = Object.assign({
|
|
39
|
-
baseUrl: "v1.0",
|
|
40
|
-
cloneGlobal: true,
|
|
41
|
-
config: {},
|
|
42
|
-
options: {},
|
|
43
|
-
}, init || {});
|
|
44
|
-
baseUrl = init.baseUrl, cloneGlobal = init.cloneGlobal, options = init.options, config = init.config;
|
|
45
|
-
runtime = cloneGlobal ? new Runtime(DefaultRuntime.export()) : new Runtime();
|
|
46
|
-
runtime.assign(config);
|
|
47
|
-
return [2 /*return*/, new GraphRest(options, baseUrl, runtime)];
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
GraphRest.prototype.childConfigHook = function (callback) {
|
|
52
|
-
return callback({ options: this._options, baseUrl: this._baseUrl, runtime: this._runtime });
|
|
53
|
-
};
|
|
54
|
-
return GraphRest;
|
|
55
|
-
}());
|
|
56
|
-
export { GraphRest };
|
|
57
|
-
export var graph = new GraphRest();
|
|
1
|
+
import { __awaiter, __generator } from "tslib";
|
|
2
|
+
import { setup as _setup, } from "./graphlibconfig.js";
|
|
3
|
+
import { GraphBatch } from "./batch.js";
|
|
4
|
+
import { Runtime, DefaultRuntime } from "@pnp/common";
|
|
5
|
+
var GraphRest = /** @class */ (function () {
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new instance of the SPRest class
|
|
8
|
+
*
|
|
9
|
+
* @param options Additional options
|
|
10
|
+
* @param baseUrl A string that should form the base part of the url
|
|
11
|
+
*/
|
|
12
|
+
function GraphRest(_options, _baseUrl, _runtime) {
|
|
13
|
+
if (_options === void 0) { _options = {}; }
|
|
14
|
+
if (_baseUrl === void 0) { _baseUrl = "v1.0"; }
|
|
15
|
+
if (_runtime === void 0) { _runtime = DefaultRuntime; }
|
|
16
|
+
this._options = _options;
|
|
17
|
+
this._baseUrl = _baseUrl;
|
|
18
|
+
this._runtime = _runtime;
|
|
19
|
+
}
|
|
20
|
+
GraphRest.prototype.createBatch = function () {
|
|
21
|
+
return new GraphBatch().setRuntime(this._runtime);
|
|
22
|
+
};
|
|
23
|
+
GraphRest.prototype.setup = function (config) {
|
|
24
|
+
if (config.pageContext) {
|
|
25
|
+
_setup({
|
|
26
|
+
spfxContext: config,
|
|
27
|
+
}, this._runtime);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
_setup(config, this._runtime);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
GraphRest.prototype.createIsolated = function (init) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
35
|
+
var baseUrl, cloneGlobal, options, config, runtime;
|
|
36
|
+
return __generator(this, function (_a) {
|
|
37
|
+
// merge our defaults
|
|
38
|
+
init = Object.assign({
|
|
39
|
+
baseUrl: "v1.0",
|
|
40
|
+
cloneGlobal: true,
|
|
41
|
+
config: {},
|
|
42
|
+
options: {},
|
|
43
|
+
}, init || {});
|
|
44
|
+
baseUrl = init.baseUrl, cloneGlobal = init.cloneGlobal, options = init.options, config = init.config;
|
|
45
|
+
runtime = cloneGlobal ? new Runtime(DefaultRuntime.export()) : new Runtime();
|
|
46
|
+
runtime.assign(config);
|
|
47
|
+
return [2 /*return*/, new GraphRest(options, baseUrl, runtime)];
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
GraphRest.prototype.childConfigHook = function (callback) {
|
|
52
|
+
return callback({ options: this._options, baseUrl: this._baseUrl, runtime: this._runtime });
|
|
53
|
+
};
|
|
54
|
+
return GraphRest;
|
|
55
|
+
}());
|
|
56
|
+
export { GraphRest };
|
|
57
|
+
export var graph = new GraphRest();
|
|
58
58
|
//# sourceMappingURL=rest.js.map
|
package/search/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SearchRequest as ISearchRequestType, SearchResponse as ISearchResponseType } from "@microsoft/microsoft-graph-types";
|
|
2
|
-
export { ISearch, Search, } from "./types.js";
|
|
3
|
-
declare module "../rest" {
|
|
4
|
-
interface GraphRest {
|
|
5
|
-
query(...requests: ISearchRequestType[]): Promise<ISearchResponseType[]>;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
import { SearchRequest as ISearchRequestType, SearchResponse as ISearchResponseType } from "@microsoft/microsoft-graph-types";
|
|
2
|
+
export { ISearch, Search, } from "./types.js";
|
|
3
|
+
declare module "../rest" {
|
|
4
|
+
interface GraphRest {
|
|
5
|
+
query(...requests: ISearchRequestType[]): Promise<ISearchResponseType[]>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/search/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { __awaiter, __generator } from "tslib";
|
|
2
|
-
import { Search } from "./types.js";
|
|
3
|
-
import { GraphRest } from "../rest.js";
|
|
4
|
-
export { Search, } from "./types.js";
|
|
5
|
-
GraphRest.prototype.query = function () {
|
|
6
|
-
var requests = [];
|
|
7
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8
|
-
requests[_i] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11
|
-
return __generator(this, function (_a) {
|
|
12
|
-
return [2 /*return*/, this.childConfigHook(function (_a) {
|
|
13
|
-
var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
|
|
14
|
-
return Search(baseUrl).configure(options).setRuntime(runtime).executeQuery({ requests: requests });
|
|
15
|
-
})];
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
};
|
|
1
|
+
import { __awaiter, __generator } from "tslib";
|
|
2
|
+
import { Search } from "./types.js";
|
|
3
|
+
import { GraphRest } from "../rest.js";
|
|
4
|
+
export { Search, } from "./types.js";
|
|
5
|
+
GraphRest.prototype.query = function () {
|
|
6
|
+
var requests = [];
|
|
7
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8
|
+
requests[_i] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
return [2 /*return*/, this.childConfigHook(function (_a) {
|
|
13
|
+
var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
|
|
14
|
+
return Search(baseUrl).configure(options).setRuntime(runtime).executeQuery({ requests: requests });
|
|
15
|
+
})];
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/search/types.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SearchRequest as ISearchRequestType, SearchResponse as ISearchResponseType } from "@microsoft/microsoft-graph-types";
|
|
2
|
-
import { _GraphQueryableInstance } from "../graphqueryable.js";
|
|
3
|
-
/**
|
|
4
|
-
* Search
|
|
5
|
-
*/
|
|
6
|
-
export declare class _Search extends _GraphQueryableInstance<ISearchRequestType[]> {
|
|
7
|
-
executeQuery(request: {
|
|
8
|
-
requests: ISearchRequestType[];
|
|
9
|
-
}): Promise<ISearchResponseType[]>;
|
|
10
|
-
}
|
|
11
|
-
export interface ISearch {
|
|
12
|
-
executeQuery(request: {
|
|
13
|
-
requests: ISearchRequestType[];
|
|
14
|
-
}): Promise<ISearchResponseType[]>;
|
|
15
|
-
}
|
|
16
|
-
export declare const Search: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISearch & import("@pnp/odata").IInvokable<any>;
|
|
1
|
+
import { SearchRequest as ISearchRequestType, SearchResponse as ISearchResponseType } from "@microsoft/microsoft-graph-types";
|
|
2
|
+
import { _GraphQueryableInstance } from "../graphqueryable.js";
|
|
3
|
+
/**
|
|
4
|
+
* Search
|
|
5
|
+
*/
|
|
6
|
+
export declare class _Search extends _GraphQueryableInstance<ISearchRequestType[]> {
|
|
7
|
+
executeQuery(request: {
|
|
8
|
+
requests: ISearchRequestType[];
|
|
9
|
+
}): Promise<ISearchResponseType[]>;
|
|
10
|
+
}
|
|
11
|
+
export interface ISearch {
|
|
12
|
+
executeQuery(request: {
|
|
13
|
+
requests: ISearchRequestType[];
|
|
14
|
+
}): Promise<ISearchResponseType[]>;
|
|
15
|
+
}
|
|
16
|
+
export declare const Search: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISearch & import("@pnp/odata").IInvokable<any>;
|
|
17
17
|
//# sourceMappingURL=types.d.ts.map
|
package/search/types.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { __decorate, __extends } from "tslib";
|
|
2
|
-
import { body } from "@pnp/odata";
|
|
3
|
-
import { defaultPath } from "../decorators.js";
|
|
4
|
-
import { graphInvokableFactory, _GraphQueryableInstance } from "../graphqueryable.js";
|
|
5
|
-
import { graphPost } from "../operations.js";
|
|
6
|
-
/**
|
|
7
|
-
* Search
|
|
8
|
-
*/
|
|
9
|
-
var _Search = /** @class */ (function (_super) {
|
|
10
|
-
__extends(_Search, _super);
|
|
11
|
-
function _Search() {
|
|
12
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
13
|
-
}
|
|
14
|
-
_Search.prototype.executeQuery = function (request) {
|
|
15
|
-
return graphPost(Search(this, "query"), body(request));
|
|
16
|
-
};
|
|
17
|
-
_Search = __decorate([
|
|
18
|
-
defaultPath("search")
|
|
19
|
-
], _Search);
|
|
20
|
-
return _Search;
|
|
21
|
-
}(_GraphQueryableInstance));
|
|
22
|
-
export { _Search };
|
|
23
|
-
export var Search = graphInvokableFactory(_Search);
|
|
1
|
+
import { __decorate, __extends } from "tslib";
|
|
2
|
+
import { body } from "@pnp/odata";
|
|
3
|
+
import { defaultPath } from "../decorators.js";
|
|
4
|
+
import { graphInvokableFactory, _GraphQueryableInstance } from "../graphqueryable.js";
|
|
5
|
+
import { graphPost } from "../operations.js";
|
|
6
|
+
/**
|
|
7
|
+
* Search
|
|
8
|
+
*/
|
|
9
|
+
var _Search = /** @class */ (function (_super) {
|
|
10
|
+
__extends(_Search, _super);
|
|
11
|
+
function _Search() {
|
|
12
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
13
|
+
}
|
|
14
|
+
_Search.prototype.executeQuery = function (request) {
|
|
15
|
+
return graphPost(Search(this, "query"), body(request));
|
|
16
|
+
};
|
|
17
|
+
_Search = __decorate([
|
|
18
|
+
defaultPath("search")
|
|
19
|
+
], _Search);
|
|
20
|
+
return _Search;
|
|
21
|
+
}(_GraphQueryableInstance));
|
|
22
|
+
export { _Search };
|
|
23
|
+
export var Search = graphInvokableFactory(_Search);
|
|
24
24
|
//# sourceMappingURL=types.js.map
|
package/sites/group.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ISites } from "./types.js";
|
|
2
|
-
declare module "../groups/types" {
|
|
3
|
-
interface _Group {
|
|
4
|
-
readonly sites: ISites;
|
|
5
|
-
}
|
|
6
|
-
interface IGroup {
|
|
7
|
-
readonly sites: ISites;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
import { ISites } from "./types.js";
|
|
2
|
+
declare module "../groups/types" {
|
|
3
|
+
interface _Group {
|
|
4
|
+
readonly sites: ISites;
|
|
5
|
+
}
|
|
6
|
+
interface IGroup {
|
|
7
|
+
readonly sites: ISites;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=group.d.ts.map
|
package/sites/group.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { addProp } from "@pnp/odata";
|
|
2
|
-
import { _Group } from "../groups/types.js";
|
|
3
|
-
import { Sites } from "./types.js";
|
|
4
|
-
addProp(_Group, "sites", Sites);
|
|
1
|
+
import { addProp } from "@pnp/odata";
|
|
2
|
+
import { _Group } from "../groups/types.js";
|
|
3
|
+
import { Sites } from "./types.js";
|
|
4
|
+
addProp(_Group, "sites", Sites);
|
|
5
5
|
//# sourceMappingURL=group.js.map
|
package/sites/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./group.js";
|
|
2
|
-
export { ISites, Sites, ISite, Site, } from "./types.js";
|
|
1
|
+
import "./group.js";
|
|
2
|
+
export { ISites, Sites, ISite, Site, } from "./types.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/sites/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./group.js";
|
|
2
|
-
export { Sites, Site, } from "./types.js";
|
|
1
|
+
import "./group.js";
|
|
2
|
+
export { Sites, Site, } from "./types.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/sites/types.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { _GraphQueryableCollection, _GraphQueryableInstance } from "../graphqueryable.js";
|
|
2
|
-
import { Site as ISiteType } from "@microsoft/microsoft-graph-types";
|
|
3
|
-
/**
|
|
4
|
-
* Sites
|
|
5
|
-
*/
|
|
6
|
-
export declare class _Sites extends _GraphQueryableCollection<ISiteType[]> {
|
|
7
|
-
/**
|
|
8
|
-
* Gets the team site for the group
|
|
9
|
-
*/
|
|
10
|
-
get root(): ISite;
|
|
11
|
-
}
|
|
12
|
-
export interface ISites extends _Sites {
|
|
13
|
-
}
|
|
14
|
-
export declare const Sites: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISites & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
15
|
-
/**
|
|
16
|
-
* Site
|
|
17
|
-
*/
|
|
18
|
-
export declare class _Site extends _GraphQueryableInstance<ISiteType> {
|
|
19
|
-
get sites(): ISites;
|
|
20
|
-
}
|
|
21
|
-
export interface ISite extends _Site {
|
|
22
|
-
}
|
|
23
|
-
export declare const Site: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISite & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
1
|
+
import { _GraphQueryableCollection, _GraphQueryableInstance } from "../graphqueryable.js";
|
|
2
|
+
import { Site as ISiteType } from "@microsoft/microsoft-graph-types";
|
|
3
|
+
/**
|
|
4
|
+
* Sites
|
|
5
|
+
*/
|
|
6
|
+
export declare class _Sites extends _GraphQueryableCollection<ISiteType[]> {
|
|
7
|
+
/**
|
|
8
|
+
* Gets the team site for the group
|
|
9
|
+
*/
|
|
10
|
+
get root(): ISite;
|
|
11
|
+
}
|
|
12
|
+
export interface ISites extends _Sites {
|
|
13
|
+
}
|
|
14
|
+
export declare const Sites: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISites & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Site
|
|
17
|
+
*/
|
|
18
|
+
export declare class _Site extends _GraphQueryableInstance<ISiteType> {
|
|
19
|
+
get sites(): ISites;
|
|
20
|
+
}
|
|
21
|
+
export interface ISite extends _Site {
|
|
22
|
+
}
|
|
23
|
+
export declare const Site: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISite & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
24
24
|
//# sourceMappingURL=types.d.ts.map
|