gd-sprest 6.7.1 → 6.7.5

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.
@@ -48,6 +48,9 @@ export interface IFieldInfo {
48
48
  /** The field description. */
49
49
  description?: string;
50
50
 
51
+ /** True to enforce unique values. */
52
+ enforceUniqueValues?: boolean;
53
+
51
54
  /** The group name. */
52
55
  group?: string;
53
56
 
@@ -84,9 +87,12 @@ export interface IFieldInfo {
84
87
  /** Flag to make this field visible in the new form. */
85
88
  showInNewForm?: boolean;
86
89
 
87
- /** Flag to make this field visible in the list views. */
90
+ /** Flag to make this field visible in the list view. */
88
91
  showInViewForms?: boolean;
89
92
 
93
+ /** Flag to disable sorting from the list view. */
94
+ sortable?: boolean;
95
+
90
96
  /** The field title */
91
97
  title?: string;
92
98
 
@@ -264,6 +270,9 @@ export interface IFieldInfoUser extends IFieldInfo {
264
270
 
265
271
  /** The user selection scope */
266
272
  selectionScope?: number;
273
+
274
+ /** The lookup field to show */
275
+ showField?: string;
267
276
  }
268
277
 
269
278
  /**
@@ -8,6 +8,7 @@ export const SPTypes: ISPTypes;
8
8
  export interface ISPTypes {
9
9
  BasePermissionTypes: Types.IBasePermissionTypes;
10
10
  CalendarType: Types.ICalendarType;
11
+ CheckInType: Types.ICheckInType;
11
12
  CheckOutType: Types.ICheckOutType;
12
13
  ChoiceFormatType: Types.IChoiceFormatType;
13
14
  ClientTemplateUtility: Types.IClientTemplateUtility;
@@ -16,6 +17,7 @@ export interface ISPTypes {
16
17
  DraftVisibilityType: Types.IDraftVisibilityType;
17
18
  EventReceiverType: Types.IEventReceiverType;
18
19
  EventReceiverSynchronizationType: Types.IEventReceiverSynchronizationType;
20
+ FieldIndexStatus: Types.IFieldIndexStatus;
19
21
  FieldNoteType: Types.IFieldNoteType;
20
22
  FieldNumberType: Types.IFieldNumberType;
21
23
  FieldResultType: Types.IFieldResultType;
@@ -24,6 +26,8 @@ export interface ISPTypes {
24
26
  FileLevelType: Types.IFileLevelType;
25
27
  FileTemplateType: Types.IFileTemplateType;
26
28
  FriendlyDateFormat: Types.IFriendlyDateFormat;
29
+ GetUserEffectivePermissionsResult: Types.IGetUserEffectivePermissionsResult;
30
+ ListExperienceOptions: Types.IListExperienceOptions;
27
31
  ListTemplateType: Types.IListTemplateType;
28
32
  LocaleLCIDType: Types.ILocaleLCIDType;
29
33
  ModalDialogResult: Types.ModalDialogResult,
@@ -651,6 +651,20 @@ export interface IGetUserEffectivePermissionsResult {
651
651
  GetUserEffectivePermissions: BasePermissions
652
652
  }
653
653
 
654
+ /**
655
+ * List Experience Options
656
+ */
657
+ export type IListExperienceOptions = {
658
+ /** Default set by the tenant */
659
+ Auto: number,
660
+
661
+ /** Modern experience */
662
+ NewExperience: number,
663
+
664
+ /** Classic experience */
665
+ ClassicExperience: number
666
+ }
667
+
654
668
  /**
655
669
  * List Template Types
656
670
  */
@@ -373,6 +373,9 @@ exports.FieldSchemaXML = function (fieldInfo) {
373
373
  if (fieldInfo.selectionScope != null) {
374
374
  props["UserSelectionScope"] = fieldInfo.selectionScope;
375
375
  }
376
+ if (fieldInfo.showField != null) {
377
+ props["ShowField"] = fieldInfo.showField;
378
+ }
376
379
  // Generate the schema
377
380
  schemaXml = "<Field " + toString(props) + " />";
378
381
  // Resolve the request
@@ -413,6 +416,9 @@ exports.FieldSchemaXML = function (fieldInfo) {
413
416
  if (typeof (fieldInfo.description) !== "undefined") {
414
417
  props["Description"] = fieldInfo.description;
415
418
  }
419
+ if (typeof (fieldInfo.enforceUniqueValues) !== "undefined") {
420
+ props["EnforceUniqueValues"] = fieldInfo.enforceUniqueValues ? "TRUE" : "FALSE";
421
+ }
416
422
  if (typeof (fieldInfo.group) !== "undefined") {
417
423
  props["Group"] = fieldInfo.group;
418
424
  }
@@ -446,6 +452,9 @@ exports.FieldSchemaXML = function (fieldInfo) {
446
452
  if (typeof (fieldInfo.showInViewForms) !== "undefined") {
447
453
  props["ShowInViewForms"] = fieldInfo.showInViewForms ? "TRUE" : "FALSE";
448
454
  }
455
+ if (typeof (fieldInfo.sortable) !== "undefined") {
456
+ props["Sortable"] = fieldInfo.sortable ? "TRUE" : "FALSE";
457
+ }
449
458
  // Set the type
450
459
  switch (fieldInfo.type) {
451
460
  // Boolean
@@ -599,15 +599,18 @@ exports.SPConfig = function (cfg, webUrl) {
599
599
  };
600
600
  // Method to see if an object exists in a collection
601
601
  var isInCollection = function (key, value, collection) {
602
- var valueLower = value.toLowerCase();
603
- // Parse the collection
604
- for (var i = 0; i < collection.length; i++) {
605
- var keyValue = collection[i][key];
606
- keyValue = keyValue ? keyValue.toLowerCase() : "";
607
- // See if the item exists
608
- if (valueLower == keyValue) {
609
- // Return true
610
- return collection[i];
602
+ // Ensure a value exists
603
+ if (value) {
604
+ var valueLower = value ? value.toLowerCase() : "";
605
+ // Parse the collection
606
+ for (var i = 0; i < collection.length; i++) {
607
+ var keyValue = collection[i][key];
608
+ keyValue = keyValue ? keyValue.toLowerCase() : "";
609
+ // See if the item exists
610
+ if (valueLower == keyValue) {
611
+ // Return true
612
+ return collection[i];
613
+ }
611
614
  }
612
615
  }
613
616
  // Not in the collection
@@ -6020,9 +6020,10 @@ exports.Mapper = {
6020
6020
  "ListTemplates|SP.ListTemplate.Collection|('[Name]')|SP.ListTemplate", "Navigation|SP.Navigation", "ParentWeb",
6021
6021
  "PushNotificationSubscribers", "RecycleBin", "RegionalSettings", "RoleAssignments|SP.RoleAssignment.Collection|([Name])|SP.RoleAssignment",
6022
6022
  "RoleDefinitions|SP.RoleDefinition.Collection|/getByName('[Name]')|SP.RoleDefinition", "RootFolder|SP.Folder|/getByUrl('[Name]')|SP.File",
6023
- "SiteGroups|SP.Group.Collection|/getByName('[Name]')|SP.Group", "SiteUserInfoList", "SiteUsers|SP.User.Collection|/getById([Name])|SP.User",
6024
- "TenantAppCatalog|tenantappcatalog", "ThemeInfo", "TitleResource", "UserCustomActions|SP.UserCustomAction.Collection|('[Name]')|SP.UserCustomAction",
6025
- "WebInfos|SP.WebInformation.Collection", "Webs|SP.Web.Collection", "WorkflowAssociations", "WorkflowTemplates"
6023
+ "SiteCollectionAppCatalog|sitecollectionappcatalog", "SiteGroups|SP.Group.Collection|/getByName('[Name]')|SP.Group", "SiteUserInfoList",
6024
+ "SiteUsers|SP.User.Collection|/getById([Name])|SP.User", "TenantAppCatalog|tenantappcatalog", "ThemeInfo", "TitleResource",
6025
+ "UserCustomActions|SP.UserCustomAction.Collection|('[Name]')|SP.UserCustomAction", "WebInfos|SP.WebInformation.Collection",
6026
+ "Webs|SP.Web.Collection", "WorkflowAssociations", "WorkflowTemplates"
6026
6027
  ],
6027
6028
  addCrossFarmMessage: {
6028
6029
  argNames: ["messagePayloadBase64"],
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: 6.71,
11
+ __ver: 6.75,
12
12
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
13
13
  Apps: Lib.Apps,
14
14
  ContextInfo: Lib.ContextInfo,
@@ -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.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.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.ClientTemplatesUtility = exports.ChoiceFormatType = exports.CheckOutType = exports.CheckInType = exports.CalendarTypes = exports.BasePermissionTypes = void 0;
4
4
  /**
5
5
  * Base Permission Types
6
6
  */
@@ -280,6 +280,14 @@ exports.FriendlyDateFormat = {
280
280
  Disabled: 1,
281
281
  Relative: 2
282
282
  };
283
+ /**
284
+ * List Experience Types
285
+ */
286
+ exports.ListExperienceOptions = {
287
+ Auto: 0,
288
+ NewExperience: 1,
289
+ ClassicExperience: 2
290
+ };
283
291
  /**
284
292
  * List Template Types
285
293
  */
@@ -360,6 +360,7 @@ declare module 'gd-sprest/sptypes' {
360
360
  export interface ISPTypes {
361
361
  BasePermissionTypes: Types.IBasePermissionTypes;
362
362
  CalendarType: Types.ICalendarType;
363
+ CheckInType: Types.ICheckInType;
363
364
  CheckOutType: Types.ICheckOutType;
364
365
  ChoiceFormatType: Types.IChoiceFormatType;
365
366
  ClientTemplateUtility: Types.IClientTemplateUtility;
@@ -368,6 +369,7 @@ declare module 'gd-sprest/sptypes' {
368
369
  DraftVisibilityType: Types.IDraftVisibilityType;
369
370
  EventReceiverType: Types.IEventReceiverType;
370
371
  EventReceiverSynchronizationType: Types.IEventReceiverSynchronizationType;
372
+ FieldIndexStatus: Types.IFieldIndexStatus;
371
373
  FieldNoteType: Types.IFieldNoteType;
372
374
  FieldNumberType: Types.IFieldNumberType;
373
375
  FieldResultType: Types.IFieldResultType;
@@ -376,6 +378,8 @@ declare module 'gd-sprest/sptypes' {
376
378
  FileLevelType: Types.IFileLevelType;
377
379
  FileTemplateType: Types.IFileTemplateType;
378
380
  FriendlyDateFormat: Types.IFriendlyDateFormat;
381
+ GetUserEffectivePermissionsResult: Types.IGetUserEffectivePermissionsResult;
382
+ ListExperienceOptions: Types.IListExperienceOptions;
379
383
  ListTemplateType: Types.IListTemplateType;
380
384
  LocaleLCIDType: Types.ILocaleLCIDType;
381
385
  ModalDialogResult: Types.ModalDialogResult,
@@ -3001,6 +3005,9 @@ declare module 'gd-sprest/helper/spCfg' {
3001
3005
  /** The field description. */
3002
3006
  description?: string;
3003
3007
 
3008
+ /** True to enforce unique values. */
3009
+ enforceUniqueValues?: boolean;
3010
+
3004
3011
  /** The group name. */
3005
3012
  group?: string;
3006
3013
 
@@ -3037,9 +3044,12 @@ declare module 'gd-sprest/helper/spCfg' {
3037
3044
  /** Flag to make this field visible in the new form. */
3038
3045
  showInNewForm?: boolean;
3039
3046
 
3040
- /** Flag to make this field visible in the list views. */
3047
+ /** Flag to make this field visible in the list view. */
3041
3048
  showInViewForms?: boolean;
3042
3049
 
3050
+ /** Flag to disable sorting from the list view. */
3051
+ sortable?: boolean;
3052
+
3043
3053
  /** The field title */
3044
3054
  title?: string;
3045
3055
 
@@ -3217,6 +3227,9 @@ declare module 'gd-sprest/helper/spCfg' {
3217
3227
 
3218
3228
  /** The user selection scope */
3219
3229
  selectionScope?: number;
3230
+
3231
+ /** The lookup field to show */
3232
+ showField?: string;
3220
3233
  }
3221
3234
 
3222
3235
  /**
@@ -4457,6 +4470,20 @@ declare module 'gd-sprest/sptypes/sptypes' {
4457
4470
  GetUserEffectivePermissions: BasePermissions
4458
4471
  }
4459
4472
 
4473
+ /**
4474
+ * List Experience Options
4475
+ */
4476
+ export type IListExperienceOptions = {
4477
+ /** Default set by the tenant */
4478
+ Auto: number,
4479
+
4480
+ /** Modern experience */
4481
+ NewExperience: number,
4482
+
4483
+ /** Classic experience */
4484
+ ClassicExperience: number
4485
+ }
4486
+
4460
4487
  /**
4461
4488
  * List Template Types
4462
4489
  */