@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/sites/types.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { __decorate, __extends } from "tslib";
|
|
2
|
-
import { defaultPath } from "../decorators.js";
|
|
3
|
-
import { graphInvokableFactory, _GraphQueryableCollection, _GraphQueryableInstance } from "../graphqueryable.js";
|
|
4
|
-
/**
|
|
5
|
-
* Sites
|
|
6
|
-
*/
|
|
7
|
-
var _Sites = /** @class */ (function (_super) {
|
|
8
|
-
__extends(_Sites, _super);
|
|
9
|
-
function _Sites() {
|
|
10
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(_Sites.prototype, "root", {
|
|
13
|
-
/**
|
|
14
|
-
* Gets the team site for the group
|
|
15
|
-
*/
|
|
16
|
-
get: function () {
|
|
17
|
-
return this.clone(Site, "root");
|
|
18
|
-
},
|
|
19
|
-
enumerable: false,
|
|
20
|
-
configurable: true
|
|
21
|
-
});
|
|
22
|
-
_Sites = __decorate([
|
|
23
|
-
defaultPath("sites")
|
|
24
|
-
], _Sites);
|
|
25
|
-
return _Sites;
|
|
26
|
-
}(_GraphQueryableCollection));
|
|
27
|
-
export { _Sites };
|
|
28
|
-
export var Sites = graphInvokableFactory(_Sites);
|
|
29
|
-
/**
|
|
30
|
-
* Site
|
|
31
|
-
*/
|
|
32
|
-
var _Site = /** @class */ (function (_super) {
|
|
33
|
-
__extends(_Site, _super);
|
|
34
|
-
function _Site() {
|
|
35
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
-
}
|
|
37
|
-
Object.defineProperty(_Site.prototype, "sites", {
|
|
38
|
-
get: function () {
|
|
39
|
-
return this.clone(Sites);
|
|
40
|
-
},
|
|
41
|
-
enumerable: false,
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
|
-
return _Site;
|
|
45
|
-
}(_GraphQueryableInstance));
|
|
46
|
-
export { _Site };
|
|
47
|
-
export var Site = graphInvokableFactory(_Site);
|
|
1
|
+
import { __decorate, __extends } from "tslib";
|
|
2
|
+
import { defaultPath } from "../decorators.js";
|
|
3
|
+
import { graphInvokableFactory, _GraphQueryableCollection, _GraphQueryableInstance } from "../graphqueryable.js";
|
|
4
|
+
/**
|
|
5
|
+
* Sites
|
|
6
|
+
*/
|
|
7
|
+
var _Sites = /** @class */ (function (_super) {
|
|
8
|
+
__extends(_Sites, _super);
|
|
9
|
+
function _Sites() {
|
|
10
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(_Sites.prototype, "root", {
|
|
13
|
+
/**
|
|
14
|
+
* Gets the team site for the group
|
|
15
|
+
*/
|
|
16
|
+
get: function () {
|
|
17
|
+
return this.clone(Site, "root");
|
|
18
|
+
},
|
|
19
|
+
enumerable: false,
|
|
20
|
+
configurable: true
|
|
21
|
+
});
|
|
22
|
+
_Sites = __decorate([
|
|
23
|
+
defaultPath("sites")
|
|
24
|
+
], _Sites);
|
|
25
|
+
return _Sites;
|
|
26
|
+
}(_GraphQueryableCollection));
|
|
27
|
+
export { _Sites };
|
|
28
|
+
export var Sites = graphInvokableFactory(_Sites);
|
|
29
|
+
/**
|
|
30
|
+
* Site
|
|
31
|
+
*/
|
|
32
|
+
var _Site = /** @class */ (function (_super) {
|
|
33
|
+
__extends(_Site, _super);
|
|
34
|
+
function _Site() {
|
|
35
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(_Site.prototype, "sites", {
|
|
38
|
+
get: function () {
|
|
39
|
+
return this.clone(Sites);
|
|
40
|
+
},
|
|
41
|
+
enumerable: false,
|
|
42
|
+
configurable: true
|
|
43
|
+
});
|
|
44
|
+
return _Site;
|
|
45
|
+
}(_GraphQueryableInstance));
|
|
46
|
+
export { _Site };
|
|
47
|
+
export var Site = graphInvokableFactory(_Site);
|
|
48
48
|
//# sourceMappingURL=types.js.map
|
package/subscriptions/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ISubscriptions } from "./types.js";
|
|
2
|
-
export { ISubscription, ISubAddResult, ISubscriptions, Subscription, Subscriptions, } from "./types.js";
|
|
3
|
-
declare module "../rest" {
|
|
4
|
-
interface GraphRest {
|
|
5
|
-
readonly subscriptions: ISubscriptions;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
1
|
+
import { ISubscriptions } from "./types.js";
|
|
2
|
+
export { ISubscription, ISubAddResult, ISubscriptions, Subscription, Subscriptions, } from "./types.js";
|
|
3
|
+
declare module "../rest" {
|
|
4
|
+
interface GraphRest {
|
|
5
|
+
readonly subscriptions: ISubscriptions;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/subscriptions/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { GraphRest } from "../rest.js";
|
|
2
|
-
import { Subscriptions } from "./types.js";
|
|
3
|
-
export { Subscription, Subscriptions, } from "./types.js";
|
|
4
|
-
Reflect.defineProperty(GraphRest.prototype, "subscriptions", {
|
|
5
|
-
configurable: true,
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function () {
|
|
8
|
-
return this.childConfigHook(function (_a) {
|
|
9
|
-
var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
|
|
10
|
-
return Subscriptions(baseUrl).configure(options).setRuntime(runtime);
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
});
|
|
1
|
+
import { GraphRest } from "../rest.js";
|
|
2
|
+
import { Subscriptions } from "./types.js";
|
|
3
|
+
export { Subscription, Subscriptions, } from "./types.js";
|
|
4
|
+
Reflect.defineProperty(GraphRest.prototype, "subscriptions", {
|
|
5
|
+
configurable: true,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function () {
|
|
8
|
+
return this.childConfigHook(function (_a) {
|
|
9
|
+
var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
|
|
10
|
+
return Subscriptions(baseUrl).configure(options).setRuntime(runtime);
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/subscriptions/types.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { _GraphQueryableInstance, _GraphQueryableCollection } from "../graphqueryable.js";
|
|
2
|
-
import { Subscription as ISubscriptionType } from "@microsoft/microsoft-graph-types";
|
|
3
|
-
import { IDeleteable, IUpdateable, IGetById } from "../decorators.js";
|
|
4
|
-
/**
|
|
5
|
-
* Subscription
|
|
6
|
-
*/
|
|
7
|
-
export declare class _Subscription extends _GraphQueryableInstance<ISubscriptionType> {
|
|
8
|
-
}
|
|
9
|
-
export interface ISubscription extends _Subscription, IDeleteable, IUpdateable<ISubscriptionType> {
|
|
10
|
-
}
|
|
11
|
-
export declare const Subscription: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISubscription & import("@pnp/odata").IInvokable<any>;
|
|
12
|
-
/**
|
|
13
|
-
* Subscriptions
|
|
14
|
-
*/
|
|
15
|
-
export declare class _Subscriptions extends _GraphQueryableCollection<ISubscriptionType[]> {
|
|
16
|
-
/**
|
|
17
|
-
* Create a new Subscription.
|
|
18
|
-
*
|
|
19
|
-
* @param changeType Indicates the type of change in the subscribed resource that will raise a notification. The supported values are: created, updated, deleted.
|
|
20
|
-
* @param notificationUrl The URL of the endpoint that will receive the notifications. This URL must make use of the HTTPS protocol.
|
|
21
|
-
* @param resource Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/).
|
|
22
|
-
* @param expirationDateTime Specifies the date and time when the webhook subscription expires. The time is in UTC.
|
|
23
|
-
* @param props A plain object collection of additional properties you want to set on the new subscription
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
add(changeType: string, notificationUrl: string, resource: string, expirationDateTime: string, props?: ISubscriptionType): Promise<ISubAddResult>;
|
|
27
|
-
}
|
|
28
|
-
export interface ISubscriptions extends _Subscriptions, IGetById<ISubscription> {
|
|
29
|
-
}
|
|
30
|
-
export declare const Subscriptions: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISubscriptions & import("@pnp/odata").IInvokable<any>;
|
|
31
|
-
/**
|
|
32
|
-
* ISubAddResult
|
|
33
|
-
*/
|
|
34
|
-
export interface ISubAddResult {
|
|
35
|
-
data: ISubscriptionType;
|
|
36
|
-
subscription: ISubscription;
|
|
37
|
-
}
|
|
1
|
+
import { _GraphQueryableInstance, _GraphQueryableCollection } from "../graphqueryable.js";
|
|
2
|
+
import { Subscription as ISubscriptionType } from "@microsoft/microsoft-graph-types";
|
|
3
|
+
import { IDeleteable, IUpdateable, IGetById } from "../decorators.js";
|
|
4
|
+
/**
|
|
5
|
+
* Subscription
|
|
6
|
+
*/
|
|
7
|
+
export declare class _Subscription extends _GraphQueryableInstance<ISubscriptionType> {
|
|
8
|
+
}
|
|
9
|
+
export interface ISubscription extends _Subscription, IDeleteable, IUpdateable<ISubscriptionType> {
|
|
10
|
+
}
|
|
11
|
+
export declare const Subscription: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISubscription & import("@pnp/odata").IInvokable<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Subscriptions
|
|
14
|
+
*/
|
|
15
|
+
export declare class _Subscriptions extends _GraphQueryableCollection<ISubscriptionType[]> {
|
|
16
|
+
/**
|
|
17
|
+
* Create a new Subscription.
|
|
18
|
+
*
|
|
19
|
+
* @param changeType Indicates the type of change in the subscribed resource that will raise a notification. The supported values are: created, updated, deleted.
|
|
20
|
+
* @param notificationUrl The URL of the endpoint that will receive the notifications. This URL must make use of the HTTPS protocol.
|
|
21
|
+
* @param resource Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/).
|
|
22
|
+
* @param expirationDateTime Specifies the date and time when the webhook subscription expires. The time is in UTC.
|
|
23
|
+
* @param props A plain object collection of additional properties you want to set on the new subscription
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
add(changeType: string, notificationUrl: string, resource: string, expirationDateTime: string, props?: ISubscriptionType): Promise<ISubAddResult>;
|
|
27
|
+
}
|
|
28
|
+
export interface ISubscriptions extends _Subscriptions, IGetById<ISubscription> {
|
|
29
|
+
}
|
|
30
|
+
export declare const Subscriptions: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => ISubscriptions & import("@pnp/odata").IInvokable<any>;
|
|
31
|
+
/**
|
|
32
|
+
* ISubAddResult
|
|
33
|
+
*/
|
|
34
|
+
export interface ISubAddResult {
|
|
35
|
+
data: ISubscriptionType;
|
|
36
|
+
subscription: ISubscription;
|
|
37
|
+
}
|
|
38
38
|
//# sourceMappingURL=types.d.ts.map
|
package/subscriptions/types.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { __awaiter, __decorate, __extends, __generator } from "tslib";
|
|
2
|
-
import { _GraphQueryableInstance, _GraphQueryableCollection, graphInvokableFactory } from "../graphqueryable.js";
|
|
3
|
-
import { assign } from "@pnp/common";
|
|
4
|
-
import { body } from "@pnp/odata";
|
|
5
|
-
import { defaultPath, deleteable, updateable, getById } from "../decorators.js";
|
|
6
|
-
import { graphPost } from "../operations.js";
|
|
7
|
-
/**
|
|
8
|
-
* Subscription
|
|
9
|
-
*/
|
|
10
|
-
var _Subscription = /** @class */ (function (_super) {
|
|
11
|
-
__extends(_Subscription, _super);
|
|
12
|
-
function _Subscription() {
|
|
13
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
14
|
-
}
|
|
15
|
-
_Subscription = __decorate([
|
|
16
|
-
deleteable(),
|
|
17
|
-
updateable()
|
|
18
|
-
], _Subscription);
|
|
19
|
-
return _Subscription;
|
|
20
|
-
}(_GraphQueryableInstance));
|
|
21
|
-
export { _Subscription };
|
|
22
|
-
export var Subscription = graphInvokableFactory(_Subscription);
|
|
23
|
-
/**
|
|
24
|
-
* Subscriptions
|
|
25
|
-
*/
|
|
26
|
-
var _Subscriptions = /** @class */ (function (_super) {
|
|
27
|
-
__extends(_Subscriptions, _super);
|
|
28
|
-
function _Subscriptions() {
|
|
29
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Create a new Subscription.
|
|
33
|
-
*
|
|
34
|
-
* @param changeType Indicates the type of change in the subscribed resource that will raise a notification. The supported values are: created, updated, deleted.
|
|
35
|
-
* @param notificationUrl The URL of the endpoint that will receive the notifications. This URL must make use of the HTTPS protocol.
|
|
36
|
-
* @param resource Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/).
|
|
37
|
-
* @param expirationDateTime Specifies the date and time when the webhook subscription expires. The time is in UTC.
|
|
38
|
-
* @param props A plain object collection of additional properties you want to set on the new subscription
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
_Subscriptions.prototype.add = function (changeType, notificationUrl, resource, expirationDateTime, props) {
|
|
42
|
-
if (props === void 0) { props = {}; }
|
|
43
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
-
var postBody, data;
|
|
45
|
-
return __generator(this, function (_a) {
|
|
46
|
-
switch (_a.label) {
|
|
47
|
-
case 0:
|
|
48
|
-
postBody = assign({
|
|
49
|
-
changeType: changeType,
|
|
50
|
-
expirationDateTime: expirationDateTime,
|
|
51
|
-
notificationUrl: notificationUrl,
|
|
52
|
-
resource: resource,
|
|
53
|
-
}, props);
|
|
54
|
-
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
55
|
-
case 1:
|
|
56
|
-
data = _a.sent();
|
|
57
|
-
return [2 /*return*/, {
|
|
58
|
-
data: data,
|
|
59
|
-
subscription: this.getById(data.id),
|
|
60
|
-
}];
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
_Subscriptions = __decorate([
|
|
66
|
-
defaultPath("subscriptions"),
|
|
67
|
-
getById(Subscription)
|
|
68
|
-
], _Subscriptions);
|
|
69
|
-
return _Subscriptions;
|
|
70
|
-
}(_GraphQueryableCollection));
|
|
71
|
-
export { _Subscriptions };
|
|
72
|
-
export var Subscriptions = graphInvokableFactory(_Subscriptions);
|
|
1
|
+
import { __awaiter, __decorate, __extends, __generator } from "tslib";
|
|
2
|
+
import { _GraphQueryableInstance, _GraphQueryableCollection, graphInvokableFactory } from "../graphqueryable.js";
|
|
3
|
+
import { assign } from "@pnp/common";
|
|
4
|
+
import { body } from "@pnp/odata";
|
|
5
|
+
import { defaultPath, deleteable, updateable, getById } from "../decorators.js";
|
|
6
|
+
import { graphPost } from "../operations.js";
|
|
7
|
+
/**
|
|
8
|
+
* Subscription
|
|
9
|
+
*/
|
|
10
|
+
var _Subscription = /** @class */ (function (_super) {
|
|
11
|
+
__extends(_Subscription, _super);
|
|
12
|
+
function _Subscription() {
|
|
13
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14
|
+
}
|
|
15
|
+
_Subscription = __decorate([
|
|
16
|
+
deleteable(),
|
|
17
|
+
updateable()
|
|
18
|
+
], _Subscription);
|
|
19
|
+
return _Subscription;
|
|
20
|
+
}(_GraphQueryableInstance));
|
|
21
|
+
export { _Subscription };
|
|
22
|
+
export var Subscription = graphInvokableFactory(_Subscription);
|
|
23
|
+
/**
|
|
24
|
+
* Subscriptions
|
|
25
|
+
*/
|
|
26
|
+
var _Subscriptions = /** @class */ (function (_super) {
|
|
27
|
+
__extends(_Subscriptions, _super);
|
|
28
|
+
function _Subscriptions() {
|
|
29
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a new Subscription.
|
|
33
|
+
*
|
|
34
|
+
* @param changeType Indicates the type of change in the subscribed resource that will raise a notification. The supported values are: created, updated, deleted.
|
|
35
|
+
* @param notificationUrl The URL of the endpoint that will receive the notifications. This URL must make use of the HTTPS protocol.
|
|
36
|
+
* @param resource Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/).
|
|
37
|
+
* @param expirationDateTime Specifies the date and time when the webhook subscription expires. The time is in UTC.
|
|
38
|
+
* @param props A plain object collection of additional properties you want to set on the new subscription
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
_Subscriptions.prototype.add = function (changeType, notificationUrl, resource, expirationDateTime, props) {
|
|
42
|
+
if (props === void 0) { props = {}; }
|
|
43
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
44
|
+
var postBody, data;
|
|
45
|
+
return __generator(this, function (_a) {
|
|
46
|
+
switch (_a.label) {
|
|
47
|
+
case 0:
|
|
48
|
+
postBody = assign({
|
|
49
|
+
changeType: changeType,
|
|
50
|
+
expirationDateTime: expirationDateTime,
|
|
51
|
+
notificationUrl: notificationUrl,
|
|
52
|
+
resource: resource,
|
|
53
|
+
}, props);
|
|
54
|
+
return [4 /*yield*/, graphPost(this, body(postBody))];
|
|
55
|
+
case 1:
|
|
56
|
+
data = _a.sent();
|
|
57
|
+
return [2 /*return*/, {
|
|
58
|
+
data: data,
|
|
59
|
+
subscription: this.getById(data.id),
|
|
60
|
+
}];
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
_Subscriptions = __decorate([
|
|
66
|
+
defaultPath("subscriptions"),
|
|
67
|
+
getById(Subscription)
|
|
68
|
+
], _Subscriptions);
|
|
69
|
+
return _Subscriptions;
|
|
70
|
+
}(_GraphQueryableCollection));
|
|
71
|
+
export { _Subscriptions };
|
|
72
|
+
export var Subscriptions = graphInvokableFactory(_Subscriptions);
|
|
73
73
|
//# sourceMappingURL=types.js.map
|
package/teams/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ITeamCreateResult, ITeam, ITeams } from "./types";
|
|
2
|
-
import { Team as ITeamType } from "@microsoft/microsoft-graph-types";
|
|
3
|
-
import "./users";
|
|
4
|
-
export { Channel, Channels, IChannel, IChannelCreateResult, IChannels, ITab, ITabCreateResult, ITabUpdateResult, ITabs, ITeam, ITeamCreateResult, ITeamCreateResultAsync, ITeamUpdateResult, ITeams, Tab, Tabs, Team, Teams, } from "./types.js";
|
|
5
|
-
declare module "../groups/types" {
|
|
6
|
-
interface _Group {
|
|
7
|
-
readonly team: ITeam;
|
|
8
|
-
createTeam(properties: ITeamType): Promise<ITeamCreateResult>;
|
|
9
|
-
}
|
|
10
|
-
interface IGroup {
|
|
11
|
-
readonly team: ITeam;
|
|
12
|
-
createTeam(properties: ITeamType): Promise<ITeamCreateResult>;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
declare module "../rest" {
|
|
16
|
-
interface GraphRest {
|
|
17
|
-
readonly teams: ITeams;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
import { ITeamCreateResult, ITeam, ITeams } from "./types";
|
|
2
|
+
import { Team as ITeamType } from "@microsoft/microsoft-graph-types";
|
|
3
|
+
import "./users";
|
|
4
|
+
export { Channel, Channels, IChannel, IChannelCreateResult, IChannels, ITab, ITabCreateResult, ITabUpdateResult, ITabs, ITeam, ITeamCreateResult, ITeamCreateResultAsync, ITeamUpdateResult, ITeams, Tab, Tabs, Team, Teams, } from "./types.js";
|
|
5
|
+
declare module "../groups/types" {
|
|
6
|
+
interface _Group {
|
|
7
|
+
readonly team: ITeam;
|
|
8
|
+
createTeam(properties: ITeamType): Promise<ITeamCreateResult>;
|
|
9
|
+
}
|
|
10
|
+
interface IGroup {
|
|
11
|
+
readonly team: ITeam;
|
|
12
|
+
createTeam(properties: ITeamType): Promise<ITeamCreateResult>;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
declare module "../rest" {
|
|
16
|
+
interface GraphRest {
|
|
17
|
+
readonly teams: ITeams;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
package/teams/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { __awaiter, __generator } from "tslib";
|
|
2
|
-
import { addProp, body } from "@pnp/odata";
|
|
3
|
-
import { GraphRest } from "../rest";
|
|
4
|
-
import { _Group, Group } from "../groups/types";
|
|
5
|
-
import { Team, Teams } from "./types";
|
|
6
|
-
import { graphPut } from "../operations";
|
|
7
|
-
import "./users";
|
|
8
|
-
export { Channel, Channels, Tab, Tabs, Team, Teams, } from "./types.js";
|
|
9
|
-
addProp(_Group, "team", Team);
|
|
10
|
-
_Group.prototype.createTeam = function (props) {
|
|
11
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
12
|
-
var data;
|
|
13
|
-
return __generator(this, function (_a) {
|
|
14
|
-
switch (_a.label) {
|
|
15
|
-
case 0: return [4 /*yield*/, graphPut(this.clone(Group, "team"), body(props))];
|
|
16
|
-
case 1:
|
|
17
|
-
data = _a.sent();
|
|
18
|
-
return [2 /*return*/, {
|
|
19
|
-
data: data,
|
|
20
|
-
team: this.team,
|
|
21
|
-
}];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
Reflect.defineProperty(GraphRest.prototype, "teams", {
|
|
27
|
-
configurable: true,
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return this.childConfigHook(function (_a) {
|
|
31
|
-
var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
|
|
32
|
-
return Teams(baseUrl).configure(options).setRuntime(runtime);
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
});
|
|
1
|
+
import { __awaiter, __generator } from "tslib";
|
|
2
|
+
import { addProp, body } from "@pnp/odata";
|
|
3
|
+
import { GraphRest } from "../rest";
|
|
4
|
+
import { _Group, Group } from "../groups/types";
|
|
5
|
+
import { Team, Teams } from "./types";
|
|
6
|
+
import { graphPut } from "../operations";
|
|
7
|
+
import "./users";
|
|
8
|
+
export { Channel, Channels, Tab, Tabs, Team, Teams, } from "./types.js";
|
|
9
|
+
addProp(_Group, "team", Team);
|
|
10
|
+
_Group.prototype.createTeam = function (props) {
|
|
11
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
12
|
+
var data;
|
|
13
|
+
return __generator(this, function (_a) {
|
|
14
|
+
switch (_a.label) {
|
|
15
|
+
case 0: return [4 /*yield*/, graphPut(this.clone(Group, "team"), body(props))];
|
|
16
|
+
case 1:
|
|
17
|
+
data = _a.sent();
|
|
18
|
+
return [2 /*return*/, {
|
|
19
|
+
data: data,
|
|
20
|
+
team: this.team,
|
|
21
|
+
}];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
Reflect.defineProperty(GraphRest.prototype, "teams", {
|
|
27
|
+
configurable: true,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return this.childConfigHook(function (_a) {
|
|
31
|
+
var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
|
|
32
|
+
return Teams(baseUrl).configure(options).setRuntime(runtime);
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
36
|
//# sourceMappingURL=index.js.map
|