@lindle/sharepoint_requests 0.1.9 → 0.1.11

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.
@@ -31,6 +31,15 @@ function _asyncToGenerator(n) {
31
31
  });
32
32
  };
33
33
  }
34
+ function _extends() {
35
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
36
+ for (var e = 1; e < arguments.length; e++) {
37
+ var t = arguments[e];
38
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
39
+ }
40
+ return n;
41
+ }, _extends.apply(null, arguments);
42
+ }
34
43
  function _regenerator() {
35
44
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
36
45
  var e,
@@ -126,32 +135,61 @@ function _regeneratorDefine(e, r, n, t) {
126
135
  i = 0;
127
136
  }
128
137
  _regeneratorDefine = function (e, r, n, t) {
129
- if (r) i ? i(e, r, {
138
+ function o(r, n) {
139
+ _regeneratorDefine(e, r, function (e) {
140
+ return this._invoke(r, n, e);
141
+ });
142
+ }
143
+ r ? i ? i(e, r, {
130
144
  value: n,
131
145
  enumerable: !t,
132
146
  configurable: !t,
133
147
  writable: !t
134
- }) : e[r] = n;else {
135
- function o(r, n) {
136
- _regeneratorDefine(e, r, function (e) {
137
- return this._invoke(r, n, e);
138
- });
139
- }
140
- o("next", 0), o("throw", 1), o("return", 2);
141
- }
148
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
142
149
  }, _regeneratorDefine(e, r, n, t);
143
150
  }
144
151
 
152
+ var instance = function instance(baseURL, config) {
153
+ if (config === void 0) {
154
+ config = {
155
+ headers: {
156
+ Accept: 'application/json; odata=verbose',
157
+ 'Content-Type': 'application/json; odata=verbose'
158
+ },
159
+ timeout: 15000,
160
+ withCredentials: true
161
+ };
162
+ }
163
+ return axios.create(_extends({
164
+ baseURL: baseURL
165
+ }, config));
166
+ };
167
+
145
168
  var HTTPSharePointRequests = /*#__PURE__*/function () {
169
+ /**
170
+ * Creates an HTTP SharePoint requester bound to the provided base URL.
171
+ *
172
+ * @param baseURL The root SharePoint site URL (with or without trailing slash).
173
+ */
146
174
  function HTTPSharePointRequests(baseURL) {
147
175
  var _this = this;
148
176
  this.lists = {
177
+ /**
178
+ * Fetches all SharePoint lists available to the current site.
179
+ *
180
+ * @returns Promise resolving to the list collection response payload.
181
+ */
149
182
  get: function get() {
150
183
  _this.endpoint = '_api/web/lists';
151
184
  return _this.get_v2();
152
185
  }
153
186
  };
154
187
  this.folders = {
188
+ /**
189
+ * Retrieves SharePoint folders from the default folders endpoint.
190
+ *
191
+ * @returns A promise resolving with folder metadata.
192
+ */
155
193
  get: function get() {
156
194
  _this.endpoint = '_api/web/folders';
157
195
  _this.get_v2();
@@ -187,6 +225,11 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
187
225
  }
188
226
  };
189
227
  this.user = {
228
+ /**
229
+ * Provides accessors for the current user's profile information.
230
+ *
231
+ * @returns Helper exposing a `get` function to retrieve profile details.
232
+ */
190
233
  properties: function properties() {
191
234
  return {
192
235
  get: function get() {
@@ -194,12 +237,30 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
194
237
  }
195
238
  };
196
239
  },
240
+ /**
241
+ * Searches across site users and their groups.
242
+ *
243
+ * @param searchValue Query string to match site users.
244
+ * @returns Promise resolving to matching site users.
245
+ */
197
246
  searchSiteUser: function searchSiteUser(searchValue) {
198
247
  return _this.getSiteUser(searchValue);
199
248
  },
249
+ /**
250
+ * Performs a people-picker search scoped to the current site collection.
251
+ *
252
+ * @param input Search prefix.
253
+ * @param filter Optional additional filter condition.
254
+ * @returns Promise with type-ahead person results.
255
+ */
200
256
  searchUser: function searchUser(input, filter) {
201
257
  return _this.typeAhead(input, filter);
202
258
  },
259
+ /**
260
+ * Fetches the currently authenticated SharePoint user.
261
+ *
262
+ * @returns Helper exposing `get` that resolves to the current user payload.
263
+ */
203
264
  current: function current() {
204
265
  _this.endpoint = '_api/web/currentUser';
205
266
  return {
@@ -208,6 +269,11 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
208
269
  }
209
270
  };
210
271
  },
272
+ /**
273
+ * Retrieves calculated permission level for the current user.
274
+ *
275
+ * @returns Helper exposing `get` resolving to the user's permission definition.
276
+ */
211
277
  currentPermission: function currentPermission() {
212
278
  return {
213
279
  get: function get() {
@@ -219,19 +285,14 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
219
285
  this.baseURL = baseURL.endsWith('/') ? baseURL : baseURL + "/";
220
286
  this.endpoint = '/api';
221
287
  this.listName = '';
222
- var headers = {
223
- Accept: 'application/json; odata=verbose',
224
- 'Content-Type': 'application/json; odata=verbose'
225
- };
226
- this.instance = axios.create({
227
- baseURL: "" + this.baseURL,
228
- withCredentials: true,
229
- headers: {
230
- common: headers,
231
- post: headers
232
- }
233
- });
288
+ this.instance = instance(this.baseURL);
234
289
  }
290
+ /**
291
+ * Converts array values in a payload to the `Collection(Edm.String)` structure
292
+ * expected by SharePoint REST endpoints.
293
+ *
294
+ * @param data The list item payload to harmonise in-place.
295
+ */
235
296
  var _proto = HTTPSharePointRequests.prototype;
236
297
  _proto.transformArraysToEdmStrings = function transformArraysToEdmStrings(data) {
237
298
  for (var key in data) {
@@ -252,7 +313,14 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
252
313
  this.listName = listName;
253
314
  this.endpoint = "_vti_bin/ListData.svc/" + listName;
254
315
  return this;
255
- };
316
+ }
317
+ /**
318
+ * Selects a SharePoint list and exposes list-scoped CRUD helpers.
319
+ *
320
+ * @param listName Logical list key configured in the generic type map.
321
+ * @param sharepoint_ver SharePoint version used to choose the correct REST endpoint.
322
+ * @returns Chainable helpers bound to the selected list.
323
+ */;
256
324
  _proto.from = function from(listName, sharepoint_ver) {
257
325
  var _this2 = this;
258
326
  if (sharepoint_ver === void 0) {
@@ -286,7 +354,13 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
286
354
  };
287
355
  }
288
356
  };
289
- };
357
+ }
358
+ /**
359
+ * Targets a SharePoint folder path and exposes file retrieval helpers.
360
+ *
361
+ * @param folderName Optional folder path relative to `Shared Documents`.
362
+ * @returns Helper exposing `get` to fetch files or sub-folders.
363
+ */;
290
364
  _proto.folder = function folder(folderName) {
291
365
  var _this3 = this;
292
366
  var filePath = ['Shared Documents'];
@@ -295,6 +369,12 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
295
369
  }
296
370
  this.endpoint = "_api/web/GetFolderByServerRelativeUrl('" + filePath.join('/') + "')";
297
371
  return {
372
+ /**
373
+ * Fetches files or folders from the targeted path.
374
+ *
375
+ * @param options Optional REST query options to refine the result set.
376
+ * @returns Promise resolving to folder contents and metadata.
377
+ */
298
378
  get: function get(options) {
299
379
  if (!(options != null && options.type)) {
300
380
  _this3.endpoint += '/Files';
@@ -304,11 +384,22 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
304
384
  return _this3.get_files(options);
305
385
  }
306
386
  };
307
- };
387
+ }
388
+ /**
389
+ * Retrieves user list items and exposes a get helper with optional query parameters.
390
+ *
391
+ * @param options Optional REST query options.
392
+ * @returns Helper exposing `get` returning SharePoint user rows.
393
+ */;
308
394
  _proto.users = function users(options) {
309
395
  var _this4 = this;
310
396
  this.endpoint = '_api/web/SiteUserInfoList/items';
311
397
  return {
398
+ /**
399
+ * Executes the user list request using the specified options.
400
+ *
401
+ * @returns Promise resolving to the SharePoint user list response.
402
+ */
312
403
  get: function get() {
313
404
  return _this4.get_v2(options);
314
405
  }
@@ -354,8 +445,17 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
354
445
  return _getDigest.apply(this, arguments);
355
446
  }
356
447
  return getDigest;
357
- }();
358
- _proto.get_only = /*#__PURE__*/function () {
448
+ }()
449
+ /**
450
+ * Executes a GET request without additional metadata wrapping.
451
+ *
452
+ * @param options Optional REST query options.
453
+ * @returns SharePoint response payload or undefined when empty.
454
+ */
455
+ ;
456
+ _proto.get_only =
457
+ /*#__PURE__*/
458
+ function () {
359
459
  var _get_only = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(options) {
360
460
  var _ref, expand, orderBy, limit, filter, cols, skip, params, _yield$this$instance$, data;
361
461
  return _regenerator().w(function (_context2) {
@@ -391,8 +491,17 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
391
491
  return _get_only.apply(this, arguments);
392
492
  }
393
493
  return get_only;
394
- }();
395
- _proto.get_files = /*#__PURE__*/function () {
494
+ }()
495
+ /**
496
+ * Retrieves folder contents with optional filtering and returns the payload with metadata.
497
+ *
498
+ * @param options REST options describing expand/filter/order conditions.
499
+ * @returns Folder data and the fully resolved request URL.
500
+ */
501
+ ;
502
+ _proto.get_files =
503
+ /*#__PURE__*/
504
+ function () {
396
505
  var _get_files = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(options) {
397
506
  var _ref2, expand, orderBy, limit, filter, cols, skip, params, url, response, data, meta;
398
507
  return _regenerator().w(function (_context3) {
@@ -438,8 +547,17 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
438
547
  return _get_files.apply(this, arguments);
439
548
  }
440
549
  return get_files;
441
- }();
442
- _proto.get_v2 = /*#__PURE__*/function () {
550
+ }()
551
+ /**
552
+ * Performs a typed list read against the current endpoint.
553
+ *
554
+ * @param options Optional REST query options governing expand, filter, ordering and pagination.
555
+ * @returns SharePoint list items alongside the fully-resolved request URL.
556
+ */
557
+ ;
558
+ _proto.get_v2 =
559
+ /*#__PURE__*/
560
+ function () {
443
561
  var _get_v = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(options) {
444
562
  var _ref4, expand, orderBy, limit, filter, cols, skip, params, url, response, data, meta;
445
563
  return _regenerator().w(function (_context4) {
@@ -485,8 +603,19 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
485
603
  return _get_v.apply(this, arguments);
486
604
  }
487
605
  return get_v2;
488
- }();
489
- _proto.update_2 = /*#__PURE__*/function () {
606
+ }()
607
+ /**
608
+ * Updates an item in the currently selected list.
609
+ *
610
+ * @param id Target list item identifier.
611
+ * @param data Payload with fields to update.
612
+ * @param digest Optional pre-fetched form digest to reuse.
613
+ * @returns Axios response of the update request.
614
+ */
615
+ ;
616
+ _proto.update_2 =
617
+ /*#__PURE__*/
618
+ function () {
490
619
  var _update_ = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(id, data, digest) {
491
620
  var formDigestValue, url, response, _t2;
492
621
  return _regenerator().w(function (_context5) {
@@ -528,10 +657,19 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
528
657
  return _update_.apply(this, arguments);
529
658
  }
530
659
  return update_2;
531
- }();
532
- _proto.create_v2 = /*#__PURE__*/function () {
660
+ }()
661
+ /**
662
+ * Creates a new item within the active list.
663
+ *
664
+ * @param listData SharePoint list item payload.
665
+ * @returns Axios response resolved from the create request.
666
+ */
667
+ ;
668
+ _proto.create_v2 =
669
+ /*#__PURE__*/
670
+ function () {
533
671
  var _create_v = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(listData) {
534
- var response, _t3, _t4, _t5, _t6, _t7, _t8;
672
+ var response, _t3, _t4, _t5, _t6, _t7;
535
673
  return _regenerator().w(function (_context6) {
536
674
  while (1) switch (_context6.n) {
537
675
  case 0:
@@ -550,14 +688,13 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
550
688
  'X-RequestDigest': _t6,
551
689
  'IF-MATCH': '*'
552
690
  };
553
- _t8 = {
691
+ _context6.n = 2;
692
+ return _t3.instance.call(_t3, {
554
693
  url: _t4,
555
694
  method: 'POST',
556
695
  data: _t5,
557
696
  headers: _t7
558
- };
559
- _context6.n = 2;
560
- return _t3.instance.call(_t3, _t8);
697
+ });
561
698
  case 2:
562
699
  response = _context6.v;
563
700
  return _context6.a(2, response);
@@ -568,31 +705,39 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
568
705
  return _create_v.apply(this, arguments);
569
706
  }
570
707
  return create_v2;
571
- }();
572
- _proto.createFile = /*#__PURE__*/function () {
708
+ }()
709
+ /**
710
+ * Uploads an attachment file to an existing list item.
711
+ *
712
+ * @param props File payload and target item identifier.
713
+ * @returns Axios response describing the upload result.
714
+ */
715
+ ;
716
+ _proto.createFile =
717
+ /*#__PURE__*/
718
+ function () {
573
719
  var _createFile = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(_ref6) {
574
- var file, itemId, requestUrl, res, _t9, _t0, _t1, _t10, _t11, _t12;
720
+ var file, itemId, requestUrl, res, _t8, _t9, _t0, _t1, _t10;
575
721
  return _regenerator().w(function (_context7) {
576
722
  while (1) switch (_context7.n) {
577
723
  case 0:
578
724
  file = _ref6.file, itemId = _ref6.itemId;
579
725
  requestUrl = "_api/lists/getbytitle('" + this.listName + "')/items(" + itemId + ")/AttachmentFiles/add(FileName='" + file.name + "')";
580
- _t9 = this.instance;
581
- _t0 = requestUrl;
582
- _t1 = file;
726
+ _t8 = this.instance;
727
+ _t9 = requestUrl;
728
+ _t0 = file;
583
729
  _context7.n = 1;
584
730
  return this.getDigest();
585
731
  case 1:
586
- _t10 = _context7.v;
587
- _t11 = {
588
- 'X-RequestDigest': _t10
589
- };
590
- _t12 = {
591
- headers: _t11,
592
- withCredentials: true
732
+ _t1 = _context7.v;
733
+ _t10 = {
734
+ 'X-RequestDigest': _t1
593
735
  };
594
736
  _context7.n = 2;
595
- return _t9.post.call(_t9, _t0, _t1, _t12);
737
+ return _t8.post.call(_t8, _t9, _t0, {
738
+ headers: _t10,
739
+ withCredentials: true
740
+ });
596
741
  case 2:
597
742
  res = _context7.v;
598
743
  return _context7.a(2, res);
@@ -603,8 +748,17 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
603
748
  return _createFile.apply(this, arguments);
604
749
  }
605
750
  return createFile;
606
- }();
607
- _proto["delete"] = /*#__PURE__*/function () {
751
+ }()
752
+ /**
753
+ * Deletes an item using the current endpoint.
754
+ *
755
+ * @param ID Identifier of the entity to remove.
756
+ * @returns Axios response from the delete call.
757
+ */
758
+ ;
759
+ _proto["delete"] =
760
+ /*#__PURE__*/
761
+ function () {
608
762
  var _delete2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(ID) {
609
763
  var response;
610
764
  return _regenerator().w(function (_context8) {
@@ -625,24 +779,24 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
625
779
  }();
626
780
  _proto.sendEmail = /*#__PURE__*/function () {
627
781
  var _sendEmail = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9(_ref7) {
628
- var From, To, Subject, Body, httpRequest, response, _t13, _t14, _t15, _t16, _t17, _t18;
782
+ var From, To, Subject, Body, httpRequest, response, _t11, _t12, _t13, _t14, _t15;
629
783
  return _regenerator().w(function (_context9) {
630
784
  while (1) switch (_context9.n) {
631
785
  case 0:
632
786
  From = _ref7.From, To = _ref7.To, Subject = _ref7.Subject, Body = _ref7.Body;
633
787
  httpRequest = '_api/SP.Utilities.Utility.SendEmail';
634
- _t13 = this;
635
- _t14 = httpRequest;
788
+ _t11 = this;
789
+ _t12 = httpRequest;
636
790
  _context9.n = 1;
637
791
  return this.getDigest();
638
792
  case 1:
639
- _t15 = _context9.v;
640
- _t16 = {
641
- 'X-RequestDigest': _t15,
793
+ _t13 = _context9.v;
794
+ _t14 = {
795
+ 'X-RequestDigest': _t13,
642
796
  'X-Http-Method': 'POST',
643
797
  'Content-Type': 'application/json;odata=verbose'
644
798
  };
645
- _t17 = JSON.stringify({
799
+ _t15 = JSON.stringify({
646
800
  properties: {
647
801
  __metadata: {
648
802
  type: 'SP.Utilities.EmailProperties'
@@ -655,14 +809,13 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
655
809
  Subject: Subject
656
810
  }
657
811
  });
658
- _t18 = {
659
- url: _t14,
660
- method: 'POST',
661
- headers: _t16,
662
- data: _t17
663
- };
664
812
  _context9.n = 2;
665
- return _t13.instance.call(_t13, _t18);
813
+ return _t11.instance.call(_t11, {
814
+ url: _t12,
815
+ method: 'POST',
816
+ headers: _t14,
817
+ data: _t15
818
+ });
666
819
  case 2:
667
820
  response = _context9.v;
668
821
  return _context9.a(2, response);
@@ -673,8 +826,18 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
673
826
  return _sendEmail.apply(this, arguments);
674
827
  }
675
828
  return sendEmail;
676
- }();
677
- _proto.typeAhead = /*#__PURE__*/function () {
829
+ }()
830
+ /**
831
+ * Queries SharePoint's people picker endpoint for matching users.
832
+ *
833
+ * @param input Free-text search term.
834
+ * @param filter Optional additional filter condition.
835
+ * @returns Promise with type-ahead results payload.
836
+ */
837
+ ;
838
+ _proto.typeAhead =
839
+ /*#__PURE__*/
840
+ function () {
678
841
  var _typeAhead = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(input, filter) {
679
842
  var filterValue, response;
680
843
  return _regenerator().w(function (_context0) {
@@ -693,8 +856,16 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
693
856
  return _typeAhead.apply(this, arguments);
694
857
  }
695
858
  return typeAhead;
696
- }();
697
- _proto.currentUserProperties = /*#__PURE__*/function () {
859
+ }()
860
+ /**
861
+ * Retrieves the current user profile and flattens selected properties.
862
+ *
863
+ * @returns Promise containing the current user's profile information.
864
+ */
865
+ ;
866
+ _proto.currentUserProperties =
867
+ /*#__PURE__*/
868
+ function () {
698
869
  var _currentUserProperties = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1() {
699
870
  var requestUrl, profile;
700
871
  return _regenerator().w(function (_context1) {
@@ -728,8 +899,17 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
728
899
  return _currentUserProperties.apply(this, arguments);
729
900
  }
730
901
  return currentUserProperties;
731
- }();
732
- _proto.getSiteUser = /*#__PURE__*/function () {
902
+ }()
903
+ /**
904
+ * Searches site users based on a substring match across common fields.
905
+ *
906
+ * @param searchValue Term to match against the SharePoint user directory.
907
+ * @returns Promise with matching site users and their groups.
908
+ */
909
+ ;
910
+ _proto.getSiteUser =
911
+ /*#__PURE__*/
912
+ function () {
733
913
  var _getSiteUser = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(searchValue) {
734
914
  var requestUrl, response;
735
915
  return _regenerator().w(function (_context10) {
@@ -748,8 +928,16 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
748
928
  return _getSiteUser.apply(this, arguments);
749
929
  }
750
930
  return getSiteUser;
751
- }();
752
- _proto.roleDefinitions = /*#__PURE__*/function () {
931
+ }()
932
+ /**
933
+ * Retrieves all available role definitions for the current site.
934
+ *
935
+ * @returns Promise resolving to an array of role definitions.
936
+ */
937
+ ;
938
+ _proto.roleDefinitions =
939
+ /*#__PURE__*/
940
+ function () {
753
941
  var _roleDefinitions = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee11() {
754
942
  var requestUrl, response;
755
943
  return _regenerator().w(function (_context11) {
@@ -768,8 +956,16 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
768
956
  return _roleDefinitions.apply(this, arguments);
769
957
  }
770
958
  return roleDefinitions;
771
- }();
772
- _proto.getEffectiveBasePermissions = /*#__PURE__*/function () {
959
+ }()
960
+ /**
961
+ * Fetches the bit-encoded permissions of the current user.
962
+ *
963
+ * @returns Promise resolving to the `EffectiveBasePermissions` object.
964
+ */
965
+ ;
966
+ _proto.getEffectiveBasePermissions =
967
+ /*#__PURE__*/
968
+ function () {
773
969
  var _getEffectiveBasePermissions = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee12() {
774
970
  var requestUrl, response;
775
971
  return _regenerator().w(function (_context12) {
@@ -788,8 +984,16 @@ var HTTPSharePointRequests = /*#__PURE__*/function () {
788
984
  return _getEffectiveBasePermissions.apply(this, arguments);
789
985
  }
790
986
  return getEffectiveBasePermissions;
791
- }();
792
- _proto.currentUserPermissions = /*#__PURE__*/function () {
987
+ }()
988
+ /**
989
+ * Matches the current user's effective permissions against known role definitions.
990
+ *
991
+ * @returns The matching SharePoint role definition as a structured permission object.
992
+ */
993
+ ;
994
+ _proto.currentUserPermissions =
995
+ /*#__PURE__*/
996
+ function () {
793
997
  var _currentUserPermissions = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee13() {
794
998
  var _yield$this$getEffect, High, roleDefinitions, result;
795
999
  return _regenerator().w(function (_context13) {