gd-sprest 9.1.7 → 9.1.9

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 CHANGED
@@ -1,11 +1,17 @@
1
1
  /**
2
2
  * Library
3
3
  */
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";
4
+ import {
5
+ Apps, ContextInfo, DirectorySession, Graph, GroupService, GroupSiteManager, HubSites,
6
+ HubSitesUtility, List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search,
7
+ Site, SiteIconManager, SiteManager, SitePages, SocialFeed, ThemeManager, UserProfile,
8
+ Utility, Web, WebTemplateExtensions, WorkflowInstanceService, WorkflowSubscriptionService
9
+ } from "./lib";
5
10
  export {
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
11
+ Apps, ContextInfo, DirectorySession, Graph, GroupService, GroupSiteManager, HubSites,
12
+ HubSitesUtility, List, Navigation, PeopleManager, PeoplePicker, ProfileLoader, Search,
13
+ Site, SiteIconManager, SiteManager, SitePages, SocialFeed, ThemeManager, UserProfile,
14
+ Utility, Web, WebTemplateExtensions, WorkflowInstanceService, WorkflowSubscriptionService
9
15
  }
10
16
 
11
17
  /**
@@ -0,0 +1,20 @@
1
+ import { IDirectorySession as IDirectorySessionCore } from "gd-sprest-def/lib/SP/Directory/entitytypes";
2
+ import { ITargetInfoProps } from "../utils";
3
+
4
+ /**
5
+ * #### REST API
6
+ * _api/SP.Directory.DirectorySession
7
+ */
8
+ export const DirectorySession: IDirectorySession;
9
+
10
+ /**
11
+ * Directory Session
12
+ * @category Directory Session
13
+ */
14
+ export interface IDirectorySession {
15
+ /**
16
+ * Creates an instance of the user profile library.
17
+ * @param targetInfo - (Optional) The target information.
18
+ */
19
+ (targetInfo?: ITargetInfoProps): IDirectorySessionCore;
20
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./apps";
2
2
  export * from "./contextInfo";
3
+ export * from "./directorySession";
3
4
  export * from "./graph";
4
5
  export * from "./groupService";
5
6
  export * from "./groupSiteManager";
package/@types/rest.d.ts CHANGED
@@ -41,6 +41,11 @@ export interface IREST {
41
41
  */
42
42
  DefaultRequestToHostFl: boolean;
43
43
 
44
+ /**
45
+ * A reference to the _api/sp.directory.directorysession endpoint.
46
+ */
47
+ DirectorySession: LibTypes.IDirectorySession;
48
+
44
49
  /**
45
50
  * The default library for a site.
46
51
  */
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DirectorySession = void 0;
4
+ var utils_1 = require("../utils");
5
+ /**
6
+ * Directory Session
7
+ */
8
+ exports.DirectorySession = (function (targetInfo) {
9
+ var svc = new utils_1.Base(targetInfo);
10
+ // Default the properties
11
+ svc.targetInfo.defaultToWebFl = true;
12
+ svc.targetInfo.endpoint = "SP.Directory.DirectorySession";
13
+ // Add the methods
14
+ utils_1.Request.addMethods(svc, { __metadata: { type: "SP.Directory.DirectorySession" } });
15
+ // Return the directory session
16
+ return svc;
17
+ });
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./apps"), exports);
18
18
  __exportStar(require("./contextInfo"), exports);
19
+ __exportStar(require("./directorySession"), exports);
19
20
  __exportStar(require("./graph"), exports);
20
21
  __exportStar(require("./groupService"), exports);
21
22
  __exportStar(require("./groupSiteManager"), exports);
@@ -3442,19 +3442,24 @@ exports.Mapper = {
3442
3442
  "SP.Directory.DirectorySession": {
3443
3443
  getGraphUser: {
3444
3444
  argNames: ["principalName"],
3445
+ returnType: "SP.Directory.User"
3445
3446
  },
3446
3447
  getSharePointDataForUser: {
3447
3448
  argNames: ["userId"],
3449
+ returnType: "SP.Directory.User"
3448
3450
  },
3449
3451
  group: {
3450
3452
  argNames: ["groupId", "alias"],
3453
+ returnType: "SP.Directory.Group"
3451
3454
  },
3452
3455
  joinGroup: {
3453
3456
  argNames: ["groupId"],
3457
+ requestType: utils_1.RequestType.PostWithArgsInBody
3454
3458
  },
3455
3459
  me: {},
3456
3460
  user: {
3457
3461
  argNames: ["id", "principalName"],
3462
+ returnType: "SP.Directory.User"
3458
3463
  },
3459
3464
  validateGroupName: {
3460
3465
  argNames: ["displayName", "alias"],
@@ -3518,10 +3523,12 @@ exports.Mapper = {
3518
3523
  "SP.Directory.User.Collection": {
3519
3524
  add: {
3520
3525
  argNames: ["objectId", "principalName"],
3526
+ requestType: utils_1.RequestType.PostWithArgsInBody
3521
3527
  },
3522
3528
  query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
3523
3529
  remove: {
3524
3530
  argNames: ["objectId"],
3531
+ requestType: utils_1.RequestType.PostWithArgsInBody
3525
3532
  },
3526
3533
  },
3527
3534
  "SP.DocumentManagement.DocumentId": {
package/build/rest.js CHANGED
@@ -9,11 +9,12 @@ var sptypes_1 = require("./sptypes");
9
9
  * SharePoint REST Library
10
10
  */
11
11
  exports.$REST = {
12
- __ver: 9.17,
12
+ __ver: 9.19,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,
16
16
  DefaultRequestToHostFl: false,
17
+ DirectorySession: Lib.DirectorySession,
17
18
  drive: LibV2.drive,
18
19
  drives: LibV2.drives,
19
20
  GetWebUrlFromPageUrl: Lib.Web.getWebUrlFromPageUrl,