@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/planner/types.js
CHANGED
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
import { __awaiter, __decorate, __extends, __generator } from "tslib";
|
|
2
|
-
import { assign } from "@pnp/common";
|
|
3
|
-
import { body } from "@pnp/odata";
|
|
4
|
-
import { _GraphQueryableInstance, _GraphQueryableCollection, graphInvokableFactory } from "../graphqueryable.js";
|
|
5
|
-
import { getById, deleteableWithETag, updateableWithETag } from "../decorators.js";
|
|
6
|
-
import { graphPost } from "../operations.js";
|
|
7
|
-
import { defaultPath } from "../decorators.js";
|
|
8
|
-
/**
|
|
9
|
-
* Planner
|
|
10
|
-
*/
|
|
11
|
-
var _Planner = /** @class */ (function (_super) {
|
|
12
|
-
__extends(_Planner, _super);
|
|
13
|
-
function _Planner() {
|
|
14
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(_Planner.prototype, "plans", {
|
|
17
|
-
// Should Only be able to get by id, or else error occur
|
|
18
|
-
get: function () {
|
|
19
|
-
return Plans(this);
|
|
20
|
-
},
|
|
21
|
-
enumerable: false,
|
|
22
|
-
configurable: true
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(_Planner.prototype, "tasks", {
|
|
25
|
-
// Should Only be able to get by id, or else error occur
|
|
26
|
-
get: function () {
|
|
27
|
-
return Tasks(this);
|
|
28
|
-
},
|
|
29
|
-
enumerable: false,
|
|
30
|
-
configurable: true
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(_Planner.prototype, "buckets", {
|
|
33
|
-
// Should Only be able to get by id, or else error occur
|
|
34
|
-
get: function () {
|
|
35
|
-
return Buckets(this);
|
|
36
|
-
},
|
|
37
|
-
enumerable: false,
|
|
38
|
-
configurable: true
|
|
39
|
-
});
|
|
40
|
-
_Planner = __decorate([
|
|
41
|
-
defaultPath("planner")
|
|
42
|
-
], _Planner);
|
|
43
|
-
return _Planner;
|
|
44
|
-
}(_GraphQueryableInstance));
|
|
45
|
-
export { _Planner };
|
|
46
|
-
export var Planner = graphInvokableFactory(_Planner);
|
|
47
|
-
/**
|
|
48
|
-
* Details
|
|
49
|
-
*/
|
|
50
|
-
var _PlanDetails = /** @class */ (function (_super) {
|
|
51
|
-
__extends(_PlanDetails, _super);
|
|
52
|
-
function _PlanDetails() {
|
|
53
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
54
|
-
}
|
|
55
|
-
_PlanDetails = __decorate([
|
|
56
|
-
defaultPath("details"),
|
|
57
|
-
updateableWithETag()
|
|
58
|
-
], _PlanDetails);
|
|
59
|
-
return _PlanDetails;
|
|
60
|
-
}(_GraphQueryableInstance));
|
|
61
|
-
export { _PlanDetails };
|
|
62
|
-
export var PlanDetails = graphInvokableFactory(_PlanDetails);
|
|
63
|
-
/**
|
|
64
|
-
* Plan
|
|
65
|
-
*/
|
|
66
|
-
var _Plan = /** @class */ (function (_super) {
|
|
67
|
-
__extends(_Plan, _super);
|
|
68
|
-
function _Plan() {
|
|
69
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
70
|
-
}
|
|
71
|
-
Object.defineProperty(_Plan.prototype, "tasks", {
|
|
72
|
-
get: function () {
|
|
73
|
-
return Tasks(this);
|
|
74
|
-
},
|
|
75
|
-
enumerable: false,
|
|
76
|
-
configurable: true
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(_Plan.prototype, "buckets", {
|
|
79
|
-
get: function () {
|
|
80
|
-
return Buckets(this);
|
|
81
|
-
},
|
|
82
|
-
enumerable: false,
|
|
83
|
-
configurable: true
|
|
84
|
-
});
|
|
85
|
-
Object.defineProperty(_Plan.prototype, "details", {
|
|
86
|
-
get: function () {
|
|
87
|
-
return PlanDetails(this);
|
|
88
|
-
},
|
|
89
|
-
enumerable: false,
|
|
90
|
-
configurable: true
|
|
91
|
-
});
|
|
92
|
-
_Plan = __decorate([
|
|
93
|
-
updateableWithETag(),
|
|
94
|
-
deleteableWithETag()
|
|
95
|
-
], _Plan);
|
|
96
|
-
return _Plan;
|
|
97
|
-
}(_GraphQueryableInstance));
|
|
98
|
-
export { _Plan };
|
|
99
|
-
export var Plan = graphInvokableFactory(_Plan);
|
|
100
|
-
var _Plans = /** @class */ (function (_super) {
|
|
101
|
-
__extends(_Plans, _super);
|
|
102
|
-
function _Plans() {
|
|
103
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Create a new Planner Plan.
|
|
107
|
-
*
|
|
108
|
-
* @param owner Id of Group object.
|
|
109
|
-
* @param title The Title of the Plan.
|
|
110
|
-
*/
|
|
111
|
-
_Plans.prototype.add = function (owner, title) {
|
|
112
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
113
|
-
var data;
|
|
114
|
-
return __generator(this, function (_a) {
|
|
115
|
-
switch (_a.label) {
|
|
116
|
-
case 0: return [4 /*yield*/, graphPost(this, body({ owner: owner, title: title }))];
|
|
117
|
-
case 1:
|
|
118
|
-
data = _a.sent();
|
|
119
|
-
return [2 /*return*/, {
|
|
120
|
-
data: data,
|
|
121
|
-
plan: this.getById(data.id),
|
|
122
|
-
}];
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
_Plans = __decorate([
|
|
128
|
-
defaultPath("plans"),
|
|
129
|
-
getById(Plan)
|
|
130
|
-
], _Plans);
|
|
131
|
-
return _Plans;
|
|
132
|
-
}(_GraphQueryableCollection));
|
|
133
|
-
export { _Plans };
|
|
134
|
-
export var Plans = graphInvokableFactory(_Plans);
|
|
135
|
-
/**
|
|
136
|
-
* Details
|
|
137
|
-
*/
|
|
138
|
-
var _TaskDetails = /** @class */ (function (_super) {
|
|
139
|
-
__extends(_TaskDetails, _super);
|
|
140
|
-
function _TaskDetails() {
|
|
141
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
142
|
-
}
|
|
143
|
-
_TaskDetails = __decorate([
|
|
144
|
-
defaultPath("details"),
|
|
145
|
-
updateableWithETag()
|
|
146
|
-
], _TaskDetails);
|
|
147
|
-
return _TaskDetails;
|
|
148
|
-
}(_GraphQueryableInstance));
|
|
149
|
-
export { _TaskDetails };
|
|
150
|
-
export var TaskDetails = graphInvokableFactory(_TaskDetails);
|
|
151
|
-
/**
|
|
152
|
-
* Task
|
|
153
|
-
*/
|
|
154
|
-
var _Task = /** @class */ (function (_super) {
|
|
155
|
-
__extends(_Task, _super);
|
|
156
|
-
function _Task() {
|
|
157
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
158
|
-
}
|
|
159
|
-
Object.defineProperty(_Task.prototype, "details", {
|
|
160
|
-
get: function () {
|
|
161
|
-
return TaskDetails(this);
|
|
162
|
-
},
|
|
163
|
-
enumerable: false,
|
|
164
|
-
configurable: true
|
|
165
|
-
});
|
|
166
|
-
_Task = __decorate([
|
|
167
|
-
updateableWithETag(),
|
|
168
|
-
deleteableWithETag()
|
|
169
|
-
], _Task);
|
|
170
|
-
return _Task;
|
|
171
|
-
}(_GraphQueryableInstance));
|
|
172
|
-
export { _Task };
|
|
173
|
-
export var Task = graphInvokableFactory(_Task);
|
|
174
|
-
/**
|
|
175
|
-
* Tasks
|
|
176
|
-
*/
|
|
177
|
-
var _Tasks = /** @class */ (function (_super) {
|
|
178
|
-
__extends(_Tasks, _super);
|
|
179
|
-
function _Tasks() {
|
|
180
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Create a new Planner Task.
|
|
184
|
-
*
|
|
185
|
-
* @param planId Id of Plan.
|
|
186
|
-
* @param title The Title of the Task.
|
|
187
|
-
* @param assignments Assign the task
|
|
188
|
-
* @param bucketId Id of Bucket
|
|
189
|
-
*/
|
|
190
|
-
_Tasks.prototype.add = function (planId, title, assignments, bucketId) {
|
|
191
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
-
var postBody, data;
|
|
193
|
-
return __generator(this, function (_a) {
|
|
194
|
-
switch (_a.label) {
|
|
195
|
-
case 0:
|
|
196
|
-
postBody = assign({
|
|
197
|
-
planId: planId,
|
|
198
|
-
title: title,
|
|
199
|
-
}, assignments);
|
|
200
|
-
if (bucketId) {
|
|
201
|
-
postBody = assign(postBody, {
|
|
202
|
-
bucketId: bucketId,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
206
|
-
case 1:
|
|
207
|
-
data = _a.sent();
|
|
208
|
-
return [2 /*return*/, {
|
|
209
|
-
data: data,
|
|
210
|
-
task: this.getById(data.id),
|
|
211
|
-
}];
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
};
|
|
216
|
-
_Tasks = __decorate([
|
|
217
|
-
defaultPath("tasks"),
|
|
218
|
-
getById(Task)
|
|
219
|
-
], _Tasks);
|
|
220
|
-
return _Tasks;
|
|
221
|
-
}(_GraphQueryableCollection));
|
|
222
|
-
export { _Tasks };
|
|
223
|
-
export var Tasks = graphInvokableFactory(_Tasks);
|
|
224
|
-
/**
|
|
225
|
-
* Bucket
|
|
226
|
-
*/
|
|
227
|
-
var _Bucket = /** @class */ (function (_super) {
|
|
228
|
-
__extends(_Bucket, _super);
|
|
229
|
-
function _Bucket() {
|
|
230
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
231
|
-
}
|
|
232
|
-
Object.defineProperty(_Bucket.prototype, "tasks", {
|
|
233
|
-
get: function () {
|
|
234
|
-
return Tasks(this);
|
|
235
|
-
},
|
|
236
|
-
enumerable: false,
|
|
237
|
-
configurable: true
|
|
238
|
-
});
|
|
239
|
-
_Bucket = __decorate([
|
|
240
|
-
updateableWithETag(),
|
|
241
|
-
deleteableWithETag()
|
|
242
|
-
], _Bucket);
|
|
243
|
-
return _Bucket;
|
|
244
|
-
}(_GraphQueryableInstance));
|
|
245
|
-
export { _Bucket };
|
|
246
|
-
export var Bucket = graphInvokableFactory(_Bucket);
|
|
247
|
-
/**
|
|
248
|
-
* Buckets
|
|
249
|
-
*/
|
|
250
|
-
var _Buckets = /** @class */ (function (_super) {
|
|
251
|
-
__extends(_Buckets, _super);
|
|
252
|
-
function _Buckets() {
|
|
253
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Create a new Bucket.
|
|
257
|
-
*
|
|
258
|
-
* @param name Name of Bucket object.
|
|
259
|
-
* @param planId The Id of the Plan.
|
|
260
|
-
* @param oderHint Hint used to order items of this type in a list view.
|
|
261
|
-
*/
|
|
262
|
-
_Buckets.prototype.add = function (name, planId, orderHint) {
|
|
263
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
264
|
-
var postBody, data;
|
|
265
|
-
return __generator(this, function (_a) {
|
|
266
|
-
switch (_a.label) {
|
|
267
|
-
case 0:
|
|
268
|
-
postBody = {
|
|
269
|
-
name: name,
|
|
270
|
-
orderHint: orderHint ? orderHint : "",
|
|
271
|
-
planId: planId,
|
|
272
|
-
};
|
|
273
|
-
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
274
|
-
case 1:
|
|
275
|
-
data = _a.sent();
|
|
276
|
-
return [2 /*return*/, {
|
|
277
|
-
bucket: this.getById(data.id),
|
|
278
|
-
data: data,
|
|
279
|
-
}];
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
_Buckets = __decorate([
|
|
285
|
-
defaultPath("buckets"),
|
|
286
|
-
getById(Bucket)
|
|
287
|
-
], _Buckets);
|
|
288
|
-
return _Buckets;
|
|
289
|
-
}(_GraphQueryableCollection));
|
|
290
|
-
export { _Buckets };
|
|
291
|
-
export var Buckets = graphInvokableFactory(_Buckets);
|
|
1
|
+
import { __awaiter, __decorate, __extends, __generator } from "tslib";
|
|
2
|
+
import { assign } from "@pnp/common";
|
|
3
|
+
import { body } from "@pnp/odata";
|
|
4
|
+
import { _GraphQueryableInstance, _GraphQueryableCollection, graphInvokableFactory } from "../graphqueryable.js";
|
|
5
|
+
import { getById, deleteableWithETag, updateableWithETag } from "../decorators.js";
|
|
6
|
+
import { graphPost } from "../operations.js";
|
|
7
|
+
import { defaultPath } from "../decorators.js";
|
|
8
|
+
/**
|
|
9
|
+
* Planner
|
|
10
|
+
*/
|
|
11
|
+
var _Planner = /** @class */ (function (_super) {
|
|
12
|
+
__extends(_Planner, _super);
|
|
13
|
+
function _Planner() {
|
|
14
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(_Planner.prototype, "plans", {
|
|
17
|
+
// Should Only be able to get by id, or else error occur
|
|
18
|
+
get: function () {
|
|
19
|
+
return Plans(this);
|
|
20
|
+
},
|
|
21
|
+
enumerable: false,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(_Planner.prototype, "tasks", {
|
|
25
|
+
// Should Only be able to get by id, or else error occur
|
|
26
|
+
get: function () {
|
|
27
|
+
return Tasks(this);
|
|
28
|
+
},
|
|
29
|
+
enumerable: false,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(_Planner.prototype, "buckets", {
|
|
33
|
+
// Should Only be able to get by id, or else error occur
|
|
34
|
+
get: function () {
|
|
35
|
+
return Buckets(this);
|
|
36
|
+
},
|
|
37
|
+
enumerable: false,
|
|
38
|
+
configurable: true
|
|
39
|
+
});
|
|
40
|
+
_Planner = __decorate([
|
|
41
|
+
defaultPath("planner")
|
|
42
|
+
], _Planner);
|
|
43
|
+
return _Planner;
|
|
44
|
+
}(_GraphQueryableInstance));
|
|
45
|
+
export { _Planner };
|
|
46
|
+
export var Planner = graphInvokableFactory(_Planner);
|
|
47
|
+
/**
|
|
48
|
+
* Details
|
|
49
|
+
*/
|
|
50
|
+
var _PlanDetails = /** @class */ (function (_super) {
|
|
51
|
+
__extends(_PlanDetails, _super);
|
|
52
|
+
function _PlanDetails() {
|
|
53
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
54
|
+
}
|
|
55
|
+
_PlanDetails = __decorate([
|
|
56
|
+
defaultPath("details"),
|
|
57
|
+
updateableWithETag()
|
|
58
|
+
], _PlanDetails);
|
|
59
|
+
return _PlanDetails;
|
|
60
|
+
}(_GraphQueryableInstance));
|
|
61
|
+
export { _PlanDetails };
|
|
62
|
+
export var PlanDetails = graphInvokableFactory(_PlanDetails);
|
|
63
|
+
/**
|
|
64
|
+
* Plan
|
|
65
|
+
*/
|
|
66
|
+
var _Plan = /** @class */ (function (_super) {
|
|
67
|
+
__extends(_Plan, _super);
|
|
68
|
+
function _Plan() {
|
|
69
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
70
|
+
}
|
|
71
|
+
Object.defineProperty(_Plan.prototype, "tasks", {
|
|
72
|
+
get: function () {
|
|
73
|
+
return Tasks(this);
|
|
74
|
+
},
|
|
75
|
+
enumerable: false,
|
|
76
|
+
configurable: true
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(_Plan.prototype, "buckets", {
|
|
79
|
+
get: function () {
|
|
80
|
+
return Buckets(this);
|
|
81
|
+
},
|
|
82
|
+
enumerable: false,
|
|
83
|
+
configurable: true
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(_Plan.prototype, "details", {
|
|
86
|
+
get: function () {
|
|
87
|
+
return PlanDetails(this);
|
|
88
|
+
},
|
|
89
|
+
enumerable: false,
|
|
90
|
+
configurable: true
|
|
91
|
+
});
|
|
92
|
+
_Plan = __decorate([
|
|
93
|
+
updateableWithETag(),
|
|
94
|
+
deleteableWithETag()
|
|
95
|
+
], _Plan);
|
|
96
|
+
return _Plan;
|
|
97
|
+
}(_GraphQueryableInstance));
|
|
98
|
+
export { _Plan };
|
|
99
|
+
export var Plan = graphInvokableFactory(_Plan);
|
|
100
|
+
var _Plans = /** @class */ (function (_super) {
|
|
101
|
+
__extends(_Plans, _super);
|
|
102
|
+
function _Plans() {
|
|
103
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Create a new Planner Plan.
|
|
107
|
+
*
|
|
108
|
+
* @param owner Id of Group object.
|
|
109
|
+
* @param title The Title of the Plan.
|
|
110
|
+
*/
|
|
111
|
+
_Plans.prototype.add = function (owner, title) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
113
|
+
var data;
|
|
114
|
+
return __generator(this, function (_a) {
|
|
115
|
+
switch (_a.label) {
|
|
116
|
+
case 0: return [4 /*yield*/, graphPost(this, body({ owner: owner, title: title }))];
|
|
117
|
+
case 1:
|
|
118
|
+
data = _a.sent();
|
|
119
|
+
return [2 /*return*/, {
|
|
120
|
+
data: data,
|
|
121
|
+
plan: this.getById(data.id),
|
|
122
|
+
}];
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
_Plans = __decorate([
|
|
128
|
+
defaultPath("plans"),
|
|
129
|
+
getById(Plan)
|
|
130
|
+
], _Plans);
|
|
131
|
+
return _Plans;
|
|
132
|
+
}(_GraphQueryableCollection));
|
|
133
|
+
export { _Plans };
|
|
134
|
+
export var Plans = graphInvokableFactory(_Plans);
|
|
135
|
+
/**
|
|
136
|
+
* Details
|
|
137
|
+
*/
|
|
138
|
+
var _TaskDetails = /** @class */ (function (_super) {
|
|
139
|
+
__extends(_TaskDetails, _super);
|
|
140
|
+
function _TaskDetails() {
|
|
141
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
142
|
+
}
|
|
143
|
+
_TaskDetails = __decorate([
|
|
144
|
+
defaultPath("details"),
|
|
145
|
+
updateableWithETag()
|
|
146
|
+
], _TaskDetails);
|
|
147
|
+
return _TaskDetails;
|
|
148
|
+
}(_GraphQueryableInstance));
|
|
149
|
+
export { _TaskDetails };
|
|
150
|
+
export var TaskDetails = graphInvokableFactory(_TaskDetails);
|
|
151
|
+
/**
|
|
152
|
+
* Task
|
|
153
|
+
*/
|
|
154
|
+
var _Task = /** @class */ (function (_super) {
|
|
155
|
+
__extends(_Task, _super);
|
|
156
|
+
function _Task() {
|
|
157
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
158
|
+
}
|
|
159
|
+
Object.defineProperty(_Task.prototype, "details", {
|
|
160
|
+
get: function () {
|
|
161
|
+
return TaskDetails(this);
|
|
162
|
+
},
|
|
163
|
+
enumerable: false,
|
|
164
|
+
configurable: true
|
|
165
|
+
});
|
|
166
|
+
_Task = __decorate([
|
|
167
|
+
updateableWithETag(),
|
|
168
|
+
deleteableWithETag()
|
|
169
|
+
], _Task);
|
|
170
|
+
return _Task;
|
|
171
|
+
}(_GraphQueryableInstance));
|
|
172
|
+
export { _Task };
|
|
173
|
+
export var Task = graphInvokableFactory(_Task);
|
|
174
|
+
/**
|
|
175
|
+
* Tasks
|
|
176
|
+
*/
|
|
177
|
+
var _Tasks = /** @class */ (function (_super) {
|
|
178
|
+
__extends(_Tasks, _super);
|
|
179
|
+
function _Tasks() {
|
|
180
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Create a new Planner Task.
|
|
184
|
+
*
|
|
185
|
+
* @param planId Id of Plan.
|
|
186
|
+
* @param title The Title of the Task.
|
|
187
|
+
* @param assignments Assign the task
|
|
188
|
+
* @param bucketId Id of Bucket
|
|
189
|
+
*/
|
|
190
|
+
_Tasks.prototype.add = function (planId, title, assignments, bucketId) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
+
var postBody, data;
|
|
193
|
+
return __generator(this, function (_a) {
|
|
194
|
+
switch (_a.label) {
|
|
195
|
+
case 0:
|
|
196
|
+
postBody = assign({
|
|
197
|
+
planId: planId,
|
|
198
|
+
title: title,
|
|
199
|
+
}, assignments);
|
|
200
|
+
if (bucketId) {
|
|
201
|
+
postBody = assign(postBody, {
|
|
202
|
+
bucketId: bucketId,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
206
|
+
case 1:
|
|
207
|
+
data = _a.sent();
|
|
208
|
+
return [2 /*return*/, {
|
|
209
|
+
data: data,
|
|
210
|
+
task: this.getById(data.id),
|
|
211
|
+
}];
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
_Tasks = __decorate([
|
|
217
|
+
defaultPath("tasks"),
|
|
218
|
+
getById(Task)
|
|
219
|
+
], _Tasks);
|
|
220
|
+
return _Tasks;
|
|
221
|
+
}(_GraphQueryableCollection));
|
|
222
|
+
export { _Tasks };
|
|
223
|
+
export var Tasks = graphInvokableFactory(_Tasks);
|
|
224
|
+
/**
|
|
225
|
+
* Bucket
|
|
226
|
+
*/
|
|
227
|
+
var _Bucket = /** @class */ (function (_super) {
|
|
228
|
+
__extends(_Bucket, _super);
|
|
229
|
+
function _Bucket() {
|
|
230
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
231
|
+
}
|
|
232
|
+
Object.defineProperty(_Bucket.prototype, "tasks", {
|
|
233
|
+
get: function () {
|
|
234
|
+
return Tasks(this);
|
|
235
|
+
},
|
|
236
|
+
enumerable: false,
|
|
237
|
+
configurable: true
|
|
238
|
+
});
|
|
239
|
+
_Bucket = __decorate([
|
|
240
|
+
updateableWithETag(),
|
|
241
|
+
deleteableWithETag()
|
|
242
|
+
], _Bucket);
|
|
243
|
+
return _Bucket;
|
|
244
|
+
}(_GraphQueryableInstance));
|
|
245
|
+
export { _Bucket };
|
|
246
|
+
export var Bucket = graphInvokableFactory(_Bucket);
|
|
247
|
+
/**
|
|
248
|
+
* Buckets
|
|
249
|
+
*/
|
|
250
|
+
var _Buckets = /** @class */ (function (_super) {
|
|
251
|
+
__extends(_Buckets, _super);
|
|
252
|
+
function _Buckets() {
|
|
253
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Create a new Bucket.
|
|
257
|
+
*
|
|
258
|
+
* @param name Name of Bucket object.
|
|
259
|
+
* @param planId The Id of the Plan.
|
|
260
|
+
* @param oderHint Hint used to order items of this type in a list view.
|
|
261
|
+
*/
|
|
262
|
+
_Buckets.prototype.add = function (name, planId, orderHint) {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
264
|
+
var postBody, data;
|
|
265
|
+
return __generator(this, function (_a) {
|
|
266
|
+
switch (_a.label) {
|
|
267
|
+
case 0:
|
|
268
|
+
postBody = {
|
|
269
|
+
name: name,
|
|
270
|
+
orderHint: orderHint ? orderHint : "",
|
|
271
|
+
planId: planId,
|
|
272
|
+
};
|
|
273
|
+
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
274
|
+
case 1:
|
|
275
|
+
data = _a.sent();
|
|
276
|
+
return [2 /*return*/, {
|
|
277
|
+
bucket: this.getById(data.id),
|
|
278
|
+
data: data,
|
|
279
|
+
}];
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
_Buckets = __decorate([
|
|
285
|
+
defaultPath("buckets"),
|
|
286
|
+
getById(Bucket)
|
|
287
|
+
], _Buckets);
|
|
288
|
+
return _Buckets;
|
|
289
|
+
}(_GraphQueryableCollection));
|
|
290
|
+
export { _Buckets };
|
|
291
|
+
export var Buckets = graphInvokableFactory(_Buckets);
|
|
292
292
|
//# sourceMappingURL=types.js.map
|
package/planner/users.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ITasks } from "./types.js";
|
|
2
|
-
declare module "../users/types" {
|
|
3
|
-
interface _User {
|
|
4
|
-
readonly tasks: ITasks;
|
|
5
|
-
}
|
|
6
|
-
interface IUser {
|
|
7
|
-
readonly tasks: ITasks;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
1
|
+
import { ITasks } from "./types.js";
|
|
2
|
+
declare module "../users/types" {
|
|
3
|
+
interface _User {
|
|
4
|
+
readonly tasks: ITasks;
|
|
5
|
+
}
|
|
6
|
+
interface IUser {
|
|
7
|
+
readonly tasks: ITasks;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
10
|
//# sourceMappingURL=users.d.ts.map
|
package/planner/users.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { addProp } from "@pnp/odata";
|
|
2
|
-
import { _User } from "../users/types.js";
|
|
3
|
-
import { Tasks } from "./types.js";
|
|
4
|
-
addProp(_User, "tasks", Tasks, "planner/tasks");
|
|
1
|
+
import { addProp } from "@pnp/odata";
|
|
2
|
+
import { _User } from "../users/types.js";
|
|
3
|
+
import { Tasks } from "./types.js";
|
|
4
|
+
addProp(_User, "tasks", Tasks, "planner/tasks");
|
|
5
5
|
//# sourceMappingURL=users.js.map
|