gd-sprest 7.1.3 → 7.1.6
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/@types/index.d.ts +4 -4
- package/@types/lib/graph.d.ts +14 -6
- package/@types/lib/index.d.ts +1 -0
- package/@types/lib/siteIconManager.d.ts +22 -0
- package/@types/rest.d.ts +6 -1
- package/@types/sptypes/sptypes.d.ts +10 -0
- package/build/lib/graph.js +16 -21
- package/build/lib/index.js +1 -0
- package/build/lib/siteIconManager.js +22 -0
- package/build/mapper/custom/index.js +0 -1
- package/build/mapper/def.js +27 -8
- package/build/rest.js +2 -1
- package/build/sptypes/sptypes.js +10 -1
- package/build/utils/targetInfo.js +13 -7
- package/dist/gd-sprest.d.ts +58 -10
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.js.LICENSE.txt +2 -2
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +1 -1
- package/build/mapper/custom/graph.js +0 -46
package/@types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Library
|
|
3
3
|
*/
|
|
4
|
-
import { Apps, ContextInfo, GroupService, GroupSiteManager, HubSites, HubSitesUtility, List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site, SiteManager, SitePages, SocialFeed, UserProfile, Utility, Web, ThemeManager, WorkflowInstanceService, WorkflowSubscriptionService } from "./lib";
|
|
4
|
+
import { Apps, ContextInfo, Graph, GroupService, GroupSiteManager, HubSites, HubSitesUtility, List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site, SiteIconManager, SiteManager, SitePages, SocialFeed, UserProfile, Utility, Web, ThemeManager, WorkflowInstanceService, WorkflowSubscriptionService } from "./lib";
|
|
5
5
|
export {
|
|
6
|
-
Apps, ContextInfo, GroupService, GroupSiteManager, HubSites, HubSitesUtility,
|
|
7
|
-
List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site,
|
|
8
|
-
SocialFeed, ThemeManager, UserProfile, Utility, Web, WorkflowInstanceService, WorkflowSubscriptionService
|
|
6
|
+
Apps, ContextInfo, Graph, GroupService, GroupSiteManager, HubSites, HubSitesUtility,
|
|
7
|
+
List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site, SiteIconManager, SiteManager,
|
|
8
|
+
SitePages, SocialFeed, ThemeManager, UserProfile, Utility, Web, WorkflowInstanceService, WorkflowSubscriptionService
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/**
|
package/@types/lib/graph.d.ts
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
|
+
import { IBaseExecution } from "gd-sprest-def/lib/base";
|
|
1
2
|
import { IGraph as IGraphCore, IGraphToken } from "../intellisense/graph";
|
|
2
3
|
import { ITargetInfo } from "../utils";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Graph
|
|
6
|
-
* @hidden
|
|
7
7
|
*/
|
|
8
8
|
export const Graph: IGraph;
|
|
9
9
|
|
|
10
|
+
// Graph Properties
|
|
11
|
+
export interface IGraphProperties {
|
|
12
|
+
accessToken: string;
|
|
13
|
+
cloud?: string;
|
|
14
|
+
requestType?: string;
|
|
15
|
+
url: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
/**
|
|
11
20
|
* Graph
|
|
12
|
-
* @hidden
|
|
13
21
|
*/
|
|
14
22
|
export interface IGraph {
|
|
15
23
|
/**
|
|
16
24
|
* Creates an instance of the graph library.
|
|
17
|
-
* @param
|
|
18
|
-
* @param version - The version of the graph to target.
|
|
25
|
+
* @param props - The graph request information.
|
|
19
26
|
*/
|
|
20
|
-
(
|
|
27
|
+
(props: IGraphProperties): IGraphCore;
|
|
21
28
|
|
|
22
29
|
/**
|
|
23
30
|
* Method to get the access token from a classic page.
|
|
31
|
+
* @param resource - The graph api endpoint.
|
|
24
32
|
*/
|
|
25
|
-
getAccessToken():
|
|
33
|
+
getAccessToken(resource?: string): IBaseExecution<IGraphToken>;
|
|
26
34
|
}
|
package/@types/lib/index.d.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SiteIconManager as SiteIconManagerCore } from "gd-sprest-def/lib/Microsoft/SharePoint/Portal/entitytypes";
|
|
2
|
+
import { ITargetInfoProps } from "../utils";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* #### REST API
|
|
6
|
+
* _api/siteIconManager
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export const SiteIconManager: ISiteIconManager;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Site Icon Manager
|
|
13
|
+
* @category Site Icon Manager
|
|
14
|
+
*/
|
|
15
|
+
export interface ISiteIconManager {
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of the site library.
|
|
18
|
+
* @param url - (Optional) The site url.
|
|
19
|
+
* @param targetInfo - (Optional) The target information.
|
|
20
|
+
*/
|
|
21
|
+
(url?: string, targetInfo?: ITargetInfoProps): SiteIconManagerCore;
|
|
22
|
+
}
|
package/@types/rest.d.ts
CHANGED
|
@@ -128,11 +128,16 @@ export interface IREST {
|
|
|
128
128
|
*/
|
|
129
129
|
Site: LibTypes.ISite;
|
|
130
130
|
|
|
131
|
+
/**
|
|
132
|
+
* Use this api to get/set the icon for a site.
|
|
133
|
+
*/
|
|
134
|
+
SiteIconManager: LibTypes.ISiteIconManager;
|
|
135
|
+
|
|
131
136
|
/**
|
|
132
137
|
* Use this api to create/delete site collections.
|
|
133
138
|
*/
|
|
134
139
|
SiteManager: LibTypes.ISiteManager;
|
|
135
|
-
|
|
140
|
+
|
|
136
141
|
/**
|
|
137
142
|
* Use this api to create/edit modern pages.
|
|
138
143
|
*/
|
|
@@ -150,6 +150,16 @@ export type IClientSidePageLayout = {
|
|
|
150
150
|
RepostPage: string;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Cloud Environments
|
|
155
|
+
*/
|
|
156
|
+
export type ICloudEnvironment = {
|
|
157
|
+
China: string;
|
|
158
|
+
Default: string;
|
|
159
|
+
USL4: string;
|
|
160
|
+
USL5: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
153
163
|
/**
|
|
154
164
|
* Control Modes
|
|
155
165
|
*/
|
package/build/lib/graph.js
CHANGED
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Graph = void 0;
|
|
4
|
+
var sptypes_1 = require("../sptypes");
|
|
4
5
|
var utils_1 = require("../utils");
|
|
5
6
|
/**
|
|
6
7
|
* Graph
|
|
7
8
|
*/
|
|
8
|
-
exports.Graph = (function (
|
|
9
|
-
var graph = new utils_1.Base({ accessToken: accessToken });
|
|
9
|
+
exports.Graph = (function (props) {
|
|
10
|
+
var graph = new utils_1.Base({ accessToken: props.accessToken });
|
|
10
11
|
// Default the target information
|
|
11
|
-
graph.targetInfo.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
graph.targetInfo.requestType = (props.requestType || "").toLowerCase() == "post" ? utils_1.RequestType.GraphPost : utils_1.RequestType.GraphGet;
|
|
13
|
+
// Set the endpoint
|
|
14
|
+
graph.targetInfo.endpoint = props.cloud || sptypes_1.SPTypes.CloudEnvironment.Default;
|
|
15
|
+
graph.targetInfo.endpoint += "/" + (props.version || "v1.0");
|
|
16
|
+
props.url ? graph.targetInfo.endpoint += "/" + props.url : null;
|
|
15
17
|
// Return the graph
|
|
16
18
|
return graph;
|
|
17
19
|
});
|
|
18
20
|
// Method to get the graph token from a classic page
|
|
19
|
-
exports.Graph.getAccessToken = function (
|
|
20
|
-
//
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
endpoint: "SP.OAuth.Token/Acquire",
|
|
28
|
-
data: data,
|
|
29
|
-
method: "POST"
|
|
30
|
-
})).execute(function (token) {
|
|
31
|
-
// Resolve the promise
|
|
32
|
-
resolve(token);
|
|
33
|
-
});
|
|
21
|
+
exports.Graph.getAccessToken = function (resource) {
|
|
22
|
+
// Set the data
|
|
23
|
+
var data = { "resource": resource || sptypes_1.SPTypes.CloudEnvironment.Default };
|
|
24
|
+
// Get the access token
|
|
25
|
+
return new utils_1.Base({
|
|
26
|
+
endpoint: "SP.OAuth.Token/Acquire",
|
|
27
|
+
method: "POST",
|
|
28
|
+
data: data
|
|
34
29
|
});
|
|
35
30
|
};
|
package/build/lib/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./peoplePicker"), exports);
|
|
|
24
24
|
__exportStar(require("./profileLoader"), exports);
|
|
25
25
|
__exportStar(require("./search"), exports);
|
|
26
26
|
__exportStar(require("./site"), exports);
|
|
27
|
+
__exportStar(require("./siteIconManager"), exports);
|
|
27
28
|
__exportStar(require("./siteManager"), exports);
|
|
28
29
|
__exportStar(require("./sitePages"), exports);
|
|
29
30
|
__exportStar(require("./socialFeed"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SiteIconManager = void 0;
|
|
4
|
+
var utils_1 = require("../utils");
|
|
5
|
+
/**
|
|
6
|
+
* Site Icon Manager
|
|
7
|
+
*/
|
|
8
|
+
exports.SiteIconManager = (function (url, targetInfo) {
|
|
9
|
+
var siteIconMgr = new utils_1.Base(targetInfo);
|
|
10
|
+
// Default the properties
|
|
11
|
+
siteIconMgr.targetInfo.defaultToWebFl = true;
|
|
12
|
+
siteIconMgr.targetInfo.endpoint = "SiteIconManager";
|
|
13
|
+
// See if the web url exists
|
|
14
|
+
if (url) {
|
|
15
|
+
// Set the settings
|
|
16
|
+
siteIconMgr.targetInfo.url = url;
|
|
17
|
+
}
|
|
18
|
+
// Add the methods
|
|
19
|
+
utils_1.Request.addMethods(siteIconMgr, { __metadata: { type: "Microsoft.SharePoint.Portal.SiteIconManager" } });
|
|
20
|
+
// Return the site
|
|
21
|
+
return siteIconMgr;
|
|
22
|
+
});
|
|
@@ -11,7 +11,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./audit"), exports);
|
|
14
|
-
__exportStar(require("./graph"), exports);
|
|
15
14
|
__exportStar(require("./old"), exports);
|
|
16
15
|
__exportStar(require("./peoplePicker"), exports);
|
|
17
16
|
__exportStar(require("./propertyValues"), exports);
|
package/build/mapper/def.js
CHANGED
|
@@ -1403,6 +1403,7 @@ exports.Mapper = {
|
|
|
1403
1403
|
},
|
|
1404
1404
|
setSiteLogo: {
|
|
1405
1405
|
argNames: ["relativeLogoUrl", "type", "aspect", "focalx", "focaly", "isFocalPatch"],
|
|
1406
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
1406
1407
|
},
|
|
1407
1408
|
},
|
|
1408
1409
|
"Microsoft.SharePoint.Portal.SiteLinkingManager": {
|
|
@@ -4109,6 +4110,7 @@ exports.Mapper = {
|
|
|
4109
4110
|
},
|
|
4110
4111
|
setCommentsDisabled: {
|
|
4111
4112
|
argNames: ["value"],
|
|
4113
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
4112
4114
|
},
|
|
4113
4115
|
setComplianceTag: {
|
|
4114
4116
|
argNames: ["complianceTag", "isTagPolicyHold", "isTagPolicyRecord", "isEventBasedTag", "isTagSuperLock", "isUnlockedAsDefault"],
|
|
@@ -4438,12 +4440,16 @@ exports.Mapper = {
|
|
|
4438
4440
|
requestType: utils_1.RequestType.Post
|
|
4439
4441
|
},
|
|
4440
4442
|
createNewsCopy: {},
|
|
4441
|
-
demoteFromNews: {
|
|
4443
|
+
demoteFromNews: {
|
|
4444
|
+
requestType: utils_1.RequestType.Post
|
|
4445
|
+
},
|
|
4442
4446
|
discardPage: {},
|
|
4443
4447
|
getVersion: {
|
|
4444
4448
|
argNames: ["versionId"],
|
|
4445
4449
|
},
|
|
4446
|
-
promoteToNews: {
|
|
4450
|
+
promoteToNews: {
|
|
4451
|
+
requestType: utils_1.RequestType.Post
|
|
4452
|
+
},
|
|
4447
4453
|
publish: {},
|
|
4448
4454
|
saveDraft: {
|
|
4449
4455
|
argNames: ["sitePage"],
|
|
@@ -4579,12 +4585,16 @@ exports.Mapper = {
|
|
|
4579
4585
|
requestType: utils_1.RequestType.Post
|
|
4580
4586
|
},
|
|
4581
4587
|
createNewsCopy: {},
|
|
4582
|
-
demoteFromNews: {
|
|
4588
|
+
demoteFromNews: {
|
|
4589
|
+
requestType: utils_1.RequestType.Post
|
|
4590
|
+
},
|
|
4583
4591
|
discardPage: {},
|
|
4584
4592
|
getVersion: {
|
|
4585
4593
|
argNames: ["versionId"],
|
|
4586
4594
|
},
|
|
4587
|
-
promoteToNews: {
|
|
4595
|
+
promoteToNews: {
|
|
4596
|
+
requestType: utils_1.RequestType.Post
|
|
4597
|
+
},
|
|
4588
4598
|
publish: {},
|
|
4589
4599
|
saveDraft: {
|
|
4590
4600
|
argNames: ["sitePage"],
|
|
@@ -4769,12 +4779,16 @@ exports.Mapper = {
|
|
|
4769
4779
|
argNames: ["sitePageFlags", "isNews"],
|
|
4770
4780
|
},
|
|
4771
4781
|
createNewsCopy: {},
|
|
4772
|
-
demoteFromNews: {
|
|
4782
|
+
demoteFromNews: {
|
|
4783
|
+
requestType: utils_1.RequestType.Post
|
|
4784
|
+
},
|
|
4773
4785
|
discardPage: {},
|
|
4774
4786
|
getVersion: {
|
|
4775
4787
|
argNames: ["versionId"],
|
|
4776
4788
|
},
|
|
4777
|
-
promoteToNews: {
|
|
4789
|
+
promoteToNews: {
|
|
4790
|
+
requestType: utils_1.RequestType.Post
|
|
4791
|
+
},
|
|
4778
4792
|
publish: {},
|
|
4779
4793
|
saveDraft: {
|
|
4780
4794
|
argNames: ["sitePage"],
|
|
@@ -4889,12 +4903,16 @@ exports.Mapper = {
|
|
|
4889
4903
|
argNames: ["sitePageFlags", "isNews"],
|
|
4890
4904
|
},
|
|
4891
4905
|
createNewsCopy: {},
|
|
4892
|
-
demoteFromNews: {
|
|
4906
|
+
demoteFromNews: {
|
|
4907
|
+
requestType: utils_1.RequestType.Post
|
|
4908
|
+
},
|
|
4893
4909
|
discardPage: {},
|
|
4894
4910
|
getVersion: {
|
|
4895
4911
|
argNames: ["versionId"],
|
|
4896
4912
|
},
|
|
4897
|
-
promoteToNews: {
|
|
4913
|
+
promoteToNews: {
|
|
4914
|
+
requestType: utils_1.RequestType.Post
|
|
4915
|
+
},
|
|
4898
4916
|
publish: {},
|
|
4899
4917
|
saveDraft: {
|
|
4900
4918
|
argNames: ["sitePage"],
|
|
@@ -6873,6 +6891,7 @@ exports.Mapper = {
|
|
|
6873
6891
|
resetRoleInheritance: {},
|
|
6874
6892
|
setCommentsDisabled: {
|
|
6875
6893
|
argNames: ["value"],
|
|
6894
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
6876
6895
|
},
|
|
6877
6896
|
setComplianceTag: {
|
|
6878
6897
|
argNames: ["complianceTag", "isTagPolicyHold", "isTagPolicyRecord", "isEventBasedTag", "isTagSuperLock", "isUnlockedAsDefault"],
|
package/build/rest.js
CHANGED
|
@@ -8,7 +8,7 @@ var sptypes_1 = require("./sptypes");
|
|
|
8
8
|
* SharePoint REST Library
|
|
9
9
|
*/
|
|
10
10
|
exports.$REST = {
|
|
11
|
-
__ver: 7.
|
|
11
|
+
__ver: 7.16,
|
|
12
12
|
AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
|
|
13
13
|
Apps: Lib.Apps,
|
|
14
14
|
ContextInfo: Lib.ContextInfo,
|
|
@@ -29,6 +29,7 @@ exports.$REST = {
|
|
|
29
29
|
RemoteWeb: function (requestUrl) { return Lib.Web.getRemoteWeb(requestUrl); },
|
|
30
30
|
Search: Lib.Search,
|
|
31
31
|
Site: Lib.Site,
|
|
32
|
+
SiteIconManager: Lib.SiteIconManager,
|
|
32
33
|
SiteManager: Lib.SiteManager,
|
|
33
34
|
SitePages: Lib.SitePages,
|
|
34
35
|
SiteExists: function (url) { return Lib.Site.exists(url); },
|
package/build/sptypes/sptypes.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebTemplateType = exports.ViewType = exports.UserCustomActionRegistrationType = exports.URLZones = exports.UrlFormatType = exports.StatusPriColor = exports.RoleType = exports.ReorderingRuleMatchType = exports.RenderListDataOptions = exports.RelationshipDeleteBehaviorType = exports.PrincipalTypes = exports.PrincipalSources = exports.PersonalSiteCapabilities = exports.PersonalizationScope = exports.PageType = exports.ModalDialogResult = exports.LocaleLCIDType = exports.ListTemplateType = exports.ListExperienceOptions = exports.FriendlyDateFormat = exports.FileTemplateType = exports.FileLevelType = exports.FieldUserSelectionType = exports.FieldType = exports.FieldResultType = exports.FieldNumberType = exports.FieldNoteType = exports.EventReceiverType = exports.EventReceiverSynchronizationType = exports.DraftVisibilityType = exports.DateFormat = exports.ControlMode = exports.ClientSidePageLayout = exports.ClientTemplatesUtility = exports.ChoiceFormatType = exports.CheckOutType = exports.CheckInType = exports.CalendarTypes = exports.BasePermissionTypes = void 0;
|
|
3
|
+
exports.WebTemplateType = exports.ViewType = exports.UserCustomActionRegistrationType = exports.URLZones = exports.UrlFormatType = exports.StatusPriColor = exports.RoleType = exports.ReorderingRuleMatchType = exports.RenderListDataOptions = exports.RelationshipDeleteBehaviorType = exports.PrincipalTypes = exports.PrincipalSources = exports.PersonalSiteCapabilities = exports.PersonalizationScope = exports.PageType = exports.ModalDialogResult = exports.LocaleLCIDType = exports.ListTemplateType = exports.ListExperienceOptions = exports.FriendlyDateFormat = exports.FileTemplateType = exports.FileLevelType = exports.FieldUserSelectionType = exports.FieldType = exports.FieldResultType = exports.FieldNumberType = exports.FieldNoteType = exports.EventReceiverType = exports.EventReceiverSynchronizationType = exports.DraftVisibilityType = exports.DateFormat = exports.ControlMode = exports.CloudEnvironment = exports.ClientSidePageLayout = exports.ClientTemplatesUtility = exports.ChoiceFormatType = exports.CheckOutType = exports.CheckInType = exports.CalendarTypes = exports.BasePermissionTypes = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Base Permission Types
|
|
6
6
|
*/
|
|
@@ -90,6 +90,15 @@ exports.ClientSidePageLayout = {
|
|
|
90
90
|
RepostPage: "RepostPage",
|
|
91
91
|
SingleWebPartAppPage: "SingleWebPartAppPage"
|
|
92
92
|
};
|
|
93
|
+
/**
|
|
94
|
+
* Cloud Environments
|
|
95
|
+
*/
|
|
96
|
+
exports.CloudEnvironment = {
|
|
97
|
+
Default: "https://graph.microsoft.com",
|
|
98
|
+
China: "https://microsoftgraph.chinacloudapi.cn",
|
|
99
|
+
USL4: "https://graph.microsoft.us",
|
|
100
|
+
USL5: "https://dod-graph.microsoft.us"
|
|
101
|
+
};
|
|
93
102
|
/**
|
|
94
103
|
* Control Modes
|
|
95
104
|
*/
|
|
@@ -16,8 +16,19 @@ var TargetInfo = /** @class */ (function () {
|
|
|
16
16
|
this.requestData = this.props.data;
|
|
17
17
|
this.requestHeaders = this.props.requestHeader;
|
|
18
18
|
this.requestMethod = this.props.method ? this.props.method : "GET";
|
|
19
|
-
//
|
|
20
|
-
this.isGraph
|
|
19
|
+
// See if this is a graph request
|
|
20
|
+
if (this.isGraph) {
|
|
21
|
+
// Set the request method
|
|
22
|
+
this.requestMethod = this.props.requestType == _1.RequestType.GraphGet ? "GET" : "POST";
|
|
23
|
+
// Set the security flag
|
|
24
|
+
this.requestData = { securityEnabledOnly: true };
|
|
25
|
+
// Set the request url
|
|
26
|
+
this.requestUrl = this.props.endpoint;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
// Set the request url
|
|
30
|
+
this.setRESTRequestUrl();
|
|
31
|
+
}
|
|
21
32
|
}
|
|
22
33
|
Object.defineProperty(TargetInfo.prototype, "isBatchRequest", {
|
|
23
34
|
// Flag to determine if this is a batch request
|
|
@@ -72,11 +83,6 @@ var TargetInfo = /** @class */ (function () {
|
|
|
72
83
|
// Key was not found
|
|
73
84
|
return null;
|
|
74
85
|
};
|
|
75
|
-
// Method to set the request url for the Graph API
|
|
76
|
-
TargetInfo.prototype.setGraphRequestUrl = function () {
|
|
77
|
-
// Return the request url
|
|
78
|
-
this.requestUrl = "https://graph.microsoft.com/" + this.props.endpoint;
|
|
79
|
-
};
|
|
80
86
|
// Method to set the request url for the REST API
|
|
81
87
|
TargetInfo.prototype.setRESTRequestUrl = function () {
|
|
82
88
|
var endpoint = this.props.endpoint ? "/" + this.props.endpoint : "";
|
package/dist/gd-sprest.d.ts
CHANGED
|
@@ -25,11 +25,11 @@ declare module 'gd-sprest' {
|
|
|
25
25
|
/**
|
|
26
26
|
* Library
|
|
27
27
|
*/
|
|
28
|
-
import { Apps, ContextInfo, GroupService, GroupSiteManager, HubSites, HubSitesUtility, List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site, SiteManager, SitePages, SocialFeed, UserProfile, Utility, Web, ThemeManager, WorkflowInstanceService, WorkflowSubscriptionService } from "gd-sprest/lib";
|
|
28
|
+
import { Apps, ContextInfo, Graph, GroupService, GroupSiteManager, HubSites, HubSitesUtility, List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site, SiteIconManager, SiteManager, SitePages, SocialFeed, UserProfile, Utility, Web, ThemeManager, WorkflowInstanceService, WorkflowSubscriptionService } from "gd-sprest/lib";
|
|
29
29
|
export {
|
|
30
|
-
Apps, ContextInfo, GroupService, GroupSiteManager, HubSites, HubSitesUtility,
|
|
31
|
-
List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site,
|
|
32
|
-
SocialFeed, ThemeManager, UserProfile, Utility, Web, WorkflowInstanceService, WorkflowSubscriptionService
|
|
30
|
+
Apps, ContextInfo, Graph, GroupService, GroupSiteManager, HubSites, HubSitesUtility,
|
|
31
|
+
List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search, Site, SiteIconManager, SiteManager,
|
|
32
|
+
SitePages, SocialFeed, ThemeManager, UserProfile, Utility, Web, WorkflowInstanceService, WorkflowSubscriptionService
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -77,6 +77,7 @@ declare module 'gd-sprest/lib' {
|
|
|
77
77
|
export * from "gd-sprest/lib/profileLoader";
|
|
78
78
|
export * from "gd-sprest/lib/search";
|
|
79
79
|
export * from "gd-sprest/lib/site";
|
|
80
|
+
export * from "gd-sprest/lib/siteIconManager";
|
|
80
81
|
export * from "gd-sprest/lib/siteManager";
|
|
81
82
|
export * from "gd-sprest/lib/sitePages";
|
|
82
83
|
export * from "gd-sprest/lib/socialFeed";
|
|
@@ -294,6 +295,11 @@ declare module 'gd-sprest/rest' {
|
|
|
294
295
|
*/
|
|
295
296
|
Site: LibTypes.ISite;
|
|
296
297
|
|
|
298
|
+
/**
|
|
299
|
+
* Use this api to get/set the icon for a site.
|
|
300
|
+
*/
|
|
301
|
+
SiteIconManager: LibTypes.ISiteIconManager;
|
|
302
|
+
|
|
297
303
|
/**
|
|
298
304
|
* Use this api to create/delete site collections.
|
|
299
305
|
*/
|
|
@@ -925,31 +931,38 @@ declare module 'gd-sprest/lib/contextInfo' {
|
|
|
925
931
|
}
|
|
926
932
|
|
|
927
933
|
declare module 'gd-sprest/lib/graph' {
|
|
934
|
+
import { IBaseExecution } from "gd-sprest-def/lib/base";
|
|
928
935
|
import { IGraph as IGraphCore, IGraphToken } from "gd-sprest/intellisense/graph";
|
|
929
936
|
import { ITargetInfo } from "gd-sprest/utils";
|
|
930
937
|
|
|
931
938
|
/**
|
|
932
939
|
* Graph
|
|
933
|
-
* @hidden
|
|
934
940
|
*/
|
|
935
941
|
export const Graph: IGraph;
|
|
936
942
|
|
|
943
|
+
export interface IGraphProperties {
|
|
944
|
+
accessToken: string;
|
|
945
|
+
cloud?: string;
|
|
946
|
+
requestType?: string;
|
|
947
|
+
url: string;
|
|
948
|
+
version?: string;
|
|
949
|
+
}
|
|
950
|
+
|
|
937
951
|
/**
|
|
938
952
|
* Graph
|
|
939
|
-
* @hidden
|
|
940
953
|
*/
|
|
941
954
|
export interface IGraph {
|
|
942
955
|
/**
|
|
943
956
|
* Creates an instance of the graph library.
|
|
944
|
-
* @param
|
|
945
|
-
* @param version - The version of the graph to target.
|
|
957
|
+
* @param props - The graph request information.
|
|
946
958
|
*/
|
|
947
|
-
(
|
|
959
|
+
(props: IGraphProperties): IGraphCore;
|
|
948
960
|
|
|
949
961
|
/**
|
|
950
962
|
* Method to get the access token from a classic page.
|
|
963
|
+
* @param resource - The graph api endpoint.
|
|
951
964
|
*/
|
|
952
|
-
getAccessToken():
|
|
965
|
+
getAccessToken(resource?: string): IBaseExecution<IGraphToken>;
|
|
953
966
|
}
|
|
954
967
|
}
|
|
955
968
|
|
|
@@ -1367,6 +1380,31 @@ declare module 'gd-sprest/lib/site' {
|
|
|
1367
1380
|
}
|
|
1368
1381
|
}
|
|
1369
1382
|
|
|
1383
|
+
declare module 'gd-sprest/lib/siteIconManager' {
|
|
1384
|
+
import { SiteIconManager as SiteIconManagerCore } from "gd-sprest-def/lib/Microsoft/SharePoint/Portal/entitytypes";
|
|
1385
|
+
import { ITargetInfoProps } from "gd-sprest/utils";
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* #### REST API
|
|
1389
|
+
* _api/siteIconManager
|
|
1390
|
+
*
|
|
1391
|
+
*/
|
|
1392
|
+
export const SiteIconManager: ISiteIconManager;
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* Site Icon Manager
|
|
1396
|
+
* @category Site Icon Manager
|
|
1397
|
+
*/
|
|
1398
|
+
export interface ISiteIconManager {
|
|
1399
|
+
/**
|
|
1400
|
+
* Creates an instance of the site library.
|
|
1401
|
+
* @param url - (Optional) The site url.
|
|
1402
|
+
* @param targetInfo - (Optional) The target information.
|
|
1403
|
+
*/
|
|
1404
|
+
(url?: string, targetInfo?: ITargetInfoProps): SiteIconManagerCore;
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1370
1408
|
declare module 'gd-sprest/lib/siteManager' {
|
|
1371
1409
|
import { IBaseExecution } from "gd-sprest-def/lib/base";
|
|
1372
1410
|
import { ISPSiteManager as ISPSiteManagerCore } from "gd-sprest-def/lib/Microsoft/SharePoint/Portal/entitytypes";
|
|
@@ -4055,6 +4093,16 @@ declare module 'gd-sprest/sptypes/sptypes' {
|
|
|
4055
4093
|
RepostPage: string;
|
|
4056
4094
|
}
|
|
4057
4095
|
|
|
4096
|
+
/**
|
|
4097
|
+
* Cloud Environments
|
|
4098
|
+
*/
|
|
4099
|
+
export type ICloudEnvironment = {
|
|
4100
|
+
China: string;
|
|
4101
|
+
Default: string;
|
|
4102
|
+
USL4: string;
|
|
4103
|
+
USL5: string;
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4058
4106
|
/**
|
|
4059
4107
|
* Control Modes
|
|
4060
4108
|
*/
|