@pnp/graph 2.8.0 → 2.12.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 -36
- package/calendars/funcs.js +43 -43
- 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 -52
- package/calendars/types.js +98 -98
- 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 -242
- 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.js +137 -137
- 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.js +77 -77
- 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 -95
- package/onedrive/types.js +241 -241
- 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.js +82 -82
- 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/groups/types.d.ts
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { ITypedHash } from "@pnp/common";
|
|
2
|
-
import { Event as IEventType, Group as IGroupType } from "@microsoft/microsoft-graph-types";
|
|
3
|
-
import { _GraphQueryableSearchableCollection } from "../graphqueryable.js";
|
|
4
|
-
import { IDeleteable, IUpdateable, IGetById } from "../decorators.js";
|
|
5
|
-
import { _DirectoryObject } from "../directory-objects/types.js";
|
|
6
|
-
export declare enum GroupType {
|
|
7
|
-
/**
|
|
8
|
-
* Office 365 (aka unified group)
|
|
9
|
-
*/
|
|
10
|
-
Office365 = 0,
|
|
11
|
-
/**
|
|
12
|
-
* Dynamic membership
|
|
13
|
-
*/
|
|
14
|
-
Dynamic = 1,
|
|
15
|
-
/**
|
|
16
|
-
* Security
|
|
17
|
-
*/
|
|
18
|
-
Security = 2
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Represents a group entity
|
|
22
|
-
*/
|
|
23
|
-
export declare class _Group extends _DirectoryObject<IGroupType> {
|
|
24
|
-
/**
|
|
25
|
-
* Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
26
|
-
*/
|
|
27
|
-
addFavorite(): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
30
|
-
*/
|
|
31
|
-
removeFavorite(): Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Reset the unseenCount of all the posts that the current user has not seen since their last visit
|
|
34
|
-
*/
|
|
35
|
-
resetUnseenCount(): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Calling this method will enable the current user to receive email notifications for this group,
|
|
38
|
-
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
39
|
-
*/
|
|
40
|
-
subscribeByMail(): Promise<void>;
|
|
41
|
-
/**
|
|
42
|
-
* Calling this method will prevent the current user from receiving email notifications for this group
|
|
43
|
-
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
44
|
-
*/
|
|
45
|
-
unsubscribeByMail(): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group
|
|
48
|
-
*
|
|
49
|
-
* @param start Start date and time of the time range
|
|
50
|
-
* @param end End date and time of the time range
|
|
51
|
-
*/
|
|
52
|
-
getCalendarView(start: Date, end: Date): Promise<IEventType[]>;
|
|
53
|
-
}
|
|
54
|
-
export interface IGroup extends _Group, IDeleteable, IUpdateable {
|
|
55
|
-
}
|
|
56
|
-
export declare const Group: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IGroup & import("@pnp/odata").IInvokable<any>;
|
|
57
|
-
/**
|
|
58
|
-
* Describes a collection of Field objects
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
export declare class _Groups extends _GraphQueryableSearchableCollection<IGroupType[]> {
|
|
62
|
-
/**
|
|
63
|
-
* Create a new group as specified in the request body.
|
|
64
|
-
*
|
|
65
|
-
* @param name Name to display in the address book for the group
|
|
66
|
-
* @param mailNickname Mail alias for the group
|
|
67
|
-
* @param groupType Type of group being created
|
|
68
|
-
* @param additionalProperties A plain object collection of additional properties you want to set on the new group
|
|
69
|
-
*/
|
|
70
|
-
add(name: string, mailNickname: string, groupType: GroupType, additionalProperties?: ITypedHash<any>): Promise<IGroupAddResult>;
|
|
71
|
-
}
|
|
72
|
-
export interface IGroups extends _Groups, IGetById<IGroup> {
|
|
73
|
-
}
|
|
74
|
-
export declare const Groups: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IGroups & import("@pnp/odata").IInvokable<any>;
|
|
75
|
-
/**
|
|
76
|
-
* IGroupAddResult
|
|
77
|
-
*/
|
|
78
|
-
export interface IGroupAddResult {
|
|
79
|
-
group: IGroup;
|
|
80
|
-
data: any;
|
|
81
|
-
}
|
|
1
|
+
import { ITypedHash } from "@pnp/common";
|
|
2
|
+
import { Event as IEventType, Group as IGroupType } from "@microsoft/microsoft-graph-types";
|
|
3
|
+
import { _GraphQueryableSearchableCollection } from "../graphqueryable.js";
|
|
4
|
+
import { IDeleteable, IUpdateable, IGetById } from "../decorators.js";
|
|
5
|
+
import { _DirectoryObject } from "../directory-objects/types.js";
|
|
6
|
+
export declare enum GroupType {
|
|
7
|
+
/**
|
|
8
|
+
* Office 365 (aka unified group)
|
|
9
|
+
*/
|
|
10
|
+
Office365 = 0,
|
|
11
|
+
/**
|
|
12
|
+
* Dynamic membership
|
|
13
|
+
*/
|
|
14
|
+
Dynamic = 1,
|
|
15
|
+
/**
|
|
16
|
+
* Security
|
|
17
|
+
*/
|
|
18
|
+
Security = 2
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents a group entity
|
|
22
|
+
*/
|
|
23
|
+
export declare class _Group extends _DirectoryObject<IGroupType> {
|
|
24
|
+
/**
|
|
25
|
+
* Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
26
|
+
*/
|
|
27
|
+
addFavorite(): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
30
|
+
*/
|
|
31
|
+
removeFavorite(): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Reset the unseenCount of all the posts that the current user has not seen since their last visit
|
|
34
|
+
*/
|
|
35
|
+
resetUnseenCount(): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Calling this method will enable the current user to receive email notifications for this group,
|
|
38
|
+
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
39
|
+
*/
|
|
40
|
+
subscribeByMail(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Calling this method will prevent the current user from receiving email notifications for this group
|
|
43
|
+
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
44
|
+
*/
|
|
45
|
+
unsubscribeByMail(): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group
|
|
48
|
+
*
|
|
49
|
+
* @param start Start date and time of the time range
|
|
50
|
+
* @param end End date and time of the time range
|
|
51
|
+
*/
|
|
52
|
+
getCalendarView(start: Date, end: Date): Promise<IEventType[]>;
|
|
53
|
+
}
|
|
54
|
+
export interface IGroup extends _Group, IDeleteable, IUpdateable {
|
|
55
|
+
}
|
|
56
|
+
export declare const Group: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IGroup & import("@pnp/odata").IInvokable<any>;
|
|
57
|
+
/**
|
|
58
|
+
* Describes a collection of Field objects
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export declare class _Groups extends _GraphQueryableSearchableCollection<IGroupType[]> {
|
|
62
|
+
/**
|
|
63
|
+
* Create a new group as specified in the request body.
|
|
64
|
+
*
|
|
65
|
+
* @param name Name to display in the address book for the group
|
|
66
|
+
* @param mailNickname Mail alias for the group
|
|
67
|
+
* @param groupType Type of group being created
|
|
68
|
+
* @param additionalProperties A plain object collection of additional properties you want to set on the new group
|
|
69
|
+
*/
|
|
70
|
+
add(name: string, mailNickname: string, groupType: GroupType, additionalProperties?: ITypedHash<any>): Promise<IGroupAddResult>;
|
|
71
|
+
}
|
|
72
|
+
export interface IGroups extends _Groups, IGetById<IGroup> {
|
|
73
|
+
}
|
|
74
|
+
export declare const Groups: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IGroups & import("@pnp/odata").IInvokable<any>;
|
|
75
|
+
/**
|
|
76
|
+
* IGroupAddResult
|
|
77
|
+
*/
|
|
78
|
+
export interface IGroupAddResult {
|
|
79
|
+
group: IGroup;
|
|
80
|
+
data: any;
|
|
81
|
+
}
|
|
82
82
|
//# sourceMappingURL=types.d.ts.map
|
package/groups/types.js
CHANGED
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
import { __awaiter, __decorate, __extends, __generator } from "tslib";
|
|
2
|
-
import { assign } from "@pnp/common";
|
|
3
|
-
import { body } from "@pnp/odata";
|
|
4
|
-
import { _GraphQueryableSearchableCollection, graphInvokableFactory } from "../graphqueryable.js";
|
|
5
|
-
import { defaultPath, deleteable, updateable, getById } from "../decorators.js";
|
|
6
|
-
import { graphPost } from "../operations.js";
|
|
7
|
-
import { _DirectoryObject } from "../directory-objects/types.js";
|
|
8
|
-
export var GroupType;
|
|
9
|
-
(function (GroupType) {
|
|
10
|
-
/**
|
|
11
|
-
* Office 365 (aka unified group)
|
|
12
|
-
*/
|
|
13
|
-
GroupType[GroupType["Office365"] = 0] = "Office365";
|
|
14
|
-
/**
|
|
15
|
-
* Dynamic membership
|
|
16
|
-
*/
|
|
17
|
-
GroupType[GroupType["Dynamic"] = 1] = "Dynamic";
|
|
18
|
-
/**
|
|
19
|
-
* Security
|
|
20
|
-
*/
|
|
21
|
-
GroupType[GroupType["Security"] = 2] = "Security";
|
|
22
|
-
})(GroupType || (GroupType = {}));
|
|
23
|
-
/**
|
|
24
|
-
* Represents a group entity
|
|
25
|
-
*/
|
|
26
|
-
var _Group = /** @class */ (function (_super) {
|
|
27
|
-
__extends(_Group, _super);
|
|
28
|
-
function _Group() {
|
|
29
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
33
|
-
*/
|
|
34
|
-
_Group.prototype.addFavorite = function () {
|
|
35
|
-
return graphPost(this.clone(Group, "addFavorite"));
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
39
|
-
*/
|
|
40
|
-
_Group.prototype.removeFavorite = function () {
|
|
41
|
-
return graphPost(this.clone(Group, "removeFavorite"));
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Reset the unseenCount of all the posts that the current user has not seen since their last visit
|
|
45
|
-
*/
|
|
46
|
-
_Group.prototype.resetUnseenCount = function () {
|
|
47
|
-
return graphPost(this.clone(Group, "resetUnseenCount"));
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Calling this method will enable the current user to receive email notifications for this group,
|
|
51
|
-
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
52
|
-
*/
|
|
53
|
-
_Group.prototype.subscribeByMail = function () {
|
|
54
|
-
return graphPost(this.clone(Group, "subscribeByMail"));
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* Calling this method will prevent the current user from receiving email notifications for this group
|
|
58
|
-
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
59
|
-
*/
|
|
60
|
-
_Group.prototype.unsubscribeByMail = function () {
|
|
61
|
-
return graphPost(this.clone(Group, "unsubscribeByMail"));
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group
|
|
65
|
-
*
|
|
66
|
-
* @param start Start date and time of the time range
|
|
67
|
-
* @param end End date and time of the time range
|
|
68
|
-
*/
|
|
69
|
-
_Group.prototype.getCalendarView = function (start, end) {
|
|
70
|
-
var view = this.clone(Group, "calendarView");
|
|
71
|
-
view.query.set("startDateTime", start.toISOString());
|
|
72
|
-
view.query.set("endDateTime", end.toISOString());
|
|
73
|
-
return view();
|
|
74
|
-
};
|
|
75
|
-
_Group = __decorate([
|
|
76
|
-
deleteable(),
|
|
77
|
-
updateable()
|
|
78
|
-
], _Group);
|
|
79
|
-
return _Group;
|
|
80
|
-
}(_DirectoryObject));
|
|
81
|
-
export { _Group };
|
|
82
|
-
export var Group = graphInvokableFactory(_Group);
|
|
83
|
-
/**
|
|
84
|
-
* Describes a collection of Field objects
|
|
85
|
-
*
|
|
86
|
-
*/
|
|
87
|
-
var _Groups = /** @class */ (function (_super) {
|
|
88
|
-
__extends(_Groups, _super);
|
|
89
|
-
function _Groups() {
|
|
90
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Create a new group as specified in the request body.
|
|
94
|
-
*
|
|
95
|
-
* @param name Name to display in the address book for the group
|
|
96
|
-
* @param mailNickname Mail alias for the group
|
|
97
|
-
* @param groupType Type of group being created
|
|
98
|
-
* @param additionalProperties A plain object collection of additional properties you want to set on the new group
|
|
99
|
-
*/
|
|
100
|
-
_Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) {
|
|
101
|
-
if (additionalProperties === void 0) { additionalProperties = {}; }
|
|
102
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
var postBody, data;
|
|
104
|
-
return __generator(this, function (_a) {
|
|
105
|
-
switch (_a.label) {
|
|
106
|
-
case 0:
|
|
107
|
-
postBody = assign({
|
|
108
|
-
displayName: name,
|
|
109
|
-
mailEnabled: groupType === GroupType.Office365,
|
|
110
|
-
mailNickname: mailNickname,
|
|
111
|
-
securityEnabled: groupType !== GroupType.Office365,
|
|
112
|
-
}, additionalProperties);
|
|
113
|
-
// include a group type if required
|
|
114
|
-
if (groupType !== GroupType.Security) {
|
|
115
|
-
postBody = assign(postBody, {
|
|
116
|
-
groupTypes: groupType === GroupType.Office365 ? ["Unified"] : ["DynamicMembership"],
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
120
|
-
case 1:
|
|
121
|
-
data = _a.sent();
|
|
122
|
-
return [2 /*return*/, {
|
|
123
|
-
data: data,
|
|
124
|
-
group: this.getById(data.id),
|
|
125
|
-
}];
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
_Groups = __decorate([
|
|
131
|
-
defaultPath("groups"),
|
|
132
|
-
getById(Group)
|
|
133
|
-
], _Groups);
|
|
134
|
-
return _Groups;
|
|
135
|
-
}(_GraphQueryableSearchableCollection));
|
|
136
|
-
export { _Groups };
|
|
137
|
-
export var Groups = graphInvokableFactory(_Groups);
|
|
1
|
+
import { __awaiter, __decorate, __extends, __generator } from "tslib";
|
|
2
|
+
import { assign } from "@pnp/common";
|
|
3
|
+
import { body } from "@pnp/odata";
|
|
4
|
+
import { _GraphQueryableSearchableCollection, graphInvokableFactory } from "../graphqueryable.js";
|
|
5
|
+
import { defaultPath, deleteable, updateable, getById } from "../decorators.js";
|
|
6
|
+
import { graphPost } from "../operations.js";
|
|
7
|
+
import { _DirectoryObject } from "../directory-objects/types.js";
|
|
8
|
+
export var GroupType;
|
|
9
|
+
(function (GroupType) {
|
|
10
|
+
/**
|
|
11
|
+
* Office 365 (aka unified group)
|
|
12
|
+
*/
|
|
13
|
+
GroupType[GroupType["Office365"] = 0] = "Office365";
|
|
14
|
+
/**
|
|
15
|
+
* Dynamic membership
|
|
16
|
+
*/
|
|
17
|
+
GroupType[GroupType["Dynamic"] = 1] = "Dynamic";
|
|
18
|
+
/**
|
|
19
|
+
* Security
|
|
20
|
+
*/
|
|
21
|
+
GroupType[GroupType["Security"] = 2] = "Security";
|
|
22
|
+
})(GroupType || (GroupType = {}));
|
|
23
|
+
/**
|
|
24
|
+
* Represents a group entity
|
|
25
|
+
*/
|
|
26
|
+
var _Group = /** @class */ (function (_super) {
|
|
27
|
+
__extends(_Group, _super);
|
|
28
|
+
function _Group() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
33
|
+
*/
|
|
34
|
+
_Group.prototype.addFavorite = function () {
|
|
35
|
+
return graphPost(this.clone(Group, "addFavorite"));
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups
|
|
39
|
+
*/
|
|
40
|
+
_Group.prototype.removeFavorite = function () {
|
|
41
|
+
return graphPost(this.clone(Group, "removeFavorite"));
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Reset the unseenCount of all the posts that the current user has not seen since their last visit
|
|
45
|
+
*/
|
|
46
|
+
_Group.prototype.resetUnseenCount = function () {
|
|
47
|
+
return graphPost(this.clone(Group, "resetUnseenCount"));
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Calling this method will enable the current user to receive email notifications for this group,
|
|
51
|
+
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
52
|
+
*/
|
|
53
|
+
_Group.prototype.subscribeByMail = function () {
|
|
54
|
+
return graphPost(this.clone(Group, "subscribeByMail"));
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Calling this method will prevent the current user from receiving email notifications for this group
|
|
58
|
+
* about new posts, events, and files in that group. Supported for only Office 365 groups
|
|
59
|
+
*/
|
|
60
|
+
_Group.prototype.unsubscribeByMail = function () {
|
|
61
|
+
return graphPost(this.clone(Group, "unsubscribeByMail"));
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group
|
|
65
|
+
*
|
|
66
|
+
* @param start Start date and time of the time range
|
|
67
|
+
* @param end End date and time of the time range
|
|
68
|
+
*/
|
|
69
|
+
_Group.prototype.getCalendarView = function (start, end) {
|
|
70
|
+
var view = this.clone(Group, "calendarView");
|
|
71
|
+
view.query.set("startDateTime", start.toISOString());
|
|
72
|
+
view.query.set("endDateTime", end.toISOString());
|
|
73
|
+
return view();
|
|
74
|
+
};
|
|
75
|
+
_Group = __decorate([
|
|
76
|
+
deleteable(),
|
|
77
|
+
updateable()
|
|
78
|
+
], _Group);
|
|
79
|
+
return _Group;
|
|
80
|
+
}(_DirectoryObject));
|
|
81
|
+
export { _Group };
|
|
82
|
+
export var Group = graphInvokableFactory(_Group);
|
|
83
|
+
/**
|
|
84
|
+
* Describes a collection of Field objects
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
var _Groups = /** @class */ (function (_super) {
|
|
88
|
+
__extends(_Groups, _super);
|
|
89
|
+
function _Groups() {
|
|
90
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create a new group as specified in the request body.
|
|
94
|
+
*
|
|
95
|
+
* @param name Name to display in the address book for the group
|
|
96
|
+
* @param mailNickname Mail alias for the group
|
|
97
|
+
* @param groupType Type of group being created
|
|
98
|
+
* @param additionalProperties A plain object collection of additional properties you want to set on the new group
|
|
99
|
+
*/
|
|
100
|
+
_Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) {
|
|
101
|
+
if (additionalProperties === void 0) { additionalProperties = {}; }
|
|
102
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
+
var postBody, data;
|
|
104
|
+
return __generator(this, function (_a) {
|
|
105
|
+
switch (_a.label) {
|
|
106
|
+
case 0:
|
|
107
|
+
postBody = assign({
|
|
108
|
+
displayName: name,
|
|
109
|
+
mailEnabled: groupType === GroupType.Office365,
|
|
110
|
+
mailNickname: mailNickname,
|
|
111
|
+
securityEnabled: groupType !== GroupType.Office365,
|
|
112
|
+
}, additionalProperties);
|
|
113
|
+
// include a group type if required
|
|
114
|
+
if (groupType !== GroupType.Security) {
|
|
115
|
+
postBody = assign(postBody, {
|
|
116
|
+
groupTypes: groupType === GroupType.Office365 ? ["Unified"] : ["DynamicMembership"],
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
120
|
+
case 1:
|
|
121
|
+
data = _a.sent();
|
|
122
|
+
return [2 /*return*/, {
|
|
123
|
+
data: data,
|
|
124
|
+
group: this.getById(data.id),
|
|
125
|
+
}];
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
_Groups = __decorate([
|
|
131
|
+
defaultPath("groups"),
|
|
132
|
+
getById(Group)
|
|
133
|
+
], _Groups);
|
|
134
|
+
return _Groups;
|
|
135
|
+
}(_GraphQueryableSearchableCollection));
|
|
136
|
+
export { _Groups };
|
|
137
|
+
export var Groups = graphInvokableFactory(_Groups);
|
|
138
138
|
//# sourceMappingURL=types.js.map
|
package/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { graph, GraphRest } from "./rest.js";
|
|
2
|
-
export { GraphBatch, } from "./batch.js";
|
|
3
|
-
export { IGraphQueryableCollection, IGraphQueryableInstance, IGraphQueryableSearchableCollection, GraphQueryable, IGraphQueryable, GraphQueryableCollection, GraphQueryableInstance, IGraphQueryableConstructor, GraphQueryableSearchableCollection, } from "./graphqueryable.js";
|
|
4
|
-
export { IGraphConfiguration, IGraphConfigurationPart, } from "./graphlibconfig";
|
|
5
|
-
export * from "./graphhttpclient.js";
|
|
6
|
-
export * from "./types.js";
|
|
7
|
-
export * from "./operations.js";
|
|
8
|
-
export { toAbsoluteUrl, } from "./utils/toabsoluteurl.js";
|
|
1
|
+
export { graph, GraphRest } from "./rest.js";
|
|
2
|
+
export { GraphBatch, } from "./batch.js";
|
|
3
|
+
export { IGraphQueryableCollection, IGraphQueryableInstance, IGraphQueryableSearchableCollection, GraphQueryable, IGraphQueryable, GraphQueryableCollection, GraphQueryableInstance, IGraphQueryableConstructor, GraphQueryableSearchableCollection, } from "./graphqueryable.js";
|
|
4
|
+
export { IGraphConfiguration, IGraphConfigurationPart, } from "./graphlibconfig";
|
|
5
|
+
export * from "./graphhttpclient.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
|
+
export * from "./operations.js";
|
|
8
|
+
export { toAbsoluteUrl, } from "./utils/toabsoluteurl.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { graph, GraphRest } from "./rest.js";
|
|
2
|
-
export { GraphBatch, } from "./batch.js";
|
|
3
|
-
export { GraphQueryable, GraphQueryableCollection, GraphQueryableInstance, GraphQueryableSearchableCollection, } from "./graphqueryable.js";
|
|
4
|
-
export * from "./graphhttpclient.js";
|
|
5
|
-
export * from "./types.js";
|
|
6
|
-
export * from "./operations.js";
|
|
7
|
-
export { toAbsoluteUrl, } from "./utils/toabsoluteurl.js";
|
|
1
|
+
export { graph, GraphRest } from "./rest.js";
|
|
2
|
+
export { GraphBatch, } from "./batch.js";
|
|
3
|
+
export { GraphQueryable, GraphQueryableCollection, GraphQueryableInstance, GraphQueryableSearchableCollection, } from "./graphqueryable.js";
|
|
4
|
+
export * from "./graphhttpclient.js";
|
|
5
|
+
export * from "./types.js";
|
|
6
|
+
export * from "./operations.js";
|
|
7
|
+
export { toAbsoluteUrl, } from "./utils/toabsoluteurl.js";
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/insights/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./users.js";
|
|
2
|
-
export { IInsights, ISharedInsight, ISharedInsights, ITrendingInsight, ITrendingInsights, IUsedInsight, IUsedInsights, Insights, SharedInsight, SharedInsights, TrendingInsight, TrendingInsights, UsedInsight, UsedInsights, IResource, Resource, } from "./types.js";
|
|
1
|
+
import "./users.js";
|
|
2
|
+
export { IInsights, ISharedInsight, ISharedInsights, ITrendingInsight, ITrendingInsights, IUsedInsight, IUsedInsights, Insights, SharedInsight, SharedInsights, TrendingInsight, TrendingInsights, UsedInsight, UsedInsights, IResource, Resource, } from "./types.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/insights/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./users.js";
|
|
2
|
-
export { Insights, SharedInsight, SharedInsights, TrendingInsight, TrendingInsights, UsedInsight, UsedInsights, Resource, } from "./types.js";
|
|
1
|
+
import "./users.js";
|
|
2
|
+
export { Insights, SharedInsight, SharedInsights, TrendingInsight, TrendingInsights, UsedInsight, UsedInsights, Resource, } from "./types.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/insights/types.d.ts
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { OfficeGraphInsights as IOfficeGraphInsightsType, Trending as ITrendingInsightType, UsedInsight as IUsedInsightType, SharedInsight as ISharedInsightType, Entity as IEntityType } from "@microsoft/microsoft-graph-types";
|
|
2
|
-
import { _GraphQueryableInstance, _GraphQueryableCollection } from "../graphqueryable.js";
|
|
3
|
-
import { IGetById } from "../decorators.js";
|
|
4
|
-
/**
|
|
5
|
-
* Represents a insights entity
|
|
6
|
-
*/
|
|
7
|
-
export declare class _Insights extends _GraphQueryableInstance<IOfficeGraphInsightsType> {
|
|
8
|
-
get trending(): ITrendingInsights;
|
|
9
|
-
get used(): IUsedInsights;
|
|
10
|
-
get shared(): ISharedInsights;
|
|
11
|
-
}
|
|
12
|
-
export interface IInsights extends _Insights {
|
|
13
|
-
}
|
|
14
|
-
export declare const Insights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
15
|
-
/**
|
|
16
|
-
* Describes a Trending Insight instance
|
|
17
|
-
*/
|
|
18
|
-
export declare class _TrendingInsight extends _GraphQueryableInstance<ITrendingInsightType> {
|
|
19
|
-
get resource(): IResource;
|
|
20
|
-
}
|
|
21
|
-
export interface ITrendingInsight extends _TrendingInsight {
|
|
22
|
-
}
|
|
23
|
-
export declare const TrendingInsight: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ITrendingInsight & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
24
|
-
/**
|
|
25
|
-
* Describes a collection of Trending Insight objects
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
export declare class _TrendingInsights extends _GraphQueryableCollection<ITrendingInsightType[]> {
|
|
29
|
-
}
|
|
30
|
-
export interface ITrendingInsights extends _TrendingInsights, IGetById<ITrendingInsight> {
|
|
31
|
-
}
|
|
32
|
-
export declare const TrendingInsights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ITrendingInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
33
|
-
/**
|
|
34
|
-
* Describes a Used Insight instance
|
|
35
|
-
*/
|
|
36
|
-
export declare class _UsedInsight extends _GraphQueryableInstance<IUsedInsightType> {
|
|
37
|
-
get resource(): IResource;
|
|
38
|
-
}
|
|
39
|
-
export interface IUsedInsight extends _UsedInsight {
|
|
40
|
-
}
|
|
41
|
-
export declare const UsedInsight: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUsedInsight & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
42
|
-
/**
|
|
43
|
-
* Describes a collection of Used Insight objects
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
export declare class _UsedInsights extends _GraphQueryableCollection<IUsedInsightType[]> {
|
|
47
|
-
}
|
|
48
|
-
export interface IUsedInsights extends _UsedInsights, IGetById<IUsedInsight> {
|
|
49
|
-
}
|
|
50
|
-
export declare const UsedInsights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUsedInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
51
|
-
/**
|
|
52
|
-
* Describes a Shared Insight instance
|
|
53
|
-
*/
|
|
54
|
-
export declare class _SharedInsight extends _GraphQueryableInstance<ISharedInsightType> {
|
|
55
|
-
get resource(): IResource;
|
|
56
|
-
}
|
|
57
|
-
export interface ISharedInsight extends _SharedInsight {
|
|
58
|
-
}
|
|
59
|
-
export declare const SharedInsight: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISharedInsight & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
60
|
-
/**
|
|
61
|
-
* Describes a collection of Shared Insight objects
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
export declare class _SharedInsights extends _GraphQueryableCollection<ISharedInsightType[]> {
|
|
65
|
-
}
|
|
66
|
-
export interface ISharedInsights extends _SharedInsights, IGetById<ISharedInsight> {
|
|
67
|
-
}
|
|
68
|
-
export declare const SharedInsights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISharedInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
69
|
-
/**
|
|
70
|
-
* Describes a Resource Entity instance
|
|
71
|
-
*/
|
|
72
|
-
export declare class _Resource extends _GraphQueryableInstance<IEntityType> {
|
|
73
|
-
}
|
|
74
|
-
export interface IResource extends _Resource {
|
|
75
|
-
}
|
|
76
|
-
export declare const Resource: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IResource & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
1
|
+
import { OfficeGraphInsights as IOfficeGraphInsightsType, Trending as ITrendingInsightType, UsedInsight as IUsedInsightType, SharedInsight as ISharedInsightType, Entity as IEntityType } from "@microsoft/microsoft-graph-types";
|
|
2
|
+
import { _GraphQueryableInstance, _GraphQueryableCollection } from "../graphqueryable.js";
|
|
3
|
+
import { IGetById } from "../decorators.js";
|
|
4
|
+
/**
|
|
5
|
+
* Represents a insights entity
|
|
6
|
+
*/
|
|
7
|
+
export declare class _Insights extends _GraphQueryableInstance<IOfficeGraphInsightsType> {
|
|
8
|
+
get trending(): ITrendingInsights;
|
|
9
|
+
get used(): IUsedInsights;
|
|
10
|
+
get shared(): ISharedInsights;
|
|
11
|
+
}
|
|
12
|
+
export interface IInsights extends _Insights {
|
|
13
|
+
}
|
|
14
|
+
export declare const Insights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Describes a Trending Insight instance
|
|
17
|
+
*/
|
|
18
|
+
export declare class _TrendingInsight extends _GraphQueryableInstance<ITrendingInsightType> {
|
|
19
|
+
get resource(): IResource;
|
|
20
|
+
}
|
|
21
|
+
export interface ITrendingInsight extends _TrendingInsight {
|
|
22
|
+
}
|
|
23
|
+
export declare const TrendingInsight: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ITrendingInsight & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Describes a collection of Trending Insight objects
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare class _TrendingInsights extends _GraphQueryableCollection<ITrendingInsightType[]> {
|
|
29
|
+
}
|
|
30
|
+
export interface ITrendingInsights extends _TrendingInsights, IGetById<ITrendingInsight> {
|
|
31
|
+
}
|
|
32
|
+
export declare const TrendingInsights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ITrendingInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Describes a Used Insight instance
|
|
35
|
+
*/
|
|
36
|
+
export declare class _UsedInsight extends _GraphQueryableInstance<IUsedInsightType> {
|
|
37
|
+
get resource(): IResource;
|
|
38
|
+
}
|
|
39
|
+
export interface IUsedInsight extends _UsedInsight {
|
|
40
|
+
}
|
|
41
|
+
export declare const UsedInsight: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUsedInsight & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
42
|
+
/**
|
|
43
|
+
* Describes a collection of Used Insight objects
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
export declare class _UsedInsights extends _GraphQueryableCollection<IUsedInsightType[]> {
|
|
47
|
+
}
|
|
48
|
+
export interface IUsedInsights extends _UsedInsights, IGetById<IUsedInsight> {
|
|
49
|
+
}
|
|
50
|
+
export declare const UsedInsights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUsedInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Describes a Shared Insight instance
|
|
53
|
+
*/
|
|
54
|
+
export declare class _SharedInsight extends _GraphQueryableInstance<ISharedInsightType> {
|
|
55
|
+
get resource(): IResource;
|
|
56
|
+
}
|
|
57
|
+
export interface ISharedInsight extends _SharedInsight {
|
|
58
|
+
}
|
|
59
|
+
export declare const SharedInsight: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISharedInsight & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
60
|
+
/**
|
|
61
|
+
* Describes a collection of Shared Insight objects
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
export declare class _SharedInsights extends _GraphQueryableCollection<ISharedInsightType[]> {
|
|
65
|
+
}
|
|
66
|
+
export interface ISharedInsights extends _SharedInsights, IGetById<ISharedInsight> {
|
|
67
|
+
}
|
|
68
|
+
export declare const SharedInsights: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISharedInsights & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
69
|
+
/**
|
|
70
|
+
* Describes a Resource Entity instance
|
|
71
|
+
*/
|
|
72
|
+
export declare class _Resource extends _GraphQueryableInstance<IEntityType> {
|
|
73
|
+
}
|
|
74
|
+
export interface IResource extends _Resource {
|
|
75
|
+
}
|
|
76
|
+
export declare const Resource: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IResource & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
|
|
77
77
|
//# sourceMappingURL=types.d.ts.map
|