From 08321ed1c468c0e08b3b0dc5183944be46cc1a21 Mon Sep 17 00:00:00 2001 From: Gunjan Datta Date: Wed, 7 Nov 2018 10:34:43 -0500 Subject: [PATCH 1/2] Updated ther base permission types enumerator. --- src/mapper/sptypes.ts | 2 ++ src/mapper/types/sptypes.d.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/mapper/sptypes.ts b/src/mapper/sptypes.ts index ca2a1015..47f28f1a 100644 --- a/src/mapper/sptypes.ts +++ b/src/mapper/sptypes.ts @@ -17,6 +17,7 @@ export const BasePermissionTypes: SPTypes.IBasePermissionTypes = { ManagePersonalViews: 10, ManageLists: 12, ViewFormPages: 13, + AnonymousSearchAccessList: 14, Open: 17, ViewPages: 18, AddAndCustomizePages: 19, @@ -32,6 +33,7 @@ export const BasePermissionTypes: SPTypes.IBasePermissionTypes = { AddDelPrivateWebParts: 29, UpdatePersonalWebParts: 30, ManageWeb: 31, + AnonymousSearchAccessWebLists: 32, UseClientIntegration: 37, UseRemoteAPIs: 38, ManageAlerts: 39, diff --git a/src/mapper/types/sptypes.d.ts b/src/mapper/types/sptypes.d.ts index b6647ac1..5282382f 100644 --- a/src/mapper/types/sptypes.d.ts +++ b/src/mapper/types/sptypes.d.ts @@ -6,6 +6,8 @@ export type IBasePermissionTypes = { AddAndCustomizePages: number, AddDelPrivateWebParts: number, AddListItems: number, + AnonymousSearchAccessList: number, + AnonymousSearchAccessWebLists: number, ApplyStyleSheets: number, ApplyThemeAndBorder: number, ApproveItems: number, From 3dace3f53a3141910c46ad598a7a17dc6726fc34 Mon Sep 17 00:00:00 2001 From: Gunjan Datta Date: Wed, 7 Nov 2018 12:17:09 -0500 Subject: [PATCH 2/2] Added the hasPermissions method to the Helper class. --- build/helper/methods.js | 32 +++++++++++++++++++++++++++++++ build/mapper/sptypes.js | 2 ++ build/rest.js | 3 ++- dist/gd-sprest.d.ts | 17 +++++++++++++++++ dist/gd-sprest.js | 6 +++--- dist/gd-sprest.min.js | 2 +- package.json | 2 +- src/helper/methods.ts | 36 +++++++++++++++++++++++++++++++++++ src/helper/types/helper.d.ts | 6 ++++++ src/mapper/types/sptypes.d.ts | 9 +++++++++ src/rest.ts | 3 ++- test/test.ts | 18 +++++++++++------- 12 files changed, 122 insertions(+), 14 deletions(-) diff --git a/build/helper/methods.js b/build/helper/methods.js index 12321e30..42316350 100644 --- a/build/helper/methods.js +++ b/build/helper/methods.js @@ -51,6 +51,38 @@ exports.createDocSet = function (name, listName, webUrl) { }, reject); }); }; +/** + * Determines if the user has permissions, based on the permission kind value + */ +exports.hasPermissions = function (permissionMask, permissions) { + if (permissions === void 0) { permissions = []; } + var hasPermissions = false; + // Set the permissions + var requestedPermissions = typeof (permissions) === "number" ? [permissions] : permissions; + // Ensure the base permissions exist + if (SP && SP.BasePermissions) { + // Initialize the base permissions from the value + var basePermissions = new SP.BasePermissions(); + basePermissions.initPropertiesFromJson(permissionMask); + // Default the permission flag + hasPermissions = true; + // Parse the requested permissions + for (var i = 0; i < requestedPermissions.length; i++) { + // See if the user has permissions + if (!basePermissions.has(requestedPermissions[i])) { + // Set the flag and break from the loop + hasPermissions = false; + break; + } + } + } + else { + // Log + console.info("[gd-sprest] The 'SP' core library is not available."); + } + // Return the value + return hasPermissions; +}; /** * Convert a JSON string to a base object */ diff --git a/build/mapper/sptypes.js b/build/mapper/sptypes.js index 67a48950..e4ecbb8f 100644 --- a/build/mapper/sptypes.js +++ b/build/mapper/sptypes.js @@ -17,6 +17,7 @@ exports.BasePermissionTypes = { ManagePersonalViews: 10, ManageLists: 12, ViewFormPages: 13, + AnonymousSearchAccessList: 14, Open: 17, ViewPages: 18, AddAndCustomizePages: 19, @@ -32,6 +33,7 @@ exports.BasePermissionTypes = { AddDelPrivateWebParts: 29, UpdatePersonalWebParts: 30, ManageWeb: 31, + AnonymousSearchAccessWebLists: 32, UseClientIntegration: 37, UseRemoteAPIs: 38, ManageAlerts: 39, diff --git a/build/rest.js b/build/rest.js index 3716a001..e4e755be 100644 --- a/build/rest.js +++ b/build/rest.js @@ -7,7 +7,7 @@ var Mapper = require("./mapper"); * SharePoint REST Library */ exports.$REST = { - __ver: 4.35, + __ver: 4.36, AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); }, ContextInfo: Lib.ContextInfo, DefaultRequestToHostFl: false, @@ -18,6 +18,7 @@ exports.$REST = { createDocSet: Helper.createDocSet, Executor: Helper.Executor, FieldSchemaXML: Helper.FieldSchemaXML, + hasPermissions: Helper.hasPermissions, JSLink: Helper.JSLink, ListForm: Helper.ListForm, ListFormField: Helper.ListFormField, diff --git a/dist/gd-sprest.d.ts b/dist/gd-sprest.d.ts index 3ca3511f..30d2edbd 100644 --- a/dist/gd-sprest.d.ts +++ b/dist/gd-sprest.d.ts @@ -32,6 +32,7 @@ declare module 'gd-sprest' { } declare module 'gd-sprest/helper/types/helper' { + import { SP } from "gd-sprest-def"; import * as HelperTypes from "gd-sprest/helper/types"; import * as MapperTypes from "gd-sprest/mapper/types"; import * as UtilTypes from "gd-sprest/utils/types"; @@ -70,6 +71,11 @@ declare module 'gd-sprest/helper/types/helper' { */ FieldSchemaXML: (fieldInfo: HelperTypes.IFieldInfo) => PromiseLike; + /** + * Determines if the user has permissions, based on the permission kind value + */ + hasPermissions(permissionMask: SP.BasePermissions, permissions: Array | number): boolean; + /** * Helper class for implementing JSLink solutions */ @@ -4805,6 +4811,8 @@ declare module 'gd-sprest/mapper/types/socialFeed' { } declare module 'gd-sprest/mapper/types/sptypes' { + import { SP } from "gd-sprest-def"; + /** * Base Permission Types */ @@ -4813,6 +4821,8 @@ declare module 'gd-sprest/mapper/types/sptypes' { AddAndCustomizePages: number, AddDelPrivateWebParts: number, AddListItems: number, + AnonymousSearchAccessList: number, + AnonymousSearchAccessWebLists: number, ApplyStyleSheets: number, ApplyThemeAndBorder: number, ApproveItems: number, @@ -4847,6 +4857,13 @@ declare module 'gd-sprest/mapper/types/sptypes' { ViewVersions: number } + /** + * Base Permission Result + */ + export interface IGetUserEffectivePermissionsResult { + GetUserEffectivePermissions: SP.BasePermissions + } + /** * Calendar Types */ diff --git a/dist/gd-sprest.js b/dist/gd-sprest.js index df76c7b8..c2a912c1 100644 --- a/dist/gd-sprest.js +++ b/dist/gd-sprest.js @@ -202,7 +202,7 @@ eval("\n\nvar _this = undefined;\nObject.defineProperty(exports, \"__esModule\", /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Creates a document set item.\r\n * @param name - The name of the document set folder to create.\r\n * @param listName - The name of the document set library.\r\n * @param webUrl - The url of the web containing the document set library.\r\n */\nexports.createDocSet = function (name, listName, webUrl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the document set's root folder\n lib_1.Web(webUrl).Lists(listName).query({ Expand: [\"ContentTypes\", \"ParentWeb\", \"RootFolder\"] }).execute(function (list) {\n // Parse the content types\n var ctId = \"0x0120D520\";\n for (var i = 0; i < list.ContentTypes.results.length; i++) {\n // See if this is the document set content type\n if (list.ContentTypes.results[i].StringId.startsWith(ctId)) {\n // Set the content type id\n ctId = list.ContentTypes.results[i].StringId;\n break;\n }\n }\n // Create the document set item\n exports.request({\n method: \"POST\",\n url: list.ParentWebUrl + \"/_vti_bin/listdata.svc/\" + list.Title.replace(/ /g, \"\"),\n headers: {\n Accept: \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose\",\n Slug: list.RootFolder.ServerRelativeUrl + \"/\" + name + \"|\" + ctId,\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n data: {\n Title: name,\n Path: list.RootFolder.ServerRelativeUrl\n }\n }).then(function (response) {\n // See if the request was successful\n if (response.d && response.d.Id > 0) {\n // Get the document set item and resolve the promise\n lib_1.Web(webUrl).Lists(listName).Items(response.d.Id).execute(resolve);\n } else {\n // Reject the promise\n reject(response[\"response\"]);\n }\n });\n }, reject);\n });\n};\n/**\r\n * Convert a JSON string to a base object\r\n */\nexports.parse = function (jsonString) {\n // Try to parse the string\n try {\n var obj = JSON.parse(jsonString);\n // Create a base object\n var base = new utils_1.Base(obj.props);\n // Set the properties\n base.response = obj.response;\n base.status = obj.status;\n base.targetInfo = obj.targetInfo;\n // Update the object\n base.updateDataObject(false);\n // Return the base object\n return base;\n } catch (_a) {}\n return null;\n};\n/**\r\n * XML HTTP Request\r\n */\nexports.request = function (props) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Execute the request and resolve the promise\n new utils_1.Base({\n method: props.method || \"GET\",\n url: props.url,\n requestHeader: props.headers,\n data: props.data\n }).execute(resolve, reject);\n });\n};\n\n//# sourceURL=webpack:///./build/helper/methods.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./build/lib/index.js\");\nvar utils_1 = __webpack_require__(/*! ../utils */ \"./build/utils/index.js\");\n/**\r\n * Creates a document set item.\r\n * @param name - The name of the document set folder to create.\r\n * @param listName - The name of the document set library.\r\n * @param webUrl - The url of the web containing the document set library.\r\n */\nexports.createDocSet = function (name, listName, webUrl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the document set's root folder\n lib_1.Web(webUrl).Lists(listName).query({ Expand: [\"ContentTypes\", \"ParentWeb\", \"RootFolder\"] }).execute(function (list) {\n // Parse the content types\n var ctId = \"0x0120D520\";\n for (var i = 0; i < list.ContentTypes.results.length; i++) {\n // See if this is the document set content type\n if (list.ContentTypes.results[i].StringId.startsWith(ctId)) {\n // Set the content type id\n ctId = list.ContentTypes.results[i].StringId;\n break;\n }\n }\n // Create the document set item\n exports.request({\n method: \"POST\",\n url: list.ParentWebUrl + \"/_vti_bin/listdata.svc/\" + list.Title.replace(/ /g, \"\"),\n headers: {\n Accept: \"application/json;odata=verbose\",\n \"Content-Type\": \"application/json;odata=verbose\",\n Slug: list.RootFolder.ServerRelativeUrl + \"/\" + name + \"|\" + ctId,\n \"X-Requested-With\": \"XMLHttpRequest\"\n },\n data: {\n Title: name,\n Path: list.RootFolder.ServerRelativeUrl\n }\n }).then(function (response) {\n // See if the request was successful\n if (response.d && response.d.Id > 0) {\n // Get the document set item and resolve the promise\n lib_1.Web(webUrl).Lists(listName).Items(response.d.Id).execute(resolve);\n } else {\n // Reject the promise\n reject(response[\"response\"]);\n }\n });\n }, reject);\n });\n};\n/**\r\n * Determines if the user has permissions, based on the permission kind value\r\n */\nexports.hasPermissions = function (permissionMask, permissions) {\n if (permissions === void 0) {\n permissions = [];\n }\n var hasPermissions = false;\n // Set the permissions\n var requestedPermissions = typeof permissions === \"number\" ? [permissions] : permissions;\n // Ensure the base permissions exist\n if (SP && SP.BasePermissions) {\n // Initialize the base permissions from the value\n var basePermissions = new SP.BasePermissions();\n basePermissions.initPropertiesFromJson(permissionMask);\n // Default the permission flag\n hasPermissions = true;\n // Parse the requested permissions\n for (var i = 0; i < requestedPermissions.length; i++) {\n // See if the user has permissions\n if (!basePermissions.has(requestedPermissions[i])) {\n // Set the flag and break from the loop\n hasPermissions = false;\n break;\n }\n }\n } else {\n // Log\n console.info(\"[gd-sprest] The 'SP' core library is not available.\");\n }\n // Return the value\n return hasPermissions;\n};\n/**\r\n * Convert a JSON string to a base object\r\n */\nexports.parse = function (jsonString) {\n // Try to parse the string\n try {\n var obj = JSON.parse(jsonString);\n // Create a base object\n var base = new utils_1.Base(obj.props);\n // Set the properties\n base.response = obj.response;\n base.status = obj.status;\n base.targetInfo = obj.targetInfo;\n // Update the object\n base.updateDataObject(false);\n // Return the base object\n return base;\n } catch (_a) {}\n return null;\n};\n/**\r\n * XML HTTP Request\r\n */\nexports.request = function (props) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Execute the request and resolve the promise\n new utils_1.Base({\n method: props.method || \"GET\",\n url: props.url,\n requestHeader: props.headers,\n data: props.data\n }).execute(resolve, reject);\n });\n};\n\n//# sourceURL=webpack:///./build/helper/methods.js?"); /***/ }), @@ -634,7 +634,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Base Permission Types\r\n */\nexports.BasePermissionTypes = {\n EmptyMask: 0,\n ViewListItems: 1,\n AddListItems: 2,\n EditListItems: 3,\n DeleteListItems: 4,\n ApproveItems: 5,\n OpenItems: 6,\n ViewVersions: 7,\n DeleteVersions: 8,\n CancelCheckout: 9,\n ManagePersonalViews: 10,\n ManageLists: 12,\n ViewFormPages: 13,\n Open: 17,\n ViewPages: 18,\n AddAndCustomizePages: 19,\n ApplyThemeAndBorder: 20,\n ApplyStyleSheets: 21,\n ViewUsageData: 22,\n CreateSSCSite: 23,\n ManageSubwebs: 24,\n CreateGroups: 25,\n ManagePermissions: 26,\n BrowseDirectories: 27,\n BrowseUserInfo: 28,\n AddDelPrivateWebParts: 29,\n UpdatePersonalWebParts: 30,\n ManageWeb: 31,\n UseClientIntegration: 37,\n UseRemoteAPIs: 38,\n ManageAlerts: 39,\n CreateAlerts: 40,\n EditMyUserInfo: 41,\n EnumeratePermissions: 63,\n FullMask: 65\n};\n/**\r\n * Calendar Types\r\n */\nexports.CalendarTypes = {\n Gregorian: 1,\n JapaneseEmperorEra: 3,\n TaiwanCalendar: 4,\n KoreanTangunEra: 5,\n Hijri: 6,\n Thai: 7,\n HebrewLunar: 8,\n GregorianMiddleEastFrench: 9,\n GregorianArabic: 10,\n GregorianTransliteratedEnglish: 11,\n GregorianTransliteratedFrench: 12,\n KoreanandJapaneseLunar: 14,\n ChineseLunar: 15,\n SakaEra: 16\n};\n/**\r\n * Check Out Types\r\n */\nexports.CheckOutType = { Online: 0, Offline: 1, None: 2 };\n/**\r\n * Choice Format Types\r\n */\nexports.ChoiceFormatType = { Dropdown: 0, RadioButtons: 1 };\n/**\r\n * Client Template Utility\r\n */\nexports.ClientTemplatesUtility = {\n UserLookupDelimitString: \";#\",\n UserMultiValueDelimitString: \",#\"\n};\n/**\r\n * Control Modes\r\n */\nexports.ControlMode = {\n Invalid: 0,\n Display: 1,\n Edit: 2,\n New: 3,\n View: 4\n};\n/**\r\n * Date Format\r\n */\nexports.DateFormat = { DateOnly: 0, DateTime: 1 };\n/**\r\n * Draft Visibility Types\r\n */\nexports.DraftVisibilityType = { Reader: 0, Author: 1, Approver: 2 };\n/**\r\n * Event Receiver Synchronization Types\r\n */\nexports.EventReceiverSynchronizationType = { Synchronization: 1, Asynchronous: 2 };\n/**\r\n * Event Receiver Types\r\n */\nexports.EventReceiverType = {\n ItemAdding: 1,\n ItemUpdating: 2,\n ItemDeleting: 3,\n ItemCheckingIn: 4,\n ItemCheckingOut: 5,\n ItemUncheckingOut: 6,\n ItemAttachmentAdding: 7,\n ItemAttachmentDeleting: 8,\n ItemFileMoving: 9,\n ItemVersionDeleting: 11,\n FieldAdding: 101,\n FieldUpdating: 102,\n FieldDeleting: 103,\n ListAdding: 104,\n ListDeleting: 105,\n SiteDeleting: 201,\n WebDeleting: 202,\n WebMoving: 203,\n WebAdding: 204,\n GroupAdding: 301,\n GroupUpdating: 302,\n GroupDeleting: 303,\n GroupUserAdding: 304,\n GroupUserDeleting: 305,\n RoleDefinitionAdding: 306,\n RoleDefinitionUpdating: 307,\n RoleDefinitionDeleting: 308,\n RoleAssignmentAdding: 309,\n RoleAssignmentDeleting: 310,\n InheritanceBreaking: 311,\n InheritanceResetting: 312,\n WorkflowStarting: 501,\n ItemAdded: 10001,\n ItemUpdated: 10002,\n ItemDeleted: 10003,\n ItemCheckedIn: 10004,\n ItemCheckedOut: 10005,\n ItemUncheckedOut: 10006,\n ItemAttachmentAdded: 10007,\n ItemAttachmentDeleted: 10008,\n ItemFileMoved: 10009,\n ItemFileConverted: 10010,\n ItemVersionDeleted: 10011,\n FieldAdded: 10101,\n FieldUpdated: 10102,\n FieldDeleted: 10103,\n ListAdded: 10104,\n ListDeleted: 10105,\n SiteDeleted: 10201,\n WebDeleted: 10202,\n WebMoved: 10203,\n WebProvisioned: 10204,\n GroupAdded: 10301,\n GroupUpdated: 10302,\n GroupDeleted: 10303,\n GroupUserAdded: 10304,\n GroupUserDeleted: 10305,\n RoleDefinitionAdded: 10306,\n RoleDefinitionUpdated: 10307,\n RoleDefinitionDeleted: 10308,\n RoleAssignmentAdded: 10309,\n RoleAssignmentDeleted: 10310,\n InheritanceBroken: 10311,\n InheritanceReset: 10312,\n WorkflowStarted: 10501,\n WorkflowPostponed: 10502,\n WorkflowCompleted: 10503,\n EntityInstanceAdded: 10601,\n EntityInstanceUpdated: 10602,\n EntityInstanceDeleted: 10603,\n AppInstalled: 10701,\n AppUpgraded: 10702,\n AppUninstalling: 10703,\n EmailReceived: 20000,\n ContextEvent: 32766\n};\n/**\r\n * Field Note Types\r\n */\nexports.FieldNoteType = {\n /** Enhance Rich Text */\n EnhancedRichText: 0,\n /** Rich Text */\n RichText: 1,\n /** Text Only */\n TextOnly: 2\n};\n/**\r\n * Field Number Type\r\n */\nexports.FieldNumberType = {\n /** Decimal */\n Decimal: 0,\n /** Integer */\n Integer: 1,\n /** Percentage */\n Percentage: 2\n};\n/**\r\n * Field Result Types\r\n */\nexports.FieldResultType = {\n /** Boolean */\n Boolean: \"Boolean\",\n /** Currency */\n Currency: \"Currency\",\n /** Date Only */\n DateOnly: \"DateOnly\",\n /** Date & Time */\n DateTime: \"DateTime\",\n /** Number */\n Number: \"Number\",\n /** Text */\n Text: \"Text\"\n};\n/**\r\n * Field Types\r\n */\nexports.FieldType = {\n AllDayEvent: 29,\n Attachments: 19,\n Boolean: 8,\n Calculated: 17,\n Choice: 6,\n Computed: 12,\n ContentTypeId: 25,\n Counter: 5,\n CrossProjectLink: 22,\n Currency: 10,\n DateTime: 4,\n Error: 24,\n File: 18,\n Geolocation: 31,\n GridChoice: 16,\n Guid: 14,\n Integer: 1,\n Invalid: 0,\n Lookup: 7,\n MaxItems: 31,\n ModStat: 23,\n MultiChoice: 15,\n Note: 3,\n Number: 9,\n PageSeparator: 26,\n Recurrence: 21,\n Text: 2,\n ThreadIndex: 27,\n Threading: 13,\n URL: 11,\n User: 20,\n WorkflowEventType: 30,\n WorkflowStatus: 28\n};\n/**\r\n * Field User Selection Types\r\n */\nexports.FieldUserSelectionType = { PeopleOnly: 0, PeopleAndGroups: 1 };\n/**\r\n * File Template Types\r\n*/\nexports.FileTemplateType = { StandardPage: 0, WikiPage: 1, FormPage: 2 };\n/**\r\n * Friendly Date Format\r\n */\nexports.FriendlyDateFormat = {\n Unspecified: 0,\n Disabled: 1,\n Relative: 2\n};\n/**\r\n * List Template Types\r\n*/\nexports.ListTemplateType = {\n AccessRequest: 160,\n AdminTasks: 1200,\n Agenda: 201,\n AppDataCatalog: 125,\n Announcements: 104,\n CallTrack: 404,\n Categories: 303,\n Circulation: 405,\n Comments: 302,\n Contacts: 105,\n CustomGrid: 120,\n DataConnectionLibrary: 130,\n DataSources: 110,\n Decision: 204,\n DesignCatalog: 124,\n DeveloperSiteDraftApps: 1230,\n DiscussionBoard: 108,\n DocumentLibrary: 101,\n Events: 106,\n ExternalList: 600,\n Facility: 402,\n GanttTasks: 150,\n GenericList: 100,\n HealthReports: 1221,\n HealthRules: 1220,\n HelpLibrary: 151,\n Holidays: 421,\n HomePageLibrary: 212,\n IMEDic: 499,\n IssueTracking: 1100,\n Links: 103,\n ListTemplateCatalog: 114,\n MasterPageCatalog: 116,\n MaintenanceLogs: 175,\n MeetingObjective: 207,\n Meetings: 200,\n MeetingUser: 202,\n MySiteDocumentLibrary: 700,\n Posts: 301,\n NoCodePublic: 122,\n NoCodeWorkflows: 117,\n PictureLibrary: 109,\n SolutionCatalog: 121,\n Survey: 102,\n Tasks: 107,\n TasksWithTimelineAndHierarchy: 171,\n TextBox: 210,\n ThemeCatalog: 123,\n ThingsToBring: 211,\n Timecard: 420,\n UserInformation: 112,\n WebPageLibrary: 119,\n WebPartCatalog: 113,\n WebTemplateCatalog: 111,\n Whereabouts: 403,\n WorkflowHistory: 140,\n WorkflowProcess: 118,\n XMLForm: 115\n};\n/**\r\n * Locale LCID Types\r\n */\nexports.LocaleLCIDType = {\n Afrikaans: 1078,\n Albanian: 1052,\n ArabicAlgeria: 5121,\n ArabicBahrain: 15361,\n ArabicEgypt: 3073,\n ArabicIraq: 2049,\n ArabicJordan: 11265,\n ArabicLebanon: 12289,\n ArabicLibya: 4097,\n ArabicMorocco: 6145,\n ArabicOman: 8193,\n ArabicQatar: 16385,\n ArabicSaudiArabia: 1025,\n ArabicSyria: 10241,\n ArabicTunisia: 7169,\n ArabicUAE: 14337,\n ArabicYemen: 9217,\n Armenian: 1067,\n AzeriCyrillic: 2092,\n AzeriLatin: 1068,\n Basque: 1069,\n Belarusian: 1059,\n Bulgarian: 1026,\n Catalan: 1027,\n ChineseHongKongSAR: 3076,\n ChineseMacaoSAR: 5124,\n ChinesePRC: 2052,\n ChineseSingapore: 4100,\n ChineseTaiwan: 1028,\n CroatianCroatia: 1050,\n Czech: 1029,\n Danish: 1030,\n Divehi: 1125,\n DutchBelgium: 2067,\n DutchNetherlands: 1043,\n EnglishAustralia: 3081,\n EnglishBelize: 10249,\n EnglishCanada: 4105,\n EnglishCaribbean: 9225,\n EnglishIreland: 6153,\n EnglishJamaica: 8201,\n EnglishNewZealand: 5129,\n EnglishPhilippines: 13321,\n EnglishSouthAfrica: 7177,\n EnglishTrinidad: 11273,\n EnglishUnitedKingdom: 2057,\n EnglishUnitedStates: 1033,\n EnglishZimbabwe: 12297,\n Estonian: 1061,\n Faeroese: 1080,\n Finnish: 1035,\n FrenchBelgium: 2060,\n FrenchCanada: 3084,\n FrenchFrance: 1036,\n FrenchLuxembourg: 5132,\n FrenchMonaco: 6156,\n FrenchSwitzerland: 4108,\n Galician: 1110,\n Georgian: 1079,\n GermanAustria: 3079,\n GermanGermany: 1031,\n GermanLiechtenstein: 5127,\n GermanLuxembourg: 4103,\n GermanSwitzerland: 2055,\n Greek: 1032,\n Gujarati: 1095,\n HebrewIsrael: 1037,\n HindiIndia: 1081,\n Hungarian: 1038,\n Icelandic: 1039,\n Indonesian: 1057,\n ItalianItaly: 1040,\n ItalianSwitzerland: 2064,\n Japanese: 1041,\n Kannada: 1099,\n Kazakh: 1087,\n Konkani: 1111,\n Korean: 1042,\n KyrgyzCyrillic: 1088,\n Latvian: 1062,\n Lithuanian: 1063,\n MacedonianFYROM: 1071,\n Malay: 1086,\n MalayBruneiDarussalam: 2110,\n Marathi: 1102,\n MongolianCyrillic: 1104,\n NorwegianBokmal: 1044,\n NorwegianNynorsk: 2068,\n PersianIran: 1065,\n Polish: 1045,\n PortugueseBrazil: 1046,\n PortuguesePortugal: 2070,\n Punjabi: 1094,\n Romanian: 1048,\n Russian: 1049,\n Sanskrit: 1103,\n SerbianCyrillic: 3098,\n SerbianLatin: 2074,\n Slovak: 1051,\n Slovenian: 1060,\n SpanishArgentina: 11274,\n SpanishBolivia: 16394,\n SpanishChile: 13322,\n SpanishColombia: 9226,\n SpanishCostaRica: 5130,\n SpanishDominicanRepublic: 7178,\n SpanishEcuador: 12298,\n SpanishElSalvador: 17418,\n SpanishGuatemala: 4106,\n SpanishHonduras: 18442,\n SpanishMexico: 2058,\n SpanishNicaragua: 19466,\n SpanishPanama: 6154,\n SpanishParaguay: 15370,\n SpanishPeru: 10250,\n SpanishPuertoRico: 20490,\n SpanishSpain: 3082,\n SpanishUruguay: 14346,\n SpanishVenezuela: 8202,\n Swahili: 1089,\n Swedish: 1053,\n SwedishFinland: 2077,\n Syriac: 1114,\n Tamil: 1097,\n Tatar: 1092,\n Telugu: 1098,\n ThaiThailand: 1054,\n Turkish: 1055,\n Ukrainian: 1058,\n UrduPakistan: 1056,\n UzbekCyrillic: 2115,\n UzbekLatin: 1091,\n Vietnamese: 1066\n};\n/**\r\n * Page Types\r\n */\nexports.PageType = {\n DefaultView: 0,\n DialogView: 2,\n DisplayForm: 4,\n DisplayFormDialog: 5,\n EditForm: 6,\n EditFormDialog: 7,\n Invalid: -1,\n NewForm: 8,\n NewFormDialog: 9,\n NormalView: 1,\n Page_MAXITEMS: 11,\n SolutionForm: 10,\n View: 3\n};\n/**\r\n * Personal Site Capabilities\r\n */\nexports.PersonalSiteCapabilities = {\n Education: 16,\n Guest: 32,\n MyTasksDashboard: 8,\n None: 0,\n Profile: 1,\n Social: 2,\n Storage: 4\n};\n/**\r\n * Principal Sources\r\n */\nexports.PrincipalSources = {\n All: 15,\n MembershipProvider: 4,\n None: 0,\n RoleProvider: 8,\n UserInfoList: 1,\n Windows: 2\n};\n/**\r\n * Principal Types\r\n */\nexports.PrincipalTypes = {\n All: 15,\n DistributionList: 2,\n None: 0,\n SecurityGroup: 4,\n SharePointGroup: 8,\n User: 1\n};\n/**\r\n * Relationship Delete Behavior Types\r\n */\nexports.RelationshipDeleteBehaviorType = { None: 0, Cascade: 1, Restrict: 2 };\n/**\r\n * Render List Data Options\r\n */\nexports.RenderListDataOptions = {\n None: 0,\n ContextInfo: 1,\n ListData: 2,\n ListSchema: 4,\n MenuView: 8,\n ListContentType: 16,\n FileSystemItemId: 32,\n ClientFormSchema: 64,\n QuickLaunch: 128,\n Spotlight: 256,\n Visualization: 512,\n ViewMetadata: 1024,\n DisableAutoHyperlink: 2048,\n EnableMediaTAUrls: 4096,\n ParentInfo: 8192,\n PageContextInfo: 16384,\n ClientSideComponentManifest: 32768\n};\n/**\r\n * Reordering Rule Match Types\r\n */\nexports.ReorderingRuleMatchType = {\n ContentTypeIs: 5,\n FileExtensionMatches: 6,\n ManualCondition: 8,\n ResultContainsKeyword: 0,\n ResultHasTag: 7,\n TitleContainsKeyword: 1,\n TitleMatchesKeyword: 2,\n UrlExactlyMatches: 4,\n UrlStartsWith: 3\n};\n/**\r\n * Role Types\r\n */\nexports.RoleType = {\n Administrator: 5,\n Contributor: 3,\n Editor: 6,\n Guest: 1,\n None: 0,\n Reader: 2,\n WebDesigner: 4\n};\n/**\r\n * Status Pri Color\r\n */\nexports.StatusPriColor = {\n Blue: \"blue\",\n Green: \"green\",\n Red: \"red\",\n Yellow: \"yellow\"\n};\n/**\r\n * URL Format Types\r\n */\nexports.UrlFormatType = { Hyperlink: 0, Image: 1 };\n/**\r\n * URL Zones\r\n */\nexports.URLZones = { Default: 0, Intranet: 1, Internet: 2, Custom: 3, Extranet: 4 };\n/**\r\n * User Custom Action Registration Types\r\n */\nexports.UserCustomActionRegistrationType = { None: 0, List: 1, ContentType: 2, ProgId: 3, FileType: 4 };\n/**\r\n * View Types\r\n */\nexports.ViewType = {\n Calendar: 524288,\n Chart: 131072,\n Gantt: 67108864,\n Grid: 2048,\n Html: 1,\n Recurrence: 8193\n};\n/**\r\n * Web Template Types\r\n */\nexports.WebTemplateType = {\n AcademicLibrary: \"DOCMARKETPLACESITE\",\n App: \"APP\",\n AppCatalog: \"APPCATALOG\",\n BasicSearch: \"SRCHCENTERLITE\",\n Blog: \"BLOG\",\n BusinessIntelligenceCenter: \"BICenterSite\",\n CentralAdmin: \"CENTRALADMIN\",\n Community: \"COMMUNITY\",\n CommunityPortal: \"COMMUNITYPORTAL\",\n Dev: \"DEV\",\n DocumentCenter: \"BDR\",\n eDiscoveryCenter: \"EDISC\",\n EnterpriseSearch: \"SRCHCEN\",\n EnterpriseWiki: \"ENTERWIKI\",\n Global: \"GLOBAL\",\n GroupWorkSite: \"SGS\",\n Meetings: \"MEETINGS\",\n MeetingWorkspace: \"MPS\",\n PerformancePoint: \"PPMASite\",\n ProductCatalog: \"PRODUCTCATALOG\",\n Profiles: \"PROFILES\",\n ProjectSite: \"PROJECTSITE\",\n Publishing: \"BLANKINTERNET\",\n PublishingSite: \"CMSPUBLISHING\",\n RecordsCenter: \"OFFILE\",\n SharedServicesAdminSite: \"OSRV\",\n Site: \"STS\",\n TeamCollaborationSite: \"TEAM\",\n TenantAdmin: \"TENANTADMIN\",\n Wiki: \"WIKI\"\n};\n\n//# sourceURL=webpack:///./build/mapper/sptypes.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\r\n * Base Permission Types\r\n */\nexports.BasePermissionTypes = {\n EmptyMask: 0,\n ViewListItems: 1,\n AddListItems: 2,\n EditListItems: 3,\n DeleteListItems: 4,\n ApproveItems: 5,\n OpenItems: 6,\n ViewVersions: 7,\n DeleteVersions: 8,\n CancelCheckout: 9,\n ManagePersonalViews: 10,\n ManageLists: 12,\n ViewFormPages: 13,\n AnonymousSearchAccessList: 14,\n Open: 17,\n ViewPages: 18,\n AddAndCustomizePages: 19,\n ApplyThemeAndBorder: 20,\n ApplyStyleSheets: 21,\n ViewUsageData: 22,\n CreateSSCSite: 23,\n ManageSubwebs: 24,\n CreateGroups: 25,\n ManagePermissions: 26,\n BrowseDirectories: 27,\n BrowseUserInfo: 28,\n AddDelPrivateWebParts: 29,\n UpdatePersonalWebParts: 30,\n ManageWeb: 31,\n AnonymousSearchAccessWebLists: 32,\n UseClientIntegration: 37,\n UseRemoteAPIs: 38,\n ManageAlerts: 39,\n CreateAlerts: 40,\n EditMyUserInfo: 41,\n EnumeratePermissions: 63,\n FullMask: 65\n};\n/**\r\n * Calendar Types\r\n */\nexports.CalendarTypes = {\n Gregorian: 1,\n JapaneseEmperorEra: 3,\n TaiwanCalendar: 4,\n KoreanTangunEra: 5,\n Hijri: 6,\n Thai: 7,\n HebrewLunar: 8,\n GregorianMiddleEastFrench: 9,\n GregorianArabic: 10,\n GregorianTransliteratedEnglish: 11,\n GregorianTransliteratedFrench: 12,\n KoreanandJapaneseLunar: 14,\n ChineseLunar: 15,\n SakaEra: 16\n};\n/**\r\n * Check Out Types\r\n */\nexports.CheckOutType = { Online: 0, Offline: 1, None: 2 };\n/**\r\n * Choice Format Types\r\n */\nexports.ChoiceFormatType = { Dropdown: 0, RadioButtons: 1 };\n/**\r\n * Client Template Utility\r\n */\nexports.ClientTemplatesUtility = {\n UserLookupDelimitString: \";#\",\n UserMultiValueDelimitString: \",#\"\n};\n/**\r\n * Control Modes\r\n */\nexports.ControlMode = {\n Invalid: 0,\n Display: 1,\n Edit: 2,\n New: 3,\n View: 4\n};\n/**\r\n * Date Format\r\n */\nexports.DateFormat = { DateOnly: 0, DateTime: 1 };\n/**\r\n * Draft Visibility Types\r\n */\nexports.DraftVisibilityType = { Reader: 0, Author: 1, Approver: 2 };\n/**\r\n * Event Receiver Synchronization Types\r\n */\nexports.EventReceiverSynchronizationType = { Synchronization: 1, Asynchronous: 2 };\n/**\r\n * Event Receiver Types\r\n */\nexports.EventReceiverType = {\n ItemAdding: 1,\n ItemUpdating: 2,\n ItemDeleting: 3,\n ItemCheckingIn: 4,\n ItemCheckingOut: 5,\n ItemUncheckingOut: 6,\n ItemAttachmentAdding: 7,\n ItemAttachmentDeleting: 8,\n ItemFileMoving: 9,\n ItemVersionDeleting: 11,\n FieldAdding: 101,\n FieldUpdating: 102,\n FieldDeleting: 103,\n ListAdding: 104,\n ListDeleting: 105,\n SiteDeleting: 201,\n WebDeleting: 202,\n WebMoving: 203,\n WebAdding: 204,\n GroupAdding: 301,\n GroupUpdating: 302,\n GroupDeleting: 303,\n GroupUserAdding: 304,\n GroupUserDeleting: 305,\n RoleDefinitionAdding: 306,\n RoleDefinitionUpdating: 307,\n RoleDefinitionDeleting: 308,\n RoleAssignmentAdding: 309,\n RoleAssignmentDeleting: 310,\n InheritanceBreaking: 311,\n InheritanceResetting: 312,\n WorkflowStarting: 501,\n ItemAdded: 10001,\n ItemUpdated: 10002,\n ItemDeleted: 10003,\n ItemCheckedIn: 10004,\n ItemCheckedOut: 10005,\n ItemUncheckedOut: 10006,\n ItemAttachmentAdded: 10007,\n ItemAttachmentDeleted: 10008,\n ItemFileMoved: 10009,\n ItemFileConverted: 10010,\n ItemVersionDeleted: 10011,\n FieldAdded: 10101,\n FieldUpdated: 10102,\n FieldDeleted: 10103,\n ListAdded: 10104,\n ListDeleted: 10105,\n SiteDeleted: 10201,\n WebDeleted: 10202,\n WebMoved: 10203,\n WebProvisioned: 10204,\n GroupAdded: 10301,\n GroupUpdated: 10302,\n GroupDeleted: 10303,\n GroupUserAdded: 10304,\n GroupUserDeleted: 10305,\n RoleDefinitionAdded: 10306,\n RoleDefinitionUpdated: 10307,\n RoleDefinitionDeleted: 10308,\n RoleAssignmentAdded: 10309,\n RoleAssignmentDeleted: 10310,\n InheritanceBroken: 10311,\n InheritanceReset: 10312,\n WorkflowStarted: 10501,\n WorkflowPostponed: 10502,\n WorkflowCompleted: 10503,\n EntityInstanceAdded: 10601,\n EntityInstanceUpdated: 10602,\n EntityInstanceDeleted: 10603,\n AppInstalled: 10701,\n AppUpgraded: 10702,\n AppUninstalling: 10703,\n EmailReceived: 20000,\n ContextEvent: 32766\n};\n/**\r\n * Field Note Types\r\n */\nexports.FieldNoteType = {\n /** Enhance Rich Text */\n EnhancedRichText: 0,\n /** Rich Text */\n RichText: 1,\n /** Text Only */\n TextOnly: 2\n};\n/**\r\n * Field Number Type\r\n */\nexports.FieldNumberType = {\n /** Decimal */\n Decimal: 0,\n /** Integer */\n Integer: 1,\n /** Percentage */\n Percentage: 2\n};\n/**\r\n * Field Result Types\r\n */\nexports.FieldResultType = {\n /** Boolean */\n Boolean: \"Boolean\",\n /** Currency */\n Currency: \"Currency\",\n /** Date Only */\n DateOnly: \"DateOnly\",\n /** Date & Time */\n DateTime: \"DateTime\",\n /** Number */\n Number: \"Number\",\n /** Text */\n Text: \"Text\"\n};\n/**\r\n * Field Types\r\n */\nexports.FieldType = {\n AllDayEvent: 29,\n Attachments: 19,\n Boolean: 8,\n Calculated: 17,\n Choice: 6,\n Computed: 12,\n ContentTypeId: 25,\n Counter: 5,\n CrossProjectLink: 22,\n Currency: 10,\n DateTime: 4,\n Error: 24,\n File: 18,\n Geolocation: 31,\n GridChoice: 16,\n Guid: 14,\n Integer: 1,\n Invalid: 0,\n Lookup: 7,\n MaxItems: 31,\n ModStat: 23,\n MultiChoice: 15,\n Note: 3,\n Number: 9,\n PageSeparator: 26,\n Recurrence: 21,\n Text: 2,\n ThreadIndex: 27,\n Threading: 13,\n URL: 11,\n User: 20,\n WorkflowEventType: 30,\n WorkflowStatus: 28\n};\n/**\r\n * Field User Selection Types\r\n */\nexports.FieldUserSelectionType = { PeopleOnly: 0, PeopleAndGroups: 1 };\n/**\r\n * File Template Types\r\n*/\nexports.FileTemplateType = { StandardPage: 0, WikiPage: 1, FormPage: 2 };\n/**\r\n * Friendly Date Format\r\n */\nexports.FriendlyDateFormat = {\n Unspecified: 0,\n Disabled: 1,\n Relative: 2\n};\n/**\r\n * List Template Types\r\n*/\nexports.ListTemplateType = {\n AccessRequest: 160,\n AdminTasks: 1200,\n Agenda: 201,\n AppDataCatalog: 125,\n Announcements: 104,\n CallTrack: 404,\n Categories: 303,\n Circulation: 405,\n Comments: 302,\n Contacts: 105,\n CustomGrid: 120,\n DataConnectionLibrary: 130,\n DataSources: 110,\n Decision: 204,\n DesignCatalog: 124,\n DeveloperSiteDraftApps: 1230,\n DiscussionBoard: 108,\n DocumentLibrary: 101,\n Events: 106,\n ExternalList: 600,\n Facility: 402,\n GanttTasks: 150,\n GenericList: 100,\n HealthReports: 1221,\n HealthRules: 1220,\n HelpLibrary: 151,\n Holidays: 421,\n HomePageLibrary: 212,\n IMEDic: 499,\n IssueTracking: 1100,\n Links: 103,\n ListTemplateCatalog: 114,\n MasterPageCatalog: 116,\n MaintenanceLogs: 175,\n MeetingObjective: 207,\n Meetings: 200,\n MeetingUser: 202,\n MySiteDocumentLibrary: 700,\n Posts: 301,\n NoCodePublic: 122,\n NoCodeWorkflows: 117,\n PictureLibrary: 109,\n SolutionCatalog: 121,\n Survey: 102,\n Tasks: 107,\n TasksWithTimelineAndHierarchy: 171,\n TextBox: 210,\n ThemeCatalog: 123,\n ThingsToBring: 211,\n Timecard: 420,\n UserInformation: 112,\n WebPageLibrary: 119,\n WebPartCatalog: 113,\n WebTemplateCatalog: 111,\n Whereabouts: 403,\n WorkflowHistory: 140,\n WorkflowProcess: 118,\n XMLForm: 115\n};\n/**\r\n * Locale LCID Types\r\n */\nexports.LocaleLCIDType = {\n Afrikaans: 1078,\n Albanian: 1052,\n ArabicAlgeria: 5121,\n ArabicBahrain: 15361,\n ArabicEgypt: 3073,\n ArabicIraq: 2049,\n ArabicJordan: 11265,\n ArabicLebanon: 12289,\n ArabicLibya: 4097,\n ArabicMorocco: 6145,\n ArabicOman: 8193,\n ArabicQatar: 16385,\n ArabicSaudiArabia: 1025,\n ArabicSyria: 10241,\n ArabicTunisia: 7169,\n ArabicUAE: 14337,\n ArabicYemen: 9217,\n Armenian: 1067,\n AzeriCyrillic: 2092,\n AzeriLatin: 1068,\n Basque: 1069,\n Belarusian: 1059,\n Bulgarian: 1026,\n Catalan: 1027,\n ChineseHongKongSAR: 3076,\n ChineseMacaoSAR: 5124,\n ChinesePRC: 2052,\n ChineseSingapore: 4100,\n ChineseTaiwan: 1028,\n CroatianCroatia: 1050,\n Czech: 1029,\n Danish: 1030,\n Divehi: 1125,\n DutchBelgium: 2067,\n DutchNetherlands: 1043,\n EnglishAustralia: 3081,\n EnglishBelize: 10249,\n EnglishCanada: 4105,\n EnglishCaribbean: 9225,\n EnglishIreland: 6153,\n EnglishJamaica: 8201,\n EnglishNewZealand: 5129,\n EnglishPhilippines: 13321,\n EnglishSouthAfrica: 7177,\n EnglishTrinidad: 11273,\n EnglishUnitedKingdom: 2057,\n EnglishUnitedStates: 1033,\n EnglishZimbabwe: 12297,\n Estonian: 1061,\n Faeroese: 1080,\n Finnish: 1035,\n FrenchBelgium: 2060,\n FrenchCanada: 3084,\n FrenchFrance: 1036,\n FrenchLuxembourg: 5132,\n FrenchMonaco: 6156,\n FrenchSwitzerland: 4108,\n Galician: 1110,\n Georgian: 1079,\n GermanAustria: 3079,\n GermanGermany: 1031,\n GermanLiechtenstein: 5127,\n GermanLuxembourg: 4103,\n GermanSwitzerland: 2055,\n Greek: 1032,\n Gujarati: 1095,\n HebrewIsrael: 1037,\n HindiIndia: 1081,\n Hungarian: 1038,\n Icelandic: 1039,\n Indonesian: 1057,\n ItalianItaly: 1040,\n ItalianSwitzerland: 2064,\n Japanese: 1041,\n Kannada: 1099,\n Kazakh: 1087,\n Konkani: 1111,\n Korean: 1042,\n KyrgyzCyrillic: 1088,\n Latvian: 1062,\n Lithuanian: 1063,\n MacedonianFYROM: 1071,\n Malay: 1086,\n MalayBruneiDarussalam: 2110,\n Marathi: 1102,\n MongolianCyrillic: 1104,\n NorwegianBokmal: 1044,\n NorwegianNynorsk: 2068,\n PersianIran: 1065,\n Polish: 1045,\n PortugueseBrazil: 1046,\n PortuguesePortugal: 2070,\n Punjabi: 1094,\n Romanian: 1048,\n Russian: 1049,\n Sanskrit: 1103,\n SerbianCyrillic: 3098,\n SerbianLatin: 2074,\n Slovak: 1051,\n Slovenian: 1060,\n SpanishArgentina: 11274,\n SpanishBolivia: 16394,\n SpanishChile: 13322,\n SpanishColombia: 9226,\n SpanishCostaRica: 5130,\n SpanishDominicanRepublic: 7178,\n SpanishEcuador: 12298,\n SpanishElSalvador: 17418,\n SpanishGuatemala: 4106,\n SpanishHonduras: 18442,\n SpanishMexico: 2058,\n SpanishNicaragua: 19466,\n SpanishPanama: 6154,\n SpanishParaguay: 15370,\n SpanishPeru: 10250,\n SpanishPuertoRico: 20490,\n SpanishSpain: 3082,\n SpanishUruguay: 14346,\n SpanishVenezuela: 8202,\n Swahili: 1089,\n Swedish: 1053,\n SwedishFinland: 2077,\n Syriac: 1114,\n Tamil: 1097,\n Tatar: 1092,\n Telugu: 1098,\n ThaiThailand: 1054,\n Turkish: 1055,\n Ukrainian: 1058,\n UrduPakistan: 1056,\n UzbekCyrillic: 2115,\n UzbekLatin: 1091,\n Vietnamese: 1066\n};\n/**\r\n * Page Types\r\n */\nexports.PageType = {\n DefaultView: 0,\n DialogView: 2,\n DisplayForm: 4,\n DisplayFormDialog: 5,\n EditForm: 6,\n EditFormDialog: 7,\n Invalid: -1,\n NewForm: 8,\n NewFormDialog: 9,\n NormalView: 1,\n Page_MAXITEMS: 11,\n SolutionForm: 10,\n View: 3\n};\n/**\r\n * Personal Site Capabilities\r\n */\nexports.PersonalSiteCapabilities = {\n Education: 16,\n Guest: 32,\n MyTasksDashboard: 8,\n None: 0,\n Profile: 1,\n Social: 2,\n Storage: 4\n};\n/**\r\n * Principal Sources\r\n */\nexports.PrincipalSources = {\n All: 15,\n MembershipProvider: 4,\n None: 0,\n RoleProvider: 8,\n UserInfoList: 1,\n Windows: 2\n};\n/**\r\n * Principal Types\r\n */\nexports.PrincipalTypes = {\n All: 15,\n DistributionList: 2,\n None: 0,\n SecurityGroup: 4,\n SharePointGroup: 8,\n User: 1\n};\n/**\r\n * Relationship Delete Behavior Types\r\n */\nexports.RelationshipDeleteBehaviorType = { None: 0, Cascade: 1, Restrict: 2 };\n/**\r\n * Render List Data Options\r\n */\nexports.RenderListDataOptions = {\n None: 0,\n ContextInfo: 1,\n ListData: 2,\n ListSchema: 4,\n MenuView: 8,\n ListContentType: 16,\n FileSystemItemId: 32,\n ClientFormSchema: 64,\n QuickLaunch: 128,\n Spotlight: 256,\n Visualization: 512,\n ViewMetadata: 1024,\n DisableAutoHyperlink: 2048,\n EnableMediaTAUrls: 4096,\n ParentInfo: 8192,\n PageContextInfo: 16384,\n ClientSideComponentManifest: 32768\n};\n/**\r\n * Reordering Rule Match Types\r\n */\nexports.ReorderingRuleMatchType = {\n ContentTypeIs: 5,\n FileExtensionMatches: 6,\n ManualCondition: 8,\n ResultContainsKeyword: 0,\n ResultHasTag: 7,\n TitleContainsKeyword: 1,\n TitleMatchesKeyword: 2,\n UrlExactlyMatches: 4,\n UrlStartsWith: 3\n};\n/**\r\n * Role Types\r\n */\nexports.RoleType = {\n Administrator: 5,\n Contributor: 3,\n Editor: 6,\n Guest: 1,\n None: 0,\n Reader: 2,\n WebDesigner: 4\n};\n/**\r\n * Status Pri Color\r\n */\nexports.StatusPriColor = {\n Blue: \"blue\",\n Green: \"green\",\n Red: \"red\",\n Yellow: \"yellow\"\n};\n/**\r\n * URL Format Types\r\n */\nexports.UrlFormatType = { Hyperlink: 0, Image: 1 };\n/**\r\n * URL Zones\r\n */\nexports.URLZones = { Default: 0, Intranet: 1, Internet: 2, Custom: 3, Extranet: 4 };\n/**\r\n * User Custom Action Registration Types\r\n */\nexports.UserCustomActionRegistrationType = { None: 0, List: 1, ContentType: 2, ProgId: 3, FileType: 4 };\n/**\r\n * View Types\r\n */\nexports.ViewType = {\n Calendar: 524288,\n Chart: 131072,\n Gantt: 67108864,\n Grid: 2048,\n Html: 1,\n Recurrence: 8193\n};\n/**\r\n * Web Template Types\r\n */\nexports.WebTemplateType = {\n AcademicLibrary: \"DOCMARKETPLACESITE\",\n App: \"APP\",\n AppCatalog: \"APPCATALOG\",\n BasicSearch: \"SRCHCENTERLITE\",\n Blog: \"BLOG\",\n BusinessIntelligenceCenter: \"BICenterSite\",\n CentralAdmin: \"CENTRALADMIN\",\n Community: \"COMMUNITY\",\n CommunityPortal: \"COMMUNITYPORTAL\",\n Dev: \"DEV\",\n DocumentCenter: \"BDR\",\n eDiscoveryCenter: \"EDISC\",\n EnterpriseSearch: \"SRCHCEN\",\n EnterpriseWiki: \"ENTERWIKI\",\n Global: \"GLOBAL\",\n GroupWorkSite: \"SGS\",\n Meetings: \"MEETINGS\",\n MeetingWorkspace: \"MPS\",\n PerformancePoint: \"PPMASite\",\n ProductCatalog: \"PRODUCTCATALOG\",\n Profiles: \"PROFILES\",\n ProjectSite: \"PROJECTSITE\",\n Publishing: \"BLANKINTERNET\",\n PublishingSite: \"CMSPUBLISHING\",\n RecordsCenter: \"OFFILE\",\n SharedServicesAdminSite: \"OSRV\",\n Site: \"STS\",\n TeamCollaborationSite: \"TEAM\",\n TenantAdmin: \"TENANTADMIN\",\n Wiki: \"WIKI\"\n};\n\n//# sourceURL=webpack:///./build/mapper/sptypes.js?"); /***/ }), @@ -670,7 +670,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Helper = __webpack_require__(/*! ./helper */ \"./build/helper/index.js\");\nvar Lib = __webpack_require__(/*! ./lib */ \"./build/lib/index.js\");\nvar Mapper = __webpack_require__(/*! ./mapper */ \"./build/mapper/index.js\");\n/**\r\n * SharePoint REST Library\r\n */\nexports.$REST = {\n __ver: 4.35,\n AppContext: function AppContext(siteUrl) {\n return Lib.Site.getAppContext(siteUrl);\n },\n ContextInfo: Lib.ContextInfo,\n DefaultRequestToHostFl: false,\n Graph: Lib.Graph,\n Helper: {\n App: Helper.App,\n Dependencies: Helper.Dependencies,\n createDocSet: Helper.createDocSet,\n Executor: Helper.Executor,\n FieldSchemaXML: Helper.FieldSchemaXML,\n JSLink: Helper.JSLink,\n ListForm: Helper.ListForm,\n ListFormField: Helper.ListFormField,\n Loader: Helper.Loader,\n parse: Helper.parse,\n request: Helper.request,\n RibbonLink: Helper.RibbonLink,\n SP: Helper.SP,\n SPCfgFieldType: Helper.SPCfgFieldType,\n SPCfgType: Helper.SPCfgType,\n SPConfig: Helper.SPConfig,\n SuiteBarLink: Helper.SuiteBarLink,\n Taxonomy: Helper.Taxonomy,\n WebPart: Helper.WebPart\n },\n List: Lib.List,\n ListByEntityName: Lib.List.getByEntityName,\n ListDataAsStream: Lib.List.getDataAsStream,\n Navigation: Lib.Navigation,\n PeopleManager: Lib.PeopleManager,\n PeoplePicker: Lib.PeoplePicker,\n ProfileLoader: Lib.ProfileLoader,\n RemoteWeb: function RemoteWeb(requestUrl) {\n return Lib.Web.getRemoteWeb(requestUrl);\n },\n Search: Lib.Search,\n Site: Lib.Site,\n SiteExists: function SiteExists(url) {\n return Lib.Site.exists(url);\n },\n SiteUrl: function SiteUrl(id) {\n return Lib.Site.getUrlById(id);\n },\n SPTypes: Mapper.SPTypes,\n SocialFeed: Lib.SocialFeed,\n UserProfile: Lib.UserProfile,\n Utility: Lib.Utility,\n Web: Lib.Web\n};\n// See if the library doesn't exist, or is an older version\nvar global = Lib.ContextInfo.window.$REST;\nif (global == null || global.__ver == null || global.__ver < exports.$REST.__ver) {\n // Set the global variable\n Lib.ContextInfo.window.$REST = exports.$REST;\n // Ensure the SP lib exists\n if (Lib.ContextInfo.window.SP) {\n // Alert other scripts this library is loaded\n Lib.ContextInfo.window.SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest.js\");\n }\n}\n\n//# sourceURL=webpack:///./build/rest.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Helper = __webpack_require__(/*! ./helper */ \"./build/helper/index.js\");\nvar Lib = __webpack_require__(/*! ./lib */ \"./build/lib/index.js\");\nvar Mapper = __webpack_require__(/*! ./mapper */ \"./build/mapper/index.js\");\n/**\r\n * SharePoint REST Library\r\n */\nexports.$REST = {\n __ver: 4.36,\n AppContext: function AppContext(siteUrl) {\n return Lib.Site.getAppContext(siteUrl);\n },\n ContextInfo: Lib.ContextInfo,\n DefaultRequestToHostFl: false,\n Graph: Lib.Graph,\n Helper: {\n App: Helper.App,\n Dependencies: Helper.Dependencies,\n createDocSet: Helper.createDocSet,\n Executor: Helper.Executor,\n FieldSchemaXML: Helper.FieldSchemaXML,\n hasPermissions: Helper.hasPermissions,\n JSLink: Helper.JSLink,\n ListForm: Helper.ListForm,\n ListFormField: Helper.ListFormField,\n Loader: Helper.Loader,\n parse: Helper.parse,\n request: Helper.request,\n RibbonLink: Helper.RibbonLink,\n SP: Helper.SP,\n SPCfgFieldType: Helper.SPCfgFieldType,\n SPCfgType: Helper.SPCfgType,\n SPConfig: Helper.SPConfig,\n SuiteBarLink: Helper.SuiteBarLink,\n Taxonomy: Helper.Taxonomy,\n WebPart: Helper.WebPart\n },\n List: Lib.List,\n ListByEntityName: Lib.List.getByEntityName,\n ListDataAsStream: Lib.List.getDataAsStream,\n Navigation: Lib.Navigation,\n PeopleManager: Lib.PeopleManager,\n PeoplePicker: Lib.PeoplePicker,\n ProfileLoader: Lib.ProfileLoader,\n RemoteWeb: function RemoteWeb(requestUrl) {\n return Lib.Web.getRemoteWeb(requestUrl);\n },\n Search: Lib.Search,\n Site: Lib.Site,\n SiteExists: function SiteExists(url) {\n return Lib.Site.exists(url);\n },\n SiteUrl: function SiteUrl(id) {\n return Lib.Site.getUrlById(id);\n },\n SPTypes: Mapper.SPTypes,\n SocialFeed: Lib.SocialFeed,\n UserProfile: Lib.UserProfile,\n Utility: Lib.Utility,\n Web: Lib.Web\n};\n// See if the library doesn't exist, or is an older version\nvar global = Lib.ContextInfo.window.$REST;\nif (global == null || global.__ver == null || global.__ver < exports.$REST.__ver) {\n // Set the global variable\n Lib.ContextInfo.window.$REST = exports.$REST;\n // Ensure the SP lib exists\n if (Lib.ContextInfo.window.SP) {\n // Alert other scripts this library is loaded\n Lib.ContextInfo.window.SP.SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest.js\");\n }\n}\n\n//# sourceURL=webpack:///./build/rest.js?"); /***/ }), diff --git a/dist/gd-sprest.min.js b/dist/gd-sprest.min.js index 416abff8..0d19271d 100644 --- a/dist/gd-sprest.min.js +++ b/dist/gd-sprest.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(78)),r(n(79)),r(n(95)),r(n(96)),r(n(97)),r(n(98)),r(n(99)),r(n(100)),r(n(101)),r(n(102))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(77)),r(n(103)),r(n(104)),r(n(105)),r(n(106)),r(n(107)),r(n(108)),r(n(109)),r(n(110)),r(n(111)),r(n(112)),r(n(113)),r(n(39))},function(e,t,n){var r=n(27)("wks"),o=n(19),i=n(3).Symbol,s="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(7);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){var r=n(13),o=n(29);e.exports=n(8)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(3),o=n(5),i=n(14),s=n(19)("src"),a=Function.toString,u=(""+a).split("toString");n(9).inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(i(n,s)||o(n,s,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(28)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n=e.exports={version:"2.5.4"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports={}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});var o=n(26);t.Helper=o;var i=n(17);t.SPTypes=i.SPTypes,r(n(1)),r(n(127))},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(4),o=n(45),i=n(46),s=Object.defineProperty;t.f=n(8)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(16);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80);t.Mapper=r;var o=n(94);t.SPTypes=o},function(e,t,n){var r=n(12),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(7),o=n(3).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(53),o=n(22);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(27)("keys"),o=n(19);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(13).f,o=n(14),i=n(2)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(76)),r(n(114)),r(n(115)),r(n(116)),r(n(118)),r(n(119)),r(n(120)),r(n(121)),r(n(122)),r(n(41)),r(n(123)),r(n(40)),r(n(124)),r(n(125));var o=n(126);t.SP=o},function(e,t,n){var r=n(3),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var r=n(31),o=n(32),i=n(6),s=n(5),a=n(10),u=n(49),l=n(25),p=n(56),c=n(2)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,y,m,g,h){u(n,t,y);var T,b,P,I=function(e){if(!d&&e in w)return w[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},v=t+" Iterator",S="values"==m,q=!1,w=e.prototype,x=w[c]||w["@@iterator"]||m&&w[m],C=x||I(m),R=m?S?I("entries"):C:void 0,F="Array"==t&&w.entries||x;if(F&&(P=p(F.call(new e)))!==Object.prototype&&P.next&&(l(P,v,!0),r||"function"==typeof P[c]||s(P,c,f)),S&&x&&"values"!==x.name&&(q=!0,C=function(){return x.call(this)}),r&&!h||!d&&!q&&w[c]||s(w,c,C),a[t]=C,a[v]=f,m)if(T={values:S?C:I("values"),keys:g?C:I("keys"),entries:R},h)for(b in T)b in w||i(w,b,T[b]);else o(o.P+o.F*(d||q),t,T);return T}},function(e,t){e.exports=!1},function(e,t,n){var r=n(3),o=n(9),i=n(5),s=n(6),a=n(15),u=function(e,t,n){var l,p,c,d,f=e&u.F,y=e&u.G,m=e&u.S,g=e&u.P,h=e&u.B,T=y?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=y?o:o[t]||(o[t]={}),P=b.prototype||(b.prototype={});for(l in y&&(n=t),n)c=((p=!f&&T&&void 0!==T[l])?T:n)[l],d=h&&p?a(c,r):g&&"function"==typeof c?a(Function.call,c):c,T&&s(T,l,c,e&u.U),b[l]!=c&&i(b,l,d),g&&P[l]!=c&&(P[l]=c)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){var r=n(52),o=n(35);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(21),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(3).document;e.exports=r&&r.documentElement},function(e,t,n){var r,o,i,s=n(15),a=n(69),u=n(36),l=n(20),p=n(3),c=p.process,d=p.setImmediate,f=p.clearImmediate,y=p.MessageChannel,m=p.Dispatch,g=0,h={},T=function(){var e=+this;if(h.hasOwnProperty(e)){var t=h[e];delete h[e],t()}},b=function(e){T.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return h[++g]=function(){a("function"==typeof e?e:Function(e),t)},r(g),g},f=function(e){delete h[e]},"process"==n(12)(c)?r=function(e){c.nextTick(s(T,e,1))}:m&&m.now?r=function(e){m.now(s(T,e,1))}:y?(i=(o=new y).port2,o.port1.onmessage=b,r=s(i.postMessage,i,1)):p.addEventListener&&"function"==typeof postMessage&&!p.importScripts?(r=function(e){p.postMessage(e+"","*")},p.addEventListener("message",b,!1)):r="onreadystatechange"in l("script")?function(e){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),T.call(e)}}:function(e){setTimeout(s(T,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){"use strict";var r=n(16);e.exports.f=function(e){return new function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)}(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.Web=function(e,t){var n=new r.Base(t);return n.targetInfo.defaultToWebFl=!0,n.targetInfo.endpoint="web",e&&(n.targetInfo.url=e),n.addMethods(n,{__metadata:{type:"web"}}),n},t.Web.getRemoteWeb=function(e){return new r.Base({data:{requestUrl:e},defaultToWebFl:!0,endpoint:"SP.RemoteWeb?$expand=Web",method:"POST"})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(117));var r=n(1),o=n(11),i=n(26);t.SPConfig=function(e,t){var n=function(e,n){return new Promise(function(o,i){if(null!=n&&0!=n.length){for(var s=function(o){var s=n[o],a=u("Name",s.Name,e.results);a?(console.log("[gd-sprest][Content Type] The content type '"+s.Name+"' already exists."),s.ContentType=a):(console.log("[gd-sprest][Content Type] Creating the '"+s.Name+"' content type."),s.ParentName?r.Web(s.ParentWebUrl||t).ContentTypes().query({Filter:"Name eq '"+s.ParentName+"'"}).execute(function(t){t.results[0]?e.addAvailableContentType(t.results[0].Id.StringValue).execute(function(e){e.existsFl?new Promise(function(t,n){e.Name!=s.Name?e.update({Name:s.Name}).execute(function(){t()}):t()}).then(function(){console.log("[gd-sprest][Content Type] The content type '"+s.Name+"' was created successfully."),s.ContentType=e,s.onCreated&&s.onCreated(e)}):(console.log("[gd-sprest][Content Type] The content type '"+s.Name+"' failed to be created."),console.error("[gd-sprest][Field] Error: "+e.response))},!0):console.log("[gd-sprest][Content Type] The parent content type '"+s.Name+"' was not found.")},i):e.add({Description:s.Description,Group:s.Group,Id:s.Id||"0x0100"+r.ContextInfo.generateGUID().replace("{","").replace("-","").replace("}",""),Name:s.Name}).execute(function(e){e.existsFl?(console.log("[gd-sprest][Content Type] The content type '"+s.Name+"' was created successfully."),s.ContentType=e,s.onCreated&&s.onCreated(e)):(console.log("[gd-sprest][Content Type] The content type '"+s.Name+"' failed to be created."),console.error("[gd-sprest][Field] Error: "+e.response))},i,!0))},a=0;a0){console.log("[gd-sprest][View] Updating the view fields for the '"+i.ViewName+"' view."),s.ViewFields().removeAllViewFields().execute(!0);for(var a=0;a=t.length&&r()})},s=0;s=f&&l()};e.Fields&&e.Fields.length>0&&(f++,console.log("[gd-sprest][Fields] Starting the requests."),y.Fields().execute(function(t){return new Promise(function(n,r){s(i.parse(t.stringify()),e.Fields).then(function(){console.log("[gd-sprest][Fields] Completed the requests."),m(),n()},r)})},p)),e.ContentTypes&&e.ContentTypes.length>0&&(f++,console.log("[gd-sprest][Content Types] Starting the requests."),y.ContentTypes().execute(function(t){n(i.parse(t.stringify()),e.ContentTypes).then(function(){console.log("[gd-sprest][Content Types] Completed the requests."),m()})},p,!0)),e.ListCfg&&e.ListCfg.length&&(f++,console.log("[gd-sprest][Lists] Starting the requests."),y.Lists().execute(function(t){(function(e,t){return new Promise(function(n,r){for(var o=function(n){var o=t[n];if(u("Title",o.ListInformation.Title,e.results))console.log("[gd-sprest][List] The list '"+o.ListInformation.Title+"' already exists.");else{console.log("[gd-sprest][List] Creating the '"+o.ListInformation.Title+"' list.");var i=o.ListInformation,s=i.Title;i.Title=s.replace(/ /g,""),e.add(i).execute(function(e){i.Title=s,e.existsFl?(e.existsFl&&e.Title!=s?e.update({Title:s}).execute(function(){console.log("[gd-sprest][List] The list '"+e.Title+"' was created successfully.")}):console.log("[gd-sprest][List] The list '"+e.Title+"' was created successfully."),o.onCreated&&o.onCreated(e)):(console.log("[gd-sprest][List] The list '"+i.Title+"' failed to be created."),console.log("[gd-sprest][List] Error: '"+e.response))},r)}},i=0;i0&&(f++,console.log("[gd-sprest][WebParts] Starting the requests."),new Promise(function(t,n){var i=e.WebPartCfg;console.log("[gd-sprest][WebPart] Creating the web parts."),r.Web(r.ContextInfo.siteServerRelativeUrl).getCatalog(o.SPTypes.ListTemplateType.WebPartCatalog).RootFolder().query({Expand:["Files"]}).execute(function(e){for(var n=0,s=function(s){var a=i[s],l=function(){++n>=i.length&&t()},p=u("Name",a.FileName,e.Files.results);if(p.existsFl)console.log("[gd-sprest][WebPart] The webpart '"+a.FileName+"' already exists."),a.onUpdated&&a.onUpdated(p),l();else{for(var c=a.XML.trim(),d=new ArrayBuffer(2*c.length),f=new Uint16Array(d),y=0;y"+e.title+"",t.id=e.id,t.onclick=e.onClick,n?r.appendChild(t):r.insertBefore(t,r.firstChild)),t}},function(e,t,n){n(43),e.exports=n(11)},function(e,t,n){n(44),n(47),n(58),n(62),e.exports=n(9).Promise},function(e,t,n){"use strict";var r=n(18),o={};o[n(2)("toStringTag")]="z",o+""!="[object z]"&&n(6)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){e.exports=!n(8)&&!n(28)(function(){return 7!=Object.defineProperty(n(20)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(7);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var r=n(48)(!0);n(30)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var r=n(21),o=n(22);e.exports=function(e){return function(t,n){var i,s,a=String(o(t)),u=r(n),l=a.length;return u<0||u>=l?e?"":void 0:(i=a.charCodeAt(u))<55296||i>56319||u+1===l||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):i:e?a.slice(u,u+2):s-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(50),o=n(29),i=n(25),s={};n(5)(s,n(2)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(s,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(4),o=n(51),i=n(35),s=n(24)("IE_PROTO"),a=function(){},u=function(){var e,t=n(20)("iframe"),r=i.length;for(t.style.display="none",n(36).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("