gd-sprest 9.1.6 → 9.1.8

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.
@@ -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
  */
@@ -1,5 +1,5 @@
1
- import { IBaseExecution } from "gd-sprest-def/lib/base";
2
- import { drive } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes";
1
+ import { IBaseQuery } from "gd-sprest-def/lib/base";
2
+ import { drive, driveMethods } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes";
3
3
  import { ITargetInfoProps } from "../utils";
4
4
 
5
5
  /**
@@ -30,5 +30,5 @@ export interface Idrive {
30
30
  * @param siteId - (Optional) The site id to target, current by default.
31
31
  * @param targetInfo - (Optional) The target information.
32
32
  */
33
- (props?: { driveId?: string, siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseExecution<drive>;
33
+ (props?: { driveId?: string, siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseQuery<drive> & driveMethods;
34
34
  }
@@ -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.16,
12
+ __ver: 9.18,
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,
@@ -6,6 +6,7 @@
6
6
  // ../gd-sprest-def/lib/SP/entitytypes
7
7
  // ../gd-sprest-def
8
8
  // ../gd-sprest-def/lib/Microsoft/AppServices/entitytypes
9
+ // ../gd-sprest-def/lib/SP/Directory/entitytypes
9
10
  // ../gd-sprest-def/lib/microsoft
10
11
  // ../gd-sprest-def/lib/Microsoft/SharePoint/Portal/entitytypes
11
12
  // ../gd-sprest-def/lib/Microsoft/SharePoint/Navigation/REST/entitytypes
@@ -74,6 +75,7 @@ declare module 'gd-sprest' {
74
75
  declare module 'gd-sprest/lib' {
75
76
  export * from "gd-sprest/lib/apps";
76
77
  export * from "gd-sprest/lib/contextInfo";
78
+ export * from "gd-sprest/lib/directorySession";
77
79
  export * from "gd-sprest/lib/graph";
78
80
  export * from "gd-sprest/lib/groupService";
79
81
  export * from "gd-sprest/lib/groupSiteManager";
@@ -223,6 +225,11 @@ declare module 'gd-sprest/rest' {
223
225
  */
224
226
  DefaultRequestToHostFl: boolean;
225
227
 
228
+ /**
229
+ * A reference to the _api/sp.directory.directorysession endpoint.
230
+ */
231
+ DirectorySession: LibTypes.IDirectorySession;
232
+
226
233
  /**
227
234
  * The default library for a site.
228
235
  */
@@ -1220,6 +1227,29 @@ declare module 'gd-sprest/lib/contextInfo' {
1220
1227
  }
1221
1228
  }
1222
1229
 
1230
+ declare module 'gd-sprest/lib/directorySession' {
1231
+ import { IDirectorySession as IDirectorySessionCore } from "gd-sprest-def/lib/SP/Directory/entitytypes";
1232
+ import { ITargetInfoProps } from "gd-sprest/utils";
1233
+
1234
+ /**
1235
+ * #### REST API
1236
+ * _api/SP.Directory.DirectorySession
1237
+ */
1238
+ export const DirectorySession: IDirectorySession;
1239
+
1240
+ /**
1241
+ * Directory Session
1242
+ * @category Directory Session
1243
+ */
1244
+ export interface IDirectorySession {
1245
+ /**
1246
+ * Creates an instance of the user profile library.
1247
+ * @param targetInfo - (Optional) The target information.
1248
+ */
1249
+ (targetInfo?: ITargetInfoProps): IDirectorySessionCore;
1250
+ }
1251
+ }
1252
+
1223
1253
  declare module 'gd-sprest/lib/graph' {
1224
1254
  import { IBaseExecution } from "gd-sprest-def/lib/base";
1225
1255
  import { Graph as GraphCore } from "gd-sprest-def/lib/microsoft";
@@ -4455,8 +4485,8 @@ declare module 'gd-sprest/helper/methods' {
4455
4485
  }
4456
4486
 
4457
4487
  declare module 'gd-sprest/v2/drive' {
4458
- import { IBaseExecution } from "gd-sprest-def/lib/base";
4459
- import { drive } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes";
4488
+ import { IBaseQuery } from "gd-sprest-def/lib/base";
4489
+ import { drive, driveMethods } from "gd-sprest-def/lib/Microsoft/Graph/entityTypes";
4460
4490
  import { ITargetInfoProps } from "gd-sprest/utils";
4461
4491
 
4462
4492
  /**
@@ -4487,7 +4517,7 @@ declare module 'gd-sprest/v2/drive' {
4487
4517
  * @param siteId - (Optional) The site id to target, current by default.
4488
4518
  * @param targetInfo - (Optional) The target information.
4489
4519
  */
4490
- (props?: { driveId?: string, siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseExecution<drive>;
4520
+ (props?: { driveId?: string, siteId?: string, siteUrl?: string, targetInfo?: ITargetInfoProps }): IBaseQuery<drive> & driveMethods;
4491
4521
  }
4492
4522
  }
4493
4523