@pnp/graph 2.7.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/LICENSE +25 -25
  2. package/attachments/conversations.d.ts +9 -9
  3. package/attachments/conversations.js +4 -4
  4. package/attachments/index.d.ts +2 -2
  5. package/attachments/index.js +2 -2
  6. package/attachments/types.d.ts +26 -26
  7. package/attachments/types.js +46 -46
  8. package/batch.d.ts +17 -17
  9. package/batch.js +176 -176
  10. package/calendars/funcs.d.ts +36 -24
  11. package/calendars/funcs.d.ts.map +1 -1
  12. package/calendars/funcs.js +43 -29
  13. package/calendars/funcs.js.map +1 -1
  14. package/calendars/groups.d.ts +13 -13
  15. package/calendars/groups.js +5 -5
  16. package/calendars/index.d.ts +4 -4
  17. package/calendars/index.js +3 -3
  18. package/calendars/types.d.ts +52 -51
  19. package/calendars/types.d.ts.map +1 -1
  20. package/calendars/types.js +98 -96
  21. package/calendars/types.js.map +1 -1
  22. package/calendars/users.d.ts +22 -22
  23. package/calendars/users.js +9 -9
  24. package/cloud-communications/index.d.ts +8 -8
  25. package/cloud-communications/index.js +14 -14
  26. package/cloud-communications/types.d.ts +21 -21
  27. package/cloud-communications/types.js +46 -46
  28. package/cloud-communications/users.d.ts +9 -9
  29. package/cloud-communications/users.js +4 -4
  30. package/contacts/index.d.ts +2 -2
  31. package/contacts/index.js +2 -2
  32. package/contacts/types.d.ts +75 -75
  33. package/contacts/types.js +145 -145
  34. package/contacts/users.d.ts +11 -11
  35. package/contacts/users.js +5 -5
  36. package/conversations/groups.d.ts +13 -13
  37. package/conversations/groups.js +6 -6
  38. package/conversations/index.d.ts +2 -2
  39. package/conversations/index.js +2 -2
  40. package/conversations/types.d.ts +103 -103
  41. package/conversations/types.js +173 -173
  42. package/decorators.d.ts +103 -103
  43. package/decorators.js +138 -138
  44. package/directory-objects/index.d.ts +7 -7
  45. package/directory-objects/index.js +13 -13
  46. package/directory-objects/types.d.ts +67 -67
  47. package/directory-objects/types.js +96 -96
  48. package/graphhttpclient.d.ts +13 -13
  49. package/graphhttpclient.js +95 -95
  50. package/graphlibconfig.d.ts +21 -21
  51. package/graphlibconfig.js +19 -19
  52. package/graphqueryable.d.ts +156 -156
  53. package/graphqueryable.d.ts.map +1 -1
  54. package/graphqueryable.js +247 -237
  55. package/graphqueryable.js.map +1 -1
  56. package/groups/index.d.ts +7 -7
  57. package/groups/index.js +13 -13
  58. package/groups/types.d.ts +81 -81
  59. package/groups/types.d.ts.map +1 -1
  60. package/groups/types.js +137 -137
  61. package/groups/types.js.map +1 -1
  62. package/index.d.ts +8 -8
  63. package/index.js +7 -7
  64. package/insights/index.d.ts +2 -2
  65. package/insights/index.js +2 -2
  66. package/insights/types.d.ts +76 -76
  67. package/insights/types.js +162 -162
  68. package/insights/users.d.ts +9 -9
  69. package/insights/users.js +4 -4
  70. package/invitations/index.d.ts +7 -7
  71. package/invitations/index.js +13 -13
  72. package/invitations/types.d.ts +25 -25
  73. package/invitations/types.js +44 -44
  74. package/members/groups.d.ts +11 -11
  75. package/members/groups.js +5 -5
  76. package/members/index.d.ts +2 -2
  77. package/members/index.js +2 -2
  78. package/members/types.d.ts +31 -31
  79. package/members/types.js +49 -49
  80. package/messages/index.d.ts +2 -2
  81. package/messages/index.js +2 -2
  82. package/messages/types.d.ts +43 -43
  83. package/messages/types.d.ts.map +1 -1
  84. package/messages/types.js +77 -77
  85. package/messages/types.js.map +1 -1
  86. package/messages/users.d.ts +15 -15
  87. package/messages/users.js +10 -10
  88. package/onedrive/index.d.ts +2 -2
  89. package/onedrive/index.js +2 -2
  90. package/onedrive/types.d.ts +95 -87
  91. package/onedrive/types.d.ts.map +1 -1
  92. package/onedrive/types.js +241 -192
  93. package/onedrive/types.js.map +1 -1
  94. package/onedrive/users.d.ts +11 -11
  95. package/onedrive/users.js +5 -5
  96. package/onenote/index.d.ts +2 -2
  97. package/onenote/index.js +2 -2
  98. package/onenote/types.d.ts +76 -76
  99. package/onenote/types.js +149 -149
  100. package/onenote/users.d.ts +9 -9
  101. package/onenote/users.js +4 -4
  102. package/operations.d.ts +8 -8
  103. package/operations.js +41 -41
  104. package/outlook/index.d.ts +2 -2
  105. package/outlook/index.js +2 -2
  106. package/outlook/types.d.ts +40 -40
  107. package/outlook/types.js +76 -76
  108. package/outlook/users.d.ts +9 -9
  109. package/outlook/users.js +4 -4
  110. package/package.json +5 -5
  111. package/photos/groups.d.ts +9 -9
  112. package/photos/groups.js +4 -4
  113. package/photos/index.d.ts +3 -3
  114. package/photos/index.js +3 -3
  115. package/photos/types.d.ts +21 -21
  116. package/photos/types.js +37 -37
  117. package/photos/users.d.ts +9 -9
  118. package/photos/users.js +4 -4
  119. package/planner/groups.d.ts +9 -9
  120. package/planner/groups.js +4 -4
  121. package/planner/index.d.ts +9 -9
  122. package/planner/index.js +15 -15
  123. package/planner/types.d.ts +117 -117
  124. package/planner/types.js +291 -291
  125. package/planner/users.d.ts +9 -9
  126. package/planner/users.js +4 -4
  127. package/presets/all.d.ts +38 -38
  128. package/presets/all.js +38 -38
  129. package/readme.md +21 -21
  130. package/rest.d.ts +30 -30
  131. package/rest.js +57 -57
  132. package/search/index.d.ts +7 -7
  133. package/search/index.js +18 -18
  134. package/search/types.d.ts +16 -16
  135. package/search/types.js +23 -23
  136. package/sites/group.d.ts +9 -9
  137. package/sites/group.js +4 -4
  138. package/sites/index.d.ts +2 -2
  139. package/sites/index.js +2 -2
  140. package/sites/types.d.ts +23 -23
  141. package/sites/types.js +47 -47
  142. package/subscriptions/index.d.ts +7 -7
  143. package/subscriptions/index.js +13 -13
  144. package/subscriptions/types.d.ts +37 -37
  145. package/subscriptions/types.js +72 -72
  146. package/teams/index.d.ts +19 -19
  147. package/teams/index.js +35 -35
  148. package/teams/types.d.ts +112 -111
  149. package/teams/types.d.ts.map +1 -1
  150. package/teams/types.js +261 -254
  151. package/teams/types.js.map +1 -1
  152. package/teams/users.d.ts +9 -9
  153. package/teams/users.js +4 -4
  154. package/types.d.ts +9 -9
  155. package/types.js +19 -19
  156. package/users/index.d.ts +8 -8
  157. package/users/index.js +23 -23
  158. package/users/types.d.ts +35 -35
  159. package/users/types.d.ts.map +1 -1
  160. package/users/types.js +82 -82
  161. package/users/types.js.map +1 -1
  162. package/utils/toabsoluteurl.d.ts +7 -7
  163. package/utils/toabsoluteurl.js +48 -48
  164. package/utils/type.d.ts +3 -3
  165. package/utils/type.js +3 -3
package/types.js CHANGED
@@ -1,20 +1,20 @@
1
- var GraphEndpoints = /** @class */ (function () {
2
- function GraphEndpoints() {
3
- }
4
- /**
5
- *
6
- * @param url The url to set the endpoint
7
- */
8
- GraphEndpoints.ensure = function (url, endpoint) {
9
- var all = [GraphEndpoints.Beta, GraphEndpoints.V1];
10
- var regex = new RegExp(endpoint, "i");
11
- var replaces = all.filter(function (s) { return !regex.test(s); }).map(function (s) { return s.replace(".", "\\."); });
12
- regex = new RegExp("/?(" + replaces.join("|") + ")/?", "ig");
13
- return url.replace(regex, "/" + endpoint + "/");
14
- };
15
- GraphEndpoints.Beta = "beta";
16
- GraphEndpoints.V1 = "v1.0";
17
- return GraphEndpoints;
18
- }());
19
- export { GraphEndpoints };
1
+ var GraphEndpoints = /** @class */ (function () {
2
+ function GraphEndpoints() {
3
+ }
4
+ /**
5
+ *
6
+ * @param url The url to set the endpoint
7
+ */
8
+ GraphEndpoints.ensure = function (url, endpoint) {
9
+ var all = [GraphEndpoints.Beta, GraphEndpoints.V1];
10
+ var regex = new RegExp(endpoint, "i");
11
+ var replaces = all.filter(function (s) { return !regex.test(s); }).map(function (s) { return s.replace(".", "\\."); });
12
+ regex = new RegExp("/?(" + replaces.join("|") + ")/?", "ig");
13
+ return url.replace(regex, "/" + endpoint + "/");
14
+ };
15
+ GraphEndpoints.Beta = "beta";
16
+ GraphEndpoints.V1 = "v1.0";
17
+ return GraphEndpoints;
18
+ }());
19
+ export { GraphEndpoints };
20
20
  //# sourceMappingURL=types.js.map
package/users/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { IUser, IUsers } from "./types.js";
2
- export { IUser, IUsers, User, Users, IPeople, People, } from "./types.js";
3
- declare module "../rest" {
4
- interface GraphRest {
5
- readonly me: IUser;
6
- readonly users: IUsers;
7
- }
8
- }
1
+ import { IUser, IUsers } from "./types.js";
2
+ export { IUser, IUsers, User, Users, IPeople, People, } from "./types.js";
3
+ declare module "../rest" {
4
+ interface GraphRest {
5
+ readonly me: IUser;
6
+ readonly users: IUsers;
7
+ }
8
+ }
9
9
  //# sourceMappingURL=index.d.ts.map
package/users/index.js CHANGED
@@ -1,24 +1,24 @@
1
- import { GraphRest } from "../rest.js";
2
- import { User, Users } from "./types.js";
3
- export { User, Users, People, } from "./types.js";
4
- Reflect.defineProperty(GraphRest.prototype, "me", {
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 User(baseUrl, "me").configure(options).setRuntime(runtime);
11
- });
12
- },
13
- });
14
- Reflect.defineProperty(GraphRest.prototype, "users", {
15
- configurable: true,
16
- enumerable: true,
17
- get: function () {
18
- return this.childConfigHook(function (_a) {
19
- var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
20
- return Users(baseUrl).configure(options).setRuntime(runtime);
21
- });
22
- },
23
- });
1
+ import { GraphRest } from "../rest.js";
2
+ import { User, Users } from "./types.js";
3
+ export { User, Users, People, } from "./types.js";
4
+ Reflect.defineProperty(GraphRest.prototype, "me", {
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 User(baseUrl, "me").configure(options).setRuntime(runtime);
11
+ });
12
+ },
13
+ });
14
+ Reflect.defineProperty(GraphRest.prototype, "users", {
15
+ configurable: true,
16
+ enumerable: true,
17
+ get: function () {
18
+ return this.childConfigHook(function (_a) {
19
+ var options = _a.options, baseUrl = _a.baseUrl, runtime = _a.runtime;
20
+ return Users(baseUrl).configure(options).setRuntime(runtime);
21
+ });
22
+ },
23
+ });
24
24
  //# sourceMappingURL=index.js.map
package/users/types.d.ts CHANGED
@@ -1,36 +1,36 @@
1
- import { _GraphQueryableCollection } from "../graphqueryable.js";
2
- import { User as IUserType, Person as IPersonType } from "@microsoft/microsoft-graph-types";
3
- import { _DirectoryObject, IDirectoryObjects } from "../directory-objects/types.js";
4
- import { IUpdateable, IDeleteable, IGetById } from "../decorators.js";
5
- export declare class _User extends _DirectoryObject<IUserType> {
6
- /**
7
- * The groups and directory roles associated with the user
8
- */
9
- get memberOf(): IDirectoryObjects;
10
- /**
11
- * Retrieve a collection of person objects ordered by their relevance to the user
12
- */
13
- get people(): IPeople;
14
- /**
15
- * People that have direct reports to the user
16
- */
17
- get directReports(): IPeople;
18
- /**
19
- * The manager associated with this user
20
- */
21
- get manager(): IUser;
22
- }
23
- export interface IUser extends _User, IUpdateable<IUserType>, IDeleteable {
24
- }
25
- export declare const User: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUser & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
26
- export declare class _Users extends _GraphQueryableCollection<IUserType[]> {
27
- }
28
- export interface IUsers extends _Users, IGetById<IUser> {
29
- }
30
- export declare const Users: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUsers & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
31
- export declare class _People extends _GraphQueryableCollection<IPersonType[]> {
32
- }
33
- export interface IPeople extends _People {
34
- }
35
- export declare const People: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IPeople & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
1
+ import { _GraphQueryableSearchableCollection } from "../graphqueryable.js";
2
+ import { User as IUserType, Person as IPersonType } from "@microsoft/microsoft-graph-types";
3
+ import { _DirectoryObject, IDirectoryObjects } from "../directory-objects/types.js";
4
+ import { IUpdateable, IDeleteable, IGetById } from "../decorators.js";
5
+ export declare class _User extends _DirectoryObject<IUserType> {
6
+ /**
7
+ * The groups and directory roles associated with the user
8
+ */
9
+ get memberOf(): IDirectoryObjects;
10
+ /**
11
+ * Retrieve a collection of person objects ordered by their relevance to the user
12
+ */
13
+ get people(): IPeople;
14
+ /**
15
+ * People that have direct reports to the user
16
+ */
17
+ get directReports(): IPeople;
18
+ /**
19
+ * The manager associated with this user
20
+ */
21
+ get manager(): IUser;
22
+ }
23
+ export interface IUser extends _User, IUpdateable<IUserType>, IDeleteable {
24
+ }
25
+ export declare const User: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUser & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
26
+ export declare class _Users extends _GraphQueryableSearchableCollection<IUserType[]> {
27
+ }
28
+ export interface IUsers extends _Users, IGetById<IUser> {
29
+ }
30
+ export declare const Users: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IUsers & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
31
+ export declare class _People extends _GraphQueryableSearchableCollection<IPersonType[]> {
32
+ }
33
+ export interface IPeople extends _People {
34
+ }
35
+ export declare const People: (baseUrl: string | import("../graphqueryable.js").IGraphQueryable<any>, path?: string) => IPeople & import("@pnp/odata/invokable-binder.js").IInvokable<any>;
36
36
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/graph/users/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAyB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAoB,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAuC,WAAW,EAAE,WAAW,EAAW,QAAQ,EAAE,MAAM,k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OAAO,CAE3B;IAED;;MAEE;IACF,IAAW,aAAa,IAAI,OAAO,CAElC;IAED;;MAEE;IACF,IAAW,OAAO,IAAI,KAAK,CAE1B;CACJ;AACD,MAAM,WAAW,KAAM,SAAQ,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,EAAE,WAAW;CAAI;AAC7E,eAAO,MAAM,IAAI,4JAAsC,CAAC;AAExD,qBAEa,MAAO,SAAQ,mCAAmC,CAAC,SAAS,EAAE,CAAC;CAAI;AAChF,MAAM,WAAW,MAAO,SAAQ,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC;CAAI;AAC3D,eAAO,MAAM,KAAK,6JAAwC,CAAC;AAE3D,qBACa,OAAQ,SAAQ,mCAAmC,CAAC,WAAW,EAAE,CAAC;CAAI;AACnF,MAAM,WAAW,OAAQ,SAAQ,OAAO;CAAI;AAC5C,eAAO,MAAM,MAAM,8JAA0C,CAAC"}
package/users/types.js CHANGED
@@ -1,83 +1,83 @@
1
- import { __decorate, __extends } from "tslib";
2
- import { _GraphQueryableCollection, graphInvokableFactory } from "../graphqueryable.js";
3
- import { _DirectoryObject, DirectoryObjects } from "../directory-objects/types.js";
4
- import { defaultPath, updateable, deleteable, getById } from "../decorators.js";
5
- var _User = /** @class */ (function (_super) {
6
- __extends(_User, _super);
7
- function _User() {
8
- return _super !== null && _super.apply(this, arguments) || this;
9
- }
10
- Object.defineProperty(_User.prototype, "memberOf", {
11
- /**
12
- * The groups and directory roles associated with the user
13
- */
14
- get: function () {
15
- return DirectoryObjects(this, "memberOf");
16
- },
17
- enumerable: false,
18
- configurable: true
19
- });
20
- Object.defineProperty(_User.prototype, "people", {
21
- /**
22
- * Retrieve a collection of person objects ordered by their relevance to the user
23
- */
24
- get: function () {
25
- return People(this);
26
- },
27
- enumerable: false,
28
- configurable: true
29
- });
30
- Object.defineProperty(_User.prototype, "directReports", {
31
- /**
32
- * People that have direct reports to the user
33
- */
34
- get: function () {
35
- return People(this, "directReports");
36
- },
37
- enumerable: false,
38
- configurable: true
39
- });
40
- Object.defineProperty(_User.prototype, "manager", {
41
- /**
42
- * The manager associated with this user
43
- */
44
- get: function () {
45
- return User(this, "manager");
46
- },
47
- enumerable: false,
48
- configurable: true
49
- });
50
- _User = __decorate([
51
- updateable(),
52
- deleteable()
53
- ], _User);
54
- return _User;
55
- }(_DirectoryObject));
56
- export { _User };
57
- export var User = graphInvokableFactory(_User);
58
- var _Users = /** @class */ (function (_super) {
59
- __extends(_Users, _super);
60
- function _Users() {
61
- return _super !== null && _super.apply(this, arguments) || this;
62
- }
63
- _Users = __decorate([
64
- defaultPath("users"),
65
- getById(User)
66
- ], _Users);
67
- return _Users;
68
- }(_GraphQueryableCollection));
69
- export { _Users };
70
- export var Users = graphInvokableFactory(_Users);
71
- var _People = /** @class */ (function (_super) {
72
- __extends(_People, _super);
73
- function _People() {
74
- return _super !== null && _super.apply(this, arguments) || this;
75
- }
76
- _People = __decorate([
77
- defaultPath("people")
78
- ], _People);
79
- return _People;
80
- }(_GraphQueryableCollection));
81
- export { _People };
82
- export var People = graphInvokableFactory(_People);
1
+ import { __decorate, __extends } from "tslib";
2
+ import { _GraphQueryableSearchableCollection, graphInvokableFactory } from "../graphqueryable.js";
3
+ import { _DirectoryObject, DirectoryObjects } from "../directory-objects/types.js";
4
+ import { defaultPath, updateable, deleteable, getById } from "../decorators.js";
5
+ var _User = /** @class */ (function (_super) {
6
+ __extends(_User, _super);
7
+ function _User() {
8
+ return _super !== null && _super.apply(this, arguments) || this;
9
+ }
10
+ Object.defineProperty(_User.prototype, "memberOf", {
11
+ /**
12
+ * The groups and directory roles associated with the user
13
+ */
14
+ get: function () {
15
+ return DirectoryObjects(this, "memberOf");
16
+ },
17
+ enumerable: false,
18
+ configurable: true
19
+ });
20
+ Object.defineProperty(_User.prototype, "people", {
21
+ /**
22
+ * Retrieve a collection of person objects ordered by their relevance to the user
23
+ */
24
+ get: function () {
25
+ return People(this);
26
+ },
27
+ enumerable: false,
28
+ configurable: true
29
+ });
30
+ Object.defineProperty(_User.prototype, "directReports", {
31
+ /**
32
+ * People that have direct reports to the user
33
+ */
34
+ get: function () {
35
+ return People(this, "directReports");
36
+ },
37
+ enumerable: false,
38
+ configurable: true
39
+ });
40
+ Object.defineProperty(_User.prototype, "manager", {
41
+ /**
42
+ * The manager associated with this user
43
+ */
44
+ get: function () {
45
+ return User(this, "manager");
46
+ },
47
+ enumerable: false,
48
+ configurable: true
49
+ });
50
+ _User = __decorate([
51
+ updateable(),
52
+ deleteable()
53
+ ], _User);
54
+ return _User;
55
+ }(_DirectoryObject));
56
+ export { _User };
57
+ export var User = graphInvokableFactory(_User);
58
+ var _Users = /** @class */ (function (_super) {
59
+ __extends(_Users, _super);
60
+ function _Users() {
61
+ return _super !== null && _super.apply(this, arguments) || this;
62
+ }
63
+ _Users = __decorate([
64
+ defaultPath("users"),
65
+ getById(User)
66
+ ], _Users);
67
+ return _Users;
68
+ }(_GraphQueryableSearchableCollection));
69
+ export { _Users };
70
+ export var Users = graphInvokableFactory(_Users);
71
+ var _People = /** @class */ (function (_super) {
72
+ __extends(_People, _super);
73
+ function _People() {
74
+ return _super !== null && _super.apply(this, arguments) || this;
75
+ }
76
+ _People = __decorate([
77
+ defaultPath("people")
78
+ ], _People);
79
+ return _People;
80
+ }(_GraphQueryableSearchableCollection));
81
+ export { _People };
82
+ export var People = graphInvokableFactory(_People);
83
83
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../packages/graph/users/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAqB,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAA4B,OAAO,EAAY,MAAM,kBAAkB,CAAC;AAIpH;IAA2B,yBAA2B;IAAtD;;IA4BA,CAAC;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C;IAAtE,OAAO;QADnB,WAAW,CAAC,QAAQ,CAAC;OACT,OAAO,CAA+D;IAAD,cAAC;CAAA,AAAnF,CAA6B,mCAAmC,GAAmB;SAAtE,OAAO;AAEpB,MAAM,CAAC,IAAM,MAAM,GAAG,qBAAqB,CAAU,OAAO,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
- /**
2
- * Ensures that a given url is absolute for the current web based on context
3
- *
4
- * @param candidateUrl The url to make absolute
5
- *
6
- */
7
- export declare function toAbsoluteUrl(candidateUrl: string, runtime?: import("@pnp/common").Runtime): Promise<string>;
1
+ /**
2
+ * Ensures that a given url is absolute for the current web based on context
3
+ *
4
+ * @param candidateUrl The url to make absolute
5
+ *
6
+ */
7
+ export declare function toAbsoluteUrl(candidateUrl: string, runtime?: import("@pnp/common").Runtime): Promise<string>;
8
8
  //# sourceMappingURL=toabsoluteurl.d.ts.map
@@ -1,49 +1,49 @@
1
- import { __awaiter, __generator } from "tslib";
2
- import { combine, isUrlAbsolute, objectDefinedNotNull, DefaultRuntime, stringIsNullOrEmpty } from "@pnp/common";
3
- /**
4
- * Ensures that a given url is absolute for the current web based on context
5
- *
6
- * @param candidateUrl The url to make absolute
7
- *
8
- */
9
- export function toAbsoluteUrl(candidateUrl, runtime) {
10
- var _a, _b, _c;
11
- if (runtime === void 0) { runtime = DefaultRuntime; }
12
- return __awaiter(this, void 0, void 0, function () {
13
- var baseUrl, spFxContext, client, e_1;
14
- return __generator(this, function (_d) {
15
- switch (_d.label) {
16
- case 0:
17
- if (isUrlAbsolute(candidateUrl)) {
18
- // if we are already absolute, then just return the url
19
- return [2 /*return*/, candidateUrl];
20
- }
21
- baseUrl = (_a = runtime.get("graph")) === null || _a === void 0 ? void 0 : _a.baseUrl;
22
- if (!stringIsNullOrEmpty(baseUrl)) {
23
- // base url specified either with baseUrl of spfxContext config property
24
- return [2 /*return*/, combine(baseUrl, candidateUrl)];
25
- }
26
- spFxContext = runtime.get("spfxContext");
27
- if (!objectDefinedNotNull(spFxContext)) return [3 /*break*/, 4];
28
- _d.label = 1;
29
- case 1:
30
- _d.trys.push([1, 3, , 4]);
31
- return [4 /*yield*/, spFxContext.msGraphClientFactory.getClient()];
32
- case 2:
33
- client = _d.sent();
34
- baseUrl = (_c = (_b = client) === null || _b === void 0 ? void 0 : _b.constructor) === null || _c === void 0 ? void 0 : _c._graphBaseUrl;
35
- if (!stringIsNullOrEmpty(baseUrl)) {
36
- return [2 /*return*/, combine(baseUrl, candidateUrl)];
37
- }
38
- return [3 /*break*/, 4];
39
- case 3:
40
- e_1 = _d.sent();
41
- return [3 /*break*/, 4];
42
- case 4:
43
- // try one last time with the default
44
- return [2 /*return*/, combine("https://graph.microsoft.com", candidateUrl)];
45
- }
46
- });
47
- });
48
- }
1
+ import { __awaiter, __generator } from "tslib";
2
+ import { combine, isUrlAbsolute, objectDefinedNotNull, DefaultRuntime, stringIsNullOrEmpty } from "@pnp/common";
3
+ /**
4
+ * Ensures that a given url is absolute for the current web based on context
5
+ *
6
+ * @param candidateUrl The url to make absolute
7
+ *
8
+ */
9
+ export function toAbsoluteUrl(candidateUrl, runtime) {
10
+ var _a, _b, _c;
11
+ if (runtime === void 0) { runtime = DefaultRuntime; }
12
+ return __awaiter(this, void 0, void 0, function () {
13
+ var baseUrl, spFxContext, client, e_1;
14
+ return __generator(this, function (_d) {
15
+ switch (_d.label) {
16
+ case 0:
17
+ if (isUrlAbsolute(candidateUrl)) {
18
+ // if we are already absolute, then just return the url
19
+ return [2 /*return*/, candidateUrl];
20
+ }
21
+ baseUrl = (_a = runtime.get("graph")) === null || _a === void 0 ? void 0 : _a.baseUrl;
22
+ if (!stringIsNullOrEmpty(baseUrl)) {
23
+ // base url specified either with baseUrl of spfxContext config property
24
+ return [2 /*return*/, combine(baseUrl, candidateUrl)];
25
+ }
26
+ spFxContext = runtime.get("spfxContext");
27
+ if (!objectDefinedNotNull(spFxContext)) return [3 /*break*/, 4];
28
+ _d.label = 1;
29
+ case 1:
30
+ _d.trys.push([1, 3, , 4]);
31
+ return [4 /*yield*/, spFxContext.msGraphClientFactory.getClient()];
32
+ case 2:
33
+ client = _d.sent();
34
+ baseUrl = (_c = (_b = client) === null || _b === void 0 ? void 0 : _b.constructor) === null || _c === void 0 ? void 0 : _c._graphBaseUrl;
35
+ if (!stringIsNullOrEmpty(baseUrl)) {
36
+ return [2 /*return*/, combine(baseUrl, candidateUrl)];
37
+ }
38
+ return [3 /*break*/, 4];
39
+ case 3:
40
+ e_1 = _d.sent();
41
+ return [3 /*break*/, 4];
42
+ case 4:
43
+ // try one last time with the default
44
+ return [2 /*return*/, combine("https://graph.microsoft.com", candidateUrl)];
45
+ }
46
+ });
47
+ });
48
+ }
49
49
  //# sourceMappingURL=toabsoluteurl.js.map
package/utils/type.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare function type<T = unknown>(n: string, a: T): T & {
2
- "@odata.type": string;
3
- };
1
+ export declare function type<T = unknown>(n: string, a: T): T & {
2
+ "@odata.type": string;
3
+ };
4
4
  //# sourceMappingURL=type.d.ts.map
package/utils/type.js CHANGED
@@ -1,4 +1,4 @@
1
- export function type(n, a) {
2
- return Object.assign({ "@odata.type": n }, a);
3
- }
1
+ export function type(n, a) {
2
+ return Object.assign({ "@odata.type": n }, a);
3
+ }
4
4
  //# sourceMappingURL=type.js.map