{"version":3,"sources":["webpack://pnp/webpack/universalModuleDefinition","webpack://pnp/webpack/bootstrap","webpack://pnp/./build/packages-es5/common/src/adalclient.js","webpack://pnp/./build/packages-es5/common/src/collections.js","webpack://pnp/./build/packages-es5/common/src/libconfig.js","webpack://pnp/./build/packages-es5/common/src/storage.js","webpack://pnp/./build/packages-es5/common/index.js","webpack://pnp/./node_modules/tslib/tslib.es6.js","webpack://pnp/./build/packages-es5/common/src/util.js","webpack://pnp/./build/packages-es5/sp/src/config/splibconfig.js","webpack://pnp/./build/packages-es5/sp/src/utils/toabsoluteurl.js","webpack://pnp/./build/packages-es5/common/src/netutil.js","webpack://pnp/(webpack)/buildin/global.js","webpack://pnp/./node_modules/adal-angular/dist/adal.min.js","webpack://pnp/./build/packages-es5/logging/src/logger.js","webpack://pnp/./build/packages-es5/logging/src/loglevel.js","webpack://pnp/./build/packages-es5/logging/src/listeners.js","webpack://pnp/./build/packages-es5/config-store/src/configuration.js","webpack://pnp/./build/packages-es5/config-store/src/providers/cachingConfigurationProvider.js","webpack://pnp/./build/packages-es5/config-store/src/providers/spListConfigurationProvider.js","webpack://pnp/./build/packages-es5/odata/src/caching.js","webpack://pnp/./build/packages-es5/odata/src/parsers.js","webpack://pnp/./build/packages-es5/odata/src/pipeline.js","webpack://pnp/./build/packages-es5/odata/src/queryable.js","webpack://pnp/./build/packages-es5/odata/src/odatabatch.js","webpack://pnp/./build/packages-es5/graph/src/config/graphlibconfig.js","webpack://pnp/./build/packages-es5/graph/src/net/graphhttpclient.js","webpack://pnp/./build/packages-es5/graph/src/types.js","webpack://pnp/./build/packages-es5/graph/src/graphqueryable.js","webpack://pnp/./build/packages-es5/graph/src/members.js","webpack://pnp/./build/packages-es5/graph/src/groups.js","webpack://pnp/./build/packages-es5/graph/src/calendars.js","webpack://pnp/./build/packages-es5/graph/src/attachments.js","webpack://pnp/./build/packages-es5/graph/src/conversations.js","webpack://pnp/./build/packages-es5/graph/src/planner.js","webpack://pnp/./build/packages-es5/graph/src/photos.js","webpack://pnp/./build/packages-es5/graph/src/teams.js","webpack://pnp/./build/packages-es5/graph/src/directoryobjects.js","webpack://pnp/./build/packages-es5/graph/src/contacts.js","webpack://pnp/./build/packages-es5/graph/src/onenote.js","webpack://pnp/./build/packages-es5/graph/src/onedrive.js","webpack://pnp/./build/packages-es5/graph/src/messages.js","webpack://pnp/./build/packages-es5/graph/src/people.js","webpack://pnp/./build/packages-es5/graph/src/insights.js","webpack://pnp/./build/packages-es5/graph/src/users.js","webpack://pnp/./build/packages-es5/graph/src/batch.js","webpack://pnp/./build/packages-es5/graph/src/invitations.js","webpack://pnp/./build/packages-es5/graph/src/subscriptions.js","webpack://pnp/./build/packages-es5/graph/src/security.js","webpack://pnp/./build/packages-es5/graph/src/sites.js","webpack://pnp/./build/packages-es5/graph/src/rest.js","webpack://pnp/./build/packages-es5/sp-addinhelpers/src/sprequestexecutorclient.js","webpack://pnp/./build/packages-es5/sp/src/utils/extractweburl.js","webpack://pnp/./build/packages-es5/sp/src/odata.js","webpack://pnp/./build/packages-es5/sp/src/net/digestcache.js","webpack://pnp/./build/packages-es5/sp/src/net/sphttpclient.js","webpack://pnp/./build/packages-es5/sp/src/utils/metadata.js","webpack://pnp/./build/packages-es5/sp/src/sharepointqueryable.js","webpack://pnp/./build/packages-es5/sp/src/siteusers.js","webpack://pnp/./build/packages-es5/sp/src/sitegroups.js","webpack://pnp/./build/packages-es5/sp/src/types.js","webpack://pnp/./build/packages-es5/sp/src/roles.js","webpack://pnp/./build/packages-es5/sp/src/sharepointqueryablesecurable.js","webpack://pnp/./build/packages-es5/sp/src/files.js","webpack://pnp/./build/packages-es5/sp/src/sharepointqueryableshareable.js","webpack://pnp/./build/packages-es5/sp/src/webparts.js","webpack://pnp/./build/packages-es5/sp/src/folders.js","webpack://pnp/./build/packages-es5/sp/src/contenttypes.js","webpack://pnp/./build/packages-es5/sp/src/attachmentfiles.js","webpack://pnp/./build/packages-es5/sp/src/views.js","webpack://pnp/./build/packages-es5/sp/src/fields.js","webpack://pnp/./build/packages-es5/sp/src/forms.js","webpack://pnp/./build/packages-es5/sp/src/subscriptions.js","webpack://pnp/./build/packages-es5/sp/src/usercustomactions.js","webpack://pnp/./build/packages-es5/sp/src/lists.js","webpack://pnp/./build/packages-es5/sp/src/comments.js","webpack://pnp/./build/packages-es5/sp/src/items.js","webpack://pnp/./build/packages-es5/sp/src/appcatalog.js","webpack://pnp/./build/packages-es5/sp/src/clientsidepages.js","webpack://pnp/./build/packages-es5/sp/src/batch.js","webpack://pnp/./build/packages-es5/sp/src/features.js","webpack://pnp/./build/packages-es5/sp/src/site.js","webpack://pnp/./build/packages-es5/sp/src/navigation.js","webpack://pnp/./build/packages-es5/sp/src/relateditems.js","webpack://pnp/./build/packages-es5/sp/src/regionalsettings.js","webpack://pnp/./build/packages-es5/sp/src/sitedesigns.js","webpack://pnp/./build/packages-es5/sp/src/sitescripts.js","webpack://pnp/./build/packages-es5/sp/src/webs.js","webpack://pnp/./build/packages-es5/sp/src/search.js","webpack://pnp/./build/packages-es5/sp/src/social.js","webpack://pnp/./build/packages-es5/sp/src/searchsuggest.js","webpack://pnp/./build/packages-es5/sp/src/userprofiles.js","webpack://pnp/./build/packages-es5/sp/src/utilities.js","webpack://pnp/./build/packages-es5/sp/src/hubsites.js","webpack://pnp/./build/packages-es5/sp/src/rest.js","webpack://pnp/./build/packages-es5/sp-addinhelpers/src/sprestaddin.js","webpack://pnp/./build/packages-es5/pnpjs/src/pnpjs.js","webpack://pnp/./build/packages-es5/pnpjs/src/config/pnplibconfig.js","webpack://pnp/./build/packages-es5/pnpjs/index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","getResource","url","parser","document","createElement","href","protocol","hostname","_super","AdalClient","clientId","tenant","redirectUri","_this","this","_displayCallback","_loginPromise","fromSPFxContext","spfxContext","fetch","options","Error","getToken","then","token","resource","Promise","resolve","reject","ensureAuthContext","_","login","_authContext","acquireToken","message","catch","displayCall","navigateToLoginRequestUrl","getCachedUser","popupWindow","open","focus","pollTimer","setInterval","closed","undefined","clearInterval","URL","indexOf","handleWindowCallback","location","hash","close","e","_loginInProgress","SPFxAdalClient","context","aadTokenProviderFactory","getTokenProvider","provider","objectEntries","entries","keys","map","k","objectToMap","Map","mergeMaps","target","maps","_i","arguments","length","forEach","v","set","RuntimeConfigImpl","_v","extend","config","configurable","RuntimeConfig","PnPClientStorageWrapper","store","defaultTimeoutMinutes","enabled","test","enableCacheExpiration","cacheExpirationHandler","getItem","persistable","JSON","parse","Date","expiration","delete","put","expire","setItem","createPersistable","removeItem","getOrPut","deleteExpired","defaultTimeout","defaultCachingTimeoutSeconds","pnp","setTimeout","cacheExpirationIntervalMilliseconds","console","error","MemoryStorage","_store","size","clear","index","Array","from","data","PnPClientStorage","_local","_session","getStore","localStorage","sessionStorage","extendStatics","b","setPrototypeOf","__proto__","__extends","__","constructor","__decorate","decorators","desc","getOwnPropertyDescriptor","Reflect","decorate","__awaiter","thisArg","_arguments","P","generator","fulfilled","step","next","rejected","result","done","apply","__generator","body","f","y","g","label","sent","trys","ops","verb","iterator","op","TypeError","pop","push","getCtxCallback","method","params","dateAdd","date","interval","units","ret","toLowerCase","setFullYear","getFullYear","setMonth","getMonth","setDate","getDate","setTime","getTime","combine","paths","filter","path","stringIsNullOrEmpty","replace","join","getRandomString","chars","text","possible","charAt","Math","floor","random","getGUID","now","performance","toString","isFunc","cf","objectDefinedNotNull","obj","isArray","array","source","noOverwrite","check","getOwnPropertyNames","reduce","isUrlAbsolute","getAttrValueFromString","html","attrName","match","RegExp","exec","sanitizeGuid","guid","matches","jsS","stringify","hOP","getHashCode","charCodeAt","setup","SPRuntimeConfig","SPRuntimeConfigImpl","spPart","headers","baseUrl","pageContext","web","absoluteUrl","fetchClientFactory","toAbsoluteUrl","candidateUrl","global","_spPageContextInfo","webAbsoluteUrl","webServerRelativeUrl","baseUrl_1","substr","mergeHeaders","Request","append","mergeOptions","FetchClient","BearerTokenFetchClient","_token","Headers","Function","AuthenticationContext","a","REQUEST_TYPE","LOGIN","RENEW_TOKEN","UNKNOWN","RESPONSE_TYPE","ID_TOKEN_TOKEN","TOKEN","CONSTANTS","ACCESS_TOKEN","EXPIRES_IN","ID_TOKEN","ERROR_DESCRIPTION","SESSION_STATE","ERROR","STORAGE","TOKEN_KEYS","ACCESS_TOKEN_KEY","EXPIRATION_KEY","STATE_LOGIN","STATE_RENEW","NONCE_IDTOKEN","USERNAME","IDTOKEN","LOGIN_REQUEST","LOGIN_ERROR","RENEW_STATUS","ANGULAR_LOGIN_REQUEST","RESOURCE_DELIMETER","CACHE_DELIMETER","LOADFRAME_TIMEOUT","TOKEN_RENEW_STATUS_CANCELED","TOKEN_RENEW_STATUS_COMPLETED","TOKEN_RENEW_STATUS_IN_PROGRESS","LOGGING_LEVEL","WARN","INFO","VERBOSE","LEVEL_STRING_MAP","0","1","2","3","POPUP_WIDTH","POPUP_HEIGHT","_singletonInstance","instance","callback","popUp","isAngular","_user","_activeRenewals","_acquireTokenInProgress","_renewStates","_callBackMappedToRenewStates","_callBacksMappedToRenewStates","_openedWindows","_requestType","_adalInstance","_cloneConfig","loginResource","split","postLogoutRedirectUri","anonymousEndpoints","loadFrameTimeout","Logging","piiLoggingEnabled","level","log","info","_guid","state","_idTokenNonce","_getItem","_saveItem","verbose","_getNavigateUrl","encodeURIComponent","registerCallback","_loginPopup","promptUser","_openPopup","screenLeft","screenX","screenTop","screenY","innerWidth","documentElement","clientWidth","h","innerHeight","clientHeight","j","warn","_handlePopupError","_broadcast","encodeURI","bubbles","cancelable","detail","createEvent","initCustomEvent","CustomEvent","Event","dispatchEvent","loginInProgress","_hasResource","_isEmpty","getCachedToken","expireOffsetSeconds","_now","_createUser","_renewToken","_addAdalFrame","_urlRemoveQueryStringParameter","_addHintParameters","verbosePii","src","_loadFrameTimeout","_renewIdToken","_urlContainsQueryStringParameter","_loadFrame","extraQueryParameter","acquireTokenPopup","acquireTokenRedirect","infoPii","clearCache","clearCacheForResource","logOut","logOutUri","getUser","profile","sid","upn","_extractIdToken","aud","userName","email","_getHash","substring","isCallback","_deserialize","getLoginError","getRequestInfo","valid","parameters","stateMatch","stateResponse","requestType","_matchState","parent","_matchNonce","nonce","_getResourceFromState","saveTokenFromHash","error_description","_expiresIn","exp","getResourceForEndpoint","endpoints","_getHostFromUri","String","opener","_serialize","_addLibMetadata","_decodeJwt","JWSPayload","_base64DecodeStringUrlSafe","atob","decodeURIComponent","escape","_decode","fromCharCode","header","JWSSig","_convertUrlSafeToRegularBase64EncodedString","slice","correlationId","_decimalToHex","crypto","msCrypto","getRandomValues","Uint8Array","parseInt","round","getElementById","opera","navigator","userAgent","setAttribute","style","visibility","position","width","height","borderWidth","getElementsByTagName","appendChild","insertAdjacentHTML","frames","cacheLocation","_supportsLocalStorage","_supportsSessionStorage","_libVersion","toUTCString","stack","errorPii","warnPii","inject","LogLevel","Logger","activeLogLevel","_instance","LoggerImpl","subscribe","listeners","listener","clearSubscribers","count","write","writeJSON","json","entry","err","subscribers","subscriber","ConsoleListener","msg","format","FunctionListener","Settings","_settings","add","addJSON","load","getConfiguration","getJSON","CachingConfigurationProvider","wrappedProvider","cacheKey","cacheStore","selectPnPCache","getWrappedProvider","providedConfig","pnpCache","local","session","SPListConfigurationProvider","listTitle","keyFieldName","valueFieldName","lists","getByTitle","items","select","item","asCaching","toUrl","CachingOptions","storeName","defaultCachingStore","storage","CachingParserWrapper","cacheOptions","response","cacheData","HttpRequestError","status","statusText","isHttpRequestError","init","clone","ODataParserBase","rawJson","handleError","parseImpl","has","parseFloat","txt","parseODataJSON","ok","results","ODataDefaultParser","TextParser","BlobParser","blob","JSONParser","BufferParser","arrayBuffer","buffer","LambdaParser","setResult","hasResult","pipeline","shift","pipe","requestId","promise","ctx","returnResult","isBatched","batch","addResolveBatchDependency","requestPipelineMethod","alwaysRun","propertyKey","descriptor","args","PipelineMethods","logStart","requestAbsoluteUrl","caching","isCached","cachingOptions","batchDependency","hydrate","send","batchId","client","clientFactory","opts","logEnd","getDefaultPipeline","Queryable","_query","_options","_url","_parentUrl","_useCaching","_cachingOptions","_cloneParentWasCaching","_cloneParentCacheOptions","_requestPipeline","concat","pathPart","configure","configureFrom","usingCaching","globalCacheDisable","withPipeline","getCore","reqImpl","postCore","patchCore","deleteCore","putCore","getRequestPipeline","toRequestContext","_clone","_0","ODataQueryable","_batch","_batchDependency","inBatch","hasBatch","addBatchDependency","addDependency","cloneSettings","includeBatch","ODataBatch","_batchId","_reqs","_deps","_rDeps","id","toUpperCase","resolver","execute","all","executeImpl","GraphRuntimeConfig","GraphRuntimeConfigImpl","graphPart","GraphHttpClient","_impl","fetchRaw","rawHeaders","retry","delay","attempts","retryCount","retryContext","post","patch","GraphEndpoints","ensure","endpoint","Beta","V1","regex","replaces","GraphQueryable","urlStr","selects","query","expand","expands","as","toUrlAndQuery","char","setEndpoint","getParent","parentUrl","additionalPath","dependencyDispose","GraphQueryableCollection","orderBy","ascending","top","skip","num","skipToken","GraphQueryableSearchableCollection","search","GraphQueryableInstance","defaultPath","class_1","GroupType","Members","Members_1","getById","Member","remove","Owners","Calendars","Calendar","Events","properties","event","update","Attachments","addFile","bytes","contentBytes","Attachment","Conversations","Threads","Posts","Conversation","Thread","reply","Post","forward","Senders","remover","Planner","Plans","owner","title","postBody","plan","Plan","eTag","Tasks","planId","assignments","bucketId","task","Task","Buckets","orderHint","bucket","Bucket","Details","Photo","Photo_1","getBlob","getBuffer","setContent","content","Teams","mailNickname","description","ownerId","teamProperties","groupProps","Office365","gar","group","createTeam","team","Team","Team_1","archive","shouldSetSpoSiteReadOnlyForMembers","unarchive","cloneTeam","partsToClone","displayName","Channels","channel","Channel","Apps","appUrl","Tabs","tab","Tab","Tab_1","DirectoryObjectType","Groups","groupType","additionalProperties","mailEnabled","securityEnabled","Security","groupTypes","Group","addFavorite","getMemberObjects","securityEnabledOnly","getMemberGroups","checkMemberGroups","groupIds","removeFavorite","resetUnseenCount","subscribeByMail","unsubscribeByMail","getCalendarView","start","end","view","toISOString","Contacts","givenName","surName","emailAddresses","businessPhones","contact","Contact","ContactFolders","parentFolderId","contactFolder","ContactFolder","OneNote","Notebooks","notebook","Notebook","Sections","section","Section","Pages","Drives","Drive","Root","DriveItems","DriveItem","move","parentReference","patchBody","Children","driveItemType","driveItem","DriveList","Recent","SharedWithMe","DriveSearch","Thumbnails","Messages","Message","MailFolders","mailFolder","MailFolder","MailboxSettings","settings","DirectoryObjects","DirectoryObjects_1","getByIds","ids","type","directoryObject","DirectoryObject","People","Insights","Trending","Used","Shared","Users","User","sendMail","saveToSentItems","GraphBatch","batchUrl","maxRequests","makeUrlRelative","formatRequests","requests","reqInfo","requestFragment","parseResponse","graphResponse","parsedResponses","fill","responses","responseId","Response","nextLink","_loop_1","requestsChunk","splice","this_1","batchRequest","batchOptions","parsedResponse","chain","request","Invitations","invitedUserEmailAddress","inviteRedirectUrl","Subscriptions","changeType","notificationUrl","expirationDateTime","subscription","Subscription","Alerts","Alert","Sites","relativeUrl","siteUrl","_urlCombine","lastIndexOf","GraphSite","GraphContentTypes","GraphContentType","GraphColumns","GraphColumn","GraphColumnLinks","GraphColumnLink","GraphLists","list","GraphList","GraphItems","fields","GraphItem","GraphFields","GraphVersions","Version","GraphRest","createBatch","graph","SPRequestExecutorClient","convertToResponse","spResponse","responseHeaders","statusCode","SP","RequestExecutor","temp","addinWebUrl","executor","requestOptions","success","binaryStringRequestBody","executeAsync","extractWebUrl","odataUrlFrom","candidate","parts","__metadata","uri","SPODataEntityParserImpl","SPODataEntityArrayParserImpl","spODataEntity","spODataEntityArray","CachedDigest","digests","DigestCache","_httpClient","_digests","getDigest","webUrl","cachedDigest","cache","credentials","GetContextWebInformation","newCachedDigest","FormDigestValue","seconds","FormDigestTimeoutSeconds","SPHttpClient","_digestCache","digest","setRetry","metadata","SharePointQueryable","_forceCaching","aliasedParams","labelName","SharePointQueryableCollection","SharePointQueryableInstance","_update","mapper","props","_delete","_deleteWithETag","PrincipalType","SiteUsers","SiteUsers_1","getByEmail","getByLoginName","loginName","su","removeById","removeByLoginName","LoginName","UserBase","SiteUser","user","CurrentUser","ControlMode","FieldTypes","DateTimeFieldFormatType","DateTimeFieldFriendlyFormatType","AddFieldOptions","CalendarType","UrlFieldFormatType","PermissionKind","PrincipalSource","RoleType","PageType","SharingLinkKind","SharingRole","SharingOperationStatusCode","SPSharedObjectType","SharingDomainRestrictionMode","RenderListDataOptions","FieldUserSelectionMode","ChoiceFieldFormatType","UrlZone","SiteGroups","SiteGroups_1","sg","Id","getByName","groupName","SiteGroup","retGroup","setUserAsOwner","userId","_a","RoleAssignments","RoleAssignments_1","ra","principalId","roleDefId","RoleAssignment","RoleDefinitions","getByType","roleTypeKind","order","basePermissions","BasePermissions","High","Low","Description","Name","Order","definition","RoleDefinition","retDef","RoleDefinitionBindings","CheckinType","WebPartsPersonalizationScope","MoveOperations","TemplateFileType","SharePointQueryableSecurable","getUserEffectivePermissions","q","GetUserEffectivePermissions","getCurrentUserEffectivePermissions","EffectiveBasePermissions","breakRoleInheritance","copyRoleAssignments","clearSubscopes","resetRoleInheritance","userHasPermissions","permission","perms","hasPermissions","currentUserHasPermissions","perm","FullMask","SharePointQueryableShareable","getShareLink","kind","expString","createLink","emailData","linkKind","shareWith","loginNames","role","requireSignin","propagateAcl","userStr","Key","roleFilter","Edit","Contributor","Reader","def","includeAnonymousLinkInEmail","peoplePickerInput","roleValue","useSimplifiedRoles","emailBody","emailSubject","subject","sendEmail","shareObject","bypass","sendShareObjectRequest","getRoleValue","unshareObjectWeb","checkPermissions","recipients","getSharingInformation","getObjectSharingSettings","unshareObject","deleteLinkByKind","unshareLink","shareId","Guest","getShareObjectWeb","SharePointQueryableShareableWeb","View","dependency","shareObjectRaw","SharePointQueryableShareableItem","OrganizationView","checkSharingPermissions","unshare","deleteSharingLinkByKind","FileFolderShared","getShareable","shareable","SharePointQueryableShareableFile","SharePointQueryableShareableFolder","shareEverything","LimitedWebPartManager","export","webPartId","import","xml","webPartXml","WebPartDefinitions","getByControlId","WebPartDefinition","saveChanges","moveTo","zoneId","zoneIndex","WebPart","Folders","Folders_1","folder","addUsingPath","serverRelativeUrl","overwrite","Folder","recycle","listItemAllFields","destUrl","srcUrl","ServerRelativeUrl","webBaseUrl","hostUrl","copyTo","ContentTypes","ContentTypes_1","addAvailableContentType","contentTypeId","contentType","ct","additionalSettings","assign","ContentType","FieldLinks","fl","FieldLink","AttachmentFiles","AttachmentFiles_1","file","addMultiple","files","deleteMultiple","recycleMultiple","AttachmentFile","getText","getParsed","Views","Views_1","personalView","renderAsHtml","setViewXml","viewXml","ViewFields","ViewFields_1","getSchemaXml","fieldTitleOrInternalName","fieldInternalName","removeAll","Fields","Fields_1","getByInternalNameOrTitle","createFieldAsXml","SchemaXml","field","fieldType","addText","maxLength","FieldTypeKind","MaxLength","addCalculated","formula","dateFormat","outputType","Text","DateFormat","Formula","OutputType","addDateTime","displayFormat","calendarType","friendlyDisplayFormat","DateOnly","Gregorian","Unspecified","DateTimeCalendarType","DisplayFormat","FriendlyDisplayFormat","addNumber","minValue","maxValue","MinimumValue","MaximumValue","addCurrency","currencyLocalId","CurrencyLocaleId","addMultilineText","numberOfLines","richText","restrictedMode","appendOnly","allowHyperlink","AllowHyperlink","AppendOnly","NumberOfLines","RestrictedMode","RichText","addUrl","Hyperlink","addUser","selectionMode","SelectionMode","addLookup","lookupListId","lookupFieldName","LookupFieldName","LookupListId","Title","addChoice","choices","fillIn","Dropdown","Choices","EditFormat","FillInChoice","addMultiChoice","addBoolean","addDependentLookupField","primaryLookupFieldId","showField","addLocation","Field","setShowInDisplayForm","show","setShowInEditForm","setShowInNewForm","Forms","Form","subscriptionId","expirationDate","clientState","UserCustomActions","UserCustomActions_1","uca","action","UserCustomAction","Lists","Lists_1","template","enableContentTypes","addSettings","addOrUpdateSettings","ContentTypesEnabled","created","ensureSiteAssetsLibrary","ensureSitePagesLibrary","List","getView","viewId","retList","getChanges","getItemsByCAMLQuery","getListItemChangesSinceToken","Recycle","renderListData","RenderListData","renderListDataAsStream","overrideParameters","queryParams","RenderOptions","renderListFormData","itemId","formId","RenderListFormData","reserveListItemId","ReserveListItemId","getListItemEntityTypeFullName","ListItemEntityTypeFullName","addValidateUpdateItemUsingPath","formValues","decodedUrl","bNewDocumentUpdate","checkInComment","listItemCreateInfo","FolderPath","DecodedUrl","res","AddValidateUpdateItemUsingPath","getSiteScript","rootFolder","absoluteListUrl","getSiteScriptFromList","Comments","Comments_1","Comment","like","unlike","Replies","Replies_1","Items","Items_1","getItemByStringId","stringId","reverse","getPaged","getAll","requestSize","acceptHeader","itemsCollector","gatherer","last","hasNext","getNext","listItemEntityTypeFullName","removeDependency","ensureListItemEntityTypeName","listItemEntityType","candidatelistItemEntityTypeFullName","Item","getLikedBy","getWopiFrameUrl","GetWOPIFrameUrl","validateUpdateListItem","newDocumentUpdate","getLikedByInformation","ItemVersions","versionId","ItemVersion","PagedItemCollection","nextUrl","innerParser","PagedItemCollectionParser","_parent","__next","ItemUpdatedParser","Files","Files_1","shouldOverWrite","Overwrite","AutoCheckoutOnInvalidData","XorHash","addChunked","progress","chunkSize","setContentChunked","addTemplateFile","fileUrl","templateFileType","File","approve","comment","cancelUpload","uploadId","checkin","checkinType","Major","checkout","deny","getLimitedWebPartManager","scope","moveOperations","publish","undoCheckout","unpublish","fileSize","blockCount","blockNumber","currentPointer","stage","totalBlocks","startUpload","pointer","continueUpload","finishUpload","fragment","StartUpload","fileOffset","ContinueUpload","Versions","Versions_1","deleteAll","deleteById","recycleByID","deleteByLabel","recycleByLabel","restoreByLabel","PromotedState","AppCatalog","getAppById","filename","catalog","App","deploy","skipFeatureDeployment","retract","install","uninstall","upgrade","SPBatch","ParseResponse","statusRegExp","lines","line","trim","absoluteRequestUrl","batchBody","currentChangeSetId","castHeaders","Features","Features_1","force","featdefScope","featureId","feature","Feature","deactivate","DefinitionId","Site","Site_1","getRootWeb","rootWeb","Url","getContextInfo","SupportedSchemaVersions","getDocumentLibraries","absoluteWebUrl","GetDocumentLibraries","getWebUrlFromPageUrl","absolutePageUrl","GetWebUrlFromPageUrl","site","siteId","openWebById","webId","fromUrl","joinHubSite","registerHubSite","unRegisterHubSite","createCommunicationSite","lcid","shareByEmailEnabled","classification","siteDesignId","hubSiteId","Classification","HubSiteId","Lcid","Owner","ShareByEmailEnabled","SiteDesignId","WebTemplate","WebTemplateExtensionId","methodUrl","Create","createModernTeamSite","alias","isPublic","owners","optionalParams","CreationOptions","NavigationNodes","node","visible","IsVisible","moveAfter","nodeId","previousNodeId","NavigationNode","Navigation","NavigationService","getMenuState","menuNodeKey","depth","mapProviderName","customProperties","getMenuNodeKey","currentUrl","RelatedItemManagerImpl","RelatedItemManagerImpl_1","FromUrl","getRelatedItems","sourceListName","sourceItemId","SourceItemID","SourceListName","getPageOneRelatedItems","addSingleLink","sourceWebUrl","targetListName","targetItemID","targetWebUrl","tryAddReverseLink","SourceWebUrl","TargetItemID","TargetListName","TargetWebUrl","TryAddReverseLink","addSingleLinkToUrl","targetItemUrl","TargetItemUrl","addSingleLinkFromUrl","sourceItemUrl","targetItemId","SourceItemUrl","deleteSingleLink","tryDeleteReverseLink","TryDeleteReverseLink","RegionalSettings","InstalledLanguages","TimeZone","TimeZone_1","utcToLocalTime","utcTime","dateIsoString","UTCToLocalTime","localTimeToUTC","localTime","getTimezoneOffset","LocalTimeToUTC","TimeZones","TimeZones_1","SiteDesigns","methodName","getBaseUrl","createSiteDesign","creationInfo","applySiteDesign","getSiteDesigns","getSiteDesignMetadata","updateSiteDesign","updateInfo","deleteSiteDesign","getSiteDesignRights","grantSiteDesignRights","principalNames","grantedRights","revokeSiteDesignRights","addSiteDesignTask","addSiteDesignTaskToCurrentWeb","getSiteDesignTask","getSiteDesignRun","getSiteDesignRunStatus","runId","SiteScripts","getSiteScripts","createSiteScript","getSiteScriptMetadata","deleteSiteScript","updateSiteScript","siteScriptUpdateInfo","Content","listUrl","getSiteScriptFromWeb","extractInfo","Webs","Webs_1","language","inheritPermissions","Language","UseSamePermissionsAsParentSite","WebInfos","Web","Web_1","getParentWeb","ParentWeb","getSubwebsFilteredForCurrentUser","nWebTemplateFilter","nConfigurationFilter","getFolderById","uniqueId","getFolderByServerRelativeUrl","folderRelativeUrl","getFolderByServerRelativePath","getFileById","getFileByServerRelativeUrl","fileRelativeUrl","getFileByServerRelativePath","getList","listRelativeUrl","applyTheme","colorPaletteUrl","fontSchemeUrl","backgroundImageUrl","shareGenerated","applyWebTemplate","ensureUser","logonName","availableWebTemplates","includeCrossLanugage","getCatalog","getUserById","mapToIcon","progId","getStorageEntity","setStorageEntity","comments","removeStorageEntity","getAppCatalog","getSiteCollectionAppCatalog","getClientSideWebParts","addClientSidePage","pageName","addClientSidePageByPath","createDefaultAssociatedGroups","siteOwner","siteOwner2","groupNameSeed","hubSiteData","forceRefresh","syncHubSiteTheme","getSiteDesignRuns","getNextOrder","collection","max","reindex","columns","controls","ClientSidePage","noInit","sections","commentsDisabled","_bannerImageDirty","initFrom","_pageSettings","controlType","pageSettingsSlice","isDefaultDescription","isDefaultThumbnail","_layoutPart","getDefaultLayoutPart","fromJSON","pageLayoutType","promotedState","pageInitData","newPage","PageLayoutType","save","fromFile","dataVersion","instanceId","authors","layoutType","showPublishDate","showTopicHeader","textAlignment","topicHeader","serverProcessedContent","htmlStrings","searchablePlainTexts","imageSources","links","BannerImageUrl","imageSourceType","TopicHeader","findIndex","layoutIndex","hasVerticalSection","addVerticalSection","addSection","sectionIndex","pageData","canvasControls","CanvasContent1","layouts","LayoutWebpartsContent","setControls","CommentsDisabled","origImgUrl","imgFile","imgId","listId","UniqueId","ParentList","bannerImageUrl","imageSource","customMetadata","IsPageCheckedOutToCurrentUser","saveBody","AuthorByline","getCanvasContent1","getLayoutWebpartsContent","updater","discardPageCheckout","promoteToNews","promoteNewsImpl","enableComments","setCommentsOn","disableComments","findControlById","findControl","predicate","copyPage","page","pageLayout","getControls","setBannerImage","bannerImageSourceType","translateX","translateY","altText","mergeColumnToTree","part","mergePartToTree","textData","innerHTML","canvasData","column","displayMode","emphasis","getEmphasisObj","control","zoneEmphasis","on","VersionInfo","LastVersionCreatedBy","LastVersionCreated","positionData","sectionFactor","getOrCreateSection","addColumn","addControl","initer","listData","CanvasSection","_emphasis","_memId","_order","_layoutIndex","factor","defaultColumn","CanvasColumn","Default","_section","getControl","ColumnControl","_column","onColumnChange","setData","ClientSideText","anchorComponentId","startsWith","controlIndex","col","addedFromPersistedData","editorType","ClientSideWebpart","fromComponentDef","webPartData","reservedHeight","reservedWidth","setProperties","getProperties","component","componendId","preconfiguredEntries","Manifest","default","funcs","toPropCase","str","$1","SearchQueryBuilder","queryText","Proxy","Querytext","self","proxy","pk","mappedPk","propKey","SortDirection","ReorderingRuleMatchType","QueryPropertyValueType","Search","queryInit","parseQuery","HitHighlightedProperties","fixArrProp","Properties","RefinementFilters","ReorderingRules","SelectProperties","SortList","prop","toSearchQuery","SearchResults","rawResponse","_raw","_primary","postquery","RawSearchResults","ElapsedTime","PrimaryQueryResult","RelevantResults","RowCount","TotalRows","TotalRowsIncludingDuplicates","formatSearchResults","Table","Rows","getPage","pageNumber","pageSize","rows","RowLimit","StartRow","rawResults","tempResults_1","tempResult","cells","Cells","cell","Value","writable","SocialActorType","SocialActorTypes","SocialFollowResult","SocialStatusCode","SearchBuiltInSourceId","Documents","ItemsMatchingContentType","ItemsMatchingTag","ItemsRelatedToCurrentUser","ItemsWithSameKeywordAsThisItem","LocalPeopleResults","LocalReportsAndDataResults","LocalSharePointResults","LocalVideoResults","Pictures","Popular","RecentlyChangedItems","RecommendedItems","Wiki","SearchSuggest","mapQueryToQueryString","suggest","PeopleNames","PersonalResults","Queries","querytext","querySetter","checkProp","sp","UserProfileQuery","clientPeoplePickerQuery","profileLoader","amIFollowedBy","amIFollowing","getFollowedTags","maxCount","getFollowersFor","getPeopleFollowedBy","getPropertiesFor","getUserProfilePropertyFor","propertyName","hideSuggestion","isFollowing","follower","followee","setMyProfilePic","profilePicSource","reader","FileReader","onload","readAsArrayBuffer","Uint16Array","setSingleValueProfileProperty","accountName","propertyValue","setMultiValuedProfileProperty","propertyValues","createPersonalSiteEnqueueBulk","emails","ownerUserProfile","userProfile","createPersonalSite","interactiveRequest","shareAllSocialData","share","clientPeoplePickerResolveUser","clientPeoplePickerSearchUser","ProfileLoader","ProfileLoader_1","ClientPeoplePickerQuery","ClientPeoplePickerQuery_1","createClientPeoplePickerQueryParametersRequestBody","ClientPeoplePickerResolveUser","ClientPeoplePickerSearchUser","SocialQuery","SocialQuery_1","getFollowedSitesUri","FollowedSitesUri","getFollowedDocumentsUri","FollowedDocumentsUri","follow","actorInfo","createSocialActorInfoRequestBody","isFollowed","stopFollowing","MySocialQuery","MySocialQuery_1","followed","types","Followed","followedCount","FollowedCount","followers","Followers","suggestions","Suggestions","UtilityMethod","excute","Body","From","Subject","To","CC","BCC","AdditionalHeaders","getCurrentUserEmailAddresses","GetCurrentUserEmailAddresses","resolvePrincipal","input","scopes","sources","inputIsEmailOnly","addToUserInfoList","matchUserInfoList","ResolvePrincipalInCurrentContext","searchPrincipals","SearchPrincipalsUsingContextWeb","createEmailBodyForInvitation","pageAddress","CreateEmailBodyForInvitation","expandGroupsToPrincipals","inputs","ExpandGroupsToPrincipals","createWikiPage","CreateWikiPageInContextWeb","containsInvalidFileFolderChars","onPremise","InvalidFileFolderNameCharsOnPremiseRegex","lastIndex","InvalidFileFolderNameCharsOnlineRegex","stripInvalidFileFolderChars","replacer","HubSites","HubSite","SPRest","_baseUrl","searchSuggest","finalQuery","searchWithCaching","getTenantAppCatalogWeb","CorporateCatalogUrl","fm","SPRestAddIn","crossDomainSite","addInWebUrl","hostWebUrl","_cdImpl","crossDomainWeb","urlPart","util"],"mappings":";;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,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AK,YAAc+4D,GACf,MAAM/4D,MAAM,qDAEhB,IACIuR,EAAW,IAAIrV,EADT,YAAQ48D,EAAa,mCACCI,GAEhC,OADA3nD,EAAS4V,MAAM7jB,IAAI,UAAW,IAAMgQ,mBAAmBylD,GAAc,KAC9DxnD,EAASiS,UAAU/jB,KAAKqjB,WAE5B81C,EA3CqB,CA4C9B,MC1BK,IAAIO,GAAO,CACdnvD,QAAS,IACTd,QAAS,IACTzF,OAAQ,IACRsI,uBAAwB,IACxBhD,eAAgB,IAChBgC,QAAS,IACTR,gBAAiB,IACjBgB,QAAS,IACTJ,OAAQ,IACRW,cAAe,IACfT,qBAAsB,IACtBgB,aAAc,IACdjC,oBAAqB,KAKd,GAAK,GAIL,GAAQ,GAIR0U,GAAU,IAAI,IAId,GAAS,IAAI,EAIbjM,GAAM8I,EAIN,GC1DJ,SAAejY,GAClB,IAAcD,OAAOC,ID+FV,GAjCL,CAINA,OAAQ,GAIR8yB,MAAO,GAIP3jB,IAAKA,GAILhG,MAAO,GAIP6kD,GAAI,GAIJ5yC,QAASA,GAITq6C,KAAMA,IE5FV,68VAEe","file":"pnpjs.es5.umd.bundle.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"pnp\"] = factory();\n\telse\n\t\troot[\"pnp\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","import * as tslib_1 from \"tslib\";\r\nimport { BearerTokenFetchClient } from \"./netutil\";\r\nimport { isUrlAbsolute } from \"./util\";\r\n// @ts-ignore\r\nimport * as adal from \"adal-angular/dist/adal.min.js\";\r\n/**\r\n * Parses out the root of the request url to use as the resource when getting the token\r\n *\r\n * After: https://gist.github.com/jlong/2428561\r\n * @param url The url to parse\r\n */\r\nfunction getResource(url) {\r\n var parser = document.createElement(\"a\");\r\n parser.href = url;\r\n return parser.protocol + \"//\" + parser.hostname;\r\n}\r\n/**\r\n * Azure AD Client for use in the browser\r\n */\r\nvar AdalClient = /** @class */ (function (_super) {\r\n tslib_1.__extends(AdalClient, _super);\r\n /**\r\n * Creates a new instance of AdalClient\r\n * @param clientId Azure App Id\r\n * @param tenant Office 365 tenant (Ex: {tenant}.onmicrosoft.com)\r\n * @param redirectUri The redirect url used to authenticate the\r\n */\r\n function AdalClient(clientId, tenant, redirectUri) {\r\n var _this = _super.call(this, null) || this;\r\n _this.clientId = clientId;\r\n _this.tenant = tenant;\r\n _this.redirectUri = redirectUri;\r\n _this._displayCallback = null;\r\n _this._loginPromise = null;\r\n return _this;\r\n }\r\n /**\r\n * Creates a new AdalClient using the values of the supplied SPFx context (requires SPFx >= 1.6)\r\n *\r\n * @param spfxContext Current SPFx context\r\n * @description Using this method requires that the features described in this article\r\n * https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient are activated in the tenant.\r\n */\r\n AdalClient.fromSPFxContext = function (spfxContext) {\r\n return new SPFxAdalClient(spfxContext);\r\n };\r\n /**\r\n * Conducts the fetch opertation against the AAD secured resource\r\n *\r\n * @param url Absolute URL for the request\r\n * @param options Any fetch options passed to the underlying fetch implementation\r\n */\r\n AdalClient.prototype.fetch = function (url, options) {\r\n var _this = this;\r\n if (!isUrlAbsolute(url)) {\r\n throw Error(\"You must supply absolute urls to AdalClient.fetch.\");\r\n }\r\n // the url we are calling is the resource\r\n return this.getToken(getResource(url)).then(function (token) {\r\n _this.token = token;\r\n return _super.prototype.fetch.call(_this, url, options);\r\n });\r\n };\r\n /**\r\n * Gets a token based on the current user\r\n *\r\n * @param resource The resource for which we are requesting a token\r\n */\r\n AdalClient.prototype.getToken = function (resource) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n _this.ensureAuthContext().then(function (_) { return _this.login(); }).then(function (_) {\r\n AdalClient._authContext.acquireToken(resource, function (message, token) {\r\n if (message) {\r\n return reject(Error(message));\r\n }\r\n resolve(token);\r\n });\r\n }).catch(reject);\r\n });\r\n };\r\n /**\r\n * Ensures we have created and setup the adal AuthenticationContext instance\r\n */\r\n AdalClient.prototype.ensureAuthContext = function () {\r\n var _this = this;\r\n return new Promise(function (resolve) {\r\n if (AdalClient._authContext === null) {\r\n AdalClient._authContext = adal.inject({\r\n clientId: _this.clientId,\r\n displayCall: function (url) {\r\n if (_this._displayCallback) {\r\n _this._displayCallback(url);\r\n }\r\n },\r\n navigateToLoginRequestUrl: false,\r\n redirectUri: _this.redirectUri,\r\n tenant: _this.tenant,\r\n });\r\n }\r\n resolve();\r\n });\r\n };\r\n /**\r\n * Ensures the current user is logged in\r\n */\r\n AdalClient.prototype.login = function () {\r\n var _this = this;\r\n if (this._loginPromise) {\r\n return this._loginPromise;\r\n }\r\n this._loginPromise = new Promise(function (resolve, reject) {\r\n if (AdalClient._authContext.getCachedUser()) {\r\n return resolve();\r\n }\r\n _this._displayCallback = function (url) {\r\n var popupWindow = window.open(url, \"login\", \"width=483, height=600\");\r\n if (!popupWindow) {\r\n return reject(Error(\"Could not open pop-up window for auth. Likely pop-ups are blocked by the browser.\"));\r\n }\r\n if (popupWindow && popupWindow.focus) {\r\n popupWindow.focus();\r\n }\r\n var pollTimer = window.setInterval(function () {\r\n if (!popupWindow || popupWindow.closed || popupWindow.closed === undefined) {\r\n window.clearInterval(pollTimer);\r\n }\r\n try {\r\n if (popupWindow.document.URL.indexOf(_this.redirectUri) !== -1) {\r\n window.clearInterval(pollTimer);\r\n AdalClient._authContext.handleWindowCallback(popupWindow.location.hash);\r\n popupWindow.close();\r\n resolve();\r\n }\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n }, 30);\r\n };\r\n // this triggers the login process\r\n _this.ensureAuthContext().then(function (_) {\r\n AdalClient._authContext._loginInProgress = false;\r\n AdalClient._authContext.login();\r\n _this._displayCallback = null;\r\n });\r\n });\r\n return this._loginPromise;\r\n };\r\n /**\r\n * Our auth context\r\n */\r\n AdalClient._authContext = null;\r\n return AdalClient;\r\n}(BearerTokenFetchClient));\r\nexport { AdalClient };\r\n/**\r\n * Client wrapping the aadTokenProvider available from SPFx >= 1.6\r\n */\r\nvar SPFxAdalClient = /** @class */ (function (_super) {\r\n tslib_1.__extends(SPFxAdalClient, _super);\r\n /**\r\n *\r\n * @param context provide the appropriate SPFx Context object\r\n */\r\n function SPFxAdalClient(context) {\r\n var _this = _super.call(this, null) || this;\r\n _this.context = context;\r\n return _this;\r\n }\r\n /**\r\n * Executes a fetch request using the supplied url and options\r\n *\r\n * @param url Absolute url of the request\r\n * @param options Any options\r\n */\r\n SPFxAdalClient.prototype.fetch = function (url, options) {\r\n var _this = this;\r\n return this.getToken(getResource(url)).then(function (token) {\r\n _this.token = token;\r\n return _super.prototype.fetch.call(_this, url, options);\r\n });\r\n };\r\n /**\r\n * Gets an AAD token for the provided resource using the SPFx AADTokenProvider\r\n *\r\n * @param resource Resource for which a token is to be requested (ex: https://graph.microsoft.com)\r\n */\r\n SPFxAdalClient.prototype.getToken = function (resource) {\r\n return this.context.aadTokenProviderFactory.getTokenProvider().then(function (provider) {\r\n return provider.getToken(resource);\r\n });\r\n };\r\n return SPFxAdalClient;\r\n}(BearerTokenFetchClient));\r\nexport { SPFxAdalClient };\r\n//# sourceMappingURL=adalclient.js.map","import { isFunc } from \"./util\";\r\n/**\r\n * Used to calculate the object properties, with polyfill if needed\r\n */\r\nvar objectEntries = isFunc(Object.entries) ? Object.entries : function (o) { return Object.keys(o).map(function (k) { return [k, o[k]]; }); };\r\n/**\r\n * Converts the supplied object to a map\r\n *\r\n * @param o The object to map\r\n */\r\nexport function objectToMap(o) {\r\n if (o !== undefined && o !== null) {\r\n return new Map(objectEntries(o));\r\n }\r\n return new Map();\r\n}\r\n/**\r\n * Merges to Map instances together, overwriting values in target with matching keys, last in wins\r\n *\r\n * @param target map into which the other maps are merged\r\n * @param maps One or more maps to merge into the target\r\n */\r\nexport function mergeMaps(target) {\r\n var maps = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n maps[_i - 1] = arguments[_i];\r\n }\r\n for (var i = 0; i < maps.length; i++) {\r\n maps[i].forEach(function (v, k) {\r\n target.set(k, v);\r\n });\r\n }\r\n return target;\r\n}\r\n//# sourceMappingURL=collections.js.map","import { mergeMaps, objectToMap } from \"./collections\";\r\nexport function setup(config) {\r\n RuntimeConfig.extend(config);\r\n}\r\n// lable mapping for known config values\r\nvar s = [\r\n \"defaultCachingStore\",\r\n \"defaultCachingTimeoutSeconds\",\r\n \"globalCacheDisable\",\r\n \"enableCacheExpiration\",\r\n \"cacheExpirationIntervalMilliseconds\",\r\n \"spfxContext\",\r\n];\r\nvar RuntimeConfigImpl = /** @class */ (function () {\r\n function RuntimeConfigImpl(_v) {\r\n if (_v === void 0) { _v = new Map(); }\r\n this._v = _v;\r\n // setup defaults\r\n this._v.set(s[0], \"session\");\r\n this._v.set(s[1], 60);\r\n this._v.set(s[2], false);\r\n this._v.set(s[3], false);\r\n this._v.set(s[4], 750);\r\n this._v.set(s[5], null);\r\n }\r\n /**\r\n *\r\n * @param config The set of properties to add to the globa configuration instance\r\n */\r\n RuntimeConfigImpl.prototype.extend = function (config) {\r\n this._v = mergeMaps(this._v, objectToMap(config));\r\n };\r\n RuntimeConfigImpl.prototype.get = function (key) {\r\n return this._v.get(key);\r\n };\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingStore\", {\r\n get: function () {\r\n return this.get(s[0]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"defaultCachingTimeoutSeconds\", {\r\n get: function () {\r\n return this.get(s[1]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"globalCacheDisable\", {\r\n get: function () {\r\n return this.get(s[2]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"enableCacheExpiration\", {\r\n get: function () {\r\n return this.get(s[3]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"cacheExpirationIntervalMilliseconds\", {\r\n get: function () {\r\n return this.get(s[4]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RuntimeConfigImpl.prototype, \"spfxContext\", {\r\n get: function () {\r\n return this.get(s[5]);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return RuntimeConfigImpl;\r\n}());\r\nexport { RuntimeConfigImpl };\r\nvar _runtimeConfig = new RuntimeConfigImpl();\r\nexport var RuntimeConfig = _runtimeConfig;\r\n//# sourceMappingURL=libconfig.js.map","import { dateAdd, getCtxCallback, jsS, objectDefinedNotNull } from \"./util\";\r\nimport { RuntimeConfig } from \"./libconfig\";\r\n/**\r\n * A wrapper class to provide a consistent interface to browser based storage\r\n *\r\n */\r\nvar PnPClientStorageWrapper = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the PnPClientStorageWrapper class\r\n *\r\n * @constructor\r\n */\r\n function PnPClientStorageWrapper(store, defaultTimeoutMinutes) {\r\n if (defaultTimeoutMinutes === void 0) { defaultTimeoutMinutes = -1; }\r\n this.store = store;\r\n this.defaultTimeoutMinutes = defaultTimeoutMinutes;\r\n this.enabled = this.test();\r\n // if the cache timeout is enabled call the handler\r\n // this will clear any expired items and set the timeout function\r\n if (RuntimeConfig.enableCacheExpiration) {\r\n this.cacheExpirationHandler();\r\n }\r\n }\r\n /**\r\n * Get a value from storage, or null if that value does not exist\r\n *\r\n * @param key The key whose value we want to retrieve\r\n */\r\n PnPClientStorageWrapper.prototype.get = function (key) {\r\n if (!this.enabled) {\r\n return null;\r\n }\r\n var o = this.store.getItem(key);\r\n if (!objectDefinedNotNull(o)) {\r\n return null;\r\n }\r\n var persistable = JSON.parse(o);\r\n if (new Date(persistable.expiration) <= new Date()) {\r\n this.delete(key);\r\n return null;\r\n }\r\n else {\r\n return persistable.value;\r\n }\r\n };\r\n /**\r\n * Adds a value to the underlying storage\r\n *\r\n * @param key The key to use when storing the provided value\r\n * @param o The value to store\r\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\r\n */\r\n PnPClientStorageWrapper.prototype.put = function (key, o, expire) {\r\n if (this.enabled) {\r\n this.store.setItem(key, this.createPersistable(o, expire));\r\n }\r\n };\r\n /**\r\n * Deletes a value from the underlying storage\r\n *\r\n * @param key The key of the pair we want to remove from storage\r\n */\r\n PnPClientStorageWrapper.prototype.delete = function (key) {\r\n if (this.enabled) {\r\n this.store.removeItem(key);\r\n }\r\n };\r\n /**\r\n * Gets an item from the underlying storage, or adds it if it does not exist using the supplied getter function\r\n *\r\n * @param key The key to use when storing the provided value\r\n * @param getter A function which will upon execution provide the desired value\r\n * @param expire Optional, if provided the expiration of the item, otherwise the default is used\r\n */\r\n PnPClientStorageWrapper.prototype.getOrPut = function (key, getter, expire) {\r\n var _this = this;\r\n if (!this.enabled) {\r\n return getter();\r\n }\r\n var o = this.get(key);\r\n if (o === null) {\r\n return getter().then(function (d) {\r\n _this.put(key, d, expire);\r\n return d;\r\n });\r\n }\r\n return Promise.resolve(o);\r\n };\r\n /**\r\n * Deletes any expired items placed in the store by the pnp library, leaves other items untouched\r\n */\r\n PnPClientStorageWrapper.prototype.deleteExpired = function () {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n if (!_this.enabled) {\r\n resolve();\r\n }\r\n try {\r\n for (var i = 0; i < _this.store.length; i++) {\r\n var key = _this.store.key(i);\r\n if (key !== null) {\r\n // test the stored item to see if we stored it\r\n if (/[\"|']?pnp[\"|']? ?: ?1/i.test(_this.store.getItem(key))) {\r\n // get those items as get will delete from cache if they are expired\r\n _this.get(key);\r\n }\r\n }\r\n }\r\n resolve();\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n });\r\n };\r\n /**\r\n * Used to determine if the wrapped storage is available currently\r\n */\r\n PnPClientStorageWrapper.prototype.test = function () {\r\n var str = \"t\";\r\n try {\r\n this.store.setItem(str, str);\r\n this.store.removeItem(str);\r\n return true;\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Creates the persistable to store\r\n */\r\n PnPClientStorageWrapper.prototype.createPersistable = function (o, expire) {\r\n if (expire === undefined) {\r\n // ensure we are by default inline with the global library setting\r\n var defaultTimeout = RuntimeConfig.defaultCachingTimeoutSeconds;\r\n if (this.defaultTimeoutMinutes > 0) {\r\n defaultTimeout = this.defaultTimeoutMinutes * 60;\r\n }\r\n expire = dateAdd(new Date(), \"second\", defaultTimeout);\r\n }\r\n return jsS({ pnp: 1, expiration: expire, value: o });\r\n };\r\n /**\r\n * Deletes expired items added by this library in this.store and sets a timeout to call itself\r\n */\r\n PnPClientStorageWrapper.prototype.cacheExpirationHandler = function () {\r\n var _this = this;\r\n this.deleteExpired().then(function (_) {\r\n // call ourself in the future\r\n setTimeout(getCtxCallback(_this, _this.cacheExpirationHandler), RuntimeConfig.cacheExpirationIntervalMilliseconds);\r\n }).catch(function (e) {\r\n console.error(e);\r\n });\r\n };\r\n return PnPClientStorageWrapper;\r\n}());\r\nexport { PnPClientStorageWrapper };\r\n/**\r\n * A thin implementation of in-memory storage for use in nodejs\r\n */\r\nvar MemoryStorage = /** @class */ (function () {\r\n function MemoryStorage(_store) {\r\n if (_store === void 0) { _store = new Map(); }\r\n this._store = _store;\r\n }\r\n Object.defineProperty(MemoryStorage.prototype, \"length\", {\r\n get: function () {\r\n return this._store.size;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n MemoryStorage.prototype.clear = function () {\r\n this._store.clear();\r\n };\r\n MemoryStorage.prototype.getItem = function (key) {\r\n return this._store.get(key);\r\n };\r\n MemoryStorage.prototype.key = function (index) {\r\n return Array.from(this._store)[index][0];\r\n };\r\n MemoryStorage.prototype.removeItem = function (key) {\r\n this._store.delete(key);\r\n };\r\n MemoryStorage.prototype.setItem = function (key, data) {\r\n this._store.set(key, data);\r\n };\r\n return MemoryStorage;\r\n}());\r\n/**\r\n * A class that will establish wrappers for both local and session storage\r\n */\r\nvar PnPClientStorage = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the PnPClientStorage class\r\n *\r\n * @constructor\r\n */\r\n function PnPClientStorage(_local, _session) {\r\n if (_local === void 0) { _local = null; }\r\n if (_session === void 0) { _session = null; }\r\n this._local = _local;\r\n this._session = _session;\r\n }\r\n Object.defineProperty(PnPClientStorage.prototype, \"local\", {\r\n /**\r\n * Provides access to the local storage of the browser\r\n */\r\n get: function () {\r\n if (this._local === null) {\r\n this._local = this.getStore(\"local\");\r\n }\r\n return this._local;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(PnPClientStorage.prototype, \"session\", {\r\n /**\r\n * Provides access to the session storage of the browser\r\n */\r\n get: function () {\r\n if (this._session === null) {\r\n this._session = this.getStore(\"session\");\r\n }\r\n return this._session;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n PnPClientStorage.prototype.getStore = function (name) {\r\n if (name === \"local\") {\r\n return new PnPClientStorageWrapper(typeof (localStorage) === \"undefined\" ? new MemoryStorage() : localStorage);\r\n }\r\n return new PnPClientStorageWrapper(typeof (sessionStorage) === \"undefined\" ? new MemoryStorage() : sessionStorage);\r\n };\r\n return PnPClientStorage;\r\n}());\r\nexport { PnPClientStorage };\r\n//# sourceMappingURL=storage.js.map","export * from \"./src/common\";\r\n//# sourceMappingURL=index.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/**\r\n * Gets a callback function which will maintain context across async calls.\r\n * Allows for the calling pattern getCtxCallback(thisobj, method, methodarg1, methodarg2, ...)\r\n *\r\n * @param context The object that will be the 'this' value in the callback\r\n * @param method The method to which we will apply the context and parameters\r\n * @param params Optional, additional arguments to supply to the wrapped method when it is invoked\r\n */\r\nexport function getCtxCallback(context, method) {\r\n var params = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n params[_i - 2] = arguments[_i];\r\n }\r\n return function () {\r\n method.apply(context, params);\r\n };\r\n}\r\n/**\r\n * Adds a value to a date\r\n *\r\n * @param date The date to which we will add units, done in local time\r\n * @param interval The name of the interval to add, one of: ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second']\r\n * @param units The amount to add to date of the given interval\r\n *\r\n * http://stackoverflow.com/questions/1197928/how-to-add-30-minutes-to-a-javascript-date-object\r\n */\r\nexport function dateAdd(date, interval, units) {\r\n var ret = new Date(date); // don't change original date\r\n switch (interval.toLowerCase()) {\r\n case \"year\":\r\n ret.setFullYear(ret.getFullYear() + units);\r\n break;\r\n case \"quarter\":\r\n ret.setMonth(ret.getMonth() + 3 * units);\r\n break;\r\n case \"month\":\r\n ret.setMonth(ret.getMonth() + units);\r\n break;\r\n case \"week\":\r\n ret.setDate(ret.getDate() + 7 * units);\r\n break;\r\n case \"day\":\r\n ret.setDate(ret.getDate() + units);\r\n break;\r\n case \"hour\":\r\n ret.setTime(ret.getTime() + units * 3600000);\r\n break;\r\n case \"minute\":\r\n ret.setTime(ret.getTime() + units * 60000);\r\n break;\r\n case \"second\":\r\n ret.setTime(ret.getTime() + units * 1000);\r\n break;\r\n default:\r\n ret = undefined;\r\n break;\r\n }\r\n return ret;\r\n}\r\n/**\r\n * Combines an arbitrary set of paths ensuring and normalizes the slashes\r\n *\r\n * @param paths 0 to n path parts to combine\r\n */\r\nexport function combine() {\r\n var paths = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n paths[_i] = arguments[_i];\r\n }\r\n return paths\r\n .filter(function (path) { return !stringIsNullOrEmpty(path); })\r\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"); })\r\n .join(\"/\")\r\n .replace(/\\\\/g, \"/\");\r\n}\r\n/**\r\n * Gets a random string of chars length\r\n *\r\n * https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript\r\n *\r\n * @param chars The length of the random string to generate\r\n */\r\nexport function getRandomString(chars) {\r\n var text = new Array(chars);\r\n var possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n for (var i = 0; i < chars; i++) {\r\n text[i] = possible.charAt(Math.floor(Math.random() * possible.length));\r\n }\r\n return text.join(\"\");\r\n}\r\n/**\r\n * Gets a random GUID value\r\n *\r\n * http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript\r\n * https://stackoverflow.com/a/8809472 updated to prevent collisions.\r\n */\r\n/* tslint:disable no-bitwise */\r\nexport function getGUID() {\r\n var d = Date.now();\r\n if (typeof performance !== \"undefined\" && typeof performance.now === \"function\") {\r\n d += performance.now(); // use high-precision timer if available\r\n }\r\n var guid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\r\n var r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c === \"x\" ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n return guid;\r\n}\r\n/* tslint:enable */\r\n/**\r\n * Determines if a given value is a function\r\n *\r\n * @param cf The thing to test for functionness\r\n */\r\nexport function isFunc(cf) {\r\n return typeof cf === \"function\";\r\n}\r\n/**\r\n * Determines if an object is both defined and not null\r\n * @param obj Object to test\r\n */\r\nexport function objectDefinedNotNull(obj) {\r\n return typeof obj !== \"undefined\" && obj !== null;\r\n}\r\n/**\r\n * @returns whether the provided parameter is a JavaScript Array or not.\r\n*/\r\nexport function isArray(array) {\r\n if (Array.isArray) {\r\n return Array.isArray(array);\r\n }\r\n return array && typeof array.length === \"number\" && array.constructor === Array;\r\n}\r\n/**\r\n * Provides functionality to extend the given object by doing a shallow copy\r\n *\r\n * @param target The object to which properties will be copied\r\n * @param source The source object from which properties will be copied\r\n * @param noOverwrite If true existing properties on the target are not overwritten from the source\r\n * @param filter If provided allows additional filtering on what properties are copied (propName: string) => boolean\r\n *\r\n */\r\nexport function extend(target, source, noOverwrite, filter) {\r\n if (noOverwrite === void 0) { noOverwrite = false; }\r\n if (filter === void 0) { filter = function () { return true; }; }\r\n if (!objectDefinedNotNull(source)) {\r\n return target;\r\n }\r\n // ensure we don't overwrite things we don't want overwritten\r\n var check = noOverwrite ? function (o, i) { return !(i in o); } : function () { return true; };\r\n // final filter we will use\r\n var f = function (v) { return check(target, v) && filter(v); };\r\n return Object.getOwnPropertyNames(source)\r\n .filter(f)\r\n .reduce(function (t, v) {\r\n t[v] = source[v];\r\n return t;\r\n }, target);\r\n}\r\n/**\r\n * Determines if a given url is absolute\r\n *\r\n * @param url The url to check to see if it is absolute\r\n */\r\nexport function isUrlAbsolute(url) {\r\n return /^https?:\\/\\/|^\\/\\//i.test(url);\r\n}\r\n/**\r\n * Determines if a string is null or empty or undefined\r\n *\r\n * @param s The string to test\r\n */\r\nexport function stringIsNullOrEmpty(s) {\r\n return s === undefined || s === null || s.length < 1;\r\n}\r\n/**\r\n * Gets an attribute value from an html/xml string block. NOTE: if the input attribute value has\r\n * RegEx special characters they will be escaped in the returned string\r\n *\r\n * @param html HTML to search\r\n * @param attrName The name of the attribute to find\r\n */\r\nexport function getAttrValueFromString(html, attrName) {\r\n // make the input safe for regex\r\n html = html.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\r\n var reg = new RegExp(attrName + \"\\\\s*?=\\\\s*?(\\\"|')([^\\\\1]*?)\\\\1\", \"i\");\r\n var match = reg.exec(html);\r\n return match !== null && match.length > 0 ? match[2] : null;\r\n}\r\n/**\r\n * Ensures guid values are represented consistently as \"ea123463-137d-4ae3-89b8-cf3fc578ca05\"\r\n *\r\n * @param guid The candidate guid\r\n */\r\nexport function sanitizeGuid(guid) {\r\n if (stringIsNullOrEmpty(guid)) {\r\n return guid;\r\n }\r\n var matches = /([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})/i.exec(guid);\r\n return matches === null ? guid : matches[1];\r\n}\r\n/**\r\n * Shorthand for JSON.stringify\r\n *\r\n * @param o Any type of object\r\n */\r\nexport function jsS(o) {\r\n return JSON.stringify(o);\r\n}\r\n/**\r\n * Shorthand for Object.hasOwnProperty\r\n *\r\n * @param o Object to check for\r\n * @param p Name of the property\r\n */\r\nexport function hOP(o, p) {\r\n return Object.hasOwnProperty.call(o, p);\r\n}\r\n/**\r\n * Generates a ~unique hash code\r\n *\r\n * From: https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript\r\n */\r\n// tslint:disable:no-bitwise\r\nexport function getHashCode(s) {\r\n var hash = 0;\r\n if (s.length === 0) {\r\n return hash;\r\n }\r\n for (var i = 0; i < s.length; i++) {\r\n var chr = s.charCodeAt(i);\r\n hash = ((hash << 5) - hash) + chr;\r\n hash |= 0; // Convert to 32bit integer\r\n }\r\n return hash;\r\n}\r\n// tslint:enable:no-bitwise\r\n//# sourceMappingURL=util.js.map","import { RuntimeConfig, FetchClient, } from \"@pnp/common\";\r\nexport function setup(config) {\r\n RuntimeConfig.extend(config);\r\n}\r\nvar SPRuntimeConfigImpl = /** @class */ (function () {\r\n function SPRuntimeConfigImpl() {\r\n }\r\n Object.defineProperty(SPRuntimeConfigImpl.prototype, \"headers\", {\r\n get: function () {\r\n var spPart = RuntimeConfig.get(\"sp\");\r\n if (spPart !== undefined && spPart.headers !== undefined) {\r\n return spPart.headers;\r\n }\r\n return {};\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRuntimeConfigImpl.prototype, \"baseUrl\", {\r\n get: function () {\r\n var spPart = RuntimeConfig.get(\"sp\");\r\n if (spPart !== undefined && spPart.baseUrl !== undefined) {\r\n return spPart.baseUrl;\r\n }\r\n if (RuntimeConfig.spfxContext !== undefined && RuntimeConfig.spfxContext !== null) {\r\n return RuntimeConfig.spfxContext.pageContext.web.absoluteUrl;\r\n }\r\n return null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRuntimeConfigImpl.prototype, \"fetchClientFactory\", {\r\n get: function () {\r\n var spPart = RuntimeConfig.get(\"sp\");\r\n if (spPart !== undefined && spPart.fetchClientFactory !== undefined) {\r\n return spPart.fetchClientFactory;\r\n }\r\n else {\r\n return function () { return new FetchClient(); };\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return SPRuntimeConfigImpl;\r\n}());\r\nexport { SPRuntimeConfigImpl };\r\nexport var SPRuntimeConfig = new SPRuntimeConfigImpl();\r\n//# sourceMappingURL=splibconfig.js.map","import { combine, isUrlAbsolute, hOP } from \"@pnp/common\";\r\nimport { SPRuntimeConfig } from \"../config/splibconfig\";\r\n/**\r\n * Ensures that a given url is absolute for the current web based on context\r\n *\r\n * @param candidateUrl The url to make absolute\r\n *\r\n */\r\nexport function toAbsoluteUrl(candidateUrl) {\r\n return new Promise(function (resolve) {\r\n if (isUrlAbsolute(candidateUrl)) {\r\n // if we are already absolute, then just return the url\r\n return resolve(candidateUrl);\r\n }\r\n if (SPRuntimeConfig.baseUrl !== null) {\r\n // base url specified either with baseUrl of spfxContext config property\r\n return resolve(combine(SPRuntimeConfig.baseUrl, candidateUrl));\r\n }\r\n if (global._spPageContextInfo !== undefined) {\r\n // operating in classic pages\r\n if (hOP(global._spPageContextInfo, \"webAbsoluteUrl\")) {\r\n return resolve(combine(global._spPageContextInfo.webAbsoluteUrl, candidateUrl));\r\n }\r\n else if (hOP(global._spPageContextInfo, \"webServerRelativeUrl\")) {\r\n return resolve(combine(global._spPageContextInfo.webServerRelativeUrl, candidateUrl));\r\n }\r\n }\r\n // does window.location exist and have a certain path part in it?\r\n if (global.location !== undefined) {\r\n var baseUrl_1 = global.location.toString().toLowerCase();\r\n [\"/_layouts/\", \"/siteassets/\"].forEach(function (s) {\r\n var index = baseUrl_1.indexOf(s);\r\n if (index > 0) {\r\n return resolve(combine(baseUrl_1.substr(0, index), candidateUrl));\r\n }\r\n });\r\n }\r\n return resolve(candidateUrl);\r\n });\r\n}\r\n//# sourceMappingURL=toabsoluteurl.js.map","import * as tslib_1 from \"tslib\";\r\nimport { extend, objectDefinedNotNull } from \"./util\";\r\nexport function mergeHeaders(target, source) {\r\n if (source !== undefined && source !== null) {\r\n var temp = new Request(\"\", { headers: source });\r\n temp.headers.forEach(function (value, name) {\r\n target.append(name, value);\r\n });\r\n }\r\n}\r\nexport function mergeOptions(target, source) {\r\n if (objectDefinedNotNull(source)) {\r\n var headers = extend(target.headers || {}, source.headers);\r\n target = extend(target, source);\r\n target.headers = headers;\r\n }\r\n}\r\n/**\r\n * Makes requests using the global/window fetch API\r\n */\r\nvar FetchClient = /** @class */ (function () {\r\n function FetchClient() {\r\n }\r\n FetchClient.prototype.fetch = function (url, options) {\r\n return global.fetch(url, options);\r\n };\r\n return FetchClient;\r\n}());\r\nexport { FetchClient };\r\n/**\r\n * Makes requests using the fetch API adding the supplied token to the Authorization header\r\n */\r\nvar BearerTokenFetchClient = /** @class */ (function (_super) {\r\n tslib_1.__extends(BearerTokenFetchClient, _super);\r\n function BearerTokenFetchClient(_token) {\r\n var _this = _super.call(this) || this;\r\n _this._token = _token;\r\n return _this;\r\n }\r\n Object.defineProperty(BearerTokenFetchClient.prototype, \"token\", {\r\n get: function () {\r\n return this._token || \"\";\r\n },\r\n set: function (token) {\r\n this._token = token;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n BearerTokenFetchClient.prototype.fetch = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var headers = new Headers();\r\n mergeHeaders(headers, options.headers);\r\n headers.set(\"Authorization\", \"Bearer \" + this._token);\r\n options.headers = headers;\r\n return _super.prototype.fetch.call(this, url, options);\r\n };\r\n return BearerTokenFetchClient;\r\n}(FetchClient));\r\nexport { BearerTokenFetchClient };\r\n//# sourceMappingURL=netutil.js.map","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/*! adal-angular v1.0.17 2018-02-27 */\r\nvar AuthenticationContext=function(){\"use strict\";return AuthenticationContext=function(a){if(this.REQUEST_TYPE={LOGIN:\"LOGIN\",RENEW_TOKEN:\"RENEW_TOKEN\",UNKNOWN:\"UNKNOWN\"},this.RESPONSE_TYPE={ID_TOKEN_TOKEN:\"id_token token\",TOKEN:\"token\"},this.CONSTANTS={ACCESS_TOKEN:\"access_token\",EXPIRES_IN:\"expires_in\",ID_TOKEN:\"id_token\",ERROR_DESCRIPTION:\"error_description\",SESSION_STATE:\"session_state\",ERROR:\"error\",STORAGE:{TOKEN_KEYS:\"adal.token.keys\",ACCESS_TOKEN_KEY:\"adal.access.token.key\",EXPIRATION_KEY:\"adal.expiration.key\",STATE_LOGIN:\"adal.state.login\",STATE_RENEW:\"adal.state.renew\",NONCE_IDTOKEN:\"adal.nonce.idtoken\",SESSION_STATE:\"adal.session.state\",USERNAME:\"adal.username\",IDTOKEN:\"adal.idtoken\",ERROR:\"adal.error\",ERROR_DESCRIPTION:\"adal.error.description\",LOGIN_REQUEST:\"adal.login.request\",LOGIN_ERROR:\"adal.login.error\",RENEW_STATUS:\"adal.token.renew.status\",ANGULAR_LOGIN_REQUEST:\"adal.angular.login.request\"},RESOURCE_DELIMETER:\"|\",CACHE_DELIMETER:\"||\",LOADFRAME_TIMEOUT:6e3,TOKEN_RENEW_STATUS_CANCELED:\"Canceled\",TOKEN_RENEW_STATUS_COMPLETED:\"Completed\",TOKEN_RENEW_STATUS_IN_PROGRESS:\"In Progress\",LOGGING_LEVEL:{ERROR:0,WARN:1,INFO:2,VERBOSE:3},LEVEL_STRING_MAP:{0:\"ERROR:\",1:\"WARNING:\",2:\"INFO:\",3:\"VERBOSE:\"},POPUP_WIDTH:483,POPUP_HEIGHT:600},AuthenticationContext.prototype._singletonInstance)return AuthenticationContext.prototype._singletonInstance;if(AuthenticationContext.prototype._singletonInstance=this,this.instance=\"https://login.microsoftonline.com/\",this.config={},this.callback=null,this.popUp=!1,this.isAngular=!1,this._user=null,this._activeRenewals={},this._loginInProgress=!1,this._acquireTokenInProgress=!1,this._renewStates=[],this._callBackMappedToRenewStates={},this._callBacksMappedToRenewStates={},this._openedWindows=[],this._requestType=this.REQUEST_TYPE.LOGIN,window._adalInstance=this,a.displayCall&&\"function\"!=typeof a.displayCall)throw new Error(\"displayCall is not a function\");if(!a.clientId)throw new Error(\"clientId is required\");this.config=this._cloneConfig(a),void 0===this.config.navigateToLoginRequestUrl&&(this.config.navigateToLoginRequestUrl=!0),this.config.popUp&&(this.popUp=!0),this.config.callback&&\"function\"==typeof this.config.callback&&(this.callback=this.config.callback),this.config.instance&&(this.instance=this.config.instance),this.config.loginResource||(this.config.loginResource=this.config.clientId),this.config.redirectUri||(this.config.redirectUri=window.location.href.split(\"?\")[0].split(\"#\")[0]),this.config.postLogoutRedirectUri||(this.config.postLogoutRedirectUri=window.location.href.split(\"?\")[0].split(\"#\")[0]),this.config.anonymousEndpoints||(this.config.anonymousEndpoints=[]),this.config.isAngular&&(this.isAngular=this.config.isAngular),this.config.loadFrameTimeout&&(this.CONSTANTS.LOADFRAME_TIMEOUT=this.config.loadFrameTimeout)},\"undefined\"!=typeof window&&(window.Logging={piiLoggingEnabled:!1,level:0,log:function(a){}}),AuthenticationContext.prototype.login=function(){if(this._loginInProgress)return void this.info(\"Login in progress\");this._loginInProgress=!0;var a=this._guid();this.config.state=a,this._idTokenNonce=this._guid();var b=this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);b&&\"\"!==b?this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST,\"\"):b=window.location.href,this.verbose(\"Expected state: \"+a+\" startPage:\"+b),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST,b),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,\"\"),this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,a,!0),this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN,this._idTokenNonce,!0),this._saveItem(this.CONSTANTS.STORAGE.ERROR,\"\"),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,\"\");var c=this._getNavigateUrl(\"id_token\",null)+\"&nonce=\"+encodeURIComponent(this._idTokenNonce);this.config.displayCall?this.config.displayCall(c):this.popUp?(this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN,\"\"),this._renewStates.push(a),this.registerCallback(a,this.config.clientId,this.callback),this._loginPopup(c)):this.promptUser(c)},AuthenticationContext.prototype._openPopup=function(a,b,c,d){try{var e=window.screenLeft?window.screenLeft:window.screenX,f=window.screenTop?window.screenTop:window.screenY,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,i=g/2-c/2+e,j=h/2-d/2+f,k=window.open(a,b,\"width=\"+c+\", height=\"+d+\", top=\"+j+\", left=\"+i);return k.focus&&k.focus(),k}catch(a){return this.warn(\"Error opening popup, \"+a.message),this._loginInProgress=!1,this._acquireTokenInProgress=!1,null}},AuthenticationContext.prototype._handlePopupError=function(a,b,c,d,e){this.warn(d),this._saveItem(this.CONSTANTS.STORAGE.ERROR,c),this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION,d),this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR,e),b&&this._activeRenewals[b]&&(this._activeRenewals[b]=null),this._loginInProgress=!1,this._acquireTokenInProgress=!1,a&&a(d,null,c)},AuthenticationContext.prototype._loginPopup=function(a,b,c){var d=this._openPopup(a,\"login\",this.CONSTANTS.POPUP_WIDTH,this.CONSTANTS.POPUP_HEIGHT),e=c||this.callback;if(null==d){var f=\"Popup Window is null. This can happen if you are using IE\";return void this._handlePopupError(e,b,\"Error opening popup\",f,f)}if(this._openedWindows.push(d),-1!=this.config.redirectUri.indexOf(\"#\"))var g=this.config.redirectUri.split(\"#\")[0];else var g=this.config.redirectUri;var h=this,i=window.setInterval(function(){if(!d||d.closed||void 0===d.closed){var a=\"Popup Window closed\",c=\"Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge\";return h.isAngular&&h._broadcast(\"adal:popUpClosed\",c+h.CONSTANTS.RESOURCE_DELIMETER+a),h._handlePopupError(e,b,a,c,c),void window.clearInterval(i)}try{var f=d.location;if(-1!=encodeURI(f.href).indexOf(encodeURI(g)))return h.isAngular?h._broadcast(\"adal:popUpHashChanged\",f.hash):h.handleWindowCallback(f.hash),window.clearInterval(i),h._loginInProgress=!1,h._acquireTokenInProgress=!1,h.info(\"Closing popup window\"),h._openedWindows=[],void d.close()}catch(a){}},1)},AuthenticationContext.prototype._broadcast=function(a,b){!function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent(\"CustomEvent\");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}if(\"function\"==typeof window.CustomEvent)return!1;a.prototype=window.Event.prototype,window.CustomEvent=a}();var c=new CustomEvent(a,{detail:b});window.dispatchEvent(c)},AuthenticationContext.prototype.loginInProgress=function(){return this._loginInProgress},AuthenticationContext.prototype._hasResource=function(a){var b=this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);return b&&!this._isEmpty(b)&&b.indexOf(a+this.CONSTANTS.RESOURCE_DELIMETER)>-1},AuthenticationContext.prototype.getCachedToken=function(a){if(!this._hasResource(a))return null;var b=this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+a),c=this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+a),d=this.config.expireOffsetSeconds||300;return c&&c>this._now()+d?b:(this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY+a,\"\"),this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY+a,0),null)},AuthenticationContext.prototype.getCachedUser=function(){if(this._user)return this._user;var a=this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);return this._user=this._createUser(a),this._user},AuthenticationContext.prototype.registerCallback=function(a,b,c){this._activeRenewals[b]=a,this._callBacksMappedToRenewStates[a]||(this._callBacksMappedToRenewStates[a]=[]);var d=this;this._callBacksMappedToRenewStates[a].push(c),this._callBackMappedToRenewStates[a]||(this._callBackMappedToRenewStates[a]=function(c,e,f,g){d._activeRenewals[b]=null;for(var h=0;h-1)){var b=this._user.profile.upn.split(\"@\");a+=\"&domain_hint=\"+encodeURIComponent(b[b.length-1])}return a},AuthenticationContext.prototype._createUser=function(a){var b=null,c=this._extractIdToken(a);return c&&c.hasOwnProperty(\"aud\")&&(c.aud.toLowerCase()===this.config.clientId.toLowerCase()?(b={userName:\"\",profile:c},c.hasOwnProperty(\"upn\")?b.userName=c.upn:c.hasOwnProperty(\"email\")&&(b.userName=c.email)):this.warn(\"IdToken has invalid aud field\")),b},AuthenticationContext.prototype._getHash=function(a){return a.indexOf(\"#/\")>-1?a=a.substring(a.indexOf(\"#/\")+2):a.indexOf(\"#\")>-1&&(a=a.substring(1)),a},AuthenticationContext.prototype.isCallback=function(a){a=this._getHash(a);var b=this._deserialize(a);return b.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||b.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||b.hasOwnProperty(this.CONSTANTS.ID_TOKEN)},AuthenticationContext.prototype.getLoginError=function(){return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)},AuthenticationContext.prototype.getRequestInfo=function(a){a=this._getHash(a);var b=this._deserialize(a),c={valid:!1,parameters:{},stateMatch:!1,stateResponse:\"\",requestType:this.REQUEST_TYPE.UNKNOWN};if(b&&(c.parameters=b,b.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION)||b.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN)||b.hasOwnProperty(this.CONSTANTS.ID_TOKEN))){c.valid=!0;var d=\"\";if(!b.hasOwnProperty(\"state\"))return this.warn(\"No state returned\"),c;if(this.verbose(\"State: \"+b.state),d=b.state,c.stateResponse=d,this._matchState(c))return c;if(!c.stateMatch&&window.parent){c.requestType=this._requestType;for(var e=this._renewStates,f=0;f-1&&b+1-1)return null;if(this.config&&this.config.endpoints)for(var c in this.config.endpoints)if(a.indexOf(c)>-1)return this.config.endpoints[c];return a.indexOf(\"http://\")>-1||a.indexOf(\"https://\")>-1?this._getHostFromUri(a)===this._getHostFromUri(this.config.redirectUri)?this.config.loginResource:null:this.config.loginResource},AuthenticationContext.prototype._getHostFromUri=function(a){var b=String(a).replace(/^(https?:)\\/\\//,\"\");return b=b.split(\"/\")[0]},AuthenticationContext.prototype.handleWindowCallback=function(a){if(null==a&&(a=window.location.hash),this.isCallback(a)){var b=null,c=!1;this._openedWindows.length>0&&this._openedWindows[this._openedWindows.length-1].opener&&this._openedWindows[this._openedWindows.length-1].opener._adalInstance?(b=this._openedWindows[this._openedWindows.length-1].opener._adalInstance,c=!0):window.parent&&window.parent._adalInstance&&(b=window.parent._adalInstance);var d,e,f=b.getRequestInfo(a),g=null;e=c||window.parent!==window?b._callBackMappedToRenewStates[f.stateResponse]:b.callback,b.info(\"Returned from redirect url\"),b.saveTokenFromHash(f),f.requestType===this.REQUEST_TYPE.RENEW_TOKEN&&window.parent?(window.parent!==window?b.verbose(\"Window is in iframe, acquiring token silently\"):b.verbose(\"acquiring token interactive in progress\"),d=f.parameters[b.CONSTANTS.ACCESS_TOKEN]||f.parameters[b.CONSTANTS.ID_TOKEN],g=b.CONSTANTS.ACCESS_TOKEN):f.requestType===this.REQUEST_TYPE.LOGIN&&(d=f.parameters[b.CONSTANTS.ID_TOKEN],g=b.CONSTANTS.ID_TOKEN);var h=f.parameters[b.CONSTANTS.ERROR_DESCRIPTION],i=f.parameters[b.CONSTANTS.ERROR];try{e&&e(h,d,i,g)}catch(a){b.error(\"Error occurred in user defined callback function: \"+a)}window.parent!==window||c||(b.config.navigateToLoginRequestUrl?window.location.href=b._getItem(b.CONSTANTS.STORAGE.LOGIN_REQUEST):window.location.hash=\"\")}},AuthenticationContext.prototype._getNavigateUrl=function(a,b){var c=\"common\";this.config.tenant&&(c=this.config.tenant);var d=this.instance+c+\"/oauth2/authorize\"+this._serialize(a,this.config,b)+this._addLibMetadata();return this.info(\"Navigate url:\"+d),d},AuthenticationContext.prototype._extractIdToken=function(a){var b=this._decodeJwt(a);if(!b)return null;try{var c=b.JWSPayload,d=this._base64DecodeStringUrlSafe(c);return d?JSON.parse(d):(this.info(\"The returned id_token could not be base64 url safe decoded.\"),null)}catch(a){this.error(\"The returned id_token could not be decoded\",a)}return null},AuthenticationContext.prototype._base64DecodeStringUrlSafe=function(a){return a=a.replace(/-/g,\"+\").replace(/_/g,\"/\"),window.atob?decodeURIComponent(escape(window.atob(a))):decodeURIComponent(escape(this._decode(a)))},AuthenticationContext.prototype._decode=function(a){var b=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";a=String(a).replace(/=+$/,\"\");var c=a.length;if(c%4==1)throw new Error(\"The token to be decoded is not correctly encoded.\");for(var d,e,f,g,h,i,j,k,l=\"\",m=0;m>16&255,j=h>>8&255,l+=String.fromCharCode(i,j);break}if(m+1===c-1){h=d<<18|e<<12,i=h>>16&255,l+=String.fromCharCode(i);break}h=d<<18|e<<12|f<<6|g,i=h>>16&255,j=h>>8&255,k=255&h,l+=String.fromCharCode(i,j,k)}return l},AuthenticationContext.prototype._decodeJwt=function(a){if(this._isEmpty(a))return null;var b=/^([^\\.\\s]*)\\.([^\\.\\s]+)\\.([^\\.\\s]*)$/,c=b.exec(a);return!c||c.length<4?(this.warn(\"The returned id_token is not parseable.\"),null):{header:c[1],JWSPayload:c[2],JWSSig:c[3]}},AuthenticationContext.prototype._convertUrlSafeToRegularBase64EncodedString=function(a){return a.replace(\"-\",\"+\").replace(\"_\",\"/\")},AuthenticationContext.prototype._serialize=function(a,b,c){var d=[];if(null!==b){d.push(\"?response_type=\"+a),d.push(\"client_id=\"+encodeURIComponent(b.clientId)),c&&d.push(\"resource=\"+encodeURIComponent(c)),d.push(\"redirect_uri=\"+encodeURIComponent(b.redirectUri)),d.push(\"state=\"+encodeURIComponent(b.state)),b.hasOwnProperty(\"slice\")&&d.push(\"slice=\"+encodeURIComponent(b.slice)),b.hasOwnProperty(\"extraQueryParameter\")&&d.push(b.extraQueryParameter);var e=b.correlationId?b.correlationId:this._guid();d.push(\"client-request-id=\"+encodeURIComponent(e))}return d.join(\"&\")},AuthenticationContext.prototype._deserialize=function(a){var b,c=/\\+/g,d=/([^&=]+)=([^&]*)/g,e=function(a){return decodeURIComponent(a.replace(c,\" \"))},f={};for(b=d.exec(a);b;)f[e(b[1])]=e(b[2]),b=d.exec(a);return f},AuthenticationContext.prototype._decimalToHex=function(a){for(var b=a.toString(16);b.length<2;)b=\"0\"+b;return b},AuthenticationContext.prototype._guid=function(){var a=window.crypto||window.msCrypto;if(a&&a.getRandomValues){var b=new Uint8Array(16);return a.getRandomValues(b),b[6]|=64,b[6]&=79,b[8]|=128,b[8]&=191,this._decimalToHex(b[0])+this._decimalToHex(b[1])+this._decimalToHex(b[2])+this._decimalToHex(b[3])+\"-\"+this._decimalToHex(b[4])+this._decimalToHex(b[5])+\"-\"+this._decimalToHex(b[6])+this._decimalToHex(b[7])+\"-\"+this._decimalToHex(b[8])+this._decimalToHex(b[9])+\"-\"+this._decimalToHex(b[10])+this._decimalToHex(b[11])+this._decimalToHex(b[12])+this._decimalToHex(b[13])+this._decimalToHex(b[14])+this._decimalToHex(b[15])}for(var c=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\",d=\"0123456789abcdef\",e=0,f=\"\",g=0;g<36;g++)\"-\"!==c[g]&&\"4\"!==c[g]&&(e=16*Math.random()|0),\"x\"===c[g]?f+=d[e]:\"y\"===c[g]?(e&=3,e|=8,f+=d[e]):f+=c[g];return f},AuthenticationContext.prototype._expiresIn=function(a){return a||(a=3599),this._now()+parseInt(a,10)},AuthenticationContext.prototype._now=function(){return Math.round((new Date).getTime()/1e3)},AuthenticationContext.prototype._addAdalFrame=function(a){if(void 0!==a){this.info(\"Add adal frame to document:\"+a);var b=document.getElementById(a);if(!b){if(document.createElement&&document.documentElement&&(window.opera||-1===window.navigator.userAgent.indexOf(\"MSIE 5.0\"))){var c=document.createElement(\"iframe\");c.setAttribute(\"id\",a),c.setAttribute(\"aria-hidden\",\"true\"),c.style.visibility=\"hidden\",c.style.position=\"absolute\",c.style.width=c.style.height=c.borderWidth=\"0px\",b=document.getElementsByTagName(\"body\")[0].appendChild(c)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML(\"beforeEnd\",'');window.frames&&window.frames[a]&&(b=window.frames[a])}return b}},AuthenticationContext.prototype._saveItem=function(a,b,c){if(this.config&&this.config.cacheLocation&&\"localStorage\"===this.config.cacheLocation){if(!this._supportsLocalStorage())return this.info(\"Local storage is not supported\"),!1;if(c){var d=this._getItem(a)||\"\";localStorage.setItem(a,d+b+this.CONSTANTS.CACHE_DELIMETER)}else localStorage.setItem(a,b);return!0}return this._supportsSessionStorage()?(sessionStorage.setItem(a,b),!0):(this.info(\"Session storage is not supported\"),!1)},AuthenticationContext.prototype._getItem=function(a){return this.config&&this.config.cacheLocation&&\"localStorage\"===this.config.cacheLocation?this._supportsLocalStorage()?localStorage.getItem(a):(this.info(\"Local storage is not supported\"),null):this._supportsSessionStorage()?sessionStorage.getItem(a):(this.info(\"Session storage is not supported\"),null)},AuthenticationContext.prototype._supportsLocalStorage=function(){try{return!!window.localStorage&&(window.localStorage.setItem(\"storageTest\",\"A\"),\"A\"==window.localStorage.getItem(\"storageTest\")&&(window.localStorage.removeItem(\"storageTest\"),!window.localStorage.getItem(\"storageTest\")))}catch(a){return!1}},AuthenticationContext.prototype._supportsSessionStorage=function(){try{return!!window.sessionStorage&&(window.sessionStorage.setItem(\"storageTest\",\"A\"),\"A\"==window.sessionStorage.getItem(\"storageTest\")&&(window.sessionStorage.removeItem(\"storageTest\"),!window.sessionStorage.getItem(\"storageTest\")))}catch(a){return!1}},AuthenticationContext.prototype._cloneConfig=function(a){if(null===a||\"object\"!=typeof a)return a;var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},AuthenticationContext.prototype._addLibMetadata=function(){return\"&x-client-SKU=Js&x-client-Ver=\"+this._libVersion()},AuthenticationContext.prototype.log=function(a,b,c,d){if(a<=Logging.level){if(!Logging.piiLoggingEnabled&&d)return;var e=(new Date).toUTCString(),f=\"\";f=this.config.correlationId?e+\":\"+this.config.correlationId+\"-\"+this._libVersion()+\"-\"+this.CONSTANTS.LEVEL_STRING_MAP[a]+\" \"+b:e+\":\"+this._libVersion()+\"-\"+this.CONSTANTS.LEVEL_STRING_MAP[a]+\" \"+b,c&&(f+=\"\\nstack:\\n\"+c.stack),Logging.log(f)}},AuthenticationContext.prototype.error=function(a,b){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,a,b)},AuthenticationContext.prototype.warn=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,a,null)},AuthenticationContext.prototype.info=function(a){\r\nthis.log(this.CONSTANTS.LOGGING_LEVEL.INFO,a,null)},AuthenticationContext.prototype.verbose=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,a,null)},AuthenticationContext.prototype.errorPii=function(a,b){this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR,a,b,!0)},AuthenticationContext.prototype.warnPii=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.WARN,a,null,!0)},AuthenticationContext.prototype.infoPii=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.INFO,a,null,!0)},AuthenticationContext.prototype.verbosePii=function(a){this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE,a,null,!0)},AuthenticationContext.prototype._libVersion=function(){return\"1.0.17\"},\"undefined\"!=typeof module&&module.exports&&(module.exports=AuthenticationContext,module.exports.inject=function(a){return new AuthenticationContext(a)}),AuthenticationContext}();","/**\r\n * Class used to subscribe ILogListener and log messages throughout an application\r\n *\r\n */\r\nvar Logger = /** @class */ (function () {\r\n function Logger() {\r\n }\r\n Object.defineProperty(Logger, \"activeLogLevel\", {\r\n /**\r\n * Gets or sets the active log level to apply for log filtering\r\n */\r\n get: function () {\r\n return Logger.instance.activeLogLevel;\r\n },\r\n set: function (value) {\r\n Logger.instance.activeLogLevel = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Logger, \"instance\", {\r\n get: function () {\r\n if (Logger._instance === undefined || Logger._instance === null) {\r\n Logger._instance = new LoggerImpl();\r\n }\r\n return Logger._instance;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds ILogListener instances to the set of subscribed listeners\r\n *\r\n * @param listeners One or more listeners to subscribe to this log\r\n */\r\n Logger.subscribe = function () {\r\n var listeners = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n listeners[_i] = arguments[_i];\r\n }\r\n listeners.map(function (listener) { return Logger.instance.subscribe(listener); });\r\n };\r\n /**\r\n * Clears the subscribers collection, returning the collection before modifiction\r\n */\r\n Logger.clearSubscribers = function () {\r\n return Logger.instance.clearSubscribers();\r\n };\r\n Object.defineProperty(Logger, \"count\", {\r\n /**\r\n * Gets the current subscriber count\r\n */\r\n get: function () {\r\n return Logger.instance.count;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Writes the supplied string to the subscribed listeners\r\n *\r\n * @param message The message to write\r\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)\r\n */\r\n Logger.write = function (message, level) {\r\n if (level === void 0) { level = 1 /* Info */; }\r\n Logger.instance.log({ level: level, message: message });\r\n };\r\n /**\r\n * Writes the supplied string to the subscribed listeners\r\n *\r\n * @param json The json object to stringify and write\r\n * @param level [Optional] if supplied will be used as the level of the entry (Default: LogLevel.Info)\r\n */\r\n Logger.writeJSON = function (json, level) {\r\n if (level === void 0) { level = 1 /* Info */; }\r\n this.write(JSON.stringify(json), level);\r\n };\r\n /**\r\n * Logs the supplied entry to the subscribed listeners\r\n *\r\n * @param entry The message to log\r\n */\r\n Logger.log = function (entry) {\r\n Logger.instance.log(entry);\r\n };\r\n /**\r\n * Logs an error object to the subscribed listeners\r\n *\r\n * @param err The error object\r\n */\r\n Logger.error = function (err) {\r\n Logger.instance.log({ data: err, level: 3 /* Error */, message: err.message });\r\n };\r\n return Logger;\r\n}());\r\nexport { Logger };\r\nvar LoggerImpl = /** @class */ (function () {\r\n function LoggerImpl(activeLogLevel, subscribers) {\r\n if (activeLogLevel === void 0) { activeLogLevel = 2 /* Warning */; }\r\n if (subscribers === void 0) { subscribers = []; }\r\n this.activeLogLevel = activeLogLevel;\r\n this.subscribers = subscribers;\r\n }\r\n LoggerImpl.prototype.subscribe = function (listener) {\r\n this.subscribers.push(listener);\r\n };\r\n LoggerImpl.prototype.clearSubscribers = function () {\r\n var s = this.subscribers.slice(0);\r\n this.subscribers.length = 0;\r\n return s;\r\n };\r\n Object.defineProperty(LoggerImpl.prototype, \"count\", {\r\n get: function () {\r\n return this.subscribers.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LoggerImpl.prototype.write = function (message, level) {\r\n if (level === void 0) { level = 1 /* Info */; }\r\n this.log({ level: level, message: message });\r\n };\r\n LoggerImpl.prototype.log = function (entry) {\r\n if (entry !== undefined && this.activeLogLevel <= entry.level) {\r\n this.subscribers.map(function (subscriber) { return subscriber.log(entry); });\r\n }\r\n };\r\n return LoggerImpl;\r\n}());\r\n//# sourceMappingURL=logger.js.map","/**\r\n * A set of logging levels\r\n */\r\nexport var LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"Verbose\"] = 0] = \"Verbose\";\r\n LogLevel[LogLevel[\"Info\"] = 1] = \"Info\";\r\n LogLevel[LogLevel[\"Warning\"] = 2] = \"Warning\";\r\n LogLevel[LogLevel[\"Error\"] = 3] = \"Error\";\r\n LogLevel[LogLevel[\"Off\"] = 99] = \"Off\";\r\n})(LogLevel || (LogLevel = {}));\r\n//# sourceMappingURL=loglevel.js.map","/**\r\n * Implementation of LogListener which logs to the console\r\n *\r\n */\r\nvar ConsoleListener = /** @class */ (function () {\r\n function ConsoleListener() {\r\n }\r\n /**\r\n * Any associated data that a given logging listener may choose to log or ignore\r\n *\r\n * @param entry The information to be logged\r\n */\r\n ConsoleListener.prototype.log = function (entry) {\r\n var msg = this.format(entry);\r\n switch (entry.level) {\r\n case 0 /* Verbose */:\r\n case 1 /* Info */:\r\n console.log(msg);\r\n break;\r\n case 2 /* Warning */:\r\n console.warn(msg);\r\n break;\r\n case 3 /* Error */:\r\n console.error(msg);\r\n break;\r\n }\r\n };\r\n /**\r\n * Formats the message\r\n *\r\n * @param entry The information to format into a string\r\n */\r\n ConsoleListener.prototype.format = function (entry) {\r\n var msg = [];\r\n msg.push(\"Message: \" + entry.message);\r\n if (entry.data !== undefined) {\r\n try {\r\n msg.push(\" Data: \" + JSON.stringify(entry.data));\r\n }\r\n catch (e) {\r\n msg.push(\" Data: Error in stringify of supplied data \" + e);\r\n }\r\n }\r\n return msg.join(\"\");\r\n };\r\n return ConsoleListener;\r\n}());\r\nexport { ConsoleListener };\r\n/**\r\n * Implementation of LogListener which logs to the supplied function\r\n *\r\n */\r\nvar FunctionListener = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the FunctionListener class\r\n *\r\n * @constructor\r\n * @param method The method to which any logging data will be passed\r\n */\r\n function FunctionListener(method) {\r\n this.method = method;\r\n }\r\n /**\r\n * Any associated data that a given logging listener may choose to log or ignore\r\n *\r\n * @param entry The information to be logged\r\n */\r\n FunctionListener.prototype.log = function (entry) {\r\n this.method(entry);\r\n };\r\n return FunctionListener;\r\n}());\r\nexport { FunctionListener };\r\n//# sourceMappingURL=listeners.js.map","import { mergeMaps, objectToMap, jsS } from \"@pnp/common\";\r\n/**\r\n * Class used to manage the current application settings\r\n *\r\n */\r\nvar Settings = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the settings class\r\n *\r\n * @constructor\r\n */\r\n function Settings(_settings) {\r\n if (_settings === void 0) { _settings = new Map(); }\r\n this._settings = _settings;\r\n }\r\n /**\r\n * Adds a new single setting, or overwrites a previous setting with the same key\r\n *\r\n * @param {string} key The key used to store this setting\r\n * @param {string} value The setting value to store\r\n */\r\n Settings.prototype.add = function (key, value) {\r\n this._settings.set(key, value);\r\n };\r\n /**\r\n * Adds a JSON value to the collection as a string, you must use getJSON to rehydrate the object when read\r\n *\r\n * @param {string} key The key used to store this setting\r\n * @param {any} value The setting value to store\r\n */\r\n Settings.prototype.addJSON = function (key, value) {\r\n this._settings.set(key, jsS(value));\r\n };\r\n /**\r\n * Applies the supplied hash to the setting collection overwriting any existing value, or created new values\r\n *\r\n * @param {TypedHash} hash The set of values to add\r\n */\r\n Settings.prototype.apply = function (hash) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n try {\r\n _this._settings = mergeMaps(_this._settings, objectToMap(hash));\r\n resolve();\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n });\r\n };\r\n /**\r\n * Loads configuration settings into the collection from the supplied provider and returns a Promise\r\n *\r\n * @param {IConfigurationProvider} provider The provider from which we will load the settings\r\n */\r\n Settings.prototype.load = function (provider) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n provider.getConfiguration().then(function (value) {\r\n _this._settings = mergeMaps(_this._settings, objectToMap(value));\r\n resolve();\r\n }).catch(reject);\r\n });\r\n };\r\n /**\r\n * Gets a value from the configuration\r\n *\r\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\r\n * @return {string} string value from the configuration\r\n */\r\n Settings.prototype.get = function (key) {\r\n return this._settings.get(key) || null;\r\n };\r\n /**\r\n * Gets a JSON value, rehydrating the stored string to the original object\r\n *\r\n * @param {string} key The key whose value we want to return. Returns null if the key does not exist\r\n * @return {any} object from the configuration\r\n */\r\n Settings.prototype.getJSON = function (key) {\r\n var o = this.get(key);\r\n if (o === undefined || o === null) {\r\n return o;\r\n }\r\n return JSON.parse(o);\r\n };\r\n return Settings;\r\n}());\r\nexport { Settings };\r\n//# sourceMappingURL=configuration.js.map","import { PnPClientStorage } from \"@pnp/common\";\r\n/**\r\n * A caching provider which can wrap other non-caching providers\r\n *\r\n */\r\nvar CachingConfigurationProvider = /** @class */ (function () {\r\n /**\r\n * Creates a new caching configuration provider\r\n * @constructor\r\n * @param {IConfigurationProvider} wrappedProvider Provider which will be used to fetch the configuration\r\n * @param {string} cacheKey Key that will be used to store cached items to the cache\r\n * @param {IPnPClientStore} cacheStore OPTIONAL storage, which will be used to store cached settings.\r\n */\r\n function CachingConfigurationProvider(wrappedProvider, cacheKey, cacheStore) {\r\n this.wrappedProvider = wrappedProvider;\r\n this.cacheKey = cacheKey;\r\n this.wrappedProvider = wrappedProvider;\r\n this.store = (cacheStore) ? cacheStore : this.selectPnPCache();\r\n }\r\n /**\r\n * Gets the wrapped configuration providers\r\n *\r\n * @return {IConfigurationProvider} Wrapped configuration provider\r\n */\r\n CachingConfigurationProvider.prototype.getWrappedProvider = function () {\r\n return this.wrappedProvider;\r\n };\r\n /**\r\n * Loads the configuration values either from the cache or from the wrapped provider\r\n *\r\n * @return {Promise>} Promise of loaded configuration values\r\n */\r\n CachingConfigurationProvider.prototype.getConfiguration = function () {\r\n var _this = this;\r\n // Cache not available, pass control to the wrapped provider\r\n if ((!this.store) || (!this.store.enabled)) {\r\n return this.wrappedProvider.getConfiguration();\r\n }\r\n return this.store.getOrPut(this.cacheKey, function () {\r\n return _this.wrappedProvider.getConfiguration().then(function (providedConfig) {\r\n _this.store.put(_this.cacheKey, providedConfig);\r\n return providedConfig;\r\n });\r\n });\r\n };\r\n CachingConfigurationProvider.prototype.selectPnPCache = function () {\r\n var pnpCache = new PnPClientStorage();\r\n if ((pnpCache.local) && (pnpCache.local.enabled)) {\r\n return pnpCache.local;\r\n }\r\n if ((pnpCache.session) && (pnpCache.session.enabled)) {\r\n return pnpCache.session;\r\n }\r\n throw Error(\"Cannot create a caching configuration provider since cache is not available.\");\r\n };\r\n return CachingConfigurationProvider;\r\n}());\r\nexport default CachingConfigurationProvider;\r\n//# sourceMappingURL=cachingConfigurationProvider.js.map","import { default as CachingConfigurationProvider } from \"./cachingConfigurationProvider\";\r\n/**\r\n * A configuration provider which loads configuration values from a SharePoint list\r\n *\r\n */\r\nvar SPListConfigurationProvider = /** @class */ (function () {\r\n /**\r\n * Creates a new SharePoint list based configuration provider\r\n * @constructor\r\n * @param {string} webUrl Url of the SharePoint site, where the configuration list is located\r\n * @param {string} listTitle Title of the SharePoint list, which contains the configuration settings (optional, default: \"config\")\r\n * @param {string} keyFieldName The name of the field in the list to use as the setting key (optional, default: \"Title\")\r\n * @param {string} valueFieldName The name of the field in the list to use as the setting value (optional, default: \"Value\")\r\n */\r\n function SPListConfigurationProvider(web, listTitle, keyFieldName, valueFieldName) {\r\n if (listTitle === void 0) { listTitle = \"config\"; }\r\n if (keyFieldName === void 0) { keyFieldName = \"Title\"; }\r\n if (valueFieldName === void 0) { valueFieldName = \"Value\"; }\r\n this.web = web;\r\n this.listTitle = listTitle;\r\n this.keyFieldName = keyFieldName;\r\n this.valueFieldName = valueFieldName;\r\n }\r\n /**\r\n * Loads the configuration values from the SharePoint list\r\n *\r\n * @return {Promise>} Promise of loaded configuration values\r\n */\r\n SPListConfigurationProvider.prototype.getConfiguration = function () {\r\n var _this = this;\r\n return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName, this.valueFieldName).get()\r\n .then(function (data) { return data.reduce(function (c, item) {\r\n c[item[_this.keyFieldName]] = item[_this.valueFieldName];\r\n return c;\r\n }, {}); });\r\n };\r\n /**\r\n * Wraps the current provider in a cache enabled provider\r\n *\r\n * @return {CachingConfigurationProvider} Caching providers which wraps the current provider\r\n */\r\n SPListConfigurationProvider.prototype.asCaching = function (cacheKey) {\r\n if (cacheKey === void 0) { cacheKey = \"pnp_configcache_splist_\" + this.web.toUrl() + \"+\" + this.listTitle; }\r\n return new CachingConfigurationProvider(this, cacheKey);\r\n };\r\n return SPListConfigurationProvider;\r\n}());\r\nexport default SPListConfigurationProvider;\r\n//# sourceMappingURL=spListConfigurationProvider.js.map","import { RuntimeConfig, dateAdd, PnPClientStorage } from \"@pnp/common\";\r\nvar CachingOptions = /** @class */ (function () {\r\n function CachingOptions(key) {\r\n this.key = key;\r\n this.expiration = dateAdd(new Date(), \"second\", RuntimeConfig.defaultCachingTimeoutSeconds);\r\n this.storeName = RuntimeConfig.defaultCachingStore;\r\n }\r\n Object.defineProperty(CachingOptions.prototype, \"store\", {\r\n get: function () {\r\n if (this.storeName === \"local\") {\r\n return CachingOptions.storage.local;\r\n }\r\n else {\r\n return CachingOptions.storage.session;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n CachingOptions.storage = new PnPClientStorage();\r\n return CachingOptions;\r\n}());\r\nexport { CachingOptions };\r\nvar CachingParserWrapper = /** @class */ (function () {\r\n function CachingParserWrapper(parser, cacheOptions) {\r\n this.parser = parser;\r\n this.cacheOptions = cacheOptions;\r\n }\r\n CachingParserWrapper.prototype.parse = function (response) {\r\n var _this = this;\r\n return this.parser.parse(response).then(function (r) { return _this.cacheData(r); });\r\n };\r\n CachingParserWrapper.prototype.cacheData = function (data) {\r\n if (this.cacheOptions.store !== null) {\r\n this.cacheOptions.store.put(this.cacheOptions.key, data, this.cacheOptions.expiration);\r\n }\r\n return data;\r\n };\r\n return CachingParserWrapper;\r\n}());\r\nexport { CachingParserWrapper };\r\n//# sourceMappingURL=caching.js.map","import * as tslib_1 from \"tslib\";\r\nimport { isFunc, hOP } from \"@pnp/common\";\r\nvar HttpRequestError = /** @class */ (function (_super) {\r\n tslib_1.__extends(HttpRequestError, _super);\r\n function HttpRequestError(message, response, status, statusText) {\r\n if (status === void 0) { status = response.status; }\r\n if (statusText === void 0) { statusText = response.statusText; }\r\n var _this = _super.call(this, message) || this;\r\n _this.response = response;\r\n _this.status = status;\r\n _this.statusText = statusText;\r\n _this.isHttpRequestError = true;\r\n return _this;\r\n }\r\n HttpRequestError.init = function (r) {\r\n return r.clone().text().then(function (t) {\r\n return new HttpRequestError(\"Error making HttpClient request in queryable [\" + r.status + \"] \" + r.statusText + \" ::> \" + t, r.clone());\r\n });\r\n };\r\n return HttpRequestError;\r\n}(Error));\r\nexport { HttpRequestError };\r\nvar ODataParserBase = /** @class */ (function () {\r\n function ODataParserBase() {\r\n this.rawJson = {};\r\n }\r\n ODataParserBase.prototype.parse = function (r) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n if (_this.handleError(r, reject)) {\r\n _this.parseImpl(r, resolve, reject);\r\n }\r\n });\r\n };\r\n ODataParserBase.prototype.parseImpl = function (r, resolve, reject) {\r\n var _this = this;\r\n if ((r.headers.has(\"Content-Length\") && parseFloat(r.headers.get(\"Content-Length\")) === 0) || r.status === 204) {\r\n resolve({});\r\n }\r\n else {\r\n // patch to handle cases of 200 response with no or whitespace only bodies (#487 & #545)\r\n r.text()\r\n .then(function (txt) { return txt.replace(/\\s/ig, \"\").length > 0 ? JSON.parse(txt) : {}; })\r\n .then(function (json) { return resolve(_this.parseODataJSON(json)); })\r\n .catch(function (e) { return reject(e); });\r\n }\r\n };\r\n /**\r\n * Handles a response with ok === false by parsing the body and creating a ProcessHttpClientResponseException\r\n * which is passed to the reject delegate. This method returns true if there is no error, otherwise false\r\n *\r\n * @param r Current response object\r\n * @param reject reject delegate for the surrounding promise\r\n */\r\n ODataParserBase.prototype.handleError = function (r, reject) {\r\n if (!r.ok) {\r\n HttpRequestError.init(r).then(reject);\r\n }\r\n return r.ok;\r\n };\r\n /**\r\n * Normalizes the json response by removing the various nested levels\r\n *\r\n * @param json json object to parse\r\n */\r\n ODataParserBase.prototype.parseODataJSON = function (json) {\r\n this.rawJson = json;\r\n var result = json;\r\n if (hOP(json, \"d\")) {\r\n if (hOP(json.d, \"results\")) {\r\n result = json.d.results;\r\n }\r\n else {\r\n result = json.d;\r\n }\r\n }\r\n else if (hOP(json, \"value\")) {\r\n result = json.value;\r\n }\r\n return result;\r\n };\r\n return ODataParserBase;\r\n}());\r\nexport { ODataParserBase };\r\nvar ODataDefaultParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(ODataDefaultParser, _super);\r\n function ODataDefaultParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return ODataDefaultParser;\r\n}(ODataParserBase));\r\nexport { ODataDefaultParser };\r\nvar TextParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(TextParser, _super);\r\n function TextParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TextParser.prototype.parseImpl = function (r, resolve) {\r\n r.text().then(resolve);\r\n };\r\n return TextParser;\r\n}(ODataParserBase));\r\nexport { TextParser };\r\nvar BlobParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(BlobParser, _super);\r\n function BlobParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n BlobParser.prototype.parseImpl = function (r, resolve) {\r\n r.blob().then(resolve);\r\n };\r\n return BlobParser;\r\n}(ODataParserBase));\r\nexport { BlobParser };\r\nvar JSONParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(JSONParser, _super);\r\n function JSONParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n JSONParser.prototype.parseImpl = function (r, resolve) {\r\n r.json().then(resolve);\r\n };\r\n return JSONParser;\r\n}(ODataParserBase));\r\nexport { JSONParser };\r\nvar BufferParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(BufferParser, _super);\r\n function BufferParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n BufferParser.prototype.parseImpl = function (r, resolve) {\r\n if (isFunc(r.arrayBuffer)) {\r\n r.arrayBuffer().then(resolve);\r\n }\r\n else {\r\n r.buffer().then(resolve);\r\n }\r\n };\r\n return BufferParser;\r\n}(ODataParserBase));\r\nexport { BufferParser };\r\nvar LambdaParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(LambdaParser, _super);\r\n function LambdaParser(parser) {\r\n var _this = _super.call(this) || this;\r\n _this.parser = parser;\r\n return _this;\r\n }\r\n LambdaParser.prototype.parseImpl = function (r, resolve) {\r\n this.parser(r).then(resolve);\r\n };\r\n return LambdaParser;\r\n}(ODataParserBase));\r\nexport { LambdaParser };\r\n//# sourceMappingURL=parsers.js.map","import * as tslib_1 from \"tslib\";\r\nimport { extend, isFunc, hOP } from \"@pnp/common\";\r\nimport { Logger } from \"@pnp/logging\";\r\nimport { CachingOptions, CachingParserWrapper } from \"./caching\";\r\n/**\r\n * Resolves the context's result value\r\n *\r\n * @param context The current context\r\n */\r\nfunction returnResult(context) {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 0 /* Verbose */ ? context.result : {},\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Returning result from pipeline. Set logging to verbose to see data.\",\r\n });\r\n return Promise.resolve(context.result);\r\n}\r\n/**\r\n * Sets the result on the context\r\n */\r\nexport function setResult(context, value) {\r\n return new Promise(function (resolve) {\r\n context.result = value;\r\n context.hasResult = true;\r\n resolve(context);\r\n });\r\n}\r\n/**\r\n * Invokes the next method in the provided context's pipeline\r\n *\r\n * @param c The current request context\r\n */\r\nfunction next(c) {\r\n if (c.pipeline.length > 0) {\r\n return c.pipeline.shift()(c);\r\n }\r\n else {\r\n return Promise.resolve(c);\r\n }\r\n}\r\n/**\r\n * Executes the current request context's pipeline\r\n *\r\n * @param context Current context\r\n */\r\nexport function pipe(context) {\r\n if (context.pipeline.length < 1) {\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Request pipeline contains no methods!\", 2 /* Warning */);\r\n }\r\n var promise = next(context).then(function (ctx) { return returnResult(ctx); }).catch(function (e) {\r\n Logger.error(e);\r\n throw e;\r\n });\r\n if (context.isBatched) {\r\n // this will block the batch's execute method from returning until the child requets have been resolved\r\n context.batch.addResolveBatchDependency(promise);\r\n }\r\n return promise;\r\n}\r\n/**\r\n * decorator factory applied to methods in the pipeline to control behavior\r\n */\r\nexport function requestPipelineMethod(alwaysRun) {\r\n if (alwaysRun === void 0) { alwaysRun = false; }\r\n return function (target, propertyKey, descriptor) {\r\n var method = descriptor.value;\r\n descriptor.value = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // if we have a result already in the pipeline, pass it along and don't call the tagged method\r\n if (!alwaysRun && args.length > 0 && hOP(args[0], \"hasResult\") && args[0].hasResult) {\r\n Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Skipping request pipeline method \" + propertyKey + \", existing result in pipeline.\", 0 /* Verbose */);\r\n return Promise.resolve(args[0]);\r\n }\r\n // apply the tagged method\r\n Logger.write(\"[\" + args[0].requestId + \"] (\" + (new Date()).getTime() + \") Calling request pipeline method \" + propertyKey + \".\", 0 /* Verbose */);\r\n // then chain the next method in the context's pipeline - allows for dynamic pipeline\r\n return method.apply(target, args).then(function (ctx) { return next(ctx); });\r\n };\r\n };\r\n}\r\n/**\r\n * Contains the methods used within the request pipeline\r\n */\r\nvar PipelineMethods = /** @class */ (function () {\r\n function PipelineMethods() {\r\n }\r\n /**\r\n * Logs the start of the request\r\n */\r\n PipelineMethods.logStart = function (context) {\r\n return new Promise(function (resolve) {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : context,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Beginning \" + context.verb + \" request (\" + context.requestAbsoluteUrl + \")\",\r\n });\r\n resolve(context);\r\n });\r\n };\r\n /**\r\n * Handles caching of the request\r\n */\r\n PipelineMethods.caching = function (context) {\r\n return new Promise(function (resolve) {\r\n // handle caching, if applicable\r\n if (context.isCached) {\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Caching is enabled for request, checking cache...\", 1 /* Info */);\r\n var cacheOptions = new CachingOptions(context.requestAbsoluteUrl.toLowerCase());\r\n if (context.cachingOptions !== undefined) {\r\n cacheOptions = extend(cacheOptions, context.cachingOptions);\r\n }\r\n // we may not have a valid store\r\n if (cacheOptions.store !== null) {\r\n // check if we have the data in cache and if so resolve the promise and return\r\n var data = cacheOptions.store.get(cacheOptions.key);\r\n if (data !== null) {\r\n // ensure we clear any held batch dependency we are resolving from the cache\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : data,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value returned from cache.\",\r\n });\r\n if (isFunc(context.batchDependency)) {\r\n context.batchDependency();\r\n }\r\n // handle the case where a parser needs to take special actions with a cached result\r\n if (hOP(context.parser, \"hydrate\")) {\r\n data = context.parser.hydrate(data);\r\n }\r\n return setResult(context, data).then(function (ctx) { return resolve(ctx); });\r\n }\r\n }\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Value not found in cache.\", 1 /* Info */);\r\n // if we don't then wrap the supplied parser in the caching parser wrapper\r\n // and send things on their way\r\n context.parser = new CachingParserWrapper(context.parser, cacheOptions);\r\n }\r\n return resolve(context);\r\n });\r\n };\r\n /**\r\n * Sends the request\r\n */\r\n PipelineMethods.send = function (context) {\r\n return new Promise(function (resolve, reject) {\r\n // send or batch the request\r\n if (context.isBatched) {\r\n // we are in a batch, so add to batch, remove dependency, and resolve with the batch's promise\r\n var p = context.batch.add(context.requestAbsoluteUrl, context.verb, context.options, context.parser, context.requestId);\r\n // we release the dependency here to ensure the batch does not execute until the request is added to the batch\r\n if (isFunc(context.batchDependency)) {\r\n context.batchDependency();\r\n }\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Batching request in batch \" + context.batch.batchId + \".\", 1 /* Info */);\r\n // we set the result as the promise which will be resolved by the batch's execution\r\n resolve(setResult(context, p));\r\n }\r\n else {\r\n Logger.write(\"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Sending request.\", 1 /* Info */);\r\n // we are not part of a batch, so proceed as normal\r\n var client = context.clientFactory();\r\n var opts = extend(context.options || {}, { method: context.verb });\r\n client.fetch(context.requestAbsoluteUrl, opts)\r\n .then(function (response) { return context.parser.parse(response); })\r\n .then(function (result) { return setResult(context, result); })\r\n .then(function (ctx) { return resolve(ctx); })\r\n .catch(function (e) { return reject(e); });\r\n }\r\n });\r\n };\r\n /**\r\n * Logs the end of the request\r\n */\r\n PipelineMethods.logEnd = function (context) {\r\n return new Promise(function (resolve) {\r\n if (context.isBatched) {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : context,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") \" + context.verb + \" request will complete in batch \" + context.batch.batchId + \".\",\r\n });\r\n }\r\n else {\r\n Logger.log({\r\n data: Logger.activeLogLevel === 1 /* Info */ ? {} : context,\r\n level: 1 /* Info */,\r\n message: \"[\" + context.requestId + \"] (\" + (new Date()).getTime() + \") Completing \" + context.verb + \" request.\",\r\n });\r\n }\r\n resolve(context);\r\n });\r\n };\r\n tslib_1.__decorate([\r\n requestPipelineMethod(true)\r\n ], PipelineMethods, \"logStart\", null);\r\n tslib_1.__decorate([\r\n requestPipelineMethod()\r\n ], PipelineMethods, \"caching\", null);\r\n tslib_1.__decorate([\r\n requestPipelineMethod()\r\n ], PipelineMethods, \"send\", null);\r\n tslib_1.__decorate([\r\n requestPipelineMethod(true)\r\n ], PipelineMethods, \"logEnd\", null);\r\n return PipelineMethods;\r\n}());\r\nexport { PipelineMethods };\r\nexport function getDefaultPipeline() {\r\n return [\r\n PipelineMethods.logStart,\r\n PipelineMethods.caching,\r\n PipelineMethods.send,\r\n PipelineMethods.logEnd,\r\n ].slice(0);\r\n}\r\n//# sourceMappingURL=pipeline.js.map","import * as tslib_1 from \"tslib\";\r\nimport { combine, RuntimeConfig, mergeOptions, objectDefinedNotNull, isArray, } from \"@pnp/common\";\r\nimport { ODataDefaultParser, JSONParser } from \"./parsers\";\r\nimport { getDefaultPipeline, pipe, } from \"./pipeline\";\r\nvar Queryable = /** @class */ (function () {\r\n function Queryable() {\r\n this._query = new Map();\r\n this._options = {};\r\n this._url = \"\";\r\n this._parentUrl = \"\";\r\n this._useCaching = false;\r\n this._cachingOptions = null;\r\n this._cloneParentWasCaching = false;\r\n this._cloneParentCacheOptions = null;\r\n this._requestPipeline = null;\r\n }\r\n /**\r\n * Gets the currentl url\r\n *\r\n */\r\n Queryable.prototype.toUrl = function () {\r\n return this._url;\r\n };\r\n /**\r\n * Directly concatonates the supplied string to the current url, not normalizing \"/\" chars\r\n *\r\n * @param pathPart The string to concatonate to the url\r\n */\r\n Queryable.prototype.concat = function (pathPart) {\r\n this._url += pathPart;\r\n return this;\r\n };\r\n Object.defineProperty(Queryable.prototype, \"query\", {\r\n /**\r\n * Provides access to the query builder for this url\r\n *\r\n */\r\n get: function () {\r\n return this._query;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets custom options for current object and all derived objects accessible via chaining\r\n *\r\n * @param options custom options\r\n */\r\n Queryable.prototype.configure = function (options) {\r\n mergeOptions(this._options, options);\r\n return this;\r\n };\r\n /**\r\n * Configures this instance from the configure options of the supplied instance\r\n *\r\n * @param o Instance from which options should be taken\r\n */\r\n Queryable.prototype.configureFrom = function (o) {\r\n mergeOptions(this._options, o._options);\r\n return this;\r\n };\r\n /**\r\n * Enables caching for this request\r\n *\r\n * @param options Defines the options used when caching this request\r\n */\r\n Queryable.prototype.usingCaching = function (options) {\r\n if (!RuntimeConfig.globalCacheDisable) {\r\n this._useCaching = true;\r\n if (options !== undefined) {\r\n this._cachingOptions = options;\r\n }\r\n }\r\n return this;\r\n };\r\n /**\r\n * Allows you to set a request specific processing pipeline\r\n *\r\n * @param pipeline The set of methods, in order, to execute a given request\r\n */\r\n Queryable.prototype.withPipeline = function (pipeline) {\r\n this._requestPipeline = pipeline.slice(0);\r\n return this;\r\n };\r\n Queryable.prototype.getCore = function (parser, options) {\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n if (options === void 0) { options = {}; }\r\n // Fix for #304 - when we clone objects we in some cases then execute a get request\r\n // in these cases the caching settings were getting dropped from the request\r\n // this tracks if the object from which this was cloned was caching and applies that to an immediate get request\r\n // does not affect objects cloned from this as we are using different fields to track the settings so it won't\r\n // be triggered\r\n if (this._cloneParentWasCaching) {\r\n this.usingCaching(this._cloneParentCacheOptions);\r\n }\r\n return this.reqImpl(\"GET\", options, parser);\r\n };\r\n Queryable.prototype.postCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.reqImpl(\"POST\", options, parser);\r\n };\r\n Queryable.prototype.patchCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.reqImpl(\"PATCH\", options, parser);\r\n };\r\n Queryable.prototype.deleteCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.reqImpl(\"DELETE\", options, parser);\r\n };\r\n Queryable.prototype.putCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new JSONParser(); }\r\n return this.reqImpl(\"PUT\", options, parser);\r\n };\r\n Queryable.prototype.reqImpl = function (method, options, parser) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n return this.getRequestPipeline(method, options, parser)\r\n .then(function (pipeline) { return _this.toRequestContext(method, options, parser, pipeline); })\r\n .then(function (context) { return pipe(context); });\r\n };\r\n /**\r\n * Appends the given string and normalizes \"/\" chars\r\n *\r\n * @param pathPart The string to append\r\n */\r\n Queryable.prototype.append = function (pathPart) {\r\n this._url = combine(this._url, pathPart);\r\n };\r\n Object.defineProperty(Queryable.prototype, \"parentUrl\", {\r\n /**\r\n * Gets the parent url used when creating this instance\r\n *\r\n */\r\n get: function () {\r\n return this._parentUrl;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Extends this queryable from the provided parent\r\n *\r\n * @param parent Parent queryable from which we will derive a base url\r\n * @param path Additional path\r\n */\r\n Queryable.prototype.extend = function (parent, path) {\r\n this._parentUrl = parent._url;\r\n this._url = combine(this._parentUrl, path || \"\");\r\n this.configureFrom(parent);\r\n };\r\n /**\r\n * Configures a cloned object from this instance\r\n *\r\n * @param clone\r\n */\r\n Queryable.prototype._clone = function (clone, _0) {\r\n clone.configureFrom(this);\r\n if (this._useCaching) {\r\n clone._cloneParentWasCaching = true;\r\n clone._cloneParentCacheOptions = this._cachingOptions;\r\n }\r\n return clone;\r\n };\r\n /**\r\n * Handles getting the request pipeline to run for a given request\r\n */\r\n // @ts-ignore\r\n // justified because we want to show that all these arguments are passed to the method so folks inheriting and potentially overriding\r\n // clearly see how the method is invoked inside the class\r\n Queryable.prototype.getRequestPipeline = function (method, options, parser) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n return new Promise(function (resolve) {\r\n if (objectDefinedNotNull(_this._requestPipeline) && isArray(_this._requestPipeline)) {\r\n resolve(_this._requestPipeline);\r\n }\r\n else {\r\n resolve(getDefaultPipeline());\r\n }\r\n });\r\n };\r\n return Queryable;\r\n}());\r\nexport { Queryable };\r\nvar ODataQueryable = /** @class */ (function (_super) {\r\n tslib_1.__extends(ODataQueryable, _super);\r\n function ODataQueryable() {\r\n var _this = _super.call(this) || this;\r\n _this._batch = null;\r\n _this._batchDependency = null;\r\n return _this;\r\n }\r\n /**\r\n * Adds this query to the supplied batch\r\n *\r\n * @example\r\n * ```\r\n *\r\n * let b = pnp.sp.createBatch();\r\n * pnp.sp.web.inBatch(b).get().then(...);\r\n * b.execute().then(...)\r\n * ```\r\n */\r\n ODataQueryable.prototype.inBatch = function (batch) {\r\n if (this.batch !== null) {\r\n throw Error(\"This query is already part of a batch.\");\r\n }\r\n if (objectDefinedNotNull(batch)) {\r\n this._batch = batch;\r\n }\r\n return this;\r\n };\r\n /**\r\n * Gets the currentl url\r\n *\r\n */\r\n ODataQueryable.prototype.toUrl = function () {\r\n return this._url;\r\n };\r\n /**\r\n * Executes the currently built request\r\n *\r\n * @param parser Allows you to specify a parser to handle the result\r\n * @param getOptions The options used for this request\r\n */\r\n ODataQueryable.prototype.get = function (parser, options) {\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n if (options === void 0) { options = {}; }\r\n return this.getCore(parser, options);\r\n };\r\n ODataQueryable.prototype.getCore = function (parser, options) {\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n if (options === void 0) { options = {}; }\r\n return _super.prototype.getCore.call(this, parser, options);\r\n };\r\n ODataQueryable.prototype.postCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return _super.prototype.postCore.call(this, options, parser);\r\n };\r\n ODataQueryable.prototype.patchCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return _super.prototype.patchCore.call(this, options, parser);\r\n };\r\n ODataQueryable.prototype.deleteCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return _super.prototype.deleteCore.call(this, options, parser);\r\n };\r\n ODataQueryable.prototype.putCore = function (options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return _super.prototype.putCore.call(this, options, parser);\r\n };\r\n ODataQueryable.prototype.reqImpl = function (method, options, parser) {\r\n if (options === void 0) { options = {}; }\r\n if (this.hasBatch) {\r\n this._batchDependency = this.addBatchDependency();\r\n }\r\n return _super.prototype.reqImpl.call(this, method, options, parser);\r\n };\r\n /**\r\n * Blocks a batch call from occuring, MUST be cleared by calling the returned function\r\n */\r\n ODataQueryable.prototype.addBatchDependency = function () {\r\n if (this._batch !== null) {\r\n return this._batch.addDependency();\r\n }\r\n return function () { return null; };\r\n };\r\n Object.defineProperty(ODataQueryable.prototype, \"hasBatch\", {\r\n /**\r\n * Indicates if the current query has a batch associated\r\n *\r\n */\r\n get: function () {\r\n return objectDefinedNotNull(this._batch);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ODataQueryable.prototype, \"batch\", {\r\n /**\r\n * The batch currently associated with this query or null\r\n *\r\n */\r\n get: function () {\r\n return this.hasBatch ? this._batch : null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Configures a cloned object from this instance\r\n *\r\n * @param clone\r\n */\r\n ODataQueryable.prototype._clone = function (clone, cloneSettings) {\r\n clone = _super.prototype._clone.call(this, clone, cloneSettings);\r\n if (cloneSettings.includeBatch) {\r\n clone = clone.inBatch(this._batch);\r\n }\r\n return clone;\r\n };\r\n return ODataQueryable;\r\n}(Queryable));\r\nexport { ODataQueryable };\r\n//# sourceMappingURL=queryable.js.map","import { getGUID } from \"@pnp/common\";\r\nvar ODataBatch = /** @class */ (function () {\r\n function ODataBatch(_batchId) {\r\n if (_batchId === void 0) { _batchId = getGUID(); }\r\n this._batchId = _batchId;\r\n this._reqs = [];\r\n this._deps = [];\r\n this._rDeps = [];\r\n }\r\n Object.defineProperty(ODataBatch.prototype, \"batchId\", {\r\n get: function () {\r\n return this._batchId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ODataBatch.prototype, \"requests\", {\r\n /**\r\n * The requests contained in this batch\r\n */\r\n get: function () {\r\n return this._reqs;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n *\r\n * @param url Request url\r\n * @param method Request method (GET, POST, etc)\r\n * @param options Any request options\r\n * @param parser The parser used to handle the eventual return from the query\r\n * @param id An identifier used to track a request within a batch\r\n */\r\n ODataBatch.prototype.add = function (url, method, options, parser, id) {\r\n var info = {\r\n id: id,\r\n method: method.toUpperCase(),\r\n options: options,\r\n parser: parser,\r\n reject: null,\r\n resolve: null,\r\n url: url,\r\n };\r\n var p = new Promise(function (resolve, reject) {\r\n info.resolve = resolve;\r\n info.reject = reject;\r\n });\r\n this._reqs.push(info);\r\n return p;\r\n };\r\n /**\r\n * Adds a dependency insuring that some set of actions will occur before a batch is processed.\r\n * MUST be cleared using the returned resolve delegate to allow batches to run\r\n */\r\n ODataBatch.prototype.addDependency = function () {\r\n var resolver = function () { return void (0); };\r\n this._deps.push(new Promise(function (resolve) {\r\n resolver = resolve;\r\n }));\r\n return resolver;\r\n };\r\n /**\r\n * The batch's execute method will not resolve util any promises added here resolve\r\n *\r\n * @param p The dependent promise\r\n */\r\n ODataBatch.prototype.addResolveBatchDependency = function (p) {\r\n this._rDeps.push(p);\r\n };\r\n /**\r\n * Execute the current batch and resolve the associated promises\r\n *\r\n * @returns A promise which will be resolved once all of the batch's child promises have resolved\r\n */\r\n ODataBatch.prototype.execute = function () {\r\n var _this = this;\r\n // we need to check the dependencies twice due to how different engines handle things.\r\n // We can get a second set of promises added during the first set resolving\r\n return Promise.all(this._deps)\r\n .then(function () { return Promise.all(_this._deps); })\r\n .then(function () { return _this.executeImpl(); })\r\n .then(function () { return Promise.all(_this._rDeps); })\r\n .then(function () { return void (0); });\r\n };\r\n return ODataBatch;\r\n}());\r\nexport { ODataBatch };\r\n//# sourceMappingURL=odatabatch.js.map","import { RuntimeConfig, AdalClient } from \"@pnp/common\";\r\nexport function setup(config) {\r\n RuntimeConfig.extend(config);\r\n}\r\nvar GraphRuntimeConfigImpl = /** @class */ (function () {\r\n function GraphRuntimeConfigImpl() {\r\n }\r\n Object.defineProperty(GraphRuntimeConfigImpl.prototype, \"headers\", {\r\n get: function () {\r\n var graphPart = RuntimeConfig.get(\"graph\");\r\n if (graphPart !== undefined && graphPart !== null && graphPart.headers !== undefined) {\r\n return graphPart.headers;\r\n }\r\n return {};\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRuntimeConfigImpl.prototype, \"fetchClientFactory\", {\r\n get: function () {\r\n var graphPart = RuntimeConfig.get(\"graph\");\r\n // use a configured factory firt\r\n if (graphPart !== undefined && graphPart !== null && graphPart.fetchClientFactory !== undefined) {\r\n return graphPart.fetchClientFactory;\r\n }\r\n // then try and use spfx context if available\r\n if (RuntimeConfig.spfxContext !== undefined) {\r\n return function () { return AdalClient.fromSPFxContext(RuntimeConfig.spfxContext); };\r\n }\r\n throw Error(\"There is no Graph Client available, either set one using configuraiton or provide a valid SPFx Context using setup.\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraphRuntimeConfigImpl;\r\n}());\r\nexport { GraphRuntimeConfigImpl };\r\nexport var GraphRuntimeConfig = new GraphRuntimeConfigImpl();\r\n//# sourceMappingURL=graphlibconfig.js.map","import { extend, mergeHeaders, getCtxCallback, } from \"@pnp/common\";\r\nimport { GraphRuntimeConfig } from \"../config/graphlibconfig\";\r\nvar GraphHttpClient = /** @class */ (function () {\r\n function GraphHttpClient() {\r\n this._impl = GraphRuntimeConfig.fetchClientFactory();\r\n }\r\n GraphHttpClient.prototype.fetch = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var headers = new Headers();\r\n // first we add the global headers so they can be overwritten by any passed in locally to this call\r\n mergeHeaders(headers, GraphRuntimeConfig.headers);\r\n // second we add the local options so we can overwrite the globals\r\n mergeHeaders(headers, options.headers);\r\n if (!headers.has(\"Content-Type\")) {\r\n headers.append(\"Content-Type\", \"application/json\");\r\n }\r\n if (!headers.has(\"SdkVersion\")) {\r\n // this marks the requests for understanding by the service\r\n headers.append(\"SdkVersion\", \"PnPCoreJS/1.3.11\");\r\n }\r\n var opts = extend(options, { headers: headers });\r\n return this.fetchRaw(url, opts);\r\n };\r\n GraphHttpClient.prototype.fetchRaw = function (url, options) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n // here we need to normalize the headers\r\n var rawHeaders = new Headers();\r\n mergeHeaders(rawHeaders, options.headers);\r\n options = extend(options, { headers: rawHeaders });\r\n var retry = function (ctx) {\r\n _this._impl.fetch(url, options).then(function (response) { return ctx.resolve(response); }).catch(function (response) {\r\n // Check if request was throttled - http status code 429\r\n // Check if request failed due to server unavailable - http status code 503\r\n // Check if request failed due to gateway timeout - http status code 504\r\n if (response.status !== 429 && response.status !== 503 && response.status !== 504) {\r\n ctx.reject(response);\r\n }\r\n // grab our current delay\r\n var delay = ctx.delay;\r\n // Increment our counters.\r\n ctx.delay *= 2;\r\n ctx.attempts++;\r\n // If we have exceeded the retry count, reject.\r\n if (ctx.retryCount <= ctx.attempts) {\r\n ctx.reject(response);\r\n }\r\n // Set our retry timeout for {delay} milliseconds.\r\n setTimeout(getCtxCallback(_this, retry, ctx), delay);\r\n });\r\n };\r\n return new Promise(function (resolve, reject) {\r\n var retryContext = {\r\n attempts: 0,\r\n delay: 100,\r\n reject: reject,\r\n resolve: resolve,\r\n retryCount: 7,\r\n };\r\n retry.call(_this, retryContext);\r\n });\r\n };\r\n GraphHttpClient.prototype.get = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"GET\" });\r\n return this.fetch(url, opts);\r\n };\r\n GraphHttpClient.prototype.post = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"POST\" });\r\n return this.fetch(url, opts);\r\n };\r\n GraphHttpClient.prototype.patch = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"PATCH\" });\r\n return this.fetch(url, opts);\r\n };\r\n GraphHttpClient.prototype.delete = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"DELETE\" });\r\n return this.fetch(url, opts);\r\n };\r\n return GraphHttpClient;\r\n}());\r\nexport { GraphHttpClient };\r\n//# sourceMappingURL=graphhttpclient.js.map","var GraphEndpoints = /** @class */ (function () {\r\n function GraphEndpoints() {\r\n }\r\n /**\r\n *\r\n * @param url The url to set the endpoint\r\n */\r\n GraphEndpoints.ensure = function (url, endpoint) {\r\n var all = [GraphEndpoints.Beta, GraphEndpoints.V1];\r\n var regex = new RegExp(endpoint, \"i\");\r\n var replaces = all.filter(function (s) { return !regex.test(s); }).map(function (s) { return s.replace(\".\", \"\\\\.\"); });\r\n regex = new RegExp(\"/?(\" + replaces.join(\"|\") + \")/\", \"ig\");\r\n return url.replace(regex, \"/\" + endpoint + \"/\");\r\n };\r\n GraphEndpoints.Beta = \"beta\";\r\n GraphEndpoints.V1 = \"v1.0\";\r\n return GraphEndpoints;\r\n}());\r\nexport { GraphEndpoints };\r\n//# sourceMappingURL=types.js.map","import * as tslib_1 from \"tslib\";\r\nimport { combine, extend, isUrlAbsolute, getGUID, } from \"@pnp/common\";\r\nimport { ODataQueryable, } from \"@pnp/odata\";\r\nimport { GraphHttpClient } from \"./net/graphhttpclient\";\r\nimport { GraphEndpoints } from \"./types\";\r\n/**\r\n * Queryable Base Class\r\n *\r\n */\r\nvar GraphQueryable = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphQueryable, _super);\r\n /**\r\n * Creates a new instance of the Queryable class\r\n *\r\n * @constructor\r\n * @param baseUrl A string or Queryable that should form the base part of the url\r\n *\r\n */\r\n function GraphQueryable(baseUrl, path) {\r\n var _this = _super.call(this) || this;\r\n if (typeof baseUrl === \"string\") {\r\n var urlStr = baseUrl;\r\n _this._parentUrl = urlStr;\r\n _this._url = combine(urlStr, path);\r\n }\r\n else {\r\n _this.extend(baseUrl, path);\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Choose which fields to return\r\n *\r\n * @param selects One or more fields to return\r\n */\r\n GraphQueryable.prototype.select = function () {\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n if (selects.length > 0) {\r\n this.query.set(\"$select\", selects.join(\",\"));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Expands fields such as lookups to get additional data\r\n *\r\n * @param expands The Fields for which to expand the values\r\n */\r\n GraphQueryable.prototype.expand = function () {\r\n var expands = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n expands[_i] = arguments[_i];\r\n }\r\n if (expands.length > 0) {\r\n this.query.set(\"$expand\", expands.join(\",\"));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Creates a new instance of the supplied factory and extends this into that new instance\r\n *\r\n * @param factory constructor for the new queryable\r\n */\r\n GraphQueryable.prototype.as = function (factory) {\r\n var o = new factory(this._url, null);\r\n return extend(o, this, true);\r\n };\r\n /**\r\n * Gets the full url with query information\r\n *\r\n */\r\n GraphQueryable.prototype.toUrlAndQuery = function () {\r\n var url = this.toUrl();\r\n if (!isUrlAbsolute(url)) {\r\n url = combine(\"https://graph.microsoft.com\", url);\r\n }\r\n if (this.query.size > 0) {\r\n var char = url.indexOf(\"?\") > -1 ? \"&\" : \"?\";\r\n url += \"\" + char + Array.from(this.query).map(function (v) { return v[0] + \"=\" + v[1]; }).join(\"&\");\r\n }\r\n return url;\r\n };\r\n /**\r\n * Allows setting the endpoint (v1.0, beta)\r\n *\r\n * @param endpoint\r\n */\r\n GraphQueryable.prototype.setEndpoint = function (endpoint) {\r\n this._url = GraphEndpoints.ensure(this._url, endpoint);\r\n return this;\r\n };\r\n /**\r\n * Gets a parent for this instance as specified\r\n *\r\n * @param factory The contructor for the class to create\r\n */\r\n GraphQueryable.prototype.getParent = function (factory, baseUrl, path) {\r\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\r\n return new factory(baseUrl, path);\r\n };\r\n /**\r\n * Clones this queryable into a new queryable instance of T\r\n * @param factory Constructor used to create the new instance\r\n * @param additionalPath Any additional path to include in the clone\r\n * @param includeBatch If true this instance's batch will be added to the cloned instance\r\n */\r\n GraphQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\r\n if (includeBatch === void 0) { includeBatch = true; }\r\n return _super.prototype._clone.call(this, new factory(this, additionalPath), { includeBatch: includeBatch });\r\n };\r\n /**\r\n * Converts the current instance to a request context\r\n *\r\n * @param verb The request verb\r\n * @param options The set of supplied request options\r\n * @param parser The supplied ODataParser instance\r\n * @param pipeline Optional request processing pipeline\r\n */\r\n GraphQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\r\n if (options === void 0) { options = {}; }\r\n var dependencyDispose = this.hasBatch ? this._batchDependency : function () { return; };\r\n return Promise.resolve({\r\n batch: this.batch,\r\n batchDependency: dependencyDispose,\r\n cachingOptions: this._cachingOptions,\r\n clientFactory: function () { return new GraphHttpClient(); },\r\n isBatched: this.hasBatch,\r\n isCached: /^get$/i.test(verb) && this._useCaching,\r\n options: options,\r\n parser: parser,\r\n pipeline: pipeline,\r\n requestAbsoluteUrl: this.toUrlAndQuery(),\r\n requestId: getGUID(),\r\n verb: verb,\r\n });\r\n };\r\n return GraphQueryable;\r\n}(ODataQueryable));\r\nexport { GraphQueryable };\r\n/**\r\n * Represents a REST collection which can be filtered, paged, and selected\r\n *\r\n */\r\nvar GraphQueryableCollection = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphQueryableCollection, _super);\r\n function GraphQueryableCollection() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n *\r\n * @param filter The string representing the filter query\r\n */\r\n GraphQueryableCollection.prototype.filter = function (filter) {\r\n this.query.set(\"$filter\", filter);\r\n return this;\r\n };\r\n /**\r\n * Orders based on the supplied fields\r\n *\r\n * @param orderby The name of the field on which to sort\r\n * @param ascending If false DESC is appended, otherwise ASC (default)\r\n */\r\n GraphQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\r\n if (ascending === void 0) { ascending = true; }\r\n var o = \"$orderby\";\r\n var query = this.query.has(o) ? this.query.get(o).split(\",\") : [];\r\n query.push(orderBy + \" \" + (ascending ? \"asc\" : \"desc\"));\r\n this.query.set(o, query.join(\",\"));\r\n return this;\r\n };\r\n /**\r\n * Limits the query to only return the specified number of items\r\n *\r\n * @param top The query row limit\r\n */\r\n GraphQueryableCollection.prototype.top = function (top) {\r\n this.query.set(\"$top\", top.toString());\r\n return this;\r\n };\r\n /**\r\n * Skips a set number of items in the return set\r\n *\r\n * @param num Number of items to skip\r\n */\r\n GraphQueryableCollection.prototype.skip = function (num) {\r\n this.query.set(\"$skip\", num.toString());\r\n return this;\r\n };\r\n /**\r\n * \tTo request second and subsequent pages of Graph data\r\n */\r\n GraphQueryableCollection.prototype.skipToken = function (token) {\r\n this.query.set(\"$skiptoken\", token);\r\n return this;\r\n };\r\n Object.defineProperty(GraphQueryableCollection.prototype, \"count\", {\r\n /**\r\n * \tRetrieves the total count of matching resources\r\n */\r\n get: function () {\r\n this.query.set(\"$count\", \"true\");\r\n return this;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraphQueryableCollection;\r\n}(GraphQueryable));\r\nexport { GraphQueryableCollection };\r\nvar GraphQueryableSearchableCollection = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphQueryableSearchableCollection, _super);\r\n function GraphQueryableSearchableCollection() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * \tTo request second and subsequent pages of Graph data\r\n */\r\n GraphQueryableSearchableCollection.prototype.search = function (query) {\r\n this.query.set(\"$search\", query);\r\n return this;\r\n };\r\n return GraphQueryableSearchableCollection;\r\n}(GraphQueryableCollection));\r\nexport { GraphQueryableSearchableCollection };\r\n/**\r\n * Represents an instance that can be selected\r\n *\r\n */\r\nvar GraphQueryableInstance = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphQueryableInstance, _super);\r\n function GraphQueryableInstance() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return GraphQueryableInstance;\r\n}(GraphQueryable));\r\nexport { GraphQueryableInstance };\r\n/**\r\n * Decorator used to specify the default path for Queryable objects\r\n *\r\n * @param path\r\n */\r\nexport function defaultPath(path) {\r\n return function (target) {\r\n return /** @class */ (function (_super) {\r\n tslib_1.__extends(class_1, _super);\r\n function class_1() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return _super.call(this, args[0], args.length > 1 && args[1] !== undefined ? args[1] : path) || this;\r\n }\r\n return class_1;\r\n }(target));\r\n };\r\n}\r\n//# sourceMappingURL=graphqueryable.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nvar Members = /** @class */ (function (_super) {\r\n tslib_1.__extends(Members, _super);\r\n function Members() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Members_1 = Members;\r\n /**\r\n * Use this API to add a member to an Office 365 group, a security group or a mail-enabled security group through\r\n * the members navigation property. You can add users or other groups.\r\n * Important: You can add only users to Office 365 groups.\r\n *\r\n * @param id Full @odata.id of the directoryObject, user, or group object you want to add (ex: https://graph.microsoft.com/v1.0/directoryObjects/${id})\r\n */\r\n Members.prototype.add = function (id) {\r\n return this.clone(Members_1, \"$ref\").postCore({\r\n body: jsS({\r\n \"@odata.id\": id,\r\n }),\r\n });\r\n };\r\n /**\r\n * Gets a member of the group by id\r\n *\r\n * @param id Group member's id\r\n */\r\n Members.prototype.getById = function (id) {\r\n return new Member(this, id);\r\n };\r\n var Members_1;\r\n Members = Members_1 = tslib_1.__decorate([\r\n defaultPath(\"members\")\r\n ], Members);\r\n return Members;\r\n}(GraphQueryableCollection));\r\nexport { Members };\r\nvar Member = /** @class */ (function (_super) {\r\n tslib_1.__extends(Member, _super);\r\n function Member() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Removes this Member\r\n */\r\n Member.prototype.remove = function () {\r\n return this.clone(Member, \"$ref\").deleteCore();\r\n };\r\n return Member;\r\n}(GraphQueryableInstance));\r\nexport { Member };\r\nvar Owners = /** @class */ (function (_super) {\r\n tslib_1.__extends(Owners, _super);\r\n function Owners() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Owners = tslib_1.__decorate([\r\n defaultPath(\"owners\")\r\n ], Owners);\r\n return Owners;\r\n}(Members));\r\nexport { Owners };\r\n//# sourceMappingURL=members.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { Members, Owners } from \"./members\";\r\nimport { extend, jsS } from \"@pnp/common\";\r\nimport { Calendar, Events } from \"./calendars\";\r\nimport { Conversations, Senders } from \"./conversations\";\r\nimport { Plans } from \"./planner\";\r\nimport { Photo } from \"./photos\";\r\nimport { Team } from \"./teams\";\r\nexport var GroupType;\r\n(function (GroupType) {\r\n /**\r\n * Office 365 (aka unified group)\r\n */\r\n GroupType[GroupType[\"Office365\"] = 0] = \"Office365\";\r\n /**\r\n * Dynamic membership\r\n */\r\n GroupType[GroupType[\"Dynamic\"] = 1] = \"Dynamic\";\r\n /**\r\n * Security\r\n */\r\n GroupType[GroupType[\"Security\"] = 2] = \"Security\";\r\n})(GroupType || (GroupType = {}));\r\n/**\r\n * Describes a collection of Field objects\r\n *\r\n */\r\nvar Groups = /** @class */ (function (_super) {\r\n tslib_1.__extends(Groups, _super);\r\n function Groups() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a group from the collection using the specified id\r\n *\r\n * @param id Id of the group to get from this collection\r\n */\r\n Groups.prototype.getById = function (id) {\r\n return new Group(this, id);\r\n };\r\n /**\r\n * Create a new group as specified in the request body.\r\n *\r\n * @param name Name to display in the address book for the group\r\n * @param mailNickname Mail alias for the group\r\n * @param groupType Type of group being created\r\n * @param additionalProperties A plain object collection of additional properties you want to set on the new group\r\n */\r\n Groups.prototype.add = function (name, mailNickname, groupType, additionalProperties) {\r\n var _this = this;\r\n if (additionalProperties === void 0) { additionalProperties = {}; }\r\n var postBody = extend({\r\n displayName: name,\r\n mailEnabled: groupType === GroupType.Office365,\r\n mailNickname: mailNickname,\r\n securityEnabled: groupType !== GroupType.Office365,\r\n }, additionalProperties);\r\n // include a group type if required\r\n if (groupType !== GroupType.Security) {\r\n postBody = extend(postBody, {\r\n groupTypes: groupType === GroupType.Office365 ? [\"Unified\"] : [\"DynamicMembership\"],\r\n });\r\n }\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n group: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Groups = tslib_1.__decorate([\r\n defaultPath(\"groups\")\r\n ], Groups);\r\n return Groups;\r\n}(GraphQueryableCollection));\r\nexport { Groups };\r\n/**\r\n * Represents a group entity\r\n */\r\nvar Group = /** @class */ (function (_super) {\r\n tslib_1.__extends(Group, _super);\r\n function Group() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Group.prototype, \"calendar\", {\r\n /**\r\n * The calendar associated with this group\r\n */\r\n get: function () {\r\n return new Calendar(this, \"calendar\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"events\", {\r\n /**\r\n * Retrieve a list of event objects\r\n */\r\n get: function () {\r\n return new Events(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"owners\", {\r\n /**\r\n * Gets the collection of owners for this group\r\n */\r\n get: function () {\r\n return new Owners(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"plans\", {\r\n /**\r\n * The collection of plans for this group\r\n */\r\n get: function () {\r\n return new Plans(this, \"planner/plans\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"members\", {\r\n /**\r\n * Gets the collection of members for this group\r\n */\r\n get: function () {\r\n return new Members(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"conversations\", {\r\n /**\r\n * Gets the conversations collection for this group\r\n */\r\n get: function () {\r\n return new Conversations(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"acceptedSenders\", {\r\n /**\r\n * Gets the collection of accepted senders for this group\r\n */\r\n get: function () {\r\n return new Senders(this, \"acceptedsenders\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"rejectedSenders\", {\r\n /**\r\n * Gets the collection of rejected senders for this group\r\n */\r\n get: function () {\r\n return new Senders(this, \"rejectedsenders\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"photo\", {\r\n /**\r\n * The photo associated with the group\r\n */\r\n get: function () {\r\n return new Photo(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Group.prototype, \"team\", {\r\n /**\r\n * Gets the team associated with this group, if it exists\r\n */\r\n get: function () {\r\n return new Team(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Add the group to the list of the current user's favorite groups. Supported for only Office 365 groups\r\n */\r\n Group.prototype.addFavorite = function () {\r\n return this.clone(Group, \"addFavorite\").postCore();\r\n };\r\n /**\r\n * Creates a Microsoft Team associated with this group\r\n *\r\n * @param properties Initial properties for the new Team\r\n */\r\n Group.prototype.createTeam = function (properties) {\r\n return this.clone(Group, \"team\").putCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Returns all the groups and directory roles that the specified group is a member of. The check is transitive\r\n *\r\n * @param securityEnabledOnly\r\n */\r\n Group.prototype.getMemberObjects = function (securityEnabledOnly) {\r\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\r\n return this.clone(Group, \"getMemberObjects\").postCore({\r\n body: jsS({\r\n securityEnabledOnly: securityEnabledOnly,\r\n }),\r\n });\r\n };\r\n /**\r\n * Return all the groups that the specified group is a member of. The check is transitive\r\n *\r\n * @param securityEnabledOnly\r\n */\r\n Group.prototype.getMemberGroups = function (securityEnabledOnly) {\r\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\r\n return this.clone(Group, \"getMemberGroups\").postCore({\r\n body: jsS({\r\n securityEnabledOnly: securityEnabledOnly,\r\n }),\r\n });\r\n };\r\n /**\r\n * Check for membership in a specified list of groups, and returns from that list those groups of which the specified user, group, or directory object is a member.\r\n * This function is transitive.\r\n * @param groupIds A collection that contains the object IDs of the groups in which to check membership. Up to 20 groups may be specified.\r\n */\r\n Group.prototype.checkMemberGroups = function (groupIds) {\r\n return this.clone(Group, \"checkMemberGroups\").postCore({\r\n body: jsS({\r\n groupIds: groupIds,\r\n }),\r\n });\r\n };\r\n /**\r\n * Deletes this group\r\n */\r\n Group.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a group object\r\n *\r\n * @param properties Set of properties of this group to update\r\n */\r\n Group.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Remove the group from the list of the current user's favorite groups. Supported for only Office 365 groups\r\n */\r\n Group.prototype.removeFavorite = function () {\r\n return this.clone(Group, \"removeFavorite\").postCore();\r\n };\r\n /**\r\n * Reset the unseenCount of all the posts that the current user has not seen since their last visit\r\n */\r\n Group.prototype.resetUnseenCount = function () {\r\n return this.clone(Group, \"resetUnseenCount\").postCore();\r\n };\r\n /**\r\n * Calling this method will enable the current user to receive email notifications for this group,\r\n * about new posts, events, and files in that group. Supported for only Office 365 groups\r\n */\r\n Group.prototype.subscribeByMail = function () {\r\n return this.clone(Group, \"subscribeByMail\").postCore();\r\n };\r\n /**\r\n * Calling this method will prevent the current user from receiving email notifications for this group\r\n * about new posts, events, and files in that group. Supported for only Office 365 groups\r\n */\r\n Group.prototype.unsubscribeByMail = function () {\r\n return this.clone(Group, \"unsubscribeByMail\").postCore();\r\n };\r\n /**\r\n * Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the default calendar of a group\r\n *\r\n * @param start Start date and time of the time range\r\n * @param end End date and time of the time range\r\n */\r\n Group.prototype.getCalendarView = function (start, end) {\r\n var view = this.clone(Group, \"calendarView\");\r\n view.query.set(\"startDateTime\", start.toISOString());\r\n view.query.set(\"endDateTime\", end.toISOString());\r\n return view.get();\r\n };\r\n return Group;\r\n}(GraphQueryableInstance));\r\nexport { Group };\r\n//# sourceMappingURL=groups.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\n// import { Attachments } from \"./attachments\";\r\nvar Calendars = /** @class */ (function (_super) {\r\n tslib_1.__extends(Calendars, _super);\r\n function Calendars() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Calendars = tslib_1.__decorate([\r\n defaultPath(\"calendars\")\r\n ], Calendars);\r\n return Calendars;\r\n}(GraphQueryableCollection));\r\nexport { Calendars };\r\nvar Calendar = /** @class */ (function (_super) {\r\n tslib_1.__extends(Calendar, _super);\r\n function Calendar() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Calendar.prototype, \"events\", {\r\n get: function () {\r\n return new Events(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Calendar;\r\n}(GraphQueryableInstance));\r\nexport { Calendar };\r\nvar Events = /** @class */ (function (_super) {\r\n tslib_1.__extends(Events, _super);\r\n function Events() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Events.prototype.getById = function (id) {\r\n return new Event(this, id);\r\n };\r\n /**\r\n * Adds a new event to the collection\r\n *\r\n * @param properties The set of properties used to create the event\r\n */\r\n Events.prototype.add = function (properties) {\r\n var _this = this;\r\n return this.postCore({\r\n body: jsS(properties),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n event: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Events = tslib_1.__decorate([\r\n defaultPath(\"events\")\r\n ], Events);\r\n return Events;\r\n}(GraphQueryableCollection));\r\nexport { Events };\r\nvar Event = /** @class */ (function (_super) {\r\n tslib_1.__extends(Event, _super);\r\n function Event() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // TODO:: when supported\r\n // /**\r\n // * Gets the collection of attachments for this event\r\n // */\r\n // public get attachments(): Attachments {\r\n // return new Attachments(this);\r\n // }\r\n /**\r\n * Update the properties of an event object\r\n *\r\n * @param properties Set of properties of this event to update\r\n */\r\n Event.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Deletes this event\r\n */\r\n Event.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n return Event;\r\n}(GraphQueryableInstance));\r\nexport { Event };\r\n//# sourceMappingURL=calendars.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nvar Attachments = /** @class */ (function (_super) {\r\n tslib_1.__extends(Attachments, _super);\r\n function Attachments() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a member of the group by id\r\n *\r\n * @param id Attachment id\r\n */\r\n Attachments.prototype.getById = function (id) {\r\n return new Attachment(this, id);\r\n };\r\n /**\r\n * Add attachment to this collection\r\n *\r\n * @param name Name given to the attachment file\r\n * @param bytes File content\r\n */\r\n Attachments.prototype.addFile = function (name, bytes) {\r\n return this.postCore({\r\n body: jsS({\r\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\r\n contentBytes: bytes,\r\n name: name,\r\n }),\r\n });\r\n };\r\n Attachments = tslib_1.__decorate([\r\n defaultPath(\"attachments\")\r\n ], Attachments);\r\n return Attachments;\r\n}(GraphQueryableCollection));\r\nexport { Attachments };\r\nvar Attachment = /** @class */ (function (_super) {\r\n tslib_1.__extends(Attachment, _super);\r\n function Attachment() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Attachment;\r\n}(GraphQueryableInstance));\r\nexport { Attachment };\r\n//# sourceMappingURL=attachments.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nimport { Attachments } from \"./attachments\";\r\nvar Conversations = /** @class */ (function (_super) {\r\n tslib_1.__extends(Conversations, _super);\r\n function Conversations() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Create a new conversation by including a thread and a post.\r\n *\r\n * @param properties Properties used to create the new conversation\r\n */\r\n Conversations.prototype.add = function (properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Gets a conversation from this collection by id\r\n *\r\n * @param id Group member's id\r\n */\r\n Conversations.prototype.getById = function (id) {\r\n return new Conversation(this, id);\r\n };\r\n Conversations = tslib_1.__decorate([\r\n defaultPath(\"conversations\")\r\n ], Conversations);\r\n return Conversations;\r\n}(GraphQueryableCollection));\r\nexport { Conversations };\r\nvar Threads = /** @class */ (function (_super) {\r\n tslib_1.__extends(Threads, _super);\r\n function Threads() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a thread from this collection by id\r\n *\r\n * @param id Group member's id\r\n */\r\n Threads.prototype.getById = function (id) {\r\n return new Thread(this, id);\r\n };\r\n /**\r\n * Adds a new thread to this collection\r\n *\r\n * @param properties properties used to create the new thread\r\n * @returns Id of the new thread\r\n */\r\n Threads.prototype.add = function (properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n Threads = tslib_1.__decorate([\r\n defaultPath(\"threads\")\r\n ], Threads);\r\n return Threads;\r\n}(GraphQueryableCollection));\r\nexport { Threads };\r\nvar Posts = /** @class */ (function (_super) {\r\n tslib_1.__extends(Posts, _super);\r\n function Posts() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a thread from this collection by id\r\n *\r\n * @param id Group member's id\r\n */\r\n Posts.prototype.getById = function (id) {\r\n return new Post(this, id);\r\n };\r\n /**\r\n * Adds a new thread to this collection\r\n *\r\n * @param properties properties used to create the new thread\r\n * @returns Id of the new thread\r\n */\r\n Posts.prototype.add = function (properties) {\r\n return this.postCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n Posts = tslib_1.__decorate([\r\n defaultPath(\"posts\")\r\n ], Posts);\r\n return Posts;\r\n}(GraphQueryableCollection));\r\nexport { Posts };\r\nvar Conversation = /** @class */ (function (_super) {\r\n tslib_1.__extends(Conversation, _super);\r\n function Conversation() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Conversation.prototype, \"threads\", {\r\n /**\r\n * Get all the threads in a group conversation.\r\n */\r\n get: function () {\r\n return new Threads(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates this conversation\r\n */\r\n Conversation.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Deletes this member from the group\r\n */\r\n Conversation.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n return Conversation;\r\n}(GraphQueryableInstance));\r\nexport { Conversation };\r\nvar Thread = /** @class */ (function (_super) {\r\n tslib_1.__extends(Thread, _super);\r\n function Thread() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Thread.prototype, \"posts\", {\r\n /**\r\n * Get all the threads in a group conversation.\r\n */\r\n get: function () {\r\n return new Posts(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Reply to a thread in a group conversation and add a new post to it\r\n *\r\n * @param post Contents of the post\r\n */\r\n Thread.prototype.reply = function (post) {\r\n return this.clone(Thread, \"reply\").postCore({\r\n body: jsS({\r\n post: post,\r\n }),\r\n });\r\n };\r\n /**\r\n * Deletes this member from the group\r\n */\r\n Thread.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n return Thread;\r\n}(GraphQueryableInstance));\r\nexport { Thread };\r\nvar Post = /** @class */ (function (_super) {\r\n tslib_1.__extends(Post, _super);\r\n function Post() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Post.prototype, \"attachments\", {\r\n get: function () {\r\n return new Attachments(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this post\r\n */\r\n Post.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Forward a post to a recipient\r\n */\r\n Post.prototype.forward = function (info) {\r\n return this.clone(Post, \"forward\").postCore({\r\n body: jsS(info),\r\n });\r\n };\r\n /**\r\n * Reply to a thread in a group conversation and add a new post to it\r\n *\r\n * @param post Contents of the post\r\n */\r\n Post.prototype.reply = function (post) {\r\n return this.clone(Post, \"reply\").postCore({\r\n body: jsS({\r\n post: post,\r\n }),\r\n });\r\n };\r\n return Post;\r\n}(GraphQueryableInstance));\r\nexport { Post };\r\nvar Senders = /** @class */ (function (_super) {\r\n tslib_1.__extends(Senders, _super);\r\n function Senders(baseUrl, path) {\r\n return _super.call(this, baseUrl, path) || this;\r\n }\r\n /**\r\n * Add a new user or group to this senders collection\r\n * @param id The full @odata.id value to add (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\r\n */\r\n Senders.prototype.add = function (id) {\r\n return this.clone(Senders, \"$ref\").postCore({\r\n body: jsS({\r\n \"@odata.id\": id,\r\n }),\r\n });\r\n };\r\n /**\r\n * Removes the entity from the collection\r\n *\r\n * @param id The full @odata.id value to remove (ex: https://graph.microsoft.com/v1.0/users/user@contoso.com)\r\n */\r\n Senders.prototype.remove = function (id) {\r\n var remover = this.clone(Senders, \"$ref\");\r\n remover.query.set(\"$id\", id);\r\n return remover.deleteCore();\r\n };\r\n return Senders;\r\n}(GraphQueryableCollection));\r\nexport { Senders };\r\n//# sourceMappingURL=conversations.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nvar Planner = /** @class */ (function (_super) {\r\n tslib_1.__extends(Planner, _super);\r\n function Planner() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Planner.prototype, \"plans\", {\r\n // Should Only be able to get by id, or else error occur\r\n get: function () {\r\n return new Plans(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Planner.prototype, \"tasks\", {\r\n // Should Only be able to get by id, or else error occur\r\n get: function () {\r\n return new Tasks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Planner.prototype, \"buckets\", {\r\n // Should Only be able to get by id, or else error occur\r\n get: function () {\r\n return new Buckets(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Planner = tslib_1.__decorate([\r\n defaultPath(\"planner\")\r\n ], Planner);\r\n return Planner;\r\n}(GraphQueryableInstance));\r\nexport { Planner };\r\nvar Plans = /** @class */ (function (_super) {\r\n tslib_1.__extends(Plans, _super);\r\n function Plans() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Plans.prototype.getById = function (id) {\r\n return new Plan(this, id);\r\n };\r\n /**\r\n * Create a new Planner Plan.\r\n *\r\n * @param owner Id of Group object.\r\n * @param title The Title of the Plan.\r\n */\r\n Plans.prototype.add = function (owner, title) {\r\n var _this = this;\r\n var postBody = {\r\n owner: owner,\r\n title: title,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n plan: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Plans = tslib_1.__decorate([\r\n defaultPath(\"plans\")\r\n ], Plans);\r\n return Plans;\r\n}(GraphQueryableCollection));\r\nexport { Plans };\r\n/**\r\n * Should not be able to get by Id\r\n */\r\nvar Plan = /** @class */ (function (_super) {\r\n tslib_1.__extends(Plan, _super);\r\n function Plan() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Plan.prototype, \"tasks\", {\r\n get: function () {\r\n return new Tasks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Plan.prototype, \"buckets\", {\r\n get: function () {\r\n return new Buckets(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Plan.prototype, \"details\", {\r\n get: function () {\r\n return new Details(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this Plan\r\n */\r\n Plan.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a Plan\r\n *\r\n * @param properties Set of properties of this Plan to update\r\n */\r\n Plan.prototype.update = function (properties, eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.patchCore({\r\n body: jsS(properties),\r\n headers: {\r\n \"If-Match\": eTag,\r\n },\r\n });\r\n };\r\n return Plan;\r\n}(GraphQueryableInstance));\r\nexport { Plan };\r\nvar Tasks = /** @class */ (function (_super) {\r\n tslib_1.__extends(Tasks, _super);\r\n function Tasks() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Tasks.prototype.getById = function (id) {\r\n return new Task(this, id);\r\n };\r\n /**\r\n * Create a new Planner Task.\r\n *\r\n * @param planId Id of Plan.\r\n * @param title The Title of the Task.\r\n * @param assignments Assign the task\r\n * @param bucketId Id of Bucket\r\n */\r\n Tasks.prototype.add = function (planId, title, assignments, bucketId) {\r\n var _this = this;\r\n var postBody = {\r\n planId: planId,\r\n title: title,\r\n };\r\n if (assignments) {\r\n postBody = extend(postBody, {\r\n assignments: assignments,\r\n });\r\n }\r\n if (bucketId) {\r\n postBody = extend(postBody, {\r\n bucketId: bucketId,\r\n });\r\n }\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n task: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Tasks = tslib_1.__decorate([\r\n defaultPath(\"tasks\")\r\n ], Tasks);\r\n return Tasks;\r\n}(GraphQueryableCollection));\r\nexport { Tasks };\r\nvar Task = /** @class */ (function (_super) {\r\n tslib_1.__extends(Task, _super);\r\n function Task() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Deletes this Task\r\n *\r\n * @param eTag Up to date eTag of Task to update\r\n */\r\n Task.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.deleteCore({\r\n headers: {\r\n \"If-Match\": eTag,\r\n },\r\n });\r\n };\r\n /**\r\n * Update the properties of a Task\r\n *\r\n * @param properties Set of properties of this Task to update\r\n * @param eTag Up to date eTag of Task to update\r\n */\r\n Task.prototype.update = function (properties, eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.patchCore({\r\n body: jsS(properties),\r\n headers: {\r\n \"If-Match\": eTag,\r\n },\r\n });\r\n };\r\n Object.defineProperty(Task.prototype, \"details\", {\r\n get: function () {\r\n return new Details(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Task;\r\n}(GraphQueryableInstance));\r\nexport { Task };\r\nvar Buckets = /** @class */ (function (_super) {\r\n tslib_1.__extends(Buckets, _super);\r\n function Buckets() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Create a new Bucket.\r\n *\r\n * @param name Name of Bucket object.\r\n * @param planId The Id of the Plan.\r\n * @param oderHint Hint used to order items of this type in a list view.\r\n */\r\n Buckets.prototype.add = function (name, planId, orderHint) {\r\n var _this = this;\r\n var postBody = {\r\n name: name,\r\n orderHint: orderHint ? orderHint : \"\",\r\n planId: planId,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n bucket: _this.getById(r.id),\r\n data: r,\r\n };\r\n });\r\n };\r\n Buckets.prototype.getById = function (id) {\r\n return new Bucket(this, id);\r\n };\r\n Buckets = tslib_1.__decorate([\r\n defaultPath(\"buckets\")\r\n ], Buckets);\r\n return Buckets;\r\n}(GraphQueryableCollection));\r\nexport { Buckets };\r\nvar Bucket = /** @class */ (function (_super) {\r\n tslib_1.__extends(Bucket, _super);\r\n function Bucket() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Deletes this Bucket\r\n */\r\n Bucket.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a Bucket\r\n *\r\n * @param properties Set of properties of this Bucket to update\r\n */\r\n Bucket.prototype.update = function (properties, eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.patchCore({\r\n body: jsS(properties),\r\n headers: {\r\n \"If-Match\": eTag,\r\n },\r\n });\r\n };\r\n Object.defineProperty(Bucket.prototype, \"tasks\", {\r\n get: function () {\r\n return new Tasks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Bucket;\r\n}(GraphQueryableInstance));\r\nexport { Bucket };\r\nvar Details = /** @class */ (function (_super) {\r\n tslib_1.__extends(Details, _super);\r\n function Details() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Details = tslib_1.__decorate([\r\n defaultPath(\"details\")\r\n ], Details);\r\n return Details;\r\n}(GraphQueryableCollection));\r\nexport { Details };\r\n//# sourceMappingURL=planner.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, defaultPath } from \"./graphqueryable\";\r\nimport { BlobParser, BufferParser } from \"@pnp/odata\";\r\nvar Photo = /** @class */ (function (_super) {\r\n tslib_1.__extends(Photo, _super);\r\n function Photo() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Photo_1 = Photo;\r\n /**\r\n * Gets the image bytes as a blob (browser)\r\n */\r\n Photo.prototype.getBlob = function () {\r\n return this.clone(Photo_1, \"$value\", false).get(new BlobParser());\r\n };\r\n /**\r\n * Gets the image file byets as a Buffer (node.js)\r\n */\r\n Photo.prototype.getBuffer = function () {\r\n return this.clone(Photo_1, \"$value\", false).get(new BufferParser());\r\n };\r\n /**\r\n * Sets the file bytes\r\n *\r\n * @param content Image file contents, max 4 MB\r\n */\r\n Photo.prototype.setContent = function (content) {\r\n return this.clone(Photo_1, \"$value\", false).patchCore({\r\n body: content,\r\n });\r\n };\r\n var Photo_1;\r\n Photo = Photo_1 = tslib_1.__decorate([\r\n defaultPath(\"photo\")\r\n ], Photo);\r\n return Photo;\r\n}(GraphQueryableInstance));\r\nexport { Photo };\r\n//# sourceMappingURL=photos.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GroupType, Groups } from \"./groups\";\r\nimport { GraphQueryableInstance, defaultPath, GraphQueryableCollection } from \"./graphqueryable\";\r\nimport { ODataDefaultParser } from \"@pnp/odata\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nvar Teams = /** @class */ (function (_super) {\r\n tslib_1.__extends(Teams, _super);\r\n function Teams() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Creates a new team and associated Group with the given information\r\n * @param name The name of the new Group\r\n * @param mailNickname The email alias for the group\r\n * @param description Optional description of the group\r\n * @param ownerId Add an owner with a user id from the graph\r\n */\r\n Teams.prototype.create = function (name, mailNickname, description, ownerId, teamProperties) {\r\n if (description === void 0) { description = \"\"; }\r\n if (teamProperties === void 0) { teamProperties = {}; }\r\n var groupProps = {\r\n \"description\": description && description.length > 0 ? description : \"\",\r\n \"owners@odata.bind\": [\r\n \"https://graph.microsoft.com/v1.0/users/\" + ownerId,\r\n ],\r\n };\r\n return (new Groups(this)).add(name, mailNickname, GroupType.Office365, groupProps).then(function (gar) {\r\n return gar.group.createTeam(teamProperties).then(function (data) {\r\n return {\r\n data: data,\r\n group: gar.group,\r\n team: new Team(gar.group),\r\n };\r\n });\r\n });\r\n };\r\n Teams.prototype.getById = function (id) {\r\n return new Team(this, id);\r\n };\r\n Teams = tslib_1.__decorate([\r\n defaultPath(\"teams\")\r\n ], Teams);\r\n return Teams;\r\n}(GraphQueryableCollection));\r\nexport { Teams };\r\n/**\r\n * Represents a Microsoft Team\r\n */\r\nvar Team = /** @class */ (function (_super) {\r\n tslib_1.__extends(Team, _super);\r\n function Team() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Team_1 = Team;\r\n Object.defineProperty(Team.prototype, \"channels\", {\r\n get: function () {\r\n return new Channels(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Team.prototype, \"installedApps\", {\r\n get: function () {\r\n return new Apps(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates this team instance's properties\r\n *\r\n * @param properties The set of properties to update\r\n */\r\n // TODO:: update properties to be typed once type is available in graph-types\r\n Team.prototype.update = function (properties) {\r\n var _this = this;\r\n return this.clone(Team_1, \"\").patchCore({\r\n body: jsS(properties),\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n team: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Archives this Team\r\n *\r\n * @param shouldSetSpoSiteReadOnlyForMembers Should members have Read-only in associated Team Site\r\n */\r\n // TODO:: update properties to be typed once type is available in graph-types\r\n Team.prototype.archive = function (shouldSetSpoSiteReadOnlyForMembers) {\r\n var _this = this;\r\n var postBody;\r\n if (shouldSetSpoSiteReadOnlyForMembers != null) {\r\n postBody = extend(postBody, {\r\n shouldSetSpoSiteReadOnlyForMembers: shouldSetSpoSiteReadOnlyForMembers,\r\n });\r\n }\r\n return this.clone(Team_1, \"archive\").postCore({\r\n body: jsS(postBody),\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n team: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Unarchives this Team\r\n *\r\n */\r\n // TODO:: update properties to be typed once type is available in graph-types\r\n Team.prototype.unarchive = function () {\r\n var _this = this;\r\n return this.clone(Team_1, \"unarchive\").postCore({}).then(function (data) {\r\n return {\r\n data: data,\r\n team: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Clones this Team\r\n * @param name The name of the new Group\r\n * @param mailNickname The email alias for the group\r\n * @param description Optional description of the group\r\n * @param partsToClone Parts to clone ex: apps,tabs,settings,channels,members\r\n * @param visibility Set visibility to public or private\r\n */\r\n // TODO:: update properties to be typed once type is available in graph-types\r\n Team.prototype.cloneTeam = function (name, mailNickname, description, partsToClone, visibility) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n var postBody = {\r\n description: description ? description : \"\",\r\n displayName: name,\r\n mailNickname: mailNickname,\r\n partsToClone: partsToClone,\r\n visibility: visibility,\r\n };\r\n return this.clone(Team_1, \"clone\").postCore({\r\n body: jsS(postBody),\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n team: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Executes the currently built request\r\n *\r\n * @param parser Allows you to specify a parser to handle the result\r\n * @param getOptions The options used for this request\r\n */\r\n Team.prototype.get = function (parser, options) {\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n if (options === void 0) { options = {}; }\r\n return this.clone(Team_1, \"\").getCore(parser, options);\r\n };\r\n var Team_1;\r\n Team = Team_1 = tslib_1.__decorate([\r\n defaultPath(\"team\")\r\n ], Team);\r\n return Team;\r\n}(GraphQueryableInstance));\r\nexport { Team };\r\nvar Channels = /** @class */ (function (_super) {\r\n tslib_1.__extends(Channels, _super);\r\n function Channels() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Creates a new Channel in the Team\r\n * @param name The display name of the new channel\r\n * @param description Optional description of the channel\r\n *\r\n */\r\n Channels.prototype.create = function (name, description) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n var postBody = {\r\n description: description && description.length > 0 ? description : \"\",\r\n displayName: name,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n channel: _this.getById(r.id),\r\n data: r,\r\n };\r\n });\r\n };\r\n Channels.prototype.getById = function (id) {\r\n return new Channel(this, id);\r\n };\r\n Channels = tslib_1.__decorate([\r\n defaultPath(\"channels\")\r\n ], Channels);\r\n return Channels;\r\n}(GraphQueryableCollection));\r\nexport { Channels };\r\nvar Channel = /** @class */ (function (_super) {\r\n tslib_1.__extends(Channel, _super);\r\n function Channel() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Channel.prototype, \"tabs\", {\r\n get: function () {\r\n return new Tabs(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Channel;\r\n}(GraphQueryableInstance));\r\nexport { Channel };\r\nvar Apps = /** @class */ (function (_super) {\r\n tslib_1.__extends(Apps, _super);\r\n function Apps() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Creates a new App in the Team\r\n * @param appUrl The url to an app ex: https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a\r\n *\r\n */\r\n Apps.prototype.add = function (appUrl) {\r\n var postBody = {\r\n \"teamsApp@odata.bind\": appUrl,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n };\r\n });\r\n };\r\n /**\r\n * Deletes this app\r\n */\r\n Apps.prototype.remove = function () {\r\n return this.deleteCore();\r\n };\r\n Apps = tslib_1.__decorate([\r\n defaultPath(\"installedApps\")\r\n ], Apps);\r\n return Apps;\r\n}(GraphQueryableCollection));\r\nexport { Apps };\r\nvar Tabs = /** @class */ (function (_super) {\r\n tslib_1.__extends(Tabs, _super);\r\n function Tabs() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Adds a tab to the cahnnel\r\n * @param name The name of the new Tab\r\n * @param appUrl The url to an app ex: https://graph.microsoft.com/beta/appCatalogs/teamsApps/12345678-9abc-def0-123456789a\r\n * @param tabsConfiguration visit https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/teamstab_add for reference\r\n */\r\n Tabs.prototype.add = function (name, appUrl, properties) {\r\n var _this = this;\r\n var postBody = extend({\r\n displayName: name,\r\n \"teamsApp@odata.bind\": appUrl,\r\n }, properties);\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n tab: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Tabs.prototype.getById = function (id) {\r\n return new Tab(this, id);\r\n };\r\n Tabs = tslib_1.__decorate([\r\n defaultPath(\"tabs\")\r\n ], Tabs);\r\n return Tabs;\r\n}(GraphQueryableCollection));\r\nexport { Tabs };\r\n/**\r\n * Represents a Microsoft Team\r\n */\r\nvar Tab = /** @class */ (function (_super) {\r\n tslib_1.__extends(Tab, _super);\r\n function Tab() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Tab_1 = Tab;\r\n /**\r\n * Updates this tab\r\n *\r\n * @param properties The set of properties to update\r\n */\r\n // TODO:: update properties to be typed once type is available in graph-types\r\n Tab.prototype.update = function (properties) {\r\n var _this = this;\r\n return this.clone(Tab_1, \"\").patchCore({\r\n body: jsS(properties),\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n tab: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Deletes this tab\r\n */\r\n Tab.prototype.remove = function () {\r\n return this.deleteCore();\r\n };\r\n var Tab_1;\r\n Tab = Tab_1 = tslib_1.__decorate([\r\n defaultPath(\"tab\")\r\n ], Tab);\r\n return Tab;\r\n}(GraphQueryableInstance));\r\nexport { Tab };\r\n//# sourceMappingURL=teams.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nexport var DirectoryObjectType;\r\n(function (DirectoryObjectType) {\r\n /**\r\n * Directory Objects\r\n */\r\n DirectoryObjectType[DirectoryObjectType[\"directoryObject\"] = 0] = \"directoryObject\";\r\n /**\r\n * User\r\n */\r\n DirectoryObjectType[DirectoryObjectType[\"user\"] = 1] = \"user\";\r\n /**\r\n * Group\r\n */\r\n DirectoryObjectType[DirectoryObjectType[\"group\"] = 2] = \"group\";\r\n /**\r\n * Device\r\n */\r\n DirectoryObjectType[DirectoryObjectType[\"device\"] = 3] = \"device\";\r\n})(DirectoryObjectType || (DirectoryObjectType = {}));\r\n/**\r\n * Describes a collection of Directory Objects\r\n *\r\n */\r\nvar DirectoryObjects = /** @class */ (function (_super) {\r\n tslib_1.__extends(DirectoryObjects, _super);\r\n function DirectoryObjects() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DirectoryObjects_1 = DirectoryObjects;\r\n /**\r\n * Gets a directoryObject from the collection using the specified id\r\n *\r\n * @param id Id of the Directory Object to get from this collection\r\n */\r\n DirectoryObjects.prototype.getById = function (id) {\r\n return new DirectoryObject(this, id);\r\n };\r\n /**\r\n * Returns the directory objects specified in a list of ids. NOTE: The directory objects returned are the full objects containing all their properties.\r\n * The $select query option is not available for this operation.\r\n *\r\n * @param ids A collection of ids for which to return objects. You can specify up to 1000 ids.\r\n * @param type A collection of resource types that specifies the set of resource collections to search. Default is directoryObject.\r\n */\r\n DirectoryObjects.prototype.getByIds = function (ids, type) {\r\n if (type === void 0) { type = DirectoryObjectType.directoryObject; }\r\n return this.clone(DirectoryObjects_1, \"getByIds\").postCore({\r\n body: jsS({\r\n ids: ids,\r\n type: type,\r\n }),\r\n });\r\n };\r\n var DirectoryObjects_1;\r\n DirectoryObjects = DirectoryObjects_1 = tslib_1.__decorate([\r\n defaultPath(\"directoryObjects\")\r\n ], DirectoryObjects);\r\n return DirectoryObjects;\r\n}(GraphQueryableCollection));\r\nexport { DirectoryObjects };\r\n/**\r\n * Represents a Directory Object entity\r\n */\r\nvar DirectoryObject = /** @class */ (function (_super) {\r\n tslib_1.__extends(DirectoryObject, _super);\r\n function DirectoryObject() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Deletes this group\r\n */\r\n DirectoryObject.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Returns all the groups and directory roles that the specified Directory Object is a member of. The check is transitive\r\n *\r\n * @param securityEnabledOnly\r\n */\r\n DirectoryObject.prototype.getMemberObjects = function (securityEnabledOnly) {\r\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\r\n return this.clone(DirectoryObject, \"getMemberObjects\").postCore({\r\n body: jsS({\r\n securityEnabledOnly: securityEnabledOnly,\r\n }),\r\n });\r\n };\r\n /**\r\n * Returns all the groups that the specified Directory Object is a member of. The check is transitive\r\n *\r\n * @param securityEnabledOnly\r\n */\r\n DirectoryObject.prototype.getMemberGroups = function (securityEnabledOnly) {\r\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\r\n return this.clone(DirectoryObject, \"getMemberGroups\").postCore({\r\n body: jsS({\r\n securityEnabledOnly: securityEnabledOnly,\r\n }),\r\n });\r\n };\r\n /**\r\n * Check for membership in a specified list of groups, and returns from that list those groups of which the specified user, group, or directory object is a member.\r\n * This function is transitive.\r\n * @param groupIds A collection that contains the object IDs of the groups in which to check membership. Up to 20 groups may be specified.\r\n */\r\n DirectoryObject.prototype.checkMemberGroups = function (groupIds) {\r\n return this.clone(DirectoryObject, \"checkMemberGroups\").postCore({\r\n body: jsS({\r\n groupIds: groupIds,\r\n }),\r\n });\r\n };\r\n return DirectoryObject;\r\n}(GraphQueryableInstance));\r\nexport { DirectoryObject };\r\n//# sourceMappingURL=directoryobjects.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nvar Contacts = /** @class */ (function (_super) {\r\n tslib_1.__extends(Contacts, _super);\r\n function Contacts() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Contacts.prototype.getById = function (id) {\r\n return new Contact(this, id);\r\n };\r\n /**\r\n * Create a new Contact for the user.\r\n *\r\n * @param givenName The contact's given name.\r\n * @param surName The contact's surname.\r\n * @param emailAddresses The contact's email addresses.\r\n * @param businessPhones The contact's business phone numbers.\r\n * @param additionalProperties A plain object collection of additional properties you want to set on the new contact\r\n */\r\n Contacts.prototype.add = function (givenName, surName, emailAddresses, businessPhones, additionalProperties) {\r\n var _this = this;\r\n if (additionalProperties === void 0) { additionalProperties = {}; }\r\n var postBody = extend({\r\n businessPhones: businessPhones,\r\n emailAddresses: emailAddresses,\r\n givenName: givenName,\r\n surName: surName,\r\n }, additionalProperties);\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n contact: _this.getById(r.id),\r\n data: r,\r\n };\r\n });\r\n };\r\n Contacts = tslib_1.__decorate([\r\n defaultPath(\"contacts\")\r\n ], Contacts);\r\n return Contacts;\r\n}(GraphQueryableCollection));\r\nexport { Contacts };\r\nvar Contact = /** @class */ (function (_super) {\r\n tslib_1.__extends(Contact, _super);\r\n function Contact() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Deletes this contact\r\n */\r\n Contact.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a contact object\r\n *\r\n * @param properties Set of properties of this contact to update\r\n */\r\n Contact.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n return Contact;\r\n}(GraphQueryableInstance));\r\nexport { Contact };\r\nvar ContactFolders = /** @class */ (function (_super) {\r\n tslib_1.__extends(ContactFolders, _super);\r\n function ContactFolders() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ContactFolders.prototype.getById = function (id) {\r\n return new ContactFolder(this, id);\r\n };\r\n /**\r\n * Create a new Contact Folder for the user.\r\n *\r\n * @param displayName The folder's display name.\r\n * @param parentFolderId The ID of the folder's parent folder.\r\n */\r\n ContactFolders.prototype.add = function (displayName, parentFolderId) {\r\n var _this = this;\r\n var postBody = {\r\n displayName: displayName,\r\n parentFolderId: parentFolderId,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n contactFolder: _this.getById(r.id),\r\n data: r,\r\n };\r\n });\r\n };\r\n ContactFolders = tslib_1.__decorate([\r\n defaultPath(\"contactFolders\")\r\n ], ContactFolders);\r\n return ContactFolders;\r\n}(GraphQueryableCollection));\r\nexport { ContactFolders };\r\nvar ContactFolder = /** @class */ (function (_super) {\r\n tslib_1.__extends(ContactFolder, _super);\r\n function ContactFolder() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(ContactFolder.prototype, \"contacts\", {\r\n /**\r\n * Gets the contacts in this contact folder\r\n */\r\n get: function () {\r\n return new Contacts(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContactFolder.prototype, \"childFolders\", {\r\n /**\r\n * Gets the contacts in this contact folder\r\n */\r\n get: function () {\r\n return new ContactFolders(this, \"childFolders\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this contact folder\r\n */\r\n ContactFolder.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a contact folder\r\n *\r\n * @param properties Set of properties of this contact folder to update\r\n */\r\n ContactFolder.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n return ContactFolder;\r\n}(GraphQueryableInstance));\r\nexport { ContactFolder };\r\n//# sourceMappingURL=contacts.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\n/**\r\n * Represents a onenote entity\r\n */\r\nvar OneNote = /** @class */ (function (_super) {\r\n tslib_1.__extends(OneNote, _super);\r\n function OneNote() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(OneNote.prototype, \"notebooks\", {\r\n get: function () {\r\n return new Notebooks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(OneNote.prototype, \"sections\", {\r\n get: function () {\r\n return new Sections(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(OneNote.prototype, \"pages\", {\r\n get: function () {\r\n return new Pages(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n OneNote = tslib_1.__decorate([\r\n defaultPath(\"onenote\")\r\n ], OneNote);\r\n return OneNote;\r\n}(GraphQueryableInstance));\r\nexport { OneNote };\r\n/**\r\n * Describes a collection of Notebook objects\r\n *\r\n */\r\nvar Notebooks = /** @class */ (function (_super) {\r\n tslib_1.__extends(Notebooks, _super);\r\n function Notebooks() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a notebook instance by id\r\n *\r\n * @param id Notebook id\r\n */\r\n Notebooks.prototype.getById = function (id) {\r\n return new Notebook(this, id);\r\n };\r\n /**\r\n * Create a new notebook as specified in the request body.\r\n *\r\n * @param displayName Notebook display name\r\n */\r\n Notebooks.prototype.add = function (displayName) {\r\n var _this = this;\r\n var postBody = {\r\n displayName: displayName,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n notebook: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Notebooks = tslib_1.__decorate([\r\n defaultPath(\"notebooks\")\r\n ], Notebooks);\r\n return Notebooks;\r\n}(GraphQueryableCollection));\r\nexport { Notebooks };\r\n/**\r\n * Describes a notebook instance\r\n *\r\n */\r\nvar Notebook = /** @class */ (function (_super) {\r\n tslib_1.__extends(Notebook, _super);\r\n function Notebook(baseUrl, path) {\r\n return _super.call(this, baseUrl, path) || this;\r\n }\r\n Object.defineProperty(Notebook.prototype, \"sections\", {\r\n get: function () {\r\n return new Sections(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return Notebook;\r\n}(GraphQueryableInstance));\r\nexport { Notebook };\r\n/**\r\n * Describes a collection of Sections objects\r\n *\r\n */\r\nvar Sections = /** @class */ (function (_super) {\r\n tslib_1.__extends(Sections, _super);\r\n function Sections() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a section instance by id\r\n *\r\n * @param id Section id\r\n */\r\n Sections.prototype.getById = function (id) {\r\n return new Section(this, id);\r\n };\r\n /**\r\n * Adds a new section\r\n *\r\n * @param displayName New section display name\r\n */\r\n Sections.prototype.add = function (displayName) {\r\n var _this = this;\r\n var postBody = {\r\n displayName: displayName,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n section: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Sections = tslib_1.__decorate([\r\n defaultPath(\"sections\")\r\n ], Sections);\r\n return Sections;\r\n}(GraphQueryableCollection));\r\nexport { Sections };\r\n/**\r\n * Describes a sections instance\r\n *\r\n */\r\nvar Section = /** @class */ (function (_super) {\r\n tslib_1.__extends(Section, _super);\r\n function Section(baseUrl, path) {\r\n return _super.call(this, baseUrl, path) || this;\r\n }\r\n return Section;\r\n}(GraphQueryableInstance));\r\nexport { Section };\r\n/**\r\n * Describes a collection of Pages objects\r\n *\r\n */\r\nvar Pages = /** @class */ (function (_super) {\r\n tslib_1.__extends(Pages, _super);\r\n function Pages() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Pages = tslib_1.__decorate([\r\n defaultPath(\"pages\")\r\n ], Pages);\r\n return Pages;\r\n}(GraphQueryableCollection));\r\nexport { Pages };\r\n//# sourceMappingURL=onenote.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\n/**\r\n * Describes a collection of Drive objects\r\n *\r\n */\r\nvar Drives = /** @class */ (function (_super) {\r\n tslib_1.__extends(Drives, _super);\r\n function Drives() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Drive instance by id\r\n *\r\n * @param id Drive id\r\n */\r\n Drives.prototype.getById = function (id) {\r\n return new Drive(this, id);\r\n };\r\n Drives = tslib_1.__decorate([\r\n defaultPath(\"drives\")\r\n ], Drives);\r\n return Drives;\r\n}(GraphQueryableCollection));\r\nexport { Drives };\r\n/**\r\n * Describes a Drive instance\r\n *\r\n */\r\nvar Drive = /** @class */ (function (_super) {\r\n tslib_1.__extends(Drive, _super);\r\n function Drive() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Drive.prototype, \"root\", {\r\n get: function () {\r\n return new Root(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Drive.prototype, \"items\", {\r\n get: function () {\r\n return new DriveItems(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Drive.prototype, \"list\", {\r\n get: function () {\r\n return new DriveList(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Drive.prototype, \"recent\", {\r\n get: function () {\r\n return new Recent(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Drive.prototype, \"sharedWithMe\", {\r\n get: function () {\r\n return new SharedWithMe(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Drive = tslib_1.__decorate([\r\n defaultPath(\"drive\")\r\n ], Drive);\r\n return Drive;\r\n}(GraphQueryableInstance));\r\nexport { Drive };\r\n/**\r\n * Describes a Root instance\r\n *\r\n */\r\nvar Root = /** @class */ (function (_super) {\r\n tslib_1.__extends(Root, _super);\r\n function Root() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Root.prototype, \"children\", {\r\n get: function () {\r\n return new Children(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Root.prototype.search = function (query) {\r\n return new DriveSearch(this, \"search(q='\" + query + \"')\");\r\n };\r\n Root = tslib_1.__decorate([\r\n defaultPath(\"root\")\r\n ], Root);\r\n return Root;\r\n}(GraphQueryableInstance));\r\nexport { Root };\r\n/**\r\n * Describes a collection of Drive Item objects\r\n *\r\n */\r\nvar DriveItems = /** @class */ (function (_super) {\r\n tslib_1.__extends(DriveItems, _super);\r\n function DriveItems() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Drive Item instance by id\r\n *\r\n * @param id Drive Item id\r\n */\r\n DriveItems.prototype.getById = function (id) {\r\n return new DriveItem(this, id);\r\n };\r\n DriveItems = tslib_1.__decorate([\r\n defaultPath(\"items\")\r\n ], DriveItems);\r\n return DriveItems;\r\n}(GraphQueryableCollection));\r\nexport { DriveItems };\r\n/**\r\n * Describes a Drive Item instance\r\n *\r\n */\r\nvar DriveItem = /** @class */ (function (_super) {\r\n tslib_1.__extends(DriveItem, _super);\r\n function DriveItem() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(DriveItem.prototype, \"children\", {\r\n get: function () {\r\n return new Children(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DriveItem.prototype, \"thumbnails\", {\r\n get: function () {\r\n return new Thumbnails(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this Drive Item\r\n */\r\n DriveItem.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a Drive item\r\n *\r\n * @param properties Set of properties of this Drive Item to update\r\n */\r\n DriveItem.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Move the Drive item and optionally update the properties\r\n *\r\n * @param parentReference Should contain Id of new parent folder\r\n * @param properties Optional set of properties of this Drive Item to update\r\n */\r\n DriveItem.prototype.move = function (parentReference, properties) {\r\n var patchBody = extend({}, parentReference);\r\n if (properties) {\r\n patchBody = extend({}, properties);\r\n }\r\n return this.patchCore({\r\n body: jsS(patchBody),\r\n });\r\n };\r\n return DriveItem;\r\n}(GraphQueryableInstance));\r\nexport { DriveItem };\r\n/**\r\n * Return a collection of DriveItems in the children relationship of a DriveItem\r\n *\r\n */\r\nvar Children = /** @class */ (function (_super) {\r\n tslib_1.__extends(Children, _super);\r\n function Children() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Create a new folder or DriveItem in a Drive with a specified parent item or path\r\n * Currently only Folder or File works\r\n * @param name The name of the Drive Item.\r\n * @param properties Type of Drive Item to create.\r\n * */\r\n Children.prototype.add = function (name, driveItemType) {\r\n var _this = this;\r\n var postBody = extend({\r\n name: name,\r\n }, driveItemType);\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n driveItem: new DriveItem(_this, r.id),\r\n };\r\n });\r\n };\r\n Children = tslib_1.__decorate([\r\n defaultPath(\"children\")\r\n ], Children);\r\n return Children;\r\n}(GraphQueryableCollection));\r\nexport { Children };\r\nvar DriveList = /** @class */ (function (_super) {\r\n tslib_1.__extends(DriveList, _super);\r\n function DriveList() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DriveList = tslib_1.__decorate([\r\n defaultPath(\"list\")\r\n ], DriveList);\r\n return DriveList;\r\n}(GraphQueryableCollection));\r\nexport { DriveList };\r\nvar Recent = /** @class */ (function (_super) {\r\n tslib_1.__extends(Recent, _super);\r\n function Recent() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Recent = tslib_1.__decorate([\r\n defaultPath(\"recent\")\r\n ], Recent);\r\n return Recent;\r\n}(GraphQueryableInstance));\r\nexport { Recent };\r\nvar SharedWithMe = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharedWithMe, _super);\r\n function SharedWithMe() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SharedWithMe = tslib_1.__decorate([\r\n defaultPath(\"sharedWithMe\")\r\n ], SharedWithMe);\r\n return SharedWithMe;\r\n}(GraphQueryableInstance));\r\nexport { SharedWithMe };\r\nvar DriveSearch = /** @class */ (function (_super) {\r\n tslib_1.__extends(DriveSearch, _super);\r\n function DriveSearch() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DriveSearch = tslib_1.__decorate([\r\n defaultPath(\"search\")\r\n ], DriveSearch);\r\n return DriveSearch;\r\n}(GraphQueryableInstance));\r\nexport { DriveSearch };\r\nvar Thumbnails = /** @class */ (function (_super) {\r\n tslib_1.__extends(Thumbnails, _super);\r\n function Thumbnails() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Thumbnails = tslib_1.__decorate([\r\n defaultPath(\"thumbnails\")\r\n ], Thumbnails);\r\n return Thumbnails;\r\n}(GraphQueryableInstance));\r\nexport { Thumbnails };\r\n//# sourceMappingURL=onedrive.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nvar Messages = /** @class */ (function (_super) {\r\n tslib_1.__extends(Messages, _super);\r\n function Messages() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a member of the group by id\r\n *\r\n * @param id Attachment id\r\n */\r\n Messages.prototype.getById = function (id) {\r\n return new Message(this, id);\r\n };\r\n /**\r\n * Add a message to this collection\r\n *\r\n * @param message The message details\r\n */\r\n Messages.prototype.add = function (message) {\r\n return this.postCore({\r\n body: jsS(message),\r\n });\r\n };\r\n Messages = tslib_1.__decorate([\r\n defaultPath(\"messages\")\r\n ], Messages);\r\n return Messages;\r\n}(GraphQueryableCollection));\r\nexport { Messages };\r\nvar Message = /** @class */ (function (_super) {\r\n tslib_1.__extends(Message, _super);\r\n function Message() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Message;\r\n}(GraphQueryableInstance));\r\nexport { Message };\r\nvar MailFolders = /** @class */ (function (_super) {\r\n tslib_1.__extends(MailFolders, _super);\r\n function MailFolders() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a member of the group by id\r\n *\r\n * @param id Attachment id\r\n */\r\n MailFolders.prototype.getById = function (id) {\r\n return new MailFolder(this, id);\r\n };\r\n /**\r\n * Add a mail folder to this collection\r\n *\r\n * @param message The message details\r\n */\r\n MailFolders.prototype.add = function (mailFolder) {\r\n return this.postCore({\r\n body: jsS(mailFolder),\r\n });\r\n };\r\n MailFolders = tslib_1.__decorate([\r\n defaultPath(\"mailFolders\")\r\n ], MailFolders);\r\n return MailFolders;\r\n}(GraphQueryableCollection));\r\nexport { MailFolders };\r\nvar MailFolder = /** @class */ (function (_super) {\r\n tslib_1.__extends(MailFolder, _super);\r\n function MailFolder() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return MailFolder;\r\n}(GraphQueryableInstance));\r\nexport { MailFolder };\r\nvar MailboxSettings = /** @class */ (function (_super) {\r\n tslib_1.__extends(MailboxSettings, _super);\r\n function MailboxSettings() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MailboxSettings.prototype.update = function (settings) {\r\n return this.patchCore({\r\n body: jsS(settings),\r\n });\r\n };\r\n MailboxSettings = tslib_1.__decorate([\r\n defaultPath(\"mailboxSettings\")\r\n ], MailboxSettings);\r\n return MailboxSettings;\r\n}(GraphQueryableInstance));\r\nexport { MailboxSettings };\r\n//# sourceMappingURL=messages.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nvar People = /** @class */ (function (_super) {\r\n tslib_1.__extends(People, _super);\r\n function People() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n People = tslib_1.__decorate([\r\n defaultPath(\"people\")\r\n ], People);\r\n return People;\r\n}(GraphQueryableCollection));\r\nexport { People };\r\n//# sourceMappingURL=people.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\n/**\r\n * Represents a Insights entity\r\n */\r\nvar Insights = /** @class */ (function (_super) {\r\n tslib_1.__extends(Insights, _super);\r\n function Insights() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Insights.prototype, \"trending\", {\r\n get: function () {\r\n return new Trending(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Insights.prototype, \"used\", {\r\n get: function () {\r\n return new Used(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Insights.prototype, \"shared\", {\r\n get: function () {\r\n return new Shared(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Insights = tslib_1.__decorate([\r\n defaultPath(\"insights\")\r\n ], Insights);\r\n return Insights;\r\n}(GraphQueryableInstance));\r\nexport { Insights };\r\n/**\r\n * Describes a collection of Trending objects\r\n *\r\n */\r\nvar Trending = /** @class */ (function (_super) {\r\n tslib_1.__extends(Trending, _super);\r\n function Trending() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Trending = tslib_1.__decorate([\r\n defaultPath(\"trending\")\r\n ], Trending);\r\n return Trending;\r\n}(GraphQueryableCollection));\r\nexport { Trending };\r\n/**\r\n * Describes a collection of Used objects\r\n *\r\n */\r\nvar Used = /** @class */ (function (_super) {\r\n tslib_1.__extends(Used, _super);\r\n function Used() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Used = tslib_1.__decorate([\r\n defaultPath(\"used\")\r\n ], Used);\r\n return Used;\r\n}(GraphQueryableCollection));\r\nexport { Used };\r\n/**\r\n * Describes a collection of Shared objects\r\n *\r\n */\r\nvar Shared = /** @class */ (function (_super) {\r\n tslib_1.__extends(Shared, _super);\r\n function Shared() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Shared = tslib_1.__decorate([\r\n defaultPath(\"shared\")\r\n ], Shared);\r\n return Shared;\r\n}(GraphQueryableCollection));\r\nexport { Shared };\r\n//# sourceMappingURL=insights.js.map","import * as tslib_1 from \"tslib\";\r\nimport { jsS } from \"@pnp/common\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { Contacts, ContactFolders } from \"./contacts\";\r\nimport { OneNote } from \"./onenote\";\r\nimport { Drive, Drives } from \"./onedrive\";\r\nimport { Tasks } from \"./planner\";\r\nimport { Teams } from \"./teams\";\r\nimport { Messages, MailboxSettings, MailFolders } from \"./messages\";\r\nimport { DirectoryObjects } from \"./directoryobjects\";\r\nimport { People } from \"./people\";\r\nimport { Photo } from \"./photos\";\r\nimport { Calendar } from \"./calendars\";\r\nimport { Insights } from \"./insights\";\r\n/**\r\n * Describes a collection of Users objects\r\n *\r\n */\r\nvar Users = /** @class */ (function (_super) {\r\n tslib_1.__extends(Users, _super);\r\n function Users() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a user from the collection using the specified id\r\n *\r\n * @param id Id of the user to get from this collection\r\n */\r\n Users.prototype.getById = function (id) {\r\n return new User(this, id);\r\n };\r\n Users = tslib_1.__decorate([\r\n defaultPath(\"users\")\r\n ], Users);\r\n return Users;\r\n}(GraphQueryableCollection));\r\nexport { Users };\r\n/**\r\n * Represents a user entity\r\n */\r\nvar User = /** @class */ (function (_super) {\r\n tslib_1.__extends(User, _super);\r\n function User() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(User.prototype, \"onenote\", {\r\n /**\r\n * The onenote associated with me\r\n */\r\n get: function () {\r\n return new OneNote(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"contacts\", {\r\n /**\r\n * The Contacts associated with the user\r\n */\r\n get: function () {\r\n return new Contacts(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"calendar\", {\r\n /**\r\n * The calendar associated with the user\r\n */\r\n get: function () {\r\n return new Calendar(this, \"calendar\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"photo\", {\r\n /**\r\n * The photo associated with the user\r\n */\r\n get: function () {\r\n return new Photo(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"joinedTeams\", {\r\n /**\r\n * The Teams associated with the user\r\n */\r\n get: function () {\r\n return new Teams(this, \"joinedTeams\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"memberOf\", {\r\n /**\r\n * The groups and directory roles associated with the user\r\n */\r\n get: function () {\r\n return new DirectoryObjects(this, \"memberOf\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns all the groups and directory roles that the specified useris a member of. The check is transitive\r\n *\r\n * @param securityEnabledOnly\r\n */\r\n User.prototype.getMemberObjects = function (securityEnabledOnly) {\r\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\r\n return this.clone(User, \"getMemberObjects\").postCore({\r\n body: jsS({\r\n securityEnabledOnly: securityEnabledOnly,\r\n }),\r\n });\r\n };\r\n /**\r\n * Return all the groups that the specified user is a member of. The check is transitive\r\n *\r\n * @param securityEnabledOnly\r\n */\r\n User.prototype.getMemberGroups = function (securityEnabledOnly) {\r\n if (securityEnabledOnly === void 0) { securityEnabledOnly = false; }\r\n return this.clone(User, \"getMemberGroups\").postCore({\r\n body: jsS({\r\n securityEnabledOnly: securityEnabledOnly,\r\n }),\r\n });\r\n };\r\n /**\r\n * Check for membership in a specified list of groups, and returns from that list those groups of which the specified user, group, or directory object is a member.\r\n * This function is transitive.\r\n * @param groupIds A collection that contains the object IDs of the groups in which to check membership. Up to 20 groups may be specified.\r\n */\r\n User.prototype.checkMemberGroups = function (groupIds) {\r\n return this.clone(User, \"checkMemberGroups\").postCore({\r\n body: jsS({\r\n groupIds: groupIds,\r\n }),\r\n });\r\n };\r\n Object.defineProperty(User.prototype, \"contactFolders\", {\r\n /**\r\n * The Contact Folders associated with the user\r\n */\r\n get: function () {\r\n return new ContactFolders(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"drive\", {\r\n /**\r\n * The default Drive associated with the user\r\n */\r\n get: function () {\r\n return new Drive(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"drives\", {\r\n /**\r\n * The Drives the user has available\r\n */\r\n get: function () {\r\n return new Drives(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"tasks\", {\r\n /**\r\n * The Tasks the user has available\r\n */\r\n get: function () {\r\n return new Tasks(this, \"planner/tasks\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"messages\", {\r\n /**\r\n * Get the messages in the signed-in user's mailbox\r\n */\r\n get: function () {\r\n return new Messages(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"mailboxSettings\", {\r\n /**\r\n * Get the MailboxSettings in the signed-in user's mailbox\r\n */\r\n get: function () {\r\n return new MailboxSettings(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"mailFolders\", {\r\n /**\r\n * Get the MailboxSettings in the signed-in user's mailbox\r\n */\r\n get: function () {\r\n return new MailFolders(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates this user\r\n *\r\n * @param properties Properties used to update this user\r\n */\r\n User.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n /**\r\n * Deletes this user\r\n */\r\n User.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Send the message specified in the request body. The message is saved in the Sent Items folder by default.\r\n *\r\n * @param message The message details to send\r\n * @param saveToSentItems If true the message will be saved to sent items. Default: false\r\n */\r\n User.prototype.sendMail = function (message, saveToSentItems) {\r\n if (saveToSentItems === void 0) { saveToSentItems = false; }\r\n return this.clone(User, \"sendMail\").postCore({\r\n body: jsS({ message: message, saveToSentItems: saveToSentItems }),\r\n });\r\n };\r\n Object.defineProperty(User.prototype, \"people\", {\r\n /**\r\n * People ordered by their relevance to the user\r\n */\r\n get: function () {\r\n return new People(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"directReports\", {\r\n /**\r\n * People that have direct reports to the user\r\n */\r\n get: function () {\r\n return new People(this, \"directReports\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"insights\", {\r\n /**\r\n * The Insights associated with this user\r\n */\r\n get: function () {\r\n return new Insights(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(User.prototype, \"manager\", {\r\n /**\r\n * The manager associated with this user\r\n */\r\n get: function () {\r\n return new User(this, \"manager\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return User;\r\n}(GraphQueryableInstance));\r\nexport { User };\r\n//# sourceMappingURL=users.js.map","import * as tslib_1 from \"tslib\";\r\nimport { ODataBatch } from \"@pnp/odata\";\r\nimport { Logger } from \"@pnp/logging\";\r\nimport { extend, jsS, isUrlAbsolute } from \"@pnp/common\";\r\nimport { GraphRuntimeConfig } from \"./config/graphlibconfig\";\r\nimport { GraphHttpClient } from \"./net/graphhttpclient\";\r\nvar GraphBatch = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphBatch, _super);\r\n function GraphBatch(batchUrl, maxRequests) {\r\n if (batchUrl === void 0) { batchUrl = \"https://graph.microsoft.com/v1.0/$batch\"; }\r\n if (maxRequests === void 0) { maxRequests = 20; }\r\n var _this = _super.call(this) || this;\r\n _this.batchUrl = batchUrl;\r\n _this.maxRequests = maxRequests;\r\n return _this;\r\n }\r\n /**\r\n * Urls come to the batch absolute, but the processor expects relative\r\n * @param url Url to ensure is relative\r\n */\r\n GraphBatch.makeUrlRelative = function (url) {\r\n if (!isUrlAbsolute(url)) {\r\n // already not absolute, just give it back\r\n return url;\r\n }\r\n var index = url.indexOf(\".com/v1.0/\");\r\n if (index < 0) {\r\n index = url.indexOf(\".com/beta/\");\r\n if (index > -1) {\r\n // beta url\r\n return url.substr(index + 10);\r\n }\r\n }\r\n else {\r\n // v1.0 url\r\n return url.substr(index + 9);\r\n }\r\n // no idea\r\n return url;\r\n };\r\n GraphBatch.formatRequests = function (requests) {\r\n var _this = this;\r\n return requests.map(function (reqInfo, index) {\r\n var requestFragment = {\r\n id: \"\" + ++index,\r\n method: reqInfo.method,\r\n url: _this.makeUrlRelative(reqInfo.url),\r\n };\r\n var headers = {};\r\n // merge global config headers\r\n if (GraphRuntimeConfig.headers !== undefined && GraphRuntimeConfig.headers !== null) {\r\n headers = extend(headers, GraphRuntimeConfig.headers);\r\n }\r\n if (reqInfo.options !== undefined) {\r\n // merge per request headers\r\n if (reqInfo.options.headers !== undefined && reqInfo.options.headers !== null) {\r\n headers = extend(headers, reqInfo.options.headers);\r\n }\r\n // add a request body\r\n if (reqInfo.options.body !== undefined && reqInfo.options.body !== null) {\r\n requestFragment = extend(requestFragment, {\r\n body: reqInfo.options.body,\r\n });\r\n }\r\n }\r\n requestFragment = extend(requestFragment, {\r\n headers: headers,\r\n });\r\n return requestFragment;\r\n });\r\n };\r\n GraphBatch.parseResponse = function (requests, graphResponse) {\r\n return new Promise(function (resolve) {\r\n var parsedResponses = new Array(requests.length).fill(null);\r\n for (var i = 0; i < graphResponse.responses.length; ++i) {\r\n var response = graphResponse.responses[i];\r\n // we create the request id by adding 1 to the index, so we place the response by subtracting one to match\r\n // the array of requests and make it easier to map them by index\r\n var responseId = parseInt(response.id, 10) - 1;\r\n if (response.status === 204) {\r\n parsedResponses[responseId] = new Response();\r\n }\r\n else {\r\n parsedResponses[responseId] = new Response(JSON.stringify(response.body), response);\r\n }\r\n }\r\n resolve({\r\n nextLink: graphResponse.nextLink,\r\n responses: parsedResponses,\r\n });\r\n });\r\n };\r\n GraphBatch.prototype.executeImpl = function () {\r\n var _this = this;\r\n Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this.requests.length + \" requests.\", 1 /* Info */);\r\n if (this.requests.length < 1) {\r\n Logger.write(\"Resolving empty batch.\", 1 /* Info */);\r\n return Promise.resolve();\r\n }\r\n var client = new GraphHttpClient();\r\n // create a working copy of our requests\r\n var requests = this.requests.slice();\r\n // this is the root of our promise chain\r\n var promise = Promise.resolve();\r\n var _loop_1 = function () {\r\n var requestsChunk = requests.splice(0, this_1.maxRequests);\r\n var batchRequest = {\r\n requests: GraphBatch.formatRequests(requestsChunk),\r\n };\r\n var batchOptions = {\r\n body: jsS(batchRequest),\r\n headers: {\r\n \"Accept\": \"application/json\",\r\n \"Content-Type\": \"application/json\",\r\n },\r\n method: \"POST\",\r\n };\r\n Logger.write(\"[\" + this_1.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", 1 /* Info */);\r\n client.fetch(this_1.batchUrl, batchOptions)\r\n .then(function (r) { return r.json(); })\r\n .then(function (j) { return GraphBatch.parseResponse(requestsChunk, j); })\r\n .then(function (parsedResponse) {\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", 1 /* Info */);\r\n parsedResponse.responses.reduce(function (chain, response, index) {\r\n var request = requestsChunk[index];\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched request \" + request.method + \" \" + request.url + \".\", 0 /* Verbose */);\r\n return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); });\r\n }, promise);\r\n });\r\n };\r\n var this_1 = this;\r\n while (requests.length > 0) {\r\n _loop_1();\r\n }\r\n return promise;\r\n };\r\n return GraphBatch;\r\n}(ODataBatch));\r\nexport { GraphBatch };\r\n//# sourceMappingURL=batch.js.map","import * as tslib_1 from \"tslib\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nimport { GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nvar Invitations = /** @class */ (function (_super) {\r\n tslib_1.__extends(Invitations, _super);\r\n function Invitations() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Create a new Invitation via invitation manager.\r\n *\r\n * @param invitedUserEmailAddress The email address of the user being invited.\r\n * @param inviteRedirectUrl The URL user should be redirected to once the invitation is redeemed.\r\n * @param additionalProperties A plain object collection of additional properties you want to set in the invitation\r\n */\r\n Invitations.prototype.create = function (invitedUserEmailAddress, inviteRedirectUrl, additionalProperties) {\r\n if (additionalProperties === void 0) { additionalProperties = {}; }\r\n var postBody = extend({\r\n inviteRedirectUrl: inviteRedirectUrl,\r\n invitedUserEmailAddress: invitedUserEmailAddress,\r\n }, additionalProperties);\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n };\r\n });\r\n };\r\n Invitations = tslib_1.__decorate([\r\n defaultPath(\"invitations\")\r\n ], Invitations);\r\n return Invitations;\r\n}(GraphQueryableCollection));\r\nexport { Invitations };\r\n//# sourceMappingURL=invitations.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nvar Subscriptions = /** @class */ (function (_super) {\r\n tslib_1.__extends(Subscriptions, _super);\r\n function Subscriptions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Subscriptions.prototype.getById = function (id) {\r\n return new Subscription(this, id);\r\n };\r\n /**\r\n * Create a new Subscription.\r\n *\r\n * @param changeType Indicates the type of change in the subscribed resource that will raise a notification. The supported values are: created, updated, deleted.\r\n * @param notificationUrl The URL of the endpoint that will receive the notifications. This URL must make use of the HTTPS protocol.\r\n * @param resource Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/).\r\n * @param expirationDateTime Specifies the date and time when the webhook subscription expires. The time is in UTC.\r\n * @param additionalProperties A plain object collection of additional properties you want to set on the new subscription\r\n *\r\n */\r\n Subscriptions.prototype.add = function (changeType, notificationUrl, resource, expirationDateTime, additionalProperties) {\r\n var _this = this;\r\n if (additionalProperties === void 0) { additionalProperties = {}; }\r\n var postBody = extend({\r\n changeType: changeType,\r\n expirationDateTime: expirationDateTime,\r\n notificationUrl: notificationUrl,\r\n resource: resource,\r\n }, additionalProperties);\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n subscription: _this.getById(r.id),\r\n };\r\n });\r\n };\r\n Subscriptions = tslib_1.__decorate([\r\n defaultPath(\"subscriptions\")\r\n ], Subscriptions);\r\n return Subscriptions;\r\n}(GraphQueryableCollection));\r\nexport { Subscriptions };\r\nvar Subscription = /** @class */ (function (_super) {\r\n tslib_1.__extends(Subscription, _super);\r\n function Subscription() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Deletes this Subscription\r\n */\r\n Subscription.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a Subscription\r\n *\r\n * @param properties Set of properties of this Subscription to update\r\n */\r\n Subscription.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n return Subscription;\r\n}(GraphQueryableInstance));\r\nexport { Subscription };\r\n//# sourceMappingURL=subscriptions.js.map","import * as tslib_1 from \"tslib\";\r\nimport { jsS } from \"@pnp/common\";\r\nimport { GraphQueryableCollection, defaultPath, GraphQueryableInstance } from \"./graphqueryable\";\r\nvar Security = /** @class */ (function (_super) {\r\n tslib_1.__extends(Security, _super);\r\n function Security() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Security.prototype, \"alerts\", {\r\n get: function () {\r\n return new Alerts(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Security = tslib_1.__decorate([\r\n defaultPath(\"security\")\r\n ], Security);\r\n return Security;\r\n}(GraphQueryableInstance));\r\nexport { Security };\r\nvar Alerts = /** @class */ (function (_super) {\r\n tslib_1.__extends(Alerts, _super);\r\n function Alerts() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Alerts.prototype.getById = function (id) {\r\n return new Alert(this, id);\r\n };\r\n Alerts = tslib_1.__decorate([\r\n defaultPath(\"alerts\")\r\n ], Alerts);\r\n return Alerts;\r\n}(GraphQueryableCollection));\r\nexport { Alerts };\r\nvar Alert = /** @class */ (function (_super) {\r\n tslib_1.__extends(Alert, _super);\r\n function Alert() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Update the properties of an Alert\r\n *\r\n * @param properties Set of properties of this Alert to update\r\n */\r\n Alert.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n return Alert;\r\n}(GraphQueryableInstance));\r\nexport { Alert };\r\n//# sourceMappingURL=security.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryableInstance, GraphQueryableCollection, defaultPath } from \"./graphqueryable\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nimport { Drive, Drives, DriveItem, } from \"./onedrive\";\r\n/**\r\n * Represents a Sites entity\r\n */\r\nvar Sites = /** @class */ (function (_super) {\r\n tslib_1.__extends(Sites, _super);\r\n function Sites() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Sites.prototype, \"root\", {\r\n /**\r\n * Gets the root site collection of the tenant\r\n */\r\n get: function () {\r\n return new GraphSite(this, \"root\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a Site instance by id\r\n *\r\n * @param baseUrl Base url ex: contoso.sharepoint.com\r\n * @param relativeUrl Optional relative url ex: /sites/site\r\n */\r\n Sites.prototype.getById = function (baseUrl, relativeUrl) {\r\n var siteUrl = baseUrl;\r\n // If a relative URL combine url with : at the right places\r\n if (relativeUrl) {\r\n siteUrl = this._urlCombine(baseUrl, relativeUrl);\r\n }\r\n return new GraphSite(this, siteUrl);\r\n };\r\n /**\r\n * Method to make sure the url is encoded as it should with :\r\n *\r\n */\r\n Sites.prototype._urlCombine = function (baseUrl, relativeUrl) {\r\n // remove last '/' of base if exists\r\n if (baseUrl.lastIndexOf(\"/\") === baseUrl.length - 1) {\r\n baseUrl = baseUrl.substring(0, baseUrl.length - 1);\r\n }\r\n // remove '/' at 0\r\n if (relativeUrl.charAt(0) === \"/\") {\r\n relativeUrl = relativeUrl.substring(1, relativeUrl.length);\r\n }\r\n // remove last '/' of next if exists\r\n if (relativeUrl.lastIndexOf(\"/\") === relativeUrl.length - 1) {\r\n relativeUrl = relativeUrl.substring(0, relativeUrl.length - 1);\r\n }\r\n return baseUrl + \":/\" + relativeUrl + \":\";\r\n };\r\n Sites = tslib_1.__decorate([\r\n defaultPath(\"sites\")\r\n ], Sites);\r\n return Sites;\r\n}(GraphQueryableInstance));\r\nexport { Sites };\r\n/**\r\n * Describes a Site object\r\n *\r\n */\r\nvar GraphSite = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphSite, _super);\r\n function GraphSite() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(GraphSite.prototype, \"columns\", {\r\n get: function () {\r\n return new GraphColumns(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphSite.prototype, \"contentTypes\", {\r\n get: function () {\r\n return new GraphContentTypes(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphSite.prototype, \"drive\", {\r\n get: function () {\r\n return new Drive(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphSite.prototype, \"drives\", {\r\n get: function () {\r\n return new Drives(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphSite.prototype, \"lists\", {\r\n get: function () {\r\n return new GraphLists(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphSite.prototype, \"sites\", {\r\n get: function () {\r\n return new Sites(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraphSite;\r\n}(GraphQueryableInstance));\r\nexport { GraphSite };\r\n/**\r\n* Describes a collection of Content Type objects\r\n*\r\n*/\r\nvar GraphContentTypes = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphContentTypes, _super);\r\n function GraphContentTypes() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Content Type instance by id\r\n *\r\n * @param id Content Type id\r\n */\r\n GraphContentTypes.prototype.getById = function (id) {\r\n return new GraphContentType(this, id);\r\n };\r\n GraphContentTypes = tslib_1.__decorate([\r\n defaultPath(\"contenttypes\")\r\n ], GraphContentTypes);\r\n return GraphContentTypes;\r\n}(GraphQueryableCollection));\r\nexport { GraphContentTypes };\r\n/**\r\n * Describes a Content Type object\r\n *\r\n */\r\nvar GraphContentType = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphContentType, _super);\r\n function GraphContentType() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return GraphContentType;\r\n}(GraphQueryableInstance));\r\nexport { GraphContentType };\r\n/**\r\n * Describes a collection of Column Definition objects\r\n *\r\n */\r\nvar GraphColumns = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphColumns, _super);\r\n function GraphColumns() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Column instance by id\r\n *\r\n * @param id Column id\r\n */\r\n GraphColumns.prototype.getById = function (id) {\r\n return new GraphColumn(this, id);\r\n };\r\n GraphColumns = tslib_1.__decorate([\r\n defaultPath(\"columns\")\r\n ], GraphColumns);\r\n return GraphColumns;\r\n}(GraphQueryableCollection));\r\nexport { GraphColumns };\r\n/**\r\n * Describes a Column Definition object\r\n *\r\n */\r\nvar GraphColumn = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphColumn, _super);\r\n function GraphColumn() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(GraphColumn.prototype, \"columnLinks\", {\r\n get: function () {\r\n return new GraphColumnLinks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraphColumn;\r\n}(GraphQueryableInstance));\r\nexport { GraphColumn };\r\n/**\r\n * Describes a collection of Column Link objects\r\n *\r\n */\r\nvar GraphColumnLinks = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphColumnLinks, _super);\r\n function GraphColumnLinks() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Column Link instance by id\r\n *\r\n * @param id Column link id\r\n */\r\n GraphColumnLinks.prototype.getById = function (id) {\r\n return new GraphColumnLink(this, id);\r\n };\r\n GraphColumnLinks = tslib_1.__decorate([\r\n defaultPath(\"columnlinks\")\r\n ], GraphColumnLinks);\r\n return GraphColumnLinks;\r\n}(GraphQueryableCollection));\r\nexport { GraphColumnLinks };\r\n/**\r\n * Describes a Column Link object\r\n *\r\n */\r\nvar GraphColumnLink = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphColumnLink, _super);\r\n function GraphColumnLink() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return GraphColumnLink;\r\n}(GraphQueryableInstance));\r\nexport { GraphColumnLink };\r\n/**\r\n* Describes a collection of Column definitions objects\r\n*/\r\nvar GraphLists = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphLists, _super);\r\n function GraphLists() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a List instance by id\r\n *\r\n * @param id List id\r\n */\r\n GraphLists.prototype.getById = function (id) {\r\n return new GraphList(this, id);\r\n };\r\n /**\r\n * Create a new List\r\n * @param displayName The display name of the List\r\n * @param list List information. Which template, if hidden, and contentTypesEnabled.\r\n * @param additionalProperties A plain object collection of additional properties you want to set in list\r\n *\r\n * */\r\n GraphLists.prototype.create = function (displayName, list, additionalProperties) {\r\n var _this = this;\r\n if (additionalProperties === void 0) { additionalProperties = {}; }\r\n var postBody = extend({\r\n displayName: displayName,\r\n list: list,\r\n }, additionalProperties);\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n list: new GraphList(_this, r.id),\r\n };\r\n });\r\n };\r\n GraphLists = tslib_1.__decorate([\r\n defaultPath(\"lists\")\r\n ], GraphLists);\r\n return GraphLists;\r\n}(GraphQueryableCollection));\r\nexport { GraphLists };\r\n/**\r\n * Describes a List object\r\n *\r\n */\r\nvar GraphList = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphList, _super);\r\n function GraphList() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(GraphList.prototype, \"columns\", {\r\n get: function () {\r\n return new GraphColumns(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphList.prototype, \"contentTypes\", {\r\n get: function () {\r\n return new GraphContentTypes(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphList.prototype, \"drive\", {\r\n get: function () {\r\n return new Drive(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphList.prototype, \"items\", {\r\n get: function () {\r\n return new GraphItems(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraphList;\r\n}(GraphQueryableInstance));\r\nexport { GraphList };\r\n/**\r\n* Describes a collection of Item objects\r\n*/\r\nvar GraphItems = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphItems, _super);\r\n function GraphItems() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a List Item instance by id\r\n *\r\n * @param id List item id\r\n */\r\n GraphItems.prototype.getById = function (id) {\r\n return new GraphItem(this, id);\r\n };\r\n /**\r\n * Create a new Item\r\n * @param displayName The display name of the List\r\n * @param list List information. Which template, if hidden, and contentTypesEnabled.\r\n * @param additionalProperties A plain object collection of additional properties you want to set in list\r\n *\r\n * */\r\n GraphItems.prototype.create = function (fields) {\r\n var _this = this;\r\n var postBody = {\r\n fields: fields,\r\n };\r\n return this.postCore({\r\n body: jsS(postBody),\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n item: new GraphItem(_this, r.id),\r\n };\r\n });\r\n };\r\n GraphItems = tslib_1.__decorate([\r\n defaultPath(\"items\")\r\n ], GraphItems);\r\n return GraphItems;\r\n}(GraphQueryableCollection));\r\nexport { GraphItems };\r\n/**\r\n * Describes an Item object\r\n *\r\n */\r\nvar GraphItem = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphItem, _super);\r\n function GraphItem() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(GraphItem.prototype, \"driveItem\", {\r\n get: function () {\r\n return new DriveItem(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphItem.prototype, \"fields\", {\r\n get: function () {\r\n return new GraphFields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphItem.prototype, \"versions\", {\r\n get: function () {\r\n return new GraphVersions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this item\r\n */\r\n GraphItem.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n /**\r\n * Update the properties of a item object\r\n *\r\n * @param properties Set of properties of this item to update\r\n */\r\n GraphItem.prototype.update = function (properties) {\r\n return this.patchCore({\r\n body: jsS(properties),\r\n });\r\n };\r\n return GraphItem;\r\n}(GraphQueryableInstance));\r\nexport { GraphItem };\r\n/**\r\n * Describes a collection of Field objects\r\n *\r\n */\r\nvar GraphFields = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphFields, _super);\r\n function GraphFields() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n GraphFields = tslib_1.__decorate([\r\n defaultPath(\"fields\")\r\n ], GraphFields);\r\n return GraphFields;\r\n}(GraphQueryableCollection));\r\nexport { GraphFields };\r\n/**\r\n * Describes a collection of Version objects\r\n *\r\n */\r\nvar GraphVersions = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphVersions, _super);\r\n function GraphVersions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Version instance by id\r\n *\r\n * @param id Version id\r\n */\r\n GraphVersions.prototype.getById = function (id) {\r\n return new Version(this, id);\r\n };\r\n GraphVersions = tslib_1.__decorate([\r\n defaultPath(\"versions\")\r\n ], GraphVersions);\r\n return GraphVersions;\r\n}(GraphQueryableCollection));\r\nexport { GraphVersions };\r\n/**\r\n * Describes a Version object\r\n *\r\n */\r\nvar Version = /** @class */ (function (_super) {\r\n tslib_1.__extends(Version, _super);\r\n function Version() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Version;\r\n}(GraphQueryableInstance));\r\nexport { Version };\r\n//# sourceMappingURL=sites.js.map","import * as tslib_1 from \"tslib\";\r\nimport { GraphQueryable } from \"./graphqueryable\";\r\nimport { setup as _setup, } from \"./config/graphlibconfig\";\r\nimport { Groups } from \"./groups\";\r\nimport { Teams } from \"./teams\";\r\nimport { Users, User } from \"./users\";\r\nimport { Planner } from \"./planner\";\r\nimport { GraphBatch } from \"./batch\";\r\nimport { DirectoryObjects } from \"./directoryobjects\";\r\nimport { Invitations } from \"./invitations\";\r\nimport { Subscriptions } from \"./subscriptions\";\r\nimport { Security } from \"./security\";\r\nimport { Sites } from \"./sites\";\r\nvar GraphRest = /** @class */ (function (_super) {\r\n tslib_1.__extends(GraphRest, _super);\r\n function GraphRest(baseUrl, path) {\r\n return _super.call(this, baseUrl, path) || this;\r\n }\r\n Object.defineProperty(GraphRest.prototype, \"directoryObjects\", {\r\n get: function () {\r\n return new DirectoryObjects(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"groups\", {\r\n get: function () {\r\n return new Groups(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"teams\", {\r\n get: function () {\r\n return new Teams(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"me\", {\r\n get: function () {\r\n return new User(this, \"me\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"planner\", {\r\n get: function () {\r\n return new Planner(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"users\", {\r\n get: function () {\r\n return new Users(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"invitations\", {\r\n get: function () {\r\n return new Invitations(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"subscriptions\", {\r\n get: function () {\r\n return new Subscriptions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n GraphRest.prototype.createBatch = function () {\r\n return new GraphBatch();\r\n };\r\n GraphRest.prototype.setup = function (config) {\r\n _setup(config);\r\n };\r\n Object.defineProperty(GraphRest.prototype, \"security\", {\r\n get: function () {\r\n return new Security(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(GraphRest.prototype, \"sites\", {\r\n get: function () {\r\n return new Sites(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return GraphRest;\r\n}(GraphQueryable));\r\nexport { GraphRest };\r\nexport var graph = new GraphRest(\"v1.0\");\r\n//# sourceMappingURL=rest.js.map","import { extend } from \"@pnp/common\";\r\n/**\r\n * Makes requests using the SP.RequestExecutor library.\r\n */\r\nvar SPRequestExecutorClient = /** @class */ (function () {\r\n function SPRequestExecutorClient() {\r\n /**\r\n * Converts a SharePoint REST API response to a fetch API response.\r\n */\r\n this.convertToResponse = function (spResponse) {\r\n var responseHeaders = new Headers();\r\n if (spResponse.headers !== undefined) {\r\n for (var h in spResponse.headers) {\r\n if (spResponse.headers[h]) {\r\n responseHeaders.append(h, spResponse.headers[h]);\r\n }\r\n }\r\n }\r\n // Cannot have an empty string body when creating a Response with status 204\r\n var body = spResponse.statusCode === 204 ? null : spResponse.body;\r\n return new Response(body, {\r\n headers: responseHeaders,\r\n status: spResponse.statusCode,\r\n statusText: spResponse.statusText,\r\n });\r\n };\r\n }\r\n /**\r\n * Fetches a URL using the SP.RequestExecutor library.\r\n */\r\n SPRequestExecutorClient.prototype.fetch = function (url, options) {\r\n var _this = this;\r\n if (SP === undefined || SP.RequestExecutor === undefined) {\r\n throw Error(\"SP.RequestExecutor is undefined. Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library.\");\r\n }\r\n var addinWebUrl = url.substring(0, url.indexOf(\"/_api\")), executor = new SP.RequestExecutor(addinWebUrl);\r\n var headers = {}, iterator, temp;\r\n if (options.headers && options.headers instanceof Headers) {\r\n iterator = options.headers.entries();\r\n temp = iterator.next();\r\n while (!temp.done) {\r\n headers[temp.value[0]] = temp.value[1];\r\n temp = iterator.next();\r\n }\r\n }\r\n else {\r\n headers = options.headers;\r\n }\r\n return new Promise(function (resolve, reject) {\r\n var requestOptions = {\r\n error: function (error) {\r\n reject(_this.convertToResponse(error));\r\n },\r\n headers: headers,\r\n method: options.method,\r\n success: function (response) {\r\n resolve(_this.convertToResponse(response));\r\n },\r\n url: url,\r\n };\r\n if (options.body) {\r\n requestOptions = extend(requestOptions, { body: options.body });\r\n }\r\n else {\r\n requestOptions = extend(requestOptions, { binaryStringRequestBody: true });\r\n }\r\n executor.executeAsync(requestOptions);\r\n });\r\n };\r\n return SPRequestExecutorClient;\r\n}());\r\nexport { SPRequestExecutorClient };\r\n//# sourceMappingURL=sprequestexecutorclient.js.map","import { stringIsNullOrEmpty } from \"@pnp/common\";\r\nexport function extractWebUrl(candidateUrl) {\r\n if (stringIsNullOrEmpty(candidateUrl)) {\r\n return \"\";\r\n }\r\n var index = candidateUrl.indexOf(\"_api/\");\r\n if (index < 0) {\r\n index = candidateUrl.indexOf(\"_vti_bin/\");\r\n }\r\n if (index > -1) {\r\n return candidateUrl.substr(0, index);\r\n }\r\n // if all else fails just give them what they gave us back\r\n return candidateUrl;\r\n}\r\n//# sourceMappingURL=extractweburl.js.map","import * as tslib_1 from \"tslib\";\r\nimport { extend, combine, hOP } from \"@pnp/common\";\r\nimport { Logger } from \"@pnp/logging\";\r\nimport { ODataParserBase } from \"@pnp/odata\";\r\nimport { extractWebUrl } from \"./utils/extractweburl\";\r\nexport function odataUrlFrom(candidate) {\r\n var parts = [];\r\n var s = [\"odata.type\", \"odata.editLink\", \"__metadata\", \"odata.metadata\"];\r\n if (hOP(candidate, s[0]) && candidate[s[0]] === \"SP.Web\") {\r\n // webs return an absolute url in the editLink\r\n if (hOP(candidate, s[1])) {\r\n parts.push(candidate[s[1]]);\r\n }\r\n else if (hOP(candidate, s[2])) {\r\n // we are dealing with verbose, which has an absolute uri\r\n parts.push(candidate.__metadata.uri);\r\n }\r\n }\r\n else {\r\n if (hOP(candidate, s[3]) && hOP(candidate, s[1])) {\r\n // we are dealign with minimal metadata (default)\r\n parts.push(extractWebUrl(candidate[s[3]]), \"_api\", candidate[s[1]]);\r\n }\r\n else if (hOP(candidate, s[1])) {\r\n parts.push(\"_api\", candidate[s[1]]);\r\n }\r\n else if (hOP(candidate, s[2])) {\r\n // we are dealing with verbose, which has an absolute uri\r\n parts.push(candidate.__metadata.uri);\r\n }\r\n }\r\n if (parts.length < 1) {\r\n Logger.write(\"No uri information found in ODataEntity parsing, chaining will fail for this object.\", 2 /* Warning */);\r\n return \"\";\r\n }\r\n return combine.apply(void 0, parts);\r\n}\r\nvar SPODataEntityParserImpl = /** @class */ (function (_super) {\r\n tslib_1.__extends(SPODataEntityParserImpl, _super);\r\n function SPODataEntityParserImpl(factory) {\r\n var _this = _super.call(this) || this;\r\n _this.factory = factory;\r\n _this.hydrate = function (d) {\r\n var o = new _this.factory(odataUrlFrom(d), null);\r\n return extend(o, d);\r\n };\r\n return _this;\r\n }\r\n SPODataEntityParserImpl.prototype.parse = function (r) {\r\n var _this = this;\r\n return _super.prototype.parse.call(this, r).then(function (d) {\r\n var o = new _this.factory(odataUrlFrom(d), null);\r\n return extend(o, d);\r\n });\r\n };\r\n return SPODataEntityParserImpl;\r\n}(ODataParserBase));\r\nvar SPODataEntityArrayParserImpl = /** @class */ (function (_super) {\r\n tslib_1.__extends(SPODataEntityArrayParserImpl, _super);\r\n function SPODataEntityArrayParserImpl(factory) {\r\n var _this = _super.call(this) || this;\r\n _this.factory = factory;\r\n _this.hydrate = function (d) {\r\n return d.map(function (v) {\r\n var o = new _this.factory(odataUrlFrom(v), null);\r\n return extend(o, v);\r\n });\r\n };\r\n return _this;\r\n }\r\n SPODataEntityArrayParserImpl.prototype.parse = function (r) {\r\n var _this = this;\r\n return _super.prototype.parse.call(this, r).then(function (d) {\r\n return d.map(function (v) {\r\n var o = new _this.factory(odataUrlFrom(v), null);\r\n return extend(o, v);\r\n });\r\n });\r\n };\r\n return SPODataEntityArrayParserImpl;\r\n}(ODataParserBase));\r\nexport function spODataEntity(factory) {\r\n return new SPODataEntityParserImpl(factory);\r\n}\r\nexport function spODataEntityArray(factory) {\r\n return new SPODataEntityArrayParserImpl(factory);\r\n}\r\n//# sourceMappingURL=odata.js.map","import { combine, extend } from \"@pnp/common\";\r\nimport { ODataDefaultParser } from \"@pnp/odata\";\r\nimport { SPRuntimeConfig } from \"../config/splibconfig\";\r\nvar CachedDigest = /** @class */ (function () {\r\n function CachedDigest() {\r\n }\r\n return CachedDigest;\r\n}());\r\nexport { CachedDigest };\r\n// allows for the caching of digests across all HttpClient's which each have their own DigestCache wrapper.\r\nvar digests = new Map();\r\nvar DigestCache = /** @class */ (function () {\r\n function DigestCache(_httpClient, _digests) {\r\n if (_digests === void 0) { _digests = digests; }\r\n this._httpClient = _httpClient;\r\n this._digests = _digests;\r\n }\r\n DigestCache.prototype.getDigest = function (webUrl) {\r\n var _this = this;\r\n var cachedDigest = this._digests.get(webUrl);\r\n if (cachedDigest !== undefined) {\r\n var now = new Date();\r\n if (now < cachedDigest.expiration) {\r\n return Promise.resolve(cachedDigest.value);\r\n }\r\n }\r\n var url = combine(webUrl, \"/_api/contextinfo\");\r\n var headers = {\r\n \"Accept\": \"application/json;odata=verbose\",\r\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\r\n };\r\n return this._httpClient.fetchRaw(url, {\r\n cache: \"no-cache\",\r\n credentials: \"same-origin\",\r\n headers: extend(headers, SPRuntimeConfig.headers, true),\r\n method: \"POST\",\r\n }).then(function (response) {\r\n var parser = new ODataDefaultParser();\r\n return parser.parse(response).then(function (d) { return d.GetContextWebInformation; });\r\n }).then(function (data) {\r\n var newCachedDigest = new CachedDigest();\r\n newCachedDigest.value = data.FormDigestValue;\r\n var seconds = data.FormDigestTimeoutSeconds;\r\n var expiration = new Date();\r\n expiration.setTime(expiration.getTime() + 1000 * seconds);\r\n newCachedDigest.expiration = expiration;\r\n _this._digests.set(webUrl, newCachedDigest);\r\n return newCachedDigest.value;\r\n });\r\n };\r\n DigestCache.prototype.clear = function () {\r\n this._digests.clear();\r\n };\r\n return DigestCache;\r\n}());\r\nexport { DigestCache };\r\n//# sourceMappingURL=digestcache.js.map","import { DigestCache } from \"./digestcache\";\r\nimport { extend, mergeHeaders, getCtxCallback, } from \"@pnp/common\";\r\nimport { SPRuntimeConfig } from \"../config/splibconfig\";\r\nimport { extractWebUrl } from \"../utils/extractweburl\";\r\nvar SPHttpClient = /** @class */ (function () {\r\n function SPHttpClient(_impl) {\r\n if (_impl === void 0) { _impl = SPRuntimeConfig.fetchClientFactory(); }\r\n this._impl = _impl;\r\n this._digestCache = new DigestCache(this);\r\n }\r\n SPHttpClient.prototype.fetch = function (url, options) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { cache: \"no-cache\", credentials: \"same-origin\" }, true);\r\n var headers = new Headers();\r\n // first we add the global headers so they can be overwritten by any passed in locally to this call\r\n mergeHeaders(headers, SPRuntimeConfig.headers);\r\n // second we add the local options so we can overwrite the globals\r\n mergeHeaders(headers, options.headers);\r\n // lastly we apply any default headers we need that may not exist\r\n if (!headers.has(\"Accept\")) {\r\n headers.append(\"Accept\", \"application/json\");\r\n }\r\n if (!headers.has(\"Content-Type\")) {\r\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\r\n }\r\n if (!headers.has(\"X-ClientService-ClientTag\")) {\r\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:@pnp-1.3.11\");\r\n }\r\n if (!headers.has(\"User-Agent\")) {\r\n // this marks the requests for understanding by the service\r\n headers.append(\"User-Agent\", \"NONISV|SharePointPnP|PnPCoreJS/1.3.11\");\r\n }\r\n opts = extend(opts, { headers: headers });\r\n if (opts.method && opts.method.toUpperCase() !== \"GET\") {\r\n // if we have either a request digest or an authorization header we don't need a digest\r\n if (!headers.has(\"X-RequestDigest\") && !headers.has(\"Authorization\")) {\r\n return this._digestCache.getDigest(extractWebUrl(url))\r\n .then(function (digest) {\r\n headers.append(\"X-RequestDigest\", digest);\r\n return _this.fetchRaw(url, opts);\r\n });\r\n }\r\n }\r\n return this.fetchRaw(url, opts);\r\n };\r\n SPHttpClient.prototype.fetchRaw = function (url, options) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n // here we need to normalize the headers\r\n var rawHeaders = new Headers();\r\n mergeHeaders(rawHeaders, options.headers);\r\n options = extend(options, { headers: rawHeaders });\r\n var retry = function (ctx) {\r\n // handles setting the proper timeout for a retry\r\n var setRetry = function (response) {\r\n var delay;\r\n if (response.headers.has(\"Retry-After\")) {\r\n // if we have gotten a header, use that value as the delay value\r\n delay = parseInt(response.headers.get(\"Retry-After\"), 10);\r\n }\r\n else {\r\n // grab our current delay\r\n delay = ctx.delay;\r\n // Increment our counters.\r\n ctx.delay *= 2;\r\n }\r\n ctx.attempts++;\r\n // If we have exceeded the retry count, reject.\r\n if (ctx.retryCount <= ctx.attempts) {\r\n ctx.reject(Error(\"Retry count exceeded (\" + ctx.retryCount + \") for request. Response status: [\" + response.status + \"] \" + response.statusText));\r\n }\r\n else {\r\n // Set our retry timeout for {delay} milliseconds.\r\n setTimeout(getCtxCallback(_this, retry, ctx), delay);\r\n }\r\n };\r\n // send the actual request\r\n _this._impl.fetch(url, options).then(function (response) {\r\n if (response.status === 429) {\r\n // we have been throttled\r\n setRetry(response);\r\n }\r\n else {\r\n ctx.resolve(response);\r\n }\r\n }).catch(function (response) {\r\n if (response.status === 503 || response.status === 504) {\r\n // http status code 503 or 504, we can retry this\r\n setRetry(response);\r\n }\r\n else {\r\n ctx.reject(response);\r\n }\r\n });\r\n };\r\n return new Promise(function (resolve, reject) {\r\n var retryContext = {\r\n attempts: 0,\r\n delay: 100,\r\n reject: reject,\r\n resolve: resolve,\r\n retryCount: 7,\r\n };\r\n retry.call(_this, retryContext);\r\n });\r\n };\r\n SPHttpClient.prototype.get = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"GET\" });\r\n return this.fetch(url, opts);\r\n };\r\n SPHttpClient.prototype.post = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"POST\" });\r\n return this.fetch(url, opts);\r\n };\r\n SPHttpClient.prototype.patch = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"PATCH\" });\r\n return this.fetch(url, opts);\r\n };\r\n SPHttpClient.prototype.delete = function (url, options) {\r\n if (options === void 0) { options = {}; }\r\n var opts = extend(options, { method: \"DELETE\" });\r\n return this.fetch(url, opts);\r\n };\r\n return SPHttpClient;\r\n}());\r\nexport { SPHttpClient };\r\n//# sourceMappingURL=sphttpclient.js.map","export function metadata(type) {\r\n return {\r\n \"__metadata\": { \"type\": type },\r\n };\r\n}\r\n//# sourceMappingURL=metadata.js.map","import * as tslib_1 from \"tslib\";\r\nimport { combine, isUrlAbsolute, mergeOptions, extend, getGUID, jsS, } from \"@pnp/common\";\r\nimport { ODataQueryable, } from \"@pnp/odata\";\r\nimport { Logger } from \"@pnp/logging\";\r\nimport { SPHttpClient } from \"./net/sphttpclient\";\r\nimport { toAbsoluteUrl } from \"./utils/toabsoluteurl\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * SharePointQueryable Base Class\r\n *\r\n */\r\nvar SharePointQueryable = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryable, _super);\r\n /**\r\n * Creates a new instance of the SharePointQueryable class\r\n *\r\n * @constructor\r\n * @param baseUrl A string or SharePointQueryable that should form the base part of the url\r\n *\r\n */\r\n function SharePointQueryable(baseUrl, path) {\r\n var _this = _super.call(this) || this;\r\n _this._forceCaching = false;\r\n if (typeof baseUrl === \"string\") {\r\n // we need to do some extra parsing to get the parent url correct if we are\r\n // being created from just a string.\r\n if (isUrlAbsolute(baseUrl) || baseUrl.lastIndexOf(\"/\") < 0) {\r\n _this._parentUrl = baseUrl;\r\n _this._url = combine(baseUrl, path);\r\n }\r\n else if (baseUrl.lastIndexOf(\"/\") > baseUrl.lastIndexOf(\"(\")) {\r\n // .../items(19)/fields\r\n var index = baseUrl.lastIndexOf(\"/\");\r\n _this._parentUrl = baseUrl.slice(0, index);\r\n path = combine(baseUrl.slice(index), path);\r\n _this._url = combine(_this._parentUrl, path);\r\n }\r\n else {\r\n // .../items(19)\r\n var index = baseUrl.lastIndexOf(\"(\");\r\n _this._parentUrl = baseUrl.slice(0, index);\r\n _this._url = combine(baseUrl, path);\r\n }\r\n }\r\n else {\r\n _this.extend(baseUrl, path);\r\n var target = baseUrl.query.get(\"@target\");\r\n if (target !== undefined) {\r\n _this.query.set(\"@target\", target);\r\n }\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Creates a new instance of the supplied factory and extends this into that new instance\r\n *\r\n * @param factory constructor for the new SharePointQueryable\r\n */\r\n SharePointQueryable.prototype.as = function (factory) {\r\n var o = new factory(this._url, null);\r\n return extend(o, this, true);\r\n };\r\n /**\r\n * Gets the full url with query information\r\n *\r\n */\r\n SharePointQueryable.prototype.toUrlAndQuery = function () {\r\n var aliasedParams = new Map(this.query);\r\n var url = this.toUrl().replace(/'!(@.*?)::(.*?)'/ig, function (match, labelName, value) {\r\n Logger.write(\"Rewriting aliased parameter from match \" + match + \" to label: \" + labelName + \" value: \" + value, 0 /* Verbose */);\r\n aliasedParams.set(labelName, \"'\" + value + \"'\");\r\n return labelName;\r\n });\r\n if (aliasedParams.size > 0) {\r\n var char = url.indexOf(\"?\") > -1 ? \"&\" : \"?\";\r\n url += \"\" + char + Array.from(aliasedParams).map(function (v) { return v[0] + \"=\" + v[1]; }).join(\"&\");\r\n }\r\n return url;\r\n };\r\n /**\r\n * Choose which fields to return\r\n *\r\n * @param selects One or more fields to return\r\n */\r\n SharePointQueryable.prototype.select = function () {\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n if (selects.length > 0) {\r\n this.query.set(\"$select\", selects.join(\",\"));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Expands fields such as lookups to get additional data\r\n *\r\n * @param expands The Fields for which to expand the values\r\n */\r\n SharePointQueryable.prototype.expand = function () {\r\n var expands = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n expands[_i] = arguments[_i];\r\n }\r\n if (expands.length > 0) {\r\n this.query.set(\"$expand\", expands.join(\",\"));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Gets a parent for this instance as specified\r\n *\r\n * @param factory The contructor for the class to create\r\n */\r\n SharePointQueryable.prototype.getParent = function (factory, baseUrl, path, batch) {\r\n if (baseUrl === void 0) { baseUrl = this.parentUrl; }\r\n var parent = new factory(baseUrl, path).configureFrom(this);\r\n var t = \"@target\";\r\n if (this.query.has(t)) {\r\n parent.query.set(t, this.query.get(t));\r\n }\r\n if (batch !== undefined) {\r\n parent = parent.inBatch(batch);\r\n }\r\n return parent;\r\n };\r\n /**\r\n * Clones this SharePointQueryable into a new SharePointQueryable instance of T\r\n * @param factory Constructor used to create the new instance\r\n * @param additionalPath Any additional path to include in the clone\r\n * @param includeBatch If true this instance's batch will be added to the cloned instance\r\n */\r\n SharePointQueryable.prototype.clone = function (factory, additionalPath, includeBatch) {\r\n if (includeBatch === void 0) { includeBatch = true; }\r\n var clone = _super.prototype._clone.call(this, new factory(this, additionalPath), { includeBatch: includeBatch });\r\n // handle sp specific clone actions\r\n var t = \"@target\";\r\n if (this.query.has(t)) {\r\n clone.query.set(t, this.query.get(t));\r\n }\r\n return clone;\r\n };\r\n /**\r\n * Converts the current instance to a request context\r\n *\r\n * @param verb The request verb\r\n * @param options The set of supplied request options\r\n * @param parser The supplied ODataParser instance\r\n * @param pipeline Optional request processing pipeline\r\n */\r\n SharePointQueryable.prototype.toRequestContext = function (verb, options, parser, pipeline) {\r\n var _this = this;\r\n if (options === void 0) { options = {}; }\r\n var dependencyDispose = this.hasBatch ? this._batchDependency : function () { return; };\r\n return toAbsoluteUrl(this.toUrlAndQuery()).then(function (url) {\r\n mergeOptions(options, _this._options);\r\n // build our request context\r\n var context = {\r\n batch: _this.batch,\r\n batchDependency: dependencyDispose,\r\n cachingOptions: _this._cachingOptions,\r\n clientFactory: function () { return new SPHttpClient(); },\r\n isBatched: _this.hasBatch,\r\n isCached: _this._forceCaching || (_this._useCaching && /^get$/i.test(verb)),\r\n options: options,\r\n parser: parser,\r\n pipeline: pipeline,\r\n requestAbsoluteUrl: url,\r\n requestId: getGUID(),\r\n verb: verb,\r\n };\r\n return context;\r\n });\r\n };\r\n return SharePointQueryable;\r\n}(ODataQueryable));\r\nexport { SharePointQueryable };\r\n/**\r\n * Represents a REST collection which can be filtered, paged, and selected\r\n *\r\n */\r\nvar SharePointQueryableCollection = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableCollection, _super);\r\n function SharePointQueryableCollection() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Filters the returned collection (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#bk_supported)\r\n *\r\n * @param filter The string representing the filter query\r\n */\r\n SharePointQueryableCollection.prototype.filter = function (filter) {\r\n this.query.set(\"$filter\", filter);\r\n return this;\r\n };\r\n /**\r\n * Orders based on the supplied fields\r\n *\r\n * @param orderby The name of the field on which to sort\r\n * @param ascending If false DESC is appended, otherwise ASC (default)\r\n */\r\n SharePointQueryableCollection.prototype.orderBy = function (orderBy, ascending) {\r\n if (ascending === void 0) { ascending = true; }\r\n var o = \"$orderby\";\r\n var query = this.query.has(o) ? this.query.get(o).split(\",\") : [];\r\n query.push(orderBy + \" \" + (ascending ? \"asc\" : \"desc\"));\r\n this.query.set(o, query.join(\",\"));\r\n return this;\r\n };\r\n /**\r\n * Skips the specified number of items\r\n *\r\n * @param skip The number of items to skip\r\n */\r\n SharePointQueryableCollection.prototype.skip = function (skip) {\r\n this.query.set(\"$skip\", skip.toString());\r\n return this;\r\n };\r\n /**\r\n * Limits the query to only return the specified number of items\r\n *\r\n * @param top The query row limit\r\n */\r\n SharePointQueryableCollection.prototype.top = function (top) {\r\n this.query.set(\"$top\", top.toString());\r\n return this;\r\n };\r\n return SharePointQueryableCollection;\r\n}(SharePointQueryable));\r\nexport { SharePointQueryableCollection };\r\n/**\r\n * Represents an instance that can be selected\r\n *\r\n */\r\nvar SharePointQueryableInstance = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableInstance, _super);\r\n function SharePointQueryableInstance() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Curries the update function into the common pieces\r\n *\r\n * @param type\r\n * @param mapper\r\n */\r\n SharePointQueryableInstance.prototype._update = function (type, mapper) {\r\n var _this = this;\r\n return function (props) { return _this.postCore({\r\n body: jsS(extend(metadata(type), props)),\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (d) { return mapper(d, props); }); };\r\n };\r\n /**\r\n * Deletes this instance\r\n *\r\n */\r\n SharePointQueryableInstance.prototype._delete = function () {\r\n return this.postCore({\r\n headers: {\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Deletes this instance with an etag value in the headers\r\n *\r\n * @param eTag eTag to delete\r\n */\r\n SharePointQueryableInstance.prototype._deleteWithETag = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n return SharePointQueryableInstance;\r\n}(SharePointQueryable));\r\nexport { SharePointQueryableInstance };\r\n/**\r\n * Decorator used to specify the default path for SharePointQueryable objects\r\n *\r\n * @param path\r\n */\r\nexport function defaultPath(path) {\r\n return function (target) {\r\n return /** @class */ (function (_super) {\r\n tslib_1.__extends(class_1, _super);\r\n function class_1() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n return _super.call(this, args[0], args.length > 1 && args[1] !== undefined ? args[1] : path) || this;\r\n }\r\n return class_1;\r\n }(target));\r\n };\r\n}\r\n//# sourceMappingURL=sharepointqueryable.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { SiteGroups } from \"./sitegroups\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Describes a collection of all site collection users\r\n *\r\n */\r\nvar SiteUsers = /** @class */ (function (_super) {\r\n tslib_1.__extends(SiteUsers, _super);\r\n function SiteUsers() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SiteUsers_1 = SiteUsers;\r\n /**\r\n * Gets a user from the collection by id\r\n *\r\n * @param id The id of the user to retrieve\r\n */\r\n SiteUsers.prototype.getById = function (id) {\r\n return new SiteUser(this, \"getById(\" + id + \")\");\r\n };\r\n /**\r\n * Gets a user from the collection by email\r\n *\r\n * @param email The email address of the user to retrieve\r\n */\r\n SiteUsers.prototype.getByEmail = function (email) {\r\n return new SiteUser(this, \"getByEmail('\" + email + \"')\");\r\n };\r\n /**\r\n * Gets a user from the collection by login name\r\n *\r\n * @param loginName The login name of the user to retrieve\r\n */\r\n SiteUsers.prototype.getByLoginName = function (loginName) {\r\n var su = new SiteUser(this);\r\n su.concat(\"('!@v::\" + encodeURIComponent(loginName) + \"')\");\r\n return su;\r\n };\r\n /**\r\n * Removes a user from the collection by id\r\n *\r\n * @param id The id of the user to remove\r\n */\r\n SiteUsers.prototype.removeById = function (id) {\r\n return this.clone(SiteUsers_1, \"removeById(\" + id + \")\").postCore();\r\n };\r\n /**\r\n * Removes a user from the collection by login name\r\n *\r\n * @param loginName The login name of the user to remove\r\n */\r\n SiteUsers.prototype.removeByLoginName = function (loginName) {\r\n var o = this.clone(SiteUsers_1, \"removeByLoginName(@v)\");\r\n o.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return o.postCore();\r\n };\r\n /**\r\n * Adds a user to a group\r\n *\r\n * @param loginName The login name of the user to add to the group\r\n *\r\n */\r\n SiteUsers.prototype.add = function (loginName) {\r\n var _this = this;\r\n return this.clone(SiteUsers_1, null).postCore({\r\n body: jsS(extend(metadata(\"SP.User\"), { LoginName: loginName })),\r\n }).then(function () { return _this.getByLoginName(loginName); });\r\n };\r\n var SiteUsers_1;\r\n SiteUsers = SiteUsers_1 = tslib_1.__decorate([\r\n defaultPath(\"siteusers\")\r\n ], SiteUsers);\r\n return SiteUsers;\r\n}(SharePointQueryableCollection));\r\nexport { SiteUsers };\r\n/**\r\n * Base class for a user\r\n *\r\n */\r\nvar UserBase = /** @class */ (function (_super) {\r\n tslib_1.__extends(UserBase, _super);\r\n function UserBase() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(UserBase.prototype, \"groups\", {\r\n /**\r\n * Gets the groups for this user\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroups(this, \"groups\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return UserBase;\r\n}(SharePointQueryableInstance));\r\nexport { UserBase };\r\n/**\r\n * Describes a single user\r\n *\r\n */\r\nvar SiteUser = /** @class */ (function (_super) {\r\n tslib_1.__extends(SiteUser, _super);\r\n function SiteUser() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Updates this user instance with the supplied properties\r\n *\r\n * @param properties A plain object of property names and values to update for the user\r\n */\r\n _this.update = _this._update(\"SP.User\", function (data) { return ({ data: data, user: _this }); });\r\n /**\r\n * Delete this user\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n return SiteUser;\r\n}(UserBase));\r\nexport { SiteUser };\r\n/**\r\n * Represents the current user\r\n */\r\nvar CurrentUser = /** @class */ (function (_super) {\r\n tslib_1.__extends(CurrentUser, _super);\r\n function CurrentUser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n CurrentUser = tslib_1.__decorate([\r\n defaultPath(\"currentuser\")\r\n ], CurrentUser);\r\n return CurrentUser;\r\n}(UserBase));\r\nexport { CurrentUser };\r\n//# sourceMappingURL=siteusers.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { SiteUsers } from \"./siteusers\";\r\nimport { extend, jsS, hOP } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Principal Type enum\r\n *\r\n */\r\nexport var PrincipalType;\r\n(function (PrincipalType) {\r\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\r\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\r\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\r\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\r\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\r\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\r\n})(PrincipalType || (PrincipalType = {}));\r\n/**\r\n * Describes a collection of site groups\r\n *\r\n */\r\nvar SiteGroups = /** @class */ (function (_super) {\r\n tslib_1.__extends(SiteGroups, _super);\r\n function SiteGroups() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SiteGroups_1 = SiteGroups;\r\n /**\r\n * Gets a group from the collection by id\r\n *\r\n * @param id The id of the group to retrieve\r\n */\r\n SiteGroups.prototype.getById = function (id) {\r\n var sg = new SiteGroup(this);\r\n sg.concat(\"(\" + id + \")\");\r\n return sg;\r\n };\r\n /**\r\n * Adds a new group to the site collection\r\n *\r\n * @param props The group properties object of property names and values to be set for the group\r\n */\r\n SiteGroups.prototype.add = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend(metadata(\"SP.Group\"), properties));\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n group: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Gets a group from the collection by name\r\n *\r\n * @param groupName The name of the group to retrieve\r\n */\r\n SiteGroups.prototype.getByName = function (groupName) {\r\n return new SiteGroup(this, \"getByName('\" + groupName + \"')\");\r\n };\r\n /**\r\n * Removes the group with the specified member id from the collection\r\n *\r\n * @param id The id of the group to remove\r\n */\r\n SiteGroups.prototype.removeById = function (id) {\r\n return this.clone(SiteGroups_1, \"removeById('\" + id + \"')\").postCore();\r\n };\r\n /**\r\n * Removes the cross-site group with the specified name from the collection\r\n *\r\n * @param loginName The name of the group to remove\r\n */\r\n SiteGroups.prototype.removeByLoginName = function (loginName) {\r\n return this.clone(SiteGroups_1, \"removeByLoginName('\" + loginName + \"')\").postCore();\r\n };\r\n var SiteGroups_1;\r\n SiteGroups = SiteGroups_1 = tslib_1.__decorate([\r\n defaultPath(\"sitegroups\")\r\n ], SiteGroups);\r\n return SiteGroups;\r\n}(SharePointQueryableCollection));\r\nexport { SiteGroups };\r\n/**\r\n * Describes a single group\r\n *\r\n */\r\nvar SiteGroup = /** @class */ (function (_super) {\r\n tslib_1.__extends(SiteGroup, _super);\r\n function SiteGroup() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.update = _this._update(\"SP.Group\", function (d, p) {\r\n var retGroup = _this;\r\n if (hOP(p, \"Title\")) {\r\n /* tslint:disable-next-line no-string-literal */\r\n retGroup = _this.getParent(SiteGroup, _this.parentUrl, \"getByName('\" + p[\"Title\"] + \"')\");\r\n }\r\n return {\r\n data: d,\r\n group: retGroup,\r\n };\r\n });\r\n return _this;\r\n }\r\n Object.defineProperty(SiteGroup.prototype, \"users\", {\r\n /**\r\n * Gets the users for this group\r\n *\r\n */\r\n get: function () {\r\n return new SiteUsers(this, \"users\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Set the owner of a group using a user id\r\n * @param userId the id of the user that will be set as the owner of the current group\r\n */\r\n SiteGroup.prototype.setUserAsOwner = function (userId) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n return [2 /*return*/, this.clone(SiteGroup, \"SetUserAsOwner(\" + userId + \")\").postCore()];\r\n });\r\n });\r\n };\r\n return SiteGroup;\r\n}(SharePointQueryableInstance));\r\nexport { SiteGroup };\r\n//# sourceMappingURL=sitegroups.js.map","/**\r\n * Determines the display mode of the given control or view\r\n */\r\nexport var ControlMode;\r\n(function (ControlMode) {\r\n ControlMode[ControlMode[\"Display\"] = 1] = \"Display\";\r\n ControlMode[ControlMode[\"Edit\"] = 2] = \"Edit\";\r\n ControlMode[ControlMode[\"New\"] = 3] = \"New\";\r\n})(ControlMode || (ControlMode = {}));\r\n/**\r\n * Specifies the type of the field.\r\n */\r\nexport var FieldTypes;\r\n(function (FieldTypes) {\r\n FieldTypes[FieldTypes[\"Invalid\"] = 0] = \"Invalid\";\r\n FieldTypes[FieldTypes[\"Integer\"] = 1] = \"Integer\";\r\n FieldTypes[FieldTypes[\"Text\"] = 2] = \"Text\";\r\n FieldTypes[FieldTypes[\"Note\"] = 3] = \"Note\";\r\n FieldTypes[FieldTypes[\"DateTime\"] = 4] = \"DateTime\";\r\n FieldTypes[FieldTypes[\"Counter\"] = 5] = \"Counter\";\r\n FieldTypes[FieldTypes[\"Choice\"] = 6] = \"Choice\";\r\n FieldTypes[FieldTypes[\"Lookup\"] = 7] = \"Lookup\";\r\n FieldTypes[FieldTypes[\"Boolean\"] = 8] = \"Boolean\";\r\n FieldTypes[FieldTypes[\"Number\"] = 9] = \"Number\";\r\n FieldTypes[FieldTypes[\"Currency\"] = 10] = \"Currency\";\r\n FieldTypes[FieldTypes[\"URL\"] = 11] = \"URL\";\r\n FieldTypes[FieldTypes[\"Computed\"] = 12] = \"Computed\";\r\n FieldTypes[FieldTypes[\"Threading\"] = 13] = \"Threading\";\r\n FieldTypes[FieldTypes[\"Guid\"] = 14] = \"Guid\";\r\n FieldTypes[FieldTypes[\"MultiChoice\"] = 15] = \"MultiChoice\";\r\n FieldTypes[FieldTypes[\"GridChoice\"] = 16] = \"GridChoice\";\r\n FieldTypes[FieldTypes[\"Calculated\"] = 17] = \"Calculated\";\r\n FieldTypes[FieldTypes[\"File\"] = 18] = \"File\";\r\n FieldTypes[FieldTypes[\"Attachments\"] = 19] = \"Attachments\";\r\n FieldTypes[FieldTypes[\"User\"] = 20] = \"User\";\r\n FieldTypes[FieldTypes[\"Recurrence\"] = 21] = \"Recurrence\";\r\n FieldTypes[FieldTypes[\"CrossProjectLink\"] = 22] = \"CrossProjectLink\";\r\n FieldTypes[FieldTypes[\"ModStat\"] = 23] = \"ModStat\";\r\n FieldTypes[FieldTypes[\"Error\"] = 24] = \"Error\";\r\n FieldTypes[FieldTypes[\"ContentTypeId\"] = 25] = \"ContentTypeId\";\r\n FieldTypes[FieldTypes[\"PageSeparator\"] = 26] = \"PageSeparator\";\r\n FieldTypes[FieldTypes[\"ThreadIndex\"] = 27] = \"ThreadIndex\";\r\n FieldTypes[FieldTypes[\"WorkflowStatus\"] = 28] = \"WorkflowStatus\";\r\n FieldTypes[FieldTypes[\"AllDayEvent\"] = 29] = \"AllDayEvent\";\r\n FieldTypes[FieldTypes[\"WorkflowEventType\"] = 30] = \"WorkflowEventType\";\r\n})(FieldTypes || (FieldTypes = {}));\r\nexport var DateTimeFieldFormatType;\r\n(function (DateTimeFieldFormatType) {\r\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateOnly\"] = 0] = \"DateOnly\";\r\n DateTimeFieldFormatType[DateTimeFieldFormatType[\"DateTime\"] = 1] = \"DateTime\";\r\n})(DateTimeFieldFormatType || (DateTimeFieldFormatType = {}));\r\nexport var DateTimeFieldFriendlyFormatType;\r\n(function (DateTimeFieldFriendlyFormatType) {\r\n DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType[\"Unspecified\"] = 0] = \"Unspecified\";\r\n DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType[\"Disabled\"] = 1] = \"Disabled\";\r\n DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType[\"Relative\"] = 2] = \"Relative\";\r\n})(DateTimeFieldFriendlyFormatType || (DateTimeFieldFriendlyFormatType = {}));\r\n/**\r\n * Specifies the control settings while adding a field.\r\n */\r\nexport var AddFieldOptions;\r\n(function (AddFieldOptions) {\r\n /**\r\n * Specify that a new field added to the list must also be added to the default content type in the site collection\r\n */\r\n AddFieldOptions[AddFieldOptions[\"DefaultValue\"] = 0] = \"DefaultValue\";\r\n /**\r\n * Specify that a new field added to the list must also be added to the default content type in the site collection.\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddToDefaultContentType\"] = 1] = \"AddToDefaultContentType\";\r\n /**\r\n * Specify that a new field must not be added to any other content type\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddToNoContentType\"] = 2] = \"AddToNoContentType\";\r\n /**\r\n * Specify that a new field that is added to the specified list must also be added to all content types in the site collection\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddToAllContentTypes\"] = 4] = \"AddToAllContentTypes\";\r\n /**\r\n * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddFieldInternalNameHint\"] = 8] = \"AddFieldInternalNameHint\";\r\n /**\r\n * Specify that a new field that is added to the specified list must also be added to the default list view\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddFieldToDefaultView\"] = 16] = \"AddFieldToDefaultView\";\r\n /**\r\n * Specify to confirm that no other field has the same display name\r\n */\r\n AddFieldOptions[AddFieldOptions[\"AddFieldCheckDisplayName\"] = 32] = \"AddFieldCheckDisplayName\";\r\n})(AddFieldOptions || (AddFieldOptions = {}));\r\nexport var CalendarType;\r\n(function (CalendarType) {\r\n CalendarType[CalendarType[\"Gregorian\"] = 1] = \"Gregorian\";\r\n CalendarType[CalendarType[\"Japan\"] = 3] = \"Japan\";\r\n CalendarType[CalendarType[\"Taiwan\"] = 4] = \"Taiwan\";\r\n CalendarType[CalendarType[\"Korea\"] = 5] = \"Korea\";\r\n CalendarType[CalendarType[\"Hijri\"] = 6] = \"Hijri\";\r\n CalendarType[CalendarType[\"Thai\"] = 7] = \"Thai\";\r\n CalendarType[CalendarType[\"Hebrew\"] = 8] = \"Hebrew\";\r\n CalendarType[CalendarType[\"GregorianMEFrench\"] = 9] = \"GregorianMEFrench\";\r\n CalendarType[CalendarType[\"GregorianArabic\"] = 10] = \"GregorianArabic\";\r\n CalendarType[CalendarType[\"GregorianXLITEnglish\"] = 11] = \"GregorianXLITEnglish\";\r\n CalendarType[CalendarType[\"GregorianXLITFrench\"] = 12] = \"GregorianXLITFrench\";\r\n CalendarType[CalendarType[\"KoreaJapanLunar\"] = 14] = \"KoreaJapanLunar\";\r\n CalendarType[CalendarType[\"ChineseLunar\"] = 15] = \"ChineseLunar\";\r\n CalendarType[CalendarType[\"SakaEra\"] = 16] = \"SakaEra\";\r\n CalendarType[CalendarType[\"UmAlQura\"] = 23] = \"UmAlQura\";\r\n})(CalendarType || (CalendarType = {}));\r\nexport var UrlFieldFormatType;\r\n(function (UrlFieldFormatType) {\r\n UrlFieldFormatType[UrlFieldFormatType[\"Hyperlink\"] = 0] = \"Hyperlink\";\r\n UrlFieldFormatType[UrlFieldFormatType[\"Image\"] = 1] = \"Image\";\r\n})(UrlFieldFormatType || (UrlFieldFormatType = {}));\r\nexport var PermissionKind;\r\n(function (PermissionKind) {\r\n /**\r\n * Has no permissions on the Site. Not available through the user interface.\r\n */\r\n PermissionKind[PermissionKind[\"EmptyMask\"] = 0] = \"EmptyMask\";\r\n /**\r\n * View items in lists, documents in document libraries, and Web discussion comments.\r\n */\r\n PermissionKind[PermissionKind[\"ViewListItems\"] = 1] = \"ViewListItems\";\r\n /**\r\n * Add items to lists, documents to document libraries, and Web discussion comments.\r\n */\r\n PermissionKind[PermissionKind[\"AddListItems\"] = 2] = \"AddListItems\";\r\n /**\r\n * Edit items in lists, edit documents in document libraries, edit Web discussion comments\r\n * in documents, and customize Web Part Pages in document libraries.\r\n */\r\n PermissionKind[PermissionKind[\"EditListItems\"] = 3] = \"EditListItems\";\r\n /**\r\n * Delete items from a list, documents from a document library, and Web discussion\r\n * comments in documents.\r\n */\r\n PermissionKind[PermissionKind[\"DeleteListItems\"] = 4] = \"DeleteListItems\";\r\n /**\r\n * Approve a minor version of a list item or document.\r\n */\r\n PermissionKind[PermissionKind[\"ApproveItems\"] = 5] = \"ApproveItems\";\r\n /**\r\n * View the source of documents with server-side file handlers.\r\n */\r\n PermissionKind[PermissionKind[\"OpenItems\"] = 6] = \"OpenItems\";\r\n /**\r\n * View past versions of a list item or document.\r\n */\r\n PermissionKind[PermissionKind[\"ViewVersions\"] = 7] = \"ViewVersions\";\r\n /**\r\n * Delete past versions of a list item or document.\r\n */\r\n PermissionKind[PermissionKind[\"DeleteVersions\"] = 8] = \"DeleteVersions\";\r\n /**\r\n * Discard or check in a document which is checked out to another user.\r\n */\r\n PermissionKind[PermissionKind[\"CancelCheckout\"] = 9] = \"CancelCheckout\";\r\n /**\r\n * Create, change, and delete personal views of lists.\r\n */\r\n PermissionKind[PermissionKind[\"ManagePersonalViews\"] = 10] = \"ManagePersonalViews\";\r\n /**\r\n * Create and delete lists, add or remove columns in a list, and add or remove public views of a list.\r\n */\r\n PermissionKind[PermissionKind[\"ManageLists\"] = 12] = \"ManageLists\";\r\n /**\r\n * View forms, views, and application pages, and enumerate lists.\r\n */\r\n PermissionKind[PermissionKind[\"ViewFormPages\"] = 13] = \"ViewFormPages\";\r\n /**\r\n * Make content of a list or document library retrieveable for anonymous users through SharePoint search.\r\n * The list permissions in the site do not change.\r\n */\r\n PermissionKind[PermissionKind[\"AnonymousSearchAccessList\"] = 14] = \"AnonymousSearchAccessList\";\r\n /**\r\n * Allow users to open a Site, list, or folder to access items inside that container.\r\n */\r\n PermissionKind[PermissionKind[\"Open\"] = 17] = \"Open\";\r\n /**\r\n * View pages in a Site.\r\n */\r\n PermissionKind[PermissionKind[\"ViewPages\"] = 18] = \"ViewPages\";\r\n /**\r\n * Add, change, or delete HTML pages or Web Part Pages, and edit the Site using\r\n * a Windows SharePoint Services compatible editor.\r\n */\r\n PermissionKind[PermissionKind[\"AddAndCustomizePages\"] = 19] = \"AddAndCustomizePages\";\r\n /**\r\n * Apply a theme or borders to the entire Site.\r\n */\r\n PermissionKind[PermissionKind[\"ApplyThemeAndBorder\"] = 20] = \"ApplyThemeAndBorder\";\r\n /**\r\n * Apply a style sheet (.css file) to the Site.\r\n */\r\n PermissionKind[PermissionKind[\"ApplyStyleSheets\"] = 21] = \"ApplyStyleSheets\";\r\n /**\r\n * View reports on Site usage.\r\n */\r\n PermissionKind[PermissionKind[\"ViewUsageData\"] = 22] = \"ViewUsageData\";\r\n /**\r\n * Create a Site using Self-Service Site Creation.\r\n */\r\n PermissionKind[PermissionKind[\"CreateSSCSite\"] = 23] = \"CreateSSCSite\";\r\n /**\r\n * Create subsites such as team sites, Meeting Workspace sites, and Document Workspace sites.\r\n */\r\n PermissionKind[PermissionKind[\"ManageSubwebs\"] = 24] = \"ManageSubwebs\";\r\n /**\r\n * Create a group of users that can be used anywhere within the site collection.\r\n */\r\n PermissionKind[PermissionKind[\"CreateGroups\"] = 25] = \"CreateGroups\";\r\n /**\r\n * Create and change permission levels on the Site and assign permissions to users\r\n * and groups.\r\n */\r\n PermissionKind[PermissionKind[\"ManagePermissions\"] = 26] = \"ManagePermissions\";\r\n /**\r\n * Enumerate files and folders in a Site using Microsoft Office SharePoint Designer\r\n * and WebDAV interfaces.\r\n */\r\n PermissionKind[PermissionKind[\"BrowseDirectories\"] = 27] = \"BrowseDirectories\";\r\n /**\r\n * View information about users of the Site.\r\n */\r\n PermissionKind[PermissionKind[\"BrowseUserInfo\"] = 28] = \"BrowseUserInfo\";\r\n /**\r\n * Add or remove personal Web Parts on a Web Part Page.\r\n */\r\n PermissionKind[PermissionKind[\"AddDelPrivateWebParts\"] = 29] = \"AddDelPrivateWebParts\";\r\n /**\r\n * Update Web Parts to display personalized information.\r\n */\r\n PermissionKind[PermissionKind[\"UpdatePersonalWebParts\"] = 30] = \"UpdatePersonalWebParts\";\r\n /**\r\n * Grant the ability to perform all administration tasks for the Site as well as\r\n * manage content, activate, deactivate, or edit properties of Site scoped Features\r\n * through the object model or through the user interface (UI). When granted on the\r\n * root Site of a Site Collection, activate, deactivate, or edit properties of\r\n * site collection scoped Features through the object model. To browse to the Site\r\n * Collection Features page and activate or deactivate Site Collection scoped Features\r\n * through the UI, you must be a Site Collection administrator.\r\n */\r\n PermissionKind[PermissionKind[\"ManageWeb\"] = 31] = \"ManageWeb\";\r\n /**\r\n * Content of lists and document libraries in the Web site will be retrieveable for anonymous users through\r\n * SharePoint search if the list or document library has AnonymousSearchAccessList set.\r\n */\r\n PermissionKind[PermissionKind[\"AnonymousSearchAccessWebLists\"] = 32] = \"AnonymousSearchAccessWebLists\";\r\n /**\r\n * Use features that launch client applications. Otherwise, users must work on documents\r\n * locally and upload changes.\r\n */\r\n PermissionKind[PermissionKind[\"UseClientIntegration\"] = 37] = \"UseClientIntegration\";\r\n /**\r\n * Use SOAP, WebDAV, or Microsoft Office SharePoint Designer interfaces to access the Site.\r\n */\r\n PermissionKind[PermissionKind[\"UseRemoteAPIs\"] = 38] = \"UseRemoteAPIs\";\r\n /**\r\n * Manage alerts for all users of the Site.\r\n */\r\n PermissionKind[PermissionKind[\"ManageAlerts\"] = 39] = \"ManageAlerts\";\r\n /**\r\n * Create e-mail alerts.\r\n */\r\n PermissionKind[PermissionKind[\"CreateAlerts\"] = 40] = \"CreateAlerts\";\r\n /**\r\n * Allows a user to change his or her user information, such as adding a picture.\r\n */\r\n PermissionKind[PermissionKind[\"EditMyUserInfo\"] = 41] = \"EditMyUserInfo\";\r\n /**\r\n * Enumerate permissions on Site, list, folder, document, or list item.\r\n */\r\n PermissionKind[PermissionKind[\"EnumeratePermissions\"] = 63] = \"EnumeratePermissions\";\r\n /**\r\n * Has all permissions on the Site. Not available through the user interface.\r\n */\r\n PermissionKind[PermissionKind[\"FullMask\"] = 65] = \"FullMask\";\r\n})(PermissionKind || (PermissionKind = {}));\r\n/**\r\n * Specifies the type of a principal.\r\n */\r\n/* tslint:disable:no-bitwise */\r\nexport var PrincipalType;\r\n(function (PrincipalType) {\r\n /**\r\n * Enumeration whose value specifies no principal type.\r\n */\r\n PrincipalType[PrincipalType[\"None\"] = 0] = \"None\";\r\n /**\r\n * Enumeration whose value specifies a user as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"User\"] = 1] = \"User\";\r\n /**\r\n * Enumeration whose value specifies a distribution list as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"DistributionList\"] = 2] = \"DistributionList\";\r\n /**\r\n * Enumeration whose value specifies a security group as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"SecurityGroup\"] = 4] = \"SecurityGroup\";\r\n /**\r\n * Enumeration whose value specifies a group as the principal type.\r\n */\r\n PrincipalType[PrincipalType[\"SharePointGroup\"] = 8] = \"SharePointGroup\";\r\n /**\r\n * Enumeration whose value specifies all principal types.\r\n */\r\n PrincipalType[PrincipalType[\"All\"] = 15] = \"All\";\r\n})(PrincipalType || (PrincipalType = {}));\r\n/* tslint:enable:no-bitwise */\r\n/**\r\n * Specifies the source of a principal.\r\n */\r\n/* tslint:disable:no-bitwise */\r\nexport var PrincipalSource;\r\n(function (PrincipalSource) {\r\n /**\r\n * Enumeration whose value specifies no principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"None\"] = 0] = \"None\";\r\n /**\r\n * Enumeration whose value specifies user information list as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"UserInfoList\"] = 1] = \"UserInfoList\";\r\n /**\r\n * Enumeration whose value specifies Active Directory as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"Windows\"] = 2] = \"Windows\";\r\n /**\r\n * Enumeration whose value specifies the current membership provider as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"MembershipProvider\"] = 4] = \"MembershipProvider\";\r\n /**\r\n * Enumeration whose value specifies the current role provider as the principal source.\r\n */\r\n PrincipalSource[PrincipalSource[\"RoleProvider\"] = 8] = \"RoleProvider\";\r\n /**\r\n * Enumeration whose value specifies all principal sources.\r\n */\r\n PrincipalSource[PrincipalSource[\"All\"] = 15] = \"All\";\r\n})(PrincipalSource || (PrincipalSource = {}));\r\n/* tslint:enable:no-bitwise */\r\nexport var RoleType;\r\n(function (RoleType) {\r\n RoleType[RoleType[\"None\"] = 0] = \"None\";\r\n RoleType[RoleType[\"Guest\"] = 1] = \"Guest\";\r\n RoleType[RoleType[\"Reader\"] = 2] = \"Reader\";\r\n RoleType[RoleType[\"Contributor\"] = 3] = \"Contributor\";\r\n RoleType[RoleType[\"WebDesigner\"] = 4] = \"WebDesigner\";\r\n RoleType[RoleType[\"Administrator\"] = 5] = \"Administrator\";\r\n})(RoleType || (RoleType = {}));\r\nexport var PageType;\r\n(function (PageType) {\r\n PageType[PageType[\"Invalid\"] = -1] = \"Invalid\";\r\n PageType[PageType[\"DefaultView\"] = 0] = \"DefaultView\";\r\n PageType[PageType[\"NormalView\"] = 1] = \"NormalView\";\r\n PageType[PageType[\"DialogView\"] = 2] = \"DialogView\";\r\n PageType[PageType[\"View\"] = 3] = \"View\";\r\n PageType[PageType[\"DisplayForm\"] = 4] = \"DisplayForm\";\r\n PageType[PageType[\"DisplayFormDialog\"] = 5] = \"DisplayFormDialog\";\r\n PageType[PageType[\"EditForm\"] = 6] = \"EditForm\";\r\n PageType[PageType[\"EditFormDialog\"] = 7] = \"EditFormDialog\";\r\n PageType[PageType[\"NewForm\"] = 8] = \"NewForm\";\r\n PageType[PageType[\"NewFormDialog\"] = 9] = \"NewFormDialog\";\r\n PageType[PageType[\"SolutionForm\"] = 10] = \"SolutionForm\";\r\n PageType[PageType[\"PAGE_MAXITEMS\"] = 11] = \"PAGE_MAXITEMS\";\r\n})(PageType || (PageType = {}));\r\nexport var SharingLinkKind;\r\n(function (SharingLinkKind) {\r\n /**\r\n * Uninitialized link\r\n */\r\n SharingLinkKind[SharingLinkKind[\"Uninitialized\"] = 0] = \"Uninitialized\";\r\n /**\r\n * Direct link to the object being shared\r\n */\r\n SharingLinkKind[SharingLinkKind[\"Direct\"] = 1] = \"Direct\";\r\n /**\r\n * Organization-shareable link to the object being shared with view permissions\r\n */\r\n SharingLinkKind[SharingLinkKind[\"OrganizationView\"] = 2] = \"OrganizationView\";\r\n /**\r\n * Organization-shareable link to the object being shared with edit permissions\r\n */\r\n SharingLinkKind[SharingLinkKind[\"OrganizationEdit\"] = 3] = \"OrganizationEdit\";\r\n /**\r\n * View only anonymous link\r\n */\r\n SharingLinkKind[SharingLinkKind[\"AnonymousView\"] = 4] = \"AnonymousView\";\r\n /**\r\n * Read/Write anonymous link\r\n */\r\n SharingLinkKind[SharingLinkKind[\"AnonymousEdit\"] = 5] = \"AnonymousEdit\";\r\n /**\r\n * Flexible sharing Link where properties can change without affecting link URL\r\n */\r\n SharingLinkKind[SharingLinkKind[\"Flexible\"] = 6] = \"Flexible\";\r\n})(SharingLinkKind || (SharingLinkKind = {}));\r\n/**\r\n * Indicates the role of the sharing link\r\n */\r\nexport var SharingRole;\r\n(function (SharingRole) {\r\n SharingRole[SharingRole[\"None\"] = 0] = \"None\";\r\n SharingRole[SharingRole[\"View\"] = 1] = \"View\";\r\n SharingRole[SharingRole[\"Edit\"] = 2] = \"Edit\";\r\n SharingRole[SharingRole[\"Owner\"] = 3] = \"Owner\";\r\n})(SharingRole || (SharingRole = {}));\r\nexport var SharingOperationStatusCode;\r\n(function (SharingOperationStatusCode) {\r\n /**\r\n * The share operation completed without errors.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"CompletedSuccessfully\"] = 0] = \"CompletedSuccessfully\";\r\n /**\r\n * The share operation completed and generated requests for access.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessRequestsQueued\"] = 1] = \"AccessRequestsQueued\";\r\n /**\r\n * The share operation failed as there were no resolved users.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"NoResolvedUsers\"] = -1] = \"NoResolvedUsers\";\r\n /**\r\n * The share operation failed due to insufficient permissions.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"AccessDenied\"] = -2] = \"AccessDenied\";\r\n /**\r\n * The share operation failed when attempting a cross site share, which is not supported.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"CrossSiteRequestNotSupported\"] = -3] = \"CrossSiteRequestNotSupported\";\r\n /**\r\n * The sharing operation failed due to an unknown error.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"UnknowError\"] = -4] = \"UnknowError\";\r\n /**\r\n * The text you typed is too long. Please shorten it.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"EmailBodyTooLong\"] = -5] = \"EmailBodyTooLong\";\r\n /**\r\n * The maximum number of unique scopes in the list has been exceeded.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"ListUniqueScopesExceeded\"] = -6] = \"ListUniqueScopesExceeded\";\r\n /**\r\n * The share operation failed because a sharing capability is disabled in the site.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"CapabilityDisabled\"] = -7] = \"CapabilityDisabled\";\r\n /**\r\n * The specified object for the share operation is not supported.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"ObjectNotSupported\"] = -8] = \"ObjectNotSupported\";\r\n /**\r\n * A SharePoint group cannot contain another SharePoint group.\r\n */\r\n SharingOperationStatusCode[SharingOperationStatusCode[\"NestedGroupsNotSupported\"] = -9] = \"NestedGroupsNotSupported\";\r\n})(SharingOperationStatusCode || (SharingOperationStatusCode = {}));\r\nexport var SPSharedObjectType;\r\n(function (SPSharedObjectType) {\r\n SPSharedObjectType[SPSharedObjectType[\"Unknown\"] = 0] = \"Unknown\";\r\n SPSharedObjectType[SPSharedObjectType[\"File\"] = 1] = \"File\";\r\n SPSharedObjectType[SPSharedObjectType[\"Folder\"] = 2] = \"Folder\";\r\n SPSharedObjectType[SPSharedObjectType[\"Item\"] = 3] = \"Item\";\r\n SPSharedObjectType[SPSharedObjectType[\"List\"] = 4] = \"List\";\r\n SPSharedObjectType[SPSharedObjectType[\"Web\"] = 5] = \"Web\";\r\n SPSharedObjectType[SPSharedObjectType[\"Max\"] = 6] = \"Max\";\r\n})(SPSharedObjectType || (SPSharedObjectType = {}));\r\nexport var SharingDomainRestrictionMode;\r\n(function (SharingDomainRestrictionMode) {\r\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"None\"] = 0] = \"None\";\r\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"AllowList\"] = 1] = \"AllowList\";\r\n SharingDomainRestrictionMode[SharingDomainRestrictionMode[\"BlockList\"] = 2] = \"BlockList\";\r\n})(SharingDomainRestrictionMode || (SharingDomainRestrictionMode = {}));\r\nexport var RenderListDataOptions;\r\n(function (RenderListDataOptions) {\r\n RenderListDataOptions[RenderListDataOptions[\"None\"] = 0] = \"None\";\r\n RenderListDataOptions[RenderListDataOptions[\"ContextInfo\"] = 1] = \"ContextInfo\";\r\n RenderListDataOptions[RenderListDataOptions[\"ListData\"] = 2] = \"ListData\";\r\n RenderListDataOptions[RenderListDataOptions[\"ListSchema\"] = 4] = \"ListSchema\";\r\n RenderListDataOptions[RenderListDataOptions[\"MenuView\"] = 8] = \"MenuView\";\r\n RenderListDataOptions[RenderListDataOptions[\"ListContentType\"] = 16] = \"ListContentType\";\r\n RenderListDataOptions[RenderListDataOptions[\"FileSystemItemId\"] = 32] = \"FileSystemItemId\";\r\n RenderListDataOptions[RenderListDataOptions[\"ClientFormSchema\"] = 64] = \"ClientFormSchema\";\r\n RenderListDataOptions[RenderListDataOptions[\"QuickLaunch\"] = 128] = \"QuickLaunch\";\r\n RenderListDataOptions[RenderListDataOptions[\"Spotlight\"] = 256] = \"Spotlight\";\r\n RenderListDataOptions[RenderListDataOptions[\"Visualization\"] = 512] = \"Visualization\";\r\n RenderListDataOptions[RenderListDataOptions[\"ViewMetadata\"] = 1024] = \"ViewMetadata\";\r\n RenderListDataOptions[RenderListDataOptions[\"DisableAutoHyperlink\"] = 2048] = \"DisableAutoHyperlink\";\r\n RenderListDataOptions[RenderListDataOptions[\"EnableMediaTAUrls\"] = 4096] = \"EnableMediaTAUrls\";\r\n RenderListDataOptions[RenderListDataOptions[\"ParentInfo\"] = 8192] = \"ParentInfo\";\r\n RenderListDataOptions[RenderListDataOptions[\"PageContextInfo\"] = 16384] = \"PageContextInfo\";\r\n RenderListDataOptions[RenderListDataOptions[\"ClientSideComponentManifest\"] = 32768] = \"ClientSideComponentManifest\";\r\n})(RenderListDataOptions || (RenderListDataOptions = {}));\r\nexport var FieldUserSelectionMode;\r\n(function (FieldUserSelectionMode) {\r\n FieldUserSelectionMode[FieldUserSelectionMode[\"PeopleAndGroups\"] = 1] = \"PeopleAndGroups\";\r\n FieldUserSelectionMode[FieldUserSelectionMode[\"PeopleOnly\"] = 0] = \"PeopleOnly\";\r\n})(FieldUserSelectionMode || (FieldUserSelectionMode = {}));\r\nexport var ChoiceFieldFormatType;\r\n(function (ChoiceFieldFormatType) {\r\n ChoiceFieldFormatType[ChoiceFieldFormatType[\"Dropdown\"] = 0] = \"Dropdown\";\r\n ChoiceFieldFormatType[ChoiceFieldFormatType[\"RadioButtons\"] = 1] = \"RadioButtons\";\r\n})(ChoiceFieldFormatType || (ChoiceFieldFormatType = {}));\r\n/**\r\n * Specifies the originating zone of a request received.\r\n */\r\nexport var UrlZone;\r\n(function (UrlZone) {\r\n /**\r\n * Specifies the default zone used for requests unless another zone is specified.\r\n */\r\n UrlZone[UrlZone[\"DefaultZone\"] = 0] = \"DefaultZone\";\r\n /**\r\n * Specifies an intranet zone.\r\n */\r\n UrlZone[UrlZone[\"Intranet\"] = 1] = \"Intranet\";\r\n /**\r\n * Specifies an Internet zone.\r\n */\r\n UrlZone[UrlZone[\"Internet\"] = 2] = \"Internet\";\r\n /**\r\n * Specifies a custom zone.\r\n */\r\n UrlZone[UrlZone[\"Custom\"] = 3] = \"Custom\";\r\n /**\r\n * Specifies an extranet zone.\r\n */\r\n UrlZone[UrlZone[\"Extranet\"] = 4] = \"Extranet\";\r\n})(UrlZone || (UrlZone = {}));\r\n//# sourceMappingURL=types.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { SiteGroups } from \"./sitegroups\";\r\nimport { extend, jsS, hOP } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Describes a set of role assignments for the current scope\r\n *\r\n */\r\nvar RoleAssignments = /** @class */ (function (_super) {\r\n tslib_1.__extends(RoleAssignments, _super);\r\n function RoleAssignments() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RoleAssignments_1 = RoleAssignments;\r\n /**\r\n * Gets the role assignment associated with the specified principal id from the collection.\r\n *\r\n * @param id The id of the role assignment\r\n */\r\n RoleAssignments.prototype.getById = function (id) {\r\n var ra = new RoleAssignment(this);\r\n ra.concat(\"(\" + id + \")\");\r\n return ra;\r\n };\r\n /**\r\n * Adds a new role assignment with the specified principal and role definitions to the collection\r\n *\r\n * @param principalId The id of the user or group to assign permissions to\r\n * @param roleDefId The id of the role definition that defines the permissions to assign\r\n *\r\n */\r\n RoleAssignments.prototype.add = function (principalId, roleDefId) {\r\n return this.clone(RoleAssignments_1, \"addroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\r\n };\r\n /**\r\n * Removes the role assignment with the specified principal and role definition from the collection\r\n *\r\n * @param principalId The id of the user or group in the role assignment\r\n * @param roleDefId The id of the role definition in the role assignment\r\n *\r\n */\r\n RoleAssignments.prototype.remove = function (principalId, roleDefId) {\r\n return this.clone(RoleAssignments_1, \"removeroleassignment(principalid=\" + principalId + \", roledefid=\" + roleDefId + \")\").postCore();\r\n };\r\n var RoleAssignments_1;\r\n RoleAssignments = RoleAssignments_1 = tslib_1.__decorate([\r\n defaultPath(\"roleassignments\")\r\n ], RoleAssignments);\r\n return RoleAssignments;\r\n}(SharePointQueryableCollection));\r\nexport { RoleAssignments };\r\n/**\r\n * Describes a role assignment\r\n *\r\n */\r\nvar RoleAssignment = /** @class */ (function (_super) {\r\n tslib_1.__extends(RoleAssignment, _super);\r\n function RoleAssignment() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Deletes this role assignment\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(RoleAssignment.prototype, \"groups\", {\r\n /**\r\n * Gets the groups that directly belong to the access control list (ACL) for this securable object\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroups(this, \"groups\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RoleAssignment.prototype, \"bindings\", {\r\n /**\r\n * Gets the role definition bindings for this role assignment\r\n *\r\n */\r\n get: function () {\r\n return new RoleDefinitionBindings(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return RoleAssignment;\r\n}(SharePointQueryableInstance));\r\nexport { RoleAssignment };\r\n/**\r\n * Describes a collection of role definitions\r\n *\r\n */\r\nvar RoleDefinitions = /** @class */ (function (_super) {\r\n tslib_1.__extends(RoleDefinitions, _super);\r\n function RoleDefinitions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets the role definition with the specified id from the collection\r\n *\r\n * @param id The id of the role definition\r\n *\r\n */\r\n RoleDefinitions.prototype.getById = function (id) {\r\n return new RoleDefinition(this, \"getById(\" + id + \")\");\r\n };\r\n /**\r\n * Gets the role definition with the specified name\r\n *\r\n * @param name The name of the role definition\r\n *\r\n */\r\n RoleDefinitions.prototype.getByName = function (name) {\r\n return new RoleDefinition(this, \"getbyname('\" + name + \"')\");\r\n };\r\n /**\r\n * Gets the role definition with the specified role type\r\n *\r\n * @param roleTypeKind The roletypekind of the role definition (None=0, Guest=1, Reader=2, Contributor=3, WebDesigner=4, Administrator=5, Editor=6, System=7)\r\n *\r\n */\r\n RoleDefinitions.prototype.getByType = function (roleTypeKind) {\r\n return new RoleDefinition(this, \"getbytype(\" + roleTypeKind + \")\");\r\n };\r\n /**\r\n * Creates a role definition\r\n *\r\n * @param name The new role definition's name\r\n * @param description The new role definition's description\r\n * @param order The order in which the role definition appears\r\n * @param basePermissions The permissions mask for this role definition\r\n *\r\n */\r\n RoleDefinitions.prototype.add = function (name, description, order, basePermissions) {\r\n var _this = this;\r\n var postBody = jsS({\r\n BasePermissions: {\r\n High: basePermissions.High.toString(),\r\n Low: basePermissions.Low.toString(),\r\n },\r\n Description: description,\r\n Name: name,\r\n Order: order,\r\n __metadata: { \"type\": \"SP.RoleDefinition\" },\r\n });\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n definition: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n RoleDefinitions = tslib_1.__decorate([\r\n defaultPath(\"roledefinitions\")\r\n ], RoleDefinitions);\r\n return RoleDefinitions;\r\n}(SharePointQueryableCollection));\r\nexport { RoleDefinitions };\r\n/**\r\n * Describes a role definition\r\n *\r\n */\r\nvar RoleDefinition = /** @class */ (function (_super) {\r\n tslib_1.__extends(RoleDefinition, _super);\r\n function RoleDefinition() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Deletes this role definition\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n /* tslint:enable */\r\n }\r\n /**\r\n * Updates this role definition with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the role definition\r\n */\r\n /* tslint:disable no-string-literal */\r\n RoleDefinition.prototype.update = function (properties) {\r\n var _this = this;\r\n if (hOP(properties, \"BasePermissions\") !== undefined) {\r\n properties[\"BasePermissions\"] = extend({ __metadata: { type: \"SP.BasePermissions\" } }, {\r\n High: properties[\"BasePermissions\"].High.toString(),\r\n Low: properties[\"BasePermissions\"].Low.toString(),\r\n });\r\n }\r\n var postBody = jsS(extend(metadata(\"SP.RoleDefinition\"), properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n var retDef = _this;\r\n if (hOP(properties, \"Name\")) {\r\n var parent_1 = _this.getParent(RoleDefinitions, _this.parentUrl, \"\");\r\n retDef = parent_1.getByName(properties[\"Name\"]);\r\n }\r\n return {\r\n data: data,\r\n definition: retDef,\r\n };\r\n });\r\n };\r\n return RoleDefinition;\r\n}(SharePointQueryableInstance));\r\nexport { RoleDefinition };\r\n/**\r\n * Describes the role definitons bound to a role assignment object\r\n *\r\n */\r\nvar RoleDefinitionBindings = /** @class */ (function (_super) {\r\n tslib_1.__extends(RoleDefinitionBindings, _super);\r\n function RoleDefinitionBindings() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RoleDefinitionBindings = tslib_1.__decorate([\r\n defaultPath(\"roledefinitionbindings\")\r\n ], RoleDefinitionBindings);\r\n return RoleDefinitionBindings;\r\n}(SharePointQueryableCollection));\r\nexport { RoleDefinitionBindings };\r\n//# sourceMappingURL=roles.js.map","import * as tslib_1 from \"tslib\";\r\nimport { RoleAssignments } from \"./roles\";\r\nimport { PermissionKind } from \"./types\";\r\nimport { SharePointQueryable, SharePointQueryableInstance } from \"./sharepointqueryable\";\r\nimport { hOP } from \"@pnp/common\";\r\nvar SharePointQueryableSecurable = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableSecurable, _super);\r\n function SharePointQueryableSecurable() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"roleAssignments\", {\r\n /**\r\n * Gets the set of role assignments for this item\r\n *\r\n */\r\n get: function () {\r\n return new RoleAssignments(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SharePointQueryableSecurable.prototype, \"firstUniqueAncestorSecurableObject\", {\r\n /**\r\n * Gets the closest securable up the security hierarchy whose permissions are applied to this list item\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FirstUniqueAncestorSecurableObject\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the effective permissions for the user supplied\r\n *\r\n * @param loginName The claims username for the user (ex: i:0#.f|membership|user@domain.com)\r\n */\r\n SharePointQueryableSecurable.prototype.getUserEffectivePermissions = function (loginName) {\r\n var q = this.clone(SharePointQueryable, \"getUserEffectivePermissions(@user)\");\r\n q.query.set(\"@user\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get().then(function (r) {\r\n // handle verbose mode\r\n return hOP(r, \"GetUserEffectivePermissions\") ? r.GetUserEffectivePermissions : r;\r\n });\r\n };\r\n /**\r\n * Gets the effective permissions for the current user\r\n */\r\n SharePointQueryableSecurable.prototype.getCurrentUserEffectivePermissions = function () {\r\n var q = this.clone(SharePointQueryable, \"EffectiveBasePermissions\");\r\n return q.get().then(function (r) {\r\n // handle verbose mode\r\n return hOP(r, \"EffectiveBasePermissions\") ? r.EffectiveBasePermissions : r;\r\n });\r\n };\r\n /**\r\n * Breaks the security inheritance at this level optinally copying permissions and clearing subscopes\r\n *\r\n * @param copyRoleAssignments If true the permissions are copied from the current parent scope\r\n * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object\r\n */\r\n SharePointQueryableSecurable.prototype.breakRoleInheritance = function (copyRoleAssignments, clearSubscopes) {\r\n if (copyRoleAssignments === void 0) { copyRoleAssignments = false; }\r\n if (clearSubscopes === void 0) { clearSubscopes = false; }\r\n return this.clone(SharePointQueryableSecurable, \"breakroleinheritance(copyroleassignments=\" + copyRoleAssignments + \", clearsubscopes=\" + clearSubscopes + \")\").postCore();\r\n };\r\n /**\r\n * Removes the local role assignments so that it re-inherit role assignments from the parent object.\r\n *\r\n */\r\n SharePointQueryableSecurable.prototype.resetRoleInheritance = function () {\r\n return this.clone(SharePointQueryableSecurable, \"resetroleinheritance\").postCore();\r\n };\r\n /**\r\n * Determines if a given user has the appropriate permissions\r\n *\r\n * @param loginName The user to check\r\n * @param permission The permission being checked\r\n */\r\n SharePointQueryableSecurable.prototype.userHasPermissions = function (loginName, permission) {\r\n var _this = this;\r\n return this.getUserEffectivePermissions(loginName).then(function (perms) {\r\n return _this.hasPermissions(perms, permission);\r\n });\r\n };\r\n /**\r\n * Determines if the current user has the requested permissions\r\n *\r\n * @param permission The permission we wish to check\r\n */\r\n SharePointQueryableSecurable.prototype.currentUserHasPermissions = function (permission) {\r\n var _this = this;\r\n return this.getCurrentUserEffectivePermissions().then(function (perms) {\r\n return _this.hasPermissions(perms, permission);\r\n });\r\n };\r\n /**\r\n * Taken from sp.js, checks the supplied permissions against the mask\r\n *\r\n * @param value The security principal's permissions on the given object\r\n * @param perm The permission checked against the value\r\n */\r\n /* tslint:disable:no-bitwise */\r\n SharePointQueryableSecurable.prototype.hasPermissions = function (value, perm) {\r\n if (!perm) {\r\n return true;\r\n }\r\n if (perm === PermissionKind.FullMask) {\r\n return (value.High & 32767) === 32767 && value.Low === 65535;\r\n }\r\n perm = perm - 1;\r\n var num = 1;\r\n if (perm >= 0 && perm < 32) {\r\n num = num << perm;\r\n return 0 !== (value.Low & num);\r\n }\r\n else if (perm >= 32 && perm < 64) {\r\n num = num << perm - 32;\r\n return 0 !== (value.High & num);\r\n }\r\n return false;\r\n };\r\n return SharePointQueryableSecurable;\r\n}(SharePointQueryableInstance));\r\nexport { SharePointQueryableSecurable };\r\n//# sourceMappingURL=sharepointqueryablesecurable.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { TextParser, BlobParser, JSONParser, BufferParser } from \"@pnp/odata\";\r\nimport { extend, getGUID, stringIsNullOrEmpty } from \"@pnp/common\";\r\nimport { LimitedWebPartManager } from \"./webparts\";\r\nimport { Item } from \"./items\";\r\nimport { SharePointQueryableShareableFile } from \"./sharepointqueryableshareable\";\r\nimport { odataUrlFrom } from \"./odata\";\r\n/**\r\n * Describes a collection of File objects\r\n *\r\n */\r\nvar Files = /** @class */ (function (_super) {\r\n tslib_1.__extends(Files, _super);\r\n function Files() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Files_1 = Files;\r\n /**\r\n * Gets a File by filename\r\n *\r\n * @param name The name of the file, including extension.\r\n */\r\n Files.prototype.getByName = function (name) {\r\n var f = new File(this);\r\n f.concat(\"('\" + name + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Uploads a file. Not supported for batching\r\n *\r\n * @param url The folder-relative url of the file.\r\n * @param content The file contents blob.\r\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\r\n * @returns The new File and the raw response.\r\n */\r\n Files.prototype.add = function (url, content, shouldOverWrite) {\r\n var _this = this;\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n return new Files_1(this, \"add(overwrite=\" + shouldOverWrite + \",url='\" + url + \"')\")\r\n .postCore({\r\n body: content,\r\n }).then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(url),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a file using the pound percent safe methods\r\n *\r\n * @param url Excoded url of the file\r\n * @param content The file content\r\n * @param parameters Additional parameters to control method behavior\r\n */\r\n Files.prototype.addUsingPath = function (url, content, parameters) {\r\n var _this = this;\r\n if (parameters === void 0) { parameters = { Overwrite: false }; }\r\n var path = [\"AddUsingPath(decodedurl='\" + url + \"'\"];\r\n if (parameters) {\r\n if (parameters.Overwrite) {\r\n path.push(\",Overwrite=true\");\r\n }\r\n if (parameters.AutoCheckoutOnInvalidData) {\r\n path.push(\",AutoCheckoutOnInvalidData=true\");\r\n }\r\n if (!stringIsNullOrEmpty(parameters.XorHash)) {\r\n path.push(\",XorHash=\" + parameters.XorHash);\r\n }\r\n }\r\n path.push(\")\");\r\n return new Files_1(this, path.join(\"\"))\r\n .postCore({\r\n body: content,\r\n }).then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(url),\r\n };\r\n });\r\n };\r\n /**\r\n * Uploads a file. Not supported for batching\r\n *\r\n * @param url The folder-relative url of the file.\r\n * @param content The Blob file content to add\r\n * @param progress A callback function which can be used to track the progress of the upload\r\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten? (default: true)\r\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\r\n * @returns The new File and the raw response.\r\n */\r\n Files.prototype.addChunked = function (url, content, progress, shouldOverWrite, chunkSize) {\r\n var _this = this;\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n if (chunkSize === void 0) { chunkSize = 10485760; }\r\n var adder = this.clone(Files_1, \"add(overwrite = \" + shouldOverWrite + \", url = '\" + url + \"')\", false);\r\n return adder.postCore()\r\n .then(function () { return _this.getByName(url); })\r\n .then(function (file) { return file.setContentChunked(content, progress, chunkSize); });\r\n };\r\n /**\r\n * Adds a ghosted file to an existing list or document library. Not supported for batching.\r\n *\r\n * @param fileUrl The server-relative url where you want to save the file.\r\n * @param templateFileType The type of use to create the file.\r\n * @returns The template file that was added and the raw response.\r\n */\r\n Files.prototype.addTemplateFile = function (fileUrl, templateFileType) {\r\n var _this = this;\r\n return this.clone(Files_1, \"addTemplateFile(urloffile = '\" + fileUrl + \"', templatefiletype = \" + templateFileType + \")\", false)\r\n .postCore().then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(fileUrl),\r\n };\r\n });\r\n };\r\n var Files_1;\r\n Files = Files_1 = tslib_1.__decorate([\r\n defaultPath(\"files\")\r\n ], Files);\r\n return Files;\r\n}(SharePointQueryableCollection));\r\nexport { Files };\r\n/**\r\n * Describes a single File instance\r\n *\r\n */\r\nvar File = /** @class */ (function (_super) {\r\n tslib_1.__extends(File, _super);\r\n function File() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(File.prototype, \"listItemAllFields\", {\r\n /**\r\n * Gets a value that specifies the list item field values for the list item corresponding to the file.\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"listItemAllFields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(File.prototype, \"versions\", {\r\n /**\r\n * Gets a collection of versions\r\n *\r\n */\r\n get: function () {\r\n return new Versions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Approves the file submitted for content approval with the specified comment.\r\n * Only documents in lists that are enabled for content approval can be approved.\r\n *\r\n * @param comment The comment for the approval.\r\n */\r\n File.prototype.approve = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n return this.clone(File, \"approve(comment = '\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Stops the chunk upload session without saving the uploaded data. Does not support batching.\r\n * If the file doesn’t already exist in the library, the partially uploaded file will be deleted.\r\n * Use this in response to user action (as in a request to cancel an upload) or an error or exception.\r\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n */\r\n File.prototype.cancelUpload = function (uploadId) {\r\n return this.clone(File, \"cancelUpload(uploadId = guid'\" + uploadId + \"')\", false).postCore();\r\n };\r\n /**\r\n * Checks the file in to a document library based on the check-in type.\r\n *\r\n * @param comment A comment for the check-in. Its length must be <= 1023.\r\n * @param checkinType The check-in type for the file.\r\n */\r\n File.prototype.checkin = function (comment, checkinType) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (checkinType === void 0) { checkinType = CheckinType.Major; }\r\n if (comment.length > 1023) {\r\n throw Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"checkin(comment = '\" + comment + \"', checkintype = \" + checkinType + \")\").postCore();\r\n };\r\n /**\r\n * Checks out the file from a document library.\r\n */\r\n File.prototype.checkout = function () {\r\n return this.clone(File, \"checkout\").postCore();\r\n };\r\n /**\r\n * Copies the file to the destination url.\r\n *\r\n * @param url The absolute url or server relative url of the destination file path to copy to.\r\n * @param shouldOverWrite Should a file with the same name in the same location be overwritten?\r\n */\r\n File.prototype.copyTo = function (url, shouldOverWrite) {\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n return this.clone(File, \"copyTo(strnewurl = '\" + url + \"', boverwrite = \" + shouldOverWrite + \")\").postCore();\r\n };\r\n /**\r\n * Delete this file.\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n File.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.clone(File, null).postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Denies approval for a file that was submitted for content approval.\r\n * Only documents in lists that are enabled for content approval can be denied.\r\n *\r\n * @param comment The comment for the denial.\r\n */\r\n File.prototype.deny = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (comment.length > 1023) {\r\n throw Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"deny(comment = '\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Specifies the control set used to access, modify, or add Web Parts associated with this Web Part Page and view.\r\n * An exception is thrown if the file is not an ASPX page.\r\n *\r\n * @param scope The WebPartsPersonalizationScope view on the Web Parts page.\r\n */\r\n File.prototype.getLimitedWebPartManager = function (scope) {\r\n if (scope === void 0) { scope = WebPartsPersonalizationScope.Shared; }\r\n return new LimitedWebPartManager(this, \"getLimitedWebPartManager(scope = \" + scope + \")\");\r\n };\r\n /**\r\n * Moves the file to the specified destination url.\r\n *\r\n * @param url The absolute url or server relative url of the destination file path to move to.\r\n * @param moveOperations The bitwise MoveOperations value for how to move the file.\r\n */\r\n File.prototype.moveTo = function (url, moveOperations) {\r\n if (moveOperations === void 0) { moveOperations = MoveOperations.Overwrite; }\r\n return this.clone(File, \"moveTo(newurl = '\" + url + \"', flags = \" + moveOperations + \")\").postCore();\r\n };\r\n /**\r\n * Submits the file for content approval with the specified comment.\r\n *\r\n * @param comment The comment for the published file. Its length must be <= 1023.\r\n */\r\n File.prototype.publish = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (comment.length > 1023) {\r\n throw Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"publish(comment = '\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Moves the file to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n *\r\n * @returns The GUID of the recycled file.\r\n */\r\n File.prototype.recycle = function () {\r\n return this.clone(File, \"recycle\").postCore();\r\n };\r\n /**\r\n * Reverts an existing checkout for the file.\r\n *\r\n */\r\n File.prototype.undoCheckout = function () {\r\n return this.clone(File, \"undoCheckout\").postCore();\r\n };\r\n /**\r\n * Removes the file from content approval or unpublish a major version.\r\n *\r\n * @param comment The comment for the unpublish operation. Its length must be <= 1023.\r\n */\r\n File.prototype.unpublish = function (comment) {\r\n if (comment === void 0) { comment = \"\"; }\r\n if (comment.length > 1023) {\r\n throw Error(\"The maximum comment length is 1023 characters.\");\r\n }\r\n return this.clone(File, \"unpublish(comment = '\" + comment + \"')\").postCore();\r\n };\r\n /**\r\n * Gets the contents of the file as text. Not supported in batching.\r\n *\r\n */\r\n File.prototype.getText = function () {\r\n return this.clone(File, \"$value\", false).get(new TextParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Gets the contents of the file as a blob, does not work in Node.js. Not supported in batching.\r\n *\r\n */\r\n File.prototype.getBlob = function () {\r\n return this.clone(File, \"$value\", false).get(new BlobParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\r\n */\r\n File.prototype.getBuffer = function () {\r\n return this.clone(File, \"$value\", false).get(new BufferParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js. Not supported in batching.\r\n */\r\n File.prototype.getJSON = function () {\r\n return this.clone(File, \"$value\", false).get(new JSONParser(), { headers: { \"binaryStringResponseBody\": \"true\" } });\r\n };\r\n /**\r\n * Sets the content of a file, for large files use setContentChunked. Not supported in batching.\r\n *\r\n * @param content The file content\r\n *\r\n */\r\n File.prototype.setContent = function (content) {\r\n var _this = this;\r\n return this.clone(File, \"$value\", false).postCore({\r\n body: content,\r\n headers: {\r\n \"X-HTTP-Method\": \"PUT\",\r\n },\r\n }).then(function (_) { return new File(_this); });\r\n };\r\n /**\r\n * Gets the associated list item for this folder, loading the default properties\r\n */\r\n File.prototype.getItem = function () {\r\n var _this = this;\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n var q = this.listItemAllFields;\r\n return q.select.apply(q, selects).get().then(function (d) {\r\n return extend((new Item(odataUrlFrom(d))).configureFrom(_this), d);\r\n });\r\n };\r\n /**\r\n * Sets the contents of a file using a chunked upload approach. Not supported in batching.\r\n *\r\n * @param file The file to upload\r\n * @param progress A callback function which can be used to track the progress of the upload\r\n * @param chunkSize The size of each file slice, in bytes (default: 10485760)\r\n */\r\n File.prototype.setContentChunked = function (file, progress, chunkSize) {\r\n var _this = this;\r\n if (chunkSize === void 0) { chunkSize = 10485760; }\r\n if (progress === undefined) {\r\n progress = function () { return null; };\r\n }\r\n var fileSize = file.size;\r\n var blockCount = parseInt((file.size / chunkSize).toString(), 10) + ((file.size % chunkSize === 0) ? 1 : 0);\r\n var uploadId = getGUID();\r\n // start the chain with the first fragment\r\n progress({ uploadId: uploadId, blockNumber: 1, chunkSize: chunkSize, currentPointer: 0, fileSize: fileSize, stage: \"starting\", totalBlocks: blockCount });\r\n var chain = this.startUpload(uploadId, file.slice(0, chunkSize));\r\n var _loop_1 = function (i) {\r\n chain = chain.then(function (pointer) {\r\n progress({ uploadId: uploadId, blockNumber: i, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"continue\", totalBlocks: blockCount });\r\n return _this.continueUpload(uploadId, pointer, file.slice(pointer, pointer + chunkSize));\r\n });\r\n };\r\n // skip the first and last blocks\r\n for (var i = 2; i < blockCount; i++) {\r\n _loop_1(i);\r\n }\r\n return chain.then(function (pointer) {\r\n progress({ uploadId: uploadId, blockNumber: blockCount, chunkSize: chunkSize, currentPointer: pointer, fileSize: fileSize, stage: \"finishing\", totalBlocks: blockCount });\r\n return _this.finishUpload(uploadId, pointer, file.slice(pointer));\r\n });\r\n };\r\n /**\r\n * Starts a new chunk upload session and uploads the first fragment.\r\n * The current file content is not changed when this method completes.\r\n * The method is idempotent (and therefore does not change the result) as long as you use the same values for uploadId and stream.\r\n * The upload session ends either when you use the CancelUpload method or when you successfully\r\n * complete the upload session by passing the rest of the file contents through the ContinueUpload and FinishUpload methods.\r\n * The StartUpload and ContinueUpload methods return the size of the running total of uploaded data in bytes,\r\n * so you can pass those return values to subsequent uses of ContinueUpload and FinishUpload.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n * @param fragment The file contents.\r\n * @returns The size of the total uploaded data in bytes.\r\n */\r\n File.prototype.startUpload = function (uploadId, fragment) {\r\n return this.clone(File, \"startUpload(uploadId = guid'\" + uploadId + \"')\", false)\r\n .postCore({ body: fragment })\r\n .then(function (n) {\r\n // When OData=verbose the payload has the following shape:\r\n // { StartUpload: \"10485760\" }\r\n if (typeof n === \"object\") {\r\n n = n.StartUpload;\r\n }\r\n return parseFloat(n);\r\n });\r\n };\r\n /**\r\n * Continues the chunk upload session with an additional fragment.\r\n * The current file content is not changed.\r\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n * @param fileOffset The size of the offset into the file where the fragment starts.\r\n * @param fragment The file contents.\r\n * @returns The size of the total uploaded data in bytes.\r\n */\r\n File.prototype.continueUpload = function (uploadId, fileOffset, fragment) {\r\n return this.clone(File, \"continueUpload(uploadId = guid'\" + uploadId + \"', fileOffset = \" + fileOffset + \")\", false)\r\n .postCore({ body: fragment })\r\n .then(function (n) {\r\n // When OData=verbose the payload has the following shape:\r\n // { ContinueUpload: \"20971520\" }\r\n if (typeof n === \"object\") {\r\n n = n.ContinueUpload;\r\n }\r\n return parseFloat(n);\r\n });\r\n };\r\n /**\r\n * Uploads the last file fragment and commits the file. The current file content is changed when this method completes.\r\n * Use the uploadId value that was passed to the StartUpload method that started the upload session.\r\n * This method is currently available only on Office 365.\r\n *\r\n * @param uploadId The unique identifier of the upload session.\r\n * @param fileOffset The size of the offset into the file where the fragment starts.\r\n * @param fragment The file contents.\r\n * @returns The newly uploaded file.\r\n */\r\n File.prototype.finishUpload = function (uploadId, fileOffset, fragment) {\r\n return this.clone(File, \"finishUpload(uploadId = guid'\" + uploadId + \"', fileOffset = \" + fileOffset + \")\", false)\r\n .postCore({ body: fragment })\r\n .then(function (response) {\r\n return {\r\n data: response,\r\n file: new File(odataUrlFrom(response)),\r\n };\r\n });\r\n };\r\n return File;\r\n}(SharePointQueryableShareableFile));\r\nexport { File };\r\n/**\r\n * Describes a collection of Version objects\r\n *\r\n */\r\nvar Versions = /** @class */ (function (_super) {\r\n tslib_1.__extends(Versions, _super);\r\n function Versions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Versions_1 = Versions;\r\n /**\r\n * Gets a version by id\r\n *\r\n * @param versionId The id of the version to retrieve\r\n */\r\n Versions.prototype.getById = function (versionId) {\r\n var v = new Version(this);\r\n v.concat(\"(\" + versionId + \")\");\r\n return v;\r\n };\r\n /**\r\n * Deletes all the file version objects in the collection.\r\n *\r\n */\r\n Versions.prototype.deleteAll = function () {\r\n return new Versions_1(this, \"deleteAll\").postCore();\r\n };\r\n /**\r\n * Deletes the specified version of the file.\r\n *\r\n * @param versionId The ID of the file version to delete.\r\n */\r\n Versions.prototype.deleteById = function (versionId) {\r\n return this.clone(Versions_1, \"deleteById(vid = \" + versionId + \")\").postCore();\r\n };\r\n /**\r\n * Recycles the specified version of the file.\r\n *\r\n * @param versionId The ID of the file version to delete.\r\n */\r\n Versions.prototype.recycleByID = function (versionId) {\r\n return this.clone(Versions_1, \"recycleByID(vid = \" + versionId + \")\").postCore();\r\n };\r\n /**\r\n * Deletes the file version object with the specified version label.\r\n *\r\n * @param label The version label of the file version to delete, for example: 1.2\r\n */\r\n Versions.prototype.deleteByLabel = function (label) {\r\n return this.clone(Versions_1, \"deleteByLabel(versionlabel = '\" + label + \"')\").postCore();\r\n };\r\n /**\r\n * Recycles the file version object with the specified version label.\r\n *\r\n * @param label The version label of the file version to delete, for example: 1.2\r\n */\r\n Versions.prototype.recycleByLabel = function (label) {\r\n return this.clone(Versions_1, \"recycleByLabel(versionlabel = '\" + label + \"')\").postCore();\r\n };\r\n /**\r\n * Creates a new file version from the file specified by the version label.\r\n *\r\n * @param label The version label of the file version to restore, for example: 1.2\r\n */\r\n Versions.prototype.restoreByLabel = function (label) {\r\n return this.clone(Versions_1, \"restoreByLabel(versionlabel = '\" + label + \"')\").postCore();\r\n };\r\n var Versions_1;\r\n Versions = Versions_1 = tslib_1.__decorate([\r\n defaultPath(\"versions\")\r\n ], Versions);\r\n return Versions;\r\n}(SharePointQueryableCollection));\r\nexport { Versions };\r\n/**\r\n * Describes a single Version instance\r\n *\r\n */\r\nvar Version = /** @class */ (function (_super) {\r\n tslib_1.__extends(Version, _super);\r\n function Version() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete a specific version of a file.\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n // /**\r\n // * Delete a specific version of a file.\r\n // *\r\n // * @param eTag Value used in the IF-Match header, by default \"*\"\r\n // */\r\n // public delete(eTag = \"*\"): Promise {\r\n // return this.postCore({\r\n // headers: {\r\n // \"IF-Match\": eTag,\r\n // \"X-HTTP-Method\": \"DELETE\",\r\n // },\r\n // });\r\n // }\r\n }\r\n return Version;\r\n}(SharePointQueryableInstance));\r\nexport { Version };\r\nexport var CheckinType;\r\n(function (CheckinType) {\r\n CheckinType[CheckinType[\"Minor\"] = 0] = \"Minor\";\r\n CheckinType[CheckinType[\"Major\"] = 1] = \"Major\";\r\n CheckinType[CheckinType[\"Overwrite\"] = 2] = \"Overwrite\";\r\n})(CheckinType || (CheckinType = {}));\r\nexport var WebPartsPersonalizationScope;\r\n(function (WebPartsPersonalizationScope) {\r\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"User\"] = 0] = \"User\";\r\n WebPartsPersonalizationScope[WebPartsPersonalizationScope[\"Shared\"] = 1] = \"Shared\";\r\n})(WebPartsPersonalizationScope || (WebPartsPersonalizationScope = {}));\r\nexport var MoveOperations;\r\n(function (MoveOperations) {\r\n MoveOperations[MoveOperations[\"Overwrite\"] = 1] = \"Overwrite\";\r\n MoveOperations[MoveOperations[\"AllowBrokenThickets\"] = 8] = \"AllowBrokenThickets\";\r\n})(MoveOperations || (MoveOperations = {}));\r\nexport var TemplateFileType;\r\n(function (TemplateFileType) {\r\n TemplateFileType[TemplateFileType[\"StandardPage\"] = 0] = \"StandardPage\";\r\n TemplateFileType[TemplateFileType[\"WikiPage\"] = 1] = \"WikiPage\";\r\n TemplateFileType[TemplateFileType[\"FormPage\"] = 2] = \"FormPage\";\r\n TemplateFileType[TemplateFileType[\"ClientSidePage\"] = 3] = \"ClientSidePage\";\r\n})(TemplateFileType || (TemplateFileType = {}));\r\n//# sourceMappingURL=files.js.map","import * as tslib_1 from \"tslib\";\r\nimport { extend, combine, jsS } from \"@pnp/common\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, } from \"./sharepointqueryable\";\r\nimport { SharePointQueryableSecurable } from \"./sharepointqueryablesecurable\";\r\nimport { RoleType, SharingLinkKind, SharingRole, } from \"./types\";\r\nimport { extractWebUrl } from \"./utils/extractweburl\";\r\n/**\r\n * Internal helper class used to augment classes to include sharing functionality\r\n */\r\nvar SharePointQueryableShareable = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableShareable, _super);\r\n function SharePointQueryableShareable() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a sharing link for the supplied\r\n *\r\n * @param kind The kind of link to share\r\n * @param expiration The optional expiration for this link\r\n */\r\n SharePointQueryableShareable.prototype.getShareLink = function (kind, expiration) {\r\n if (expiration === void 0) { expiration = null; }\r\n // date needs to be an ISO string or null\r\n var expString = expiration !== null ? expiration.toISOString() : null;\r\n // clone using the factory and send the request\r\n return this.clone(SharePointQueryableShareable, \"shareLink\").postCore({\r\n body: jsS({\r\n request: {\r\n createLink: true,\r\n emailData: null,\r\n settings: {\r\n expiration: expString,\r\n linkKind: kind,\r\n },\r\n },\r\n }),\r\n });\r\n };\r\n /**\r\n * Shares this instance with the supplied users\r\n *\r\n * @param loginNames Resolved login names to share\r\n * @param role The role\r\n * @param requireSignin True to require the user is authenticated, otherwise false\r\n * @param propagateAcl True to apply this share to all children\r\n * @param emailData If supplied an email will be sent with the indicated properties\r\n */\r\n SharePointQueryableShareable.prototype.shareWith = function (loginNames, role, requireSignin, propagateAcl, emailData) {\r\n var _this = this;\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n if (propagateAcl === void 0) { propagateAcl = false; }\r\n // handle the multiple input types\r\n if (!Array.isArray(loginNames)) {\r\n loginNames = [loginNames];\r\n }\r\n var userStr = jsS(loginNames.map(function (login) { return { Key: login }; }));\r\n var roleFilter = role === SharingRole.Edit ? RoleType.Contributor : RoleType.Reader;\r\n // start by looking up the role definition id we need to set the roleValue\r\n // remove need to reference Web here, which created a circular build issue\r\n var w = new SharePointQueryableCollection(\"_api/web\", \"roledefinitions\");\r\n return w.select(\"Id\").filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\r\n if (!Array.isArray(def) || def.length < 1) {\r\n throw Error(\"Could not locate a role defintion with RoleTypeKind \" + roleFilter);\r\n }\r\n var postBody = {\r\n includeAnonymousLinkInEmail: requireSignin,\r\n peoplePickerInput: userStr,\r\n propagateAcl: propagateAcl,\r\n roleValue: \"role:\" + def[0].Id,\r\n useSimplifiedRoles: true,\r\n };\r\n if (emailData !== undefined) {\r\n postBody = extend(postBody, {\r\n emailBody: emailData.body,\r\n emailSubject: emailData.subject !== undefined ? emailData.subject : \"\",\r\n sendEmail: true,\r\n });\r\n }\r\n return _this.clone(SharePointQueryableShareable, \"shareObject\").postCore({\r\n body: jsS(postBody),\r\n });\r\n });\r\n };\r\n /**\r\n * Shares an object based on the supplied options\r\n *\r\n * @param options The set of options to send to the ShareObject method\r\n * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method\r\n */\r\n SharePointQueryableShareable.prototype.shareObject = function (options, bypass) {\r\n var _this = this;\r\n if (bypass === void 0) { bypass = false; }\r\n if (bypass) {\r\n // if the bypass flag is set send the supplied parameters directly to the service\r\n return this.sendShareObjectRequest(options);\r\n }\r\n // extend our options with some defaults\r\n options = extend(options, {\r\n group: null,\r\n includeAnonymousLinkInEmail: false,\r\n propagateAcl: false,\r\n useSimplifiedRoles: true,\r\n }, true);\r\n return this.getRoleValue(options.role, options.group).then(function (roleValue) {\r\n // handle the multiple input types\r\n if (!Array.isArray(options.loginNames)) {\r\n options.loginNames = [options.loginNames];\r\n }\r\n var userStr = jsS(options.loginNames.map(function (login) { return { Key: login }; }));\r\n var postBody = {\r\n peoplePickerInput: userStr,\r\n roleValue: roleValue,\r\n url: options.url,\r\n };\r\n if (options.emailData !== undefined && options.emailData !== null) {\r\n postBody = extend(postBody, {\r\n emailBody: options.emailData.body,\r\n emailSubject: options.emailData.subject !== undefined ? options.emailData.subject : \"Shared with you.\",\r\n sendEmail: true,\r\n });\r\n }\r\n return _this.sendShareObjectRequest(postBody);\r\n });\r\n };\r\n /**\r\n * Calls the web's UnshareObject method\r\n *\r\n * @param url The url of the object to unshare\r\n */\r\n SharePointQueryableShareable.prototype.unshareObjectWeb = function (url) {\r\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postCore({\r\n body: jsS({\r\n url: url,\r\n }),\r\n });\r\n };\r\n /**\r\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\r\n *\r\n * @param recipients The array of Entities for which Permissions need to be checked.\r\n */\r\n SharePointQueryableShareable.prototype.checkPermissions = function (recipients) {\r\n return this.clone(SharePointQueryableShareable, \"checkPermissions\").postCore({\r\n body: jsS({\r\n recipients: recipients,\r\n }),\r\n });\r\n };\r\n /**\r\n * Get Sharing Information.\r\n *\r\n * @param request The SharingInformationRequest Object.\r\n * @param expands Expand more fields.\r\n *\r\n */\r\n SharePointQueryableShareable.prototype.getSharingInformation = function (request, expands) {\r\n if (request === void 0) { request = null; }\r\n var q = this.clone(SharePointQueryableShareable, \"getSharingInformation\");\r\n return q.expand.apply(q, expands).postCore({\r\n body: jsS({\r\n request: request,\r\n }),\r\n });\r\n };\r\n /**\r\n * Gets the sharing settings of an item.\r\n *\r\n * @param useSimplifiedRoles Determines whether to use simplified roles.\r\n */\r\n SharePointQueryableShareable.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n return this.clone(SharePointQueryableShareable, \"getObjectSharingSettings\").postCore({\r\n body: jsS({\r\n useSimplifiedRoles: useSimplifiedRoles,\r\n }),\r\n });\r\n };\r\n /**\r\n * Unshares this object\r\n */\r\n SharePointQueryableShareable.prototype.unshareObject = function () {\r\n return this.clone(SharePointQueryableShareable, \"unshareObject\").postCore();\r\n };\r\n /**\r\n * Deletes a link by type\r\n *\r\n * @param kind Deletes a sharing link by the kind of link\r\n */\r\n SharePointQueryableShareable.prototype.deleteLinkByKind = function (kind) {\r\n return this.clone(SharePointQueryableShareable, \"deleteLinkByKind\").postCore({\r\n body: jsS({ linkKind: kind }),\r\n });\r\n };\r\n /**\r\n * Removes the specified link to the item.\r\n *\r\n * @param kind The kind of link to be deleted.\r\n * @param shareId\r\n */\r\n SharePointQueryableShareable.prototype.unshareLink = function (kind, shareId) {\r\n if (shareId === void 0) { shareId = \"00000000-0000-0000-0000-000000000000\"; }\r\n return this.clone(SharePointQueryableShareable, \"unshareLink\").postCore({\r\n body: jsS({ linkKind: kind, shareId: shareId }),\r\n });\r\n };\r\n /**\r\n * Calculates the roleValue string used in the sharing query\r\n *\r\n * @param role The Sharing Role\r\n * @param group The Group type\r\n */\r\n SharePointQueryableShareable.prototype.getRoleValue = function (role, group) {\r\n // we will give group precedence, because we had to make a choice\r\n if (group !== undefined && group !== null) {\r\n switch (group) {\r\n case RoleType.Contributor:\r\n // remove need to reference Web here, which created a circular build issue\r\n var memberGroup = new SharePointQueryableInstance(\"_api/web\", \"associatedmembergroup\");\r\n return memberGroup.select(\"Id\").get().then(function (g) { return \"group: \" + g.Id; });\r\n case RoleType.Reader:\r\n case RoleType.Guest:\r\n // remove need to reference Web here, which created a circular build issue\r\n var visitorGroup = new SharePointQueryableInstance(\"_api/web\", \"associatedvisitorgroup\");\r\n return visitorGroup.select(\"Id\").get().then(function (g) { return \"group: \" + g.Id; });\r\n default:\r\n throw Error(\"Could not determine role value for supplied value. Contributor, Reader, and Guest are supported\");\r\n }\r\n }\r\n else {\r\n var roleFilter = role === SharingRole.Edit ? RoleType.Contributor : RoleType.Reader;\r\n // remove need to reference Web here, which created a circular build issue\r\n var roleDefs = new SharePointQueryableCollection(\"_api/web\", \"roledefinitions\");\r\n return roleDefs.select(\"Id\").top(1).filter(\"RoleTypeKind eq \" + roleFilter).get().then(function (def) {\r\n if (def.length < 1) {\r\n throw Error(\"Could not locate associated role definition for supplied role. Edit and View are supported\");\r\n }\r\n return \"role: \" + def[0].Id;\r\n });\r\n }\r\n };\r\n SharePointQueryableShareable.prototype.getShareObjectWeb = function (candidate) {\r\n return Promise.resolve(new SharePointQueryableInstance(extractWebUrl(candidate), \"/_api/SP.Web.ShareObject\"));\r\n };\r\n SharePointQueryableShareable.prototype.sendShareObjectRequest = function (options) {\r\n return this.getShareObjectWeb(this.toUrl()).then(function (web) {\r\n return web.expand(\"UsersWithAccessRequests\", \"GroupsSharedWith\").as(SharePointQueryableShareable).postCore({\r\n body: jsS(options),\r\n });\r\n });\r\n };\r\n return SharePointQueryableShareable;\r\n}(SharePointQueryable));\r\nexport { SharePointQueryableShareable };\r\nvar SharePointQueryableShareableWeb = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableShareableWeb, _super);\r\n function SharePointQueryableShareableWeb() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Shares this web with the supplied users\r\n * @param loginNames The resolved login names to share\r\n * @param role The role to share this web\r\n * @param emailData Optional email data\r\n */\r\n SharePointQueryableShareableWeb.prototype.shareWith = function (loginNames, role, emailData) {\r\n var _this = this;\r\n if (role === void 0) { role = SharingRole.View; }\r\n var dependency = this.addBatchDependency();\r\n // remove need to reference Web here, which created a circular build issue\r\n var web = new SharePointQueryableInstance(extractWebUrl(this.toUrl()), \"/_api/web/url\");\r\n return web.get().then(function (url) {\r\n dependency();\r\n return _this.shareObject(combine(url, \"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1\"), loginNames, role, emailData);\r\n });\r\n };\r\n /**\r\n * Provides direct access to the static web.ShareObject method\r\n *\r\n * @param url The url to share\r\n * @param loginNames Resolved loginnames string[] of a single login name string\r\n * @param roleValue Role value\r\n * @param emailData Optional email data\r\n * @param groupId Optional group id\r\n * @param propagateAcl\r\n * @param includeAnonymousLinkInEmail\r\n * @param useSimplifiedRoles\r\n */\r\n SharePointQueryableShareableWeb.prototype.shareObject = function (url, loginNames, role, emailData, group, propagateAcl, includeAnonymousLinkInEmail, useSimplifiedRoles) {\r\n if (propagateAcl === void 0) { propagateAcl = false; }\r\n if (includeAnonymousLinkInEmail === void 0) { includeAnonymousLinkInEmail = false; }\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n return this.clone(SharePointQueryableShareable, null).shareObject({\r\n emailData: emailData,\r\n group: group,\r\n includeAnonymousLinkInEmail: includeAnonymousLinkInEmail,\r\n loginNames: loginNames,\r\n propagateAcl: propagateAcl,\r\n role: role,\r\n url: url,\r\n useSimplifiedRoles: useSimplifiedRoles,\r\n });\r\n };\r\n /**\r\n * Supplies a method to pass any set of arguments to ShareObject\r\n *\r\n * @param options The set of options to send to ShareObject\r\n */\r\n SharePointQueryableShareableWeb.prototype.shareObjectRaw = function (options) {\r\n return this.clone(SharePointQueryableShareable, null).shareObject(options, true);\r\n };\r\n /**\r\n * Unshares the object\r\n *\r\n * @param url The url of the object to stop sharing\r\n */\r\n SharePointQueryableShareableWeb.prototype.unshareObject = function (url) {\r\n return this.clone(SharePointQueryableShareable, null).unshareObjectWeb(url);\r\n };\r\n return SharePointQueryableShareableWeb;\r\n}(SharePointQueryableSecurable));\r\nexport { SharePointQueryableShareableWeb };\r\nvar SharePointQueryableShareableItem = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableShareableItem, _super);\r\n function SharePointQueryableShareableItem() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a link suitable for sharing for this item\r\n *\r\n * @param kind The type of link to share\r\n * @param expiration The optional expiration date\r\n */\r\n SharePointQueryableShareableItem.prototype.getShareLink = function (kind, expiration) {\r\n if (kind === void 0) { kind = SharingLinkKind.OrganizationView; }\r\n if (expiration === void 0) { expiration = null; }\r\n return this.clone(SharePointQueryableShareable, null).getShareLink(kind, expiration);\r\n };\r\n /**\r\n * Shares this item with one or more users\r\n *\r\n * @param loginNames string or string[] of resolved login names to which this item will be shared\r\n * @param role The role (View | Edit) applied to the share\r\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\r\n */\r\n SharePointQueryableShareableItem.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\r\n if (role === void 0) { role = SharingRole.View; }\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n return this.clone(SharePointQueryableShareable, null).shareWith(loginNames, role, requireSignin, false, emailData);\r\n };\r\n /**\r\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\r\n *\r\n * @param recipients The array of Entities for which Permissions need to be checked.\r\n */\r\n SharePointQueryableShareableItem.prototype.checkSharingPermissions = function (recipients) {\r\n return this.clone(SharePointQueryableShareable, null).checkPermissions(recipients);\r\n };\r\n /**\r\n * Get Sharing Information.\r\n *\r\n * @param request The SharingInformationRequest Object.\r\n * @param expands Expand more fields.\r\n *\r\n */\r\n SharePointQueryableShareableItem.prototype.getSharingInformation = function (request, expands) {\r\n if (request === void 0) { request = null; }\r\n return this.clone(SharePointQueryableShareable, null).getSharingInformation(request, expands);\r\n };\r\n /**\r\n * Gets the sharing settings of an item.\r\n *\r\n * @param useSimplifiedRoles Determines whether to use simplified roles.\r\n */\r\n SharePointQueryableShareableItem.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n return this.clone(SharePointQueryableShareable, null).getObjectSharingSettings(useSimplifiedRoles);\r\n };\r\n /**\r\n * Unshare this item\r\n */\r\n SharePointQueryableShareableItem.prototype.unshare = function () {\r\n return this.clone(SharePointQueryableShareable, null).unshareObject();\r\n };\r\n /**\r\n * Deletes a sharing link by kind\r\n *\r\n * @param kind Deletes a sharing link by the kind of link\r\n */\r\n SharePointQueryableShareableItem.prototype.deleteSharingLinkByKind = function (kind) {\r\n return this.clone(SharePointQueryableShareable, null).deleteLinkByKind(kind);\r\n };\r\n /**\r\n * Removes the specified link to the item.\r\n *\r\n * @param kind The kind of link to be deleted.\r\n * @param shareId\r\n */\r\n SharePointQueryableShareableItem.prototype.unshareLink = function (kind, shareId) {\r\n return this.clone(SharePointQueryableShareable, null).unshareLink(kind, shareId);\r\n };\r\n return SharePointQueryableShareableItem;\r\n}(SharePointQueryableSecurable));\r\nexport { SharePointQueryableShareableItem };\r\nvar FileFolderShared = /** @class */ (function (_super) {\r\n tslib_1.__extends(FileFolderShared, _super);\r\n function FileFolderShared() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a link suitable for sharing\r\n *\r\n * @param kind The kind of link to get\r\n * @param expiration Optional, an expiration for this link\r\n */\r\n FileFolderShared.prototype.getShareLink = function (kind, expiration) {\r\n if (kind === void 0) { kind = SharingLinkKind.OrganizationView; }\r\n if (expiration === void 0) { expiration = null; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.getShareLink(kind, expiration);\r\n });\r\n };\r\n /**\r\n * Checks Permissions on the list of Users and returns back role the users have on the Item.\r\n *\r\n * @param recipients The array of Entities for which Permissions need to be checked.\r\n */\r\n FileFolderShared.prototype.checkSharingPermissions = function (recipients) {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.checkPermissions(recipients);\r\n });\r\n };\r\n /**\r\n * Get Sharing Information.\r\n *\r\n * @param request The SharingInformationRequest Object.\r\n * @param expands Expand more fields.\r\n *\r\n */\r\n FileFolderShared.prototype.getSharingInformation = function (request, expands) {\r\n if (request === void 0) { request = null; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.getSharingInformation(request, expands);\r\n });\r\n };\r\n /**\r\n * Gets the sharing settings of an item.\r\n *\r\n * @param useSimplifiedRoles Determines whether to use simplified roles.\r\n */\r\n FileFolderShared.prototype.getObjectSharingSettings = function (useSimplifiedRoles) {\r\n if (useSimplifiedRoles === void 0) { useSimplifiedRoles = true; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.getObjectSharingSettings(useSimplifiedRoles);\r\n });\r\n };\r\n /**\r\n * Unshare this item\r\n */\r\n FileFolderShared.prototype.unshare = function () {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.unshareObject();\r\n });\r\n };\r\n /**\r\n * Deletes a sharing link by the kind of link\r\n *\r\n * @param kind The kind of link to be deleted.\r\n */\r\n FileFolderShared.prototype.deleteSharingLinkByKind = function (kind) {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.deleteLinkByKind(kind);\r\n });\r\n };\r\n /**\r\n * Removes the specified link to the item.\r\n *\r\n * @param kind The kind of link to be deleted.\r\n * @param shareId The share id to delete\r\n */\r\n FileFolderShared.prototype.unshareLink = function (kind, shareId) {\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.unshareLink(kind, shareId);\r\n });\r\n };\r\n /**\r\n * For files and folders we need to use the associated item end point\r\n */\r\n FileFolderShared.prototype.getShareable = function () {\r\n var _this = this;\r\n // sharing only works on the item end point, not the file one - so we create a folder instance with the item url internally\r\n return this.clone(SharePointQueryableShareableFile, \"listItemAllFields\", false).select(\"odata.id\").get().then(function (d) {\r\n var shareable = new SharePointQueryableShareable(odataUrlFrom(d));\r\n // we need to handle batching\r\n if (_this.hasBatch) {\r\n shareable = shareable.inBatch(_this.batch);\r\n }\r\n return shareable;\r\n });\r\n };\r\n return FileFolderShared;\r\n}(SharePointQueryableInstance));\r\nexport { FileFolderShared };\r\nvar SharePointQueryableShareableFile = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableShareableFile, _super);\r\n function SharePointQueryableShareableFile() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Shares this item with one or more users\r\n *\r\n * @param loginNames string or string[] of resolved login names to which this item will be shared\r\n * @param role The role (View | Edit) applied to the share\r\n * @param shareEverything Share everything in this folder, even items with unique permissions.\r\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\r\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\r\n */\r\n SharePointQueryableShareableFile.prototype.shareWith = function (loginNames, role, requireSignin, emailData) {\r\n if (role === void 0) { role = SharingRole.View; }\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.shareWith(loginNames, role, requireSignin, false, emailData);\r\n });\r\n };\r\n return SharePointQueryableShareableFile;\r\n}(FileFolderShared));\r\nexport { SharePointQueryableShareableFile };\r\nvar SharePointQueryableShareableFolder = /** @class */ (function (_super) {\r\n tslib_1.__extends(SharePointQueryableShareableFolder, _super);\r\n function SharePointQueryableShareableFolder() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Shares this item with one or more users\r\n *\r\n * @param loginNames string or string[] of resolved login names to which this item will be shared\r\n * @param role The role (View | Edit) applied to the share\r\n * @param shareEverything Share everything in this folder, even items with unique permissions.\r\n * @param requireSignin If true the user must signin to view link, otherwise anyone with the link can access the resource\r\n * @param emailData Optional, if inlucded an email will be sent. Note subject currently has no effect.\r\n */\r\n SharePointQueryableShareableFolder.prototype.shareWith = function (loginNames, role, requireSignin, shareEverything, emailData) {\r\n if (role === void 0) { role = SharingRole.View; }\r\n if (requireSignin === void 0) { requireSignin = false; }\r\n if (shareEverything === void 0) { shareEverything = false; }\r\n var dependency = this.addBatchDependency();\r\n return this.getShareable().then(function (shareable) {\r\n dependency();\r\n return shareable.shareWith(loginNames, role, requireSignin, shareEverything, emailData);\r\n });\r\n };\r\n return SharePointQueryableShareableFolder;\r\n}(FileFolderShared));\r\nexport { SharePointQueryableShareableFolder };\r\n//# sourceMappingURL=sharepointqueryableshareable.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nvar LimitedWebPartManager = /** @class */ (function (_super) {\r\n tslib_1.__extends(LimitedWebPartManager, _super);\r\n function LimitedWebPartManager() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(LimitedWebPartManager.prototype, \"webparts\", {\r\n /**\r\n * Gets the set of web part definitions contained by this web part manager\r\n *\r\n */\r\n get: function () {\r\n return new WebPartDefinitions(this, \"webparts\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Exports a webpart definition\r\n *\r\n * @param id the GUID id of the definition to export\r\n */\r\n LimitedWebPartManager.prototype.export = function (id) {\r\n return this.clone(LimitedWebPartManager, \"ExportWebPart\").postCore({\r\n body: jsS({ webPartId: id }),\r\n });\r\n };\r\n /**\r\n * Imports a webpart\r\n *\r\n * @param xml webpart definition which must be valid XML in the .dwp or .webpart format\r\n */\r\n LimitedWebPartManager.prototype.import = function (xml) {\r\n return this.clone(LimitedWebPartManager, \"ImportWebPart\").postCore({\r\n body: jsS({ webPartXml: xml }),\r\n });\r\n };\r\n return LimitedWebPartManager;\r\n}(SharePointQueryable));\r\nexport { LimitedWebPartManager };\r\nvar WebPartDefinitions = /** @class */ (function (_super) {\r\n tslib_1.__extends(WebPartDefinitions, _super);\r\n function WebPartDefinitions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a web part definition from the collection by id\r\n *\r\n * @param id The storage ID of the SPWebPartDefinition to retrieve\r\n */\r\n WebPartDefinitions.prototype.getById = function (id) {\r\n return new WebPartDefinition(this, \"getbyid('\" + id + \"')\");\r\n };\r\n /**\r\n * Gets a web part definition from the collection by storage id\r\n *\r\n * @param id The WebPart.ID of the SPWebPartDefinition to retrieve\r\n */\r\n WebPartDefinitions.prototype.getByControlId = function (id) {\r\n return new WebPartDefinition(this, \"getByControlId('\" + id + \"')\");\r\n };\r\n return WebPartDefinitions;\r\n}(SharePointQueryableCollection));\r\nexport { WebPartDefinitions };\r\nvar WebPartDefinition = /** @class */ (function (_super) {\r\n tslib_1.__extends(WebPartDefinition, _super);\r\n function WebPartDefinition() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(WebPartDefinition.prototype, \"webpart\", {\r\n /**\r\n * Gets the webpart information associated with this definition\r\n */\r\n get: function () {\r\n return new WebPart(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Saves changes to the Web Part made using other properties and methods on the SPWebPartDefinition object\r\n */\r\n WebPartDefinition.prototype.saveChanges = function () {\r\n return this.clone(WebPartDefinition, \"SaveWebPartChanges\").postCore();\r\n };\r\n /**\r\n * Moves the Web Part to a different location on a Web Part Page\r\n *\r\n * @param zoneId The ID of the Web Part Zone to which to move the Web Part\r\n * @param zoneIndex A Web Part zone index that specifies the position at which the Web Part is to be moved within the destination Web Part zone\r\n */\r\n WebPartDefinition.prototype.moveTo = function (zoneId, zoneIndex) {\r\n return this.clone(WebPartDefinition, \"MoveWebPartTo(zoneID='\" + zoneId + \"', zoneIndex=\" + zoneIndex + \")\").postCore();\r\n };\r\n /**\r\n * Closes the Web Part. If the Web Part is already closed, this method does nothing\r\n */\r\n WebPartDefinition.prototype.close = function () {\r\n return this.clone(WebPartDefinition, \"CloseWebPart\").postCore();\r\n };\r\n /**\r\n * Opens the Web Part. If the Web Part is already closed, this method does nothing\r\n */\r\n WebPartDefinition.prototype.open = function () {\r\n return this.clone(WebPartDefinition, \"OpenWebPart\").postCore();\r\n };\r\n /**\r\n * Removes a webpart from a page, all settings will be lost\r\n */\r\n WebPartDefinition.prototype.delete = function () {\r\n return this.clone(WebPartDefinition, \"DeleteWebPart\").postCore();\r\n };\r\n return WebPartDefinition;\r\n}(SharePointQueryableInstance));\r\nexport { WebPartDefinition };\r\nvar WebPart = /** @class */ (function (_super) {\r\n tslib_1.__extends(WebPart, _super);\r\n function WebPart() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n WebPart = tslib_1.__decorate([\r\n defaultPath(\"webpart\")\r\n ], WebPart);\r\n return WebPart;\r\n}(SharePointQueryableInstance));\r\nexport { WebPart };\r\n//# sourceMappingURL=webparts.js.map","import * as tslib_1 from \"tslib\";\r\nimport { extend, jsS, isUrlAbsolute } from \"@pnp/common\";\r\nimport { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { SharePointQueryableShareableFolder } from \"./sharepointqueryableshareable\";\r\nimport { Files } from \"./files\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { Item } from \"./items\";\r\nimport { extractWebUrl } from \"./utils/extractweburl\";\r\n/**\r\n * Describes a collection of Folder objects\r\n *\r\n */\r\nvar Folders = /** @class */ (function (_super) {\r\n tslib_1.__extends(Folders, _super);\r\n function Folders() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Folders_1 = Folders;\r\n /**\r\n * Gets a folder by folder name\r\n *\r\n */\r\n Folders.prototype.getByName = function (name) {\r\n var f = new Folder(this);\r\n f.concat(\"('\" + name + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Adds a new folder to the current folder (relative) or any folder (absolute)\r\n *\r\n * @param url The relative or absolute url where the new folder will be created. Urls starting with a forward slash are absolute.\r\n * @returns The new Folder and the raw response.\r\n */\r\n Folders.prototype.add = function (url) {\r\n var _this = this;\r\n return this.clone(Folders_1, \"add('\" + url + \"')\").postCore().then(function (data) {\r\n return {\r\n data: data,\r\n folder: _this.getByName(url),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new folder by path and should be prefered over add\r\n *\r\n * @param serverRelativeUrl The server relative url of the new folder to create\r\n * @param overwrite True to overwrite an existing folder, default false\r\n */\r\n Folders.prototype.addUsingPath = function (serverRelativeUrl, overwrite) {\r\n var _this = this;\r\n if (overwrite === void 0) { overwrite = false; }\r\n return this.clone(Folders_1, \"addUsingPath(DecodedUrl='\" + serverRelativeUrl + \"',overwrite=\" + overwrite + \")\").postCore().then(function (data) {\r\n return {\r\n data: data,\r\n folder: new Folder(extractWebUrl(_this.toUrl()), \"_api/web/getFolderByServerRelativePath(decodedUrl='\" + serverRelativeUrl + \"')\"),\r\n };\r\n });\r\n };\r\n var Folders_1;\r\n Folders = Folders_1 = tslib_1.__decorate([\r\n defaultPath(\"folders\")\r\n ], Folders);\r\n return Folders;\r\n}(SharePointQueryableCollection));\r\nexport { Folders };\r\n/**\r\n * Describes a single Folder instance\r\n *\r\n */\r\nvar Folder = /** @class */ (function (_super) {\r\n tslib_1.__extends(Folder, _super);\r\n function Folder() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.update = _this._update(\"SP.Folder\", function (data) { return ({ data: data, folder: _this }); });\r\n return _this;\r\n }\r\n Object.defineProperty(Folder.prototype, \"contentTypeOrder\", {\r\n /**\r\n * Specifies the sequence in which content types are displayed.\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"contentTypeOrder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"files\", {\r\n /**\r\n * Gets this folder's files\r\n *\r\n */\r\n get: function () {\r\n return new Files(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"folders\", {\r\n /**\r\n * Gets this folder's sub folders\r\n *\r\n */\r\n get: function () {\r\n return new Folders(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"listItemAllFields\", {\r\n /**\r\n * Gets this folder's list item field values\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"listItemAllFields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"parentFolder\", {\r\n /**\r\n * Gets the parent folder, if available\r\n *\r\n */\r\n get: function () {\r\n return new Folder(this, \"parentFolder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"properties\", {\r\n /**\r\n * Gets this folder's properties\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"properties\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"serverRelativeUrl\", {\r\n /**\r\n * Gets this folder's server relative url\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"serverRelativeUrl\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Folder.prototype, \"uniqueContentTypeOrder\", {\r\n /**\r\n * Gets a value that specifies the content type order.\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"uniqueContentTypeOrder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Delete this folder\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n Folder.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.clone(Folder, null).postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Moves the folder to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n */\r\n Folder.prototype.recycle = function () {\r\n return this.clone(Folder, \"recycle\").postCore();\r\n };\r\n /**\r\n * Gets the associated list item for this folder, loading the default properties\r\n */\r\n Folder.prototype.getItem = function () {\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n var q = this.listItemAllFields;\r\n return q.select.apply(q, selects).get().then(function (d) {\r\n return extend(new Item(odataUrlFrom(d)), d);\r\n });\r\n };\r\n /**\r\n * Moves a folder to destination path\r\n *\r\n * @param destUrl Absolute or relative URL of the destination path\r\n */\r\n Folder.prototype.moveTo = function (destUrl) {\r\n return this.select(\"ServerRelativeUrl\").get().then(function (_a) {\r\n var srcUrl = _a.ServerRelativeUrl, absoluteUrl = _a[\"odata.id\"];\r\n var webBaseUrl = extractWebUrl(absoluteUrl);\r\n var hostUrl = webBaseUrl.replace(\"://\", \"___\").split(\"/\")[0].replace(\"___\", \"://\");\r\n var f = new Folder(webBaseUrl, \"/_api/SP.MoveCopyUtil.MoveFolder()\");\r\n return f.postCore({\r\n body: jsS({\r\n destUrl: isUrlAbsolute(destUrl) ? destUrl : \"\" + hostUrl + destUrl,\r\n srcUrl: \"\" + hostUrl + srcUrl,\r\n }),\r\n });\r\n });\r\n };\r\n /**\r\n * Copies a folder to destination path\r\n *\r\n * @param destUrl Absolute or relative URL of the destination path\r\n */\r\n Folder.prototype.copyTo = function (destUrl) {\r\n return this.select(\"ServerRelativeUrl\").get().then(function (_a) {\r\n var srcUrl = _a.ServerRelativeUrl, absoluteUrl = _a[\"odata.id\"];\r\n var webBaseUrl = extractWebUrl(absoluteUrl);\r\n var hostUrl = webBaseUrl.replace(\"://\", \"___\").split(\"/\")[0].replace(\"___\", \"://\");\r\n var f = new Folder(webBaseUrl, \"/_api/SP.MoveCopyUtil.CopyFolder()\");\r\n return f.postCore({\r\n body: jsS({\r\n destUrl: isUrlAbsolute(destUrl) ? destUrl : \"\" + hostUrl + destUrl,\r\n srcUrl: \"\" + hostUrl + srcUrl,\r\n }),\r\n });\r\n });\r\n };\r\n return Folder;\r\n}(SharePointQueryableShareableFolder));\r\nexport { Folder };\r\n//# sourceMappingURL=folders.js.map","import * as tslib_1 from \"tslib\";\r\nimport { jsS } from \"@pnp/common\";\r\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Describes a collection of content types\r\n *\r\n */\r\nvar ContentTypes = /** @class */ (function (_super) {\r\n tslib_1.__extends(ContentTypes, _super);\r\n function ContentTypes() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ContentTypes_1 = ContentTypes;\r\n /**\r\n * Adds an existing contenttype to a content type collection\r\n *\r\n * @param contentTypeId in the following format, for example: 0x010102\r\n */\r\n ContentTypes.prototype.addAvailableContentType = function (contentTypeId) {\r\n var _this = this;\r\n var postBody = jsS({\r\n \"contentTypeId\": contentTypeId,\r\n });\r\n return this.clone(ContentTypes_1, \"addAvailableContentType\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n contentType: _this.getById(data.id),\r\n data: data,\r\n };\r\n });\r\n };\r\n /**\r\n * Gets a ContentType by content type id\r\n */\r\n ContentTypes.prototype.getById = function (id) {\r\n var ct = new ContentType(this);\r\n ct.concat(\"('\" + id + \"')\");\r\n return ct;\r\n };\r\n /**\r\n * Adds a new content type to the collection\r\n *\r\n * @param id The desired content type id for the new content type (also determines the parent content type)\r\n * @param name The name of the content type\r\n * @param description The description of the content type\r\n * @param group The group in which to add the content type\r\n * @param additionalSettings Any additional settings to provide when creating the content type\r\n *\r\n */\r\n ContentTypes.prototype.add = function (id, name, description, group, additionalSettings) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n if (group === void 0) { group = \"Custom Content Types\"; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n var postBody = jsS(Object.assign(metadata(\"SP.ContentType\"), {\r\n \"Description\": description,\r\n \"Group\": group,\r\n \"Id\": { \"StringValue\": id },\r\n \"Name\": name,\r\n }, additionalSettings));\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return { contentType: _this.getById(data.id), data: data };\r\n });\r\n };\r\n var ContentTypes_1;\r\n ContentTypes = ContentTypes_1 = tslib_1.__decorate([\r\n defaultPath(\"contenttypes\")\r\n ], ContentTypes);\r\n return ContentTypes;\r\n}(SharePointQueryableCollection));\r\nexport { ContentTypes };\r\n/**\r\n * Describes a single ContentType instance\r\n *\r\n */\r\nvar ContentType = /** @class */ (function (_super) {\r\n tslib_1.__extends(ContentType, _super);\r\n function ContentType() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete this content type\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(ContentType.prototype, \"fieldLinks\", {\r\n /**\r\n * Gets the column (also known as field) references in the content type.\r\n */\r\n get: function () {\r\n return new FieldLinks(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContentType.prototype, \"fields\", {\r\n /**\r\n * Gets a value that specifies the collection of fields for the content type.\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"fields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContentType.prototype, \"parent\", {\r\n /**\r\n * Gets the parent content type of the content type.\r\n */\r\n get: function () {\r\n return new ContentType(this, \"parent\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ContentType.prototype, \"workflowAssociations\", {\r\n /**\r\n * Gets a value that specifies the collection of workflow associations for the content type.\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"workflowAssociations\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ContentType;\r\n}(SharePointQueryableInstance));\r\nexport { ContentType };\r\n/**\r\n * Represents a collection of field link instances\r\n */\r\nvar FieldLinks = /** @class */ (function (_super) {\r\n tslib_1.__extends(FieldLinks, _super);\r\n function FieldLinks() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a FieldLink by GUID id\r\n *\r\n * @param id The GUID id of the field link\r\n */\r\n FieldLinks.prototype.getById = function (id) {\r\n var fl = new FieldLink(this);\r\n fl.concat(\"(guid'\" + id + \"')\");\r\n return fl;\r\n };\r\n FieldLinks = tslib_1.__decorate([\r\n defaultPath(\"fieldlinks\")\r\n ], FieldLinks);\r\n return FieldLinks;\r\n}(SharePointQueryableCollection));\r\nexport { FieldLinks };\r\n/**\r\n * Represents a field link instance\r\n */\r\nvar FieldLink = /** @class */ (function (_super) {\r\n tslib_1.__extends(FieldLink, _super);\r\n function FieldLink() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return FieldLink;\r\n}(SharePointQueryableInstance));\r\nexport { FieldLink };\r\n//# sourceMappingURL=contenttypes.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { TextParser, BlobParser, JSONParser, BufferParser } from \"@pnp/odata\";\r\n/**\r\n * Describes a collection of Item objects\r\n *\r\n */\r\nvar AttachmentFiles = /** @class */ (function (_super) {\r\n tslib_1.__extends(AttachmentFiles, _super);\r\n function AttachmentFiles() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n AttachmentFiles_1 = AttachmentFiles;\r\n /**\r\n * Gets a Attachment File by filename\r\n *\r\n * @param name The name of the file, including extension.\r\n */\r\n AttachmentFiles.prototype.getByName = function (name) {\r\n var f = new AttachmentFile(this);\r\n f.concat(\"('\" + name + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Adds a new attachment to the collection. Not supported for batching.\r\n *\r\n * @param name The name of the file, including extension.\r\n * @param content The Base64 file content.\r\n */\r\n AttachmentFiles.prototype.add = function (name, content) {\r\n var _this = this;\r\n return this.clone(AttachmentFiles_1, \"add(FileName='\" + name + \"')\", false).postCore({\r\n body: content,\r\n }).then(function (response) {\r\n return {\r\n data: response,\r\n file: _this.getByName(name),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds multiple new attachment to the collection. Not supported for batching.\r\n *\r\n * @param files The collection of files to add\r\n */\r\n AttachmentFiles.prototype.addMultiple = function (files) {\r\n var _this = this;\r\n // add the files in series so we don't get update conflicts\r\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.clone(AttachmentFiles_1, \"add(FileName='\" + file.name + \"')\", false).postCore({\r\n body: file.content,\r\n }); }); }, Promise.resolve());\r\n };\r\n /**\r\n * Delete multiple attachments from the collection. Not supported for batching.\r\n *\r\n * @param files The collection of files to delete\r\n */\r\n AttachmentFiles.prototype.deleteMultiple = function () {\r\n var _this = this;\r\n var files = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n files[_i] = arguments[_i];\r\n }\r\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.getByName(file).delete(); }); }, Promise.resolve());\r\n };\r\n /**\r\n * Delete multiple attachments from the collection and send to recycle bin. Not supported for batching.\r\n *\r\n * @param files The collection of files to be deleted and sent to recycle bin\r\n */\r\n AttachmentFiles.prototype.recycleMultiple = function () {\r\n var _this = this;\r\n var files = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n files[_i] = arguments[_i];\r\n }\r\n return files.reduce(function (chain, file) { return chain.then(function () { return _this.getByName(file).recycle(); }); }, Promise.resolve());\r\n };\r\n var AttachmentFiles_1;\r\n AttachmentFiles = AttachmentFiles_1 = tslib_1.__decorate([\r\n defaultPath(\"AttachmentFiles\")\r\n ], AttachmentFiles);\r\n return AttachmentFiles;\r\n}(SharePointQueryableCollection));\r\nexport { AttachmentFiles };\r\n/**\r\n * Describes a single attachment file instance\r\n *\r\n */\r\nvar AttachmentFile = /** @class */ (function (_super) {\r\n tslib_1.__extends(AttachmentFile, _super);\r\n function AttachmentFile() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n }\r\n /**\r\n * Gets the contents of the file as text\r\n *\r\n */\r\n AttachmentFile.prototype.getText = function () {\r\n return this.getParsed(new TextParser());\r\n };\r\n /**\r\n * Gets the contents of the file as a blob, does not work in Node.js\r\n *\r\n */\r\n AttachmentFile.prototype.getBlob = function () {\r\n return this.getParsed(new BlobParser());\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\r\n */\r\n AttachmentFile.prototype.getBuffer = function () {\r\n return this.getParsed(new BufferParser());\r\n };\r\n /**\r\n * Gets the contents of a file as an ArrayBuffer, works in Node.js\r\n */\r\n AttachmentFile.prototype.getJSON = function () {\r\n return this.getParsed(new JSONParser());\r\n };\r\n /**\r\n * Sets the content of a file. Not supported for batching\r\n *\r\n * @param content The value to set for the file contents\r\n */\r\n AttachmentFile.prototype.setContent = function (content) {\r\n var _this = this;\r\n return this.clone(AttachmentFile, \"$value\", false).postCore({\r\n body: content,\r\n headers: {\r\n \"X-HTTP-Method\": \"PUT\",\r\n },\r\n }).then(function (_) { return new AttachmentFile(_this); });\r\n };\r\n /**\r\n * Delete this attachment file and send it to recycle bin\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n AttachmentFile.prototype.recycle = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.clone(AttachmentFile, \"recycleObject\").postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n // /**\r\n // * Delete this attachment file\r\n // *\r\n // * @param eTag Value used in the IF-Match header, by default \"*\"\r\n // */\r\n // public delete(eTag = \"*\"): Promise {\r\n // return this.postCore({\r\n // headers: {\r\n // \"IF-Match\": eTag,\r\n // \"X-HTTP-Method\": \"DELETE\",\r\n // },\r\n // });\r\n // }\r\n AttachmentFile.prototype.getParsed = function (parser) {\r\n return this.clone(AttachmentFile, \"$value\", false).get(parser);\r\n };\r\n return AttachmentFile;\r\n}(SharePointQueryableInstance));\r\nexport { AttachmentFile };\r\n//# sourceMappingURL=attachmentfiles.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Describes the views available in the current context\r\n *\r\n */\r\nvar Views = /** @class */ (function (_super) {\r\n tslib_1.__extends(Views, _super);\r\n function Views() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Views_1 = Views;\r\n /**\r\n * Gets a view by guid id\r\n *\r\n * @param id The GUID id of the view\r\n */\r\n Views.prototype.getById = function (id) {\r\n var v = new View(this);\r\n v.concat(\"('\" + id + \"')\");\r\n return v;\r\n };\r\n /**\r\n * Gets a view by title (case-sensitive)\r\n *\r\n * @param title The case-sensitive title of the view\r\n */\r\n Views.prototype.getByTitle = function (title) {\r\n return new View(this, \"getByTitle('\" + title + \"')\");\r\n };\r\n /**\r\n * Adds a new view to the collection\r\n *\r\n * @param title The new views's title\r\n * @param personalView True if this is a personal view, otherwise false, default = false\r\n * @param additionalSettings Will be passed as part of the view creation body\r\n */\r\n Views.prototype.add = function (title, personalView, additionalSettings) {\r\n var _this = this;\r\n if (personalView === void 0) { personalView = false; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n var postBody = jsS(Object.assign(metadata(\"SP.View\"), {\r\n \"PersonalView\": personalView,\r\n \"Title\": title,\r\n }, additionalSettings));\r\n return this.clone(Views_1, null).postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n view: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n var Views_1;\r\n Views = Views_1 = tslib_1.__decorate([\r\n defaultPath(\"views\")\r\n ], Views);\r\n return Views;\r\n}(SharePointQueryableCollection));\r\nexport { Views };\r\n/**\r\n * Describes a single View instance\r\n *\r\n */\r\nvar View = /** @class */ (function (_super) {\r\n tslib_1.__extends(View, _super);\r\n function View() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Updates this view intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the view\r\n */\r\n _this.update = _this._update(\"SP.View\", function (data) { return ({ data: data, view: _this }); });\r\n /**\r\n * Delete this view\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n Object.defineProperty(View.prototype, \"fields\", {\r\n get: function () {\r\n return new ViewFields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns the list view as HTML.\r\n *\r\n */\r\n View.prototype.renderAsHtml = function () {\r\n return this.clone(SharePointQueryable, \"renderashtml\").get();\r\n };\r\n /**\r\n * Sets the view schema\r\n *\r\n * @param viewXml The view XML to set\r\n */\r\n View.prototype.setViewXml = function (viewXml) {\r\n return this.clone(View, \"SetViewXml\").postCore({\r\n body: jsS({\r\n viewXml: viewXml,\r\n }),\r\n });\r\n };\r\n return View;\r\n}(SharePointQueryableInstance));\r\nexport { View };\r\nvar ViewFields = /** @class */ (function (_super) {\r\n tslib_1.__extends(ViewFields, _super);\r\n function ViewFields() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ViewFields_1 = ViewFields;\r\n /**\r\n * Gets a value that specifies the XML schema that represents the collection.\r\n */\r\n ViewFields.prototype.getSchemaXml = function () {\r\n return this.clone(SharePointQueryable, \"schemaxml\").get();\r\n };\r\n /**\r\n * Adds the field with the specified field internal name or display name to the collection.\r\n *\r\n * @param fieldTitleOrInternalName The case-sensitive internal name or display name of the field to add.\r\n */\r\n ViewFields.prototype.add = function (fieldTitleOrInternalName) {\r\n return this.clone(ViewFields_1, \"addviewfield('\" + fieldTitleOrInternalName + \"')\").postCore();\r\n };\r\n /**\r\n * Moves the field with the specified field internal name to the specified position in the collection.\r\n *\r\n * @param fieldInternalName The case-sensitive internal name of the field to move.\r\n * @param index The zero-based index of the new position for the field.\r\n */\r\n ViewFields.prototype.move = function (fieldInternalName, index) {\r\n return this.clone(ViewFields_1, \"moveviewfieldto\").postCore({\r\n body: jsS({ \"field\": fieldInternalName, \"index\": index }),\r\n });\r\n };\r\n /**\r\n * Removes all the fields from the collection.\r\n */\r\n ViewFields.prototype.removeAll = function () {\r\n return this.clone(ViewFields_1, \"removeallviewfields\").postCore();\r\n };\r\n /**\r\n * Removes the field with the specified field internal name from the collection.\r\n *\r\n * @param fieldInternalName The case-sensitive internal name of the field to remove from the view.\r\n */\r\n ViewFields.prototype.remove = function (fieldInternalName) {\r\n return this.clone(ViewFields_1, \"removeviewfield('\" + fieldInternalName + \"')\").postCore();\r\n };\r\n var ViewFields_1;\r\n ViewFields = ViewFields_1 = tslib_1.__decorate([\r\n defaultPath(\"viewfields\")\r\n ], ViewFields);\r\n return ViewFields;\r\n}(SharePointQueryableCollection));\r\nexport { ViewFields };\r\n//# sourceMappingURL=views.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { extend, jsS } from \"@pnp/common\";\r\nimport { DateTimeFieldFormatType, DateTimeFieldFriendlyFormatType, FieldTypes, CalendarType, UrlFieldFormatType, ChoiceFieldFormatType, } from \"./types\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Describes a collection of Field objects\r\n *\r\n */\r\nvar Fields = /** @class */ (function (_super) {\r\n tslib_1.__extends(Fields, _super);\r\n function Fields() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Fields_1 = Fields;\r\n /**\r\n * Gets a field from the collection by id\r\n *\r\n * @param id The Id of the list\r\n */\r\n Fields.prototype.getById = function (id) {\r\n var f = new Field(this);\r\n f.concat(\"('\" + id + \"')\");\r\n return f;\r\n };\r\n /**\r\n * Gets a field from the collection by title\r\n *\r\n * @param title The case-sensitive title of the field\r\n */\r\n Fields.prototype.getByTitle = function (title) {\r\n return new Field(this, \"getByTitle('\" + title + \"')\");\r\n };\r\n /**\r\n * Gets a field from the collection by using internal name or title\r\n *\r\n * @param name The case-sensitive internal name or title of the field\r\n */\r\n Fields.prototype.getByInternalNameOrTitle = function (name) {\r\n return new Field(this, \"getByInternalNameOrTitle('\" + name + \"')\");\r\n };\r\n /**\r\n * Creates a field based on the specified schema\r\n */\r\n Fields.prototype.createFieldAsXml = function (xml) {\r\n var _this = this;\r\n var info;\r\n if (typeof xml === \"string\") {\r\n info = { SchemaXml: xml };\r\n }\r\n else {\r\n info = xml;\r\n }\r\n var postBody = jsS({\r\n \"parameters\": extend(metadata(\"SP.XmlSchemaFieldCreationInformation\"), info),\r\n });\r\n return this.clone(Fields_1, \"createfieldasxml\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new field to the collection\r\n *\r\n * @param title The new field's title\r\n * @param fieldType The new field's type (ex: SP.FieldText)\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.add = function (title, fieldType, properties) {\r\n var _this = this;\r\n var postBody = jsS(Object.assign(metadata(fieldType), {\r\n \"Title\": title,\r\n }, properties));\r\n return this.clone(Fields_1, null).postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new SP.FieldText to the collection\r\n *\r\n * @param title The field title\r\n * @param maxLength The maximum number of characters allowed in the value of the field.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addText = function (title, maxLength, properties) {\r\n if (maxLength === void 0) { maxLength = 255; }\r\n var props = {\r\n FieldTypeKind: 2,\r\n MaxLength: maxLength,\r\n };\r\n return this.add(title, \"SP.FieldText\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldCalculated to the collection\r\n *\r\n * @param title The field title.\r\n * @param formula The formula for the field.\r\n * @param dateFormat The date and time format that is displayed in the field.\r\n * @param outputType Specifies the output format for the field. Represents a FieldType value.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {\r\n if (outputType === void 0) { outputType = FieldTypes.Text; }\r\n var props = {\r\n DateFormat: dateFormat,\r\n FieldTypeKind: 17,\r\n Formula: formula,\r\n OutputType: outputType,\r\n };\r\n return this.add(title, \"SP.FieldCalculated\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldDateTime to the collection\r\n *\r\n * @param title The field title\r\n * @param displayFormat The format of the date and time that is displayed in the field.\r\n * @param calendarType Specifies the calendar type of the field.\r\n * @param friendlyDisplayFormat The type of friendly display format that is used in the field.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {\r\n if (displayFormat === void 0) { displayFormat = DateTimeFieldFormatType.DateOnly; }\r\n if (calendarType === void 0) { calendarType = CalendarType.Gregorian; }\r\n if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = DateTimeFieldFriendlyFormatType.Unspecified; }\r\n var props = {\r\n DateTimeCalendarType: calendarType,\r\n DisplayFormat: displayFormat,\r\n FieldTypeKind: 4,\r\n FriendlyDisplayFormat: friendlyDisplayFormat,\r\n };\r\n return this.add(title, \"SP.FieldDateTime\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldNumber to the collection\r\n *\r\n * @param title The field title\r\n * @param minValue The field's minimum value\r\n * @param maxValue The field's maximum value\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {\r\n var props = { FieldTypeKind: 9 };\r\n if (minValue !== undefined) {\r\n props = extend({ MinimumValue: minValue }, props);\r\n }\r\n if (maxValue !== undefined) {\r\n props = extend({ MaximumValue: maxValue }, props);\r\n }\r\n return this.add(title, \"SP.FieldNumber\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldCurrency to the collection\r\n *\r\n * @param title The field title\r\n * @param minValue The field's minimum value\r\n * @param maxValue The field's maximum value\r\n * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {\r\n if (currencyLocalId === void 0) { currencyLocalId = 1033; }\r\n var props = {\r\n CurrencyLocaleId: currencyLocalId,\r\n FieldTypeKind: 10,\r\n };\r\n if (minValue !== undefined) {\r\n props = extend({ MinimumValue: minValue }, props);\r\n }\r\n if (maxValue !== undefined) {\r\n props = extend({ MaximumValue: maxValue }, props);\r\n }\r\n return this.add(title, \"SP.FieldCurrency\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldMultiLineText to the collection\r\n *\r\n * @param title The field title\r\n * @param numberOfLines Specifies the number of lines of text to display for the field.\r\n * @param richText Specifies whether the field supports rich formatting.\r\n * @param restrictedMode Specifies whether the field supports a subset of rich formatting.\r\n * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.\r\n * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n *\r\n */\r\n Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {\r\n if (numberOfLines === void 0) { numberOfLines = 6; }\r\n if (richText === void 0) { richText = true; }\r\n if (restrictedMode === void 0) { restrictedMode = false; }\r\n if (appendOnly === void 0) { appendOnly = false; }\r\n if (allowHyperlink === void 0) { allowHyperlink = true; }\r\n var props = {\r\n AllowHyperlink: allowHyperlink,\r\n AppendOnly: appendOnly,\r\n FieldTypeKind: 3,\r\n NumberOfLines: numberOfLines,\r\n RestrictedMode: restrictedMode,\r\n RichText: richText,\r\n };\r\n return this.add(title, \"SP.FieldMultiLineText\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldUrl to the collection\r\n *\r\n * @param title The field title\r\n */\r\n Fields.prototype.addUrl = function (title, displayFormat, properties) {\r\n if (displayFormat === void 0) { displayFormat = UrlFieldFormatType.Hyperlink; }\r\n var props = {\r\n DisplayFormat: displayFormat,\r\n FieldTypeKind: 11,\r\n };\r\n return this.add(title, \"SP.FieldUrl\", extend(props, properties));\r\n };\r\n /** Adds a user field to the colleciton\r\n *\r\n * @param title The new field's title\r\n * @param selectionMode The selection mode of the field\r\n * @param selectionGroup Value that specifies the identifier of the SharePoint group whose members can be selected as values of the field\r\n * @param properties\r\n */\r\n Fields.prototype.addUser = function (title, selectionMode, properties) {\r\n var props = {\r\n FieldTypeKind: 20,\r\n SelectionMode: selectionMode,\r\n };\r\n return this.add(title, \"SP.FieldUser\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a SP.FieldLookup to the collection\r\n *\r\n * @param title The new field's title\r\n * @param lookupListId The guid id of the list where the source of the lookup is found\r\n * @param lookupFieldName The internal name of the field in the source list\r\n * @param properties Set of additional properties to set on the new field\r\n */\r\n Fields.prototype.addLookup = function (title, lookupListId, lookupFieldName, properties) {\r\n var _this = this;\r\n var props = extend({\r\n FieldTypeKind: 7,\r\n LookupFieldName: lookupFieldName,\r\n LookupListId: lookupListId,\r\n Title: title,\r\n }, properties);\r\n var postBody = jsS({\r\n \"parameters\": extend(metadata(\"SP.FieldCreationInformation\"), props),\r\n });\r\n return this.clone(Fields_1, \"addfield\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new SP.FieldChoice to the collection\r\n *\r\n * @param title The field title.\r\n * @param choices The choices for the field.\r\n * @param format The display format of the available options for the field.\r\n * @param fillIn Specifies whether the field allows fill-in values.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addChoice = function (title, choices, format, fillIn, properties) {\r\n if (format === void 0) { format = ChoiceFieldFormatType.Dropdown; }\r\n var props = {\r\n Choices: {\r\n results: choices,\r\n },\r\n EditFormat: format,\r\n FieldTypeKind: 6,\r\n FillInChoice: fillIn,\r\n };\r\n return this.add(title, \"SP.FieldChoice\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldMultiChoice to the collection\r\n *\r\n * @param title The field title.\r\n * @param choices The choices for the field.\r\n * @param fillIn Specifies whether the field allows fill-in values.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addMultiChoice = function (title, choices, fillIn, properties) {\r\n var props = {\r\n Choices: {\r\n results: choices,\r\n },\r\n FieldTypeKind: 15,\r\n FillInChoice: fillIn,\r\n };\r\n return this.add(title, \"SP.FieldMultiChoice\", extend(props, properties));\r\n };\r\n /**\r\n * Adds a new SP.FieldBoolean to the collection\r\n *\r\n * @param title The field title.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addBoolean = function (title, properties) {\r\n var props = {\r\n FieldTypeKind: 8,\r\n };\r\n return this.add(title, \"SP.Field\", extend(props, properties));\r\n };\r\n /**\r\n * Creates a secondary (dependent) lookup field, based on the Id of the primary lookup field.\r\n *\r\n * @param displayName The display name of the new field.\r\n * @param primaryLookupFieldId The guid of the primary Lookup Field.\r\n * @param showField Which field to show from the lookup list.\r\n */\r\n Fields.prototype.addDependentLookupField = function (displayName, primaryLookupFieldId, showField) {\r\n var _this = this;\r\n return this.clone(Fields_1, \"adddependentlookupfield(displayName='\" + displayName + \"', primarylookupfieldid='\" + primaryLookupFieldId + \"', showfield='\" + showField + \"')\")\r\n .postCore()\r\n .then(function (data) {\r\n return {\r\n data: data,\r\n field: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Adds a new SP.FieldLocation to the collection\r\n *\r\n * @param title The field title.\r\n * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)\r\n */\r\n Fields.prototype.addLocation = function (title, properties) {\r\n var props = { FieldTypeKind: 33 };\r\n return this.add(title, \"SP.FieldLocation\", extend(props, properties));\r\n };\r\n var Fields_1;\r\n Fields = Fields_1 = tslib_1.__decorate([\r\n defaultPath(\"fields\")\r\n ], Fields);\r\n return Fields;\r\n}(SharePointQueryableCollection));\r\nexport { Fields };\r\n/**\r\n * Describes a single of Field instance\r\n *\r\n */\r\nvar Field = /** @class */ (function (_super) {\r\n tslib_1.__extends(Field, _super);\r\n function Field() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete this fields\r\n *\r\n */\r\n _this.delete = _this._delete;\r\n return _this;\r\n }\r\n /**\r\n * Updates this field intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the list\r\n * @param fieldType The type value, required to update child field type properties\r\n */\r\n Field.prototype.update = function (properties, fieldType) {\r\n var _this = this;\r\n if (fieldType === void 0) { fieldType = \"SP.Field\"; }\r\n var postBody = jsS(extend(metadata(fieldType), properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n field: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Sets the value of the ShowInDisplayForm property for this field.\r\n */\r\n Field.prototype.setShowInDisplayForm = function (show) {\r\n return this.clone(Field, \"setshowindisplayform(\" + show + \")\").postCore();\r\n };\r\n /**\r\n * Sets the value of the ShowInEditForm property for this field.\r\n */\r\n Field.prototype.setShowInEditForm = function (show) {\r\n return this.clone(Field, \"setshowineditform(\" + show + \")\").postCore();\r\n };\r\n /**\r\n * Sets the value of the ShowInNewForm property for this field.\r\n */\r\n Field.prototype.setShowInNewForm = function (show) {\r\n return this.clone(Field, \"setshowinnewform(\" + show + \")\").postCore();\r\n };\r\n return Field;\r\n}(SharePointQueryableInstance));\r\nexport { Field };\r\n//# sourceMappingURL=fields.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\n/**\r\n * Describes a collection of Field objects\r\n *\r\n */\r\nvar Forms = /** @class */ (function (_super) {\r\n tslib_1.__extends(Forms, _super);\r\n function Forms() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a form by id\r\n *\r\n * @param id The guid id of the item to retrieve\r\n */\r\n Forms.prototype.getById = function (id) {\r\n var i = new Form(this);\r\n i.concat(\"('\" + id + \"')\");\r\n return i;\r\n };\r\n Forms = tslib_1.__decorate([\r\n defaultPath(\"forms\")\r\n ], Forms);\r\n return Forms;\r\n}(SharePointQueryableCollection));\r\nexport { Forms };\r\n/**\r\n * Describes a single of Form instance\r\n *\r\n */\r\nvar Form = /** @class */ (function (_super) {\r\n tslib_1.__extends(Form, _super);\r\n function Form() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Form;\r\n}(SharePointQueryableInstance));\r\nexport { Form };\r\n//# sourceMappingURL=forms.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\n/**\r\n * Describes a collection of webhook subscriptions\r\n *\r\n */\r\nvar Subscriptions = /** @class */ (function (_super) {\r\n tslib_1.__extends(Subscriptions, _super);\r\n function Subscriptions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Returns all the webhook subscriptions or the specified webhook subscription\r\n *\r\n * @param subscriptionId The id of a specific webhook subscription to retrieve, omit to retrieve all the webhook subscriptions\r\n */\r\n Subscriptions.prototype.getById = function (subscriptionId) {\r\n var s = new Subscription(this);\r\n s.concat(\"('\" + subscriptionId + \"')\");\r\n return s;\r\n };\r\n /**\r\n * Creates a new webhook subscription\r\n *\r\n * @param notificationUrl The url to receive the notifications\r\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months)\r\n * @param clientState A client specific string (optional)\r\n */\r\n Subscriptions.prototype.add = function (notificationUrl, expirationDate, clientState) {\r\n var _this = this;\r\n var postBody = {\r\n \"expirationDateTime\": expirationDate,\r\n \"notificationUrl\": notificationUrl,\r\n \"resource\": this.toUrl(),\r\n };\r\n if (clientState) {\r\n postBody.clientState = clientState;\r\n }\r\n return this.postCore({ body: jsS(postBody), headers: { \"Content-Type\": \"application/json\" } }).then(function (result) {\r\n return { data: result, subscription: _this.getById(result.id) };\r\n });\r\n };\r\n Subscriptions = tslib_1.__decorate([\r\n defaultPath(\"subscriptions\")\r\n ], Subscriptions);\r\n return Subscriptions;\r\n}(SharePointQueryableCollection));\r\nexport { Subscriptions };\r\n/**\r\n * Describes a single webhook subscription instance\r\n *\r\n */\r\nvar Subscription = /** @class */ (function (_super) {\r\n tslib_1.__extends(Subscription, _super);\r\n function Subscription() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Renews this webhook subscription\r\n *\r\n * @param expirationDate The date and time to expire the subscription in the form YYYY-MM-ddTHH:mm:ss+00:00 (maximum of 6 months, optional)\r\n * @param notificationUrl The url to receive the notifications (optional)\r\n * @param clientState A client specific string (optional)\r\n */\r\n Subscription.prototype.update = function (expirationDate, notificationUrl, clientState) {\r\n var _this = this;\r\n var postBody = {};\r\n if (expirationDate) {\r\n postBody.expirationDateTime = expirationDate;\r\n }\r\n if (notificationUrl) {\r\n postBody.notificationUrl = notificationUrl;\r\n }\r\n if (clientState) {\r\n postBody.clientState = clientState;\r\n }\r\n return this.patchCore({ body: jsS(postBody), headers: { \"Content-Type\": \"application/json\" } }).then(function (data) {\r\n return { data: data, subscription: _this };\r\n });\r\n };\r\n /**\r\n * Removes this webhook subscription\r\n *\r\n */\r\n Subscription.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n return Subscription;\r\n}(SharePointQueryableInstance));\r\nexport { Subscription };\r\n//# sourceMappingURL=subscriptions.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { extend, jsS } from \"@pnp/common\";\r\n/**\r\n * Describes a collection of user custom actions\r\n *\r\n */\r\nvar UserCustomActions = /** @class */ (function (_super) {\r\n tslib_1.__extends(UserCustomActions, _super);\r\n function UserCustomActions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n UserCustomActions_1 = UserCustomActions;\r\n /**\r\n * Returns the user custom action with the specified id\r\n *\r\n * @param id The GUID id of the user custom action to retrieve\r\n */\r\n UserCustomActions.prototype.getById = function (id) {\r\n var uca = new UserCustomAction(this);\r\n uca.concat(\"('\" + id + \"')\");\r\n return uca;\r\n };\r\n /**\r\n * Creates a user custom action\r\n *\r\n * @param properties The information object of property names and values which define the new user custom action\r\n *\r\n */\r\n UserCustomActions.prototype.add = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend({ __metadata: { \"type\": \"SP.UserCustomAction\" } }, properties));\r\n return this.postCore({ body: postBody }).then(function (data) {\r\n return {\r\n action: _this.getById(data.Id),\r\n data: data,\r\n };\r\n });\r\n };\r\n /**\r\n * Deletes all user custom actions in the collection\r\n *\r\n */\r\n UserCustomActions.prototype.clear = function () {\r\n return this.clone(UserCustomActions_1, \"clear\").postCore();\r\n };\r\n var UserCustomActions_1;\r\n UserCustomActions = UserCustomActions_1 = tslib_1.__decorate([\r\n defaultPath(\"usercustomactions\")\r\n ], UserCustomActions);\r\n return UserCustomActions;\r\n}(SharePointQueryableCollection));\r\nexport { UserCustomActions };\r\n/**\r\n * Describes a single user custom action\r\n *\r\n */\r\nvar UserCustomAction = /** @class */ (function (_super) {\r\n tslib_1.__extends(UserCustomAction, _super);\r\n function UserCustomAction() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Updates this user custom action with the supplied properties\r\n *\r\n * @param properties An information object of property names and values to update for this user custom action\r\n */\r\n _this.update = _this._update(\"SP.UserCustomAction\", function (data) { return ({ data: data, action: _this }); });\r\n return _this;\r\n }\r\n /**\r\n * Removes this user custom action\r\n *\r\n */\r\n UserCustomAction.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n return UserCustomAction;\r\n}(SharePointQueryableInstance));\r\nexport { UserCustomAction };\r\n//# sourceMappingURL=usercustomactions.js.map","import * as tslib_1 from \"tslib\";\r\nimport { Items } from \"./items\";\r\nimport { Views, View } from \"./views\";\r\nimport { ContentTypes } from \"./contenttypes\";\r\nimport { Fields } from \"./fields\";\r\nimport { Forms } from \"./forms\";\r\nimport { Subscriptions } from \"./subscriptions\";\r\nimport { SharePointQueryable, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { SharePointQueryableSecurable } from \"./sharepointqueryablesecurable\";\r\nimport { extend, hOP, jsS, isArray } from \"@pnp/common\";\r\nimport { UserCustomActions } from \"./usercustomactions\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { Folder } from \"./folders\";\r\nimport { metadata } from \"./utils/metadata\";\r\nimport { SiteScripts } from \"..\";\r\nimport { toAbsoluteUrl } from \"./utils/toabsoluteurl\";\r\n/**\r\n * Describes a collection of List objects\r\n *\r\n */\r\nvar Lists = /** @class */ (function (_super) {\r\n tslib_1.__extends(Lists, _super);\r\n function Lists() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Lists_1 = Lists;\r\n /**\r\n * Gets a list from the collection by guid id\r\n *\r\n * @param id The Id of the list (GUID)\r\n */\r\n Lists.prototype.getById = function (id) {\r\n var list = new List(this);\r\n list.concat(\"('\" + id + \"')\");\r\n return list;\r\n };\r\n /**\r\n * Gets a list from the collection by title\r\n *\r\n * @param title The title of the list\r\n */\r\n Lists.prototype.getByTitle = function (title) {\r\n return new List(this, \"getByTitle('\" + title + \"')\");\r\n };\r\n /**\r\n * Adds a new list to the collection\r\n *\r\n * @param title The new list's title\r\n * @param description The new list's description\r\n * @param template The list template value\r\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\r\n * @param additionalSettings Will be passed as part of the list creation body\r\n */\r\n Lists.prototype.add = function (title, description, template, enableContentTypes, additionalSettings) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n if (template === void 0) { template = 100; }\r\n if (enableContentTypes === void 0) { enableContentTypes = false; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n var addSettings = extend({\r\n \"AllowContentTypes\": enableContentTypes,\r\n \"BaseTemplate\": template,\r\n \"ContentTypesEnabled\": enableContentTypes,\r\n \"Description\": description,\r\n \"Title\": title,\r\n \"__metadata\": { \"type\": \"SP.List\" },\r\n }, additionalSettings);\r\n return this.postCore({ body: jsS(addSettings) }).then(function (data) {\r\n return { data: data, list: _this.getByTitle(addSettings.Title) };\r\n });\r\n };\r\n /**\r\n * Ensures that the specified list exists in the collection (note: this method not supported for batching)\r\n *\r\n * @param title The new list's title\r\n * @param description The new list's description\r\n * @param template The list template value\r\n * @param enableContentTypes If true content types will be allowed and enabled, otherwise they will be disallowed and not enabled\r\n * @param additionalSettings Will be passed as part of the list creation body or used to update an existing list\r\n */\r\n Lists.prototype.ensure = function (title, description, template, enableContentTypes, additionalSettings) {\r\n var _this = this;\r\n if (description === void 0) { description = \"\"; }\r\n if (template === void 0) { template = 100; }\r\n if (enableContentTypes === void 0) { enableContentTypes = false; }\r\n if (additionalSettings === void 0) { additionalSettings = {}; }\r\n if (this.hasBatch) {\r\n throw Error(\"The ensure list method is not supported for use in a batch.\");\r\n }\r\n return new Promise(function (resolve, reject) {\r\n var addOrUpdateSettings = extend(additionalSettings, { Title: title, Description: description, ContentTypesEnabled: enableContentTypes }, true);\r\n var list = _this.getByTitle(addOrUpdateSettings.Title);\r\n list.get().then(function (_) {\r\n list.update(addOrUpdateSettings).then(function (d) {\r\n resolve({ created: false, data: d, list: _this.getByTitle(addOrUpdateSettings.Title) });\r\n }).catch(function (e) { return reject(e); });\r\n }).catch(function (_) {\r\n _this.add(title, description, template, enableContentTypes, addOrUpdateSettings).then(function (r) {\r\n resolve({ created: true, data: r.data, list: _this.getByTitle(addOrUpdateSettings.Title) });\r\n }).catch(function (e) { return reject(e); });\r\n });\r\n });\r\n };\r\n /**\r\n * Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.\r\n */\r\n Lists.prototype.ensureSiteAssetsLibrary = function () {\r\n return this.clone(Lists_1, \"ensuresiteassetslibrary\").postCore().then(function (json) {\r\n return new List(odataUrlFrom(json));\r\n });\r\n };\r\n /**\r\n * Gets a list that is the default location for wiki pages.\r\n */\r\n Lists.prototype.ensureSitePagesLibrary = function () {\r\n return this.clone(Lists_1, \"ensuresitepageslibrary\").postCore().then(function (json) {\r\n return new List(odataUrlFrom(json));\r\n });\r\n };\r\n var Lists_1;\r\n Lists = Lists_1 = tslib_1.__decorate([\r\n defaultPath(\"lists\")\r\n ], Lists);\r\n return Lists;\r\n}(SharePointQueryableCollection));\r\nexport { Lists };\r\n/**\r\n * Describes a single List instance\r\n *\r\n */\r\nvar List = /** @class */ (function (_super) {\r\n tslib_1.__extends(List, _super);\r\n function List() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(List.prototype, \"contentTypes\", {\r\n /**\r\n * Gets the content types in this list\r\n *\r\n */\r\n get: function () {\r\n return new ContentTypes(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"items\", {\r\n /**\r\n * Gets the items in this list\r\n *\r\n */\r\n get: function () {\r\n return new Items(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"views\", {\r\n /**\r\n * Gets the views in this list\r\n *\r\n */\r\n get: function () {\r\n return new Views(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"fields\", {\r\n /**\r\n * Gets the fields in this list\r\n *\r\n */\r\n get: function () {\r\n return new Fields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"forms\", {\r\n /**\r\n * Gets the forms in this list\r\n *\r\n */\r\n get: function () {\r\n return new Forms(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"defaultView\", {\r\n /**\r\n * Gets the default view of this list\r\n *\r\n */\r\n get: function () {\r\n return new View(this, \"DefaultView\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"userCustomActions\", {\r\n /**\r\n * Get all custom actions on a site collection\r\n *\r\n */\r\n get: function () {\r\n return new UserCustomActions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"effectiveBasePermissions\", {\r\n /**\r\n * Gets the effective base permissions of this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"EffectiveBasePermissions\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"eventReceivers\", {\r\n /**\r\n * Gets the event receivers attached to this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"EventReceivers\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"relatedFields\", {\r\n /**\r\n * Gets the related fields of this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"getRelatedFields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"informationRightsManagementSettings\", {\r\n /**\r\n * Gets the IRM settings for this list\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"InformationRightsManagementSettings\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"subscriptions\", {\r\n /**\r\n * Gets the webhook subscriptions of this list\r\n *\r\n */\r\n get: function () {\r\n return new Subscriptions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(List.prototype, \"rootFolder\", {\r\n /**\r\n * The root folder of the list\r\n */\r\n get: function () {\r\n return new Folder(this, \"rootFolder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a view by view guid id\r\n *\r\n */\r\n List.prototype.getView = function (viewId) {\r\n return new View(this, \"getView('\" + viewId + \"')\");\r\n };\r\n /**\r\n * Updates this list intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the list\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n /* tslint:disable no-string-literal */\r\n List.prototype.update = function (properties, eTag) {\r\n var _this = this;\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n var postBody = jsS(extend({\r\n \"__metadata\": { \"type\": \"SP.List\" },\r\n }, properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n var retList = _this;\r\n if (hOP(properties, \"Title\")) {\r\n retList = _this.getParent(List, _this.parentUrl, \"getByTitle('\" + properties[\"Title\"] + \"')\");\r\n }\r\n return {\r\n data: data,\r\n list: retList,\r\n };\r\n });\r\n };\r\n /* tslint:enable */\r\n /**\r\n * Delete this list\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n List.prototype.delete = function (eTag) {\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n return this.postCore({\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"DELETE\",\r\n },\r\n });\r\n };\r\n /**\r\n * Returns the collection of changes from the change log that have occurred within the list, based on the specified query.\r\n */\r\n List.prototype.getChanges = function (query) {\r\n return this.clone(List, \"getchanges\").postCore({\r\n body: jsS({ \"query\": extend(metadata(\"SP.ChangeQuery\"), query) }),\r\n });\r\n };\r\n /**\r\n * Returns a collection of items from the list based on the specified query.\r\n *\r\n * @param CamlQuery The Query schema of Collaborative Application Markup\r\n * Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation\r\n * to define queries against list data.\r\n * see:\r\n *\r\n * https://msdn.microsoft.com/en-us/library/office/ms467521.aspx\r\n *\r\n * @param expands A URI with a $expand System Query Option indicates that Entries associated with\r\n * the Entry or Collection of Entries identified by the Resource Path\r\n * section of the URI must be represented inline (i.e. eagerly loaded).\r\n * see:\r\n *\r\n * https://msdn.microsoft.com/en-us/library/office/fp142385.aspx\r\n *\r\n * http://www.odata.org/documentation/odata-version-2-0/uri-conventions/#ExpandSystemQueryOption\r\n */\r\n List.prototype.getItemsByCAMLQuery = function (query) {\r\n var expands = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n expands[_i - 1] = arguments[_i];\r\n }\r\n var q = this.clone(List, \"getitems\");\r\n return q.expand.apply(q, expands).postCore({\r\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.CamlQuery\" } }, query) }),\r\n });\r\n };\r\n /**\r\n * See: https://msdn.microsoft.com/en-us/library/office/dn292554.aspx\r\n */\r\n List.prototype.getListItemChangesSinceToken = function (query) {\r\n return this.clone(List, \"getlistitemchangessincetoken\").postCore({\r\n body: jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeLogItemQuery\" } }, query) }),\r\n }, { parse: function (r) { return r.text(); } });\r\n };\r\n /**\r\n * Moves the list to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n */\r\n List.prototype.recycle = function () {\r\n return this.clone(List, \"recycle\").postCore().then(function (data) {\r\n if (hOP(data, \"Recycle\")) {\r\n return data.Recycle;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Renders list data based on the view xml provided\r\n */\r\n List.prototype.renderListData = function (viewXml) {\r\n var q = this.clone(List, \"renderlistdata(@viewXml)\");\r\n q.query.set(\"@viewXml\", \"'\" + viewXml + \"'\");\r\n return q.postCore().then(function (data) {\r\n // data will be a string, so we parse it again\r\n return JSON.parse(hOP(data, \"RenderListData\") ? data.RenderListData : data);\r\n });\r\n };\r\n /**\r\n * Returns the data for the specified query view\r\n *\r\n * @param parameters The parameters to be used to render list data as JSON string.\r\n * @param overrideParameters The parameters that are used to override and extend the regular SPRenderListDataParameters.\r\n * @param queryParams Allows setting of query parameters\r\n */\r\n List.prototype.renderListDataAsStream = function (parameters, overrideParameters, queryParams) {\r\n if (overrideParameters === void 0) { overrideParameters = null; }\r\n if (queryParams === void 0) { queryParams = new Map(); }\r\n if (hOP(parameters, \"RenderOptions\") && isArray(parameters.RenderOptions)) {\r\n parameters.RenderOptions = parameters.RenderOptions.reduce(function (v, c) { return v + c; });\r\n }\r\n var postBody = {\r\n overrideParameters: extend(metadata(\"SP.RenderListDataOverrideParameters\"), overrideParameters),\r\n parameters: extend(metadata(\"SP.RenderListDataParameters\"), parameters),\r\n };\r\n var clone = this.clone(List, \"RenderListDataAsStream\", true);\r\n if (queryParams && queryParams.size > 0) {\r\n queryParams.forEach(function (v, k) { return clone.query.set(k, v); });\r\n }\r\n return clone.postCore({\r\n body: jsS(postBody),\r\n });\r\n };\r\n /**\r\n * Gets the field values and field schema attributes for a list item.\r\n */\r\n List.prototype.renderListFormData = function (itemId, formId, mode) {\r\n return this.clone(List, \"renderlistformdata(itemid=\" + itemId + \", formid='\" + formId + \"', mode='\" + mode + \"')\").postCore().then(function (data) {\r\n // data will be a string, so we parse it again\r\n return JSON.parse(hOP(data, \"RenderListFormData\") ? data.RenderListFormData : data);\r\n });\r\n };\r\n /**\r\n * Reserves a list item ID for idempotent list item creation.\r\n */\r\n List.prototype.reserveListItemId = function () {\r\n return this.clone(List, \"reservelistitemid\").postCore().then(function (data) {\r\n if (hOP(data, \"ReserveListItemId\")) {\r\n return data.ReserveListItemId;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Returns the ListItemEntityTypeFullName for this list, used when adding/updating list items. Does not support batching.\r\n *\r\n */\r\n List.prototype.getListItemEntityTypeFullName = function () {\r\n return this.clone(List, null, false).select(\"ListItemEntityTypeFullName\").get().then(function (o) { return o.ListItemEntityTypeFullName; });\r\n };\r\n /**\r\n * Creates an item using path (in a folder), validates and sets its field values.\r\n *\r\n * @param formValues The fields to change and their new values.\r\n * @param decodedUrl Path decoded url; folder's server relative path.\r\n * @param bNewDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\r\n * @param checkInComment Optional check in comment.\r\n */\r\n List.prototype.addValidateUpdateItemUsingPath = function (formValues, decodedUrl, bNewDocumentUpdate, checkInComment) {\r\n if (bNewDocumentUpdate === void 0) { bNewDocumentUpdate = false; }\r\n return this.clone(List, \"AddValidateUpdateItemUsingPath()\").postCore({\r\n body: jsS({\r\n bNewDocumentUpdate: bNewDocumentUpdate,\r\n checkInComment: checkInComment,\r\n formValues: formValues,\r\n listItemCreateInfo: {\r\n FolderPath: {\r\n DecodedUrl: decodedUrl,\r\n __metadata: { type: \"SP.ResourcePath\" },\r\n },\r\n __metadata: { type: \"SP.ListItemCreationInformationUsingPath\" },\r\n },\r\n }),\r\n }).then(function (res) {\r\n if (typeof res.AddValidateUpdateItemUsingPath !== \"undefined\") {\r\n return res.AddValidateUpdateItemUsingPath.results;\r\n }\r\n return res;\r\n });\r\n };\r\n /**\r\n * Gets the site script syntax (JSON) for the current list\r\n */\r\n List.prototype.getSiteScript = function () {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var rootFolder, absoluteListUrl;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(List).rootFolder.select(\"ServerRelativeUrl\").get()];\r\n case 1:\r\n rootFolder = _a.sent();\r\n return [4 /*yield*/, toAbsoluteUrl(rootFolder.ServerRelativeUrl)];\r\n case 2:\r\n absoluteListUrl = _a.sent();\r\n return [2 /*return*/, new SiteScripts(this, \"\").getSiteScriptFromList(absoluteListUrl)];\r\n }\r\n });\r\n });\r\n };\r\n return List;\r\n}(SharePointQueryableSecurable));\r\nexport { List };\r\n//# sourceMappingURL=lists.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { extend, jsS } from \"@pnp/common\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Represents a Collection of comments\r\n */\r\nvar Comments = /** @class */ (function (_super) {\r\n tslib_1.__extends(Comments, _super);\r\n function Comments() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Comments_1 = Comments;\r\n /**\r\n * Adds a new comment to this collection\r\n *\r\n * @param info Comment information to add\r\n */\r\n Comments.prototype.add = function (info) {\r\n var _this = this;\r\n if (typeof info === \"string\") {\r\n info = { text: info };\r\n }\r\n var postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\r\n return this.clone(Comments_1, null).postCore({ body: postBody }).then(function (d) {\r\n return extend(_this.getById(d.id), d);\r\n });\r\n };\r\n /**\r\n * Gets a comment by id\r\n *\r\n * @param id Id of the comment to load\r\n */\r\n Comments.prototype.getById = function (id) {\r\n var c = new Comment(this);\r\n c.concat(\"(\" + id + \")\");\r\n return c;\r\n };\r\n /**\r\n * Deletes all the comments in this collection\r\n */\r\n Comments.prototype.clear = function () {\r\n return this.clone(Comments_1, \"DeleteAll\").postCore();\r\n };\r\n var Comments_1;\r\n Comments = Comments_1 = tslib_1.__decorate([\r\n defaultPath(\"comments\")\r\n ], Comments);\r\n return Comments;\r\n}(SharePointQueryableCollection));\r\nexport { Comments };\r\n/**\r\n * Represents a comment\r\n */\r\nvar Comment = /** @class */ (function (_super) {\r\n tslib_1.__extends(Comment, _super);\r\n function Comment() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Comment.prototype, \"replies\", {\r\n get: function () {\r\n return new Replies(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Likes the comment as the current user\r\n */\r\n Comment.prototype.like = function () {\r\n return this.clone(Comment, \"Like\").postCore();\r\n };\r\n /**\r\n * Unlikes the comment as the current user\r\n */\r\n Comment.prototype.unlike = function () {\r\n return this.clone(Comment, \"Unlike\").postCore();\r\n };\r\n /**\r\n * Deletes this comment\r\n */\r\n Comment.prototype.delete = function () {\r\n return this.deleteCore();\r\n };\r\n return Comment;\r\n}(SharePointQueryableInstance));\r\nexport { Comment };\r\n/**\r\n * Represents a Collection of comments\r\n */\r\nvar Replies = /** @class */ (function (_super) {\r\n tslib_1.__extends(Replies, _super);\r\n function Replies() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Replies_1 = Replies;\r\n /**\r\n * Adds a new reply to this collection\r\n *\r\n * @param info Comment information to add\r\n */\r\n Replies.prototype.add = function (info) {\r\n if (typeof info === \"string\") {\r\n info = { text: info };\r\n }\r\n var postBody = jsS(extend(metadata(\"Microsoft.SharePoint.Comments.comment\"), info));\r\n return this.clone(Replies_1, null).postCore({ body: postBody }).then(function (d) {\r\n return extend(new Comment(odataUrlFrom(d)), d);\r\n });\r\n };\r\n var Replies_1;\r\n Replies = Replies_1 = tslib_1.__decorate([\r\n defaultPath(\"replies\")\r\n ], Replies);\r\n return Replies;\r\n}(SharePointQueryableCollection));\r\nexport { Replies };\r\n//# sourceMappingURL=comments.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, SharePointQueryableCollection, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { SharePointQueryableShareableItem } from \"./sharepointqueryableshareable\";\r\nimport { Folder } from \"./folders\";\r\nimport { File } from \"./files\";\r\nimport { ContentType } from \"./contenttypes\";\r\nimport { extend, jsS, hOP } from \"@pnp/common\";\r\nimport { ODataParserBase, ODataDefaultParser } from \"@pnp/odata\";\r\nimport { AttachmentFiles } from \"./attachmentfiles\";\r\nimport { List } from \"./lists\";\r\nimport { Logger } from \"@pnp/logging\";\r\nimport { Comments } from \"./comments\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Describes a collection of Item objects\r\n *\r\n */\r\nvar Items = /** @class */ (function (_super) {\r\n tslib_1.__extends(Items, _super);\r\n function Items() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Items_1 = Items;\r\n /**\r\n * Gets an Item by id\r\n *\r\n * @param id The integer id of the item to retrieve\r\n */\r\n Items.prototype.getById = function (id) {\r\n var i = new Item(this);\r\n i.concat(\"(\" + id + \")\");\r\n return i;\r\n };\r\n /**\r\n * Gets BCS Item by string id\r\n *\r\n * @param stringId The string id of the BCS item to retrieve\r\n */\r\n Items.prototype.getItemByStringId = function (stringId) {\r\n // creates an item with the parent list path and append out method call\r\n return new Item(this.parentUrl, \"getItemByStringId('\" + stringId + \"')\");\r\n };\r\n /**\r\n * Skips the specified number of items (https://msdn.microsoft.com/en-us/library/office/fp142385.aspx#sectionSection6)\r\n *\r\n * @param skip The starting id where the page should start, use with top to specify pages\r\n * @param reverse It true the PagedPrev=true parameter is added allowing backwards navigation in the collection\r\n */\r\n Items.prototype.skip = function (skip, reverse) {\r\n if (reverse === void 0) { reverse = false; }\r\n if (reverse) {\r\n this.query.set(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&PagedPrev=TRUE&p_ID=\" + skip));\r\n }\r\n else {\r\n this.query.set(\"$skiptoken\", encodeURIComponent(\"Paged=TRUE&p_ID=\" + skip));\r\n }\r\n return this;\r\n };\r\n /**\r\n * Gets a collection designed to aid in paging through data\r\n *\r\n */\r\n Items.prototype.getPaged = function (parser) {\r\n if (parser === void 0) { parser = new ODataDefaultParser(); }\r\n return this.get(new PagedItemCollectionParser(this, parser));\r\n };\r\n /**\r\n * Gets all the items in a list, regardless of count. Does not support batching or caching\r\n *\r\n * @param requestSize Number of items to return in each request (Default: 2000)\r\n * @param acceptHeader Allows for setting the value of the Accept header for SP 2013 support\r\n */\r\n Items.prototype.getAll = function (requestSize, acceptHeader) {\r\n if (requestSize === void 0) { requestSize = 2000; }\r\n if (acceptHeader === void 0) { acceptHeader = \"application/json;odata=nometadata\"; }\r\n Logger.write(\"Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.\", 2 /* Warning */);\r\n // this will be used for the actual query\r\n // and we set no metadata here to try and reduce traffic\r\n var items = new Items_1(this, \"\").top(requestSize).configure({\r\n headers: {\r\n \"Accept\": acceptHeader,\r\n },\r\n });\r\n // let's copy over the odata query params that can be applied\r\n // $top - allow setting the page size this way (override what we did above)\r\n // $select - allow picking the return fields (good behavior)\r\n // $filter - allow setting a filter, though this may fail due for large lists\r\n this.query.forEach(function (v, k) {\r\n if (/^\\$select|filter|top|expand$/i.test(k)) {\r\n items.query.set(k, v);\r\n }\r\n });\r\n // give back the promise\r\n return new Promise(function (resolve, reject) {\r\n // this will eventually hold the items we return\r\n var itemsCollector = [];\r\n // action that will gather up our results recursively\r\n var gatherer = function (last) {\r\n // collect that set of results\r\n [].push.apply(itemsCollector, last.results);\r\n // if we have more, repeat - otherwise resolve with the collected items\r\n if (last.hasNext) {\r\n last.getNext().then(gatherer).catch(reject);\r\n }\r\n else {\r\n resolve(itemsCollector);\r\n }\r\n };\r\n // start the cycle\r\n items.getPaged().then(gatherer).catch(reject);\r\n });\r\n };\r\n /**\r\n * Adds a new item to the collection\r\n *\r\n * @param properties The new items's properties\r\n * @param listItemEntityTypeFullName The type name of the list's entities\r\n */\r\n Items.prototype.add = function (properties, listItemEntityTypeFullName) {\r\n var _this = this;\r\n if (properties === void 0) { properties = {}; }\r\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\r\n var removeDependency = this.addBatchDependency();\r\n return this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\r\n var postBody = jsS(extend(metadata(listItemEntityType), properties));\r\n var promise = _this.clone(Items_1, \"\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n item: _this.getById(data.Id),\r\n };\r\n });\r\n removeDependency();\r\n return promise;\r\n });\r\n };\r\n /**\r\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\r\n *\r\n * @param candidatelistItemEntityTypeFullName The potential type name\r\n */\r\n Items.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\r\n return candidatelistItemEntityTypeFullName ?\r\n Promise.resolve(candidatelistItemEntityTypeFullName) :\r\n this.getParent(List).getListItemEntityTypeFullName();\r\n };\r\n var Items_1;\r\n Items = Items_1 = tslib_1.__decorate([\r\n defaultPath(\"items\")\r\n ], Items);\r\n return Items;\r\n}(SharePointQueryableCollection));\r\nexport { Items };\r\n/**\r\n * Descrines a single Item instance\r\n *\r\n */\r\nvar Item = /** @class */ (function (_super) {\r\n tslib_1.__extends(Item, _super);\r\n function Item() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete this item\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n }\r\n Object.defineProperty(Item.prototype, \"attachmentFiles\", {\r\n /**\r\n * Gets the set of attachments for this item\r\n *\r\n */\r\n get: function () {\r\n return new AttachmentFiles(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"contentType\", {\r\n /**\r\n * Gets the content type for this item\r\n *\r\n */\r\n get: function () {\r\n return new ContentType(this, \"ContentType\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"comments\", {\r\n /**\r\n * Gets the collection of comments associated with this list item\r\n */\r\n get: function () {\r\n return new Comments(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"effectiveBasePermissions\", {\r\n /**\r\n * Gets the effective base permissions for the item\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"EffectiveBasePermissions\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"effectiveBasePermissionsForUI\", {\r\n /**\r\n * Gets the effective base permissions for the item in a UI context\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryable(this, \"EffectiveBasePermissionsForUI\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"fieldValuesAsHTML\", {\r\n /**\r\n * Gets the field values for this list item in their HTML representation\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FieldValuesAsHTML\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"fieldValuesAsText\", {\r\n /**\r\n * Gets the field values for this list item in their text representation\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FieldValuesAsText\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"fieldValuesForEdit\", {\r\n /**\r\n * Gets the field values for this list item for use in editing controls\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableInstance(this, \"FieldValuesForEdit\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"folder\", {\r\n /**\r\n * Gets the folder associated with this list item (if this item represents a folder)\r\n *\r\n */\r\n get: function () {\r\n return new Folder(this, \"folder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"file\", {\r\n /**\r\n * Gets the folder associated with this list item (if this item represents a folder)\r\n *\r\n */\r\n get: function () {\r\n return new File(this, \"file\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"versions\", {\r\n /**\r\n * Gets the collection of versions associated with this item\r\n */\r\n get: function () {\r\n return new ItemVersions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Item.prototype, \"list\", {\r\n get: function () {\r\n return this.getParent(List, this.parentUrl.substr(0, this.parentUrl.lastIndexOf(\"/\")));\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates this list intance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the list\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n * @param listItemEntityTypeFullName The type name of the list's entities\r\n */\r\n Item.prototype.update = function (properties, eTag, listItemEntityTypeFullName) {\r\n var _this = this;\r\n if (eTag === void 0) { eTag = \"*\"; }\r\n if (listItemEntityTypeFullName === void 0) { listItemEntityTypeFullName = null; }\r\n return new Promise(function (resolve, reject) {\r\n var removeDependency = _this.addBatchDependency();\r\n return _this.ensureListItemEntityTypeName(listItemEntityTypeFullName).then(function (listItemEntityType) {\r\n var postBody = jsS(extend(metadata(listItemEntityType), properties));\r\n removeDependency();\r\n return _this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"IF-Match\": eTag,\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }, new ItemUpdatedParser()).then(function (data) {\r\n resolve({\r\n data: data,\r\n item: _this,\r\n });\r\n });\r\n }).catch(function (e) { return reject(e); });\r\n });\r\n };\r\n /**\r\n * Gets the collection of people who have liked this item\r\n */\r\n Item.prototype.getLikedBy = function () {\r\n return this.clone(Item, \"likedBy\").postCore();\r\n };\r\n /**\r\n * Likes this item as the current user\r\n */\r\n Item.prototype.like = function () {\r\n return this.clone(Item, \"like\").postCore();\r\n };\r\n /**\r\n * Unlikes this item as the current user\r\n */\r\n Item.prototype.unlike = function () {\r\n return this.clone(Item, \"unlike\").postCore();\r\n };\r\n /**\r\n * Moves the list item to the Recycle Bin and returns the identifier of the new Recycle Bin item.\r\n */\r\n Item.prototype.recycle = function () {\r\n return this.clone(Item, \"recycle\").postCore();\r\n };\r\n /**\r\n * Gets a string representation of the full URL to the WOPI frame.\r\n * If there is no associated WOPI application, or no associated action, an empty string is returned.\r\n *\r\n * @param action Display mode: 0: view, 1: edit, 2: mobileView, 3: interactivePreview\r\n */\r\n Item.prototype.getWopiFrameUrl = function (action) {\r\n if (action === void 0) { action = 0; }\r\n var i = this.clone(Item, \"getWOPIFrameUrl(@action)\");\r\n i.query.set(\"@action\", action);\r\n return i.postCore().then(function (data) {\r\n // handle verbose mode\r\n if (hOP(data, \"GetWOPIFrameUrl\")) {\r\n return data.GetWOPIFrameUrl;\r\n }\r\n return data;\r\n });\r\n };\r\n /**\r\n * Validates and sets the values of the specified collection of fields for the list item.\r\n *\r\n * @param formValues The fields to change and their new values.\r\n * @param newDocumentUpdate true if the list item is a document being updated after upload; otherwise false.\r\n */\r\n Item.prototype.validateUpdateListItem = function (formValues, newDocumentUpdate) {\r\n if (newDocumentUpdate === void 0) { newDocumentUpdate = false; }\r\n return this.clone(Item, \"validateupdatelistitem\").postCore({\r\n body: jsS({ \"formValues\": formValues, bNewDocumentUpdate: newDocumentUpdate }),\r\n });\r\n };\r\n /**\r\n * Get the like by information for a modern site page\r\n */\r\n Item.prototype.getLikedByInformation = function () {\r\n return this.clone(Item, \"likedByInformation\").expand(\"likedby\").getCore();\r\n };\r\n /**\r\n * Ensures we have the proper list item entity type name, either from the value provided or from the list\r\n *\r\n * @param candidatelistItemEntityTypeFullName The potential type name\r\n */\r\n Item.prototype.ensureListItemEntityTypeName = function (candidatelistItemEntityTypeFullName) {\r\n return candidatelistItemEntityTypeFullName ?\r\n Promise.resolve(candidatelistItemEntityTypeFullName) :\r\n this.list.getListItemEntityTypeFullName();\r\n };\r\n return Item;\r\n}(SharePointQueryableShareableItem));\r\nexport { Item };\r\n/**\r\n * Describes a collection of Version objects\r\n *\r\n */\r\nvar ItemVersions = /** @class */ (function (_super) {\r\n tslib_1.__extends(ItemVersions, _super);\r\n function ItemVersions() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a version by id\r\n *\r\n * @param versionId The id of the version to retrieve\r\n */\r\n ItemVersions.prototype.getById = function (versionId) {\r\n var v = new ItemVersion(this);\r\n v.concat(\"(\" + versionId + \")\");\r\n return v;\r\n };\r\n ItemVersions = tslib_1.__decorate([\r\n defaultPath(\"versions\")\r\n ], ItemVersions);\r\n return ItemVersions;\r\n}(SharePointQueryableCollection));\r\nexport { ItemVersions };\r\n/**\r\n * Describes a single Version instance\r\n *\r\n */\r\nvar ItemVersion = /** @class */ (function (_super) {\r\n tslib_1.__extends(ItemVersion, _super);\r\n function ItemVersion() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * Delete a specific version of a file.\r\n *\r\n * @param eTag Value used in the IF-Match header, by default \"*\"\r\n */\r\n _this.delete = _this._deleteWithETag;\r\n return _this;\r\n }\r\n return ItemVersion;\r\n}(SharePointQueryableInstance));\r\nexport { ItemVersion };\r\n/**\r\n * Provides paging functionality for list items\r\n */\r\nvar PagedItemCollection = /** @class */ (function () {\r\n function PagedItemCollection(parent, nextUrl, results, innerParser) {\r\n this.parent = parent;\r\n this.nextUrl = nextUrl;\r\n this.results = results;\r\n this.innerParser = innerParser;\r\n }\r\n Object.defineProperty(PagedItemCollection.prototype, \"hasNext\", {\r\n /**\r\n * If true there are more results available in the set, otherwise there are not\r\n */\r\n get: function () {\r\n return typeof this.nextUrl === \"string\" && this.nextUrl.length > 0;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the next set of results, or resolves to null if no results are available\r\n */\r\n PagedItemCollection.prototype.getNext = function () {\r\n if (this.hasNext) {\r\n var items = new Items(this.nextUrl, null).configureFrom(this.parent);\r\n return items.getPaged(this.innerParser);\r\n }\r\n return new Promise(function (r) { return r(null); });\r\n };\r\n return PagedItemCollection;\r\n}());\r\nexport { PagedItemCollection };\r\nvar PagedItemCollectionParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(PagedItemCollectionParser, _super);\r\n function PagedItemCollectionParser(_parent, innerParser) {\r\n var _this = _super.call(this) || this;\r\n _this._parent = _parent;\r\n _this.innerParser = innerParser;\r\n return _this;\r\n }\r\n PagedItemCollectionParser.prototype.parse = function (r) {\r\n var _this = this;\r\n return this.innerParser.parse(r).then(function (items) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\r\n var json, nextUrl;\r\n return tslib_1.__generator(this, function (_a) {\r\n json = this.innerParser.rawJson;\r\n nextUrl = hOP(json, \"d\") && hOP(json.d, \"__next\") ? json.d.__next : json[\"odata.nextLink\"];\r\n return [2 /*return*/, new PagedItemCollection(this._parent, nextUrl, items, this.innerParser)];\r\n });\r\n }); });\r\n };\r\n return PagedItemCollectionParser;\r\n}(ODataParserBase));\r\nvar ItemUpdatedParser = /** @class */ (function (_super) {\r\n tslib_1.__extends(ItemUpdatedParser, _super);\r\n function ItemUpdatedParser() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ItemUpdatedParser.prototype.parse = function (r) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var _this = this;\r\n return tslib_1.__generator(this, function (_a) {\r\n return [2 /*return*/, new Promise(function (resolve, reject) {\r\n if (_this.handleError(r, reject)) {\r\n resolve({\r\n \"odata.etag\": r.headers.get(\"etag\"),\r\n });\r\n }\r\n })];\r\n });\r\n });\r\n };\r\n return ItemUpdatedParser;\r\n}(ODataParserBase));\r\n//# sourceMappingURL=items.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection } from \"./sharepointqueryable\";\r\nimport { File } from \"./files\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { extractWebUrl } from \"./utils/extractweburl\";\r\n/**\r\n * Represents an app catalog\r\n */\r\nvar AppCatalog = /** @class */ (function (_super) {\r\n tslib_1.__extends(AppCatalog, _super);\r\n function AppCatalog(baseUrl, path) {\r\n if (path === void 0) { path = \"_api/web/tenantappcatalog/AvailableApps\"; }\r\n return _super.call(this, extractWebUrl(typeof baseUrl === \"string\" ? baseUrl : baseUrl.toUrl()), path) || this;\r\n }\r\n /**\r\n * Get details of specific app from the app catalog\r\n * @param id - Specify the guid of the app\r\n */\r\n AppCatalog.prototype.getAppById = function (id) {\r\n return new App(this, \"getById('\" + id + \"')\");\r\n };\r\n /**\r\n * Uploads an app package. Not supported for batching\r\n *\r\n * @param filename Filename to create.\r\n * @param content app package data (eg: the .app or .sppkg file).\r\n * @param shouldOverWrite Should an app with the same name in the same location be overwritten? (default: true)\r\n * @returns Promise\r\n */\r\n AppCatalog.prototype.add = function (filename, content, shouldOverWrite) {\r\n if (shouldOverWrite === void 0) { shouldOverWrite = true; }\r\n var catalog = this.toUrl().indexOf(\"tenantappcatalog\") > 0 ? \"tenantappcatalog\" : \"sitecollectionappcatalog\";\r\n // you don't add to the availableapps collection\r\n var adder = new AppCatalog(extractWebUrl(this.toUrl()), \"_api/web/\" + catalog + \"/add(overwrite=\" + shouldOverWrite + \",url='\" + filename + \"')\");\r\n return adder.postCore({\r\n body: content,\r\n }).then(function (r) {\r\n return {\r\n data: r,\r\n file: new File(odataUrlFrom(r)),\r\n };\r\n });\r\n };\r\n return AppCatalog;\r\n}(SharePointQueryableCollection));\r\nexport { AppCatalog };\r\n/**\r\n * Represents the actions you can preform on a given app within the catalog\r\n */\r\nvar App = /** @class */ (function (_super) {\r\n tslib_1.__extends(App, _super);\r\n function App() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * This method deploys an app on the app catalog. It must be called in the context\r\n * of the tenant app catalog web or it will fail.\r\n *\r\n * @param skipFeatureDeployment Deploy the app to the entire tenant\r\n */\r\n App.prototype.deploy = function (skipFeatureDeployment) {\r\n if (skipFeatureDeployment === void 0) { skipFeatureDeployment = false; }\r\n return this.clone(App, \"Deploy(\" + skipFeatureDeployment + \")\").postCore();\r\n };\r\n /**\r\n * This method retracts a deployed app on the app catalog. It must be called in the context\r\n * of the tenant app catalog web or it will fail.\r\n */\r\n App.prototype.retract = function () {\r\n return this.clone(App, \"Retract\").postCore();\r\n };\r\n /**\r\n * This method allows an app which is already deployed to be installed on a web\r\n */\r\n App.prototype.install = function () {\r\n return this.clone(App, \"Install\").postCore();\r\n };\r\n /**\r\n * This method allows an app which is already insatlled to be uninstalled on a web\r\n */\r\n App.prototype.uninstall = function () {\r\n return this.clone(App, \"Uninstall\").postCore();\r\n };\r\n /**\r\n * This method allows an app which is already insatlled to be upgraded on a web\r\n */\r\n App.prototype.upgrade = function () {\r\n return this.clone(App, \"Upgrade\").postCore();\r\n };\r\n /**\r\n * This method removes an app from the app catalog. It must be called in the context\r\n * of the tenant app catalog web or it will fail.\r\n */\r\n App.prototype.remove = function () {\r\n return this.clone(App, \"Remove\").postCore();\r\n };\r\n return App;\r\n}(SharePointQueryableInstance));\r\nexport { App };\r\n//# sourceMappingURL=appcatalog.js.map","import * as tslib_1 from \"tslib\";\r\nimport { Item } from \"./items\";\r\nimport { extend, getGUID, jsS, hOP, stringIsNullOrEmpty, objectDefinedNotNull, combine, isUrlAbsolute } from \"@pnp/common\";\r\nimport { SharePointQueryable } from \"./sharepointqueryable\";\r\nimport { metadata } from \"./utils/metadata\";\r\nimport { List } from \"./lists\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { Web } from \"./webs\";\r\nimport { extractWebUrl } from \"./utils/extractweburl\";\r\nimport { Site } from \"./site\";\r\n/**\r\n * Page promotion state\r\n */\r\nexport var PromotedState;\r\n(function (PromotedState) {\r\n /**\r\n * Regular client side page\r\n */\r\n PromotedState[PromotedState[\"NotPromoted\"] = 0] = \"NotPromoted\";\r\n /**\r\n * Page that will be promoted as news article after publishing\r\n */\r\n PromotedState[PromotedState[\"PromoteOnPublish\"] = 1] = \"PromoteOnPublish\";\r\n /**\r\n * Page that is promoted as news article\r\n */\r\n PromotedState[PromotedState[\"Promoted\"] = 2] = \"Promoted\";\r\n})(PromotedState || (PromotedState = {}));\r\n/**\r\n * Gets the next order value 1 based for the provided collection\r\n *\r\n * @param collection Collection of orderable things\r\n */\r\nfunction getNextOrder(collection) {\r\n if (collection.length < 1) {\r\n return 1;\r\n }\r\n return Math.max.apply(null, collection.map(function (i) { return i.order; })) + 1;\r\n}\r\n/**\r\n * Normalizes the order value for all the sections, columns, and controls to be 1 based and stepped (1, 2, 3...)\r\n *\r\n * @param collection The collection to normalize\r\n */\r\nfunction reindex(collection) {\r\n for (var i = 0; i < collection.length; i++) {\r\n collection[i].order = i + 1;\r\n if (hOP(collection[i], \"columns\")) {\r\n reindex(collection[i].columns);\r\n }\r\n else if (hOP(collection[i], \"controls\")) {\r\n reindex(collection[i].controls);\r\n }\r\n }\r\n}\r\n/**\r\n * Represents the data and methods associated with client side \"modern\" pages\r\n */\r\nvar ClientSidePage = /** @class */ (function (_super) {\r\n tslib_1.__extends(ClientSidePage, _super);\r\n /**\r\n * PLEASE DON'T USE THIS CONSTRUCTOR DIRECTLY\r\n *\r\n */\r\n function ClientSidePage(baseUrl, path, json, noInit, sections, commentsDisabled) {\r\n if (noInit === void 0) { noInit = false; }\r\n if (sections === void 0) { sections = []; }\r\n if (commentsDisabled === void 0) { commentsDisabled = false; }\r\n var _this = _super.call(this, baseUrl, path) || this;\r\n _this.json = json;\r\n _this.sections = sections;\r\n _this.commentsDisabled = commentsDisabled;\r\n _this._bannerImageDirty = false;\r\n // ensure we have a good url to build on for the pages api\r\n if (typeof baseUrl === \"string\") {\r\n _this._parentUrl = \"\";\r\n _this._url = combine(extractWebUrl(baseUrl), path);\r\n }\r\n else {\r\n _this.extend(ClientSidePage.initFrom(baseUrl, null), path);\r\n }\r\n // set a default page settings slice\r\n _this._pageSettings = { controlType: 0, pageSettingsSlice: { isDefaultDescription: true, isDefaultThumbnail: true } };\r\n // set a default layout part\r\n _this._layoutPart = ClientSidePage.getDefaultLayoutPart();\r\n if (typeof json !== \"undefined\" && !noInit) {\r\n _this.fromJSON(json);\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Creates a new blank page within the supplied library [does not work with batching]\r\n *\r\n * @param web Parent web in which we will create the page (we allow list here too matching the old api)\r\n * @param pageName Filename of the page, such as \"page\"\r\n * @param title The display title of the page\r\n * @param pageLayoutType Layout type of the page to use\r\n * @param promotedState Allows you to set the promoted state of a page when creating\r\n */\r\n ClientSidePage.create = function (web, pageName, title, pageLayoutType, promotedState) {\r\n if (pageLayoutType === void 0) { pageLayoutType = \"Article\"; }\r\n if (promotedState === void 0) { promotedState = 0; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var pageInitData, newPage;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // patched because previously we used the full page name with the .aspx at the end\r\n // this allows folk's existing code to work after the re-write to the new API\r\n pageName = pageName.replace(/\\.aspx$/i, \"\");\r\n return [4 /*yield*/, ClientSidePage.initFrom(web, \"_api/sitepages/pages\").postCore({\r\n body: jsS(Object.assign(metadata(\"SP.Publishing.SitePage\"), {\r\n PageLayoutType: pageLayoutType,\r\n PromotedState: promotedState,\r\n })),\r\n })];\r\n case 1:\r\n pageInitData = _a.sent();\r\n newPage = new ClientSidePage(web, \"\", pageInitData);\r\n // newPage.authors = [currentUserLogin.UserPrincipalName];\r\n newPage.title = pageName;\r\n return [4 /*yield*/, newPage.save(false)];\r\n case 2:\r\n _a.sent();\r\n newPage.title = title;\r\n return [2 /*return*/, newPage];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Creates a new ClientSidePage instance from the provided html content string\r\n *\r\n * @param html HTML markup representing the page\r\n */\r\n ClientSidePage.fromFile = function (file) {\r\n return file.getItem().then(function (i) {\r\n var page = new ClientSidePage(extractWebUrl(file.toUrl()), \"\", { Id: i.Id }, true);\r\n return page.configureFrom(file).load();\r\n });\r\n };\r\n ClientSidePage.getDefaultLayoutPart = function () {\r\n return {\r\n dataVersion: \"1.4\",\r\n description: \"Title Region Description\",\r\n id: \"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\r\n instanceId: \"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\r\n properties: {\r\n authors: [],\r\n layoutType: \"FullWidthImage\",\r\n showPublishDate: false,\r\n showTopicHeader: false,\r\n textAlignment: \"Left\",\r\n title: \"\",\r\n topicHeader: \"\",\r\n },\r\n serverProcessedContent: { htmlStrings: {}, searchablePlainTexts: {}, imageSources: {}, links: {} },\r\n title: \"Title area\",\r\n };\r\n };\r\n ClientSidePage.initFrom = function (o, url) {\r\n return (new ClientSidePage(extractWebUrl(o.toUrl()), url)).configureFrom(o);\r\n };\r\n Object.defineProperty(ClientSidePage.prototype, \"pageLayout\", {\r\n get: function () {\r\n return this.json.PageLayoutType;\r\n },\r\n set: function (value) {\r\n this.json.PageLayoutType = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"bannerImageUrl\", {\r\n get: function () {\r\n return this.json.BannerImageUrl;\r\n },\r\n set: function (value) {\r\n this.json.BannerImageUrl = value;\r\n this._bannerImageDirty = true;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"bannerImageSourceType\", {\r\n get: function () {\r\n return this._layoutPart.properties.imageSourceType;\r\n },\r\n set: function (value) {\r\n this._layoutPart.properties.imageSourceType = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"topicHeader\", {\r\n get: function () {\r\n return objectDefinedNotNull(this.json.TopicHeader) ? this.json.TopicHeader : \"\";\r\n },\r\n set: function (value) {\r\n this.json.TopicHeader = value;\r\n this._layoutPart.properties.topicHeader = value;\r\n if (stringIsNullOrEmpty(value)) {\r\n this.showTopicHeader = false;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"title\", {\r\n // public get authors(): string[] {\r\n // return this._layoutPart.properties.authorByline;\r\n // }\r\n // public set authors(value: string[]) {\r\n // this.json.AuthorByline = value;\r\n // this._layoutPart.properties.authorByline = value;\r\n // this._layoutPart.properties.authors = null;\r\n // }\r\n get: function () {\r\n return this._layoutPart.properties.title;\r\n },\r\n set: function (value) {\r\n this.json.Title = value;\r\n this._layoutPart.properties.title = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"layoutType\", {\r\n get: function () {\r\n return this._layoutPart.properties.layoutType;\r\n },\r\n set: function (value) {\r\n this._layoutPart.properties.layoutType = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"headerTextAlignment\", {\r\n get: function () {\r\n return this._layoutPart.properties.textAlignment;\r\n },\r\n set: function (value) {\r\n this._layoutPart.properties.textAlignment = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"showTopicHeader\", {\r\n get: function () {\r\n return this._layoutPart.properties.showTopicHeader;\r\n },\r\n set: function (value) {\r\n this._layoutPart.properties.showTopicHeader = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"showPublishDate\", {\r\n get: function () {\r\n return this._layoutPart.properties.showPublishDate;\r\n },\r\n set: function (value) {\r\n this._layoutPart.properties.showPublishDate = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"hasVerticalSection\", {\r\n get: function () {\r\n return this.sections.findIndex(function (s) { return s.layoutIndex === 2; }) > -1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSidePage.prototype, \"verticalSection\", {\r\n get: function () {\r\n if (this.hasVerticalSection) {\r\n return this.addVerticalSection();\r\n }\r\n return null;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Add a section to this page\r\n */\r\n ClientSidePage.prototype.addSection = function () {\r\n var section = new CanvasSection(this, getNextOrder(this.sections), 1);\r\n this.sections.push(section);\r\n return section;\r\n };\r\n /**\r\n * Add a section to this page\r\n */\r\n ClientSidePage.prototype.addVerticalSection = function () {\r\n // we can only have one vertical section so we find it if it exists\r\n var sectionIndex = this.sections.findIndex(function (s) { return s.layoutIndex === 2; });\r\n if (sectionIndex > -1) {\r\n return this.sections[sectionIndex];\r\n }\r\n var section = new CanvasSection(this, getNextOrder(this.sections), 2);\r\n this.sections.push(section);\r\n return section;\r\n };\r\n ClientSidePage.prototype.fromJSON = function (pageData) {\r\n this.json = pageData;\r\n var canvasControls = JSON.parse(pageData.CanvasContent1);\r\n var layouts = JSON.parse(pageData.LayoutWebpartsContent);\r\n if (layouts && layouts.length > 0) {\r\n this._layoutPart = layouts[0];\r\n }\r\n this.setControls(canvasControls);\r\n return this;\r\n };\r\n /**\r\n * Loads this page's content from the server\r\n */\r\n ClientSidePage.prototype.load = function () {\r\n var _this = this;\r\n // load item id, then load page data from new pages api\r\n return this.getItem(\"Id\", \"CommentsDisabled\").then(function (item) {\r\n return (new SharePointQueryable(_this, \"_api/sitepages/pages(\" + item.Id + \")\")).get().then(function (pageData) {\r\n _this.commentsDisabled = item.CommentsDisabled;\r\n return _this.fromJSON(pageData);\r\n });\r\n });\r\n };\r\n /**\r\n * Persists the content changes (sections, columns, and controls) [does not work with batching]\r\n *\r\n * @param publish If true the page is published, if false the changes are persisted to SharePoint but not published\r\n */\r\n ClientSidePage.prototype.save = function (publish) {\r\n var _this = this;\r\n if (publish === void 0) { publish = true; }\r\n if (this.json.Id === null) {\r\n throw Error(\"The id for this page is null. If you want to create a new page, please use ClientSidePage.Create\");\r\n }\r\n // we will chain our work on this promise\r\n var promise = Promise.resolve({});\r\n if (this._bannerImageDirty) {\r\n // we have to do these gymnastics to set the banner image url\r\n promise = promise.then(function (_) { return new Promise(function (resolve, reject) {\r\n var origImgUrl = _this.json.BannerImageUrl;\r\n if (isUrlAbsolute(origImgUrl)) {\r\n // do our best to make this a server relative url by removing the x.sharepoint.com part\r\n origImgUrl = origImgUrl.replace(/^https?:\\/\\/[a-z0-9\\.]*?\\.[a-z]{2,3}\\//i, \"/\");\r\n }\r\n var site = new Site(extractWebUrl(_this.toUrl()));\r\n var web = new Web(extractWebUrl(_this.toUrl()));\r\n var imgFile = web.getFileByServerRelativePath(origImgUrl);\r\n var siteId = \"\";\r\n var webId = \"\";\r\n var imgId = \"\";\r\n var listId = \"\";\r\n var webUrl = \"\";\r\n Promise.all([\r\n site.select(\"Id\", \"Url\").get().then(function (r) { return siteId = r.Id; }),\r\n web.select(\"Id\", \"Url\").get().then(function (r) { webId = r.Id; webUrl = r.Url; }),\r\n imgFile.listItemAllFields.select(\"UniqueId\", \"ParentList/Id\").expand(\"ParentList\").get().then(function (r) { imgId = r.UniqueId; listId = r.ParentList.Id; }),\r\n ]).then(function () {\r\n var f = new SharePointQueryable(webUrl, \"_layouts/15/getpreview.ashx\");\r\n f.query.set(\"guidSite\", \"\" + siteId);\r\n f.query.set(\"guidWeb\", \"\" + webId);\r\n f.query.set(\"guidFile\", \"\" + imgId);\r\n _this.bannerImageUrl = f.toUrlAndQuery();\r\n if (!objectDefinedNotNull(_this._layoutPart.serverProcessedContent)) {\r\n _this._layoutPart.serverProcessedContent = {};\r\n }\r\n _this._layoutPart.serverProcessedContent.imageSources = { imageSource: origImgUrl };\r\n if (!objectDefinedNotNull(_this._layoutPart.serverProcessedContent.customMetadata)) {\r\n _this._layoutPart.serverProcessedContent.customMetadata = {};\r\n }\r\n _this._layoutPart.serverProcessedContent.customMetadata.imageSource = {\r\n listId: listId,\r\n siteId: siteId,\r\n uniqueId: imgId,\r\n webId: webId,\r\n };\r\n _this._layoutPart.properties.webId = webId;\r\n _this._layoutPart.properties.siteId = siteId;\r\n _this._layoutPart.properties.listId = listId;\r\n _this._layoutPart.properties.uniqueId = imgId;\r\n resolve();\r\n }).catch(reject);\r\n }); });\r\n }\r\n // we need to update our authors if they have changed\r\n // if (this._layoutPart.properties.authors === null && this._layoutPart.properties.authorByline.length > 0) {\r\n // promise = promise.then(_ => new Promise(resolve => {\r\n // const collector: any[] = [];\r\n // const userResolver = ClientSidePage.getPoster(\"/_api/SP.UI.ApplicationPages.ClientPeoplePickerWebServiceInterface.ClientPeoplePickerResolveUser\");\r\n // this._layoutPart.properties.authorByline.forEach(async author => {\r\n // const userData = await userResolver.postCore({\r\n // body: jsS({\r\n // queryParams: {\r\n // AllowEmailAddresses: false,\r\n // MaximumEntitySuggestions: 1,\r\n // PrincipalSource: 15,\r\n // PrincipalType: 1,\r\n // QueryString: author,\r\n // SharePointGroupID: 0,\r\n // },\r\n // }),\r\n // });\r\n // collector.push({\r\n // email: userData.EntityData.Email,\r\n // id: userData.Key,\r\n // name: userData.DisplayName,\r\n // role: \"\",\r\n // upn: userData.EntityData.Email,\r\n // });\r\n // });\r\n // this._layoutPart.properties.authors = collector;\r\n // resolve();\r\n // }));\r\n // }\r\n // we try and check out the page for the user\r\n if (!this.json.IsPageCheckedOutToCurrentUser) {\r\n promise = promise.then(function (_) { return (ClientSidePage.initFrom(_this, \"_api/sitepages/pages(\" + _this.json.Id + \")/checkoutpage\")).postCore(); });\r\n }\r\n promise = promise.then(function (_) {\r\n var saveBody = Object.assign(metadata(\"SP.Publishing.SitePage\"), {\r\n AuthorByline: _this.json.AuthorByline || [],\r\n BannerImageUrl: _this.bannerImageUrl,\r\n CanvasContent1: _this.getCanvasContent1(),\r\n LayoutWebpartsContent: _this.getLayoutWebpartsContent(),\r\n Title: _this.title,\r\n TopicHeader: _this.topicHeader,\r\n });\r\n var updater = ClientSidePage.initFrom(_this, \"_api/sitepages/pages(\" + _this.json.Id + \")/savepage\");\r\n updater.configure({\r\n headers: {\r\n \"if-match\": \"*\",\r\n },\r\n });\r\n return updater.postCore({ body: jsS(saveBody) });\r\n });\r\n if (publish) {\r\n promise = promise.then(function (_) { return (ClientSidePage.initFrom(_this, \"_api/sitepages/pages(\" + _this.json.Id + \")/publish\")).postCore(); }).then(function (r) {\r\n if (r) {\r\n _this.json.IsPageCheckedOutToCurrentUser = false;\r\n }\r\n });\r\n }\r\n promise = promise.then(function (_) {\r\n // these are post-save actions\r\n _this._bannerImageDirty = false;\r\n });\r\n return promise;\r\n };\r\n ClientSidePage.prototype.discardPageCheckout = function () {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var d;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (this.json.Id === null) {\r\n throw Error(\"The id for this page is null. If you want to create a new page, please use ClientSidePage.Create\");\r\n }\r\n return [4 /*yield*/, ClientSidePage.initFrom(this, \"_api/sitepages/pages(\" + this.json.Id + \")/discardPage\").postCore({\r\n body: jsS(metadata(\"SP.Publishing.SitePage\")),\r\n })];\r\n case 1:\r\n d = _a.sent();\r\n this.fromJSON(d);\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n ClientSidePage.prototype.promoteToNews = function () {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n return [2 /*return*/, this.promoteNewsImpl(\"promoteToNews\")];\r\n });\r\n });\r\n };\r\n // API is currently broken on server side\r\n // public async demoteFromNews(): Promise {\r\n // return this.promoteNewsImpl(\"demoteFromNews\");\r\n // }\r\n /**\r\n * Enables comments on this page\r\n */\r\n ClientSidePage.prototype.enableComments = function () {\r\n var _this = this;\r\n return this.setCommentsOn(true).then(function (r) {\r\n _this.commentsDisabled = false;\r\n return r;\r\n });\r\n };\r\n /**\r\n * Disables comments on this page\r\n */\r\n ClientSidePage.prototype.disableComments = function () {\r\n var _this = this;\r\n return this.setCommentsOn(false).then(function (r) {\r\n _this.commentsDisabled = true;\r\n return r;\r\n });\r\n };\r\n /**\r\n * Finds a control by the specified instance id\r\n *\r\n * @param id Instance id of the control to find\r\n */\r\n ClientSidePage.prototype.findControlById = function (id) {\r\n return this.findControl(function (c) { return c.id === id; });\r\n };\r\n /**\r\n * Finds a control within this page's control tree using the supplied predicate\r\n *\r\n * @param predicate Takes a control and returns true or false, if true that control is returned by findControl\r\n */\r\n ClientSidePage.prototype.findControl = function (predicate) {\r\n // check all sections\r\n for (var i = 0; i < this.sections.length; i++) {\r\n // check all columns\r\n for (var j = 0; j < this.sections[i].columns.length; j++) {\r\n // check all controls\r\n for (var k = 0; k < this.sections[i].columns[j].controls.length; k++) {\r\n // check to see if the predicate likes this control\r\n if (predicate(this.sections[i].columns[j].controls[k])) {\r\n return this.sections[i].columns[j].controls[k];\r\n }\r\n }\r\n }\r\n }\r\n // we found nothing so give nothing back\r\n return null;\r\n };\r\n /**\r\n * Like the modern site page\r\n */\r\n ClientSidePage.prototype.like = function () {\r\n return this.getItem().then(function (i) {\r\n return i.like();\r\n });\r\n };\r\n /**\r\n * Unlike the modern site page\r\n */\r\n ClientSidePage.prototype.unlike = function () {\r\n return this.getItem().then(function (i) {\r\n return i.unlike();\r\n });\r\n };\r\n /**\r\n * Get the liked by information for a modern site page\r\n */\r\n ClientSidePage.prototype.getLikedByInformation = function () {\r\n return this.getItem().then(function (i) {\r\n return i.getLikedByInformation();\r\n });\r\n };\r\n /**\r\n * Creates a copy of this page\r\n *\r\n * @param web The web where we will create the copy\r\n * @param pageName The file name of the new page\r\n * @param title The title of the new page\r\n * @param publish If true the page will be published\r\n * @param promotedState Allows you to set the promoted state of a page when making a copy\r\n */\r\n ClientSidePage.prototype.copyPage = function (web, pageName, title, publish, promotedState) {\r\n if (publish === void 0) { publish = true; }\r\n if (promotedState === void 0) { promotedState = 0; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var page;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, ClientSidePage.create(web, pageName, title, this.pageLayout, promotedState)];\r\n case 1:\r\n page = _a.sent();\r\n page.setControls(this.getControls());\r\n return [4 /*yield*/, page.save(publish)];\r\n case 2:\r\n _a.sent();\r\n return [2 /*return*/, page];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Sets the modern page banner image\r\n *\r\n * @param url Url of the image to display\r\n * @param altText Alt text to describe the image\r\n * @param bannerProps Additional properties to control display of the banner\r\n */\r\n ClientSidePage.prototype.setBannerImage = function (url, props) {\r\n this.bannerImageUrl = url;\r\n this.bannerImageSourceType = 2; // this seems to always be true, so default?\r\n if (objectDefinedNotNull(props)) {\r\n if (hOP(props, \"translateX\")) {\r\n this._layoutPart.properties.translateX = props.translateX;\r\n }\r\n if (hOP(props, \"translateY\")) {\r\n this._layoutPart.properties.translateY = props.translateY;\r\n }\r\n if (hOP(props, \"imageSourceType\")) {\r\n this.bannerImageSourceType = props.imageSourceType;\r\n }\r\n if (hOP(props, \"altText\")) {\r\n this._layoutPart.properties.altText = props.altText;\r\n }\r\n }\r\n };\r\n ClientSidePage.prototype.getCanvasContent1 = function () {\r\n return JSON.stringify(this.getControls());\r\n };\r\n ClientSidePage.prototype.getLayoutWebpartsContent = function () {\r\n if (this._layoutPart) {\r\n return JSON.stringify([this._layoutPart]);\r\n }\r\n else {\r\n return JSON.stringify(null);\r\n }\r\n };\r\n ClientSidePage.prototype.setControls = function (controls) {\r\n if (controls && controls.length) {\r\n for (var i = 0; i < controls.length; i++) {\r\n // if no control type is present this is a column which we give type 0 to let us process it\r\n var controlType = hOP(controls[i], \"controlType\") ? controls[i].controlType : 0;\r\n switch (controlType) {\r\n case 0:\r\n // empty canvas column or page settings\r\n if (hOP(controls[i], \"pageSettingsSlice\")) {\r\n this._pageSettings = controls[i];\r\n }\r\n else {\r\n // we have an empty column\r\n this.mergeColumnToTree(new CanvasColumn(controls[i]));\r\n }\r\n break;\r\n case 3:\r\n var part = new ClientSideWebpart(controls[i]);\r\n this.mergePartToTree(part, part.data.position);\r\n break;\r\n case 4:\r\n var textData = controls[i];\r\n var text = new ClientSideText(textData.innerHTML, textData);\r\n this.mergePartToTree(text, text.data.position);\r\n break;\r\n }\r\n }\r\n reindex(this.sections);\r\n }\r\n };\r\n ClientSidePage.prototype.getControls = function () {\r\n var _this = this;\r\n // reindex things\r\n reindex(this.sections);\r\n // rollup the control changes\r\n var canvasData = [];\r\n this.sections.forEach(function (section) {\r\n section.columns.forEach(function (column) {\r\n if (column.controls.length < 1) {\r\n // empty column\r\n canvasData.push({\r\n displayMode: column.data.displayMode,\r\n emphasis: _this.getEmphasisObj(section.emphasis),\r\n position: column.data.position,\r\n });\r\n }\r\n else {\r\n column.controls.forEach(function (control) {\r\n control.data.emphasis = _this.getEmphasisObj(section.emphasis);\r\n canvasData.push(control.data);\r\n });\r\n }\r\n });\r\n });\r\n canvasData.push(this._pageSettings);\r\n return canvasData;\r\n };\r\n ClientSidePage.prototype.getEmphasisObj = function (value) {\r\n if (value < 1 || value > 3) {\r\n return {};\r\n }\r\n return { zoneEmphasis: value };\r\n };\r\n /**\r\n * Sets the comments flag for a page\r\n *\r\n * @param on If true comments are enabled, false they are disabled\r\n */\r\n ClientSidePage.prototype.setCommentsOn = function (on) {\r\n return this.getItem().then(function (i) {\r\n var updater = new Item(i, \"SetCommentsDisabled(\" + !on + \")\");\r\n return updater.update({});\r\n });\r\n };\r\n ClientSidePage.prototype.promoteNewsImpl = function (method) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var lastPubData, d;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (!stringIsNullOrEmpty(this.json.VersionInfo.LastVersionCreatedBy)) return [3 /*break*/, 2];\r\n lastPubData = new Date(this.json.VersionInfo.LastVersionCreated);\r\n if (!(lastPubData.getFullYear() < 2000)) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.save(true)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2:\r\n if (this.json.Id === null) {\r\n throw Error(\"The id for this page is null. If you want to create a new page, please use ClientSidePage.Create\");\r\n }\r\n return [4 /*yield*/, ClientSidePage.initFrom(this, \"_api/sitepages/pages(\" + this.json.Id + \")/\" + method).postCore({\r\n body: jsS(metadata(\"SP.Publishing.SitePage\")),\r\n })];\r\n case 3:\r\n d = _a.sent();\r\n return [2 /*return*/, d];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Merges the control into the tree of sections and columns for this page\r\n *\r\n * @param control The control to merge\r\n */\r\n ClientSidePage.prototype.mergePartToTree = function (control, positionData) {\r\n var column = null;\r\n var sectionFactor = 12;\r\n var sectionIndex = 0;\r\n var zoneIndex = 0;\r\n var layoutIndex = 1;\r\n // handle case where we don't have position data (shouldn't happen?)\r\n if (positionData) {\r\n if (hOP(positionData, \"zoneIndex\")) {\r\n zoneIndex = positionData.zoneIndex;\r\n }\r\n if (hOP(positionData, \"sectionIndex\")) {\r\n sectionIndex = positionData.sectionIndex;\r\n }\r\n if (hOP(positionData, \"sectionFactor\")) {\r\n sectionFactor = positionData.sectionFactor;\r\n }\r\n if (hOP(positionData, \"layoutIndex\")) {\r\n layoutIndex = positionData.layoutIndex;\r\n }\r\n }\r\n var zoneEmphasis = (control.data && control.data.emphasis && control.data.emphasis.zoneEmphasis) ? control.data.emphasis.zoneEmphasis : 0;\r\n var section = this.getOrCreateSection(zoneIndex, layoutIndex, zoneEmphasis);\r\n var columns = section.columns.filter(function (c) { return c.order === sectionIndex; });\r\n if (columns.length < 1) {\r\n column = section.addColumn(sectionFactor, layoutIndex);\r\n }\r\n else {\r\n column = columns[0];\r\n }\r\n control.column = column;\r\n column.addControl(control);\r\n };\r\n /**\r\n * Merges the supplied column into the tree\r\n *\r\n * @param column Column to merge\r\n * @param position The position data for the column\r\n */\r\n ClientSidePage.prototype.mergeColumnToTree = function (column) {\r\n var order = hOP(column.data, \"position\") && hOP(column.data.position, \"zoneIndex\") ? column.data.position.zoneIndex : 0;\r\n var layoutIndex = hOP(column.data, \"position\") && hOP(column.data.position, \"layoutIndex\") ? column.data.position.layoutIndex : 1;\r\n var section = this.getOrCreateSection(order, layoutIndex, column.data.emphasis.zoneEmphasis || 0);\r\n column.section = section;\r\n section.columns.push(column);\r\n };\r\n /**\r\n * Handle the logic to get or create a section based on the supplied order and layoutIndex\r\n *\r\n * @param order Section order\r\n * @param layoutIndex Layout Index (1 === normal, 2 === vertical section)\r\n * @param emphasis The section emphasis\r\n */\r\n ClientSidePage.prototype.getOrCreateSection = function (order, layoutIndex, emphasis) {\r\n var section = null;\r\n var sections = this.sections.filter(function (s) { return s.order === order && s.layoutIndex === layoutIndex; });\r\n if (sections.length < 1) {\r\n section = layoutIndex === 2 ? this.addVerticalSection() : this.addSection();\r\n section.order = order;\r\n section.emphasis = emphasis;\r\n }\r\n else {\r\n section = sections[0];\r\n }\r\n return section;\r\n };\r\n ClientSidePage.prototype.getItem = function () {\r\n var _this = this;\r\n var selects = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n selects[_i] = arguments[_i];\r\n }\r\n var initer = ClientSidePage.initFrom(this, \"/_api/lists/EnsureClientRenderedSitePagesLibrary\").select(\"EnableModeration\", \"EnableMinorVersions\", \"Id\");\r\n return initer.postCore().then(function (listData) {\r\n var item = (new List(listData[\"odata.id\"])).configureFrom(_this).items.getById(_this.json.Id);\r\n return item.select.apply(item, selects).get().then(function (d) {\r\n return extend((new Item(odataUrlFrom(d))).configureFrom(_this), d);\r\n });\r\n });\r\n };\r\n return ClientSidePage;\r\n}(SharePointQueryable));\r\nexport { ClientSidePage };\r\nvar CanvasSection = /** @class */ (function () {\r\n function CanvasSection(page, order, layoutIndex, columns, _emphasis) {\r\n if (columns === void 0) { columns = []; }\r\n if (_emphasis === void 0) { _emphasis = 0; }\r\n this.page = page;\r\n this.columns = columns;\r\n this._emphasis = _emphasis;\r\n this._memId = getGUID();\r\n this._order = order;\r\n this._layoutIndex = layoutIndex;\r\n }\r\n Object.defineProperty(CanvasSection.prototype, \"order\", {\r\n get: function () {\r\n return this._order;\r\n },\r\n set: function (value) {\r\n this._order = value;\r\n for (var i = 0; i < this.columns.length; i++) {\r\n this.columns[i].data.position.zoneIndex = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(CanvasSection.prototype, \"layoutIndex\", {\r\n get: function () {\r\n return this._layoutIndex;\r\n },\r\n set: function (value) {\r\n this._layoutIndex = value;\r\n for (var i = 0; i < this.columns.length; i++) {\r\n this.columns[i].data.position.layoutIndex = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(CanvasSection.prototype, \"defaultColumn\", {\r\n /**\r\n * Default column (this.columns[0]) for this section\r\n */\r\n get: function () {\r\n if (this.columns.length < 1) {\r\n this.addColumn(12);\r\n }\r\n return this.columns[0];\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Adds a new column to this section\r\n */\r\n CanvasSection.prototype.addColumn = function (factor, layoutIndex) {\r\n if (layoutIndex === void 0) { layoutIndex = 1; }\r\n var column = new CanvasColumn();\r\n column.section = this;\r\n column.data.position.zoneIndex = this.order;\r\n column.data.position.layoutIndex = layoutIndex;\r\n column.data.position.sectionFactor = factor;\r\n column.order = getNextOrder(this.columns);\r\n this.columns.push(column);\r\n return column;\r\n };\r\n /**\r\n * Adds a control to the default column for this section\r\n *\r\n * @param control Control to add to the default column\r\n */\r\n CanvasSection.prototype.addControl = function (control) {\r\n this.defaultColumn.addControl(control);\r\n return this;\r\n };\r\n Object.defineProperty(CanvasSection.prototype, \"emphasis\", {\r\n get: function () {\r\n return this._emphasis;\r\n },\r\n set: function (value) {\r\n this._emphasis = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Removes this section and all contained columns and controls from the collection\r\n */\r\n CanvasSection.prototype.remove = function () {\r\n var _this = this;\r\n this.page.sections = this.page.sections.filter(function (section) { return section._memId !== _this._memId; });\r\n reindex(this.page.sections);\r\n };\r\n return CanvasSection;\r\n}());\r\nexport { CanvasSection };\r\nvar CanvasColumn = /** @class */ (function () {\r\n function CanvasColumn(json, controls) {\r\n if (json === void 0) { json = JSON.parse(JSON.stringify(CanvasColumn.Default)); }\r\n if (controls === void 0) { controls = []; }\r\n this.json = json;\r\n this.controls = controls;\r\n this._section = null;\r\n this._memId = getGUID();\r\n }\r\n Object.defineProperty(CanvasColumn.prototype, \"data\", {\r\n get: function () {\r\n return this.json;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(CanvasColumn.prototype, \"section\", {\r\n get: function () {\r\n return this._section;\r\n },\r\n set: function (section) {\r\n this._section = section;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(CanvasColumn.prototype, \"order\", {\r\n get: function () {\r\n return this.data.position.sectionIndex;\r\n },\r\n set: function (value) {\r\n this.data.position.sectionIndex = value;\r\n for (var i = 0; i < this.controls.length; i++) {\r\n this.controls[i].data.position.zoneIndex = this.data.position.zoneIndex;\r\n this.controls[i].data.position.layoutIndex = this.data.position.layoutIndex;\r\n this.controls[i].data.position.sectionIndex = value;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(CanvasColumn.prototype, \"factor\", {\r\n get: function () {\r\n return this.data.position.sectionFactor;\r\n },\r\n set: function (value) {\r\n this.data.position.sectionFactor = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n CanvasColumn.prototype.addControl = function (control) {\r\n control.column = this;\r\n this.controls.push(control);\r\n return this;\r\n };\r\n CanvasColumn.prototype.getControl = function (index) {\r\n return this.controls[index];\r\n };\r\n CanvasColumn.prototype.remove = function () {\r\n var _this = this;\r\n this.section.columns = this.section.columns.filter(function (column) { return column._memId !== _this._memId; });\r\n reindex(this.section.columns);\r\n };\r\n CanvasColumn.Default = {\r\n controlType: 0,\r\n displayMode: 2,\r\n emphasis: {},\r\n position: {\r\n layoutIndex: 1,\r\n sectionFactor: 12,\r\n sectionIndex: 1,\r\n zoneIndex: 1,\r\n },\r\n };\r\n return CanvasColumn;\r\n}());\r\nexport { CanvasColumn };\r\nvar ColumnControl = /** @class */ (function () {\r\n function ColumnControl(json) {\r\n this.json = json;\r\n }\r\n Object.defineProperty(ColumnControl.prototype, \"id\", {\r\n get: function () {\r\n return this.json.id;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColumnControl.prototype, \"data\", {\r\n get: function () {\r\n return this.json;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ColumnControl.prototype, \"column\", {\r\n get: function () {\r\n return this._column;\r\n },\r\n set: function (value) {\r\n this._column = value;\r\n this.onColumnChange(this._column);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ColumnControl.prototype.remove = function () {\r\n var _this = this;\r\n this.column.controls = this.column.controls.filter(function (control) { return control.id !== _this.id; });\r\n reindex(this.column.controls);\r\n };\r\n ColumnControl.prototype.setData = function (data) {\r\n this.json = data;\r\n };\r\n return ColumnControl;\r\n}());\r\nexport { ColumnControl };\r\nvar ClientSideText = /** @class */ (function (_super) {\r\n tslib_1.__extends(ClientSideText, _super);\r\n function ClientSideText(text, json) {\r\n if (json === void 0) { json = JSON.parse(JSON.stringify(ClientSideText.Default)); }\r\n var _this = this;\r\n if (stringIsNullOrEmpty(json.id)) {\r\n json.id = getGUID();\r\n json.anchorComponentId = json.id;\r\n }\r\n _this = _super.call(this, json) || this;\r\n _this.text = text;\r\n return _this;\r\n }\r\n Object.defineProperty(ClientSideText.prototype, \"text\", {\r\n get: function () {\r\n return this.data.innerHTML;\r\n },\r\n set: function (value) {\r\n if (!value.startsWith(\"

\")) {\r\n value = \"

\" + value + \"

\";\r\n }\r\n this.data.innerHTML = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSideText.prototype, \"order\", {\r\n get: function () {\r\n return this.data.position.controlIndex;\r\n },\r\n set: function (value) {\r\n this.data.position.controlIndex = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ClientSideText.prototype.onColumnChange = function (col) {\r\n this.data.position.sectionFactor = col.factor;\r\n this.data.position.controlIndex = getNextOrder(col.controls);\r\n this.data.position.zoneIndex = col.data.position.zoneIndex;\r\n this.data.position.sectionIndex = col.order;\r\n this.data.position.layoutIndex = col.data.position.layoutIndex;\r\n };\r\n ClientSideText.Default = {\r\n addedFromPersistedData: false,\r\n anchorComponentId: \"\",\r\n controlType: 4,\r\n displayMode: 2,\r\n editorType: \"CKEditor\",\r\n emphasis: {},\r\n id: \"\",\r\n innerHTML: \"\",\r\n position: {\r\n controlIndex: 1,\r\n layoutIndex: 1,\r\n sectionFactor: 12,\r\n sectionIndex: 1,\r\n zoneIndex: 1,\r\n },\r\n };\r\n return ClientSideText;\r\n}(ColumnControl));\r\nexport { ClientSideText };\r\nvar ClientSideWebpart = /** @class */ (function (_super) {\r\n tslib_1.__extends(ClientSideWebpart, _super);\r\n function ClientSideWebpart(json) {\r\n if (json === void 0) { json = JSON.parse(JSON.stringify(ClientSideWebpart.Default)); }\r\n return _super.call(this, json) || this;\r\n }\r\n ClientSideWebpart.fromComponentDef = function (definition) {\r\n var part = new ClientSideWebpart();\r\n part.import(definition);\r\n return part;\r\n };\r\n Object.defineProperty(ClientSideWebpart.prototype, \"title\", {\r\n get: function () {\r\n return this.data.webPartData.title;\r\n },\r\n set: function (value) {\r\n this.data.webPartData.title = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSideWebpart.prototype, \"description\", {\r\n get: function () {\r\n return this.data.webPartData.description;\r\n },\r\n set: function (value) {\r\n this.data.webPartData.description = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSideWebpart.prototype, \"order\", {\r\n get: function () {\r\n return this.data.position.controlIndex;\r\n },\r\n set: function (value) {\r\n this.data.position.controlIndex = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSideWebpart.prototype, \"height\", {\r\n get: function () {\r\n return this.data.reservedHeight;\r\n },\r\n set: function (value) {\r\n this.data.reservedHeight = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSideWebpart.prototype, \"width\", {\r\n get: function () {\r\n return this.data.reservedWidth;\r\n },\r\n set: function (value) {\r\n this.data.reservedWidth = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ClientSideWebpart.prototype, \"dataVersion\", {\r\n get: function () {\r\n return this.data.webPartData.dataVersion;\r\n },\r\n set: function (value) {\r\n this.data.webPartData.dataVersion = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ClientSideWebpart.prototype.setProperties = function (properties) {\r\n this.data.webPartData.properties = extend(this.data.webPartData.properties, properties);\r\n return this;\r\n };\r\n ClientSideWebpart.prototype.getProperties = function () {\r\n return this.data.webPartData.properties;\r\n };\r\n ClientSideWebpart.prototype.onColumnChange = function (col) {\r\n this.data.position = {\r\n controlIndex: getNextOrder(col.controls),\r\n layoutIndex: col.data.position.layoutIndex,\r\n sectionFactor: col.factor,\r\n sectionIndex: col.data.position.sectionIndex,\r\n zoneIndex: col.data.position.zoneIndex,\r\n };\r\n };\r\n ClientSideWebpart.prototype.import = function (component) {\r\n var id = getGUID();\r\n var componendId = component.Id.replace(/^\\{|\\}$/g, \"\").toLowerCase();\r\n var manifest = JSON.parse(component.Manifest);\r\n var preconfiguredEntries = manifest.preconfiguredEntries[0];\r\n this.setData(Object.assign({}, this.data, {\r\n id: id,\r\n webPartData: {\r\n dataVersion: \"1.0\",\r\n description: preconfiguredEntries.description.default,\r\n id: componendId,\r\n instanceId: id,\r\n properties: preconfiguredEntries.properties,\r\n title: preconfiguredEntries.title.default,\r\n },\r\n webPartId: componendId,\r\n }));\r\n };\r\n ClientSideWebpart.Default = {\r\n addedFromPersistedData: false,\r\n controlType: 3,\r\n displayMode: 2,\r\n emphasis: {},\r\n id: null,\r\n position: {\r\n controlIndex: 1,\r\n layoutIndex: 1,\r\n sectionFactor: 12,\r\n sectionIndex: 1,\r\n zoneIndex: 1,\r\n },\r\n reservedHeight: 500,\r\n reservedWidth: 500,\r\n webPartData: null,\r\n webPartId: null,\r\n };\r\n return ClientSideWebpart;\r\n}(ColumnControl));\r\nexport { ClientSideWebpart };\r\n//# sourceMappingURL=clientsidepages.js.map","import * as tslib_1 from \"tslib\";\r\nimport { ODataBatch } from \"@pnp/odata\";\r\nimport { getGUID, isUrlAbsolute, combine, mergeHeaders, hOP } from \"@pnp/common\";\r\nimport { Logger } from \"@pnp/logging\";\r\nimport { SPHttpClient } from \"./net/sphttpclient\";\r\nimport { SPRuntimeConfig } from \"./config/splibconfig\";\r\nimport { toAbsoluteUrl } from \"./utils/toabsoluteurl\";\r\n/**\r\n * Manages a batch of OData operations\r\n */\r\nvar SPBatch = /** @class */ (function (_super) {\r\n tslib_1.__extends(SPBatch, _super);\r\n function SPBatch(baseUrl) {\r\n var _this = _super.call(this) || this;\r\n _this.baseUrl = baseUrl;\r\n return _this;\r\n }\r\n /**\r\n * Parses the response from a batch request into an array of Response instances\r\n *\r\n * @param body Text body of the response from the batch request\r\n */\r\n SPBatch.ParseResponse = function (body) {\r\n return new Promise(function (resolve, reject) {\r\n var responses = [];\r\n var header = \"--batchresponse_\";\r\n // Ex. \"HTTP/1.1 500 Internal Server Error\"\r\n var statusRegExp = new RegExp(\"^HTTP/[0-9.]+ +([0-9]+) +(.*)\", \"i\");\r\n var lines = body.split(\"\\n\");\r\n var state = \"batch\";\r\n var status;\r\n var statusText;\r\n for (var i = 0; i < lines.length; ++i) {\r\n var line = lines[i];\r\n switch (state) {\r\n case \"batch\":\r\n if (line.substr(0, header.length) === header) {\r\n state = \"batchHeaders\";\r\n }\r\n else {\r\n if (line.trim() !== \"\") {\r\n throw Error(\"Invalid response, line \" + i);\r\n }\r\n }\r\n break;\r\n case \"batchHeaders\":\r\n if (line.trim() === \"\") {\r\n state = \"status\";\r\n }\r\n break;\r\n case \"status\":\r\n var parts = statusRegExp.exec(line);\r\n if (parts.length !== 3) {\r\n throw Error(\"Invalid status, line \" + i);\r\n }\r\n status = parseInt(parts[1], 10);\r\n statusText = parts[2];\r\n state = \"statusHeaders\";\r\n break;\r\n case \"statusHeaders\":\r\n if (line.trim() === \"\") {\r\n state = \"body\";\r\n }\r\n break;\r\n case \"body\":\r\n responses.push((status === 204) ? new Response() : new Response(line, { status: status, statusText: statusText }));\r\n state = \"batch\";\r\n break;\r\n }\r\n }\r\n if (state !== \"status\") {\r\n reject(Error(\"Unexpected end of input\"));\r\n }\r\n resolve(responses);\r\n });\r\n };\r\n SPBatch.prototype.executeImpl = function () {\r\n var _this = this;\r\n Logger.write(\"[\" + this.batchId + \"] (\" + (new Date()).getTime() + \") Executing batch with \" + this.requests.length + \" requests.\", 1 /* Info */);\r\n // if we don't have any requests, don't bother sending anything\r\n // this could be due to caching further upstream, or just an empty batch\r\n if (this.requests.length < 1) {\r\n Logger.write(\"Resolving empty batch.\", 1 /* Info */);\r\n return Promise.resolve();\r\n }\r\n // creating the client here allows the url to be populated for nodejs client as well as potentially\r\n // any other hacks needed for other types of clients. Essentially allows the absoluteRequestUrl\r\n // below to be correct\r\n var client = new SPHttpClient();\r\n // due to timing we need to get the absolute url here so we can use it for all the individual requests\r\n // and for sending the entire batch\r\n return toAbsoluteUrl(this.baseUrl).then(function (absoluteRequestUrl) {\r\n // build all the requests, send them, pipe results in order to parsers\r\n var batchBody = [];\r\n var currentChangeSetId = \"\";\r\n for (var i = 0; i < _this.requests.length; i++) {\r\n var reqInfo = _this.requests[i];\r\n if (reqInfo.method === \"GET\") {\r\n if (currentChangeSetId.length > 0) {\r\n // end an existing change set\r\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\r\n currentChangeSetId = \"\";\r\n }\r\n batchBody.push(\"--batch_\" + _this.batchId + \"\\n\");\r\n }\r\n else {\r\n if (currentChangeSetId.length < 1) {\r\n // start new change set\r\n currentChangeSetId = getGUID();\r\n batchBody.push(\"--batch_\" + _this.batchId + \"\\n\");\r\n batchBody.push(\"Content-Type: multipart/mixed; boundary=\\\"changeset_\" + currentChangeSetId + \"\\\"\\n\\n\");\r\n }\r\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"\\n\");\r\n }\r\n // common batch part prefix\r\n batchBody.push(\"Content-Type: application/http\\n\");\r\n batchBody.push(\"Content-Transfer-Encoding: binary\\n\\n\");\r\n var headers = new Headers();\r\n // this is the url of the individual request within the batch\r\n var url = isUrlAbsolute(reqInfo.url) ? reqInfo.url : combine(absoluteRequestUrl, reqInfo.url);\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Adding request \" + reqInfo.method + \" \" + url + \" to batch.\", 0 /* Verbose */);\r\n if (reqInfo.method !== \"GET\") {\r\n var method = reqInfo.method;\r\n var castHeaders = reqInfo.options.headers;\r\n if (hOP(reqInfo, \"options\") && hOP(reqInfo.options, \"headers\") && castHeaders[\"X-HTTP-Method\"] !== undefined) {\r\n method = castHeaders[\"X-HTTP-Method\"];\r\n delete castHeaders[\"X-HTTP-Method\"];\r\n }\r\n batchBody.push(method + \" \" + url + \" HTTP/1.1\\n\");\r\n headers.set(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\r\n }\r\n else {\r\n batchBody.push(reqInfo.method + \" \" + url + \" HTTP/1.1\\n\");\r\n }\r\n // merge global config headers\r\n mergeHeaders(headers, SPRuntimeConfig.headers);\r\n // merge per-request headers\r\n if (reqInfo.options) {\r\n mergeHeaders(headers, reqInfo.options.headers);\r\n }\r\n // lastly we apply any default headers we need that may not exist\r\n if (!headers.has(\"Accept\")) {\r\n headers.append(\"Accept\", \"application/json\");\r\n }\r\n if (!headers.has(\"Content-Type\")) {\r\n headers.append(\"Content-Type\", \"application/json;odata=verbose;charset=utf-8\");\r\n }\r\n if (!headers.has(\"X-ClientService-ClientTag\")) {\r\n headers.append(\"X-ClientService-ClientTag\", \"PnPCoreJS:@pnp-1.3.11\");\r\n }\r\n // write headers into batch body\r\n headers.forEach(function (value, name) {\r\n batchBody.push(name + \": \" + value + \"\\n\");\r\n });\r\n batchBody.push(\"\\n\");\r\n if (reqInfo.options.body) {\r\n batchBody.push(reqInfo.options.body + \"\\n\\n\");\r\n }\r\n }\r\n if (currentChangeSetId.length > 0) {\r\n // Close the changeset\r\n batchBody.push(\"--changeset_\" + currentChangeSetId + \"--\\n\\n\");\r\n currentChangeSetId = \"\";\r\n }\r\n batchBody.push(\"--batch_\" + _this.batchId + \"--\\n\");\r\n var batchOptions = {\r\n \"body\": batchBody.join(\"\"),\r\n \"headers\": {\r\n \"Content-Type\": \"multipart/mixed; boundary=batch_\" + _this.batchId,\r\n },\r\n \"method\": \"POST\",\r\n };\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Sending batch request.\", 1 /* Info */);\r\n return client.fetch(combine(absoluteRequestUrl, \"/_api/$batch\"), batchOptions)\r\n .then(function (r) { return r.text(); })\r\n .then(SPBatch.ParseResponse)\r\n .then(function (responses) {\r\n if (responses.length !== _this.requests.length) {\r\n throw Error(\"Could not properly parse responses to match requests in batch.\");\r\n }\r\n Logger.write(\"[\" + _this.batchId + \"] (\" + (new Date()).getTime() + \") Resolving batched requests.\", 1 /* Info */);\r\n return responses.reduce(function (chain, response, index) {\r\n var request = _this.requests[index];\r\n Logger.write(\"[\" + request.id + \"] (\" + (new Date()).getTime() + \") Resolving request in batch \" + _this.batchId + \".\", 1 /* Info */);\r\n return chain.then(function (_) { return request.parser.parse(response).then(request.resolve).catch(request.reject); });\r\n }, Promise.resolve());\r\n });\r\n });\r\n };\r\n return SPBatch;\r\n}(ODataBatch));\r\nexport { SPBatch };\r\n//# sourceMappingURL=batch.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\n/**\r\n * Describes a collection of List objects\r\n *\r\n */\r\nvar Features = /** @class */ (function (_super) {\r\n tslib_1.__extends(Features, _super);\r\n function Features() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Features_1 = Features;\r\n /**\r\n * Adds a new list to the collection\r\n *\r\n * @param id The Id of the feature (GUID)\r\n * @param force If true the feature activation will be forced\r\n */\r\n Features.prototype.add = function (id, force) {\r\n var _this = this;\r\n if (force === void 0) { force = false; }\r\n return this.clone(Features_1, \"add\").postCore({\r\n body: jsS({\r\n featdefScope: 0,\r\n featureId: id,\r\n force: force,\r\n }),\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n feature: _this.getById(id),\r\n };\r\n });\r\n };\r\n /**\r\n * Gets a list from the collection by guid id\r\n *\r\n * @param id The Id of the feature (GUID)\r\n */\r\n Features.prototype.getById = function (id) {\r\n var feature = new Feature(this);\r\n feature.concat(\"('\" + id + \"')\");\r\n return feature;\r\n };\r\n /**\r\n * Removes (deactivates) a feature from the collection\r\n *\r\n * @param id The Id of the feature (GUID)\r\n * @param force If true the feature deactivation will be forced\r\n */\r\n Features.prototype.remove = function (id, force) {\r\n if (force === void 0) { force = false; }\r\n return this.clone(Features_1, \"remove\").postCore({\r\n body: jsS({\r\n featureId: id,\r\n force: force,\r\n }),\r\n });\r\n };\r\n var Features_1;\r\n Features = Features_1 = tslib_1.__decorate([\r\n defaultPath(\"features\")\r\n ], Features);\r\n return Features;\r\n}(SharePointQueryableCollection));\r\nexport { Features };\r\nvar Feature = /** @class */ (function (_super) {\r\n tslib_1.__extends(Feature, _super);\r\n function Feature() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Removes (deactivates) a feature from the collection\r\n *\r\n * @param force If true the feature deactivation will be forced\r\n */\r\n Feature.prototype.deactivate = function (force) {\r\n var _this = this;\r\n if (force === void 0) { force = false; }\r\n var removeDependency = this.addBatchDependency();\r\n var idGet = new Feature(this).select(\"DefinitionId\");\r\n return idGet.get().then(function (feature) {\r\n var promise = _this.getParent(Features, _this.parentUrl, \"\", _this.batch).remove(feature.DefinitionId, force);\r\n removeDependency();\r\n return promise;\r\n });\r\n };\r\n return Feature;\r\n}(SharePointQueryableInstance));\r\nexport { Feature };\r\n//# sourceMappingURL=features.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { Web } from \"./webs\";\r\nimport { UserCustomActions } from \"./usercustomactions\";\r\nimport { SPBatch } from \"./batch\";\r\nimport { Features } from \"./features\";\r\nimport { hOP, jsS, extend } from \"@pnp/common\";\r\nimport { SPHttpClient } from \"./net/sphttpclient\";\r\n/**\r\n * Describes a site collection\r\n *\r\n */\r\nvar Site = /** @class */ (function (_super) {\r\n tslib_1.__extends(Site, _super);\r\n function Site() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Site_1 = Site;\r\n Object.defineProperty(Site.prototype, \"rootWeb\", {\r\n /**\r\n * Gets the root web of the site collection\r\n *\r\n */\r\n get: function () {\r\n return new Web(this, \"rootweb\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Site.prototype, \"features\", {\r\n /**\r\n * Gets the active features for this site collection\r\n *\r\n */\r\n get: function () {\r\n return new Features(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Site.prototype, \"userCustomActions\", {\r\n /**\r\n * Gets all custom actions for this site collection\r\n *\r\n */\r\n get: function () {\r\n return new UserCustomActions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a Web instance representing the root web of the site collection\r\n * correctly setup for chaining within the library\r\n */\r\n Site.prototype.getRootWeb = function () {\r\n return this.rootWeb.select(\"Url\").get().then(function (web) { return new Web(web.Url); });\r\n };\r\n /**\r\n * Gets the context information for this site collection\r\n */\r\n Site.prototype.getContextInfo = function () {\r\n var q = new Site_1(this.parentUrl, \"_api/contextinfo\");\r\n return q.postCore().then(function (data) {\r\n if (hOP(data, \"GetContextWebInformation\")) {\r\n var info = data.GetContextWebInformation;\r\n info.SupportedSchemaVersions = info.SupportedSchemaVersions.results;\r\n return info;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Gets the document libraries on a site. Static method. (SharePoint Online only)\r\n *\r\n * @param absoluteWebUrl The absolute url of the web whose document libraries should be returned\r\n */\r\n Site.prototype.getDocumentLibraries = function (absoluteWebUrl) {\r\n var q = new SharePointQueryable(\"\", \"_api/sp.web.getdocumentlibraries(@v)\");\r\n q.query.set(\"@v\", \"'\" + absoluteWebUrl + \"'\");\r\n return q.get().then(function (data) {\r\n if (hOP(data, \"GetDocumentLibraries\")) {\r\n return data.GetDocumentLibraries;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Gets the site url from a page url\r\n *\r\n * @param absolutePageUrl The absolute url of the page\r\n */\r\n Site.prototype.getWebUrlFromPageUrl = function (absolutePageUrl) {\r\n var q = new SharePointQueryable(\"\", \"_api/sp.web.getweburlfrompageurl(@v)\");\r\n q.query.set(\"@v\", \"'\" + absolutePageUrl + \"'\");\r\n return q.get().then(function (data) {\r\n if (hOP(data, \"GetWebUrlFromPageUrl\")) {\r\n return data.GetWebUrlFromPageUrl;\r\n }\r\n else {\r\n return data;\r\n }\r\n });\r\n };\r\n /**\r\n * Returns the collection of changes from the change log that have occurred within the site, based on the specified query\r\n *\r\n * @param query The change query\r\n */\r\n Site.prototype.getChanges = function (query) {\r\n var postBody = jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\r\n return this.clone(Site_1, \"getchanges\").postCore({ body: postBody });\r\n };\r\n /**\r\n * Deletes the current site\r\n *\r\n */\r\n Site.prototype.delete = function () {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var site, q;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(Site_1, \"\").select(\"Id\").get()];\r\n case 1:\r\n site = _a.sent();\r\n q = new Site_1(this.parentUrl, \"_api/SPSiteManager/Delete\");\r\n return [4 /*yield*/, q.postCore({\r\n body: jsS({\r\n siteId: site.Id,\r\n }),\r\n })];\r\n case 2:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Creates a new batch for requests within the context of this site collection\r\n *\r\n */\r\n Site.prototype.createBatch = function () {\r\n return new SPBatch(this.parentUrl);\r\n };\r\n /**\r\n * Opens a web by id (using POST)\r\n *\r\n * @param webId The GUID id of the web to open\r\n */\r\n Site.prototype.openWebById = function (webId) {\r\n return this.clone(Site_1, \"openWebById('\" + webId + \"')\").postCore().then(function (d) { return ({\r\n data: d,\r\n web: Web.fromUrl(d[\"odata.id\"] || d.__metadata.uri),\r\n }); });\r\n };\r\n /**\r\n * Associates a site collection to a hub site.\r\n *\r\n * @param siteId Id of the hub site collection you want to join.\r\n * If you want to disassociate the site collection from hub site, then\r\n * pass the siteId as 00000000-0000-0000-0000-000000000000\r\n */\r\n Site.prototype.joinHubSite = function (siteId) {\r\n return this.clone(Site_1, \"joinHubSite('\" + siteId + \"')\").postCore();\r\n };\r\n /**\r\n * Registers the current site collection as hub site collection\r\n */\r\n Site.prototype.registerHubSite = function () {\r\n return this.clone(Site_1, \"registerHubSite\").postCore();\r\n };\r\n /**\r\n * Unregisters the current site collection as hub site collection.\r\n */\r\n Site.prototype.unRegisterHubSite = function () {\r\n return this.clone(Site_1, \"unRegisterHubSite\").postCore();\r\n };\r\n /**\r\n * Creates a Modern communication site.\r\n *\r\n * @param title The title of the site to create\r\n * @param lcid The language to use for the site. If not specified will default to 1033 (English).\r\n * @param shareByEmailEnabled If set to true, it will enable sharing files via Email. By default it is set to false\r\n * @param url The fully qualified URL (e.g. https://yourtenant.sharepoint.com/sites/mysitecollection) of the site.\r\n * @param description The description of the communication site.\r\n * @param classification The Site classification to use. For instance 'Contoso Classified'. See https://www.youtube.com/watch?v=E-8Z2ggHcS0 for more information\r\n * @param siteDesignId The Guid of the site design to be used.\r\n * You can use the below default OOTB GUIDs:\r\n * Topic: 00000000-0000-0000-0000-000000000000\r\n * Showcase: 6142d2a0-63a5-4ba0-aede-d9fefca2c767\r\n * Blank: f6cc5403-0d63-442e-96c0-285923709ffc\r\n * @param hubSiteId The Guid of the already existing Hub site\r\n * @param owner Required when creating the site using app-only context\r\n */\r\n Site.prototype.createCommunicationSite = function (title, lcid, shareByEmailEnabled, url, description, classification, siteDesignId, hubSiteId, owner) {\r\n var _this = this;\r\n if (lcid === void 0) { lcid = 1033; }\r\n if (shareByEmailEnabled === void 0) { shareByEmailEnabled = false; }\r\n if (description === void 0) { description = \"\"; }\r\n if (classification === void 0) { classification = \"\"; }\r\n if (siteDesignId === void 0) { siteDesignId = \"00000000-0000-0000-0000-000000000000\"; }\r\n if (hubSiteId === void 0) { hubSiteId = \"00000000-0000-0000-0000-000000000000\"; }\r\n var props = {\r\n Classification: classification,\r\n Description: description,\r\n HubSiteId: hubSiteId,\r\n Lcid: lcid,\r\n Owner: owner,\r\n ShareByEmailEnabled: shareByEmailEnabled,\r\n SiteDesignId: siteDesignId,\r\n Title: title,\r\n Url: url,\r\n WebTemplate: \"SITEPAGEPUBLISHING#0\",\r\n WebTemplateExtensionId: \"00000000-0000-0000-0000-000000000000\",\r\n };\r\n var postBody = jsS({\r\n \"request\": extend({\r\n \"__metadata\": { \"type\": \"Microsoft.SharePoint.Portal.SPSiteCreationRequest\" },\r\n }, props),\r\n });\r\n return this.getRootWeb().then(function (d) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\r\n var client, methodUrl;\r\n return tslib_1.__generator(this, function (_a) {\r\n client = new SPHttpClient();\r\n methodUrl = d.parentUrl + \"/_api/SPSiteManager/Create\";\r\n return [2 /*return*/, client.post(methodUrl, {\r\n body: postBody,\r\n headers: {\r\n \"Accept\": \"application/json;odata=verbose\",\r\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\r\n },\r\n }).then(function (r) { return r.json(); }).then(function (n) {\r\n if (hOP(n, \"error\")) {\r\n throw n;\r\n }\r\n if (hOP(n, \"d\") && hOP(n.d, \"Create\")) {\r\n return n.d.Create;\r\n }\r\n return n;\r\n })];\r\n });\r\n }); });\r\n };\r\n /**\r\n * Creates a Modern team site backed by Office 365 group. For use in SP Online only. This will not work with App-only tokens\r\n *\r\n * @param displayName The title or display name of the Modern team site to be created\r\n * @param alias Alias of the underlying Office 365 Group\r\n * @param isPublic Defines whether the Office 365 Group will be public (default), or private.\r\n * @param lcid The language to use for the site. If not specified will default to English (1033).\r\n * @param description The description of the site to be created.\r\n * @param classification The Site classification to use. For instance 'Contoso Classified'. See https://www.youtube.com/watch?v=E-8Z2ggHcS0 for more information\r\n * @param owners The Owners of the site to be created\r\n * @param siteDesignId The ID of the site design to apply to the new site\r\n */\r\n Site.prototype.createModernTeamSite = function (displayName, alias, isPublic, lcid, description, classification, owners, hubSiteId, siteDesignId) {\r\n var _this = this;\r\n if (isPublic === void 0) { isPublic = true; }\r\n if (lcid === void 0) { lcid = 1033; }\r\n if (description === void 0) { description = \"\"; }\r\n if (classification === void 0) { classification = \"\"; }\r\n if (hubSiteId === void 0) { hubSiteId = \"00000000-0000-0000-0000-000000000000\"; }\r\n var postBody = {\r\n alias: alias,\r\n displayName: displayName,\r\n isPublic: isPublic,\r\n optionalParams: {\r\n Classification: classification,\r\n CreationOptions: {\r\n \"results\": [\"SPSiteLanguage:\" + lcid, \"HubSiteId:\" + hubSiteId],\r\n },\r\n Description: description,\r\n Owners: {\r\n \"results\": owners ? owners : [],\r\n },\r\n },\r\n };\r\n if (siteDesignId) {\r\n postBody.optionalParams.CreationOptions.results.push(\"implicit_formula_292aa8a00786498a87a5ca52d9f4214a_\" + siteDesignId);\r\n }\r\n return this.getRootWeb().then(function (d) { return tslib_1.__awaiter(_this, void 0, void 0, function () {\r\n var client, methodUrl;\r\n return tslib_1.__generator(this, function (_a) {\r\n client = new SPHttpClient();\r\n methodUrl = d.parentUrl + \"/_api/GroupSiteManager/CreateGroupEx\";\r\n return [2 /*return*/, client.post(methodUrl, {\r\n body: jsS(postBody),\r\n headers: {\r\n \"Accept\": \"application/json;odata=verbose\",\r\n \"Content-Type\": \"application/json;odata=verbose;charset=utf-8\",\r\n },\r\n }).then(function (r) { return r.json(); })];\r\n });\r\n }); });\r\n };\r\n var Site_1;\r\n Site = Site_1 = tslib_1.__decorate([\r\n defaultPath(\"_api/site\")\r\n ], Site);\r\n return Site;\r\n}(SharePointQueryableInstance));\r\nexport { Site };\r\n//# sourceMappingURL=site.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { jsS, extend } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Represents a collection of navigation nodes\r\n *\r\n */\r\nvar NavigationNodes = /** @class */ (function (_super) {\r\n tslib_1.__extends(NavigationNodes, _super);\r\n function NavigationNodes() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a navigation node by id\r\n *\r\n * @param id The id of the node\r\n */\r\n NavigationNodes.prototype.getById = function (id) {\r\n var node = new NavigationNode(this);\r\n node.concat(\"(\" + id + \")\");\r\n return node;\r\n };\r\n /**\r\n * Adds a new node to the collection\r\n *\r\n * @param title Display name of the node\r\n * @param url The url of the node\r\n * @param visible If true the node is visible, otherwise it is hidden (default: true)\r\n */\r\n NavigationNodes.prototype.add = function (title, url, visible) {\r\n var _this = this;\r\n if (visible === void 0) { visible = true; }\r\n var postBody = jsS(extend(metadata(\"SP.NavigationNode\"), {\r\n IsVisible: visible,\r\n Title: title,\r\n Url: url,\r\n }));\r\n return this.clone(NavigationNodes, null).postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n node: _this.getById(data.Id),\r\n };\r\n });\r\n };\r\n /**\r\n * Moves a node to be after another node in the navigation\r\n *\r\n * @param nodeId Id of the node to move\r\n * @param previousNodeId Id of the node after which we move the node specified by nodeId\r\n */\r\n NavigationNodes.prototype.moveAfter = function (nodeId, previousNodeId) {\r\n var postBody = jsS({\r\n nodeId: nodeId,\r\n previousNodeId: previousNodeId,\r\n });\r\n return this.clone(NavigationNodes, \"MoveAfter\").postCore({ body: postBody });\r\n };\r\n return NavigationNodes;\r\n}(SharePointQueryableCollection));\r\nexport { NavigationNodes };\r\n/**\r\n * Represents an instance of a navigation node\r\n *\r\n */\r\nvar NavigationNode = /** @class */ (function (_super) {\r\n tslib_1.__extends(NavigationNode, _super);\r\n function NavigationNode() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(NavigationNode.prototype, \"children\", {\r\n /**\r\n * Represents the child nodes of this node\r\n */\r\n get: function () {\r\n return new NavigationNodes(this, \"Children\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Deletes this node and any child nodes\r\n */\r\n NavigationNode.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n /**\r\n * Updates this node\r\n *\r\n * @param properties Properties used to update this node\r\n */\r\n NavigationNode.prototype.update = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend({\r\n \"__metadata\": { \"type\": \"SP.NavigationNode\" },\r\n }, properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n node: _this,\r\n };\r\n });\r\n };\r\n return NavigationNode;\r\n}(SharePointQueryableInstance));\r\nexport { NavigationNode };\r\n/**\r\n * Exposes the navigation components\r\n *\r\n */\r\nvar Navigation = /** @class */ (function (_super) {\r\n tslib_1.__extends(Navigation, _super);\r\n function Navigation() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(Navigation.prototype, \"quicklaunch\", {\r\n /**\r\n * Gets the quicklaunch navigation nodes for the current context\r\n *\r\n */\r\n get: function () {\r\n return new NavigationNodes(this, \"quicklaunch\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Navigation.prototype, \"topNavigationBar\", {\r\n /**\r\n * Gets the top bar navigation nodes for the current context\r\n *\r\n */\r\n get: function () {\r\n return new NavigationNodes(this, \"topnavigationbar\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Navigation = tslib_1.__decorate([\r\n defaultPath(\"navigation\")\r\n ], Navigation);\r\n return Navigation;\r\n}(SharePointQueryable));\r\nexport { Navigation };\r\n/**\r\n * Represents the top level navigation service\r\n */\r\nvar NavigationService = /** @class */ (function (_super) {\r\n tslib_1.__extends(NavigationService, _super);\r\n function NavigationService(baseUrl, path) {\r\n if (path === void 0) { path = null; }\r\n return _super.call(this, baseUrl, path) || this;\r\n }\r\n /**\r\n * The MenuState service operation returns a Menu-State (dump) of a SiteMapProvider on a site.\r\n *\r\n * @param menuNodeKey MenuNode.Key of the start node within the SiteMapProvider If no key is provided the SiteMapProvider.RootNode will be the root of the menu state.\r\n * @param depth Depth of the dump. If no value is provided a dump with the depth of 10 is returned\r\n * @param mapProviderName The name identifying the SiteMapProvider to be used\r\n * @param customProperties comma seperated list of custom properties to be returned.\r\n */\r\n NavigationService.prototype.getMenuState = function (menuNodeKey, depth, mapProviderName, customProperties) {\r\n if (menuNodeKey === void 0) { menuNodeKey = null; }\r\n if (depth === void 0) { depth = 10; }\r\n if (mapProviderName === void 0) { mapProviderName = null; }\r\n if (customProperties === void 0) { customProperties = null; }\r\n return (new NavigationService(this, \"_api/navigation/MenuState\")).postCore({\r\n body: jsS({\r\n customProperties: customProperties,\r\n depth: depth,\r\n mapProviderName: mapProviderName,\r\n menuNodeKey: menuNodeKey,\r\n }),\r\n });\r\n };\r\n /**\r\n * Tries to get a SiteMapNode.Key for a given URL within a site collection.\r\n *\r\n * @param currentUrl A url representing the SiteMapNode\r\n * @param mapProviderName The name identifying the SiteMapProvider to be used\r\n */\r\n NavigationService.prototype.getMenuNodeKey = function (currentUrl, mapProviderName) {\r\n if (mapProviderName === void 0) { mapProviderName = null; }\r\n return (new NavigationService(this, \"_api/navigation/MenuNodeKey\")).postCore({\r\n body: jsS({\r\n currentUrl: currentUrl,\r\n mapProviderName: mapProviderName,\r\n }),\r\n });\r\n };\r\n return NavigationService;\r\n}(SharePointQueryable));\r\nexport { NavigationService };\r\n//# sourceMappingURL=navigation.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, defaultPath } from \"./sharepointqueryable\";\r\nimport { jsS } from \"@pnp/common\";\r\nvar RelatedItemManagerImpl = /** @class */ (function (_super) {\r\n tslib_1.__extends(RelatedItemManagerImpl, _super);\r\n function RelatedItemManagerImpl() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RelatedItemManagerImpl_1 = RelatedItemManagerImpl;\r\n RelatedItemManagerImpl.FromUrl = function (url) {\r\n if (url === null) {\r\n return new RelatedItemManagerImpl_1(\"\");\r\n }\r\n var index = url.indexOf(\"_api/\");\r\n if (index > -1) {\r\n return new RelatedItemManagerImpl_1(url.substr(0, index));\r\n }\r\n return new RelatedItemManagerImpl_1(url);\r\n };\r\n RelatedItemManagerImpl.prototype.getRelatedItems = function (sourceListName, sourceItemId) {\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".GetRelatedItems\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n }),\r\n });\r\n };\r\n RelatedItemManagerImpl.prototype.getPageOneRelatedItems = function (sourceListName, sourceItemId) {\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".GetPageOneRelatedItems\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n }),\r\n });\r\n };\r\n RelatedItemManagerImpl.prototype.addSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemID, targetWebUrl, tryAddReverseLink) {\r\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".AddSingleLink\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n SourceWebUrl: sourceWebUrl,\r\n TargetItemID: targetItemID,\r\n TargetListName: targetListName,\r\n TargetWebUrl: targetWebUrl,\r\n TryAddReverseLink: tryAddReverseLink,\r\n }),\r\n });\r\n };\r\n /**\r\n * Adds a related item link from an item specified by list name and item id, to an item specified by url\r\n *\r\n * @param sourceListName The source list name or list id\r\n * @param sourceItemId The source item id\r\n * @param targetItemUrl The target item url\r\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\r\n */\r\n RelatedItemManagerImpl.prototype.addSingleLinkToUrl = function (sourceListName, sourceItemId, targetItemUrl, tryAddReverseLink) {\r\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".AddSingleLinkToUrl\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n TargetItemUrl: targetItemUrl,\r\n TryAddReverseLink: tryAddReverseLink,\r\n }),\r\n });\r\n };\r\n /**\r\n * Adds a related item link from an item specified by url, to an item specified by list name and item id\r\n *\r\n * @param sourceItemUrl The source item url\r\n * @param targetListName The target list name or list id\r\n * @param targetItemId The target item id\r\n * @param tryAddReverseLink If set to true try to add the reverse link (will not return error if it fails)\r\n */\r\n RelatedItemManagerImpl.prototype.addSingleLinkFromUrl = function (sourceItemUrl, targetListName, targetItemId, tryAddReverseLink) {\r\n if (tryAddReverseLink === void 0) { tryAddReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".AddSingleLinkFromUrl\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemUrl: sourceItemUrl,\r\n TargetItemID: targetItemId,\r\n TargetListName: targetListName,\r\n TryAddReverseLink: tryAddReverseLink,\r\n }),\r\n });\r\n };\r\n RelatedItemManagerImpl.prototype.deleteSingleLink = function (sourceListName, sourceItemId, sourceWebUrl, targetListName, targetItemId, targetWebUrl, tryDeleteReverseLink) {\r\n if (tryDeleteReverseLink === void 0) { tryDeleteReverseLink = false; }\r\n var query = this.clone(RelatedItemManagerImpl_1, null);\r\n query.concat(\".DeleteSingleLink\");\r\n return query.postCore({\r\n body: jsS({\r\n SourceItemID: sourceItemId,\r\n SourceListName: sourceListName,\r\n SourceWebUrl: sourceWebUrl,\r\n TargetItemID: targetItemId,\r\n TargetListName: targetListName,\r\n TargetWebUrl: targetWebUrl,\r\n TryDeleteReverseLink: tryDeleteReverseLink,\r\n }),\r\n });\r\n };\r\n var RelatedItemManagerImpl_1;\r\n RelatedItemManagerImpl = RelatedItemManagerImpl_1 = tslib_1.__decorate([\r\n defaultPath(\"_api/SP.RelatedItemManager\")\r\n ], RelatedItemManagerImpl);\r\n return RelatedItemManagerImpl;\r\n}(SharePointQueryable));\r\nexport { RelatedItemManagerImpl };\r\n//# sourceMappingURL=relateditems.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath, } from \"./sharepointqueryable\";\r\nimport { spODataEntity, } from \"./odata\";\r\nimport { dateAdd, hOP, } from \"@pnp/common\";\r\n/**\r\n * Describes regional settings ODada object\r\n */\r\nvar RegionalSettings = /** @class */ (function (_super) {\r\n tslib_1.__extends(RegionalSettings, _super);\r\n function RegionalSettings() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(RegionalSettings.prototype, \"installedLanguages\", {\r\n /**\r\n * Gets the collection of languages used in a server farm.\r\n */\r\n get: function () {\r\n return new InstalledLanguages(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RegionalSettings.prototype, \"globalInstalledLanguages\", {\r\n /**\r\n * Gets the collection of language packs that are installed on the server.\r\n */\r\n get: function () {\r\n return new InstalledLanguages(this, \"globalinstalledlanguages\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RegionalSettings.prototype, \"timeZone\", {\r\n /**\r\n * Gets time zone\r\n */\r\n get: function () {\r\n return new TimeZone(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(RegionalSettings.prototype, \"timeZones\", {\r\n /**\r\n * Gets time zones\r\n */\r\n get: function () {\r\n return new TimeZones(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n RegionalSettings = tslib_1.__decorate([\r\n defaultPath(\"regionalsettings\")\r\n ], RegionalSettings);\r\n return RegionalSettings;\r\n}(SharePointQueryableInstance));\r\nexport { RegionalSettings };\r\n/**\r\n * Describes installed languages ODada queriable collection\r\n */\r\nvar InstalledLanguages = /** @class */ (function (_super) {\r\n tslib_1.__extends(InstalledLanguages, _super);\r\n function InstalledLanguages() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n InstalledLanguages = tslib_1.__decorate([\r\n defaultPath(\"installedlanguages\")\r\n ], InstalledLanguages);\r\n return InstalledLanguages;\r\n}(SharePointQueryableCollection));\r\nexport { InstalledLanguages };\r\n/**\r\n * Describes TimeZone ODada object\r\n */\r\nvar TimeZone = /** @class */ (function (_super) {\r\n tslib_1.__extends(TimeZone, _super);\r\n function TimeZone() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeZone_1 = TimeZone;\r\n /**\r\n * Gets an Local Time by UTC Time\r\n *\r\n * @param utcTime UTC Time as Date or ISO String\r\n */\r\n TimeZone.prototype.utcToLocalTime = function (utcTime) {\r\n var dateIsoString;\r\n if (typeof utcTime === \"string\") {\r\n dateIsoString = utcTime;\r\n }\r\n else {\r\n dateIsoString = utcTime.toISOString();\r\n }\r\n return this.clone(TimeZone_1, \"utctolocaltime('\" + dateIsoString + \"')\")\r\n .postCore()\r\n .then(function (res) { return hOP(res, \"UTCToLocalTime\") ? res.UTCToLocalTime : res; });\r\n };\r\n /**\r\n * Gets an UTC Time by Local Time\r\n *\r\n * @param localTime Local Time as Date or ISO String\r\n */\r\n TimeZone.prototype.localTimeToUTC = function (localTime) {\r\n var dateIsoString;\r\n if (typeof localTime === \"string\") {\r\n dateIsoString = localTime;\r\n }\r\n else {\r\n dateIsoString = dateAdd(localTime, \"minute\", localTime.getTimezoneOffset() * -1).toISOString();\r\n }\r\n return this.clone(TimeZone_1, \"localtimetoutc('\" + dateIsoString + \"')\")\r\n .postCore()\r\n .then(function (res) { return hOP(res, \"LocalTimeToUTC\") ? res.LocalTimeToUTC : res; });\r\n };\r\n var TimeZone_1;\r\n TimeZone = TimeZone_1 = tslib_1.__decorate([\r\n defaultPath(\"timezone\")\r\n ], TimeZone);\r\n return TimeZone;\r\n}(SharePointQueryableInstance));\r\nexport { TimeZone };\r\n/**\r\n * Describes time zones queriable collection\r\n */\r\nvar TimeZones = /** @class */ (function (_super) {\r\n tslib_1.__extends(TimeZones, _super);\r\n function TimeZones() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeZones_1 = TimeZones;\r\n // https://msdn.microsoft.com/en-us/library/office/jj247008.aspx - timezones ids\r\n /**\r\n * Gets an TimeZone by id\r\n *\r\n * @param id The integer id of the timezone to retrieve\r\n */\r\n TimeZones.prototype.getById = function (id) {\r\n // do the post and merge the result into a TimeZone instance so the data and methods are available\r\n return this.clone(TimeZones_1, \"GetById(\" + id + \")\").postCore({}, spODataEntity(TimeZone));\r\n };\r\n var TimeZones_1;\r\n TimeZones = TimeZones_1 = tslib_1.__decorate([\r\n defaultPath(\"timezones\")\r\n ], TimeZones);\r\n return TimeZones;\r\n}(SharePointQueryableCollection));\r\nexport { TimeZones };\r\n//# sourceMappingURL=regionalsettings.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable } from \"./sharepointqueryable\";\r\nimport { hOP } from \"@pnp/common\";\r\n/**\r\n * Implements the site designs API REST methods\r\n *\r\n */\r\nvar SiteDesigns = /** @class */ (function (_super) {\r\n tslib_1.__extends(SiteDesigns, _super);\r\n /**\r\n * Creates a new instance of the SiteDesigns method class\r\n *\r\n * @param baseUrl The parent url provider\r\n * @param methodName The static method name to call on the utility class\r\n */\r\n function SiteDesigns(baseUrl, methodName) {\r\n return _super.call(this, SiteDesigns.getBaseUrl(baseUrl), \"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.\" + methodName) || this;\r\n }\r\n SiteDesigns.getBaseUrl = function (candidate) {\r\n if (typeof candidate === \"string\") {\r\n return candidate;\r\n }\r\n var c = candidate;\r\n var url = c.toUrl();\r\n var index = url.indexOf(\"_api/\");\r\n if (index < 0) {\r\n return url;\r\n }\r\n return url.substr(0, index);\r\n };\r\n SiteDesigns.prototype.execute = function (props) {\r\n return this.postCore({\r\n body: JSON.stringify(props),\r\n headers: {\r\n \"Content-Type\": \"application/json;charset=utf-8\",\r\n },\r\n });\r\n };\r\n /**\r\n * Creates a new site design available to users when they create a new site from the SharePoint home page.\r\n *\r\n * @param creationInfo A sitedesign creation information object\r\n */\r\n SiteDesigns.prototype.createSiteDesign = function (creationInfo) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"CreateSiteDesign\").execute({ info: creationInfo })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Applies a site design to an existing site collection.\r\n *\r\n * @param siteDesignId The ID of the site design to apply.\r\n * @param webUrl The URL of the site collection where you want to apply the site design.\r\n */\r\n SiteDesigns.prototype.applySiteDesign = function (siteDesignId, webUrl) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"ApplySiteDesign\").execute({ siteDesignId: siteDesignId, \"webUrl\": webUrl })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Gets a list of information about existing site designs.\r\n */\r\n SiteDesigns.prototype.getSiteDesigns = function () {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GetSiteDesigns\").execute({})];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Gets information about a specific site design.\r\n * @param id The ID of the site design to get information about.\r\n */\r\n SiteDesigns.prototype.getSiteDesignMetadata = function (id) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GetSiteDesignMetadata\").execute({ id: id })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Updates a site design with new values. In the REST call, all parameters are optional except the site script Id.\r\n * If you had previously set the IsDefault parameter to TRUE and wish it to remain true, you must pass in this parameter again (otherwise it will be reset to FALSE).\r\n * @param updateInfo A sitedesign update information object\r\n */\r\n SiteDesigns.prototype.updateSiteDesign = function (updateInfo) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"UpdateSiteDesign\").execute({ updateInfo: updateInfo })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Deletes a site design.\r\n * @param id The ID of the site design to delete.\r\n */\r\n SiteDesigns.prototype.deleteSiteDesign = function (id) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"DeleteSiteDesign\").execute({ id: id })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Gets a list of principals that have access to a site design.\r\n * @param id The ID of the site design to get rights information from.\r\n */\r\n SiteDesigns.prototype.getSiteDesignRights = function (id) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GetSiteDesignRights\").execute({ id: id })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Grants access to a site design for one or more principals.\r\n * @param id The ID of the site design to grant rights on.\r\n * @param principalNames An array of one or more principals to grant view rights.\r\n * Principals can be users or mail-enabled security groups in the form of \"alias\" or \"alias@.com\"\r\n * @param grantedRights Always set to 1. This represents the View right.\r\n */\r\n SiteDesigns.prototype.grantSiteDesignRights = function (id, principalNames, grantedRights) {\r\n if (grantedRights === void 0) { grantedRights = 1; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GrantSiteDesignRights\")\r\n .execute({\r\n \"grantedRights\": grantedRights.toString(),\r\n \"id\": id,\r\n \"principalNames\": principalNames,\r\n })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Revokes access from a site design for one or more principals.\r\n * @param id The ID of the site design to revoke rights from.\r\n * @param principalNames An array of one or more principals to revoke view rights from.\r\n * If all principals have rights revoked on the site design, the site design becomes viewable to everyone.\r\n */\r\n SiteDesigns.prototype.revokeSiteDesignRights = function (id, principalNames) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"RevokeSiteDesignRights\")\r\n .execute({\r\n \"id\": id,\r\n \"principalNames\": principalNames,\r\n })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Adds a site design task on the specified web url to be invoked asynchronously.\r\n * @param webUrl The absolute url of the web on where to create the task\r\n * @param siteDesignId The ID of the site design to create a task for\r\n */\r\n SiteDesigns.prototype.addSiteDesignTask = function (webUrl, siteDesignId) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"AddSiteDesignTask\")\r\n .execute({ \"webUrl\": webUrl, \"siteDesignId\": siteDesignId })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Adds a site design task on the current web to be invoked asynchronously.\r\n * @param siteDesignId The ID of the site design to create a task for\r\n */\r\n SiteDesigns.prototype.addSiteDesignTaskToCurrentWeb = function (siteDesignId) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"AddSiteDesignTaskToCurrentWeb\")\r\n .execute({ \"siteDesignId\": siteDesignId })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Retrieves the site design task, if the task has finished running null will be returned\r\n * @param id The ID of the site design task\r\n */\r\n SiteDesigns.prototype.getSiteDesignTask = function (id) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n var task;\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GetSiteDesignTask\")\r\n .execute({ \"taskId\": id })];\r\n case 1:\r\n task = _a.sent();\r\n return [2 /*return*/, hOP(task, \"ID\") ? task : null];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Retrieves a list of site design that have run on a specific web\r\n * @param webUrl The url of the web where the site design was applied\r\n * @param siteDesignId (Optional) the site design ID, if not provided will return all site design runs\r\n */\r\n SiteDesigns.prototype.getSiteDesignRun = function (webUrl, siteDesignId) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GetSiteDesignRun\")\r\n .execute({ \"webUrl\": webUrl, siteDesignId: siteDesignId })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Retrieves the status of a site design that has been run or is still running\r\n * @param webUrl The url of the web where the site design was applied\r\n * @param runId the run ID\r\n */\r\n SiteDesigns.prototype.getSiteDesignRunStatus = function (webUrl, runId) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteDesigns, \"GetSiteDesignRunStatus\")\r\n .execute({ \"webUrl\": webUrl, runId: runId })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n return SiteDesigns;\r\n}(SharePointQueryable));\r\nexport { SiteDesigns };\r\n//# sourceMappingURL=sitedesigns.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable } from \"./sharepointqueryable\";\r\n/**\r\n * Implements the site script API REST methods\r\n *\r\n */\r\nvar SiteScripts = /** @class */ (function (_super) {\r\n tslib_1.__extends(SiteScripts, _super);\r\n /**\r\n * Creates a new instance of the SiteScripts method class\r\n *\r\n * @param baseUrl The parent url provider\r\n * @param methodName The static method name to call on the utility class\r\n */\r\n function SiteScripts(baseUrl, methodName) {\r\n return _super.call(this, SiteScripts.getBaseUrl(baseUrl), \"_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.\" + methodName) || this;\r\n }\r\n SiteScripts.getBaseUrl = function (candidate) {\r\n if (typeof candidate === \"string\") {\r\n return candidate;\r\n }\r\n var c = candidate;\r\n var url = c.toUrl();\r\n var index = url.indexOf(\"_api/\");\r\n if (index < 0) {\r\n return url;\r\n }\r\n return url.substr(0, index);\r\n };\r\n SiteScripts.prototype.execute = function (props) {\r\n return this.postCore({\r\n body: JSON.stringify(props),\r\n });\r\n };\r\n /**\r\n * Gets a list of information on all existing site scripts.\r\n */\r\n SiteScripts.prototype.getSiteScripts = function () {\r\n return this.clone(SiteScripts, \"GetSiteScripts\", true).execute({});\r\n };\r\n /**\r\n * Creates a new site script.\r\n *\r\n * @param title The display name of the site design.\r\n * @param content JSON value that describes the script. For more information, see JSON reference.\r\n */\r\n SiteScripts.prototype.createSiteScript = function (title, description, content) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteScripts, \"CreateSiteScript(Title=@title,Description=@desc)?@title='\" + encodeURIComponent(title) + \"'&@desc='\" + encodeURIComponent(description) + \"'\")\r\n .execute(content)];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Gets information about a specific site script. It also returns the JSON of the script.\r\n *\r\n * @param id The ID of the site script to get information about.\r\n */\r\n SiteScripts.prototype.getSiteScriptMetadata = function (id) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteScripts, \"GetSiteScriptMetadata\").execute({ id: id })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Deletes a site script.\r\n *\r\n * @param id The ID of the site script to delete.\r\n */\r\n SiteScripts.prototype.deleteSiteScript = function (id) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteScripts, \"DeleteSiteScript\").execute({ id: id })];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Updates a site script with new values. In the REST call, all parameters are optional except the site script Id.\r\n *\r\n * @param siteScriptUpdateInfo Object that contains the information to update a site script.\r\n * Make sure you stringify the content object or pass it in the second 'content' parameter\r\n * @param content (Optional) A new JSON script defining the script actions. For more information, see Site design JSON schema.\r\n */\r\n SiteScripts.prototype.updateSiteScript = function (siteScriptUpdateInfo, content) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n if (content) {\r\n siteScriptUpdateInfo.Content = JSON.stringify(content);\r\n }\r\n return [4 /*yield*/, this.clone(SiteScripts, \"UpdateSiteScript\").execute({ updateInfo: siteScriptUpdateInfo })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Gets the site script syntax (JSON) for a specific list\r\n * @param listUrl The absolute url of the list to retrieve site script\r\n */\r\n SiteScripts.prototype.getSiteScriptFromList = function (listUrl) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteScripts, \"GetSiteScriptFromList\")\r\n .execute({ \"listUrl\": listUrl })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Gets the site script syntax (JSON) for a specific web\r\n * @param webUrl The absolute url of the web to retrieve site script\r\n * @param extractInfo configuration object to specify what to extract\r\n */\r\n SiteScripts.prototype.getSiteScriptFromWeb = function (webUrl, extractInfo) {\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.clone(SiteScripts, \"getSiteScriptFromWeb\")\r\n .execute({ \"webUrl\": webUrl, info: extractInfo })];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n }\r\n });\r\n });\r\n };\r\n return SiteScripts;\r\n}(SharePointQueryable));\r\nexport { SiteScripts };\r\n//# sourceMappingURL=sitescripts.js.map","import * as tslib_1 from \"tslib\";\r\nimport { extend, jsS } from \"@pnp/common\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { SharePointQueryableShareableWeb } from \"./sharepointqueryableshareable\";\r\nimport { Folders, Folder } from \"./folders\";\r\nimport { Lists, List } from \"./lists\";\r\nimport { Fields } from \"./fields\";\r\nimport { Site } from \"./site\";\r\nimport { Navigation } from \"./navigation\";\r\nimport { SiteGroups, SiteGroup } from \"./sitegroups\";\r\nimport { ContentTypes } from \"./contenttypes\";\r\nimport { RoleDefinitions } from \"./roles\";\r\nimport { File } from \"./files\";\r\nimport { extractWebUrl } from \"./utils/extractweburl\";\r\nimport { SiteUsers, SiteUser, CurrentUser } from \"./siteusers\";\r\nimport { UserCustomActions } from \"./usercustomactions\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { SPBatch } from \"./batch\";\r\nimport { Features } from \"./features\";\r\nimport { RelatedItemManagerImpl } from \"./relateditems\";\r\nimport { AppCatalog } from \"./appcatalog\";\r\nimport { RegionalSettings } from \"./regionalsettings\";\r\nimport { ClientSidePage } from \"./clientsidepages\";\r\nimport { SiteDesigns } from \"./sitedesigns\";\r\nimport { SiteScripts } from \"./sitescripts\";\r\n/**\r\n * Describes a collection of webs\r\n *\r\n */\r\nvar Webs = /** @class */ (function (_super) {\r\n tslib_1.__extends(Webs, _super);\r\n function Webs() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Webs_1 = Webs;\r\n /**\r\n * Adds a new web to the collection\r\n *\r\n * @param title The new web's title\r\n * @param url The new web's relative url\r\n * @param description The new web's description\r\n * @param template The new web's template internal name (default = STS)\r\n * @param language The locale id that specifies the new web's language (default = 1033 [English, US])\r\n * @param inheritPermissions When true, permissions will be inherited from the new web's parent (default = true)\r\n */\r\n Webs.prototype.add = function (title, url, description, template, language, inheritPermissions) {\r\n if (description === void 0) { description = \"\"; }\r\n if (template === void 0) { template = \"STS\"; }\r\n if (language === void 0) { language = 1033; }\r\n if (inheritPermissions === void 0) { inheritPermissions = true; }\r\n var props = {\r\n Description: description,\r\n Language: language,\r\n Title: title,\r\n Url: url,\r\n UseSamePermissionsAsParentSite: inheritPermissions,\r\n WebTemplate: template,\r\n };\r\n var postBody = jsS({\r\n \"parameters\": extend({\r\n \"__metadata\": { \"type\": \"SP.WebCreationInformation\" },\r\n }, props),\r\n });\r\n return this.clone(Webs_1, \"add\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n web: new Web(odataUrlFrom(data).replace(/_api\\/web\\/?/i, \"\")),\r\n };\r\n });\r\n };\r\n var Webs_1;\r\n Webs = Webs_1 = tslib_1.__decorate([\r\n defaultPath(\"webs\")\r\n ], Webs);\r\n return Webs;\r\n}(SharePointQueryableCollection));\r\nexport { Webs };\r\n/**\r\n * Describes a collection of web infos\r\n *\r\n */\r\nvar WebInfos = /** @class */ (function (_super) {\r\n tslib_1.__extends(WebInfos, _super);\r\n function WebInfos() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n WebInfos = tslib_1.__decorate([\r\n defaultPath(\"webinfos\")\r\n ], WebInfos);\r\n return WebInfos;\r\n}(SharePointQueryableCollection));\r\nexport { WebInfos };\r\n/**\r\n * Describes a web\r\n *\r\n */\r\nvar Web = /** @class */ (function (_super) {\r\n tslib_1.__extends(Web, _super);\r\n function Web() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Web_1 = Web;\r\n /**\r\n * Creates a new web instance from the given url by indexing the location of the /_api/\r\n * segment. If this is not found the method creates a new web with the entire string as\r\n * supplied.\r\n *\r\n * @param url\r\n */\r\n Web.fromUrl = function (url, path) {\r\n return new Web_1(extractWebUrl(url), path);\r\n };\r\n Object.defineProperty(Web.prototype, \"webs\", {\r\n /**\r\n * Gets this web's subwebs\r\n *\r\n */\r\n get: function () {\r\n return new Webs(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets this web's parent web and data\r\n *\r\n */\r\n Web.prototype.getParentWeb = function () {\r\n var _this = this;\r\n return this.select(\"ParentWeb/Id\").expand(\"ParentWeb\").get()\r\n .then(function (_a) {\r\n var ParentWeb = _a.ParentWeb;\r\n return ParentWeb ? new Site(_this.parentUrl).openWebById(ParentWeb.Id) : null;\r\n });\r\n };\r\n /**\r\n * Returns a collection of objects that contain metadata about subsites of the current site in which the current user is a member.\r\n *\r\n * @param nWebTemplateFilter Specifies the site definition (default = -1)\r\n * @param nConfigurationFilter A 16-bit integer that specifies the identifier of a configuration (default = -1)\r\n */\r\n Web.prototype.getSubwebsFilteredForCurrentUser = function (nWebTemplateFilter, nConfigurationFilter) {\r\n if (nWebTemplateFilter === void 0) { nWebTemplateFilter = -1; }\r\n if (nConfigurationFilter === void 0) { nConfigurationFilter = -1; }\r\n return this.clone(Webs, \"getSubwebsFilteredForCurrentUser(nWebTemplateFilter=\" + nWebTemplateFilter + \",nConfigurationFilter=\" + nConfigurationFilter + \")\");\r\n };\r\n Object.defineProperty(Web.prototype, \"allProperties\", {\r\n /**\r\n * Allows access to the web's all properties collection\r\n */\r\n get: function () {\r\n return this.clone(SharePointQueryableInstance, \"allproperties\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"webinfos\", {\r\n /**\r\n * Gets a collection of WebInfos for this web's subwebs\r\n *\r\n */\r\n get: function () {\r\n return new WebInfos(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"contentTypes\", {\r\n /**\r\n * Gets the content types available in this web\r\n *\r\n */\r\n get: function () {\r\n return new ContentTypes(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"lists\", {\r\n /**\r\n * Gets the lists in this web\r\n *\r\n */\r\n get: function () {\r\n return new Lists(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"fields\", {\r\n /**\r\n * Gets the fields in this web\r\n *\r\n */\r\n get: function () {\r\n return new Fields(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"features\", {\r\n /**\r\n * Gets the active features for this web\r\n *\r\n */\r\n get: function () {\r\n return new Features(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"availablefields\", {\r\n /**\r\n * Gets the available fields in this web\r\n *\r\n */\r\n get: function () {\r\n return new Fields(this, \"availablefields\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"navigation\", {\r\n /**\r\n * Gets the navigation options in this web\r\n *\r\n */\r\n get: function () {\r\n return new Navigation(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"siteUsers\", {\r\n /**\r\n * Gets the site users\r\n *\r\n */\r\n get: function () {\r\n return new SiteUsers(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"siteGroups\", {\r\n /**\r\n * Gets the site groups\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroups(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"siteUserInfoList\", {\r\n /**\r\n * Gets site user info list\r\n *\r\n */\r\n get: function () {\r\n return new List(this, \"siteuserinfolist\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"regionalSettings\", {\r\n /**\r\n * Gets regional settings\r\n *\r\n */\r\n get: function () {\r\n return new RegionalSettings(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"currentUser\", {\r\n /**\r\n * Gets the current user\r\n */\r\n get: function () {\r\n return new CurrentUser(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"folders\", {\r\n /**\r\n * Gets the top-level folders in this web\r\n *\r\n */\r\n get: function () {\r\n return new Folders(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"userCustomActions\", {\r\n /**\r\n * Gets all user custom actions for this web\r\n *\r\n */\r\n get: function () {\r\n return new UserCustomActions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"roleDefinitions\", {\r\n /**\r\n * Gets the collection of RoleDefinition resources\r\n *\r\n */\r\n get: function () {\r\n return new RoleDefinitions(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"relatedItems\", {\r\n /**\r\n * Provides an interface to manage related items\r\n *\r\n */\r\n get: function () {\r\n return RelatedItemManagerImpl.FromUrl(this.toUrl());\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a new batch for requests within the context of this web\r\n *\r\n */\r\n Web.prototype.createBatch = function () {\r\n return new SPBatch(this.parentUrl);\r\n };\r\n Object.defineProperty(Web.prototype, \"rootFolder\", {\r\n /**\r\n * Gets the root folder of this web\r\n *\r\n */\r\n get: function () {\r\n return new Folder(this, \"rootFolder\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"associatedOwnerGroup\", {\r\n /**\r\n * Gets the associated owner group for this web\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroup(this, \"associatedownergroup\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"associatedMemberGroup\", {\r\n /**\r\n * Gets the associated member group for this web\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroup(this, \"associatedmembergroup\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"associatedVisitorGroup\", {\r\n /**\r\n * Gets the associated visitor group for this web\r\n *\r\n */\r\n get: function () {\r\n return new SiteGroup(this, \"associatedvisitorgroup\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Web.prototype, \"defaultDocumentLibrary\", {\r\n /**\r\n * Gets the default document library for this web\r\n *\r\n */\r\n get: function () {\r\n return new List(this, \"DefaultDocumentLibrary\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a folder by id\r\n *\r\n * @param uniqueId The uniqueId of the folder\r\n */\r\n Web.prototype.getFolderById = function (uniqueId) {\r\n return new Folder(this, \"getFolderById('\" + uniqueId + \"')\");\r\n };\r\n /**\r\n * Gets a folder by server relative url\r\n *\r\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFolderByServerRelativeUrl = function (folderRelativeUrl) {\r\n return new Folder(this, \"getFolderByServerRelativeUrl('\" + folderRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a folder by server relative relative path if your folder name contains # and % characters\r\n * you need to first encode the file name using encodeURIComponent() and then pass the url\r\n * let url = \"/sites/test/Shared Documents/\" + encodeURIComponent(\"%123\");\r\n * This works only in SharePoint online.\r\n *\r\n * @param folderRelativeUrl The server relative path to the folder (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFolderByServerRelativePath = function (folderRelativeUrl) {\r\n return new Folder(this, \"getFolderByServerRelativePath(decodedUrl='\" + folderRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a file by id\r\n *\r\n * @param uniqueId The uniqueId of the file\r\n */\r\n Web.prototype.getFileById = function (uniqueId) {\r\n return new File(this, \"getFileById('\" + uniqueId + \"')\");\r\n };\r\n /**\r\n * Gets a file by server relative url\r\n *\r\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFileByServerRelativeUrl = function (fileRelativeUrl) {\r\n return new File(this, \"getFileByServerRelativeUrl('\" + fileRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a file by server relative url if your file name contains # and % characters\r\n * you need to first encode the file name using encodeURIComponent() and then pass the url\r\n * let url = \"/sites/test/Shared Documents/\" + encodeURIComponent(\"%123.docx\");\r\n *\r\n * @param fileRelativeUrl The server relative path to the file (including /sites/ if applicable)\r\n */\r\n Web.prototype.getFileByServerRelativePath = function (fileRelativeUrl) {\r\n return new File(this, \"getFileByServerRelativePath(decodedUrl='\" + fileRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Gets a list by server relative url (list's root folder)\r\n *\r\n * @param listRelativeUrl The server relative path to the list's root folder (including /sites/ if applicable)\r\n */\r\n Web.prototype.getList = function (listRelativeUrl) {\r\n return new List(this, \"getList('\" + listRelativeUrl + \"')\");\r\n };\r\n /**\r\n * Updates this web instance with the supplied properties\r\n *\r\n * @param properties A plain object hash of values to update for the web\r\n */\r\n Web.prototype.update = function (properties) {\r\n var _this = this;\r\n var postBody = jsS(extend({\r\n \"__metadata\": { \"type\": \"SP.Web\" },\r\n }, properties));\r\n return this.postCore({\r\n body: postBody,\r\n headers: {\r\n \"X-HTTP-Method\": \"MERGE\",\r\n },\r\n }).then(function (data) {\r\n return {\r\n data: data,\r\n web: _this,\r\n };\r\n });\r\n };\r\n /**\r\n * Deletes this web\r\n *\r\n */\r\n Web.prototype.delete = function () {\r\n return _super.prototype.deleteCore.call(this);\r\n };\r\n /**\r\n * Applies the theme specified by the contents of each of the files specified in the arguments to the site\r\n *\r\n * @param colorPaletteUrl The server-relative URL of the color palette file\r\n * @param fontSchemeUrl The server-relative URL of the font scheme\r\n * @param backgroundImageUrl The server-relative URL of the background image\r\n * @param shareGenerated When true, the generated theme files are stored in the root site. When false, they are stored in this web\r\n */\r\n Web.prototype.applyTheme = function (colorPaletteUrl, fontSchemeUrl, backgroundImageUrl, shareGenerated) {\r\n var postBody = jsS({\r\n backgroundImageUrl: backgroundImageUrl,\r\n colorPaletteUrl: colorPaletteUrl,\r\n fontSchemeUrl: fontSchemeUrl,\r\n shareGenerated: shareGenerated,\r\n });\r\n return this.clone(Web_1, \"applytheme\").postCore({ body: postBody });\r\n };\r\n /**\r\n * Applies the specified site definition or site template to the Web site that has no template applied to it\r\n *\r\n * @param template Name of the site definition or the name of the site template\r\n */\r\n Web.prototype.applyWebTemplate = function (template) {\r\n var q = this.clone(Web_1, \"applywebtemplate\");\r\n q.concat(\"(@t)\");\r\n q.query.set(\"@t\", template);\r\n return q.postCore();\r\n };\r\n /**\r\n * Checks whether the specified login name belongs to a valid user in the web. If the user doesn't exist, adds the user to the web.\r\n *\r\n * @param loginName The login name of the user (ex: i:0#.f|membership|user@domain.onmicrosoft.com)\r\n */\r\n Web.prototype.ensureUser = function (loginName) {\r\n var postBody = jsS({\r\n logonName: loginName,\r\n });\r\n return this.clone(Web_1, \"ensureuser\").postCore({ body: postBody }).then(function (data) {\r\n return {\r\n data: data,\r\n user: new SiteUser(odataUrlFrom(data)),\r\n };\r\n });\r\n };\r\n /**\r\n * Returns a collection of site templates available for the site\r\n *\r\n * @param language The locale id of the site templates to retrieve (default = 1033 [English, US])\r\n * @param includeCrossLanguage When true, includes language-neutral site templates; otherwise false (default = true)\r\n */\r\n Web.prototype.availableWebTemplates = function (language, includeCrossLanugage) {\r\n if (language === void 0) { language = 1033; }\r\n if (includeCrossLanugage === void 0) { includeCrossLanugage = true; }\r\n return new SharePointQueryableCollection(this, \"getavailablewebtemplates(lcid=\" + language + \", doincludecrosslanguage=\" + includeCrossLanugage + \")\");\r\n };\r\n /**\r\n * Returns the list gallery on the site\r\n *\r\n * @param type The gallery type - WebTemplateCatalog = 111, WebPartCatalog = 113 ListTemplateCatalog = 114,\r\n * MasterPageCatalog = 116, SolutionCatalog = 121, ThemeCatalog = 123, DesignCatalog = 124, AppDataCatalog = 125\r\n */\r\n Web.prototype.getCatalog = function (type) {\r\n return this.clone(Web_1, \"getcatalog(\" + type + \")\").select(\"Id\").get().then(function (data) {\r\n return new List(odataUrlFrom(data));\r\n });\r\n };\r\n /**\r\n * Returns the collection of changes from the change log that have occurred within the web, based on the specified query\r\n *\r\n * @param query The change query\r\n */\r\n Web.prototype.getChanges = function (query) {\r\n var postBody = jsS({ \"query\": extend({ \"__metadata\": { \"type\": \"SP.ChangeQuery\" } }, query) });\r\n return this.clone(Web_1, \"getchanges\").postCore({ body: postBody });\r\n };\r\n Object.defineProperty(Web.prototype, \"customListTemplate\", {\r\n /**\r\n * Gets the custom list templates for the site\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"getcustomlisttemplates\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns the user corresponding to the specified member identifier for the current site\r\n *\r\n * @param id The id of the user\r\n */\r\n Web.prototype.getUserById = function (id) {\r\n return new SiteUser(this, \"getUserById(\" + id + \")\");\r\n };\r\n /**\r\n * Returns the name of the image file for the icon that is used to represent the specified file\r\n *\r\n * @param filename The file name. If this parameter is empty, the server returns an empty string\r\n * @param size The size of the icon: 16x16 pixels = 0, 32x32 pixels = 1 (default = 0)\r\n * @param progId The ProgID of the application that was used to create the file, in the form OLEServerName.ObjectName\r\n */\r\n Web.prototype.mapToIcon = function (filename, size, progId) {\r\n if (size === void 0) { size = 0; }\r\n if (progId === void 0) { progId = \"\"; }\r\n return this.clone(Web_1, \"maptoicon(filename='\" + filename + \"', progid='\" + progId + \"', size=\" + size + \")\").get();\r\n };\r\n /**\r\n * Returns the tenant property corresponding to the specified key in the app catalog site\r\n *\r\n * @param key Id of storage entity to be set\r\n */\r\n Web.prototype.getStorageEntity = function (key) {\r\n return this.clone(Web_1, \"getStorageEntity('\" + key + \"')\").get();\r\n };\r\n /**\r\n * This will set the storage entity identified by the given key (MUST be called in the context of the app catalog)\r\n *\r\n * @param key Id of storage entity to be set\r\n * @param value Value of storage entity to be set\r\n * @param description Description of storage entity to be set\r\n * @param comments Comments of storage entity to be set\r\n */\r\n Web.prototype.setStorageEntity = function (key, value, description, comments) {\r\n if (description === void 0) { description = \"\"; }\r\n if (comments === void 0) { comments = \"\"; }\r\n return this.clone(Web_1, \"setStorageEntity\").postCore({\r\n body: jsS({\r\n comments: comments,\r\n description: description,\r\n key: key,\r\n value: value,\r\n }),\r\n });\r\n };\r\n /**\r\n * This will remove the storage entity identified by the given key\r\n *\r\n * @param key Id of storage entity to be removed\r\n */\r\n Web.prototype.removeStorageEntity = function (key) {\r\n return this.clone(Web_1, \"removeStorageEntity('\" + key + \"')\").postCore();\r\n };\r\n /**\r\n * Gets the tenant app catalog for this web\r\n *\r\n * @param url Optional url or web containing the app catalog (default: current web)\r\n */\r\n Web.prototype.getAppCatalog = function (url) {\r\n return new AppCatalog(url || this);\r\n };\r\n /**\r\n * Gets the site collection app catalog for this web\r\n *\r\n * @param url Optional url or web containing the app catalog (default: current web)\r\n */\r\n Web.prototype.getSiteCollectionAppCatalog = function (url) {\r\n return new AppCatalog(url || this, \"_api/web/sitecollectionappcatalog/AvailableApps\");\r\n };\r\n /**\r\n * Gets the collection of available client side web parts for this web instance\r\n */\r\n Web.prototype.getClientSideWebParts = function () {\r\n return this.clone(SharePointQueryableCollection, \"GetClientSideWebParts\").get();\r\n };\r\n /**\r\n * Creates a new client side page\r\n *\r\n * @param pageName Name of the new page\r\n * @param title Display title of the new page\r\n */\r\n Web.prototype.addClientSidePage = function (pageName, title) {\r\n if (title === void 0) { title = pageName.replace(/\\.[^/.]+$/, \"\"); }\r\n return ClientSidePage.create(this, pageName, title);\r\n };\r\n /**\r\n * Creates a new client side page using the library path\r\n *\r\n * @param pageName Name of the new page\r\n * @param listRelativePath The server relative path to the list's root folder (including /sites/ if applicable)\r\n * @param title Display title of the new page\r\n */\r\n Web.prototype.addClientSidePageByPath = function (pageName, title) {\r\n if (title === void 0) { title = pageName.replace(/\\.[^/.]+$/, \"\"); }\r\n return ClientSidePage.create(this, pageName, title);\r\n };\r\n /**\r\n * Creates the default associated groups (Members, Owners, Visitors) and gives them the default permissions on the site.\r\n * The target site must have unique permissions and no associated members / owners / visitors groups\r\n *\r\n * @param siteOwner The user login name to be added to the site Owners group. Default is the current user\r\n * @param siteOwner2 The second user login name to be added to the site Owners group. Default is empty\r\n * @param groupNameSeed The base group name. E.g. 'TestSite' would produce 'TestSite Members' etc.\r\n */\r\n Web.prototype.createDefaultAssociatedGroups = function (siteOwner, siteOwner2, groupNameSeed) {\r\n var q = this.clone(Web_1, \"createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)\");\r\n q.query.set(\"@u\", \"'\" + encodeURIComponent(siteOwner || \"\") + \"'\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(siteOwner2 || \"\") + \"'\");\r\n q.query.set(\"@s\", \"'\" + encodeURIComponent(groupNameSeed || \"\") + \"'\");\r\n return q.postCore();\r\n };\r\n /**\r\n * Gets hub site data for the current web.\r\n *\r\n * @param forceRefresh Default value is false. When false, the data is returned from the server's cache.\r\n * When true, the cache is refreshed with the latest updates and then returned.\r\n * Use this if you just made changes and need to see those changes right away.\r\n */\r\n Web.prototype.hubSiteData = function (forceRefresh) {\r\n if (forceRefresh === void 0) { forceRefresh = false; }\r\n return tslib_1.__awaiter(this, void 0, void 0, function () {\r\n return tslib_1.__generator(this, function (_a) {\r\n return [2 /*return*/, this.clone(Web_1, \"hubSiteData(\" + forceRefresh + \")\").get().then(function (r) { return JSON.parse(r); })];\r\n });\r\n });\r\n };\r\n /**\r\n * Applies theme updates from the parent hub site collection.\r\n */\r\n Web.prototype.syncHubSiteTheme = function () {\r\n return this.clone(Web_1, \"syncHubSiteTheme\").postCore();\r\n };\r\n /**\r\n * Retrieves a list of site design that have run on the current web\r\n * @param siteDesignId (Optional) the site design ID, if not provided will return all site design runs\r\n */\r\n Web.prototype.getSiteDesignRuns = function (siteDesignId) {\r\n return new SiteDesigns(this, \"\").getSiteDesignRun(undefined, siteDesignId);\r\n };\r\n /**\r\n * Gets the site script syntax (JSON) for a specific web\r\n * @param extractInfo configuration object to specify what to extract\r\n */\r\n Web.prototype.getSiteScript = function (extractInfo) {\r\n return new SiteScripts(this, \"\").getSiteScriptFromWeb(undefined, extractInfo);\r\n };\r\n /**\r\n * Adds a site design task on the current web to be invoked asynchronously.\r\n * @param siteDesignId The ID of the site design to create a task for\r\n */\r\n Web.prototype.addSiteDesignTask = function (siteDesignId) {\r\n return new SiteDesigns(this, \"\").addSiteDesignTaskToCurrentWeb(siteDesignId);\r\n };\r\n /**\r\n * Retrieves the status of a site design that has been run or is still running\r\n * @param runId the run ID\r\n */\r\n Web.prototype.getSiteDesignRunStatus = function (runId) {\r\n return new SiteDesigns(this, \"\").getSiteDesignRunStatus(undefined, runId);\r\n };\r\n var Web_1;\r\n Web = Web_1 = tslib_1.__decorate([\r\n defaultPath(\"_api/web\")\r\n ], Web);\r\n return Web;\r\n}(SharePointQueryableShareableWeb));\r\nexport { Web };\r\n//# sourceMappingURL=webs.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { extend, jsS, hOP, getHashCode, objectDefinedNotNull, isArray } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\nimport { CachingOptions } from \"@pnp/odata\";\r\nvar funcs = new Map([\r\n [\"text\", \"Querytext\"],\r\n [\"template\", \"QueryTemplate\"],\r\n [\"sourceId\", \"SourceId\"],\r\n [\"trimDuplicatesIncludeId\", \"\"],\r\n [\"startRow\", \"\"],\r\n [\"rowLimit\", \"\"],\r\n [\"rankingModelId\", \"\"],\r\n [\"rowsPerPage\", \"\"],\r\n [\"selectProperties\", \"\"],\r\n [\"culture\", \"\"],\r\n [\"timeZoneId\", \"\"],\r\n [\"refinementFilters\", \"\"],\r\n [\"refiners\", \"\"],\r\n [\"hiddenConstraints\", \"\"],\r\n [\"sortList\", \"\"],\r\n [\"timeout\", \"\"],\r\n [\"hithighlightedProperties\", \"\"],\r\n [\"clientType\", \"\"],\r\n [\"personalizationData\", \"\"],\r\n [\"resultsURL\", \"\"],\r\n [\"queryTag\", \"\"],\r\n [\"properties\", \"\"],\r\n [\"queryTemplatePropertiesUrl\", \"\"],\r\n [\"reorderingRules\", \"\"],\r\n [\"hitHighlightedMultivaluePropertyLimit\", \"\"],\r\n [\"collapseSpecification\", \"\"],\r\n [\"uiLanguage\", \"\"],\r\n [\"desiredSnippetLength\", \"\"],\r\n [\"maxSnippetLength\", \"\"],\r\n [\"summaryLength\", \"\"],\r\n]);\r\nvar props = new Map([]);\r\nfunction toPropCase(str) {\r\n return str.replace(/^(.)/, function ($1) { return $1.toUpperCase(); });\r\n}\r\n/**\r\n * Creates a new instance of the SearchQueryBuilder\r\n *\r\n * @param queryText Initial query text\r\n * @param _query Any initial query configuration\r\n */\r\nexport function SearchQueryBuilder(queryText, _query) {\r\n if (queryText === void 0) { queryText = \"\"; }\r\n if (_query === void 0) { _query = {}; }\r\n return new Proxy({\r\n query: Object.assign({\r\n Querytext: queryText,\r\n }, _query),\r\n }, {\r\n get: function (self, propertyKey, proxy) {\r\n var pk = propertyKey.toString();\r\n if (pk === \"toSearchQuery\") {\r\n return function () { return self.query; };\r\n }\r\n if (funcs.has(pk)) {\r\n return function () {\r\n var value = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n value[_i] = arguments[_i];\r\n }\r\n var mappedPk = funcs.get(pk);\r\n self.query[mappedPk.length > 0 ? mappedPk : toPropCase(pk)] = value.length > 1 ? value : value[0];\r\n return proxy;\r\n };\r\n }\r\n var propKey = props.has(pk) ? props.get(pk) : toPropCase(pk);\r\n self.query[propKey] = true;\r\n return proxy;\r\n },\r\n });\r\n}\r\n/**\r\n * Describes the search API\r\n *\r\n */\r\nvar Search = /** @class */ (function (_super) {\r\n tslib_1.__extends(Search, _super);\r\n function Search() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * @returns Promise\r\n */\r\n Search.prototype.execute = function (queryInit) {\r\n var _this = this;\r\n var query = this.parseQuery(queryInit);\r\n var postBody = jsS({\r\n request: extend(metadata(\"Microsoft.Office.Server.Search.REST.SearchRequest\"), Object.assign({}, query, {\r\n HitHighlightedProperties: this.fixArrProp(query.HitHighlightedProperties),\r\n Properties: this.fixArrProp(query.Properties),\r\n RefinementFilters: this.fixArrProp(query.RefinementFilters),\r\n ReorderingRules: this.fixArrProp(query.ReorderingRules),\r\n SelectProperties: this.fixArrProp(query.SelectProperties),\r\n SortList: this.fixArrProp(query.SortList),\r\n })),\r\n });\r\n // if we are using caching with this search request, then we need to handle some work upfront to enable that\r\n if (this._useCaching) {\r\n // force use of the cache for this request if .usingCaching was called\r\n this._forceCaching = true;\r\n // because all the requests use the same url they would collide in the cache we use a special key\r\n var cacheKey = \"PnPjs.SearchWithCaching(\" + getHashCode(postBody) + \")\";\r\n if (objectDefinedNotNull(this._cachingOptions)) {\r\n // if our key ends in the postquery url we overwrite it\r\n if (/\\/_api\\/search\\/postquery$/i.test(this._cachingOptions.key)) {\r\n this._cachingOptions.key = cacheKey;\r\n }\r\n }\r\n else {\r\n this._cachingOptions = new CachingOptions(cacheKey);\r\n }\r\n }\r\n return this.postCore({ body: postBody }).then(function (data) { return new SearchResults(data, _this.toUrl(), query); });\r\n };\r\n /**\r\n * Fix array property\r\n *\r\n * @param prop property to fix for container struct\r\n */\r\n Search.prototype.fixArrProp = function (prop) {\r\n if (typeof prop === \"undefined\") {\r\n return ({ results: [] });\r\n }\r\n prop = isArray(prop) ? prop : [prop];\r\n return hOP(prop, \"results\") ? prop : { results: prop };\r\n };\r\n /**\r\n * Translates one of the query initializers into a SearchQuery instance\r\n *\r\n * @param query\r\n */\r\n Search.prototype.parseQuery = function (query) {\r\n var finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { Querytext: query };\r\n }\r\n else if (query.toSearchQuery) {\r\n finalQuery = query.toSearchQuery();\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return finalQuery;\r\n };\r\n Search = tslib_1.__decorate([\r\n defaultPath(\"_api/search/postquery\")\r\n ], Search);\r\n return Search;\r\n}(SharePointQueryableInstance));\r\nexport { Search };\r\n/**\r\n * Describes the SearchResults class, which returns the formatted and raw version of the query response\r\n */\r\nvar SearchResults = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the SearchResult class\r\n *\r\n */\r\n function SearchResults(rawResponse, _url, _query, _raw, _primary) {\r\n if (_raw === void 0) { _raw = null; }\r\n if (_primary === void 0) { _primary = null; }\r\n this._url = _url;\r\n this._query = _query;\r\n this._raw = _raw;\r\n this._primary = _primary;\r\n this._raw = rawResponse.postquery ? rawResponse.postquery : rawResponse;\r\n }\r\n Object.defineProperty(SearchResults.prototype, \"ElapsedTime\", {\r\n get: function () {\r\n return this.RawSearchResults.ElapsedTime;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"RowCount\", {\r\n get: function () {\r\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"TotalRows\", {\r\n get: function () {\r\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"TotalRowsIncludingDuplicates\", {\r\n get: function () {\r\n return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"RawSearchResults\", {\r\n get: function () {\r\n return this._raw;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SearchResults.prototype, \"PrimarySearchResults\", {\r\n get: function () {\r\n if (this._primary === null) {\r\n this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows);\r\n }\r\n return this._primary;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a page of results\r\n *\r\n * @param pageNumber Index of the page to return. Used to determine StartRow\r\n * @param pageSize Optional, items per page (default = 10)\r\n */\r\n SearchResults.prototype.getPage = function (pageNumber, pageSize) {\r\n // if we got all the available rows we don't have another page\r\n if (this.TotalRows < this.RowCount) {\r\n return Promise.resolve(null);\r\n }\r\n // if pageSize is supplied, then we use that regardless of any previous values\r\n // otherwise get the previous RowLimit or default to 10\r\n var rows = pageSize !== undefined ? pageSize : hOP(this._query, \"RowLimit\") ? this._query.RowLimit : 10;\r\n var query = extend(this._query, {\r\n RowLimit: rows,\r\n StartRow: rows * (pageNumber - 1),\r\n });\r\n // we have reached the end\r\n if (query.StartRow > this.TotalRows) {\r\n return Promise.resolve(null);\r\n }\r\n var search = new Search(this._url, null);\r\n return search.execute(query);\r\n };\r\n /**\r\n * Formats a search results array\r\n *\r\n * @param rawResults The array to process\r\n */\r\n SearchResults.prototype.formatSearchResults = function (rawResults) {\r\n var results = new Array();\r\n var tempResults = rawResults.results ? rawResults.results : rawResults;\r\n for (var _i = 0, tempResults_1 = tempResults; _i < tempResults_1.length; _i++) {\r\n var tempResult = tempResults_1[_i];\r\n var cells = tempResult.Cells.results ? tempResult.Cells.results : tempResult.Cells;\r\n results.push(cells.reduce(function (res, cell) {\r\n Object.defineProperty(res, cell.Key, {\r\n configurable: false,\r\n enumerable: true,\r\n value: cell.Value,\r\n writable: false,\r\n });\r\n return res;\r\n }, {}));\r\n }\r\n return results;\r\n };\r\n return SearchResults;\r\n}());\r\nexport { SearchResults };\r\n/**\r\n * defines the SortDirection enum\r\n */\r\nexport var SortDirection;\r\n(function (SortDirection) {\r\n SortDirection[SortDirection[\"Ascending\"] = 0] = \"Ascending\";\r\n SortDirection[SortDirection[\"Descending\"] = 1] = \"Descending\";\r\n SortDirection[SortDirection[\"FQLFormula\"] = 2] = \"FQLFormula\";\r\n})(SortDirection || (SortDirection = {}));\r\n/**\r\n * defines the ReorderingRuleMatchType enum\r\n */\r\nexport var ReorderingRuleMatchType;\r\n(function (ReorderingRuleMatchType) {\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultContainsKeyword\"] = 0] = \"ResultContainsKeyword\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleContainsKeyword\"] = 1] = \"TitleContainsKeyword\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"TitleMatchesKeyword\"] = 2] = \"TitleMatchesKeyword\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlStartsWith\"] = 3] = \"UrlStartsWith\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"UrlExactlyMatches\"] = 4] = \"UrlExactlyMatches\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ContentTypeIs\"] = 5] = \"ContentTypeIs\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"FileExtensionMatches\"] = 6] = \"FileExtensionMatches\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ResultHasTag\"] = 7] = \"ResultHasTag\";\r\n ReorderingRuleMatchType[ReorderingRuleMatchType[\"ManualCondition\"] = 8] = \"ManualCondition\";\r\n})(ReorderingRuleMatchType || (ReorderingRuleMatchType = {}));\r\n/**\r\n * Specifies the type value for the property\r\n */\r\nexport var QueryPropertyValueType;\r\n(function (QueryPropertyValueType) {\r\n QueryPropertyValueType[QueryPropertyValueType[\"None\"] = 0] = \"None\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"StringType\"] = 1] = \"StringType\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"Int32Type\"] = 2] = \"Int32Type\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"BooleanType\"] = 3] = \"BooleanType\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"StringArrayType\"] = 4] = \"StringArrayType\";\r\n QueryPropertyValueType[QueryPropertyValueType[\"UnSupportedType\"] = 5] = \"UnSupportedType\";\r\n})(QueryPropertyValueType || (QueryPropertyValueType = {}));\r\nvar SearchBuiltInSourceId = /** @class */ (function () {\r\n function SearchBuiltInSourceId() {\r\n }\r\n SearchBuiltInSourceId.Documents = \"e7ec8cee-ded8-43c9-beb5-436b54b31e84\";\r\n SearchBuiltInSourceId.ItemsMatchingContentType = \"5dc9f503-801e-4ced-8a2c-5d1237132419\";\r\n SearchBuiltInSourceId.ItemsMatchingTag = \"e1327b9c-2b8c-4b23-99c9-3730cb29c3f7\";\r\n SearchBuiltInSourceId.ItemsRelatedToCurrentUser = \"48fec42e-4a92-48ce-8363-c2703a40e67d\";\r\n SearchBuiltInSourceId.ItemsWithSameKeywordAsThisItem = \"5c069288-1d17-454a-8ac6-9c642a065f48\";\r\n SearchBuiltInSourceId.LocalPeopleResults = \"b09a7990-05ea-4af9-81ef-edfab16c4e31\";\r\n SearchBuiltInSourceId.LocalReportsAndDataResults = \"203fba36-2763-4060-9931-911ac8c0583b\";\r\n SearchBuiltInSourceId.LocalSharePointResults = \"8413cd39-2156-4e00-b54d-11efd9abdb89\";\r\n SearchBuiltInSourceId.LocalVideoResults = \"78b793ce-7956-4669-aa3b-451fc5defebf\";\r\n SearchBuiltInSourceId.Pages = \"5e34578e-4d08-4edc-8bf3-002acf3cdbcc\";\r\n SearchBuiltInSourceId.Pictures = \"38403c8c-3975-41a8-826e-717f2d41568a\";\r\n SearchBuiltInSourceId.Popular = \"97c71db1-58ce-4891-8b64-585bc2326c12\";\r\n SearchBuiltInSourceId.RecentlyChangedItems = \"ba63bbae-fa9c-42c0-b027-9a878f16557c\";\r\n SearchBuiltInSourceId.RecommendedItems = \"ec675252-14fa-4fbe-84dd-8d098ed74181\";\r\n SearchBuiltInSourceId.Wiki = \"9479bf85-e257-4318-b5a8-81a180f5faa1\";\r\n return SearchBuiltInSourceId;\r\n}());\r\nexport { SearchBuiltInSourceId };\r\n//# sourceMappingURL=search.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, defaultPath, } from \"./sharepointqueryable\";\r\nimport { jsS, hOP } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Exposes social following methods\r\n */\r\nvar SocialQuery = /** @class */ (function (_super) {\r\n tslib_1.__extends(SocialQuery, _super);\r\n function SocialQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SocialQuery_1 = SocialQuery;\r\n Object.defineProperty(SocialQuery.prototype, \"my\", {\r\n get: function () {\r\n return new MySocialQuery(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets a URI to a site that lists the current user's followed sites.\r\n */\r\n SocialQuery.prototype.getFollowedSitesUri = function () {\r\n return this.clone(SocialQuery_1, \"FollowedSitesUri\").get().then(function (r) {\r\n return r.FollowedSitesUri || r;\r\n });\r\n };\r\n /**\r\n * Gets a URI to a site that lists the current user's followed documents.\r\n */\r\n SocialQuery.prototype.getFollowedDocumentsUri = function () {\r\n return this.clone(SocialQuery_1, \"FollowedDocumentsUri\").get().then(function (r) {\r\n return r.FollowedDocumentsUri || r;\r\n });\r\n };\r\n /**\r\n * Makes the current user start following a user, document, site, or tag\r\n *\r\n * @param actorInfo The actor to start following\r\n */\r\n SocialQuery.prototype.follow = function (actorInfo) {\r\n return this.clone(SocialQuery_1, \"follow\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\r\n };\r\n /**\r\n * Indicates whether the current user is following a specified user, document, site, or tag\r\n *\r\n * @param actorInfo The actor to find the following status for\r\n */\r\n SocialQuery.prototype.isFollowed = function (actorInfo) {\r\n return this.clone(SocialQuery_1, \"isfollowed\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\r\n };\r\n /**\r\n * Makes the current user stop following a user, document, site, or tag\r\n *\r\n * @param actorInfo The actor to stop following\r\n */\r\n SocialQuery.prototype.stopFollowing = function (actorInfo) {\r\n return this.clone(SocialQuery_1, \"stopfollowing\").postCore({ body: this.createSocialActorInfoRequestBody(actorInfo) });\r\n };\r\n /**\r\n * Creates SocialActorInfo request body\r\n *\r\n * @param actorInfo The actor to create request body\r\n */\r\n SocialQuery.prototype.createSocialActorInfoRequestBody = function (actorInfo) {\r\n return jsS({\r\n \"actor\": Object.assign(metadata(\"SP.Social.SocialActorInfo\"), {\r\n Id: null,\r\n }, actorInfo),\r\n });\r\n };\r\n var SocialQuery_1;\r\n SocialQuery = SocialQuery_1 = tslib_1.__decorate([\r\n defaultPath(\"_api/social.following\")\r\n ], SocialQuery);\r\n return SocialQuery;\r\n}(SharePointQueryableInstance));\r\nexport { SocialQuery };\r\nvar MySocialQuery = /** @class */ (function (_super) {\r\n tslib_1.__extends(MySocialQuery, _super);\r\n function MySocialQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MySocialQuery_1 = MySocialQuery;\r\n /**\r\n * Gets users, documents, sites, and tags that the current user is following.\r\n *\r\n * @param types Bitwise set of SocialActorTypes to retrieve\r\n */\r\n MySocialQuery.prototype.followed = function (types) {\r\n return this.clone(MySocialQuery_1, \"followed(types=\" + types + \")\").get().then(function (r) {\r\n return hOP(r, \"Followed\") ? r.Followed.results : r;\r\n });\r\n };\r\n /**\r\n * Gets the count of users, documents, sites, and tags that the current user is following.\r\n *\r\n * @param types Bitwise set of SocialActorTypes to retrieve\r\n */\r\n MySocialQuery.prototype.followedCount = function (types) {\r\n return this.clone(MySocialQuery_1, \"followedcount(types=\" + types + \")\").get().then(function (r) {\r\n return r.FollowedCount || r;\r\n });\r\n };\r\n /**\r\n * Gets the users who are following the current user.\r\n */\r\n MySocialQuery.prototype.followers = function () {\r\n return this.clone(MySocialQuery_1, \"followers\").get().then(function (r) {\r\n return hOP(r, \"Followers\") ? r.Followers.results : r;\r\n });\r\n };\r\n /**\r\n * Gets users who the current user might want to follow.\r\n */\r\n MySocialQuery.prototype.suggestions = function () {\r\n return this.clone(MySocialQuery_1, \"suggestions\").get().then(function (r) {\r\n return hOP(r, \"Suggestions\") ? r.Suggestions.results : r;\r\n });\r\n };\r\n var MySocialQuery_1;\r\n MySocialQuery = MySocialQuery_1 = tslib_1.__decorate([\r\n defaultPath(\"my\")\r\n ], MySocialQuery);\r\n return MySocialQuery;\r\n}(SharePointQueryableInstance));\r\nexport { MySocialQuery };\r\n/**\r\n * Social actor type\r\n *\r\n */\r\nexport var SocialActorType;\r\n(function (SocialActorType) {\r\n SocialActorType[SocialActorType[\"User\"] = 0] = \"User\";\r\n SocialActorType[SocialActorType[\"Document\"] = 1] = \"Document\";\r\n SocialActorType[SocialActorType[\"Site\"] = 2] = \"Site\";\r\n SocialActorType[SocialActorType[\"Tag\"] = 3] = \"Tag\";\r\n})(SocialActorType || (SocialActorType = {}));\r\n/**\r\n * Social actor type\r\n *\r\n */\r\n/* tslint:disable:no-bitwise */\r\nexport var SocialActorTypes;\r\n(function (SocialActorTypes) {\r\n SocialActorTypes[SocialActorTypes[\"None\"] = 0] = \"None\";\r\n SocialActorTypes[SocialActorTypes[\"User\"] = 1] = \"User\";\r\n SocialActorTypes[SocialActorTypes[\"Document\"] = 2] = \"Document\";\r\n SocialActorTypes[SocialActorTypes[\"Site\"] = 4] = \"Site\";\r\n SocialActorTypes[SocialActorTypes[\"Tag\"] = 8] = \"Tag\";\r\n /**\r\n * The set excludes documents and sites that do not have feeds.\r\n */\r\n SocialActorTypes[SocialActorTypes[\"ExcludeContentWithoutFeeds\"] = 268435456] = \"ExcludeContentWithoutFeeds\";\r\n /**\r\n * The set includes group sites\r\n */\r\n SocialActorTypes[SocialActorTypes[\"IncludeGroupsSites\"] = 536870912] = \"IncludeGroupsSites\";\r\n /**\r\n * The set includes only items created within the last 24 hours\r\n */\r\n SocialActorTypes[SocialActorTypes[\"WithinLast24Hours\"] = 1073741824] = \"WithinLast24Hours\";\r\n})(SocialActorTypes || (SocialActorTypes = {}));\r\n/* tslint:enable */\r\n/**\r\n * Result from following\r\n *\r\n */\r\nexport var SocialFollowResult;\r\n(function (SocialFollowResult) {\r\n SocialFollowResult[SocialFollowResult[\"Ok\"] = 0] = \"Ok\";\r\n SocialFollowResult[SocialFollowResult[\"AlreadyFollowing\"] = 1] = \"AlreadyFollowing\";\r\n SocialFollowResult[SocialFollowResult[\"LimitReached\"] = 2] = \"LimitReached\";\r\n SocialFollowResult[SocialFollowResult[\"InternalError\"] = 3] = \"InternalError\";\r\n})(SocialFollowResult || (SocialFollowResult = {}));\r\n/**\r\n * Specifies an exception or status code.\r\n */\r\nexport var SocialStatusCode;\r\n(function (SocialStatusCode) {\r\n /**\r\n * The operation completed successfully\r\n */\r\n SocialStatusCode[SocialStatusCode[\"OK\"] = 0] = \"OK\";\r\n /**\r\n * The request is invalid.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"InvalidRequest\"] = 1] = \"InvalidRequest\";\r\n /**\r\n * The current user is not authorized to perform the operation.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"AccessDenied\"] = 2] = \"AccessDenied\";\r\n /**\r\n * The target of the operation was not found.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"ItemNotFound\"] = 3] = \"ItemNotFound\";\r\n /**\r\n * The operation is invalid for the target's current state.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"InvalidOperation\"] = 4] = \"InvalidOperation\";\r\n /**\r\n * The operation completed without modifying the target.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"ItemNotModified\"] = 5] = \"ItemNotModified\";\r\n /**\r\n * The operation failed because an internal error occurred.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"InternalError\"] = 6] = \"InternalError\";\r\n /**\r\n * The operation failed because the server could not access the distributed cache.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"CacheReadError\"] = 7] = \"CacheReadError\";\r\n /**\r\n * The operation succeeded but the server could not update the distributed cache.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"CacheUpdateError\"] = 8] = \"CacheUpdateError\";\r\n /**\r\n * No personal site exists for the current user, and no further information is available.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"PersonalSiteNotFound\"] = 9] = \"PersonalSiteNotFound\";\r\n /**\r\n * No personal site exists for the current user, and a previous attempt to create one failed.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"FailedToCreatePersonalSite\"] = 10] = \"FailedToCreatePersonalSite\";\r\n /**\r\n * No personal site exists for the current user, and a previous attempt to create one was not authorized.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"NotAuthorizedToCreatePersonalSite\"] = 11] = \"NotAuthorizedToCreatePersonalSite\";\r\n /**\r\n * No personal site exists for the current user, and no attempt should be made to create one.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"CannotCreatePersonalSite\"] = 12] = \"CannotCreatePersonalSite\";\r\n /**\r\n * The operation was rejected because an internal limit had been reached.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"LimitReached\"] = 13] = \"LimitReached\";\r\n /**\r\n * The operation failed because an error occurred during the processing of the specified attachment.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"AttachmentError\"] = 14] = \"AttachmentError\";\r\n /**\r\n * The operation succeeded with recoverable errors; the returned data is incomplete.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"PartialData\"] = 15] = \"PartialData\";\r\n /**\r\n * A required SharePoint feature is not enabled.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"FeatureDisabled\"] = 16] = \"FeatureDisabled\";\r\n /**\r\n * The site's storage quota has been exceeded.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"StorageQuotaExceeded\"] = 17] = \"StorageQuotaExceeded\";\r\n /**\r\n * The operation failed because the server could not access the database.\r\n */\r\n SocialStatusCode[SocialStatusCode[\"DatabaseError\"] = 18] = \"DatabaseError\";\r\n})(SocialStatusCode || (SocialStatusCode = {}));\r\n//# sourceMappingURL=social.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, defaultPath } from \"./sharepointqueryable\";\r\nimport { hOP } from \"@pnp/common\";\r\nvar SearchSuggest = /** @class */ (function (_super) {\r\n tslib_1.__extends(SearchSuggest, _super);\r\n function SearchSuggest() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SearchSuggest.prototype.execute = function (query) {\r\n this.mapQueryToQueryString(query);\r\n return this.get().then(function (response) {\r\n var mapper = hOP(response, \"suggest\") ? function (s) { return response.suggest[s].results; } : function (s) { return response[s]; };\r\n return {\r\n PeopleNames: mapper(\"PeopleNames\"),\r\n PersonalResults: mapper(\"PersonalResults\"),\r\n Queries: mapper(\"Queries\"),\r\n };\r\n });\r\n };\r\n SearchSuggest.prototype.mapQueryToQueryString = function (query) {\r\n var _this = this;\r\n var setProp = function (q) { return function (checkProp) { return function (sp) {\r\n if (hOP(q, checkProp)) {\r\n _this.query.set(sp, q[checkProp].toString());\r\n }\r\n }; }; };\r\n this.query.set(\"querytext\", \"'\" + query.querytext + \"'\");\r\n var querySetter = setProp(query);\r\n querySetter(\"count\")(\"inumberofquerysuggestions\");\r\n querySetter(\"personalCount\")(\"inumberofresultsuggestions\");\r\n querySetter(\"preQuery\")(\"fprequerysuggestions\");\r\n querySetter(\"hitHighlighting\")(\"fhithighlighting\");\r\n querySetter(\"capitalize\")(\"fcapitalizefirstletters\");\r\n querySetter(\"culture\")(\"culture\");\r\n querySetter(\"stemming\")(\"enablestemming\");\r\n querySetter(\"includePeople\")(\"showpeoplenamesuggestions\");\r\n querySetter(\"queryRules\")(\"enablequeryrules\");\r\n querySetter(\"prefixMatch\")(\"fprefixmatchallterms\");\r\n };\r\n SearchSuggest = tslib_1.__decorate([\r\n defaultPath(\"_api/search/suggest\")\r\n ], SearchSuggest);\r\n return SearchSuggest;\r\n}(SharePointQueryableInstance));\r\nexport { SearchSuggest };\r\n//# sourceMappingURL=searchsuggest.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable, SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\nimport { extend, jsS } from \"@pnp/common\";\r\nimport { metadata } from \"./utils/metadata\";\r\nvar UserProfileQuery = /** @class */ (function (_super) {\r\n tslib_1.__extends(UserProfileQuery, _super);\r\n /**\r\n * Creates a new instance of the UserProfileQuery class\r\n *\r\n * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query\r\n */\r\n function UserProfileQuery(baseUrl, path) {\r\n if (path === void 0) { path = \"_api/sp.userprofiles.peoplemanager\"; }\r\n var _this = _super.call(this, baseUrl, path) || this;\r\n _this.clientPeoplePickerQuery = (new ClientPeoplePickerQuery(baseUrl)).configureFrom(_this);\r\n _this.profileLoader = (new ProfileLoader(baseUrl)).configureFrom(_this);\r\n return _this;\r\n }\r\n Object.defineProperty(UserProfileQuery.prototype, \"editProfileLink\", {\r\n /**\r\n * The url of the edit profile page for the current user\r\n */\r\n get: function () {\r\n return this.clone(UserProfileQuery, \"EditProfileLink\").get();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(UserProfileQuery.prototype, \"isMyPeopleListPublic\", {\r\n /**\r\n * A boolean value that indicates whether the current user's \"People I'm Following\" list is public\r\n */\r\n get: function () {\r\n return this.clone(UserProfileQuery, \"IsMyPeopleListPublic\").get();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * A boolean value that indicates whether the current user is being followed by the specified user\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.amIFollowedBy = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"amifollowedby(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * A boolean value that indicates whether the current user is following the specified user\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.amIFollowing = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"amifollowing(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Gets tags that the current user is following\r\n *\r\n * @param maxCount The maximum number of tags to retrieve (default is 20)\r\n */\r\n UserProfileQuery.prototype.getFollowedTags = function (maxCount) {\r\n if (maxCount === void 0) { maxCount = 20; }\r\n return this.clone(UserProfileQuery, \"getfollowedtags(\" + maxCount + \")\").get();\r\n };\r\n /**\r\n * Gets the people who are following the specified user\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.getFollowersFor = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"getfollowersfor(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n Object.defineProperty(UserProfileQuery.prototype, \"myFollowers\", {\r\n /**\r\n * Gets the people who are following the current user\r\n *\r\n */\r\n get: function () {\r\n return new SharePointQueryableCollection(this, \"getmyfollowers\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(UserProfileQuery.prototype, \"myProperties\", {\r\n /**\r\n * Gets user properties for the current user\r\n *\r\n */\r\n get: function () {\r\n return new UserProfileQuery(this, \"getmyproperties\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the people who the specified user is following\r\n *\r\n * @param loginName The account name of the user.\r\n */\r\n UserProfileQuery.prototype.getPeopleFollowedBy = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"getpeoplefollowedby(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Gets user properties for the specified user.\r\n *\r\n * @param loginName The account name of the user.\r\n */\r\n UserProfileQuery.prototype.getPropertiesFor = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"getpropertiesfor(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n Object.defineProperty(UserProfileQuery.prototype, \"trendingTags\", {\r\n /**\r\n * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first\r\n *\r\n */\r\n get: function () {\r\n var q = this.clone(UserProfileQuery, null);\r\n q.concat(\".gettrendingtags\");\r\n return q.get();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the specified user profile property for the specified user\r\n *\r\n * @param loginName The account name of the user\r\n * @param propertyName The case-sensitive name of the property to get\r\n */\r\n UserProfileQuery.prototype.getUserProfilePropertyFor = function (loginName, propertyName) {\r\n var q = this.clone(UserProfileQuery, \"getuserprofilepropertyfor(accountname=@v, propertyname='\" + propertyName + \"')\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Removes the specified user from the user's list of suggested people to follow\r\n *\r\n * @param loginName The account name of the user\r\n */\r\n UserProfileQuery.prototype.hideSuggestion = function (loginName) {\r\n var q = this.clone(UserProfileQuery, \"hidesuggestion(@v)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(loginName) + \"'\");\r\n return q.postCore();\r\n };\r\n /**\r\n * A boolean values that indicates whether the first user is following the second user\r\n *\r\n * @param follower The account name of the user who might be following the followee\r\n * @param followee The account name of the user who might be followed by the follower\r\n */\r\n UserProfileQuery.prototype.isFollowing = function (follower, followee) {\r\n var q = this.clone(UserProfileQuery, null);\r\n q.concat(\".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)\");\r\n q.query.set(\"@v\", \"'\" + encodeURIComponent(follower) + \"'\");\r\n q.query.set(\"@y\", \"'\" + encodeURIComponent(followee) + \"'\");\r\n return q.get();\r\n };\r\n /**\r\n * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.\r\n *\r\n * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB\r\n */\r\n UserProfileQuery.prototype.setMyProfilePic = function (profilePicSource) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n var buffer = null;\r\n var reader = new FileReader();\r\n reader.onload = function (e) { return buffer = e.target.result; };\r\n reader.readAsArrayBuffer(profilePicSource);\r\n var request = new UserProfileQuery(_this, \"setmyprofilepicture\");\r\n request.postCore({\r\n body: String.fromCharCode.apply(null, new Uint16Array(buffer)),\r\n }).then(function (_) { return resolve(); }).catch(function (e) { return reject(e); });\r\n });\r\n };\r\n /**\r\n * Sets single value User Profile property\r\n *\r\n * @param accountName The account name of the user\r\n * @param propertyName Property name\r\n * @param propertyValue Property value\r\n */\r\n UserProfileQuery.prototype.setSingleValueProfileProperty = function (accountName, propertyName, propertyValue) {\r\n var postBody = jsS({\r\n accountName: accountName,\r\n propertyName: propertyName,\r\n propertyValue: propertyValue,\r\n });\r\n return this.clone(UserProfileQuery, \"SetSingleValueProfileProperty\")\r\n .postCore({ body: postBody });\r\n };\r\n /**\r\n * Sets multi valued User Profile property\r\n *\r\n * @param accountName The account name of the user\r\n * @param propertyName Property name\r\n * @param propertyValues Property values\r\n */\r\n UserProfileQuery.prototype.setMultiValuedProfileProperty = function (accountName, propertyName, propertyValues) {\r\n var postBody = jsS({\r\n accountName: accountName,\r\n propertyName: propertyName,\r\n propertyValues: propertyValues,\r\n });\r\n return this.clone(UserProfileQuery, \"SetMultiValuedProfileProperty\")\r\n .postCore({ body: postBody });\r\n };\r\n /**\r\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)\r\n *\r\n * @param emails The email addresses of the users to provision sites for\r\n */\r\n UserProfileQuery.prototype.createPersonalSiteEnqueueBulk = function () {\r\n var emails = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n emails[_i] = arguments[_i];\r\n }\r\n return this.profileLoader.createPersonalSiteEnqueueBulk(emails);\r\n };\r\n Object.defineProperty(UserProfileQuery.prototype, \"ownerUserProfile\", {\r\n /**\r\n * Gets the user profile of the site owner\r\n *\r\n */\r\n get: function () {\r\n return this.profileLoader.ownerUserProfile;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(UserProfileQuery.prototype, \"userProfile\", {\r\n /**\r\n * Gets the user profile for the current user\r\n */\r\n get: function () {\r\n return this.profileLoader.userProfile;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files\r\n *\r\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\r\n */\r\n UserProfileQuery.prototype.createPersonalSite = function (interactiveRequest) {\r\n if (interactiveRequest === void 0) { interactiveRequest = false; }\r\n return this.profileLoader.createPersonalSite(interactiveRequest);\r\n };\r\n /**\r\n * Sets the privacy settings for this profile\r\n *\r\n * @param share true to make all social data public; false to make all social data private\r\n */\r\n UserProfileQuery.prototype.shareAllSocialData = function (share) {\r\n return this.profileLoader.shareAllSocialData(share);\r\n };\r\n /**\r\n * Resolves user or group using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform resolve\r\n */\r\n UserProfileQuery.prototype.clientPeoplePickerResolveUser = function (queryParams) {\r\n return this.clientPeoplePickerQuery.clientPeoplePickerResolveUser(queryParams);\r\n };\r\n /**\r\n * Searches for users or groups using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform search\r\n */\r\n UserProfileQuery.prototype.clientPeoplePickerSearchUser = function (queryParams) {\r\n return this.clientPeoplePickerQuery.clientPeoplePickerSearchUser(queryParams);\r\n };\r\n return UserProfileQuery;\r\n}(SharePointQueryableInstance));\r\nexport { UserProfileQuery };\r\nvar ProfileLoader = /** @class */ (function (_super) {\r\n tslib_1.__extends(ProfileLoader, _super);\r\n function ProfileLoader() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ProfileLoader_1 = ProfileLoader;\r\n /**\r\n * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only) Doesn't support batching\r\n *\r\n * @param emails The email addresses of the users to provision sites for\r\n */\r\n ProfileLoader.prototype.createPersonalSiteEnqueueBulk = function (emails) {\r\n return this.clone(ProfileLoader_1, \"createpersonalsiteenqueuebulk\", false).postCore({\r\n body: jsS({ \"emailIDs\": emails }),\r\n });\r\n };\r\n Object.defineProperty(ProfileLoader.prototype, \"ownerUserProfile\", {\r\n /**\r\n * Gets the user profile of the site owner.\r\n *\r\n */\r\n get: function () {\r\n var q = this.getParent(ProfileLoader_1, this.parentUrl, \"_api/sp.userprofiles.profileloader.getowneruserprofile\");\r\n if (this.hasBatch) {\r\n q = q.inBatch(this.batch);\r\n }\r\n return q.postCore();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ProfileLoader.prototype, \"userProfile\", {\r\n /**\r\n * Gets the user profile of the current user.\r\n *\r\n */\r\n get: function () {\r\n return this.clone(ProfileLoader_1, \"getuserprofile\").postCore();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files.\r\n *\r\n * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request\r\n */\r\n ProfileLoader.prototype.createPersonalSite = function (interactiveRequest) {\r\n if (interactiveRequest === void 0) { interactiveRequest = false; }\r\n return this.clone(ProfileLoader_1, \"getuserprofile/createpersonalsiteenque(\" + interactiveRequest + \")\").postCore();\r\n };\r\n /**\r\n * Sets the privacy settings for this profile\r\n *\r\n * @param share true to make all social data public; false to make all social data private.\r\n */\r\n ProfileLoader.prototype.shareAllSocialData = function (share) {\r\n return this.clone(ProfileLoader_1, \"getuserprofile/shareallsocialdata(\" + share + \")\").postCore();\r\n };\r\n var ProfileLoader_1;\r\n ProfileLoader = ProfileLoader_1 = tslib_1.__decorate([\r\n defaultPath(\"_api/sp.userprofiles.profileloader.getprofileloader\")\r\n ], ProfileLoader);\r\n return ProfileLoader;\r\n}(SharePointQueryable));\r\nvar ClientPeoplePickerQuery = /** @class */ (function (_super) {\r\n tslib_1.__extends(ClientPeoplePickerQuery, _super);\r\n function ClientPeoplePickerQuery() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ClientPeoplePickerQuery_1 = ClientPeoplePickerQuery;\r\n /**\r\n * Resolves user or group using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform resolve\r\n */\r\n ClientPeoplePickerQuery.prototype.clientPeoplePickerResolveUser = function (queryParams) {\r\n var q = this.clone(ClientPeoplePickerQuery_1, null);\r\n q.concat(\".clientpeoplepickerresolveuser\");\r\n return q.postCore({\r\n body: this.createClientPeoplePickerQueryParametersRequestBody(queryParams),\r\n })\r\n .then(function (res) {\r\n if (typeof res === \"object\") {\r\n return res.ClientPeoplePickerResolveUser;\r\n }\r\n return res;\r\n })\r\n .then(JSON.parse);\r\n };\r\n /**\r\n * Searches for users or groups using specified query parameters\r\n *\r\n * @param queryParams The query parameters used to perform search\r\n */\r\n ClientPeoplePickerQuery.prototype.clientPeoplePickerSearchUser = function (queryParams) {\r\n var q = this.clone(ClientPeoplePickerQuery_1, null);\r\n q.concat(\".clientpeoplepickersearchuser\");\r\n return q.postCore({\r\n body: this.createClientPeoplePickerQueryParametersRequestBody(queryParams),\r\n })\r\n .then(function (res) {\r\n if (typeof res === \"object\") {\r\n return res.ClientPeoplePickerSearchUser;\r\n }\r\n return res;\r\n })\r\n .then(JSON.parse);\r\n };\r\n /**\r\n * Creates ClientPeoplePickerQueryParameters request body\r\n *\r\n * @param queryParams The query parameters to create request body\r\n */\r\n ClientPeoplePickerQuery.prototype.createClientPeoplePickerQueryParametersRequestBody = function (queryParams) {\r\n return jsS({\r\n \"queryParams\": extend(metadata(\"SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters\"), queryParams),\r\n });\r\n };\r\n var ClientPeoplePickerQuery_1;\r\n ClientPeoplePickerQuery = ClientPeoplePickerQuery_1 = tslib_1.__decorate([\r\n defaultPath(\"_api/sp.ui.applicationpages.clientpeoplepickerwebserviceinterface\")\r\n ], ClientPeoplePickerQuery);\r\n return ClientPeoplePickerQuery;\r\n}(SharePointQueryable));\r\n//# sourceMappingURL=userprofiles.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryable } from \"./sharepointqueryable\";\r\nimport { extend, jsS, hOP } from \"@pnp/common\";\r\nimport { File } from \"./files\";\r\nimport { odataUrlFrom } from \"./odata\";\r\nimport { metadata } from \"./utils/metadata\";\r\n/**\r\n * Allows for calling of the static SP.Utilities.Utility methods by supplying the method name\r\n */\r\nvar UtilityMethod = /** @class */ (function (_super) {\r\n tslib_1.__extends(UtilityMethod, _super);\r\n /**\r\n * Creates a new instance of the Utility method class\r\n *\r\n * @param baseUrl The parent url provider\r\n * @param methodName The static method name to call on the utility class\r\n */\r\n function UtilityMethod(baseUrl, methodName) {\r\n return _super.call(this, UtilityMethod.getBaseUrl(baseUrl), \"_api/SP.Utilities.Utility.\" + methodName) || this;\r\n }\r\n UtilityMethod.getBaseUrl = function (candidate) {\r\n if (typeof candidate === \"string\") {\r\n return candidate;\r\n }\r\n var c = candidate;\r\n var url = c.toUrl();\r\n var index = url.indexOf(\"_api/\");\r\n if (index < 0) {\r\n return url;\r\n }\r\n return url.substr(0, index);\r\n };\r\n UtilityMethod.prototype.excute = function (props) {\r\n return this.postCore({\r\n body: jsS(props),\r\n });\r\n };\r\n /**\r\n * Sends an email based on the supplied properties\r\n *\r\n * @param props The properties of the email to send\r\n */\r\n UtilityMethod.prototype.sendEmail = function (props) {\r\n var params = {\r\n properties: extend(metadata(\"SP.Utilities.EmailProperties\"), {\r\n Body: props.Body,\r\n From: props.From,\r\n Subject: props.Subject,\r\n }),\r\n };\r\n if (props.To && props.To.length > 0) {\r\n params.properties = extend(params.properties, {\r\n To: { results: props.To },\r\n });\r\n }\r\n if (props.CC && props.CC.length > 0) {\r\n params.properties = extend(params.properties, {\r\n CC: { results: props.CC },\r\n });\r\n }\r\n if (props.BCC && props.BCC.length > 0) {\r\n params.properties = extend(params.properties, {\r\n BCC: { results: props.BCC },\r\n });\r\n }\r\n if (props.AdditionalHeaders) {\r\n params.properties = extend(params.properties, {\r\n AdditionalHeaders: props.AdditionalHeaders,\r\n });\r\n }\r\n return this.clone(UtilityMethod, \"SendEmail\", true).excute(params);\r\n };\r\n UtilityMethod.prototype.getCurrentUserEmailAddresses = function () {\r\n return this.clone(UtilityMethod, \"GetCurrentUserEmailAddresses\", true).excute({}).then(function (r) {\r\n return hOP(r, \"GetCurrentUserEmailAddresses\") ? r.GetCurrentUserEmailAddresses : r;\r\n });\r\n };\r\n UtilityMethod.prototype.resolvePrincipal = function (input, scopes, sources, inputIsEmailOnly, addToUserInfoList, matchUserInfoList) {\r\n if (matchUserInfoList === void 0) { matchUserInfoList = false; }\r\n var params = {\r\n addToUserInfoList: addToUserInfoList,\r\n input: input,\r\n inputIsEmailOnly: inputIsEmailOnly,\r\n matchUserInfoList: matchUserInfoList,\r\n scopes: scopes,\r\n sources: sources,\r\n };\r\n return this.clone(UtilityMethod, \"ResolvePrincipalInCurrentContext\", true).excute(params).then(function (r) {\r\n return hOP(r, \"ResolvePrincipalInCurrentContext\") ? r.ResolvePrincipalInCurrentContext : r;\r\n });\r\n };\r\n UtilityMethod.prototype.searchPrincipals = function (input, scopes, sources, groupName, maxCount) {\r\n var params = {\r\n groupName: groupName,\r\n input: input,\r\n maxCount: maxCount,\r\n scopes: scopes,\r\n sources: sources,\r\n };\r\n return this.clone(UtilityMethod, \"SearchPrincipalsUsingContextWeb\", true).excute(params).then(function (r) {\r\n return hOP(r, \"SearchPrincipalsUsingContextWeb\") ? r.SearchPrincipalsUsingContextWeb : r;\r\n });\r\n };\r\n UtilityMethod.prototype.createEmailBodyForInvitation = function (pageAddress) {\r\n var params = {\r\n pageAddress: pageAddress,\r\n };\r\n return this.clone(UtilityMethod, \"CreateEmailBodyForInvitation\", true).excute(params).then(function (r) {\r\n return hOP(r, \"CreateEmailBodyForInvitation\") ? r.CreateEmailBodyForInvitation : r;\r\n });\r\n };\r\n UtilityMethod.prototype.expandGroupsToPrincipals = function (inputs, maxCount) {\r\n if (maxCount === void 0) { maxCount = 30; }\r\n var params = {\r\n inputs: inputs,\r\n maxCount: maxCount,\r\n };\r\n return this.clone(UtilityMethod, \"ExpandGroupsToPrincipals\", true).excute(params).then(function (r) {\r\n return hOP(r, \"ExpandGroupsToPrincipals\") ? r.ExpandGroupsToPrincipals : r;\r\n });\r\n };\r\n UtilityMethod.prototype.createWikiPage = function (info) {\r\n return this.clone(UtilityMethod, \"CreateWikiPageInContextWeb\", true).excute({\r\n parameters: info,\r\n }).then(function (r) {\r\n return {\r\n data: hOP(r, \"CreateWikiPageInContextWeb\") ? r.CreateWikiPageInContextWeb : r,\r\n file: new File(odataUrlFrom(r)),\r\n };\r\n });\r\n };\r\n /**\r\n * Checks if file or folder name contains invalid characters\r\n *\r\n * @param input File or folder name to check\r\n * @param onPremise Set to true for SharePoint On-Premise\r\n * @returns True if contains invalid chars, false otherwise\r\n */\r\n UtilityMethod.prototype.containsInvalidFileFolderChars = function (input, onPremise) {\r\n if (onPremise === void 0) { onPremise = false; }\r\n if (onPremise) {\r\n UtilityMethod.InvalidFileFolderNameCharsOnPremiseRegex.lastIndex = 0;\r\n return (UtilityMethod.InvalidFileFolderNameCharsOnPremiseRegex.test(input));\r\n }\r\n else {\r\n UtilityMethod.InvalidFileFolderNameCharsOnlineRegex.lastIndex = 0;\r\n return (UtilityMethod.InvalidFileFolderNameCharsOnlineRegex.test(input));\r\n }\r\n };\r\n /**\r\n * Removes invalid characters from file or folder name\r\n *\r\n * @param input File or folder name\r\n * @param replacer Value that will replace invalid characters\r\n * @param onPremise Set to true for SharePoint On-Premise\r\n * @returns File or folder name with replaced invalid characters\r\n */\r\n UtilityMethod.prototype.stripInvalidFileFolderChars = function (input, replacer, onPremise) {\r\n if (replacer === void 0) { replacer = \"\"; }\r\n if (onPremise === void 0) { onPremise = false; }\r\n if (onPremise) {\r\n return input.replace(UtilityMethod.InvalidFileFolderNameCharsOnPremiseRegex, replacer);\r\n }\r\n else {\r\n return input.replace(UtilityMethod.InvalidFileFolderNameCharsOnlineRegex, replacer);\r\n }\r\n };\r\n UtilityMethod.InvalidFileFolderNameCharsOnlineRegex = /[\"*:<>?/\\\\|\\x00-\\x1f\\x7f-\\x9f]/g;\r\n UtilityMethod.InvalidFileFolderNameCharsOnPremiseRegex = /[\"#%*:<>?/\\\\|\\x00-\\x1f\\x7f-\\x9f]/g;\r\n return UtilityMethod;\r\n}(SharePointQueryable));\r\nexport { UtilityMethod };\r\n//# sourceMappingURL=utilities.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SharePointQueryableInstance, SharePointQueryableCollection, defaultPath } from \"./sharepointqueryable\";\r\n/**\r\n * Describes a collection of Hub Sites\r\n *\r\n */\r\nvar HubSites = /** @class */ (function (_super) {\r\n tslib_1.__extends(HubSites, _super);\r\n function HubSites() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Gets a Hub Site from the collection by id\r\n *\r\n * @param id The Id of the Hub Site\r\n */\r\n HubSites.prototype.getById = function (id) {\r\n return new HubSite(this, \"GetById?hubSiteId='\" + id + \"'\");\r\n };\r\n HubSites = tslib_1.__decorate([\r\n defaultPath(\"_api/hubsites\")\r\n ], HubSites);\r\n return HubSites;\r\n}(SharePointQueryableCollection));\r\nexport { HubSites };\r\nvar HubSite = /** @class */ (function (_super) {\r\n tslib_1.__extends(HubSite, _super);\r\n function HubSite() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return HubSite;\r\n}(SharePointQueryableInstance));\r\nexport { HubSite };\r\n//# sourceMappingURL=hubsites.js.map","import { Search } from \"./search\";\r\nimport { SearchSuggest } from \"./searchsuggest\";\r\nimport { Site } from \"./site\";\r\nimport { Web } from \"./webs\";\r\nimport { UserProfileQuery } from \"./userprofiles\";\r\nimport { NavigationService } from \"./navigation\";\r\nimport { SocialQuery } from \"./social\";\r\nimport { SiteScripts } from \"./sitescripts\";\r\nimport { SiteDesigns } from \"./sitedesigns\";\r\nimport { UtilityMethod } from \"./utilities\";\r\nimport { setup as _setup, } from \"./config/splibconfig\";\r\nimport { HubSites } from \"./hubsites\";\r\n/**\r\n * Root of the SharePoint REST module\r\n */\r\nvar SPRest = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of the SPRest class\r\n *\r\n * @param options Additional options\r\n * @param baseUrl A string that should form the base part of the url\r\n */\r\n function SPRest(_options, _baseUrl) {\r\n if (_options === void 0) { _options = {}; }\r\n if (_baseUrl === void 0) { _baseUrl = \"\"; }\r\n this._options = _options;\r\n this._baseUrl = _baseUrl;\r\n }\r\n /**\r\n * Configures instance with additional options and baseUrl.\r\n * Provided configuration used by other objects in a chain\r\n *\r\n * @param options Additional options\r\n * @param baseUrl A string that should form the base part of the url\r\n */\r\n SPRest.prototype.configure = function (options, baseUrl) {\r\n if (baseUrl === void 0) { baseUrl = \"\"; }\r\n return new SPRest(options, baseUrl);\r\n };\r\n /**\r\n * Global SharePoint configuration options\r\n *\r\n * @param config The SharePoint configuration to apply\r\n */\r\n SPRest.prototype.setup = function (config) {\r\n _setup(config);\r\n };\r\n /**\r\n * Executes a search against this web context\r\n *\r\n * @param query The SearchQuery definition\r\n */\r\n SPRest.prototype.searchSuggest = function (query) {\r\n var finalQuery;\r\n if (typeof query === \"string\") {\r\n finalQuery = { querytext: query };\r\n }\r\n else {\r\n finalQuery = query;\r\n }\r\n return this.create(SearchSuggest).execute(finalQuery);\r\n };\r\n /**\r\n * Executes a search against this web context\r\n *\r\n * @param query The SearchQuery definition\r\n */\r\n SPRest.prototype.search = function (query) {\r\n return this.create(Search).execute(query);\r\n };\r\n /**\r\n * Executes the provided search query, caching the results\r\n *\r\n * @param query The SearchQuery definition\r\n * @param options The set of caching options used to store the results\r\n */\r\n SPRest.prototype.searchWithCaching = function (query, options) {\r\n return this.create(Search).usingCaching(options).execute(query);\r\n };\r\n Object.defineProperty(SPRest.prototype, \"site\", {\r\n /**\r\n * Begins a site collection scoped REST request\r\n *\r\n */\r\n get: function () {\r\n return this.create(Site);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"web\", {\r\n /**\r\n * Begins a web scoped REST request\r\n *\r\n */\r\n get: function () {\r\n return this.create(Web);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"profiles\", {\r\n /**\r\n * Access to user profile methods\r\n *\r\n */\r\n get: function () {\r\n return this.create(UserProfileQuery);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"social\", {\r\n /**\r\n * Access to social methods\r\n */\r\n get: function () {\r\n return this.create(SocialQuery);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"navigation\", {\r\n /**\r\n * Access to the site collection level navigation service\r\n */\r\n get: function () {\r\n return this.create(NavigationService);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates a new batch object for use with the SharePointQueryable.addToBatch method\r\n *\r\n */\r\n SPRest.prototype.createBatch = function () {\r\n return this.web.createBatch();\r\n };\r\n Object.defineProperty(SPRest.prototype, \"utility\", {\r\n /**\r\n * Static utilities methods from SP.Utilities.Utility\r\n */\r\n get: function () {\r\n return this.create(UtilityMethod, \"\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"siteScripts\", {\r\n /**\r\n * Access to sitescripts methods\r\n */\r\n get: function () {\r\n return this.create(SiteScripts, \"\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"siteDesigns\", {\r\n /**\r\n * Access to sitedesigns methods\r\n */\r\n get: function () {\r\n return this.create(SiteDesigns, \"\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(SPRest.prototype, \"hubSites\", {\r\n /**\r\n * Access to Hub Site methods\r\n */\r\n get: function () {\r\n return this.create(HubSites);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Gets the Web instance representing the tenant app catalog web\r\n */\r\n SPRest.prototype.getTenantAppCatalogWeb = function () {\r\n var _this = this;\r\n return this.create(Web, \"_api/SP_TenantSettings_Current\").get().then(function (r) {\r\n return (new Web(r.CorporateCatalogUrl)).configure(_this._options);\r\n });\r\n };\r\n /**\r\n * Handles creating and configuring the objects returned from this class\r\n *\r\n * @param fm The factory method used to create the instance\r\n * @param path Optional additional path information to pass to the factory method\r\n */\r\n SPRest.prototype.create = function (fm, path) {\r\n return new fm(this._baseUrl, path).configure(this._options);\r\n };\r\n return SPRest;\r\n}());\r\nexport { SPRest };\r\nexport var sp = new SPRest();\r\n//# sourceMappingURL=rest.js.map","import * as tslib_1 from \"tslib\";\r\nimport { SPRest, Web, Site, } from \"@pnp/sp\";\r\nimport { isUrlAbsolute, combine, } from \"@pnp/common\";\r\nvar SPRestAddIn = /** @class */ (function (_super) {\r\n tslib_1.__extends(SPRestAddIn, _super);\r\n function SPRestAddIn() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * Begins a cross-domain, host site scoped REST request, for use in add-in webs\r\n *\r\n * @param addInWebUrl The absolute url of the add-in web\r\n * @param hostWebUrl The absolute url of the host web\r\n */\r\n SPRestAddIn.prototype.crossDomainSite = function (addInWebUrl, hostWebUrl) {\r\n return this._cdImpl(Site, addInWebUrl, hostWebUrl, \"site\");\r\n };\r\n /**\r\n * Begins a cross-domain, host web scoped REST request, for use in add-in webs\r\n *\r\n * @param addInWebUrl The absolute url of the add-in web\r\n * @param hostWebUrl The absolute url of the host web\r\n */\r\n SPRestAddIn.prototype.crossDomainWeb = function (addInWebUrl, hostWebUrl) {\r\n return this._cdImpl(Web, addInWebUrl, hostWebUrl, \"web\");\r\n };\r\n /**\r\n * Implements the creation of cross domain REST urls\r\n *\r\n * @param factory The constructor of the object to create Site | Web\r\n * @param addInWebUrl The absolute url of the add-in web\r\n * @param hostWebUrl The absolute url of the host web\r\n * @param urlPart String part to append to the url \"site\" | \"web\"\r\n */\r\n SPRestAddIn.prototype._cdImpl = function (factory, addInWebUrl, hostWebUrl, urlPart) {\r\n if (!isUrlAbsolute(addInWebUrl)) {\r\n throw Error(\"The addInWebUrl parameter must be an absolute url.\");\r\n }\r\n if (!isUrlAbsolute(hostWebUrl)) {\r\n throw Error(\"The hostWebUrl parameter must be an absolute url.\");\r\n }\r\n var url = combine(addInWebUrl, \"_api/SP.AppContextSite(@target)\");\r\n var instance = new factory(url, urlPart);\r\n instance.query.set(\"@target\", \"'\" + encodeURIComponent(hostWebUrl) + \"'\");\r\n return instance.configure(this._options);\r\n };\r\n return SPRestAddIn;\r\n}(SPRest));\r\nexport { SPRestAddIn };\r\nexport var sp = new SPRestAddIn();\r\n//# sourceMappingURL=sprestaddin.js.map","import { Logger } from \"@pnp/logging\";\r\nimport { PnPClientStorage, dateAdd, combine, getCtxCallback, getRandomString, getGUID, isFunc, objectDefinedNotNull, isArray, extend, isUrlAbsolute, stringIsNullOrEmpty, getAttrValueFromString, sanitizeGuid, } from \"@pnp/common\";\r\nimport { Settings } from \"@pnp/config-store\";\r\nimport { graph as _graph } from \"@pnp/graph\";\r\nimport { sp as _sp } from \"@pnp/sp-addinhelpers\";\r\nimport { setup as _setup } from \"./config/pnplibconfig\";\r\n/**\r\n * Root class of the Patterns and Practices namespace, provides an entry point to the library\r\n */\r\n/**\r\n * Re-export everything from the dependencies to match the previous pattern\r\n */\r\nexport * from \"@pnp/sp\";\r\nexport * from \"@pnp/graph\";\r\nexport * from \"@pnp/common\";\r\nexport * from \"@pnp/logging\";\r\nexport * from \"@pnp/config-store\";\r\nexport * from \"@pnp/odata\";\r\n/**\r\n * Utility methods\r\n */\r\nexport var util = {\r\n combine: combine,\r\n dateAdd: dateAdd,\r\n extend: extend,\r\n getAttrValueFromString: getAttrValueFromString,\r\n getCtxCallback: getCtxCallback,\r\n getGUID: getGUID,\r\n getRandomString: getRandomString,\r\n isArray: isArray,\r\n isFunc: isFunc,\r\n isUrlAbsolute: isUrlAbsolute,\r\n objectDefinedNotNull: objectDefinedNotNull,\r\n sanitizeGuid: sanitizeGuid,\r\n stringIsNullOrEmpty: stringIsNullOrEmpty,\r\n};\r\n/**\r\n * Provides access to the SharePoint REST interface\r\n */\r\nexport var sp = _sp;\r\n/**\r\n * Provides access to the Microsoft Graph REST interface\r\n */\r\nexport var graph = _graph;\r\n/**\r\n * Provides access to local and session storage\r\n */\r\nexport var storage = new PnPClientStorage();\r\n/**\r\n * Global configuration instance to which providers can be added\r\n */\r\nexport var config = new Settings();\r\n/**\r\n * Global logging instance to which subscribers can be registered and messages written\r\n */\r\nexport var log = Logger;\r\n/**\r\n * Allows for the configuration of the library\r\n */\r\nexport var setup = _setup;\r\n// /**\r\n// * Expose a subset of classes from the library for public consumption\r\n// */\r\n// creating this class instead of directly assigning to default fixes issue #116\r\nvar Def = {\r\n /**\r\n * Global configuration instance to which providers can be added\r\n */\r\n config: config,\r\n /**\r\n * Provides access to the Microsoft Graph REST interface\r\n */\r\n graph: graph,\r\n /**\r\n * Global logging instance to which subscribers can be registered and messages written\r\n */\r\n log: log,\r\n /**\r\n * Provides access to local and session storage\r\n */\r\n setup: setup,\r\n /**\r\n * Provides access to the REST interface\r\n */\r\n sp: sp,\r\n /**\r\n * Provides access to local and session storage\r\n */\r\n storage: storage,\r\n /**\r\n * Utility methods\r\n */\r\n util: util,\r\n};\r\n/**\r\n * Enables use of the import pnp from syntax\r\n */\r\nexport default Def;\r\n//# sourceMappingURL=pnpjs.js.map","import { RuntimeConfig } from \"@pnp/common\";\r\nexport function setup(config) {\r\n RuntimeConfig.extend(config);\r\n}\r\n//# sourceMappingURL=pnplibconfig.js.map","export * from \"./src/pnpjs\";\r\nimport pnp from \"./src/pnpjs\";\r\nexport default pnp;\r\n//# sourceMappingURL=index.js.map"],"sourceRoot":""}